@nersh/render 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -3
- package/dist/index.cjs +41935 -22424
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +869 -7
- package/dist/index.d.ts +869 -7
- package/dist/index.mjs +41462 -21918
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,88 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
+
/** Harvested design language — steers kit Stage 1 as strong defaults, not locks. */
|
|
6
|
+
type PromptTemplateKitSeed = {
|
|
7
|
+
fonts: {
|
|
8
|
+
display: string;
|
|
9
|
+
body: string;
|
|
10
|
+
};
|
|
11
|
+
palette: string[];
|
|
12
|
+
radius?: string;
|
|
13
|
+
vibe?: string;
|
|
14
|
+
harvestedFrom?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type ContentSourceKind = 'doc' | 'sheet' | 'drive' | 'url';
|
|
18
|
+
type ContentSourceMedia = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
thumb: string;
|
|
22
|
+
/**
|
|
23
|
+
* Full-resolution URL, when it differs from `thumb`. Drive folder harvests
|
|
24
|
+
* are the only source that needs this: `thumbnailLink` is genuinely a
|
|
25
|
+
* thumbnail, so placing it into a hero slot looks bad. A harvested website
|
|
26
|
+
* carries a real image URL as `thumb` already, so it has no separate `full`.
|
|
27
|
+
*/
|
|
28
|
+
full?: string;
|
|
29
|
+
};
|
|
30
|
+
type ContentSource = {
|
|
31
|
+
id: string;
|
|
32
|
+
kind: ContentSourceKind;
|
|
33
|
+
url: string;
|
|
34
|
+
title: string;
|
|
35
|
+
summary: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
rows?: string[][];
|
|
38
|
+
media?: ContentSourceMedia[];
|
|
39
|
+
addedAt: number;
|
|
40
|
+
};
|
|
41
|
+
type ContentVoice = {
|
|
42
|
+
tone?: string;
|
|
43
|
+
audience?: string;
|
|
44
|
+
avoid?: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Pure text extraction from a page's markup: no fetch, no model, nothing but
|
|
49
|
+
* regexes over an HTML string. `harvestSite` uses this to build hints for the
|
|
50
|
+
* model; the start flow's reference attach uses it directly, client-side, to
|
|
51
|
+
* read a `.dc.html` design kit file for free before sign-in.
|
|
52
|
+
*/
|
|
53
|
+
type HarvestHints = {
|
|
54
|
+
fonts: string[];
|
|
55
|
+
palette: string[];
|
|
56
|
+
textSkeleton: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Whatever the person attaches at the "how should it feel" turn. Held on the
|
|
61
|
+
* onboarding record verbatim until sign-in; the style build is the only thing
|
|
62
|
+
* that reads it, and only after the mint.
|
|
63
|
+
*
|
|
64
|
+
* - `url`: a site to harvest. Deferred entirely: no fetch, no model call
|
|
65
|
+
* happens until the style build runs, since a harvest is a model call and
|
|
66
|
+
* that must never happen before the sign-in gate.
|
|
67
|
+
* - `design-kit`: a `.dc.html` file. `hints` is pulled client-side with the
|
|
68
|
+
* same free, model-less regex pass `harvestSite` itself uses for its own
|
|
69
|
+
* hints, so this costs nothing and needs no sign-in to compute.
|
|
70
|
+
* - `image`: a plain picture. All that can honestly be pulled from it without
|
|
71
|
+
* adding a dependency is a colour palette, sampled client-side via canvas.
|
|
72
|
+
*/
|
|
73
|
+
type StartReference = {
|
|
74
|
+
kind: 'url';
|
|
75
|
+
url: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: 'design-kit';
|
|
78
|
+
fileName: string;
|
|
79
|
+
hints: HarvestHints;
|
|
80
|
+
} | {
|
|
81
|
+
kind: 'image';
|
|
82
|
+
fileName: string;
|
|
83
|
+
palette: string[];
|
|
84
|
+
};
|
|
85
|
+
|
|
5
86
|
/**
|
|
6
87
|
* Component library configuration — provider-agnostic skin source of truth.
|
|
7
88
|
*
|
|
@@ -12,6 +93,146 @@ import { z } from 'zod';
|
|
|
12
93
|
* changing site/content/pattern contracts downstream.
|
|
13
94
|
*/
|
|
14
95
|
|
|
96
|
+
declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
provider: z.ZodLiteral<"shadcn">;
|
|
98
|
+
shadcn: z.ZodObject<{
|
|
99
|
+
base: z.ZodDefault<z.ZodEnum<{
|
|
100
|
+
radix: "radix";
|
|
101
|
+
"base-ui": "base-ui";
|
|
102
|
+
}>>;
|
|
103
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
104
|
+
vega: "vega";
|
|
105
|
+
nova: "nova";
|
|
106
|
+
maia: "maia";
|
|
107
|
+
lyra: "lyra";
|
|
108
|
+
mira: "mira";
|
|
109
|
+
luma: "luma";
|
|
110
|
+
sera: "sera";
|
|
111
|
+
rhea: "rhea";
|
|
112
|
+
}>>;
|
|
113
|
+
baseColor: z.ZodDefault<z.ZodEnum<{
|
|
114
|
+
neutral: "neutral";
|
|
115
|
+
stone: "stone";
|
|
116
|
+
zinc: "zinc";
|
|
117
|
+
slate: "slate";
|
|
118
|
+
gray: "gray";
|
|
119
|
+
mauve: "mauve";
|
|
120
|
+
olive: "olive";
|
|
121
|
+
mist: "mist";
|
|
122
|
+
taupe: "taupe";
|
|
123
|
+
}>>;
|
|
124
|
+
theme: z.ZodDefault<z.ZodEnum<{
|
|
125
|
+
neutral: "neutral";
|
|
126
|
+
stone: "stone";
|
|
127
|
+
zinc: "zinc";
|
|
128
|
+
slate: "slate";
|
|
129
|
+
gray: "gray";
|
|
130
|
+
mauve: "mauve";
|
|
131
|
+
olive: "olive";
|
|
132
|
+
mist: "mist";
|
|
133
|
+
taupe: "taupe";
|
|
134
|
+
red: "red";
|
|
135
|
+
rose: "rose";
|
|
136
|
+
orange: "orange";
|
|
137
|
+
amber: "amber";
|
|
138
|
+
yellow: "yellow";
|
|
139
|
+
lime: "lime";
|
|
140
|
+
green: "green";
|
|
141
|
+
emerald: "emerald";
|
|
142
|
+
teal: "teal";
|
|
143
|
+
cyan: "cyan";
|
|
144
|
+
sky: "sky";
|
|
145
|
+
blue: "blue";
|
|
146
|
+
indigo: "indigo";
|
|
147
|
+
violet: "violet";
|
|
148
|
+
purple: "purple";
|
|
149
|
+
fuchsia: "fuchsia";
|
|
150
|
+
pink: "pink";
|
|
151
|
+
}>>;
|
|
152
|
+
chartColor: z.ZodDefault<z.ZodEnum<{
|
|
153
|
+
neutral: "neutral";
|
|
154
|
+
stone: "stone";
|
|
155
|
+
zinc: "zinc";
|
|
156
|
+
gray: "gray";
|
|
157
|
+
mauve: "mauve";
|
|
158
|
+
olive: "olive";
|
|
159
|
+
mist: "mist";
|
|
160
|
+
taupe: "taupe";
|
|
161
|
+
red: "red";
|
|
162
|
+
rose: "rose";
|
|
163
|
+
orange: "orange";
|
|
164
|
+
amber: "amber";
|
|
165
|
+
yellow: "yellow";
|
|
166
|
+
lime: "lime";
|
|
167
|
+
green: "green";
|
|
168
|
+
emerald: "emerald";
|
|
169
|
+
teal: "teal";
|
|
170
|
+
cyan: "cyan";
|
|
171
|
+
sky: "sky";
|
|
172
|
+
blue: "blue";
|
|
173
|
+
indigo: "indigo";
|
|
174
|
+
violet: "violet";
|
|
175
|
+
purple: "purple";
|
|
176
|
+
fuchsia: "fuchsia";
|
|
177
|
+
pink: "pink";
|
|
178
|
+
}>>;
|
|
179
|
+
radius: z.ZodDefault<z.ZodEnum<{
|
|
180
|
+
default: "default";
|
|
181
|
+
none: "none";
|
|
182
|
+
sm: "sm";
|
|
183
|
+
md: "md";
|
|
184
|
+
lg: "lg";
|
|
185
|
+
xl: "xl";
|
|
186
|
+
}>>;
|
|
187
|
+
font: z.ZodDefault<z.ZodString>;
|
|
188
|
+
fontHeading: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"inherit">, z.ZodString]>>;
|
|
189
|
+
iconLibrary: z.ZodDefault<z.ZodEnum<{
|
|
190
|
+
lucide: "lucide";
|
|
191
|
+
tabler: "tabler";
|
|
192
|
+
hugeicons: "hugeicons";
|
|
193
|
+
phosphor: "phosphor";
|
|
194
|
+
remixicon: "remixicon";
|
|
195
|
+
}>>;
|
|
196
|
+
menuColor: z.ZodDefault<z.ZodEnum<{
|
|
197
|
+
default: "default";
|
|
198
|
+
inverted: "inverted";
|
|
199
|
+
"default-translucent": "default-translucent";
|
|
200
|
+
"inverted-translucent": "inverted-translucent";
|
|
201
|
+
}>>;
|
|
202
|
+
menuAccent: z.ZodDefault<z.ZodEnum<{
|
|
203
|
+
subtle: "subtle";
|
|
204
|
+
bold: "bold";
|
|
205
|
+
}>>;
|
|
206
|
+
layout: z.ZodPrefault<z.ZodObject<{
|
|
207
|
+
frame: z.ZodDefault<z.ZodEnum<{
|
|
208
|
+
framed: "framed";
|
|
209
|
+
fluid: "fluid";
|
|
210
|
+
}>>;
|
|
211
|
+
container: z.ZodDefault<z.ZodEnum<{
|
|
212
|
+
"5xl": "5xl";
|
|
213
|
+
"6xl": "6xl";
|
|
214
|
+
"7xl": "7xl";
|
|
215
|
+
}>>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
provider: z.ZodLiteral<"mui">;
|
|
220
|
+
mui: z.ZodObject<{
|
|
221
|
+
theme: z.ZodString;
|
|
222
|
+
palette: z.ZodEnum<{
|
|
223
|
+
light: "light";
|
|
224
|
+
dark: "dark";
|
|
225
|
+
}>;
|
|
226
|
+
density: z.ZodDefault<z.ZodEnum<{
|
|
227
|
+
comfortable: "comfortable";
|
|
228
|
+
standard: "standard";
|
|
229
|
+
compact: "compact";
|
|
230
|
+
}>>;
|
|
231
|
+
primaryColor: z.ZodOptional<z.ZodString>;
|
|
232
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>], "provider">;
|
|
235
|
+
type ComponentLibraryConfig = z.infer<typeof ComponentLibraryConfigSchema>;
|
|
15
236
|
declare const CompiledSkinSchema: z.ZodObject<{
|
|
16
237
|
provider: z.ZodEnum<{
|
|
17
238
|
shadcn: "shadcn";
|
|
@@ -132,6 +353,17 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
132
353
|
subtle: "subtle";
|
|
133
354
|
bold: "bold";
|
|
134
355
|
}>>;
|
|
356
|
+
layout: z.ZodPrefault<z.ZodObject<{
|
|
357
|
+
frame: z.ZodDefault<z.ZodEnum<{
|
|
358
|
+
framed: "framed";
|
|
359
|
+
fluid: "fluid";
|
|
360
|
+
}>>;
|
|
361
|
+
container: z.ZodDefault<z.ZodEnum<{
|
|
362
|
+
"5xl": "5xl";
|
|
363
|
+
"6xl": "6xl";
|
|
364
|
+
"7xl": "7xl";
|
|
365
|
+
}>>;
|
|
366
|
+
}, z.core.$strip>>;
|
|
135
367
|
}, z.core.$strip>;
|
|
136
368
|
}, z.core.$strip>, z.ZodObject<{
|
|
137
369
|
provider: z.ZodLiteral<"mui">;
|
|
@@ -153,6 +385,234 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
153
385
|
}, z.core.$strip>;
|
|
154
386
|
type CompiledSkin = z.infer<typeof CompiledSkinSchema>;
|
|
155
387
|
|
|
388
|
+
/**
|
|
389
|
+
* What the Styles stage asks the model for: five decisions, not a whole design
|
|
390
|
+
* system. Everything else the skin needs is derived deterministically from
|
|
391
|
+
* these, so a valid brief always compiles to a valid Foundation record.
|
|
392
|
+
*/
|
|
393
|
+
declare const StyleBriefSchema: z.ZodObject<{
|
|
394
|
+
primaryColor: z.ZodObject<{
|
|
395
|
+
name: z.ZodString;
|
|
396
|
+
hex: z.ZodString;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
secondaryColor: z.ZodOptional<z.ZodObject<{
|
|
399
|
+
name: z.ZodString;
|
|
400
|
+
hex: z.ZodString;
|
|
401
|
+
}, z.core.$strip>>;
|
|
402
|
+
pairingId: z.ZodEnum<{
|
|
403
|
+
"editorial-fraunces": "editorial-fraunces";
|
|
404
|
+
"classic-playfair": "classic-playfair";
|
|
405
|
+
"serif-sans-cormorant": "serif-sans-cormorant";
|
|
406
|
+
"literary-libre": "literary-libre";
|
|
407
|
+
"geometric-space": "geometric-space";
|
|
408
|
+
"swiss-archivo": "swiss-archivo";
|
|
409
|
+
"modern-sora": "modern-sora";
|
|
410
|
+
"display-unbounded": "display-unbounded";
|
|
411
|
+
"humanist-work": "humanist-work";
|
|
412
|
+
"rounded-nunito": "rounded-nunito";
|
|
413
|
+
"warm-karla": "warm-karla";
|
|
414
|
+
"grounded-outfit": "grounded-outfit";
|
|
415
|
+
"mono-jetbrains": "mono-jetbrains";
|
|
416
|
+
"mono-space": "mono-space";
|
|
417
|
+
"condensed-oswald": "condensed-oswald";
|
|
418
|
+
"slab-zilla": "slab-zilla";
|
|
419
|
+
}>;
|
|
420
|
+
radius: z.ZodEnum<{
|
|
421
|
+
default: "default";
|
|
422
|
+
none: "none";
|
|
423
|
+
sm: "sm";
|
|
424
|
+
md: "md";
|
|
425
|
+
lg: "lg";
|
|
426
|
+
xl: "xl";
|
|
427
|
+
}>;
|
|
428
|
+
density: z.ZodEnum<{
|
|
429
|
+
default: "default";
|
|
430
|
+
comfortable: "comfortable";
|
|
431
|
+
compact: "compact";
|
|
432
|
+
}>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
type StyleBrief = z.infer<typeof StyleBriefSchema>;
|
|
435
|
+
|
|
436
|
+
declare const SITE_CATEGORY_IDS: readonly ["local-service", "portfolio", "link-in-bio", "professional", "ecommerce", "hospitality", "creator", "general"];
|
|
437
|
+
type SiteCategoryId = (typeof SITE_CATEGORY_IDS)[number];
|
|
438
|
+
type SiteVoiceId = 'friendly' | 'professional' | 'bold' | 'minimal' | 'luxury';
|
|
439
|
+
type SiteGoalId = 'book' | 'call' | 'shop' | 'portfolio' | 'donate';
|
|
440
|
+
type DesignSystemRef = {
|
|
441
|
+
kind: 'account-default';
|
|
442
|
+
} | {
|
|
443
|
+
kind: 'skin';
|
|
444
|
+
skinId: string;
|
|
445
|
+
} | {
|
|
446
|
+
kind: 'design-system';
|
|
447
|
+
id: string;
|
|
448
|
+
};
|
|
449
|
+
/** Verbatim human-authored copy pulled from the remixed site — transcribed, never marketing-ified. */
|
|
450
|
+
type RemixCopyDigest = {
|
|
451
|
+
headline?: string;
|
|
452
|
+
sections: Array<{
|
|
453
|
+
title?: string;
|
|
454
|
+
body: string;
|
|
455
|
+
}>;
|
|
456
|
+
contact?: string;
|
|
457
|
+
};
|
|
458
|
+
type SiteBriefRemix = {
|
|
459
|
+
url: string;
|
|
460
|
+
seed: PromptTemplateKitSeed;
|
|
461
|
+
/** Only present when remixing the user's own site — community remixes are seed-only. */
|
|
462
|
+
copy?: RemixCopyDigest;
|
|
463
|
+
};
|
|
464
|
+
type SiteBrief = {
|
|
465
|
+
name: string;
|
|
466
|
+
category: SiteCategoryId;
|
|
467
|
+
audience: string;
|
|
468
|
+
voice: SiteVoiceId;
|
|
469
|
+
designSystemRef: DesignSystemRef;
|
|
470
|
+
location?: string;
|
|
471
|
+
primaryGoal?: SiteGoalId;
|
|
472
|
+
referenceUrls?: string[];
|
|
473
|
+
freeformNotes?: string;
|
|
474
|
+
/** Prompt-template catalog id when the site started from a template; its kitSeed steers Stage 1. */
|
|
475
|
+
templateId?: string;
|
|
476
|
+
/** Harvested design language + verbatim copy from the user's current site; wins over templateId. */
|
|
477
|
+
remix?: SiteBriefRemix;
|
|
478
|
+
confirmedAt?: number;
|
|
479
|
+
};
|
|
480
|
+
type DesignSpecSection = {
|
|
481
|
+
sectionId: string;
|
|
482
|
+
instanceId: string;
|
|
483
|
+
purpose: string;
|
|
484
|
+
copyHints: Record<string, string>;
|
|
485
|
+
layout?: string;
|
|
486
|
+
};
|
|
487
|
+
type DesignSpec = {
|
|
488
|
+
specId: string;
|
|
489
|
+
sections: DesignSpecSection[];
|
|
490
|
+
visualLanguage: {
|
|
491
|
+
mood: string;
|
|
492
|
+
skinId: string;
|
|
493
|
+
density: 'airy' | 'balanced' | 'dense';
|
|
494
|
+
};
|
|
495
|
+
copyStrategy: {
|
|
496
|
+
voice: SiteVoiceId;
|
|
497
|
+
headlineAngle: string;
|
|
498
|
+
ctaPrimary: string;
|
|
499
|
+
};
|
|
500
|
+
archetypeManifestId?: string;
|
|
501
|
+
referenceNotes?: string[];
|
|
502
|
+
createdAt: number;
|
|
503
|
+
};
|
|
504
|
+
type CompleteSection = {
|
|
505
|
+
sectionId: string;
|
|
506
|
+
instanceId: string;
|
|
507
|
+
copy: Record<string, string>;
|
|
508
|
+
layout?: string;
|
|
509
|
+
};
|
|
510
|
+
type Complete = {
|
|
511
|
+
completeId: string;
|
|
512
|
+
briefRef: string;
|
|
513
|
+
designSpecRef: string;
|
|
514
|
+
/** Taxonomy-correlated copy per DesignSpec section — display/count only, never persisted as-is. */
|
|
515
|
+
sections: CompleteSection[];
|
|
516
|
+
/**
|
|
517
|
+
* The real, pattern-aware tree to persist (see `assembleComplete`'s
|
|
518
|
+
* `expandedStructureFor`) — a literal section's own copy lands here under its
|
|
519
|
+
* unchanged sectionId/instanceId; a taxonomy section's copy is translated first.
|
|
520
|
+
*/
|
|
521
|
+
structure: SectionInstance[];
|
|
522
|
+
/** `"<instanceId>.<slot>"` -> value, ready to group into `update_copy` patches. */
|
|
523
|
+
copyOverrides: Record<string, string>;
|
|
524
|
+
skinId: string;
|
|
525
|
+
createdAt: number;
|
|
526
|
+
};
|
|
527
|
+
type SpecAnnotation = {
|
|
528
|
+
instanceId: string;
|
|
529
|
+
note: string;
|
|
530
|
+
createdAt: number;
|
|
531
|
+
};
|
|
532
|
+
type OnboardingChatMessage = {
|
|
533
|
+
id: string;
|
|
534
|
+
role: 'user' | 'assistant';
|
|
535
|
+
content: string;
|
|
536
|
+
createdAt: number;
|
|
537
|
+
};
|
|
538
|
+
declare const ONBOARDING_PHASES: readonly ["slug", "intake", "brief_confirm", "kit_building", "styles_review", "layout_pick", "content_sources", "landing_building", "spec", "scaffold_review", "ready"];
|
|
539
|
+
type OnboardingPhase = (typeof ONBOARDING_PHASES)[number];
|
|
540
|
+
type SiteOnboarding = {
|
|
541
|
+
phase: OnboardingPhase;
|
|
542
|
+
brief?: SiteBrief;
|
|
543
|
+
/**
|
|
544
|
+
* Brief keys the user actually answered. `brief` is coerced on every write so
|
|
545
|
+
* the RTDB round trip validates, which backfills every required slot from
|
|
546
|
+
* defaults — so the brief alone cannot say what is known and what is filler.
|
|
547
|
+
*/
|
|
548
|
+
briefSlots?: string[];
|
|
549
|
+
/** The five style decisions the Styles stage drafted; the Foundation skin is derived from it. */
|
|
550
|
+
styleBrief?: StyleBrief;
|
|
551
|
+
designSpec?: DesignSpec;
|
|
552
|
+
complete?: Complete;
|
|
553
|
+
annotations?: SpecAnnotation[];
|
|
554
|
+
chatLog?: OnboardingChatMessage[];
|
|
555
|
+
startAnswers?: {
|
|
556
|
+
purpose: string;
|
|
557
|
+
name: string;
|
|
558
|
+
feel: string;
|
|
559
|
+
};
|
|
560
|
+
/** Attached at the "how should it feel" turn; read once by kit generation. */
|
|
561
|
+
startReference?: StartReference;
|
|
562
|
+
pagePatternId?: string;
|
|
563
|
+
sources?: ContentSource[];
|
|
564
|
+
voice?: ContentVoice;
|
|
565
|
+
slugProvisional?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* When the kit draft was first fired for this site. Kit generation spends,
|
|
568
|
+
* and the site is minted at `kit_building`, so without a record on the
|
|
569
|
+
* server a reload before the first kit lands would fire the generate call a
|
|
570
|
+
* second time. A per-mount ref cannot survive a remount; this can.
|
|
571
|
+
* Cleared by the Retry button, which is the user asking to spend again.
|
|
572
|
+
*/
|
|
573
|
+
kitDraftStartedAt?: number;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
type SiteStyleSource = 'live-ds' | 'skin-snapshot' | 'legacy';
|
|
577
|
+
type SiteStyleSnapshot = {
|
|
578
|
+
libraryConfig: ComponentLibraryConfig;
|
|
579
|
+
dsOverrides: Record<string, string>;
|
|
580
|
+
source: SiteStyleSource;
|
|
581
|
+
recordId: string | null;
|
|
582
|
+
recordName: string | null;
|
|
583
|
+
frozenAt: number;
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* The per-node legacy token vocabulary.
|
|
588
|
+
*
|
|
589
|
+
* A closed set of CSS custom properties a node can declare in `styles.desktop`
|
|
590
|
+
* (node styles keep them as tokens the components read as flags; the retired
|
|
591
|
+
* `overrides` bag held the same keys). Anything outside the vocabulary is
|
|
592
|
+
* dropped on write and on read, so a stale or hand-written value can never
|
|
593
|
+
* paint a value the editor has no control for.
|
|
594
|
+
*/
|
|
595
|
+
declare const OVERRIDE_KEYS: readonly ["--section-bg", "--section-padding", "--section-divider", "--font-heading", "--font-body", "--radius", "--card-bg", "--media-panel-min-height", "--band-gradient-from", "--band-gradient-via", "--band-gradient-to", "--primary", "--text-color", "--text-align", "--card-border-width"];
|
|
596
|
+
type OverrideKey = (typeof OVERRIDE_KEYS)[number];
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* The node style vocabulary: every CSS property a node may declare, what each accepts, the
|
|
600
|
+
* design-system presets it offers, which element it paints and which node kinds show it.
|
|
601
|
+
* One table drives validation, the emitter, the panel rows, the tool schema and the words
|
|
602
|
+
* the tool refuses with. Plain TS with one import, so the hosted graph gains nothing else.
|
|
603
|
+
*/
|
|
604
|
+
|
|
605
|
+
declare const STYLE_BREAKPOINTS: readonly ["desktop", "tablet", "phone"];
|
|
606
|
+
type StyleBreakpoint = (typeof STYLE_BREAKPOINTS)[number];
|
|
607
|
+
declare const STYLE_PROPERTY_NAMES: readonly ["width", "height", "min-width", "min-height", "max-width", "max-height", "aspect-ratio", "position", "top", "right", "bottom", "left", "z-index", "margin-top", "margin-right", "margin-bottom", "margin-left", "padding-top", "padding-right", "padding-bottom", "padding-left", "gap", "background-color", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius", "box-shadow", "opacity", "overflow", "font-size", "font-weight", "line-height", "letter-spacing", "color", "text-align", "filter", "scale", "rotate", "translate"];
|
|
608
|
+
type StyleProperty = (typeof STYLE_PROPERTY_NAMES)[number];
|
|
609
|
+
/** A stored key: a CSS longhand from the table, or a legacy override custom property. */
|
|
610
|
+
type StyleKey = StyleProperty | OverrideKey;
|
|
611
|
+
/** Property name to value, for one breakpoint. */
|
|
612
|
+
type StyleDecls = Partial<Record<StyleKey, string>>;
|
|
613
|
+
/** Breakpoint to declarations. */
|
|
614
|
+
type NodeStyles = Partial<Record<StyleBreakpoint, StyleDecls>>;
|
|
615
|
+
|
|
156
616
|
/**
|
|
157
617
|
* Site shapes — both the legacy template-keyed shape and the new
|
|
158
618
|
* composition-keyed shape. getSite returns a discriminated union;
|
|
@@ -161,6 +621,18 @@ type CompiledSkin = z.infer<typeof CompiledSkinSchema>;
|
|
|
161
621
|
* See /docs/superpowers/specs and plan file for architecture rationale.
|
|
162
622
|
*/
|
|
163
623
|
|
|
624
|
+
/** Section-enter animation preset ids. */
|
|
625
|
+
declare const SECTION_ANIMATION_PRESETS: readonly ["fade-up", "fade-in", "slide-in-left", "slide-in-right", "scale-in", "blur-in"];
|
|
626
|
+
type SectionAnimationPreset = (typeof SECTION_ANIMATION_PRESETS)[number];
|
|
627
|
+
type SectionAnimation = {
|
|
628
|
+
preset: SectionAnimationPreset;
|
|
629
|
+
/** Delay in ms before the animation starts after entering viewport. */
|
|
630
|
+
delay?: number;
|
|
631
|
+
/** Duration override in ms (default 600). */
|
|
632
|
+
duration?: number;
|
|
633
|
+
/** Stagger children by this many ms each (for grids/lists). */
|
|
634
|
+
stagger?: number;
|
|
635
|
+
};
|
|
164
636
|
/**
|
|
165
637
|
* One section rendered inside a composition.
|
|
166
638
|
* `id` references the sections registry; `instanceId` is unique per
|
|
@@ -172,11 +644,37 @@ type SectionInstance = {
|
|
|
172
644
|
id: string;
|
|
173
645
|
instanceId: string;
|
|
174
646
|
layout?: string;
|
|
647
|
+
/** Author-given name shown in the Navigator instead of the section display name. */
|
|
648
|
+
label?: string;
|
|
649
|
+
/** Locked nodes refuse every structural edit until they are unlocked. */
|
|
650
|
+
locked?: boolean;
|
|
651
|
+
/** Container child spacing step. */
|
|
652
|
+
gap?: 'flush' | 'tight' | 'default' | 'wide';
|
|
653
|
+
/** Container cross-axis alignment. */
|
|
654
|
+
align?: 'start' | 'center' | 'stretch' | 'end';
|
|
655
|
+
/** Container main-axis distribution. */
|
|
656
|
+
justify?: 'start' | 'end' | 'between';
|
|
175
657
|
fullBleed?: boolean;
|
|
176
658
|
/** Marketing hero: fill layout below navbar (default on when omitted). */
|
|
177
659
|
fullHeight?: boolean;
|
|
178
660
|
hidden?: boolean;
|
|
661
|
+
/** Columns this node occupies on the parent container's 12-column grid. */
|
|
662
|
+
span?: number;
|
|
663
|
+
/** Per-breakpoint span overrides, keyed to the @container/site breakpoints. */
|
|
664
|
+
spanAt?: {
|
|
665
|
+
sm?: number;
|
|
666
|
+
md?: number;
|
|
667
|
+
lg?: number;
|
|
668
|
+
};
|
|
179
669
|
children?: SectionInstance[];
|
|
670
|
+
/** Section-enter animation triggered on viewport intersection. */
|
|
671
|
+
animation?: SectionAnimation;
|
|
672
|
+
/** Fingerprint of the pattern this node was expanded from: `<pattern-id>@<version>`. Root wrapper only. */
|
|
673
|
+
component?: string;
|
|
674
|
+
/** Reserved: raw CSS escape hatch for the power path. Nothing reads or writes it yet. */
|
|
675
|
+
advanced?: Record<string, string>;
|
|
676
|
+
/** Per-breakpoint CSS the node declares; read through `nodeStyleDecls`, emitted by `emitNodeStylesCss`. */
|
|
677
|
+
styles?: NodeStyles;
|
|
180
678
|
};
|
|
181
679
|
declare const CompositionSiteSchema: z.ZodObject<{
|
|
182
680
|
slug: z.ZodString;
|
|
@@ -184,6 +682,70 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
184
682
|
id: z.ZodString;
|
|
185
683
|
sections: z.ZodDefault<z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>>;
|
|
186
684
|
}, z.core.$strip>;
|
|
685
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
686
|
+
id: z.ZodString;
|
|
687
|
+
slug: z.ZodString;
|
|
688
|
+
title: z.ZodString;
|
|
689
|
+
sections: z.ZodDefault<z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>>;
|
|
690
|
+
seo: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
691
|
+
title: z.ZodOptional<z.ZodString>;
|
|
692
|
+
description: z.ZodOptional<z.ZodString>;
|
|
693
|
+
ogType: z.ZodOptional<z.ZodEnum<{
|
|
694
|
+
website: "website";
|
|
695
|
+
profile: "profile";
|
|
696
|
+
article: "article";
|
|
697
|
+
}>>;
|
|
698
|
+
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
699
|
+
summary: "summary";
|
|
700
|
+
summary_large_image: "summary_large_image";
|
|
701
|
+
}>>;
|
|
702
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
703
|
+
schemaOrgType: z.ZodOptional<z.ZodEnum<{
|
|
704
|
+
WebSite: "WebSite";
|
|
705
|
+
Person: "Person";
|
|
706
|
+
Organization: "Organization";
|
|
707
|
+
CreativeWork: "CreativeWork";
|
|
708
|
+
Product: "Product";
|
|
709
|
+
LocalBusiness: "LocalBusiness";
|
|
710
|
+
}>>;
|
|
711
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
712
|
+
twitterHandle: z.ZodOptional<z.ZodString>;
|
|
713
|
+
ogImageUrl: z.ZodOptional<z.ZodString>;
|
|
714
|
+
ogImageSource: z.ZodOptional<z.ZodEnum<{
|
|
715
|
+
snap: "snap";
|
|
716
|
+
upload: "upload";
|
|
717
|
+
}>>;
|
|
718
|
+
ogSnappedAt: z.ZodOptional<z.ZodNumber>;
|
|
719
|
+
robotsIndex: z.ZodOptional<z.ZodBoolean>;
|
|
720
|
+
faviconUrl: z.ZodOptional<z.ZodString>;
|
|
721
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
722
|
+
type: z.ZodOptional<z.ZodString>;
|
|
723
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
724
|
+
email: z.ZodOptional<z.ZodString>;
|
|
725
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
726
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
727
|
+
addressLocality: z.ZodOptional<z.ZodString>;
|
|
728
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
729
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
730
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
731
|
+
}, z.core.$strip>>;
|
|
732
|
+
areaServed: z.ZodOptional<z.ZodString>;
|
|
733
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
734
|
+
}, z.core.$strip>>;
|
|
735
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
736
|
+
region: z.ZodOptional<z.ZodString>;
|
|
737
|
+
placename: z.ZodOptional<z.ZodString>;
|
|
738
|
+
lat: z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
lng: z.ZodOptional<z.ZodNumber>;
|
|
740
|
+
}, z.core.$strip>>;
|
|
741
|
+
}, z.core.$strip>>>;
|
|
742
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
743
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
744
|
+
nav: z.ZodOptional<z.ZodEnum<{
|
|
745
|
+
pin: "pin";
|
|
746
|
+
hide: "hide";
|
|
747
|
+
}>>;
|
|
748
|
+
}, z.core.$strip>>>;
|
|
187
749
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
188
750
|
theme: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
189
751
|
base: z.ZodEnum<{
|
|
@@ -195,17 +757,23 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
195
757
|
sans: "sans";
|
|
196
758
|
serif: "serif";
|
|
197
759
|
mono: "mono";
|
|
760
|
+
display: "display";
|
|
761
|
+
handwriting: "handwriting";
|
|
198
762
|
}>;
|
|
199
763
|
}, z.core.$strip>]>>;
|
|
200
764
|
designSystemId: z.ZodOptional<z.ZodString>;
|
|
201
765
|
skinId: z.ZodOptional<z.ZodString>;
|
|
766
|
+
surfaceKind: z.ZodOptional<z.ZodEnum<{
|
|
767
|
+
marketing: "marketing";
|
|
768
|
+
store: "store";
|
|
769
|
+
}>>;
|
|
202
770
|
seo: z.ZodOptional<z.ZodObject<{
|
|
203
771
|
title: z.ZodOptional<z.ZodString>;
|
|
204
772
|
description: z.ZodOptional<z.ZodString>;
|
|
205
773
|
ogType: z.ZodOptional<z.ZodEnum<{
|
|
206
|
-
article: "article";
|
|
207
774
|
website: "website";
|
|
208
775
|
profile: "profile";
|
|
776
|
+
article: "article";
|
|
209
777
|
}>>;
|
|
210
778
|
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
211
779
|
summary: "summary";
|
|
@@ -229,6 +797,7 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
229
797
|
}>>;
|
|
230
798
|
ogSnappedAt: z.ZodOptional<z.ZodNumber>;
|
|
231
799
|
robotsIndex: z.ZodOptional<z.ZodBoolean>;
|
|
800
|
+
faviconUrl: z.ZodOptional<z.ZodString>;
|
|
232
801
|
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
233
802
|
type: z.ZodOptional<z.ZodString>;
|
|
234
803
|
telephone: z.ZodOptional<z.ZodString>;
|
|
@@ -251,12 +820,15 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
251
820
|
}, z.core.$strip>>;
|
|
252
821
|
}, z.core.$strip>>;
|
|
253
822
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
254
|
-
|
|
823
|
+
chat: "chat";
|
|
824
|
+
builder: "builder";
|
|
255
825
|
"wizard-linkinbio": "wizard-linkinbio";
|
|
256
826
|
"wizard-marketing": "wizard-marketing";
|
|
257
827
|
"wizard-portfolio": "wizard-portfolio";
|
|
258
828
|
"wizard-blog": "wizard-blog";
|
|
259
|
-
|
|
829
|
+
"wizard-professional": "wizard-professional";
|
|
830
|
+
import: "import";
|
|
831
|
+
template: "template";
|
|
260
832
|
}>>;
|
|
261
833
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
262
834
|
builder: "builder";
|
|
@@ -278,6 +850,7 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
278
850
|
profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
279
851
|
platform: z.ZodEnum<{
|
|
280
852
|
link: "link";
|
|
853
|
+
site: "site";
|
|
281
854
|
twitter: "twitter";
|
|
282
855
|
instagram: "instagram";
|
|
283
856
|
linkedin: "linkedin";
|
|
@@ -289,7 +862,10 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
289
862
|
threads: "threads";
|
|
290
863
|
substack: "substack";
|
|
291
864
|
mastodon: "mastodon";
|
|
292
|
-
|
|
865
|
+
twitch: "twitch";
|
|
866
|
+
soundcloud: "soundcloud";
|
|
867
|
+
spotify: "spotify";
|
|
868
|
+
bandcamp: "bandcamp";
|
|
293
869
|
}>;
|
|
294
870
|
handle: z.ZodString;
|
|
295
871
|
url: z.ZodString;
|
|
@@ -317,11 +893,268 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
317
893
|
}>>;
|
|
318
894
|
launchedAt: z.ZodOptional<z.ZodNumber>;
|
|
319
895
|
launchVersion: z.ZodOptional<z.ZodNumber>;
|
|
896
|
+
servedReleaseId: z.ZodOptional<z.ZodString>;
|
|
320
897
|
stagingPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
321
898
|
productionPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
322
899
|
googleAnalyticsId: z.ZodOptional<z.ZodString>;
|
|
900
|
+
clientVisibility: z.ZodOptional<z.ZodObject<{
|
|
901
|
+
stagingMode: z.ZodEnum<{
|
|
902
|
+
public: "public";
|
|
903
|
+
password: "password";
|
|
904
|
+
}>;
|
|
905
|
+
productionMode: z.ZodEnum<{
|
|
906
|
+
coming_soon: "coming_soon";
|
|
907
|
+
live: "live";
|
|
908
|
+
}>;
|
|
909
|
+
hasStagingPassword: z.ZodBoolean;
|
|
910
|
+
ageGateMinimum: z.ZodOptional<z.ZodNumber>;
|
|
911
|
+
}, z.core.$strip>>;
|
|
912
|
+
commerce: z.ZodOptional<z.ZodObject<{
|
|
913
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
914
|
+
checkoutUrl: z.ZodOptional<z.ZodString>;
|
|
915
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
916
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
917
|
+
printful: "printful";
|
|
918
|
+
}>>;
|
|
919
|
+
cartPath: z.ZodOptional<z.ZodString>;
|
|
920
|
+
}, z.core.$strip>>;
|
|
921
|
+
onboarding: z.ZodOptional<z.ZodObject<{
|
|
922
|
+
phase: z.ZodEnum<{
|
|
923
|
+
slug: "slug";
|
|
924
|
+
intake: "intake";
|
|
925
|
+
brief_confirm: "brief_confirm";
|
|
926
|
+
kit_building: "kit_building";
|
|
927
|
+
styles_review: "styles_review";
|
|
928
|
+
layout_pick: "layout_pick";
|
|
929
|
+
content_sources: "content_sources";
|
|
930
|
+
landing_building: "landing_building";
|
|
931
|
+
spec: "spec";
|
|
932
|
+
scaffold_review: "scaffold_review";
|
|
933
|
+
ready: "ready";
|
|
934
|
+
}>;
|
|
935
|
+
brief: z.ZodOptional<z.ZodObject<{
|
|
936
|
+
name: z.ZodString;
|
|
937
|
+
category: z.ZodEnum<{
|
|
938
|
+
"local-service": "local-service";
|
|
939
|
+
portfolio: "portfolio";
|
|
940
|
+
"link-in-bio": "link-in-bio";
|
|
941
|
+
creator: "creator";
|
|
942
|
+
hospitality: "hospitality";
|
|
943
|
+
professional: "professional";
|
|
944
|
+
ecommerce: "ecommerce";
|
|
945
|
+
general: "general";
|
|
946
|
+
}>;
|
|
947
|
+
audience: z.ZodString;
|
|
948
|
+
voice: z.ZodEnum<{
|
|
949
|
+
bold: "bold";
|
|
950
|
+
professional: "professional";
|
|
951
|
+
friendly: "friendly";
|
|
952
|
+
minimal: "minimal";
|
|
953
|
+
luxury: "luxury";
|
|
954
|
+
}>;
|
|
955
|
+
designSystemRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
956
|
+
kind: z.ZodLiteral<"account-default">;
|
|
957
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
958
|
+
kind: z.ZodLiteral<"skin">;
|
|
959
|
+
skinId: z.ZodString;
|
|
960
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
961
|
+
kind: z.ZodLiteral<"design-system">;
|
|
962
|
+
id: z.ZodString;
|
|
963
|
+
}, z.core.$strip>], "kind">;
|
|
964
|
+
location: z.ZodOptional<z.ZodString>;
|
|
965
|
+
primaryGoal: z.ZodOptional<z.ZodEnum<{
|
|
966
|
+
portfolio: "portfolio";
|
|
967
|
+
book: "book";
|
|
968
|
+
call: "call";
|
|
969
|
+
shop: "shop";
|
|
970
|
+
donate: "donate";
|
|
971
|
+
}>>;
|
|
972
|
+
referenceUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
973
|
+
freeformNotes: z.ZodOptional<z.ZodString>;
|
|
974
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
975
|
+
remix: z.ZodOptional<z.ZodObject<{
|
|
976
|
+
url: z.ZodString;
|
|
977
|
+
seed: z.ZodObject<{
|
|
978
|
+
fonts: z.ZodObject<{
|
|
979
|
+
display: z.ZodString;
|
|
980
|
+
body: z.ZodString;
|
|
981
|
+
}, z.core.$strip>;
|
|
982
|
+
palette: z.ZodArray<z.ZodString>;
|
|
983
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
984
|
+
vibe: z.ZodOptional<z.ZodString>;
|
|
985
|
+
harvestedFrom: z.ZodOptional<z.ZodString>;
|
|
986
|
+
}, z.core.$strip>;
|
|
987
|
+
copy: z.ZodOptional<z.ZodObject<{
|
|
988
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
989
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
990
|
+
title: z.ZodOptional<z.ZodString>;
|
|
991
|
+
body: z.ZodString;
|
|
992
|
+
}, z.core.$strip>>;
|
|
993
|
+
contact: z.ZodOptional<z.ZodString>;
|
|
994
|
+
}, z.core.$strip>>;
|
|
995
|
+
}, z.core.$strip>>;
|
|
996
|
+
confirmedAt: z.ZodOptional<z.ZodNumber>;
|
|
997
|
+
}, z.core.$strip>>;
|
|
998
|
+
briefSlots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
999
|
+
styleBrief: z.ZodOptional<z.ZodObject<{
|
|
1000
|
+
primaryColor: z.ZodObject<{
|
|
1001
|
+
name: z.ZodString;
|
|
1002
|
+
hex: z.ZodString;
|
|
1003
|
+
}, z.core.$strip>;
|
|
1004
|
+
secondaryColor: z.ZodOptional<z.ZodObject<{
|
|
1005
|
+
name: z.ZodString;
|
|
1006
|
+
hex: z.ZodString;
|
|
1007
|
+
}, z.core.$strip>>;
|
|
1008
|
+
pairingId: z.ZodEnum<{
|
|
1009
|
+
"editorial-fraunces": "editorial-fraunces";
|
|
1010
|
+
"classic-playfair": "classic-playfair";
|
|
1011
|
+
"serif-sans-cormorant": "serif-sans-cormorant";
|
|
1012
|
+
"literary-libre": "literary-libre";
|
|
1013
|
+
"geometric-space": "geometric-space";
|
|
1014
|
+
"swiss-archivo": "swiss-archivo";
|
|
1015
|
+
"modern-sora": "modern-sora";
|
|
1016
|
+
"display-unbounded": "display-unbounded";
|
|
1017
|
+
"humanist-work": "humanist-work";
|
|
1018
|
+
"rounded-nunito": "rounded-nunito";
|
|
1019
|
+
"warm-karla": "warm-karla";
|
|
1020
|
+
"grounded-outfit": "grounded-outfit";
|
|
1021
|
+
"mono-jetbrains": "mono-jetbrains";
|
|
1022
|
+
"mono-space": "mono-space";
|
|
1023
|
+
"condensed-oswald": "condensed-oswald";
|
|
1024
|
+
"slab-zilla": "slab-zilla";
|
|
1025
|
+
}>;
|
|
1026
|
+
radius: z.ZodEnum<{
|
|
1027
|
+
default: "default";
|
|
1028
|
+
none: "none";
|
|
1029
|
+
sm: "sm";
|
|
1030
|
+
md: "md";
|
|
1031
|
+
lg: "lg";
|
|
1032
|
+
xl: "xl";
|
|
1033
|
+
}>;
|
|
1034
|
+
density: z.ZodEnum<{
|
|
1035
|
+
default: "default";
|
|
1036
|
+
comfortable: "comfortable";
|
|
1037
|
+
compact: "compact";
|
|
1038
|
+
}>;
|
|
1039
|
+
}, z.core.$strip>>;
|
|
1040
|
+
designSpec: z.ZodOptional<z.ZodObject<{
|
|
1041
|
+
specId: z.ZodString;
|
|
1042
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1043
|
+
sectionId: z.ZodString;
|
|
1044
|
+
instanceId: z.ZodString;
|
|
1045
|
+
purpose: z.ZodString;
|
|
1046
|
+
copyHints: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1047
|
+
layout: z.ZodOptional<z.ZodString>;
|
|
1048
|
+
}, z.core.$strip>>;
|
|
1049
|
+
visualLanguage: z.ZodObject<{
|
|
1050
|
+
mood: z.ZodString;
|
|
1051
|
+
skinId: z.ZodString;
|
|
1052
|
+
density: z.ZodEnum<{
|
|
1053
|
+
dense: "dense";
|
|
1054
|
+
airy: "airy";
|
|
1055
|
+
balanced: "balanced";
|
|
1056
|
+
}>;
|
|
1057
|
+
}, z.core.$strip>;
|
|
1058
|
+
copyStrategy: z.ZodObject<{
|
|
1059
|
+
voice: z.ZodEnum<{
|
|
1060
|
+
bold: "bold";
|
|
1061
|
+
professional: "professional";
|
|
1062
|
+
friendly: "friendly";
|
|
1063
|
+
minimal: "minimal";
|
|
1064
|
+
luxury: "luxury";
|
|
1065
|
+
}>;
|
|
1066
|
+
headlineAngle: z.ZodString;
|
|
1067
|
+
ctaPrimary: z.ZodString;
|
|
1068
|
+
}, z.core.$strip>;
|
|
1069
|
+
archetypeManifestId: z.ZodOptional<z.ZodString>;
|
|
1070
|
+
referenceNotes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1071
|
+
createdAt: z.ZodNumber;
|
|
1072
|
+
}, z.core.$strip>>;
|
|
1073
|
+
complete: z.ZodOptional<z.ZodObject<{
|
|
1074
|
+
completeId: z.ZodString;
|
|
1075
|
+
briefRef: z.ZodString;
|
|
1076
|
+
designSpecRef: z.ZodString;
|
|
1077
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1078
|
+
sectionId: z.ZodString;
|
|
1079
|
+
instanceId: z.ZodString;
|
|
1080
|
+
copy: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1081
|
+
layout: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
}, z.core.$strip>>;
|
|
1083
|
+
structure: z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>;
|
|
1084
|
+
copyOverrides: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1085
|
+
skinId: z.ZodString;
|
|
1086
|
+
createdAt: z.ZodNumber;
|
|
1087
|
+
}, z.core.$strip>>;
|
|
1088
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1089
|
+
instanceId: z.ZodString;
|
|
1090
|
+
note: z.ZodString;
|
|
1091
|
+
createdAt: z.ZodNumber;
|
|
1092
|
+
}, z.core.$strip>>>;
|
|
1093
|
+
chatLog: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1094
|
+
id: z.ZodString;
|
|
1095
|
+
role: z.ZodEnum<{
|
|
1096
|
+
user: "user";
|
|
1097
|
+
assistant: "assistant";
|
|
1098
|
+
}>;
|
|
1099
|
+
content: z.ZodString;
|
|
1100
|
+
createdAt: z.ZodNumber;
|
|
1101
|
+
}, z.core.$strip>>>;
|
|
1102
|
+
startAnswers: z.ZodOptional<z.ZodObject<{
|
|
1103
|
+
purpose: z.ZodString;
|
|
1104
|
+
name: z.ZodString;
|
|
1105
|
+
feel: z.ZodString;
|
|
1106
|
+
}, z.core.$strip>>;
|
|
1107
|
+
startReference: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1108
|
+
kind: z.ZodLiteral<"url">;
|
|
1109
|
+
url: z.ZodString;
|
|
1110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1111
|
+
kind: z.ZodLiteral<"design-kit">;
|
|
1112
|
+
fileName: z.ZodString;
|
|
1113
|
+
hints: z.ZodObject<{
|
|
1114
|
+
fonts: z.ZodArray<z.ZodString>;
|
|
1115
|
+
palette: z.ZodArray<z.ZodString>;
|
|
1116
|
+
textSkeleton: z.ZodString;
|
|
1117
|
+
}, z.core.$strip>;
|
|
1118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1119
|
+
kind: z.ZodLiteral<"image">;
|
|
1120
|
+
fileName: z.ZodString;
|
|
1121
|
+
palette: z.ZodArray<z.ZodString>;
|
|
1122
|
+
}, z.core.$strip>], "kind">>;
|
|
1123
|
+
pagePatternId: z.ZodOptional<z.ZodString>;
|
|
1124
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1125
|
+
id: z.ZodString;
|
|
1126
|
+
kind: z.ZodEnum<{
|
|
1127
|
+
url: "url";
|
|
1128
|
+
doc: "doc";
|
|
1129
|
+
sheet: "sheet";
|
|
1130
|
+
drive: "drive";
|
|
1131
|
+
}>;
|
|
1132
|
+
url: z.ZodString;
|
|
1133
|
+
title: z.ZodString;
|
|
1134
|
+
summary: z.ZodString;
|
|
1135
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
rows: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
1137
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1138
|
+
id: z.ZodString;
|
|
1139
|
+
name: z.ZodString;
|
|
1140
|
+
thumb: z.ZodString;
|
|
1141
|
+
}, z.core.$strip>>>;
|
|
1142
|
+
addedAt: z.ZodNumber;
|
|
1143
|
+
}, z.core.$strip>>>;
|
|
1144
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
1145
|
+
tone: z.ZodOptional<z.ZodString>;
|
|
1146
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
avoid: z.ZodOptional<z.ZodString>;
|
|
1148
|
+
}, z.core.$strip>>;
|
|
1149
|
+
slugProvisional: z.ZodOptional<z.ZodBoolean>;
|
|
1150
|
+
kitDraftStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
1151
|
+
}, z.core.$strip>>;
|
|
323
1152
|
}, z.core.$strip>;
|
|
324
|
-
type CompositionSite = z.infer<typeof CompositionSiteSchema
|
|
1153
|
+
type CompositionSite = z.infer<typeof CompositionSiteSchema> & {
|
|
1154
|
+
onboarding?: SiteOnboarding;
|
|
1155
|
+
/** Frozen resolved style written at publish; hosted render prefers this. */
|
|
1156
|
+
styleSnapshot?: SiteStyleSnapshot;
|
|
1157
|
+
};
|
|
325
1158
|
|
|
326
1159
|
/**
|
|
327
1160
|
* Props every section component receives. `copy` already has the instance
|
|
@@ -341,6 +1174,35 @@ interface SectionProps {
|
|
|
341
1174
|
fullHeight?: boolean;
|
|
342
1175
|
/** Nested blocks rendered inside layout shells. */
|
|
343
1176
|
slotContent?: ReactNode;
|
|
1177
|
+
/**
|
|
1178
|
+
* `layout-container` only. The explicit 12-column span of each direct child,
|
|
1179
|
+
* set by the renderers when any child carries one. Present means the container
|
|
1180
|
+
* drops its preset classes for `grid-cols-12`; absent means nothing changes.
|
|
1181
|
+
*/
|
|
1182
|
+
childSpans?: number[];
|
|
1183
|
+
/** `layout-container` only. Cross-child gap step, from the node's `gap` field. */
|
|
1184
|
+
gap?: 'flush' | 'tight' | 'default' | 'wide';
|
|
1185
|
+
/** `layout-container` only. Cross-axis alignment, from the node's `align` field. */
|
|
1186
|
+
align?: 'start' | 'center' | 'stretch' | 'end';
|
|
1187
|
+
/** `layout-container` only. Main-axis distribution, from the node's `justify` field. */
|
|
1188
|
+
justify?: 'start' | 'end' | 'between';
|
|
1189
|
+
/**
|
|
1190
|
+
* The legacy tokens the node declares in `styles.desktop` (`componentOverrides`). The
|
|
1191
|
+
* node stylesheet sets them as custom properties on the node's wrapper; a section reads
|
|
1192
|
+
* them here as flags, since a discrete choice (`--section-divider`, a gradient's middle
|
|
1193
|
+
* stop, a body font) needs JS, not just CSS.
|
|
1194
|
+
*/
|
|
1195
|
+
overrides?: Record<string, string>;
|
|
1196
|
+
/**
|
|
1197
|
+
* `layout-section` only. The band's own Desktop Fill (`componentFill`): its alpha sets how
|
|
1198
|
+
* strongly the band's Image is washed.
|
|
1199
|
+
*/
|
|
1200
|
+
fill?: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Editor preview only: stamp `data-image-slot` on the element drawing each image slot
|
|
1203
|
+
* (`imageSlotProps`), so a Media drag can land on it. Hosted renders never set it.
|
|
1204
|
+
*/
|
|
1205
|
+
editorMarkers?: boolean;
|
|
344
1206
|
/** Builder-only — open insert drawer on a tab (layout shells). */
|
|
345
1207
|
builderInsert?: {
|
|
346
1208
|
openTab: (tab: 'structure' | 'components') => void;
|
|
@@ -361,7 +1223,7 @@ interface SiteRendererProps {
|
|
|
361
1223
|
* Mirrors the hosted CompositionRenderer loop without RSC/async/Firebase:
|
|
362
1224
|
* sections are supplied via `registry` rather than the global getSection.
|
|
363
1225
|
*/
|
|
364
|
-
declare function SiteRenderer({ site, registry, scope, compiledSkin }: SiteRendererProps):
|
|
1226
|
+
declare function SiteRenderer({ site, registry, scope, compiledSkin }: SiteRendererProps): React.JSX.Element;
|
|
365
1227
|
|
|
366
1228
|
/** Render a composition to a static HTML string (no React runtime needed). */
|
|
367
1229
|
declare function renderSiteToHtml(site: CompositionSite, registry: SectionRegistry, scope?: string, compiledSkin?: CompiledSkin): string;
|