@texuli/deck 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +183 -2
- package/dist/authoring/builder.d.ts +351 -0
- package/dist/authoring/builder.js +64 -0
- package/dist/authoring/index.d.ts +6 -0
- package/dist/authoring/index.js +6 -0
- package/dist/authoring/lint.d.ts +36 -0
- package/dist/authoring/lint.js +325 -0
- package/dist/authoring/outlines.d.ts +34 -0
- package/dist/authoring/outlines.js +255 -0
- package/dist/authoring/patch.d.ts +23 -0
- package/dist/authoring/patch.js +166 -0
- package/dist/authoring/select-layouts.d.ts +19 -0
- package/dist/authoring/select-layouts.js +90 -0
- package/dist/engine/auto-slide.d.ts +32 -0
- package/dist/engine/auto-slide.js +67 -0
- package/dist/engine/canvas.d.ts +56 -0
- package/dist/engine/canvas.js +48 -0
- package/dist/engine/controller.d.ts +126 -0
- package/dist/engine/controller.js +248 -0
- package/dist/engine/controls.d.ts +128 -0
- package/dist/engine/controls.js +460 -0
- package/dist/engine/hash.d.ts +42 -0
- package/dist/engine/hash.js +86 -0
- package/dist/engine/index.d.ts +88 -0
- package/dist/engine/index.js +88 -0
- package/dist/engine/messages.d.ts +138 -0
- package/dist/engine/messages.js +140 -0
- package/dist/engine/motion.d.ts +64 -0
- package/dist/engine/motion.js +112 -0
- package/dist/engine/navigation.d.ts +87 -0
- package/dist/engine/navigation.js +156 -0
- package/dist/engine/presenter.d.ts +58 -0
- package/dist/engine/presenter.js +157 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/markdown/attributes.d.ts +24 -0
- package/dist/markdown/attributes.js +94 -0
- package/dist/markdown/attrs-closed.d.ts +52 -0
- package/dist/markdown/attrs-closed.js +520 -0
- package/dist/markdown/blocks.d.ts +112 -0
- package/dist/markdown/blocks.js +766 -0
- package/dist/markdown/frontmatter.d.ts +30 -0
- package/dist/markdown/frontmatter.js +165 -0
- package/dist/markdown/index.d.ts +29 -0
- package/dist/markdown/index.js +29 -0
- package/dist/markdown/issues.d.ts +68 -0
- package/dist/markdown/issues.js +83 -0
- package/dist/markdown/json.d.ts +21 -0
- package/dist/markdown/json.js +236 -0
- package/dist/markdown/limits.d.ts +32 -0
- package/dist/markdown/limits.js +32 -0
- package/dist/markdown/parse.d.ts +31 -0
- package/dist/markdown/parse.js +283 -0
- package/dist/markdown/scan.d.ts +26 -0
- package/dist/markdown/scan.js +138 -0
- package/dist/markdown/slides.d.ts +32 -0
- package/dist/markdown/slides.js +854 -0
- package/dist/markdown/text.d.ts +76 -0
- package/dist/markdown/text.js +447 -0
- package/dist/markdown/twin.d.ts +41 -0
- package/dist/markdown/twin.js +374 -0
- package/dist/markdown/write.d.ts +17 -0
- package/dist/markdown/write.js +688 -0
- package/dist/math/index.d.ts +14 -0
- package/dist/math/index.js +14 -0
- package/dist/math/parse.d.ts +9 -0
- package/dist/math/parse.js +648 -0
- package/dist/math/symbols.d.ts +44 -0
- package/dist/math/symbols.js +333 -0
- package/dist/math/types.d.ts +59 -0
- package/dist/math/types.js +69 -0
- package/dist/model/backgrounds/contrast.d.ts +77 -0
- package/dist/model/backgrounds/contrast.js +186 -0
- package/dist/model/backgrounds/index.d.ts +7 -0
- package/dist/model/backgrounds/index.js +7 -0
- package/dist/model/backgrounds/resolve.d.ts +86 -0
- package/dist/model/backgrounds/resolve.js +215 -0
- package/dist/model/backgrounds/schema.d.ts +178 -0
- package/dist/model/backgrounds/schema.js +203 -0
- package/dist/model/codes.d.ts +73 -0
- package/dist/model/codes.js +67 -0
- package/dist/model/deck.d.ts +392 -0
- package/dist/model/deck.js +338 -0
- package/dist/model/index.d.ts +19 -0
- package/dist/model/index.js +19 -0
- package/dist/model/layouts/catalog.d.ts +433 -0
- package/dist/model/layouts/catalog.js +495 -0
- package/dist/model/layouts/index.d.ts +5 -0
- package/dist/model/layouts/index.js +5 -0
- package/dist/model/layouts/props.d.ts +302 -0
- package/dist/model/layouts/props.js +272 -0
- package/dist/model/loader.d.ts +37 -0
- package/dist/model/loader.js +317 -0
- package/dist/model/migrate.d.ts +34 -0
- package/dist/model/migrate.js +453 -0
- package/dist/model/motion/index.d.ts +6 -0
- package/dist/model/motion/index.js +6 -0
- package/dist/model/motion/transition.d.ts +96 -0
- package/dist/model/motion/transition.js +127 -0
- package/dist/model/parse.d.ts +57 -0
- package/dist/model/parse.js +307 -0
- package/dist/model/plain.d.ts +40 -0
- package/dist/model/plain.js +275 -0
- package/dist/model/shared.d.ts +63 -0
- package/dist/model/shared.js +86 -0
- package/dist/model/steps/index.d.ts +7 -0
- package/dist/model/steps/index.js +7 -0
- package/dist/model/steps/phase.d.ts +34 -0
- package/dist/model/steps/phase.js +50 -0
- package/dist/model/steps/slide-steps.d.ts +129 -0
- package/dist/model/steps/slide-steps.js +256 -0
- package/dist/model/style/index.d.ts +8 -0
- package/dist/model/style/index.js +8 -0
- package/dist/model/style/resolve.d.ts +87 -0
- package/dist/model/style/resolve.js +174 -0
- package/dist/model/style/schema.d.ts +85 -0
- package/dist/model/style/schema.js +53 -0
- package/dist/model/style/theme.d.ts +69 -0
- package/dist/model/style/theme.js +84 -0
- package/dist/schema/builders.d.ts +146 -0
- package/dist/schema/builders.js +285 -0
- package/dist/schema/diagnostics.d.ts +78 -0
- package/dist/schema/diagnostics.js +81 -0
- package/dist/schema/index.d.ts +15 -0
- package/dist/schema/index.js +14 -0
- package/dist/schema/internal.d.ts +40 -0
- package/dist/schema/internal.js +209 -0
- package/dist/schema/json-schema.d.ts +12 -0
- package/dist/schema/json-schema.js +213 -0
- package/dist/schema/types.d.ts +166 -0
- package/dist/schema/types.js +1 -0
- package/dist/schema/validate.d.ts +51 -0
- package/dist/schema/validate.js +765 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.js +2 -0
- package/dist/templates/templates.d.ts +11 -0
- package/dist/templates/templates.js +47 -0
- package/package.json +60 -4
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The deck model v2 schemas (ADR-009, model-v2 §3.1, §3.2): `meta`, `style`,
|
|
3
|
+
* `navigation`, `outline` and 1 to 200 slides discriminated by `layout` (the
|
|
4
|
+
* 20 catalog layouts, `free`, `component` and `custom`), with
|
|
5
|
+
* `formatVersion: 2`. Built on the owned schema kit, so one definition gives
|
|
6
|
+
* all-issues validation, the `Infer` types and the JSON Schema export.
|
|
7
|
+
*
|
|
8
|
+
* The engine is L0: blocks and component props are checked here only as
|
|
9
|
+
* bounded JSON with a block head (`type`, `id`, step fields) and known
|
|
10
|
+
* nested containers. `parseDeck` hands each block and component to the
|
|
11
|
+
* host's validators (the slides stage injects `@texuli/blocks` and the
|
|
12
|
+
* component registry).
|
|
13
|
+
*/
|
|
14
|
+
import { type Infer, type JsonSchema, type JsonValue, type PathSegment, type Schema } from '../schema/index.js';
|
|
15
|
+
import { type DeckCatalogLayoutId, type LayoutProps } from './layouts/catalog.js';
|
|
16
|
+
import { stepFields } from './shared.js';
|
|
17
|
+
import { deckStyle } from './style/schema.js';
|
|
18
|
+
/** The model's format version. */
|
|
19
|
+
export declare const DECK_FORMAT_VERSION = 2;
|
|
20
|
+
/** Deck-level limits (model-v2 §3.2). */
|
|
21
|
+
export declare const DECK_MODEL_LIMITS: Readonly<{
|
|
22
|
+
slides: 200;
|
|
23
|
+
sections: 200;
|
|
24
|
+
sectionSlides: 200;
|
|
25
|
+
titleLength: 200;
|
|
26
|
+
descriptionLength: 500;
|
|
27
|
+
authorLength: 120;
|
|
28
|
+
outlineTitleLength: 120;
|
|
29
|
+
notesLength: 6000;
|
|
30
|
+
stepLabels: 32;
|
|
31
|
+
stepLabelLength: 80;
|
|
32
|
+
freeBlocks: 2000;
|
|
33
|
+
autoSlideMinMs: 1000;
|
|
34
|
+
autoSlideMaxMs: 600000;
|
|
35
|
+
}>;
|
|
36
|
+
/** v1's eight free-slide arrangements (`master` on a free slide; default `content`). */
|
|
37
|
+
export declare const SLIDE_MASTERS: readonly ["title", "section", "content", "two-column", "media-left", "media-right", "quote", "closing"];
|
|
38
|
+
export type SlideMasterId = (typeof SLIDE_MASTERS)[number];
|
|
39
|
+
/** The slide kinds that are not catalog layouts. */
|
|
40
|
+
export declare const DECK_SLIDE_KINDS: readonly ["free", "component", "custom"];
|
|
41
|
+
export type DeckSlideKind = (typeof DECK_SLIDE_KINDS)[number];
|
|
42
|
+
/** Every `layout` value a slide may carry: 20 catalog layouts and the 3 slide kinds. */
|
|
43
|
+
export declare const DECK_SLIDE_LAYOUTS: readonly ["title-hero", "section-divider", "two-column-split", "three-column-cards", "image-left", "image-right", "image-centered", "image-full-bleed", "quote", "code-with-callout", "big-stat", "comparison-table", "process-steps", "timeline", "team-avatars", "closing-cta", "video-centered", "video-left", "video-right", "chart", "free", "component", "custom"];
|
|
44
|
+
export type DeckSlideLayout = (typeof DECK_SLIDE_LAYOUTS)[number];
|
|
45
|
+
export declare const DECK_DIRECTIONS: readonly ["ltr", "rtl", "auto"];
|
|
46
|
+
export type DeckDirection = (typeof DECK_DIRECTIONS)[number];
|
|
47
|
+
/** BCP 47 language tag syntax (`en`, `en-GB`, `pt-BR`). */
|
|
48
|
+
export declare const LOCALE_PATTERN = "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
|
|
49
|
+
/** An ISO 8601 calendar date. */
|
|
50
|
+
export declare const ISO_DATE_PATTERN = "^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])$";
|
|
51
|
+
/** Block `type` and catalog component ids: a lowercase slug starting with a letter. */
|
|
52
|
+
export declare const BLOCK_TYPE_PATTERN = "^[a-z][a-z0-9-]{0,63}$";
|
|
53
|
+
export declare const COMPONENT_ID_PATTERN = "^[a-z][a-z0-9-]{0,63}$";
|
|
54
|
+
/** Block tones (`@texuli/blocks` `BLOCK_TONES`): the fragment tones plus `neutral`. */
|
|
55
|
+
export declare const BLOCK_TONES: readonly ["neutral", "accent", "info", "success", "warning", "danger"];
|
|
56
|
+
/** Component item heights. */
|
|
57
|
+
export declare const COMPONENT_HEIGHTS: readonly ["sm", "md", "lg", "fill"];
|
|
58
|
+
/** Bounds for one free-slide item (the outer guard; the host block parser is tighter). */
|
|
59
|
+
export declare const BLOCK_JSON_LIMITS: Readonly<{
|
|
60
|
+
depth: 12;
|
|
61
|
+
maxKeys: 100;
|
|
62
|
+
maxItems: 2000;
|
|
63
|
+
/** Room for a 192 KB base64 `data:` image; code and markdown are far smaller. */
|
|
64
|
+
maxString: 300000;
|
|
65
|
+
maxKeyLength: 64;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Where nested blocks live inside a block, as the steps pass walks them:
|
|
69
|
+
* `blocks` and `children` (lists of blocks), `columns` (a list of lists) and
|
|
70
|
+
* `panels` (objects with `blocks`).
|
|
71
|
+
*/
|
|
72
|
+
export declare const BLOCK_CONTAINERS: Readonly<{
|
|
73
|
+
lists: readonly ["blocks", "children"];
|
|
74
|
+
columns: "columns";
|
|
75
|
+
panels: "panels";
|
|
76
|
+
}>;
|
|
77
|
+
/** The step fields every slide item may carry (removed before the host block parser). */
|
|
78
|
+
export declare const STEP_FIELD_KEYS: readonly ["step", "fragment", "reveal"];
|
|
79
|
+
export declare const deckMeta: import("../index.js").ObjectSchema<{
|
|
80
|
+
readonly title: import("../index.js").StringSchema;
|
|
81
|
+
readonly description: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
82
|
+
readonly locale: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
83
|
+
readonly dir: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"ltr" | "rtl" | "auto">, false>;
|
|
84
|
+
readonly author: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
85
|
+
readonly date: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
86
|
+
}>;
|
|
87
|
+
export type DeckMeta = Infer<typeof deckMeta>;
|
|
88
|
+
export declare const deckNavigation: import("../index.js").ObjectSchema<{
|
|
89
|
+
readonly start: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
90
|
+
readonly loop: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
91
|
+
readonly autoSlideMs: import("../index.js").OptionalSchema<import("../index.js").RefineSchema<import("../index.js").NumberSchema>, false>;
|
|
92
|
+
}>;
|
|
93
|
+
export type DeckNavigation = Infer<typeof deckNavigation>;
|
|
94
|
+
export declare const deckSection: import("../index.js").ObjectSchema<{
|
|
95
|
+
readonly id: import("../index.js").StringSchema;
|
|
96
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
97
|
+
readonly slideIds: import("../index.js").ArraySchema<import("../index.js").StringSchema>;
|
|
98
|
+
readonly stack: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
99
|
+
}>;
|
|
100
|
+
export type DeckSection = Infer<typeof deckSection>;
|
|
101
|
+
export declare const deckOutline: import("../index.js").ObjectSchema<{
|
|
102
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
103
|
+
readonly sections: import("../index.js").ArraySchema<import("../index.js").ObjectSchema<{
|
|
104
|
+
readonly id: import("../index.js").StringSchema;
|
|
105
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
106
|
+
readonly slideIds: import("../index.js").ArraySchema<import("../index.js").StringSchema>;
|
|
107
|
+
readonly stack: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
108
|
+
}>>;
|
|
109
|
+
}>;
|
|
110
|
+
export type DeckOutline = Infer<typeof deckOutline>;
|
|
111
|
+
export type JsonObject = {
|
|
112
|
+
[key: string]: JsonValue;
|
|
113
|
+
};
|
|
114
|
+
/** A catalog component placed inline on a free slide. */
|
|
115
|
+
export declare const componentItem: import("../index.js").ObjectSchema<{
|
|
116
|
+
readonly step: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
117
|
+
readonly fragment: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
118
|
+
readonly reveal: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
119
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
120
|
+
readonly type: import("../index.js").LiteralSchema<"component">;
|
|
121
|
+
readonly id: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
122
|
+
readonly component: import("../index.js").StringSchema;
|
|
123
|
+
readonly props: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
124
|
+
readonly height: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"sm" | "md" | "lg" | "fill">, false>;
|
|
125
|
+
}>;
|
|
126
|
+
export type SlideComponentItem = Infer<typeof componentItem>;
|
|
127
|
+
type Bag = Record<string, unknown>;
|
|
128
|
+
/** Visit the nested blocks of a block (see `BLOCK_CONTAINERS`). */
|
|
129
|
+
export declare function forEachNested(block: Bag, path: readonly PathSegment[], visit: (child: unknown, path: PathSegment[]) => void): void;
|
|
130
|
+
/**
|
|
131
|
+
* One free-slide item: a block (any `@texuli/blocks` block, checked here as
|
|
132
|
+
* bounded JSON with a block head) or a component item. Nested blocks in the
|
|
133
|
+
* known containers get the same head check.
|
|
134
|
+
*/
|
|
135
|
+
export declare const slideItem: Schema<SlideItem>;
|
|
136
|
+
/** A block on a free slide: a bounded JSON object with a `type`; its body is the host's. */
|
|
137
|
+
export type SlideBlock = JsonObject & {
|
|
138
|
+
type: string;
|
|
139
|
+
id?: string;
|
|
140
|
+
step?: number;
|
|
141
|
+
fragment?: Infer<typeof stepFields.fragment>;
|
|
142
|
+
reveal?: Infer<typeof stepFields.reveal>;
|
|
143
|
+
tone?: (typeof BLOCK_TONES)[number];
|
|
144
|
+
};
|
|
145
|
+
export type SlideItem = SlideBlock | SlideComponentItem;
|
|
146
|
+
declare const slideBase: import("../index.js").ObjectSchema<{
|
|
147
|
+
readonly id: import("../index.js").StringSchema;
|
|
148
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
149
|
+
readonly notes: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
150
|
+
readonly hidden: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
151
|
+
readonly background: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").EnumSchema<"solid-color" | "solid-surface" | "solid-primary" | "solid-accent" | "solid-muted" | "solid-inverse" | "gradient-brand" | "gradient-dusk" | "gradient-dawn" | "gradient-forest" | "gradient-mist" | "pattern-dots" | "pattern-grid">, import("../index.js").UnionSchema<readonly [import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
152
|
+
readonly kind: import("../index.js").LiteralSchema<"solid">;
|
|
153
|
+
readonly token: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"accent" | "background" | "surface" | "primary" | "muted" | "inverse">, false>;
|
|
154
|
+
readonly color: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
155
|
+
}>>, import("../index.js").ObjectSchema<{
|
|
156
|
+
readonly kind: import("../index.js").LiteralSchema<"gradient">;
|
|
157
|
+
readonly gradient: import("../index.js").EnumSchema<"brand" | "dusk" | "dawn" | "forest" | "mist">;
|
|
158
|
+
readonly angle: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
159
|
+
}>, import("../index.js").ObjectSchema<{
|
|
160
|
+
readonly kind: import("../index.js").LiteralSchema<"pattern">;
|
|
161
|
+
readonly pattern: import("../index.js").EnumSchema<"dots" | "grid">;
|
|
162
|
+
}>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
163
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
164
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
165
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
166
|
+
readonly kind: import("../index.js").EnumSchema<"image" | "image-full">;
|
|
167
|
+
readonly src: import("../index.js").StringSchema;
|
|
168
|
+
readonly alt: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
169
|
+
readonly fit: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"cover" | "contain">, false>;
|
|
170
|
+
}>>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
171
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
172
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
173
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
174
|
+
readonly kind: import("../index.js").EnumSchema<"video" | "video-full">;
|
|
175
|
+
readonly src: import("../index.js").StringSchema;
|
|
176
|
+
readonly poster: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
177
|
+
}>>]>]>, false>;
|
|
178
|
+
readonly transition: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"fade-up" | "fade" | "none" | "slide" | "zoom" | "morph">, false>;
|
|
179
|
+
readonly theme: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").StringSchema, import("../index.js").UnionSchema<readonly [import("../index.js").ObjectSchema<{
|
|
180
|
+
readonly kind: import("../index.js").LiteralSchema<"catalog">;
|
|
181
|
+
readonly id: import("../index.js").StringSchema;
|
|
182
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
183
|
+
}>, import("../index.js").ObjectSchema<{
|
|
184
|
+
readonly kind: import("../index.js").LiteralSchema<"embedded">;
|
|
185
|
+
readonly theme: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
186
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
187
|
+
}>, import("../index.js").ObjectSchema<{
|
|
188
|
+
readonly kind: import("../index.js").LiteralSchema<"seed">;
|
|
189
|
+
readonly seed: import("../index.js").NumberSchema;
|
|
190
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
191
|
+
}>]>]>, false>;
|
|
192
|
+
readonly steps: import("../index.js").OptionalSchema<import("../index.js").ArraySchema<import("../index.js").StringSchema>, false>;
|
|
193
|
+
}>;
|
|
194
|
+
/** The fields every slide kind shares. */
|
|
195
|
+
export type SlideBase = Infer<typeof slideBase>;
|
|
196
|
+
export declare const freeSlide: import("../index.js").ObjectSchema<{
|
|
197
|
+
readonly layout: import("../index.js").LiteralSchema<"free">;
|
|
198
|
+
readonly master: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"title" | "quote" | "section" | "content" | "two-column" | "media-left" | "media-right" | "closing">, false>;
|
|
199
|
+
readonly blocks: import("../index.js").ArraySchema<Schema<SlideItem>>;
|
|
200
|
+
readonly id: import("../index.js").StringSchema;
|
|
201
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
202
|
+
readonly notes: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
203
|
+
readonly hidden: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
204
|
+
readonly background: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").EnumSchema<"solid-color" | "solid-surface" | "solid-primary" | "solid-accent" | "solid-muted" | "solid-inverse" | "gradient-brand" | "gradient-dusk" | "gradient-dawn" | "gradient-forest" | "gradient-mist" | "pattern-dots" | "pattern-grid">, import("../index.js").UnionSchema<readonly [import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
205
|
+
readonly kind: import("../index.js").LiteralSchema<"solid">;
|
|
206
|
+
readonly token: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"accent" | "background" | "surface" | "primary" | "muted" | "inverse">, false>;
|
|
207
|
+
readonly color: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
208
|
+
}>>, import("../index.js").ObjectSchema<{
|
|
209
|
+
readonly kind: import("../index.js").LiteralSchema<"gradient">;
|
|
210
|
+
readonly gradient: import("../index.js").EnumSchema<"brand" | "dusk" | "dawn" | "forest" | "mist">;
|
|
211
|
+
readonly angle: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
212
|
+
}>, import("../index.js").ObjectSchema<{
|
|
213
|
+
readonly kind: import("../index.js").LiteralSchema<"pattern">;
|
|
214
|
+
readonly pattern: import("../index.js").EnumSchema<"dots" | "grid">;
|
|
215
|
+
}>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
216
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
217
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
218
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
219
|
+
readonly kind: import("../index.js").EnumSchema<"image" | "image-full">;
|
|
220
|
+
readonly src: import("../index.js").StringSchema;
|
|
221
|
+
readonly alt: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
222
|
+
readonly fit: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"cover" | "contain">, false>;
|
|
223
|
+
}>>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
224
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
225
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
226
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
227
|
+
readonly kind: import("../index.js").EnumSchema<"video" | "video-full">;
|
|
228
|
+
readonly src: import("../index.js").StringSchema;
|
|
229
|
+
readonly poster: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
230
|
+
}>>]>]>, false>;
|
|
231
|
+
readonly transition: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"fade-up" | "fade" | "none" | "slide" | "zoom" | "morph">, false>;
|
|
232
|
+
readonly theme: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").StringSchema, import("../index.js").UnionSchema<readonly [import("../index.js").ObjectSchema<{
|
|
233
|
+
readonly kind: import("../index.js").LiteralSchema<"catalog">;
|
|
234
|
+
readonly id: import("../index.js").StringSchema;
|
|
235
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
236
|
+
}>, import("../index.js").ObjectSchema<{
|
|
237
|
+
readonly kind: import("../index.js").LiteralSchema<"embedded">;
|
|
238
|
+
readonly theme: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
239
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
240
|
+
}>, import("../index.js").ObjectSchema<{
|
|
241
|
+
readonly kind: import("../index.js").LiteralSchema<"seed">;
|
|
242
|
+
readonly seed: import("../index.js").NumberSchema;
|
|
243
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
244
|
+
}>]>]>, false>;
|
|
245
|
+
readonly steps: import("../index.js").OptionalSchema<import("../index.js").ArraySchema<import("../index.js").StringSchema>, false>;
|
|
246
|
+
}>;
|
|
247
|
+
export type FreeSlide = Omit<Infer<typeof freeSlide>, 'blocks'> & {
|
|
248
|
+
blocks: SlideItem[];
|
|
249
|
+
};
|
|
250
|
+
export declare const componentSlide: import("../index.js").ObjectSchema<{
|
|
251
|
+
readonly layout: import("../index.js").LiteralSchema<"component">;
|
|
252
|
+
readonly component: import("../index.js").ObjectSchema<{
|
|
253
|
+
readonly component: import("../index.js").StringSchema;
|
|
254
|
+
readonly props: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
255
|
+
}>;
|
|
256
|
+
readonly id: import("../index.js").StringSchema;
|
|
257
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
258
|
+
readonly notes: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
259
|
+
readonly hidden: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
260
|
+
readonly background: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").EnumSchema<"solid-color" | "solid-surface" | "solid-primary" | "solid-accent" | "solid-muted" | "solid-inverse" | "gradient-brand" | "gradient-dusk" | "gradient-dawn" | "gradient-forest" | "gradient-mist" | "pattern-dots" | "pattern-grid">, import("../index.js").UnionSchema<readonly [import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
261
|
+
readonly kind: import("../index.js").LiteralSchema<"solid">;
|
|
262
|
+
readonly token: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"accent" | "background" | "surface" | "primary" | "muted" | "inverse">, false>;
|
|
263
|
+
readonly color: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
264
|
+
}>>, import("../index.js").ObjectSchema<{
|
|
265
|
+
readonly kind: import("../index.js").LiteralSchema<"gradient">;
|
|
266
|
+
readonly gradient: import("../index.js").EnumSchema<"brand" | "dusk" | "dawn" | "forest" | "mist">;
|
|
267
|
+
readonly angle: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
268
|
+
}>, import("../index.js").ObjectSchema<{
|
|
269
|
+
readonly kind: import("../index.js").LiteralSchema<"pattern">;
|
|
270
|
+
readonly pattern: import("../index.js").EnumSchema<"dots" | "grid">;
|
|
271
|
+
}>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
272
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
273
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
274
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
275
|
+
readonly kind: import("../index.js").EnumSchema<"image" | "image-full">;
|
|
276
|
+
readonly src: import("../index.js").StringSchema;
|
|
277
|
+
readonly alt: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
278
|
+
readonly fit: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"cover" | "contain">, false>;
|
|
279
|
+
}>>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
280
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
281
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
282
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
283
|
+
readonly kind: import("../index.js").EnumSchema<"video" | "video-full">;
|
|
284
|
+
readonly src: import("../index.js").StringSchema;
|
|
285
|
+
readonly poster: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
286
|
+
}>>]>]>, false>;
|
|
287
|
+
readonly transition: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"fade-up" | "fade" | "none" | "slide" | "zoom" | "morph">, false>;
|
|
288
|
+
readonly theme: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").StringSchema, import("../index.js").UnionSchema<readonly [import("../index.js").ObjectSchema<{
|
|
289
|
+
readonly kind: import("../index.js").LiteralSchema<"catalog">;
|
|
290
|
+
readonly id: import("../index.js").StringSchema;
|
|
291
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
292
|
+
}>, import("../index.js").ObjectSchema<{
|
|
293
|
+
readonly kind: import("../index.js").LiteralSchema<"embedded">;
|
|
294
|
+
readonly theme: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
295
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
296
|
+
}>, import("../index.js").ObjectSchema<{
|
|
297
|
+
readonly kind: import("../index.js").LiteralSchema<"seed">;
|
|
298
|
+
readonly seed: import("../index.js").NumberSchema;
|
|
299
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
300
|
+
}>]>]>, false>;
|
|
301
|
+
readonly steps: import("../index.js").OptionalSchema<import("../index.js").ArraySchema<import("../index.js").StringSchema>, false>;
|
|
302
|
+
}>;
|
|
303
|
+
export type ComponentSlide = Infer<typeof componentSlide>;
|
|
304
|
+
export declare const customSlide: import("../index.js").ObjectSchema<{
|
|
305
|
+
readonly layout: import("../index.js").LiteralSchema<"custom">;
|
|
306
|
+
readonly props: import("../index.js").ObjectSchema<{
|
|
307
|
+
readonly component: import("../index.js").StringSchema;
|
|
308
|
+
readonly data: import("../index.js").OptionalSchema<import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>, false>;
|
|
309
|
+
}>;
|
|
310
|
+
readonly id: import("../index.js").StringSchema;
|
|
311
|
+
readonly title: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
312
|
+
readonly notes: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
313
|
+
readonly hidden: import("../index.js").OptionalSchema<import("../index.js").BooleanSchema, false>;
|
|
314
|
+
readonly background: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").EnumSchema<"solid-color" | "solid-surface" | "solid-primary" | "solid-accent" | "solid-muted" | "solid-inverse" | "gradient-brand" | "gradient-dusk" | "gradient-dawn" | "gradient-forest" | "gradient-mist" | "pattern-dots" | "pattern-grid">, import("../index.js").UnionSchema<readonly [import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
315
|
+
readonly kind: import("../index.js").LiteralSchema<"solid">;
|
|
316
|
+
readonly token: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"accent" | "background" | "surface" | "primary" | "muted" | "inverse">, false>;
|
|
317
|
+
readonly color: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
318
|
+
}>>, import("../index.js").ObjectSchema<{
|
|
319
|
+
readonly kind: import("../index.js").LiteralSchema<"gradient">;
|
|
320
|
+
readonly gradient: import("../index.js").EnumSchema<"brand" | "dusk" | "dawn" | "forest" | "mist">;
|
|
321
|
+
readonly angle: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
322
|
+
}>, import("../index.js").ObjectSchema<{
|
|
323
|
+
readonly kind: import("../index.js").LiteralSchema<"pattern">;
|
|
324
|
+
readonly pattern: import("../index.js").EnumSchema<"dots" | "grid">;
|
|
325
|
+
}>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
326
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
327
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
328
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
329
|
+
readonly kind: import("../index.js").EnumSchema<"image" | "image-full">;
|
|
330
|
+
readonly src: import("../index.js").StringSchema;
|
|
331
|
+
readonly alt: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
332
|
+
readonly fit: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"cover" | "contain">, false>;
|
|
333
|
+
}>>, import("../index.js").RefineSchema<import("../index.js").ObjectSchema<{
|
|
334
|
+
readonly tone: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light">, false>;
|
|
335
|
+
readonly overlay: import("../index.js").OptionalSchema<import("../index.js").NumberSchema, false>;
|
|
336
|
+
readonly position: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"center" | "top" | "bottom" | "left" | "right">, false>;
|
|
337
|
+
readonly kind: import("../index.js").EnumSchema<"video" | "video-full">;
|
|
338
|
+
readonly src: import("../index.js").StringSchema;
|
|
339
|
+
readonly poster: import("../index.js").OptionalSchema<import("../index.js").StringSchema, false>;
|
|
340
|
+
}>>]>]>, false>;
|
|
341
|
+
readonly transition: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"fade-up" | "fade" | "none" | "slide" | "zoom" | "morph">, false>;
|
|
342
|
+
readonly theme: import("../index.js").OptionalSchema<import("../index.js").UnionSchema<readonly [import("../index.js").StringSchema, import("../index.js").UnionSchema<readonly [import("../index.js").ObjectSchema<{
|
|
343
|
+
readonly kind: import("../index.js").LiteralSchema<"catalog">;
|
|
344
|
+
readonly id: import("../index.js").StringSchema;
|
|
345
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
346
|
+
}>, import("../index.js").ObjectSchema<{
|
|
347
|
+
readonly kind: import("../index.js").LiteralSchema<"embedded">;
|
|
348
|
+
readonly theme: import("../index.js").RefineSchema<import("../index.js").JsonValueSchema>;
|
|
349
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
350
|
+
}>, import("../index.js").ObjectSchema<{
|
|
351
|
+
readonly kind: import("../index.js").LiteralSchema<"seed">;
|
|
352
|
+
readonly seed: import("../index.js").NumberSchema;
|
|
353
|
+
readonly mode: import("../index.js").OptionalSchema<import("../index.js").EnumSchema<"dark" | "light" | "high-contrast" | "system">, false>;
|
|
354
|
+
}>]>]>, false>;
|
|
355
|
+
readonly steps: import("../index.js").OptionalSchema<import("../index.js").ArraySchema<import("../index.js").StringSchema>, false>;
|
|
356
|
+
}>;
|
|
357
|
+
export type CustomSlide = Infer<typeof customSlide>;
|
|
358
|
+
/** A catalog layout slide: `layout` names the layout, `props` follow its strict schema. */
|
|
359
|
+
export type LayoutSlide = {
|
|
360
|
+
[K in DeckCatalogLayoutId]: SlideBase & {
|
|
361
|
+
layout: K;
|
|
362
|
+
props: LayoutProps[K];
|
|
363
|
+
};
|
|
364
|
+
}[DeckCatalogLayoutId];
|
|
365
|
+
export type DeckSlide = LayoutSlide | FreeSlide | ComponentSlide | CustomSlide;
|
|
366
|
+
/** One slide, told apart by `layout` (an unknown one is a single `unknown-layout` issue). */
|
|
367
|
+
export declare const deckSlide: Schema<DeckSlide>;
|
|
368
|
+
/** The deck document (model v2). Cross-field rules run in `parseDeck`. */
|
|
369
|
+
export declare const deckSchema: Schema<Deck>;
|
|
370
|
+
export interface Deck {
|
|
371
|
+
formatVersion: 2;
|
|
372
|
+
meta: DeckMeta;
|
|
373
|
+
style?: Infer<typeof deckStyle>;
|
|
374
|
+
navigation?: DeckNavigation;
|
|
375
|
+
outline?: DeckOutline;
|
|
376
|
+
slides: DeckSlide[];
|
|
377
|
+
}
|
|
378
|
+
/** True when `layout` is a slide kind or a catalog layout id. */
|
|
379
|
+
export declare function isSlideLayout(value: unknown): value is DeckSlideLayout;
|
|
380
|
+
/** True when `value` matches the slide id syntax. */
|
|
381
|
+
export declare function isSlideId(value: unknown): value is string;
|
|
382
|
+
export interface DeckJsonSchemaOptions {
|
|
383
|
+
$id?: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The JSON Schema 2020-12 document of a v2 deck, generated from the same
|
|
387
|
+
* schemas `parseDeck` validates with. Each catalog layout's props is a
|
|
388
|
+
* `$defs` entry named by its id (`#/$defs/title-hero`); cross-field rules are
|
|
389
|
+
* described in `description`.
|
|
390
|
+
*/
|
|
391
|
+
export declare function deckJsonSchema(options?: DeckJsonSchemaOptions): JsonSchema;
|
|
392
|
+
export {};
|