@nersh/render 0.2.3 → 0.2.5
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 +17 -3
- package/dist/index.cjs +37105 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +1154 -0
- package/dist/index.d.ts +1154 -0
- package/dist/index.mjs +37115 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +7 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1154 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, ComponentType } from 'react';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
type LandingIRNode = {
|
|
6
|
+
id: string;
|
|
7
|
+
partId: string;
|
|
8
|
+
slots: Record<string, string>;
|
|
9
|
+
children?: LandingIRNode[];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** Harvested design language — steers kit Stage 1 as strong defaults, not locks. */
|
|
13
|
+
type PromptTemplateKitSeed = {
|
|
14
|
+
fonts: {
|
|
15
|
+
display: string;
|
|
16
|
+
body: string;
|
|
17
|
+
};
|
|
18
|
+
palette: string[];
|
|
19
|
+
radius?: string;
|
|
20
|
+
vibe?: string;
|
|
21
|
+
harvestedFrom?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type ContentSourceKind = 'doc' | 'sheet' | 'drive' | 'url';
|
|
25
|
+
type ContentSourceMedia = {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
thumb: string;
|
|
29
|
+
/**
|
|
30
|
+
* Full-resolution URL, when it differs from `thumb`. Drive folder harvests
|
|
31
|
+
* are the only source that needs this: `thumbnailLink` is genuinely a
|
|
32
|
+
* thumbnail, so placing it into a hero slot looks bad. A harvested website
|
|
33
|
+
* carries a real image URL as `thumb` already, so it has no separate `full`.
|
|
34
|
+
*/
|
|
35
|
+
full?: string;
|
|
36
|
+
};
|
|
37
|
+
type ContentSource = {
|
|
38
|
+
id: string;
|
|
39
|
+
kind: ContentSourceKind;
|
|
40
|
+
url: string;
|
|
41
|
+
title: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
text?: string;
|
|
44
|
+
rows?: string[][];
|
|
45
|
+
media?: ContentSourceMedia[];
|
|
46
|
+
addedAt: number;
|
|
47
|
+
};
|
|
48
|
+
type ContentVoice = {
|
|
49
|
+
tone?: string;
|
|
50
|
+
audience?: string;
|
|
51
|
+
avoid?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Pure text extraction from a page's markup: no fetch, no model, nothing but
|
|
56
|
+
* regexes over an HTML string. `harvestSite` uses this to build hints for the
|
|
57
|
+
* model; the start flow's reference attach uses it directly, client-side, to
|
|
58
|
+
* read a `.dc.html` design kit file for free before sign-in.
|
|
59
|
+
*/
|
|
60
|
+
type HarvestHints = {
|
|
61
|
+
fonts: string[];
|
|
62
|
+
palette: string[];
|
|
63
|
+
textSkeleton: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whatever the person attaches at the "how should it feel" turn. Held on the
|
|
68
|
+
* onboarding record verbatim until sign-in; kit generation is the only thing
|
|
69
|
+
* that reads it, and only after the mint.
|
|
70
|
+
*
|
|
71
|
+
* - `url`: a site to harvest. Deferred entirely: no fetch, no model call,
|
|
72
|
+
* happens until kit generation runs, since a harvest is a model call and
|
|
73
|
+
* that must never happen before the sign-in gate.
|
|
74
|
+
* - `design-kit`: a `.dc.html` file. `hints` is pulled client-side with the
|
|
75
|
+
* same free, model-less regex pass `harvestSite` itself uses for its own
|
|
76
|
+
* hints, so this costs nothing and needs no sign-in to compute.
|
|
77
|
+
* - `image`: a plain picture. All that can honestly be pulled from it without
|
|
78
|
+
* adding a dependency is a colour palette, sampled client-side via canvas.
|
|
79
|
+
*/
|
|
80
|
+
type StartReference = {
|
|
81
|
+
kind: 'url';
|
|
82
|
+
url: string;
|
|
83
|
+
} | {
|
|
84
|
+
kind: 'design-kit';
|
|
85
|
+
fileName: string;
|
|
86
|
+
hints: HarvestHints;
|
|
87
|
+
} | {
|
|
88
|
+
kind: 'image';
|
|
89
|
+
fileName: string;
|
|
90
|
+
palette: string[];
|
|
91
|
+
};
|
|
92
|
+
|
|
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
|
+
/**
|
|
223
|
+
* Component library configuration — provider-agnostic skin source of truth.
|
|
224
|
+
*
|
|
225
|
+
* Layer 2 in the skins stack (see specs/2026-06-08-shadcn-create-skins.md):
|
|
226
|
+
* Provider → LibraryConfig → CompiledSkin (cssVars + structuralStyleId)
|
|
227
|
+
*
|
|
228
|
+
* shadcn is v1. MUI and other providers extend the discriminated union without
|
|
229
|
+
* changing site/content/pattern contracts downstream.
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
declare const ComponentLibraryConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
233
|
+
provider: z.ZodLiteral<"shadcn">;
|
|
234
|
+
shadcn: z.ZodObject<{
|
|
235
|
+
base: z.ZodDefault<z.ZodEnum<{
|
|
236
|
+
radix: "radix";
|
|
237
|
+
"base-ui": "base-ui";
|
|
238
|
+
}>>;
|
|
239
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
240
|
+
vega: "vega";
|
|
241
|
+
nova: "nova";
|
|
242
|
+
maia: "maia";
|
|
243
|
+
lyra: "lyra";
|
|
244
|
+
mira: "mira";
|
|
245
|
+
luma: "luma";
|
|
246
|
+
sera: "sera";
|
|
247
|
+
rhea: "rhea";
|
|
248
|
+
}>>;
|
|
249
|
+
baseColor: z.ZodDefault<z.ZodEnum<{
|
|
250
|
+
zinc: "zinc";
|
|
251
|
+
slate: "slate";
|
|
252
|
+
stone: "stone";
|
|
253
|
+
neutral: "neutral";
|
|
254
|
+
gray: "gray";
|
|
255
|
+
mauve: "mauve";
|
|
256
|
+
olive: "olive";
|
|
257
|
+
mist: "mist";
|
|
258
|
+
taupe: "taupe";
|
|
259
|
+
}>>;
|
|
260
|
+
theme: z.ZodDefault<z.ZodEnum<{
|
|
261
|
+
zinc: "zinc";
|
|
262
|
+
blue: "blue";
|
|
263
|
+
slate: "slate";
|
|
264
|
+
stone: "stone";
|
|
265
|
+
neutral: "neutral";
|
|
266
|
+
gray: "gray";
|
|
267
|
+
mauve: "mauve";
|
|
268
|
+
olive: "olive";
|
|
269
|
+
mist: "mist";
|
|
270
|
+
taupe: "taupe";
|
|
271
|
+
green: "green";
|
|
272
|
+
orange: "orange";
|
|
273
|
+
red: "red";
|
|
274
|
+
rose: "rose";
|
|
275
|
+
violet: "violet";
|
|
276
|
+
amber: "amber";
|
|
277
|
+
yellow: "yellow";
|
|
278
|
+
lime: "lime";
|
|
279
|
+
emerald: "emerald";
|
|
280
|
+
teal: "teal";
|
|
281
|
+
cyan: "cyan";
|
|
282
|
+
sky: "sky";
|
|
283
|
+
indigo: "indigo";
|
|
284
|
+
purple: "purple";
|
|
285
|
+
fuchsia: "fuchsia";
|
|
286
|
+
pink: "pink";
|
|
287
|
+
}>>;
|
|
288
|
+
chartColor: z.ZodDefault<z.ZodEnum<{
|
|
289
|
+
zinc: "zinc";
|
|
290
|
+
blue: "blue";
|
|
291
|
+
stone: "stone";
|
|
292
|
+
neutral: "neutral";
|
|
293
|
+
gray: "gray";
|
|
294
|
+
mauve: "mauve";
|
|
295
|
+
olive: "olive";
|
|
296
|
+
mist: "mist";
|
|
297
|
+
taupe: "taupe";
|
|
298
|
+
green: "green";
|
|
299
|
+
orange: "orange";
|
|
300
|
+
red: "red";
|
|
301
|
+
rose: "rose";
|
|
302
|
+
violet: "violet";
|
|
303
|
+
amber: "amber";
|
|
304
|
+
yellow: "yellow";
|
|
305
|
+
lime: "lime";
|
|
306
|
+
emerald: "emerald";
|
|
307
|
+
teal: "teal";
|
|
308
|
+
cyan: "cyan";
|
|
309
|
+
sky: "sky";
|
|
310
|
+
indigo: "indigo";
|
|
311
|
+
purple: "purple";
|
|
312
|
+
fuchsia: "fuchsia";
|
|
313
|
+
pink: "pink";
|
|
314
|
+
}>>;
|
|
315
|
+
radius: z.ZodDefault<z.ZodEnum<{
|
|
316
|
+
default: "default";
|
|
317
|
+
none: "none";
|
|
318
|
+
sm: "sm";
|
|
319
|
+
md: "md";
|
|
320
|
+
lg: "lg";
|
|
321
|
+
xl: "xl";
|
|
322
|
+
}>>;
|
|
323
|
+
font: z.ZodDefault<z.ZodString>;
|
|
324
|
+
fontHeading: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"inherit">, z.ZodString]>>;
|
|
325
|
+
iconLibrary: z.ZodDefault<z.ZodEnum<{
|
|
326
|
+
lucide: "lucide";
|
|
327
|
+
tabler: "tabler";
|
|
328
|
+
hugeicons: "hugeicons";
|
|
329
|
+
phosphor: "phosphor";
|
|
330
|
+
remixicon: "remixicon";
|
|
331
|
+
}>>;
|
|
332
|
+
menuColor: z.ZodDefault<z.ZodEnum<{
|
|
333
|
+
default: "default";
|
|
334
|
+
inverted: "inverted";
|
|
335
|
+
"default-translucent": "default-translucent";
|
|
336
|
+
"inverted-translucent": "inverted-translucent";
|
|
337
|
+
}>>;
|
|
338
|
+
menuAccent: z.ZodDefault<z.ZodEnum<{
|
|
339
|
+
bold: "bold";
|
|
340
|
+
subtle: "subtle";
|
|
341
|
+
}>>;
|
|
342
|
+
layout: z.ZodPrefault<z.ZodObject<{
|
|
343
|
+
frame: z.ZodDefault<z.ZodEnum<{
|
|
344
|
+
framed: "framed";
|
|
345
|
+
fluid: "fluid";
|
|
346
|
+
}>>;
|
|
347
|
+
container: z.ZodDefault<z.ZodEnum<{
|
|
348
|
+
"5xl": "5xl";
|
|
349
|
+
"6xl": "6xl";
|
|
350
|
+
"7xl": "7xl";
|
|
351
|
+
}>>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
355
|
+
provider: z.ZodLiteral<"mui">;
|
|
356
|
+
mui: z.ZodObject<{
|
|
357
|
+
theme: z.ZodString;
|
|
358
|
+
palette: z.ZodEnum<{
|
|
359
|
+
light: "light";
|
|
360
|
+
dark: "dark";
|
|
361
|
+
}>;
|
|
362
|
+
density: z.ZodDefault<z.ZodEnum<{
|
|
363
|
+
standard: "standard";
|
|
364
|
+
comfortable: "comfortable";
|
|
365
|
+
compact: "compact";
|
|
366
|
+
}>>;
|
|
367
|
+
primaryColor: z.ZodOptional<z.ZodString>;
|
|
368
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
}, z.core.$strip>], "provider">;
|
|
371
|
+
type ComponentLibraryConfig = z.infer<typeof ComponentLibraryConfigSchema>;
|
|
372
|
+
declare const CompiledSkinSchema: z.ZodObject<{
|
|
373
|
+
provider: z.ZodEnum<{
|
|
374
|
+
shadcn: "shadcn";
|
|
375
|
+
mui: "mui";
|
|
376
|
+
}>;
|
|
377
|
+
structuralStyleId: z.ZodString;
|
|
378
|
+
cssVars: z.ZodObject<{
|
|
379
|
+
light: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
380
|
+
dark: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
libraryConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
383
|
+
provider: z.ZodLiteral<"shadcn">;
|
|
384
|
+
shadcn: z.ZodObject<{
|
|
385
|
+
base: z.ZodDefault<z.ZodEnum<{
|
|
386
|
+
radix: "radix";
|
|
387
|
+
"base-ui": "base-ui";
|
|
388
|
+
}>>;
|
|
389
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
390
|
+
vega: "vega";
|
|
391
|
+
nova: "nova";
|
|
392
|
+
maia: "maia";
|
|
393
|
+
lyra: "lyra";
|
|
394
|
+
mira: "mira";
|
|
395
|
+
luma: "luma";
|
|
396
|
+
sera: "sera";
|
|
397
|
+
rhea: "rhea";
|
|
398
|
+
}>>;
|
|
399
|
+
baseColor: z.ZodDefault<z.ZodEnum<{
|
|
400
|
+
zinc: "zinc";
|
|
401
|
+
slate: "slate";
|
|
402
|
+
stone: "stone";
|
|
403
|
+
neutral: "neutral";
|
|
404
|
+
gray: "gray";
|
|
405
|
+
mauve: "mauve";
|
|
406
|
+
olive: "olive";
|
|
407
|
+
mist: "mist";
|
|
408
|
+
taupe: "taupe";
|
|
409
|
+
}>>;
|
|
410
|
+
theme: z.ZodDefault<z.ZodEnum<{
|
|
411
|
+
zinc: "zinc";
|
|
412
|
+
blue: "blue";
|
|
413
|
+
slate: "slate";
|
|
414
|
+
stone: "stone";
|
|
415
|
+
neutral: "neutral";
|
|
416
|
+
gray: "gray";
|
|
417
|
+
mauve: "mauve";
|
|
418
|
+
olive: "olive";
|
|
419
|
+
mist: "mist";
|
|
420
|
+
taupe: "taupe";
|
|
421
|
+
green: "green";
|
|
422
|
+
orange: "orange";
|
|
423
|
+
red: "red";
|
|
424
|
+
rose: "rose";
|
|
425
|
+
violet: "violet";
|
|
426
|
+
amber: "amber";
|
|
427
|
+
yellow: "yellow";
|
|
428
|
+
lime: "lime";
|
|
429
|
+
emerald: "emerald";
|
|
430
|
+
teal: "teal";
|
|
431
|
+
cyan: "cyan";
|
|
432
|
+
sky: "sky";
|
|
433
|
+
indigo: "indigo";
|
|
434
|
+
purple: "purple";
|
|
435
|
+
fuchsia: "fuchsia";
|
|
436
|
+
pink: "pink";
|
|
437
|
+
}>>;
|
|
438
|
+
chartColor: z.ZodDefault<z.ZodEnum<{
|
|
439
|
+
zinc: "zinc";
|
|
440
|
+
blue: "blue";
|
|
441
|
+
stone: "stone";
|
|
442
|
+
neutral: "neutral";
|
|
443
|
+
gray: "gray";
|
|
444
|
+
mauve: "mauve";
|
|
445
|
+
olive: "olive";
|
|
446
|
+
mist: "mist";
|
|
447
|
+
taupe: "taupe";
|
|
448
|
+
green: "green";
|
|
449
|
+
orange: "orange";
|
|
450
|
+
red: "red";
|
|
451
|
+
rose: "rose";
|
|
452
|
+
violet: "violet";
|
|
453
|
+
amber: "amber";
|
|
454
|
+
yellow: "yellow";
|
|
455
|
+
lime: "lime";
|
|
456
|
+
emerald: "emerald";
|
|
457
|
+
teal: "teal";
|
|
458
|
+
cyan: "cyan";
|
|
459
|
+
sky: "sky";
|
|
460
|
+
indigo: "indigo";
|
|
461
|
+
purple: "purple";
|
|
462
|
+
fuchsia: "fuchsia";
|
|
463
|
+
pink: "pink";
|
|
464
|
+
}>>;
|
|
465
|
+
radius: z.ZodDefault<z.ZodEnum<{
|
|
466
|
+
default: "default";
|
|
467
|
+
none: "none";
|
|
468
|
+
sm: "sm";
|
|
469
|
+
md: "md";
|
|
470
|
+
lg: "lg";
|
|
471
|
+
xl: "xl";
|
|
472
|
+
}>>;
|
|
473
|
+
font: z.ZodDefault<z.ZodString>;
|
|
474
|
+
fontHeading: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"inherit">, z.ZodString]>>;
|
|
475
|
+
iconLibrary: z.ZodDefault<z.ZodEnum<{
|
|
476
|
+
lucide: "lucide";
|
|
477
|
+
tabler: "tabler";
|
|
478
|
+
hugeicons: "hugeicons";
|
|
479
|
+
phosphor: "phosphor";
|
|
480
|
+
remixicon: "remixicon";
|
|
481
|
+
}>>;
|
|
482
|
+
menuColor: z.ZodDefault<z.ZodEnum<{
|
|
483
|
+
default: "default";
|
|
484
|
+
inverted: "inverted";
|
|
485
|
+
"default-translucent": "default-translucent";
|
|
486
|
+
"inverted-translucent": "inverted-translucent";
|
|
487
|
+
}>>;
|
|
488
|
+
menuAccent: z.ZodDefault<z.ZodEnum<{
|
|
489
|
+
bold: "bold";
|
|
490
|
+
subtle: "subtle";
|
|
491
|
+
}>>;
|
|
492
|
+
layout: z.ZodPrefault<z.ZodObject<{
|
|
493
|
+
frame: z.ZodDefault<z.ZodEnum<{
|
|
494
|
+
framed: "framed";
|
|
495
|
+
fluid: "fluid";
|
|
496
|
+
}>>;
|
|
497
|
+
container: z.ZodDefault<z.ZodEnum<{
|
|
498
|
+
"5xl": "5xl";
|
|
499
|
+
"6xl": "6xl";
|
|
500
|
+
"7xl": "7xl";
|
|
501
|
+
}>>;
|
|
502
|
+
}, z.core.$strip>>;
|
|
503
|
+
}, z.core.$strip>;
|
|
504
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
505
|
+
provider: z.ZodLiteral<"mui">;
|
|
506
|
+
mui: z.ZodObject<{
|
|
507
|
+
theme: z.ZodString;
|
|
508
|
+
palette: z.ZodEnum<{
|
|
509
|
+
light: "light";
|
|
510
|
+
dark: "dark";
|
|
511
|
+
}>;
|
|
512
|
+
density: z.ZodDefault<z.ZodEnum<{
|
|
513
|
+
standard: "standard";
|
|
514
|
+
comfortable: "comfortable";
|
|
515
|
+
compact: "compact";
|
|
516
|
+
}>>;
|
|
517
|
+
primaryColor: z.ZodOptional<z.ZodString>;
|
|
518
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
519
|
+
}, z.core.$strip>;
|
|
520
|
+
}, z.core.$strip>], "provider">;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
type CompiledSkin = z.infer<typeof CompiledSkinSchema>;
|
|
523
|
+
|
|
524
|
+
type SiteStyleSource = 'live-ds' | 'skin-snapshot' | 'legacy';
|
|
525
|
+
type SiteStyleSnapshot = {
|
|
526
|
+
libraryConfig: ComponentLibraryConfig;
|
|
527
|
+
dsOverrides: Record<string, string>;
|
|
528
|
+
source: SiteStyleSource;
|
|
529
|
+
recordId: string | null;
|
|
530
|
+
recordName: string | null;
|
|
531
|
+
frozenAt: number;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/** Section-enter animation preset ids. */
|
|
535
|
+
declare const SECTION_ANIMATION_PRESETS: readonly ["fade-up", "fade-in", "slide-in-left", "slide-in-right", "scale-in", "blur-in"];
|
|
536
|
+
type SectionAnimationPreset = (typeof SECTION_ANIMATION_PRESETS)[number];
|
|
537
|
+
type SectionAnimation = {
|
|
538
|
+
preset: SectionAnimationPreset;
|
|
539
|
+
/** Delay in ms before the animation starts after entering viewport. */
|
|
540
|
+
delay?: number;
|
|
541
|
+
/** Duration override in ms (default 600). */
|
|
542
|
+
duration?: number;
|
|
543
|
+
/** Stagger children by this many ms each (for grids/lists). */
|
|
544
|
+
stagger?: number;
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
547
|
+
* One section rendered inside a composition.
|
|
548
|
+
* `id` references the sections registry; `instanceId` is unique per
|
|
549
|
+
* composition instance so multiple of the same section type can appear
|
|
550
|
+
* with independently-keyed copy.
|
|
551
|
+
* `children` holds nested layout shells and component blocks.
|
|
552
|
+
*/
|
|
553
|
+
type SectionInstance = {
|
|
554
|
+
id: string;
|
|
555
|
+
instanceId: string;
|
|
556
|
+
layout?: string;
|
|
557
|
+
fullBleed?: boolean;
|
|
558
|
+
/** Marketing hero: fill layout below navbar (default on when omitted). */
|
|
559
|
+
fullHeight?: boolean;
|
|
560
|
+
hidden?: boolean;
|
|
561
|
+
/** Columns this node occupies on the parent container's 12-column grid. */
|
|
562
|
+
span?: number;
|
|
563
|
+
/** Per-breakpoint span overrides, keyed to the @container/site breakpoints. */
|
|
564
|
+
spanAt?: {
|
|
565
|
+
sm?: number;
|
|
566
|
+
md?: number;
|
|
567
|
+
lg?: number;
|
|
568
|
+
};
|
|
569
|
+
/** Forward compat for P6b per-level overrides — CSS var bag applied on the node wrapper. */
|
|
570
|
+
overrides?: Record<string, string>;
|
|
571
|
+
children?: SectionInstance[];
|
|
572
|
+
/** Section-enter animation triggered on viewport intersection. */
|
|
573
|
+
animation?: SectionAnimation;
|
|
574
|
+
/** Fingerprint of the pattern this node was expanded from: `<pattern-id>@<version>`. Root wrapper only. */
|
|
575
|
+
component?: string;
|
|
576
|
+
/** Reserved: raw CSS escape hatch for the power path. Nothing reads or writes it yet. */
|
|
577
|
+
advanced?: Record<string, string>;
|
|
578
|
+
};
|
|
579
|
+
declare const CompositionSiteSchema: z.ZodObject<{
|
|
580
|
+
slug: z.ZodString;
|
|
581
|
+
composition: z.ZodObject<{
|
|
582
|
+
id: z.ZodString;
|
|
583
|
+
sections: z.ZodDefault<z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>>;
|
|
584
|
+
}, z.core.$strip>;
|
|
585
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
586
|
+
id: z.ZodString;
|
|
587
|
+
slug: z.ZodString;
|
|
588
|
+
title: z.ZodString;
|
|
589
|
+
sections: z.ZodDefault<z.ZodArray<z.ZodType<SectionInstance, unknown, z.core.$ZodTypeInternals<SectionInstance, unknown>>>>;
|
|
590
|
+
seo: z.ZodOptional<z.ZodLazy<z.ZodObject<{
|
|
591
|
+
title: z.ZodOptional<z.ZodString>;
|
|
592
|
+
description: z.ZodOptional<z.ZodString>;
|
|
593
|
+
ogType: z.ZodOptional<z.ZodEnum<{
|
|
594
|
+
article: "article";
|
|
595
|
+
website: "website";
|
|
596
|
+
profile: "profile";
|
|
597
|
+
}>>;
|
|
598
|
+
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
599
|
+
summary: "summary";
|
|
600
|
+
summary_large_image: "summary_large_image";
|
|
601
|
+
}>>;
|
|
602
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
603
|
+
schemaOrgType: z.ZodOptional<z.ZodEnum<{
|
|
604
|
+
WebSite: "WebSite";
|
|
605
|
+
Person: "Person";
|
|
606
|
+
Organization: "Organization";
|
|
607
|
+
CreativeWork: "CreativeWork";
|
|
608
|
+
Product: "Product";
|
|
609
|
+
LocalBusiness: "LocalBusiness";
|
|
610
|
+
}>>;
|
|
611
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
612
|
+
twitterHandle: z.ZodOptional<z.ZodString>;
|
|
613
|
+
ogImageUrl: z.ZodOptional<z.ZodString>;
|
|
614
|
+
ogImageSource: z.ZodOptional<z.ZodEnum<{
|
|
615
|
+
snap: "snap";
|
|
616
|
+
upload: "upload";
|
|
617
|
+
}>>;
|
|
618
|
+
ogSnappedAt: z.ZodOptional<z.ZodNumber>;
|
|
619
|
+
robotsIndex: z.ZodOptional<z.ZodBoolean>;
|
|
620
|
+
faviconUrl: z.ZodOptional<z.ZodString>;
|
|
621
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
622
|
+
type: z.ZodOptional<z.ZodString>;
|
|
623
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
624
|
+
email: z.ZodOptional<z.ZodString>;
|
|
625
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
626
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
627
|
+
addressLocality: z.ZodOptional<z.ZodString>;
|
|
628
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
629
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
630
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
631
|
+
}, z.core.$strip>>;
|
|
632
|
+
areaServed: z.ZodOptional<z.ZodString>;
|
|
633
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
634
|
+
}, z.core.$strip>>;
|
|
635
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
region: z.ZodOptional<z.ZodString>;
|
|
637
|
+
placename: z.ZodOptional<z.ZodString>;
|
|
638
|
+
lat: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
lng: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
}, z.core.$strip>>;
|
|
641
|
+
}, z.core.$strip>>>;
|
|
642
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
643
|
+
}, z.core.$strip>>>;
|
|
644
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
645
|
+
theme: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
646
|
+
base: z.ZodEnum<{
|
|
647
|
+
"zero-point": "zero-point";
|
|
648
|
+
mui: "mui";
|
|
649
|
+
}>;
|
|
650
|
+
accent: z.ZodString;
|
|
651
|
+
typeCategory: z.ZodEnum<{
|
|
652
|
+
serif: "serif";
|
|
653
|
+
display: "display";
|
|
654
|
+
sans: "sans";
|
|
655
|
+
mono: "mono";
|
|
656
|
+
handwriting: "handwriting";
|
|
657
|
+
}>;
|
|
658
|
+
}, z.core.$strip>]>>;
|
|
659
|
+
designSystemId: z.ZodOptional<z.ZodString>;
|
|
660
|
+
skinId: z.ZodOptional<z.ZodString>;
|
|
661
|
+
surfaceKind: z.ZodOptional<z.ZodEnum<{
|
|
662
|
+
marketing: "marketing";
|
|
663
|
+
store: "store";
|
|
664
|
+
}>>;
|
|
665
|
+
seo: z.ZodOptional<z.ZodObject<{
|
|
666
|
+
title: z.ZodOptional<z.ZodString>;
|
|
667
|
+
description: z.ZodOptional<z.ZodString>;
|
|
668
|
+
ogType: z.ZodOptional<z.ZodEnum<{
|
|
669
|
+
article: "article";
|
|
670
|
+
website: "website";
|
|
671
|
+
profile: "profile";
|
|
672
|
+
}>>;
|
|
673
|
+
twitterCard: z.ZodOptional<z.ZodEnum<{
|
|
674
|
+
summary: "summary";
|
|
675
|
+
summary_large_image: "summary_large_image";
|
|
676
|
+
}>>;
|
|
677
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
678
|
+
schemaOrgType: z.ZodOptional<z.ZodEnum<{
|
|
679
|
+
WebSite: "WebSite";
|
|
680
|
+
Person: "Person";
|
|
681
|
+
Organization: "Organization";
|
|
682
|
+
CreativeWork: "CreativeWork";
|
|
683
|
+
Product: "Product";
|
|
684
|
+
LocalBusiness: "LocalBusiness";
|
|
685
|
+
}>>;
|
|
686
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
687
|
+
twitterHandle: z.ZodOptional<z.ZodString>;
|
|
688
|
+
ogImageUrl: z.ZodOptional<z.ZodString>;
|
|
689
|
+
ogImageSource: z.ZodOptional<z.ZodEnum<{
|
|
690
|
+
snap: "snap";
|
|
691
|
+
upload: "upload";
|
|
692
|
+
}>>;
|
|
693
|
+
ogSnappedAt: z.ZodOptional<z.ZodNumber>;
|
|
694
|
+
robotsIndex: z.ZodOptional<z.ZodBoolean>;
|
|
695
|
+
faviconUrl: z.ZodOptional<z.ZodString>;
|
|
696
|
+
localBusiness: z.ZodOptional<z.ZodObject<{
|
|
697
|
+
type: z.ZodOptional<z.ZodString>;
|
|
698
|
+
telephone: z.ZodOptional<z.ZodString>;
|
|
699
|
+
email: z.ZodOptional<z.ZodString>;
|
|
700
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
701
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
702
|
+
addressLocality: z.ZodOptional<z.ZodString>;
|
|
703
|
+
addressRegion: z.ZodOptional<z.ZodString>;
|
|
704
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
705
|
+
addressCountry: z.ZodOptional<z.ZodString>;
|
|
706
|
+
}, z.core.$strip>>;
|
|
707
|
+
areaServed: z.ZodOptional<z.ZodString>;
|
|
708
|
+
priceRange: z.ZodOptional<z.ZodString>;
|
|
709
|
+
}, z.core.$strip>>;
|
|
710
|
+
geo: z.ZodOptional<z.ZodObject<{
|
|
711
|
+
region: z.ZodOptional<z.ZodString>;
|
|
712
|
+
placename: z.ZodOptional<z.ZodString>;
|
|
713
|
+
lat: z.ZodOptional<z.ZodNumber>;
|
|
714
|
+
lng: z.ZodOptional<z.ZodNumber>;
|
|
715
|
+
}, z.core.$strip>>;
|
|
716
|
+
}, z.core.$strip>>;
|
|
717
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
718
|
+
chat: "chat";
|
|
719
|
+
builder: "builder";
|
|
720
|
+
"wizard-linkinbio": "wizard-linkinbio";
|
|
721
|
+
"wizard-marketing": "wizard-marketing";
|
|
722
|
+
"wizard-portfolio": "wizard-portfolio";
|
|
723
|
+
"wizard-blog": "wizard-blog";
|
|
724
|
+
"wizard-professional": "wizard-professional";
|
|
725
|
+
template: "template";
|
|
726
|
+
}>>;
|
|
727
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
728
|
+
builder: "builder";
|
|
729
|
+
easy: "easy";
|
|
730
|
+
}>>;
|
|
731
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
732
|
+
draft: "draft";
|
|
733
|
+
published: "published";
|
|
734
|
+
}>>;
|
|
735
|
+
copy: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
736
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
737
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
738
|
+
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
listingEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
740
|
+
derivedFrom: z.ZodOptional<z.ZodString>;
|
|
741
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
742
|
+
ds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
743
|
+
social: z.ZodOptional<z.ZodObject<{
|
|
744
|
+
profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
745
|
+
platform: z.ZodEnum<{
|
|
746
|
+
link: "link";
|
|
747
|
+
twitter: "twitter";
|
|
748
|
+
instagram: "instagram";
|
|
749
|
+
linkedin: "linkedin";
|
|
750
|
+
youtube: "youtube";
|
|
751
|
+
tiktok: "tiktok";
|
|
752
|
+
bluesky: "bluesky";
|
|
753
|
+
github: "github";
|
|
754
|
+
facebook: "facebook";
|
|
755
|
+
threads: "threads";
|
|
756
|
+
substack: "substack";
|
|
757
|
+
mastodon: "mastodon";
|
|
758
|
+
site: "site";
|
|
759
|
+
}>;
|
|
760
|
+
handle: z.ZodString;
|
|
761
|
+
url: z.ZodString;
|
|
762
|
+
connectedAt: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
764
|
+
}, z.core.$strip>>>;
|
|
765
|
+
syncFooter: z.ZodDefault<z.ZodBoolean>;
|
|
766
|
+
syncLinkStack: z.ZodDefault<z.ZodBoolean>;
|
|
767
|
+
}, z.core.$strip>>;
|
|
768
|
+
footerAttribution: z.ZodDefault<z.ZodEnum<{
|
|
769
|
+
default: "default";
|
|
770
|
+
custom: "custom";
|
|
771
|
+
hidden: "hidden";
|
|
772
|
+
logo: "logo";
|
|
773
|
+
}>>;
|
|
774
|
+
footerAttributionText: z.ZodOptional<z.ZodString>;
|
|
775
|
+
footerCopyrightText: z.ZodOptional<z.ZodString>;
|
|
776
|
+
footerDonateEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
777
|
+
footerDonateWhenHidden: z.ZodOptional<z.ZodBoolean>;
|
|
778
|
+
customDomain: z.ZodOptional<z.ZodString>;
|
|
779
|
+
customDomainWww: z.ZodOptional<z.ZodString>;
|
|
780
|
+
hostingTier: z.ZodOptional<z.ZodEnum<{
|
|
781
|
+
free: "free";
|
|
782
|
+
paid: "paid";
|
|
783
|
+
}>>;
|
|
784
|
+
launchedAt: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
launchVersion: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
stagingPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
productionPublishedAt: z.ZodOptional<z.ZodNumber>;
|
|
788
|
+
googleAnalyticsId: z.ZodOptional<z.ZodString>;
|
|
789
|
+
clientVisibility: z.ZodOptional<z.ZodObject<{
|
|
790
|
+
stagingMode: z.ZodEnum<{
|
|
791
|
+
password: "password";
|
|
792
|
+
public: "public";
|
|
793
|
+
}>;
|
|
794
|
+
productionMode: z.ZodEnum<{
|
|
795
|
+
coming_soon: "coming_soon";
|
|
796
|
+
live: "live";
|
|
797
|
+
}>;
|
|
798
|
+
hasStagingPassword: z.ZodBoolean;
|
|
799
|
+
ageGateMinimum: z.ZodOptional<z.ZodNumber>;
|
|
800
|
+
}, z.core.$strip>>;
|
|
801
|
+
commerce: z.ZodOptional<z.ZodObject<{
|
|
802
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
803
|
+
checkoutUrl: z.ZodOptional<z.ZodString>;
|
|
804
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
805
|
+
}, z.core.$strip>>;
|
|
806
|
+
onboarding: z.ZodOptional<z.ZodObject<{
|
|
807
|
+
phase: z.ZodEnum<{
|
|
808
|
+
slug: "slug";
|
|
809
|
+
intake: "intake";
|
|
810
|
+
brief_confirm: "brief_confirm";
|
|
811
|
+
kit_building: "kit_building";
|
|
812
|
+
styles_review: "styles_review";
|
|
813
|
+
layout_pick: "layout_pick";
|
|
814
|
+
content_sources: "content_sources";
|
|
815
|
+
landing_building: "landing_building";
|
|
816
|
+
spec: "spec";
|
|
817
|
+
scaffold_review: "scaffold_review";
|
|
818
|
+
ready: "ready";
|
|
819
|
+
}>;
|
|
820
|
+
brief: z.ZodOptional<z.ZodObject<{
|
|
821
|
+
name: z.ZodString;
|
|
822
|
+
category: z.ZodEnum<{
|
|
823
|
+
"local-service": "local-service";
|
|
824
|
+
portfolio: "portfolio";
|
|
825
|
+
"link-in-bio": "link-in-bio";
|
|
826
|
+
creator: "creator";
|
|
827
|
+
hospitality: "hospitality";
|
|
828
|
+
professional: "professional";
|
|
829
|
+
ecommerce: "ecommerce";
|
|
830
|
+
general: "general";
|
|
831
|
+
}>;
|
|
832
|
+
audience: z.ZodString;
|
|
833
|
+
voice: z.ZodEnum<{
|
|
834
|
+
professional: "professional";
|
|
835
|
+
friendly: "friendly";
|
|
836
|
+
bold: "bold";
|
|
837
|
+
minimal: "minimal";
|
|
838
|
+
luxury: "luxury";
|
|
839
|
+
}>;
|
|
840
|
+
designSystemRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
841
|
+
kind: z.ZodLiteral<"account-default">;
|
|
842
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
843
|
+
kind: z.ZodLiteral<"skin">;
|
|
844
|
+
skinId: z.ZodString;
|
|
845
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
846
|
+
kind: z.ZodLiteral<"design-system">;
|
|
847
|
+
id: z.ZodString;
|
|
848
|
+
}, z.core.$strip>], "kind">;
|
|
849
|
+
location: z.ZodOptional<z.ZodString>;
|
|
850
|
+
primaryGoal: z.ZodOptional<z.ZodEnum<{
|
|
851
|
+
portfolio: "portfolio";
|
|
852
|
+
book: "book";
|
|
853
|
+
call: "call";
|
|
854
|
+
shop: "shop";
|
|
855
|
+
donate: "donate";
|
|
856
|
+
}>>;
|
|
857
|
+
referenceUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
858
|
+
freeformNotes: z.ZodOptional<z.ZodString>;
|
|
859
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
860
|
+
remix: z.ZodOptional<z.ZodObject<{
|
|
861
|
+
url: z.ZodString;
|
|
862
|
+
seed: z.ZodObject<{
|
|
863
|
+
fonts: z.ZodObject<{
|
|
864
|
+
display: z.ZodString;
|
|
865
|
+
body: z.ZodString;
|
|
866
|
+
}, z.core.$strip>;
|
|
867
|
+
palette: z.ZodArray<z.ZodString>;
|
|
868
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
869
|
+
vibe: z.ZodOptional<z.ZodString>;
|
|
870
|
+
harvestedFrom: z.ZodOptional<z.ZodString>;
|
|
871
|
+
}, z.core.$strip>;
|
|
872
|
+
copy: z.ZodOptional<z.ZodObject<{
|
|
873
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
874
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
875
|
+
title: z.ZodOptional<z.ZodString>;
|
|
876
|
+
body: z.ZodString;
|
|
877
|
+
}, z.core.$strip>>;
|
|
878
|
+
contact: z.ZodOptional<z.ZodString>;
|
|
879
|
+
}, z.core.$strip>>;
|
|
880
|
+
}, z.core.$strip>>;
|
|
881
|
+
confirmedAt: z.ZodOptional<z.ZodNumber>;
|
|
882
|
+
}, z.core.$strip>>;
|
|
883
|
+
briefSlots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
884
|
+
designSpec: z.ZodOptional<z.ZodObject<{
|
|
885
|
+
specId: z.ZodString;
|
|
886
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
887
|
+
sectionId: z.ZodString;
|
|
888
|
+
instanceId: z.ZodString;
|
|
889
|
+
purpose: z.ZodString;
|
|
890
|
+
copyHints: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
891
|
+
layout: z.ZodOptional<z.ZodString>;
|
|
892
|
+
}, z.core.$strip>>;
|
|
893
|
+
visualLanguage: z.ZodObject<{
|
|
894
|
+
mood: z.ZodString;
|
|
895
|
+
skinId: z.ZodString;
|
|
896
|
+
density: z.ZodEnum<{
|
|
897
|
+
airy: "airy";
|
|
898
|
+
balanced: "balanced";
|
|
899
|
+
dense: "dense";
|
|
900
|
+
}>;
|
|
901
|
+
}, z.core.$strip>;
|
|
902
|
+
copyStrategy: z.ZodObject<{
|
|
903
|
+
voice: z.ZodEnum<{
|
|
904
|
+
professional: "professional";
|
|
905
|
+
friendly: "friendly";
|
|
906
|
+
bold: "bold";
|
|
907
|
+
minimal: "minimal";
|
|
908
|
+
luxury: "luxury";
|
|
909
|
+
}>;
|
|
910
|
+
headlineAngle: z.ZodString;
|
|
911
|
+
ctaPrimary: z.ZodString;
|
|
912
|
+
}, z.core.$strip>;
|
|
913
|
+
archetypeManifestId: z.ZodOptional<z.ZodString>;
|
|
914
|
+
referenceNotes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
915
|
+
createdAt: z.ZodNumber;
|
|
916
|
+
}, z.core.$strip>>;
|
|
917
|
+
complete: z.ZodOptional<z.ZodObject<{
|
|
918
|
+
completeId: z.ZodString;
|
|
919
|
+
briefRef: z.ZodString;
|
|
920
|
+
designSpecRef: z.ZodString;
|
|
921
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
922
|
+
sectionId: z.ZodString;
|
|
923
|
+
instanceId: z.ZodString;
|
|
924
|
+
copy: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
925
|
+
layout: z.ZodOptional<z.ZodString>;
|
|
926
|
+
}, z.core.$strip>>;
|
|
927
|
+
skinId: z.ZodString;
|
|
928
|
+
createdAt: z.ZodNumber;
|
|
929
|
+
}, z.core.$strip>>;
|
|
930
|
+
annotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
931
|
+
instanceId: z.ZodString;
|
|
932
|
+
note: z.ZodString;
|
|
933
|
+
createdAt: z.ZodNumber;
|
|
934
|
+
}, z.core.$strip>>>;
|
|
935
|
+
chatLog: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
936
|
+
id: z.ZodString;
|
|
937
|
+
role: z.ZodEnum<{
|
|
938
|
+
user: "user";
|
|
939
|
+
assistant: "assistant";
|
|
940
|
+
}>;
|
|
941
|
+
content: z.ZodString;
|
|
942
|
+
createdAt: z.ZodNumber;
|
|
943
|
+
}, z.core.$strip>>>;
|
|
944
|
+
startAnswers: z.ZodOptional<z.ZodObject<{
|
|
945
|
+
purpose: z.ZodString;
|
|
946
|
+
name: z.ZodString;
|
|
947
|
+
feel: z.ZodString;
|
|
948
|
+
}, z.core.$strip>>;
|
|
949
|
+
startReference: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
950
|
+
kind: z.ZodLiteral<"url">;
|
|
951
|
+
url: z.ZodString;
|
|
952
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
953
|
+
kind: z.ZodLiteral<"design-kit">;
|
|
954
|
+
fileName: z.ZodString;
|
|
955
|
+
hints: z.ZodObject<{
|
|
956
|
+
fonts: z.ZodArray<z.ZodString>;
|
|
957
|
+
palette: z.ZodArray<z.ZodString>;
|
|
958
|
+
textSkeleton: z.ZodString;
|
|
959
|
+
}, z.core.$strip>;
|
|
960
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
961
|
+
kind: z.ZodLiteral<"image">;
|
|
962
|
+
fileName: z.ZodString;
|
|
963
|
+
palette: z.ZodArray<z.ZodString>;
|
|
964
|
+
}, z.core.$strip>], "kind">>;
|
|
965
|
+
pagePatternId: z.ZodOptional<z.ZodString>;
|
|
966
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
967
|
+
id: z.ZodString;
|
|
968
|
+
kind: z.ZodEnum<{
|
|
969
|
+
url: "url";
|
|
970
|
+
doc: "doc";
|
|
971
|
+
sheet: "sheet";
|
|
972
|
+
drive: "drive";
|
|
973
|
+
}>;
|
|
974
|
+
url: z.ZodString;
|
|
975
|
+
title: z.ZodString;
|
|
976
|
+
summary: z.ZodString;
|
|
977
|
+
text: z.ZodOptional<z.ZodString>;
|
|
978
|
+
rows: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
979
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
980
|
+
id: z.ZodString;
|
|
981
|
+
name: z.ZodString;
|
|
982
|
+
thumb: z.ZodString;
|
|
983
|
+
}, z.core.$strip>>>;
|
|
984
|
+
addedAt: z.ZodNumber;
|
|
985
|
+
}, z.core.$strip>>>;
|
|
986
|
+
voice: z.ZodOptional<z.ZodObject<{
|
|
987
|
+
tone: z.ZodOptional<z.ZodString>;
|
|
988
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
989
|
+
avoid: z.ZodOptional<z.ZodString>;
|
|
990
|
+
}, z.core.$strip>>;
|
|
991
|
+
slugProvisional: z.ZodOptional<z.ZodBoolean>;
|
|
992
|
+
kitDraftStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
993
|
+
}, 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
|
+
}, z.core.$strip>;
|
|
1059
|
+
type CompositionSite = z.infer<typeof CompositionSiteSchema> & {
|
|
1060
|
+
onboarding?: SiteOnboarding;
|
|
1061
|
+
/** Frozen resolved style written at publish; hosted render prefers this. */
|
|
1062
|
+
styleSnapshot?: SiteStyleSnapshot;
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Props every section component receives. `copy` already has the instance
|
|
1067
|
+
* prefix stripped — slots are keyed by their schema key.
|
|
1068
|
+
* Sections style using nertia's design-system CSS vars (var(--foreground),
|
|
1069
|
+
* var(--background), var(--accent), etc.) — the hosted site wrapper injects
|
|
1070
|
+
* the user's brand color as --accent; dark/light mode cascades from globals.
|
|
1071
|
+
*/
|
|
1072
|
+
interface SectionProps {
|
|
1073
|
+
copy: Record<string, string>;
|
|
1074
|
+
/** Set on hosted pages for live feed sections (Phase 2). */
|
|
1075
|
+
siteSlug?: string;
|
|
1076
|
+
/** Section instance id — used for contact form submissions. */
|
|
1077
|
+
instanceId?: string;
|
|
1078
|
+
layout?: string;
|
|
1079
|
+
/** Marketing hero only — fills the main column below the navbar. */
|
|
1080
|
+
fullHeight?: boolean;
|
|
1081
|
+
/** Nested blocks rendered inside layout shells. */
|
|
1082
|
+
slotContent?: ReactNode;
|
|
1083
|
+
/**
|
|
1084
|
+
* `layout-container` only. The explicit 12-column span of each direct child,
|
|
1085
|
+
* set by the renderers when any child carries one. Present means the container
|
|
1086
|
+
* drops its preset classes for `grid-cols-12`; absent means nothing changes.
|
|
1087
|
+
*/
|
|
1088
|
+
childSpans?: number[];
|
|
1089
|
+
/** Builder-only — open insert drawer on a tab (layout shells). */
|
|
1090
|
+
builderInsert?: {
|
|
1091
|
+
openTab: (tab: 'structure' | 'components') => void;
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
type SectionRegistry = Record<string, ComponentType<SectionProps>>;
|
|
1096
|
+
interface SiteRendererProps {
|
|
1097
|
+
site: CompositionSite;
|
|
1098
|
+
registry: SectionRegistry;
|
|
1099
|
+
/** CSS isolation scope; defaults to the site slug. */
|
|
1100
|
+
scope?: string;
|
|
1101
|
+
/** Layer 2 structural styles. Omit for pure CSS-var tokens (Layer 1). */
|
|
1102
|
+
compiledSkin?: CompiledSkin;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Framework-agnostic, synchronous composition renderer.
|
|
1106
|
+
* Mirrors the hosted CompositionRenderer loop without RSC/async/Firebase:
|
|
1107
|
+
* sections are supplied via `registry` rather than the global getSection.
|
|
1108
|
+
*/
|
|
1109
|
+
declare function SiteRenderer({ site, registry, scope, compiledSkin }: SiteRendererProps): React.JSX.Element;
|
|
1110
|
+
|
|
1111
|
+
/** Render a composition to a static HTML string (no React runtime needed). */
|
|
1112
|
+
declare function renderSiteToHtml(site: CompositionSite, registry: SectionRegistry, scope?: string, compiledSkin?: CompiledSkin): string;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Adaptive site skins — every preset responds to prefers-color-scheme automatically.
|
|
1116
|
+
* Stored site.ds holds light-mode snapshot + optional overrides; render uses SiteSurface.
|
|
1117
|
+
*/
|
|
1118
|
+
|
|
1119
|
+
/** Core palette per color scheme — sections read expanded aliases on the wrapper. */
|
|
1120
|
+
interface SkinModeTokens {
|
|
1121
|
+
background: string;
|
|
1122
|
+
foreground: string;
|
|
1123
|
+
muted: string;
|
|
1124
|
+
mutedFg: string;
|
|
1125
|
+
border: string;
|
|
1126
|
+
accent: string;
|
|
1127
|
+
accentFg: string;
|
|
1128
|
+
}
|
|
1129
|
+
interface AdaptiveSkinDefinition {
|
|
1130
|
+
id: string;
|
|
1131
|
+
name: string;
|
|
1132
|
+
/** UI swatch / SkinSwitcher preview */
|
|
1133
|
+
font: string;
|
|
1134
|
+
radius: number;
|
|
1135
|
+
radiusCss: string;
|
|
1136
|
+
fontSans: string;
|
|
1137
|
+
fontHeading: string;
|
|
1138
|
+
base?: boolean;
|
|
1139
|
+
light: SkinModeTokens;
|
|
1140
|
+
dark: SkinModeTokens;
|
|
1141
|
+
/** Per-scheme extensions: shadows, shape scale, MD color roles, etc. */
|
|
1142
|
+
extraLight?: Record<string, string>;
|
|
1143
|
+
extraDark?: Record<string, string>;
|
|
1144
|
+
}
|
|
1145
|
+
declare function getAdaptiveSkin(id: string): AdaptiveSkinDefinition;
|
|
1146
|
+
declare function isRegisteredSkinId(skinId: string): boolean;
|
|
1147
|
+
declare function resolveSkinId(site: {
|
|
1148
|
+
skinId?: string;
|
|
1149
|
+
ds?: Record<string, string>;
|
|
1150
|
+
}): string;
|
|
1151
|
+
/** Builder floater + intake — shadcn themes only (themes.ts). */
|
|
1152
|
+
declare const PHASE1_SKIN_IDS: readonly string[];
|
|
1153
|
+
|
|
1154
|
+
export { type AdaptiveSkinDefinition, type CompiledSkin, PHASE1_SKIN_IDS as PRESET_SKIN_IDS, type SectionRegistry, SiteRenderer, type SiteRendererProps, type SkinModeTokens, getAdaptiveSkin, isRegisteredSkinId, renderSiteToHtml, resolveSkinId };
|