@json-to-office/shared-docx 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{chunk-CN6VD4WH.js → chunk-3D6HY6AC.js} +159 -86
  2. package/dist/chunk-3D6HY6AC.js.map +1 -0
  3. package/dist/{chunk-HHMK2RWF.js → chunk-AMVS7BRX.js} +7 -2
  4. package/dist/chunk-AMVS7BRX.js.map +1 -0
  5. package/dist/{chunk-WTN6PMNZ.js → chunk-CVI7GFWX.js} +6 -7
  6. package/dist/chunk-CVI7GFWX.js.map +1 -0
  7. package/dist/{chunk-TBDQHRHI.js → chunk-DEIEJUY4.js} +2 -2
  8. package/dist/{chunk-YGWE6RFN.js → chunk-EDYWA2KA.js} +2 -2
  9. package/dist/{chunk-NCGCTQZ6.js → chunk-GGNGVIZO.js} +8 -8
  10. package/dist/{chunk-MXVEVEY7.js → chunk-S4EFGCIC.js} +2 -2
  11. package/dist/{chunk-XPL7NECE.js → chunk-WJA5TGNI.js} +25 -15
  12. package/dist/chunk-WJA5TGNI.js.map +1 -0
  13. package/dist/{chunk-6A2M4E4E.js → chunk-YNBTESFN.js} +6 -6
  14. package/dist/index.d.ts +1 -202
  15. package/dist/index.js +22 -22
  16. package/dist/schemas/api.js +3 -3
  17. package/dist/schemas/component-registry.d.ts +35 -5
  18. package/dist/schemas/component-registry.js +3 -1
  19. package/dist/schemas/components.d.ts +12 -200
  20. package/dist/schemas/components.js +6 -4
  21. package/dist/schemas/document.js +4 -4
  22. package/dist/schemas/export.js +3 -1
  23. package/dist/schemas/generator.js +2 -2
  24. package/dist/schemas/theme.d.ts +3 -597
  25. package/dist/schemas/theme.js +3 -3
  26. package/dist/validation/unified/index.d.ts +1 -199
  27. package/dist/validation/unified/index.js +5 -5
  28. package/package.json +1 -1
  29. package/dist/chunk-CN6VD4WH.js.map +0 -1
  30. package/dist/chunk-HHMK2RWF.js.map +0 -1
  31. package/dist/chunk-WTN6PMNZ.js.map +0 -1
  32. package/dist/chunk-XPL7NECE.js.map +0 -1
  33. /package/dist/{chunk-TBDQHRHI.js.map → chunk-DEIEJUY4.js.map} +0 -0
  34. /package/dist/{chunk-YGWE6RFN.js.map → chunk-EDYWA2KA.js.map} +0 -0
  35. /package/dist/{chunk-NCGCTQZ6.js.map → chunk-GGNGVIZO.js.map} +0 -0
  36. /package/dist/{chunk-MXVEVEY7.js.map → chunk-S4EFGCIC.js.map} +0 -0
  37. /package/dist/{chunk-6A2M4E4E.js.map → chunk-YNBTESFN.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/export.ts"],"sourcesContent":["/**\n * Unified Schema Export Utility\n *\n * Single source of truth for converting TypeBox schemas to JSON Schema format.\n * Eliminates duplication between generate-schemas.mjs and plugin/schema.ts\n */\n\nimport { TSchema } from '@sinclair/typebox';\nimport { getContainerComponents } from './component-registry';\n\n/**\n * Configuration for a component schema\n */\nexport interface ComponentSchemaConfig {\n schema: TSchema;\n title: string;\n description: string;\n requiresName?: boolean;\n enhanceForRichContent?: boolean;\n}\n\n/**\n * Fix TypeBox recursive references in a schema\n * Handles both \"T0\" and \"ComponentDefinition\" reference patterns\n */\nexport function fixSchemaReferences(\n schema: Record<string, unknown>,\n rootDefinitionName = 'ComponentDefinition'\n): void {\n function traverse(obj: Record<string, unknown>, path = ''): void {\n if (typeof obj !== 'object' || obj === null) return;\n\n for (const [key, value] of Object.entries(obj)) {\n const currentPath = path ? `${path}.${key}` : key;\n\n if (value && typeof value === 'object') {\n // Type guard to check if value has expected properties\n const schemaValue = value as Record<string, unknown>;\n\n // Fix arrays with empty items\n if (\n schemaValue.type === 'array' &&\n schemaValue.items &&\n Object.keys(schemaValue.items).length === 0\n ) {\n schemaValue.items = {\n $ref: `#/definitions/${rootDefinitionName}`,\n };\n }\n\n // Fix arrays with items that reference broken \"T0\"\n if (\n schemaValue.type === 'array' &&\n schemaValue.items &&\n typeof schemaValue.items === 'object' &&\n '$ref' in schemaValue.items &&\n (schemaValue.items as Record<string, unknown>).$ref === 'T0'\n ) {\n schemaValue.items = {\n $ref: `#/definitions/${rootDefinitionName}`,\n };\n }\n\n // Fix direct $ref properties that point to \"T0\" or bare definition names\n if (\n schemaValue.$ref === 'T0' ||\n schemaValue.$ref === rootDefinitionName\n ) {\n schemaValue.$ref = `#/definitions/${rootDefinitionName}`;\n }\n\n // Remove problematic $id properties that reference \"T0\"\n if (\n key === '$id' &&\n typeof value === 'string' &&\n (value === 'T0' || value === rootDefinitionName) &&\n currentPath !== `definitions.${rootDefinitionName}.$id`\n ) {\n delete obj[key];\n continue;\n }\n\n traverse(value as Record<string, unknown>, currentPath);\n }\n }\n }\n\n traverse(schema);\n}\n\n/**\n * Convert TypeBox schema to JSON Schema format with proper definitions\n */\nexport function convertToJsonSchema(\n schema: TSchema,\n options: {\n $schema?: string;\n $id?: string;\n title?: string;\n description?: string;\n definitions?: Record<string, unknown>;\n } = {}\n): Record<string, unknown> {\n const {\n $schema = 'https://json-schema.org/draft-07/schema#',\n $id,\n title,\n description,\n definitions = {},\n } = options;\n\n // Clone the schema to avoid mutations\n const schemaJson = JSON.parse(JSON.stringify(schema));\n\n // Extract recursive schemas to definitions\n const extractedDefinitions: Record<string, unknown> = { ...definitions };\n\n function extractRecursiveSchemas(\n obj: Record<string, unknown>,\n path = ''\n ): void {\n if (typeof obj !== 'object' || obj === null) return;\n\n for (const [key, value] of Object.entries(obj)) {\n if (value && typeof value === 'object') {\n const schemaValue = value as Record<string, unknown>;\n\n // If this schema has an $id, extract it to definitions\n if (schemaValue.$id && typeof schemaValue.$id === 'string') {\n const definitionName = schemaValue.$id;\n\n // Don't extract if it's already in the root definitions section\n if (path !== `definitions.${definitionName}`) {\n // Clone the schema without the $id\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { $id: _, ...schemaWithoutId } = schemaValue;\n extractedDefinitions[definitionName] = schemaWithoutId;\n\n // Replace the inline schema with a $ref\n obj[key] = { $ref: `#/definitions/${definitionName}` };\n\n // Continue processing the extracted schema for nested recursions\n extractRecursiveSchemas(\n schemaWithoutId,\n `definitions.${definitionName}`\n );\n continue;\n }\n }\n\n extractRecursiveSchemas(\n value as Record<string, unknown>,\n path ? `${path}.${key}` : key\n );\n }\n }\n }\n\n // Extract recursive schemas from the main schema\n extractRecursiveSchemas(schemaJson);\n\n // Build the final JSON Schema\n const jsonSchema: Record<string, unknown> = {\n $schema,\n };\n\n if ($id) jsonSchema.$id = $id;\n\n // Merge schema properties first to preserve original metadata\n Object.assign(jsonSchema, schemaJson);\n\n // Only override title and description if explicitly provided\n if (title !== undefined) jsonSchema.title = title;\n if (description !== undefined) jsonSchema.description = description;\n\n // Add definitions section if we have any\n if (Object.keys(extractedDefinitions).length > 0) {\n jsonSchema.definitions = extractedDefinitions;\n }\n\n // Fix any remaining recursive references\n fixSchemaReferences(jsonSchema);\n\n return jsonSchema;\n}\n\n/**\n * Create a component schema with proper structure\n */\nexport function createComponentSchema(\n name: string,\n config: ComponentSchemaConfig,\n componentDefinitionSchema?: TSchema\n): Record<string, unknown> {\n const componentStructure: Record<string, unknown> = {\n $schema: 'https://json-schema.org/draft-07/schema#',\n $id: `${name}.schema.json`,\n title: config.title,\n description: config.description,\n type: 'object',\n required: ['name', 'props'],\n properties: {\n name: {\n type: 'string',\n const: name,\n description: `Component name identifier (must be \"${name}\")`,\n },\n id: {\n type: 'string',\n description: 'Optional unique identifier for the component',\n },\n props: JSON.parse(JSON.stringify(config.schema)),\n },\n };\n\n // Add children array for container types\n const containerNames = getContainerComponents().map((c) => c.name);\n if (containerNames.includes(name)) {\n (componentStructure.properties as Record<string, unknown>).children = {\n type: 'array',\n description: 'Children within this container',\n items: {\n $ref: '#/definitions/ComponentDefinition',\n },\n };\n\n // Add the ComponentDefinition for recursive references\n if (componentDefinitionSchema) {\n componentStructure.definitions = {\n ComponentDefinition: JSON.parse(\n JSON.stringify(componentDefinitionSchema)\n ),\n };\n }\n }\n\n // Enhance table component to support rich content in cells\n if (config.enhanceForRichContent && name === 'table') {\n // Add ComponentDefinition to support rich content in table cells\n const componentStructureWithDefs = componentStructure as Record<\n string,\n unknown\n > & {\n definitions?: Record<string, unknown>;\n };\n if (!componentStructureWithDefs.definitions) {\n componentStructureWithDefs.definitions = {};\n }\n if (componentDefinitionSchema) {\n componentStructureWithDefs.definitions.ComponentDefinition = JSON.parse(\n JSON.stringify(componentDefinitionSchema)\n );\n }\n\n // Enhance the rows.items.items to support components\n const properties = componentStructure.properties as Record<string, unknown>;\n const propsProp = properties.props as Record<string, unknown> | undefined;\n if (\n propsProp?.properties &&\n typeof propsProp.properties === 'object' &&\n propsProp.properties !== null\n ) {\n const propsProps = propsProp.properties as Record<string, unknown>;\n const rowsProp = propsProps.rows as Record<string, unknown> | undefined;\n if (\n rowsProp?.items &&\n typeof rowsProp.items === 'object' &&\n rowsProp.items !== null\n ) {\n const rowsItems = rowsProp.items as Record<string, unknown>;\n const cellSchema = rowsItems.items as\n | Record<string, unknown>\n | undefined;\n\n // If it has anyOf, add component reference as an option\n if (cellSchema?.anyOf && Array.isArray(cellSchema.anyOf)) {\n // Check if component reference isn't already there\n const hasComponentRef = cellSchema.anyOf.some((item: unknown) => {\n const itemObj = item as Record<string, unknown>;\n return itemObj.$ref === '#/definitions/ComponentDefinition';\n });\n if (!hasComponentRef) {\n cellSchema.anyOf.push({\n description:\n 'Rich content cell with component (e.g., image, paragraph)',\n $ref: '#/definitions/ComponentDefinition',\n });\n }\n }\n }\n }\n }\n\n // Fix empty items in arrays and broken references\n fixSchemaReferences(componentStructure);\n\n componentStructure.additionalProperties = false;\n\n return componentStructure;\n}\n\n/**\n * Export schema to file with proper formatting\n */\nexport async function exportSchemaToFile(\n schema: Record<string, unknown>,\n outputPath: string,\n options: {\n prettyPrint?: boolean;\n } = {}\n): Promise<void> {\n const { prettyPrint = true } = options;\n\n // Convert to JSON string\n const jsonSchema = prettyPrint\n ? JSON.stringify(schema, null, 2)\n : JSON.stringify(schema);\n\n // Write to file\n const fs = await import('fs/promises');\n await fs.writeFile(outputPath, jsonSchema, 'utf-8');\n}\n\n/**\n * Component metadata registry\n * Single source of truth for component titles and descriptions\n */\nexport const COMPONENT_METADATA: Record<\n string,\n Omit<ComponentSchemaConfig, 'schema'>\n> = {\n report: {\n title: 'Report Component',\n description:\n 'Top-level report container component with document-wide settings',\n },\n section: {\n title: 'Section Component',\n description: 'Section container for organizing document content',\n },\n columns: {\n title: 'Columns Component',\n description: 'Multi-column layout container',\n },\n heading: {\n title: 'Heading Component',\n description: 'Heading text with configurable levels and styling',\n },\n paragraph: {\n title: 'Paragraph Component',\n description: 'Rich paragraph text content with formatting options',\n },\n 'text-box': {\n title: 'Text Box Component',\n description:\n 'Inline or floating container that groups text and image components with shared positioning',\n },\n image: {\n title: 'Image Component',\n description: 'Image content with positioning and sizing options',\n },\n statistic: {\n title: 'Statistic Component',\n description: 'Statistical display with value and label',\n },\n table: {\n title: 'Table Component',\n description: 'Tabular data display with headers and rows',\n enhanceForRichContent: true,\n },\n header: {\n title: 'Header Component',\n description: 'Document header with page numbering and metadata',\n },\n footer: {\n title: 'Footer Component',\n description: 'Document footer with page numbering and metadata',\n },\n list: {\n title: 'List Component',\n description: 'Ordered or unordered list with nested items',\n },\n highcharts: {\n title: 'Highcharts Component',\n description:\n 'Charts powered by Highcharts (line, bar, pie, heatmap, etc.) with rich configuration',\n },\n};\n\n/**\n * Base schema metadata registry\n */\nexport const BASE_SCHEMA_METADATA: Record<\n string,\n { title: string; description: string }\n> = {\n alignment: {\n title: 'Alignment',\n description: 'Text alignment options',\n },\n 'base-component': {\n title: 'Base Component Props',\n description: 'Common props for all components',\n },\n border: {\n title: 'Border',\n description: 'Border styling configuration',\n },\n spacing: {\n title: 'Spacing',\n description: 'Spacing configuration for before and after elements',\n },\n margins: {\n title: 'Margins',\n description: 'Margin configuration for all sides',\n },\n indent: {\n title: 'Indent',\n description: 'Indentation configuration',\n },\n 'line-spacing': {\n title: 'Line Spacing',\n description: 'Line height and spacing configuration',\n },\n 'heading-level': {\n title: 'Heading Level',\n description: 'Heading level from 1 to 6',\n },\n numbering: {\n title: 'Numbering',\n description: 'Numbering configuration for ordered lists',\n },\n 'justified-alignment': {\n title: 'Justified Alignment',\n description: 'Justified text alignment options',\n },\n};\n\n/**\n * Theme schema metadata\n */\nexport const THEME_SCHEMA_METADATA = {\n theme: {\n title: 'Theme Configuration',\n description: 'JSON theme configuration for document styling and appearance',\n },\n};\n"],"mappings":";;;;;AAyBO,SAAS,oBACd,QACA,qBAAqB,uBACf;AACN,WAAS,SAAS,KAA8B,OAAO,IAAU;AAC/D,QAAI,OAAO,QAAQ,YAAY,QAAQ,KAAM;AAE7C,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,GAAG,GAAG;AAC9C,YAAM,cAAc,OAAO,GAAG,IAAI,IAAI,GAAG,KAAK;AAE9C,UAAI,SAAS,OAAO,UAAU,UAAU;AAEtC,cAAM,cAAc;AAGpB,YACE,YAAY,SAAS,WACrB,YAAY,SACZ,OAAO,KAAK,YAAY,KAAK,EAAE,WAAW,GAC1C;AACA,sBAAY,QAAQ;AAAA,YAClB,MAAM,iBAAiB,kBAAkB;AAAA,UAC3C;AAAA,QACF;AAGA,YACE,YAAY,SAAS,WACrB,YAAY,SACZ,OAAO,YAAY,UAAU,YAC7B,UAAU,YAAY,SACrB,YAAY,MAAkC,SAAS,MACxD;AACA,sBAAY,QAAQ;AAAA,YAClB,MAAM,iBAAiB,kBAAkB;AAAA,UAC3C;AAAA,QACF;AAGA,YACE,YAAY,SAAS,QACrB,YAAY,SAAS,oBACrB;AACA,sBAAY,OAAO,iBAAiB,kBAAkB;AAAA,QACxD;AAGA,YACE,QAAQ,SACR,OAAO,UAAU,aAChB,UAAU,QAAQ,UAAU,uBAC7B,gBAAgB,eAAe,kBAAkB,QACjD;AACA,iBAAO,IAAI,GAAG;AACd;AAAA,QACF;AAEA,iBAAS,OAAkC,WAAW;AAAA,MACxD;AAAA,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ACf;AAAA,EACA,WAAW;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa;AAAA,IACb,uBAAuB;AAAA,EACzB;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,YAAY;AAAA,IACV,OAAO;AAAA,IACP,aACE;AAAA,EACJ;AACF;AAKO,IAAM,uBAGT;AAAA,EACF,WAAW;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,kBAAkB;AAAA,IAChB,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,gBAAgB;AAAA,IACd,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,iBAAiB;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,uBAAuB;AAAA,IACrB,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;AAKO,IAAM,wBAAwB;AAAA,EACnC,OAAO;AAAA,IACL,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;","names":[]}
@@ -1,6 +1,7 @@
1
1
  import {
2
- createAllComponentSchemas
3
- } from "./chunk-CN6VD4WH.js";
2
+ createAllComponentSchemas,
3
+ createAllComponentSchemasNarrowed
4
+ } from "./chunk-3D6HY6AC.js";
4
5
 
5
6
  // src/schemas/components.ts
6
7
  import { Type } from "@sinclair/typebox";
@@ -16,10 +17,8 @@ var StandardComponentDefinitionSchema = Type.Union(
16
17
  var ComponentDefinitionSchema = Type.Recursive(
17
18
  (This) => Type.Union(
18
19
  [
19
- // Standard components from registry - SINGLE SOURCE OF TRUTH
20
- // Note: Report and section use special factory functions with recursive refs
21
- // Convert readonly array to mutable array for Type.Union
22
- ...createAllComponentSchemas(This)
20
+ // Standard components from registry with per-container narrowed children
21
+ ...createAllComponentSchemasNarrowed(This).schemas
23
22
  ],
24
23
  {
25
24
  discriminator: { propertyName: "name" },
@@ -32,4 +31,4 @@ export {
32
31
  StandardComponentDefinitionSchema,
33
32
  ComponentDefinitionSchema
34
33
  };
35
- //# sourceMappingURL=chunk-WTN6PMNZ.js.map
34
+ //# sourceMappingURL=chunk-CVI7GFWX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/components.ts"],"sourcesContent":["/**\n * TypeBox Component Schemas\n *\n * Complete component definitions with discriminated unions for perfect\n * JSON schema autocompletion and validation.\n *\n * IMPORTANT: Standard components are defined in component-registry.ts (SINGLE SOURCE OF TRUTH).\n * This file uses that registry to generate TypeBox schemas.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n createAllComponentSchemas,\n createAllComponentSchemasNarrowed,\n} from './component-registry';\n\n// Re-export all schemas from individual component files\nexport * from './components/common';\nexport * from './components/report';\nexport * from './components/section';\nexport * from './components/columns';\nexport * from './components/heading';\nexport * from './components/paragraph';\nexport * from './components/image';\nexport * from './components/highcharts';\nexport * from './components/statistic';\nexport * from './components/table';\nexport * from './components/header';\nexport * from './components/footer';\nexport * from './components/list';\nexport * from './components/toc';\nexport * from './components/text-box';\n\n// ============================================================================\n// Component Definitions with Discriminated Union\n// ============================================================================\n\n// StandardComponentDefinitionSchema - Union of all standard component types\n// Generated from the component registry (SINGLE SOURCE OF TRUTH)\nexport const StandardComponentDefinitionSchema = Type.Union(\n // Use Type.Any() for non-recursive standard components\n // Convert readonly array to mutable array for Type.Union\n [...createAllComponentSchemas(Type.Any())],\n {\n discriminator: { propertyName: 'name' },\n description: 'Standard component definition with discriminated union',\n }\n);\n\nexport const ComponentDefinitionSchema = Type.Recursive((This) =>\n Type.Union(\n [\n // Standard components from registry with per-container narrowed children\n ...createAllComponentSchemasNarrowed(This).schemas,\n ],\n {\n discriminator: { propertyName: 'name' },\n description: 'Component definition with discriminated union',\n }\n )\n);\n\n// ============================================================================\n// TypeScript Types\n// ============================================================================\n\nexport type ComponentDefinition = Static<typeof ComponentDefinitionSchema>;\n"],"mappings":";;;;;;AAUA,SAAS,YAAoB;AA6BtB,IAAM,oCAAoC,KAAK;AAAA;AAAA;AAAA,EAGpD,CAAC,GAAG,0BAA0B,KAAK,IAAI,CAAC,CAAC;AAAA,EACzC;AAAA,IACE,eAAe,EAAE,cAAc,OAAO;AAAA,IACtC,aAAa;AAAA,EACf;AACF;AAEO,IAAM,4BAA4B,KAAK;AAAA,EAAU,CAAC,SACvD,KAAK;AAAA,IACH;AAAA;AAAA,MAEE,GAAG,kCAAkC,IAAI,EAAE;AAAA,IAC7C;AAAA,IACA;AAAA,MACE,eAAe,EAAE,cAAc,OAAO;AAAA,MACtC,aAAa;AAAA,IACf;AAAA,EACF;AACF;","names":[]}
@@ -8,7 +8,7 @@ import {
8
8
  SectionPropsSchema,
9
9
  StatisticPropsSchema,
10
10
  TablePropsSchema
11
- } from "./chunk-CN6VD4WH.js";
11
+ } from "./chunk-3D6HY6AC.js";
12
12
  import {
13
13
  FontDefinitionSchema,
14
14
  HexColorSchema,
@@ -361,4 +361,4 @@ export {
361
361
  ThemeConfigSchema,
362
362
  isValidThemeConfig
363
363
  };
364
- //# sourceMappingURL=chunk-TBDQHRHI.js.map
364
+ //# sourceMappingURL=chunk-DEIEJUY4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ComponentDefinitionSchema
3
- } from "./chunk-WTN6PMNZ.js";
3
+ } from "./chunk-CVI7GFWX.js";
4
4
 
5
5
  // src/schemas/api.ts
6
6
  import { Type } from "@sinclair/typebox";
@@ -94,4 +94,4 @@ export {
94
94
  GenerateDocumentResponseSchema,
95
95
  ValidateDocumentResponseSchema
96
96
  };
97
- //# sourceMappingURL=chunk-YGWE6RFN.js.map
97
+ //# sourceMappingURL=chunk-EDYWA2KA.js.map
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  ThemeConfigSchema
3
- } from "./chunk-TBDQHRHI.js";
3
+ } from "./chunk-DEIEJUY4.js";
4
4
  import {
5
5
  documentValidator,
6
6
  strictDocumentValidator,
7
7
  validateAgainstSchema,
8
8
  validateJson
9
- } from "./chunk-6A2M4E4E.js";
9
+ } from "./chunk-YNBTESFN.js";
10
10
  import {
11
11
  ComponentDefinitionSchema
12
- } from "./chunk-WTN6PMNZ.js";
12
+ } from "./chunk-CVI7GFWX.js";
13
+ import {
14
+ CustomComponentDefinitionSchema
15
+ } from "./chunk-VP3X6DBP.js";
13
16
  import {
14
17
  ColumnsPropsSchema,
15
18
  FooterPropsSchema,
@@ -22,10 +25,7 @@ import {
22
25
  SectionPropsSchema,
23
26
  StatisticPropsSchema,
24
27
  TablePropsSchema
25
- } from "./chunk-CN6VD4WH.js";
26
- import {
27
- CustomComponentDefinitionSchema
28
- } from "./chunk-VP3X6DBP.js";
28
+ } from "./chunk-3D6HY6AC.js";
29
29
 
30
30
  // src/validation/unified/index.ts
31
31
  import {
@@ -426,4 +426,4 @@ export {
426
426
  createErrorConfig,
427
427
  formatErrorMessage
428
428
  };
429
- //# sourceMappingURL=chunk-NCGCTQZ6.js.map
429
+ //# sourceMappingURL=chunk-GGNGVIZO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ComponentDefinitionSchema
3
- } from "./chunk-WTN6PMNZ.js";
3
+ } from "./chunk-CVI7GFWX.js";
4
4
 
5
5
  // src/schemas/document.ts
6
6
  var JsonComponentDefinitionSchema = ComponentDefinitionSchema;
@@ -31,4 +31,4 @@ export {
31
31
  JsonComponentDefinitionSchema,
32
32
  JSON_SCHEMA_URLS
33
33
  };
34
- //# sourceMappingURL=chunk-MXVEVEY7.js.map
34
+ //# sourceMappingURL=chunk-S4EFGCIC.js.map
@@ -1,8 +1,7 @@
1
1
  import {
2
- STANDARD_COMPONENTS_REGISTRY,
3
- createComponentSchemaObject,
2
+ createAllComponentSchemasNarrowed,
4
3
  getStandardComponent
5
- } from "./chunk-CN6VD4WH.js";
4
+ } from "./chunk-3D6HY6AC.js";
6
5
 
7
6
  // src/schemas/generator.ts
8
7
  import { Type } from "@sinclair/typebox";
@@ -14,14 +13,11 @@ function generateUnifiedDocumentSchema(options = {}) {
14
13
  title = "JSON Report Definition",
15
14
  description = "JSON report definition with TypeBox schemas"
16
15
  } = options;
16
+ let capturedSectionSchema;
17
+ let capturedPluginSchemas = [];
17
18
  const ComponentDefinition = Type.Recursive(
18
19
  (This) => {
19
- const componentSchemas = [];
20
- if (includeStandardComponents) {
21
- for (const component of STANDARD_COMPONENTS_REGISTRY) {
22
- componentSchemas.push(createComponentSchemaObject(component, This));
23
- }
24
- }
20
+ const pluginSchemas = [];
25
21
  for (const customComponent of customComponents) {
26
22
  if (customComponent.versionedProps && customComponent.versionedProps.length > 0) {
27
23
  const versionEntries = customComponent.versionedProps;
@@ -40,7 +36,7 @@ function generateUnifiedDocumentSchema(options = {}) {
40
36
  schema.children = Type.Optional(Type.Array(This));
41
37
  }
42
38
  const versionDesc = entry.description ? `${customComponent.name} v${entry.version} \u2014 ${entry.description}` : customComponent.description ? `${customComponent.name} v${entry.version} \u2014 ${customComponent.description}` : `${customComponent.name} v${entry.version}`;
43
- componentSchemas.push(
39
+ pluginSchemas.push(
44
40
  Type.Object(schema, {
45
41
  additionalProperties: false,
46
42
  description: versionDesc
@@ -57,7 +53,7 @@ function generateUnifiedDocumentSchema(options = {}) {
57
53
  fallbackSchema.children = Type.Optional(Type.Array(This));
58
54
  }
59
55
  const fallbackDesc = latestEntry.description ? `${customComponent.name} (latest: v${latest}) \u2014 ${latestEntry.description}` : customComponent.description ? `${customComponent.name} (latest: v${latest}) \u2014 ${customComponent.description}` : `${customComponent.name} (latest: v${latest})`;
60
- componentSchemas.push(
56
+ pluginSchemas.push(
61
57
  Type.Object(fallbackSchema, {
62
58
  additionalProperties: false,
63
59
  description: fallbackDesc
@@ -73,7 +69,7 @@ function generateUnifiedDocumentSchema(options = {}) {
73
69
  if (hasChildren) {
74
70
  schema.children = Type.Optional(Type.Array(This));
75
71
  }
76
- componentSchemas.push(
72
+ pluginSchemas.push(
77
73
  Type.Object(schema, {
78
74
  additionalProperties: false,
79
75
  ...customComponent.description ? { description: customComponent.description } : {}
@@ -81,6 +77,10 @@ function generateUnifiedDocumentSchema(options = {}) {
81
77
  );
82
78
  }
83
79
  }
80
+ const { schemas: standardSchemas, byName } = includeStandardComponents ? createAllComponentSchemasNarrowed(This, pluginSchemas) : { schemas: [], byName: /* @__PURE__ */ new Map() };
81
+ capturedSectionSchema = byName.get("section");
82
+ capturedPluginSchemas = pluginSchemas;
83
+ const componentSchemas = [...standardSchemas, ...pluginSchemas];
84
84
  if (componentSchemas.length === 0) {
85
85
  return Type.Any();
86
86
  } else if (componentSchemas.length === 1) {
@@ -99,18 +99,28 @@ function generateUnifiedDocumentSchema(options = {}) {
99
99
  if (!reportComponent) {
100
100
  throw new Error("Docx root component not found in registry");
101
101
  }
102
+ if (!capturedSectionSchema) {
103
+ throw new Error("Section schema not found in narrowed standard schemas");
104
+ }
102
105
  return Type.Object(
103
106
  {
104
107
  name: Type.Literal("docx"),
105
108
  id: Type.Optional(Type.String()),
106
109
  $schema: Type.Optional(Type.String({ format: "uri" })),
107
110
  props: reportComponent.propsSchema,
108
- children: Type.Optional(Type.Array(ComponentDefinition))
111
+ children: Type.Optional(
112
+ Type.Array(
113
+ capturedPluginSchemas.length > 0 ? Type.Union([capturedSectionSchema, ...capturedPluginSchemas]) : capturedSectionSchema
114
+ )
115
+ )
109
116
  },
110
117
  {
111
118
  additionalProperties: false,
112
119
  title,
113
- description
120
+ description,
121
+ // Embed ComponentDefinition so convertToJsonSchema extracts it to
122
+ // definitions and bare $ref: "ComponentDefinition" values resolve.
123
+ definitions: { ComponentDefinition }
114
124
  }
115
125
  );
116
126
  }
@@ -118,4 +128,4 @@ function generateUnifiedDocumentSchema(options = {}) {
118
128
  export {
119
129
  generateUnifiedDocumentSchema
120
130
  };
121
- //# sourceMappingURL=chunk-XPL7NECE.js.map
131
+ //# sourceMappingURL=chunk-WJA5TGNI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/generator.ts"],"sourcesContent":["/**\n * Unified Document Schema Generator - SHARED UTILITY\n *\n * This is the SHARED implementation for generating document schemas.\n * It's used by MULTIPLE CONSUMERS with different requirements:\n *\n * 1. BUILD-TIME: generate-schemas.mjs uses this to create static .schema.json files\n * - Only standard components (no custom components available at build time)\n * - Outputs to filesystem for IDE autocomplete\n *\n * 2. RUNTIME PLUGIN: plugin/schema.ts uses this for plugin-enhanced schemas\n * - Includes custom components registered at runtime\n * - Cannot be generated at build time (components must be instantiated)\n *\n * 3. WEB APP: Monaco editor may use this for in-browser validation\n * - Optimized for browser environment\n * - No filesystem access\n *\n * This separation is ARCHITECTURAL, not accidental:\n * - Build-time vs runtime constraints are incompatible\n * - Custom components require runtime instantiation\n * - Different consumers need different output formats\n *\n * IMPORTANT: Standard components are defined in component-registry.ts (SINGLE SOURCE OF TRUTH).\n * This generator consumes that registry to ensure consistency across all schema generation.\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\nimport {\n createAllComponentSchemasNarrowed,\n getStandardComponent,\n} from './component-registry';\nimport { latestVersion } from '@json-to-office/shared';\n\n/**\n * Per-version props schema entry\n */\nexport interface VersionedPropsEntry {\n version: string;\n propsSchema: TSchema;\n hasChildren?: boolean;\n description?: string;\n}\n\n/**\n * Custom component interface for plugins\n */\nexport interface CustomComponentInfo {\n name: string;\n propsSchema: TSchema;\n /** When true, the component includes an optional `children` array */\n hasChildren?: boolean;\n /** Human-readable description shown in autocomplete */\n description?: string;\n /**\n * Per-version props schemas for version-discriminated validation.\n * When provided, separate schema variants are generated per version,\n * each pairing its version literal with its specific props schema.\n * A \"no version\" fallback variant uses the latest version's props.\n */\n versionedProps?: VersionedPropsEntry[];\n}\n\n/**\n * Options for generating document schema\n */\nexport interface GenerateDocumentSchemaOptions {\n includeStandardComponents?: boolean;\n includeTheme?: boolean;\n customComponents?: CustomComponentInfo[];\n title?: string;\n description?: string;\n}\n\n/**\n * Generate a complete document schema with all components\n *\n * This is the SHARED IMPLEMENTATION used by:\n * - Build-time schema generation (standard components only)\n * - Runtime plugin schema generation (with custom components)\n * - Web app schema generation (optimized for browser)\n *\n * @param options Configuration for what to include in the schema\n * @returns TypeBox schema that can be converted to JSON Schema\n */\nexport function generateUnifiedDocumentSchema(\n options: GenerateDocumentSchemaOptions = {}\n): TSchema {\n const {\n includeStandardComponents = true,\n customComponents = [],\n title = 'JSON Report Definition',\n description = 'JSON report definition with TypeBox schemas',\n } = options;\n\n // Captured from inside the recursive callback for the root's children.\n let capturedSectionSchema: TSchema | undefined;\n let capturedPluginSchemas: TSchema[] = [];\n\n // Create a recursive component definition schema\n const ComponentDefinition = Type.Recursive(\n (This) => {\n // ── Phase 1: Build plugin schemas (plugins get Self for arbitrary nesting) ──\n const pluginSchemas: TSchema[] = [];\n\n for (const customComponent of customComponents) {\n if (\n customComponent.versionedProps &&\n customComponent.versionedProps.length > 0\n ) {\n // Version-discriminated: one variant per version + one \"no version\" fallback\n const versionEntries = customComponent.versionedProps;\n const latest = latestVersion(versionEntries.map((e) => e.version));\n\n // Per-version variants: version is required, props are version-specific\n for (const entry of versionEntries) {\n const versionLiteralDesc =\n entry.description || customComponent.description;\n const schema: Record<string, TSchema> = {\n name: Type.Literal(customComponent.name),\n id: Type.Optional(Type.String()),\n version: versionLiteralDesc\n ? Type.Literal(entry.version, {\n description: versionLiteralDesc,\n })\n : Type.Literal(entry.version),\n props: entry.propsSchema,\n };\n if (entry.hasChildren) {\n schema.children = Type.Optional(Type.Array(This));\n }\n const versionDesc = entry.description\n ? `${customComponent.name} v${entry.version} — ${entry.description}`\n : customComponent.description\n ? `${customComponent.name} v${entry.version} — ${customComponent.description}`\n : `${customComponent.name} v${entry.version}`;\n pluginSchemas.push(\n Type.Object(schema, {\n additionalProperties: false,\n description: versionDesc,\n })\n );\n }\n\n // \"No version\" fallback: version is NOT allowed, uses latest props\n const latestEntry = versionEntries.find((e) => e.version === latest)!;\n const fallbackSchema: Record<string, TSchema> = {\n name: Type.Literal(customComponent.name),\n id: Type.Optional(Type.String()),\n props: latestEntry.propsSchema,\n };\n if (latestEntry.hasChildren) {\n fallbackSchema.children = Type.Optional(Type.Array(This));\n }\n const fallbackDesc = latestEntry.description\n ? `${customComponent.name} (latest: v${latest}) — ${latestEntry.description}`\n : customComponent.description\n ? `${customComponent.name} (latest: v${latest}) — ${customComponent.description}`\n : `${customComponent.name} (latest: v${latest})`;\n pluginSchemas.push(\n Type.Object(fallbackSchema, {\n additionalProperties: false,\n description: fallbackDesc,\n })\n );\n } else {\n // Non-versioned component: single variant\n const hasChildren = !!customComponent.hasChildren;\n const schema: Record<string, TSchema> = {\n name: Type.Literal(customComponent.name),\n id: Type.Optional(Type.String()),\n props: customComponent.propsSchema,\n };\n if (hasChildren) {\n schema.children = Type.Optional(Type.Array(This));\n }\n pluginSchemas.push(\n Type.Object(schema, {\n additionalProperties: false,\n ...(customComponent.description\n ? { description: customComponent.description }\n : {}),\n })\n );\n }\n }\n\n // ── Phase 2: Build standard components with narrowed children ──\n const { schemas: standardSchemas, byName } = includeStandardComponents\n ? createAllComponentSchemasNarrowed(This, pluginSchemas)\n : { schemas: [] as TSchema[], byName: new Map<string, TSchema>() };\n\n // Capture the narrowed section schema + plugins for the root's children.\n // Must happen inside the callback while standardSchemas is available.\n capturedSectionSchema = byName.get('section');\n capturedPluginSchemas = pluginSchemas;\n\n const componentSchemas = [...standardSchemas, ...pluginSchemas];\n\n // Create the union based on the number of schemas\n if (componentSchemas.length === 0) {\n return Type.Any();\n } else if (componentSchemas.length === 1) {\n return componentSchemas[0];\n } else {\n const componentDescription =\n customComponents.length > 0\n ? 'Component definition with discriminated union including custom components'\n : 'Component definition with discriminated union';\n\n return Type.Union(componentSchemas, {\n discriminator: { propertyName: 'name' },\n description: componentDescription,\n });\n }\n },\n { $id: 'ComponentDefinition' }\n );\n\n // Build root docx schema with narrowed children (section only).\n // ComponentDefinition is embedded in `definitions` so that $refs inside\n // section header/footer and table cell content resolve correctly.\n const reportComponent = getStandardComponent('docx');\n if (!reportComponent) {\n throw new Error('Docx root component not found in registry');\n }\n\n if (!capturedSectionSchema) {\n throw new Error('Section schema not found in narrowed standard schemas');\n }\n\n return Type.Object(\n {\n name: Type.Literal('docx'),\n id: Type.Optional(Type.String()),\n $schema: Type.Optional(Type.String({ format: 'uri' })),\n props: reportComponent.propsSchema,\n children: Type.Optional(\n Type.Array(\n capturedPluginSchemas.length > 0\n ? Type.Union([capturedSectionSchema, ...capturedPluginSchemas])\n : capturedSectionSchema\n )\n ),\n },\n {\n additionalProperties: false,\n title,\n description,\n // Embed ComponentDefinition so convertToJsonSchema extracts it to\n // definitions and bare $ref: \"ComponentDefinition\" values resolve.\n definitions: { ComponentDefinition },\n } as Record<string, unknown>\n );\n}\n"],"mappings":";;;;;;AA2BA,SAAS,YAAqB;AAK9B,SAAS,qBAAqB;AAqDvB,SAAS,8BACd,UAAyC,CAAC,GACjC;AACT,QAAM;AAAA,IACJ,4BAA4B;AAAA,IAC5B,mBAAmB,CAAC;AAAA,IACpB,QAAQ;AAAA,IACR,cAAc;AAAA,EAChB,IAAI;AAGJ,MAAI;AACJ,MAAI,wBAAmC,CAAC;AAGxC,QAAM,sBAAsB,KAAK;AAAA,IAC/B,CAAC,SAAS;AAER,YAAM,gBAA2B,CAAC;AAElC,iBAAW,mBAAmB,kBAAkB;AA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,UAClC,eAAe,EAAE,cAAc,OAAO;AAAA,UACtC,aAAa;AAAA,QACf,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,EAAE,KAAK,sBAAsB;AAAA,EAC/B;AAKA,QAAM,kBAAkB,qBAAqB,MAAM;AACnD,MAAI,CAAC,iBAAiB;AACpB,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,MAAI,CAAC,uBAAuB;AAC1B,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AAEA,SAAO,KAAK;AAAA,IACV;AAAA,MACE,MAAM,KAAK,QAAQ,MAAM;AAAA,MACzB,IAAI,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,MAC/B,SAAS,KAAK,SAAS,KAAK,OAAO,EAAE,QAAQ,MAAM,CAAC,CAAC;AAAA,MACrD,OAAO,gBAAgB;AAAA,MACvB,UAAU,KAAK;AAAA,QACb,KAAK;AAAA,UACH,sBAAsB,SAAS,IAC3B,KAAK,MAAM,CAAC,uBAAuB,GAAG,qBAAqB,CAAC,IAC5D;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,sBAAsB;AAAA,MACtB;AAAA,MACA;AAAA;AAAA;AAAA,MAGA,aAAa,EAAE,oBAAoB;AAAA,IACrC;AAAA,EACF;AACF;","names":[]}
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  ComponentDefinitionSchema,
3
3
  StandardComponentDefinitionSchema
4
- } from "./chunk-WTN6PMNZ.js";
4
+ } from "./chunk-CVI7GFWX.js";
5
+ import {
6
+ CustomComponentDefinitionSchema
7
+ } from "./chunk-VP3X6DBP.js";
5
8
  import {
6
9
  ColumnsPropsSchema,
7
10
  FooterPropsSchema,
@@ -14,10 +17,7 @@ import {
14
17
  SectionPropsSchema,
15
18
  StatisticPropsSchema,
16
19
  TablePropsSchema
17
- } from "./chunk-CN6VD4WH.js";
18
- import {
19
- CustomComponentDefinitionSchema
20
- } from "./chunk-VP3X6DBP.js";
20
+ } from "./chunk-3D6HY6AC.js";
21
21
 
22
22
  // src/validation/unified/error-transformer.ts
23
23
  import {
@@ -747,4 +747,4 @@ export {
747
747
  validateJsonComponent,
748
748
  validateDocumentWithSchema
749
749
  };
750
- //# sourceMappingURL=chunk-6A2M4E4E.js.map
750
+ //# sourceMappingURL=chunk-YNBTESFN.js.map
package/dist/index.d.ts CHANGED
@@ -404,208 +404,7 @@ declare const COMPONENT_SCHEMA_MAP: {
404
404
  }>>;
405
405
  size: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"small">, _sinclair_typebox.TLiteral<"medium">, _sinclair_typebox.TLiteral<"large">]>>;
406
406
  }>;
407
- readonly table: _sinclair_typebox.TObject<{
408
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
409
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
410
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
411
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
412
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
413
- }>]>>;
414
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
415
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
416
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
417
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
418
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
419
- }>]>>;
420
- hideBorders: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TObject<{
421
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
422
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
423
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
424
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
425
- insideHorizontal: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
426
- insideVertical: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
427
- }>]>>;
428
- cellDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
429
- color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
430
- backgroundColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
431
- horizontalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
432
- verticalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
433
- font: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
434
- family: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
435
- size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
436
- bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
437
- italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
438
- underline: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
439
- }>>;
440
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
441
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
442
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
443
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
444
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
445
- }>]>>;
446
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
447
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
448
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
449
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
450
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
451
- }>]>>;
452
- padding: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
453
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
454
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
455
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
456
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
457
- }>]>>;
458
- height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
459
- }>>;
460
- headerCellDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
461
- color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
462
- backgroundColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
463
- horizontalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
464
- verticalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
465
- font: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
466
- family: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
467
- size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
468
- bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
469
- italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
470
- underline: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
471
- }>>;
472
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
473
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
474
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
475
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
476
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
477
- }>]>>;
478
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
479
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
480
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
481
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
482
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
483
- }>]>>;
484
- padding: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
485
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
486
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
487
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
488
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
489
- }>]>>;
490
- height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
491
- }>>;
492
- width: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
493
- columns: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
494
- width: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
495
- cellDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
496
- color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
497
- backgroundColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
498
- horizontalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
499
- verticalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
500
- font: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
501
- family: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
502
- size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
503
- bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
504
- italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
505
- underline: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
506
- }>>;
507
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
508
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
509
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
510
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
511
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
512
- }>]>>;
513
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
514
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
515
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
516
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
517
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
518
- }>]>>;
519
- padding: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
520
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
521
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
522
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
523
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
524
- }>]>>;
525
- height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
526
- }>>;
527
- header: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
528
- color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
529
- backgroundColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
530
- horizontalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
531
- verticalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
532
- font: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
533
- family: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
534
- size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
535
- bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
536
- italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
537
- underline: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
538
- }>>;
539
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
540
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
541
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
542
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
543
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
544
- }>]>>;
545
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
546
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
547
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
548
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
549
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
550
- }>]>>;
551
- padding: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
552
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
553
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
554
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
555
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
556
- }>]>>;
557
- height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
558
- content: _sinclair_typebox.TOptional<_sinclair_typebox.TRecursive<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
559
- name: _sinclair_typebox.TString;
560
- props: _sinclair_typebox.TObject<{}>;
561
- children: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TThis>>;
562
- }>]>>>;
563
- }>>;
564
- cells: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
565
- color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
566
- backgroundColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
567
- horizontalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
568
- verticalAlignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
569
- font: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
570
- family: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
571
- size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
572
- bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
573
- italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
574
- underline: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
575
- }>>;
576
- /**
577
- * Batch validate multiple components
578
- */
579
- borderColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
580
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
581
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
582
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
583
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
584
- }>]>>;
585
- borderSize: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
586
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
587
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
588
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
589
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
590
- }>]>>;
591
- padding: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
592
- bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
593
- top: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
594
- right: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
595
- left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
596
- }>]>>;
597
- height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
598
- content: _sinclair_typebox.TOptional<_sinclair_typebox.TRecursive<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
599
- name: _sinclair_typebox.TString;
600
- props: _sinclair_typebox.TObject<{}>;
601
- children: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TThis>>;
602
- }>]>>>;
603
- }>>>;
604
- }>>;
605
- keepInOnePage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
606
- keepNext: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
607
- repeatHeaderOnPageBreak: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
608
- }>;
407
+ readonly table: _sinclair_typebox.TSchema;
609
408
  readonly header: _sinclair_typebox.TObject<{
610
409
  text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
611
410
  logo: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateUnifiedDocumentSchema
3
- } from "./chunk-XPL7NECE.js";
3
+ } from "./chunk-WJA5TGNI.js";
4
4
  import {
5
5
  DOC_LINKS,
6
6
  ERROR_TEMPLATES,
@@ -34,21 +34,21 @@ import {
34
34
  validateTheme,
35
35
  validateThemeJson,
36
36
  validateThemeWithEnhancement
37
- } from "./chunk-NCGCTQZ6.js";
37
+ } from "./chunk-GGNGVIZO.js";
38
38
  import {
39
39
  ThemeConfigSchema,
40
40
  isValidThemeConfig
41
- } from "./chunk-TBDQHRHI.js";
41
+ } from "./chunk-DEIEJUY4.js";
42
42
  import {
43
43
  GenerateDocumentRequestSchema,
44
44
  GenerateDocumentResponseSchema,
45
45
  ValidateDocumentRequestSchema,
46
46
  ValidateDocumentResponseSchema
47
- } from "./chunk-YGWE6RFN.js";
47
+ } from "./chunk-EDYWA2KA.js";
48
48
  import {
49
49
  JSON_SCHEMA_URLS,
50
50
  JsonComponentDefinitionSchema
51
- } from "./chunk-MXVEVEY7.js";
51
+ } from "./chunk-S4EFGCIC.js";
52
52
  import {
53
53
  comprehensiveValidateDocument,
54
54
  createDocumentValidator,
@@ -70,11 +70,25 @@ import {
70
70
  validateJsonComponent,
71
71
  validateJsonDocument,
72
72
  validateWithEnhancement
73
- } from "./chunk-6A2M4E4E.js";
73
+ } from "./chunk-YNBTESFN.js";
74
74
  import {
75
75
  ComponentDefinitionSchema,
76
76
  StandardComponentDefinitionSchema
77
- } from "./chunk-WTN6PMNZ.js";
77
+ } from "./chunk-CVI7GFWX.js";
78
+ import {
79
+ CustomComponentDefinitionSchema,
80
+ TextSpaceAfterComponentSchema,
81
+ TextSpaceAfterPropsSchema
82
+ } from "./chunk-VP3X6DBP.js";
83
+ import {
84
+ BASE_SCHEMA_METADATA,
85
+ COMPONENT_METADATA,
86
+ THEME_SCHEMA_METADATA,
87
+ convertToJsonSchema,
88
+ createComponentSchema,
89
+ exportSchemaToFile,
90
+ fixSchemaReferences
91
+ } from "./chunk-AMVS7BRX.js";
78
92
  import {
79
93
  AlignmentSchema,
80
94
  BaseComponentPropsSchema,
@@ -100,21 +114,7 @@ import {
100
114
  TablePropsSchema,
101
115
  TextBoxPropsSchema,
102
116
  TocPropsSchema
103
- } from "./chunk-CN6VD4WH.js";
104
- import {
105
- CustomComponentDefinitionSchema,
106
- TextSpaceAfterComponentSchema,
107
- TextSpaceAfterPropsSchema
108
- } from "./chunk-VP3X6DBP.js";
109
- import {
110
- BASE_SCHEMA_METADATA,
111
- COMPONENT_METADATA,
112
- THEME_SCHEMA_METADATA,
113
- convertToJsonSchema,
114
- createComponentSchema,
115
- exportSchemaToFile,
116
- fixSchemaReferences
117
- } from "./chunk-HHMK2RWF.js";
117
+ } from "./chunk-3D6HY6AC.js";
118
118
  import "./chunk-F5LVWDTY.js";
119
119
 
120
120
  // src/index.ts