deckjsx 0.6.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/README.md +140 -25
- package/dist/adapter-BamaV2yi.mjs +8638 -0
- package/dist/adapter-C2AHiDGa.d.mts +38 -0
- package/dist/adapter.d.mts +2 -2
- package/dist/adapter.mjs +2 -2
- package/dist/{index-C5l8PX5V.d.mts → index-dx2ZSBgF.d.mts} +380 -314
- package/dist/index.d.mts +202 -32
- package/dist/index.mjs +5557 -1063
- package/dist/inspect.d.mts +4 -3
- package/dist/inspect.mjs +2 -1
- package/dist/jsx-DGGM5erN.mjs +403 -0
- package/dist/jsx-dev-runtime.d.mts +26 -4
- package/dist/jsx-dev-runtime.mjs +6 -7
- package/dist/jsx-runtime-_eIs-wi1.d.mts +42 -0
- package/dist/jsx-runtime.d.mts +3 -3
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/model-BVkO8qGK.d.mts +1257 -0
- package/dist/model-DIuh51qh.mjs +32 -0
- package/dist/node-output-ChRpOCV8.mjs +28 -0
- package/dist/resolve-BD1dHxZd.d.mts +36 -0
- package/package.json +6 -22
- package/dist/adapter-BbtteJ7s.mjs +0 -11244
- package/dist/adapter-C8xw46nz.d.mts +0 -22
- package/dist/jsx-C671yNZa.mjs +0 -290
- package/dist/jsx-runtime-DwfBuBkY.d.mts +0 -57
- package/dist/pptx-PzEK54aA.d.mts +0 -448
|
@@ -1,213 +1,6 @@
|
|
|
1
1
|
//#region src/authoring/tags.d.ts
|
|
2
|
-
type AuthoredTag = "article" | "aside" | "div" | "figure" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "img" | "main" | "nav" | "p" | "section" | "span";
|
|
2
|
+
type AuthoredTag = "article" | "aside" | "div" | "figure" | "footer" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "img" | "main" | "nav" | "p" | "section" | "shape" | "span";
|
|
3
3
|
type SectioningTag = "article" | "aside" | "footer" | "header" | "main" | "nav" | "section";
|
|
4
|
-
type AuthoredComponent = "Image" | "Shape" | "Slide" | "Text" | "View";
|
|
5
|
-
type IntrinsicViewTag$1 = "article" | "aside" | "div" | "figure" | "footer" | "header" | "main" | "nav" | "section";
|
|
6
|
-
type IntrinsicTextTag$1 = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/authoring/tree.d.ts
|
|
9
|
-
type JsxKey = string | number | bigint;
|
|
10
|
-
type SourceSpan = {
|
|
11
|
-
readonly file?: string;
|
|
12
|
-
readonly line?: number;
|
|
13
|
-
readonly column?: number;
|
|
14
|
-
};
|
|
15
|
-
type AuthorElementSource = {
|
|
16
|
-
readonly kind: "tag";
|
|
17
|
-
readonly tag: AuthoredTag;
|
|
18
|
-
} | {
|
|
19
|
-
readonly kind: "component";
|
|
20
|
-
readonly component: AuthoredComponent;
|
|
21
|
-
};
|
|
22
|
-
type AuthorElementNode = {
|
|
23
|
-
readonly $$typeof: "deckjsx.author-tree";
|
|
24
|
-
readonly kind: "element";
|
|
25
|
-
readonly source: AuthorElementSource;
|
|
26
|
-
readonly key?: JsxKey;
|
|
27
|
-
readonly props: Record<string, unknown>;
|
|
28
|
-
readonly children: readonly AuthorTreeNode[];
|
|
29
|
-
readonly sourceSpan?: SourceSpan;
|
|
30
|
-
};
|
|
31
|
-
type AuthorFragmentNode = {
|
|
32
|
-
readonly $$typeof: "deckjsx.author-tree";
|
|
33
|
-
readonly kind: "fragment";
|
|
34
|
-
readonly key?: JsxKey;
|
|
35
|
-
readonly children: readonly AuthorTreeNode[];
|
|
36
|
-
readonly sourceSpan?: SourceSpan;
|
|
37
|
-
};
|
|
38
|
-
type AuthorTextLeaf = {
|
|
39
|
-
readonly $$typeof: "deckjsx.author-tree";
|
|
40
|
-
readonly kind: "text";
|
|
41
|
-
readonly value: string | number;
|
|
42
|
-
readonly sourceSpan?: SourceSpan;
|
|
43
|
-
};
|
|
44
|
-
type AuthorTreeNode = AuthorElementNode | AuthorFragmentNode | AuthorTextLeaf;
|
|
45
|
-
type AuthorTreeChild = AuthorTreeNode | string | number | boolean | null | undefined | readonly AuthorTreeChild[];
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/diagnostics/errors.d.ts
|
|
48
|
-
declare class DeckDiagnosticError extends Error {
|
|
49
|
-
readonly diagnostics: Diagnostics;
|
|
50
|
-
constructor(message: string, diagnostics: Diagnostics);
|
|
51
|
-
}
|
|
52
|
-
declare class SemanticGraphDiagnosticError extends DeckDiagnosticError {
|
|
53
|
-
constructor(diagnostics: Diagnostics);
|
|
54
|
-
}
|
|
55
|
-
declare class CompositionDiagnosticError extends DeckDiagnosticError {
|
|
56
|
-
constructor(diagnostics: Diagnostics);
|
|
57
|
-
}
|
|
58
|
-
declare class StyleDiagnosticError extends DeckDiagnosticError {
|
|
59
|
-
constructor(diagnostics: Diagnostics);
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/diagnostics/format.d.ts
|
|
63
|
-
declare function formatDiagnostic(diagnostic: Diagnostic): string;
|
|
64
|
-
declare function formatDiagnostics(diagnostics: Diagnostics): string;
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/diagnostics/index.d.ts
|
|
67
|
-
type DiagnosticSeverity = "error" | "warning";
|
|
68
|
-
type DiagnosticLabel = {
|
|
69
|
-
readonly message: string;
|
|
70
|
-
readonly path: string;
|
|
71
|
-
readonly sourceSpan?: SourceSpan;
|
|
72
|
-
readonly severity?: "primary" | "secondary";
|
|
73
|
-
};
|
|
74
|
-
type Diagnostic = {
|
|
75
|
-
readonly severity: DiagnosticSeverity;
|
|
76
|
-
readonly code: string;
|
|
77
|
-
readonly title: string;
|
|
78
|
-
readonly message?: string;
|
|
79
|
-
readonly labels: readonly DiagnosticLabel[];
|
|
80
|
-
readonly notes?: readonly string[];
|
|
81
|
-
readonly help?: readonly string[];
|
|
82
|
-
};
|
|
83
|
-
type Diagnostics = {
|
|
84
|
-
readonly items: readonly Diagnostic[];
|
|
85
|
-
readonly hasErrors: boolean;
|
|
86
|
-
readonly hasWarnings: boolean;
|
|
87
|
-
};
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/graph/types.d.ts
|
|
90
|
-
type Brand<T, B extends string> = T & {
|
|
91
|
-
readonly __brand: B;
|
|
92
|
-
};
|
|
93
|
-
type GraphNodeId = Brand<string, "GraphNodeId">;
|
|
94
|
-
type StyleEntityId = Brand<string, "StyleEntityId">;
|
|
95
|
-
type AssetEntityId = Brand<string, "AssetEntityId">;
|
|
96
|
-
type SourceIdentity = Brand<string, "SourceIdentity">;
|
|
97
|
-
type SemanticNodeKind = "container" | "document" | "image" | "shape" | "slide" | "text" | "textRun";
|
|
98
|
-
type SemanticRole = {
|
|
99
|
-
readonly kind: "document";
|
|
100
|
-
} | {
|
|
101
|
-
readonly kind: "slide";
|
|
102
|
-
} | {
|
|
103
|
-
readonly kind: "genericContainer";
|
|
104
|
-
} | {
|
|
105
|
-
readonly kind: "sectioning";
|
|
106
|
-
readonly tag: SectioningTag;
|
|
107
|
-
} | {
|
|
108
|
-
readonly kind: "figure";
|
|
109
|
-
} | {
|
|
110
|
-
readonly kind: "paragraph";
|
|
111
|
-
} | {
|
|
112
|
-
readonly kind: "heading";
|
|
113
|
-
readonly level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
114
|
-
} | {
|
|
115
|
-
readonly kind: "image";
|
|
116
|
-
} | {
|
|
117
|
-
readonly kind: "shape";
|
|
118
|
-
};
|
|
119
|
-
type SourceOrigin = {
|
|
120
|
-
readonly kind: "root";
|
|
121
|
-
} | {
|
|
122
|
-
readonly kind: "mounted";
|
|
123
|
-
readonly sourceKey: string;
|
|
124
|
-
readonly sourceIdentity: SourceIdentity;
|
|
125
|
-
};
|
|
126
|
-
type SemanticOrigin = {
|
|
127
|
-
readonly kind: "authored" | "implicit";
|
|
128
|
-
readonly path: string;
|
|
129
|
-
readonly source?: SourceOrigin;
|
|
130
|
-
readonly sourceSpan?: SourceSpan;
|
|
131
|
-
readonly reason?: "primitive-text-in-container";
|
|
132
|
-
};
|
|
133
|
-
type BaseSemanticNode = {
|
|
134
|
-
readonly id: GraphNodeId;
|
|
135
|
-
readonly kind: SemanticNodeKind;
|
|
136
|
-
readonly origin: SemanticOrigin;
|
|
137
|
-
readonly authoredTag?: AuthoredTag;
|
|
138
|
-
readonly authoredComponent?: AuthoredComponent;
|
|
139
|
-
readonly role?: SemanticRole;
|
|
140
|
-
readonly key?: JsxKey;
|
|
141
|
-
readonly styleRef?: StyleEntityId;
|
|
142
|
-
};
|
|
143
|
-
type SemanticDocumentNode = BaseSemanticNode & {
|
|
144
|
-
readonly kind: "document";
|
|
145
|
-
readonly children: readonly GraphNodeId[];
|
|
146
|
-
};
|
|
147
|
-
type SemanticSlideNode = BaseSemanticNode & {
|
|
148
|
-
readonly kind: "slide";
|
|
149
|
-
readonly name?: string;
|
|
150
|
-
readonly children: readonly GraphNodeId[];
|
|
151
|
-
};
|
|
152
|
-
type SemanticContainerNode = BaseSemanticNode & {
|
|
153
|
-
readonly kind: "container";
|
|
154
|
-
readonly children: readonly GraphNodeId[];
|
|
155
|
-
};
|
|
156
|
-
type SemanticTextNode = BaseSemanticNode & {
|
|
157
|
-
readonly kind: "text";
|
|
158
|
-
readonly inlineChildren: readonly GraphNodeId[];
|
|
159
|
-
readonly implicit?: boolean;
|
|
160
|
-
};
|
|
161
|
-
type SemanticTextRunNode = BaseSemanticNode & {
|
|
162
|
-
readonly kind: "textRun";
|
|
163
|
-
readonly text: string;
|
|
164
|
-
};
|
|
165
|
-
type SemanticImageNode = BaseSemanticNode & {
|
|
166
|
-
readonly kind: "image";
|
|
167
|
-
readonly assetRef?: AssetEntityId;
|
|
168
|
-
};
|
|
169
|
-
type SemanticShapeNode = BaseSemanticNode & {
|
|
170
|
-
readonly kind: "shape";
|
|
171
|
-
readonly shape: "rect" | "ellipse" | "line";
|
|
172
|
-
};
|
|
173
|
-
type SemanticNode = SemanticContainerNode | SemanticDocumentNode | SemanticImageNode | SemanticShapeNode | SemanticSlideNode | SemanticTextNode | SemanticTextRunNode;
|
|
174
|
-
type StyleClassRef = {
|
|
175
|
-
readonly name: string;
|
|
176
|
-
readonly index: number;
|
|
177
|
-
};
|
|
178
|
-
type StyleEntity = {
|
|
179
|
-
readonly id: StyleEntityId;
|
|
180
|
-
readonly target: SemanticNodeKind;
|
|
181
|
-
readonly authored: {
|
|
182
|
-
readonly style?: unknown;
|
|
183
|
-
readonly classRefs?: readonly StyleClassRef[];
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
type AssetEntity = {
|
|
187
|
-
readonly id: AssetEntityId;
|
|
188
|
-
readonly kind: "image";
|
|
189
|
-
readonly source: {
|
|
190
|
-
readonly kind: "path";
|
|
191
|
-
readonly path: string;
|
|
192
|
-
} | {
|
|
193
|
-
readonly kind: "data";
|
|
194
|
-
readonly data: string;
|
|
195
|
-
};
|
|
196
|
-
readonly metadata: {
|
|
197
|
-
readonly mediaType?: string;
|
|
198
|
-
readonly byteLength?: number;
|
|
199
|
-
readonly widthPx?: number;
|
|
200
|
-
readonly heightPx?: number;
|
|
201
|
-
readonly contentHash?: string;
|
|
202
|
-
};
|
|
203
|
-
readonly resolution: "failed" | "resolved" | "unresolved";
|
|
204
|
-
};
|
|
205
|
-
type SemanticAuthorGraph = {
|
|
206
|
-
readonly documentId: GraphNodeId;
|
|
207
|
-
readonly nodes: ReadonlyMap<GraphNodeId, SemanticNode>;
|
|
208
|
-
readonly styles: ReadonlyMap<StyleEntityId, StyleEntity>;
|
|
209
|
-
readonly assets: ReadonlyMap<AssetEntityId, AssetEntity>;
|
|
210
|
-
};
|
|
211
4
|
//#endregion
|
|
212
5
|
//#region src/style/types.d.ts
|
|
213
6
|
type DeckLength = number | `${number}${"in" | "pt" | "px" | "%" | "em" | "rem" | "vh" | "vw" | "ch"}`;
|
|
@@ -263,6 +56,9 @@ type BaseAuthorProps = {
|
|
|
263
56
|
rotation?: number;
|
|
264
57
|
transform?: string;
|
|
265
58
|
transformOrigin?: string;
|
|
59
|
+
filter?: string;
|
|
60
|
+
mixBlendMode?: string;
|
|
61
|
+
isolation?: "auto" | "isolate";
|
|
266
62
|
zIndex?: number;
|
|
267
63
|
flipH?: boolean;
|
|
268
64
|
flipV?: boolean;
|
|
@@ -462,8 +258,286 @@ type ShapeStyle = FrameAuthorProps & Omit<BoxStyleAuthorProps, "backgroundColor"
|
|
|
462
258
|
radius?: DeckLength;
|
|
463
259
|
};
|
|
464
260
|
type TextRunStyle = Pick<TextStyle, "fontFamily" | "fontSize" | "fontWeight" | "italic" | "fontStyle" | "underline" | "strike" | "textDecoration" | "textDecorationLine" | "textDecorationStyle" | "textDecorationColor" | "textTransform" | "direction" | "writingMode" | "color" | "verticalAlign" | "charSpacing" | "letterSpacing" | "href" | "tooltip" | "superscript" | "subscript" | "textShadow">;
|
|
261
|
+
type KnownStyleDeclarationSource = SlideStyle | ViewStyle | TextStyle | TextRunStyle | ImageStyle | ShapeStyle;
|
|
262
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
263
|
+
type ValueOfUnion<T, TKey extends PropertyKey> = T extends T ? TKey extends keyof T ? T[TKey] : never : never;
|
|
264
|
+
type KnownStyleDeclarationKey = KeysOfUnion<KnownStyleDeclarationSource>;
|
|
265
|
+
type StyleDeclarationValue = ValueOfUnion<KnownStyleDeclarationSource, KnownStyleDeclarationKey>;
|
|
266
|
+
type StyleDeclaration = { readonly [Key in KnownStyleDeclarationKey]?: ValueOfUnion<KnownStyleDeclarationSource, Key> };
|
|
465
267
|
type StyleForAuthoredTag<TTag extends string> = TTag extends "span" ? TextRunStyle : TTag extends "img" ? ImageStyle : TTag extends "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" ? TextStyle : ViewStyle;
|
|
466
268
|
//#endregion
|
|
269
|
+
//#region src/templates.d.ts
|
|
270
|
+
declare const TEMPLATE_AREA_KINDS: readonly ["body", "date", "footer", "generic", "picture", "slideNumber", "title"];
|
|
271
|
+
type TemplateAreaKind = (typeof TEMPLATE_AREA_KINDS)[number];
|
|
272
|
+
/** The concrete frame used by a Template Area before output projection. */
|
|
273
|
+
type TemplateFrame = {
|
|
274
|
+
readonly x: DeckLength;
|
|
275
|
+
readonly y: DeckLength;
|
|
276
|
+
readonly width: DeckLength;
|
|
277
|
+
readonly height: DeckLength;
|
|
278
|
+
};
|
|
279
|
+
/** A named placement area inside a Slide Template. */
|
|
280
|
+
type TemplateArea = {
|
|
281
|
+
readonly frame: TemplateFrame;
|
|
282
|
+
readonly kind?: TemplateAreaKind;
|
|
283
|
+
};
|
|
284
|
+
/** A reusable Deck-owned slide structure made of named Template Areas. */
|
|
285
|
+
type SlideTemplate = {
|
|
286
|
+
readonly areas: Readonly<Record<string, TemplateArea>>;
|
|
287
|
+
};
|
|
288
|
+
/** The Deck-local set of Slide Templates available to `deck.slide({ template })`. */
|
|
289
|
+
type SlideTemplateSet = Readonly<Record<string, SlideTemplate>>;
|
|
290
|
+
type EmptySlideTemplateSet = Record<never, never>;
|
|
291
|
+
/**
|
|
292
|
+
* A branded authored reference from slide content to one Template Area.
|
|
293
|
+
*
|
|
294
|
+
* Authors normally obtain this value from the slide factory's `template` handle, for example
|
|
295
|
+
* `area={template.title}`. The runtime reference object is library-owned so callers do not have to
|
|
296
|
+
* manufacture branded values.
|
|
297
|
+
*
|
|
298
|
+
* @typeParam TTemplateName - Name of the Slide Template that owns the referenced area.
|
|
299
|
+
* @typeParam TAreaName - Name of the referenced Template Area.
|
|
300
|
+
*/
|
|
301
|
+
type TemplateAreaRef<TTemplateName extends string = string, TAreaName extends string = string> = Readonly<{
|
|
302
|
+
readonly type: "deckjsx.templateAreaRef";
|
|
303
|
+
readonly template: TTemplateName;
|
|
304
|
+
readonly area: TAreaName;
|
|
305
|
+
}> & {
|
|
306
|
+
readonly __deckjsxTemplateAreaRefBrand?: never;
|
|
307
|
+
};
|
|
308
|
+
type TemplateAreaNames<TTemplates extends SlideTemplateSet, TName extends keyof TTemplates> = keyof TTemplates[TName]["areas"] & string;
|
|
309
|
+
/**
|
|
310
|
+
* The typed template handle passed to a templated slide factory.
|
|
311
|
+
*
|
|
312
|
+
* `$name` is a discriminant for template-name unions. Every other key maps to a Template Area
|
|
313
|
+
* Reference for that area.
|
|
314
|
+
*
|
|
315
|
+
* @typeParam TTemplates - Deck-local Slide Template set.
|
|
316
|
+
* @typeParam TName - Selected Slide Template name.
|
|
317
|
+
*/
|
|
318
|
+
type TemplateHandle<TTemplates extends SlideTemplateSet, TName extends keyof TTemplates & string> = TName extends keyof TTemplates & string ? {
|
|
319
|
+
readonly $name: TName;
|
|
320
|
+
} & { readonly [AreaName in TemplateAreaNames<TTemplates, TName>]: TemplateAreaRef<TName, AreaName> } : never;
|
|
321
|
+
type TemplateName<TTemplates extends SlideTemplateSet> = keyof TTemplates & string;
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/authoring/props.d.ts
|
|
324
|
+
interface ClassNameValueArray extends ReadonlyArray<ClassNameValue> {}
|
|
325
|
+
type ClassNameObject = Readonly<Record<string, boolean | null | undefined>>;
|
|
326
|
+
type ClassNameValue = string | false | null | undefined | ClassNameValueArray | ClassNameObject;
|
|
327
|
+
type ClassNameAuthorProps = {
|
|
328
|
+
className?: ClassNameValue;
|
|
329
|
+
};
|
|
330
|
+
type TemplateAreaAuthorProps = {
|
|
331
|
+
area?: TemplateAreaRef;
|
|
332
|
+
};
|
|
333
|
+
type ViewNodeProps = {
|
|
334
|
+
style?: ViewStyle;
|
|
335
|
+
} & ClassNameAuthorProps & TemplateAreaAuthorProps & ViewStyle;
|
|
336
|
+
type TextNodeProps = {
|
|
337
|
+
style?: TextStyle;
|
|
338
|
+
} & ClassNameAuthorProps & TemplateAreaAuthorProps & TextStyle;
|
|
339
|
+
type TextRunNodeProps = {
|
|
340
|
+
style?: TextRunStyle;
|
|
341
|
+
} & ClassNameAuthorProps & TextRunStyle;
|
|
342
|
+
type ImageNodeProps = {
|
|
343
|
+
style?: ImageStyle;
|
|
344
|
+
} & ClassNameAuthorProps & TemplateAreaAuthorProps & ImageStyle & ({
|
|
345
|
+
src: string;
|
|
346
|
+
data?: string;
|
|
347
|
+
} | {
|
|
348
|
+
src?: string;
|
|
349
|
+
data: string;
|
|
350
|
+
});
|
|
351
|
+
type ShapeNodeProps = {
|
|
352
|
+
style?: ShapeStyle;
|
|
353
|
+
shape: "rect" | "ellipse" | "line";
|
|
354
|
+
} & ClassNameAuthorProps & TemplateAreaAuthorProps & ShapeStyle;
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/authoring/tree.d.ts
|
|
357
|
+
type JsxKey = string | number | bigint;
|
|
358
|
+
type SourceSpan = {
|
|
359
|
+
readonly file?: string;
|
|
360
|
+
readonly line?: number;
|
|
361
|
+
readonly column?: number;
|
|
362
|
+
};
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/diagnostics/errors.d.ts
|
|
365
|
+
declare class DeckDiagnosticError extends Error {
|
|
366
|
+
readonly diagnostics: Diagnostics;
|
|
367
|
+
constructor(message: string, diagnostics: Diagnostics);
|
|
368
|
+
}
|
|
369
|
+
declare class SemanticGraphDiagnosticError extends DeckDiagnosticError {
|
|
370
|
+
constructor(diagnostics: Diagnostics);
|
|
371
|
+
}
|
|
372
|
+
declare class CompositionDiagnosticError extends DeckDiagnosticError {
|
|
373
|
+
constructor(diagnostics: Diagnostics);
|
|
374
|
+
}
|
|
375
|
+
declare class StyleDiagnosticError extends DeckDiagnosticError {
|
|
376
|
+
constructor(diagnostics: Diagnostics);
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/diagnostics/format.d.ts
|
|
380
|
+
declare function formatDiagnostic(diagnostic: Diagnostic): string;
|
|
381
|
+
declare function formatDiagnostics(diagnostics: Diagnostics): string;
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/diagnostics/index.d.ts
|
|
384
|
+
type DiagnosticSeverity = "error" | "warning";
|
|
385
|
+
type DiagnosticLabel = {
|
|
386
|
+
readonly message: string;
|
|
387
|
+
readonly path: string;
|
|
388
|
+
readonly sourceSpan?: SourceSpan;
|
|
389
|
+
readonly severity?: "primary" | "secondary";
|
|
390
|
+
};
|
|
391
|
+
type Diagnostic = {
|
|
392
|
+
readonly severity: DiagnosticSeverity;
|
|
393
|
+
readonly code: string;
|
|
394
|
+
readonly title: string;
|
|
395
|
+
readonly message?: string;
|
|
396
|
+
readonly labels: readonly DiagnosticLabel[];
|
|
397
|
+
readonly notes?: readonly string[];
|
|
398
|
+
readonly help?: readonly string[];
|
|
399
|
+
};
|
|
400
|
+
type Diagnostics = {
|
|
401
|
+
readonly items: readonly Diagnostic[];
|
|
402
|
+
readonly hasErrors: boolean;
|
|
403
|
+
readonly hasWarnings: boolean;
|
|
404
|
+
};
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/graph/types.d.ts
|
|
407
|
+
type Brand<T, B extends string> = T & {
|
|
408
|
+
readonly __brand: B;
|
|
409
|
+
};
|
|
410
|
+
type GraphNodeId = Brand<string, "GraphNodeId">;
|
|
411
|
+
type StyleEntityId = Brand<string, "StyleEntityId">;
|
|
412
|
+
type AssetEntityId = Brand<string, "AssetEntityId">;
|
|
413
|
+
type SourceIdentity = Brand<string, "SourceIdentity">;
|
|
414
|
+
type SemanticNodeKind = "container" | "document" | "image" | "shape" | "slide" | "text" | "textRun";
|
|
415
|
+
type SemanticRole = {
|
|
416
|
+
readonly kind: "document";
|
|
417
|
+
} | {
|
|
418
|
+
readonly kind: "slide";
|
|
419
|
+
} | {
|
|
420
|
+
readonly kind: "genericContainer";
|
|
421
|
+
} | {
|
|
422
|
+
readonly kind: "sectioning";
|
|
423
|
+
readonly tag: SectioningTag;
|
|
424
|
+
} | {
|
|
425
|
+
readonly kind: "figure";
|
|
426
|
+
} | {
|
|
427
|
+
readonly kind: "paragraph";
|
|
428
|
+
} | {
|
|
429
|
+
readonly kind: "heading";
|
|
430
|
+
readonly level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
431
|
+
} | {
|
|
432
|
+
readonly kind: "image";
|
|
433
|
+
} | {
|
|
434
|
+
readonly kind: "shape";
|
|
435
|
+
};
|
|
436
|
+
type SourceOrigin = {
|
|
437
|
+
readonly kind: "root";
|
|
438
|
+
} | {
|
|
439
|
+
readonly kind: "mounted";
|
|
440
|
+
readonly sourceKey: string;
|
|
441
|
+
readonly sourceIdentity: SourceIdentity;
|
|
442
|
+
};
|
|
443
|
+
type SemanticOrigin = {
|
|
444
|
+
readonly kind: "authored" | "implicit";
|
|
445
|
+
readonly path: string;
|
|
446
|
+
readonly source?: SourceOrigin;
|
|
447
|
+
readonly sourceSpan?: SourceSpan;
|
|
448
|
+
readonly reason?: "primitive-text-in-container";
|
|
449
|
+
};
|
|
450
|
+
type SemanticTemplateRef = {
|
|
451
|
+
readonly name: string;
|
|
452
|
+
};
|
|
453
|
+
type SemanticTemplateAreaRef = {
|
|
454
|
+
readonly template: string;
|
|
455
|
+
readonly area: string;
|
|
456
|
+
};
|
|
457
|
+
type BaseSemanticNode = {
|
|
458
|
+
readonly id: GraphNodeId;
|
|
459
|
+
readonly kind: SemanticNodeKind;
|
|
460
|
+
readonly origin: SemanticOrigin;
|
|
461
|
+
readonly authoredTag?: AuthoredTag;
|
|
462
|
+
readonly role?: SemanticRole;
|
|
463
|
+
readonly key?: JsxKey;
|
|
464
|
+
readonly styleRef?: StyleEntityId;
|
|
465
|
+
readonly templateAreaRef?: SemanticTemplateAreaRef;
|
|
466
|
+
};
|
|
467
|
+
type SemanticDocumentNode = BaseSemanticNode & {
|
|
468
|
+
readonly kind: "document";
|
|
469
|
+
readonly children: readonly GraphNodeId[];
|
|
470
|
+
};
|
|
471
|
+
type SemanticSlideNode = BaseSemanticNode & {
|
|
472
|
+
readonly kind: "slide";
|
|
473
|
+
readonly name?: string;
|
|
474
|
+
readonly templateRef?: SemanticTemplateRef;
|
|
475
|
+
readonly children: readonly GraphNodeId[];
|
|
476
|
+
};
|
|
477
|
+
type SemanticContainerNode = BaseSemanticNode & {
|
|
478
|
+
readonly kind: "container";
|
|
479
|
+
readonly children: readonly GraphNodeId[];
|
|
480
|
+
};
|
|
481
|
+
type SemanticTextNode = BaseSemanticNode & {
|
|
482
|
+
readonly kind: "text";
|
|
483
|
+
readonly inlineChildren: readonly GraphNodeId[];
|
|
484
|
+
readonly implicit?: boolean;
|
|
485
|
+
};
|
|
486
|
+
type SemanticTextRunNode = BaseSemanticNode & {
|
|
487
|
+
readonly kind: "textRun";
|
|
488
|
+
readonly text: string;
|
|
489
|
+
};
|
|
490
|
+
type SemanticImageNode = BaseSemanticNode & {
|
|
491
|
+
readonly kind: "image";
|
|
492
|
+
readonly assetRef?: AssetEntityId;
|
|
493
|
+
};
|
|
494
|
+
type SemanticShapeNode = BaseSemanticNode & {
|
|
495
|
+
readonly kind: "shape";
|
|
496
|
+
readonly shape: "rect" | "ellipse" | "line";
|
|
497
|
+
};
|
|
498
|
+
type SemanticNode = SemanticContainerNode | SemanticDocumentNode | SemanticImageNode | SemanticShapeNode | SemanticSlideNode | SemanticTextNode | SemanticTextRunNode;
|
|
499
|
+
type StyleClassRef = {
|
|
500
|
+
readonly name: string;
|
|
501
|
+
readonly index: number;
|
|
502
|
+
};
|
|
503
|
+
type StyleEntity = {
|
|
504
|
+
readonly id: StyleEntityId;
|
|
505
|
+
readonly target: SemanticNodeKind;
|
|
506
|
+
readonly authored: {
|
|
507
|
+
readonly style?: StyleDeclaration;
|
|
508
|
+
readonly classRefs?: readonly StyleClassRef[];
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
type AssetEntity = {
|
|
512
|
+
readonly id: AssetEntityId;
|
|
513
|
+
readonly kind: "image";
|
|
514
|
+
readonly source: {
|
|
515
|
+
readonly kind: "path";
|
|
516
|
+
readonly path: string;
|
|
517
|
+
} | {
|
|
518
|
+
readonly kind: "data";
|
|
519
|
+
readonly data: string;
|
|
520
|
+
} | {
|
|
521
|
+
readonly kind: "url";
|
|
522
|
+
readonly url: string;
|
|
523
|
+
};
|
|
524
|
+
readonly metadata: {
|
|
525
|
+
readonly mediaType?: string;
|
|
526
|
+
readonly byteLength?: number;
|
|
527
|
+
readonly widthPx?: number;
|
|
528
|
+
readonly heightPx?: number;
|
|
529
|
+
readonly contentHash?: string;
|
|
530
|
+
};
|
|
531
|
+
readonly resolution: "failed" | "resolved" | "unresolved";
|
|
532
|
+
};
|
|
533
|
+
type SemanticAuthorGraph = {
|
|
534
|
+
readonly documentId: GraphNodeId;
|
|
535
|
+
readonly nodes: ReadonlyMap<GraphNodeId, SemanticNode>;
|
|
536
|
+
readonly styles: ReadonlyMap<StyleEntityId, StyleEntity>;
|
|
537
|
+
readonly assets: ReadonlyMap<AssetEntityId, AssetEntity>;
|
|
538
|
+
readonly templates: ReadonlyMap<string, SlideTemplateSet>;
|
|
539
|
+
};
|
|
540
|
+
//#endregion
|
|
467
541
|
//#region src/style/stylesheet.d.ts
|
|
468
542
|
type StyleTargetSelector = string;
|
|
469
543
|
type StyleClassStyle = SlideStyle | ViewStyle | TextStyle | TextRunStyle | ImageStyle | ShapeStyle;
|
|
@@ -472,7 +546,7 @@ type TargetedStyleClassDefinition<TStyle extends StyleClassStyle = StyleClassSty
|
|
|
472
546
|
readonly style: TStyle;
|
|
473
547
|
};
|
|
474
548
|
type StyleClassDefinition<TStyle extends StyleClassStyle = StyleClassStyle> = TStyle | TargetedStyleClassDefinition<TStyle>;
|
|
475
|
-
type StyleSheetInput<TClasses extends Readonly<Record<string,
|
|
549
|
+
type StyleSheetInput<TClasses extends Readonly<Record<string, StyleClassDefinition>> = Readonly<Record<string, StyleClassDefinition>>> = {
|
|
476
550
|
readonly classes: StyleSheetClasses<TClasses>;
|
|
477
551
|
};
|
|
478
552
|
type RightmostSelectorPart<TSelector extends string> = TSelector extends `${string} ${infer TRight}` ? RightmostSelectorPart<TRight> : TSelector;
|
|
@@ -485,14 +559,14 @@ type StyleClassDefinitionFor<TDefinition> = TDefinition extends {
|
|
|
485
559
|
} ? TTarget extends StyleTargetSelector | readonly StyleTargetSelector[] ? TStyle extends StyleForStyleTarget<TTarget> ? TDefinition : never : never : TDefinition extends {
|
|
486
560
|
readonly style: infer TStyle;
|
|
487
561
|
} ? TStyle extends StyleClassStyle ? TDefinition : never : TDefinition extends StyleClassStyle ? TDefinition : never;
|
|
488
|
-
type StyleSheetClasses<TClasses extends Readonly<Record<string,
|
|
489
|
-
declare class StyleSheetImpl<TClasses extends Readonly<Record<string,
|
|
562
|
+
type StyleSheetClasses<TClasses extends Readonly<Record<string, StyleClassDefinition>>> = { readonly [ClassName in keyof TClasses]: StyleClassDefinitionFor<TClasses[ClassName]> };
|
|
563
|
+
declare class StyleSheetImpl<TClasses extends Readonly<Record<string, StyleClassDefinition>> = Readonly<Record<string, StyleClassDefinition>>> {
|
|
490
564
|
readonly classes: StyleSheetClasses<TClasses>;
|
|
491
565
|
constructor(input: StyleSheetInput<TClasses>);
|
|
492
566
|
}
|
|
493
|
-
type StyleSheet<TClasses extends Readonly<Record<string,
|
|
567
|
+
type StyleSheet<TClasses extends Readonly<Record<string, StyleClassDefinition>> = Readonly<Record<string, StyleClassDefinition>>> = StyleSheetImpl<TClasses>;
|
|
494
568
|
declare const StyleSheet: {
|
|
495
|
-
new <const TClasses extends Readonly<Record<string,
|
|
569
|
+
new <const TClasses extends Readonly<Record<string, StyleClassDefinition>> = Readonly<Record<string, StyleClassDefinition>>>(input: StyleSheetInput<TClasses>): StyleSheet<TClasses>;
|
|
496
570
|
};
|
|
497
571
|
//#endregion
|
|
498
572
|
//#region src/style/defaults.d.ts
|
|
@@ -500,7 +574,7 @@ type ThemeDefaults = Partial<{ readonly [Tag in AuthoredTag]: StyleForAuthoredTa
|
|
|
500
574
|
//#endregion
|
|
501
575
|
//#region src/style/theme-values.d.ts
|
|
502
576
|
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
503
|
-
type DeepMerge<TBase, TExtension> = TExtension extends readonly
|
|
577
|
+
type DeepMerge<TBase, TExtension> = TExtension extends readonly (infer _ExtensionItem)[] ? TExtension : TBase extends readonly (infer _BaseItem)[] ? TExtension : TBase extends Primitive ? TExtension : TExtension extends Primitive ? TExtension : TBase extends object ? TExtension extends object ? { readonly [Key in keyof TBase | keyof TExtension]: Key extends keyof TExtension ? Key extends keyof TBase ? DeepMerge<TBase[Key], TExtension[Key]> : TExtension[Key] : Key extends keyof TBase ? TBase[Key] : never } : TExtension : TExtension;
|
|
504
578
|
type MergedTheme<TBase extends object, TExtension extends object> = DeepMerge<TBase, TExtension> & object;
|
|
505
579
|
//#endregion
|
|
506
580
|
//#region src/style/theme.d.ts
|
|
@@ -524,6 +598,12 @@ declare const Theme: {
|
|
|
524
598
|
//#endregion
|
|
525
599
|
//#region src/composition/types.d.ts
|
|
526
600
|
declare const COMPOSITION_SOURCE: unique symbol;
|
|
601
|
+
/**
|
|
602
|
+
* Deck-generated composition values passed to every slide factory.
|
|
603
|
+
*
|
|
604
|
+
* `slideIndex` and `totalSlides` are source-local. `deckSlideIndex` and `deckTotalSlides` refer to
|
|
605
|
+
* the fully composed root deck after mounted sources are expanded.
|
|
606
|
+
*/
|
|
527
607
|
type CompositionContext = {
|
|
528
608
|
readonly sourceKey?: string;
|
|
529
609
|
readonly slideIndex: number;
|
|
@@ -531,63 +611,119 @@ type CompositionContext = {
|
|
|
531
611
|
readonly deckSlideIndex: number;
|
|
532
612
|
readonly deckTotalSlides: number;
|
|
533
613
|
};
|
|
614
|
+
/**
|
|
615
|
+
* The input shape for a slide factory.
|
|
616
|
+
*
|
|
617
|
+
* Root Decks receive only `composition`; Decks with Source Context also receive `context`.
|
|
618
|
+
*
|
|
619
|
+
* @typeParam TSourceContext - Source Context type required by the declaring Deck.
|
|
620
|
+
*/
|
|
534
621
|
type SlideFactoryInput<TSourceContext = void> = [TSourceContext] extends [void] ? {
|
|
535
622
|
readonly composition: CompositionContext;
|
|
536
623
|
} : {
|
|
537
624
|
readonly context: TSourceContext;
|
|
538
625
|
readonly composition: CompositionContext;
|
|
539
626
|
};
|
|
540
|
-
|
|
627
|
+
/**
|
|
628
|
+
* Slide factory input when a slide selects a Deck Template.
|
|
629
|
+
*
|
|
630
|
+
* The `template` handle exposes typed Template Area References for the selected template.
|
|
631
|
+
*
|
|
632
|
+
* @typeParam TSourceContext - Source Context type required by the declaring Deck.
|
|
633
|
+
* @typeParam TTemplates - Deck-local Slide Template set.
|
|
634
|
+
* @typeParam TTemplateName - Selected Slide Template name.
|
|
635
|
+
*/
|
|
636
|
+
type SlideFactoryInputWithTemplate<TSourceContext = void, TTemplates extends SlideTemplateSet = EmptySlideTemplateSet, TTemplateName extends TemplateName<TTemplates> = TemplateName<TTemplates>> = SlideFactoryInput<TSourceContext> & {
|
|
637
|
+
readonly template: TemplateHandle<TTemplates, TTemplateName>;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* A callback that returns the authored JSX content for one slide.
|
|
641
|
+
*
|
|
642
|
+
* The returned JSX is slide content, not a public `<Slide>` wrapper.
|
|
643
|
+
*
|
|
644
|
+
* @typeParam TSourceContext - Source Context type required by the declaring Deck.
|
|
645
|
+
* @typeParam TInput - Factory input shape, including template handle when applicable.
|
|
646
|
+
*/
|
|
647
|
+
type SlideFactory<TSourceContext = void, TInput extends SlideFactoryInput<TSourceContext> = SlideFactoryInput<TSourceContext>> = (input: TInput) => JsxNode;
|
|
648
|
+
/**
|
|
649
|
+
* Slide-level options for `deck.slide(...)`.
|
|
650
|
+
*
|
|
651
|
+
* `template` is available only when the Deck has a typed template set. `name`, `className`, and
|
|
652
|
+
* `style` apply to the slide declaration itself.
|
|
653
|
+
*
|
|
654
|
+
* @typeParam TTemplates - Deck-local Slide Template set.
|
|
655
|
+
* @typeParam TTemplateName - Selected Slide Template name.
|
|
656
|
+
*/
|
|
657
|
+
type SlideOptions<TTemplates extends SlideTemplateSet = EmptySlideTemplateSet, TTemplateName extends TemplateName<TTemplates> = TemplateName<TTemplates>> = {
|
|
658
|
+
readonly name?: string;
|
|
659
|
+
readonly className?: ClassNameValue;
|
|
660
|
+
readonly style?: SlideStyle;
|
|
661
|
+
} & ([TemplateName<TTemplates>] extends [never] ? {
|
|
662
|
+
readonly template?: never;
|
|
663
|
+
} : {
|
|
664
|
+
readonly template?: TTemplateName;
|
|
665
|
+
});
|
|
666
|
+
/**
|
|
667
|
+
* Maps parent Source Context into a mounted child Deck's Source Context.
|
|
668
|
+
*
|
|
669
|
+
* Source Context mappers are synchronous and do not receive Composition Context.
|
|
670
|
+
*
|
|
671
|
+
* @typeParam TParentContext - Source Context type of the parent Deck.
|
|
672
|
+
* @typeParam TChildContext - Source Context type required by the child Deck.
|
|
673
|
+
*/
|
|
541
674
|
type SourceContextMapper<TParentContext, TChildContext> = [TParentContext] extends [void] ? () => TChildContext : (context: TParentContext) => TChildContext;
|
|
542
675
|
type SourceContextInput<TParentContext, TChildContext> = TChildContext | SourceContextMapper<TParentContext, TChildContext>;
|
|
543
|
-
type
|
|
676
|
+
type SourceContextValue = JsxNode | {
|
|
677
|
+
readonly [key: string]: SourceContextValue;
|
|
678
|
+
};
|
|
679
|
+
type SourceContextBinding<TSourceContext = void> = {
|
|
544
680
|
readonly present: false;
|
|
545
681
|
} | {
|
|
546
682
|
readonly present: true;
|
|
547
683
|
readonly value: TSourceContext;
|
|
548
684
|
};
|
|
549
|
-
type CompositionEntry<TSourceContext =
|
|
685
|
+
type CompositionEntry<TSourceContext extends SourceContextValue | void = void, TTemplates extends SlideTemplateSet = SlideTemplateSet> = {
|
|
550
686
|
readonly kind: "slide";
|
|
551
|
-
readonly
|
|
687
|
+
readonly options?: SlideOptions<TTemplates>;
|
|
688
|
+
readonly factory: SlideFactory<TSourceContext, SlideFactoryInput<TSourceContext> & object> | SlideFactory<TSourceContext, SlideFactoryInputWithTemplate<TSourceContext, TTemplates, TemplateName<TTemplates>>>;
|
|
552
689
|
} | {
|
|
553
690
|
readonly kind: "mount";
|
|
554
691
|
readonly sourceKey: string;
|
|
555
|
-
readonly source: CompositionSource<
|
|
556
|
-
readonly contextProvider?: SourceContextInput<TSourceContext,
|
|
692
|
+
readonly source: CompositionSource<SourceContextValue, SlideTemplateSet>;
|
|
693
|
+
readonly contextProvider?: SourceContextInput<TSourceContext, SourceContextValue>;
|
|
557
694
|
readonly invalidExtraContext?: boolean;
|
|
558
695
|
};
|
|
559
|
-
type CompositionSourceInternals<TSourceContext =
|
|
560
|
-
readonly entries: readonly CompositionEntry<TSourceContext>[];
|
|
696
|
+
type CompositionSourceInternals<TSourceContext extends SourceContextValue | void = void, TTemplates extends SlideTemplateSet = SlideTemplateSet> = {
|
|
697
|
+
readonly entries: readonly CompositionEntry<TSourceContext, TTemplates>[];
|
|
561
698
|
readonly stylesheets: readonly StyleSheet[];
|
|
562
699
|
readonly theme?: Theme;
|
|
700
|
+
readonly templates?: SlideTemplateSet;
|
|
563
701
|
readonly cycleId: object;
|
|
564
702
|
readonly boundContext: SourceContextBinding<TSourceContext>;
|
|
565
703
|
};
|
|
566
|
-
type CompositionSource<TSourceContext =
|
|
567
|
-
readonly [COMPOSITION_SOURCE]: () => CompositionSourceInternals<TSourceContext>;
|
|
704
|
+
type CompositionSource<TSourceContext extends SourceContextValue | void = void, TTemplates extends SlideTemplateSet = SlideTemplateSet> = {
|
|
705
|
+
readonly [COMPOSITION_SOURCE]: () => CompositionSourceInternals<TSourceContext, TTemplates>;
|
|
568
706
|
};
|
|
569
707
|
//#endregion
|
|
570
708
|
//#region src/authoring/index.d.ts
|
|
709
|
+
type DeckJsxElement = {
|
|
710
|
+
readonly $$typeof: "deckjsx.author-tree" | "deckjsx.author-node";
|
|
711
|
+
};
|
|
571
712
|
interface TextJsxChildArray extends ReadonlyArray<TextJsxChild> {}
|
|
572
|
-
type TextJsxChild =
|
|
713
|
+
type TextJsxChild = DeckJsxElement | string | number | boolean | null | undefined | TextJsxChildArray;
|
|
573
714
|
interface ContentJsxChildArray extends ReadonlyArray<ContentJsxChild> {}
|
|
574
|
-
type ContentJsxChild =
|
|
715
|
+
type ContentJsxChild = DeckJsxElement | boolean | null | undefined | ContentJsxChildArray;
|
|
575
716
|
interface ViewIntrinsicJsxChildArray extends ReadonlyArray<ViewIntrinsicJsxChild> {}
|
|
576
717
|
type ViewIntrinsicJsxChild = ContentJsxChild | string | number | ViewIntrinsicJsxChildArray;
|
|
577
718
|
interface JsxNodeArray extends ReadonlyArray<JsxNode> {}
|
|
578
|
-
type JsxNode =
|
|
579
|
-
|
|
580
|
-
type ClassNameObject = Readonly<Record<string, boolean | null | undefined>>;
|
|
581
|
-
type ClassNameValue = string | false | null | undefined | ClassNameValueArray | ClassNameObject;
|
|
582
|
-
type ClassNameAuthorProps = {
|
|
583
|
-
className?: ClassNameValue;
|
|
584
|
-
};
|
|
585
|
-
type DeckOptions = {
|
|
719
|
+
type JsxNode = DeckJsxElement | string | number | boolean | null | undefined | JsxNodeArray;
|
|
720
|
+
type DeckOptions<TTemplates extends SlideTemplateSet = EmptySlideTemplateSet> = {
|
|
586
721
|
layout: {
|
|
587
722
|
width: number;
|
|
588
723
|
height: number;
|
|
589
724
|
unit: "in" | "pt";
|
|
590
725
|
};
|
|
726
|
+
templates?: TTemplates;
|
|
591
727
|
meta?: {
|
|
592
728
|
title?: string;
|
|
593
729
|
author?: string;
|
|
@@ -598,102 +734,32 @@ type DeckOptions = {
|
|
|
598
734
|
format?: "pptx";
|
|
599
735
|
};
|
|
600
736
|
};
|
|
601
|
-
type SlideContext = {
|
|
602
|
-
composition: CompositionContext;
|
|
603
|
-
};
|
|
604
|
-
type SlideNodeProps = {
|
|
605
|
-
name?: string;
|
|
606
|
-
className?: ClassNameValue;
|
|
607
|
-
style?: SlideStyle;
|
|
608
|
-
background?: string;
|
|
609
|
-
backgroundImage?: string;
|
|
610
|
-
backgroundColor?: string;
|
|
611
|
-
backgroundTransparency?: number;
|
|
612
|
-
backgroundPosition?: string;
|
|
613
|
-
backgroundSize?: string;
|
|
614
|
-
backgroundRepeat?: string;
|
|
615
|
-
backgroundClip?: string;
|
|
616
|
-
backgroundOrigin?: string;
|
|
617
|
-
};
|
|
618
|
-
type SlideProps = SlideNodeProps & {
|
|
619
|
-
children?: ContentJsxChild;
|
|
620
|
-
};
|
|
621
|
-
type ViewNodeProps = {
|
|
622
|
-
style?: ViewStyle;
|
|
623
|
-
} & ClassNameAuthorProps & ViewStyle;
|
|
624
|
-
type ViewProps = ViewNodeProps & {
|
|
625
|
-
children?: ContentJsxChild;
|
|
626
|
-
};
|
|
627
|
-
type TextNodeProps = {
|
|
628
|
-
style?: TextStyle;
|
|
629
|
-
} & ClassNameAuthorProps & TextStyle;
|
|
630
|
-
type TextProps = TextNodeProps & {
|
|
631
|
-
children?: TextJsxChild;
|
|
632
|
-
};
|
|
633
|
-
type TextRunNodeProps = {
|
|
634
|
-
style?: TextRunStyle;
|
|
635
|
-
} & ClassNameAuthorProps & TextRunStyle;
|
|
636
|
-
type ImageNodeProps = {
|
|
637
|
-
style?: ImageStyle;
|
|
638
|
-
} & ClassNameAuthorProps & ImageStyle & ({
|
|
639
|
-
src: string;
|
|
640
|
-
data?: string;
|
|
641
|
-
} | {
|
|
642
|
-
src?: string;
|
|
643
|
-
data: string;
|
|
644
|
-
});
|
|
645
737
|
type ImageProps = ImageNodeProps & {
|
|
646
738
|
children?: never;
|
|
647
739
|
};
|
|
648
|
-
type ShapeNodeProps = {
|
|
649
|
-
style?: ShapeStyle;
|
|
650
|
-
shape: "rect" | "ellipse" | "line";
|
|
651
|
-
} & ClassNameAuthorProps & ShapeStyle;
|
|
652
740
|
type ShapeProps = ShapeNodeProps & {
|
|
653
741
|
children?: never;
|
|
654
742
|
};
|
|
655
|
-
type
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
image: ImageProps;
|
|
660
|
-
shape: ShapeProps;
|
|
661
|
-
};
|
|
662
|
-
type AuthorNodeKind = keyof AuthorNodeMap;
|
|
663
|
-
type BaseAuthorNode<K extends AuthorNodeKind, P, C> = {
|
|
664
|
-
readonly $$typeof: "deckjsx.author-node";
|
|
665
|
-
readonly kind: K;
|
|
666
|
-
readonly props: P;
|
|
667
|
-
readonly children: ReadonlyArray<C>;
|
|
668
|
-
};
|
|
669
|
-
interface SlideAuthorNode extends BaseAuthorNode<"slide", SlideNodeProps, ContentJsxChild> {}
|
|
670
|
-
interface ViewAuthorNode extends BaseAuthorNode<"view", ViewNodeProps, ContentJsxChild> {}
|
|
671
|
-
interface TextAuthorNode extends BaseAuthorNode<"text", TextNodeProps, TextJsxChild> {}
|
|
672
|
-
interface ImageAuthorNode extends BaseAuthorNode<"image", ImageNodeProps, never> {}
|
|
673
|
-
interface ShapeAuthorNode extends BaseAuthorNode<"shape", ShapeNodeProps, never> {}
|
|
674
|
-
type AuthorNodeByKind = {
|
|
675
|
-
slide: SlideAuthorNode;
|
|
676
|
-
view: ViewAuthorNode;
|
|
677
|
-
text: TextAuthorNode;
|
|
678
|
-
image: ImageAuthorNode;
|
|
679
|
-
shape: ShapeAuthorNode;
|
|
680
|
-
};
|
|
681
|
-
type AuthorNode<K extends AuthorNodeKind = AuthorNodeKind> = AuthorNodeByKind[K];
|
|
682
|
-
type IntrinsicDivProps = ViewNodeProps & {
|
|
743
|
+
type IntrinsicKeyProps = {
|
|
744
|
+
key?: JsxKey;
|
|
745
|
+
};
|
|
746
|
+
type IntrinsicDivProps = ViewNodeProps & IntrinsicKeyProps & {
|
|
683
747
|
children?: ViewIntrinsicJsxChild;
|
|
684
748
|
};
|
|
685
|
-
type IntrinsicPProps = TextNodeProps & {
|
|
749
|
+
type IntrinsicPProps = TextNodeProps & IntrinsicKeyProps & {
|
|
686
750
|
children?: TextJsxChild;
|
|
687
751
|
};
|
|
688
|
-
type IntrinsicSpanProps = TextRunNodeProps & {
|
|
752
|
+
type IntrinsicSpanProps = TextRunNodeProps & IntrinsicKeyProps & {
|
|
689
753
|
children?: TextJsxChild;
|
|
690
754
|
};
|
|
691
|
-
type IntrinsicImgProps = ImageProps;
|
|
755
|
+
type IntrinsicImgProps = ImageProps & IntrinsicKeyProps;
|
|
756
|
+
type IntrinsicShapeProps = ShapeProps & IntrinsicKeyProps;
|
|
692
757
|
type IntrinsicViewTag = "article" | "aside" | "div" | "figure" | "footer" | "header" | "main" | "nav" | "section";
|
|
693
758
|
type IntrinsicTextTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
|
|
694
759
|
type DeckJsxIntrinsicElements = {
|
|
695
760
|
img: IntrinsicImgProps;
|
|
761
|
+
shape: IntrinsicShapeProps;
|
|
696
762
|
span: IntrinsicSpanProps;
|
|
697
763
|
} & { [Tag in IntrinsicViewTag]: IntrinsicDivProps } & { [Tag in IntrinsicTextTag]: IntrinsicPProps };
|
|
698
764
|
//#endregion
|
|
699
|
-
export {
|
|
765
|
+
export { Diagnostics as $, StackAlignment as $t, BaseSemanticNode as A, CssGridAutoFlow as At, SemanticRole as B, CssObjectPosition as Bt, SourceContextValue as C, CssAlignSelf as Ct, StyleSheet as D, CssFlexBasis as Dt, ThemeDefaults as E, CssDisplay as Et, SemanticDocumentNode as F, CssGridTemplateAreas as Ft, SourceIdentity as G, DeckPointLength as Gt, SemanticSlideNode as H, CssPosition as Ht, SemanticImageNode as I, CssGridTemplateShorthand as It, StyleEntity as J, ImageStyle as Jt, SourceOrigin as K, ImageCropAuthoring as Kt, SemanticNode as L, CssGridTrack as Lt, GraphNodeId as M, CssGridPlacement as Mt, SemanticAuthorGraph as N, CssGridShorthand as Nt, AssetEntity as O, CssFlexDirection as Ot, SemanticContainerNode as P, CssGridTemplate as Pt, DiagnosticSeverity as Q, Spacing as Qt, SemanticNodeKind as R, CssJustifyContent as Rt, SourceContextMapper as S, CssAlignItems as St, ThemeInput as T, CssBoxSizing as Tt, SemanticTextNode as U, CssVisibility as Ut, SemanticShapeNode as V, CssOverflow as Vt, SemanticTextRunNode as W, DeckLength as Wt, Diagnostic as X, ShapeStyle as Xt, StyleEntityId as Y, LayoutMode as Yt, DiagnosticLabel as Z, SlideStyle as Zt, SlideFactory as _, TemplateFrame as _t, IntrinsicDivProps as a, StyleDeclarationValue as an, StyleDiagnosticError as at, SlideOptions as b, BorderStyle as bt, IntrinsicShapeProps as c, TextStyle as cn, ClassNameObject as ct, JsxNode as d, TextTabStopLength as dn, EmptySlideTemplateSet as dt, StackAxis as en, formatDiagnostic as et, TextJsxChild as f, VerticalAlign as fn, SlideTemplate as ft, CompositionSourceInternals as g, TemplateAreaRef as gt, CompositionSource as h, TemplateAreaKind as ht, DeckOptions as i, StyleDeclaration as in, SemanticGraphDiagnosticError as it, Brand as j, CssGridLine as jt, AssetEntityId as k, CssFlexWrap as kt, IntrinsicTextTag as l, TextTabStopAlignment as ln, ClassNameValue as lt, CompositionContext as m, TemplateArea as mt, DeckJsxElement as n, StrokeLineCap as nn, CompositionDiagnosticError as nt, IntrinsicImgProps as o, TextFit as on, JsxKey as ot, COMPOSITION_SOURCE as p, ViewStyle as pn, SlideTemplateSet as pt, StyleClassRef as q, ImageCropValue as qt, DeckJsxIntrinsicElements as r, StrokeLineJoin as rn, DeckDiagnosticError as rt, IntrinsicPProps as s, TextRunStyle as sn, SourceSpan as st, ContentJsxChild as t, StrokeDashType as tn, formatDiagnostics as tt, IntrinsicViewTag as u, TextTabStopAuthoring as un, ClassNameValueArray as ut, SlideFactoryInput as v, TemplateHandle as vt, Theme as w, CssAspectRatio as wt, SourceContextInput as x, CssAlignContent as xt, SlideFactoryInputWithTemplate as y, TemplateName as yt, SemanticOrigin as z, CssJustifySelf as zt };
|