@orion-studios/payload-studio 0.5.0-beta.11 → 0.5.0-beta.111

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.
Files changed (77) hide show
  1. package/README.md +54 -0
  2. package/dist/admin/client.d.mts +3 -0
  3. package/dist/admin/client.d.ts +3 -0
  4. package/dist/admin/client.js +1745 -200
  5. package/dist/admin/client.mjs +1756 -214
  6. package/dist/admin/index.d.mts +2 -1
  7. package/dist/admin/index.d.ts +2 -1
  8. package/dist/admin/index.js +424 -11
  9. package/dist/admin/index.mjs +19 -1
  10. package/dist/admin-app/client.d.mts +7 -0
  11. package/dist/admin-app/client.d.ts +7 -0
  12. package/dist/admin-app/client.js +1270 -3
  13. package/dist/admin-app/client.mjs +1172 -2
  14. package/dist/admin-app/index.d.mts +1 -1
  15. package/dist/admin-app/index.d.ts +1 -1
  16. package/dist/admin-app/index.js +167 -0
  17. package/dist/admin-app/index.mjs +13 -1
  18. package/dist/admin-app/styles.css +247 -0
  19. package/dist/admin.css +8 -0
  20. package/dist/blocks/index.js +1011 -191
  21. package/dist/blocks/index.mjs +2 -2
  22. package/dist/chunk-ADIIWIYL.mjs +322 -0
  23. package/dist/{chunk-ZLLNO5FM.mjs → chunk-BET2YLAS.mjs} +104 -15
  24. package/dist/chunk-DAIZDGHL.mjs +614 -0
  25. package/dist/chunk-GKMBYYXF.mjs +776 -0
  26. package/dist/chunk-JQAHXYAM.mjs +1829 -0
  27. package/dist/chunk-OQSEJXC4.mjs +166 -0
  28. package/dist/chunk-PF3EBZXF.mjs +326 -0
  29. package/dist/chunk-ROTPP5CU.mjs +99 -0
  30. package/dist/chunk-XVH5SCBD.mjs +234 -0
  31. package/dist/chunk-ZTXJG4K5.mjs +85 -0
  32. package/dist/index-7lxTrxSG.d.mts +128 -0
  33. package/dist/index-7lxTrxSG.d.ts +128 -0
  34. package/dist/index-B7QvY3yF.d.mts +245 -0
  35. package/dist/index-BK03FiEM.d.ts +245 -0
  36. package/dist/{index-CmR6NInu.d.ts → index-BzKOThsI.d.mts} +30 -3
  37. package/dist/{index-CmR6NInu.d.mts → index-BzKOThsI.d.ts} +30 -3
  38. package/dist/{index-DbH0Ljwp.d.mts → index-D8BNfUJb.d.mts} +17 -2
  39. package/dist/{index-DbH0Ljwp.d.ts → index-DD_E2UfJ.d.ts} +17 -2
  40. package/dist/index-DUi_XND6.d.ts +193 -0
  41. package/dist/index-gLl_358v.d.mts +193 -0
  42. package/dist/index.d.mts +6 -5
  43. package/dist/index.d.ts +6 -5
  44. package/dist/index.js +2876 -460
  45. package/dist/index.mjs +12 -10
  46. package/dist/nextjs/index.d.mts +2 -1
  47. package/dist/nextjs/index.d.ts +2 -1
  48. package/dist/nextjs/index.js +497 -16
  49. package/dist/nextjs/index.mjs +8 -3
  50. package/dist/socialMedia-C05Iy-SV.d.mts +21 -0
  51. package/dist/socialMedia-C05Iy-SV.d.ts +21 -0
  52. package/dist/studio/index.d.mts +2 -1
  53. package/dist/studio/index.d.ts +2 -1
  54. package/dist/studio/index.js +171 -5
  55. package/dist/studio/index.mjs +7 -3
  56. package/dist/studio-pages/builder.css +517 -32
  57. package/dist/studio-pages/client.d.mts +75 -1
  58. package/dist/studio-pages/client.d.ts +75 -1
  59. package/dist/studio-pages/client.js +5662 -2759
  60. package/dist/studio-pages/client.mjs +5578 -2767
  61. package/dist/studio-pages/index.d.mts +4 -2
  62. package/dist/studio-pages/index.d.ts +4 -2
  63. package/dist/studio-pages/index.js +859 -71
  64. package/dist/studio-pages/index.mjs +10 -4
  65. package/package.json +35 -13
  66. package/dist/chunk-AAOHJDNS.mjs +0 -67
  67. package/dist/chunk-ETRRXURT.mjs +0 -141
  68. package/dist/chunk-J7W5EE3B.mjs +0 -278
  69. package/dist/chunk-N67KVM2S.mjs +0 -156
  70. package/dist/chunk-NESLJZFE.mjs +0 -303
  71. package/dist/chunk-U5BSPWAD.mjs +0 -1034
  72. package/dist/index-B9N5MyjF.d.mts +0 -39
  73. package/dist/index-BallJs-K.d.mts +0 -43
  74. package/dist/index-BallJs-K.d.ts +0 -43
  75. package/dist/index-DJFhANvJ.d.mts +0 -128
  76. package/dist/index-DJFhANvJ.d.ts +0 -128
  77. package/dist/index-g8tBHLKD.d.ts +0 -39
@@ -0,0 +1,776 @@
1
+ import {
2
+ sectionStyleDefaults
3
+ } from "./chunk-OQSEJXC4.mjs";
4
+ import {
5
+ createDefaultStudioDocument,
6
+ defaultBuilderThemeTokens,
7
+ layoutToStudioDocument,
8
+ migrateBlockToSettingsV2,
9
+ studioDocumentToLayout
10
+ } from "./chunk-PF3EBZXF.mjs";
11
+ import {
12
+ __export
13
+ } from "./chunk-6BWS3CLP.mjs";
14
+
15
+ // src/studio-pages/index.ts
16
+ var studio_pages_exports = {};
17
+ __export(studio_pages_exports, {
18
+ createDefaultStudioDocument: () => createDefaultStudioDocument,
19
+ defaultBuilderThemeTokens: () => defaultBuilderThemeTokens,
20
+ layoutToStudioDocument: () => layoutToStudioDocument,
21
+ pageInspectorPanels: () => pageInspectorPanels,
22
+ pageNodeTypes: () => pageNodeTypes,
23
+ pagePaletteGroups: () => pagePaletteGroups,
24
+ pageStudioModuleManifest: () => pageStudioModuleManifest,
25
+ resolveBuilderThemeTokens: () => resolveBuilderThemeTokens,
26
+ studioDocumentToLayout: () => studioDocumentToLayout
27
+ });
28
+
29
+ // src/studio-pages/builder/settings-v2/themeTokens.ts
30
+ var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
31
+ var merge = (base, next) => {
32
+ if (!next || !isRecord(next)) {
33
+ return base;
34
+ }
35
+ const merged = { ...base };
36
+ for (const [key, value] of Object.entries(next)) {
37
+ if (isRecord(value) && isRecord(merged[key])) {
38
+ merged[key] = merge(merged[key], value);
39
+ continue;
40
+ }
41
+ if (typeof value !== "undefined") {
42
+ merged[key] = value;
43
+ }
44
+ }
45
+ return merged;
46
+ };
47
+ var resolveBuilderThemeTokens = (layers) => {
48
+ const withSite = merge(defaultBuilderThemeTokens, layers.site);
49
+ const withPage = merge(withSite, layers.page);
50
+ return merge(withPage, layers.block);
51
+ };
52
+
53
+ // src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
54
+ import { useMemo, useState as useState2 } from "react";
55
+
56
+ // src/studio-pages/builder/ui/Accordion.tsx
57
+ import { useEffect, useState } from "react";
58
+ import { jsx, jsxs } from "react/jsx-runtime";
59
+
60
+ // src/studio-pages/builder/ui/ImageControls.tsx
61
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
62
+
63
+ // src/studio-pages/builder/settings-v2/inspectorSchema.ts
64
+ var alignOptions = [
65
+ { label: "Left", value: "left" },
66
+ { label: "Center", value: "center" },
67
+ { label: "Right", value: "right" },
68
+ { label: "Justify", value: "justify" }
69
+ ];
70
+ var layoutFieldSet = [];
71
+ var typographyFieldSet = [
72
+ {
73
+ group: "typography",
74
+ key: "settings.typography.headingAlign",
75
+ label: "Heading Alignment",
76
+ options: alignOptions,
77
+ tags: ["text", "align", "heading"],
78
+ type: "select"
79
+ },
80
+ {
81
+ group: "typography",
82
+ key: "settings.typography.bodyAlign",
83
+ label: "Body Alignment",
84
+ options: alignOptions,
85
+ tags: ["text", "align", "paragraph"],
86
+ type: "select"
87
+ },
88
+ {
89
+ group: "typography",
90
+ key: "settings.typography.maxTextWidth",
91
+ label: "Text Width",
92
+ options: [
93
+ { label: "Auto", value: "auto" },
94
+ { label: "Small", value: "sm" },
95
+ { label: "Medium", value: "md" },
96
+ { label: "Large", value: "lg" },
97
+ { label: "Full", value: "full" }
98
+ ],
99
+ tags: ["readability", "measure", "line length"],
100
+ type: "select"
101
+ },
102
+ {
103
+ advanced: true,
104
+ group: "typography",
105
+ key: "settings.typography.lineHeightPreset",
106
+ label: "Line Height",
107
+ options: [
108
+ { label: "Tight", value: "tight" },
109
+ { label: "Normal", value: "normal" },
110
+ { label: "Relaxed", value: "relaxed" }
111
+ ],
112
+ type: "select"
113
+ },
114
+ {
115
+ advanced: true,
116
+ group: "typography",
117
+ key: "settings.typography.letterSpacingPreset",
118
+ label: "Letter Spacing",
119
+ options: [
120
+ { label: "Tight", value: "tight" },
121
+ { label: "Normal", value: "normal" },
122
+ { label: "Relaxed", value: "relaxed" }
123
+ ],
124
+ type: "select"
125
+ }
126
+ ];
127
+ var styleFieldSet = [];
128
+ var commonAdvanced = [
129
+ {
130
+ group: "advanced",
131
+ inlineEditable: false,
132
+ key: "settings.advanced.editCopyInPanel",
133
+ label: "Edit Copy In Panel",
134
+ tags: ["inline", "copy", "text"],
135
+ type: "checkbox"
136
+ },
137
+ {
138
+ advanced: true,
139
+ group: "advanced",
140
+ key: "settings.advanced.hideOnMobile",
141
+ label: "Hide On Mobile",
142
+ type: "checkbox"
143
+ },
144
+ {
145
+ advanced: true,
146
+ group: "advanced",
147
+ key: "settings.advanced.customClassName",
148
+ label: "Custom Class Name",
149
+ type: "text"
150
+ }
151
+ ];
152
+ var mediaFieldSet = [
153
+ {
154
+ group: "media",
155
+ key: "settings.media.fit",
156
+ label: "Image Fit",
157
+ options: [
158
+ { label: "Cover", value: "cover" },
159
+ { label: "Contain", value: "contain" }
160
+ ],
161
+ tags: ["image", "media"],
162
+ type: "select"
163
+ },
164
+ {
165
+ group: "media",
166
+ key: "settings.media.cornerStyle",
167
+ label: "Image Corners",
168
+ options: [
169
+ { label: "Rounded", value: "rounded" },
170
+ { label: "Square", value: "square" }
171
+ ],
172
+ tags: ["image", "radius", "corners"],
173
+ type: "select"
174
+ }
175
+ ];
176
+ var inspectorDefinitionByBlockType = {
177
+ beforeAfter: {
178
+ blockType: "beforeAfter",
179
+ fields: [
180
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
181
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
182
+ { group: "basics", key: "itemsPerRow", label: "Items Per Row", max: 4, min: 1, type: "number" },
183
+ ...layoutFieldSet,
184
+ ...typographyFieldSet,
185
+ ...styleFieldSet,
186
+ ...commonAdvanced
187
+ ]
188
+ },
189
+ bookingEmbed: {
190
+ blockType: "bookingEmbed",
191
+ fields: [
192
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
193
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
194
+ { group: "basics", inlineEditable: false, key: "buttonLabel", label: "Button Label", type: "text" },
195
+ { group: "basics", inlineEditable: false, key: "buttonHref", label: "Button URL", type: "text" },
196
+ ...layoutFieldSet,
197
+ ...typographyFieldSet,
198
+ ...styleFieldSet,
199
+ ...commonAdvanced
200
+ ]
201
+ },
202
+ cta: {
203
+ blockType: "cta",
204
+ fields: [
205
+ { group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
206
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
207
+ { group: "basics", inlineEditable: false, key: "buttonLabel", label: "Button Label", type: "text" },
208
+ { group: "basics", inlineEditable: false, key: "buttonHref", label: "Button URL", type: "text" },
209
+ {
210
+ group: "basics",
211
+ key: "style",
212
+ label: "Variant",
213
+ options: [
214
+ { label: "Light", value: "light" },
215
+ { label: "Dark", value: "dark" }
216
+ ],
217
+ type: "select"
218
+ },
219
+ ...layoutFieldSet,
220
+ ...typographyFieldSet,
221
+ ...styleFieldSet,
222
+ ...commonAdvanced
223
+ ]
224
+ },
225
+ faq: {
226
+ blockType: "faq",
227
+ fields: [
228
+ { group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
229
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
230
+ ...layoutFieldSet,
231
+ ...typographyFieldSet,
232
+ ...styleFieldSet,
233
+ ...commonAdvanced
234
+ ]
235
+ },
236
+ featureGrid: {
237
+ blockType: "featureGrid",
238
+ fields: [
239
+ { group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
240
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
241
+ {
242
+ group: "basics",
243
+ key: "variant",
244
+ label: "Variant",
245
+ options: [
246
+ { label: "Cards", value: "cards" },
247
+ { label: "Highlight", value: "highlight" },
248
+ { label: "Split List", value: "splitList" },
249
+ { label: "Panels", value: "panels" },
250
+ { label: "Catalog", value: "catalog" },
251
+ { label: "Contact Split", value: "contact" }
252
+ ],
253
+ type: "select"
254
+ },
255
+ { group: "basics", key: "itemsPerRow", label: "Items Per Row", max: 6, min: 1, type: "number" },
256
+ ...layoutFieldSet,
257
+ ...typographyFieldSet,
258
+ ...mediaFieldSet,
259
+ ...styleFieldSet,
260
+ ...commonAdvanced
261
+ ]
262
+ },
263
+ formEmbed: {
264
+ blockType: "formEmbed",
265
+ fields: [
266
+ { group: "basics", inlineEditable: true, key: "eyebrow", label: "Eyebrow", type: "text" },
267
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
268
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
269
+ {
270
+ group: "basics",
271
+ key: "formType",
272
+ label: "Form Type",
273
+ options: [{ label: "Quote", value: "quote" }],
274
+ type: "select"
275
+ },
276
+ ...layoutFieldSet,
277
+ ...typographyFieldSet,
278
+ ...styleFieldSet,
279
+ ...commonAdvanced
280
+ ]
281
+ },
282
+ hero: {
283
+ blockType: "hero",
284
+ fields: [
285
+ { group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
286
+ { group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
287
+ { group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
288
+ {
289
+ group: "basics",
290
+ key: "variant",
291
+ label: "Variant",
292
+ options: [
293
+ { label: "Default", value: "default" },
294
+ { label: "Centered", value: "centered" }
295
+ ],
296
+ type: "select"
297
+ },
298
+ {
299
+ group: "basics",
300
+ key: "heroHeight",
301
+ label: "Hero Height",
302
+ options: [
303
+ { label: "Small", value: "sm" },
304
+ { label: "Medium (Half Screen)", value: "md" },
305
+ { label: "Full Screen", value: "full" }
306
+ ],
307
+ type: "select"
308
+ },
309
+ ...layoutFieldSet,
310
+ ...typographyFieldSet,
311
+ ...mediaFieldSet,
312
+ ...styleFieldSet,
313
+ ...commonAdvanced
314
+ ]
315
+ },
316
+ logoWall: {
317
+ blockType: "logoWall",
318
+ fields: [
319
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
320
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
321
+ ...layoutFieldSet,
322
+ ...typographyFieldSet,
323
+ ...mediaFieldSet,
324
+ ...styleFieldSet,
325
+ ...commonAdvanced
326
+ ]
327
+ },
328
+ media: {
329
+ blockType: "media",
330
+ fields: [
331
+ { group: "basics", inlineEditable: true, key: "caption", label: "Caption", type: "text" },
332
+ {
333
+ group: "basics",
334
+ key: "size",
335
+ label: "Size",
336
+ options: [
337
+ { label: "Default", value: "default" },
338
+ { label: "Wide", value: "wide" }
339
+ ],
340
+ type: "select"
341
+ },
342
+ ...layoutFieldSet,
343
+ ...typographyFieldSet,
344
+ ...mediaFieldSet,
345
+ ...styleFieldSet,
346
+ ...commonAdvanced
347
+ ]
348
+ },
349
+ richText: {
350
+ blockType: "richText",
351
+ fields: [
352
+ {
353
+ group: "basics",
354
+ key: "variant",
355
+ label: "Variant",
356
+ options: [
357
+ { label: "Default", value: "default" },
358
+ { label: "Quote Banner", value: "quoteBanner" }
359
+ ],
360
+ type: "select"
361
+ },
362
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
363
+ {
364
+ group: "basics",
365
+ key: "width",
366
+ label: "Rich Text Width",
367
+ options: [
368
+ { label: "Normal", value: "normal" },
369
+ { label: "Narrow", value: "narrow" }
370
+ ],
371
+ type: "select"
372
+ },
373
+ ...layoutFieldSet,
374
+ ...typographyFieldSet,
375
+ ...styleFieldSet,
376
+ ...commonAdvanced
377
+ ]
378
+ },
379
+ stats: {
380
+ blockType: "stats",
381
+ fields: [
382
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
383
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
384
+ ...layoutFieldSet,
385
+ ...typographyFieldSet,
386
+ ...styleFieldSet,
387
+ ...commonAdvanced
388
+ ]
389
+ },
390
+ testimonials: {
391
+ blockType: "testimonials",
392
+ fields: [
393
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
394
+ { group: "basics", key: "visibleCount", label: "Visible At Once", max: 6, min: 1, type: "number" },
395
+ { group: "basics", key: "autoRotate", label: "Auto Rotate", type: "checkbox" },
396
+ {
397
+ advanced: true,
398
+ group: "advanced",
399
+ key: "rotateIntervalSeconds",
400
+ label: "Rotate Interval Seconds",
401
+ max: 30,
402
+ min: 2,
403
+ type: "number"
404
+ },
405
+ ...layoutFieldSet,
406
+ ...typographyFieldSet,
407
+ ...styleFieldSet,
408
+ ...commonAdvanced
409
+ ]
410
+ }
411
+ };
412
+
413
+ // src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
414
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
415
+
416
+ // src/studio-pages/migrations.ts
417
+ var isRecord2 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
418
+ var assertPageStudioDocumentV1 = (value) => {
419
+ if (!isRecord2(value)) {
420
+ throw new Error("Studio document must be an object");
421
+ }
422
+ if (value.schemaVersion !== 1) {
423
+ throw new Error("Unsupported studio schemaVersion");
424
+ }
425
+ if (!Array.isArray(value.nodes)) {
426
+ throw new Error("Studio document nodes must be an array");
427
+ }
428
+ const nodes = value.nodes.map((node, index) => {
429
+ if (!isRecord2(node)) {
430
+ throw new Error(`Node at index ${index} must be an object`);
431
+ }
432
+ if (typeof node.id !== "string" || node.id.length === 0) {
433
+ throw new Error(`Node at index ${index} has invalid id`);
434
+ }
435
+ if (typeof node.type !== "string" || node.type.length === 0) {
436
+ throw new Error(`Node at index ${index} has invalid type`);
437
+ }
438
+ if (!isRecord2(node.data)) {
439
+ throw new Error(`Node at index ${index} has invalid data`);
440
+ }
441
+ return {
442
+ data: node.data,
443
+ id: node.id,
444
+ type: node.type
445
+ };
446
+ });
447
+ return {
448
+ metadata: isRecord2(value.metadata) ? value.metadata : void 0,
449
+ nodes,
450
+ schemaVersion: 1,
451
+ title: typeof value.title === "string" ? value.title : void 0,
452
+ updatedAt: typeof value.updatedAt === "string" ? value.updatedAt : void 0
453
+ };
454
+ };
455
+ var migratePageNodeToSettingsV2 = (node) => {
456
+ const normalized = migrateBlockToSettingsV2({
457
+ blockType: node.type,
458
+ ...node.data
459
+ });
460
+ const { blockType: _ignoredBlockType, ...data } = normalized;
461
+ return {
462
+ ...node,
463
+ data
464
+ };
465
+ };
466
+ var migratePageDocumentSettingsToV2 = (value) => {
467
+ const current = assertPageStudioDocumentV1(value);
468
+ return {
469
+ ...current,
470
+ nodes: current.nodes.map(migratePageNodeToSettingsV2)
471
+ };
472
+ };
473
+ var pageStudioMigrations = [
474
+ {
475
+ fromVersion: 1,
476
+ migrate: migratePageDocumentSettingsToV2,
477
+ toVersion: 1
478
+ }
479
+ ];
480
+
481
+ // src/studio-pages/index.ts
482
+ var withSectionStyleDefaults = (value) => ({
483
+ ...sectionStyleDefaults,
484
+ ...value
485
+ });
486
+ var defaultNodeData = {
487
+ bookingEmbed: {
488
+ ...withSectionStyleDefaults({}),
489
+ buttonHref: "/contact",
490
+ buttonLabel: "Book Consultation",
491
+ description: "Let visitors book a consultation.",
492
+ title: "Book a Time"
493
+ },
494
+ beforeAfter: withSectionStyleDefaults({
495
+ itemsPerRow: 2,
496
+ items: [
497
+ {
498
+ description: "Before and after result summary.",
499
+ imageCornerStyle: "rounded",
500
+ imageFit: "cover",
501
+ imagePosition: "center",
502
+ label: "Project One"
503
+ }
504
+ ],
505
+ subtitle: "Show visual proof from real projects.",
506
+ title: "Before & After Results"
507
+ }),
508
+ cta: {
509
+ ...withSectionStyleDefaults({}),
510
+ backgroundColor: "",
511
+ bullets: [],
512
+ buttonHref: "/contact",
513
+ buttonLabel: "Contact Us",
514
+ description: "Optional supporting copy.",
515
+ eyebrow: "",
516
+ headline: "Ready to get started?",
517
+ imageURL: "",
518
+ style: "light"
519
+ },
520
+ faq: {
521
+ ...withSectionStyleDefaults({}),
522
+ items: [{ answer: "Answer goes here.", question: "Frequently asked question?" }],
523
+ title: "Frequently Asked Questions"
524
+ },
525
+ featureGrid: {
526
+ ...withSectionStyleDefaults({}),
527
+ itemsPerRow: 3,
528
+ items: [
529
+ { description: "Explain this point.", iconType: "badge", icon: "01", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature One" },
530
+ { description: "Explain this point.", iconType: "badge", icon: "02", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Two" },
531
+ { description: "Explain this point.", iconType: "badge", icon: "03", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Three" }
532
+ ],
533
+ subtitle: "",
534
+ title: "Section Title",
535
+ variant: "cards"
536
+ },
537
+ formEmbed: {
538
+ ...withSectionStyleDefaults({}),
539
+ description: "Collect lead details from visitors.",
540
+ formType: "quote",
541
+ submitLabel: "Submit",
542
+ title: "Request a Quote"
543
+ },
544
+ hero: {
545
+ ...withSectionStyleDefaults({}),
546
+ backgroundColor: "",
547
+ backgroundImageURL: "",
548
+ backgroundOverlayMode: "none",
549
+ backgroundOverlayOpacity: 45,
550
+ backgroundOverlayColor: "#000000",
551
+ backgroundOverlayGradientFrom: "#334b63",
552
+ backgroundOverlayGradientTo: "#496582",
553
+ backgroundOverlayGradientAngle: "135",
554
+ backgroundOverlayGradientFromStrength: 100,
555
+ backgroundOverlayGradientToStrength: 100,
556
+ backgroundOverlayGradientStart: 0,
557
+ backgroundOverlayGradientEnd: 100,
558
+ backgroundOverlayGradientFeather: 100,
559
+ backgroundImageCornerStyle: "rounded",
560
+ backgroundImageFit: "cover",
561
+ backgroundImagePosition: "center",
562
+ heroHeight: "sm",
563
+ headline: "New Hero Section",
564
+ kicker: "Optional kicker",
565
+ primaryHref: "/contact",
566
+ primaryLabel: "Primary Action",
567
+ secondaryHref: "/services",
568
+ secondaryLabel: "Secondary Action",
569
+ subheadline: "Describe your offer clearly for website visitors.",
570
+ variant: "default"
571
+ },
572
+ media: {
573
+ ...withSectionStyleDefaults({}),
574
+ caption: "Add a caption",
575
+ imageCornerStyle: "rounded",
576
+ imageFit: "cover",
577
+ imagePosition: "center",
578
+ size: "default"
579
+ },
580
+ logoWall: withSectionStyleDefaults({
581
+ items: [
582
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 1" },
583
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 2" },
584
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 3" }
585
+ ],
586
+ subtitle: "Show logos from trusted associations, partners, or collaborators.",
587
+ title: "Trusted by Great Partners"
588
+ }),
589
+ richText: {
590
+ ...withSectionStyleDefaults({}),
591
+ cards: [],
592
+ content: {
593
+ root: {
594
+ children: [
595
+ {
596
+ children: [
597
+ {
598
+ detail: 0,
599
+ format: 0,
600
+ mode: "normal",
601
+ style: "",
602
+ text: "Write your content here.",
603
+ type: "text",
604
+ version: 1
605
+ }
606
+ ],
607
+ direction: "ltr",
608
+ format: "",
609
+ indent: 0,
610
+ type: "paragraph",
611
+ version: 1
612
+ }
613
+ ],
614
+ direction: "ltr",
615
+ format: "",
616
+ indent: 0,
617
+ type: "root",
618
+ version: 1
619
+ }
620
+ },
621
+ statsItems: [],
622
+ title: "Section Heading",
623
+ width: "normal"
624
+ },
625
+ testimonials: {
626
+ ...withSectionStyleDefaults({}),
627
+ autoRotate: true,
628
+ items: [{ location: "City, ST", name: "Customer Name", quote: "Customer feedback goes here.", rating: 5 }],
629
+ rotateIntervalSeconds: 7,
630
+ title: "What Customers Say",
631
+ visibleCount: 3
632
+ },
633
+ stats: withSectionStyleDefaults({
634
+ items: [
635
+ { description: "Average first response", label: "Response Time", value: "24h" },
636
+ { description: "Client satisfaction score", label: "Satisfaction", value: "4.9/5" },
637
+ { description: "Recent projects or clients served", label: "Recent Work", value: "150+" }
638
+ ],
639
+ subtitle: "Highlight measurable outcomes to build trust quickly.",
640
+ title: "Performance Highlights"
641
+ })
642
+ };
643
+ var nodeTypeLabels = {
644
+ bookingEmbed: "Booking Embed",
645
+ beforeAfter: "Before / After",
646
+ cta: "Call To Action",
647
+ faq: "FAQ",
648
+ featureGrid: "Feature Grid",
649
+ formEmbed: "Form Embed",
650
+ hero: "Hero",
651
+ logoWall: "Logo Wall",
652
+ media: "Media",
653
+ richText: "Rich Text",
654
+ stats: "Stats",
655
+ testimonials: "Testimonials"
656
+ };
657
+ var pageNodeTypes = Object.keys(defaultNodeData).map((type) => ({
658
+ type,
659
+ displayName: nodeTypeLabels[type] || type,
660
+ description: `Page node for ${nodeTypeLabels[type] || type}`,
661
+ getDefaultData: () => {
662
+ const migrated = migrateBlockToSettingsV2(structuredClone(defaultNodeData[type]));
663
+ const { blockType: _ignoredBlockType, ...data } = migrated;
664
+ return data;
665
+ }
666
+ }));
667
+ var validatePageDocument = (document) => {
668
+ const issues = [];
669
+ if (!document.title || document.title.trim().length === 0) {
670
+ issues.push({
671
+ code: "pages.title.required",
672
+ message: "Page title is required before publishing.",
673
+ path: "title",
674
+ severity: "error"
675
+ });
676
+ }
677
+ if (document.nodes.length === 0) {
678
+ issues.push({
679
+ code: "pages.nodes.required",
680
+ message: "At least one section is required.",
681
+ path: "nodes",
682
+ severity: "error"
683
+ });
684
+ }
685
+ document.nodes.forEach((node, index) => {
686
+ if (node.type === "hero" && typeof node.data.headline !== "string") {
687
+ issues.push({
688
+ code: "pages.hero.headline",
689
+ message: "Hero section requires a headline.",
690
+ path: `nodes.${index}.data.headline`,
691
+ severity: "error"
692
+ });
693
+ }
694
+ });
695
+ return issues;
696
+ };
697
+ var pagePaletteGroups = [
698
+ {
699
+ id: "page-core",
700
+ label: "Core Sections",
701
+ items: [
702
+ { nodeType: "hero", title: "Hero", description: "Top-of-page headline and CTA" },
703
+ { nodeType: "featureGrid", title: "Feature Grid", description: "Service or value cards" },
704
+ { nodeType: "stats", title: "Stats", description: "Key performance highlights" },
705
+ { nodeType: "logoWall", title: "Logo Wall", description: "Trust logos and badges" },
706
+ { nodeType: "beforeAfter", title: "Before / After", description: "Visual before-and-after gallery" },
707
+ { nodeType: "richText", title: "Rich Text", description: "Long-form content area" },
708
+ { nodeType: "media", title: "Media", description: "Image/video section" },
709
+ { nodeType: "testimonials", title: "Testimonials", description: "Social proof quotes" },
710
+ { nodeType: "faq", title: "FAQ", description: "Question-and-answer section" },
711
+ { nodeType: "cta", title: "Call To Action", description: "Conversion strip with button" },
712
+ { nodeType: "formEmbed", title: "Form Embed", description: "Lead capture form" },
713
+ { nodeType: "bookingEmbed", title: "Booking Embed", description: "Scheduling panel" }
714
+ ]
715
+ }
716
+ ];
717
+ var pageInspectorPanelRegistry = Object.keys(defaultNodeData).map((nodeType) => ({
718
+ nodeType,
719
+ panelID: `${nodeType}-panel`,
720
+ panelLabel: `${nodeTypeLabels[nodeType] || nodeType} Settings`
721
+ }));
722
+ var resolvePanelFields = (nodeType) => inspectorDefinitionByBlockType[nodeType]?.fields.map((field) => ({
723
+ advanced: field.advanced,
724
+ group: field.group,
725
+ inlineEditable: field.inlineEditable,
726
+ key: field.key,
727
+ label: field.label,
728
+ type: field.type
729
+ })) || [];
730
+ var pageInspectorPanels = pageInspectorPanelRegistry.map((entry) => ({
731
+ fields: resolvePanelFields(entry.nodeType),
732
+ id: entry.panelID,
733
+ label: entry.panelLabel,
734
+ nodeType: entry.nodeType
735
+ }));
736
+ var pageStudioModuleManifest = {
737
+ id: "studio-pages",
738
+ version: "0.1.0-beta.0",
739
+ displayName: "Pages Studio Module",
740
+ nodeTypes: pageNodeTypes,
741
+ paletteGroups: pagePaletteGroups,
742
+ inspectorPanels: pageInspectorPanels,
743
+ validators: [validatePageDocument],
744
+ migrations: pageStudioMigrations,
745
+ compiler: {
746
+ compileNode: (node) => {
747
+ const normalized = migrateBlockToSettingsV2({
748
+ blockType: node.type,
749
+ ...node.data
750
+ });
751
+ return {
752
+ id: node.id,
753
+ ...normalized
754
+ };
755
+ }
756
+ },
757
+ permissions: [
758
+ { action: "read", role: "admin" },
759
+ { action: "read", role: "editor" },
760
+ { action: "read", role: "client" },
761
+ { action: "update", role: "admin" },
762
+ { action: "update", role: "editor" },
763
+ { action: "update", role: "client" },
764
+ { action: "publish", role: "admin" },
765
+ { action: "publish", role: "editor" }
766
+ ]
767
+ };
768
+
769
+ export {
770
+ resolveBuilderThemeTokens,
771
+ pageNodeTypes,
772
+ pagePaletteGroups,
773
+ pageInspectorPanels,
774
+ pageStudioModuleManifest,
775
+ studio_pages_exports
776
+ };