@json-to-office/shared-pptx 0.7.0 → 0.8.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-MSUK73NL.js +388 -0
- package/dist/chunk-MSUK73NL.js.map +1 -0
- package/dist/{chunk-62S727ED.js → chunk-O5OKKOVY.js} +2 -2
- package/dist/chunk-OJMLZFHW.js +982 -0
- package/dist/chunk-OJMLZFHW.js.map +1 -0
- package/dist/{chunk-VMLRGZLK.js → chunk-TOK2Q3ET.js} +2 -2
- package/dist/{chunk-3N6WLB7N.js → chunk-XVUV6GJL.js} +2 -2
- package/dist/index.d.ts +66 -2
- package/dist/index.js +32 -16
- package/dist/index.js.map +1 -1
- package/dist/schemas/component-defaults.d.ts +546 -0
- package/dist/schemas/component-defaults.js +19 -0
- package/dist/schemas/component-defaults.js.map +1 -0
- package/dist/schemas/component-registry.js +2 -2
- package/dist/schemas/component-union.js +3 -3
- package/dist/schemas/components.d.ts +276 -8
- package/dist/schemas/components.js +6 -5
- package/dist/schemas/document.js +4 -4
- package/dist/schemas/generator.js +3 -3
- package/dist/schemas/theme.d.ts +271 -3
- package/dist/schemas/theme.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-MZ3TEFYH.js +0 -154
- package/dist/chunk-MZ3TEFYH.js.map +0 -1
- package/dist/chunk-WY5GF6HO.js +0 -1171
- package/dist/chunk-WY5GF6HO.js.map +0 -1
- /package/dist/{chunk-62S727ED.js.map → chunk-O5OKKOVY.js.map} +0 -0
- /package/dist/{chunk-VMLRGZLK.js.map → chunk-TOK2Q3ET.js.map} +0 -0
- /package/dist/{chunk-3N6WLB7N.js.map → chunk-XVUV6GJL.js.map} +0 -0
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -31,13 +31,13 @@ type GridConfig = Static<typeof GridConfigSchema>;
|
|
|
31
31
|
declare const SEMANTIC_COLOR_NAMES: readonly ["primary", "secondary", "accent", "background", "text", "text2", "background2", "accent4", "accent5", "accent6"];
|
|
32
32
|
/** PowerPoint XML aliases that resolve to canonical semantic names at runtime */
|
|
33
33
|
declare const SEMANTIC_COLOR_ALIASES: readonly ["accent1", "accent2", "accent3", "tx1", "tx2", "bg1", "bg2"];
|
|
34
|
-
declare const ColorValueSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"
|
|
34
|
+
declare const ColorValueSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>;
|
|
35
35
|
declare const STYLE_NAMES: readonly ["title", "subtitle", "heading1", "heading2", "heading3", "body", "caption"];
|
|
36
36
|
declare const StyleNameSchema: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>;
|
|
37
37
|
declare const TextStyleSchema: _sinclair_typebox.TObject<{
|
|
38
38
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
39
39
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
40
|
-
fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"
|
|
40
|
+
fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
|
|
41
41
|
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
42
42
|
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
43
43
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
|
|
@@ -73,7 +73,7 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
|
|
|
73
73
|
[x: string]: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
74
74
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
75
75
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
76
|
-
fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"
|
|
76
|
+
fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
|
|
77
77
|
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
78
78
|
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
79
79
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
|
|
@@ -82,6 +82,274 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
|
|
|
82
82
|
paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
83
83
|
}>>;
|
|
84
84
|
}>>;
|
|
85
|
+
componentDefaults: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
86
|
+
text: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
87
|
+
text: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
88
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
89
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
90
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
91
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
92
|
+
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
93
|
+
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
94
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
95
|
+
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
96
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
97
|
+
underline: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TObject<{
|
|
98
|
+
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sng">, _sinclair_typebox.TLiteral<"dbl">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dotted">]>>;
|
|
99
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
100
|
+
}>]>>;
|
|
101
|
+
strike: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
102
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
103
|
+
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
104
|
+
breakLine: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
105
|
+
bullet: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TObject<{
|
|
106
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bullet">, _sinclair_typebox.TLiteral<"number">]>>;
|
|
107
|
+
style: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
108
|
+
startAt: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
109
|
+
}>]>>;
|
|
110
|
+
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
111
|
+
rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
112
|
+
shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
113
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
|
|
114
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
|
|
115
|
+
blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
116
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
117
|
+
angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
118
|
+
opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
119
|
+
}>>;
|
|
120
|
+
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
121
|
+
color: _sinclair_typebox.TString;
|
|
122
|
+
transparency: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
123
|
+
}>>;
|
|
124
|
+
hyperlink: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
125
|
+
url: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
126
|
+
slide: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
127
|
+
tooltip: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
128
|
+
}>>;
|
|
129
|
+
lineSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
130
|
+
charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
131
|
+
paraSpaceBefore: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
132
|
+
paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
133
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
134
|
+
column: _sinclair_typebox.TNumber;
|
|
135
|
+
row: _sinclair_typebox.TNumber;
|
|
136
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
137
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
138
|
+
}>>;
|
|
139
|
+
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>>;
|
|
140
|
+
}>>;
|
|
141
|
+
image: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
142
|
+
path: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
143
|
+
base64: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
144
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
145
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
146
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
147
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
148
|
+
sizing: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
149
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"contain">, _sinclair_typebox.TLiteral<"cover">, _sinclair_typebox.TLiteral<"crop">]>;
|
|
150
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
151
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
152
|
+
}>>;
|
|
153
|
+
rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
154
|
+
rounding: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
155
|
+
shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
156
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
|
|
157
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
|
|
158
|
+
blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
159
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
160
|
+
angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
161
|
+
opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
162
|
+
}>>;
|
|
163
|
+
hyperlink: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
164
|
+
url: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
165
|
+
slide: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
166
|
+
tooltip: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
167
|
+
}>>;
|
|
168
|
+
alt: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
169
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
170
|
+
column: _sinclair_typebox.TNumber;
|
|
171
|
+
row: _sinclair_typebox.TNumber;
|
|
172
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
173
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
174
|
+
}>>;
|
|
175
|
+
}>>;
|
|
176
|
+
shape: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
177
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"rect">, _sinclair_typebox.TLiteral<"roundRect">, _sinclair_typebox.TLiteral<"ellipse">, _sinclair_typebox.TLiteral<"triangle">, _sinclair_typebox.TLiteral<"diamond">, _sinclair_typebox.TLiteral<"pentagon">, _sinclair_typebox.TLiteral<"hexagon">, _sinclair_typebox.TLiteral<"star5">, _sinclair_typebox.TLiteral<"star6">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"arrow">, _sinclair_typebox.TLiteral<"chevron">, _sinclair_typebox.TLiteral<"cloud">, _sinclair_typebox.TLiteral<"heart">, _sinclair_typebox.TLiteral<"lightning">]>>;
|
|
178
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
179
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
180
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
181
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
182
|
+
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
183
|
+
color: _sinclair_typebox.TString;
|
|
184
|
+
transparency: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
185
|
+
}>>;
|
|
186
|
+
line: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
187
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
188
|
+
width: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
189
|
+
dashType: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"dashDot">]>>;
|
|
190
|
+
}>>;
|
|
191
|
+
text: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
192
|
+
text: _sinclair_typebox.TString;
|
|
193
|
+
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
194
|
+
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
195
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
196
|
+
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
197
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
198
|
+
breakLine: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
199
|
+
spaceBefore: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
200
|
+
spaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
201
|
+
charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
202
|
+
}>>]>>;
|
|
203
|
+
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
204
|
+
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
205
|
+
fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
206
|
+
charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
207
|
+
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
208
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
209
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
210
|
+
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
211
|
+
rotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
212
|
+
shadow: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
213
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"outer">, _sinclair_typebox.TLiteral<"inner">]>>;
|
|
214
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"text" | "primary" | "secondary" | "accent" | "background" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
|
|
215
|
+
blur: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
216
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
217
|
+
angle: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
218
|
+
opacity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
219
|
+
}>>;
|
|
220
|
+
rectRadius: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
221
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
222
|
+
column: _sinclair_typebox.TNumber;
|
|
223
|
+
row: _sinclair_typebox.TNumber;
|
|
224
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
225
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
226
|
+
}>>;
|
|
227
|
+
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>>;
|
|
228
|
+
}>>;
|
|
229
|
+
table: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
230
|
+
rows: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{
|
|
231
|
+
text: _sinclair_typebox.TString;
|
|
232
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
233
|
+
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
234
|
+
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
235
|
+
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
236
|
+
bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
237
|
+
italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
238
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
239
|
+
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
240
|
+
colspan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
241
|
+
rowspan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
242
|
+
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
243
|
+
}>]>>>>;
|
|
244
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
245
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
246
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
247
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
248
|
+
colW: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
249
|
+
rowH: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
250
|
+
border: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
251
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
252
|
+
pt: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
253
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
254
|
+
}>>;
|
|
255
|
+
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
256
|
+
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
257
|
+
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
258
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
259
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
260
|
+
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
261
|
+
autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
262
|
+
autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
263
|
+
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
264
|
+
borderRadius: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
265
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
266
|
+
column: _sinclair_typebox.TNumber;
|
|
267
|
+
row: _sinclair_typebox.TNumber;
|
|
268
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
269
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
270
|
+
}>>;
|
|
271
|
+
}>>;
|
|
272
|
+
highcharts: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
273
|
+
options: _sinclair_typebox.TOptional<_sinclair_typebox.TIntersect<[_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>, _sinclair_typebox.TObject<{
|
|
274
|
+
chart: _sinclair_typebox.TObject<{
|
|
275
|
+
width: _sinclair_typebox.TNumber;
|
|
276
|
+
height: _sinclair_typebox.TNumber;
|
|
277
|
+
}>;
|
|
278
|
+
}>]>>;
|
|
279
|
+
scale: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
280
|
+
serverUrl: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
281
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
282
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
283
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
284
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
285
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
286
|
+
column: _sinclair_typebox.TNumber;
|
|
287
|
+
row: _sinclair_typebox.TNumber;
|
|
288
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
289
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
290
|
+
}>>;
|
|
291
|
+
}>>;
|
|
292
|
+
chart: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
293
|
+
type: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"area">, _sinclair_typebox.TLiteral<"bar">, _sinclair_typebox.TLiteral<"bar3D">, _sinclair_typebox.TLiteral<"bubble">, _sinclair_typebox.TLiteral<"doughnut">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"pie">, _sinclair_typebox.TLiteral<"radar">, _sinclair_typebox.TLiteral<"scatter">]>>;
|
|
294
|
+
data: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
295
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
296
|
+
labels: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
297
|
+
values: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
298
|
+
sizes: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
299
|
+
}>>>;
|
|
300
|
+
showLegend: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
301
|
+
showTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
302
|
+
showValue: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
303
|
+
showPercent: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
304
|
+
showLabel: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
305
|
+
showSerName: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
306
|
+
title: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
307
|
+
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
308
|
+
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
309
|
+
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
310
|
+
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
311
|
+
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">]>>;
|
|
312
|
+
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
313
|
+
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
314
|
+
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
315
|
+
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
316
|
+
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
317
|
+
catAxisLabelRotate: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
318
|
+
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
319
|
+
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
320
|
+
valAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
321
|
+
valAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
322
|
+
valAxisMinVal: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
323
|
+
valAxisMaxVal: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
324
|
+
valAxisLabelFormatCode: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
325
|
+
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
326
|
+
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
327
|
+
barDir: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bar">, _sinclair_typebox.TLiteral<"col">]>>;
|
|
328
|
+
barGrouping: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"clustered">, _sinclair_typebox.TLiteral<"stacked">, _sinclair_typebox.TLiteral<"percentStacked">]>>;
|
|
329
|
+
barGapWidthPct: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
330
|
+
lineSmooth: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
331
|
+
lineDataSymbol: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"circle">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"diamond">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"triangle">]>>;
|
|
332
|
+
lineSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
333
|
+
firstSliceAng: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
334
|
+
holeSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
335
|
+
radarStyle: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"standard">, _sinclair_typebox.TLiteral<"marker">, _sinclair_typebox.TLiteral<"filled">]>>;
|
|
336
|
+
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
337
|
+
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
338
|
+
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
339
|
+
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
340
|
+
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">]>>;
|
|
341
|
+
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
342
|
+
y: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
343
|
+
w: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
344
|
+
h: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
345
|
+
grid: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
346
|
+
column: _sinclair_typebox.TNumber;
|
|
347
|
+
row: _sinclair_typebox.TNumber;
|
|
348
|
+
columnSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
349
|
+
rowSpan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
350
|
+
}>>;
|
|
351
|
+
}>>;
|
|
352
|
+
}>>;
|
|
85
353
|
}>;
|
|
86
354
|
type ThemeConfigJson = Static<typeof ThemeConfigSchema>;
|
|
87
355
|
declare function isValidThemeConfig(data: unknown): data is ThemeConfigJson;
|
package/dist/schemas/theme.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-to-office/shared-pptx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "PPTX-specific schemas, component registry and validation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@sinclair/typebox": "0.34.38",
|
|
27
|
-
"@json-to-office/shared": "^0.
|
|
27
|
+
"@json-to-office/shared": "^0.8.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "20.11.0",
|
package/dist/chunk-MZ3TEFYH.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
// src/schemas/theme.ts
|
|
2
|
-
import { Type } from "@sinclair/typebox";
|
|
3
|
-
var GridMarginSchema = Type.Union(
|
|
4
|
-
[
|
|
5
|
-
Type.Number({ description: "Margin in inches (all sides)" }),
|
|
6
|
-
Type.Object(
|
|
7
|
-
{
|
|
8
|
-
top: Type.Number({ description: "Top margin in inches" }),
|
|
9
|
-
right: Type.Number({ description: "Right margin in inches" }),
|
|
10
|
-
bottom: Type.Number({ description: "Bottom margin in inches" }),
|
|
11
|
-
left: Type.Number({ description: "Left margin in inches" })
|
|
12
|
-
},
|
|
13
|
-
{ additionalProperties: false }
|
|
14
|
-
)
|
|
15
|
-
],
|
|
16
|
-
{ description: "Slide margins in inches" }
|
|
17
|
-
);
|
|
18
|
-
var GridGutterSchema = Type.Union(
|
|
19
|
-
[
|
|
20
|
-
Type.Number({ description: "Gutter in inches (both axes)" }),
|
|
21
|
-
Type.Object(
|
|
22
|
-
{
|
|
23
|
-
column: Type.Number({ description: "Column gutter in inches" }),
|
|
24
|
-
row: Type.Number({ description: "Row gutter in inches" })
|
|
25
|
-
},
|
|
26
|
-
{ additionalProperties: false }
|
|
27
|
-
)
|
|
28
|
-
],
|
|
29
|
-
{ description: "Gaps between grid tracks in inches" }
|
|
30
|
-
);
|
|
31
|
-
var GridConfigSchema = Type.Object(
|
|
32
|
-
{
|
|
33
|
-
columns: Type.Optional(Type.Number({ minimum: 1, description: "Number of columns (default: 12)" })),
|
|
34
|
-
rows: Type.Optional(Type.Number({ minimum: 1, description: "Number of rows (default: 6)" })),
|
|
35
|
-
margin: Type.Optional(GridMarginSchema),
|
|
36
|
-
gutter: Type.Optional(GridGutterSchema)
|
|
37
|
-
},
|
|
38
|
-
{ additionalProperties: false, description: "Grid layout configuration" }
|
|
39
|
-
);
|
|
40
|
-
var HexColorSchema = Type.String({ pattern: "^#?[0-9A-Fa-f]{6}$", description: "Hex color (e.g. #FF0000)" });
|
|
41
|
-
var SEMANTIC_COLOR_NAMES = [
|
|
42
|
-
"primary",
|
|
43
|
-
"secondary",
|
|
44
|
-
"accent",
|
|
45
|
-
"background",
|
|
46
|
-
"text",
|
|
47
|
-
"text2",
|
|
48
|
-
"background2",
|
|
49
|
-
"accent4",
|
|
50
|
-
"accent5",
|
|
51
|
-
"accent6"
|
|
52
|
-
];
|
|
53
|
-
var SEMANTIC_COLOR_ALIASES = [
|
|
54
|
-
"accent1",
|
|
55
|
-
"accent2",
|
|
56
|
-
"accent3",
|
|
57
|
-
"tx1",
|
|
58
|
-
"tx2",
|
|
59
|
-
"bg1",
|
|
60
|
-
"bg2"
|
|
61
|
-
];
|
|
62
|
-
var ColorValueSchema = Type.Union([
|
|
63
|
-
HexColorSchema,
|
|
64
|
-
...SEMANTIC_COLOR_NAMES.map((n) => Type.Literal(n)),
|
|
65
|
-
...SEMANTIC_COLOR_ALIASES.map((n) => Type.Literal(n))
|
|
66
|
-
], { description: "Hex color or semantic theme color name" });
|
|
67
|
-
var STYLE_NAMES = [
|
|
68
|
-
"title",
|
|
69
|
-
"subtitle",
|
|
70
|
-
"heading1",
|
|
71
|
-
"heading2",
|
|
72
|
-
"heading3",
|
|
73
|
-
"body",
|
|
74
|
-
"caption"
|
|
75
|
-
];
|
|
76
|
-
var StyleNameSchema = Type.Union(
|
|
77
|
-
STYLE_NAMES.map((n) => Type.Literal(n)),
|
|
78
|
-
{ description: "Predefined style name" }
|
|
79
|
-
);
|
|
80
|
-
var TextStyleSchema = Type.Object({
|
|
81
|
-
fontSize: Type.Optional(Type.Number()),
|
|
82
|
-
fontFace: Type.Optional(Type.String()),
|
|
83
|
-
fontColor: Type.Optional(ColorValueSchema),
|
|
84
|
-
bold: Type.Optional(Type.Boolean()),
|
|
85
|
-
italic: Type.Optional(Type.Boolean()),
|
|
86
|
-
align: Type.Optional(Type.Union([
|
|
87
|
-
Type.Literal("left"),
|
|
88
|
-
Type.Literal("center"),
|
|
89
|
-
Type.Literal("right"),
|
|
90
|
-
Type.Literal("justify")
|
|
91
|
-
])),
|
|
92
|
-
lineSpacing: Type.Optional(Type.Number()),
|
|
93
|
-
charSpacing: Type.Optional(Type.Number()),
|
|
94
|
-
paraSpaceAfter: Type.Optional(Type.Number())
|
|
95
|
-
}, { additionalProperties: false, description: "Text style preset" });
|
|
96
|
-
var ThemeConfigSchema = Type.Object(
|
|
97
|
-
{
|
|
98
|
-
name: Type.String({ description: "Theme name" }),
|
|
99
|
-
colors: Type.Object(
|
|
100
|
-
{
|
|
101
|
-
primary: HexColorSchema,
|
|
102
|
-
secondary: HexColorSchema,
|
|
103
|
-
accent: HexColorSchema,
|
|
104
|
-
background: HexColorSchema,
|
|
105
|
-
text: HexColorSchema,
|
|
106
|
-
text2: Type.Optional(HexColorSchema),
|
|
107
|
-
background2: Type.Optional(HexColorSchema),
|
|
108
|
-
accent4: Type.Optional(HexColorSchema),
|
|
109
|
-
accent5: Type.Optional(HexColorSchema),
|
|
110
|
-
accent6: Type.Optional(HexColorSchema)
|
|
111
|
-
},
|
|
112
|
-
{ additionalProperties: false, description: "Theme color palette (10-slot scheme)" }
|
|
113
|
-
),
|
|
114
|
-
fonts: Type.Object(
|
|
115
|
-
{
|
|
116
|
-
heading: Type.String({ description: "Heading font family" }),
|
|
117
|
-
body: Type.String({ description: "Body font family" })
|
|
118
|
-
},
|
|
119
|
-
{ additionalProperties: false, description: "Font families" }
|
|
120
|
-
),
|
|
121
|
-
defaults: Type.Object(
|
|
122
|
-
{
|
|
123
|
-
fontSize: Type.Number({ description: "Default font size in points" }),
|
|
124
|
-
fontColor: HexColorSchema
|
|
125
|
-
},
|
|
126
|
-
{ additionalProperties: false, description: "Default text styling" }
|
|
127
|
-
),
|
|
128
|
-
styles: Type.Optional(Type.Partial(
|
|
129
|
-
Type.Object(Object.fromEntries(
|
|
130
|
-
STYLE_NAMES.map((n) => [n, TextStyleSchema])
|
|
131
|
-
)),
|
|
132
|
-
{ additionalProperties: false, description: "Named text style presets" }
|
|
133
|
-
))
|
|
134
|
-
},
|
|
135
|
-
{ additionalProperties: false, description: "Presentation theme configuration" }
|
|
136
|
-
);
|
|
137
|
-
function isValidThemeConfig(data) {
|
|
138
|
-
return typeof data === "object" && data !== null;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export {
|
|
142
|
-
GridMarginSchema,
|
|
143
|
-
GridGutterSchema,
|
|
144
|
-
GridConfigSchema,
|
|
145
|
-
SEMANTIC_COLOR_NAMES,
|
|
146
|
-
SEMANTIC_COLOR_ALIASES,
|
|
147
|
-
ColorValueSchema,
|
|
148
|
-
STYLE_NAMES,
|
|
149
|
-
StyleNameSchema,
|
|
150
|
-
TextStyleSchema,
|
|
151
|
-
ThemeConfigSchema,
|
|
152
|
-
isValidThemeConfig
|
|
153
|
-
};
|
|
154
|
-
//# sourceMappingURL=chunk-MZ3TEFYH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/theme.ts"],"sourcesContent":["/**\n * PPTX Theme Schema\n * Simplified theme configuration for presentations\n */\nimport { Type, Static } from '@sinclair/typebox';\n\nexport const GridMarginSchema = Type.Union(\n [\n Type.Number({ description: 'Margin in inches (all sides)' }),\n Type.Object(\n {\n top: Type.Number({ description: 'Top margin in inches' }),\n right: Type.Number({ description: 'Right margin in inches' }),\n bottom: Type.Number({ description: 'Bottom margin in inches' }),\n left: Type.Number({ description: 'Left margin in inches' }),\n },\n { additionalProperties: false }\n ),\n ],\n { description: 'Slide margins in inches' }\n);\n\nexport const GridGutterSchema = Type.Union(\n [\n Type.Number({ description: 'Gutter in inches (both axes)' }),\n Type.Object(\n {\n column: Type.Number({ description: 'Column gutter in inches' }),\n row: Type.Number({ description: 'Row gutter in inches' }),\n },\n { additionalProperties: false }\n ),\n ],\n { description: 'Gaps between grid tracks in inches' }\n);\n\nexport const GridConfigSchema = Type.Object(\n {\n columns: Type.Optional(Type.Number({ minimum: 1, description: 'Number of columns (default: 12)' })),\n rows: Type.Optional(Type.Number({ minimum: 1, description: 'Number of rows (default: 6)' })),\n margin: Type.Optional(GridMarginSchema),\n gutter: Type.Optional(GridGutterSchema),\n },\n { additionalProperties: false, description: 'Grid layout configuration' }\n);\n\nexport type GridMargin = Static<typeof GridMarginSchema>;\nexport type GridGutter = Static<typeof GridGutterSchema>;\nexport type GridConfig = Static<typeof GridConfigSchema>;\n\nconst HexColorSchema = Type.String({ pattern: '^#?[0-9A-Fa-f]{6}$', description: 'Hex color (e.g. #FF0000)' });\n\nexport const SEMANTIC_COLOR_NAMES = [\n 'primary', 'secondary', 'accent', 'background', 'text',\n 'text2', 'background2', 'accent4', 'accent5', 'accent6',\n] as const;\n\n/** PowerPoint XML aliases that resolve to canonical semantic names at runtime */\nexport const SEMANTIC_COLOR_ALIASES = [\n 'accent1', 'accent2', 'accent3', 'tx1', 'tx2', 'bg1', 'bg2',\n] as const;\n\nexport const ColorValueSchema = Type.Union([\n HexColorSchema,\n ...SEMANTIC_COLOR_NAMES.map(n => Type.Literal(n)),\n ...SEMANTIC_COLOR_ALIASES.map(n => Type.Literal(n)),\n], { description: 'Hex color or semantic theme color name' });\n\n// ── Named text styles ──────────────────────────────────────────────\n\nexport const STYLE_NAMES = [\n 'title', 'subtitle',\n 'heading1', 'heading2', 'heading3',\n 'body', 'caption',\n] as const;\n\nexport const StyleNameSchema = Type.Union(\n STYLE_NAMES.map(n => Type.Literal(n)),\n { description: 'Predefined style name' }\n);\n\nexport const TextStyleSchema = Type.Object({\n fontSize: Type.Optional(Type.Number()),\n fontFace: Type.Optional(Type.String()),\n fontColor: Type.Optional(ColorValueSchema),\n bold: Type.Optional(Type.Boolean()),\n italic: Type.Optional(Type.Boolean()),\n align: Type.Optional(Type.Union([\n Type.Literal('left'), Type.Literal('center'), Type.Literal('right'), Type.Literal('justify'),\n ])),\n lineSpacing: Type.Optional(Type.Number()),\n charSpacing: Type.Optional(Type.Number()),\n paraSpaceAfter: Type.Optional(Type.Number()),\n}, { additionalProperties: false, description: 'Text style preset' });\n\nexport type StyleName = (typeof STYLE_NAMES)[number];\nexport type TextStyle = Static<typeof TextStyleSchema>;\n\n// ── Theme config ───────────────────────────────────────────────────\n\nexport const ThemeConfigSchema = Type.Object(\n {\n name: Type.String({ description: 'Theme name' }),\n colors: Type.Object(\n {\n primary: HexColorSchema,\n secondary: HexColorSchema,\n accent: HexColorSchema,\n background: HexColorSchema,\n text: HexColorSchema,\n text2: Type.Optional(HexColorSchema),\n background2: Type.Optional(HexColorSchema),\n accent4: Type.Optional(HexColorSchema),\n accent5: Type.Optional(HexColorSchema),\n accent6: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false, description: 'Theme color palette (10-slot scheme)' }\n ),\n fonts: Type.Object(\n {\n heading: Type.String({ description: 'Heading font family' }),\n body: Type.String({ description: 'Body font family' }),\n },\n { additionalProperties: false, description: 'Font families' }\n ),\n defaults: Type.Object(\n {\n fontSize: Type.Number({ description: 'Default font size in points' }),\n fontColor: HexColorSchema,\n },\n { additionalProperties: false, description: 'Default text styling' }\n ),\n styles: Type.Optional(Type.Partial(\n Type.Object(Object.fromEntries(\n STYLE_NAMES.map(n => [n, TextStyleSchema])\n ) as Record<string, typeof TextStyleSchema>),\n { additionalProperties: false, description: 'Named text style presets' }\n )),\n },\n { additionalProperties: false, description: 'Presentation theme configuration' }\n);\n\nexport type ThemeConfigJson = Static<typeof ThemeConfigSchema>;\n\nexport function isValidThemeConfig(data: unknown): data is ThemeConfigJson {\n return typeof data === 'object' && data !== null;\n}\n"],"mappings":";AAIA,SAAS,YAAoB;AAEtB,IAAM,mBAAmB,KAAK;AAAA,EACnC;AAAA,IACE,KAAK,OAAO,EAAE,aAAa,+BAA+B,CAAC;AAAA,IAC3D,KAAK;AAAA,MACH;AAAA,QACE,KAAK,KAAK,OAAO,EAAE,aAAa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