@json-to-office/shared-docx 0.34.0 → 0.35.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.
- package/dist/{chunk-FG6SI4JG.js → chunk-4FOTCEYP.js} +2 -2
- package/dist/{chunk-Y2ME2XH6.js → chunk-4ORMKPLQ.js} +2 -2
- package/dist/{chunk-NJN6UT3A.js → chunk-7FNE5T7M.js} +3 -3
- package/dist/{chunk-PSVJL2G3.js → chunk-EKBKTVLD.js} +2 -2
- package/dist/{chunk-Z5WQPM4B.js → chunk-G5GIBBUX.js} +4 -2
- package/dist/chunk-G5GIBBUX.js.map +1 -0
- package/dist/{chunk-K7PV4XUA.js → chunk-HHF5AQ7X.js} +2 -2
- package/dist/{chunk-VRGM2FUX.js → chunk-KKFRVDJH.js} +5 -5
- package/dist/{chunk-CQHH44HX.js → chunk-PQITDZWT.js} +3 -1
- package/dist/chunk-PQITDZWT.js.map +1 -0
- package/dist/{chunk-SZCMTHGI.js → chunk-UKOAOVPP.js} +2 -2
- package/dist/index.d.ts +45 -0
- package/dist/index.js +9 -9
- package/dist/schemas/api.js +4 -4
- package/dist/schemas/component-registry.js +2 -2
- package/dist/schemas/components.d.ts +76 -0
- package/dist/schemas/components.js +3 -3
- package/dist/schemas/document.js +5 -5
- package/dist/schemas/export.js +3 -3
- package/dist/schemas/generator.js +3 -3
- package/dist/schemas/theme.d.ts +38 -0
- package/dist/schemas/theme.js +1 -1
- package/dist/validation/unified/index.d.ts +39 -0
- package/dist/validation/unified/index.js +5 -5
- package/package.json +2 -2
- package/dist/chunk-CQHH44HX.js.map +0 -1
- package/dist/chunk-Z5WQPM4B.js.map +0 -1
- /package/dist/{chunk-FG6SI4JG.js.map → chunk-4FOTCEYP.js.map} +0 -0
- /package/dist/{chunk-Y2ME2XH6.js.map → chunk-4ORMKPLQ.js.map} +0 -0
- /package/dist/{chunk-NJN6UT3A.js.map → chunk-7FNE5T7M.js.map} +0 -0
- /package/dist/{chunk-PSVJL2G3.js.map → chunk-EKBKTVLD.js.map} +0 -0
- /package/dist/{chunk-K7PV4XUA.js.map → chunk-HHF5AQ7X.js.map} +0 -0
- /package/dist/{chunk-VRGM2FUX.js.map → chunk-KKFRVDJH.js.map} +0 -0
- /package/dist/{chunk-SZCMTHGI.js.map → chunk-UKOAOVPP.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentDefinitionSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HHF5AQ7X.js";
|
|
4
4
|
|
|
5
5
|
// src/schemas/api.ts
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
@@ -105,4 +105,4 @@ export {
|
|
|
105
105
|
GenerateDocumentResponseSchema,
|
|
106
106
|
ValidateDocumentResponseSchema
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-4FOTCEYP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getContainerComponents
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5GIBBUX.js";
|
|
4
4
|
|
|
5
5
|
// src/schemas/export.ts
|
|
6
6
|
import { restructureNameDiscriminatedUnions } from "@json-to-office/shared";
|
|
@@ -274,4 +274,4 @@ export {
|
|
|
274
274
|
BASE_SCHEMA_METADATA,
|
|
275
275
|
THEME_SCHEMA_METADATA
|
|
276
276
|
};
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
277
|
+
//# sourceMappingURL=chunk-4ORMKPLQ.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentDefinitionSchema,
|
|
3
3
|
StandardComponentDefinitionSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HHF5AQ7X.js";
|
|
5
5
|
import {
|
|
6
6
|
CustomComponentDefinitionSchema
|
|
7
7
|
} from "./chunk-7GGTZ4TA.js";
|
|
8
8
|
import {
|
|
9
9
|
ReportPropsSchema,
|
|
10
10
|
STANDARD_COMPONENTS_REGISTRY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G5GIBBUX.js";
|
|
12
12
|
|
|
13
13
|
// src/validation/unified/error-transformer.ts
|
|
14
14
|
import {
|
|
@@ -903,4 +903,4 @@ export {
|
|
|
903
903
|
validateJsonComponent,
|
|
904
904
|
validateDocumentWithSchema
|
|
905
905
|
};
|
|
906
|
-
//# sourceMappingURL=chunk-
|
|
906
|
+
//# sourceMappingURL=chunk-7FNE5T7M.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAllComponentSchemasNarrowed,
|
|
3
3
|
getStandardComponent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G5GIBBUX.js";
|
|
5
5
|
|
|
6
6
|
// src/schemas/generator.ts
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
@@ -139,4 +139,4 @@ function generateUnifiedDocumentSchema(options = {}) {
|
|
|
139
139
|
export {
|
|
140
140
|
generateUnifiedDocumentSchema
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-EKBKTVLD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ThemeOverridesSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PQITDZWT.js";
|
|
4
4
|
import {
|
|
5
5
|
AlignmentSchema,
|
|
6
6
|
ColumnsPropsSchema,
|
|
@@ -27,6 +27,7 @@ import { Type as Type6 } from "@sinclair/typebox";
|
|
|
27
27
|
|
|
28
28
|
// src/schemas/components/report.ts
|
|
29
29
|
import { Type } from "@sinclair/typebox";
|
|
30
|
+
import { FontRegistrySchema } from "@json-to-office/shared";
|
|
30
31
|
var createReportPropsSchema = (_componentRef) => Type.Object(
|
|
31
32
|
{
|
|
32
33
|
theme: Type.Optional(
|
|
@@ -37,6 +38,7 @@ var createReportPropsSchema = (_componentRef) => Type.Object(
|
|
|
37
38
|
})
|
|
38
39
|
),
|
|
39
40
|
themeOverrides: Type.Optional(ThemeOverridesSchema),
|
|
41
|
+
fontRegistry: Type.Optional(FontRegistrySchema),
|
|
40
42
|
componentDefaults: Type.Optional(ComponentDefaultsSchema),
|
|
41
43
|
language: Type.Optional(
|
|
42
44
|
Type.String({
|
|
@@ -846,4 +848,4 @@ export {
|
|
|
846
848
|
createAllComponentSchemas,
|
|
847
849
|
createAllComponentSchemasNarrowed
|
|
848
850
|
};
|
|
849
|
-
//# sourceMappingURL=chunk-
|
|
851
|
+
//# sourceMappingURL=chunk-G5GIBBUX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/component-registry.ts","../src/schemas/components/report.ts","../src/schemas/components/text-box.ts","../src/schemas/components/toc.ts","../src/schemas/components/highcharts.ts","../src/schemas/components/visual.ts"],"sourcesContent":["/**\n * Component Registry - SINGLE SOURCE OF TRUTH\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * Adding a new component: Add it to STANDARD_COMPONENTS_REGISTRY below.\n * It will automatically be included in:\n * - StandardComponentDefinitionSchema (components.ts)\n * - ComponentDefinitionSchema (components.ts)\n * - generateUnifiedDocumentSchema (generator.ts)\n * - Monaco editor autocomplete\n * - Build-time JSON schemas\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\n// Import directly from individual component files to avoid circular dependency\n// (components.ts imports from this file, so we can't import from components.ts)\nimport { ReportPropsSchema } from './components/report';\nimport {\n SectionPropsSchema,\n createSectionPropsSchema,\n} from './components/section';\nimport { ColumnsPropsSchema } from './components/columns';\nimport { HeadingPropsSchema } from './components/heading';\nimport { ParagraphPropsSchema } from './components/paragraph';\nimport { TextBoxPropsSchema } from './components/text-box';\nimport { ImagePropsSchema } from './components/image';\nimport { StatisticPropsSchema } from './components/statistic';\nimport { TablePropsSchema, createTablePropsSchema } from './components/table';\nimport { ListPropsSchema } from './components/list';\nimport { TocPropsSchema } from './components/toc';\nimport { HighchartsPropsSchema } from './components/highcharts';\nimport { VisualPropsSchema } from './components/visual';\n\n/**\n * Component definition with metadata\n */\nexport interface StandardComponentDefinition {\n /** Component name identifier (e.g., 'heading', 'text', 'toc') */\n name: string;\n /** TypeBox schema for the component's props */\n propsSchema: TSchema;\n /** Whether this component can contain children */\n hasChildren: boolean;\n /**\n * Names of standard components allowed as direct children.\n * Only meaningful when hasChildren is true.\n * Plugin components are always allowed in addition to these.\n * Omit to allow the full recursive union (backward-compat).\n */\n allowedChildren?: readonly string[];\n /**\n * Factory that builds props with a live recursive ref (e.g., for section\n * header/footer, table cell content). When present and a recursive ref is\n * available, used instead of the static `propsSchema`.\n */\n createPropsSchema?: (recursiveRef: TSchema) => TSchema;\n /** Component category for organization */\n category: 'container' | 'content' | 'layout';\n /** Human-readable description */\n description: string;\n /** Special flags for this component */\n special?: {\n /** Has $schema field (only 'docx') */\n hasSchemaField?: boolean;\n };\n}\n\n/**\n * SINGLE SOURCE OF TRUTH for all standard components\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * IMPORTANT: When adding a new component:\n * 1. Add the component definition to this array\n * 2. Import its props schema at the top of this file\n * 3. That's it! The component will automatically appear everywhere.\n */\nexport const STANDARD_COMPONENTS_REGISTRY: readonly StandardComponentDefinition[] =\n [\n // ========================================================================\n // Container Components (can contain children)\n // ========================================================================\n {\n name: 'docx',\n propsSchema: ReportPropsSchema,\n hasChildren: true,\n allowedChildren: ['section'],\n category: 'container',\n description:\n 'Main document container - defines the overall document structure. Required as the root component.',\n special: {\n hasSchemaField: true, // Only docx root has $schema field\n },\n },\n {\n name: 'section',\n propsSchema: SectionPropsSchema,\n createPropsSchema: createSectionPropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'highcharts',\n 'visual',\n 'columns',\n 'text-box',\n ],\n category: 'container',\n description:\n 'Section container - groups related content with optional title. Use for organizing document structure.',\n },\n {\n name: 'columns',\n propsSchema: ColumnsPropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'highcharts',\n 'visual',\n 'text-box',\n ],\n category: 'layout',\n description:\n 'Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content.',\n },\n {\n name: 'text-box',\n propsSchema: TextBoxPropsSchema,\n hasChildren: true,\n allowedChildren: ['heading', 'paragraph', 'image'],\n category: 'layout',\n description:\n 'Floating text container - allows positioning text anywhere on the page with absolute or relative positioning.',\n },\n\n // ========================================================================\n // Content Components (leaf nodes, no children)\n // ========================================================================\n {\n name: 'heading',\n propsSchema: HeadingPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest.',\n },\n {\n name: 'paragraph',\n propsSchema: ParagraphPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Paragraph text - supports formatting like bold, italic, and color. Main content element.',\n },\n {\n name: 'image',\n propsSchema: ImagePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Image element - displays images with optional caption. Supports various formats.',\n },\n {\n name: 'statistic',\n propsSchema: StatisticPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Statistic display - shows a number with description. Perfect for KPIs and metrics.',\n },\n {\n name: 'table',\n propsSchema: TablePropsSchema,\n createPropsSchema: createTablePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Data table - displays tabular data with headers. Supports formatting and alignment.',\n },\n {\n name: 'list',\n propsSchema: ListPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'List element - bulleted or numbered list items. Supports nested lists.',\n },\n {\n name: 'toc',\n propsSchema: TocPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles.',\n },\n {\n name: 'highcharts',\n propsSchema: HighchartsPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options.',\n },\n {\n name: 'visual',\n propsSchema: VisualPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Free-canvas graphic authored as a single pptx slide and embedded as a rasterized PNG. Use for infographics, diagrams and layered compositions that the document flow cannot express.',\n },\n ] as const;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Get a component definition by name\n */\nexport function getStandardComponent(\n name: string\n): StandardComponentDefinition | undefined {\n return STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);\n}\n\n/**\n * Get all standard component names\n */\nexport function getAllStandardComponentNames(): readonly string[] {\n return STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);\n}\n\n/**\n * Get components by category\n */\nexport function getComponentsByCategory(\n category: StandardComponentDefinition['category']\n): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.category === category);\n}\n\n/**\n * Get container components (components that can have children)\n */\nexport function getContainerComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n}\n\n/**\n * Get content components (components that cannot have children)\n */\nexport function getContentComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);\n}\n\n/**\n * Check if a component name is a standard component\n */\nexport function isStandardComponent(name: string): boolean {\n return STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);\n}\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\n/**\n * True when a props schema rejects `{}`, i.e. the `props` key cannot be omitted.\n *\n * Only object schemas are inspected. Anything else (a union, a bare ref) is\n * treated as demanding props, preserving the previous stricter behavior for\n * shapes this cannot reason about.\n */\nfunction demandsProps(propsSchema: TSchema): boolean {\n const schema = propsSchema as { type?: string; required?: readonly string[] };\n return schema.type !== 'object' || (schema.required?.length ?? 0) > 0;\n}\n\n/**\n * Generate TypeBox schema object for a component.\n *\n * @param component - Component definition from the registry\n * @param childrenType - Schema for children items. For containers this should be\n * a narrowed union of allowed children; for leaves omit it.\n * @returns TypeBox schema object for the component\n */\nexport function createComponentSchemaObject(\n component: StandardComponentDefinition,\n childrenType?: TSchema,\n selfRef?: TSchema\n): TSchema {\n const schema: Record<string, TSchema> = {\n name: Type.Literal(component.name),\n id: Type.Optional(Type.String()),\n enabled: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion.',\n })\n ),\n };\n\n // Special handling for report component (has $schema field)\n if (component.special?.hasSchemaField) {\n schema.$schema = Type.Optional(Type.String({ format: 'uri' }));\n }\n\n // selfRef (full union) is intentionally passed to createPropsSchema so that\n // header/footer sub-schemas and table cell content can reference any component.\n const propsSchema =\n component.createPropsSchema && selfRef\n ? component.createPropsSchema(selfRef)\n : component.propsSchema;\n\n // `props` is required only when the props schema itself demands a field.\n // The runtime validator treats an omitted `props` as `{}` and lets the props\n // schema decide (see deep-validator.ts), so `section`, `toc`, `image` and\n // `text-box` are legal without the key. Exporting `props` as unconditionally\n // required reddened documents that build: the playground flagged all 23\n // propless sections in the shipped tech-report template while every runtime\n // gate stayed green. The root `docx` node already carried this fix locally in\n // generator.ts; this generalizes it to every component.\n schema.props = demandsProps(propsSchema)\n ? propsSchema\n : Type.Optional(propsSchema);\n\n // Add children support if applicable. The root component requires its\n // `children` array — deep-validator.ts enforces the same rule, but only on\n // the fallback path it takes when the TypeBox check already failed. That\n // made the rule fire only as a side effect of `props` being required, so\n // relaxing `props` above would silently retire it. Nested containers may\n // legitimately be empty.\n if (component.hasChildren && childrenType) {\n schema.children = component.special?.hasSchemaField\n ? Type.Array(childrenType)\n : Type.Optional(Type.Array(childrenType));\n }\n\n return Type.Object(schema, {\n additionalProperties: false,\n description: component.description,\n });\n}\n\n/**\n * Generate an array of TypeBox schemas for all standard components.\n * Uses a flat recursive ref for all containers (legacy behavior).\n *\n * @param recursiveRef - Optional recursive reference for children\n * @returns Array of TypeBox schemas for all components in the registry\n */\nexport function createAllComponentSchemas(\n recursiveRef?: TSchema\n): readonly TSchema[] {\n return STANDARD_COMPONENTS_REGISTRY.map((component) =>\n createComponentSchemaObject(component, recursiveRef)\n );\n}\n\n/**\n * Build all standard component schemas with per-container narrowed children.\n *\n * Resolves containers in dependency order so each container's children union\n * only references its allowedChildren. Plugin schemas are always included in\n * every container's children.\n *\n * @param selfRef - The Type.Recursive self-reference (used as fallback and for plugin children)\n * @param pluginSchemas - Plugin component schemas (always allowed in all containers)\n * @returns schemas array and a byName map for direct lookups\n */\nexport function createAllComponentSchemasNarrowed(\n selfRef: TSchema,\n pluginSchemas: TSchema[] = []\n): { schemas: TSchema[]; byName: Map<string, TSchema> } {\n // Phase 1: Build leaf (non-container) component schemas — no children\n // selfRef is passed so factories (e.g. table) can wire up recursive refs.\n const leafSchemas = new Map<string, TSchema>();\n for (const comp of STANDARD_COMPONENTS_REGISTRY) {\n if (!comp.hasChildren) {\n leafSchemas.set(\n comp.name,\n createComponentSchemaObject(comp, undefined, selfRef)\n );\n }\n }\n\n // Phase 2: Resolve containers in dependency order\n const containers = STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n const resolved = new Map<string, TSchema>();\n const pending = [...containers];\n\n while (pending.length > 0) {\n const before = pending.length;\n for (let i = pending.length - 1; i >= 0; i--) {\n const comp = pending[i];\n\n if (!comp.allowedChildren) {\n // No allowedChildren declared — fallback to full recursive ref\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, selfRef, selfRef)\n );\n pending.splice(i, 1);\n continue;\n }\n\n // Check if all container dependencies are resolved\n const containerDeps = comp.allowedChildren.filter((name) =>\n containers.some((c) => c.name === name)\n );\n if (!containerDeps.every((d) => resolved.has(d))) continue;\n\n // Build narrowed children union\n const childSchemas = comp.allowedChildren\n .map((name) => resolved.get(name) ?? leafSchemas.get(name))\n .filter((s): s is TSchema => s !== undefined);\n\n const allChildSchemas = [...childSchemas, ...pluginSchemas];\n const childrenType =\n allChildSchemas.length === 1\n ? allChildSchemas[0]\n : Type.Union(allChildSchemas);\n\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, childrenType, selfRef)\n );\n pending.splice(i, 1);\n }\n\n if (pending.length === before) {\n throw new Error(\n `Circular allowedChildren among: ${pending.map((c) => c.name).join(', ')}`\n );\n }\n }\n\n // Combine: containers (resolved) + leaves\n const byName = new Map([...resolved, ...leafSchemas]);\n return { schemas: [...byName.values()], byName };\n}\n","/**\n * Report Component Schema\n */\n\nimport { Type, Static, TSchema } from '@sinclair/typebox';\nimport { FontRegistrySchema } from '@json-to-office/shared';\nimport { ComponentDefaultsSchema } from '../component-defaults';\nimport { NoProofWordsSchema } from '../font';\nimport { ThemeOverridesSchema } from '../theme';\n\n// Create a function to generate ReportPropsSchema with recursive component reference\nexport const createReportPropsSchema = (_componentRef?: TSchema) =>\n Type.Object(\n {\n theme: Type.Optional(\n Type.String({\n description: 'Theme name to apply (default: \"minimal\")',\n examples: ['minimal', 'corporate', 'modern'],\n default: 'minimal',\n })\n ),\n themeOverrides: Type.Optional(ThemeOverridesSchema),\n fontRegistry: Type.Optional(FontRegistrySchema),\n componentDefaults: Type.Optional(ComponentDefaultsSchema),\n language: Type.Optional(\n Type.String({\n pattern: '^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$',\n description:\n 'Default document language (BCP-47 tag, e.g. \"en-US\"). Sets Word\\'s default proofing/spell-check language; individual components can override it locally.',\n examples: ['en-US', 'fr-FR', 'de-DE', 'it-IT', 'es-ES'],\n })\n ),\n noProofWords: Type.Optional(NoProofWordsSchema),\n trackRevisions: Type.Optional(\n Type.Boolean({\n description:\n 'Open the document in track-changes mode: Word marks any further edits as revisions. Set automatically on redline documents produced by the diff engine',\n })\n ),\n metadata: Type.Optional(\n Type.Object(\n {\n title: Type.Optional(\n Type.String({\n description: 'Document title',\n examples: ['Annual Report 2024', 'Technical Documentation'],\n })\n ),\n subtitle: Type.Optional(\n Type.String({\n description: 'Document subtitle',\n })\n ),\n description: Type.Optional(Type.String()),\n author: Type.Optional(Type.String()),\n company: Type.Optional(\n Type.String({\n description:\n 'Company name, written to docProps/custom.xml (Word has no core-property slot for it)',\n })\n ),\n date: Type.Optional(\n Type.String({\n description:\n 'Document date used by {DATE}/{DATETIME} placeholders (defaults to the generation timestamp)',\n })\n ),\n version: Type.Optional(\n Type.String({\n description: 'Document version, written to docProps/custom.xml',\n examples: ['1.0', '2024.3'],\n })\n ),\n tags: Type.Optional(Type.Array(Type.String())),\n },\n {\n description:\n 'Document metadata (title, author, company, version, etc.). Package timestamps (dcterms:created/modified) are not part of this object: they come from the `generatedAt` generation option so repeated builds stay byte-identical.',\n additionalProperties: false,\n }\n )\n ),\n },\n {\n description: 'Report component props',\n additionalProperties: false,\n }\n );\n\nexport const ReportPropsSchema = createReportPropsSchema();\n\nexport type ReportProps = Static<typeof ReportPropsSchema>;\n","/**\n * Text Box Component Schema\n * A floating container that can hold child components (e.g., text, image, columns)\n *\n * Positioning API mirrors existing floating options from text/image for consistency.\n *\n * **Nested Columns Support:**\n * When a `columns` component is nested inside a `text-box`, it automatically renders\n * as a multi-column table instead of a section-level column layout. This allows\n * for columnar content within floating or inline containers.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { FloatingPropertiesSchema } from './common';\nimport { HexColorSchema } from '../font';\n\nexport const TextBoxPropsSchema = Type.Object(\n {\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box width as percentage (e.g., \"50%\") relative to content width',\n }),\n ],\n {\n description:\n 'Text box width in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box height as percentage (e.g., \"50%\") relative to content height',\n }),\n ],\n {\n description:\n 'Text box height in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n floating: Type.Optional(FloatingPropertiesSchema),\n style: Type.Optional(\n Type.Object(\n {\n padding: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(Type.Number({ minimum: 0 })),\n right: Type.Optional(Type.Number({ minimum: 0 })),\n bottom: Type.Optional(Type.Number({ minimum: 0 })),\n left: Type.Optional(Type.Number({ minimum: 0 })),\n },\n { additionalProperties: false }\n )\n ),\n border: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(\n // Reuse border schema semantics: style/width/color\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n right: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n bottom: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n left: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n shading: Type.Optional(\n Type.Object(\n {\n // Same domain as every other colour prop and as the border\n // colours above: resolveColor() accepts \"#RRGGBB\" or a theme\n // colour name, and throws on anything else at render time.\n fill: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n);\n\nexport type TextBoxProps = Static<typeof TextBoxPropsSchema>;\n","/**\n * Table of Contents Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Kept for back-compat only. Word's TOC field has no numbering switch, so the\n * renderer cannot apply this and logs a warning when it is set; entries inherit\n * the numbering of the heading styles they reference.\n */\nexport const TocStyleSchema = Type.Union(\n [Type.Literal('numeric'), Type.Literal('bullet'), Type.Literal('none')],\n {\n description:\n 'TOC numbering style — accepted but not applied (Word TOC fields carry no numbering switch); setting it logs a warning during generation',\n }\n);\n\nexport const TocScopeSchema = Type.Union(\n [Type.Literal('document'), Type.Literal('section')],\n { description: 'TOC scope: document-wide or section-only' }\n);\n\nexport const TocStyleMappingSchema = Type.Object(\n {\n styleId: Type.String({\n description: 'Custom style ID matching a key in theme.styles',\n }),\n level: Type.Number({\n minimum: 1,\n maximum: 6,\n description: 'TOC level (1-6) to assign to this style',\n }),\n },\n {\n description: 'Mapping of custom style to TOC level',\n additionalProperties: false,\n }\n);\n\nexport const TocDepthRangeSchema = Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify at least one of \"from\" or \"to\".',\n additionalProperties: false,\n }\n);\n\nexport const TocPropsSchema = Type.Object(\n {\n pageBreak: Type.Optional(\n Type.Boolean({\n description: 'Insert page break before TOC block',\n })\n ),\n depth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify \"from\", \"to\", or both. Defaults: from=1, to=3',\n additionalProperties: false,\n default: { to: 3 },\n }\n )\n ),\n pageNumbersDepth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to show page numbers. Specify \"from\", \"to\", or both. When specified, page numbers are hidden for entries outside this range.',\n additionalProperties: false,\n }\n )\n ),\n numberingStyle: Type.Optional(TocStyleSchema),\n title: Type.Optional(\n Type.String({\n description: 'TOC heading title',\n })\n ),\n includePageNumbers: Type.Optional(\n Type.Boolean({\n default: true,\n description: 'Show page numbers next to entries',\n })\n ),\n numberSeparator: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'Use tab separator between entry and page number. True applies \"\\\\t\" (default), false applies \" \"',\n })\n ),\n scope: Type.Optional(\n Type.Union([TocScopeSchema, Type.Literal('auto')], {\n default: 'auto',\n description:\n 'TOC scope: \"document\" for entire document, \"section\" for parent section only, \"auto\" for automatic detection (section if inside section, otherwise document)',\n })\n ),\n styles: Type.Optional(\n Type.Array(TocStyleMappingSchema, {\n description:\n 'Custom style mappings for TOC entries. Maps custom theme styles to TOC levels.',\n })\n ),\n },\n {\n description: 'Table of Contents component props',\n additionalProperties: false,\n }\n);\n\nexport type TocProps = Static<typeof TocPropsSchema>;\n","/**\n * Highcharts Component Schema\n *\n * Standard component for rendering charts using Highcharts export server.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Highcharts component props schema\n * Accepts options that will be passed to Highcharts export server\n */\nexport const HighchartsPropsSchema = Type.Object({\n // Highcharts chart options - can be anything but must at least have chart.width and chart.height\n options: Type.Intersect([\n Type.Record(Type.String(), Type.Unknown()),\n Type.Object({\n chart: Type.Object({\n width: Type.Number(),\n height: Type.Number(),\n }),\n }),\n ]),\n // Optional scale factor for export\n scale: Type.Optional(Type.Number()),\n // Optional resources forwarded verbatim to the export server (CSS/JS/files).\n // Notably enables @font-face rules so charts render in custom fonts.\n resources: Type.Optional(\n Type.Object({\n css: Type.Optional(Type.String()),\n js: Type.Optional(Type.String()),\n files: Type.Optional(Type.Array(Type.String())),\n })\n ),\n // Optional Highcharts Export Server URL override\n serverUrl: Type.Optional(\n Type.String({\n description:\n 'Highcharts Export Server URL (default: http://localhost:7801)',\n })\n ),\n // Optional width for rendering (overrides chart width)\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image width as percentage (e.g., \"90%\") relative to content width',\n }),\n ],\n {\n description:\n 'Rendered image width in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n // Optional height for rendering (overrides chart height)\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image height as percentage (e.g., \"90%\") relative to content height',\n }),\n ],\n {\n description:\n 'Rendered image height in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n});\n\nexport type HighchartsProps = Static<typeof HighchartsPropsSchema>;\n","/**\n * Visual Component Schema\n *\n * A `visual` is a free-canvas graphic authored as a single pptx slide and\n * embedded into the document as a rasterized PNG. It unlocks absolute\n * positioning, overlapping shapes and layered art that the docx flow layout\n * cannot express — think infographics, diagrams and hero compositions.\n *\n * The pptx slide is rendered to an image by an injected rasterization service\n * (see `PptxServiceConfig` in @json-to-office/shared), exactly the way the\n * `highcharts` component offloads chart rendering to an export server. At\n * render time the component desugars to a plain `image`.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n MIN_VISUAL_DPI,\n MAX_VISUAL_DPI,\n DEFAULT_VISUAL_DPI,\n} from '@json-to-office/shared';\nimport { PptxSlideContentSchema } from '@json-to-office/shared/schemas/slide-content';\nimport {\n AlignmentSchema,\n SpacingSchema,\n FloatingPropertiesSchema,\n} from './common';\n\n/**\n * Canvas background — a solid color and/or a background image.\n * Mirrors the pptx slide background shape (kept local to avoid coupling\n * shared-docx to shared-pptx; the rasterizer forwards it verbatim).\n */\nexport const VisualCanvasBackgroundSchema = Type.Object(\n {\n color: Type.Optional(\n Type.String({\n description:\n 'Background color (hex like \"#FFFFFF\" or a theme color name)',\n })\n ),\n image: Type.Optional(\n Type.Object(\n {\n path: Type.Optional(Type.String()),\n base64: Type.Optional(Type.String()),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n);\n\n/**\n * The pptx canvas the visual is drawn on. Width/height are in inches and set\n * both the aspect ratio and the physical print size of the embedded image.\n */\nexport const VisualCanvasSchema = Type.Object(\n {\n width: Type.Number({\n minimum: 0.1,\n description: 'Canvas width in inches (pptx slideWidth)',\n }),\n height: Type.Number({\n minimum: 0.1,\n description: 'Canvas height in inches (pptx slideHeight)',\n }),\n theme: Type.Optional(\n Type.String({ description: 'pptx theme name applied to the slide' })\n ),\n background: Type.Optional(VisualCanvasBackgroundSchema),\n },\n {\n description: 'pptx canvas definition for the visual',\n additionalProperties: false,\n }\n);\n\n// A single pptx slide content element (text, image, shape, table, highcharts,\n// chart) is validated against the real PPTX slide-content union\n// (`PptxSlideContentSchema` from @json-to-office/shared/schemas/slide-content)\n// — same authoring\n// fidelity as a standalone `.pptx.json`. Used directly as the `elements` item\n// schema below.\n\nexport const VisualPropsSchema = Type.Object(\n {\n // ── canvas (drives aspect ratio + physical size) ──\n canvas: VisualCanvasSchema,\n // pptx slide content elements, absolutely positioned on the canvas\n elements: Type.Optional(\n Type.Array(PptxSlideContentSchema, {\n description:\n 'pptx slide content elements (text, image, shape, table, highcharts, chart), positioned with x/y/w/h in inches',\n })\n ),\n\n // ── rasterization ──\n dpi: Type.Optional(\n Type.Number({\n minimum: MIN_VISUAL_DPI,\n maximum: MAX_VISUAL_DPI,\n default: DEFAULT_VISUAL_DPI,\n description: `Raster resolution in DPI (default ${DEFAULT_VISUAL_DPI}, range ${MIN_VISUAL_DPI}-${MAX_VISUAL_DPI}). Higher = sharper + larger.`,\n })\n ),\n serverUrl: Type.Optional(\n Type.String({\n description:\n 'Rasterization service URL override (default from services.pptx)',\n })\n ),\n\n // ── placement in the document (mirrors `image`) ──\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({ minimum: 1, description: 'Rendered width in pixels' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Rendered width as percentage (e.g. \"90%\")',\n }),\n ],\n {\n description:\n 'Rendered width in the document, in pixels (number) or percentage string. Defaults to the canvas physical size.',\n }\n )\n ),\n height: Type.Optional(\n Type.Union([\n Type.Number({ minimum: 1, description: 'Rendered height in pixels' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Rendered height as percentage (e.g. \"90%\")',\n }),\n ])\n ),\n alignment: Type.Optional(AlignmentSchema),\n caption: Type.Optional(\n Type.String({\n description:\n 'Caption (supports rich text with **bold**, *italic*, ***both***)',\n })\n ),\n alt: Type.Optional(\n Type.String({ description: 'Alternative text for accessibility' })\n ),\n spacing: Type.Optional(SpacingSchema),\n floating: Type.Optional(FloatingPropertiesSchema),\n keepNext: Type.Optional(\n Type.Boolean({\n description: 'Keep paragraph with next paragraph on same page',\n })\n ),\n keepLines: Type.Optional(\n Type.Boolean({\n description: 'Keep all lines of paragraph together on same page',\n })\n ),\n },\n {\n description: 'Visual component props (pptx-rendered graphic)',\n additionalProperties: false,\n }\n);\n\nexport type VisualProps = Static<typeof VisualPropsSchema>;\nexport type VisualCanvas = Static<typeof VisualCanvasSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,QAAAA,aAAqB;;;ACX9B,SAAS,YAA6B;AACtC,SAAS,0BAA0B;AAM5B,IAAM,0BAA0B,CAAC,kBACtC,KAAK;AAAA,EACH;AAAA,IACE,OAAO,KAAK;AAAA,MACV,KAAK,OAAO;AAAA,QACV,aAAa;AAAA,QACb,UAAU,CAAC,WAAW,aAAa,QAAQ;AAAA,QAC3C,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,IACA,gBAAgB,KAAK,SAAS,oBAAoB;AAAA,IAClD,cAAc,KAAK,SAAS,kBAAkB;AAAA,IAC9C,mBAAmB,KAAK,SAAS,uBAAuB;AAAA,IACxD,UAAU,KAAK;AAAA,MACb,KAAK,OAAO;AAAA,QACV,SAAS;AAAA,QACT,aACE;AAAA,QACF,UAAU,CAAC,SAAS,SAAS,SAAS,SAAS,OAAO;AAAA,MACxD,CAAC;AAAA,IACH;AAAA,IACA,cAAc,KAAK,SAAS,kBAAkB;AAAA,IAC9C,gBAAgB,KAAK;AAAA,MACnB,KAAK,QAAQ;AAAA,QACX,aACE;AAAA,MACJ,CAAC;AAAA,IACH;AAAA,IACA,UAAU,KAAK;AAAA,MACb,KAAK;AAAA,QACH;AAAA,UACE,OAAO,KAAK;AAAA,YACV,KAAK,OAAO;AAAA,cACV,aAAa;AAAA,cACb,UAAU,CAAC,sBAAsB,yBAAyB;AAAA,YAC5D,CAAC;AAAA,UACH;AAAA,UACA,UAAU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B,KAAK,gBAAgB;AAAA,QAAO,CAAC,SACjD,WAAW,KAAK,CAAC,MAAM,EAAE,SAAS,IAAI;AAAA,MACxC;AACA,UAAI,CAAC,cAAc,MAAM,CAAC,MAAM,SAAS,IAAI,CAAC,CAAC,EAAG;AAGlD,YAAM,eAAe,KAAK,gBACvB,IAAI,CAAC,SAAS,SAAS,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,EACzD,OAAO,CAAC,MAAoB,MAAM,MAAS;AAE9C,YAAM,kBAAkB,CAAC,GAAG,cAAc,GAAG,aAAa;AAC1D,YAAM,eACJ,gBAAgB,WAAW,IACvB,gBAAgB,CAAC,IACjBA,MAAK,MAAM,eAAe;AAEhC,eAAS;AAAA,QACP,KAAK;AAAA,QACL,4BAA4B,MAAM,cAAc,OAAO;AAAA,MACzD;AACA,cAAQ,OAAO,GAAG,CAAC;AAAA,IACrB;AAEA,QAAI,QAAQ,WAAW,QAAQ;AAC7B,YAAM,IAAI;AAAA,QACR,mCAAmC,QAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;AAAA,MAC1E;AAAA,IACF;AAAA,EACF;AAGA,QAAM,SAAS,IAAI,IAAI,CAAC,GAAG,UAAU,GAAG,WAAW,CAAC;AACpD,SAAO,EAAE,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC,GAAG,OAAO;AACjD;","names":["Type","Type","Type","Type","Type","Type","Type","Type"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAllComponentSchemas,
|
|
3
3
|
createAllComponentSchemasNarrowed
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G5GIBBUX.js";
|
|
5
5
|
|
|
6
6
|
// src/schemas/components.ts
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
StandardComponentDefinitionSchema,
|
|
32
32
|
ComponentDefinitionSchema
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-HHF5AQ7X.js.map
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
strictDocumentValidator,
|
|
4
4
|
validateAgainstSchema,
|
|
5
5
|
validateJson
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7FNE5T7M.js";
|
|
7
7
|
import {
|
|
8
8
|
ComponentDefinitionSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HHF5AQ7X.js";
|
|
10
10
|
import {
|
|
11
11
|
CustomComponentDefinitionSchema
|
|
12
12
|
} from "./chunk-7GGTZ4TA.js";
|
|
13
13
|
import {
|
|
14
14
|
ReportPropsSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-G5GIBBUX.js";
|
|
16
16
|
import {
|
|
17
17
|
ThemeConfigSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PQITDZWT.js";
|
|
19
19
|
import {
|
|
20
20
|
ColumnsPropsSchema,
|
|
21
21
|
HeadingPropsSchema,
|
|
@@ -410,4 +410,4 @@ export {
|
|
|
410
410
|
createErrorConfig,
|
|
411
411
|
formatErrorMessage
|
|
412
412
|
};
|
|
413
|
-
//# sourceMappingURL=chunk-
|
|
413
|
+
//# sourceMappingURL=chunk-KKFRVDJH.js.map
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/schemas/theme.ts
|
|
12
12
|
import { Type } from "@sinclair/typebox";
|
|
13
|
+
import { FontRegistrySchema } from "@json-to-office/shared";
|
|
13
14
|
import { Value } from "@sinclair/typebox/value";
|
|
14
15
|
var DocumentMarginsSchema = Type.Object(
|
|
15
16
|
{
|
|
@@ -354,6 +355,7 @@ var ThemeConfigSchema = Type.Object(
|
|
|
354
355
|
{ additionalProperties: false }
|
|
355
356
|
),
|
|
356
357
|
fonts: FontsSchema,
|
|
358
|
+
fontRegistry: Type.Optional(FontRegistrySchema),
|
|
357
359
|
page: PageSchema,
|
|
358
360
|
styles: Type.Optional(StyleDefinitionsSchema),
|
|
359
361
|
componentDefaults: Type.Optional(ComponentDefaultsSchema),
|
|
@@ -439,4 +441,4 @@ export {
|
|
|
439
441
|
isValidThemeConfig,
|
|
440
442
|
createMinimalTheme
|
|
441
443
|
};
|
|
442
|
-
//# sourceMappingURL=chunk-
|
|
444
|
+
//# sourceMappingURL=chunk-PQITDZWT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/theme.ts"],"sourcesContent":["/**\n * Theme Schema Definitions using TypeBox\n * This file provides TypeBox schemas for theme configuration validation\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { FontRegistrySchema } from '@json-to-office/shared';\nimport {\n FontDefinitionSchema,\n TextFormattingPropertiesSchema,\n HexColorSchema,\n} from './font';\nimport { IndentSchema } from './components/common';\n\n// ============================================================================\n// Document Margins Schema\n// ============================================================================\n\nexport const DocumentMarginsSchema = Type.Object(\n {\n top: Type.Number({ minimum: 0 }),\n bottom: Type.Number({ minimum: 0 }),\n left: Type.Number({ minimum: 0 }),\n right: Type.Number({ minimum: 0 }),\n header: Type.Number({ minimum: 0 }),\n footer: Type.Number({ minimum: 0 }),\n gutter: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false, description: 'Document margin configuration' }\n);\n\n// ============================================================================\n// Page Dimensions Schema\n// ============================================================================\n\nexport const PageDimensionsSchema = Type.Object(\n {\n width: Type.Number({ minimum: 0 }),\n height: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false, description: 'Page dimensions in twips' }\n);\n\n// ============================================================================\n// Page Schema (replaces PageSetupSchema)\n// ============================================================================\n\nexport const PageSchema = Type.Object(\n {\n size: Type.Union(\n [\n Type.Literal('A4'),\n Type.Literal('A3'),\n Type.Literal('LETTER'),\n Type.Literal('LEGAL'),\n Type.Object(\n {\n width: Type.Number({ minimum: 0 }),\n height: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false }\n ),\n ],\n { description: 'Standard page size or custom dimensions' }\n ),\n margins: DocumentMarginsSchema,\n },\n {\n description: 'Page configuration including dimensions and margins',\n additionalProperties: false,\n }\n);\n\n// ============================================================================\n// Text formatting and font schemas now imported from './font' to avoid cycles\n\n// ============================================================================\n// Fonts Schema\n// ============================================================================\n\nexport const FontsSchema = Type.Object(\n {\n heading: FontDefinitionSchema,\n body: FontDefinitionSchema,\n mono: FontDefinitionSchema,\n light: FontDefinitionSchema,\n },\n {\n additionalProperties: false,\n description: 'Font definitions for different text types',\n }\n);\n\n// ============================================================================\n// Style Definitions Schema\n// ============================================================================\n\n// Paragraph border style support (matches docx BorderStyle)\nconst BorderStyleSchema = Type.Union(\n [\n Type.Literal('single'),\n Type.Literal('dashDotStroked'),\n Type.Literal('dashed'),\n Type.Literal('dashSmallGap'),\n Type.Literal('dotDash'),\n Type.Literal('dotDotDash'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('doubleWave'),\n Type.Literal('inset'),\n Type.Literal('nil'),\n Type.Literal('none'),\n Type.Literal('outset'),\n Type.Literal('thick'),\n Type.Literal('thickThinLargeGap'),\n Type.Literal('thickThinMediumGap'),\n Type.Literal('thickThinSmallGap'),\n Type.Literal('thinThickLargeGap'),\n Type.Literal('thinThickMediumGap'),\n Type.Literal('thinThickSmallGap'),\n Type.Literal('thinThickThinLargeGap'),\n Type.Literal('thinThickThinMediumGap'),\n Type.Literal('thinThickThinSmallGap'),\n Type.Literal('threeDEmboss'),\n Type.Literal('threeDEngrave'),\n Type.Literal('triple'),\n Type.Literal('wave'),\n ],\n { description: 'Paragraph border style' }\n);\n\n/** Shared fields so each border slot can carry its own description. */\nconst BorderDefinitionFields = {\n style: BorderStyleSchema,\n size: Type.Number({\n minimum: 0,\n description: 'Width in eighths of a point (docx sz)',\n }),\n color: HexColorSchema,\n space: Type.Optional(\n Type.Number({\n minimum: 0,\n description: 'Space between text and border in points',\n })\n ),\n};\n\nconst BorderDefinitionSchema = Type.Object(BorderDefinitionFields, {\n additionalProperties: false,\n description: 'Paragraph border side definition',\n});\n\nconst BetweenBorderSchema = Type.Object(BorderDefinitionFields, {\n additionalProperties: false,\n description:\n 'Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges',\n});\n\nconst BordersSchema = Type.Object(\n {\n top: Type.Optional(BorderDefinitionSchema),\n bottom: Type.Optional(BorderDefinitionSchema),\n left: Type.Optional(BorderDefinitionSchema),\n right: Type.Optional(BorderDefinitionSchema),\n between: Type.Optional(BetweenBorderSchema),\n },\n {\n additionalProperties: false,\n description:\n 'Paragraph borders (per side, plus the between-paragraph rule)',\n }\n);\n\n// Alignment schema for paragraph-level alignment (used in styles)\nconst AlignmentSchema = Type.Optional(\n Type.Union([\n Type.Literal('left'),\n Type.Literal('center'),\n Type.Literal('right'),\n Type.Literal('justify'),\n ])\n);\n\n/**\n * Style properties schema that extends text formatting properties\n * with additional style-specific properties (priority, baseStyle, etc.)\n */\nconst StylePropertiesSchema = Type.Object(\n {\n font: Type.Optional(\n Type.Union([\n Type.Literal('heading'),\n Type.Literal('body'),\n Type.Literal('mono'),\n Type.Literal('light'),\n ])\n ),\n ...TextFormattingPropertiesSchema.properties,\n // Paragraph-level alignment (not a font property)\n alignment: AlignmentSchema,\n // Additional properties specific to styles\n priority: Type.Optional(Type.Number()),\n baseStyle: Type.Optional(Type.String()),\n followingStyle: Type.Optional(Type.String()),\n widowControl: Type.Optional(Type.Boolean()),\n keepNext: Type.Optional(Type.Boolean()),\n keepLinesTogether: Type.Optional(Type.Boolean()),\n outlineLevel: Type.Optional(Type.Number()),\n borders: Type.Optional(BordersSchema),\n indent: Type.Optional(IndentSchema),\n },\n { additionalProperties: false }\n);\n\n// ============================================================================\n// Tab Stop Schema\n// ============================================================================\n\n/**\n * Tab stop leader types matching docx.js LeaderType\n */\nconst TabStopLeaderSchema = Type.Union(\n [\n Type.Literal('dot'),\n Type.Literal('hyphen'),\n Type.Literal('middleDot'),\n Type.Literal('none'),\n Type.Literal('underscore'),\n ],\n {\n description:\n 'Tab leader style: dot (dotted), hyphen (dashed), middleDot, none (blank), or underscore',\n }\n);\n\n/**\n * Tab stop type matching docx.js TabStopType\n */\nconst TabStopTypeSchema = Type.Union(\n [\n Type.Literal('left'),\n Type.Literal('right'),\n Type.Literal('center'),\n Type.Literal('bar'),\n Type.Literal('clear'),\n Type.Literal('decimal'),\n Type.Literal('end'),\n Type.Literal('num'),\n Type.Literal('start'),\n ],\n {\n description: 'Tab stop alignment type',\n }\n);\n\n/**\n * Tab stop definition schema\n */\nconst TabStopDefinitionSchema = Type.Object(\n {\n type: TabStopTypeSchema,\n position: Type.Union([\n Type.Number({\n description:\n 'Tab stop position in twips (1/1440 inch). Common: 9026 for right-aligned at page margin',\n }),\n Type.Literal('max', {\n description: 'Use maximum position (TabStopPosition.MAX = 9026 twips)',\n }),\n ]),\n leader: Type.Optional(TabStopLeaderSchema),\n },\n {\n description:\n 'Tab stop configuration with position, alignment, and optional leader',\n additionalProperties: false,\n }\n);\n\n/**\n * TOC style properties schema that extends text formatting properties\n * but EXCLUDES baseStyle to prevent unwanted coupling with Heading styles\n */\nconst TocStylePropertiesSchema = Type.Object(\n {\n font: Type.Optional(\n Type.Union([\n Type.Literal('heading'),\n Type.Literal('body'),\n Type.Literal('mono'),\n Type.Literal('light'),\n ])\n ),\n ...TextFormattingPropertiesSchema.properties,\n // Paragraph-level alignment (not a font property)\n alignment: AlignmentSchema,\n // Tab stops for controlling TOC entry formatting (leader dots, alignment, etc.)\n tabStops: Type.Optional(\n Type.Array(TabStopDefinitionSchema, {\n description:\n 'Tab stops for TOC entries. Use right-aligned tab with leader to create dotted lines to page numbers.',\n default: [{ type: 'right', position: 'max', leader: 'none' }],\n })\n ),\n // Additional properties specific to styles (baseStyle intentionally excluded)\n priority: Type.Optional(Type.Number()),\n followingStyle: Type.Optional(Type.String()),\n widowControl: Type.Optional(Type.Boolean()),\n keepNext: Type.Optional(Type.Boolean()),\n keepLinesTogether: Type.Optional(Type.Boolean()),\n outlineLevel: Type.Optional(Type.Number()),\n borders: Type.Optional(BordersSchema),\n indent: Type.Optional(IndentSchema),\n },\n { additionalProperties: false }\n);\n\nexport const StyleDefinitionsSchema = Type.Object(\n {\n normal: Type.Optional(StylePropertiesSchema),\n heading1: Type.Optional(StylePropertiesSchema),\n heading2: Type.Optional(StylePropertiesSchema),\n heading3: Type.Optional(StylePropertiesSchema),\n heading4: Type.Optional(StylePropertiesSchema),\n heading5: Type.Optional(StylePropertiesSchema),\n heading6: Type.Optional(StylePropertiesSchema),\n title: Type.Optional(StylePropertiesSchema),\n subtitle: Type.Optional(StylePropertiesSchema),\n // TOC entry styles (used by Word to format TOC entries)\n // Note: TOC styles use TocStylePropertiesSchema which excludes baseStyle to prevent coupling with Headings\n TOC1: Type.Optional(TocStylePropertiesSchema),\n TOC2: Type.Optional(TocStylePropertiesSchema),\n TOC3: Type.Optional(TocStylePropertiesSchema),\n TOC4: Type.Optional(TocStylePropertiesSchema),\n TOC5: Type.Optional(TocStylePropertiesSchema),\n TOC6: Type.Optional(TocStylePropertiesSchema),\n },\n {\n additionalProperties: StylePropertiesSchema,\n description:\n 'Style definitions supporting predefined styles (normal, heading1..6, title, subtitle), TOC entry styles (TOC1..TOC6), and arbitrary custom styles.',\n }\n);\n\n// ============================================================================\n// Heading Definition Schema\n// ============================================================================\n\n/**\n * Heading definition schema that uses the same properties as StylePropertiesSchema\n * but adds a required 'level' field.\n */\nexport const HeadingDefinitionSchema = Type.Object(\n {\n level: Type.Union([\n Type.Literal(1),\n Type.Literal(2),\n Type.Literal(3),\n Type.Literal(4),\n Type.Literal(5),\n Type.Literal(6),\n ]),\n ...StylePropertiesSchema.properties,\n },\n { additionalProperties: false }\n);\n\n// ============================================================================\n// Component Defaults Schemas (imported from component-defaults.ts to avoid\n// circular deps: report.ts needs ComponentDefaultsSchema, but the old location\n// here imported from the components barrel which re-exports report.ts)\n// ============================================================================\n\nimport { ComponentDefaultsSchema } from './component-defaults';\n\nexport {\n HeadingComponentDefaultsSchema,\n ParagraphComponentDefaultsSchema,\n ImageComponentDefaultsSchema,\n StatisticComponentDefaultsSchema,\n TableComponentDefaultsSchema,\n SectionComponentDefaultsSchema,\n ColumnsComponentDefaultsSchema,\n ListComponentDefaultsSchema,\n ComponentDefaultsSchema,\n} from './component-defaults';\n\n// ============================================================================\n// Theme Config Schema\n// ============================================================================\n\nexport const ThemeColorsSchema = Type.Object(\n {\n primary: HexColorSchema,\n secondary: HexColorSchema,\n accent: HexColorSchema,\n text: HexColorSchema,\n background: HexColorSchema,\n border: HexColorSchema,\n // Additional semantic color names\n textPrimary: HexColorSchema,\n textSecondary: HexColorSchema,\n textMuted: HexColorSchema,\n borderPrimary: HexColorSchema,\n borderSecondary: HexColorSchema,\n backgroundPrimary: HexColorSchema,\n backgroundSecondary: HexColorSchema,\n // Extra chart-series slots, named to match the PPTX theme so both\n // formats share one palette vocabulary. Optional: the bundled DOCX\n // themes leave them unset and charts skip the empty slots.\n accent4: Type.Optional(HexColorSchema),\n accent5: Type.Optional(HexColorSchema),\n accent6: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n);\n\nexport const ThemeOverridesSchema = Type.Object(\n {\n colors: Type.Optional(Type.Partial(ThemeColorsSchema)),\n fonts: Type.Optional(Type.Partial(FontsSchema)),\n styles: Type.Optional(StyleDefinitionsSchema),\n },\n {\n additionalProperties: false,\n description:\n 'Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document.',\n }\n);\n\nexport const ThemeConfigSchema = Type.Object(\n {\n $schema: Type.Optional(Type.String()),\n name: Type.String(),\n displayName: Type.String(),\n description: Type.String(),\n version: Type.String(),\n colors: Type.Object(\n {\n primary: HexColorSchema,\n secondary: HexColorSchema,\n accent: HexColorSchema,\n text: HexColorSchema,\n background: HexColorSchema,\n border: HexColorSchema,\n // Additional semantic color names\n textPrimary: HexColorSchema,\n textSecondary: HexColorSchema,\n textMuted: HexColorSchema,\n borderPrimary: HexColorSchema,\n borderSecondary: HexColorSchema,\n backgroundPrimary: HexColorSchema,\n backgroundSecondary: HexColorSchema,\n // Extra chart-series slots, named to match the PPTX theme so both\n // formats share one palette vocabulary. Optional: the bundled DOCX\n // themes leave them unset and charts skip the empty slots.\n accent4: Type.Optional(HexColorSchema),\n accent5: Type.Optional(HexColorSchema),\n accent6: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n ),\n fonts: FontsSchema,\n fontRegistry: Type.Optional(FontRegistrySchema),\n page: PageSchema,\n styles: Type.Optional(StyleDefinitionsSchema),\n componentDefaults: Type.Optional(ComponentDefaultsSchema),\n // House-style \"known words\" allowlist (whole-word, case-insensitive) that\n // should never be flagged as misspelled. The document's `noProofWords` is\n // merged on top of this at render time.\n noProofWords: Type.Optional(\n Type.Array(Type.String({ minLength: 1 }), {\n description:\n 'Words that should never be flagged as misspelled (whole-word, case-insensitive).',\n })\n ),\n },\n {\n additionalProperties: false,\n description: 'Theme configuration',\n }\n);\n\n// ============================================================================\n// TypeScript Types\n// ============================================================================\n\nexport type ThemeConfigJson = Static<typeof ThemeConfigSchema>;\nexport type DocumentMargins = Static<typeof DocumentMarginsSchema>;\nexport type PageDimensions = Static<typeof PageDimensionsSchema>;\nexport type Page = Static<typeof PageSchema>;\nexport type FontDefinition = Static<typeof FontDefinitionSchema>;\nexport type Fonts = Static<typeof FontsSchema>;\nexport type StyleDefinitions = Static<typeof StyleDefinitionsSchema>;\nexport type HeadingDefinition = Static<typeof HeadingDefinitionSchema>;\nexport type {\n HeadingComponentDefaults,\n ParagraphComponentDefaults,\n ImageComponentDefaults,\n StatisticComponentDefaults,\n TableComponentDefaults,\n SectionComponentDefaults,\n ColumnsComponentDefaults,\n ListComponentDefaults,\n ComponentDefaults,\n} from './component-defaults';\n\n// ============================================================================\n// Validation Function\n// ============================================================================\n\nimport { Value } from '@sinclair/typebox/value';\n\nexport function isValidThemeConfig(data: unknown): data is ThemeConfigJson {\n return Value.Check(ThemeConfigSchema, data);\n}\n\n// ============================================================================\n// Minimal Theme Scaffold\n// ============================================================================\n\n/**\n * Build a schema-complete theme to start from.\n *\n * Lives next to `ThemeConfigSchema` on purpose: the return type is the schema's\n * `Static` type, so a required property added to the schema breaks the build\n * here instead of shipping a scaffold that only fails at validation time.\n * Colour patterns are runtime-only, so `theme-scaffold.test.ts` validates the\n * result against the schema as well.\n *\n * Browser-safe (no Node built-ins), so the playground can scaffold new themes\n * from the same source as the CLI.\n *\n * @param name - Theme identifier; defaults to `minimal-theme`\n */\nexport function createMinimalTheme(\n name: string = 'minimal-theme'\n): ThemeConfigJson {\n return {\n name,\n displayName:\n name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ') || name,\n description: 'A minimal theme with basic styling',\n version: '1.0.0',\n colors: {\n primary: '#2563EB',\n secondary: '#64748B',\n accent: '#F8FAFC',\n text: '#334155',\n background: '#FFFFFF',\n border: '#E2E8F0',\n textPrimary: '#334155',\n textSecondary: '#64748B',\n textMuted: '#94A3B8',\n borderPrimary: '#CBD5E1',\n borderSecondary: '#E2E8F0',\n backgroundPrimary: '#FFFFFF',\n backgroundSecondary: '#F8FAFC',\n },\n fonts: {\n heading: { family: 'Arial', size: 14 },\n body: { family: 'Arial', size: 11 },\n mono: { family: 'Courier New', size: 10 },\n light: { family: 'Arial', size: 10 },\n },\n page: {\n size: 'A4',\n margins: {\n top: 1440,\n bottom: 1440,\n left: 1440,\n right: 1440,\n header: 720,\n footer: 720,\n gutter: 0,\n },\n },\n styles: {\n normal: {\n font: 'body',\n size: 11,\n color: '#334155',\n alignment: 'left',\n lineSpacing: { type: 'multiple', value: 1.15 },\n spacing: { after: 8 },\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAS,YAAoB;AAC7B,SAAS,0BAA0B;AAyfnC,SAAS,aAAa;AA7ef,IAAM,wBAAwB,KAAK;AAAA,EACxC;AAAA,IACE,KAAK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AAE,MAAM,YAAY,OAAO,KAAK;AAAA,QAC7C,SAAS,EAAE,OAAO,EAAE;AAAA,MACtB;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentDefinitionSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HHF5AQ7X.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-
|
|
34
|
+
//# sourceMappingURL=chunk-UKOAOVPP.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -298,6 +298,16 @@ type DataTransformer<T = any> = (data: any) => T;
|
|
|
298
298
|
declare const COMPONENT_SCHEMA_MAP: {
|
|
299
299
|
readonly report: _sinclair_typebox.TObject<{
|
|
300
300
|
theme: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
301
|
+
/**
|
|
302
|
+
* Core validation engine
|
|
303
|
+
* @module validation/core/validator
|
|
304
|
+
* @description
|
|
305
|
+
* Main validation utilities using TypeBox for runtime validation.
|
|
306
|
+
* Provides comprehensive validation with error handling and data transformation.
|
|
307
|
+
*/
|
|
308
|
+
/**
|
|
309
|
+
* Component name to schema mapping
|
|
310
|
+
*/
|
|
301
311
|
themeOverrides: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
302
312
|
colors: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
303
313
|
primary: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -1424,6 +1434,41 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
1424
1434
|
}>>;
|
|
1425
1435
|
}>>;
|
|
1426
1436
|
}>>;
|
|
1437
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
1438
|
+
id: _sinclair_typebox.TString;
|
|
1439
|
+
family: _sinclair_typebox.TString;
|
|
1440
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
1441
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
1442
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
1443
|
+
family: _sinclair_typebox.TString;
|
|
1444
|
+
}>, _sinclair_typebox.TObject<{
|
|
1445
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
1446
|
+
family: _sinclair_typebox.TString;
|
|
1447
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
1448
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1449
|
+
}>, _sinclair_typebox.TObject<{
|
|
1450
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
1451
|
+
path: _sinclair_typebox.TString;
|
|
1452
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1453
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1454
|
+
}>, _sinclair_typebox.TObject<{
|
|
1455
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
1456
|
+
data: _sinclair_typebox.TString;
|
|
1457
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1458
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1459
|
+
}>, _sinclair_typebox.TObject<{
|
|
1460
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
1461
|
+
url: _sinclair_typebox.TString;
|
|
1462
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1463
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1464
|
+
}>, _sinclair_typebox.TObject<{
|
|
1465
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
1466
|
+
url: _sinclair_typebox.TString;
|
|
1467
|
+
weight: _sinclair_typebox.TNumber;
|
|
1468
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1469
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
1470
|
+
}>]>>;
|
|
1471
|
+
}>>>;
|
|
1427
1472
|
componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1428
1473
|
heading: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1429
1474
|
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateUnifiedDocumentSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EKBKTVLD.js";
|
|
4
4
|
import {
|
|
5
5
|
ERROR_TEMPLATES,
|
|
6
6
|
componentValidator,
|
|
@@ -31,17 +31,17 @@ import {
|
|
|
31
31
|
validateTheme,
|
|
32
32
|
validateThemeJson,
|
|
33
33
|
validateThemeWithEnhancement
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KKFRVDJH.js";
|
|
35
35
|
import {
|
|
36
36
|
GenerateDocumentRequestSchema,
|
|
37
37
|
GenerateDocumentResponseSchema,
|
|
38
38
|
ValidateDocumentRequestSchema,
|
|
39
39
|
ValidateDocumentResponseSchema
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-4FOTCEYP.js";
|
|
41
41
|
import {
|
|
42
42
|
JSON_SCHEMA_URLS,
|
|
43
43
|
JsonComponentDefinitionSchema
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UKOAOVPP.js";
|
|
45
45
|
import {
|
|
46
46
|
collectIndentConflicts,
|
|
47
47
|
collectNoteRevisionConflicts,
|
|
@@ -65,11 +65,11 @@ import {
|
|
|
65
65
|
validateJsonComponent,
|
|
66
66
|
validateJsonDocument,
|
|
67
67
|
validateWithEnhancement
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7FNE5T7M.js";
|
|
69
69
|
import {
|
|
70
70
|
ComponentDefinitionSchema,
|
|
71
71
|
StandardComponentDefinitionSchema
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-HHF5AQ7X.js";
|
|
73
73
|
import {
|
|
74
74
|
CustomComponentDefinitionSchema,
|
|
75
75
|
TextSpaceAfterComponentSchema,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
createComponentSchema,
|
|
84
84
|
exportSchemaToFile,
|
|
85
85
|
fixSchemaReferences
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-4ORMKPLQ.js";
|
|
87
87
|
import {
|
|
88
88
|
HighchartsPropsSchema,
|
|
89
89
|
ReportPropsSchema,
|
|
@@ -95,12 +95,12 @@ import {
|
|
|
95
95
|
VisualPropsSchema,
|
|
96
96
|
getAllStandardComponentNames,
|
|
97
97
|
getStandardComponent
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-G5GIBBUX.js";
|
|
99
99
|
import {
|
|
100
100
|
ThemeConfigSchema,
|
|
101
101
|
createMinimalTheme,
|
|
102
102
|
isValidThemeConfig
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-PQITDZWT.js";
|
|
104
104
|
import {
|
|
105
105
|
AlignmentSchema,
|
|
106
106
|
BaseComponentPropsSchema,
|
package/dist/schemas/api.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
GenerateDocumentResponseSchema,
|
|
4
4
|
ValidateDocumentRequestSchema,
|
|
5
5
|
ValidateDocumentResponseSchema
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-4FOTCEYP.js";
|
|
7
|
+
import "../chunk-HHF5AQ7X.js";
|
|
8
|
+
import "../chunk-G5GIBBUX.js";
|
|
9
|
+
import "../chunk-PQITDZWT.js";
|
|
10
10
|
import "../chunk-436TK3T4.js";
|
|
11
11
|
import "../chunk-7TTAAYQ5.js";
|
|
12
12
|
export {
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
getContentComponents,
|
|
10
10
|
getStandardComponent,
|
|
11
11
|
isStandardComponent
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-G5GIBBUX.js";
|
|
13
|
+
import "../chunk-PQITDZWT.js";
|
|
14
14
|
import "../chunk-436TK3T4.js";
|
|
15
15
|
import "../chunk-7TTAAYQ5.js";
|
|
16
16
|
export {
|
|
@@ -1313,6 +1313,41 @@ declare const createReportPropsSchema: (_componentRef?: TSchema) => _sinclair_ty
|
|
|
1313
1313
|
}>>;
|
|
1314
1314
|
}>>;
|
|
1315
1315
|
}>>;
|
|
1316
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
1317
|
+
id: _sinclair_typebox.TString;
|
|
1318
|
+
family: _sinclair_typebox.TString;
|
|
1319
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
1320
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
1321
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
1322
|
+
family: _sinclair_typebox.TString;
|
|
1323
|
+
}>, _sinclair_typebox.TObject<{
|
|
1324
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
1325
|
+
family: _sinclair_typebox.TString;
|
|
1326
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
1327
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1328
|
+
}>, _sinclair_typebox.TObject<{
|
|
1329
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
1330
|
+
path: _sinclair_typebox.TString;
|
|
1331
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1332
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1333
|
+
}>, _sinclair_typebox.TObject<{
|
|
1334
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
1335
|
+
data: _sinclair_typebox.TString;
|
|
1336
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1337
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1338
|
+
}>, _sinclair_typebox.TObject<{
|
|
1339
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
1340
|
+
url: _sinclair_typebox.TString;
|
|
1341
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1342
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1343
|
+
}>, _sinclair_typebox.TObject<{
|
|
1344
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
1345
|
+
url: _sinclair_typebox.TString;
|
|
1346
|
+
weight: _sinclair_typebox.TNumber;
|
|
1347
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1348
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
1349
|
+
}>]>>;
|
|
1350
|
+
}>>>;
|
|
1316
1351
|
componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1317
1352
|
heading: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1318
1353
|
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -2718,6 +2753,41 @@ declare const ReportPropsSchema: _sinclair_typebox.TObject<{
|
|
|
2718
2753
|
}>>;
|
|
2719
2754
|
}>>;
|
|
2720
2755
|
}>>;
|
|
2756
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
2757
|
+
id: _sinclair_typebox.TString;
|
|
2758
|
+
family: _sinclair_typebox.TString;
|
|
2759
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
2760
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
2761
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
2762
|
+
family: _sinclair_typebox.TString;
|
|
2763
|
+
}>, _sinclair_typebox.TObject<{
|
|
2764
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
2765
|
+
family: _sinclair_typebox.TString;
|
|
2766
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
2767
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2768
|
+
}>, _sinclair_typebox.TObject<{
|
|
2769
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
2770
|
+
path: _sinclair_typebox.TString;
|
|
2771
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2772
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2773
|
+
}>, _sinclair_typebox.TObject<{
|
|
2774
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
2775
|
+
data: _sinclair_typebox.TString;
|
|
2776
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2777
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2778
|
+
}>, _sinclair_typebox.TObject<{
|
|
2779
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
2780
|
+
url: _sinclair_typebox.TString;
|
|
2781
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2782
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2783
|
+
}>, _sinclair_typebox.TObject<{
|
|
2784
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
2785
|
+
url: _sinclair_typebox.TString;
|
|
2786
|
+
weight: _sinclair_typebox.TNumber;
|
|
2787
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2788
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
2789
|
+
}>]>>;
|
|
2790
|
+
}>>>;
|
|
2721
2791
|
componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
2722
2792
|
heading: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
2723
2793
|
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -3578,6 +3648,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3578
3648
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3579
3649
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3580
3650
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3651
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3581
3652
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3582
3653
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
3583
3654
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -3643,6 +3714,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3643
3714
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3644
3715
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3645
3716
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3717
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3646
3718
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
3647
3719
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3648
3720
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -3651,6 +3723,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3651
3723
|
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
3652
3724
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3653
3725
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3726
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3654
3727
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3655
3728
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3656
3729
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -3658,6 +3731,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3658
3731
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3659
3732
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3660
3733
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3734
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3661
3735
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3662
3736
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
3663
3737
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -3671,6 +3745,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3671
3745
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3672
3746
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3673
3747
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3748
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3674
3749
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3675
3750
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3676
3751
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -3693,6 +3768,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3693
3768
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3694
3769
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3695
3770
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3771
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
3696
3772
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3697
3773
|
dataLabelPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"bestFit">, _sinclair_typebox.TLiteral<"ctr">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"inEnd">, _sinclair_typebox.TLiteral<"outEnd">]>>;
|
|
3698
3774
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentDefinitionSchema,
|
|
3
3
|
StandardComponentDefinitionSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-HHF5AQ7X.js";
|
|
5
5
|
import {
|
|
6
6
|
HighchartsPropsSchema,
|
|
7
7
|
ReportPropsSchema,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
VisualCanvasSchema,
|
|
16
16
|
VisualPropsSchema,
|
|
17
17
|
createReportPropsSchema
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-G5GIBBUX.js";
|
|
19
|
+
import "../chunk-PQITDZWT.js";
|
|
20
20
|
import {
|
|
21
21
|
AlignmentSchema,
|
|
22
22
|
BaseComponentFields,
|
package/dist/schemas/document.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JSON_SCHEMA_URLS,
|
|
3
3
|
JsonComponentDefinitionSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UKOAOVPP.js";
|
|
5
5
|
import {
|
|
6
6
|
validateDocumentWithSchema,
|
|
7
7
|
validateJsonComponent
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-7FNE5T7M.js";
|
|
9
|
+
import "../chunk-HHF5AQ7X.js";
|
|
10
10
|
import "../chunk-7GGTZ4TA.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-G5GIBBUX.js";
|
|
12
|
+
import "../chunk-PQITDZWT.js";
|
|
13
13
|
import "../chunk-436TK3T4.js";
|
|
14
14
|
import "../chunk-7TTAAYQ5.js";
|
|
15
15
|
export {
|
package/dist/schemas/export.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
createComponentSchema,
|
|
7
7
|
exportSchemaToFile,
|
|
8
8
|
fixSchemaReferences
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-4ORMKPLQ.js";
|
|
10
|
+
import "../chunk-G5GIBBUX.js";
|
|
11
|
+
import "../chunk-PQITDZWT.js";
|
|
12
12
|
import "../chunk-436TK3T4.js";
|
|
13
13
|
import "../chunk-7TTAAYQ5.js";
|
|
14
14
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateUnifiedDocumentSchema
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-EKBKTVLD.js";
|
|
4
|
+
import "../chunk-G5GIBBUX.js";
|
|
5
|
+
import "../chunk-PQITDZWT.js";
|
|
6
6
|
import "../chunk-436TK3T4.js";
|
|
7
7
|
import "../chunk-7TTAAYQ5.js";
|
|
8
8
|
export {
|
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -2467,6 +2467,41 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
|
|
|
2467
2467
|
family: _sinclair_typebox.TString;
|
|
2468
2468
|
}>;
|
|
2469
2469
|
}>;
|
|
2470
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
2471
|
+
id: _sinclair_typebox.TString;
|
|
2472
|
+
family: _sinclair_typebox.TString;
|
|
2473
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
2474
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
2475
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
2476
|
+
family: _sinclair_typebox.TString;
|
|
2477
|
+
}>, _sinclair_typebox.TObject<{
|
|
2478
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
2479
|
+
family: _sinclair_typebox.TString;
|
|
2480
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
2481
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2482
|
+
}>, _sinclair_typebox.TObject<{
|
|
2483
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
2484
|
+
path: _sinclair_typebox.TString;
|
|
2485
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2486
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2487
|
+
}>, _sinclair_typebox.TObject<{
|
|
2488
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
2489
|
+
data: _sinclair_typebox.TString;
|
|
2490
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2491
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2492
|
+
}>, _sinclair_typebox.TObject<{
|
|
2493
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
2494
|
+
url: _sinclair_typebox.TString;
|
|
2495
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
2496
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2497
|
+
}>, _sinclair_typebox.TObject<{
|
|
2498
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
2499
|
+
url: _sinclair_typebox.TString;
|
|
2500
|
+
weight: _sinclair_typebox.TNumber;
|
|
2501
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
2502
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
2503
|
+
}>]>>;
|
|
2504
|
+
}>>>;
|
|
2470
2505
|
page: _sinclair_typebox.TObject<{
|
|
2471
2506
|
size: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"A4">, _sinclair_typebox.TLiteral<"A3">, _sinclair_typebox.TLiteral<"LETTER">, _sinclair_typebox.TLiteral<"LEGAL">, _sinclair_typebox.TObject<{
|
|
2472
2507
|
width: _sinclair_typebox.TNumber;
|
|
@@ -3635,6 +3670,9 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
|
|
|
3635
3670
|
floating: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3636
3671
|
horizontalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3637
3672
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"character">, _sinclair_typebox.TLiteral<"column">, _sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
3673
|
+
/**
|
|
3674
|
+
* Tab stop definition schema
|
|
3675
|
+
*/
|
|
3638
3676
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
3639
3677
|
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3640
3678
|
}>>;
|
package/dist/schemas/theme.js
CHANGED
|
@@ -1238,6 +1238,41 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
1238
1238
|
}>>;
|
|
1239
1239
|
}>>;
|
|
1240
1240
|
}>>;
|
|
1241
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
1242
|
+
id: _sinclair_typebox.TString;
|
|
1243
|
+
family: _sinclair_typebox.TString;
|
|
1244
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
1245
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
1246
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
1247
|
+
family: _sinclair_typebox.TString;
|
|
1248
|
+
}>, _sinclair_typebox.TObject<{
|
|
1249
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
1250
|
+
family: _sinclair_typebox.TString;
|
|
1251
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
1252
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1253
|
+
}>, _sinclair_typebox.TObject<{
|
|
1254
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
1255
|
+
path: _sinclair_typebox.TString;
|
|
1256
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1257
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1258
|
+
}>, _sinclair_typebox.TObject<{
|
|
1259
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
1260
|
+
data: _sinclair_typebox.TString;
|
|
1261
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1262
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1263
|
+
}>, _sinclair_typebox.TObject<{
|
|
1264
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
1265
|
+
url: _sinclair_typebox.TString;
|
|
1266
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1267
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1268
|
+
}>, _sinclair_typebox.TObject<{
|
|
1269
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
1270
|
+
url: _sinclair_typebox.TString;
|
|
1271
|
+
weight: _sinclair_typebox.TNumber;
|
|
1272
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1273
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
1274
|
+
}>]>>;
|
|
1275
|
+
}>>>;
|
|
1241
1276
|
componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1242
1277
|
heading: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1243
1278
|
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -1515,6 +1550,10 @@ declare const COMPONENT_SCHEMA_MAP: {
|
|
|
1515
1550
|
company: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1516
1551
|
date: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1517
1552
|
version: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1553
|
+
/**
|
|
1554
|
+
* Validate a custom component configuration with a custom schema.
|
|
1555
|
+
* Delegates to @json-to-office/shared/plugin to avoid duplication.
|
|
1556
|
+
*/
|
|
1518
1557
|
tags: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
1519
1558
|
}>>;
|
|
1520
1559
|
}>;
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
validateTheme,
|
|
48
48
|
validateThemeJson,
|
|
49
49
|
validateThemeWithEnhancement
|
|
50
|
-
} from "../../chunk-
|
|
50
|
+
} from "../../chunk-KKFRVDJH.js";
|
|
51
51
|
import {
|
|
52
52
|
collectIndentConflicts,
|
|
53
53
|
collectNoteRevisionConflicts,
|
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
validateJsonComponent,
|
|
72
72
|
validateJsonDocument,
|
|
73
73
|
validateWithEnhancement
|
|
74
|
-
} from "../../chunk-
|
|
75
|
-
import "../../chunk-
|
|
74
|
+
} from "../../chunk-7FNE5T7M.js";
|
|
75
|
+
import "../../chunk-HHF5AQ7X.js";
|
|
76
76
|
import "../../chunk-7GGTZ4TA.js";
|
|
77
|
-
import "../../chunk-
|
|
78
|
-
import "../../chunk-
|
|
77
|
+
import "../../chunk-G5GIBBUX.js";
|
|
78
|
+
import "../../chunk-PQITDZWT.js";
|
|
79
79
|
import "../../chunk-436TK3T4.js";
|
|
80
80
|
import "../../chunk-7TTAAYQ5.js";
|
|
81
81
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-to-office/shared-docx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "DOCX-specific schemas, component registry and validation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@sinclair/typebox": "0.34.38",
|
|
32
32
|
"docx": "9.7.1",
|
|
33
|
-
"@json-to-office/shared": "^0.
|
|
33
|
+
"@json-to-office/shared": "^0.35.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "20.11.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/theme.ts"],"sourcesContent":["/**\n * Theme Schema Definitions using TypeBox\n * This file provides TypeBox schemas for theme configuration validation\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n FontDefinitionSchema,\n TextFormattingPropertiesSchema,\n HexColorSchema,\n} from './font';\nimport { IndentSchema } from './components/common';\n\n// ============================================================================\n// Document Margins Schema\n// ============================================================================\n\nexport const DocumentMarginsSchema = Type.Object(\n {\n top: Type.Number({ minimum: 0 }),\n bottom: Type.Number({ minimum: 0 }),\n left: Type.Number({ minimum: 0 }),\n right: Type.Number({ minimum: 0 }),\n header: Type.Number({ minimum: 0 }),\n footer: Type.Number({ minimum: 0 }),\n gutter: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false, description: 'Document margin configuration' }\n);\n\n// ============================================================================\n// Page Dimensions Schema\n// ============================================================================\n\nexport const PageDimensionsSchema = Type.Object(\n {\n width: Type.Number({ minimum: 0 }),\n height: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false, description: 'Page dimensions in twips' }\n);\n\n// ============================================================================\n// Page Schema (replaces PageSetupSchema)\n// ============================================================================\n\nexport const PageSchema = Type.Object(\n {\n size: Type.Union(\n [\n Type.Literal('A4'),\n Type.Literal('A3'),\n Type.Literal('LETTER'),\n Type.Literal('LEGAL'),\n Type.Object(\n {\n width: Type.Number({ minimum: 0 }),\n height: Type.Number({ minimum: 0 }),\n },\n { additionalProperties: false }\n ),\n ],\n { description: 'Standard page size or custom dimensions' }\n ),\n margins: DocumentMarginsSchema,\n },\n {\n description: 'Page configuration including dimensions and margins',\n additionalProperties: false,\n }\n);\n\n// ============================================================================\n// Text formatting and font schemas now imported from './font' to avoid cycles\n\n// ============================================================================\n// Fonts Schema\n// ============================================================================\n\nexport const FontsSchema = Type.Object(\n {\n heading: FontDefinitionSchema,\n body: FontDefinitionSchema,\n mono: FontDefinitionSchema,\n light: FontDefinitionSchema,\n },\n {\n additionalProperties: false,\n description: 'Font definitions for different text types',\n }\n);\n\n// ============================================================================\n// Style Definitions Schema\n// ============================================================================\n\n// Paragraph border style support (matches docx BorderStyle)\nconst BorderStyleSchema = Type.Union(\n [\n Type.Literal('single'),\n Type.Literal('dashDotStroked'),\n Type.Literal('dashed'),\n Type.Literal('dashSmallGap'),\n Type.Literal('dotDash'),\n Type.Literal('dotDotDash'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('doubleWave'),\n Type.Literal('inset'),\n Type.Literal('nil'),\n Type.Literal('none'),\n Type.Literal('outset'),\n Type.Literal('thick'),\n Type.Literal('thickThinLargeGap'),\n Type.Literal('thickThinMediumGap'),\n Type.Literal('thickThinSmallGap'),\n Type.Literal('thinThickLargeGap'),\n Type.Literal('thinThickMediumGap'),\n Type.Literal('thinThickSmallGap'),\n Type.Literal('thinThickThinLargeGap'),\n Type.Literal('thinThickThinMediumGap'),\n Type.Literal('thinThickThinSmallGap'),\n Type.Literal('threeDEmboss'),\n Type.Literal('threeDEngrave'),\n Type.Literal('triple'),\n Type.Literal('wave'),\n ],\n { description: 'Paragraph border style' }\n);\n\n/** Shared fields so each border slot can carry its own description. */\nconst BorderDefinitionFields = {\n style: BorderStyleSchema,\n size: Type.Number({\n minimum: 0,\n description: 'Width in eighths of a point (docx sz)',\n }),\n color: HexColorSchema,\n space: Type.Optional(\n Type.Number({\n minimum: 0,\n description: 'Space between text and border in points',\n })\n ),\n};\n\nconst BorderDefinitionSchema = Type.Object(BorderDefinitionFields, {\n additionalProperties: false,\n description: 'Paragraph border side definition',\n});\n\nconst BetweenBorderSchema = Type.Object(BorderDefinitionFields, {\n additionalProperties: false,\n description:\n 'Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges',\n});\n\nconst BordersSchema = Type.Object(\n {\n top: Type.Optional(BorderDefinitionSchema),\n bottom: Type.Optional(BorderDefinitionSchema),\n left: Type.Optional(BorderDefinitionSchema),\n right: Type.Optional(BorderDefinitionSchema),\n between: Type.Optional(BetweenBorderSchema),\n },\n {\n additionalProperties: false,\n description:\n 'Paragraph borders (per side, plus the between-paragraph rule)',\n }\n);\n\n// Alignment schema for paragraph-level alignment (used in styles)\nconst AlignmentSchema = Type.Optional(\n Type.Union([\n Type.Literal('left'),\n Type.Literal('center'),\n Type.Literal('right'),\n Type.Literal('justify'),\n ])\n);\n\n/**\n * Style properties schema that extends text formatting properties\n * with additional style-specific properties (priority, baseStyle, etc.)\n */\nconst StylePropertiesSchema = Type.Object(\n {\n font: Type.Optional(\n Type.Union([\n Type.Literal('heading'),\n Type.Literal('body'),\n Type.Literal('mono'),\n Type.Literal('light'),\n ])\n ),\n ...TextFormattingPropertiesSchema.properties,\n // Paragraph-level alignment (not a font property)\n alignment: AlignmentSchema,\n // Additional properties specific to styles\n priority: Type.Optional(Type.Number()),\n baseStyle: Type.Optional(Type.String()),\n followingStyle: Type.Optional(Type.String()),\n widowControl: Type.Optional(Type.Boolean()),\n keepNext: Type.Optional(Type.Boolean()),\n keepLinesTogether: Type.Optional(Type.Boolean()),\n outlineLevel: Type.Optional(Type.Number()),\n borders: Type.Optional(BordersSchema),\n indent: Type.Optional(IndentSchema),\n },\n { additionalProperties: false }\n);\n\n// ============================================================================\n// Tab Stop Schema\n// ============================================================================\n\n/**\n * Tab stop leader types matching docx.js LeaderType\n */\nconst TabStopLeaderSchema = Type.Union(\n [\n Type.Literal('dot'),\n Type.Literal('hyphen'),\n Type.Literal('middleDot'),\n Type.Literal('none'),\n Type.Literal('underscore'),\n ],\n {\n description:\n 'Tab leader style: dot (dotted), hyphen (dashed), middleDot, none (blank), or underscore',\n }\n);\n\n/**\n * Tab stop type matching docx.js TabStopType\n */\nconst TabStopTypeSchema = Type.Union(\n [\n Type.Literal('left'),\n Type.Literal('right'),\n Type.Literal('center'),\n Type.Literal('bar'),\n Type.Literal('clear'),\n Type.Literal('decimal'),\n Type.Literal('end'),\n Type.Literal('num'),\n Type.Literal('start'),\n ],\n {\n description: 'Tab stop alignment type',\n }\n);\n\n/**\n * Tab stop definition schema\n */\nconst TabStopDefinitionSchema = Type.Object(\n {\n type: TabStopTypeSchema,\n position: Type.Union([\n Type.Number({\n description:\n 'Tab stop position in twips (1/1440 inch). Common: 9026 for right-aligned at page margin',\n }),\n Type.Literal('max', {\n description: 'Use maximum position (TabStopPosition.MAX = 9026 twips)',\n }),\n ]),\n leader: Type.Optional(TabStopLeaderSchema),\n },\n {\n description:\n 'Tab stop configuration with position, alignment, and optional leader',\n additionalProperties: false,\n }\n);\n\n/**\n * TOC style properties schema that extends text formatting properties\n * but EXCLUDES baseStyle to prevent unwanted coupling with Heading styles\n */\nconst TocStylePropertiesSchema = Type.Object(\n {\n font: Type.Optional(\n Type.Union([\n Type.Literal('heading'),\n Type.Literal('body'),\n Type.Literal('mono'),\n Type.Literal('light'),\n ])\n ),\n ...TextFormattingPropertiesSchema.properties,\n // Paragraph-level alignment (not a font property)\n alignment: AlignmentSchema,\n // Tab stops for controlling TOC entry formatting (leader dots, alignment, etc.)\n tabStops: Type.Optional(\n Type.Array(TabStopDefinitionSchema, {\n description:\n 'Tab stops for TOC entries. Use right-aligned tab with leader to create dotted lines to page numbers.',\n default: [{ type: 'right', position: 'max', leader: 'none' }],\n })\n ),\n // Additional properties specific to styles (baseStyle intentionally excluded)\n priority: Type.Optional(Type.Number()),\n followingStyle: Type.Optional(Type.String()),\n widowControl: Type.Optional(Type.Boolean()),\n keepNext: Type.Optional(Type.Boolean()),\n keepLinesTogether: Type.Optional(Type.Boolean()),\n outlineLevel: Type.Optional(Type.Number()),\n borders: Type.Optional(BordersSchema),\n indent: Type.Optional(IndentSchema),\n },\n { additionalProperties: false }\n);\n\nexport const StyleDefinitionsSchema = Type.Object(\n {\n normal: Type.Optional(StylePropertiesSchema),\n heading1: Type.Optional(StylePropertiesSchema),\n heading2: Type.Optional(StylePropertiesSchema),\n heading3: Type.Optional(StylePropertiesSchema),\n heading4: Type.Optional(StylePropertiesSchema),\n heading5: Type.Optional(StylePropertiesSchema),\n heading6: Type.Optional(StylePropertiesSchema),\n title: Type.Optional(StylePropertiesSchema),\n subtitle: Type.Optional(StylePropertiesSchema),\n // TOC entry styles (used by Word to format TOC entries)\n // Note: TOC styles use TocStylePropertiesSchema which excludes baseStyle to prevent coupling with Headings\n TOC1: Type.Optional(TocStylePropertiesSchema),\n TOC2: Type.Optional(TocStylePropertiesSchema),\n TOC3: Type.Optional(TocStylePropertiesSchema),\n TOC4: Type.Optional(TocStylePropertiesSchema),\n TOC5: Type.Optional(TocStylePropertiesSchema),\n TOC6: Type.Optional(TocStylePropertiesSchema),\n },\n {\n additionalProperties: StylePropertiesSchema,\n description:\n 'Style definitions supporting predefined styles (normal, heading1..6, title, subtitle), TOC entry styles (TOC1..TOC6), and arbitrary custom styles.',\n }\n);\n\n// ============================================================================\n// Heading Definition Schema\n// ============================================================================\n\n/**\n * Heading definition schema that uses the same properties as StylePropertiesSchema\n * but adds a required 'level' field.\n */\nexport const HeadingDefinitionSchema = Type.Object(\n {\n level: Type.Union([\n Type.Literal(1),\n Type.Literal(2),\n Type.Literal(3),\n Type.Literal(4),\n Type.Literal(5),\n Type.Literal(6),\n ]),\n ...StylePropertiesSchema.properties,\n },\n { additionalProperties: false }\n);\n\n// ============================================================================\n// Component Defaults Schemas (imported from component-defaults.ts to avoid\n// circular deps: report.ts needs ComponentDefaultsSchema, but the old location\n// here imported from the components barrel which re-exports report.ts)\n// ============================================================================\n\nimport { ComponentDefaultsSchema } from './component-defaults';\n\nexport {\n HeadingComponentDefaultsSchema,\n ParagraphComponentDefaultsSchema,\n ImageComponentDefaultsSchema,\n StatisticComponentDefaultsSchema,\n TableComponentDefaultsSchema,\n SectionComponentDefaultsSchema,\n ColumnsComponentDefaultsSchema,\n ListComponentDefaultsSchema,\n ComponentDefaultsSchema,\n} from './component-defaults';\n\n// ============================================================================\n// Theme Config Schema\n// ============================================================================\n\nexport const ThemeColorsSchema = Type.Object(\n {\n primary: HexColorSchema,\n secondary: HexColorSchema,\n accent: HexColorSchema,\n text: HexColorSchema,\n background: HexColorSchema,\n border: HexColorSchema,\n // Additional semantic color names\n textPrimary: HexColorSchema,\n textSecondary: HexColorSchema,\n textMuted: HexColorSchema,\n borderPrimary: HexColorSchema,\n borderSecondary: HexColorSchema,\n backgroundPrimary: HexColorSchema,\n backgroundSecondary: HexColorSchema,\n // Extra chart-series slots, named to match the PPTX theme so both\n // formats share one palette vocabulary. Optional: the bundled DOCX\n // themes leave them unset and charts skip the empty slots.\n accent4: Type.Optional(HexColorSchema),\n accent5: Type.Optional(HexColorSchema),\n accent6: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n);\n\nexport const ThemeOverridesSchema = Type.Object(\n {\n colors: Type.Optional(Type.Partial(ThemeColorsSchema)),\n fonts: Type.Optional(Type.Partial(FontsSchema)),\n styles: Type.Optional(StyleDefinitionsSchema),\n },\n {\n additionalProperties: false,\n description:\n 'Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document.',\n }\n);\n\nexport const ThemeConfigSchema = Type.Object(\n {\n $schema: Type.Optional(Type.String()),\n name: Type.String(),\n displayName: Type.String(),\n description: Type.String(),\n version: Type.String(),\n colors: Type.Object(\n {\n primary: HexColorSchema,\n secondary: HexColorSchema,\n accent: HexColorSchema,\n text: HexColorSchema,\n background: HexColorSchema,\n border: HexColorSchema,\n // Additional semantic color names\n textPrimary: HexColorSchema,\n textSecondary: HexColorSchema,\n textMuted: HexColorSchema,\n borderPrimary: HexColorSchema,\n borderSecondary: HexColorSchema,\n backgroundPrimary: HexColorSchema,\n backgroundSecondary: HexColorSchema,\n // Extra chart-series slots, named to match the PPTX theme so both\n // formats share one palette vocabulary. Optional: the bundled DOCX\n // themes leave them unset and charts skip the empty slots.\n accent4: Type.Optional(HexColorSchema),\n accent5: Type.Optional(HexColorSchema),\n accent6: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n ),\n fonts: FontsSchema,\n page: PageSchema,\n styles: Type.Optional(StyleDefinitionsSchema),\n componentDefaults: Type.Optional(ComponentDefaultsSchema),\n // House-style \"known words\" allowlist (whole-word, case-insensitive) that\n // should never be flagged as misspelled. The document's `noProofWords` is\n // merged on top of this at render time.\n noProofWords: Type.Optional(\n Type.Array(Type.String({ minLength: 1 }), {\n description:\n 'Words that should never be flagged as misspelled (whole-word, case-insensitive).',\n })\n ),\n },\n {\n additionalProperties: false,\n description: 'Theme configuration',\n }\n);\n\n// ============================================================================\n// TypeScript Types\n// ============================================================================\n\nexport type ThemeConfigJson = Static<typeof ThemeConfigSchema>;\nexport type DocumentMargins = Static<typeof DocumentMarginsSchema>;\nexport type PageDimensions = Static<typeof PageDimensionsSchema>;\nexport type Page = Static<typeof PageSchema>;\nexport type FontDefinition = Static<typeof FontDefinitionSchema>;\nexport type Fonts = Static<typeof FontsSchema>;\nexport type StyleDefinitions = Static<typeof StyleDefinitionsSchema>;\nexport type HeadingDefinition = Static<typeof HeadingDefinitionSchema>;\nexport type {\n HeadingComponentDefaults,\n ParagraphComponentDefaults,\n ImageComponentDefaults,\n StatisticComponentDefaults,\n TableComponentDefaults,\n SectionComponentDefaults,\n ColumnsComponentDefaults,\n ListComponentDefaults,\n ComponentDefaults,\n} from './component-defaults';\n\n// ============================================================================\n// Validation Function\n// ============================================================================\n\nimport { Value } from '@sinclair/typebox/value';\n\nexport function isValidThemeConfig(data: unknown): data is ThemeConfigJson {\n return Value.Check(ThemeConfigSchema, data);\n}\n\n// ============================================================================\n// Minimal Theme Scaffold\n// ============================================================================\n\n/**\n * Build a schema-complete theme to start from.\n *\n * Lives next to `ThemeConfigSchema` on purpose: the return type is the schema's\n * `Static` type, so a required property added to the schema breaks the build\n * here instead of shipping a scaffold that only fails at validation time.\n * Colour patterns are runtime-only, so `theme-scaffold.test.ts` validates the\n * result against the schema as well.\n *\n * Browser-safe (no Node built-ins), so the playground can scaffold new themes\n * from the same source as the CLI.\n *\n * @param name - Theme identifier; defaults to `minimal-theme`\n */\nexport function createMinimalTheme(\n name: string = 'minimal-theme'\n): ThemeConfigJson {\n return {\n name,\n displayName:\n name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ') || name,\n description: 'A minimal theme with basic styling',\n version: '1.0.0',\n colors: {\n primary: '#2563EB',\n secondary: '#64748B',\n accent: '#F8FAFC',\n text: '#334155',\n background: '#FFFFFF',\n border: '#E2E8F0',\n textPrimary: '#334155',\n textSecondary: '#64748B',\n textMuted: '#94A3B8',\n borderPrimary: '#CBD5E1',\n borderSecondary: '#E2E8F0',\n backgroundPrimary: '#FFFFFF',\n backgroundSecondary: '#F8FAFC',\n },\n fonts: {\n heading: { family: 'Arial', size: 14 },\n body: { family: 'Arial', size: 11 },\n mono: { family: 'Courier New', size: 10 },\n light: { family: 'Arial', size: 10 },\n },\n page: {\n size: 'A4',\n margins: {\n top: 1440,\n bottom: 1440,\n left: 1440,\n right: 1440,\n header: 720,\n footer: 720,\n gutter: 0,\n },\n },\n styles: {\n normal: {\n font: 'body',\n size: 11,\n color: '#334155',\n alignment: 'left',\n lineSpacing: { type: 'multiple', value: 1.15 },\n spacing: { after: 8 },\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAS,YAAoB;AAwf7B,SAAS,aAAa;AA5ef,IAAM,wBAAwB,KAAK;AAAA,EACxC;AAAA,IACE,KAAK,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IAC/B,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IAClC,MAAM,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IAChC,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACjC,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IAClC,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IAClC,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,EACpC;AAAA,EACA,EAAE,sBAAsB,OAAO,aAAa,gCAAgC;AAC9E;AAMO,IAAM,uBAAuB,KAAK;AAAA,EACvC;AAAA,IACE,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACjC,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,EACpC;AAAA,EACA,EAAE,sBAAsB,OAAO,aAAa,2BAA2B;AACzE;AAMO,IAAM,aAAa,KAAK;AAAA,EAC7B;AAAA,IACE,MAAM,KAAK;AAAA,MACT;AAAA,QACE,KAAK,QAAQ,IAAI;AAAA,QACjB,KAAK,QAAQ,IAAI;AAAA,QACjB,KAAK,QAAQ,QAAQ;AAAA,QACrB,KAAK,QAAQ,OAAO;AAAA,QACpB,KAAK;AAAA,UACH;AAAA,YACE,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,CAAC;AAAA,YACjC,QAAQ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AK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,OAAO;AAAA,QACP,WAAW;AAAA,QACX,aAAa,EAAE,MAAM,YAAY,OAAO,KAAK;AAAA,QAC7C,SAAS,EAAE,OAAO,EAAE;AAAA,MACtB;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/component-registry.ts","../src/schemas/components/report.ts","../src/schemas/components/text-box.ts","../src/schemas/components/toc.ts","../src/schemas/components/highcharts.ts","../src/schemas/components/visual.ts"],"sourcesContent":["/**\n * Component Registry - SINGLE SOURCE OF TRUTH\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * Adding a new component: Add it to STANDARD_COMPONENTS_REGISTRY below.\n * It will automatically be included in:\n * - StandardComponentDefinitionSchema (components.ts)\n * - ComponentDefinitionSchema (components.ts)\n * - generateUnifiedDocumentSchema (generator.ts)\n * - Monaco editor autocomplete\n * - Build-time JSON schemas\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\n// Import directly from individual component files to avoid circular dependency\n// (components.ts imports from this file, so we can't import from components.ts)\nimport { ReportPropsSchema } from './components/report';\nimport {\n SectionPropsSchema,\n createSectionPropsSchema,\n} from './components/section';\nimport { ColumnsPropsSchema } from './components/columns';\nimport { HeadingPropsSchema } from './components/heading';\nimport { ParagraphPropsSchema } from './components/paragraph';\nimport { TextBoxPropsSchema } from './components/text-box';\nimport { ImagePropsSchema } from './components/image';\nimport { StatisticPropsSchema } from './components/statistic';\nimport { TablePropsSchema, createTablePropsSchema } from './components/table';\nimport { ListPropsSchema } from './components/list';\nimport { TocPropsSchema } from './components/toc';\nimport { HighchartsPropsSchema } from './components/highcharts';\nimport { VisualPropsSchema } from './components/visual';\n\n/**\n * Component definition with metadata\n */\nexport interface StandardComponentDefinition {\n /** Component name identifier (e.g., 'heading', 'text', 'toc') */\n name: string;\n /** TypeBox schema for the component's props */\n propsSchema: TSchema;\n /** Whether this component can contain children */\n hasChildren: boolean;\n /**\n * Names of standard components allowed as direct children.\n * Only meaningful when hasChildren is true.\n * Plugin components are always allowed in addition to these.\n * Omit to allow the full recursive union (backward-compat).\n */\n allowedChildren?: readonly string[];\n /**\n * Factory that builds props with a live recursive ref (e.g., for section\n * header/footer, table cell content). When present and a recursive ref is\n * available, used instead of the static `propsSchema`.\n */\n createPropsSchema?: (recursiveRef: TSchema) => TSchema;\n /** Component category for organization */\n category: 'container' | 'content' | 'layout';\n /** Human-readable description */\n description: string;\n /** Special flags for this component */\n special?: {\n /** Has $schema field (only 'docx') */\n hasSchemaField?: boolean;\n };\n}\n\n/**\n * SINGLE SOURCE OF TRUTH for all standard components\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * IMPORTANT: When adding a new component:\n * 1. Add the component definition to this array\n * 2. Import its props schema at the top of this file\n * 3. That's it! The component will automatically appear everywhere.\n */\nexport const STANDARD_COMPONENTS_REGISTRY: readonly StandardComponentDefinition[] =\n [\n // ========================================================================\n // Container Components (can contain children)\n // ========================================================================\n {\n name: 'docx',\n propsSchema: ReportPropsSchema,\n hasChildren: true,\n allowedChildren: ['section'],\n category: 'container',\n description:\n 'Main document container - defines the overall document structure. Required as the root component.',\n special: {\n hasSchemaField: true, // Only docx root has $schema field\n },\n },\n {\n name: 'section',\n propsSchema: SectionPropsSchema,\n createPropsSchema: createSectionPropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'highcharts',\n 'visual',\n 'columns',\n 'text-box',\n ],\n category: 'container',\n description:\n 'Section container - groups related content with optional title. Use for organizing document structure.',\n },\n {\n name: 'columns',\n propsSchema: ColumnsPropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'highcharts',\n 'visual',\n 'text-box',\n ],\n category: 'layout',\n description:\n 'Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content.',\n },\n {\n name: 'text-box',\n propsSchema: TextBoxPropsSchema,\n hasChildren: true,\n allowedChildren: ['heading', 'paragraph', 'image'],\n category: 'layout',\n description:\n 'Floating text container - allows positioning text anywhere on the page with absolute or relative positioning.',\n },\n\n // ========================================================================\n // Content Components (leaf nodes, no children)\n // ========================================================================\n {\n name: 'heading',\n propsSchema: HeadingPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest.',\n },\n {\n name: 'paragraph',\n propsSchema: ParagraphPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Paragraph text - supports formatting like bold, italic, and color. Main content element.',\n },\n {\n name: 'image',\n propsSchema: ImagePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Image element - displays images with optional caption. Supports various formats.',\n },\n {\n name: 'statistic',\n propsSchema: StatisticPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Statistic display - shows a number with description. Perfect for KPIs and metrics.',\n },\n {\n name: 'table',\n propsSchema: TablePropsSchema,\n createPropsSchema: createTablePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Data table - displays tabular data with headers. Supports formatting and alignment.',\n },\n {\n name: 'list',\n propsSchema: ListPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'List element - bulleted or numbered list items. Supports nested lists.',\n },\n {\n name: 'toc',\n propsSchema: TocPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles.',\n },\n {\n name: 'highcharts',\n propsSchema: HighchartsPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options.',\n },\n {\n name: 'visual',\n propsSchema: VisualPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Free-canvas graphic authored as a single pptx slide and embedded as a rasterized PNG. Use for infographics, diagrams and layered compositions that the document flow cannot express.',\n },\n ] as const;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Get a component definition by name\n */\nexport function getStandardComponent(\n name: string\n): StandardComponentDefinition | undefined {\n return STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);\n}\n\n/**\n * Get all standard component names\n */\nexport function getAllStandardComponentNames(): readonly string[] {\n return STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);\n}\n\n/**\n * Get components by category\n */\nexport function getComponentsByCategory(\n category: StandardComponentDefinition['category']\n): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.category === category);\n}\n\n/**\n * Get container components (components that can have children)\n */\nexport function getContainerComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n}\n\n/**\n * Get content components (components that cannot have children)\n */\nexport function getContentComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);\n}\n\n/**\n * Check if a component name is a standard component\n */\nexport function isStandardComponent(name: string): boolean {\n return STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);\n}\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\n/**\n * True when a props schema rejects `{}`, i.e. the `props` key cannot be omitted.\n *\n * Only object schemas are inspected. Anything else (a union, a bare ref) is\n * treated as demanding props, preserving the previous stricter behavior for\n * shapes this cannot reason about.\n */\nfunction demandsProps(propsSchema: TSchema): boolean {\n const schema = propsSchema as { type?: string; required?: readonly string[] };\n return schema.type !== 'object' || (schema.required?.length ?? 0) > 0;\n}\n\n/**\n * Generate TypeBox schema object for a component.\n *\n * @param component - Component definition from the registry\n * @param childrenType - Schema for children items. For containers this should be\n * a narrowed union of allowed children; for leaves omit it.\n * @returns TypeBox schema object for the component\n */\nexport function createComponentSchemaObject(\n component: StandardComponentDefinition,\n childrenType?: TSchema,\n selfRef?: TSchema\n): TSchema {\n const schema: Record<string, TSchema> = {\n name: Type.Literal(component.name),\n id: Type.Optional(Type.String()),\n enabled: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion.',\n })\n ),\n };\n\n // Special handling for report component (has $schema field)\n if (component.special?.hasSchemaField) {\n schema.$schema = Type.Optional(Type.String({ format: 'uri' }));\n }\n\n // selfRef (full union) is intentionally passed to createPropsSchema so that\n // header/footer sub-schemas and table cell content can reference any component.\n const propsSchema =\n component.createPropsSchema && selfRef\n ? component.createPropsSchema(selfRef)\n : component.propsSchema;\n\n // `props` is required only when the props schema itself demands a field.\n // The runtime validator treats an omitted `props` as `{}` and lets the props\n // schema decide (see deep-validator.ts), so `section`, `toc`, `image` and\n // `text-box` are legal without the key. Exporting `props` as unconditionally\n // required reddened documents that build: the playground flagged all 23\n // propless sections in the shipped tech-report template while every runtime\n // gate stayed green. The root `docx` node already carried this fix locally in\n // generator.ts; this generalizes it to every component.\n schema.props = demandsProps(propsSchema)\n ? propsSchema\n : Type.Optional(propsSchema);\n\n // Add children support if applicable. The root component requires its\n // `children` array — deep-validator.ts enforces the same rule, but only on\n // the fallback path it takes when the TypeBox check already failed. That\n // made the rule fire only as a side effect of `props` being required, so\n // relaxing `props` above would silently retire it. Nested containers may\n // legitimately be empty.\n if (component.hasChildren && childrenType) {\n schema.children = component.special?.hasSchemaField\n ? Type.Array(childrenType)\n : Type.Optional(Type.Array(childrenType));\n }\n\n return Type.Object(schema, {\n additionalProperties: false,\n description: component.description,\n });\n}\n\n/**\n * Generate an array of TypeBox schemas for all standard components.\n * Uses a flat recursive ref for all containers (legacy behavior).\n *\n * @param recursiveRef - Optional recursive reference for children\n * @returns Array of TypeBox schemas for all components in the registry\n */\nexport function createAllComponentSchemas(\n recursiveRef?: TSchema\n): readonly TSchema[] {\n return STANDARD_COMPONENTS_REGISTRY.map((component) =>\n createComponentSchemaObject(component, recursiveRef)\n );\n}\n\n/**\n * Build all standard component schemas with per-container narrowed children.\n *\n * Resolves containers in dependency order so each container's children union\n * only references its allowedChildren. Plugin schemas are always included in\n * every container's children.\n *\n * @param selfRef - The Type.Recursive self-reference (used as fallback and for plugin children)\n * @param pluginSchemas - Plugin component schemas (always allowed in all containers)\n * @returns schemas array and a byName map for direct lookups\n */\nexport function createAllComponentSchemasNarrowed(\n selfRef: TSchema,\n pluginSchemas: TSchema[] = []\n): { schemas: TSchema[]; byName: Map<string, TSchema> } {\n // Phase 1: Build leaf (non-container) component schemas — no children\n // selfRef is passed so factories (e.g. table) can wire up recursive refs.\n const leafSchemas = new Map<string, TSchema>();\n for (const comp of STANDARD_COMPONENTS_REGISTRY) {\n if (!comp.hasChildren) {\n leafSchemas.set(\n comp.name,\n createComponentSchemaObject(comp, undefined, selfRef)\n );\n }\n }\n\n // Phase 2: Resolve containers in dependency order\n const containers = STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n const resolved = new Map<string, TSchema>();\n const pending = [...containers];\n\n while (pending.length > 0) {\n const before = pending.length;\n for (let i = pending.length - 1; i >= 0; i--) {\n const comp = pending[i];\n\n if (!comp.allowedChildren) {\n // No allowedChildren declared — fallback to full recursive ref\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, selfRef, selfRef)\n );\n pending.splice(i, 1);\n continue;\n }\n\n // Check if all container dependencies are resolved\n const containerDeps = comp.allowedChildren.filter((name) =>\n containers.some((c) => c.name === name)\n );\n if (!containerDeps.every((d) => resolved.has(d))) continue;\n\n // Build narrowed children union\n const childSchemas = comp.allowedChildren\n .map((name) => resolved.get(name) ?? leafSchemas.get(name))\n .filter((s): s is TSchema => s !== undefined);\n\n const allChildSchemas = [...childSchemas, ...pluginSchemas];\n const childrenType =\n allChildSchemas.length === 1\n ? allChildSchemas[0]\n : Type.Union(allChildSchemas);\n\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, childrenType, selfRef)\n );\n pending.splice(i, 1);\n }\n\n if (pending.length === before) {\n throw new Error(\n `Circular allowedChildren among: ${pending.map((c) => c.name).join(', ')}`\n );\n }\n }\n\n // Combine: containers (resolved) + leaves\n const byName = new Map([...resolved, ...leafSchemas]);\n return { schemas: [...byName.values()], byName };\n}\n","/**\n * Report Component Schema\n */\n\nimport { Type, Static, TSchema } from '@sinclair/typebox';\nimport { ComponentDefaultsSchema } from '../component-defaults';\nimport { NoProofWordsSchema } from '../font';\nimport { ThemeOverridesSchema } from '../theme';\n\n// Create a function to generate ReportPropsSchema with recursive component reference\nexport const createReportPropsSchema = (_componentRef?: TSchema) =>\n Type.Object(\n {\n theme: Type.Optional(\n Type.String({\n description: 'Theme name to apply (default: \"minimal\")',\n examples: ['minimal', 'corporate', 'modern'],\n default: 'minimal',\n })\n ),\n themeOverrides: Type.Optional(ThemeOverridesSchema),\n componentDefaults: Type.Optional(ComponentDefaultsSchema),\n language: Type.Optional(\n Type.String({\n pattern: '^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$',\n description:\n 'Default document language (BCP-47 tag, e.g. \"en-US\"). Sets Word\\'s default proofing/spell-check language; individual components can override it locally.',\n examples: ['en-US', 'fr-FR', 'de-DE', 'it-IT', 'es-ES'],\n })\n ),\n noProofWords: Type.Optional(NoProofWordsSchema),\n trackRevisions: Type.Optional(\n Type.Boolean({\n description:\n 'Open the document in track-changes mode: Word marks any further edits as revisions. Set automatically on redline documents produced by the diff engine',\n })\n ),\n metadata: Type.Optional(\n Type.Object(\n {\n title: Type.Optional(\n Type.String({\n description: 'Document title',\n examples: ['Annual Report 2024', 'Technical Documentation'],\n })\n ),\n subtitle: Type.Optional(\n Type.String({\n description: 'Document subtitle',\n })\n ),\n description: Type.Optional(Type.String()),\n author: Type.Optional(Type.String()),\n company: Type.Optional(\n Type.String({\n description:\n 'Company name, written to docProps/custom.xml (Word has no core-property slot for it)',\n })\n ),\n date: Type.Optional(\n Type.String({\n description:\n 'Document date used by {DATE}/{DATETIME} placeholders (defaults to the generation timestamp)',\n })\n ),\n version: Type.Optional(\n Type.String({\n description: 'Document version, written to docProps/custom.xml',\n examples: ['1.0', '2024.3'],\n })\n ),\n tags: Type.Optional(Type.Array(Type.String())),\n },\n {\n description:\n 'Document metadata (title, author, company, version, etc.). Package timestamps (dcterms:created/modified) are not part of this object: they come from the `generatedAt` generation option so repeated builds stay byte-identical.',\n additionalProperties: false,\n }\n )\n ),\n },\n {\n description: 'Report component props',\n additionalProperties: false,\n }\n );\n\nexport const ReportPropsSchema = createReportPropsSchema();\n\nexport type ReportProps = Static<typeof ReportPropsSchema>;\n","/**\n * Text Box Component Schema\n * A floating container that can hold child components (e.g., text, image, columns)\n *\n * Positioning API mirrors existing floating options from text/image for consistency.\n *\n * **Nested Columns Support:**\n * When a `columns` component is nested inside a `text-box`, it automatically renders\n * as a multi-column table instead of a section-level column layout. This allows\n * for columnar content within floating or inline containers.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { FloatingPropertiesSchema } from './common';\nimport { HexColorSchema } from '../font';\n\nexport const TextBoxPropsSchema = Type.Object(\n {\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box width as percentage (e.g., \"50%\") relative to content width',\n }),\n ],\n {\n description:\n 'Text box width in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box height as percentage (e.g., \"50%\") relative to content height',\n }),\n ],\n {\n description:\n 'Text box height in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n floating: Type.Optional(FloatingPropertiesSchema),\n style: Type.Optional(\n Type.Object(\n {\n padding: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(Type.Number({ minimum: 0 })),\n right: Type.Optional(Type.Number({ minimum: 0 })),\n bottom: Type.Optional(Type.Number({ minimum: 0 })),\n left: Type.Optional(Type.Number({ minimum: 0 })),\n },\n { additionalProperties: false }\n )\n ),\n border: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(\n // Reuse border schema semantics: style/width/color\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n right: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n bottom: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n left: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n shading: Type.Optional(\n Type.Object(\n {\n // Same domain as every other colour prop and as the border\n // colours above: resolveColor() accepts \"#RRGGBB\" or a theme\n // colour name, and throws on anything else at render time.\n fill: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n);\n\nexport type TextBoxProps = Static<typeof TextBoxPropsSchema>;\n","/**\n * Table of Contents Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Kept for back-compat only. Word's TOC field has no numbering switch, so the\n * renderer cannot apply this and logs a warning when it is set; entries inherit\n * the numbering of the heading styles they reference.\n */\nexport const TocStyleSchema = Type.Union(\n [Type.Literal('numeric'), Type.Literal('bullet'), Type.Literal('none')],\n {\n description:\n 'TOC numbering style — accepted but not applied (Word TOC fields carry no numbering switch); setting it logs a warning during generation',\n }\n);\n\nexport const TocScopeSchema = Type.Union(\n [Type.Literal('document'), Type.Literal('section')],\n { description: 'TOC scope: document-wide or section-only' }\n);\n\nexport const TocStyleMappingSchema = Type.Object(\n {\n styleId: Type.String({\n description: 'Custom style ID matching a key in theme.styles',\n }),\n level: Type.Number({\n minimum: 1,\n maximum: 6,\n description: 'TOC level (1-6) to assign to this style',\n }),\n },\n {\n description: 'Mapping of custom style to TOC level',\n additionalProperties: false,\n }\n);\n\nexport const TocDepthRangeSchema = Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify at least one of \"from\" or \"to\".',\n additionalProperties: false,\n }\n);\n\nexport const TocPropsSchema = Type.Object(\n {\n pageBreak: Type.Optional(\n Type.Boolean({\n description: 'Insert page break before TOC block',\n })\n ),\n depth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify \"from\", \"to\", or both. Defaults: from=1, to=3',\n additionalProperties: false,\n default: { to: 3 },\n }\n )\n ),\n pageNumbersDepth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to show page numbers. Specify \"from\", \"to\", or both. When specified, page numbers are hidden for entries outside this range.',\n additionalProperties: false,\n }\n )\n ),\n numberingStyle: Type.Optional(TocStyleSchema),\n title: Type.Optional(\n Type.String({\n description: 'TOC heading title',\n })\n ),\n includePageNumbers: Type.Optional(\n Type.Boolean({\n default: true,\n description: 'Show page numbers next to entries',\n })\n ),\n numberSeparator: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'Use tab separator between entry and page number. True applies \"\\\\t\" (default), false applies \" \"',\n })\n ),\n scope: Type.Optional(\n Type.Union([TocScopeSchema, Type.Literal('auto')], {\n default: 'auto',\n description:\n 'TOC scope: \"document\" for entire document, \"section\" for parent section only, \"auto\" for automatic detection (section if inside section, otherwise document)',\n })\n ),\n styles: Type.Optional(\n Type.Array(TocStyleMappingSchema, {\n description:\n 'Custom style mappings for TOC entries. Maps custom theme styles to TOC levels.',\n })\n ),\n },\n {\n description: 'Table of Contents component props',\n additionalProperties: false,\n }\n);\n\nexport type TocProps = Static<typeof TocPropsSchema>;\n","/**\n * Highcharts Component Schema\n *\n * Standard component for rendering charts using Highcharts export server.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Highcharts component props schema\n * Accepts options that will be passed to Highcharts export server\n */\nexport const HighchartsPropsSchema = Type.Object({\n // Highcharts chart options - can be anything but must at least have chart.width and chart.height\n options: Type.Intersect([\n Type.Record(Type.String(), Type.Unknown()),\n Type.Object({\n chart: Type.Object({\n width: Type.Number(),\n height: Type.Number(),\n }),\n }),\n ]),\n // Optional scale factor for export\n scale: Type.Optional(Type.Number()),\n // Optional resources forwarded verbatim to the export server (CSS/JS/files).\n // Notably enables @font-face rules so charts render in custom fonts.\n resources: Type.Optional(\n Type.Object({\n css: Type.Optional(Type.String()),\n js: Type.Optional(Type.String()),\n files: Type.Optional(Type.Array(Type.String())),\n })\n ),\n // Optional Highcharts Export Server URL override\n serverUrl: Type.Optional(\n Type.String({\n description:\n 'Highcharts Export Server URL (default: http://localhost:7801)',\n })\n ),\n // Optional width for rendering (overrides chart width)\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image width as percentage (e.g., \"90%\") relative to content width',\n }),\n ],\n {\n description:\n 'Rendered image width in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n // Optional height for rendering (overrides chart height)\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image height as percentage (e.g., \"90%\") relative to content height',\n }),\n ],\n {\n description:\n 'Rendered image height in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n});\n\nexport type HighchartsProps = Static<typeof HighchartsPropsSchema>;\n","/**\n * Visual Component Schema\n *\n * A `visual` is a free-canvas graphic authored as a single pptx slide and\n * embedded into the document as a rasterized PNG. It unlocks absolute\n * positioning, overlapping shapes and layered art that the docx flow layout\n * cannot express — think infographics, diagrams and hero compositions.\n *\n * The pptx slide is rendered to an image by an injected rasterization service\n * (see `PptxServiceConfig` in @json-to-office/shared), exactly the way the\n * `highcharts` component offloads chart rendering to an export server. At\n * render time the component desugars to a plain `image`.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n MIN_VISUAL_DPI,\n MAX_VISUAL_DPI,\n DEFAULT_VISUAL_DPI,\n} from '@json-to-office/shared';\nimport { PptxSlideContentSchema } from '@json-to-office/shared/schemas/slide-content';\nimport {\n AlignmentSchema,\n SpacingSchema,\n FloatingPropertiesSchema,\n} from './common';\n\n/**\n * Canvas background — a solid color and/or a background image.\n * Mirrors the pptx slide background shape (kept local to avoid coupling\n * shared-docx to shared-pptx; the rasterizer forwards it verbatim).\n */\nexport const VisualCanvasBackgroundSchema = Type.Object(\n {\n color: Type.Optional(\n Type.String({\n description:\n 'Background color (hex like \"#FFFFFF\" or a theme color name)',\n })\n ),\n image: Type.Optional(\n Type.Object(\n {\n path: Type.Optional(Type.String()),\n base64: Type.Optional(Type.String()),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n);\n\n/**\n * The pptx canvas the visual is drawn on. Width/height are in inches and set\n * both the aspect ratio and the physical print size of the embedded image.\n */\nexport const VisualCanvasSchema = Type.Object(\n {\n width: Type.Number({\n minimum: 0.1,\n description: 'Canvas width in inches (pptx slideWidth)',\n }),\n height: Type.Number({\n minimum: 0.1,\n description: 'Canvas height in inches (pptx slideHeight)',\n }),\n theme: Type.Optional(\n Type.String({ description: 'pptx theme name applied to the slide' })\n ),\n background: Type.Optional(VisualCanvasBackgroundSchema),\n },\n {\n description: 'pptx canvas definition for the visual',\n additionalProperties: false,\n }\n);\n\n// A single pptx slide content element (text, image, shape, table, highcharts,\n// chart) is validated against the real PPTX slide-content union\n// (`PptxSlideContentSchema` from @json-to-office/shared/schemas/slide-content)\n// — same authoring\n// fidelity as a standalone `.pptx.json`. Used directly as the `elements` item\n// schema below.\n\nexport const VisualPropsSchema = Type.Object(\n {\n // ── canvas (drives aspect ratio + physical size) ──\n canvas: VisualCanvasSchema,\n // pptx slide content elements, absolutely positioned on the canvas\n elements: Type.Optional(\n Type.Array(PptxSlideContentSchema, {\n description:\n 'pptx slide content elements (text, image, shape, table, highcharts, chart), positioned with x/y/w/h in inches',\n })\n ),\n\n // ── rasterization ──\n dpi: Type.Optional(\n Type.Number({\n minimum: MIN_VISUAL_DPI,\n maximum: MAX_VISUAL_DPI,\n default: DEFAULT_VISUAL_DPI,\n description: `Raster resolution in DPI (default ${DEFAULT_VISUAL_DPI}, range ${MIN_VISUAL_DPI}-${MAX_VISUAL_DPI}). Higher = sharper + larger.`,\n })\n ),\n serverUrl: Type.Optional(\n Type.String({\n description:\n 'Rasterization service URL override (default from services.pptx)',\n })\n ),\n\n // ── placement in the document (mirrors `image`) ──\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({ minimum: 1, description: 'Rendered width in pixels' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Rendered width as percentage (e.g. \"90%\")',\n }),\n ],\n {\n description:\n 'Rendered width in the document, in pixels (number) or percentage string. Defaults to the canvas physical size.',\n }\n )\n ),\n height: Type.Optional(\n Type.Union([\n Type.Number({ minimum: 1, description: 'Rendered height in pixels' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Rendered height as percentage (e.g. \"90%\")',\n }),\n ])\n ),\n alignment: Type.Optional(AlignmentSchema),\n caption: Type.Optional(\n Type.String({\n description:\n 'Caption (supports rich text with **bold**, *italic*, ***both***)',\n })\n ),\n alt: Type.Optional(\n Type.String({ description: 'Alternative text for accessibility' })\n ),\n spacing: Type.Optional(SpacingSchema),\n floating: Type.Optional(FloatingPropertiesSchema),\n keepNext: Type.Optional(\n Type.Boolean({\n description: 'Keep paragraph with next paragraph on same page',\n })\n ),\n keepLines: Type.Optional(\n Type.Boolean({\n description: 'Keep all lines of paragraph together on same page',\n })\n ),\n },\n {\n description: 'Visual component props (pptx-rendered graphic)',\n additionalProperties: false,\n }\n);\n\nexport type VisualProps = Static<typeof VisualPropsSchema>;\nexport type VisualCanvas = Static<typeof VisualCanvasSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,QAAAA,aAAqB;;;ACX9B,SAAS,YAA6B;AAM/B,IAAM,0BAA0B,CAAC,kBACtC,KAAK;AAAA,EACH;AAAA,IACE,OAAO,KAAK;AAAA,MACV,KAAK,OAAO;AAAA,QACV,aAAa;AAAA,QACb,UAAU,CAAC,WAAW,aAAa,QAAQ;AAAA,QAC3C,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,IACA,gBAAgB,KAAK,SAAS,oBAAoB;AAAA,IAClD,mBAAmB,KAAK,SAAS,uBAAuB;AAAA,IACxD,UAAU,KAAK;AAAA,MACb,KAAK,OAAO;AAAA,QACV,SAAS;AAAA,QACT,aACE;AAAA,QACF,UAAU,CAAC,SAAS,SAAS,SAAS,SAAS,OAAO;AAAA,MACxD,CAAC;AAAA,IACH;AAAA,IACA,cAAc,KAAK,SAAS,kBAAkB;AAAA,IAC9C,gBAAgB,KAAK;AAAA,MACnB,KAAK,QAAQ;AAAA,QACX,aACE;AAAA,MACJ,CAAC;AAAA,IACH;AAAA,IACA,UAAU,KAAK;AAAA,MACb,KAAK;AAAA,QACH;AAAA,UACE,OAAO,KAAK;AAAA,YACV,KAAK,OAAO;AAAA,cACV,aAAa;AAAA,cACb,UAAU,CAAC,sBAAsB,yBAAyB;AAAA,YAC5D,CAAC;AAAA,UACH;AAAA,UACA,UAAU,KAAK;AAAA,YACb,KAAK,OAAO;AAAA,cACV,aAAa;AAAA,YACf,CAAC;AAAA,UACH;AAAA,UACA,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,UACxC,QAAQ,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,UACnC,SAAS,KAAK;AAAA,YACZ,KAAK,OAAO;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AS,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,EACzD,OAAO,CAAC,MAAoB,MAAM,MAAS;AAE9C,YAAM,kBAAkB,CAAC,GAAG,cAAc,GAAG,aAAa;AAC1D,YAAM,eACJ,gBAAgB,WAAW,IACvB,gBAAgB,CAAC,IACjBA,MAAK,MAAM,eAAe;AAEhC,eAAS;AAAA,QACP,KAAK;AAAA,QACL,4BAA4B,MAAM,cAAc,OAAO;AAAA,MACzD;AACA,cAAQ,OAAO,GAAG,CAAC;AAAA,IACrB;AAEA,QAAI,QAAQ,WAAW,QAAQ;AAC7B,YAAM,IAAI;AAAA,QACR,mCAAmC,QAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;AAAA,MAC1E;AAAA,IACF;AAAA,EACF;AAGA,QAAM,SAAS,IAAI,IAAI,CAAC,GAAG,UAAU,GAAG,WAAW,CAAC;AACpD,SAAO,EAAE,SAAS,CAAC,GAAG,OAAO,OAAO,CAAC,GAAG,OAAO;AACjD;","names":["Type","Type","Type","Type","Type","Type","Type","Type"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|