@json-to-office/shared-pptx 0.1.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/LICENSE +18 -0
- package/README.md +9 -0
- package/dist/chunk-2USGRQBI.js +1109 -0
- package/dist/chunk-2USGRQBI.js.map +1 -0
- package/dist/chunk-3MJF4X5S.js +28 -0
- package/dist/chunk-3MJF4X5S.js.map +1 -0
- package/dist/chunk-COFU7FOQ.js +21 -0
- package/dist/chunk-COFU7FOQ.js.map +1 -0
- package/dist/chunk-J4OT5Y5B.js +1 -0
- package/dist/chunk-J4OT5Y5B.js.map +1 -0
- package/dist/chunk-MZ3TEFYH.js +154 -0
- package/dist/chunk-MZ3TEFYH.js.map +1 -0
- package/dist/chunk-RV7W3UXU.js +51 -0
- package/dist/chunk-RV7W3UXU.js.map +1 -0
- package/dist/chunk-USXTHQ7L.js +40 -0
- package/dist/chunk-USXTHQ7L.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +124 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/component-registry.d.ts +37 -0
- package/dist/schemas/component-registry.js +24 -0
- package/dist/schemas/component-registry.js.map +1 -0
- package/dist/schemas/component-union.d.ts +8 -0
- package/dist/schemas/component-union.js +11 -0
- package/dist/schemas/component-union.js.map +1 -0
- package/dist/schemas/components.d.ts +419 -0
- package/dist/schemas/components.js +45 -0
- package/dist/schemas/components.js.map +1 -0
- package/dist/schemas/document.d.ts +16 -0
- package/dist/schemas/document.js +13 -0
- package/dist/schemas/document.js.map +1 -0
- package/dist/schemas/export.d.ts +14 -0
- package/dist/schemas/export.js +9 -0
- package/dist/schemas/export.js.map +1 -0
- package/dist/schemas/generator.d.ts +30 -0
- package/dist/schemas/generator.js +9 -0
- package/dist/schemas/generator.js.map +1 -0
- package/dist/schemas/theme.d.ts +89 -0
- package/dist/schemas/theme.js +27 -0
- package/dist/schemas/theme.js.map +1 -0
- package/package.json +74 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PPTX_JSON_SCHEMA_URLS,
|
|
3
|
+
PptxJsonComponentDefinitionSchema
|
|
4
|
+
} from "./chunk-COFU7FOQ.js";
|
|
5
|
+
import "./chunk-J4OT5Y5B.js";
|
|
6
|
+
import {
|
|
7
|
+
PptxComponentDefinitionSchema,
|
|
8
|
+
PptxStandardComponentDefinitionSchema
|
|
9
|
+
} from "./chunk-3MJF4X5S.js";
|
|
10
|
+
import {
|
|
11
|
+
PPTX_BASE_SCHEMA_METADATA,
|
|
12
|
+
PPTX_COMPONENT_METADATA
|
|
13
|
+
} from "./chunk-RV7W3UXU.js";
|
|
14
|
+
import {
|
|
15
|
+
generateUnifiedDocumentSchema
|
|
16
|
+
} from "./chunk-USXTHQ7L.js";
|
|
17
|
+
import {
|
|
18
|
+
PPTX_STANDARD_COMPONENTS_REGISTRY,
|
|
19
|
+
PositionSchema,
|
|
20
|
+
PptxHighchartsPropsSchema,
|
|
21
|
+
PptxImagePropsSchema,
|
|
22
|
+
PptxTablePropsSchema,
|
|
23
|
+
PresentationPropsSchema,
|
|
24
|
+
ShadowSchema,
|
|
25
|
+
ShapePropsSchema,
|
|
26
|
+
ShapeTypeSchema,
|
|
27
|
+
SlideBackgroundSchema,
|
|
28
|
+
SlidePropsSchema,
|
|
29
|
+
TextPropsSchema,
|
|
30
|
+
TransitionSchema,
|
|
31
|
+
VerticalAlignmentSchema,
|
|
32
|
+
createAllPptxComponentSchemas,
|
|
33
|
+
createPptxComponentSchemaObject,
|
|
34
|
+
getAllPptxComponentNames,
|
|
35
|
+
getPptxComponentsByCategory,
|
|
36
|
+
getPptxContainerComponents,
|
|
37
|
+
getPptxContentComponents,
|
|
38
|
+
getPptxStandardComponent,
|
|
39
|
+
isPptxStandardComponent
|
|
40
|
+
} from "./chunk-2USGRQBI.js";
|
|
41
|
+
import {
|
|
42
|
+
ColorValueSchema,
|
|
43
|
+
SEMANTIC_COLOR_ALIASES,
|
|
44
|
+
SEMANTIC_COLOR_NAMES,
|
|
45
|
+
STYLE_NAMES,
|
|
46
|
+
StyleNameSchema,
|
|
47
|
+
TextStyleSchema,
|
|
48
|
+
ThemeConfigSchema,
|
|
49
|
+
isValidThemeConfig
|
|
50
|
+
} from "./chunk-MZ3TEFYH.js";
|
|
51
|
+
|
|
52
|
+
// src/index.ts
|
|
53
|
+
import {
|
|
54
|
+
transformValueError,
|
|
55
|
+
transformValueErrors,
|
|
56
|
+
DEFAULT_ERROR_CONFIG,
|
|
57
|
+
createErrorConfig
|
|
58
|
+
} from "@json-to-office/shared";
|
|
59
|
+
import {
|
|
60
|
+
latestVersion,
|
|
61
|
+
isValidSemver,
|
|
62
|
+
parseSemver,
|
|
63
|
+
compareSemver
|
|
64
|
+
} from "@json-to-office/shared";
|
|
65
|
+
import {
|
|
66
|
+
fixSchemaReferences,
|
|
67
|
+
convertToJsonSchema,
|
|
68
|
+
createComponentSchema,
|
|
69
|
+
exportSchemaToFile
|
|
70
|
+
} from "@json-to-office/shared";
|
|
71
|
+
var PPTX_SHARED_VERSION = "1.0.0";
|
|
72
|
+
export {
|
|
73
|
+
ColorValueSchema,
|
|
74
|
+
DEFAULT_ERROR_CONFIG,
|
|
75
|
+
PPTX_BASE_SCHEMA_METADATA,
|
|
76
|
+
PPTX_COMPONENT_METADATA,
|
|
77
|
+
PPTX_JSON_SCHEMA_URLS,
|
|
78
|
+
PPTX_SHARED_VERSION,
|
|
79
|
+
PPTX_STANDARD_COMPONENTS_REGISTRY,
|
|
80
|
+
PositionSchema,
|
|
81
|
+
PptxComponentDefinitionSchema,
|
|
82
|
+
PptxHighchartsPropsSchema,
|
|
83
|
+
PptxImagePropsSchema,
|
|
84
|
+
PptxJsonComponentDefinitionSchema,
|
|
85
|
+
PptxStandardComponentDefinitionSchema,
|
|
86
|
+
PptxTablePropsSchema,
|
|
87
|
+
PresentationPropsSchema,
|
|
88
|
+
SEMANTIC_COLOR_ALIASES,
|
|
89
|
+
SEMANTIC_COLOR_NAMES,
|
|
90
|
+
STYLE_NAMES,
|
|
91
|
+
ShadowSchema,
|
|
92
|
+
ShapePropsSchema,
|
|
93
|
+
ShapeTypeSchema,
|
|
94
|
+
SlideBackgroundSchema,
|
|
95
|
+
SlidePropsSchema,
|
|
96
|
+
StyleNameSchema,
|
|
97
|
+
TextPropsSchema,
|
|
98
|
+
TextStyleSchema,
|
|
99
|
+
ThemeConfigSchema,
|
|
100
|
+
TransitionSchema,
|
|
101
|
+
VerticalAlignmentSchema,
|
|
102
|
+
compareSemver,
|
|
103
|
+
convertToJsonSchema,
|
|
104
|
+
createAllPptxComponentSchemas,
|
|
105
|
+
createComponentSchema,
|
|
106
|
+
createErrorConfig,
|
|
107
|
+
createPptxComponentSchemaObject,
|
|
108
|
+
exportSchemaToFile,
|
|
109
|
+
fixSchemaReferences,
|
|
110
|
+
generateUnifiedDocumentSchema,
|
|
111
|
+
getAllPptxComponentNames,
|
|
112
|
+
getPptxComponentsByCategory,
|
|
113
|
+
getPptxContainerComponents,
|
|
114
|
+
getPptxContentComponents,
|
|
115
|
+
getPptxStandardComponent,
|
|
116
|
+
isPptxStandardComponent,
|
|
117
|
+
isValidSemver,
|
|
118
|
+
isValidThemeConfig,
|
|
119
|
+
latestVersion,
|
|
120
|
+
parseSemver,
|
|
121
|
+
transformValueError,
|
|
122
|
+
transformValueErrors
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const PPTX_SHARED_VERSION = '1.0.0';\n\n// Component Schemas\nexport {\n PositionSchema,\n SlideBackgroundSchema,\n TransitionSchema,\n VerticalAlignmentSchema,\n ShadowSchema,\n PresentationPropsSchema,\n SlidePropsSchema,\n TextPropsSchema,\n PptxImagePropsSchema,\n ShapePropsSchema,\n ShapeTypeSchema,\n PptxTablePropsSchema,\n PptxHighchartsPropsSchema,\n PptxStandardComponentDefinitionSchema,\n PptxComponentDefinitionSchema,\n} from './schemas/components';\n\nexport type {\n Position,\n SlideBackground,\n Transition,\n VerticalAlignment,\n Shadow,\n PresentationProps,\n SlideProps,\n TextProps,\n PptxImageProps,\n ShapeType,\n ShapeProps,\n TextSegment,\n PptxTableProps,\n PptxHighchartsProps,\n PptxComponentDefinition,\n} from './schemas/components';\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// Theme\nexport { ThemeConfigSchema, ColorValueSchema, SEMANTIC_COLOR_NAMES, SEMANTIC_COLOR_ALIASES, STYLE_NAMES, StyleNameSchema, TextStyleSchema, isValidThemeConfig } 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// 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA/GA,IAAM,sBAAsB;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TSchema } from '@sinclair/typebox';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PPTX Component Registry - SINGLE SOURCE OF TRUTH
|
|
5
|
+
*
|
|
6
|
+
* This is the ONLY place where standard PPTX components are defined.
|
|
7
|
+
* All schema generators MUST use this registry.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Component definition with metadata
|
|
12
|
+
*/
|
|
13
|
+
interface PptxStandardComponentDefinition {
|
|
14
|
+
name: string;
|
|
15
|
+
propsSchema: TSchema;
|
|
16
|
+
hasChildren: boolean;
|
|
17
|
+
hasPlaceholders?: boolean;
|
|
18
|
+
category: 'container' | 'content' | 'layout';
|
|
19
|
+
description: string;
|
|
20
|
+
special?: {
|
|
21
|
+
hasSchemaField?: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* SINGLE SOURCE OF TRUTH for all standard PPTX components
|
|
26
|
+
*/
|
|
27
|
+
declare const PPTX_STANDARD_COMPONENTS_REGISTRY: readonly PptxStandardComponentDefinition[];
|
|
28
|
+
declare function getPptxStandardComponent(name: string): PptxStandardComponentDefinition | undefined;
|
|
29
|
+
declare function getAllPptxComponentNames(): readonly string[];
|
|
30
|
+
declare function getPptxComponentsByCategory(category: PptxStandardComponentDefinition['category']): readonly PptxStandardComponentDefinition[];
|
|
31
|
+
declare function getPptxContainerComponents(): readonly PptxStandardComponentDefinition[];
|
|
32
|
+
declare function getPptxContentComponents(): readonly PptxStandardComponentDefinition[];
|
|
33
|
+
declare function isPptxStandardComponent(name: string): boolean;
|
|
34
|
+
declare function createPptxComponentSchemaObject(component: PptxStandardComponentDefinition, recursiveRef?: TSchema): TSchema;
|
|
35
|
+
declare function createAllPptxComponentSchemas(recursiveRef?: TSchema): readonly TSchema[];
|
|
36
|
+
|
|
37
|
+
export { PPTX_STANDARD_COMPONENTS_REGISTRY, type PptxStandardComponentDefinition, createAllPptxComponentSchemas, createPptxComponentSchemaObject, getAllPptxComponentNames, getPptxComponentsByCategory, getPptxContainerComponents, getPptxContentComponents, getPptxStandardComponent, isPptxStandardComponent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PPTX_STANDARD_COMPONENTS_REGISTRY,
|
|
3
|
+
createAllPptxComponentSchemas,
|
|
4
|
+
createPptxComponentSchemaObject,
|
|
5
|
+
getAllPptxComponentNames,
|
|
6
|
+
getPptxComponentsByCategory,
|
|
7
|
+
getPptxContainerComponents,
|
|
8
|
+
getPptxContentComponents,
|
|
9
|
+
getPptxStandardComponent,
|
|
10
|
+
isPptxStandardComponent
|
|
11
|
+
} from "../chunk-2USGRQBI.js";
|
|
12
|
+
import "../chunk-MZ3TEFYH.js";
|
|
13
|
+
export {
|
|
14
|
+
PPTX_STANDARD_COMPONENTS_REGISTRY,
|
|
15
|
+
createAllPptxComponentSchemas,
|
|
16
|
+
createPptxComponentSchemaObject,
|
|
17
|
+
getAllPptxComponentNames,
|
|
18
|
+
getPptxComponentsByCategory,
|
|
19
|
+
getPptxContainerComponents,
|
|
20
|
+
getPptxContentComponents,
|
|
21
|
+
getPptxStandardComponent,
|
|
22
|
+
isPptxStandardComponent
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=component-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
+
import { Static } from '@sinclair/typebox';
|
|
3
|
+
|
|
4
|
+
declare const PptxStandardComponentDefinitionSchema: _sinclair_typebox.TUnion<_sinclair_typebox.TSchema[]>;
|
|
5
|
+
declare const PptxComponentDefinitionSchema: _sinclair_typebox.TRecursive<_sinclair_typebox.TUnion<_sinclair_typebox.TSchema[]>>;
|
|
6
|
+
type PptxComponentDefinition = Static<typeof PptxComponentDefinitionSchema>;
|
|
7
|
+
|
|
8
|
+
export { type PptxComponentDefinition, PptxComponentDefinitionSchema, PptxStandardComponentDefinitionSchema };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PptxComponentDefinitionSchema,
|
|
3
|
+
PptxStandardComponentDefinitionSchema
|
|
4
|
+
} from "../chunk-3MJF4X5S.js";
|
|
5
|
+
import "../chunk-2USGRQBI.js";
|
|
6
|
+
import "../chunk-MZ3TEFYH.js";
|
|
7
|
+
export {
|
|
8
|
+
PptxComponentDefinitionSchema,
|
|
9
|
+
PptxStandardComponentDefinitionSchema
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=component-union.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|