@json-to-office/shared-pptx 0.33.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-T5NRY622.js → chunk-2MZVIHSQ.js} +36 -11
- package/dist/chunk-2MZVIHSQ.js.map +1 -0
- package/dist/chunk-2YEV3CJF.js +192 -0
- package/dist/chunk-2YEV3CJF.js.map +1 -0
- package/dist/{chunk-5WPJY4C7.js → chunk-5WT7G2OG.js} +20 -3
- package/dist/chunk-5WT7G2OG.js.map +1 -0
- package/dist/{chunk-DVNOCBTM.js → chunk-F3FQ7ADB.js} +2 -2
- package/dist/{chunk-M5PJJLWM.js → chunk-N6CABSXM.js} +6 -2
- package/dist/chunk-N6CABSXM.js.map +1 -0
- package/dist/{chunk-BW2YGLUL.js → chunk-YSJMKGLM.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/schemas/component-defaults.d.ts +12 -0
- package/dist/schemas/component-registry.d.ts +10 -2
- package/dist/schemas/component-registry.js +3 -2
- package/dist/schemas/component-union.js +4 -3
- package/dist/schemas/components.d.ts +82 -0
- package/dist/schemas/components.js +4 -3
- package/dist/schemas/document.js +5 -4
- package/dist/schemas/generator.js +4 -3
- package/dist/schemas/renderer.d.ts +19 -0
- package/dist/schemas/renderer.js +15 -0
- package/dist/schemas/renderer.js.map +1 -0
- package/dist/schemas/theme.d.ts +41 -0
- package/dist/schemas/theme.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-5WPJY4C7.js.map +0 -1
- package/dist/chunk-M5PJJLWM.js.map +0 -1
- package/dist/chunk-T5NRY622.js.map +0 -1
- /package/dist/{chunk-DVNOCBTM.js.map → chunk-F3FQ7ADB.js.map} +0 -0
- /package/dist/{chunk-BW2YGLUL.js.map → chunk-YSJMKGLM.js.map} +0 -0
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 {\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 const valid = errors.length === 0;\n return {\n valid,\n errors,\n documentType: 'pptx',\n data: valid ? data : undefined,\n };\n}\n\n/**\n * Validate a presentation from a JSON string or object.\n */\nexport function validateJsonPresentationDocument(\n jsonInput: string | object,\n opts: DeepValidateOptions = {}\n): PptxValidationResult {\n const { parsed, error } = parseJsonInput(jsonInput);\n if (error) return { valid: false, errors: [error], documentType: 'pptx' };\n return validatePresentationDocument(parsed, opts);\n}\n\n/**\n * Validate a PPTX theme config.\n */\nexport function validatePptxTheme(data: unknown): PptxValidationResult {\n if (Value.Check(ThemeConfigSchema, data)) {\n return { valid: true, errors: [], data };\n }\n const valueErrors = [...Value.Errors(ThemeConfigSchema, data)];\n const errors = transformValueErrors(valueErrors, { maxErrors: 100 });\n return { valid: false, errors };\n}\n\n/**\n * Validate a PPTX theme from a JSON string or object.\n */\nexport function validateJsonPptxTheme(\n jsonInput: string | object\n): PptxValidationResult {\n const { parsed, error } = parseJsonInput(jsonInput);\n if (error) return { valid: false, errors: [error] };\n return validatePptxTheme(parsed);\n}\n\n/**\n * Simple validation API — the entry point the CLI consumes.\n */\nexport const validate = {\n document: (data: unknown) => validatePresentationDocument(data),\n jsonDocument: (jsonInput: string | object) =>\n validateJsonPresentationDocument(jsonInput),\n theme: (data: unknown) => validatePptxTheme(data),\n jsonTheme: (jsonInput: string | object) => validateJsonPptxTheme(jsonInput),\n isDocument: (data: unknown) => validatePresentationDocument(data).valid,\n isTheme: (data: unknown) => validatePptxTheme(data).valid,\n};\n\n/**\n * Strict validation API. PPTX deep validation never cleans or applies\n * defaults, so this is currently an alias kept for docx API parity — the CLI\n * picks one of the two based on its --strict flag.\n */\nexport const validateStrict = {\n document: (data: unknown) => validatePresentationDocument(data),\n jsonDocument: (jsonInput: string | object) =>\n validateJsonPresentationDocument(jsonInput),\n theme: (data: unknown) => validatePptxTheme(data),\n jsonTheme: (jsonInput: string | object) => validateJsonPptxTheme(jsonInput),\n};\n","/**\n * Deep validation utilities for collecting ALL errors in nested structures.\n *\n * Mirrors the docx deep validator: the recursive discriminated union\n * (PptxComponentDefinitionSchema) short-circuits on the first mismatch and\n * collapses failures into a generic root error, so this walk visits every\n * component in the tree and validates its props against the real per-component\n * schema, producing precise, path-aware errors.\n */\n\nimport { Value } from '@sinclair/typebox/value';\nimport type { TSchema } from '@sinclair/typebox';\nimport type { ValidationError } from '@json-to-office/shared';\nimport { transformValueErrors } from '@json-to-office/shared';\nimport {\n PPTX_STANDARD_COMPONENTS_REGISTRY,\n getPptxStandardComponent,\n} from '../../schemas/component-registry';\n\n// Map of component names to their props schemas, sourced from the registry.\n// This stays in sync as new standard components are added, so the presentation\n// root ('pptx') and every standard child component are recognized here.\nconst COMPONENT_SCHEMAS: Record<string, TSchema> = Object.fromEntries(\n PPTX_STANDARD_COMPONENTS_REGISTRY.map((c) => [c.name, c.propsSchema])\n);\n\n// Root component names that may appear at the top of a presentation.\nconst ROOT_COMPONENT_NAMES = new Set(\n PPTX_STANDARD_COMPONENTS_REGISTRY.filter((c) =>\n Boolean(c.special?.hasSchemaField)\n ).map((c) => c.name)\n);\n\n// Top-level keys allowed on a component object. The recursive union enforces\n// this via additionalProperties:false; the walk re-checks it so a typo like\n// \"porps\" is reported at a precise path instead of a generic union failure.\nconst COMPONENT_OBJECT_KEYS = new Set([\n 'name',\n 'id',\n 'enabled',\n 'props',\n 'children',\n]);\nconst CUSTOM_COMPONENT_OBJECT_KEYS = new Set([\n ...COMPONENT_OBJECT_KEYS,\n 'version',\n]);\nconst ROOT_OBJECT_KEYS = new Set([...COMPONENT_OBJECT_KEYS, '$schema']);\n\n/**\n * Options that tune deep validation.\n *\n * `knownCustomNames` — names of registered plugin components. The deep\n * validator neither flags these as \"unknown component\" nor validates their\n * props here; the plugin layer validates custom props separately.\n *\n * `allowUnknownFields` — when true, unknown properties are stripped before the\n * per-component check instead of being rejected. The escape hatch for callers\n * migrating onto strict schemas.\n */\nexport interface DeepValidateOptions {\n knownCustomNames?: Set<string>;\n allowUnknownFields?: boolean;\n}\n\n/**\n * Deep validate a presentation to collect ALL errors, not just union-level errors.\n */\nexport function deepValidatePresentation(\n data: any,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const allErrors: ValidationError[] = [];\n\n if (!data || typeof data !== 'object') {\n allErrors.push({\n path: 'root',\n message: 'Presentation must be an object',\n code: 'invalid_type',\n });\n return allErrors;\n }\n\n if (!data.name) {\n allErrors.push({\n path: '/name',\n message: 'Missing required field \"name\"',\n code: 'required_property',\n });\n } else if (!ROOT_COMPONENT_NAMES.has(data.name)) {\n const expected = [...ROOT_COMPONENT_NAMES].map((n) => `\"${n}\"`).join(', ');\n allErrors.push({\n path: '/name',\n message: `Invalid name \"${data.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n\n for (const key of Object.keys(data)) {\n if (!ROOT_OBJECT_KEYS.has(key)) {\n allErrors.push({\n path: `/${key}`,\n message: `Unknown field \"${key}\" on the root component`,\n code: 'unknown_field',\n });\n }\n }\n\n // Validate props when the key is present so explicit `null` (or any falsy\n // non-object) is checked against the component's schema instead of silently\n // passing.\n if (!('props' in data)) {\n allErrors.push({\n path: '/props',\n message: 'Missing required field \"props\"',\n code: 'required_property',\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 walkComponentTree(child, childPath, opts, errors);\n return;\n }\n\n // Validate props against the component's schema. When props is omitted,\n // validate an empty object so the schema decides whether props are\n // required (e.g. `slide` needs none; `text` requires text).\n const propsPath = `${childPath}/props`;\n if (child.props != null) {\n errors.push(\n ...validateComponentProps(child.name, child.props, propsPath, opts)\n );\n } else {\n errors.push(...validateComponentProps(child.name, {}, propsPath, opts));\n }\n\n const def = getPptxStandardComponent(child.name);\n if (def && !def.hasChildren && child.children != null) {\n errors.push({\n path: `${childPath}/children`,\n message: `Component \"${child.name}\" does not accept children`,\n code: 'invalid_value',\n });\n return;\n }\n\n // Recurse so arbitrarily nested containers are covered.\n walkComponentTree(child, childPath, opts, errors);\n };\n\n const parentDef = getPptxStandardComponent(node.name);\n\n // A slide's `placeholders` record maps placeholder names to full components\n // ({ \"title\": { \"name\": \"text\", ... } }). The static SlidePropsSchema does\n // not include the field (it is injected with the recursive ref at schema\n // generation time), so validateComponentProps strips it before checking the\n // slide's own props — each value is validated here instead.\n if (node.name === 'slide' && node.props && typeof node.props === 'object') {\n const placeholders = node.props.placeholders;\n if (\n placeholders &&\n typeof placeholders === 'object' &&\n !Array.isArray(placeholders)\n ) {\n for (const [key, child] of Object.entries(placeholders)) {\n validateEntry(child, `${path}/props/placeholders/${key}`);\n }\n } else if (placeholders != null) {\n errors.push({\n path: `${path}/props/placeholders`,\n message:\n 'Field \"placeholders\" must be an object mapping placeholder names to components',\n code: 'invalid_type',\n });\n }\n }\n\n if (Array.isArray(node.children)) {\n node.children.forEach((child: any, i: number) => {\n const childPath = `${path}/children/${i}`;\n // Enforce the registry's container narrowing (pptx → slide,\n // slide → content) for known components; unknown names are already\n // reported by validateComponentProps inside validateEntry.\n if (\n parentDef?.allowedChildren &&\n child &&\n typeof child === 'object' &&\n typeof child.name === 'string' &&\n getPptxStandardComponent(child.name) &&\n !parentDef.allowedChildren.includes(child.name)\n ) {\n const expected = parentDef.allowedChildren\n .map((n) => `\"${n}\"`)\n .join(', ');\n errors.push({\n path: `${childPath}/name`,\n message: `Component \"${child.name}\" is not allowed inside \"${node.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n validateEntry(child, childPath);\n });\n } else if (node.children != null && path !== '') {\n // `children` is present but not an array on a nested container. The root's\n // `children` is already checked by deepValidatePresentation (skipped here\n // via `path !== ''` so it is not reported twice).\n errors.push({\n path: `${path}/children`,\n message: 'Field \"children\" must be an array',\n code: 'invalid_type',\n });\n }\n}\n\n/**\n * Validate a component's props against its schema.\n */\nfunction validateComponentProps(\n componentName: string,\n props: any,\n basePath: string,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const schema = COMPONENT_SCHEMAS[componentName];\n if (!schema) {\n // Unknown component type. `basePath` always ends in `/props`; anchor the\n // swap to the end so a nested path like `…/props/placeholders/title/props`\n // becomes `…/props/placeholders/title/name` rather than mangling an\n // earlier `/props`.\n errors.push({\n path: basePath.replace(/\\/props$/, '/name'),\n message: `Unknown component \"${componentName}\"`,\n code: 'unknown_component',\n });\n return errors;\n }\n\n // A slide's `placeholders` field is injected at schema-generation time and\n // absent from the static props schema; its values are walked separately, so\n // strip it here to avoid a false additionalProperties rejection.\n let toCheck = props;\n if (\n componentName === 'slide' &&\n props &&\n typeof props === 'object' &&\n 'placeholders' in props\n ) {\n const rest = { ...props };\n delete rest.placeholders;\n toCheck = rest;\n }\n\n // When unknown fields are explicitly allowed, strip them before checking so\n // additionalProperties:false no longer rejects — required/typed fields are\n // still enforced.\n if (opts.allowUnknownFields) {\n toCheck = Value.Clean(schema, Value.Clone(toCheck));\n }\n\n if (!Value.Check(schema, toCheck)) {\n const valueErrors = [...Value.Errors(schema, toCheck)];\n const transformedErrors = transformValueErrors(valueErrors, {\n maxErrors: 100,\n });\n\n // Adjust paths to be relative to the document root\n transformedErrors.forEach((error) => {\n const fullPath =\n error.path === 'root'\n ? basePath\n : `${basePath}${error.path.startsWith('/') ? error.path : '/' + error.path}`;\n\n errors.push({\n ...error,\n path: fullPath,\n });\n });\n }\n\n return errors;\n}\n\n/**\n * Combine deep validation with standard validation.\n *\n * Deep validation produces precise, path-aware errors. TypeBox's discriminated-\n * union check, by contrast, often collapses any failure under the root into a\n * single generic \"Invalid component configuration for 'pptx'\" message at\n * `root` — useful as a signal that something is wrong, but actionable only via\n * the deep-validator's output. We always strip that catch-all so it doesn't\n * appear alongside (or, worse, instead of) the real diagnostics.\n */\nexport function comprehensiveValidatePresentation(\n data: any,\n existingErrors: ValidationError[] = [],\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const deepErrors = deepValidatePresentation(data, opts);\n\n const filteredExisting = existingErrors.filter(\n (e) => !isGenericUnionCatchAll(e)\n );\n\n return deduplicateErrors([...filteredExisting, ...deepErrors]);\n}\n\n/**\n * Detect TypeBox's generic union/discriminator catch-all error at the document\n * root. These messages name the component type ('pptx') but give no actionable\n * detail — the deep validator emits the actual path-level errors instead.\n */\nfunction isGenericUnionCatchAll(error: ValidationError): boolean {\n const atRoot = !error.path || error.path === 'root' || error.path === '/';\n if (!atRoot) return false;\n const msg = error.message || '';\n return (\n /invalid component 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} from './schemas/component-registry';\n\nexport type { PptxStandardComponentDefinition } from './schemas/component-registry';\n\n// Document Schema\nexport {\n PptxJsonComponentDefinitionSchema,\n PPTX_JSON_SCHEMA_URLS,\n} from './schemas/document';\n\nexport type { PptxJsonComponentDefinition } from './schemas/document';\n\n// Schema Export Metadata\nexport {\n PPTX_COMPONENT_METADATA,\n PPTX_BASE_SCHEMA_METADATA,\n} from './schemas/export';\n\n// Component Defaults\nexport {\n PptxComponentDefaultsSchema,\n TextComponentDefaultsSchema,\n ImageComponentDefaultsSchema,\n ShapeComponentDefaultsSchema,\n TableComponentDefaultsSchema,\n HighchartsComponentDefaultsSchema,\n ChartComponentDefaultsSchema,\n} from './schemas/component-defaults';\nexport type {\n PptxComponentDefaults,\n TextComponentDefaults,\n ImageComponentDefaults,\n ShapeComponentDefaults,\n TableComponentDefaults,\n HighchartsComponentDefaults,\n ChartComponentDefaults,\n} from './schemas/component-defaults';\n\n// Theme\nexport {\n ThemeConfigSchema,\n ColorValueSchema,\n SEMANTIC_COLOR_NAMES,\n SEMANTIC_COLOR_ALIASES,\n STYLE_NAMES,\n StyleNameSchema,\n TextStyleSchema,\n isValidThemeConfig,\n} from './schemas/theme';\nexport type { ThemeConfigJson, StyleName, TextStyle } from './schemas/theme';\n\n// Schema Generator\nexport { generateUnifiedDocumentSchema } from './schemas/generator';\nexport type {\n VersionedPropsEntry,\n CustomComponentInfo,\n GenerateSchemaOptions,\n} from './schemas/generator';\n\n// Types\nexport type { ReportComponent } from './types/components';\n\n// Image source conflict detection (path/base64/svg mutual exclusivity)\nexport {\n collectImageSourceConflicts,\n presentImageSources,\n} from './validation/image-source-conflicts';\n\n// 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,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tB,QAAM,EAAE,QAAQ,MAAM,IAAI,eAAe,SAAS;AAClD,MAAI,MAAO,QAAO,EAAE,OAAO,OAAO,QAAQ,CAAC,KAAK,EAAE;AAClD,SAAO,kBAAkB,MAAM;AACjC;AAKO,IAAM,WAAW;AAAA,EACtB,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAAA,EAC1E,YAAY,CAAC,SAAkB,6BAA6B,IAAI,EAAE;AAAA,EAClE,SAAS,CAAC,SAAkB,kBAAkB,IAAI,EAAE;AACtD;AAOO,IAAM,iBAAiB;AAAA,EAC5B,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAC5E;;;AEkBA;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;AArLA,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} 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 validates their\n * props here; the plugin layer validates custom props separately.\n *\n * `allowUnknownFields` — when true, unknown properties are stripped before the\n * per-component check instead of being rejected. The escape hatch for callers\n * migrating onto strict schemas.\n */\nexport interface DeepValidateOptions {\n knownCustomNames?: Set<string>;\n allowUnknownFields?: boolean;\n}\n\n/**\n * Deep validate a presentation to collect ALL errors, not just union-level errors.\n */\nexport function deepValidatePresentation(\n data: any,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const allErrors: ValidationError[] = [];\n\n if (!data || typeof data !== 'object') {\n allErrors.push({\n path: 'root',\n message: 'Presentation must be an object',\n code: 'invalid_type',\n });\n return allErrors;\n }\n\n if (!data.name) {\n allErrors.push({\n path: '/name',\n message: 'Missing required field \"name\"',\n code: 'required_property',\n });\n } else if (!ROOT_COMPONENT_NAMES.has(data.name)) {\n const expected = [...ROOT_COMPONENT_NAMES].map((n) => `\"${n}\"`).join(', ');\n allErrors.push({\n path: '/name',\n message: `Invalid name \"${data.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n\n for (const key of Object.keys(data)) {\n if (!ROOT_OBJECT_KEYS.has(key)) {\n allErrors.push({\n path: `/${key}`,\n message: `Unknown field \"${key}\" on the root component`,\n code: 'unknown_field',\n });\n }\n }\n\n // Validate props when the key is present so explicit `null` (or any falsy\n // non-object) is checked against the component's schema instead of silently\n // passing.\n if (!('props' in data)) {\n allErrors.push({\n path: '/props',\n message: 'Missing required field \"props\"',\n code: 'required_property',\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 walkComponentTree(child, childPath, opts, errors);\n return;\n }\n\n // Validate props against the component's schema. When props is omitted,\n // validate an empty object so the schema decides whether props are\n // required (e.g. `slide` needs none; `text` requires text).\n const propsPath = `${childPath}/props`;\n if (child.props != null) {\n errors.push(\n ...validateComponentProps(child.name, child.props, propsPath, opts)\n );\n } else {\n errors.push(...validateComponentProps(child.name, {}, propsPath, opts));\n }\n\n const def = getPptxStandardComponent(child.name);\n if (def && !def.hasChildren && child.children != null) {\n errors.push({\n path: `${childPath}/children`,\n message: `Component \"${child.name}\" does not accept children`,\n code: 'invalid_value',\n });\n return;\n }\n\n // Recurse so arbitrarily nested containers are covered.\n walkComponentTree(child, childPath, opts, errors);\n };\n\n const parentDef = getPptxStandardComponent(node.name);\n\n // A slide's `placeholders` record maps placeholder names to full components\n // ({ \"title\": { \"name\": \"text\", ... } }). The static SlidePropsSchema does\n // not include the field (it is injected with the recursive ref at schema\n // generation time), so validateComponentProps strips it before checking the\n // slide's own props — each value is validated here instead.\n if (node.name === 'slide' && node.props && typeof node.props === 'object') {\n const placeholders = node.props.placeholders;\n if (\n placeholders &&\n typeof placeholders === 'object' &&\n !Array.isArray(placeholders)\n ) {\n for (const [key, child] of Object.entries(placeholders)) {\n validateEntry(child, `${path}/props/placeholders/${key}`);\n }\n } else if (placeholders != null) {\n errors.push({\n path: `${path}/props/placeholders`,\n message:\n 'Field \"placeholders\" must be an object mapping placeholder names to components',\n code: 'invalid_type',\n });\n }\n }\n\n if (Array.isArray(node.children)) {\n node.children.forEach((child: any, i: number) => {\n const childPath = `${path}/children/${i}`;\n // Enforce the registry's container narrowing (pptx → slide,\n // slide → content) for known components; unknown names are already\n // reported by validateComponentProps inside validateEntry.\n if (\n parentDef?.allowedChildren &&\n child &&\n typeof child === 'object' &&\n typeof child.name === 'string' &&\n getPptxStandardComponent(child.name) &&\n !parentDef.allowedChildren.includes(child.name)\n ) {\n const expected = parentDef.allowedChildren\n .map((n) => `\"${n}\"`)\n .join(', ');\n errors.push({\n path: `${childPath}/name`,\n message: `Component \"${child.name}\" is not allowed inside \"${node.name}\". Expected ${expected}`,\n code: 'invalid_value',\n });\n }\n validateEntry(child, childPath);\n });\n } else if (node.children != null && path !== '') {\n // `children` is present but not an array on a nested container. The root's\n // `children` is already checked by deepValidatePresentation (skipped here\n // via `path !== ''` so it is not reported twice).\n errors.push({\n path: `${path}/children`,\n message: 'Field \"children\" must be an array',\n code: 'invalid_type',\n });\n }\n}\n\n/**\n * Validate a component's props against its schema.\n */\nfunction validateComponentProps(\n componentName: string,\n props: any,\n basePath: string,\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n const schema = COMPONENT_SCHEMAS[componentName];\n if (!schema) {\n // Unknown component type. `basePath` always ends in `/props`; anchor the\n // swap to the end so a nested path like `…/props/placeholders/title/props`\n // becomes `…/props/placeholders/title/name` rather than mangling an\n // earlier `/props`.\n errors.push({\n path: basePath.replace(/\\/props$/, '/name'),\n message: `Unknown component \"${componentName}\"`,\n code: 'unknown_component',\n });\n return errors;\n }\n\n // A slide's `placeholders` field is injected at schema-generation time and\n // absent from the static props schema; its values are walked separately, so\n // strip it here to avoid a false additionalProperties rejection.\n let toCheck = props;\n if (\n componentName === 'slide' &&\n props &&\n typeof props === 'object' &&\n 'placeholders' in props\n ) {\n const rest = { ...props };\n delete rest.placeholders;\n toCheck = rest;\n }\n\n // When unknown fields are explicitly allowed, strip them before checking so\n // additionalProperties:false no longer rejects — required/typed fields are\n // still enforced.\n if (opts.allowUnknownFields) {\n toCheck = Value.Clean(schema, Value.Clone(toCheck));\n }\n\n if (!Value.Check(schema, toCheck)) {\n const valueErrors = [...Value.Errors(schema, toCheck)];\n const transformedErrors = transformValueErrors(valueErrors, {\n maxErrors: 100,\n });\n\n // Adjust paths to be relative to the document root\n transformedErrors.forEach((error) => {\n const fullPath =\n error.path === 'root'\n ? basePath\n : `${basePath}${error.path.startsWith('/') ? error.path : '/' + error.path}`;\n\n errors.push({\n ...error,\n path: fullPath,\n });\n });\n }\n\n return errors;\n}\n\n/**\n * Combine deep validation with standard validation.\n *\n * Deep validation produces precise, path-aware errors. TypeBox's discriminated-\n * union check, by contrast, often collapses any failure under the root into a\n * single generic \"Invalid component configuration for 'pptx'\" message at\n * `root` — useful as a signal that something is wrong, but actionable only via\n * the deep-validator's output. We always strip that catch-all so it doesn't\n * appear alongside (or, worse, instead of) the real diagnostics.\n */\nexport function comprehensiveValidatePresentation(\n data: any,\n existingErrors: ValidationError[] = [],\n opts: DeepValidateOptions = {}\n): ValidationError[] {\n const deepErrors = deepValidatePresentation(data, opts);\n\n const filteredExisting = existingErrors.filter(\n (e) => !isGenericUnionCatchAll(e)\n );\n\n return deduplicateErrors([...filteredExisting, ...deepErrors]);\n}\n\n/**\n * Detect TypeBox's generic union/discriminator catch-all error at the document\n * root. These messages name the component type ('pptx') but give no actionable\n * detail — the deep validator emits the actual path-level errors instead.\n */\nfunction isGenericUnionCatchAll(error: ValidationError): boolean {\n const atRoot = !error.path || error.path === 'root' || error.path === '/';\n if (!atRoot) return false;\n const msg = error.message || '';\n return (\n /invalid component 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} 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,GAAG,IAAI,IAAI,GAAG,EAAE;AAAA,IACn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SAAS,sBACd,WACsB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,eAAe,SAAS;AAClD,MAAI,MAAO,QAAO,EAAE,OAAO,OAAO,QAAQ,CAAC,KAAK,EAAE;AAClD,SAAO,kBAAkB,MAAM;AACjC;AAKO,IAAM,WAAW;AAAA,EACtB,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAAA,EAC1E,YAAY,CAAC,SAAkB,6BAA6B,IAAI,EAAE;AAAA,EAClE,SAAS,CAAC,SAAkB,kBAAkB,IAAI,EAAE;AACtD;AAOO,IAAM,iBAAiB;AAAA,EAC5B,UAAU,CAAC,SAAkB,6BAA6B,IAAI;AAAA,EAC9D,cAAc,CAAC,cACb,iCAAiC,SAAS;AAAA,EAC5C,OAAO,CAAC,SAAkB,kBAAkB,IAAI;AAAA,EAChD,WAAW,CAAC,cAA+B,sBAAsB,SAAS;AAC5E;;;AEwBA;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;AA7LA,IAAM,sBAAsB;","names":["Value","transformValueErrors","Value","transformValueErrors","transformValueErrors"]}
|
|
@@ -216,6 +216,7 @@ declare const TableComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
216
216
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
217
217
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
218
218
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
219
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
219
220
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
220
221
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
221
222
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -273,6 +274,7 @@ declare const ChartComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
273
274
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
274
275
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
275
276
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
277
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
276
278
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
277
279
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
278
280
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -281,6 +283,7 @@ declare const ChartComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
281
283
|
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
282
284
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
283
285
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
286
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
284
287
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
285
288
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
286
289
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -288,6 +291,7 @@ declare const ChartComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
288
291
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
289
292
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
290
293
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
294
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
291
295
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
292
296
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
293
297
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -301,6 +305,7 @@ declare const ChartComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
301
305
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
302
306
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
303
307
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
308
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
304
309
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
305
310
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
306
311
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -323,6 +328,7 @@ declare const ChartComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
323
328
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
324
329
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
325
330
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
331
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
326
332
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
327
333
|
dataLabelPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"bestFit">, _sinclair_typebox.TLiteral<"ctr">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"inEnd">, _sinclair_typebox.TLiteral<"outEnd">]>>;
|
|
328
334
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -552,6 +558,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
552
558
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
553
559
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
554
560
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
561
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
555
562
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
556
563
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
557
564
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -609,6 +616,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
609
616
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
610
617
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
611
618
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
619
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
612
620
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
613
621
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
614
622
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -617,6 +625,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
617
625
|
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
618
626
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
619
627
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
628
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
620
629
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
621
630
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
622
631
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -624,6 +633,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
624
633
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
625
634
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
626
635
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
636
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
627
637
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
628
638
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
629
639
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -637,6 +647,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
637
647
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
638
648
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
639
649
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
650
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
640
651
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
641
652
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
642
653
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -659,6 +670,7 @@ declare const PptxComponentDefaultsSchema: _sinclair_typebox.TObject<{
|
|
|
659
670
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
660
671
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
661
672
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
673
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
662
674
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
663
675
|
dataLabelPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"bestFit">, _sinclair_typebox.TLiteral<"ctr">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"inEnd">, _sinclair_typebox.TLiteral<"outEnd">]>>;
|
|
664
676
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TSchema } from '@sinclair/typebox';
|
|
2
|
+
import { PptxRendererId } from './renderer.js';
|
|
3
|
+
import '@json-to-office/shared';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* PPTX Component Registry - SINGLE SOURCE OF TRUTH
|
|
@@ -38,7 +40,10 @@ declare function getPptxComponentsByCategory(category: PptxStandardComponentDefi
|
|
|
38
40
|
declare function getPptxContainerComponents(): readonly PptxStandardComponentDefinition[];
|
|
39
41
|
declare function getPptxContentComponents(): readonly PptxStandardComponentDefinition[];
|
|
40
42
|
declare function isPptxStandardComponent(name: string): boolean;
|
|
41
|
-
declare function createPptxComponentSchemaObject(component: PptxStandardComponentDefinition, recursiveRef?: TSchema, placeholderRef?: TSchema
|
|
43
|
+
declare function createPptxComponentSchemaObject(component: PptxStandardComponentDefinition, recursiveRef?: TSchema, placeholderRef?: TSchema, profile?: {
|
|
44
|
+
renderer: PptxRendererId;
|
|
45
|
+
requireDiscriminator: boolean;
|
|
46
|
+
}): TSchema;
|
|
42
47
|
declare function createAllPptxComponentSchemas(recursiveRef?: TSchema): readonly TSchema[];
|
|
43
48
|
/**
|
|
44
49
|
* Build all standard PPTX component schemas with per-container narrowed children.
|
|
@@ -51,6 +56,9 @@ declare function createAllPptxComponentSchemas(recursiveRef?: TSchema): readonly
|
|
|
51
56
|
* @param pluginSchemas - Plugin component schemas (always allowed in all containers)
|
|
52
57
|
* @returns Array of TypeBox schemas with narrowed children per container
|
|
53
58
|
*/
|
|
54
|
-
declare function createAllPptxComponentSchemasNarrowed(selfRef: TSchema, pluginSchemas?: TSchema[]
|
|
59
|
+
declare function createAllPptxComponentSchemasNarrowed(selfRef: TSchema, pluginSchemas?: TSchema[], profile?: {
|
|
60
|
+
renderer: PptxRendererId;
|
|
61
|
+
requireDiscriminator: boolean;
|
|
62
|
+
}): TSchema[];
|
|
55
63
|
|
|
56
64
|
export { PPTX_STANDARD_COMPONENTS_REGISTRY, type PptxStandardComponentDefinition, createAllPptxComponentSchemas, createAllPptxComponentSchemasNarrowed, createPptxComponentSchemaObject, getAllPptxComponentNames, getPptxComponentsByCategory, getPptxContainerComponents, getPptxContentComponents, getPptxStandardComponent, isPptxStandardComponent };
|
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
getPptxContentComponents,
|
|
10
10
|
getPptxStandardComponent,
|
|
11
11
|
isPptxStandardComponent
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-2MZVIHSQ.js";
|
|
13
|
+
import "../chunk-2YEV3CJF.js";
|
|
14
|
+
import "../chunk-N6CABSXM.js";
|
|
14
15
|
import "../chunk-7CKCXKN7.js";
|
|
15
16
|
export {
|
|
16
17
|
PPTX_STANDARD_COMPONENTS_REGISTRY,
|
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
PptxComponentDefinitionSchema,
|
|
3
3
|
PptxSlideContentSchema,
|
|
4
4
|
PptxStandardComponentDefinitionSchema
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-YSJMKGLM.js";
|
|
6
|
+
import "../chunk-2MZVIHSQ.js";
|
|
7
|
+
import "../chunk-2YEV3CJF.js";
|
|
8
|
+
import "../chunk-N6CABSXM.js";
|
|
8
9
|
import "../chunk-7CKCXKN7.js";
|
|
9
10
|
export {
|
|
10
11
|
PptxComponentDefinitionSchema,
|
|
@@ -57,6 +57,41 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
57
57
|
heading: _sinclair_typebox.TString;
|
|
58
58
|
body: _sinclair_typebox.TString;
|
|
59
59
|
}>;
|
|
60
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
61
|
+
id: _sinclair_typebox.TString;
|
|
62
|
+
family: _sinclair_typebox.TString;
|
|
63
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
64
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
65
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
66
|
+
family: _sinclair_typebox.TString;
|
|
67
|
+
}>, _sinclair_typebox.TObject<{
|
|
68
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
69
|
+
family: _sinclair_typebox.TString;
|
|
70
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
71
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
72
|
+
}>, _sinclair_typebox.TObject<{
|
|
73
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
74
|
+
path: _sinclair_typebox.TString;
|
|
75
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
76
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
77
|
+
}>, _sinclair_typebox.TObject<{
|
|
78
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
79
|
+
data: _sinclair_typebox.TString;
|
|
80
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
81
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
82
|
+
}>, _sinclair_typebox.TObject<{
|
|
83
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
84
|
+
url: _sinclair_typebox.TString;
|
|
85
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
86
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
87
|
+
}>, _sinclair_typebox.TObject<{
|
|
88
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
89
|
+
url: _sinclair_typebox.TString;
|
|
90
|
+
weight: _sinclair_typebox.TNumber;
|
|
91
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
92
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
93
|
+
}>]>>;
|
|
94
|
+
}>>>;
|
|
60
95
|
defaults: _sinclair_typebox.TObject<{
|
|
61
96
|
fontSize: _sinclair_typebox.TNumber;
|
|
62
97
|
fontColor: _sinclair_typebox.TString;
|
|
@@ -291,6 +326,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
291
326
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
292
327
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
293
328
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
329
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
294
330
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
295
331
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
296
332
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -348,6 +384,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
348
384
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
349
385
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
350
386
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
387
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
351
388
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
352
389
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
353
390
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -356,6 +393,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
356
393
|
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
357
394
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
358
395
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
396
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
359
397
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
360
398
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
361
399
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -363,6 +401,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
363
401
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
364
402
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
365
403
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
404
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
366
405
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
367
406
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
368
407
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -376,6 +415,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
376
415
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
377
416
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
378
417
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
418
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
379
419
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
380
420
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
381
421
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -398,6 +438,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
398
438
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
399
439
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
400
440
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
441
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
401
442
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
402
443
|
dataLabelPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"bestFit">, _sinclair_typebox.TLiteral<"ctr">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"inEnd">, _sinclair_typebox.TLiteral<"outEnd">]>>;
|
|
403
444
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -413,6 +454,41 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
413
454
|
}>>;
|
|
414
455
|
}>>;
|
|
415
456
|
}>]>>;
|
|
457
|
+
fontRegistry: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
458
|
+
id: _sinclair_typebox.TString;
|
|
459
|
+
family: _sinclair_typebox.TString;
|
|
460
|
+
category: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sans">, _sinclair_typebox.TLiteral<"serif">, _sinclair_typebox.TLiteral<"mono">, _sinclair_typebox.TLiteral<"display">, _sinclair_typebox.TLiteral<"handwriting">]>>;
|
|
461
|
+
sources: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
462
|
+
kind: _sinclair_typebox.TLiteral<"safe">;
|
|
463
|
+
family: _sinclair_typebox.TString;
|
|
464
|
+
}>, _sinclair_typebox.TObject<{
|
|
465
|
+
kind: _sinclair_typebox.TLiteral<"google">;
|
|
466
|
+
family: _sinclair_typebox.TString;
|
|
467
|
+
weights: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
468
|
+
italics: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
469
|
+
}>, _sinclair_typebox.TObject<{
|
|
470
|
+
kind: _sinclair_typebox.TLiteral<"file">;
|
|
471
|
+
path: _sinclair_typebox.TString;
|
|
472
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
473
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
474
|
+
}>, _sinclair_typebox.TObject<{
|
|
475
|
+
kind: _sinclair_typebox.TLiteral<"data">;
|
|
476
|
+
data: _sinclair_typebox.TString;
|
|
477
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
478
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
479
|
+
}>, _sinclair_typebox.TObject<{
|
|
480
|
+
kind: _sinclair_typebox.TLiteral<"url">;
|
|
481
|
+
url: _sinclair_typebox.TString;
|
|
482
|
+
weight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
483
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
484
|
+
}>, _sinclair_typebox.TObject<{
|
|
485
|
+
kind: _sinclair_typebox.TLiteral<"variable">;
|
|
486
|
+
url: _sinclair_typebox.TString;
|
|
487
|
+
weight: _sinclair_typebox.TNumber;
|
|
488
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
489
|
+
axes: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TNumber>>;
|
|
490
|
+
}>]>>;
|
|
491
|
+
}>>>;
|
|
416
492
|
slideWidth: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
417
493
|
slideHeight: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
418
494
|
rtlMode: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -634,6 +710,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
634
710
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
635
711
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
636
712
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
713
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
637
714
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
638
715
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
639
716
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -691,6 +768,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
691
768
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
692
769
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
693
770
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
771
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
694
772
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
695
773
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
696
774
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -699,6 +777,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
699
777
|
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
700
778
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
701
779
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
780
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
702
781
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
703
782
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
704
783
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -706,6 +785,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
706
785
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
707
786
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
708
787
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
788
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
709
789
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
710
790
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
711
791
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -719,6 +799,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
719
799
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
720
800
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
721
801
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
802
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
722
803
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
723
804
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
724
805
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -741,6 +822,7 @@ declare const PresentationPropsSchema: _sinclair_typebox.TObject<{
|
|
|
741
822
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
742
823
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
743
824
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
825
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
744
826
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
745
827
|
dataLabelPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"bestFit">, _sinclair_typebox.TLiteral<"ctr">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"inEnd">, _sinclair_typebox.TLiteral<"outEnd">]>>;
|
|
746
828
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PptxComponentDefinitionSchema,
|
|
4
4
|
PptxSlideContentSchema,
|
|
5
5
|
PptxStandardComponentDefinitionSchema
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-YSJMKGLM.js";
|
|
7
7
|
import {
|
|
8
8
|
GridPositionSchema,
|
|
9
9
|
PositionSchema,
|
|
@@ -14,8 +14,9 @@ import {
|
|
|
14
14
|
SlidePropsSchema,
|
|
15
15
|
TransitionSchema,
|
|
16
16
|
VerticalAlignmentSchema
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-2MZVIHSQ.js";
|
|
18
|
+
import "../chunk-2YEV3CJF.js";
|
|
19
|
+
import "../chunk-N6CABSXM.js";
|
|
19
20
|
import {
|
|
20
21
|
GradientFillSchema,
|
|
21
22
|
GradientStopSchema,
|
package/dist/schemas/document.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PPTX_JSON_SCHEMA_URLS,
|
|
3
3
|
PptxJsonComponentDefinitionSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-F3FQ7ADB.js";
|
|
5
5
|
import "../chunk-J4OT5Y5B.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-YSJMKGLM.js";
|
|
7
|
+
import "../chunk-2MZVIHSQ.js";
|
|
8
|
+
import "../chunk-2YEV3CJF.js";
|
|
9
|
+
import "../chunk-N6CABSXM.js";
|
|
9
10
|
import "../chunk-7CKCXKN7.js";
|
|
10
11
|
export {
|
|
11
12
|
PPTX_JSON_SCHEMA_URLS,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateUnifiedDocumentSchema
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-5WT7G2OG.js";
|
|
4
|
+
import "../chunk-2MZVIHSQ.js";
|
|
5
|
+
import "../chunk-2YEV3CJF.js";
|
|
6
|
+
import "../chunk-N6CABSXM.js";
|
|
6
7
|
import "../chunk-7CKCXKN7.js";
|
|
7
8
|
export {
|
|
8
9
|
generateUnifiedDocumentSchema
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TSchema } from '@sinclair/typebox';
|
|
2
|
+
import { ValidationError } from '@json-to-office/shared';
|
|
3
|
+
|
|
4
|
+
declare const PPTX_RENDERER_IDS: readonly ["pptxgenjs", "office-open"];
|
|
5
|
+
type PptxRendererId = (typeof PPTX_RENDERER_IDS)[number];
|
|
6
|
+
declare const DEFAULT_PPTX_RENDERER_ID: PptxRendererId;
|
|
7
|
+
/**
|
|
8
|
+
* Renderer-specific view of one canonical component props schema.
|
|
9
|
+
*
|
|
10
|
+
* This is intentionally a pruning pass rather than a second schema tree. The
|
|
11
|
+
* compiler capability gate remains authoritative for requirements that depend
|
|
12
|
+
* on resolved assets or expanded custom components.
|
|
13
|
+
*/
|
|
14
|
+
declare function pptxPropsSchemaForRenderer(componentName: string, schema: TSchema, renderer: PptxRendererId): TSchema;
|
|
15
|
+
declare function isPptxComponentSupported(componentName: string, renderer: PptxRendererId): boolean;
|
|
16
|
+
/** Static renderer-profile diagnostics used by CLI/library validation. */
|
|
17
|
+
declare function collectPptxRendererErrors(data: unknown): ValidationError[];
|
|
18
|
+
|
|
19
|
+
export { DEFAULT_PPTX_RENDERER_ID, PPTX_RENDERER_IDS, type PptxRendererId, collectPptxRendererErrors, isPptxComponentSupported, pptxPropsSchemaForRenderer };
|