@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,302 @@
|
|
|
1
|
+
export declare const titleHeroProps: import("../../index.js").ObjectSchema<{
|
|
2
|
+
readonly title: import("../../index.js").StringSchema;
|
|
3
|
+
readonly subtitle: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
4
|
+
readonly meta: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
5
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
6
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
7
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
8
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const sectionDividerProps: import("../../index.js").ObjectSchema<{
|
|
11
|
+
readonly eyebrow: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
12
|
+
readonly title: import("../../index.js").StringSchema;
|
|
13
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
14
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
15
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
16
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const twoColumnSplitProps: import("../../index.js").ObjectSchema<{
|
|
19
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
20
|
+
readonly left: import("../../index.js").ObjectSchema<{
|
|
21
|
+
readonly heading: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
22
|
+
readonly body: import("../../index.js").StringSchema;
|
|
23
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
24
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
25
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
26
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
27
|
+
}>;
|
|
28
|
+
readonly right: import("../../index.js").ObjectSchema<{
|
|
29
|
+
readonly heading: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
30
|
+
readonly body: import("../../index.js").StringSchema;
|
|
31
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
32
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
33
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
34
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
35
|
+
}>;
|
|
36
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
37
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
38
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
39
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const threeColumnCardsProps: import("../../index.js").ObjectSchema<{
|
|
42
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
43
|
+
readonly cards: import("../../index.js").ArraySchema<import("../../index.js").ObjectSchema<{
|
|
44
|
+
/** A Texuli icon name; the stage draws no icon (and lint warns) for an unknown one. */
|
|
45
|
+
readonly icon: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
46
|
+
readonly heading: import("../../index.js").StringSchema;
|
|
47
|
+
readonly body: import("../../index.js").StringSchema;
|
|
48
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
49
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
50
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
51
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
52
|
+
}>>;
|
|
53
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
54
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
55
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
56
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
57
|
+
}>;
|
|
58
|
+
/** `image-left` and `image-right` share one shape. */
|
|
59
|
+
export declare const imageSideProps: import("../../index.js").ObjectSchema<{
|
|
60
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
61
|
+
readonly image: import("../../index.js").ObjectSchema<{
|
|
62
|
+
readonly src: import("../../index.js").StringSchema;
|
|
63
|
+
readonly alt: import("../../index.js").StringSchema;
|
|
64
|
+
readonly width: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
65
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
66
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
67
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
68
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
69
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
70
|
+
}>;
|
|
71
|
+
readonly heading: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
72
|
+
readonly body: import("../../index.js").StringSchema;
|
|
73
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
74
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
75
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
76
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const imageCenteredProps: import("../../index.js").ObjectSchema<{
|
|
79
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
80
|
+
readonly image: import("../../index.js").ObjectSchema<{
|
|
81
|
+
readonly src: import("../../index.js").StringSchema;
|
|
82
|
+
readonly alt: import("../../index.js").StringSchema;
|
|
83
|
+
readonly width: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
84
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
85
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
86
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
87
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
88
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
89
|
+
}>;
|
|
90
|
+
readonly caption: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
91
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
92
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
93
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
94
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const IMAGE_OVERLAYS: readonly ["none", "dark", "light"];
|
|
97
|
+
export declare const imageFullBleedProps: import("../../index.js").ObjectSchema<{
|
|
98
|
+
readonly image: import("../../index.js").ObjectSchema<{
|
|
99
|
+
readonly src: import("../../index.js").StringSchema;
|
|
100
|
+
readonly alt: import("../../index.js").StringSchema;
|
|
101
|
+
readonly width: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
102
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
103
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
104
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
105
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
106
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
107
|
+
}>;
|
|
108
|
+
readonly caption: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
109
|
+
readonly credit: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
110
|
+
readonly overlay: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"none" | "dark" | "light">, false>;
|
|
111
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
112
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
113
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
114
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
115
|
+
}>;
|
|
116
|
+
export declare const quoteProps: import("../../index.js").ObjectSchema<{
|
|
117
|
+
readonly quote: import("../../index.js").StringSchema;
|
|
118
|
+
readonly cite: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
119
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
120
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
121
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
122
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
123
|
+
}>;
|
|
124
|
+
export declare const codeWithCalloutProps: import("../../index.js").ObjectSchema<{
|
|
125
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
126
|
+
readonly code: import("../../index.js").ObjectSchema<{
|
|
127
|
+
readonly lang: import("../../index.js").StringSchema;
|
|
128
|
+
/** Never trimmed: leading indentation is part of the code. */
|
|
129
|
+
readonly source: import("../../index.js").StringSchema;
|
|
130
|
+
/** Line ranges such as `1` or `3-5`; the stage reveals each one as a step. */
|
|
131
|
+
readonly highlights: import("../../index.js").OptionalSchema<import("../../index.js").ArraySchema<import("../../index.js").StringSchema>, false>;
|
|
132
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
133
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
134
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
135
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly heading: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
138
|
+
readonly bullets: import("../../index.js").ArraySchema<import("../../index.js").StringSchema>;
|
|
139
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
140
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
141
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
142
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
143
|
+
}>;
|
|
144
|
+
export declare const bigStatProps: import("../../index.js").ObjectSchema<{
|
|
145
|
+
readonly number: import("../../index.js").StringSchema;
|
|
146
|
+
readonly label: import("../../index.js").StringSchema;
|
|
147
|
+
readonly context: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
148
|
+
readonly source: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
149
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
150
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
151
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
152
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
153
|
+
}>;
|
|
154
|
+
export declare const comparisonTableProps: import("../../index.js").RefineSchema<import("../../index.js").ObjectSchema<{
|
|
155
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
156
|
+
readonly columns: import("../../index.js").ArraySchema<import("../../index.js").StringSchema>;
|
|
157
|
+
readonly rows: import("../../index.js").ArraySchema<import("../../index.js").ObjectSchema<{
|
|
158
|
+
readonly label: import("../../index.js").StringSchema;
|
|
159
|
+
readonly values: import("../../index.js").ArraySchema<import("../../index.js").UnionSchema<readonly [import("../../index.js").StringSchema, import("../../index.js").BooleanSchema, import("../../index.js").NullSchema]>>;
|
|
160
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
161
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
162
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
163
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
164
|
+
}>>;
|
|
165
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
166
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
167
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
168
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
169
|
+
}>>;
|
|
170
|
+
export declare const processStepsProps: import("../../index.js").ObjectSchema<{
|
|
171
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
172
|
+
readonly steps: import("../../index.js").ArraySchema<import("../../index.js").ObjectSchema<{
|
|
173
|
+
readonly title: import("../../index.js").StringSchema;
|
|
174
|
+
readonly body: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
175
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
176
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
177
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
178
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
179
|
+
}>>;
|
|
180
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
181
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
182
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
183
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
184
|
+
}>;
|
|
185
|
+
export declare const timelineProps: import("../../index.js").ObjectSchema<{
|
|
186
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
187
|
+
readonly events: import("../../index.js").ArraySchema<import("../../index.js").ObjectSchema<{
|
|
188
|
+
readonly time: import("../../index.js").StringSchema;
|
|
189
|
+
readonly text: import("../../index.js").StringSchema;
|
|
190
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
191
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
192
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
193
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
194
|
+
}>>;
|
|
195
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
196
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
197
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
198
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
199
|
+
}>;
|
|
200
|
+
export declare const teamAvatarsProps: import("../../index.js").ObjectSchema<{
|
|
201
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
202
|
+
readonly people: import("../../index.js").ArraySchema<import("../../index.js").ObjectSchema<{
|
|
203
|
+
readonly name: import("../../index.js").StringSchema;
|
|
204
|
+
readonly role: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
205
|
+
/** An avatar id (`av-001`, resolved by the host) or a media source. */
|
|
206
|
+
readonly avatar: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
207
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
208
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
209
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
210
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
211
|
+
}>>;
|
|
212
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
213
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
214
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
215
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
216
|
+
}>;
|
|
217
|
+
export declare const closingCtaProps: import("../../index.js").ObjectSchema<{
|
|
218
|
+
readonly title: import("../../index.js").StringSchema;
|
|
219
|
+
readonly text: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
220
|
+
readonly cta: import("../../index.js").ObjectSchema<{
|
|
221
|
+
readonly label: import("../../index.js").StringSchema;
|
|
222
|
+
readonly href: import("../../index.js").StringSchema;
|
|
223
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
224
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
225
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
226
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
227
|
+
}>;
|
|
228
|
+
readonly footnote: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
229
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
230
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
231
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
232
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
233
|
+
}>;
|
|
234
|
+
export declare const videoCenteredProps: import("../../index.js").ObjectSchema<{
|
|
235
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
236
|
+
readonly video: import("../../index.js").ObjectSchema<{
|
|
237
|
+
readonly src: import("../../index.js").StringSchema;
|
|
238
|
+
readonly label: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
239
|
+
readonly width: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
240
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
241
|
+
readonly autoplay: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
242
|
+
readonly loop: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
243
|
+
readonly muted: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
244
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
245
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
246
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
247
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
248
|
+
}>;
|
|
249
|
+
readonly caption: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
250
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
251
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
252
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
253
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
254
|
+
}>;
|
|
255
|
+
/** `video-left` and `video-right` share one shape. */
|
|
256
|
+
export declare const videoSideProps: import("../../index.js").ObjectSchema<{
|
|
257
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
258
|
+
readonly video: import("../../index.js").ObjectSchema<{
|
|
259
|
+
readonly src: import("../../index.js").StringSchema;
|
|
260
|
+
readonly label: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
261
|
+
readonly width: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
262
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
263
|
+
readonly autoplay: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
264
|
+
readonly loop: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
265
|
+
readonly muted: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
266
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
267
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
268
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
269
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
270
|
+
}>;
|
|
271
|
+
readonly heading: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
272
|
+
readonly body: import("../../index.js").StringSchema;
|
|
273
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
274
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
275
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
276
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
277
|
+
}>;
|
|
278
|
+
/** Chart data bounds: room for a year of daily points across a few series. */
|
|
279
|
+
export declare const CHART_SPEC_LIMITS: Readonly<{
|
|
280
|
+
depth: 6;
|
|
281
|
+
maxKeys: 100;
|
|
282
|
+
maxItems: 400;
|
|
283
|
+
maxString: 2000;
|
|
284
|
+
}>;
|
|
285
|
+
/**
|
|
286
|
+
* The chart body: a bounded JSON object in the shape of a Texuli chart block
|
|
287
|
+
* without its `type` (`kind`, `title`, `description`, `series` | `cells` |
|
|
288
|
+
* `points`, `props`). The engine stays L0, so it checks only the bounds,
|
|
289
|
+
* `kind` syntax and the step fields here; the stage validates the rest with
|
|
290
|
+
* the chart block parser (24 kinds) after removing the step fields.
|
|
291
|
+
*/
|
|
292
|
+
export declare const chartSpec: import("../../index.js").RefineSchema<import("../../index.js").JsonValueSchema>;
|
|
293
|
+
export declare const chartProps: import("../../index.js").ObjectSchema<{
|
|
294
|
+
readonly title: import("../../index.js").OptionalSchema<import("../../index.js").StringSchema, false>;
|
|
295
|
+
readonly spec: import("../../index.js").RefineSchema<import("../../index.js").JsonValueSchema>;
|
|
296
|
+
readonly height: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"sm" | "md" | "lg">, false>;
|
|
297
|
+
readonly showTable: import("../../index.js").OptionalSchema<import("../../index.js").BooleanSchema, false>;
|
|
298
|
+
readonly step: import("../../index.js").OptionalSchema<import("../../index.js").NumberSchema, false>;
|
|
299
|
+
readonly fragment: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"in" | "fade-up" | "out" | "in-then-out" | "grow" | "shrink" | "highlight" | "strike">, false>;
|
|
300
|
+
readonly reveal: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"fade-up" | "grow" | "highlight" | "strike" | "fade">, false>;
|
|
301
|
+
readonly tone: import("../../index.js").OptionalSchema<import("../../index.js").EnumSchema<"accent" | "info" | "success" | "warning" | "danger">, false>;
|
|
302
|
+
}>;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The props schemas of the 20 catalog layouts (model-v2 §3.3), ported from
|
|
3
|
+
* Protoyard's `layouts/props.ts` onto the owned schema kit.
|
|
4
|
+
*
|
|
5
|
+
* Every object is strict. Step fields (`step`, `fragment`, `reveal`, `tone`)
|
|
6
|
+
* are declared only on the objects the layout reveals (its steppable paths),
|
|
7
|
+
* so a marker anywhere else is an `unknown-key` issue. Single-line fields are
|
|
8
|
+
* trimmed and refuse control and bidi-override characters; lengths count
|
|
9
|
+
* Unicode code points. Media and link fields check syntax only: the stage
|
|
10
|
+
* applies the URL policy at the host's tier when it paints.
|
|
11
|
+
*/
|
|
12
|
+
import { t, validate } from "../../schema/index.js";
|
|
13
|
+
import { LINK_HREF_PATTERN, line, MEDIA_SRC_PATTERN, stepFields } from "../shared.js";
|
|
14
|
+
/** The step fields spread onto a steppable props object. */
|
|
15
|
+
const steps = stepFields;
|
|
16
|
+
/** A required single-line field of 1 to `max` code points. */
|
|
17
|
+
const short = (max) => line(max, 1);
|
|
18
|
+
/** An optional single-line field; when present it is 1 to `max` code points. */
|
|
19
|
+
const optionalShort = (max) => t.optional(line(max, 1));
|
|
20
|
+
const dimension = t.optional(t.int({ min: 1, max: 4_096 }));
|
|
21
|
+
/** Media syntax capped at 512 code points (Protoyard's layout limit). */
|
|
22
|
+
const layoutMediaSrc = t.string({
|
|
23
|
+
min: 1,
|
|
24
|
+
max: 512,
|
|
25
|
+
pattern: MEDIA_SRC_PATTERN,
|
|
26
|
+
trim: true,
|
|
27
|
+
text: 'line',
|
|
28
|
+
description: 'An https: URL, a relative path, a base64 data: raster or video, or an avatar: id.',
|
|
29
|
+
});
|
|
30
|
+
/** Link syntax capped at 512 code points. */
|
|
31
|
+
const layoutHref = t.string({
|
|
32
|
+
min: 1,
|
|
33
|
+
max: 512,
|
|
34
|
+
pattern: LINK_HREF_PATTERN,
|
|
35
|
+
trim: true,
|
|
36
|
+
text: 'line',
|
|
37
|
+
description: 'An https: or mailto: URL, a #fragment or a relative path.',
|
|
38
|
+
});
|
|
39
|
+
/** An image placed by a layout; lint asks for a non-empty `alt` and both dimensions. */
|
|
40
|
+
const image = t.object({
|
|
41
|
+
...steps,
|
|
42
|
+
src: layoutMediaSrc,
|
|
43
|
+
alt: line(300),
|
|
44
|
+
width: dimension,
|
|
45
|
+
height: dimension,
|
|
46
|
+
});
|
|
47
|
+
/** A video placed by a layout. */
|
|
48
|
+
const video = t.object({
|
|
49
|
+
...steps,
|
|
50
|
+
src: layoutMediaSrc,
|
|
51
|
+
label: optionalShort(160),
|
|
52
|
+
width: dimension,
|
|
53
|
+
height: dimension,
|
|
54
|
+
autoplay: t.optional(t.boolean()),
|
|
55
|
+
loop: t.optional(t.boolean()),
|
|
56
|
+
muted: t.optional(t.boolean()),
|
|
57
|
+
});
|
|
58
|
+
/** Every catalog layout has an optional slide title of at most 120 code points. */
|
|
59
|
+
const title = optionalShort(120);
|
|
60
|
+
export const titleHeroProps = t.object({
|
|
61
|
+
...steps,
|
|
62
|
+
title: short(100),
|
|
63
|
+
subtitle: optionalShort(160),
|
|
64
|
+
meta: optionalShort(160),
|
|
65
|
+
});
|
|
66
|
+
export const sectionDividerProps = t.object({
|
|
67
|
+
...steps,
|
|
68
|
+
eyebrow: optionalShort(80),
|
|
69
|
+
title: short(120),
|
|
70
|
+
});
|
|
71
|
+
const column = t.object({ ...steps, heading: optionalShort(80), body: short(600) });
|
|
72
|
+
export const twoColumnSplitProps = t.object({
|
|
73
|
+
...steps,
|
|
74
|
+
title,
|
|
75
|
+
left: column,
|
|
76
|
+
right: column,
|
|
77
|
+
});
|
|
78
|
+
export const threeColumnCardsProps = t.object({
|
|
79
|
+
...steps,
|
|
80
|
+
title,
|
|
81
|
+
cards: t.array(t.object({
|
|
82
|
+
...steps,
|
|
83
|
+
/** A Texuli icon name; the stage draws no icon (and lint warns) for an unknown one. */
|
|
84
|
+
icon: optionalShort(40),
|
|
85
|
+
heading: short(80),
|
|
86
|
+
body: short(280),
|
|
87
|
+
}), { min: 3, max: 3 }),
|
|
88
|
+
});
|
|
89
|
+
/** `image-left` and `image-right` share one shape. */
|
|
90
|
+
export const imageSideProps = t.object({
|
|
91
|
+
...steps,
|
|
92
|
+
title,
|
|
93
|
+
image,
|
|
94
|
+
heading: optionalShort(80),
|
|
95
|
+
body: short(600),
|
|
96
|
+
});
|
|
97
|
+
export const imageCenteredProps = t.object({
|
|
98
|
+
...steps,
|
|
99
|
+
title,
|
|
100
|
+
image,
|
|
101
|
+
caption: optionalShort(200),
|
|
102
|
+
});
|
|
103
|
+
export const IMAGE_OVERLAYS = ['none', 'dark', 'light'];
|
|
104
|
+
export const imageFullBleedProps = t.object({
|
|
105
|
+
...steps,
|
|
106
|
+
image,
|
|
107
|
+
caption: optionalShort(200),
|
|
108
|
+
credit: optionalShort(160),
|
|
109
|
+
overlay: t.optional(t.enum(IMAGE_OVERLAYS)),
|
|
110
|
+
});
|
|
111
|
+
export const quoteProps = t.object({
|
|
112
|
+
...steps,
|
|
113
|
+
quote: short(280),
|
|
114
|
+
cite: optionalShort(120),
|
|
115
|
+
});
|
|
116
|
+
export const codeWithCalloutProps = t.object({
|
|
117
|
+
...steps,
|
|
118
|
+
title,
|
|
119
|
+
code: t.object({
|
|
120
|
+
...steps,
|
|
121
|
+
lang: short(24),
|
|
122
|
+
/** Never trimmed: leading indentation is part of the code. */
|
|
123
|
+
source: t.string({ min: 1, max: 8_000, text: 'multiline' }),
|
|
124
|
+
/** Line ranges such as `1` or `3-5`; the stage reveals each one as a step. */
|
|
125
|
+
highlights: t.optional(t.array(short(32), { max: 16 })),
|
|
126
|
+
}),
|
|
127
|
+
heading: optionalShort(80),
|
|
128
|
+
bullets: t.array(short(200), { min: 1, max: 6 }),
|
|
129
|
+
});
|
|
130
|
+
export const bigStatProps = t.object({
|
|
131
|
+
...steps,
|
|
132
|
+
number: short(32),
|
|
133
|
+
label: short(200),
|
|
134
|
+
context: optionalShort(200),
|
|
135
|
+
source: optionalShort(160),
|
|
136
|
+
});
|
|
137
|
+
const comparisonCell = t.union([short(80), t.boolean(), t.null()]);
|
|
138
|
+
export const comparisonTableProps = t.refine(t.object({
|
|
139
|
+
...steps,
|
|
140
|
+
title,
|
|
141
|
+
columns: t.array(short(40), { min: 2, max: 4 }),
|
|
142
|
+
rows: t.array(t.object({
|
|
143
|
+
...steps,
|
|
144
|
+
label: short(80),
|
|
145
|
+
values: t.array(comparisonCell, { min: 2, max: 4 }),
|
|
146
|
+
}), { min: 3, max: 5 }),
|
|
147
|
+
}), {
|
|
148
|
+
code: 'layout-props',
|
|
149
|
+
description: 'Every row has exactly one value per column.',
|
|
150
|
+
check(value, context) {
|
|
151
|
+
const width = value.columns.length;
|
|
152
|
+
value.rows.forEach((row, index) => {
|
|
153
|
+
if (row.values.length !== width) {
|
|
154
|
+
context.issue({
|
|
155
|
+
path: ['rows', index, 'values'],
|
|
156
|
+
message: `This row has ${row.values.length} values for ${width} columns.`,
|
|
157
|
+
fix: `Give every row exactly ${width} values (use null for an empty cell).`,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
export const processStepsProps = t.object({
|
|
164
|
+
...steps,
|
|
165
|
+
title,
|
|
166
|
+
steps: t.array(t.object({ ...steps, title: short(80), body: optionalShort(200) }), {
|
|
167
|
+
min: 3,
|
|
168
|
+
max: 5,
|
|
169
|
+
}),
|
|
170
|
+
});
|
|
171
|
+
export const timelineProps = t.object({
|
|
172
|
+
...steps,
|
|
173
|
+
title,
|
|
174
|
+
events: t.array(t.object({ ...steps, time: short(40), text: short(200) }), { min: 4, max: 8 }),
|
|
175
|
+
});
|
|
176
|
+
export const teamAvatarsProps = t.object({
|
|
177
|
+
...steps,
|
|
178
|
+
title,
|
|
179
|
+
people: t.array(t.object({
|
|
180
|
+
...steps,
|
|
181
|
+
name: short(80),
|
|
182
|
+
role: optionalShort(80),
|
|
183
|
+
/** An avatar id (`av-001`, resolved by the host) or a media source. */
|
|
184
|
+
avatar: t.optional(t.string({ min: 1, max: 64, pattern: MEDIA_SRC_PATTERN, trim: true, text: 'line' })),
|
|
185
|
+
}), { min: 1, max: 8 }),
|
|
186
|
+
});
|
|
187
|
+
export const closingCtaProps = t.object({
|
|
188
|
+
...steps,
|
|
189
|
+
title: short(120),
|
|
190
|
+
text: optionalShort(280),
|
|
191
|
+
cta: t.object({ ...steps, label: short(60), href: layoutHref }),
|
|
192
|
+
footnote: optionalShort(160),
|
|
193
|
+
});
|
|
194
|
+
export const videoCenteredProps = t.object({
|
|
195
|
+
...steps,
|
|
196
|
+
title,
|
|
197
|
+
video,
|
|
198
|
+
caption: optionalShort(200),
|
|
199
|
+
});
|
|
200
|
+
/** `video-left` and `video-right` share one shape. */
|
|
201
|
+
export const videoSideProps = t.object({
|
|
202
|
+
...steps,
|
|
203
|
+
title,
|
|
204
|
+
video,
|
|
205
|
+
heading: optionalShort(80),
|
|
206
|
+
body: short(600),
|
|
207
|
+
});
|
|
208
|
+
/** Chart data bounds: room for a year of daily points across a few series. */
|
|
209
|
+
export const CHART_SPEC_LIMITS = Object.freeze({
|
|
210
|
+
depth: 6,
|
|
211
|
+
maxKeys: 100,
|
|
212
|
+
maxItems: 400,
|
|
213
|
+
maxString: 2_000,
|
|
214
|
+
});
|
|
215
|
+
const STEP_KEYS = Object.keys(stepFields);
|
|
216
|
+
const stepMarker = t.object(stepFields);
|
|
217
|
+
const CHART_KIND_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
|
|
218
|
+
/**
|
|
219
|
+
* The chart body: a bounded JSON object in the shape of a Texuli chart block
|
|
220
|
+
* without its `type` (`kind`, `title`, `description`, `series` | `cells` |
|
|
221
|
+
* `points`, `props`). The engine stays L0, so it checks only the bounds,
|
|
222
|
+
* `kind` syntax and the step fields here; the stage validates the rest with
|
|
223
|
+
* the chart block parser (24 kinds) after removing the step fields.
|
|
224
|
+
*/
|
|
225
|
+
export const chartSpec = t.refine(t.json({
|
|
226
|
+
depth: CHART_SPEC_LIMITS.depth,
|
|
227
|
+
maxKeys: CHART_SPEC_LIMITS.maxKeys,
|
|
228
|
+
maxItems: CHART_SPEC_LIMITS.maxItems,
|
|
229
|
+
maxString: CHART_SPEC_LIMITS.maxString,
|
|
230
|
+
text: 'multiline',
|
|
231
|
+
}), {
|
|
232
|
+
code: 'layout-props',
|
|
233
|
+
description: 'A chart block without `type`: an object with a `kind`, validated by the stage chart block parser; may carry step fields.',
|
|
234
|
+
check(value, context) {
|
|
235
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
236
|
+
context.issue({
|
|
237
|
+
message: 'The chart spec must be an object.',
|
|
238
|
+
fix: 'Use a chart block body such as {"kind": "bar", "title": "…", "description": "…", "series": […]}.',
|
|
239
|
+
});
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (Object.hasOwn(value, 'type')) {
|
|
243
|
+
context.issue({
|
|
244
|
+
path: ['type'],
|
|
245
|
+
message: 'The chart layout sets the block type itself.',
|
|
246
|
+
fix: 'Remove `type` from the chart spec.',
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
const kind = value.kind;
|
|
250
|
+
if (typeof kind !== 'string' || !CHART_KIND_PATTERN.test(kind)) {
|
|
251
|
+
context.issue({
|
|
252
|
+
path: ['kind'],
|
|
253
|
+
message: 'The chart spec needs a `kind` such as "bar" or "line".',
|
|
254
|
+
fix: 'Set `kind` to one of the chart block kinds.',
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
const marker = {};
|
|
258
|
+
for (const key of STEP_KEYS)
|
|
259
|
+
if (Object.hasOwn(value, key))
|
|
260
|
+
marker[key] = value[key];
|
|
261
|
+
for (const issue of validate(stepMarker, marker).issues) {
|
|
262
|
+
context.issue({ code: issue.code, path: issue.path, message: issue.message });
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
export const chartProps = t.object({
|
|
267
|
+
...steps,
|
|
268
|
+
title,
|
|
269
|
+
spec: chartSpec,
|
|
270
|
+
height: t.optional(t.enum(['sm', 'md', 'lg'])),
|
|
271
|
+
showTable: t.optional(t.boolean()),
|
|
272
|
+
});
|