@nersh/render 0.2.5 → 0.4.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 +23 -0
- package/dist/index.cjs +29323 -7044
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +396 -250
- package/dist/index.d.ts +396 -250
- package/dist/index.mjs +29276 -6983
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
type LandingIRNode = {
|
|
6
|
-
id: string;
|
|
7
|
-
partId: string;
|
|
8
|
-
slots: Record<string, string>;
|
|
9
|
-
children?: LandingIRNode[];
|
|
10
|
-
};
|
|
11
|
-
|
|
12
5
|
/** Harvested design language — steers kit Stage 1 as strong defaults, not locks. */
|
|
13
6
|
type PromptTemplateKitSeed = {
|
|
14
7
|
fonts: {
|
|
@@ -65,11 +58,11 @@ type HarvestHints = {
|
|
|
65
58
|
|
|
66
59
|
/**
|
|
67
60
|
* Whatever the person attaches at the "how should it feel" turn. Held on the
|
|
68
|
-
* onboarding record verbatim until sign-in;
|
|
61
|
+
* onboarding record verbatim until sign-in; the style build is the only thing
|
|
69
62
|
* that reads it, and only after the mint.
|
|
70
63
|
*
|
|
71
|
-
* - `url`: a site to harvest. Deferred entirely: no fetch, no model call
|
|
72
|
-
* happens until
|
|
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
|
|
73
66
|
* that must never happen before the sign-in gate.
|
|
74
67
|
* - `design-kit`: a `.dc.html` file. `hints` is pulled client-side with the
|
|
75
68
|
* same free, model-less regex pass `harvestSite` itself uses for its own
|
|
@@ -90,135 +83,6 @@ type StartReference = {
|
|
|
90
83
|
palette: string[];
|
|
91
84
|
};
|
|
92
85
|
|
|
93
|
-
declare const SITE_CATEGORY_IDS: readonly ["local-service", "portfolio", "link-in-bio", "professional", "ecommerce", "hospitality", "creator", "general"];
|
|
94
|
-
type SiteCategoryId = (typeof SITE_CATEGORY_IDS)[number];
|
|
95
|
-
type SiteVoiceId = 'friendly' | 'professional' | 'bold' | 'minimal' | 'luxury';
|
|
96
|
-
type SiteGoalId = 'book' | 'call' | 'shop' | 'portfolio' | 'donate';
|
|
97
|
-
type DesignSystemRef = {
|
|
98
|
-
kind: 'account-default';
|
|
99
|
-
} | {
|
|
100
|
-
kind: 'skin';
|
|
101
|
-
skinId: string;
|
|
102
|
-
} | {
|
|
103
|
-
kind: 'design-system';
|
|
104
|
-
id: string;
|
|
105
|
-
};
|
|
106
|
-
/** Verbatim human-authored copy pulled from the remixed site — transcribed, never marketing-ified. */
|
|
107
|
-
type RemixCopyDigest = {
|
|
108
|
-
headline?: string;
|
|
109
|
-
sections: Array<{
|
|
110
|
-
title?: string;
|
|
111
|
-
body: string;
|
|
112
|
-
}>;
|
|
113
|
-
contact?: string;
|
|
114
|
-
};
|
|
115
|
-
type SiteBriefRemix = {
|
|
116
|
-
url: string;
|
|
117
|
-
seed: PromptTemplateKitSeed;
|
|
118
|
-
/** Only present when remixing the user's own site — community remixes are seed-only. */
|
|
119
|
-
copy?: RemixCopyDigest;
|
|
120
|
-
};
|
|
121
|
-
type SiteBrief = {
|
|
122
|
-
name: string;
|
|
123
|
-
category: SiteCategoryId;
|
|
124
|
-
audience: string;
|
|
125
|
-
voice: SiteVoiceId;
|
|
126
|
-
designSystemRef: DesignSystemRef;
|
|
127
|
-
location?: string;
|
|
128
|
-
primaryGoal?: SiteGoalId;
|
|
129
|
-
referenceUrls?: string[];
|
|
130
|
-
freeformNotes?: string;
|
|
131
|
-
/** Prompt-template catalog id when the site started from a template; its kitSeed steers Stage 1. */
|
|
132
|
-
templateId?: string;
|
|
133
|
-
/** Harvested design language + verbatim copy from the user's current site; wins over templateId. */
|
|
134
|
-
remix?: SiteBriefRemix;
|
|
135
|
-
confirmedAt?: number;
|
|
136
|
-
};
|
|
137
|
-
type DesignSpecSection = {
|
|
138
|
-
sectionId: string;
|
|
139
|
-
instanceId: string;
|
|
140
|
-
purpose: string;
|
|
141
|
-
copyHints: Record<string, string>;
|
|
142
|
-
layout?: string;
|
|
143
|
-
};
|
|
144
|
-
type DesignSpec = {
|
|
145
|
-
specId: string;
|
|
146
|
-
sections: DesignSpecSection[];
|
|
147
|
-
visualLanguage: {
|
|
148
|
-
mood: string;
|
|
149
|
-
skinId: string;
|
|
150
|
-
density: 'airy' | 'balanced' | 'dense';
|
|
151
|
-
};
|
|
152
|
-
copyStrategy: {
|
|
153
|
-
voice: SiteVoiceId;
|
|
154
|
-
headlineAngle: string;
|
|
155
|
-
ctaPrimary: string;
|
|
156
|
-
};
|
|
157
|
-
archetypeManifestId?: string;
|
|
158
|
-
referenceNotes?: string[];
|
|
159
|
-
createdAt: number;
|
|
160
|
-
};
|
|
161
|
-
type CompleteSection = {
|
|
162
|
-
sectionId: string;
|
|
163
|
-
instanceId: string;
|
|
164
|
-
copy: Record<string, string>;
|
|
165
|
-
layout?: string;
|
|
166
|
-
};
|
|
167
|
-
type Complete = {
|
|
168
|
-
completeId: string;
|
|
169
|
-
briefRef: string;
|
|
170
|
-
designSpecRef: string;
|
|
171
|
-
sections: CompleteSection[];
|
|
172
|
-
skinId: string;
|
|
173
|
-
createdAt: number;
|
|
174
|
-
};
|
|
175
|
-
type SpecAnnotation = {
|
|
176
|
-
instanceId: string;
|
|
177
|
-
note: string;
|
|
178
|
-
createdAt: number;
|
|
179
|
-
};
|
|
180
|
-
type OnboardingChatMessage = {
|
|
181
|
-
id: string;
|
|
182
|
-
role: 'user' | 'assistant';
|
|
183
|
-
content: string;
|
|
184
|
-
createdAt: number;
|
|
185
|
-
};
|
|
186
|
-
declare const ONBOARDING_PHASES: readonly ["slug", "intake", "brief_confirm", "kit_building", "styles_review", "layout_pick", "content_sources", "landing_building", "spec", "scaffold_review", "ready"];
|
|
187
|
-
type OnboardingPhase = (typeof ONBOARDING_PHASES)[number];
|
|
188
|
-
type SiteOnboarding = {
|
|
189
|
-
phase: OnboardingPhase;
|
|
190
|
-
brief?: SiteBrief;
|
|
191
|
-
/**
|
|
192
|
-
* Brief keys the user actually answered. `brief` is coerced on every write so
|
|
193
|
-
* the RTDB round trip validates, which backfills every required slot from
|
|
194
|
-
* defaults — so the brief alone cannot say what is known and what is filler.
|
|
195
|
-
*/
|
|
196
|
-
briefSlots?: string[];
|
|
197
|
-
designSpec?: DesignSpec;
|
|
198
|
-
complete?: Complete;
|
|
199
|
-
annotations?: SpecAnnotation[];
|
|
200
|
-
chatLog?: OnboardingChatMessage[];
|
|
201
|
-
startAnswers?: {
|
|
202
|
-
purpose: string;
|
|
203
|
-
name: string;
|
|
204
|
-
feel: string;
|
|
205
|
-
};
|
|
206
|
-
/** Attached at the "how should it feel" turn; read once by kit generation. */
|
|
207
|
-
startReference?: StartReference;
|
|
208
|
-
pagePatternId?: string;
|
|
209
|
-
sources?: ContentSource[];
|
|
210
|
-
voice?: ContentVoice;
|
|
211
|
-
slugProvisional?: boolean;
|
|
212
|
-
/**
|
|
213
|
-
* When the kit draft was first fired for this site. Kit generation spends,
|
|
214
|
-
* and the site is minted at `kit_building`, so without a record on the
|
|
215
|
-
* server a reload before the first kit lands would fire the generate call a
|
|
216
|
-
* second time. A per-mount ref cannot survive a remount; this can.
|
|
217
|
-
* Cleared by the Retry button, which is the user asking to spend again.
|
|
218
|
-
*/
|
|
219
|
-
kitDraftStartedAt?: number;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
86
|
/**
|
|
223
87
|
* Component library configuration — provider-agnostic skin source of truth.
|
|
224
88
|
*
|
|
@@ -247,10 +111,10 @@ declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
247
111
|
rhea: "rhea";
|
|
248
112
|
}>>;
|
|
249
113
|
baseColor: z.ZodDefault<z.ZodEnum<{
|
|
114
|
+
neutral: "neutral";
|
|
115
|
+
stone: "stone";
|
|
250
116
|
zinc: "zinc";
|
|
251
117
|
slate: "slate";
|
|
252
|
-
stone: "stone";
|
|
253
|
-
neutral: "neutral";
|
|
254
118
|
gray: "gray";
|
|
255
119
|
mauve: "mauve";
|
|
256
120
|
olive: "olive";
|
|
@@ -258,56 +122,56 @@ declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
258
122
|
taupe: "taupe";
|
|
259
123
|
}>>;
|
|
260
124
|
theme: z.ZodDefault<z.ZodEnum<{
|
|
125
|
+
neutral: "neutral";
|
|
126
|
+
stone: "stone";
|
|
261
127
|
zinc: "zinc";
|
|
262
|
-
blue: "blue";
|
|
263
128
|
slate: "slate";
|
|
264
|
-
stone: "stone";
|
|
265
|
-
neutral: "neutral";
|
|
266
129
|
gray: "gray";
|
|
267
130
|
mauve: "mauve";
|
|
268
131
|
olive: "olive";
|
|
269
132
|
mist: "mist";
|
|
270
133
|
taupe: "taupe";
|
|
271
|
-
green: "green";
|
|
272
|
-
orange: "orange";
|
|
273
134
|
red: "red";
|
|
274
135
|
rose: "rose";
|
|
275
|
-
|
|
136
|
+
orange: "orange";
|
|
276
137
|
amber: "amber";
|
|
277
138
|
yellow: "yellow";
|
|
278
139
|
lime: "lime";
|
|
140
|
+
green: "green";
|
|
279
141
|
emerald: "emerald";
|
|
280
142
|
teal: "teal";
|
|
281
143
|
cyan: "cyan";
|
|
282
144
|
sky: "sky";
|
|
145
|
+
blue: "blue";
|
|
283
146
|
indigo: "indigo";
|
|
147
|
+
violet: "violet";
|
|
284
148
|
purple: "purple";
|
|
285
149
|
fuchsia: "fuchsia";
|
|
286
150
|
pink: "pink";
|
|
287
151
|
}>>;
|
|
288
152
|
chartColor: z.ZodDefault<z.ZodEnum<{
|
|
289
|
-
zinc: "zinc";
|
|
290
|
-
blue: "blue";
|
|
291
|
-
stone: "stone";
|
|
292
153
|
neutral: "neutral";
|
|
154
|
+
stone: "stone";
|
|
155
|
+
zinc: "zinc";
|
|
293
156
|
gray: "gray";
|
|
294
157
|
mauve: "mauve";
|
|
295
158
|
olive: "olive";
|
|
296
159
|
mist: "mist";
|
|
297
160
|
taupe: "taupe";
|
|
298
|
-
green: "green";
|
|
299
|
-
orange: "orange";
|
|
300
161
|
red: "red";
|
|
301
162
|
rose: "rose";
|
|
302
|
-
|
|
163
|
+
orange: "orange";
|
|
303
164
|
amber: "amber";
|
|
304
165
|
yellow: "yellow";
|
|
305
166
|
lime: "lime";
|
|
167
|
+
green: "green";
|
|
306
168
|
emerald: "emerald";
|
|
307
169
|
teal: "teal";
|
|
308
170
|
cyan: "cyan";
|
|
309
171
|
sky: "sky";
|
|
172
|
+
blue: "blue";
|
|
310
173
|
indigo: "indigo";
|
|
174
|
+
violet: "violet";
|
|
311
175
|
purple: "purple";
|
|
312
176
|
fuchsia: "fuchsia";
|
|
313
177
|
pink: "pink";
|
|
@@ -336,8 +200,8 @@ declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
336
200
|
"inverted-translucent": "inverted-translucent";
|
|
337
201
|
}>>;
|
|
338
202
|
menuAccent: z.ZodDefault<z.ZodEnum<{
|
|
339
|
-
bold: "bold";
|
|
340
203
|
subtle: "subtle";
|
|
204
|
+
bold: "bold";
|
|
341
205
|
}>>;
|
|
342
206
|
layout: z.ZodPrefault<z.ZodObject<{
|
|
343
207
|
frame: z.ZodDefault<z.ZodEnum<{
|
|
@@ -360,8 +224,8 @@ declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
360
224
|
dark: "dark";
|
|
361
225
|
}>;
|
|
362
226
|
density: z.ZodDefault<z.ZodEnum<{
|
|
363
|
-
standard: "standard";
|
|
364
227
|
comfortable: "comfortable";
|
|
228
|
+
standard: "standard";
|
|
365
229
|
compact: "compact";
|
|
366
230
|
}>>;
|
|
367
231
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
@@ -397,10 +261,10 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
397
261
|
rhea: "rhea";
|
|
398
262
|
}>>;
|
|
399
263
|
baseColor: z.ZodDefault<z.ZodEnum<{
|
|
264
|
+
neutral: "neutral";
|
|
265
|
+
stone: "stone";
|
|
400
266
|
zinc: "zinc";
|
|
401
267
|
slate: "slate";
|
|
402
|
-
stone: "stone";
|
|
403
|
-
neutral: "neutral";
|
|
404
268
|
gray: "gray";
|
|
405
269
|
mauve: "mauve";
|
|
406
270
|
olive: "olive";
|
|
@@ -408,56 +272,56 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
408
272
|
taupe: "taupe";
|
|
409
273
|
}>>;
|
|
410
274
|
theme: z.ZodDefault<z.ZodEnum<{
|
|
275
|
+
neutral: "neutral";
|
|
276
|
+
stone: "stone";
|
|
411
277
|
zinc: "zinc";
|
|
412
|
-
blue: "blue";
|
|
413
278
|
slate: "slate";
|
|
414
|
-
stone: "stone";
|
|
415
|
-
neutral: "neutral";
|
|
416
279
|
gray: "gray";
|
|
417
280
|
mauve: "mauve";
|
|
418
281
|
olive: "olive";
|
|
419
282
|
mist: "mist";
|
|
420
283
|
taupe: "taupe";
|
|
421
|
-
green: "green";
|
|
422
|
-
orange: "orange";
|
|
423
284
|
red: "red";
|
|
424
285
|
rose: "rose";
|
|
425
|
-
|
|
286
|
+
orange: "orange";
|
|
426
287
|
amber: "amber";
|
|
427
288
|
yellow: "yellow";
|
|
428
289
|
lime: "lime";
|
|
290
|
+
green: "green";
|
|
429
291
|
emerald: "emerald";
|
|
430
292
|
teal: "teal";
|
|
431
293
|
cyan: "cyan";
|
|
432
294
|
sky: "sky";
|
|
295
|
+
blue: "blue";
|
|
433
296
|
indigo: "indigo";
|
|
297
|
+
violet: "violet";
|
|
434
298
|
purple: "purple";
|
|
435
299
|
fuchsia: "fuchsia";
|
|
436
300
|
pink: "pink";
|
|
437
301
|
}>>;
|
|
438
302
|
chartColor: z.ZodDefault<z.ZodEnum<{
|
|
439
|
-
zinc: "zinc";
|
|
440
|
-
blue: "blue";
|
|
441
|
-
stone: "stone";
|
|
442
303
|
neutral: "neutral";
|
|
304
|
+
stone: "stone";
|
|
305
|
+
zinc: "zinc";
|
|
443
306
|
gray: "gray";
|
|
444
307
|
mauve: "mauve";
|
|
445
308
|
olive: "olive";
|
|
446
309
|
mist: "mist";
|
|
447
310
|
taupe: "taupe";
|
|
448
|
-
green: "green";
|
|
449
|
-
orange: "orange";
|
|
450
311
|
red: "red";
|
|
451
312
|
rose: "rose";
|
|
452
|
-
|
|
313
|
+
orange: "orange";
|
|
453
314
|
amber: "amber";
|
|
454
315
|
yellow: "yellow";
|
|
455
316
|
lime: "lime";
|
|
317
|
+
green: "green";
|
|
456
318
|
emerald: "emerald";
|
|
457
319
|
teal: "teal";
|
|
458
320
|
cyan: "cyan";
|
|
459
321
|
sky: "sky";
|
|
322
|
+
blue: "blue";
|
|
460
323
|
indigo: "indigo";
|
|
324
|
+
violet: "violet";
|
|
461
325
|
purple: "purple";
|
|
462
326
|
fuchsia: "fuchsia";
|
|
463
327
|
pink: "pink";
|
|
@@ -486,8 +350,8 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
486
350
|
"inverted-translucent": "inverted-translucent";
|
|
487
351
|
}>>;
|
|
488
352
|
menuAccent: z.ZodDefault<z.ZodEnum<{
|
|
489
|
-
bold: "bold";
|
|
490
353
|
subtle: "subtle";
|
|
354
|
+
bold: "bold";
|
|
491
355
|
}>>;
|
|
492
356
|
layout: z.ZodPrefault<z.ZodObject<{
|
|
493
357
|
frame: z.ZodDefault<z.ZodEnum<{
|
|
@@ -510,8 +374,8 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
510
374
|
dark: "dark";
|
|
511
375
|
}>;
|
|
512
376
|
density: z.ZodDefault<z.ZodEnum<{
|
|
513
|
-
standard: "standard";
|
|
514
377
|
comfortable: "comfortable";
|
|
378
|
+
standard: "standard";
|
|
515
379
|
compact: "compact";
|
|
516
380
|
}>>;
|
|
517
381
|
primaryColor: z.ZodOptional<z.ZodString>;
|
|
@@ -521,6 +385,198 @@ declare const CompiledSkinSchema: z.ZodObject<{
|
|
|
521
385
|
}, z.core.$strip>;
|
|
522
386
|
type CompiledSkin = z.infer<typeof CompiledSkinSchema>;
|
|
523
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
|
+
/** Plan names in the order the person gave them ("Free, Pro and Team"). */
|
|
474
|
+
plans?: string[];
|
|
475
|
+
/** Product names the person sells ("cast iron skillet"). */
|
|
476
|
+
products?: string[];
|
|
477
|
+
freeformNotes?: string;
|
|
478
|
+
/** Prompt-template catalog id when the site started from a template; its kitSeed steers Stage 1. */
|
|
479
|
+
templateId?: string;
|
|
480
|
+
/** Harvested design language + verbatim copy from the user's current site; wins over templateId. */
|
|
481
|
+
remix?: SiteBriefRemix;
|
|
482
|
+
confirmedAt?: number;
|
|
483
|
+
};
|
|
484
|
+
type DesignSpecSection = {
|
|
485
|
+
sectionId: string;
|
|
486
|
+
instanceId: string;
|
|
487
|
+
purpose: string;
|
|
488
|
+
copyHints: Record<string, string>;
|
|
489
|
+
layout?: string;
|
|
490
|
+
};
|
|
491
|
+
type DesignSpec = {
|
|
492
|
+
specId: string;
|
|
493
|
+
sections: DesignSpecSection[];
|
|
494
|
+
visualLanguage: {
|
|
495
|
+
mood: string;
|
|
496
|
+
skinId: string;
|
|
497
|
+
density: 'airy' | 'balanced' | 'dense';
|
|
498
|
+
};
|
|
499
|
+
copyStrategy: {
|
|
500
|
+
voice: SiteVoiceId;
|
|
501
|
+
headlineAngle: string;
|
|
502
|
+
ctaPrimary: string;
|
|
503
|
+
};
|
|
504
|
+
archetypeManifestId?: string;
|
|
505
|
+
referenceNotes?: string[];
|
|
506
|
+
createdAt: number;
|
|
507
|
+
};
|
|
508
|
+
type CompleteSection = {
|
|
509
|
+
sectionId: string;
|
|
510
|
+
instanceId: string;
|
|
511
|
+
copy: Record<string, string>;
|
|
512
|
+
layout?: string;
|
|
513
|
+
};
|
|
514
|
+
type Complete = {
|
|
515
|
+
completeId: string;
|
|
516
|
+
briefRef: string;
|
|
517
|
+
designSpecRef: string;
|
|
518
|
+
/** Taxonomy-correlated copy per DesignSpec section — display/count only, never persisted as-is. */
|
|
519
|
+
sections: CompleteSection[];
|
|
520
|
+
/**
|
|
521
|
+
* The real, pattern-aware tree to persist, expanded when the Complete was stored (nothing
|
|
522
|
+
* writes a new one) — a literal section's own copy lands here under its
|
|
523
|
+
* unchanged sectionId/instanceId; a taxonomy section's copy is translated first.
|
|
524
|
+
*/
|
|
525
|
+
structure: SectionInstance[];
|
|
526
|
+
/** `"<instanceId>.<slot>"` -> value, ready to group into `update_copy` patches. */
|
|
527
|
+
copyOverrides: Record<string, string>;
|
|
528
|
+
skinId: string;
|
|
529
|
+
createdAt: number;
|
|
530
|
+
};
|
|
531
|
+
type SpecAnnotation = {
|
|
532
|
+
instanceId: string;
|
|
533
|
+
note: string;
|
|
534
|
+
createdAt: number;
|
|
535
|
+
};
|
|
536
|
+
type OnboardingChatMessage = {
|
|
537
|
+
id: string;
|
|
538
|
+
role: 'user' | 'assistant';
|
|
539
|
+
content: string;
|
|
540
|
+
createdAt: number;
|
|
541
|
+
};
|
|
542
|
+
declare const ONBOARDING_PHASES: readonly ["slug", "intake", "brief_confirm", "kit_building", "styles_review", "layout_pick", "content_sources", "landing_building", "spec", "scaffold_review", "ready"];
|
|
543
|
+
type OnboardingPhase = (typeof ONBOARDING_PHASES)[number];
|
|
544
|
+
type SiteOnboarding = {
|
|
545
|
+
phase: OnboardingPhase;
|
|
546
|
+
brief?: SiteBrief;
|
|
547
|
+
/**
|
|
548
|
+
* Brief keys the user actually answered. `brief` is coerced on every write so
|
|
549
|
+
* the RTDB round trip validates, which backfills every required slot from
|
|
550
|
+
* defaults — so the brief alone cannot say what is known and what is filler.
|
|
551
|
+
*/
|
|
552
|
+
briefSlots?: string[];
|
|
553
|
+
/** The five style decisions the Styles stage drafted; the Foundation skin is derived from it. */
|
|
554
|
+
styleBrief?: StyleBrief;
|
|
555
|
+
designSpec?: DesignSpec;
|
|
556
|
+
complete?: Complete;
|
|
557
|
+
annotations?: SpecAnnotation[];
|
|
558
|
+
chatLog?: OnboardingChatMessage[];
|
|
559
|
+
startAnswers?: {
|
|
560
|
+
purpose: string;
|
|
561
|
+
name: string;
|
|
562
|
+
feel: string;
|
|
563
|
+
};
|
|
564
|
+
/** Attached at the "how should it feel" turn; read once by kit generation. */
|
|
565
|
+
startReference?: StartReference;
|
|
566
|
+
pagePatternId?: string;
|
|
567
|
+
sources?: ContentSource[];
|
|
568
|
+
voice?: ContentVoice;
|
|
569
|
+
slugProvisional?: boolean;
|
|
570
|
+
/**
|
|
571
|
+
* When the kit draft was first fired for this site. Kit generation spends,
|
|
572
|
+
* and the site is minted at `kit_building`, so without a record on the
|
|
573
|
+
* server a reload before the first kit lands would fire the generate call a
|
|
574
|
+
* second time. A per-mount ref cannot survive a remount; this can.
|
|
575
|
+
* Cleared by the Retry button, which is the user asking to spend again.
|
|
576
|
+
*/
|
|
577
|
+
kitDraftStartedAt?: number;
|
|
578
|
+
};
|
|
579
|
+
|
|
524
580
|
type SiteStyleSource = 'live-ds' | 'skin-snapshot' | 'legacy';
|
|
525
581
|
type SiteStyleSnapshot = {
|
|
526
582
|
libraryConfig: ComponentLibraryConfig;
|
|
@@ -531,6 +587,44 @@ type SiteStyleSnapshot = {
|
|
|
531
587
|
frozenAt: number;
|
|
532
588
|
};
|
|
533
589
|
|
|
590
|
+
/**
|
|
591
|
+
* The per-node legacy token vocabulary.
|
|
592
|
+
*
|
|
593
|
+
* A closed set of CSS custom properties a node can declare in `styles.desktop`
|
|
594
|
+
* (node styles keep them as tokens the components read as flags; the retired
|
|
595
|
+
* `overrides` bag held the same keys). Anything outside the vocabulary is
|
|
596
|
+
* dropped on write and on read, so a stale or hand-written value can never
|
|
597
|
+
* paint a value the editor has no control for.
|
|
598
|
+
*/
|
|
599
|
+
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"];
|
|
600
|
+
type OverrideKey = (typeof OVERRIDE_KEYS)[number];
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* The node style vocabulary: every CSS property a node may declare, what each accepts, the
|
|
604
|
+
* design-system presets it offers, which element it paints and which node kinds show it.
|
|
605
|
+
* One table drives validation, the emitter, the panel rows, the tool schema and the words
|
|
606
|
+
* the tool refuses with. Plain TS with one import, so the hosted graph gains nothing else.
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
declare const STYLE_BREAKPOINTS: readonly ["desktop", "tablet", "phone"];
|
|
610
|
+
type StyleBreakpoint = (typeof STYLE_BREAKPOINTS)[number];
|
|
611
|
+
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"];
|
|
612
|
+
type StyleProperty = (typeof STYLE_PROPERTY_NAMES)[number];
|
|
613
|
+
/** A stored key: a CSS longhand from the table, or a legacy override custom property. */
|
|
614
|
+
type StyleKey = StyleProperty | OverrideKey;
|
|
615
|
+
/** Property name to value, for one breakpoint. */
|
|
616
|
+
type StyleDecls = Partial<Record<StyleKey, string>>;
|
|
617
|
+
/** Breakpoint to declarations. */
|
|
618
|
+
type NodeStyles = Partial<Record<StyleBreakpoint, StyleDecls>>;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Site shapes — both the legacy template-keyed shape and the new
|
|
622
|
+
* composition-keyed shape. getSite returns a discriminated union;
|
|
623
|
+
* renderers branch on it.
|
|
624
|
+
*
|
|
625
|
+
* See /docs/superpowers/specs and plan file for architecture rationale.
|
|
626
|
+
*/
|
|
627
|
+
|
|
534
628
|
/** Section-enter animation preset ids. */
|
|
535
629
|
declare const SECTION_ANIMATION_PRESETS: readonly ["fade-up", "fade-in", "slide-in-left", "slide-in-right", "scale-in", "blur-in"];
|
|
536
630
|
type SectionAnimationPreset = (typeof SECTION_ANIMATION_PRESETS)[number];
|
|
@@ -554,6 +648,16 @@ type SectionInstance = {
|
|
|
554
648
|
id: string;
|
|
555
649
|
instanceId: string;
|
|
556
650
|
layout?: string;
|
|
651
|
+
/** Author-given name shown in the Navigator instead of the section display name. */
|
|
652
|
+
label?: string;
|
|
653
|
+
/** Locked nodes refuse every structural edit until they are unlocked. */
|
|
654
|
+
locked?: boolean;
|
|
655
|
+
/** Container child spacing step. */
|
|
656
|
+
gap?: 'flush' | 'tight' | 'default' | 'wide';
|
|
657
|
+
/** Container cross-axis alignment. */
|
|
658
|
+
align?: 'start' | 'center' | 'stretch' | 'end';
|
|
659
|
+
/** Container main-axis distribution. */
|
|
660
|
+
justify?: 'start' | 'end' | 'between';
|
|
557
661
|
fullBleed?: boolean;
|
|
558
662
|
/** Marketing hero: fill layout below navbar (default on when omitted). */
|
|
559
663
|
fullHeight?: boolean;
|
|
@@ -566,8 +670,6 @@ type SectionInstance = {
|
|
|
566
670
|
md?: number;
|
|
567
671
|
lg?: number;
|
|
568
672
|
};
|
|
569
|
-
/** Forward compat for P6b per-level overrides — CSS var bag applied on the node wrapper. */
|
|
570
|
-
overrides?: Record<string, string>;
|
|
571
673
|
children?: SectionInstance[];
|
|
572
674
|
/** Section-enter animation triggered on viewport intersection. */
|
|
573
675
|
animation?: SectionAnimation;
|
|
@@ -575,6 +677,8 @@ type SectionInstance = {
|
|
|
575
677
|
component?: string;
|
|
576
678
|
/** Reserved: raw CSS escape hatch for the power path. Nothing reads or writes it yet. */
|
|
577
679
|
advanced?: Record<string, string>;
|
|
680
|
+
/** Per-breakpoint CSS the node declares; read through `nodeStyleDecls`, emitted by `emitNodeStylesCss`. */
|
|
681
|
+
styles?: NodeStyles;
|
|
578
682
|
};
|
|
579
683
|
declare const CompositionSiteSchema: z.ZodObject<{
|
|
580
684
|
slug: z.ZodString;
|
|
@@ -591,9 +695,9 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
591
695
|
title: z.ZodOptional<z.ZodString>;
|
|
592
696
|
description: z.ZodOptional<z.ZodString>;
|
|
593
697
|
ogType: z.ZodOptional<z.ZodEnum<{
|
|
594
|
-
article: "article";
|
|
595
698
|
website: "website";
|
|
596
699
|
profile: "profile";
|
|
700
|
+
article: "article";
|
|
597
701
|
}>>;
|
|
598
702
|
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
599
703
|
summary: "summary";
|
|
@@ -640,35 +744,45 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
640
744
|
}, z.core.$strip>>;
|
|
641
745
|
}, z.core.$strip>>>;
|
|
642
746
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
747
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
748
|
+
nav: z.ZodOptional<z.ZodEnum<{
|
|
749
|
+
pin: "pin";
|
|
750
|
+
hide: "hide";
|
|
751
|
+
}>>;
|
|
752
|
+
system: z.ZodOptional<z.ZodEnum<{
|
|
753
|
+
cart: "cart";
|
|
754
|
+
product: "product";
|
|
755
|
+
order: "order";
|
|
756
|
+
}>>;
|
|
643
757
|
}, z.core.$strip>>>;
|
|
644
758
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
645
759
|
theme: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
646
760
|
base: z.ZodEnum<{
|
|
647
|
-
"zero-point": "zero-point";
|
|
648
761
|
mui: "mui";
|
|
762
|
+
"zero-point": "zero-point";
|
|
649
763
|
}>;
|
|
650
764
|
accent: z.ZodString;
|
|
651
765
|
typeCategory: z.ZodEnum<{
|
|
652
|
-
|
|
766
|
+
mono: "mono";
|
|
653
767
|
display: "display";
|
|
654
768
|
sans: "sans";
|
|
655
|
-
|
|
769
|
+
serif: "serif";
|
|
656
770
|
handwriting: "handwriting";
|
|
657
771
|
}>;
|
|
658
772
|
}, z.core.$strip>]>>;
|
|
659
773
|
designSystemId: z.ZodOptional<z.ZodString>;
|
|
660
774
|
skinId: z.ZodOptional<z.ZodString>;
|
|
661
775
|
surfaceKind: z.ZodOptional<z.ZodEnum<{
|
|
662
|
-
marketing: "marketing";
|
|
663
776
|
store: "store";
|
|
777
|
+
marketing: "marketing";
|
|
664
778
|
}>>;
|
|
665
779
|
seo: z.ZodOptional<z.ZodObject<{
|
|
666
780
|
title: z.ZodOptional<z.ZodString>;
|
|
667
781
|
description: z.ZodOptional<z.ZodString>;
|
|
668
782
|
ogType: z.ZodOptional<z.ZodEnum<{
|
|
669
|
-
article: "article";
|
|
670
783
|
website: "website";
|
|
671
784
|
profile: "profile";
|
|
785
|
+
article: "article";
|
|
672
786
|
}>>;
|
|
673
787
|
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
674
788
|
summary: "summary";
|
|
@@ -722,6 +836,7 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
722
836
|
"wizard-portfolio": "wizard-portfolio";
|
|
723
837
|
"wizard-blog": "wizard-blog";
|
|
724
838
|
"wizard-professional": "wizard-professional";
|
|
839
|
+
import: "import";
|
|
725
840
|
template: "template";
|
|
726
841
|
}>>;
|
|
727
842
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
@@ -744,6 +859,7 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
744
859
|
profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
745
860
|
platform: z.ZodEnum<{
|
|
746
861
|
link: "link";
|
|
862
|
+
site: "site";
|
|
747
863
|
twitter: "twitter";
|
|
748
864
|
instagram: "instagram";
|
|
749
865
|
linkedin: "linkedin";
|
|
@@ -755,7 +871,10 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
755
871
|
threads: "threads";
|
|
756
872
|
substack: "substack";
|
|
757
873
|
mastodon: "mastodon";
|
|
758
|
-
|
|
874
|
+
twitch: "twitch";
|
|
875
|
+
soundcloud: "soundcloud";
|
|
876
|
+
spotify: "spotify";
|
|
877
|
+
bandcamp: "bandcamp";
|
|
759
878
|
}>;
|
|
760
879
|
handle: z.ZodString;
|
|
761
880
|
url: z.ZodString;
|
|
@@ -773,6 +892,7 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
773
892
|
}>>;
|
|
774
893
|
footerAttributionText: z.ZodOptional<z.ZodString>;
|
|
775
894
|
footerCopyrightText: z.ZodOptional<z.ZodString>;
|
|
895
|
+
footerCopyrightHidden: z.ZodOptional<z.ZodBoolean>;
|
|
776
896
|
footerDonateEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
777
897
|
footerDonateWhenHidden: z.ZodOptional<z.ZodBoolean>;
|
|
778
898
|
customDomain: z.ZodOptional<z.ZodString>;
|
|
@@ -783,13 +903,14 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
783
903
|
}>>;
|
|
784
904
|
launchedAt: z.ZodOptional<z.ZodNumber>;
|
|
785
905
|
launchVersion: z.ZodOptional<z.ZodNumber>;
|
|
906
|
+
servedReleaseId: z.ZodOptional<z.ZodString>;
|
|
786
907
|
stagingPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
787
908
|
productionPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
788
909
|
googleAnalyticsId: z.ZodOptional<z.ZodString>;
|
|
789
910
|
clientVisibility: z.ZodOptional<z.ZodObject<{
|
|
790
911
|
stagingMode: z.ZodEnum<{
|
|
791
|
-
password: "password";
|
|
792
912
|
public: "public";
|
|
913
|
+
password: "password";
|
|
793
914
|
}>;
|
|
794
915
|
productionMode: z.ZodEnum<{
|
|
795
916
|
coming_soon: "coming_soon";
|
|
@@ -802,6 +923,11 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
802
923
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
803
924
|
checkoutUrl: z.ZodOptional<z.ZodString>;
|
|
804
925
|
currency: z.ZodDefault<z.ZodString>;
|
|
926
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
927
|
+
site: "site";
|
|
928
|
+
printful: "printful";
|
|
929
|
+
}>>;
|
|
930
|
+
cartPath: z.ZodOptional<z.ZodString>;
|
|
805
931
|
}, z.core.$strip>>;
|
|
806
932
|
onboarding: z.ZodOptional<z.ZodObject<{
|
|
807
933
|
phase: z.ZodEnum<{
|
|
@@ -820,8 +946,8 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
820
946
|
brief: z.ZodOptional<z.ZodObject<{
|
|
821
947
|
name: z.ZodString;
|
|
822
948
|
category: z.ZodEnum<{
|
|
823
|
-
"local-service": "local-service";
|
|
824
949
|
portfolio: "portfolio";
|
|
950
|
+
"local-service": "local-service";
|
|
825
951
|
"link-in-bio": "link-in-bio";
|
|
826
952
|
creator: "creator";
|
|
827
953
|
hospitality: "hospitality";
|
|
@@ -831,9 +957,9 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
831
957
|
}>;
|
|
832
958
|
audience: z.ZodString;
|
|
833
959
|
voice: z.ZodEnum<{
|
|
960
|
+
bold: "bold";
|
|
834
961
|
professional: "professional";
|
|
835
962
|
friendly: "friendly";
|
|
836
|
-
bold: "bold";
|
|
837
963
|
minimal: "minimal";
|
|
838
964
|
luxury: "luxury";
|
|
839
965
|
}>;
|
|
@@ -855,6 +981,8 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
855
981
|
donate: "donate";
|
|
856
982
|
}>>;
|
|
857
983
|
referenceUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
984
|
+
plans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
985
|
+
products: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
858
986
|
freeformNotes: z.ZodOptional<z.ZodString>;
|
|
859
987
|
templateId: z.ZodOptional<z.ZodString>;
|
|
860
988
|
remix: z.ZodOptional<z.ZodObject<{
|
|
@@ -881,6 +1009,47 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
881
1009
|
confirmedAt: z.ZodOptional<z.ZodNumber>;
|
|
882
1010
|
}, z.core.$strip>>;
|
|
883
1011
|
briefSlots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1012
|
+
styleBrief: z.ZodOptional<z.ZodObject<{
|
|
1013
|
+
primaryColor: z.ZodObject<{
|
|
1014
|
+
name: z.ZodString;
|
|
1015
|
+
hex: z.ZodString;
|
|
1016
|
+
}, z.core.$strip>;
|
|
1017
|
+
secondaryColor: z.ZodOptional<z.ZodObject<{
|
|
1018
|
+
name: z.ZodString;
|
|
1019
|
+
hex: z.ZodString;
|
|
1020
|
+
}, z.core.$strip>>;
|
|
1021
|
+
pairingId: z.ZodEnum<{
|
|
1022
|
+
"editorial-fraunces": "editorial-fraunces";
|
|
1023
|
+
"classic-playfair": "classic-playfair";
|
|
1024
|
+
"serif-sans-cormorant": "serif-sans-cormorant";
|
|
1025
|
+
"literary-libre": "literary-libre";
|
|
1026
|
+
"geometric-space": "geometric-space";
|
|
1027
|
+
"swiss-archivo": "swiss-archivo";
|
|
1028
|
+
"modern-sora": "modern-sora";
|
|
1029
|
+
"display-unbounded": "display-unbounded";
|
|
1030
|
+
"humanist-work": "humanist-work";
|
|
1031
|
+
"rounded-nunito": "rounded-nunito";
|
|
1032
|
+
"warm-karla": "warm-karla";
|
|
1033
|
+
"grounded-outfit": "grounded-outfit";
|
|
1034
|
+
"mono-jetbrains": "mono-jetbrains";
|
|
1035
|
+
"mono-space": "mono-space";
|
|
1036
|
+
"condensed-oswald": "condensed-oswald";
|
|
1037
|
+
"slab-zilla": "slab-zilla";
|
|
1038
|
+
}>;
|
|
1039
|
+
radius: z.ZodEnum<{
|
|
1040
|
+
default: "default";
|
|
1041
|
+
none: "none";
|
|
1042
|
+
sm: "sm";
|
|
1043
|
+
md: "md";
|
|
1044
|
+
lg: "lg";
|
|
1045
|
+
xl: "xl";
|
|
1046
|
+
}>;
|
|
1047
|
+
density: z.ZodEnum<{
|
|
1048
|
+
default: "default";
|
|
1049
|
+
comfortable: "comfortable";
|
|
1050
|
+
compact: "compact";
|
|
1051
|
+
}>;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
884
1053
|
designSpec: z.ZodOptional<z.ZodObject<{
|
|
885
1054
|
specId: z.ZodString;
|
|
886
1055
|
sections: z.ZodArray<z.ZodObject<{
|
|
@@ -894,16 +1063,16 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
894
1063
|
mood: z.ZodString;
|
|
895
1064
|
skinId: z.ZodString;
|
|
896
1065
|
density: z.ZodEnum<{
|
|
1066
|
+
dense: "dense";
|
|
897
1067
|
airy: "airy";
|
|
898
1068
|
balanced: "balanced";
|
|
899
|
-
dense: "dense";
|
|
900
1069
|
}>;
|
|
901
1070
|
}, z.core.$strip>;
|
|
902
1071
|
copyStrategy: z.ZodObject<{
|
|
903
1072
|
voice: z.ZodEnum<{
|
|
1073
|
+
bold: "bold";
|
|
904
1074
|
professional: "professional";
|
|
905
1075
|
friendly: "friendly";
|
|
906
|
-
bold: "bold";
|
|
907
1076
|
minimal: "minimal";
|
|
908
1077
|
luxury: "luxury";
|
|
909
1078
|
}>;
|
|
@@ -924,6 +1093,8 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
924
1093
|
copy: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
925
1094
|
layout: z.ZodOptional<z.ZodString>;
|
|
926
1095
|
}, z.core.$strip>>;
|
|
1096
|
+
structure: z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>;
|
|
1097
|
+
copyOverrides: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
927
1098
|
skinId: z.ZodString;
|
|
928
1099
|
createdAt: z.ZodNumber;
|
|
929
1100
|
}, z.core.$strip>>;
|
|
@@ -991,70 +1162,6 @@ declare const CompositionSiteSchema: z.ZodObject<{
|
|
|
991
1162
|
slugProvisional: z.ZodOptional<z.ZodBoolean>;
|
|
992
1163
|
kitDraftStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
993
1164
|
}, z.core.$strip>>;
|
|
994
|
-
kit: z.ZodOptional<z.ZodObject<{
|
|
995
|
-
kitId: z.ZodString;
|
|
996
|
-
briefRef: z.ZodString;
|
|
997
|
-
createdAt: z.ZodNumber;
|
|
998
|
-
tokens: z.ZodObject<{
|
|
999
|
-
colors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1000
|
-
fonts: z.ZodObject<{
|
|
1001
|
-
display: z.ZodString;
|
|
1002
|
-
body: z.ZodString;
|
|
1003
|
-
}, z.core.$strip>;
|
|
1004
|
-
radius: z.ZodString;
|
|
1005
|
-
buttonRadius: z.ZodOptional<z.ZodString>;
|
|
1006
|
-
surfaceRadius: z.ZodOptional<z.ZodString>;
|
|
1007
|
-
density: z.ZodEnum<{
|
|
1008
|
-
airy: "airy";
|
|
1009
|
-
balanced: "balanced";
|
|
1010
|
-
dense: "dense";
|
|
1011
|
-
}>;
|
|
1012
|
-
typeScale: z.ZodOptional<z.ZodEnum<{
|
|
1013
|
-
sm: "sm";
|
|
1014
|
-
md: "md";
|
|
1015
|
-
lg: "lg";
|
|
1016
|
-
xl: "xl";
|
|
1017
|
-
xs: "xs";
|
|
1018
|
-
}>>;
|
|
1019
|
-
typeRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1020
|
-
fontSize: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1021
|
-
lineHeight: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1022
|
-
letterSpacing: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1023
|
-
wordSpacing: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1024
|
-
fontWeight: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1025
|
-
textTransform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1026
|
-
}, z.core.$strip>>>;
|
|
1027
|
-
}, z.core.$strip>;
|
|
1028
|
-
parts: z.ZodArray<z.ZodObject<{
|
|
1029
|
-
id: z.ZodString;
|
|
1030
|
-
kind: z.ZodEnum<{
|
|
1031
|
-
text: "text";
|
|
1032
|
-
image: "image";
|
|
1033
|
-
button: "button";
|
|
1034
|
-
heading: "heading";
|
|
1035
|
-
card: "card";
|
|
1036
|
-
"section-shell": "section-shell";
|
|
1037
|
-
nav: "nav";
|
|
1038
|
-
footer: "footer";
|
|
1039
|
-
"cta-row": "cta-row";
|
|
1040
|
-
}>;
|
|
1041
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1042
|
-
defaultProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1043
|
-
}, z.core.$strip>>;
|
|
1044
|
-
rules: z.ZodObject<{
|
|
1045
|
-
voice: z.ZodString;
|
|
1046
|
-
do: z.ZodArray<z.ZodString>;
|
|
1047
|
-
dont: z.ZodArray<z.ZodString>;
|
|
1048
|
-
}, z.core.$strip>;
|
|
1049
|
-
}, z.core.$strip>>;
|
|
1050
|
-
kitPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1051
|
-
pageId: z.ZodString;
|
|
1052
|
-
path: z.ZodString;
|
|
1053
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1054
|
-
kitRef: z.ZodString;
|
|
1055
|
-
createdAt: z.ZodNumber;
|
|
1056
|
-
sections: z.ZodArray<z.ZodType<LandingIRNode, unknown, z.core.$ZodTypeInternals<LandingIRNode, unknown>>>;
|
|
1057
|
-
}, z.core.$strip>>>;
|
|
1058
1165
|
}, z.core.$strip>;
|
|
1059
1166
|
type CompositionSite = z.infer<typeof CompositionSiteSchema> & {
|
|
1060
1167
|
onboarding?: SiteOnboarding;
|
|
@@ -1086,6 +1193,43 @@ interface SectionProps {
|
|
|
1086
1193
|
* drops its preset classes for `grid-cols-12`; absent means nothing changes.
|
|
1087
1194
|
*/
|
|
1088
1195
|
childSpans?: number[];
|
|
1196
|
+
/**
|
|
1197
|
+
* The section ids of the children in `slotContent`, in order, hidden ones left out. Set by
|
|
1198
|
+
* the renderers on any node that holds children, so a frame can lay its own copy out around
|
|
1199
|
+
* what it holds (block-card: a leading picture tops the card, a nested heading takes over
|
|
1200
|
+
* the card's title).
|
|
1201
|
+
*/
|
|
1202
|
+
childIds?: string[];
|
|
1203
|
+
/** `layout-container` only. Cross-child gap step, from the node's `gap` field. */
|
|
1204
|
+
gap?: 'flush' | 'tight' | 'default' | 'wide';
|
|
1205
|
+
/** `layout-container` only. Cross-axis alignment, from the node's `align` field. */
|
|
1206
|
+
align?: 'start' | 'center' | 'stretch' | 'end';
|
|
1207
|
+
/** `layout-container` only. Main-axis distribution, from the node's `justify` field. */
|
|
1208
|
+
justify?: 'start' | 'end' | 'between';
|
|
1209
|
+
/**
|
|
1210
|
+
* The legacy tokens the node declares in `styles.desktop` (`componentOverrides`). The
|
|
1211
|
+
* node stylesheet sets them as custom properties on the node's wrapper; a section reads
|
|
1212
|
+
* them here as flags, since a discrete choice (`--section-divider`, a gradient's middle
|
|
1213
|
+
* stop, a body font) needs JS, not just CSS.
|
|
1214
|
+
*/
|
|
1215
|
+
overrides?: Record<string, string>;
|
|
1216
|
+
/**
|
|
1217
|
+
* `layout-section` only. The band's own Desktop Fill (`componentFill`): its alpha sets how
|
|
1218
|
+
* strongly the band's Image is washed.
|
|
1219
|
+
*/
|
|
1220
|
+
fill?: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Editor preview only: stamp `data-image-slot` on the element drawing each image slot
|
|
1223
|
+
* (`imageSlotProps`), so a Media drag can land on it. Hosted renders never set it.
|
|
1224
|
+
*/
|
|
1225
|
+
editorMarkers?: boolean;
|
|
1226
|
+
/**
|
|
1227
|
+
* `layout-section` only. The Code Embed child the renderer lifted out of the flow
|
|
1228
|
+
* (`splitBackground`), drawn behind the band's content.
|
|
1229
|
+
*/
|
|
1230
|
+
backgroundSlot?: ReactNode;
|
|
1231
|
+
/** Set by a renderer on the one child it renders into `backgroundSlot`. */
|
|
1232
|
+
asBackground?: boolean;
|
|
1089
1233
|
/** Builder-only — open insert drawer on a tab (layout shells). */
|
|
1090
1234
|
builderInsert?: {
|
|
1091
1235
|
openTab: (tab: 'structure' | 'components') => void;
|
|
@@ -1100,13 +1244,15 @@ interface SiteRendererProps {
|
|
|
1100
1244
|
scope?: string;
|
|
1101
1245
|
/** Layer 2 structural styles. Omit for pure CSS-var tokens (Layer 1). */
|
|
1102
1246
|
compiledSkin?: CompiledSkin;
|
|
1247
|
+
/** `'run'` lets Code Embed blocks run the author's code in their sealed frame; absent or `'off'`, they show their fallback. */
|
|
1248
|
+
codeEmbed?: "run" | "off";
|
|
1103
1249
|
}
|
|
1104
1250
|
/**
|
|
1105
1251
|
* Framework-agnostic, synchronous composition renderer.
|
|
1106
1252
|
* Mirrors the hosted CompositionRenderer loop without RSC/async/Firebase:
|
|
1107
1253
|
* sections are supplied via `registry` rather than the global getSection.
|
|
1108
1254
|
*/
|
|
1109
|
-
declare function SiteRenderer({ site, registry, scope, compiledSkin }: SiteRendererProps): React.JSX.Element;
|
|
1255
|
+
declare function SiteRenderer({ site, registry, scope, compiledSkin, codeEmbed }: SiteRendererProps): React.JSX.Element;
|
|
1110
1256
|
|
|
1111
1257
|
/** Render a composition to a static HTML string (no React runtime needed). */
|
|
1112
1258
|
declare function renderSiteToHtml(site: CompositionSite, registry: SectionRegistry, scope?: string, compiledSkin?: CompiledSkin): string;
|