@json-to-office/shared-pptx 0.19.0 → 0.20.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.
@@ -3,7 +3,7 @@ import {
3
3
  createAllPptxComponentSchemasNarrowed,
4
4
  createPptxComponentSchemaObject,
5
5
  getPptxContentComponents
6
- } from "./chunk-UVET7RT3.js";
6
+ } from "./chunk-I3XL4HX7.js";
7
7
 
8
8
  // src/schemas/component-union.ts
9
9
  import { Type } from "@sinclair/typebox";
@@ -34,4 +34,4 @@ export {
34
34
  PptxComponentDefinitionSchema,
35
35
  PptxSlideContentSchema
36
36
  };
37
- //# sourceMappingURL=chunk-BJP72XV3.js.map
37
+ //# sourceMappingURL=chunk-5ER63EW5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PptxComponentDefinitionSchema
3
- } from "./chunk-BJP72XV3.js";
3
+ } from "./chunk-5ER63EW5.js";
4
4
 
5
5
  // src/schemas/document.ts
6
6
  var PptxJsonComponentDefinitionSchema = PptxComponentDefinitionSchema;
@@ -18,4 +18,4 @@ export {
18
18
  PptxJsonComponentDefinitionSchema,
19
19
  PPTX_JSON_SCHEMA_URLS
20
20
  };
21
- //# sourceMappingURL=chunk-2R6VYDG2.js.map
21
+ //# sourceMappingURL=chunk-7MPP5MFF.js.map
@@ -10,6 +10,7 @@ import {
10
10
  ShapePropsSchema,
11
11
  SlideBackgroundSchema,
12
12
  TextPropsSchema,
13
+ ThemeConfigSchema,
13
14
  TransitionSchema
14
15
  } from "./chunk-STLETJGO.js";
15
16
 
@@ -112,10 +113,18 @@ var PresentationPropsSchema = Type2.Object(
112
113
  Type2.String({ description: "Company name metadata" })
113
114
  ),
114
115
  theme: Type2.Optional(
115
- Type2.String({
116
- description: 'Theme name to apply (default: "default")',
117
- default: "default"
118
- })
116
+ Type2.Union(
117
+ [
118
+ Type2.String({
119
+ description: 'Theme name to apply (default: "default")',
120
+ default: "default"
121
+ }),
122
+ ThemeConfigSchema
123
+ ],
124
+ {
125
+ description: 'Theme to apply: a built-in/custom theme name (default: "default"), or an inline theme config object so the document stays self-contained'
126
+ }
127
+ )
119
128
  ),
120
129
  slideWidth: Type2.Optional(
121
130
  Type2.Number({
@@ -392,4 +401,4 @@ export {
392
401
  createAllPptxComponentSchemas,
393
402
  createAllPptxComponentSchemasNarrowed
394
403
  };
395
- //# sourceMappingURL=chunk-UVET7RT3.js.map
404
+ //# sourceMappingURL=chunk-I3XL4HX7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/component-registry.ts","../src/schemas/components/presentation.ts","../src/schemas/components/template.ts","../src/schemas/components/slide.ts"],"sourcesContent":["/**\n * PPTX Component Registry - SINGLE SOURCE OF TRUTH\n *\n * This is the ONLY place where standard PPTX components are defined.\n * All schema generators MUST use this registry.\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\n\n/**\n * Component definition with metadata\n */\nexport interface PptxStandardComponentDefinition {\n name: string;\n propsSchema: TSchema;\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 hasPlaceholders?: boolean;\n category: 'container' | 'content' | 'layout';\n description: string;\n special?: {\n hasSchemaField?: boolean;\n };\n}\nimport { PresentationPropsSchema } from './components/presentation';\nimport { SlidePropsSchema } from './components/slide';\nimport { TextPropsSchema } from './components/text';\nimport { PptxImagePropsSchema } from './components/image';\nimport { ShapePropsSchema } from './components/shape';\nimport { PptxTablePropsSchema } from './components/table';\nimport { PptxHighchartsPropsSchema } from './components/highcharts';\nimport { PptxChartPropsSchema } from './components/chart';\n\n/**\n * SINGLE SOURCE OF TRUTH for all standard PPTX components\n */\nexport const PPTX_STANDARD_COMPONENTS_REGISTRY: readonly PptxStandardComponentDefinition[] =\n [\n // ========================================================================\n // Container Components (can contain children)\n // ========================================================================\n {\n name: 'pptx',\n propsSchema: PresentationPropsSchema,\n hasChildren: true,\n allowedChildren: ['slide'],\n category: 'container',\n description:\n 'Main presentation container - defines the overall presentation structure. Required as the root component.',\n special: {\n hasSchemaField: true,\n },\n },\n {\n name: 'slide',\n propsSchema: SlidePropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'text',\n 'image',\n 'shape',\n 'table',\n 'highcharts',\n 'chart',\n ],\n hasPlaceholders: true,\n category: 'container',\n description:\n 'Slide container - groups content elements on a single slide.',\n },\n\n // ========================================================================\n // Content Components (leaf nodes, no children)\n // ========================================================================\n {\n name: 'text',\n propsSchema: TextPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Text element - displays text with formatting, positioning and styling options.',\n },\n {\n name: 'image',\n propsSchema: PptxImagePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Image element - displays images from file path, URL, or base64 data.',\n },\n {\n name: 'shape',\n propsSchema: ShapePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Shape element - draws geometric shapes with optional text, fill, and line styling.',\n },\n {\n name: 'table',\n propsSchema: PptxTablePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Table element - displays tabular data with rows and columns.',\n },\n {\n name: 'highcharts',\n propsSchema: PptxHighchartsPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Highcharts element - renders charts via Highcharts Export Server.',\n },\n {\n name: 'chart',\n propsSchema: PptxChartPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Native PowerPoint chart - editable, scalable, no external server needed.',\n },\n ] as const;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\nexport function getPptxStandardComponent(\n name: string\n): PptxStandardComponentDefinition | undefined {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);\n}\n\nexport function getAllPptxComponentNames(): readonly string[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);\n}\n\nexport function getPptxComponentsByCategory(\n category: PptxStandardComponentDefinition['category']\n): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter(\n (c) => c.category === category\n );\n}\n\nexport function getPptxContainerComponents(): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n}\n\nexport function getPptxContentComponents(): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);\n}\n\nexport function isPptxStandardComponent(name: string): boolean {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);\n}\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\nexport function createPptxComponentSchemaObject(\n component: PptxStandardComponentDefinition,\n recursiveRef?: TSchema,\n placeholderRef?: 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.',\n })\n ),\n };\n\n if (component.special?.hasSchemaField) {\n schema.$schema = Type.Optional(Type.String({ format: 'uri' }));\n }\n\n schema.props = component.propsSchema;\n\n if (component.hasChildren && recursiveRef) {\n schema.children = Type.Optional(Type.Array(recursiveRef));\n }\n\n if (component.hasPlaceholders && (placeholderRef ?? recursiveRef)) {\n const baseProperties = (component.propsSchema as any).properties ?? {};\n const phRef = placeholderRef ?? recursiveRef!;\n schema.props = Type.Object(\n {\n ...baseProperties,\n placeholders: Type.Optional(\n Type.Record(Type.String(), phRef, {\n description:\n 'Content for named placeholders: { \"title\": { \"name\": \"text\", ... } }',\n })\n ),\n },\n {\n additionalProperties: false,\n description: (component.propsSchema as any).description,\n }\n );\n }\n\n return Type.Object(schema, { additionalProperties: false });\n}\n\nexport function createAllPptxComponentSchemas(\n recursiveRef?: TSchema\n): readonly TSchema[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.map((component) =>\n createPptxComponentSchemaObject(component, recursiveRef)\n );\n}\n\n/**\n * Build all standard PPTX 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 (fallback and for plugin children)\n * @param pluginSchemas - Plugin component schemas (always allowed in all containers)\n * @returns Array of TypeBox schemas with narrowed children per container\n */\nexport function createAllPptxComponentSchemasNarrowed(\n selfRef: TSchema,\n pluginSchemas: TSchema[] = []\n): TSchema[] {\n // Phase 1: Build leaf (non-container) component schemas — no children\n const leafSchemas = new Map<string, TSchema>();\n for (const comp of PPTX_STANDARD_COMPONENTS_REGISTRY) {\n if (!comp.hasChildren) {\n leafSchemas.set(\n comp.name,\n createPptxComponentSchemaObject(comp, undefined, selfRef)\n );\n }\n }\n\n // Phase 2: Resolve containers in dependency order\n const containers = PPTX_STANDARD_COMPONENTS_REGISTRY.filter(\n (c) => c.hasChildren\n );\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 createPptxComponentSchemaObject(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 createPptxComponentSchemaObject(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 return [...resolved.values(), ...leafSchemas.values()];\n}\n","/**\n * Presentation Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { TemplateSlideDefinitionSchema } from './template';\nimport { GridConfigSchema, ThemeConfigSchema } from '../theme';\nimport { PptxComponentDefaultsSchema } from '../component-defaults';\n\nexport const PresentationPropsSchema = Type.Object(\n {\n title: Type.Optional(\n Type.String({ description: 'Presentation title metadata' })\n ),\n author: Type.Optional(\n Type.String({ description: 'Presentation author metadata' })\n ),\n subject: Type.Optional(\n Type.String({ description: 'Presentation subject metadata' })\n ),\n company: Type.Optional(\n Type.String({ description: 'Company name metadata' })\n ),\n theme: Type.Optional(\n Type.Union(\n [\n Type.String({\n description: 'Theme name to apply (default: \"default\")',\n default: 'default',\n }),\n ThemeConfigSchema,\n ],\n {\n description:\n 'Theme to apply: a built-in/custom theme name (default: ' +\n '\"default\"), or an inline theme config object so the document ' +\n 'stays self-contained',\n }\n )\n ),\n slideWidth: Type.Optional(\n Type.Number({\n description: 'Slide width in inches (default: 10)',\n default: 10,\n })\n ),\n slideHeight: Type.Optional(\n Type.Number({\n description: 'Slide height in inches (default: 7.5)',\n default: 7.5,\n })\n ),\n rtlMode: Type.Optional(\n Type.Boolean({ description: 'Right-to-left text direction' })\n ),\n language: Type.Optional(\n Type.String({\n pattern: '^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$',\n description:\n 'Default presentation language (BCP-47 tag, e.g. \"en-US\"). Sets the spell-check language for all text; individual text components can override it.',\n examples: ['en-US', 'fr-FR', 'de-DE', 'it-IT', 'es-ES'],\n })\n ),\n pageNumberFormat: Type.Optional(\n Type.Union([Type.Literal('9'), Type.Literal('09')], {\n description:\n 'Format for {PAGE_NUMBER} placeholders: \"9\" = bare number (default), \"09\" = zero-padded',\n default: '9',\n })\n ),\n componentDefaults: Type.Optional(PptxComponentDefaultsSchema),\n grid: Type.Optional(GridConfigSchema),\n templates: Type.Optional(\n Type.Array(TemplateSlideDefinitionSchema, {\n description: 'Template slide definitions (reusable slide templates)',\n })\n ),\n },\n {\n description: 'Presentation container props',\n additionalProperties: false,\n }\n);\n\nexport type PresentationProps = Static<typeof PresentationPropsSchema>;\n","/**\n * Template Slide Definition Schemas\n */\n\nimport { Type, Static, TSchema } from '@sinclair/typebox';\nimport { SlideBackgroundSchema, GridPositionSchema } from './common';\nimport { ColorValueSchema, GridConfigSchema } from '../theme';\nimport { TextPropsSchema } from './text';\nimport { PptxImagePropsSchema } from './image';\nimport { ShapePropsSchema } from './shape';\nimport { PptxTablePropsSchema } from './table';\nimport { PptxChartPropsSchema } from './chart';\nimport { PptxHighchartsPropsSchema } from './highcharts';\n\n// Position helpers (number in inches OR percentage string e.g. \"50%\")\nconst Coord = Type.Union([\n Type.Number({ description: 'Position/size in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Position/size as percentage of slide dimension (e.g., \"50%\")',\n }),\n]);\n\n// Helper: wrap a props schema into { name, props } component format\nfunction contentComponent(name: string, propsSchema: TSchema) {\n return Type.Object({\n name: Type.Literal(name),\n id: Type.Optional(Type.String()),\n enabled: Type.Optional(Type.Boolean({\n default: true,\n description: 'When false, this component is filtered out and not rendered. Defaults to true.',\n })),\n props: propsSchema,\n }, { additionalProperties: false });\n}\n\n// Content component union — same { name, props } format as slide children\nconst TemplateObjectComponentSchema = Type.Union([\n contentComponent('text', TextPropsSchema),\n contentComponent('image', PptxImagePropsSchema),\n contentComponent('shape', ShapePropsSchema),\n contentComponent('table', PptxTablePropsSchema),\n contentComponent('chart', PptxChartPropsSchema),\n contentComponent('highcharts', PptxHighchartsPropsSchema),\n], {\n discriminator: { propertyName: 'name' },\n description: 'Fixed component on a template slide (same format as slide children)',\n});\n\n// Defaults schema — partial component stub (carries styling props, not content)\n// Discriminated union so Monaco can autocomplete prop names per component type\nfunction defaultsComponent(name: string, propsSchema: TSchema) {\n return Type.Object({\n name: Type.Literal(name),\n props: Type.Partial(propsSchema, { description: 'Default props inherited by the component placed in this placeholder' }),\n }, { additionalProperties: false });\n}\n\nconst PlaceholderDefaultsSchema = Type.Union([\n defaultsComponent('text', TextPropsSchema),\n defaultsComponent('image', PptxImagePropsSchema),\n defaultsComponent('shape', ShapePropsSchema),\n defaultsComponent('table', PptxTablePropsSchema),\n defaultsComponent('chart', PptxChartPropsSchema),\n defaultsComponent('highcharts', PptxHighchartsPropsSchema),\n], {\n discriminator: { propertyName: 'name' },\n description: 'Partial component stub — styling defaults only',\n});\n\n// Placeholder definition\nexport const PlaceholderDefinitionSchema = Type.Object({\n name: Type.String({ description: 'Unique placeholder name' }),\n x: Type.Optional(Coord),\n y: Type.Optional(Coord),\n w: Type.Optional(Coord),\n h: Type.Optional(Coord),\n grid: Type.Optional(GridPositionSchema),\n defaults: Type.Optional(PlaceholderDefaultsSchema),\n}, { additionalProperties: false, description: 'Placeholder on a template slide — defaults is a component stub whose props are inherited by the actual component' });\n\n// Template slide definition\nexport const TemplateSlideDefinitionSchema = Type.Object({\n name: Type.String({ description: 'Unique template slide name' }),\n background: Type.Optional(SlideBackgroundSchema),\n margin: Type.Optional(Type.Union([\n Type.Number({ description: 'Margin in inches (all sides)' }),\n Type.Array(Type.Number(), { minItems: 4, maxItems: 4, description: 'Margin [top, right, bottom, left] in inches' }),\n ])),\n slideNumber: Type.Optional(Type.Object({\n x: Coord, y: Coord,\n w: Type.Optional(Coord),\n h: Type.Optional(Coord),\n color: Type.Optional(ColorValueSchema),\n fontSize: Type.Optional(Type.Number({ description: 'Slide number font size in points' })),\n }, { additionalProperties: false, description: 'Slide number position and styling' })),\n objects: Type.Optional(Type.Array(TemplateObjectComponentSchema, { description: 'Fixed components (logos, footers, decorations) — same { name, props } format as slide children' })),\n placeholders: Type.Optional(Type.Array(PlaceholderDefinitionSchema, { description: 'Placeholder regions for slide content' })),\n grid: Type.Optional(GridConfigSchema),\n}, { additionalProperties: false, description: 'Template slide definition (reusable slide template)' });\n\nexport type PlaceholderDefinition = Static<typeof PlaceholderDefinitionSchema>;\nexport type TemplateSlideDefinition = Static<typeof TemplateSlideDefinitionSchema>;\n","/**\n * Slide Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { SlideBackgroundSchema, TransitionSchema } from './common';\n\nexport const SlidePropsSchema = Type.Object(\n {\n background: Type.Optional(SlideBackgroundSchema),\n transition: Type.Optional(TransitionSchema),\n notes: Type.Optional(\n Type.String({ description: 'Speaker notes for this slide' })\n ),\n layout: Type.Optional(\n Type.String({\n description: 'Slide layout name (e.g., \"Title Slide\", \"Blank\")',\n })\n ),\n hidden: Type.Optional(\n Type.Boolean({ description: 'Hide this slide from presentation' })\n ),\n template: Type.Optional(\n Type.String({ description: 'Template slide name to apply' })\n ),\n // Note: `placeholders` is added dynamically by the component registry\n // with the recursive component ref, to avoid circular imports.\n },\n {\n description: 'Slide container props',\n additionalProperties: false,\n }\n);\n\nexport type SlideProps = Static<typeof SlidePropsSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;AAOA,SAAS,QAAAA,aAAqB;;;ACH9B,SAAS,QAAAC,aAAoB;;;ACA7B,SAAS,YAA6B;AAWtC,IAAM,QAAQ,KAAK,MAAM;AAAA,EACvB,KAAK,OAAO,EAAE,aAAa,0BAA0B,CAAC;AAAA,EACtD,KAAK,OAAO;AAAA,IACV,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AAGD,SAAS,iBAAiB,MAAc,aAAsB;AAC5D,SAAO,KAAK,OAAO;AAAA,IACjB,MAAM,KAAK,QAAQ,IAAI;AAAA,IACvB,IAAI,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,IAC/B,SAAS,KAAK,SAAS,KAAK,QAAQ;AAAA,MAClC,SAAS;AAAA,MACT,aAAa;AAAA,IACf,CAAC,CAAC;AAAA,IACF,OAAO;AAAA,EACT,GAAG,EAAE,sBAAsB,MAAM,CAAC;AACpC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QAAQ;AACvB,aAAS,IAAI,QAAQ,SAAS,GAAG,KAAK,GAAG,KAAK;AAC5C,YAAM,OAAO,QAAQ,CAAC;AAEtB,UAAI,CAAC,KAAK,iBAAiB;AAEzB,iBAAS;AAAA,UACP,KAAK;AAAA,UACL,gCAAgC,MAAM,SAAS,OAAO;AAAA,QACxD;AACA,gBAAQ,OAAO,GAAG,CAAC;AACnB;AAAA,MACF;AAGA,YAAM,gBAAgB,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,gCAAgC,MAAM,cAAc,OAAO;AAAA,MAC7D;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,SAAO,CAAC,GAAG,SAAS,OAAO,GAAG,GAAG,YAAY,OAAO,CAAC;AACvD;","names":["Type","Type","Type","Type","Type","Type"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAllPptxComponentSchemasNarrowed,
3
3
  createPptxComponentSchemaObject
4
- } from "./chunk-UVET7RT3.js";
4
+ } from "./chunk-I3XL4HX7.js";
5
5
 
6
6
  // src/schemas/generator.ts
7
7
  import { Type } from "@sinclair/typebox";
@@ -39,4 +39,4 @@ function generateUnifiedDocumentSchema(options = {}) {
39
39
  export {
40
40
  generateUnifiedDocumentSchema
41
41
  };
42
- //# sourceMappingURL=chunk-GUSMSJT6.js.map
42
+ //# sourceMappingURL=chunk-YKBPU4GM.js.map
package/dist/index.d.ts CHANGED
@@ -106,6 +106,108 @@ declare function presentImageSources(props: unknown): string[];
106
106
  */
107
107
  declare function collectImageSourceConflicts(data: unknown): ValidationError[];
108
108
 
109
+ /**
110
+ * Deep validation utilities for collecting ALL errors in nested structures.
111
+ *
112
+ * Mirrors the docx deep validator: the recursive discriminated union
113
+ * (PptxComponentDefinitionSchema) short-circuits on the first mismatch and
114
+ * collapses failures into a generic root error, so this walk visits every
115
+ * component in the tree and validates its props against the real per-component
116
+ * schema, producing precise, path-aware errors.
117
+ */
118
+
119
+ /**
120
+ * Options that tune deep validation.
121
+ *
122
+ * `knownCustomNames` — names of registered plugin components. The deep
123
+ * validator neither flags these as "unknown component" nor validates their
124
+ * props here; the plugin layer validates custom props separately.
125
+ *
126
+ * `allowUnknownFields` — when true, unknown properties are stripped before the
127
+ * per-component check instead of being rejected. The escape hatch for callers
128
+ * migrating onto strict schemas.
129
+ */
130
+ interface DeepValidateOptions {
131
+ knownCustomNames?: Set<string>;
132
+ allowUnknownFields?: boolean;
133
+ }
134
+ /**
135
+ * Deep validate a presentation to collect ALL errors, not just union-level errors.
136
+ */
137
+ declare function deepValidatePresentation(data: any, opts?: DeepValidateOptions): ValidationError[];
138
+ /**
139
+ * Combine deep validation with standard validation.
140
+ *
141
+ * Deep validation produces precise, path-aware errors. TypeBox's discriminated-
142
+ * union check, by contrast, often collapses any failure under the root into a
143
+ * single generic "Invalid component configuration for 'pptx'" message at
144
+ * `root` — useful as a signal that something is wrong, but actionable only via
145
+ * the deep-validator's output. We always strip that catch-all so it doesn't
146
+ * appear alongside (or, worse, instead of) the real diagnostics.
147
+ */
148
+ declare function comprehensiveValidatePresentation(data: any, existingErrors?: ValidationError[], opts?: DeepValidateOptions): ValidationError[];
149
+
150
+ /**
151
+ * Unified validation facade for PPTX.
152
+ *
153
+ * Mirrors the shared-docx `validate` / `validateStrict` API surface the CLI
154
+ * consumes, so `jto pptx validate` gets real schema validation instead of the
155
+ * historical unconditional pass.
156
+ */
157
+
158
+ interface PptxValidationResult {
159
+ valid: boolean;
160
+ errors: ValidationError[];
161
+ warnings?: ValidationError[];
162
+ documentType?: 'pptx';
163
+ data?: unknown;
164
+ }
165
+ /**
166
+ * Validate a presentation component tree.
167
+ *
168
+ * The deep walk is the source of truth: it re-implements everything the
169
+ * recursive discriminated union checks (component names, per-component props
170
+ * schemas, container narrowing) with precise paths, so we run it directly
171
+ * instead of the union check whose failures collapse into a generic root
172
+ * error. Image-source mutual exclusivity is a semantic rule the structural
173
+ * schema cannot express, so it runs unconditionally on top.
174
+ */
175
+ declare function validatePresentationDocument(data: unknown, opts?: DeepValidateOptions): PptxValidationResult;
176
+ /**
177
+ * Validate a presentation from a JSON string or object.
178
+ */
179
+ declare function validateJsonPresentationDocument(jsonInput: string | object, opts?: DeepValidateOptions): PptxValidationResult;
180
+ /**
181
+ * Validate a PPTX theme config.
182
+ */
183
+ declare function validatePptxTheme(data: unknown): PptxValidationResult;
184
+ /**
185
+ * Validate a PPTX theme from a JSON string or object.
186
+ */
187
+ declare function validateJsonPptxTheme(jsonInput: string | object): PptxValidationResult;
188
+ /**
189
+ * Simple validation API — the entry point the CLI consumes.
190
+ */
191
+ declare const validate: {
192
+ document: (data: unknown) => PptxValidationResult;
193
+ jsonDocument: (jsonInput: string | object) => PptxValidationResult;
194
+ theme: (data: unknown) => PptxValidationResult;
195
+ jsonTheme: (jsonInput: string | object) => PptxValidationResult;
196
+ isDocument: (data: unknown) => boolean;
197
+ isTheme: (data: unknown) => boolean;
198
+ };
199
+ /**
200
+ * Strict validation API. PPTX deep validation never cleans or applies
201
+ * defaults, so this is currently an alias kept for docx API parity — the CLI
202
+ * picks one of the two based on its --strict flag.
203
+ */
204
+ declare const validateStrict: {
205
+ document: (data: unknown) => PptxValidationResult;
206
+ jsonDocument: (jsonInput: string | object) => PptxValidationResult;
207
+ theme: (data: unknown) => PptxValidationResult;
208
+ jsonTheme: (jsonInput: string | object) => PptxValidationResult;
209
+ };
210
+
109
211
  declare const PPTX_SHARED_VERSION = "1.0.0";
110
212
 
111
- export { PPTX_SHARED_VERSION, type PptxChartProps, PptxChartPropsSchema, PptxJsonComponentDefinition, type ReportComponent, collectImageSourceConflicts, presentImageSources };
213
+ export { type DeepValidateOptions, PPTX_SHARED_VERSION, type PptxChartProps, PptxChartPropsSchema, PptxJsonComponentDefinition, type PptxValidationResult, type ReportComponent, collectImageSourceConflicts, comprehensiveValidatePresentation, deepValidatePresentation, presentImageSources, validate, validateJsonPptxTheme, validateJsonPresentationDocument, validatePptxTheme, validatePresentationDocument, validateStrict };
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  PPTX_JSON_SCHEMA_URLS,
3
3
  PptxJsonComponentDefinitionSchema
4
- } from "./chunk-2R6VYDG2.js";
4
+ } from "./chunk-7MPP5MFF.js";
5
5
  import "./chunk-J4OT5Y5B.js";
6
6
  import {
7
7
  PptxComponentDefinitionSchema,
8
8
  PptxSlideContentSchema,
9
9
  PptxStandardComponentDefinitionSchema
10
- } from "./chunk-BJP72XV3.js";
10
+ } from "./chunk-5ER63EW5.js";
11
11
  import {
12
12
  PPTX_BASE_SCHEMA_METADATA,
13
13
  PPTX_COMPONENT_METADATA
14
14
  } from "./chunk-RV7W3UXU.js";
15
15
  import {
16
16
  generateUnifiedDocumentSchema
17
- } from "./chunk-GUSMSJT6.js";
17
+ } from "./chunk-YKBPU4GM.js";
18
18
  import {
19
19
  PPTX_STANDARD_COMPONENTS_REGISTRY,
20
20
  PresentationPropsSchema,
@@ -27,7 +27,7 @@ import {
27
27
  getPptxContentComponents,
28
28
  getPptxStandardComponent,
29
29
  isPptxStandardComponent
30
- } from "./chunk-UVET7RT3.js";
30
+ } from "./chunk-I3XL4HX7.js";
31
31
  import {
32
32
  ChartComponentDefaultsSchema,
33
33
  ColorValueSchema,
@@ -94,10 +94,291 @@ function collectImageSourceConflicts(data) {
94
94
  return errors;
95
95
  }
96
96
 
97
+ // src/validation/unified/index.ts
98
+ import { Value as Value2 } from "@sinclair/typebox/value";
99
+ import { transformValueErrors as transformValueErrors2 } from "@json-to-office/shared";
100
+
101
+ // src/validation/unified/deep-validator.ts
102
+ import { Value } from "@sinclair/typebox/value";
103
+ import { transformValueErrors } from "@json-to-office/shared";
104
+ var COMPONENT_SCHEMAS = Object.fromEntries(
105
+ PPTX_STANDARD_COMPONENTS_REGISTRY.map((c) => [c.name, c.propsSchema])
106
+ );
107
+ var ROOT_COMPONENT_NAMES = new Set(
108
+ PPTX_STANDARD_COMPONENTS_REGISTRY.filter(
109
+ (c) => Boolean(c.special?.hasSchemaField)
110
+ ).map((c) => c.name)
111
+ );
112
+ var COMPONENT_OBJECT_KEYS = /* @__PURE__ */ new Set([
113
+ "name",
114
+ "id",
115
+ "enabled",
116
+ "props",
117
+ "children"
118
+ ]);
119
+ var ROOT_OBJECT_KEYS = /* @__PURE__ */ new Set([...COMPONENT_OBJECT_KEYS, "$schema"]);
120
+ function deepValidatePresentation(data, opts = {}) {
121
+ const allErrors = [];
122
+ if (!data || typeof data !== "object") {
123
+ allErrors.push({
124
+ path: "root",
125
+ message: "Presentation must be an object",
126
+ code: "invalid_type"
127
+ });
128
+ return allErrors;
129
+ }
130
+ if (!data.name) {
131
+ allErrors.push({
132
+ path: "/name",
133
+ message: 'Missing required field "name"',
134
+ code: "required_property"
135
+ });
136
+ } else if (!ROOT_COMPONENT_NAMES.has(data.name)) {
137
+ const expected = [...ROOT_COMPONENT_NAMES].map((n) => `"${n}"`).join(", ");
138
+ allErrors.push({
139
+ path: "/name",
140
+ message: `Invalid name "${data.name}". Expected ${expected}`,
141
+ code: "invalid_value"
142
+ });
143
+ }
144
+ for (const key of Object.keys(data)) {
145
+ if (!ROOT_OBJECT_KEYS.has(key)) {
146
+ allErrors.push({
147
+ path: `/${key}`,
148
+ message: `Unknown field "${key}" on the root component`,
149
+ code: "unknown_field"
150
+ });
151
+ }
152
+ }
153
+ if (ROOT_COMPONENT_NAMES.has(data.name) && "props" in data) {
154
+ allErrors.push(
155
+ ...validateComponentProps(data.name, data.props, "/props", opts)
156
+ );
157
+ }
158
+ if (!data.children) {
159
+ allErrors.push({
160
+ path: "/children",
161
+ message: 'Missing required field "children"',
162
+ code: "required_property"
163
+ });
164
+ } else if (!Array.isArray(data.children)) {
165
+ allErrors.push({
166
+ path: "/children",
167
+ message: 'Field "children" must be an array',
168
+ code: "invalid_type"
169
+ });
170
+ }
171
+ walkComponentTree(data, "", opts, allErrors);
172
+ return allErrors;
173
+ }
174
+ function walkComponentTree(node, path, opts, errors) {
175
+ if (!node || typeof node !== "object") return;
176
+ const validateEntry = (child, childPath) => {
177
+ if (!child || typeof child !== "object" || Array.isArray(child)) {
178
+ errors.push({
179
+ path: childPath,
180
+ message: "Component must be an object",
181
+ code: "invalid_type"
182
+ });
183
+ return;
184
+ }
185
+ if (typeof child.name !== "string" || child.name.length === 0) {
186
+ errors.push({
187
+ path: `${childPath}/name`,
188
+ message: 'Component missing required field "name"',
189
+ code: "required_property"
190
+ });
191
+ return;
192
+ }
193
+ if (opts.knownCustomNames?.has(child.name)) return;
194
+ for (const key of Object.keys(child)) {
195
+ if (!COMPONENT_OBJECT_KEYS.has(key)) {
196
+ errors.push({
197
+ path: `${childPath}/${key}`,
198
+ message: `Unknown field "${key}" on component "${child.name}"`,
199
+ code: "unknown_field"
200
+ });
201
+ }
202
+ }
203
+ const propsPath = `${childPath}/props`;
204
+ if (child.props != null) {
205
+ errors.push(
206
+ ...validateComponentProps(child.name, child.props, propsPath, opts)
207
+ );
208
+ } else {
209
+ errors.push(...validateComponentProps(child.name, {}, propsPath, opts));
210
+ }
211
+ const def = getPptxStandardComponent(child.name);
212
+ if (def && !def.hasChildren && child.children != null) {
213
+ errors.push({
214
+ path: `${childPath}/children`,
215
+ message: `Component "${child.name}" does not accept children`,
216
+ code: "invalid_value"
217
+ });
218
+ return;
219
+ }
220
+ walkComponentTree(child, childPath, opts, errors);
221
+ };
222
+ const parentDef = getPptxStandardComponent(node.name);
223
+ if (node.name === "slide" && node.props && typeof node.props === "object") {
224
+ const placeholders = node.props.placeholders;
225
+ if (placeholders && typeof placeholders === "object" && !Array.isArray(placeholders)) {
226
+ for (const [key, child] of Object.entries(placeholders)) {
227
+ validateEntry(child, `${path}/props/placeholders/${key}`);
228
+ }
229
+ } else if (placeholders != null) {
230
+ errors.push({
231
+ path: `${path}/props/placeholders`,
232
+ message: 'Field "placeholders" must be an object mapping placeholder names to components',
233
+ code: "invalid_type"
234
+ });
235
+ }
236
+ }
237
+ if (Array.isArray(node.children)) {
238
+ node.children.forEach((child, i) => {
239
+ const childPath = `${path}/children/${i}`;
240
+ if (parentDef?.allowedChildren && child && typeof child === "object" && typeof child.name === "string" && getPptxStandardComponent(child.name) && !parentDef.allowedChildren.includes(child.name)) {
241
+ const expected = parentDef.allowedChildren.map((n) => `"${n}"`).join(", ");
242
+ errors.push({
243
+ path: `${childPath}/name`,
244
+ message: `Component "${child.name}" is not allowed inside "${node.name}". Expected ${expected}`,
245
+ code: "invalid_value"
246
+ });
247
+ }
248
+ validateEntry(child, childPath);
249
+ });
250
+ } else if (node.children != null && path !== "") {
251
+ errors.push({
252
+ path: `${path}/children`,
253
+ message: 'Field "children" must be an array',
254
+ code: "invalid_type"
255
+ });
256
+ }
257
+ }
258
+ function validateComponentProps(componentName, props, basePath, opts = {}) {
259
+ const errors = [];
260
+ const schema = COMPONENT_SCHEMAS[componentName];
261
+ if (!schema) {
262
+ errors.push({
263
+ path: basePath.replace(/\/props$/, "/name"),
264
+ message: `Unknown component "${componentName}"`,
265
+ code: "unknown_component"
266
+ });
267
+ return errors;
268
+ }
269
+ let toCheck = props;
270
+ if (componentName === "slide" && props && typeof props === "object" && "placeholders" in props) {
271
+ const rest = { ...props };
272
+ delete rest.placeholders;
273
+ toCheck = rest;
274
+ }
275
+ if (opts.allowUnknownFields) {
276
+ toCheck = Value.Clean(schema, Value.Clone(toCheck));
277
+ }
278
+ if (!Value.Check(schema, toCheck)) {
279
+ const valueErrors = [...Value.Errors(schema, toCheck)];
280
+ const transformedErrors = transformValueErrors(valueErrors, {
281
+ maxErrors: 100
282
+ });
283
+ transformedErrors.forEach((error) => {
284
+ const fullPath = error.path === "root" ? basePath : `${basePath}${error.path.startsWith("/") ? error.path : "/" + error.path}`;
285
+ errors.push({
286
+ ...error,
287
+ path: fullPath
288
+ });
289
+ });
290
+ }
291
+ return errors;
292
+ }
293
+ function comprehensiveValidatePresentation(data, existingErrors = [], opts = {}) {
294
+ const deepErrors = deepValidatePresentation(data, opts);
295
+ const filteredExisting = existingErrors.filter(
296
+ (e) => !isGenericUnionCatchAll(e)
297
+ );
298
+ return deduplicateErrors([...filteredExisting, ...deepErrors]);
299
+ }
300
+ function isGenericUnionCatchAll(error) {
301
+ const atRoot = !error.path || error.path === "root" || error.path === "/";
302
+ if (!atRoot) return false;
303
+ const msg = error.message || "";
304
+ return /invalid (component|module) configurations?/i.test(msg) || /invalid document structure/i.test(msg);
305
+ }
306
+ function deduplicateErrors(errors) {
307
+ const seen = /* @__PURE__ */ new Set();
308
+ const unique = [];
309
+ for (const error of errors) {
310
+ const key = `${error.path}:${error.message}`;
311
+ if (!seen.has(key)) {
312
+ seen.add(key);
313
+ unique.push(error);
314
+ }
315
+ }
316
+ return unique;
317
+ }
318
+
319
+ // src/validation/unified/index.ts
320
+ function parseJsonInput(jsonInput) {
321
+ if (typeof jsonInput !== "string") return { parsed: jsonInput };
322
+ try {
323
+ return { parsed: JSON.parse(jsonInput) };
324
+ } catch (err) {
325
+ return {
326
+ error: {
327
+ path: "root",
328
+ message: `Invalid JSON: ${err?.message ?? String(err)}`,
329
+ code: "json_parse_error"
330
+ }
331
+ };
332
+ }
333
+ }
334
+ function validatePresentationDocument(data, opts = {}) {
335
+ const errors = comprehensiveValidatePresentation(data, [], opts);
336
+ errors.push(...collectImageSourceConflicts(data));
337
+ const valid = errors.length === 0;
338
+ return {
339
+ valid,
340
+ errors,
341
+ documentType: "pptx",
342
+ data: valid ? data : void 0
343
+ };
344
+ }
345
+ function validateJsonPresentationDocument(jsonInput, opts = {}) {
346
+ const { parsed, error } = parseJsonInput(jsonInput);
347
+ if (error) return { valid: false, errors: [error], documentType: "pptx" };
348
+ return validatePresentationDocument(parsed, opts);
349
+ }
350
+ function validatePptxTheme(data) {
351
+ if (Value2.Check(ThemeConfigSchema, data)) {
352
+ return { valid: true, errors: [], data };
353
+ }
354
+ const valueErrors = [...Value2.Errors(ThemeConfigSchema, data)];
355
+ const errors = transformValueErrors2(valueErrors, { maxErrors: 100 });
356
+ return { valid: false, errors };
357
+ }
358
+ function validateJsonPptxTheme(jsonInput) {
359
+ const { parsed, error } = parseJsonInput(jsonInput);
360
+ if (error) return { valid: false, errors: [error] };
361
+ return validatePptxTheme(parsed);
362
+ }
363
+ var validate = {
364
+ document: (data) => validatePresentationDocument(data),
365
+ jsonDocument: (jsonInput) => validateJsonPresentationDocument(jsonInput),
366
+ theme: (data) => validatePptxTheme(data),
367
+ jsonTheme: (jsonInput) => validateJsonPptxTheme(jsonInput),
368
+ isDocument: (data) => validatePresentationDocument(data).valid,
369
+ isTheme: (data) => validatePptxTheme(data).valid
370
+ };
371
+ var validateStrict = {
372
+ document: (data) => validatePresentationDocument(data),
373
+ jsonDocument: (jsonInput) => validateJsonPresentationDocument(jsonInput),
374
+ theme: (data) => validatePptxTheme(data),
375
+ jsonTheme: (jsonInput) => validateJsonPptxTheme(jsonInput)
376
+ };
377
+
97
378
  // src/index.ts
98
379
  import {
99
380
  transformValueError,
100
- transformValueErrors,
381
+ transformValueErrors as transformValueErrors3,
101
382
  DEFAULT_ERROR_CONFIG,
102
383
  createErrorConfig
103
384
  } from "@json-to-office/shared";
@@ -155,11 +436,13 @@ export {
155
436
  VerticalAlignmentSchema,
156
437
  collectImageSourceConflicts,
157
438
  compareSemver,
439
+ comprehensiveValidatePresentation,
158
440
  convertToJsonSchema,
159
441
  createAllPptxComponentSchemas,
160
442
  createComponentSchema,
161
443
  createErrorConfig,
162
444
  createPptxComponentSchemaObject,
445
+ deepValidatePresentation,
163
446
  exportSchemaToFile,
164
447
  fixSchemaReferences,
165
448
  generateUnifiedDocumentSchema,
@@ -175,6 +458,12 @@ export {
175
458
  parseSemver,
176
459
  presentImageSources,
177
460
  transformValueError,
178
- transformValueErrors
461
+ transformValueErrors3 as transformValueErrors,
462
+ validate,
463
+ validateJsonPptxTheme,
464
+ validateJsonPresentationDocument,
465
+ validatePptxTheme,
466
+ validatePresentationDocument,
467
+ validateStrict
179
468
  };
180
469
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/validation/image-source-conflicts.ts","../src/index.ts"],"sourcesContent":["/**\n * Image source conflict detection (PPTX)\n *\n * Mirrors core-docx: `path`, `base64`, and `svg` are mutually exclusive on the\n * image component, but all three are optional fields on a single object schema —\n * so a multi-source payload passes the structural check and would otherwise be\n * silently resolved by runtime precedence (svg > base64 > path). This walk runs\n * unconditionally during validation and rejects such payloads. It traverses every\n * nested value, so images inside slides, grids, containers, and table cells are\n * all covered regardless of container shape.\n */\n\nimport type { ValidationError } from '@json-to-office/shared';\n\n// Image source fields that are mutually exclusive: exactly one may be set.\nconst IMAGE_SOURCE_FIELDS = ['path', 'base64', 'svg'] as const;\n\n/**\n * Names of the image source fields that carry a non-empty value on a props object.\n */\nexport function presentImageSources(props: unknown): string[] {\n if (!props || typeof props !== 'object') return [];\n const p = props as Record<string, unknown>;\n return IMAGE_SOURCE_FIELDS.filter((f) => {\n const v = p[f];\n return typeof v === 'string' && v.trim().length > 0;\n });\n}\n\n/**\n * Collect \"more than one image source\" conflicts anywhere in a presentation.\n */\nexport function collectImageSourceConflicts(data: unknown): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const visit = (node: any, path: string): void => {\n if (Array.isArray(node)) {\n node.forEach((item, i) => visit(item, `${path}/${i}`));\n return;\n }\n if (!node || typeof node !== 'object') return;\n\n if (node.name === 'image') {\n const present = presentImageSources(node.props);\n if (present.length > 1) {\n errors.push({\n path: `${path}/props`,\n message: `Image component accepts only one source, but found ${present\n .map((f) => `\"${f}\"`)\n .join(', ')}. Use exactly one of \"path\", \"base64\", or \"svg\".`,\n code: 'mutually_exclusive',\n });\n }\n }\n\n for (const key of Object.keys(node)) {\n visit(node[key], `${path}/${key}`);\n }\n };\n\n visit(data, '');\n return errors;\n}\n","export const PPTX_SHARED_VERSION = '1.0.0';\n\n// Component Schemas\nexport {\n PositionSchema,\n SlideBackgroundSchema,\n TransitionSchema,\n VerticalAlignmentSchema,\n ShadowSchema,\n PresentationPropsSchema,\n SlidePropsSchema,\n TextPropsSchema,\n PptxImagePropsSchema,\n ShapePropsSchema,\n ShapeTypeSchema,\n PptxTablePropsSchema,\n PptxHighchartsPropsSchema,\n PptxStandardComponentDefinitionSchema,\n PptxComponentDefinitionSchema,\n PptxSlideContentSchema,\n} from './schemas/components';\n\nexport type {\n Position,\n SlideBackground,\n Transition,\n VerticalAlignment,\n Shadow,\n PresentationProps,\n SlideProps,\n TextProps,\n PptxImageProps,\n ShapeType,\n ShapeProps,\n TextSegment,\n PptxTableProps,\n PptxHighchartsProps,\n PptxComponentDefinition,\n PptxSlideContent,\n} from './schemas/components';\n\n// Chart (not re-exported from components barrel)\nexport { PptxChartPropsSchema } from './schemas/components/chart';\nexport type { PptxChartProps } from './schemas/components/chart';\n\n// Component Registry\nexport {\n PPTX_STANDARD_COMPONENTS_REGISTRY,\n getPptxStandardComponent,\n getAllPptxComponentNames,\n getPptxComponentsByCategory,\n getPptxContainerComponents,\n getPptxContentComponents,\n isPptxStandardComponent,\n createPptxComponentSchemaObject,\n createAllPptxComponentSchemas,\n} from './schemas/component-registry';\n\nexport type { PptxStandardComponentDefinition } from './schemas/component-registry';\n\n// Document Schema\nexport {\n PptxJsonComponentDefinitionSchema,\n PPTX_JSON_SCHEMA_URLS,\n} from './schemas/document';\n\nexport type { PptxJsonComponentDefinition } from './schemas/document';\n\n// Schema Export Metadata\nexport {\n PPTX_COMPONENT_METADATA,\n PPTX_BASE_SCHEMA_METADATA,\n} from './schemas/export';\n\n// Component Defaults\nexport {\n PptxComponentDefaultsSchema,\n TextComponentDefaultsSchema,\n ImageComponentDefaultsSchema,\n ShapeComponentDefaultsSchema,\n TableComponentDefaultsSchema,\n HighchartsComponentDefaultsSchema,\n ChartComponentDefaultsSchema,\n} from './schemas/component-defaults';\nexport type {\n PptxComponentDefaults,\n TextComponentDefaults,\n ImageComponentDefaults,\n ShapeComponentDefaults,\n TableComponentDefaults,\n HighchartsComponentDefaults,\n ChartComponentDefaults,\n} from './schemas/component-defaults';\n\n// Theme\nexport {\n ThemeConfigSchema,\n ColorValueSchema,\n SEMANTIC_COLOR_NAMES,\n SEMANTIC_COLOR_ALIASES,\n STYLE_NAMES,\n StyleNameSchema,\n TextStyleSchema,\n isValidThemeConfig,\n} from './schemas/theme';\nexport type { ThemeConfigJson, StyleName, TextStyle } from './schemas/theme';\n\n// Schema Generator\nexport { generateUnifiedDocumentSchema } from './schemas/generator';\nexport type {\n VersionedPropsEntry,\n CustomComponentInfo,\n GenerateSchemaOptions,\n} from './schemas/generator';\n\n// Types\nexport type { ReportComponent } from './types/components';\n\n// Image source conflict detection (path/base64/svg mutual exclusivity)\nexport {\n collectImageSourceConflicts,\n presentImageSources,\n} from './validation/image-source-conflicts';\n\n// Re-export shared validation utilities for convenience\nexport {\n transformValueError,\n transformValueErrors,\n DEFAULT_ERROR_CONFIG,\n createErrorConfig,\n} from '@json-to-office/shared';\n\nexport type {\n ErrorFormatterConfig,\n ValidationError,\n} from '@json-to-office/shared';\n\n// Re-export shared utilities\nexport {\n latestVersion,\n isValidSemver,\n parseSemver,\n compareSemver,\n} from '@json-to-office/shared';\nexport type { ParsedSemver } from '@json-to-office/shared';\n\n// Re-export schema utils\nexport {\n fixSchemaReferences,\n convertToJsonSchema,\n createComponentSchema,\n exportSchemaToFile,\n} from '@json-to-office/shared';\nexport type { ComponentSchemaConfig } from '@json-to-office/shared';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,sBAAsB,CAAC,QAAQ,UAAU,KAAK;AAK7C,SAAS,oBAAoB,OAA0B;AAC5D,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO,CAAC;AACjD,QAAM,IAAI;AACV,SAAO,oBAAoB,OAAO,CAAC,MAAM;AACvC,UAAM,IAAI,EAAE,CAAC;AACb,WAAO,OAAO,MAAM,YAAY,EAAE,KAAK,EAAE,SAAS;AAAA,EACpD,CAAC;AACH;AAKO,SAAS,4BAA4B,MAAkC;AAC5E,QAAM,SAA4B,CAAC;AAEnC,QAAM,QAAQ,CAAC,MAAW,SAAuB;AAC/C,QAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAK,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;AACrD;AAAA,IACF;AACA,QAAI,CAAC,QAAQ,OAAO,SAAS,SAAU;AAEvC,QAAI,KAAK,SAAS,SAAS;AACzB,YAAM,UAAU,oBAAoB,KAAK,KAAK;AAC9C,UAAI,QAAQ,SAAS,GAAG;AACtB,eAAO,KAAK;AAAA,UACV,MAAM,GAAG,IAAI;AAAA,UACb,SAAS,sDAAsD,QAC5D,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EACnB,KAAK,IAAI,CAAC;AAAA,UACb,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AAAA,IACF;AAEA,eAAW,OAAO,OAAO,KAAK,IAAI,GAAG;AACnC,YAAM,KAAK,GAAG,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE;AAAA,IACnC;AAAA,EACF;AAEA,QAAM,MAAM,EAAE;AACd,SAAO;AACT;;;AC+DA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAxJA,IAAM,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../src/validation/image-source-conflicts.ts","../src/validation/unified/index.ts","../src/validation/unified/deep-validator.ts","../src/index.ts"],"sourcesContent":["/**\n * Image source conflict detection (PPTX)\n *\n * Mirrors core-docx: `path`, `base64`, and `svg` are mutually exclusive on the\n * image component, but all three are optional fields on a single object schema —\n * so a multi-source payload passes the structural check and would otherwise be\n * silently resolved by runtime precedence (svg > base64 > path). This walk runs\n * unconditionally during validation and rejects such payloads. It traverses every\n * nested value, so images inside slides, grids, containers, and table cells are\n * all covered regardless of container shape.\n */\n\nimport type { ValidationError } from '@json-to-office/shared';\n\n// Image source fields that are mutually exclusive: exactly one may be set.\nconst IMAGE_SOURCE_FIELDS = ['path', 'base64', 'svg'] as const;\n\n/**\n * Names of the image source fields that carry a non-empty value on a props object.\n */\nexport function presentImageSources(props: unknown): string[] {\n if (!props || typeof props !== 'object') return [];\n const p = props as Record<string, unknown>;\n return IMAGE_SOURCE_FIELDS.filter((f) => {\n const v = p[f];\n return typeof v === 'string' && v.trim().length > 0;\n });\n}\n\n/**\n * Collect \"more than one image source\" conflicts anywhere in a presentation.\n */\nexport function collectImageSourceConflicts(data: unknown): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const visit = (node: any, path: string): void => {\n if (Array.isArray(node)) {\n node.forEach((item, i) => visit(item, `${path}/${i}`));\n return;\n }\n if (!node || typeof node !== 'object') return;\n\n if (node.name === 'image') {\n const present = presentImageSources(node.props);\n if (present.length > 1) {\n errors.push({\n path: `${path}/props`,\n message: `Image component accepts only one source, but found ${present\n .map((f) => `\"${f}\"`)\n .join(', ')}. Use exactly one of \"path\", \"base64\", or \"svg\".`,\n code: 'mutually_exclusive',\n });\n }\n }\n\n for (const key of Object.keys(node)) {\n visit(node[key], `${path}/${key}`);\n }\n };\n\n visit(data, '');\n return errors;\n}\n","/**\n * Unified validation facade for PPTX.\n *\n * Mirrors the shared-docx `validate` / `validateStrict` API surface the CLI\n * consumes, so `jto pptx validate` gets real schema validation instead of the\n * historical unconditional pass.\n */\n\nimport { Value } from '@sinclair/typebox/value';\nimport type { ValidationError } from '@json-to-office/shared';\nimport { transformValueErrors } from '@json-to-office/shared';\nimport { ThemeConfigSchema } from '../../schemas/theme';\nimport { collectImageSourceConflicts } from '../image-source-conflicts';\nimport {\n comprehensiveValidatePresentation,\n type DeepValidateOptions,\n} from './deep-validator';\n\nexport {\n deepValidatePresentation,\n comprehensiveValidatePresentation,\n} from './deep-validator';\nexport type { DeepValidateOptions } from './deep-validator';\n\nexport interface PptxValidationResult {\n valid: boolean;\n errors: ValidationError[];\n warnings?: ValidationError[];\n documentType?: 'pptx';\n data?: unknown;\n}\n\nfunction parseJsonInput(jsonInput: string | object): {\n parsed?: unknown;\n error?: ValidationError;\n} {\n if (typeof jsonInput !== 'string') return { parsed: jsonInput };\n try {\n return { parsed: JSON.parse(jsonInput) };\n } catch (err: any) {\n return {\n error: {\n path: 'root',\n message: `Invalid JSON: ${err?.message ?? String(err)}`,\n code: 'json_parse_error',\n },\n };\n }\n}\n\n/**\n * Validate a presentation component tree.\n *\n * The deep walk is the source of truth: it re-implements everything the\n * recursive discriminated union checks (component names, per-component props\n * schemas, container narrowing) with precise paths, so we run it directly\n * instead of the union check whose failures collapse into a generic root\n * error. Image-source mutual exclusivity is a semantic rule the structural\n * schema cannot express, so it runs unconditionally on top.\n */\nexport function validatePresentationDocument(\n data: unknown,\n opts: DeepValidateOptions = {}\n): PptxValidationResult {\n const errors = comprehensiveValidatePresentation(data, [], opts);\n errors.push(...collectImageSourceConflicts(data));\n const valid = errors.length === 0;\n return {\n valid,\n errors,\n documentType: 'pptx',\n data: valid ? data : undefined,\n };\n}\n\n/**\n * Validate a presentation from a JSON string or object.\n */\nexport function validateJsonPresentationDocument(\n jsonInput: string | object,\n opts: DeepValidateOptions = {}\n): PptxValidationResult {\n const { parsed, error } = parseJsonInput(jsonInput);\n if (error) return { valid: false, errors: [error], documentType: 'pptx' };\n return validatePresentationDocument(parsed, opts);\n}\n\n/**\n * Validate a PPTX theme config.\n */\nexport function validatePptxTheme(data: unknown): PptxValidationResult {\n if (Value.Check(ThemeConfigSchema, data)) {\n return { valid: true, errors: [], data };\n }\n const valueErrors = [...Value.Errors(ThemeConfigSchema, data)];\n const errors = transformValueErrors(valueErrors, { maxErrors: 100 });\n return { valid: false, errors };\n}\n\n/**\n * Validate a PPTX theme from a JSON string or object.\n */\nexport function validateJsonPptxTheme(\n jsonInput: string | object\n): PptxValidationResult {\n const { parsed, error } = parseJsonInput(jsonInput);\n if (error) return { valid: false, errors: [error] };\n return validatePptxTheme(parsed);\n}\n\n/**\n * Simple validation API — the entry point the CLI consumes.\n */\nexport const validate = {\n document: (data: unknown) => validatePresentationDocument(data),\n jsonDocument: (jsonInput: string | object) =>\n validateJsonPresentationDocument(jsonInput),\n theme: (data: unknown) => validatePptxTheme(data),\n jsonTheme: (jsonInput: string | object) => validateJsonPptxTheme(jsonInput),\n isDocument: (data: unknown) => validatePresentationDocument(data).valid,\n isTheme: (data: unknown) => validatePptxTheme(data).valid,\n};\n\n/**\n * Strict validation API. PPTX deep validation never cleans or applies\n * defaults, so this is currently an alias kept for docx API parity — the CLI\n * picks one of the two based on its --strict flag.\n */\nexport const validateStrict = {\n document: (data: unknown) => validatePresentationDocument(data),\n jsonDocument: (jsonInput: string | object) =>\n validateJsonPresentationDocument(jsonInput),\n theme: (data: unknown) => validatePptxTheme(data),\n jsonTheme: (jsonInput: string | object) => validateJsonPptxTheme(jsonInput),\n};\n","/**\n * Deep validation utilities for collecting ALL errors in nested structures.\n *\n * Mirrors the docx deep validator: the recursive discriminated union\n * (PptxComponentDefinitionSchema) short-circuits on the first mismatch and\n * collapses failures into a generic root error, so this walk visits every\n * component in the tree and validates its props against the real per-component\n * schema, producing precise, path-aware errors.\n */\n\nimport { Value } from '@sinclair/typebox/value';\nimport type { TSchema } from '@sinclair/typebox';\nimport type { ValidationError } from '@json-to-office/shared';\nimport { transformValueErrors } from '@json-to-office/shared';\nimport {\n PPTX_STANDARD_COMPONENTS_REGISTRY,\n getPptxStandardComponent,\n} from '../../schemas/component-registry';\n\n// Map of component names to their props schemas, sourced from the registry.\n// This stays in sync as new standard components are added, so the presentation\n// root ('pptx') and every standard child component are recognized here.\nconst COMPONENT_SCHEMAS: Record<string, TSchema> = Object.fromEntries(\n PPTX_STANDARD_COMPONENTS_REGISTRY.map((c) => [c.name, c.propsSchema])\n);\n\n// Root component names that may appear at the top of a presentation.\nconst ROOT_COMPONENT_NAMES = new Set(\n PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) =>\n Boolean(c.special?.hasSchemaField)\n ).map((c) => c.name)\n);\n\n// Top-level keys allowed on a component object. The recursive union enforces\n// this via additionalProperties:false; the walk re-checks it so a typo like\n// \"porps\" is reported at a precise path instead of a generic union failure.\nconst COMPONENT_OBJECT_KEYS = new Set([\n 'name',\n 'id',\n 'enabled',\n 'props',\n 'children',\n]);\nconst ROOT_OBJECT_KEYS = new Set([...COMPONENT_OBJECT_KEYS, '$schema']);\n\n/**\n * Options that tune deep validation.\n *\n * `knownCustomNames` — names of registered plugin components. The deep\n * validator neither flags these as \"unknown component\" nor validates their\n * props here; the plugin layer validates custom props separately.\n *\n * `allowUnknownFields` — when true, unknown properties are stripped before the\n * per-component check instead of being rejected. The escape hatch for callers\n * migrating onto strict schemas.\n */\nexport interface DeepValidateOptions {\n knownCustomNames?: Set<string>;\n allowUnknownFields?: boolean;\n}\n\n/**\n * Deep validate a presentation to collect ALL errors, not just union-level errors.\n */\nexport function deepValidatePresentation(\n data: any,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const allErrors: ValidationError[] = [];\n\n if (!data || typeof data !== 'object') {\n allErrors.push({\n path: 'root',\n message: 'Presentation must be an object',\n code: 'invalid_type',\n });\n return allErrors;\n }\n\n if (!data.name) {\n allErrors.push({\n path: '/name',\n message: 'Missing required field \"name\"',\n code: 'required_property',\n });\n } else if (!ROOT_COMPONENT_NAMES.has(data.name)) {\n const expected = [...ROOT_COMPONENT_NAMES].map((n) => `\"${n}\"`).join(', ');\n allErrors.push({\n path: '/name',\n message: `Invalid name \"${data.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n\n for (const key of Object.keys(data)) {\n if (!ROOT_OBJECT_KEYS.has(key)) {\n allErrors.push({\n path: `/${key}`,\n message: `Unknown field \"${key}\" on the root component`,\n code: 'unknown_field',\n });\n }\n }\n\n // Validate props when the key is present so explicit `null` (or any falsy\n // non-object) is checked against the component's schema instead of silently\n // passing.\n if (ROOT_COMPONENT_NAMES.has(data.name) && 'props' in data) {\n allErrors.push(\n ...validateComponentProps(data.name, data.props, '/props', opts)\n );\n }\n\n // The root requires a children array (the slides); nested containers may\n // legitimately omit theirs.\n if (!data.children) {\n allErrors.push({\n path: '/children',\n message: 'Missing required field \"children\"',\n code: 'required_property',\n });\n } else if (!Array.isArray(data.children)) {\n allErrors.push({\n path: '/children',\n message: 'Field \"children\" must be an array',\n code: 'invalid_type',\n });\n }\n\n walkComponentTree(data, '', opts, allErrors);\n\n return allErrors;\n}\n\n/**\n * Recursively validate every component nested under `node`.\n *\n * Walks two kinds of child position to any depth:\n * - the `children` array — `pptx` holds slides, `slide` holds content\n * components. The registry's `allowedChildren` narrows what each container\n * accepts, and leaf components must not carry children at all; and\n * - a slide's `props.placeholders` record — added dynamically by the\n * component registry on top of the static SlidePropsSchema, so its values\n * are not covered by the slide's own props validation and this walk is\n * their only checker.\n *\n * The node's own props are NOT validated here — the caller validates the root\n * props, and every entry is validated as it is visited.\n */\nfunction walkComponentTree(\n node: any,\n path: string,\n opts: DeepValidateOptions,\n errors: ValidationError[]\n): void {\n if (!node || typeof node !== 'object') return;\n\n const validateEntry = (child: any, childPath: string): void => {\n if (!child || typeof child !== 'object' || Array.isArray(child)) {\n errors.push({\n path: childPath,\n message: 'Component must be an object',\n code: 'invalid_type',\n });\n return;\n }\n if (typeof child.name !== 'string' || child.name.length === 0) {\n errors.push({\n path: `${childPath}/name`,\n message: 'Component missing required field \"name\"',\n code: 'required_property',\n });\n return;\n }\n\n // Registered plugin components are validated by the plugin layer; skip\n // their props and subtree so they are neither double-validated nor\n // misreported as unknown.\n if (opts.knownCustomNames?.has(child.name)) return;\n\n for (const key of Object.keys(child)) {\n if (!COMPONENT_OBJECT_KEYS.has(key)) {\n errors.push({\n path: `${childPath}/${key}`,\n message: `Unknown field \"${key}\" on component \"${child.name}\"`,\n code: 'unknown_field',\n });\n }\n }\n\n // Validate props against the component's schema. When props is omitted,\n // validate an empty object so the schema decides whether props are\n // required (e.g. `slide` needs none; `text` requires text).\n const propsPath = `${childPath}/props`;\n if (child.props != null) {\n errors.push(\n ...validateComponentProps(child.name, child.props, propsPath, opts)\n );\n } else {\n errors.push(...validateComponentProps(child.name, {}, propsPath, opts));\n }\n\n const def = getPptxStandardComponent(child.name);\n if (def && !def.hasChildren && child.children != null) {\n errors.push({\n path: `${childPath}/children`,\n message: `Component \"${child.name}\" does not accept children`,\n code: 'invalid_value',\n });\n return;\n }\n\n // Recurse so arbitrarily nested containers are covered.\n walkComponentTree(child, childPath, opts, errors);\n };\n\n const parentDef = getPptxStandardComponent(node.name);\n\n // A slide's `placeholders` record maps placeholder names to full components\n // ({ \"title\": { \"name\": \"text\", ... } }). The static SlidePropsSchema does\n // not include the field (it is injected with the recursive ref at schema\n // generation time), so validateComponentProps strips it before checking the\n // slide's own props — each value is validated here instead.\n if (node.name === 'slide' && node.props && typeof node.props === 'object') {\n const placeholders = node.props.placeholders;\n if (\n placeholders &&\n typeof placeholders === 'object' &&\n !Array.isArray(placeholders)\n ) {\n for (const [key, child] of Object.entries(placeholders)) {\n validateEntry(child, `${path}/props/placeholders/${key}`);\n }\n } else if (placeholders != null) {\n errors.push({\n path: `${path}/props/placeholders`,\n message:\n 'Field \"placeholders\" must be an object mapping placeholder names to components',\n code: 'invalid_type',\n });\n }\n }\n\n if (Array.isArray(node.children)) {\n node.children.forEach((child: any, i: number) => {\n const childPath = `${path}/children/${i}`;\n // Enforce the registry's container narrowing (pptx → slide,\n // slide → content) for known components; unknown names are already\n // reported by validateComponentProps inside validateEntry.\n if (\n parentDef?.allowedChildren &&\n child &&\n typeof child === 'object' &&\n typeof child.name === 'string' &&\n getPptxStandardComponent(child.name) &&\n !parentDef.allowedChildren.includes(child.name)\n ) {\n const expected = parentDef.allowedChildren\n .map((n) => `\"${n}\"`)\n .join(', ');\n errors.push({\n path: `${childPath}/name`,\n message: `Component \"${child.name}\" is not allowed inside \"${node.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n validateEntry(child, childPath);\n });\n } else if (node.children != null && path !== '') {\n // `children` is present but not an array on a nested container. The root's\n // `children` is already checked by deepValidatePresentation (skipped here\n // via `path !== ''` so it is not reported twice).\n errors.push({\n path: `${path}/children`,\n message: 'Field \"children\" must be an array',\n code: 'invalid_type',\n });\n }\n}\n\n/**\n * Validate a component's props against its schema.\n */\nfunction validateComponentProps(\n componentName: string,\n props: any,\n basePath: string,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const schema = COMPONENT_SCHEMAS[componentName];\n if (!schema) {\n // Unknown component type. `basePath` always ends in `/props`; anchor the\n // swap to the end so a nested path like `…/props/placeholders/title/props`\n // becomes `…/props/placeholders/title/name` rather than mangling an\n // earlier `/props`.\n errors.push({\n path: basePath.replace(/\\/props$/, '/name'),\n message: `Unknown component \"${componentName}\"`,\n code: 'unknown_component',\n });\n return errors;\n }\n\n // A slide's `placeholders` field is injected at schema-generation time and\n // absent from the static props schema; its values are walked separately, so\n // strip it here to avoid a false additionalProperties rejection.\n let toCheck = props;\n if (\n componentName === 'slide' &&\n props &&\n typeof props === 'object' &&\n 'placeholders' in props\n ) {\n const rest = { ...props };\n delete rest.placeholders;\n toCheck = rest;\n }\n\n // When unknown fields are explicitly allowed, strip them before checking so\n // additionalProperties:false no longer rejects — required/typed fields are\n // still enforced.\n if (opts.allowUnknownFields) {\n toCheck = Value.Clean(schema, Value.Clone(toCheck));\n }\n\n if (!Value.Check(schema, toCheck)) {\n const valueErrors = [...Value.Errors(schema, toCheck)];\n const transformedErrors = transformValueErrors(valueErrors, {\n maxErrors: 100,\n });\n\n // Adjust paths to be relative to the document root\n transformedErrors.forEach((error) => {\n const fullPath =\n error.path === 'root'\n ? basePath\n : `${basePath}${error.path.startsWith('/') ? error.path : '/' + error.path}`;\n\n errors.push({\n ...error,\n path: fullPath,\n });\n });\n }\n\n return errors;\n}\n\n/**\n * Combine deep validation with standard validation.\n *\n * Deep validation produces precise, path-aware errors. TypeBox's discriminated-\n * union check, by contrast, often collapses any failure under the root into a\n * single generic \"Invalid component configuration for 'pptx'\" message at\n * `root` — useful as a signal that something is wrong, but actionable only via\n * the deep-validator's output. We always strip that catch-all so it doesn't\n * appear alongside (or, worse, instead of) the real diagnostics.\n */\nexport function comprehensiveValidatePresentation(\n data: any,\n existingErrors: ValidationError[] = [],\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const deepErrors = deepValidatePresentation(data, opts);\n\n const filteredExisting = existingErrors.filter(\n (e) => !isGenericUnionCatchAll(e)\n );\n\n return deduplicateErrors([...filteredExisting, ...deepErrors]);\n}\n\n/**\n * Detect TypeBox's generic union/discriminator catch-all error at the document\n * root. These messages name the component type ('pptx') but give no actionable\n * detail — the deep validator emits the actual path-level errors instead.\n */\nfunction isGenericUnionCatchAll(error: ValidationError): boolean {\n const atRoot = !error.path || error.path === 'root' || error.path === '/';\n if (!atRoot) return false;\n const msg = error.message || '';\n return (\n /invalid (component|module) configurations?/i.test(msg) ||\n /invalid document structure/i.test(msg)\n );\n}\n\n/**\n * Deduplicate errors by path and message.\n */\nfunction deduplicateErrors(errors: ValidationError[]): ValidationError[] {\n const seen = new Set<string>();\n const unique: ValidationError[] = [];\n\n for (const error of errors) {\n const key = `${error.path}:${error.message}`;\n if (!seen.has(key)) {\n seen.add(key);\n unique.push(error);\n }\n }\n\n return unique;\n}\n","export const PPTX_SHARED_VERSION = '1.0.0';\n\n// Component Schemas\nexport {\n PositionSchema,\n SlideBackgroundSchema,\n TransitionSchema,\n VerticalAlignmentSchema,\n ShadowSchema,\n PresentationPropsSchema,\n SlidePropsSchema,\n TextPropsSchema,\n PptxImagePropsSchema,\n ShapePropsSchema,\n ShapeTypeSchema,\n PptxTablePropsSchema,\n PptxHighchartsPropsSchema,\n PptxStandardComponentDefinitionSchema,\n PptxComponentDefinitionSchema,\n PptxSlideContentSchema,\n} from './schemas/components';\n\nexport type {\n Position,\n SlideBackground,\n Transition,\n VerticalAlignment,\n Shadow,\n PresentationProps,\n SlideProps,\n TextProps,\n PptxImageProps,\n ShapeType,\n ShapeProps,\n TextSegment,\n PptxTableProps,\n PptxHighchartsProps,\n PptxComponentDefinition,\n PptxSlideContent,\n} from './schemas/components';\n\n// Chart (not re-exported from components barrel)\nexport { PptxChartPropsSchema } from './schemas/components/chart';\nexport type { PptxChartProps } from './schemas/components/chart';\n\n// Component Registry\nexport {\n PPTX_STANDARD_COMPONENTS_REGISTRY,\n getPptxStandardComponent,\n getAllPptxComponentNames,\n getPptxComponentsByCategory,\n getPptxContainerComponents,\n getPptxContentComponents,\n isPptxStandardComponent,\n createPptxComponentSchemaObject,\n createAllPptxComponentSchemas,\n} from './schemas/component-registry';\n\nexport type { PptxStandardComponentDefinition } from './schemas/component-registry';\n\n// Document Schema\nexport {\n PptxJsonComponentDefinitionSchema,\n PPTX_JSON_SCHEMA_URLS,\n} from './schemas/document';\n\nexport type { PptxJsonComponentDefinition } from './schemas/document';\n\n// Schema Export Metadata\nexport {\n PPTX_COMPONENT_METADATA,\n PPTX_BASE_SCHEMA_METADATA,\n} from './schemas/export';\n\n// Component Defaults\nexport {\n PptxComponentDefaultsSchema,\n TextComponentDefaultsSchema,\n ImageComponentDefaultsSchema,\n ShapeComponentDefaultsSchema,\n TableComponentDefaultsSchema,\n HighchartsComponentDefaultsSchema,\n ChartComponentDefaultsSchema,\n} from './schemas/component-defaults';\nexport type {\n PptxComponentDefaults,\n TextComponentDefaults,\n ImageComponentDefaults,\n ShapeComponentDefaults,\n TableComponentDefaults,\n HighchartsComponentDefaults,\n ChartComponentDefaults,\n} from './schemas/component-defaults';\n\n// Theme\nexport {\n ThemeConfigSchema,\n ColorValueSchema,\n SEMANTIC_COLOR_NAMES,\n SEMANTIC_COLOR_ALIASES,\n STYLE_NAMES,\n StyleNameSchema,\n TextStyleSchema,\n isValidThemeConfig,\n} from './schemas/theme';\nexport type { ThemeConfigJson, StyleName, TextStyle } from './schemas/theme';\n\n// Schema Generator\nexport { generateUnifiedDocumentSchema } from './schemas/generator';\nexport type {\n VersionedPropsEntry,\n CustomComponentInfo,\n GenerateSchemaOptions,\n} from './schemas/generator';\n\n// Types\nexport type { ReportComponent } from './types/components';\n\n// Image source conflict detection (path/base64/svg mutual exclusivity)\nexport {\n collectImageSourceConflicts,\n presentImageSources,\n} from './validation/image-source-conflicts';\n\n// Unified validation facade (deep, path-aware validation of whole presentations\n// and themes) — the API the CLI's `pptx validate` consumes.\nexport {\n validate,\n validateStrict,\n validatePresentationDocument,\n validateJsonPresentationDocument,\n validatePptxTheme,\n validateJsonPptxTheme,\n deepValidatePresentation,\n comprehensiveValidatePresentation,\n} from './validation/unified';\nexport type {\n PptxValidationResult,\n DeepValidateOptions,\n} from './validation/unified';\n\n// Re-export shared validation utilities for convenience\nexport {\n transformValueError,\n transformValueErrors,\n DEFAULT_ERROR_CONFIG,\n createErrorConfig,\n} from '@json-to-office/shared';\n\nexport type {\n ErrorFormatterConfig,\n ValidationError,\n} from '@json-to-office/shared';\n\n// Re-export shared utilities\nexport {\n latestVersion,\n isValidSemver,\n parseSemver,\n compareSemver,\n} from '@json-to-office/shared';\nexport type { ParsedSemver } from '@json-to-office/shared';\n\n// Re-export schema utils\nexport {\n fixSchemaReferences,\n convertToJsonSchema,\n createComponentSchema,\n exportSchemaToFile,\n} from '@json-to-office/shared';\nexport type { ComponentSchemaConfig } from '@json-to-office/shared';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,sBAAsB,CAAC,QAAQ,UAAU,KAAK;AAK7C,SAAS,oBAAoB,OAA0B;AAC5D,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO,CAAC;AACjD,QAAM,IAAI;AACV,SAAO,oBAAoB,OAAO,CAAC,MAAM;AACvC,UAAM,IAAI,EAAE,CAAC;AACb,WAAO,OAAO,MAAM,YAAY,EAAE,KAAK,EAAE,SAAS;AAAA,EACpD,CAAC;AACH;AAKO,SAAS,4BAA4B,MAAkC;AAC5E,QAAM,SAA4B,CAAC;AAEnC,QAAM,QAAQ,CAAC,MAAW,SAAuB;AAC/C,QAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAK,QAAQ,CAAC,MAAM,MAAM,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;AACrD;AAAA,IACF;AACA,QAAI,CAAC,QAAQ,OAAO,SAAS,SAAU;AAEvC,QAAI,KAAK,SAAS,SAAS;AACzB,YAAM,UAAU,oBAAoB,KAAK,KAAK;AAC9C,UAAI,QAAQ,SAAS,GAAG;AACtB,eAAO,KAAK;AAAA,UACV,MAAM,GAAG,IAAI;AAAA,UACb,SAAS,sDAAsD,QAC5D,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EACnB,KAAK,IAAI,CAAC;AAAA,UACb,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AAAA,IACF;AAEA,eAAW,OAAO,OAAO,KAAK,IAAI,GAAG;AACnC,YAAM,KAAK,GAAG,GAAG,G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D,MAAI,MAAO,QAAO,EAAE,OAAO,OAAO,QAAQ,CAAC,KAAK,EAAE;AAClD,SAAO,kBAAkB,MAAM;AACjC;AAKO,IAAM,WAAW;AAAA,EACtB,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAAA,EAC1E,YAAY,CAAC,SAAkB,6BAA6B,IAAI,EAAE;AAAA,EAClE,SAAS,CAAC,SAAkB,kBAAkB,IAAI,EAAE;AACtD;AAOO,IAAM,iBAAiB;AAAA,EAC5B,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAC5E;;;AEQA;AAAA,EACE;AAAA,EACA,wBAAAC;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAzKA,IAAM,sBAAsB;","names":["Value","transformValueErrors","Value","transformValueErrors","transformValueErrors"]}
@@ -9,7 +9,7 @@ import {
9
9
  getPptxContentComponents,
10
10
  getPptxStandardComponent,
11
11
  isPptxStandardComponent
12
- } from "../chunk-UVET7RT3.js";
12
+ } from "../chunk-I3XL4HX7.js";
13
13
  import "../chunk-STLETJGO.js";
14
14
  export {
15
15
  PPTX_STANDARD_COMPONENTS_REGISTRY,
@@ -2,8 +2,8 @@ import {
2
2
  PptxComponentDefinitionSchema,
3
3
  PptxSlideContentSchema,
4
4
  PptxStandardComponentDefinitionSchema
5
- } from "../chunk-BJP72XV3.js";
6
- import "../chunk-UVET7RT3.js";
5
+ } from "../chunk-5ER63EW5.js";
6
+ import "../chunk-I3XL4HX7.js";
7
7
  import "../chunk-STLETJGO.js";
8
8
  export {
9
9
  PptxComponentDefinitionSchema,
@@ -48,7 +48,322 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
48
48
  author: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
49
49
  subject: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
50
50
  company: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
51
- theme: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
51
+ theme: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
52
+ name: _sinclair_typebox.TString;
53
+ colors: _sinclair_typebox.TObject<{
54
+ primary: _sinclair_typebox.TString;
55
+ secondary: _sinclair_typebox.TString;
56
+ accent: _sinclair_typebox.TString;
57
+ background: _sinclair_typebox.TString;
58
+ text: _sinclair_typebox.TString;
59
+ text2: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
60
+ background2: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
61
+ accent4: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
62
+ accent5: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
63
+ accent6: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
64
+ }>;
65
+ fonts: _sinclair_typebox.TObject<{
66
+ heading: _sinclair_typebox.TString;
67
+ body: _sinclair_typebox.TString;
68
+ }>;
69
+ defaults: _sinclair_typebox.TObject<{
70
+ fontSize: _sinclair_typebox.TNumber;
71
+ fontColor: _sinclair_typebox.TString;
72
+ }>;
73
+ styles: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
74
+ [x: string]: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
75
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
76
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
77
+ fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
78
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
79
+ fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
80
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
81
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
82
+ lineSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
83
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
84
+ paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
85
+ }>>;
86
+ }>>;
87
+ componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
88
+ text: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
89
+ text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
90
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
91
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
92
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
93
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
94
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
95
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
96
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
97
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
98
+ fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
99
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
100
+ underline: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TObject<{
101
+ style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sng">, _sinclair_typebox.TLiteral<"dbl">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dotted">]>>;
102
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
103
+ }>]>>;
104
+ strike: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
105
+ language: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
106
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
107
+ valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
108
+ breakLine: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
109
+ bullet: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TObject<{
110
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bullet">, _sinclair_typebox.TLiteral<"number">]>>;
111
+ style: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
112
+ startAt: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
113
+ }>]>>;
114
+ margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
115
+ rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
116
+ shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
117
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
118
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
119
+ blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
120
+ offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
121
+ angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
122
+ opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
123
+ }>>;
124
+ fill: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
125
+ color: _sinclair_typebox.TString;
126
+ transparency: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
127
+ }>>;
128
+ hyperlink: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
129
+ url: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
130
+ slide: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
131
+ tooltip: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
132
+ }>>;
133
+ lineSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
134
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
135
+ paraSpaceBefore: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
136
+ paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
137
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
138
+ column: _sinclair_typebox.TNumber;
139
+ row: _sinclair_typebox.TNumber;
140
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
141
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
142
+ }>>;
143
+ style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>>;
144
+ }>>;
145
+ image: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
146
+ path: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
147
+ base64: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
148
+ svg: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
149
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
150
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
151
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
152
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
153
+ sizing: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
154
+ type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"contain">, _sinclair_typebox.TLiteral<"cover">, _sinclair_typebox.TLiteral<"crop">]>;
155
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
156
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
157
+ }>>;
158
+ rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
159
+ rounding: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
160
+ shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
161
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
162
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
163
+ blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
164
+ offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
165
+ angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
166
+ opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
167
+ }>>;
168
+ hyperlink: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
169
+ url: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
170
+ slide: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
171
+ tooltip: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
172
+ }>>;
173
+ alt: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
174
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
175
+ column: _sinclair_typebox.TNumber;
176
+ row: _sinclair_typebox.TNumber;
177
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
178
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
179
+ }>>;
180
+ }>>;
181
+ shape: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
182
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"rect">, _sinclair_typebox.TLiteral<"roundRect">, _sinclair_typebox.TLiteral<"ellipse">, _sinclair_typebox.TLiteral<"triangle">, _sinclair_typebox.TLiteral<"diamond">, _sinclair_typebox.TLiteral<"pentagon">, _sinclair_typebox.TLiteral<"hexagon">, _sinclair_typebox.TLiteral<"star5">, _sinclair_typebox.TLiteral<"star6">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"arrow">, _sinclair_typebox.TLiteral<"chevron">, _sinclair_typebox.TLiteral<"cloud">, _sinclair_typebox.TLiteral<"heart">, _sinclair_typebox.TLiteral<"lightning">]>>;
183
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
184
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
185
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
186
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
187
+ fill: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
188
+ color: _sinclair_typebox.TString;
189
+ transparency: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
190
+ }>>;
191
+ line: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
192
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
193
+ width: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
194
+ dashType: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"dashDot">]>>;
195
+ }>>;
196
+ text: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
197
+ text: _sinclair_typebox.TString;
198
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
199
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
200
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
201
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
202
+ fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
203
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
204
+ breakLine: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
205
+ spaceBefore: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
206
+ spaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
207
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
208
+ }>>]>>;
209
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
210
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
211
+ fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
212
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
213
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
214
+ fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
215
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
216
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
217
+ valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
218
+ rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
219
+ shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
220
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
221
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
222
+ blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
223
+ offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
224
+ angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
225
+ opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
226
+ }>>;
227
+ rectRadius: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
228
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
229
+ column: _sinclair_typebox.TNumber;
230
+ row: _sinclair_typebox.TNumber;
231
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
232
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
233
+ }>>;
234
+ style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>>;
235
+ }>>;
236
+ table: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
237
+ rows: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
238
+ text: _sinclair_typebox.TString;
239
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
240
+ fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
241
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
242
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
243
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
244
+ fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
245
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
246
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
247
+ valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
248
+ colspan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
249
+ rowspan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
250
+ margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
251
+ }>]>>>>;
252
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
253
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
254
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
255
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
256
+ colW: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
257
+ rowH: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
258
+ border: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
259
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
260
+ pt: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
261
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
262
+ }>>;
263
+ fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
264
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
265
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
266
+ color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
267
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
268
+ valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
269
+ autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
270
+ autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
271
+ margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
272
+ borderRadius: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
273
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
274
+ column: _sinclair_typebox.TNumber;
275
+ row: _sinclair_typebox.TNumber;
276
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
277
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
278
+ }>>;
279
+ }>>;
280
+ highcharts: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
281
+ options: _sinclair_typebox.TOptional<_sinclair_typebox.TIntersect<[_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>, _sinclair_typebox.TObject<{
282
+ chart: _sinclair_typebox.TObject<{
283
+ width: _sinclair_typebox.TNumber;
284
+ height: _sinclair_typebox.TNumber;
285
+ }>;
286
+ }>]>>;
287
+ scale: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
288
+ serverUrl: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
289
+ resources: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
290
+ css: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
291
+ js: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
292
+ files: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
293
+ }>>;
294
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
295
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
296
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
297
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
298
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
299
+ column: _sinclair_typebox.TNumber;
300
+ row: _sinclair_typebox.TNumber;
301
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
302
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
303
+ }>>;
304
+ }>>;
305
+ chart: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
306
+ type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"area">, _sinclair_typebox.TLiteral<"bar">, _sinclair_typebox.TLiteral<"bar3D">, _sinclair_typebox.TLiteral<"bubble">, _sinclair_typebox.TLiteral<"doughnut">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"pie">, _sinclair_typebox.TLiteral<"radar">, _sinclair_typebox.TLiteral<"scatter">]>>;
307
+ data: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
308
+ name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
309
+ labels: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
310
+ values: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
311
+ sizes: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
312
+ }>>>;
313
+ showLegend: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
314
+ showTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
315
+ showValue: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
316
+ showPercent: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
317
+ showLabel: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
318
+ showSerName: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
319
+ title: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
320
+ titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
321
+ titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
322
+ titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
323
+ chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
324
+ 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">]>>;
325
+ legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
326
+ legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
327
+ legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
328
+ catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
329
+ catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
330
+ catAxisLabelRotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
331
+ catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
332
+ catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
333
+ valAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
334
+ valAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
335
+ valAxisMinVal: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
336
+ valAxisMaxVal: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
337
+ valAxisLabelFormatCode: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
338
+ valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
339
+ valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
340
+ barDir: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bar">, _sinclair_typebox.TLiteral<"col">]>>;
341
+ barGrouping: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"clustered">, _sinclair_typebox.TLiteral<"stacked">, _sinclair_typebox.TLiteral<"percentStacked">]>>;
342
+ barGapWidthPct: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
343
+ lineSmooth: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
344
+ lineDataSymbol: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"circle">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"diamond">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"triangle">]>>;
345
+ lineSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
346
+ firstSliceAng: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
347
+ holeSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
348
+ radarStyle: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"standard">, _sinclair_typebox.TLiteral<"marker">, _sinclair_typebox.TLiteral<"filled">]>>;
349
+ dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
350
+ dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
351
+ dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
352
+ dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
353
+ 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">]>>;
354
+ x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
355
+ y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
356
+ w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
357
+ h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
358
+ grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
359
+ column: _sinclair_typebox.TNumber;
360
+ row: _sinclair_typebox.TNumber;
361
+ columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
362
+ rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
363
+ }>>;
364
+ }>>;
365
+ }>>;
366
+ }>]>>;
52
367
  slideWidth: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
53
368
  slideHeight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
54
369
  rtlMode: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
@@ -3,11 +3,11 @@ import {
3
3
  PptxComponentDefinitionSchema,
4
4
  PptxSlideContentSchema,
5
5
  PptxStandardComponentDefinitionSchema
6
- } from "../chunk-BJP72XV3.js";
6
+ } from "../chunk-5ER63EW5.js";
7
7
  import {
8
8
  PresentationPropsSchema,
9
9
  SlidePropsSchema
10
- } from "../chunk-UVET7RT3.js";
10
+ } from "../chunk-I3XL4HX7.js";
11
11
  import {
12
12
  GridPositionSchema,
13
13
  PositionSchema,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  PPTX_JSON_SCHEMA_URLS,
3
3
  PptxJsonComponentDefinitionSchema
4
- } from "../chunk-2R6VYDG2.js";
4
+ } from "../chunk-7MPP5MFF.js";
5
5
  import "../chunk-J4OT5Y5B.js";
6
- import "../chunk-BJP72XV3.js";
7
- import "../chunk-UVET7RT3.js";
6
+ import "../chunk-5ER63EW5.js";
7
+ import "../chunk-I3XL4HX7.js";
8
8
  import "../chunk-STLETJGO.js";
9
9
  export {
10
10
  PPTX_JSON_SCHEMA_URLS,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateUnifiedDocumentSchema
3
- } from "../chunk-GUSMSJT6.js";
4
- import "../chunk-UVET7RT3.js";
3
+ } from "../chunk-YKBPU4GM.js";
4
+ import "../chunk-I3XL4HX7.js";
5
5
  import "../chunk-STLETJGO.js";
6
6
  export {
7
7
  generateUnifiedDocumentSchema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-to-office/shared-pptx",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "PPTX-specific schemas, component registry and validation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schemas/component-registry.ts","../src/schemas/components/presentation.ts","../src/schemas/components/template.ts","../src/schemas/components/slide.ts"],"sourcesContent":["/**\n * PPTX Component Registry - SINGLE SOURCE OF TRUTH\n *\n * This is the ONLY place where standard PPTX components are defined.\n * All schema generators MUST use this registry.\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\n\n/**\n * Component definition with metadata\n */\nexport interface PptxStandardComponentDefinition {\n name: string;\n propsSchema: TSchema;\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 hasPlaceholders?: boolean;\n category: 'container' | 'content' | 'layout';\n description: string;\n special?: {\n hasSchemaField?: boolean;\n };\n}\nimport { PresentationPropsSchema } from './components/presentation';\nimport { SlidePropsSchema } from './components/slide';\nimport { TextPropsSchema } from './components/text';\nimport { PptxImagePropsSchema } from './components/image';\nimport { ShapePropsSchema } from './components/shape';\nimport { PptxTablePropsSchema } from './components/table';\nimport { PptxHighchartsPropsSchema } from './components/highcharts';\nimport { PptxChartPropsSchema } from './components/chart';\n\n/**\n * SINGLE SOURCE OF TRUTH for all standard PPTX components\n */\nexport const PPTX_STANDARD_COMPONENTS_REGISTRY: readonly PptxStandardComponentDefinition[] =\n [\n // ========================================================================\n // Container Components (can contain children)\n // ========================================================================\n {\n name: 'pptx',\n propsSchema: PresentationPropsSchema,\n hasChildren: true,\n allowedChildren: ['slide'],\n category: 'container',\n description:\n 'Main presentation container - defines the overall presentation structure. Required as the root component.',\n special: {\n hasSchemaField: true,\n },\n },\n {\n name: 'slide',\n propsSchema: SlidePropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'text',\n 'image',\n 'shape',\n 'table',\n 'highcharts',\n 'chart',\n ],\n hasPlaceholders: true,\n category: 'container',\n description:\n 'Slide container - groups content elements on a single slide.',\n },\n\n // ========================================================================\n // Content Components (leaf nodes, no children)\n // ========================================================================\n {\n name: 'text',\n propsSchema: TextPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Text element - displays text with formatting, positioning and styling options.',\n },\n {\n name: 'image',\n propsSchema: PptxImagePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Image element - displays images from file path, URL, or base64 data.',\n },\n {\n name: 'shape',\n propsSchema: ShapePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Shape element - draws geometric shapes with optional text, fill, and line styling.',\n },\n {\n name: 'table',\n propsSchema: PptxTablePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Table element - displays tabular data with rows and columns.',\n },\n {\n name: 'highcharts',\n propsSchema: PptxHighchartsPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Highcharts element - renders charts via Highcharts Export Server.',\n },\n {\n name: 'chart',\n propsSchema: PptxChartPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Native PowerPoint chart - editable, scalable, no external server needed.',\n },\n ] as const;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\nexport function getPptxStandardComponent(\n name: string\n): PptxStandardComponentDefinition | undefined {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);\n}\n\nexport function getAllPptxComponentNames(): readonly string[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);\n}\n\nexport function getPptxComponentsByCategory(\n category: PptxStandardComponentDefinition['category']\n): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter(\n (c) => c.category === category\n );\n}\n\nexport function getPptxContainerComponents(): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n}\n\nexport function getPptxContentComponents(): readonly PptxStandardComponentDefinition[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);\n}\n\nexport function isPptxStandardComponent(name: string): boolean {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);\n}\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\nexport function createPptxComponentSchemaObject(\n component: PptxStandardComponentDefinition,\n recursiveRef?: TSchema,\n placeholderRef?: 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.',\n })\n ),\n };\n\n if (component.special?.hasSchemaField) {\n schema.$schema = Type.Optional(Type.String({ format: 'uri' }));\n }\n\n schema.props = component.propsSchema;\n\n if (component.hasChildren && recursiveRef) {\n schema.children = Type.Optional(Type.Array(recursiveRef));\n }\n\n if (component.hasPlaceholders && (placeholderRef ?? recursiveRef)) {\n const baseProperties = (component.propsSchema as any).properties ?? {};\n const phRef = placeholderRef ?? recursiveRef!;\n schema.props = Type.Object(\n {\n ...baseProperties,\n placeholders: Type.Optional(\n Type.Record(Type.String(), phRef, {\n description:\n 'Content for named placeholders: { \"title\": { \"name\": \"text\", ... } }',\n })\n ),\n },\n {\n additionalProperties: false,\n description: (component.propsSchema as any).description,\n }\n );\n }\n\n return Type.Object(schema, { additionalProperties: false });\n}\n\nexport function createAllPptxComponentSchemas(\n recursiveRef?: TSchema\n): readonly TSchema[] {\n return PPTX_STANDARD_COMPONENTS_REGISTRY.map((component) =>\n createPptxComponentSchemaObject(component, recursiveRef)\n );\n}\n\n/**\n * Build all standard PPTX 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 (fallback and for plugin children)\n * @param pluginSchemas - Plugin component schemas (always allowed in all containers)\n * @returns Array of TypeBox schemas with narrowed children per container\n */\nexport function createAllPptxComponentSchemasNarrowed(\n selfRef: TSchema,\n pluginSchemas: TSchema[] = []\n): TSchema[] {\n // Phase 1: Build leaf (non-container) component schemas — no children\n const leafSchemas = new Map<string, TSchema>();\n for (const comp of PPTX_STANDARD_COMPONENTS_REGISTRY) {\n if (!comp.hasChildren) {\n leafSchemas.set(\n comp.name,\n createPptxComponentSchemaObject(comp, undefined, selfRef)\n );\n }\n }\n\n // Phase 2: Resolve containers in dependency order\n const containers = PPTX_STANDARD_COMPONENTS_REGISTRY.filter(\n (c) => c.hasChildren\n );\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 createPptxComponentSchemaObject(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 createPptxComponentSchemaObject(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 return [...resolved.values(), ...leafSchemas.values()];\n}\n","/**\n * Presentation Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { TemplateSlideDefinitionSchema } from './template';\nimport { GridConfigSchema } from '../theme';\nimport { PptxComponentDefaultsSchema } from '../component-defaults';\n\nexport const PresentationPropsSchema = Type.Object(\n {\n title: Type.Optional(\n Type.String({ description: 'Presentation title metadata' })\n ),\n author: Type.Optional(\n Type.String({ description: 'Presentation author metadata' })\n ),\n subject: Type.Optional(\n Type.String({ description: 'Presentation subject metadata' })\n ),\n company: Type.Optional(\n Type.String({ description: 'Company name metadata' })\n ),\n theme: Type.Optional(\n Type.String({\n description: 'Theme name to apply (default: \"default\")',\n default: 'default',\n })\n ),\n slideWidth: Type.Optional(\n Type.Number({\n description: 'Slide width in inches (default: 10)',\n default: 10,\n })\n ),\n slideHeight: Type.Optional(\n Type.Number({\n description: 'Slide height in inches (default: 7.5)',\n default: 7.5,\n })\n ),\n rtlMode: Type.Optional(\n Type.Boolean({ description: 'Right-to-left text direction' })\n ),\n language: Type.Optional(\n Type.String({\n pattern: '^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$',\n description:\n 'Default presentation language (BCP-47 tag, e.g. \"en-US\"). Sets the spell-check language for all text; individual text components can override it.',\n examples: ['en-US', 'fr-FR', 'de-DE', 'it-IT', 'es-ES'],\n })\n ),\n pageNumberFormat: Type.Optional(\n Type.Union([Type.Literal('9'), Type.Literal('09')], {\n description:\n 'Format for {PAGE_NUMBER} placeholders: \"9\" = bare number (default), \"09\" = zero-padded',\n default: '9',\n })\n ),\n componentDefaults: Type.Optional(PptxComponentDefaultsSchema),\n grid: Type.Optional(GridConfigSchema),\n templates: Type.Optional(\n Type.Array(TemplateSlideDefinitionSchema, {\n description: 'Template slide definitions (reusable slide templates)',\n })\n ),\n },\n {\n description: 'Presentation container props',\n additionalProperties: false,\n }\n);\n\nexport type PresentationProps = Static<typeof PresentationPropsSchema>;\n","/**\n * Template Slide Definition Schemas\n */\n\nimport { Type, Static, TSchema } from '@sinclair/typebox';\nimport { SlideBackgroundSchema, GridPositionSchema } from './common';\nimport { ColorValueSchema, GridConfigSchema } from '../theme';\nimport { TextPropsSchema } from './text';\nimport { PptxImagePropsSchema } from './image';\nimport { ShapePropsSchema } from './shape';\nimport { PptxTablePropsSchema } from './table';\nimport { PptxChartPropsSchema } from './chart';\nimport { PptxHighchartsPropsSchema } from './highcharts';\n\n// Position helpers (number in inches OR percentage string e.g. \"50%\")\nconst Coord = Type.Union([\n Type.Number({ description: 'Position/size in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Position/size as percentage of slide dimension (e.g., \"50%\")',\n }),\n]);\n\n// Helper: wrap a props schema into { name, props } component format\nfunction contentComponent(name: string, propsSchema: TSchema) {\n return Type.Object({\n name: Type.Literal(name),\n id: Type.Optional(Type.String()),\n enabled: Type.Optional(Type.Boolean({\n default: true,\n description: 'When false, this component is filtered out and not rendered. Defaults to true.',\n })),\n props: propsSchema,\n }, { additionalProperties: false });\n}\n\n// Content component union — same { name, props } format as slide children\nconst TemplateObjectComponentSchema = Type.Union([\n contentComponent('text', TextPropsSchema),\n contentComponent('image', PptxImagePropsSchema),\n contentComponent('shape', ShapePropsSchema),\n contentComponent('table', PptxTablePropsSchema),\n contentComponent('chart', PptxChartPropsSchema),\n contentComponent('highcharts', PptxHighchartsPropsSchema),\n], {\n discriminator: { propertyName: 'name' },\n description: 'Fixed component on a template slide (same format as slide children)',\n});\n\n// Defaults schema — partial component stub (carries styling props, not content)\n// Discriminated union so Monaco can autocomplete prop names per component type\nfunction defaultsComponent(name: string, propsSchema: TSchema) {\n return Type.Object({\n name: Type.Literal(name),\n props: Type.Partial(propsSchema, { description: 'Default props inherited by the component placed in this placeholder' }),\n }, { additionalProperties: false });\n}\n\nconst PlaceholderDefaultsSchema = Type.Union([\n defaultsComponent('text', TextPropsSchema),\n defaultsComponent('image', PptxImagePropsSchema),\n defaultsComponent('shape', ShapePropsSchema),\n defaultsComponent('table', PptxTablePropsSchema),\n defaultsComponent('chart', PptxChartPropsSchema),\n defaultsComponent('highcharts', PptxHighchartsPropsSchema),\n], {\n discriminator: { propertyName: 'name' },\n description: 'Partial component stub — styling defaults only',\n});\n\n// Placeholder definition\nexport const PlaceholderDefinitionSchema = Type.Object({\n name: Type.String({ description: 'Unique placeholder name' }),\n x: Type.Optional(Coord),\n y: Type.Optional(Coord),\n w: Type.Optional(Coord),\n h: Type.Optional(Coord),\n grid: Type.Optional(GridPositionSchema),\n defaults: Type.Optional(PlaceholderDefaultsSchema),\n}, { additionalProperties: false, description: 'Placeholder on a template slide — defaults is a component stub whose props are inherited by the actual component' });\n\n// Template slide definition\nexport const TemplateSlideDefinitionSchema = Type.Object({\n name: Type.String({ description: 'Unique template slide name' }),\n background: Type.Optional(SlideBackgroundSchema),\n margin: Type.Optional(Type.Union([\n Type.Number({ description: 'Margin in inches (all sides)' }),\n Type.Array(Type.Number(), { minItems: 4, maxItems: 4, description: 'Margin [top, right, bottom, left] in inches' }),\n ])),\n slideNumber: Type.Optional(Type.Object({\n x: Coord, y: Coord,\n w: Type.Optional(Coord),\n h: Type.Optional(Coord),\n color: Type.Optional(ColorValueSchema),\n fontSize: Type.Optional(Type.Number({ description: 'Slide number font size in points' })),\n }, { additionalProperties: false, description: 'Slide number position and styling' })),\n objects: Type.Optional(Type.Array(TemplateObjectComponentSchema, { description: 'Fixed components (logos, footers, decorations) — same { name, props } format as slide children' })),\n placeholders: Type.Optional(Type.Array(PlaceholderDefinitionSchema, { description: 'Placeholder regions for slide content' })),\n grid: Type.Optional(GridConfigSchema),\n}, { additionalProperties: false, description: 'Template slide definition (reusable slide template)' });\n\nexport type PlaceholderDefinition = Static<typeof PlaceholderDefinitionSchema>;\nexport type TemplateSlideDefinition = Static<typeof TemplateSlideDefinitionSchema>;\n","/**\n * Slide Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { SlideBackgroundSchema, TransitionSchema } from './common';\n\nexport const SlidePropsSchema = Type.Object(\n {\n background: Type.Optional(SlideBackgroundSchema),\n transition: Type.Optional(TransitionSchema),\n notes: Type.Optional(\n Type.String({ description: 'Speaker notes for this slide' })\n ),\n layout: Type.Optional(\n Type.String({\n description: 'Slide layout name (e.g., \"Title Slide\", \"Blank\")',\n })\n ),\n hidden: Type.Optional(\n Type.Boolean({ description: 'Hide this slide from presentation' })\n ),\n template: Type.Optional(\n Type.String({ description: 'Template slide name to apply' })\n ),\n // Note: `placeholders` is added dynamically by the component registry\n // with the recursive component ref, to avoid circular imports.\n },\n {\n description: 'Slide container props',\n additionalProperties: false,\n }\n);\n\nexport type SlideProps = Static<typeof SlidePropsSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,SAAS,QAAAA,aAAqB;;;ACH9B,SAAS,QAAAC,aAAoB;;;ACA7B,SAAS,YAA6B;AAWtC,IAAM,QAAQ,KAAK,MAAM;AAAA,EACvB,KAAK,OAAO,EAAE,aAAa,0BAA0B,CAAC;AAAA,EACtD,KAAK,OAAO;AAAA,IACV,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AAGD,SAAS,iBAAiB,MAAc,aAAsB;AAC5D,SAAO,KAAK,OAAO;AAAA,IACjB,MAAM,KAAK,QAAQ,IAAI;AAAA,IACvB,IAAI,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,IAC/B,SAAS,KAAK,SAAS,KAAK,QAAQ;AAAA,MAClC,SAAS;AAAA,MACT,aAAa;AAAA,IACf,CAAC,CAAC;AAAA,IACF,OAAO;AAAA,EACT,GAAG,EAAE,sBAAsB,MAAM,CAAC;AACpC;AAGA,IAAM,gCAAgC,KAAK,MAAM;AAAA,EAC/C,iBAAiB,QAAQ,eAAe;AAAA,EACxC,iBAAiB,SAAS,oBAAoB;AAAA,EAC9C,iBAAiB,SAAS,gBAAgB;AAAA,EAC1C,iBAAiB,SAAS,oBAAoB;AAAA,EAC9C,iBAAiB,SAAS,oBAAoB;AAAA,EAC9C,iBAAiB,cAAc,yBAAyB;AAC1D,GAAG;AAAA,EACD,eAAe,EAAE,cAAc,OAAO;AAAA,EACtC,aAAa;AACf,CAAC;AAID,SAAS,kBAAkB,MAAc,aAAsB;AAC7D,SAAO,KAAK,OAAO;AAAA,IAC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