@orion-studios/payload-studio 0.5.0-beta.8 → 0.5.0-beta.80

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 (67) hide show
  1. package/README.md +20 -0
  2. package/dist/admin/client.d.mts +2 -0
  3. package/dist/admin/client.d.ts +2 -0
  4. package/dist/admin/client.js +779 -137
  5. package/dist/admin/client.mjs +769 -129
  6. package/dist/admin/index.d.mts +1 -1
  7. package/dist/admin/index.d.ts +1 -1
  8. package/dist/admin/index.js +100 -8
  9. package/dist/admin/index.mjs +3 -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 +1262 -3
  13. package/dist/admin-app/client.mjs +1164 -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 +229 -0
  19. package/dist/blocks/index.js +633 -8
  20. package/dist/blocks/index.mjs +2 -2
  21. package/dist/chunk-ADIIWIYL.mjs +322 -0
  22. package/dist/{chunk-ZLLNO5FM.mjs → chunk-AFLEATYB.mjs} +44 -13
  23. package/dist/chunk-FWVVRZ32.mjs +1143 -0
  24. package/dist/{chunk-J7W5EE3B.mjs → chunk-HCEPGEAI.mjs} +100 -8
  25. package/dist/chunk-ROTPP5CU.mjs +99 -0
  26. package/dist/{chunk-ETRRXURT.mjs → chunk-SIL2J5MF.mjs} +14 -0
  27. package/dist/{chunk-PC5622T7.mjs → chunk-XK3K5GRP.mjs} +620 -9
  28. package/dist/chunk-XVH5SCBD.mjs +234 -0
  29. package/dist/index-BBp-3l6M.d.ts +134 -0
  30. package/dist/{index-CmR6NInu.d.ts → index-BIwu3qIH.d.mts} +29 -3
  31. package/dist/{index-CmR6NInu.d.mts → index-BIwu3qIH.d.ts} +29 -3
  32. package/dist/{index-DbH0Ljwp.d.ts → index-CpG3UHcS.d.mts} +1 -0
  33. package/dist/{index-DbH0Ljwp.d.mts → index-CpG3UHcS.d.ts} +1 -0
  34. package/dist/index-DT_Vorvh.d.mts +134 -0
  35. package/dist/index-ZbOx4OCF.d.mts +128 -0
  36. package/dist/index-ZbOx4OCF.d.ts +128 -0
  37. package/dist/{index-DJFhANvJ.d.mts → index-cDYkEj29.d.mts} +20 -2
  38. package/dist/{index-DJFhANvJ.d.ts → index-cDYkEj29.d.ts} +20 -2
  39. package/dist/index.d.mts +5 -5
  40. package/dist/index.d.ts +5 -5
  41. package/dist/index.js +2232 -324
  42. package/dist/index.mjs +7 -7
  43. package/dist/nextjs/index.d.mts +1 -1
  44. package/dist/nextjs/index.d.ts +1 -1
  45. package/dist/nextjs/index.js +1002 -13
  46. package/dist/nextjs/index.mjs +4 -1
  47. package/dist/studio/index.d.mts +2 -1
  48. package/dist/studio/index.d.ts +2 -1
  49. package/dist/studio/index.js +171 -5
  50. package/dist/studio/index.mjs +7 -3
  51. package/dist/studio-pages/builder.css +472 -8
  52. package/dist/studio-pages/client.d.mts +17 -0
  53. package/dist/studio-pages/client.d.ts +17 -0
  54. package/dist/studio-pages/client.js +5057 -2546
  55. package/dist/studio-pages/client.mjs +4972 -2552
  56. package/dist/studio-pages/index.d.mts +3 -2
  57. package/dist/studio-pages/index.d.ts +3 -2
  58. package/dist/studio-pages/index.js +873 -32
  59. package/dist/studio-pages/index.mjs +6 -2
  60. package/package.json +26 -12
  61. package/dist/chunk-AAOHJDNS.mjs +0 -67
  62. package/dist/chunk-N67KVM2S.mjs +0 -156
  63. package/dist/chunk-TVDMZNKU.mjs +0 -301
  64. package/dist/index-B9N5MyjF.d.mts +0 -39
  65. package/dist/index-BallJs-K.d.mts +0 -43
  66. package/dist/index-BallJs-K.d.ts +0 -43
  67. package/dist/index-g8tBHLKD.d.ts +0 -39
@@ -21,11 +21,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var studio_pages_exports = {};
22
22
  __export(studio_pages_exports, {
23
23
  createDefaultStudioDocument: () => createDefaultStudioDocument,
24
+ defaultBuilderThemeTokens: () => defaultBuilderThemeTokens,
24
25
  layoutToStudioDocument: () => layoutToStudioDocument,
25
26
  pageInspectorPanels: () => pageInspectorPanels,
26
27
  pageNodeTypes: () => pageNodeTypes,
27
28
  pagePaletteGroups: () => pagePaletteGroups,
28
29
  pageStudioModuleManifest: () => pageStudioModuleManifest,
30
+ resolveBuilderThemeTokens: () => resolveBuilderThemeTokens,
29
31
  studioDocumentToLayout: () => studioDocumentToLayout
30
32
  });
31
33
  module.exports = __toCommonJS(studio_pages_exports);
@@ -39,6 +41,7 @@ var sectionStyleDefaults = {
39
41
  contentGradientPreset: "none",
40
42
  contentGradientTo: "#f4f6f2",
41
43
  contentWidth: "inherit",
44
+ sectionPaddingX: "inherit",
42
45
  sectionBackgroundColor: "#ffffff",
43
46
  sectionBackgroundMode: "none",
44
47
  sectionGradientAngle: "135",
@@ -49,6 +52,797 @@ var sectionStyleDefaults = {
49
52
  sectionWidth: "content"
50
53
  };
51
54
 
55
+ // src/studio-pages/builder/settings-v2/types.ts
56
+ var defaultBuilderBlockSettingsV2 = {
57
+ advanced: {
58
+ customClassName: "",
59
+ editCopyInPanel: false,
60
+ hideOnMobile: false
61
+ },
62
+ appearance: {
63
+ contentBackgroundColor: "#ffffff",
64
+ contentBackgroundMode: "none",
65
+ contentGradientAngle: "135",
66
+ contentGradientFrom: "#ffffff",
67
+ contentGradientPreset: "none",
68
+ contentGradientTo: "#f4f6f2",
69
+ sectionBackgroundColor: "#ffffff",
70
+ sectionBackgroundMode: "none",
71
+ sectionGradientAngle: "135",
72
+ sectionGradientFrom: "#124a37",
73
+ sectionGradientPreset: "forest",
74
+ sectionGradientTo: "#1f684f"
75
+ },
76
+ layout: {
77
+ contentWidth: "inherit",
78
+ sectionPaddingX: "inherit",
79
+ sectionPaddingY: "md"
80
+ },
81
+ media: {
82
+ cornerStyle: "rounded",
83
+ fit: "cover",
84
+ height: null,
85
+ position: "center",
86
+ positionX: null,
87
+ positionY: null
88
+ },
89
+ typography: {
90
+ bodyAlign: "left",
91
+ headingAlign: "left",
92
+ letterSpacingPreset: "normal",
93
+ lineHeightPreset: "normal",
94
+ maxTextWidth: "auto"
95
+ },
96
+ version: 2
97
+ };
98
+ var defaultBuilderItemSettingsV2 = {
99
+ layout: {
100
+ contentWidth: "inherit",
101
+ sectionPaddingX: "inherit",
102
+ sectionPaddingY: "md"
103
+ },
104
+ media: {
105
+ cornerStyle: "rounded",
106
+ fit: "cover",
107
+ height: null,
108
+ position: "center",
109
+ positionX: null,
110
+ positionY: null
111
+ },
112
+ typography: {
113
+ bodyAlign: "left",
114
+ headingAlign: "left",
115
+ letterSpacingPreset: "normal",
116
+ lineHeightPreset: "normal",
117
+ maxTextWidth: "auto"
118
+ },
119
+ version: 2
120
+ };
121
+ var defaultBuilderThemeTokens = {
122
+ colors: {
123
+ accent: "#0d4a37",
124
+ bodyText: "#13211c",
125
+ headingText: "#13211c",
126
+ surface: "#ffffff"
127
+ },
128
+ radii: {
129
+ card: 16,
130
+ panel: 14
131
+ },
132
+ spacing: {
133
+ sectionGap: "md",
134
+ sectionPadding: "md"
135
+ },
136
+ typography: {
137
+ bodySize: "md",
138
+ headingSize: "md"
139
+ }
140
+ };
141
+
142
+ // src/studio-pages/builder/adapters/settingsV2.ts
143
+ var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
144
+ var parsePercent = (value) => {
145
+ if (typeof value === "number" && Number.isFinite(value)) {
146
+ return Math.max(0, Math.min(100, value));
147
+ }
148
+ if (typeof value === "string" && value.trim().length > 0) {
149
+ const parsed = Number(value);
150
+ if (Number.isFinite(parsed)) {
151
+ return Math.max(0, Math.min(100, parsed));
152
+ }
153
+ }
154
+ return null;
155
+ };
156
+ var parsePixel = (value) => {
157
+ if (typeof value === "number" && Number.isFinite(value)) {
158
+ return value;
159
+ }
160
+ if (typeof value === "string" && value.trim().length > 0) {
161
+ const parsed = Number(value);
162
+ if (Number.isFinite(parsed)) {
163
+ return parsed;
164
+ }
165
+ }
166
+ return null;
167
+ };
168
+ var mergeSettings = (defaults, input) => {
169
+ if (!isRecord(input)) {
170
+ return structuredClone(defaults);
171
+ }
172
+ const next = structuredClone(defaults);
173
+ for (const [key, value] of Object.entries(input)) {
174
+ if (isRecord(value) && isRecord(next[key])) {
175
+ next[key] = mergeSettings(next[key], value);
176
+ continue;
177
+ }
178
+ if (typeof value !== "undefined") {
179
+ next[key] = value;
180
+ }
181
+ }
182
+ return next;
183
+ };
184
+ var legacyBlockToV2Settings = (block) => {
185
+ const current = structuredClone(defaultBuilderBlockSettingsV2);
186
+ current.layout.contentWidth = block.contentWidth === "narrow" || block.contentWidth === "content" || block.contentWidth === "wide" || block.contentWidth === "full" || block.contentWidth === "inherit" ? block.contentWidth : current.layout.contentWidth;
187
+ current.layout.sectionPaddingX = block.sectionPaddingX === "none" || block.sectionPaddingX === "sm" || block.sectionPaddingX === "md" || block.sectionPaddingX === "lg" || block.sectionPaddingX === "inherit" ? block.sectionPaddingX : current.layout.sectionPaddingX;
188
+ current.layout.sectionPaddingY = block.sectionPaddingY === "none" || block.sectionPaddingY === "sm" || block.sectionPaddingY === "lg" ? block.sectionPaddingY : current.layout.sectionPaddingY;
189
+ current.appearance.sectionBackgroundMode = block.sectionBackgroundMode === "none" || block.sectionBackgroundMode === "color" || block.sectionBackgroundMode === "gradient" ? block.sectionBackgroundMode : current.appearance.sectionBackgroundMode;
190
+ current.appearance.sectionBackgroundColor = typeof block.sectionBackgroundColor === "string" ? block.sectionBackgroundColor : current.appearance.sectionBackgroundColor;
191
+ current.appearance.sectionGradientPreset = typeof block.sectionGradientPreset === "string" ? block.sectionGradientPreset : current.appearance.sectionGradientPreset;
192
+ current.appearance.sectionGradientFrom = typeof block.sectionGradientFrom === "string" ? block.sectionGradientFrom : current.appearance.sectionGradientFrom;
193
+ current.appearance.sectionGradientTo = typeof block.sectionGradientTo === "string" ? block.sectionGradientTo : current.appearance.sectionGradientTo;
194
+ current.appearance.sectionGradientAngle = typeof block.sectionGradientAngle === "string" ? block.sectionGradientAngle : current.appearance.sectionGradientAngle;
195
+ current.appearance.contentBackgroundMode = block.contentBackgroundMode === "none" || block.contentBackgroundMode === "color" || block.contentBackgroundMode === "gradient" ? block.contentBackgroundMode : current.appearance.contentBackgroundMode;
196
+ current.appearance.contentBackgroundColor = typeof block.contentBackgroundColor === "string" ? block.contentBackgroundColor : current.appearance.contentBackgroundColor;
197
+ current.appearance.contentGradientPreset = typeof block.contentGradientPreset === "string" ? block.contentGradientPreset : current.appearance.contentGradientPreset;
198
+ current.appearance.contentGradientFrom = typeof block.contentGradientFrom === "string" ? block.contentGradientFrom : current.appearance.contentGradientFrom;
199
+ current.appearance.contentGradientTo = typeof block.contentGradientTo === "string" ? block.contentGradientTo : current.appearance.contentGradientTo;
200
+ current.appearance.contentGradientAngle = typeof block.contentGradientAngle === "string" ? block.contentGradientAngle : current.appearance.contentGradientAngle;
201
+ if (block.backgroundImageFit === "cover" || block.backgroundImageFit === "contain") {
202
+ current.media.fit = block.backgroundImageFit;
203
+ }
204
+ if (block.imageFit === "cover" || block.imageFit === "contain") {
205
+ current.media.fit = block.imageFit;
206
+ }
207
+ if (block.backgroundImageCornerStyle === "rounded" || block.backgroundImageCornerStyle === "square") {
208
+ current.media.cornerStyle = block.backgroundImageCornerStyle;
209
+ }
210
+ if (block.imageCornerStyle === "rounded" || block.imageCornerStyle === "square") {
211
+ current.media.cornerStyle = block.imageCornerStyle;
212
+ }
213
+ if (block.backgroundImagePosition === "top" || block.backgroundImagePosition === "bottom" || block.backgroundImagePosition === "left" || block.backgroundImagePosition === "right" || block.backgroundImagePosition === "center") {
214
+ current.media.position = block.backgroundImagePosition;
215
+ }
216
+ if (block.imagePosition === "top" || block.imagePosition === "bottom" || block.imagePosition === "left" || block.imagePosition === "right" || block.imagePosition === "center") {
217
+ current.media.position = block.imagePosition;
218
+ }
219
+ current.media.positionX = parsePercent(block.imagePositionX ?? block.backgroundImagePositionX);
220
+ current.media.positionY = parsePercent(block.imagePositionY ?? block.backgroundImagePositionY);
221
+ current.media.height = parsePixel(block.imageHeight);
222
+ current.typography.headingAlign = block.textHeadingAlign === "left" || block.textHeadingAlign === "center" || block.textHeadingAlign === "right" || block.textHeadingAlign === "justify" ? block.textHeadingAlign : current.typography.headingAlign;
223
+ current.typography.bodyAlign = block.textBodyAlign === "left" || block.textBodyAlign === "center" || block.textBodyAlign === "right" || block.textBodyAlign === "justify" ? block.textBodyAlign : current.typography.bodyAlign;
224
+ current.typography.maxTextWidth = block.textMaxWidth === "auto" || block.textMaxWidth === "sm" || block.textMaxWidth === "md" || block.textMaxWidth === "lg" || block.textMaxWidth === "full" ? block.textMaxWidth : current.typography.maxTextWidth;
225
+ current.typography.lineHeightPreset = block.textLineHeightPreset === "tight" || block.textLineHeightPreset === "normal" || block.textLineHeightPreset === "relaxed" ? block.textLineHeightPreset : current.typography.lineHeightPreset;
226
+ current.typography.letterSpacingPreset = block.textLetterSpacingPreset === "tight" || block.textLetterSpacingPreset === "normal" || block.textLetterSpacingPreset === "relaxed" ? block.textLetterSpacingPreset : current.typography.letterSpacingPreset;
227
+ current.advanced.editCopyInPanel = Boolean(block.editCopyInPanel ?? current.advanced.editCopyInPanel);
228
+ current.advanced.customClassName = typeof block.customClassName === "string" ? block.customClassName : current.advanced.customClassName;
229
+ current.advanced.hideOnMobile = Boolean(block.hideOnMobile ?? current.advanced.hideOnMobile);
230
+ return mergeSettings(current, block.settings);
231
+ };
232
+ var v2SettingsToLegacyBlock = (blockWithSettings) => {
233
+ const settings = legacyBlockToV2Settings(blockWithSettings);
234
+ const next = {
235
+ ...blockWithSettings,
236
+ settings
237
+ };
238
+ next.contentWidth = settings.layout.contentWidth;
239
+ next.sectionPaddingX = settings.layout.sectionPaddingX;
240
+ next.sectionPaddingY = settings.layout.sectionPaddingY;
241
+ next.sectionBackgroundMode = settings.appearance.sectionBackgroundMode;
242
+ next.sectionBackgroundColor = settings.appearance.sectionBackgroundColor;
243
+ next.sectionGradientPreset = settings.appearance.sectionGradientPreset;
244
+ next.sectionGradientFrom = settings.appearance.sectionGradientFrom;
245
+ next.sectionGradientTo = settings.appearance.sectionGradientTo;
246
+ next.sectionGradientAngle = settings.appearance.sectionGradientAngle;
247
+ next.contentBackgroundMode = settings.appearance.contentBackgroundMode;
248
+ next.contentBackgroundColor = settings.appearance.contentBackgroundColor;
249
+ next.contentGradientPreset = settings.appearance.contentGradientPreset;
250
+ next.contentGradientFrom = settings.appearance.contentGradientFrom;
251
+ next.contentGradientTo = settings.appearance.contentGradientTo;
252
+ next.contentGradientAngle = settings.appearance.contentGradientAngle;
253
+ next.textHeadingAlign = settings.typography.headingAlign;
254
+ next.textBodyAlign = settings.typography.bodyAlign;
255
+ next.textMaxWidth = settings.typography.maxTextWidth;
256
+ next.textLineHeightPreset = settings.typography.lineHeightPreset;
257
+ next.textLetterSpacingPreset = settings.typography.letterSpacingPreset;
258
+ next.editCopyInPanel = settings.advanced.editCopyInPanel;
259
+ next.customClassName = settings.advanced.customClassName;
260
+ next.hideOnMobile = settings.advanced.hideOnMobile;
261
+ if (next.blockType === "hero") {
262
+ next.backgroundImageFit = settings.media.fit;
263
+ next.backgroundImageCornerStyle = settings.media.cornerStyle;
264
+ next.backgroundImagePosition = settings.media.position;
265
+ next.backgroundImagePositionX = settings.media.positionX;
266
+ next.backgroundImagePositionY = settings.media.positionY;
267
+ } else {
268
+ next.imageFit = settings.media.fit;
269
+ next.imageCornerStyle = settings.media.cornerStyle;
270
+ next.imagePosition = settings.media.position;
271
+ next.imagePositionX = settings.media.positionX;
272
+ next.imagePositionY = settings.media.positionY;
273
+ next.imageHeight = settings.media.height;
274
+ }
275
+ if (Array.isArray(next.items)) {
276
+ next.items = next.items.map((rawItem) => isRecord(rawItem) ? v2SettingsToLegacyItem(rawItem) : rawItem);
277
+ }
278
+ return next;
279
+ };
280
+ var legacyItemToV2Settings = (item) => {
281
+ const current = structuredClone(defaultBuilderItemSettingsV2);
282
+ if (item.imageFit === "cover" || item.imageFit === "contain") {
283
+ current.media.fit = item.imageFit;
284
+ }
285
+ if (item.imageCornerStyle === "rounded" || item.imageCornerStyle === "square") {
286
+ current.media.cornerStyle = item.imageCornerStyle;
287
+ }
288
+ if (item.imagePosition === "top" || item.imagePosition === "bottom" || item.imagePosition === "left" || item.imagePosition === "right" || item.imagePosition === "center") {
289
+ current.media.position = item.imagePosition;
290
+ }
291
+ current.media.positionX = parsePercent(item.imagePositionX);
292
+ current.media.positionY = parsePercent(item.imagePositionY);
293
+ current.media.height = parsePixel(item.imageHeight);
294
+ return mergeSettings(current, item.settings);
295
+ };
296
+ var v2SettingsToLegacyItem = (itemWithSettings) => {
297
+ const settings = legacyItemToV2Settings(itemWithSettings);
298
+ return {
299
+ ...itemWithSettings,
300
+ imageCornerStyle: settings.media.cornerStyle,
301
+ imageFit: settings.media.fit,
302
+ imageHeight: settings.media.height,
303
+ imagePosition: settings.media.position,
304
+ imagePositionX: settings.media.positionX,
305
+ imagePositionY: settings.media.positionY,
306
+ settings
307
+ };
308
+ };
309
+ var migrateBlockToSettingsV2 = (block) => {
310
+ const withLegacyMirrors = v2SettingsToLegacyBlock(block);
311
+ if (!Array.isArray(withLegacyMirrors.items)) {
312
+ return withLegacyMirrors;
313
+ }
314
+ return {
315
+ ...withLegacyMirrors,
316
+ items: withLegacyMirrors.items.map((rawItem) => isRecord(rawItem) ? v2SettingsToLegacyItem(rawItem) : rawItem)
317
+ };
318
+ };
319
+
320
+ // src/studio-pages/builder/settings-v2/themeTokens.ts
321
+ var isRecord2 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
322
+ var merge = (base, next) => {
323
+ if (!next || !isRecord2(next)) {
324
+ return base;
325
+ }
326
+ const merged = { ...base };
327
+ for (const [key, value] of Object.entries(next)) {
328
+ if (isRecord2(value) && isRecord2(merged[key])) {
329
+ merged[key] = merge(merged[key], value);
330
+ continue;
331
+ }
332
+ if (typeof value !== "undefined") {
333
+ merged[key] = value;
334
+ }
335
+ }
336
+ return merged;
337
+ };
338
+ var resolveBuilderThemeTokens = (layers) => {
339
+ const withSite = merge(defaultBuilderThemeTokens, layers.site);
340
+ const withPage = merge(withSite, layers.page);
341
+ return merge(withPage, layers.block);
342
+ };
343
+
344
+ // src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
345
+ var import_react = require("react");
346
+
347
+ // src/studio-pages/builder/ui/Accordion.tsx
348
+ var import_jsx_runtime = require("react/jsx-runtime");
349
+
350
+ // src/studio-pages/builder/ui/ImageControls.tsx
351
+ var import_jsx_runtime2 = require("react/jsx-runtime");
352
+
353
+ // src/studio-pages/builder/settings-v2/inspectorSchema.ts
354
+ var alignOptions = [
355
+ { label: "Left", value: "left" },
356
+ { label: "Center", value: "center" },
357
+ { label: "Right", value: "right" },
358
+ { label: "Justify", value: "justify" }
359
+ ];
360
+ var layoutFieldSet = [
361
+ {
362
+ group: "layout",
363
+ key: "settings.layout.contentWidth",
364
+ label: "Content Width",
365
+ options: [
366
+ { label: "Inherit Page Default", value: "inherit" },
367
+ { label: "Narrow", value: "narrow" },
368
+ { label: "Content", value: "content" },
369
+ { label: "Wide", value: "wide" },
370
+ { label: "Full", value: "full" }
371
+ ],
372
+ tags: ["width", "container"],
373
+ type: "select"
374
+ },
375
+ {
376
+ group: "layout",
377
+ key: "settings.layout.sectionPaddingY",
378
+ label: "Section Vertical Spacing",
379
+ options: [
380
+ { label: "None", value: "none" },
381
+ { label: "Small", value: "sm" },
382
+ { label: "Medium", value: "md" },
383
+ { label: "Large", value: "lg" }
384
+ ],
385
+ tags: ["spacing", "padding"],
386
+ type: "select"
387
+ },
388
+ {
389
+ group: "layout",
390
+ key: "settings.layout.sectionPaddingX",
391
+ label: "Section Horizontal Spacing",
392
+ options: [
393
+ { label: "Inherit", value: "inherit" },
394
+ { label: "None", value: "none" },
395
+ { label: "Small", value: "sm" },
396
+ { label: "Medium", value: "md" },
397
+ { label: "Large", value: "lg" }
398
+ ],
399
+ tags: ["spacing", "padding"],
400
+ type: "select"
401
+ }
402
+ ];
403
+ var typographyFieldSet = [
404
+ {
405
+ group: "typography",
406
+ key: "settings.typography.headingAlign",
407
+ label: "Heading Alignment",
408
+ options: alignOptions,
409
+ tags: ["text", "align", "heading"],
410
+ type: "select"
411
+ },
412
+ {
413
+ group: "typography",
414
+ key: "settings.typography.bodyAlign",
415
+ label: "Body Alignment",
416
+ options: alignOptions,
417
+ tags: ["text", "align", "paragraph"],
418
+ type: "select"
419
+ },
420
+ {
421
+ group: "typography",
422
+ key: "settings.typography.maxTextWidth",
423
+ label: "Text Width",
424
+ options: [
425
+ { label: "Auto", value: "auto" },
426
+ { label: "Small", value: "sm" },
427
+ { label: "Medium", value: "md" },
428
+ { label: "Large", value: "lg" },
429
+ { label: "Full", value: "full" }
430
+ ],
431
+ tags: ["readability", "measure", "line length"],
432
+ type: "select"
433
+ },
434
+ {
435
+ advanced: true,
436
+ group: "typography",
437
+ key: "settings.typography.lineHeightPreset",
438
+ label: "Line Height",
439
+ options: [
440
+ { label: "Tight", value: "tight" },
441
+ { label: "Normal", value: "normal" },
442
+ { label: "Relaxed", value: "relaxed" }
443
+ ],
444
+ type: "select"
445
+ },
446
+ {
447
+ advanced: true,
448
+ group: "typography",
449
+ key: "settings.typography.letterSpacingPreset",
450
+ label: "Letter Spacing",
451
+ options: [
452
+ { label: "Tight", value: "tight" },
453
+ { label: "Normal", value: "normal" },
454
+ { label: "Relaxed", value: "relaxed" }
455
+ ],
456
+ type: "select"
457
+ }
458
+ ];
459
+ var styleFieldSet = [
460
+ {
461
+ group: "style",
462
+ key: "settings.appearance.sectionBackgroundMode",
463
+ label: "Section Background",
464
+ options: [
465
+ { label: "None", value: "none" },
466
+ { label: "Color", value: "color" },
467
+ { label: "Gradient", value: "gradient" }
468
+ ],
469
+ tags: ["background", "section"],
470
+ type: "select"
471
+ },
472
+ {
473
+ group: "style",
474
+ key: "settings.appearance.sectionBackgroundColor",
475
+ label: "Section Background Color",
476
+ type: "color"
477
+ },
478
+ {
479
+ group: "style",
480
+ key: "settings.appearance.contentBackgroundMode",
481
+ label: "Content Background",
482
+ options: [
483
+ { label: "None", value: "none" },
484
+ { label: "Color", value: "color" },
485
+ { label: "Gradient", value: "gradient" }
486
+ ],
487
+ tags: ["background", "content"],
488
+ type: "select"
489
+ },
490
+ {
491
+ group: "style",
492
+ key: "settings.appearance.contentBackgroundColor",
493
+ label: "Content Background Color",
494
+ type: "color"
495
+ }
496
+ ];
497
+ var commonAdvanced = [
498
+ {
499
+ group: "advanced",
500
+ inlineEditable: false,
501
+ key: "settings.advanced.editCopyInPanel",
502
+ label: "Edit Copy In Panel",
503
+ tags: ["inline", "copy", "text"],
504
+ type: "checkbox"
505
+ },
506
+ {
507
+ advanced: true,
508
+ group: "advanced",
509
+ key: "settings.advanced.hideOnMobile",
510
+ label: "Hide On Mobile",
511
+ type: "checkbox"
512
+ },
513
+ {
514
+ advanced: true,
515
+ group: "advanced",
516
+ key: "settings.advanced.customClassName",
517
+ label: "Custom Class Name",
518
+ type: "text"
519
+ }
520
+ ];
521
+ var mediaFieldSet = [
522
+ {
523
+ group: "media",
524
+ key: "settings.media.fit",
525
+ label: "Image Fit",
526
+ options: [
527
+ { label: "Cover", value: "cover" },
528
+ { label: "Contain", value: "contain" }
529
+ ],
530
+ tags: ["image", "media"],
531
+ type: "select"
532
+ },
533
+ {
534
+ group: "media",
535
+ key: "settings.media.cornerStyle",
536
+ label: "Image Corners",
537
+ options: [
538
+ { label: "Rounded", value: "rounded" },
539
+ { label: "Square", value: "square" }
540
+ ],
541
+ tags: ["image", "radius", "corners"],
542
+ type: "select"
543
+ },
544
+ {
545
+ group: "media",
546
+ key: "settings.media.position",
547
+ label: "Image Position",
548
+ options: [
549
+ { label: "Center", value: "center" },
550
+ { label: "Top", value: "top" },
551
+ { label: "Bottom", value: "bottom" },
552
+ { label: "Left", value: "left" },
553
+ { label: "Right", value: "right" }
554
+ ],
555
+ type: "select"
556
+ }
557
+ ];
558
+ var inspectorDefinitionByBlockType = {
559
+ beforeAfter: {
560
+ blockType: "beforeAfter",
561
+ fields: [
562
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
563
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
564
+ { group: "basics", key: "itemsPerRow", label: "Items Per Row", max: 4, min: 1, type: "number" },
565
+ ...layoutFieldSet,
566
+ ...typographyFieldSet,
567
+ ...styleFieldSet,
568
+ ...commonAdvanced
569
+ ]
570
+ },
571
+ bookingEmbed: {
572
+ blockType: "bookingEmbed",
573
+ fields: [
574
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
575
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
576
+ { group: "basics", inlineEditable: false, key: "buttonLabel", label: "Button Label", type: "text" },
577
+ { group: "basics", inlineEditable: false, key: "buttonHref", label: "Button URL", type: "text" },
578
+ ...layoutFieldSet,
579
+ ...typographyFieldSet,
580
+ ...styleFieldSet,
581
+ ...commonAdvanced
582
+ ]
583
+ },
584
+ cta: {
585
+ blockType: "cta",
586
+ fields: [
587
+ { group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
588
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
589
+ { group: "basics", inlineEditable: false, key: "buttonLabel", label: "Button Label", type: "text" },
590
+ { group: "basics", inlineEditable: false, key: "buttonHref", label: "Button URL", type: "text" },
591
+ {
592
+ group: "basics",
593
+ key: "style",
594
+ label: "Variant",
595
+ options: [
596
+ { label: "Light", value: "light" },
597
+ { label: "Dark", value: "dark" }
598
+ ],
599
+ type: "select"
600
+ },
601
+ ...layoutFieldSet,
602
+ ...typographyFieldSet,
603
+ ...styleFieldSet,
604
+ ...commonAdvanced
605
+ ]
606
+ },
607
+ faq: {
608
+ blockType: "faq",
609
+ fields: [
610
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
611
+ ...layoutFieldSet,
612
+ ...typographyFieldSet,
613
+ ...styleFieldSet,
614
+ ...commonAdvanced
615
+ ]
616
+ },
617
+ featureGrid: {
618
+ blockType: "featureGrid",
619
+ fields: [
620
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
621
+ {
622
+ group: "basics",
623
+ key: "variant",
624
+ label: "Variant",
625
+ options: [
626
+ { label: "Cards", value: "cards" },
627
+ { label: "Highlight", value: "highlight" }
628
+ ],
629
+ type: "select"
630
+ },
631
+ { group: "basics", key: "itemsPerRow", label: "Items Per Row", max: 6, min: 1, type: "number" },
632
+ ...layoutFieldSet,
633
+ ...typographyFieldSet,
634
+ ...mediaFieldSet,
635
+ ...styleFieldSet,
636
+ ...commonAdvanced
637
+ ]
638
+ },
639
+ formEmbed: {
640
+ blockType: "formEmbed",
641
+ fields: [
642
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
643
+ { group: "basics", inlineEditable: true, key: "description", label: "Description", type: "textarea" },
644
+ {
645
+ group: "basics",
646
+ key: "formType",
647
+ label: "Form Type",
648
+ options: [{ label: "Quote", value: "quote" }],
649
+ type: "select"
650
+ },
651
+ ...layoutFieldSet,
652
+ ...typographyFieldSet,
653
+ ...styleFieldSet,
654
+ ...commonAdvanced
655
+ ]
656
+ },
657
+ hero: {
658
+ blockType: "hero",
659
+ fields: [
660
+ { group: "basics", inlineEditable: true, key: "kicker", label: "Kicker", type: "text" },
661
+ { group: "basics", inlineEditable: true, key: "headline", label: "Headline", type: "text" },
662
+ { group: "basics", inlineEditable: true, key: "subheadline", label: "Subheadline", type: "textarea" },
663
+ {
664
+ group: "basics",
665
+ key: "variant",
666
+ label: "Variant",
667
+ options: [
668
+ { label: "Default", value: "default" },
669
+ { label: "Centered", value: "centered" }
670
+ ],
671
+ type: "select"
672
+ },
673
+ {
674
+ group: "layout",
675
+ key: "heroHeight",
676
+ label: "Hero Height",
677
+ options: [
678
+ { label: "Small", value: "sm" },
679
+ { label: "Medium (Half Screen)", value: "md" },
680
+ { label: "Full Screen", value: "full" }
681
+ ],
682
+ type: "select"
683
+ },
684
+ ...layoutFieldSet,
685
+ ...typographyFieldSet,
686
+ ...mediaFieldSet,
687
+ ...styleFieldSet,
688
+ ...commonAdvanced
689
+ ]
690
+ },
691
+ logoWall: {
692
+ blockType: "logoWall",
693
+ fields: [
694
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
695
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
696
+ ...layoutFieldSet,
697
+ ...typographyFieldSet,
698
+ ...mediaFieldSet,
699
+ ...styleFieldSet,
700
+ ...commonAdvanced
701
+ ]
702
+ },
703
+ media: {
704
+ blockType: "media",
705
+ fields: [
706
+ { group: "basics", inlineEditable: true, key: "caption", label: "Caption", type: "text" },
707
+ {
708
+ group: "basics",
709
+ key: "size",
710
+ label: "Size",
711
+ options: [
712
+ { label: "Default", value: "default" },
713
+ { label: "Wide", value: "wide" }
714
+ ],
715
+ type: "select"
716
+ },
717
+ ...layoutFieldSet,
718
+ ...typographyFieldSet,
719
+ ...mediaFieldSet,
720
+ ...styleFieldSet,
721
+ ...commonAdvanced
722
+ ]
723
+ },
724
+ richText: {
725
+ blockType: "richText",
726
+ fields: [
727
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
728
+ {
729
+ group: "basics",
730
+ key: "width",
731
+ label: "Rich Text Width",
732
+ options: [
733
+ { label: "Normal", value: "normal" },
734
+ { label: "Narrow", value: "narrow" }
735
+ ],
736
+ type: "select"
737
+ },
738
+ ...layoutFieldSet,
739
+ ...typographyFieldSet,
740
+ ...styleFieldSet,
741
+ ...commonAdvanced
742
+ ]
743
+ },
744
+ stats: {
745
+ blockType: "stats",
746
+ fields: [
747
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
748
+ { group: "basics", inlineEditable: true, key: "subtitle", label: "Subtitle", type: "textarea" },
749
+ ...layoutFieldSet,
750
+ ...typographyFieldSet,
751
+ ...styleFieldSet,
752
+ ...commonAdvanced
753
+ ]
754
+ },
755
+ testimonials: {
756
+ blockType: "testimonials",
757
+ fields: [
758
+ { group: "basics", inlineEditable: true, key: "title", label: "Title", type: "text" },
759
+ { group: "basics", key: "visibleCount", label: "Visible At Once", max: 6, min: 1, type: "number" },
760
+ { group: "basics", key: "autoRotate", label: "Auto Rotate", type: "checkbox" },
761
+ {
762
+ advanced: true,
763
+ group: "advanced",
764
+ key: "rotateIntervalSeconds",
765
+ label: "Rotate Interval Seconds",
766
+ max: 30,
767
+ min: 2,
768
+ type: "number"
769
+ },
770
+ ...layoutFieldSet,
771
+ ...typographyFieldSet,
772
+ ...styleFieldSet,
773
+ ...commonAdvanced
774
+ ]
775
+ }
776
+ };
777
+
778
+ // src/studio-pages/builder/settings-v2/BlockInspectorRenderer.tsx
779
+ var import_jsx_runtime3 = require("react/jsx-runtime");
780
+
781
+ // src/studio-pages/migrations.ts
782
+ var isRecord3 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
783
+ var assertPageStudioDocumentV1 = (value) => {
784
+ if (!isRecord3(value)) {
785
+ throw new Error("Studio document must be an object");
786
+ }
787
+ if (value.schemaVersion !== 1) {
788
+ throw new Error("Unsupported studio schemaVersion");
789
+ }
790
+ if (!Array.isArray(value.nodes)) {
791
+ throw new Error("Studio document nodes must be an array");
792
+ }
793
+ const nodes = value.nodes.map((node, index) => {
794
+ if (!isRecord3(node)) {
795
+ throw new Error(`Node at index ${index} must be an object`);
796
+ }
797
+ if (typeof node.id !== "string" || node.id.length === 0) {
798
+ throw new Error(`Node at index ${index} has invalid id`);
799
+ }
800
+ if (typeof node.type !== "string" || node.type.length === 0) {
801
+ throw new Error(`Node at index ${index} has invalid type`);
802
+ }
803
+ if (!isRecord3(node.data)) {
804
+ throw new Error(`Node at index ${index} has invalid data`);
805
+ }
806
+ return {
807
+ data: node.data,
808
+ id: node.id,
809
+ type: node.type
810
+ };
811
+ });
812
+ return {
813
+ metadata: isRecord3(value.metadata) ? value.metadata : void 0,
814
+ nodes,
815
+ schemaVersion: 1,
816
+ title: typeof value.title === "string" ? value.title : void 0,
817
+ updatedAt: typeof value.updatedAt === "string" ? value.updatedAt : void 0
818
+ };
819
+ };
820
+ var migratePageNodeToSettingsV2 = (node) => {
821
+ const normalized = migrateBlockToSettingsV2({
822
+ blockType: node.type,
823
+ ...node.data
824
+ });
825
+ const { blockType: _ignoredBlockType, ...data } = normalized;
826
+ return {
827
+ ...node,
828
+ data
829
+ };
830
+ };
831
+ var migratePageDocumentSettingsToV2 = (value) => {
832
+ const current = assertPageStudioDocumentV1(value);
833
+ return {
834
+ ...current,
835
+ nodes: current.nodes.map(migratePageNodeToSettingsV2)
836
+ };
837
+ };
838
+ var pageStudioMigrations = [
839
+ {
840
+ fromVersion: 1,
841
+ migrate: migratePageDocumentSettingsToV2,
842
+ toVersion: 1
843
+ }
844
+ ];
845
+
52
846
  // src/studio-pages/index.ts
53
847
  var withSectionStyleDefaults = (value) => ({
54
848
  ...sectionStyleDefaults,
@@ -63,9 +857,13 @@ var defaultNodeData = {
63
857
  title: "Book a Time"
64
858
  },
65
859
  beforeAfter: withSectionStyleDefaults({
860
+ itemsPerRow: 2,
66
861
  items: [
67
862
  {
68
863
  description: "Before and after result summary.",
864
+ imageCornerStyle: "rounded",
865
+ imageFit: "cover",
866
+ imagePosition: "center",
69
867
  label: "Project One"
70
868
  }
71
869
  ],
@@ -88,10 +886,11 @@ var defaultNodeData = {
88
886
  },
89
887
  featureGrid: {
90
888
  ...withSectionStyleDefaults({}),
889
+ itemsPerRow: 3,
91
890
  items: [
92
- { description: "Explain this point.", icon: "01", title: "Feature One" },
93
- { description: "Explain this point.", icon: "02", title: "Feature Two" },
94
- { description: "Explain this point.", icon: "03", title: "Feature Three" }
891
+ { description: "Explain this point.", iconType: "badge", icon: "01", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature One" },
892
+ { description: "Explain this point.", iconType: "badge", icon: "02", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Two" },
893
+ { description: "Explain this point.", iconType: "badge", icon: "03", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Three" }
95
894
  ],
96
895
  title: "Section Title",
97
896
  variant: "cards"
@@ -105,6 +904,21 @@ var defaultNodeData = {
105
904
  hero: {
106
905
  ...withSectionStyleDefaults({}),
107
906
  backgroundColor: "",
907
+ backgroundOverlayMode: "none",
908
+ backgroundOverlayOpacity: 45,
909
+ backgroundOverlayColor: "#000000",
910
+ backgroundOverlayGradientFrom: "#0d4a37",
911
+ backgroundOverlayGradientTo: "#1f684f",
912
+ backgroundOverlayGradientAngle: "135",
913
+ backgroundOverlayGradientFromStrength: 100,
914
+ backgroundOverlayGradientToStrength: 100,
915
+ backgroundOverlayGradientStart: 0,
916
+ backgroundOverlayGradientEnd: 100,
917
+ backgroundOverlayGradientFeather: 100,
918
+ backgroundImageCornerStyle: "rounded",
919
+ backgroundImageFit: "cover",
920
+ backgroundImagePosition: "center",
921
+ heroHeight: "sm",
108
922
  headline: "New Hero Section",
109
923
  kicker: "Optional kicker",
110
924
  primaryHref: "/contact",
@@ -117,13 +931,16 @@ var defaultNodeData = {
117
931
  media: {
118
932
  ...withSectionStyleDefaults({}),
119
933
  caption: "Add a caption",
934
+ imageCornerStyle: "rounded",
935
+ imageFit: "cover",
936
+ imagePosition: "center",
120
937
  size: "default"
121
938
  },
122
939
  logoWall: withSectionStyleDefaults({
123
940
  items: [
124
- { name: "Trusted Partner 1" },
125
- { name: "Trusted Partner 2" },
126
- { name: "Trusted Partner 3" }
941
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 1" },
942
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 2" },
943
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 3" }
127
944
  ],
128
945
  subtitle: "Trusted by teams and homeowners across Central Texas.",
129
946
  title: "Trusted by Local Organizations"
@@ -164,8 +981,11 @@ var defaultNodeData = {
164
981
  },
165
982
  testimonials: {
166
983
  ...withSectionStyleDefaults({}),
167
- items: [{ location: "City, ST", name: "Customer Name", quote: "Customer feedback goes here." }],
168
- title: "What Customers Say"
984
+ autoRotate: true,
985
+ items: [{ location: "City, ST", name: "Customer Name", quote: "Customer feedback goes here.", rating: 5 }],
986
+ rotateIntervalSeconds: 7,
987
+ title: "What Customers Say",
988
+ visibleCount: 3
169
989
  },
170
990
  stats: withSectionStyleDefaults({
171
991
  items: [
@@ -195,7 +1015,11 @@ var pageNodeTypes = Object.keys(defaultNodeData).map((type) => ({
195
1015
  type,
196
1016
  displayName: nodeTypeLabels[type] || type,
197
1017
  description: `Page node for ${nodeTypeLabels[type] || type}`,
198
- getDefaultData: () => structuredClone(defaultNodeData[type])
1018
+ getDefaultData: () => {
1019
+ const migrated = migrateBlockToSettingsV2(structuredClone(defaultNodeData[type]));
1020
+ const { blockType: _ignoredBlockType, ...data } = migrated;
1021
+ return data;
1022
+ }
199
1023
  }));
200
1024
  var validatePageDocument = (document) => {
201
1025
  const issues = [];
@@ -247,17 +1071,24 @@ var pagePaletteGroups = [
247
1071
  ]
248
1072
  }
249
1073
  ];
250
- var pageInspectorPanels = Object.keys(defaultNodeData).map((nodeType) => ({
251
- id: `${nodeType}-panel`,
252
- label: `${nodeTypeLabels[nodeType] || nodeType} Settings`,
1074
+ var pageInspectorPanelRegistry = Object.keys(defaultNodeData).map((nodeType) => ({
253
1075
  nodeType,
254
- fields: [
255
- {
256
- key: "title",
257
- label: "Title",
258
- type: "text"
259
- }
260
- ]
1076
+ panelID: `${nodeType}-panel`,
1077
+ panelLabel: `${nodeTypeLabels[nodeType] || nodeType} Settings`
1078
+ }));
1079
+ var resolvePanelFields = (nodeType) => inspectorDefinitionByBlockType[nodeType]?.fields.map((field) => ({
1080
+ advanced: field.advanced,
1081
+ group: field.group,
1082
+ inlineEditable: field.inlineEditable,
1083
+ key: field.key,
1084
+ label: field.label,
1085
+ type: field.type
1086
+ })) || [];
1087
+ var pageInspectorPanels = pageInspectorPanelRegistry.map((entry) => ({
1088
+ fields: resolvePanelFields(entry.nodeType),
1089
+ id: entry.panelID,
1090
+ label: entry.panelLabel,
1091
+ nodeType: entry.nodeType
261
1092
  }));
262
1093
  var pageStudioModuleManifest = {
263
1094
  id: "studio-pages",
@@ -267,13 +1098,18 @@ var pageStudioModuleManifest = {
267
1098
  paletteGroups: pagePaletteGroups,
268
1099
  inspectorPanels: pageInspectorPanels,
269
1100
  validators: [validatePageDocument],
270
- migrations: [],
1101
+ migrations: pageStudioMigrations,
271
1102
  compiler: {
272
- compileNode: (node) => ({
273
- id: node.id,
274
- blockType: node.type,
275
- ...node.data
276
- })
1103
+ compileNode: (node) => {
1104
+ const normalized = migrateBlockToSettingsV2({
1105
+ blockType: node.type,
1106
+ ...node.data
1107
+ });
1108
+ return {
1109
+ id: node.id,
1110
+ ...normalized
1111
+ };
1112
+ }
277
1113
  },
278
1114
  permissions: [
279
1115
  { action: "read", role: "admin" },
@@ -293,9 +1129,10 @@ var ensureNodeID = (inputID, index) => {
293
1129
  return `node-${index + 1}`;
294
1130
  };
295
1131
  var layoutToStudioDocument = (layout, title, metadata) => {
296
- const nodes = layout.filter((block) => typeof block.blockType === "string").map((block, index) => {
1132
+ const nodes = layout.filter((block) => typeof block.blockType === "string").map((rawBlock, index) => {
1133
+ const block = migrateBlockToSettingsV2(rawBlock);
297
1134
  const blockType = String(block.blockType);
298
- const { id, blockType: _, ...data } = block;
1135
+ const { id, blockType: _ignoredBlockType, ...data } = block;
299
1136
  return {
300
1137
  id: ensureNodeID(id, index),
301
1138
  type: blockType,
@@ -310,11 +1147,13 @@ var layoutToStudioDocument = (layout, title, metadata) => {
310
1147
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
311
1148
  };
312
1149
  };
313
- var studioDocumentToLayout = (document) => document.nodes.map((node) => ({
314
- id: node.id,
315
- blockType: node.type,
316
- ...node.data
317
- }));
1150
+ var studioDocumentToLayout = (document) => document.nodes.map(
1151
+ (node) => migrateBlockToSettingsV2({
1152
+ id: node.id,
1153
+ blockType: node.type,
1154
+ ...node.data
1155
+ })
1156
+ );
318
1157
  var createDefaultStudioDocument = (title) => ({
319
1158
  metadata: {},
320
1159
  schemaVersion: 1,
@@ -325,10 +1164,12 @@ var createDefaultStudioDocument = (title) => ({
325
1164
  // Annotate the CommonJS export names for ESM import in node:
326
1165
  0 && (module.exports = {
327
1166
  createDefaultStudioDocument,
1167
+ defaultBuilderThemeTokens,
328
1168
  layoutToStudioDocument,
329
1169
  pageInspectorPanels,
330
1170
  pageNodeTypes,
331
1171
  pagePaletteGroups,
332
1172
  pageStudioModuleManifest,
1173
+ resolveBuilderThemeTokens,
333
1174
  studioDocumentToLayout
334
1175
  });