structured-render - v1.2.0
    Preparing search index...

    Function createRenderDataTable

    • A helper for defining a StructuredRenderTable instance.

      Type Parameters

      • const Headers extends {
            hidden?: boolean | null;
            key: string;
            text?:
                | {
                    icon?: | {
                        fillColor?: string
                        | null;
                        iconKey: string;
                        strokeColor?: string | null;
                        strokeWidth?: string | number | null;
                        type: "icon";
                    }
                    | null;
                    sectionTitle?: string
                    | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: ((...) | (...) | (...))[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: ((...) | (...) | (...))[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    style?: Faint
                    | Small
                    | Bold
                    | null;
                    text?: string | number | bigint | boolean | symbol | null;
                    type: "text";
                }
                | null;
        }[]

      Parameters

      • direction: StructuredRenderCellDirection
      • headers: Headers
      • entries: {
            data: Record<
                ArrayElement<Headers>["key"],
                StructuredRenderShapesAllowedInTable | undefined,
            >;
            sources?: (
                | {
                    fileBoundingBoxes?: | (
                        { x1: number; x2: number; y1: number; y2: number }
                        | null
                        | undefined
                    )[]
                    | null;
                    fileName?: string | null;
                    pageNumbers?: (number | null | undefined)[] | null;
                    quote?: string | null;
                    type: "source";
                }
                | undefined
            )[];
        }[]
      • OptionalfooterRows:
            | {
                alignment?: Left
                | Right
                | null;
                cells:
                    | { type: "empty" }
                    | {
                        icon?:
                            | {
                                fillColor?: string
                                | null;
                                iconKey: string;
                                strokeColor?: string | null;
                                strokeWidth?: string | number | null;
                                type: "icon";
                            }
                            | null;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: (...)[]
                                    | null;
                                    fileName?: string | null;
                                    pageNumbers?: (...)[] | null;
                                    quote?: string | null;
                                    type: "source";
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        style?: Faint
                        | Small
                        | Bold
                        | null;
                        text?: string | number | bigint | boolean | symbol | null;
                        type: "text";
                    }
                    | {
                        color?: | {
                            custom: {
                                backgroundColor?: string
                                | null;
                                foregroundColor?: string | null;
                            };
                        }
                        | { variant: ViraColorVariant }
                        | null;
                        sectionTitle?: string | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: (...)[]
                                    | null;
                                    fileName?: string | null;
                                    pageNumbers?: (...)[] | null;
                                    quote?: string | null;
                                    type: "source";
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        text: string
                        | number
                        | bigint
                        | boolean
                        | symbol
                        | null
                        | undefined;
                        type: "tag";
                        useBigTag?: boolean | null;
                    }
                    | {
                        code: string;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: (...)[]
                                    | null;
                                    fileName?: string | null;
                                    pageNumbers?: (...)[] | null;
                                    quote?: string | null;
                                    type: "source";
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "inlineCode";
                    }
                    | {
                        items: {
                            content?: | { type: "empty" }
                            | {
                                icon?:
                                    | {
                                        fillColor?: ...;
                                        iconKey: ...;
                                        strokeColor?: ...;
                                        strokeWidth?: ...;
                                        type: ...;
                                    }
                                    | null;
                                sectionTitle?: string
                                | null;
                                sources?: (...)[] | null;
                                style?: Faint | Small | Bold | null;
                                text?: string | number | bigint | boolean | symbol | null;
                                type: "text";
                            }
                            | {
                                color?: { custom: ... }
                                | { variant: ... }
                                | null;
                                sectionTitle?: string | null;
                                sources?: (...)[] | null;
                                text: string | number | bigint | boolean | symbol | null | undefined;
                                type: "tag";
                                useBigTag?: boolean | null;
                            }
                            | null;
                            icon?: | {
                                fillColor?: string
                                | null;
                                iconKey: string;
                                strokeColor?: string | null;
                                strokeWidth?: string | number | null;
                                type: "icon";
                            }
                            | null;
                            sources?: | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        }[];
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: (...)[]
                                    | null;
                                    fileName?: string | null;
                                    pageNumbers?: (...)[] | null;
                                    quote?: string | null;
                                    type: "source";
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "list";
                    }
                    | {
                        markdown: string;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: (...)[]
                                    | null;
                                    fileName?: string | null;
                                    pageNumbers?: (...)[] | null;
                                    quote?: string | null;
                                    type: "source";
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "markdown";
                    }
                    | { type: "processing" }
                    | (
                        | { type: "empty" }
                        | {
                            icon?:
                                | {
                                    fillColor?: string
                                    | null;
                                    iconKey: string;
                                    strokeColor?: string | null;
                                    strokeWidth?: string | number | null;
                                    type: "icon";
                                }
                                | null;
                            sectionTitle?: string
                            | null;
                            sources?:
                                | (
                                    | {
                                        fileBoundingBoxes?: ...;
                                        fileName?: ...;
                                        pageNumbers?: ...;
                                        quote?: ...;
                                        type: ...;
                                    }
                                    | null
                                    | undefined
                                )[]
                                | null;
                            style?: Faint
                            | Small
                            | Bold
                            | null;
                            text?: string | number | bigint | boolean | symbol | null;
                            type: "text";
                        }
                        | {
                            color?: | {
                                custom: {
                                    backgroundColor?: (...)
                                    | (...)
                                    | (...);
                                    foregroundColor?: (...) | (...) | (...);
                                };
                            }
                            | { variant: ViraColorVariant }
                            | null;
                            sectionTitle?: string | null;
                            sources?:
                                | (
                                    | {
                                        fileBoundingBoxes?: ...;
                                        fileName?: ...;
                                        pageNumbers?: ...;
                                        quote?: ...;
                                        type: ...;
                                    }
                                    | null
                                    | undefined
                                )[]
                                | null;
                            text: string
                            | number
                            | bigint
                            | boolean
                            | symbol
                            | null
                            | undefined;
                            type: "tag";
                            useBigTag?: boolean | null;
                        }
                        | {
                            code: string;
                            sectionTitle?: string
                            | null;
                            sources?:
                                | (
                                    | {
                                        fileBoundingBoxes?: ...;
                                        fileName?: ...;
                                        pageNumbers?: ...;
                                        quote?: ...;
                                        type: ...;
                                    }
                                    | null
                                    | undefined
                                )[]
                                | null;
                            type: "inlineCode";
                        }
                        | {
                            items: {
                                content?: | { type: ... }
                                | {
                                    icon?: ...;
                                    sectionTitle?: ...;
                                    sources?: ...;
                                    style?: ...;
                                    text?: ...;
                                    type: ...;
                                }
                                | {
                                    color?: ...;
                                    sectionTitle?: ...;
                                    sources?: ...;
                                    text: ...;
                                    type: ...;
                                    useBigTag?: ...;
                                }
                                | null;
                                icon?: | {
                                    fillColor?: ...;
                                    iconKey: ...;
                                    strokeColor?: ...;
                                    strokeWidth?: ...;
                                    type: ...;
                                }
                                | null;
                                sources?: (...)[]
                                | null;
                            }[];
                            sectionTitle?: string
                            | null;
                            sources?:
                                | (
                                    | {
                                        fileBoundingBoxes?: ...;
                                        fileName?: ...;
                                        pageNumbers?: ...;
                                        quote?: ...;
                                        type: ...;
                                    }
                                    | null
                                    | undefined
                                )[]
                                | null;
                            type: "list";
                        }
                        | {
                            markdown: string;
                            sectionTitle?: string
                            | null;
                            sources?:
                                | (
                                    | {
                                        fileBoundingBoxes?: ...;
                                        fileName?: ...;
                                        pageNumbers?: ...;
                                        quote?: ...;
                                        type: ...;
                                    }
                                    | null
                                    | undefined
                                )[]
                                | null;
                            type: "markdown";
                        }
                        | { type: "processing" }
                        | null
                        | undefined
                    )[]
                    | null
                    | undefined;
            }[]
            | null
        • {
              alignment?: Left | Right | null;
              cells:
                  | { type: "empty" }
                  | {
                      icon?:
                          | {
                              fillColor?: string
                              | null;
                              iconKey: string;
                              strokeColor?: string | null;
                              strokeWidth?: string | number | null;
                              type: "icon";
                          }
                          | null;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      style?: Faint
                      | Small
                      | Bold
                      | null;
                      text?: string | number | bigint | boolean | symbol | null;
                      type: "text";
                  }
                  | {
                      color?: | {
                          custom: {
                              backgroundColor?: string
                              | null;
                              foregroundColor?: string | null;
                          };
                      }
                      | { variant: ViraColorVariant }
                      | null;
                      sectionTitle?: string | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      text: string
                      | number
                      | bigint
                      | boolean
                      | symbol
                      | null
                      | undefined;
                      type: "tag";
                      useBigTag?: boolean | null;
                  }
                  | {
                      code: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "inlineCode";
                  }
                  | {
                      items: {
                          content?: | { type: "empty" }
                          | {
                              icon?:
                                  | {
                                      fillColor?: ...;
                                      iconKey: ...;
                                      strokeColor?: ...;
                                      strokeWidth?: ...;
                                      type: ...;
                                  }
                                  | null;
                              sectionTitle?: string
                              | null;
                              sources?: (...)[] | null;
                              style?: Faint | Small | Bold | null;
                              text?: string | number | bigint | boolean | symbol | null;
                              type: "text";
                          }
                          | {
                              color?: { custom: ... }
                              | { variant: ... }
                              | null;
                              sectionTitle?: string | null;
                              sources?: (...)[] | null;
                              text: string | number | bigint | boolean | symbol | null | undefined;
                              type: "tag";
                              useBigTag?: boolean | null;
                          }
                          | null;
                          icon?: | {
                              fillColor?: string
                              | null;
                              iconKey: string;
                              strokeColor?: string | null;
                              strokeWidth?: string | number | null;
                              type: "icon";
                          }
                          | null;
                          sources?: | (
                              | {
                                  fileBoundingBoxes?: ...;
                                  fileName?: ...;
                                  pageNumbers?: ...;
                                  quote?: ...;
                                  type: ...;
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      }[];
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "list";
                  }
                  | {
                      markdown: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "markdown";
                  }
                  | { type: "processing" }
                  | (
                      | { type: "empty" }
                      | {
                          icon?:
                              | {
                                  fillColor?: string
                                  | null;
                                  iconKey: string;
                                  strokeColor?: string | null;
                                  strokeWidth?: string | number | null;
                                  type: "icon";
                              }
                              | null;
                          sectionTitle?: string
                          | null;
                          sources?:
                              | (
                                  | {
                                      fileBoundingBoxes?: ...;
                                      fileName?: ...;
                                      pageNumbers?: ...;
                                      quote?: ...;
                                      type: ...;
                                  }
                                  | null
                                  | undefined
                              )[]
                              | null;
                          style?: Faint
                          | Small
                          | Bold
                          | null;
                          text?: string | number | bigint | boolean | symbol | null;
                          type: "text";
                      }
                      | {
                          color?: | {
                              custom: {
                                  backgroundColor?: (...)
                                  | (...)
                                  | (...);
                                  foregroundColor?: (...) | (...) | (...);
                              };
                          }
                          | { variant: ViraColorVariant }
                          | null;
                          sectionTitle?: string | null;
                          sources?:
                              | (
                                  | {
                                      fileBoundingBoxes?: ...;
                                      fileName?: ...;
                                      pageNumbers?: ...;
                                      quote?: ...;
                                      type: ...;
                                  }
                                  | null
                                  | undefined
                              )[]
                              | null;
                          text: string
                          | number
                          | bigint
                          | boolean
                          | symbol
                          | null
                          | undefined;
                          type: "tag";
                          useBigTag?: boolean | null;
                      }
                      | {
                          code: string;
                          sectionTitle?: string
                          | null;
                          sources?:
                              | (
                                  | {
                                      fileBoundingBoxes?: ...;
                                      fileName?: ...;
                                      pageNumbers?: ...;
                                      quote?: ...;
                                      type: ...;
                                  }
                                  | null
                                  | undefined
                              )[]
                              | null;
                          type: "inlineCode";
                      }
                      | {
                          items: {
                              content?: | { type: ... }
                              | {
                                  icon?: ...;
                                  sectionTitle?: ...;
                                  sources?: ...;
                                  style?: ...;
                                  text?: ...;
                                  type: ...;
                              }
                              | {
                                  color?: ...;
                                  sectionTitle?: ...;
                                  sources?: ...;
                                  text: ...;
                                  type: ...;
                                  useBigTag?: ...;
                              }
                              | null;
                              icon?: | {
                                  fillColor?: ...;
                                  iconKey: ...;
                                  strokeColor?: ...;
                                  strokeWidth?: ...;
                                  type: ...;
                              }
                              | null;
                              sources?: (...)[]
                              | null;
                          }[];
                          sectionTitle?: string
                          | null;
                          sources?:
                              | (
                                  | {
                                      fileBoundingBoxes?: ...;
                                      fileName?: ...;
                                      pageNumbers?: ...;
                                      quote?: ...;
                                      type: ...;
                                  }
                                  | null
                                  | undefined
                              )[]
                              | null;
                          type: "list";
                      }
                      | {
                          markdown: string;
                          sectionTitle?: string
                          | null;
                          sources?:
                              | (
                                  | {
                                      fileBoundingBoxes?: ...;
                                      fileName?: ...;
                                      pageNumbers?: ...;
                                      quote?: ...;
                                      type: ...;
                                  }
                                  | null
                                  | undefined
                              )[]
                              | null;
                          type: "markdown";
                      }
                      | { type: "processing" }
                      | null
                      | undefined
                  )[]
                  | null
                  | undefined;
          }[]
          • Optionalalignment?: Left | Right | null
            StructuredRenderTableFooterAlignment.Left
            
          • cells:
                | { type: "empty" }
                | {
                    icon?:
                        | {
                            fillColor?: string
                            | null;
                            iconKey: string;
                            strokeColor?: string | null;
                            strokeWidth?: string | number | null;
                            type: "icon";
                        }
                        | null;
                    sectionTitle?: string
                    | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: (...)[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: (...)[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    style?: Faint
                    | Small
                    | Bold
                    | null;
                    text?: string | number | bigint | boolean | symbol | null;
                    type: "text";
                }
                | {
                    color?: | {
                        custom: {
                            backgroundColor?: string
                            | null;
                            foregroundColor?: string | null;
                        };
                    }
                    | { variant: ViraColorVariant }
                    | null;
                    sectionTitle?: string | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: (...)[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: (...)[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    text: string
                    | number
                    | bigint
                    | boolean
                    | symbol
                    | null
                    | undefined;
                    type: "tag";
                    useBigTag?: boolean | null;
                }
                | {
                    code: string;
                    sectionTitle?: string
                    | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: (...)[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: (...)[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    type: "inlineCode";
                }
                | {
                    items: {
                        content?: | { type: "empty" }
                        | {
                            icon?:
                                | {
                                    fillColor?: ...;
                                    iconKey: ...;
                                    strokeColor?: ...;
                                    strokeWidth?: ...;
                                    type: ...;
                                }
                                | null;
                            sectionTitle?: string
                            | null;
                            sources?: (...)[] | null;
                            style?: Faint | Small | Bold | null;
                            text?: string | number | bigint | boolean | symbol | null;
                            type: "text";
                        }
                        | {
                            color?: { custom: ... }
                            | { variant: ... }
                            | null;
                            sectionTitle?: string | null;
                            sources?: (...)[] | null;
                            text: string | number | bigint | boolean | symbol | null | undefined;
                            type: "tag";
                            useBigTag?: boolean | null;
                        }
                        | null;
                        icon?: | {
                            fillColor?: string
                            | null;
                            iconKey: string;
                            strokeColor?: string | null;
                            strokeWidth?: string | number | null;
                            type: "icon";
                        }
                        | null;
                        sources?: | (
                            | {
                                fileBoundingBoxes?: ...;
                                fileName?: ...;
                                pageNumbers?: ...;
                                quote?: ...;
                                type: ...;
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    }[];
                    sectionTitle?: string
                    | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: (...)[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: (...)[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    type: "list";
                }
                | {
                    markdown: string;
                    sectionTitle?: string
                    | null;
                    sources?:
                        | (
                            | {
                                fileBoundingBoxes?: (...)[]
                                | null;
                                fileName?: string | null;
                                pageNumbers?: (...)[] | null;
                                quote?: string | null;
                                type: "source";
                            }
                            | null
                            | undefined
                        )[]
                        | null;
                    type: "markdown";
                }
                | { type: "processing" }
                | (
                    | { type: "empty" }
                    | {
                        icon?:
                            | {
                                fillColor?: string
                                | null;
                                iconKey: string;
                                strokeColor?: string | null;
                                strokeWidth?: string | number | null;
                                type: "icon";
                            }
                            | null;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        style?: Faint
                        | Small
                        | Bold
                        | null;
                        text?: string | number | bigint | boolean | symbol | null;
                        type: "text";
                    }
                    | {
                        color?: | {
                            custom: {
                                backgroundColor?: (...)
                                | (...)
                                | (...);
                                foregroundColor?: (...) | (...) | (...);
                            };
                        }
                        | { variant: ViraColorVariant }
                        | null;
                        sectionTitle?: string | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        text: string
                        | number
                        | bigint
                        | boolean
                        | symbol
                        | null
                        | undefined;
                        type: "tag";
                        useBigTag?: boolean | null;
                    }
                    | {
                        code: string;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "inlineCode";
                    }
                    | {
                        items: {
                            content?: | { type: ... }
                            | {
                                icon?: ...;
                                sectionTitle?: ...;
                                sources?: ...;
                                style?: ...;
                                text?: ...;
                                type: ...;
                            }
                            | {
                                color?: ...;
                                sectionTitle?: ...;
                                sources?: ...;
                                text: ...;
                                type: ...;
                                useBigTag?: ...;
                            }
                            | null;
                            icon?: | {
                                fillColor?: ...;
                                iconKey: ...;
                                strokeColor?: ...;
                                strokeWidth?: ...;
                                type: ...;
                            }
                            | null;
                            sources?: (...)[]
                            | null;
                        }[];
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "list";
                    }
                    | {
                        markdown: string;
                        sectionTitle?: string
                        | null;
                        sources?:
                            | (
                                | {
                                    fileBoundingBoxes?: ...;
                                    fileName?: ...;
                                    pageNumbers?: ...;
                                    quote?: ...;
                                    type: ...;
                                }
                                | null
                                | undefined
                            )[]
                            | null;
                        type: "markdown";
                    }
                    | { type: "processing" }
                    | null
                    | undefined
                )[]
                | null
                | undefined
        • null

      Returns {
          direction: StructuredRenderCellDirection;
          entries: {
              data: Record<
                  string,
                  | { type: "empty" }
                  | {
                      icon?:
                          | {
                              fillColor?: string
                              | null;
                              iconKey: string;
                              strokeColor?: string | null;
                              strokeWidth?: string | number | null;
                              type: "icon";
                          }
                          | null;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      style?: Faint
                      | Small
                      | Bold
                      | null;
                      text?: string | number | bigint | boolean | symbol | null;
                      type: "text";
                  }
                  | {
                      color?: | {
                          custom: {
                              backgroundColor?: string
                              | null;
                              foregroundColor?: string | null;
                          };
                      }
                      | { variant: ViraColorVariant }
                      | null;
                      sectionTitle?: string | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      text: string
                      | number
                      | bigint
                      | boolean
                      | symbol
                      | null
                      | undefined;
                      type: "tag";
                      useBigTag?: boolean | null;
                  }
                  | {
                      code: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "inlineCode";
                  }
                  | {
                      items: {
                          content?: | { type: "empty" }
                          | {
                              icon?: (...) | (...) | (...);
                              sectionTitle?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                              style?: (...) | (...) | (...) | (...) | (...);
                              text?: (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...);
                              type: "text";
                          }
                          | {
                              color?: (...)
                              | (...)
                              | (...)
                              | (...);
                              sectionTitle?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                              text: (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...);
                              type: "tag";
                              useBigTag?: (...) | (...) | (...) | (...);
                          }
                          | null;
                          icon?: | {
                              fillColor?: (...)
                              | (...)
                              | (...);
                              iconKey: string;
                              strokeColor?: (...) | (...) | (...);
                              strokeWidth?: (...) | (...) | (...) | (...);
                              type: "icon";
                          }
                          | null;
                          sources?: ((...) | (...) | (...))[]
                          | null;
                      }[];
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "list";
                  }
                  | {
                      markdown: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "markdown";
                  }
                  | { type: "processing" }
                  | (
                      | { type: "empty" }
                      | {
                          icon?:
                              | {
                                  fillColor?: (...)
                                  | (...)
                                  | (...);
                                  iconKey: string;
                                  strokeColor?: (...) | (...) | (...);
                                  strokeWidth?: (...) | (...) | (...) | (...);
                                  type: "icon";
                              }
                              | null;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          style?: Faint | Small | Bold | null;
                          text?: string | number | bigint | boolean | symbol | null;
                          type: "text";
                      }
                      | {
                          color?: | {
                              custom: { backgroundColor?: ...; foregroundColor?: ... };
                          }
                          | { variant: ViraColorVariant }
                          | null;
                          sectionTitle?: string | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          text: string | number | bigint | boolean | symbol | null | undefined;
                          type: "tag";
                          useBigTag?: boolean | null;
                      }
                      | {
                          code: string;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "inlineCode";
                      }
                      | {
                          items: {
                              content?: (...)
                              | (...)
                              | (...)
                              | (...)
                              | (...);
                              icon?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                          }[];
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "list";
                      }
                      | {
                          markdown: string;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "markdown";
                      }
                      | { type: "processing" }
                      | null
                      | undefined
                  )[]
                  | null
                  | undefined,
              >;
              sources?:
                  | (
                      | {
                          fileBoundingBoxes?: | (
                              { x1: ...; x2: ...; y1: ...; y2: ... }
                              | null
                              | undefined
                          )[]
                          | null;
                          fileName?: string | null;
                          pageNumbers?: (number | null | undefined)[] | null;
                          quote?: string | null;
                          type: "source";
                      }
                      | null
                      | undefined
                  )[]
                  | null;
          }[];
          footerRows?: | {
              alignment?: Left
              | Right
              | null;
              cells:
                  | { type: "empty" }
                  | {
                      icon?:
                          | {
                              fillColor?: string
                              | null;
                              iconKey: string;
                              strokeColor?: string | null;
                              strokeWidth?: string | number | null;
                              type: "icon";
                          }
                          | null;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      style?: Faint
                      | Small
                      | Bold
                      | null;
                      text?: string | number | bigint | boolean | symbol | null;
                      type: "text";
                  }
                  | {
                      color?: | {
                          custom: {
                              backgroundColor?: string
                              | null;
                              foregroundColor?: string | null;
                          };
                      }
                      | { variant: ViraColorVariant }
                      | null;
                      sectionTitle?: string | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      text: string
                      | number
                      | bigint
                      | boolean
                      | symbol
                      | null
                      | undefined;
                      type: "tag";
                      useBigTag?: boolean | null;
                  }
                  | {
                      code: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "inlineCode";
                  }
                  | {
                      items: {
                          content?: | { type: "empty" }
                          | {
                              icon?: (...) | (...) | (...);
                              sectionTitle?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                              style?: (...) | (...) | (...) | (...) | (...);
                              text?: (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...);
                              type: "text";
                          }
                          | {
                              color?: (...)
                              | (...)
                              | (...)
                              | (...);
                              sectionTitle?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                              text: (...) | (...) | (...) | (...) | (...) | (...) | (...) | (...);
                              type: "tag";
                              useBigTag?: (...) | (...) | (...) | (...);
                          }
                          | null;
                          icon?: | {
                              fillColor?: (...)
                              | (...)
                              | (...);
                              iconKey: string;
                              strokeColor?: (...) | (...) | (...);
                              strokeWidth?: (...) | (...) | (...) | (...);
                              type: "icon";
                          }
                          | null;
                          sources?: ((...) | (...) | (...))[]
                          | null;
                      }[];
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "list";
                  }
                  | {
                      markdown: string;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)
                                  | (...)
                                  | (...);
                                  fileName?: (...) | (...) | (...);
                                  pageNumbers?: (...) | (...) | (...);
                                  quote?: (...) | (...) | (...);
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      type: "markdown";
                  }
                  | { type: "processing" }
                  | (
                      | { type: "empty" }
                      | {
                          icon?:
                              | {
                                  fillColor?: (...)
                                  | (...)
                                  | (...);
                                  iconKey: string;
                                  strokeColor?: (...) | (...) | (...);
                                  strokeWidth?: (...) | (...) | (...) | (...);
                                  type: "icon";
                              }
                              | null;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          style?: Faint | Small | Bold | null;
                          text?: string | number | bigint | boolean | symbol | null;
                          type: "text";
                      }
                      | {
                          color?: | {
                              custom: { backgroundColor?: ...; foregroundColor?: ... };
                          }
                          | { variant: ViraColorVariant }
                          | null;
                          sectionTitle?: string | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          text: string | number | bigint | boolean | symbol | null | undefined;
                          type: "tag";
                          useBigTag?: boolean | null;
                      }
                      | {
                          code: string;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "inlineCode";
                      }
                      | {
                          items: {
                              content?: (...)
                              | (...)
                              | (...)
                              | (...)
                              | (...);
                              icon?: (...) | (...) | (...);
                              sources?: (...) | (...) | (...);
                          }[];
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "list";
                      }
                      | {
                          markdown: string;
                          sectionTitle?: string
                          | null;
                          sources?: ((...) | (...) | (...))[] | null;
                          type: "markdown";
                      }
                      | { type: "processing" }
                      | null
                      | undefined
                  )[]
                  | null
                  | undefined;
          }[]
          | null;
          headers: {
              hidden?: boolean
              | null;
              key: string;
              text?:
                  | {
                      icon?: | {
                          fillColor?: string
                          | null;
                          iconKey: string;
                          strokeColor?: string | null;
                          strokeWidth?: string | number | null;
                          type: "icon";
                      }
                      | null;
                      sectionTitle?: string
                      | null;
                      sources?:
                          | (
                              | {
                                  fileBoundingBoxes?: (...)[]
                                  | null;
                                  fileName?: string | null;
                                  pageNumbers?: (...)[] | null;
                                  quote?: string | null;
                                  type: "source";
                              }
                              | null
                              | undefined
                          )[]
                          | null;
                      style?: Faint
                      | Small
                      | Bold
                      | null;
                      text?: string | number | bigint | boolean | symbol | null;
                      type: "text";
                  }
                  | null;
          }[];
          sectionTitle?: string
          | null;
          sources?:
              | (
                  | {
                      fileBoundingBoxes?: | (
                          | { x1: number; x2: number; y1: number; y2: number }
                          | null
                          | undefined
                      )[]
                      | null;
                      fileName?: string | null;
                      pageNumbers?: (number | null | undefined)[] | null;
                      quote?: string | null;
                      type: "source";
                  }
                  | null
                  | undefined
              )[]
              | null;
          type: "table";
      }