@json-to-office/shared-pptx 1.3.0 → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PptxComponentDefaultsSchema
3
- } from "./chunk-7CKCXKN7.js";
3
+ } from "./chunk-Z6NUHS34.js";
4
4
 
5
5
  // src/schemas/theme.ts
6
6
  import { Type } from "@sinclair/typebox";
@@ -159,4 +159,4 @@ export {
159
159
  STYLE_NAMES2 as STYLE_NAMES,
160
160
  StyleNameSchema
161
161
  };
162
- //# sourceMappingURL=chunk-N6CABSXM.js.map
162
+ //# sourceMappingURL=chunk-CS65H3RG.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAllPptxComponentSchemasNarrowed
3
- } from "./chunk-EXPOJ55X.js";
3
+ } from "./chunk-TLD3Z2B2.js";
4
4
  import {
5
5
  DEFAULT_PPTX_RENDERER_ID,
6
6
  PPTX_RENDERER_IDS
@@ -82,4 +82,4 @@ function generateRendererSchema(customComponents, renderer, requireDiscriminator
82
82
  export {
83
83
  generateUnifiedDocumentSchema
84
84
  };
85
- //# sourceMappingURL=chunk-WQAPVKW2.js.map
85
+ //# sourceMappingURL=chunk-EVSOXQHO.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAllPptxComponentSchemas,
3
3
  createAllPptxComponentSchemasNarrowed
4
- } from "./chunk-EXPOJ55X.js";
4
+ } from "./chunk-TLD3Z2B2.js";
5
5
 
6
6
  // src/schemas/component-union.ts
7
7
  import { Type } from "@sinclair/typebox";
@@ -25,4 +25,4 @@ export {
25
25
  PptxComponentDefinitionSchema,
26
26
  PptxSlideContentSchema
27
27
  };
28
- //# sourceMappingURL=chunk-KRLDFNJM.js.map
28
+ //# sourceMappingURL=chunk-F54YIK73.js.map
@@ -6,7 +6,7 @@ import {
6
6
  ColorValueSchema,
7
7
  GridConfigSchema,
8
8
  ThemeConfigSchema
9
- } from "./chunk-N6CABSXM.js";
9
+ } from "./chunk-CS65H3RG.js";
10
10
  import {
11
11
  PptxChartPropsSchema,
12
12
  PptxComponentDefaultsSchema,
@@ -15,7 +15,7 @@ import {
15
15
  PptxTablePropsSchema,
16
16
  ShapePropsSchema,
17
17
  TextPropsSchema
18
- } from "./chunk-7CKCXKN7.js";
18
+ } from "./chunk-Z6NUHS34.js";
19
19
 
20
20
  // src/schemas/component-registry.ts
21
21
  import { Type as Type5 } from "@sinclair/typebox";
@@ -146,72 +146,124 @@ var Coord = Type2.Union([
146
146
  })
147
147
  ]);
148
148
  function contentComponent(name, propsSchema) {
149
- return Type2.Object({
150
- name: Type2.Literal(name),
151
- id: Type2.Optional(Type2.String()),
152
- enabled: Type2.Optional(Type2.Boolean({
153
- default: true,
154
- description: "When false, this component is filtered out and not rendered. Defaults to true."
155
- })),
156
- props: propsSchema
157
- }, { additionalProperties: false });
149
+ return Type2.Object(
150
+ {
151
+ name: Type2.Literal(name),
152
+ id: Type2.Optional(Type2.String()),
153
+ enabled: Type2.Optional(
154
+ Type2.Boolean({
155
+ default: true,
156
+ description: "When false, this component is filtered out and not rendered. Defaults to true."
157
+ })
158
+ ),
159
+ props: propsSchema
160
+ },
161
+ { additionalProperties: false }
162
+ );
158
163
  }
159
- var TemplateObjectComponentSchema = Type2.Union([
160
- contentComponent("text", TextPropsSchema),
161
- contentComponent("image", PptxImagePropsSchema),
162
- contentComponent("shape", ShapePropsSchema),
163
- contentComponent("table", PptxTablePropsSchema),
164
- contentComponent("chart", PptxChartPropsSchema),
165
- contentComponent("highcharts", PptxHighchartsPropsSchema)
166
- ], {
167
- discriminator: { propertyName: "name" },
168
- description: "Fixed component on a template slide (same format as slide children)"
169
- });
164
+ var TemplateObjectComponentSchema = Type2.Union(
165
+ [
166
+ contentComponent("text", TextPropsSchema),
167
+ contentComponent("image", PptxImagePropsSchema),
168
+ contentComponent("shape", ShapePropsSchema),
169
+ contentComponent("table", PptxTablePropsSchema),
170
+ contentComponent("chart", PptxChartPropsSchema),
171
+ contentComponent("highcharts", PptxHighchartsPropsSchema)
172
+ ],
173
+ {
174
+ discriminator: { propertyName: "name" },
175
+ description: "Fixed component on a template slide (same format as slide children)"
176
+ }
177
+ );
170
178
  function defaultsComponent(name, propsSchema) {
171
- return Type2.Object({
172
- name: Type2.Literal(name),
173
- props: Type2.Partial(propsSchema, { description: "Default props inherited by the component placed in this placeholder" })
174
- }, { additionalProperties: false });
179
+ return Type2.Object(
180
+ {
181
+ name: Type2.Literal(name),
182
+ props: Type2.Partial(propsSchema, {
183
+ description: "Default props inherited by the component placed in this placeholder"
184
+ })
185
+ },
186
+ { additionalProperties: false }
187
+ );
175
188
  }
176
- var PlaceholderDefaultsSchema = Type2.Union([
177
- defaultsComponent("text", TextPropsSchema),
178
- defaultsComponent("image", PptxImagePropsSchema),
179
- defaultsComponent("shape", ShapePropsSchema),
180
- defaultsComponent("table", PptxTablePropsSchema),
181
- defaultsComponent("chart", PptxChartPropsSchema),
182
- defaultsComponent("highcharts", PptxHighchartsPropsSchema)
183
- ], {
184
- discriminator: { propertyName: "name" },
185
- description: "Partial component stub \u2014 styling defaults only"
186
- });
187
- var PlaceholderDefinitionSchema = Type2.Object({
188
- name: Type2.String({ description: "Unique placeholder name" }),
189
- x: Type2.Optional(Coord),
190
- y: Type2.Optional(Coord),
191
- w: Type2.Optional(Coord),
192
- h: Type2.Optional(Coord),
193
- grid: Type2.Optional(GridPositionSchema),
194
- defaults: Type2.Optional(PlaceholderDefaultsSchema)
195
- }, { additionalProperties: false, description: "Placeholder on a template slide \u2014 defaults is a component stub whose props are inherited by the actual component" });
196
- var TemplateSlideDefinitionSchema = Type2.Object({
197
- name: Type2.String({ description: "Unique template slide name" }),
198
- background: Type2.Optional(SlideBackgroundSchema),
199
- margin: Type2.Optional(Type2.Union([
200
- Type2.Number({ description: "Margin in inches (all sides)" }),
201
- Type2.Array(Type2.Number(), { minItems: 4, maxItems: 4, description: "Margin [top, right, bottom, left] in inches" })
202
- ])),
203
- slideNumber: Type2.Optional(Type2.Object({
204
- x: Coord,
205
- y: Coord,
189
+ var PlaceholderDefaultsSchema = Type2.Union(
190
+ [
191
+ defaultsComponent("text", TextPropsSchema),
192
+ defaultsComponent("image", PptxImagePropsSchema),
193
+ defaultsComponent("shape", ShapePropsSchema),
194
+ defaultsComponent("table", PptxTablePropsSchema),
195
+ defaultsComponent("chart", PptxChartPropsSchema),
196
+ defaultsComponent("highcharts", PptxHighchartsPropsSchema)
197
+ ],
198
+ {
199
+ discriminator: { propertyName: "name" },
200
+ description: "Partial component stub \u2014 styling defaults only"
201
+ }
202
+ );
203
+ var PlaceholderDefinitionSchema = Type2.Object(
204
+ {
205
+ name: Type2.String({ description: "Unique placeholder name" }),
206
+ x: Type2.Optional(Coord),
207
+ y: Type2.Optional(Coord),
206
208
  w: Type2.Optional(Coord),
207
209
  h: Type2.Optional(Coord),
208
- color: Type2.Optional(ColorValueSchema),
209
- fontSize: Type2.Optional(Type2.Number({ description: "Slide number font size in points" }))
210
- }, { additionalProperties: false, description: "Slide number position and styling" })),
211
- objects: Type2.Optional(Type2.Array(TemplateObjectComponentSchema, { description: "Fixed components (logos, footers, decorations) \u2014 same { name, props } format as slide children" })),
212
- placeholders: Type2.Optional(Type2.Array(PlaceholderDefinitionSchema, { description: "Placeholder regions for slide content" })),
213
- grid: Type2.Optional(GridConfigSchema)
214
- }, { additionalProperties: false, description: "Template slide definition (reusable slide template)" });
210
+ grid: Type2.Optional(GridPositionSchema),
211
+ defaults: Type2.Optional(PlaceholderDefaultsSchema)
212
+ },
213
+ {
214
+ additionalProperties: false,
215
+ description: "Placeholder on a template slide \u2014 defaults is a component stub whose props are inherited by the actual component"
216
+ }
217
+ );
218
+ var TemplateSlideDefinitionSchema = Type2.Object(
219
+ {
220
+ name: Type2.String({ description: "Unique template slide name" }),
221
+ background: Type2.Optional(SlideBackgroundSchema),
222
+ margin: Type2.Optional(
223
+ Type2.Union([
224
+ Type2.Number({ description: "Margin in inches (all sides)" }),
225
+ Type2.Array(Type2.Number(), {
226
+ minItems: 4,
227
+ maxItems: 4,
228
+ description: "Margin [top, right, bottom, left] in inches"
229
+ })
230
+ ])
231
+ ),
232
+ slideNumber: Type2.Optional(
233
+ Type2.Object(
234
+ {
235
+ x: Coord,
236
+ y: Coord,
237
+ w: Type2.Optional(Coord),
238
+ h: Type2.Optional(Coord),
239
+ color: Type2.Optional(ColorValueSchema),
240
+ fontSize: Type2.Optional(
241
+ Type2.Number({ description: "Slide number font size in points" })
242
+ )
243
+ },
244
+ {
245
+ additionalProperties: false,
246
+ description: "Slide number position and styling"
247
+ }
248
+ )
249
+ ),
250
+ objects: Type2.Optional(
251
+ Type2.Array(TemplateObjectComponentSchema, {
252
+ description: "Fixed components (logos, footers, decorations) \u2014 same { name, props } format as slide children"
253
+ })
254
+ ),
255
+ placeholders: Type2.Optional(
256
+ Type2.Array(PlaceholderDefinitionSchema, {
257
+ description: "Placeholder regions for slide content"
258
+ })
259
+ ),
260
+ grid: Type2.Optional(GridConfigSchema)
261
+ },
262
+ {
263
+ additionalProperties: false,
264
+ description: "Template slide definition (reusable slide template)"
265
+ }
266
+ );
215
267
 
216
268
  // src/schemas/components/presentation.ts
217
269
  var PresentationPropsSchema = Type3.Object(
@@ -345,7 +397,7 @@ var PPTX_STANDARD_COMPONENTS_REGISTRY = [
345
397
  // the deep validator have always demanded the key. Keeping it required
346
398
  // is a decision, not the schema's own answer, so it is declared.
347
399
  propsRequired: true,
348
- description: "Main presentation container - defines the overall presentation structure. Required as the root component.",
400
+ description: "Main presentation container - defines the overall presentation structure. Required as the root component. Always declare `slideWidth`/`slideHeight` (13.333 \xD7 7.5 for 16:9) \u2014 omitted, the renderer silently falls back to 4:3 and 16:9 content leaves a dead strip.",
349
401
  special: {
350
402
  hasSchemaField: true
351
403
  }
@@ -360,7 +412,7 @@ var PPTX_STANDARD_COMPONENTS_REGISTRY = [
360
412
  // No `propsRequired`: every slide prop is optional and nothing outside
361
413
  // the schema asks for one, so `{ "name": "slide", "children": [...] }`
362
414
  // is a whole slide and the published schema says so.
363
- description: "Slide container - groups content elements on a single slide."
415
+ description: "Slide container - groups content elements on a single slide. One idea per slide: past roughly 40 words of body text, split the content across more slides."
364
416
  },
365
417
  // Content components are canonical in @json-to-office/shared so DOCX
366
418
  // visuals can reuse the exact schemas without depending on shared-pptx.
@@ -529,4 +581,4 @@ export {
529
581
  createAllPptxComponentSchemas,
530
582
  createAllPptxComponentSchemasNarrowed
531
583
  };
532
- //# sourceMappingURL=chunk-EXPOJ55X.js.map
584
+ //# sourceMappingURL=chunk-TLD3Z2B2.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/common.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';\nimport {\n PPTX_SLIDE_CONTENT_COMPONENTS,\n pptxComponentRequiresProps,\n} from '@json-to-office/shared/schemas/slide-content';\nimport {\n PPTX_RENDERER_IDS,\n pptxPropsSchemaForRenderer,\n type PptxRendererId,\n} from './renderer';\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 /**\n * Force `props` to stay required even though the props schema accepts `{}`.\n * See `pptxComponentRequiresProps` for when that is legitimate.\n */\n propsRequired?: boolean;\n special?: {\n hasSchemaField?: boolean;\n };\n}\nimport { PresentationPropsSchema } from './components/presentation';\nimport { SlidePropsSchema } from './components/slide';\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 // Every presentation prop is optional, but the root is where a deck\n // states its title, size and theme, and both the published schema and\n // the deep validator have always demanded the key. Keeping it required\n // is a decision, not the schema's own answer, so it is declared.\n propsRequired: true,\n description:\n 'Main presentation container - defines the overall presentation structure. Required as the root component. Always declare `slideWidth`/`slideHeight` (13.333 × 7.5 for 16:9) — omitted, the renderer silently falls back to 4:3 and 16:9 content leaves a dead strip.',\n special: {\n hasSchemaField: true,\n },\n },\n {\n name: 'slide',\n propsSchema: SlidePropsSchema,\n hasChildren: true,\n allowedChildren: PPTX_SLIDE_CONTENT_COMPONENTS.map(({ name }) => name),\n hasPlaceholders: true,\n category: 'container',\n // No `propsRequired`: every slide prop is optional and nothing outside\n // the schema asks for one, so `{ \"name\": \"slide\", \"children\": [...] }`\n // is a whole slide and the published schema says so.\n description:\n 'Slide container - groups content elements on a single slide. One idea per slide: past roughly 40 words of body text, split the content across more slides.',\n },\n\n // Content components are canonical in @json-to-office/shared so DOCX\n // visuals can reuse the exact schemas without depending on shared-pptx.\n ...PPTX_SLIDE_CONTENT_COMPONENTS,\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 * Whether this component must carry a `props` key — the one answer both the\n * published schema and the deep validator read.\n *\n * Re-exported from `@json-to-office/shared` so the registry is the single\n * place a consumer has to look: the rule is the props schema's own (a schema\n * that accepts `{}` demands nothing) unless the definition overrides it.\n */\nexport { pptxComponentRequiresProps };\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\nexport function createPptxComponentSchemaObject(\n component: PptxStandardComponentDefinition,\n recursiveRef?: TSchema,\n placeholderRef?: TSchema,\n profile?: { renderer: PptxRendererId; requireDiscriminator: boolean }\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 schema.renderer = profile\n ? profile.requireDiscriminator\n ? Type.Literal(profile.renderer, {\n description: 'Renderer backend for this presentation',\n })\n : Type.Optional(\n Type.Literal(profile.renderer, {\n description: 'Renderer backend. Omitted defaults to \"pptxgenjs\".',\n })\n )\n : Type.Optional(\n Type.Union(\n PPTX_RENDERER_IDS.map((renderer) => Type.Literal(renderer)),\n {\n description: 'Renderer backend. Omitted defaults to \"pptxgenjs\".',\n }\n )\n );\n }\n\n schema.props = profile\n ? pptxPropsSchemaForRenderer(\n component.name,\n component.propsSchema,\n profile.renderer\n )\n : component.propsSchema;\n\n if (component.hasChildren && recursiveRef) {\n schema.children = Type.Optional(Type.Array(recursiveRef));\n }\n\n if (\n component.hasPlaceholders &&\n (placeholderRef ?? recursiveRef) &&\n profile?.renderer !== 'office-open'\n ) {\n const baseProperties = (schema.props 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 // Optionality is decided from the canonical definition, never from the\n // pruned/placeholder-augmented copy above: the deep validator checks the\n // canonical schema, so reading anything else here is how the published\n // schema and the runtime would start disagreeing about the same document.\n if (!pptxComponentRequiresProps(component)) {\n schema.props = Type.Optional(schema.props);\n }\n\n return Type.Object(schema, {\n additionalProperties: false,\n description: component.description,\n });\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 profile?: { renderer: PptxRendererId; requireDiscriminator: boolean }\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, profile)\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, profile)\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 // Placeholders hold what `children` holds: a named slot is a position\n // for a content component, not a second way into the tree. Passing the\n // narrowed union rather than `selfRef` is what stops the published\n // schema from accepting a `slide` — or the `pptx` root — as a\n // placeholder value, which the deep walk also refuses.\n resolved.set(\n comp.name,\n createPptxComponentSchemaObject(\n comp,\n childrenType,\n childrenType,\n profile\n )\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 { FontRegistrySchema } from '@json-to-office/shared';\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 fontRegistry: Type.Optional(FontRegistrySchema),\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 {\n name: Type.Literal(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 props: propsSchema,\n },\n { additionalProperties: false }\n );\n}\n\n// Content component union — same { name, props } format as slide children\nconst TemplateObjectComponentSchema = Type.Union(\n [\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 {\n discriminator: { propertyName: 'name' },\n description:\n 'Fixed component on a template slide (same format as slide children)',\n }\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 {\n name: Type.Literal(name),\n props: Type.Partial(propsSchema, {\n description:\n 'Default props inherited by the component placed in this placeholder',\n }),\n },\n { additionalProperties: false }\n );\n}\n\nconst PlaceholderDefaultsSchema = Type.Union(\n [\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 {\n discriminator: { propertyName: 'name' },\n description: 'Partial component stub — styling defaults only',\n }\n);\n\n// Placeholder definition\nexport const PlaceholderDefinitionSchema = Type.Object(\n {\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 },\n {\n additionalProperties: false,\n description:\n 'Placeholder on a template slide — defaults is a component stub whose props are inherited by the actual component',\n }\n);\n\n// Template slide definition\nexport const TemplateSlideDefinitionSchema = Type.Object(\n {\n name: Type.String({ description: 'Unique template slide name' }),\n background: Type.Optional(SlideBackgroundSchema),\n margin: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Margin in inches (all sides)' }),\n Type.Array(Type.Number(), {\n minItems: 4,\n maxItems: 4,\n description: 'Margin [top, right, bottom, left] in inches',\n }),\n ])\n ),\n slideNumber: Type.Optional(\n Type.Object(\n {\n x: Coord,\n y: Coord,\n w: Type.Optional(Coord),\n h: Type.Optional(Coord),\n color: Type.Optional(ColorValueSchema),\n fontSize: Type.Optional(\n Type.Number({ description: 'Slide number font size in points' })\n ),\n },\n {\n additionalProperties: false,\n description: 'Slide number position and styling',\n }\n )\n ),\n objects: Type.Optional(\n Type.Array(TemplateObjectComponentSchema, {\n description:\n 'Fixed components (logos, footers, decorations) — same { name, props } format as slide children',\n })\n ),\n placeholders: Type.Optional(\n Type.Array(PlaceholderDefinitionSchema, {\n description: 'Placeholder regions for slide content',\n })\n ),\n grid: Type.Optional(GridConfigSchema),\n },\n {\n additionalProperties: false,\n description: 'Template slide definition (reusable slide template)',\n }\n);\n\nexport type PlaceholderDefinition = Static<typeof PlaceholderDefinitionSchema>;\nexport type TemplateSlideDefinition = Static<\n typeof TemplateSlideDefinitionSchema\n>;\n","/**\n * Common Types and Schemas for PPTX Components\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n ColorValueSchema,\n GradientFillSchema,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport {\n PptxAlignmentSchema,\n VerticalAlignmentSchema,\n ShadowSchema,\n GridPositionSchema,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport type {\n PptxAlignment,\n VerticalAlignment,\n Shadow,\n GridPosition,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport const PositionSchema = Type.Object(\n {\n x: Type.Optional(\n Type.Union([\n Type.Number({ description: 'X position in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'X position as percentage (e.g., \"10%\")',\n }),\n ])\n ),\n y: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Y position in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Y position as percentage (e.g., \"10%\")',\n }),\n ])\n ),\n w: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Width in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Width as percentage (e.g., \"80%\")',\n }),\n ])\n ),\n h: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Height in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Height as percentage (e.g., \"20%\")',\n }),\n ])\n ),\n },\n {\n description: 'Position and size in inches or percentages',\n additionalProperties: false,\n }\n);\n\nexport const SlideBackgroundSchema = Type.Object(\n {\n color: Type.Optional(ColorValueSchema),\n gradient: Type.Optional(GradientFillSchema),\n image: Type.Optional(\n Type.Object(\n {\n path: Type.Optional(\n Type.String({ description: 'Image file path or URL' })\n ),\n base64: Type.Optional(\n Type.String({ description: 'Base64-encoded image data' })\n ),\n },\n { description: 'Background image', additionalProperties: false }\n )\n ),\n },\n {\n description: 'Slide background configuration',\n additionalProperties: false,\n }\n);\n\nexport const TransitionSchema = Type.Object(\n {\n type: Type.Optional(\n Type.Union(\n [\n Type.Literal('fade'),\n Type.Literal('push'),\n Type.Literal('wipe'),\n Type.Literal('zoom'),\n Type.Literal('none'),\n ],\n { description: 'Transition effect type' }\n )\n ),\n speed: Type.Optional(\n Type.Union(\n [Type.Literal('slow'), Type.Literal('medium'), Type.Literal('fast')],\n { description: 'Transition speed' }\n )\n ),\n },\n {\n description: 'Slide transition configuration',\n additionalProperties: false,\n }\n);\n\nexport type Position = Static<typeof PositionSchema>;\nexport type SlideBackground = Static<typeof SlideBackgroundSchema>;\nexport type Transition = Static<typeof TransitionSchema>;\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 meta: Type.Optional(\n Type.Object(\n {\n title: Type.Optional(\n Type.String({\n description:\n 'Authoring label for this slide, shown in editors and outlines. Never rendered — slide content is unaffected.',\n })\n ),\n },\n {\n additionalProperties: false,\n description: 'Authoring metadata; has no effect on the presentation.',\n }\n )\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;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACPP,SAAS,QAAAC,aAAoB;AAC7B,SAAS,0BAA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AY,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;AAOhC,eAAS;AAAA,QACP,KAAK;AAAA,QACL;AAAA,UACE;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;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","ColorValueSchema","Type","Type","Type","Type","Type"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PptxComponentDefinitionSchema
3
- } from "./chunk-KRLDFNJM.js";
3
+ } from "./chunk-F54YIK73.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-ZIDB7UMH.js.map
21
+ //# sourceMappingURL=chunk-YBRH7UCF.js.map
@@ -73,4 +73,4 @@ export {
73
73
  ChartComponentDefaultsSchema,
74
74
  PptxComponentDefaultsSchema
75
75
  };
76
- //# sourceMappingURL=chunk-7CKCXKN7.js.map
76
+ //# sourceMappingURL=chunk-Z6NUHS34.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schemas/component-defaults.ts","../src/schemas/components/text.ts","../src/schemas/components/image.ts","../src/schemas/components/shape.ts","../src/schemas/components/table.ts","../src/schemas/components/highcharts.ts","../src/schemas/components/chart.ts"],"sourcesContent":["/**\n * PPTX Component Defaults Schemas\n *\n * Imports directly from individual component files to avoid circular deps.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\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// Create component defaults by making all fields optional (Type.Partial)\nexport const TextComponentDefaultsSchema = Type.Partial(TextPropsSchema);\nexport const ImageComponentDefaultsSchema = Type.Partial(PptxImagePropsSchema);\nexport const ShapeComponentDefaultsSchema = Type.Partial(ShapePropsSchema);\nexport const TableComponentDefaultsSchema = Type.Partial(PptxTablePropsSchema);\nexport const HighchartsComponentDefaultsSchema = Type.Partial(\n PptxHighchartsPropsSchema\n);\nexport const ChartComponentDefaultsSchema = Type.Partial(PptxChartPropsSchema);\n\nexport const PptxComponentDefaultsSchema = Type.Object(\n {\n text: Type.Optional(TextComponentDefaultsSchema),\n image: Type.Optional(ImageComponentDefaultsSchema),\n shape: Type.Optional(ShapeComponentDefaultsSchema),\n table: Type.Optional(TableComponentDefaultsSchema),\n highcharts: Type.Optional(HighchartsComponentDefaultsSchema),\n chart: Type.Optional(ChartComponentDefaultsSchema),\n },\n { additionalProperties: true }\n);\n\n// TypeScript types\nexport type TextComponentDefaults = Static<typeof TextComponentDefaultsSchema>;\nexport type ImageComponentDefaults = Static<\n typeof ImageComponentDefaultsSchema\n>;\nexport type ShapeComponentDefaults = Static<\n typeof ShapeComponentDefaultsSchema\n>;\nexport type TableComponentDefaults = Static<\n typeof TableComponentDefaultsSchema\n>;\nexport type HighchartsComponentDefaults = Static<\n typeof HighchartsComponentDefaultsSchema\n>;\nexport type ChartComponentDefaults = Static<\n typeof ChartComponentDefaultsSchema\n>;\nexport type PptxComponentDefaults = Static<\n typeof PptxComponentDefaultsSchema\n>;\n","export {\n TextPropsSchema,\n TextRunSchema,\n} from '@json-to-office/shared/schemas/slide-content';\nexport type {\n TextProps,\n TextRun,\n} from '@json-to-office/shared/schemas/slide-content';\n","export { PptxImagePropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxImageProps } from '@json-to-office/shared/schemas/slide-content';\n","export {\n ShapePropsSchema,\n ShapeTypeSchema,\n TextSegmentSchema,\n GradientStopSchema,\n GradientFillSchema,\n PatternFillSchema,\n PATTERN_FILL_PRESETS,\n} from '@json-to-office/shared/schemas/slide-content';\nexport type {\n ShapeProps,\n ShapeType,\n TextSegment,\n GradientStop,\n GradientFill,\n PatternFill,\n} from '@json-to-office/shared/schemas/slide-content';\n","export { PptxTablePropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxTableProps } from '@json-to-office/shared/schemas/slide-content';\n","export { PptxHighchartsPropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxHighchartsProps } from '@json-to-office/shared/schemas/slide-content';\n","export { PptxChartPropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxChartProps } from '@json-to-office/shared/schemas/slide-content';\n"],"mappings":";AAMA,SAAS,YAAoB;;;ACN7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACHP,SAAS,4BAA4B;;;ACArC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACRP,SAAS,4BAA4B;;;ACArC,SAAS,iCAAiC;;;ACA1C,SAAS,4BAA4B;;;ANe9B,IAAM,8BAA8B,KAAK,QAAQ,eAAe;AAChE,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AACtE,IAAM,+BAA+B,KAAK,QAAQ,gBAAgB;AAClE,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AACtE,IAAM,oCAAoC,KAAK;AAAA,EACpD;AACF;AACO,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AAEtE,IAAM,8BAA8B,KAAK;AAAA,EAC9C;AAAA,IACE,MAAM,KAAK,SAAS,2BAA2B;AAAA,IAC/C,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,YAAY,KAAK,SAAS,iCAAiC;AAAA,IAC3D,OAAO,KAAK,SAAS,4BAA4B;AAAA,EACnD;AAAA,EACA,EAAE,sBAAsB,KAAK;AAC/B;","names":[]}
1
+ {"version":3,"sources":["../src/schemas/component-defaults.ts","../src/schemas/components/text.ts","../src/schemas/components/image.ts","../src/schemas/components/shape.ts","../src/schemas/components/table.ts","../src/schemas/components/highcharts.ts","../src/schemas/components/chart.ts"],"sourcesContent":["/**\n * PPTX Component Defaults Schemas\n *\n * Imports directly from individual component files to avoid circular deps.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\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// Create component defaults by making all fields optional (Type.Partial)\nexport const TextComponentDefaultsSchema = Type.Partial(TextPropsSchema);\nexport const ImageComponentDefaultsSchema = Type.Partial(PptxImagePropsSchema);\nexport const ShapeComponentDefaultsSchema = Type.Partial(ShapePropsSchema);\nexport const TableComponentDefaultsSchema = Type.Partial(PptxTablePropsSchema);\nexport const HighchartsComponentDefaultsSchema = Type.Partial(\n PptxHighchartsPropsSchema\n);\nexport const ChartComponentDefaultsSchema = Type.Partial(PptxChartPropsSchema);\n\nexport const PptxComponentDefaultsSchema = Type.Object(\n {\n text: Type.Optional(TextComponentDefaultsSchema),\n image: Type.Optional(ImageComponentDefaultsSchema),\n shape: Type.Optional(ShapeComponentDefaultsSchema),\n table: Type.Optional(TableComponentDefaultsSchema),\n highcharts: Type.Optional(HighchartsComponentDefaultsSchema),\n chart: Type.Optional(ChartComponentDefaultsSchema),\n },\n { additionalProperties: true }\n);\n\n// TypeScript types\nexport type TextComponentDefaults = Static<typeof TextComponentDefaultsSchema>;\nexport type ImageComponentDefaults = Static<\n typeof ImageComponentDefaultsSchema\n>;\nexport type ShapeComponentDefaults = Static<\n typeof ShapeComponentDefaultsSchema\n>;\nexport type TableComponentDefaults = Static<\n typeof TableComponentDefaultsSchema\n>;\nexport type HighchartsComponentDefaults = Static<\n typeof HighchartsComponentDefaultsSchema\n>;\nexport type ChartComponentDefaults = Static<\n typeof ChartComponentDefaultsSchema\n>;\nexport type PptxComponentDefaults = Static<typeof PptxComponentDefaultsSchema>;\n","export {\n TextPropsSchema,\n TextRunSchema,\n} from '@json-to-office/shared/schemas/slide-content';\nexport type {\n TextProps,\n TextRun,\n} from '@json-to-office/shared/schemas/slide-content';\n","export { PptxImagePropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxImageProps } from '@json-to-office/shared/schemas/slide-content';\n","export {\n ShapePropsSchema,\n ShapeTypeSchema,\n TextSegmentSchema,\n GradientStopSchema,\n GradientFillSchema,\n PatternFillSchema,\n PATTERN_FILL_PRESETS,\n} from '@json-to-office/shared/schemas/slide-content';\nexport type {\n ShapeProps,\n ShapeType,\n TextSegment,\n GradientStop,\n GradientFill,\n PatternFill,\n} from '@json-to-office/shared/schemas/slide-content';\n","export { PptxTablePropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxTableProps } from '@json-to-office/shared/schemas/slide-content';\n","export { PptxHighchartsPropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxHighchartsProps } from '@json-to-office/shared/schemas/slide-content';\n","export { PptxChartPropsSchema } from '@json-to-office/shared/schemas/slide-content';\nexport type { PptxChartProps } from '@json-to-office/shared/schemas/slide-content';\n"],"mappings":";AAMA,SAAS,YAAoB;;;ACN7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACHP,SAAS,4BAA4B;;;ACArC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACRP,SAAS,4BAA4B;;;ACArC,SAAS,iCAAiC;;;ACA1C,SAAS,4BAA4B;;;ANe9B,IAAM,8BAA8B,KAAK,QAAQ,eAAe;AAChE,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AACtE,IAAM,+BAA+B,KAAK,QAAQ,gBAAgB;AAClE,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AACtE,IAAM,oCAAoC,KAAK;AAAA,EACpD;AACF;AACO,IAAM,+BAA+B,KAAK,QAAQ,oBAAoB;AAEtE,IAAM,8BAA8B,KAAK;AAAA,EAC9C;AAAA,IACE,MAAM,KAAK,SAAS,2BAA2B;AAAA,IAC/C,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,OAAO,KAAK,SAAS,4BAA4B;AAAA,IACjD,YAAY,KAAK,SAAS,iCAAiC;AAAA,IAC3D,OAAO,KAAK,SAAS,4BAA4B;AAAA,EACnD;AAAA,EACA,EAAE,sBAAsB,KAAK;AAC/B;","names":[]}
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  PPTX_JSON_SCHEMA_URLS,
3
3
  PptxJsonComponentDefinitionSchema
4
- } from "./chunk-ZIDB7UMH.js";
4
+ } from "./chunk-YBRH7UCF.js";
5
5
  import "./chunk-J4OT5Y5B.js";
6
6
  import {
7
7
  PptxComponentDefinitionSchema,
8
8
  PptxSlideContentSchema,
9
9
  PptxStandardComponentDefinitionSchema
10
- } from "./chunk-KRLDFNJM.js";
10
+ } from "./chunk-F54YIK73.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-WQAPVKW2.js";
17
+ } from "./chunk-EVSOXQHO.js";
18
18
  import {
19
19
  PPTX_STANDARD_COMPONENTS_REGISTRY,
20
20
  PositionSchema,
@@ -33,7 +33,7 @@ import {
33
33
  getPptxStandardComponent,
34
34
  isPptxStandardComponent,
35
35
  pptxComponentRequiresProps
36
- } from "./chunk-EXPOJ55X.js";
36
+ } from "./chunk-TLD3Z2B2.js";
37
37
  import {
38
38
  DEFAULT_PPTX_RENDERER_ID,
39
39
  PPTX_RENDERER_IDS,
@@ -48,7 +48,7 @@ import {
48
48
  TextStyleSchema,
49
49
  ThemeConfigSchema,
50
50
  isValidThemeConfig
51
- } from "./chunk-N6CABSXM.js";
51
+ } from "./chunk-CS65H3RG.js";
52
52
  import {
53
53
  ChartComponentDefaultsSchema,
54
54
  GradientFillSchema,
@@ -69,7 +69,7 @@ import {
69
69
  TextComponentDefaultsSchema,
70
70
  TextPropsSchema,
71
71
  TextRunSchema
72
- } from "./chunk-7CKCXKN7.js";
72
+ } from "./chunk-Z6NUHS34.js";
73
73
 
74
74
  // src/validation/image-source-conflicts.ts
75
75
  var IMAGE_SOURCE_FIELDS = ["path", "base64", "svg"];
@@ -169,6 +169,32 @@ var CUSTOM_COMPONENT_OBJECT_KEYS = /* @__PURE__ */ new Set([
169
169
  ]);
170
170
  var ROOT_OBJECT_KEYS = /* @__PURE__ */ new Set([...COMPONENT_OBJECT_KEYS, "$schema"]);
171
171
  ROOT_OBJECT_KEYS.add("renderer");
172
+ var SIBLING_KEY_TYPES = {
173
+ id: "string",
174
+ enabled: "boolean",
175
+ $schema: "string",
176
+ version: "string"
177
+ };
178
+ function collectSiblingKeyErrors(node, path, allowedKeys, label, errors) {
179
+ for (const key of Object.keys(node)) {
180
+ if (!allowedKeys.has(key)) {
181
+ errors.push({
182
+ path: `${path}/${key}`,
183
+ message: `Unknown field "${key}" on ${label}`,
184
+ code: "unknown_field"
185
+ });
186
+ continue;
187
+ }
188
+ const expected = SIBLING_KEY_TYPES[key];
189
+ if (expected && typeof node[key] !== expected) {
190
+ errors.push({
191
+ path: `${path}/${key}`,
192
+ message: `Field "${key}" on ${label} must be a ${expected}`,
193
+ code: "invalid_type"
194
+ });
195
+ }
196
+ }
197
+ }
172
198
  function deepValidatePresentation(data, opts = {}) {
173
199
  const allErrors = [];
174
200
  if (!data || typeof data !== "object") {
@@ -193,15 +219,13 @@ function deepValidatePresentation(data, opts = {}) {
193
219
  code: "invalid_value"
194
220
  });
195
221
  }
196
- for (const key of Object.keys(data)) {
197
- if (!ROOT_OBJECT_KEYS.has(key)) {
198
- allErrors.push({
199
- path: `/${key}`,
200
- message: `Unknown field "${key}" on the root component`,
201
- code: "unknown_field"
202
- });
203
- }
204
- }
222
+ collectSiblingKeyErrors(
223
+ data,
224
+ "",
225
+ ROOT_OBJECT_KEYS,
226
+ "the root component",
227
+ allErrors
228
+ );
205
229
  const rootDef = getPptxStandardComponent(data.name);
206
230
  if (!("props" in data)) {
207
231
  if (!rootDef || pptxComponentRequiresProps(rootDef)) {
@@ -253,15 +277,13 @@ function walkComponentTree(node, path, opts, errors) {
253
277
  }
254
278
  const isCustomComponent = opts.knownCustomNames?.has(child.name) ?? false;
255
279
  const allowedObjectKeys = isCustomComponent ? CUSTOM_COMPONENT_OBJECT_KEYS : COMPONENT_OBJECT_KEYS;
256
- for (const key of Object.keys(child)) {
257
- if (!allowedObjectKeys.has(key)) {
258
- errors.push({
259
- path: `${childPath}/${key}`,
260
- message: `Unknown field "${key}" on component "${child.name}"`,
261
- code: "unknown_field"
262
- });
263
- }
264
- }
280
+ collectSiblingKeyErrors(
281
+ child,
282
+ childPath,
283
+ allowedObjectKeys,
284
+ `component "${child.name}"`,
285
+ errors
286
+ );
265
287
  if (isCustomComponent) {
266
288
  if (!("props" in child)) {
267
289
  errors.push({
@@ -312,7 +334,7 @@ function walkComponentTree(node, path, opts, errors) {
312
334
  });
313
335
  }
314
336
  };
315
- if (node.name === "slide" && node.props && typeof node.props === "object") {
337
+ if (parentDef?.hasPlaceholders && node.props && typeof node.props === "object") {
316
338
  const placeholders = node.props.placeholders;
317
339
  if (placeholders && typeof placeholders === "object" && !Array.isArray(placeholders)) {
318
340
  for (const [key, child] of Object.entries(placeholders)) {
@@ -354,7 +376,7 @@ function validateComponentProps(componentName, props, basePath, opts = {}) {
354
376
  return errors;
355
377
  }
356
378
  let toCheck = props;
357
- if (componentName === "slide" && props && typeof props === "object" && "placeholders" in props) {
379
+ if (getPptxStandardComponent(componentName)?.hasPlaceholders && props && typeof props === "object" && "placeholders" in props) {
358
380
  const rest = { ...props };
359
381
  delete rest.placeholders;
360
382
  toCheck = rest;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/validation/image-source-conflicts.ts","../src/validation/text-content-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 * Text content conflict detection (PPTX)\n *\n * `text` and `runs` are mutually exclusive on the text component, but both are\n * optional fields on a single object schema — so a payload carrying both (or\n * neither) passes the structural check and would otherwise be silently resolved\n * by runtime precedence. This walk runs unconditionally during validation and\n * rejects such payloads. It traverses every nested value, so text components\n * inside slides, placeholders, and template objects are all covered.\n *\n * Placeholder `defaults` stubs are exempt from the \"neither\" rule: they carry\n * styling defaults only, and the actual content arrives with the component\n * placed in the placeholder.\n */\n\nimport type { ValidationError } from '@json-to-office/shared';\n\n/**\n * Collect `text`/`runs` mutual-exclusivity conflicts anywhere in a presentation.\n */\nexport function collectTextContentConflicts(data: unknown): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const visit = (node: any, path: string, parentKey: string): void => {\n if (Array.isArray(node)) {\n node.forEach((item, i) => visit(item, `${path}/${i}`, parentKey));\n return;\n }\n if (!node || typeof node !== 'object') return;\n\n if (node.name === 'text' && node.props && typeof node.props === 'object') {\n const hasText = typeof node.props.text === 'string';\n const hasRuns = Array.isArray(node.props.runs);\n if (hasText && hasRuns) {\n errors.push({\n path: `${path}/props`,\n message:\n 'Text component accepts either \"text\" or \"runs\", not both. Use exactly one of the two.',\n code: 'mutually_exclusive',\n });\n } else if (!hasText && !hasRuns && parentKey !== 'defaults') {\n errors.push({\n path: `${path}/props`,\n message:\n 'Text component requires content: set either \"text\" or \"runs\".',\n code: 'required_property',\n });\n }\n }\n\n for (const key of Object.keys(node)) {\n visit(node[key], `${path}/${key}`, 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 { collectTextContentConflicts } from '../text-content-conflicts';\nimport { collectPptxRendererErrors } from '../../schemas/renderer';\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 errors.push(...collectTextContentConflicts(data));\n errors.push(...collectPptxRendererErrors(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 pptxComponentRequiresProps,\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 CUSTOM_COMPONENT_OBJECT_KEYS = new Set([\n ...COMPONENT_OBJECT_KEYS,\n 'version',\n]);\nconst ROOT_OBJECT_KEYS = new Set([...COMPONENT_OBJECT_KEYS, '$schema']);\nROOT_OBJECT_KEYS.add('renderer');\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 checks what their\n * props hold; the plugin layer validates custom props against the resolved\n * version. It does require the `props` key itself, which the published plugin\n * branch requires too and which needs no plugin knowledge to see.\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. Whether the key may be absent is the registry's answer, the same\n // one the published schema is generated from.\n const rootDef = getPptxStandardComponent(data.name);\n if (!('props' in data)) {\n if (!rootDef || pptxComponentRequiresProps(rootDef)) {\n allErrors.push({\n path: '/props',\n message: 'Missing required field \"props\"',\n code: 'required_property',\n });\n }\n } else if (ROOT_COMPONENT_NAMES.has(data.name)) {\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 props are validated version-aware by the plugin layer.\n // Their children still need walking: custom containers may hold authored\n // standard components, and those must obey the same prop/tree contract as\n // standard components elsewhere in the presentation.\n const isCustomComponent = opts.knownCustomNames?.has(child.name) ?? false;\n const allowedObjectKeys = isCustomComponent\n ? CUSTOM_COMPONENT_OBJECT_KEYS\n : COMPONENT_OBJECT_KEYS;\n\n for (const key of Object.keys(child)) {\n if (!allowedObjectKeys.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 if (isCustomComponent) {\n // What the props *hold* is the plugin layer's call — it alone knows the\n // resolved version's schema. That the key is there at all is not: the\n // published plugin branch requires it unconditionally, so checking\n // presence here is what keeps the one absolute this walk claims true for\n // plugin components too, and turns the plugin layer's \"expected object at\n // root\" into a diagnostic pointing at the node that omitted it.\n if (!('props' in child)) {\n errors.push({\n path: `${childPath}/props`,\n message: `Component \"${child.name}\" is missing required field \"props\"`,\n code: 'required_property',\n suggestion: `Add a \"props\" object holding the content \"${child.name}\" renders.`,\n });\n }\n walkComponentTree(child, childPath, opts, errors);\n return;\n }\n\n // Validate props against the component's schema. An omitted `props` is\n // only legal where the registry says so — `pptxComponentRequiresProps` is\n // the same answer the published schema is generated from, so a document\n // this accepts is a document that schema accepts. Where it is legal, an\n // empty object is still checked: that catches a definition that claims\n // props are omissible while its schema demands a field.\n //\n // Presence is `'props' in child`, matching the root check: an explicit\n // `null` is a value the schema rejects (props must be an object), so it\n // has to reach the schema rather than be read as \"the author left it out\".\n const def = getPptxStandardComponent(child.name);\n const propsPath = `${childPath}/props`;\n if ('props' in child) {\n errors.push(\n ...validateComponentProps(child.name, child.props, propsPath, opts)\n );\n } else if (def && pptxComponentRequiresProps(def)) {\n // The error points at `/props`, not at the fields inside it: with the\n // key absent those paths address nothing, and a caller repairing the\n // document by JSON Patch has to create `props` first either way. The\n // fields it must then hold travel in the suggestion.\n const declared =\n (def.propsSchema as { required?: readonly string[] }).required ?? [];\n errors.push({\n path: propsPath,\n message: `Component \"${child.name}\" is missing required field \"props\"`,\n code: 'required_property',\n suggestion:\n declared.length > 0\n ? `Add \"props\" carrying ${declared.map((f) => `\"${f}\"`).join(', ')}.`\n : `Add a \"props\" object holding the content \"${child.name}\" renders.`,\n });\n } else {\n errors.push(...validateComponentProps(child.name, {}, propsPath, opts));\n }\n\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 /**\n * Enforce the registry's container narrowing (`pptx` → `slide`, `slide` →\n * the content components) on one entry. Unknown names are already reported\n * by validateComponentProps inside validateEntry, so only standard\n * components in the wrong container are flagged here.\n */\n const checkAllowedChild = (child: any, childPath: string): void => {\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 };\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 //\n // A placeholder holds what the slide itself holds: filling one with a\n // `slide` or the `pptx` root is not a component with no position, it is a\n // container nested where no container can go. The published schema narrows\n // the record to the same union it narrows `children` to, so both refuse it.\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 const childPath = `${path}/props/placeholders/${key}`;\n checkAllowedChild(child, childPath);\n validateEntry(child, childPath);\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 checkAllowedChild(child, childPath);\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 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 TextRunSchema,\n PptxImagePropsSchema,\n ShapePropsSchema,\n ShapeTypeSchema,\n GradientStopSchema,\n GradientFillSchema,\n PatternFillSchema,\n PATTERN_FILL_PRESETS,\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 TextRun,\n PptxImageProps,\n ShapeType,\n ShapeProps,\n TextSegment,\n GradientStop,\n GradientFill,\n PatternFill,\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 // The requiredness rule the schema generator and the deep walk both read.\n // A consumer that wants the same answer has to be able to reach it from the\n // package entry, not only through a deep subpath import.\n pptxComponentRequiresProps,\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// Renderer-discriminated schema profiles\nexport {\n PPTX_RENDERER_IDS,\n DEFAULT_PPTX_RENDERER_ID,\n collectPptxRendererErrors,\n} from './schemas/renderer';\nexport type { PptxRendererId } from './schemas/renderer';\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// Text content conflict detection (text/runs mutual exclusivity)\nexport { collectTextContentConflicts } from './validation/text-content-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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;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAjMA,IAAM,sBAAsB;","names":["Value","transformValueErrors","Value","transformValueErrors","transformValueErrors"]}
1
+ {"version":3,"sources":["../src/validation/image-source-conflicts.ts","../src/validation/text-content-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 * Text content conflict detection (PPTX)\n *\n * `text` and `runs` are mutually exclusive on the text component, but both are\n * optional fields on a single object schema — so a payload carrying both (or\n * neither) passes the structural check and would otherwise be silently resolved\n * by runtime precedence. This walk runs unconditionally during validation and\n * rejects such payloads. It traverses every nested value, so text components\n * inside slides, placeholders, and template objects are all covered.\n *\n * Placeholder `defaults` stubs are exempt from the \"neither\" rule: they carry\n * styling defaults only, and the actual content arrives with the component\n * placed in the placeholder.\n */\n\nimport type { ValidationError } from '@json-to-office/shared';\n\n/**\n * Collect `text`/`runs` mutual-exclusivity conflicts anywhere in a presentation.\n */\nexport function collectTextContentConflicts(data: unknown): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const visit = (node: any, path: string, parentKey: string): void => {\n if (Array.isArray(node)) {\n node.forEach((item, i) => visit(item, `${path}/${i}`, parentKey));\n return;\n }\n if (!node || typeof node !== 'object') return;\n\n if (node.name === 'text' && node.props && typeof node.props === 'object') {\n const hasText = typeof node.props.text === 'string';\n const hasRuns = Array.isArray(node.props.runs);\n if (hasText && hasRuns) {\n errors.push({\n path: `${path}/props`,\n message:\n 'Text component accepts either \"text\" or \"runs\", not both. Use exactly one of the two.',\n code: 'mutually_exclusive',\n });\n } else if (!hasText && !hasRuns && parentKey !== 'defaults') {\n errors.push({\n path: `${path}/props`,\n message:\n 'Text component requires content: set either \"text\" or \"runs\".',\n code: 'required_property',\n });\n }\n }\n\n for (const key of Object.keys(node)) {\n visit(node[key], `${path}/${key}`, 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 { collectTextContentConflicts } from '../text-content-conflicts';\nimport { collectPptxRendererErrors } from '../../schemas/renderer';\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 errors.push(...collectTextContentConflicts(data));\n errors.push(...collectPptxRendererErrors(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 pptxComponentRequiresProps,\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 CUSTOM_COMPONENT_OBJECT_KEYS = new Set([\n ...COMPONENT_OBJECT_KEYS,\n 'version',\n]);\nconst ROOT_OBJECT_KEYS = new Set([...COMPONENT_OBJECT_KEYS, '$schema']);\nROOT_OBJECT_KEYS.add('renderer');\n\n// What each legal component-object key must hold, per the published schema.\n// `name`, `props` and `children` are typed by their own dedicated checks, and\n// `renderer` by the renderer collector (whose enum message beats a bare type\n// check). Without this, key PRESENCE passed the walk while the value's type\n// went unchecked — `enabled: \"yes\"` validated and rendered (#292 parity).\nconst SIBLING_KEY_TYPES: Record<string, 'string' | 'boolean'> = {\n id: 'string',\n enabled: 'boolean',\n $schema: 'string',\n version: 'string',\n};\n\n/**\n * Report component-object key faults at `path`: keys outside `allowedKeys`,\n * and allowed keys holding a wrong-typed value.\n */\nfunction collectSiblingKeyErrors(\n node: Record<string, unknown>,\n path: string,\n allowedKeys: ReadonlySet<string>,\n label: string,\n errors: ValidationError[]\n): void {\n for (const key of Object.keys(node)) {\n if (!allowedKeys.has(key)) {\n errors.push({\n path: `${path}/${key}`,\n message: `Unknown field \"${key}\" on ${label}`,\n code: 'unknown_field',\n });\n continue;\n }\n const expected = SIBLING_KEY_TYPES[key];\n if (expected && typeof node[key] !== expected) {\n errors.push({\n path: `${path}/${key}`,\n message: `Field \"${key}\" on ${label} must be a ${expected}`,\n code: 'invalid_type',\n });\n }\n }\n}\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 checks what their\n * props hold; the plugin layer validates custom props against the resolved\n * version. It does require the `props` key itself, which the published plugin\n * branch requires too and which needs no plugin knowledge to see.\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 collectSiblingKeyErrors(\n data,\n '',\n ROOT_OBJECT_KEYS,\n 'the root component',\n allErrors\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. Whether the key may be absent is the registry's answer, the same\n // one the published schema is generated from.\n const rootDef = getPptxStandardComponent(data.name);\n if (!('props' in data)) {\n if (!rootDef || pptxComponentRequiresProps(rootDef)) {\n allErrors.push({\n path: '/props',\n message: 'Missing required field \"props\"',\n code: 'required_property',\n });\n }\n } else if (ROOT_COMPONENT_NAMES.has(data.name)) {\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 props are validated version-aware by the plugin layer.\n // Their children still need walking: custom containers may hold authored\n // standard components, and those must obey the same prop/tree contract as\n // standard components elsewhere in the presentation.\n const isCustomComponent = opts.knownCustomNames?.has(child.name) ?? false;\n const allowedObjectKeys = isCustomComponent\n ? CUSTOM_COMPONENT_OBJECT_KEYS\n : COMPONENT_OBJECT_KEYS;\n\n collectSiblingKeyErrors(\n child,\n childPath,\n allowedObjectKeys,\n `component \"${child.name}\"`,\n errors\n );\n\n if (isCustomComponent) {\n // What the props *hold* is the plugin layer's call — it alone knows the\n // resolved version's schema. That the key is there at all is not: the\n // published plugin branch requires it unconditionally, so checking\n // presence here is what keeps the one absolute this walk claims true for\n // plugin components too, and turns the plugin layer's \"expected object at\n // root\" into a diagnostic pointing at the node that omitted it.\n if (!('props' in child)) {\n errors.push({\n path: `${childPath}/props`,\n message: `Component \"${child.name}\" is missing required field \"props\"`,\n code: 'required_property',\n suggestion: `Add a \"props\" object holding the content \"${child.name}\" renders.`,\n });\n }\n walkComponentTree(child, childPath, opts, errors);\n return;\n }\n\n // Validate props against the component's schema. An omitted `props` is\n // only legal where the registry says so — `pptxComponentRequiresProps` is\n // the same answer the published schema is generated from, so a document\n // this accepts is a document that schema accepts. Where it is legal, an\n // empty object is still checked: that catches a definition that claims\n // props are omissible while its schema demands a field.\n //\n // Presence is `'props' in child`, matching the root check: an explicit\n // `null` is a value the schema rejects (props must be an object), so it\n // has to reach the schema rather than be read as \"the author left it out\".\n const def = getPptxStandardComponent(child.name);\n const propsPath = `${childPath}/props`;\n if ('props' in child) {\n errors.push(\n ...validateComponentProps(child.name, child.props, propsPath, opts)\n );\n } else if (def && pptxComponentRequiresProps(def)) {\n // The error points at `/props`, not at the fields inside it: with the\n // key absent those paths address nothing, and a caller repairing the\n // document by JSON Patch has to create `props` first either way. The\n // fields it must then hold travel in the suggestion.\n const declared =\n (def.propsSchema as { required?: readonly string[] }).required ?? [];\n errors.push({\n path: propsPath,\n message: `Component \"${child.name}\" is missing required field \"props\"`,\n code: 'required_property',\n suggestion:\n declared.length > 0\n ? `Add \"props\" carrying ${declared.map((f) => `\"${f}\"`).join(', ')}.`\n : `Add a \"props\" object holding the content \"${child.name}\" renders.`,\n });\n } else {\n errors.push(...validateComponentProps(child.name, {}, propsPath, opts));\n }\n\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 /**\n * Enforce the registry's container narrowing (`pptx` → `slide`, `slide` →\n * the content components) on one entry. Unknown names are already reported\n * by validateComponentProps inside validateEntry, so only standard\n * components in the wrong container are flagged here.\n */\n const checkAllowedChild = (child: any, childPath: string): void => {\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 };\n\n // A `placeholders` record maps placeholder names to full components\n // ({ \"title\": { \"name\": \"text\", ... } }). The registry's `hasPlaceholders`\n // flag is what injects the field into the published schema at generation\n // time (createPptxComponentSchemaObject) — the static props schema does not\n // include it, so validateComponentProps strips it before checking the\n // component's own props and each value is validated here instead. Reading\n // the same flag keeps this walk covering exactly the components whose\n // published schema accepts placeholders; only `slide` carries it today.\n //\n // A placeholder holds what the container itself holds: filling one with a\n // `slide` or the `pptx` root is not a component with no position, it is a\n // container nested where no container can go. The published schema narrows\n // the record to the same union it narrows `children` to, so both refuse it.\n if (\n parentDef?.hasPlaceholders &&\n node.props &&\n typeof node.props === 'object'\n ) {\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 const childPath = `${path}/props/placeholders/${key}`;\n checkAllowedChild(child, childPath);\n validateEntry(child, childPath);\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 checkAllowedChild(child, childPath);\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 `placeholders` field on a `hasPlaceholders` component is injected at\n // schema-generation time and absent from the static props schema; its\n // values are walked separately, so strip it here to avoid a false\n // additionalProperties rejection. Keyed on the registry flag, like the\n // schema injection and the walk.\n let toCheck = props;\n if (\n getPptxStandardComponent(componentName)?.hasPlaceholders &&\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 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 TextRunSchema,\n PptxImagePropsSchema,\n ShapePropsSchema,\n ShapeTypeSchema,\n GradientStopSchema,\n GradientFillSchema,\n PatternFillSchema,\n PATTERN_FILL_PRESETS,\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 TextRun,\n PptxImageProps,\n ShapeType,\n ShapeProps,\n TextSegment,\n GradientStop,\n GradientFill,\n PatternFill,\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 // The requiredness rule the schema generator and the deep walk both read.\n // A consumer that wants the same answer has to be able to reach it from the\n // package entry, not only through a deep subpath import.\n pptxComponentRequiresProps,\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// Renderer-discriminated schema profiles\nexport {\n PPTX_RENDERER_IDS,\n DEFAULT_PPTX_RENDERER_ID,\n collectPptxRendererErrors,\n} from './schemas/renderer';\nexport type { PptxRendererId } from './schemas/renderer';\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// Text content conflict detection (text/runs mutual exclusivity)\nexport { collectTextContentConflicts } from './validation/text-content-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,GA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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;;;AE4BA;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;AAjMA,IAAM,sBAAsB;","names":["Value","transformValueErrors","Value","transformValueErrors","transformValueErrors"]}
@@ -220,6 +220,7 @@ declare const TableComponentDefaultsSchema: _sinclair_typebox.TObject<{
220
220
  color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
221
221
  align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
222
222
  valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
223
+ headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
223
224
  autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
224
225
  autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
225
226
  margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
@@ -562,6 +563,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
562
563
  color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
563
564
  align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
564
565
  valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
566
+ headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
565
567
  autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
566
568
  autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
567
569
  margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
@@ -6,7 +6,7 @@ import {
6
6
  ShapeComponentDefaultsSchema,
7
7
  TableComponentDefaultsSchema,
8
8
  TextComponentDefaultsSchema
9
- } from "../chunk-7CKCXKN7.js";
9
+ } from "../chunk-Z6NUHS34.js";
10
10
  export {
11
11
  ChartComponentDefaultsSchema,
12
12
  HighchartsComponentDefaultsSchema,
@@ -10,10 +10,10 @@ import {
10
10
  getPptxStandardComponent,
11
11
  isPptxStandardComponent,
12
12
  pptxComponentRequiresProps
13
- } from "../chunk-EXPOJ55X.js";
13
+ } from "../chunk-TLD3Z2B2.js";
14
14
  import "../chunk-OSHLAL7B.js";
15
- import "../chunk-N6CABSXM.js";
16
- import "../chunk-7CKCXKN7.js";
15
+ import "../chunk-CS65H3RG.js";
16
+ import "../chunk-Z6NUHS34.js";
17
17
  export {
18
18
  PPTX_STANDARD_COMPONENTS_REGISTRY,
19
19
  createAllPptxComponentSchemas,
@@ -2,11 +2,11 @@ import {
2
2
  PptxComponentDefinitionSchema,
3
3
  PptxSlideContentSchema,
4
4
  PptxStandardComponentDefinitionSchema
5
- } from "../chunk-KRLDFNJM.js";
6
- import "../chunk-EXPOJ55X.js";
5
+ } from "../chunk-F54YIK73.js";
6
+ import "../chunk-TLD3Z2B2.js";
7
7
  import "../chunk-OSHLAL7B.js";
8
- import "../chunk-N6CABSXM.js";
9
- import "../chunk-7CKCXKN7.js";
8
+ import "../chunk-CS65H3RG.js";
9
+ import "../chunk-Z6NUHS34.js";
10
10
  export {
11
11
  PptxComponentDefinitionSchema,
12
12
  PptxSlideContentSchema,
@@ -330,6 +330,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
330
330
  color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
331
331
  align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
332
332
  valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
333
+ headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
333
334
  autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
334
335
  autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
335
336
  margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
@@ -714,6 +715,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
714
715
  color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
715
716
  align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
716
717
  valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
718
+ headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
717
719
  autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
718
720
  autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
719
721
  margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
@@ -3,7 +3,7 @@ import {
3
3
  PptxComponentDefinitionSchema,
4
4
  PptxSlideContentSchema,
5
5
  PptxStandardComponentDefinitionSchema
6
- } from "../chunk-KRLDFNJM.js";
6
+ } from "../chunk-F54YIK73.js";
7
7
  import {
8
8
  GridPositionSchema,
9
9
  PositionSchema,
@@ -14,9 +14,9 @@ import {
14
14
  SlidePropsSchema,
15
15
  TransitionSchema,
16
16
  VerticalAlignmentSchema
17
- } from "../chunk-EXPOJ55X.js";
17
+ } from "../chunk-TLD3Z2B2.js";
18
18
  import "../chunk-OSHLAL7B.js";
19
- import "../chunk-N6CABSXM.js";
19
+ import "../chunk-CS65H3RG.js";
20
20
  import {
21
21
  GradientFillSchema,
22
22
  GradientStopSchema,
@@ -30,7 +30,7 @@ import {
30
30
  TextPropsSchema,
31
31
  TextRunSchema,
32
32
  TextSegmentSchema
33
- } from "../chunk-7CKCXKN7.js";
33
+ } from "../chunk-Z6NUHS34.js";
34
34
  export {
35
35
  GradientFillSchema,
36
36
  GradientStopSchema,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  PPTX_JSON_SCHEMA_URLS,
3
3
  PptxJsonComponentDefinitionSchema
4
- } from "../chunk-ZIDB7UMH.js";
4
+ } from "../chunk-YBRH7UCF.js";
5
5
  import "../chunk-J4OT5Y5B.js";
6
- import "../chunk-KRLDFNJM.js";
7
- import "../chunk-EXPOJ55X.js";
6
+ import "../chunk-F54YIK73.js";
7
+ import "../chunk-TLD3Z2B2.js";
8
8
  import "../chunk-OSHLAL7B.js";
9
- import "../chunk-N6CABSXM.js";
10
- import "../chunk-7CKCXKN7.js";
9
+ import "../chunk-CS65H3RG.js";
10
+ import "../chunk-Z6NUHS34.js";
11
11
  export {
12
12
  PPTX_JSON_SCHEMA_URLS,
13
13
  PptxJsonComponentDefinitionSchema
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  generateUnifiedDocumentSchema
3
- } from "../chunk-WQAPVKW2.js";
4
- import "../chunk-EXPOJ55X.js";
3
+ } from "../chunk-EVSOXQHO.js";
4
+ import "../chunk-TLD3Z2B2.js";
5
5
  import "../chunk-OSHLAL7B.js";
6
- import "../chunk-N6CABSXM.js";
7
- import "../chunk-7CKCXKN7.js";
6
+ import "../chunk-CS65H3RG.js";
7
+ import "../chunk-Z6NUHS34.js";
8
8
  export {
9
9
  generateUnifiedDocumentSchema
10
10
  };
@@ -333,6 +333,7 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
333
333
  color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
334
334
  align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
335
335
  valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
336
+ headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
336
337
  autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
337
338
  autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
338
339
  margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
@@ -10,8 +10,8 @@ import {
10
10
  TextStyleSchema,
11
11
  ThemeConfigSchema,
12
12
  isValidThemeConfig
13
- } from "../chunk-N6CABSXM.js";
14
- import "../chunk-7CKCXKN7.js";
13
+ } from "../chunk-CS65H3RG.js";
14
+ import "../chunk-Z6NUHS34.js";
15
15
  export {
16
16
  ColorValueSchema,
17
17
  GridConfigSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-to-office/shared-pptx",
3
- "version": "1.3.0",
3
+ "version": "1.7.0",
4
4
  "description": "PPTX-specific schemas, component registry and validation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@sinclair/typebox": "0.34.38",
27
- "@json-to-office/shared": "^1.3.0"
27
+ "@json-to-office/shared": "^1.6.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "20.11.0",
@@ -63,9 +63,9 @@
63
63
  "build": "tsup",
64
64
  "dev": "tsup --watch",
65
65
  "clean": "rm -rf dist",
66
- "lint": "eslint src/**/*.ts",
67
- "lint:fix": "eslint src/**/*.ts --fix",
68
- "format": "prettier --write src/**/*.ts",
66
+ "lint": "eslint src --ext .ts",
67
+ "lint:fix": "eslint src --ext .ts --fix",
68
+ "format": "prettier --write \"src/**/*.ts\"",
69
69
  "typecheck": "tsc --noEmit",
70
70
  "test": "vitest run --passWithNoTests",
71
71
  "test:watch": "vitest",
@@ -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/common.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';\nimport {\n PPTX_SLIDE_CONTENT_COMPONENTS,\n pptxComponentRequiresProps,\n} from '@json-to-office/shared/schemas/slide-content';\nimport {\n PPTX_RENDERER_IDS,\n pptxPropsSchemaForRenderer,\n type PptxRendererId,\n} from './renderer';\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 /**\n * Force `props` to stay required even though the props schema accepts `{}`.\n * See `pptxComponentRequiresProps` for when that is legitimate.\n */\n propsRequired?: boolean;\n special?: {\n hasSchemaField?: boolean;\n };\n}\nimport { PresentationPropsSchema } from './components/presentation';\nimport { SlidePropsSchema } from './components/slide';\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 // Every presentation prop is optional, but the root is where a deck\n // states its title, size and theme, and both the published schema and\n // the deep validator have always demanded the key. Keeping it required\n // is a decision, not the schema's own answer, so it is declared.\n propsRequired: true,\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: PPTX_SLIDE_CONTENT_COMPONENTS.map(({ name }) => name),\n hasPlaceholders: true,\n category: 'container',\n // No `propsRequired`: every slide prop is optional and nothing outside\n // the schema asks for one, so `{ \"name\": \"slide\", \"children\": [...] }`\n // is a whole slide and the published schema says so.\n description:\n 'Slide container - groups content elements on a single slide.',\n },\n\n // Content components are canonical in @json-to-office/shared so DOCX\n // visuals can reuse the exact schemas without depending on shared-pptx.\n ...PPTX_SLIDE_CONTENT_COMPONENTS,\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 * Whether this component must carry a `props` key — the one answer both the\n * published schema and the deep validator read.\n *\n * Re-exported from `@json-to-office/shared` so the registry is the single\n * place a consumer has to look: the rule is the props schema's own (a schema\n * that accepts `{}` demands nothing) unless the definition overrides it.\n */\nexport { pptxComponentRequiresProps };\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\nexport function createPptxComponentSchemaObject(\n component: PptxStandardComponentDefinition,\n recursiveRef?: TSchema,\n placeholderRef?: TSchema,\n profile?: { renderer: PptxRendererId; requireDiscriminator: boolean }\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 schema.renderer = profile\n ? profile.requireDiscriminator\n ? Type.Literal(profile.renderer, {\n description: 'Renderer backend for this presentation',\n })\n : Type.Optional(\n Type.Literal(profile.renderer, {\n description: 'Renderer backend. Omitted defaults to \"pptxgenjs\".',\n })\n )\n : Type.Optional(\n Type.Union(\n PPTX_RENDERER_IDS.map((renderer) => Type.Literal(renderer)),\n {\n description: 'Renderer backend. Omitted defaults to \"pptxgenjs\".',\n }\n )\n );\n }\n\n schema.props = profile\n ? pptxPropsSchemaForRenderer(\n component.name,\n component.propsSchema,\n profile.renderer\n )\n : component.propsSchema;\n\n if (component.hasChildren && recursiveRef) {\n schema.children = Type.Optional(Type.Array(recursiveRef));\n }\n\n if (\n component.hasPlaceholders &&\n (placeholderRef ?? recursiveRef) &&\n profile?.renderer !== 'office-open'\n ) {\n const baseProperties = (schema.props 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 // Optionality is decided from the canonical definition, never from the\n // pruned/placeholder-augmented copy above: the deep validator checks the\n // canonical schema, so reading anything else here is how the published\n // schema and the runtime would start disagreeing about the same document.\n if (!pptxComponentRequiresProps(component)) {\n schema.props = Type.Optional(schema.props);\n }\n\n return Type.Object(schema, {\n additionalProperties: false,\n description: component.description,\n });\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 profile?: { renderer: PptxRendererId; requireDiscriminator: boolean }\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, profile)\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, profile)\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 // Placeholders hold what `children` holds: a named slot is a position\n // for a content component, not a second way into the tree. Passing the\n // narrowed union rather than `selfRef` is what stops the published\n // schema from accepting a `slide` — or the `pptx` root — as a\n // placeholder value, which the deep walk also refuses.\n resolved.set(\n comp.name,\n createPptxComponentSchemaObject(\n comp,\n childrenType,\n childrenType,\n profile\n )\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 { FontRegistrySchema } from '@json-to-office/shared';\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 fontRegistry: Type.Optional(FontRegistrySchema),\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 * Common Types and Schemas for PPTX Components\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n ColorValueSchema,\n GradientFillSchema,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport {\n PptxAlignmentSchema,\n VerticalAlignmentSchema,\n ShadowSchema,\n GridPositionSchema,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport type {\n PptxAlignment,\n VerticalAlignment,\n Shadow,\n GridPosition,\n} from '@json-to-office/shared/schemas/slide-content';\n\nexport const PositionSchema = Type.Object(\n {\n x: Type.Optional(\n Type.Union([\n Type.Number({ description: 'X position in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'X position as percentage (e.g., \"10%\")',\n }),\n ])\n ),\n y: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Y position in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Y position as percentage (e.g., \"10%\")',\n }),\n ])\n ),\n w: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Width in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Width as percentage (e.g., \"80%\")',\n }),\n ])\n ),\n h: Type.Optional(\n Type.Union([\n Type.Number({ description: 'Height in inches' }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description: 'Height as percentage (e.g., \"20%\")',\n }),\n ])\n ),\n },\n {\n description: 'Position and size in inches or percentages',\n additionalProperties: false,\n }\n);\n\nexport const SlideBackgroundSchema = Type.Object(\n {\n color: Type.Optional(ColorValueSchema),\n gradient: Type.Optional(GradientFillSchema),\n image: Type.Optional(\n Type.Object(\n {\n path: Type.Optional(\n Type.String({ description: 'Image file path or URL' })\n ),\n base64: Type.Optional(\n Type.String({ description: 'Base64-encoded image data' })\n ),\n },\n { description: 'Background image', additionalProperties: false }\n )\n ),\n },\n {\n description: 'Slide background configuration',\n additionalProperties: false,\n }\n);\n\nexport const TransitionSchema = Type.Object(\n {\n type: Type.Optional(\n Type.Union(\n [\n Type.Literal('fade'),\n Type.Literal('push'),\n Type.Literal('wipe'),\n Type.Literal('zoom'),\n Type.Literal('none'),\n ],\n { description: 'Transition effect type' }\n )\n ),\n speed: Type.Optional(\n Type.Union(\n [Type.Literal('slow'), Type.Literal('medium'), Type.Literal('fast')],\n { description: 'Transition speed' }\n )\n ),\n },\n {\n description: 'Slide transition configuration',\n additionalProperties: false,\n }\n);\n\nexport type Position = Static<typeof PositionSchema>;\nexport type SlideBackground = Static<typeof SlideBackgroundSchema>;\nexport type Transition = Static<typeof TransitionSchema>;\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 meta: Type.Optional(\n Type.Object(\n {\n title: Type.Optional(\n Type.String({\n description:\n 'Authoring label for this slide, shown in editors and outlines. Never rendered — slide content is unaffected.',\n })\n ),\n },\n {\n additionalProperties: false,\n description: 'Authoring metadata; has no effect on the presentation.',\n }\n )\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;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACPP,SAAS,QAAAC,aAAoB;AAC7B,SAAS,0BAA0B;;;ACDnC,SAAS,QAAAC,aAA6B;;;ACAtC,SAAS,YAAoB;AAC7B;AAAA,EACE,oBAAAC;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASA,IAAM,iBAAiB,KAAK;AAAA,EACjC;AAAA,IACE,GAAG,KAAK;AAAA,MACN,KAAK,MAAM;AAAA,QACT,KAAK,OAAO,EAAE,aAAa,uBAAuB,CAAC;AAAA,QACnD,KAAK,OAAO;AAAA,UACV,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,GAAG,KAAK;AAAA,MACN,KAAK,MAAM;AAAA,QACT,KAAK,OAAO,EAAE,aAAa,uBAAuB,CAAC;AAAA,QACnD,KAAK,OAAO;AAAA,UACV,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,GAAG,KAAK;AAAA,MACN,KAAK,MAAM;AAAA,QACT,KAAK,OAAO,EAAE,aAAa,kBAAkB,CAAC;AAAA,QAC9C,KAAK,OAAO;AAAA,UACV,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH,CAAC;AAAA,IAC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