@json-to-office/shared 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-CP2I5NPP.js → chunk-FDSJYZ5W.js} +21 -20
- package/dist/chunk-FDSJYZ5W.js.map +1 -0
- package/dist/chunk-JM5KTMNL.js +240 -0
- package/dist/chunk-JM5KTMNL.js.map +1 -0
- package/dist/{chunk-KLWNDWC4.js → chunk-SJ2YYRCT.js} +10 -3
- package/dist/chunk-SJ2YYRCT.js.map +1 -0
- package/dist/fonts/node.d.ts +42 -2
- package/dist/fonts/node.js +50 -2
- package/dist/fonts/node.js.map +1 -1
- package/dist/index.d.ts +52 -148
- package/dist/index.js +118 -23
- package/dist/index.js.map +1 -1
- package/dist/rendering/index.d.ts +210 -0
- package/dist/rendering/index.js +25 -0
- package/dist/rendering/index.js.map +1 -0
- package/dist/schemas/schema-utils.js +1 -1
- package/dist/schemas/slide-content.d.ts +18 -0
- package/dist/schemas/slide-content.js +42 -0
- package/dist/schemas/slide-content.js.map +1 -1
- package/dist/{types-CL0Hbw6x.d.ts → types-kcQwhOlf.d.ts} +175 -1
- package/package.json +5 -5
- package/dist/cache/index.d.ts +0 -464
- package/dist/cache/index.js +0 -741
- package/dist/cache/index.js.map +0 -1
- package/dist/chunk-CP2I5NPP.js.map +0 -1
- package/dist/chunk-KLWNDWC4.js.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format-independent renderer contracts.
|
|
3
|
+
*
|
|
4
|
+
* This module deliberately knows nothing about DOCX or PPTX semantics. Each
|
|
5
|
+
* format owns its own intermediate representation (`DocxIR`, `PptxIR`) and its
|
|
6
|
+
* own feature union; the only thing shared between them is the shape of the
|
|
7
|
+
* contract a backend adapter must satisfy.
|
|
8
|
+
*
|
|
9
|
+
* Do not add format-specific feature names, IR nodes or units here.
|
|
10
|
+
*/
|
|
11
|
+
/** The Office formats this repository can produce. */
|
|
12
|
+
type OfficeFormat = 'docx' | 'pptx';
|
|
13
|
+
/**
|
|
14
|
+
* Options every renderer accepts.
|
|
15
|
+
*
|
|
16
|
+
* `deterministic` asks the adapter (and the packaging step after it) to make
|
|
17
|
+
* output byte-stable across runs: fixed zip entry timestamps, fixed core
|
|
18
|
+
* metadata timestamps, no random identifiers.
|
|
19
|
+
*
|
|
20
|
+
* `generatedAt` pins the timestamp written into package metadata. Callers that
|
|
21
|
+
* want reproducible bytes pass both.
|
|
22
|
+
*/
|
|
23
|
+
interface RenderOptions {
|
|
24
|
+
deterministic?: boolean;
|
|
25
|
+
generatedAt?: Date;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A backend that turns a format-specific IR into package bytes.
|
|
29
|
+
*
|
|
30
|
+
* @typeParam TIR - the format's intermediate representation (plain data)
|
|
31
|
+
* @typeParam TFeature - the format's feature union (see `capabilities.ts`)
|
|
32
|
+
* @typeParam TId - the string-literal union of renderer ids for the format
|
|
33
|
+
*/
|
|
34
|
+
interface OfficeRenderer<TIR, TFeature extends string, TId extends string> {
|
|
35
|
+
readonly id: TId;
|
|
36
|
+
readonly format: OfficeFormat;
|
|
37
|
+
readonly capabilities: ReadonlySet<TFeature>;
|
|
38
|
+
render(document: TIR, options?: RenderOptions): Promise<Uint8Array>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Exhaustiveness guard for discriminated-union switches.
|
|
42
|
+
*
|
|
43
|
+
* Reaching this at runtime means an IR node kind was added without a matching
|
|
44
|
+
* `case`, so it throws rather than silently dropping content.
|
|
45
|
+
*/
|
|
46
|
+
declare function assertNever(value: never, context?: string): never;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Diagnostics raised when an IR asks a renderer for something it cannot do.
|
|
50
|
+
*
|
|
51
|
+
* These are distinct from `GenerationWarning` (see `../types/warnings`), which
|
|
52
|
+
* describes authoring problems found while building the document. A renderer
|
|
53
|
+
* diagnostic describes a *backend* limitation: the document is fine, this
|
|
54
|
+
* particular adapter just cannot express part of it.
|
|
55
|
+
*/
|
|
56
|
+
type RendererDiagnosticSeverity = 'error' | 'warning';
|
|
57
|
+
/**
|
|
58
|
+
* One unsupported (or degraded) feature at one place in the IR.
|
|
59
|
+
*
|
|
60
|
+
* `path` is an IR path such as `slides[2].elements[0].fill` — not an author-JSON
|
|
61
|
+
* path — because the check runs against compiled IR. Compilers record the
|
|
62
|
+
* authoring path alongside where it is useful for the message text.
|
|
63
|
+
*/
|
|
64
|
+
interface RendererDiagnostic<TFeature extends string = string> {
|
|
65
|
+
feature: TFeature;
|
|
66
|
+
path: string;
|
|
67
|
+
severity: RendererDiagnosticSeverity;
|
|
68
|
+
message: string;
|
|
69
|
+
}
|
|
70
|
+
interface UnsupportedRendererFeatureErrorInit<TFeature extends string = string> {
|
|
71
|
+
format: OfficeFormat;
|
|
72
|
+
rendererId: string;
|
|
73
|
+
diagnostics: readonly RendererDiagnostic<TFeature>[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Aggregated failure thrown *before* rendering starts.
|
|
77
|
+
*
|
|
78
|
+
* One error carries every unsupported feature found in the IR so a caller sees
|
|
79
|
+
* the whole gap at once instead of fixing them one render at a time.
|
|
80
|
+
*/
|
|
81
|
+
declare class UnsupportedRendererFeatureError<TFeature extends string = string> extends Error {
|
|
82
|
+
readonly code = "UNSUPPORTED_RENDERER_FEATURE";
|
|
83
|
+
readonly format: OfficeFormat;
|
|
84
|
+
readonly rendererId: string;
|
|
85
|
+
/** Distinct unsupported features, in first-seen order. */
|
|
86
|
+
readonly features: readonly TFeature[];
|
|
87
|
+
/** Distinct IR paths that required them, in first-seen order. */
|
|
88
|
+
readonly paths: readonly string[];
|
|
89
|
+
/** Every error-severity diagnostic that produced this failure. */
|
|
90
|
+
readonly diagnostics: readonly RendererDiagnostic<TFeature>[];
|
|
91
|
+
constructor(init: UnsupportedRendererFeatureErrorInit<TFeature>);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A renderer id that is not registered for the format asked for.
|
|
95
|
+
*
|
|
96
|
+
* Caller input, not an infrastructure failure — which is the whole reason it is
|
|
97
|
+
* a class with a `code` rather than a bare `Error`. A server matching on the
|
|
98
|
+
* message text could only answer `500`, so an unknown id looked like the
|
|
99
|
+
* service falling over, and a retry looked worth attempting (#263).
|
|
100
|
+
*/
|
|
101
|
+
declare class UnknownRendererError extends Error {
|
|
102
|
+
readonly code = "UNKNOWN_RENDERER";
|
|
103
|
+
readonly format: OfficeFormat;
|
|
104
|
+
/** What the caller asked for. */
|
|
105
|
+
readonly rendererId: string;
|
|
106
|
+
/** Every id registered for this format, in registration order. */
|
|
107
|
+
readonly availableIds: readonly string[];
|
|
108
|
+
constructor(format: OfficeFormat, rendererId: string, availableIds: readonly string[]);
|
|
109
|
+
}
|
|
110
|
+
/** Build a `RendererDiagnostic` with `severity: 'error'`. */
|
|
111
|
+
declare function rendererError<TFeature extends string>(feature: TFeature, path: string, message: string): RendererDiagnostic<TFeature>;
|
|
112
|
+
/** Build a `RendererDiagnostic` with `severity: 'warning'`. */
|
|
113
|
+
declare function rendererWarning<TFeature extends string>(feature: TFeature, path: string, message: string): RendererDiagnostic<TFeature>;
|
|
114
|
+
/** Split diagnostics into blocking errors and non-blocking warnings. */
|
|
115
|
+
declare function partitionDiagnostics<TFeature extends string>(diagnostics: readonly RendererDiagnostic<TFeature>[]): {
|
|
116
|
+
errors: RendererDiagnostic<TFeature>[];
|
|
117
|
+
warnings: RendererDiagnostic<TFeature>[];
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Capability checking: what an IR *requires* versus what an adapter *provides*.
|
|
122
|
+
*
|
|
123
|
+
* A compiler records one `FeatureRequirement` each time it emits an IR node that
|
|
124
|
+
* needs a backend capability. Before rendering, `assertRendererSupports` diffs
|
|
125
|
+
* those requirements against the adapter's `capabilities` set and throws a
|
|
126
|
+
* single aggregated `UnsupportedRendererFeatureError` if anything is missing.
|
|
127
|
+
*
|
|
128
|
+
* The point is that nothing is dropped silently: a feature either appears in the
|
|
129
|
+
* adapter's capability set and is rendered, or it fails loudly before bytes are
|
|
130
|
+
* produced.
|
|
131
|
+
*/
|
|
132
|
+
/** One capability an IR node needs, and where in the IR it was needed. */
|
|
133
|
+
interface FeatureRequirement<TFeature extends string = string> {
|
|
134
|
+
feature: TFeature;
|
|
135
|
+
/** IR path, e.g. `sections[0].children[3].image`. */
|
|
136
|
+
path: string;
|
|
137
|
+
/** Optional detail folded into the failure message. */
|
|
138
|
+
detail?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Accumulates feature requirements during compilation.
|
|
142
|
+
*
|
|
143
|
+
* Deliberately per-compilation (never module-global) so concurrent generations
|
|
144
|
+
* never share state.
|
|
145
|
+
*/
|
|
146
|
+
declare class FeatureRequirementCollector<TFeature extends string> {
|
|
147
|
+
private readonly requirements;
|
|
148
|
+
private readonly seen;
|
|
149
|
+
/**
|
|
150
|
+
* Record that `feature` is needed at `path`.
|
|
151
|
+
*
|
|
152
|
+
* Duplicate (feature, path) pairs collapse, so a compiler can call this
|
|
153
|
+
* unconditionally inside a loop without inflating the diagnostics.
|
|
154
|
+
*/
|
|
155
|
+
require(feature: TFeature, path: string, detail?: string): void;
|
|
156
|
+
/** Every recorded requirement, in first-seen order. */
|
|
157
|
+
list(): readonly FeatureRequirement<TFeature>[];
|
|
158
|
+
/** Distinct required features, in first-seen order. */
|
|
159
|
+
features(): readonly TFeature[];
|
|
160
|
+
/** True when nothing has been required yet. */
|
|
161
|
+
isEmpty(): boolean;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Diff required features against a capability set.
|
|
165
|
+
*
|
|
166
|
+
* Returns one error-severity diagnostic per unsupported requirement. An empty
|
|
167
|
+
* array means the renderer can render the IR.
|
|
168
|
+
*/
|
|
169
|
+
declare function diagnoseUnsupportedFeatures<TFeature extends string>(required: readonly FeatureRequirement<TFeature>[], capabilities: ReadonlySet<TFeature>, rendererId: string): RendererDiagnostic<TFeature>[];
|
|
170
|
+
/**
|
|
171
|
+
* Throw one aggregated error if the renderer is missing any required feature.
|
|
172
|
+
*
|
|
173
|
+
* Call this after compiling to IR and before handing the IR to an adapter.
|
|
174
|
+
*/
|
|
175
|
+
declare function assertRendererSupports<TFeature extends string>(required: readonly FeatureRequirement<TFeature>[], renderer: Pick<OfficeRenderer<unknown, TFeature, string>, 'id' | 'format' | 'capabilities'>): void;
|
|
176
|
+
/**
|
|
177
|
+
* A registry of renderers for a single format.
|
|
178
|
+
*
|
|
179
|
+
* Instances are created per format module, not per generation, and hold only
|
|
180
|
+
* immutable adapter descriptors — never per-document state.
|
|
181
|
+
*/
|
|
182
|
+
declare class RendererRegistry<TIR, TFeature extends string, TId extends string> {
|
|
183
|
+
private readonly format;
|
|
184
|
+
private readonly defaultId;
|
|
185
|
+
private readonly renderers;
|
|
186
|
+
constructor(format: OfficeFormat, defaultId: TId);
|
|
187
|
+
/**
|
|
188
|
+
* Register a lazily-constructed renderer.
|
|
189
|
+
*
|
|
190
|
+
* The factory is async and only invoked on selection, so an adapter whose
|
|
191
|
+
* backend is an optional dependency is never imported unless it is chosen.
|
|
192
|
+
*/
|
|
193
|
+
register(id: TId, factory: () => Promise<OfficeRenderer<TIR, TFeature, TId>>): void;
|
|
194
|
+
/** Renderer ids registered for this format, in registration order. */
|
|
195
|
+
ids(): readonly TId[];
|
|
196
|
+
/** The id used when a caller does not pass one. */
|
|
197
|
+
getDefaultId(): TId;
|
|
198
|
+
has(id: string): id is TId;
|
|
199
|
+
/**
|
|
200
|
+
* Resolve a renderer, defaulting when `id` is omitted.
|
|
201
|
+
*
|
|
202
|
+
* An unknown id is `UnknownRendererError`, which carries the id asked for and
|
|
203
|
+
* the ones that exist, so a caller boundary can answer "bad request" rather
|
|
204
|
+
* than "the server broke". A missing optional dependency is re-thrown with an
|
|
205
|
+
* actionable install hint.
|
|
206
|
+
*/
|
|
207
|
+
resolve(id?: TId): Promise<OfficeRenderer<TIR, TFeature, TId>>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export { type FeatureRequirement, FeatureRequirementCollector, type OfficeFormat, type OfficeRenderer, type RenderOptions, type RendererDiagnostic, type RendererDiagnosticSeverity, RendererRegistry, UnknownRendererError, UnsupportedRendererFeatureError, type UnsupportedRendererFeatureErrorInit, assertNever, assertRendererSupports, diagnoseUnsupportedFeatures, partitionDiagnostics, rendererError, rendererWarning };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FeatureRequirementCollector,
|
|
3
|
+
RendererRegistry,
|
|
4
|
+
UnknownRendererError,
|
|
5
|
+
UnsupportedRendererFeatureError,
|
|
6
|
+
assertNever,
|
|
7
|
+
assertRendererSupports,
|
|
8
|
+
diagnoseUnsupportedFeatures,
|
|
9
|
+
partitionDiagnostics,
|
|
10
|
+
rendererError,
|
|
11
|
+
rendererWarning
|
|
12
|
+
} from "../chunk-JM5KTMNL.js";
|
|
13
|
+
export {
|
|
14
|
+
FeatureRequirementCollector,
|
|
15
|
+
RendererRegistry,
|
|
16
|
+
UnknownRendererError,
|
|
17
|
+
UnsupportedRendererFeatureError,
|
|
18
|
+
assertNever,
|
|
19
|
+
assertRendererSupports,
|
|
20
|
+
diagnoseUnsupportedFeatures,
|
|
21
|
+
partitionDiagnostics,
|
|
22
|
+
rendererError,
|
|
23
|
+
rendererWarning
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -316,6 +316,7 @@ declare const PptxTablePropsSchema: _sinclair_typebox.TObject<{
|
|
|
316
316
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
317
317
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
318
318
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
319
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
319
320
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
320
321
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
321
322
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -377,6 +378,7 @@ declare const PptxChartPropsSchema: _sinclair_typebox.TObject<{
|
|
|
377
378
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
378
379
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
379
380
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
381
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
380
382
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
381
383
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
382
384
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -385,6 +387,7 @@ declare const PptxChartPropsSchema: _sinclair_typebox.TObject<{
|
|
|
385
387
|
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">]>>;
|
|
386
388
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
387
389
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
390
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
388
391
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
389
392
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
390
393
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -392,6 +395,7 @@ declare const PptxChartPropsSchema: _sinclair_typebox.TObject<{
|
|
|
392
395
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
393
396
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
394
397
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
398
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
395
399
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
396
400
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
397
401
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -405,6 +409,7 @@ declare const PptxChartPropsSchema: _sinclair_typebox.TObject<{
|
|
|
405
409
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
406
410
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
407
411
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
412
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
408
413
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
409
414
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
410
415
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -427,6 +432,7 @@ declare const PptxChartPropsSchema: _sinclair_typebox.TObject<{
|
|
|
427
432
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
428
433
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
429
434
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
435
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
430
436
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
431
437
|
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">]>>;
|
|
432
438
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -684,6 +690,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
684
690
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
685
691
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
686
692
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
693
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
687
694
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
688
695
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
689
696
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -751,6 +758,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
751
758
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
752
759
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
753
760
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
761
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
754
762
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
755
763
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
756
764
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -759,6 +767,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
759
767
|
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">]>>;
|
|
760
768
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
761
769
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
770
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
762
771
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
763
772
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
764
773
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -766,6 +775,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
766
775
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
767
776
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
768
777
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
778
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
769
779
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
770
780
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
771
781
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -779,6 +789,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
779
789
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
780
790
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
781
791
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
792
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
782
793
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
783
794
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
784
795
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -801,6 +812,7 @@ declare const PPTX_SLIDE_CONTENT_COMPONENTS: readonly [{
|
|
|
801
812
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
802
813
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
803
814
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
815
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
804
816
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
805
817
|
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">]>>;
|
|
806
818
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -1054,6 +1066,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1054
1066
|
fill: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1055
1067
|
fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1056
1068
|
fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1069
|
+
fontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1057
1070
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1058
1071
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
1059
1072
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
@@ -1119,6 +1132,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1119
1132
|
titleFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1120
1133
|
titleColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1121
1134
|
titleFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1135
|
+
titleFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1122
1136
|
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
1123
1137
|
dataBorder: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1124
1138
|
pt: _sinclair_typebox.TNumber;
|
|
@@ -1127,6 +1141,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1127
1141
|
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">]>>;
|
|
1128
1142
|
legendFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1129
1143
|
legendFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1144
|
+
legendFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1130
1145
|
legendColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1131
1146
|
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1132
1147
|
catAxisHidden: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
@@ -1134,6 +1149,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1134
1149
|
catAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1135
1150
|
catAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1136
1151
|
catAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1152
|
+
catAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1137
1153
|
catGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1138
1154
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
1139
1155
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -1147,6 +1163,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1147
1163
|
valAxisMajorUnit: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1148
1164
|
valAxisLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1149
1165
|
valAxisLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1166
|
+
valAxisLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1150
1167
|
valAxisLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1151
1168
|
valGridLine: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
1152
1169
|
style: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"solid">, _sinclair_typebox.TLiteral<"dash">, _sinclair_typebox.TLiteral<"dot">, _sinclair_typebox.TLiteral<"none">]>>;
|
|
@@ -1169,6 +1186,7 @@ declare const PptxSlideContentSchema: _sinclair_typebox.TUnion<[_sinclair_typebo
|
|
|
1169
1186
|
dataLabelColor: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1170
1187
|
dataLabelFontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1171
1188
|
dataLabelFontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1189
|
+
dataLabelFontWeight: _sinclair_typebox.TOptional<_sinclair_typebox.TInteger>;
|
|
1172
1190
|
dataLabelFontBold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1173
1191
|
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">]>>;
|
|
1174
1192
|
x: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
@@ -947,6 +947,13 @@ var PptxTablePropsSchema = Type6.Object(
|
|
|
947
947
|
fontFace: Type6.Optional(
|
|
948
948
|
Type6.String({ description: "Default font family for all cells" })
|
|
949
949
|
),
|
|
950
|
+
fontWeight: Type6.Optional(
|
|
951
|
+
Type6.Integer({
|
|
952
|
+
minimum: 100,
|
|
953
|
+
maximum: 900,
|
|
954
|
+
description: "Default weight for all cells (100\u2013900). Same sub-family aliasing as the per-cell `fontWeight`; a cell that sets its own `fontWeight` or `bold` opts out."
|
|
955
|
+
})
|
|
956
|
+
),
|
|
950
957
|
color: Type6.Optional(
|
|
951
958
|
Type6.String({
|
|
952
959
|
description: "Default text color for all cells (hex without #)"
|
|
@@ -1148,6 +1155,13 @@ var PptxChartPropsSchema = Type8.Object(
|
|
|
1148
1155
|
titleFontFace: Type8.Optional(
|
|
1149
1156
|
Type8.String({ description: "Title font face" })
|
|
1150
1157
|
),
|
|
1158
|
+
titleFontWeight: Type8.Optional(
|
|
1159
|
+
Type8.Integer({
|
|
1160
|
+
minimum: 100,
|
|
1161
|
+
maximum: 900,
|
|
1162
|
+
description: "Title weight (100\u2013900). Rendered as a sub-family alias \u2014 see `dataLabelFontWeight`."
|
|
1163
|
+
})
|
|
1164
|
+
),
|
|
1151
1165
|
// Chart colors
|
|
1152
1166
|
chartColors: Type8.Optional(
|
|
1153
1167
|
Type8.Array(Type8.String(), {
|
|
@@ -1191,6 +1205,13 @@ var PptxChartPropsSchema = Type8.Object(
|
|
|
1191
1205
|
legendFontFace: Type8.Optional(
|
|
1192
1206
|
Type8.String({ description: "Legend font face" })
|
|
1193
1207
|
),
|
|
1208
|
+
legendFontWeight: Type8.Optional(
|
|
1209
|
+
Type8.Integer({
|
|
1210
|
+
minimum: 100,
|
|
1211
|
+
maximum: 900,
|
|
1212
|
+
description: "Legend weight (100\u2013900). Rendered as a sub-family alias \u2014 see `dataLabelFontWeight`. PowerPoint gives the legend no bold toggle, so 400 and 700 both render Regular (700 warns)."
|
|
1213
|
+
})
|
|
1214
|
+
),
|
|
1194
1215
|
legendColor: Type8.Optional(
|
|
1195
1216
|
Type8.String({ description: "Legend text color" })
|
|
1196
1217
|
),
|
|
@@ -1215,6 +1236,13 @@ var PptxChartPropsSchema = Type8.Object(
|
|
|
1215
1236
|
catAxisLabelFontFace: Type8.Optional(
|
|
1216
1237
|
Type8.String({ description: "Category axis label font face" })
|
|
1217
1238
|
),
|
|
1239
|
+
catAxisLabelFontWeight: Type8.Optional(
|
|
1240
|
+
Type8.Integer({
|
|
1241
|
+
minimum: 100,
|
|
1242
|
+
maximum: 900,
|
|
1243
|
+
description: "Category axis label weight (100\u2013900). Rendered as a sub-family alias \u2014 see `dataLabelFontWeight`."
|
|
1244
|
+
})
|
|
1245
|
+
),
|
|
1218
1246
|
catGridLine: Type8.Optional(ChartGridLineSchema),
|
|
1219
1247
|
// Value axis
|
|
1220
1248
|
valAxisTitle: Type8.Optional(
|
|
@@ -1243,6 +1271,13 @@ var PptxChartPropsSchema = Type8.Object(
|
|
|
1243
1271
|
valAxisLabelFontFace: Type8.Optional(
|
|
1244
1272
|
Type8.String({ description: "Value axis label font face" })
|
|
1245
1273
|
),
|
|
1274
|
+
valAxisLabelFontWeight: Type8.Optional(
|
|
1275
|
+
Type8.Integer({
|
|
1276
|
+
minimum: 100,
|
|
1277
|
+
maximum: 900,
|
|
1278
|
+
description: "Value axis label weight (100\u2013900). Rendered as a sub-family alias \u2014 see `dataLabelFontWeight`."
|
|
1279
|
+
})
|
|
1280
|
+
),
|
|
1246
1281
|
valAxisLabelFontSize: Type8.Optional(
|
|
1247
1282
|
Type8.Number({ description: "Value axis label font size" })
|
|
1248
1283
|
),
|
|
@@ -1345,6 +1380,13 @@ var PptxChartPropsSchema = Type8.Object(
|
|
|
1345
1380
|
dataLabelFontFace: Type8.Optional(
|
|
1346
1381
|
Type8.String({ description: "Data label font face" })
|
|
1347
1382
|
),
|
|
1383
|
+
dataLabelFontWeight: Type8.Optional(
|
|
1384
|
+
Type8.Integer({
|
|
1385
|
+
minimum: 100,
|
|
1386
|
+
maximum: 900,
|
|
1387
|
+
description: 'Data label weight (100\u2013900); overrides `dataLabelFontBold`. PowerPoint chart labels carry no numeric weight, so a non-RIBBI weight renders by rewriting the font face to the matching sub-family ("Inter" at 300 \u2192 "Inter Light") \u2014 400 and 700 stay on the family and use the bold toggle. Falls back to the theme body font when the sibling font face is unset.'
|
|
1388
|
+
})
|
|
1389
|
+
),
|
|
1348
1390
|
dataLabelFontBold: Type8.Optional(
|
|
1349
1391
|
Type8.Boolean({ description: "Bold data labels" })
|
|
1350
1392
|
),
|