camox 0.14.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/components/AuthGate.js +6 -0
  2. package/dist/core/components/AddBlockControlBar.js +30 -26
  3. package/dist/core/components/lexical/InlineContentEditable.js +19 -15
  4. package/dist/core/components/lexical/InlineLexicalEditor.js +62 -42
  5. package/dist/core/components/lexical/SelectionBroadcaster.js +25 -21
  6. package/dist/core/components/lexical/SidebarLexicalEditor.js +33 -21
  7. package/dist/core/createBlock.js +524 -488
  8. package/dist/core/createLayout.js +40 -28
  9. package/dist/core/hooks/useFieldSelection.js +12 -8
  10. package/dist/core/hooks/useIsEditable.js +6 -0
  11. package/dist/core/hooks/useOverlayMessage.js +19 -15
  12. package/dist/core/lib/contentType.d.ts +8 -8
  13. package/dist/core/lib/contentType.js +63 -0
  14. package/dist/features/content/CamoxContent.js +92 -88
  15. package/dist/features/content/components/AssetCard.js +46 -42
  16. package/dist/features/content/components/AssetCardSkeleton.js +8 -4
  17. package/dist/features/content/components/ContentSidebar.js +8 -4
  18. package/dist/features/content/components/UploadDropZone.js +31 -27
  19. package/dist/features/content/components/UploadProgressDrawer.js +98 -90
  20. package/dist/features/preview/CamoxPreview.js +162 -146
  21. package/dist/features/preview/components/AddBlockSheet.js +105 -101
  22. package/dist/features/preview/components/AgentChatSheet.js +74 -21
  23. package/dist/features/preview/components/AssetFieldEditor.js +98 -90
  24. package/dist/features/preview/components/AssetLightbox.js +21 -17
  25. package/dist/features/preview/components/AssetPickerGrid.js +84 -80
  26. package/dist/features/preview/components/BlockActionsPopover.js +35 -31
  27. package/dist/features/preview/components/BlockErrorBoundary.js +12 -8
  28. package/dist/features/preview/components/CreatePageModal.js +1 -1
  29. package/dist/features/preview/components/DebouncedFieldEditor.js +41 -37
  30. package/dist/features/preview/components/EditPageModal.js +114 -98
  31. package/dist/features/preview/components/FieldOverlayStyles.js +8 -4
  32. package/dist/features/preview/components/FieldToolbar.js +95 -54
  33. package/dist/features/preview/components/Frame.js +50 -46
  34. package/dist/features/preview/components/ItemFieldsEditor.js +81 -79
  35. package/dist/features/preview/components/LinkFieldEditor.js +138 -134
  36. package/dist/features/preview/components/MultipleAssetFieldEditor.js +105 -97
  37. package/dist/features/preview/components/OverlayTracker.js +19 -15
  38. package/dist/features/preview/components/Overlays.js +27 -23
  39. package/dist/features/preview/components/PageContentSheet.js +54 -4
  40. package/dist/features/preview/components/PageLocationFieldset.js +113 -109
  41. package/dist/features/preview/components/PagePicker.js +1 -1
  42. package/dist/features/preview/components/PageTree.js +443 -399
  43. package/dist/features/preview/components/PeekedBlock.js +69 -65
  44. package/dist/features/preview/components/PreviewPanel.js +64 -52
  45. package/dist/features/preview/components/PreviewSideSheet.js +25 -16
  46. package/dist/features/preview/components/PreviewToolbar.js +127 -123
  47. package/dist/features/preview/components/RepeatableItemsList.js +176 -171
  48. package/dist/features/preview/components/ShikiMarkdown.js +18 -14
  49. package/dist/features/preview/components/UnlinkAssetButton.js +74 -70
  50. package/dist/features/preview/components/useRepeatableItemActions.js +266 -0
  51. package/dist/features/preview/components/useUpdateBlockPosition.js +13 -9
  52. package/dist/features/provider/CamoxProvider.js +60 -52
  53. package/dist/features/provider/components/CamoxAppContext.js +10 -6
  54. package/dist/features/provider/components/CommandPalette.js +77 -69
  55. package/dist/features/provider/useAdminShortcuts.js +11 -7
  56. package/dist/features/routes/pageRoute.js +8 -4
  57. package/dist/features/studio/CamoxStudio.js +23 -19
  58. package/dist/features/studio/components/EnvironmentMenu.js +32 -28
  59. package/dist/features/studio/components/Navbar.js +62 -54
  60. package/dist/features/studio/components/ProjectMenu.js +131 -123
  61. package/dist/features/studio/components/UserButton.js +15 -11
  62. package/dist/features/studio/useTheme.js +82 -42
  63. package/dist/features/vite/definitionsSync.js +5 -5
  64. package/dist/features/vite/skillGeneration.js +43 -8
  65. package/dist/features/vite/vite.d.ts +1 -1
  66. package/dist/features/vite/vite.js +20 -2
  67. package/dist/hooks/use-marquee-selection.js +36 -32
  68. package/dist/lib/auth.js +49 -22
  69. package/dist/lib/normalized-data.js +55 -47
  70. package/dist/lib/use-project-room.js +22 -18
  71. package/dist/studio.css +1 -1
  72. package/package.json +10 -11
  73. package/skills/camox-block/SKILL.md +4 -0
  74. package/skills/camox-cli/SKILL.md +142 -0
  75. package/skills/camox-layout/SKILL.md +4 -0
@@ -23,11 +23,15 @@ import { Accordion } from "@base-ui/react/accordion";
23
23
 
24
24
  //#region src/features/preview/components/PageTree.tsx
25
25
  function useEmbedTitle(url) {
26
- const $ = c(3);
26
+ const $ = c(4);
27
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
28
+ for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
29
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
30
+ }
27
31
  const [title, setTitle] = React.useState(null);
28
32
  let t0;
29
33
  let t1;
30
- if ($[0] !== url) {
34
+ if ($[1] !== url) {
31
35
  t0 = () => {
32
36
  if (!url) return;
33
37
  setTitle(null);
@@ -39,12 +43,12 @@ function useEmbedTitle(url) {
39
43
  return () => controller.abort();
40
44
  };
41
45
  t1 = [url];
42
- $[0] = url;
43
- $[1] = t0;
44
- $[2] = t1;
46
+ $[1] = url;
47
+ $[2] = t0;
48
+ $[3] = t1;
45
49
  } else {
46
- t0 = $[1];
47
- t1 = $[2];
50
+ t0 = $[2];
51
+ t1 = $[3];
48
52
  }
49
53
  React.useEffect(t0, t1);
50
54
  return title;
@@ -54,71 +58,75 @@ function _temp(res) {
54
58
  return res.text();
55
59
  }
56
60
  const FieldItem = (t0) => {
57
- const $ = c(29);
61
+ const $ = c(30);
62
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
63
+ for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
64
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
65
+ }
58
66
  const { fieldName, value, fieldType, schemaTitle, arrayItemType, isSelected, onFieldClick, onFieldDoubleClick, onMouseEnter, onMouseLeave } = t0;
59
67
  const fetchedEmbedTitle = useEmbedTitle(fieldType === "Embed" ? value : null);
60
68
  const fieldDef = fieldType != null ? fieldTypesDictionary[fieldType] : null;
61
69
  let t1;
62
- if ($[0] !== fetchedEmbedTitle || $[1] !== fieldDef || $[2] !== fieldName || $[3] !== schemaTitle || $[4] !== value) {
70
+ if ($[1] !== fetchedEmbedTitle || $[2] !== fieldDef || $[3] !== fieldName || $[4] !== schemaTitle || $[5] !== value) {
63
71
  t1 = fieldDef ? fieldDef.getLabel(value, {
64
72
  schemaTitle,
65
73
  fieldName,
66
74
  fetchedTitle: fetchedEmbedTitle
67
75
  }) : JSON.stringify(value);
68
- $[0] = fetchedEmbedTitle;
69
- $[1] = fieldDef;
70
- $[2] = fieldName;
71
- $[3] = schemaTitle;
72
- $[4] = value;
73
- $[5] = t1;
74
- } else t1 = $[5];
76
+ $[1] = fetchedEmbedTitle;
77
+ $[2] = fieldDef;
78
+ $[3] = fieldName;
79
+ $[4] = schemaTitle;
80
+ $[5] = value;
81
+ $[6] = t1;
82
+ } else t1 = $[6];
75
83
  const displayValue = t1;
76
84
  let t2;
77
- if ($[6] !== arrayItemType || $[7] !== fieldDef) {
85
+ if ($[7] !== arrayItemType || $[8] !== fieldDef) {
78
86
  t2 = fieldDef?.getIcon({ arrayItemType }) ?? Type;
79
- $[6] = arrayItemType;
80
- $[7] = fieldDef;
81
- $[8] = t2;
82
- } else t2 = $[8];
87
+ $[7] = arrayItemType;
88
+ $[8] = fieldDef;
89
+ $[9] = t2;
90
+ } else t2 = $[9];
83
91
  const FieldIcon = t2;
84
92
  const t3 = isSelected ? "bg-accent" : "hover:bg-accent/75";
85
93
  let t4;
86
- if ($[9] !== t3) {
94
+ if ($[10] !== t3) {
87
95
  t4 = cn("flex items-center gap-1.5 rounded-lg pl-2 pr-1 py-2 cursor-default group/field", t3);
88
- $[9] = t3;
89
- $[10] = t4;
90
- } else t4 = $[10];
96
+ $[10] = t3;
97
+ $[11] = t4;
98
+ } else t4 = $[11];
91
99
  let t5;
92
- if ($[11] !== fieldType || $[12] !== onFieldClick) {
100
+ if ($[12] !== fieldType || $[13] !== onFieldClick) {
93
101
  t5 = () => fieldType && onFieldClick();
94
- $[11] = fieldType;
95
- $[12] = onFieldClick;
96
- $[13] = t5;
97
- } else t5 = $[13];
102
+ $[12] = fieldType;
103
+ $[13] = onFieldClick;
104
+ $[14] = t5;
105
+ } else t5 = $[14];
98
106
  let t6;
99
- if ($[14] !== fieldType || $[15] !== onFieldDoubleClick) {
107
+ if ($[15] !== fieldType || $[16] !== onFieldDoubleClick) {
100
108
  t6 = () => fieldType && onFieldDoubleClick();
101
- $[14] = fieldType;
102
- $[15] = onFieldDoubleClick;
103
- $[16] = t6;
104
- } else t6 = $[16];
109
+ $[15] = fieldType;
110
+ $[16] = onFieldDoubleClick;
111
+ $[17] = t6;
112
+ } else t6 = $[17];
105
113
  let t7;
106
- if ($[17] !== FieldIcon) {
114
+ if ($[18] !== FieldIcon) {
107
115
  t7 = /* @__PURE__ */ jsx(FieldIcon, { className: "size-4 shrink-0" });
108
- $[17] = FieldIcon;
109
- $[18] = t7;
110
- } else t7 = $[18];
116
+ $[18] = FieldIcon;
117
+ $[19] = t7;
118
+ } else t7 = $[19];
111
119
  let t8;
112
- if ($[19] !== displayValue) {
120
+ if ($[20] !== displayValue) {
113
121
  t8 = /* @__PURE__ */ jsx("span", {
114
122
  className: "text-accent-foreground truncate select-none",
115
123
  children: displayValue
116
124
  });
117
- $[19] = displayValue;
118
- $[20] = t8;
119
- } else t8 = $[20];
125
+ $[20] = displayValue;
126
+ $[21] = t8;
127
+ } else t8 = $[21];
120
128
  let t9;
121
- if ($[21] !== onMouseEnter || $[22] !== onMouseLeave || $[23] !== t4 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8) {
129
+ if ($[22] !== onMouseEnter || $[23] !== onMouseLeave || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8) {
122
130
  t9 = /* @__PURE__ */ jsxs("li", {
123
131
  className: t4,
124
132
  onClick: t5,
@@ -127,29 +135,33 @@ const FieldItem = (t0) => {
127
135
  onMouseLeave,
128
136
  children: [t7, t8]
129
137
  });
130
- $[21] = onMouseEnter;
131
- $[22] = onMouseLeave;
132
- $[23] = t4;
133
- $[24] = t5;
134
- $[25] = t6;
135
- $[26] = t7;
136
- $[27] = t8;
137
- $[28] = t9;
138
- } else t9 = $[28];
138
+ $[22] = onMouseEnter;
139
+ $[23] = onMouseLeave;
140
+ $[24] = t4;
141
+ $[25] = t5;
142
+ $[26] = t6;
143
+ $[27] = t7;
144
+ $[28] = t8;
145
+ $[29] = t9;
146
+ } else t9 = $[29];
139
147
  return t9;
140
148
  };
141
149
  const BlockFields = (t0) => {
142
- const $ = c(4);
150
+ const $ = c(5);
151
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
152
+ for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
153
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
154
+ }
143
155
  const { block } = t0;
144
156
  const schemaProperties = useCamoxApp().getBlockById(block.type)?._internal.contentSchema.properties;
145
157
  const selection = useSelector(previewStore, _temp3);
146
158
  const iframeElement = useSelector(previewStore, _temp4);
147
159
  let t1;
148
- if ($[0] !== block.id) {
160
+ if ($[1] !== block.id) {
149
161
  t1 = blockQueries.get(block.id);
150
- $[0] = block.id;
151
- $[1] = t1;
152
- } else t1 = $[1];
162
+ $[1] = block.id;
163
+ $[2] = t1;
164
+ } else t1 = $[2];
153
165
  const { data: blockBundle } = useQuery(t1);
154
166
  let selectedFieldName = null;
155
167
  if (selection?.type === "block-field" && selection.blockId === block.id) selectedFieldName = selection.fieldName;
@@ -228,18 +240,22 @@ const BlockFields = (t0) => {
228
240
  }, fieldName_3);
229
241
  });
230
242
  let t4;
231
- if ($[2] !== t3) {
243
+ if ($[3] !== t3) {
232
244
  t4 = /* @__PURE__ */ jsx("ul", {
233
245
  className: t2,
234
246
  children: t3
235
247
  });
236
- $[2] = t3;
237
- $[3] = t4;
238
- } else t4 = $[3];
248
+ $[3] = t3;
249
+ $[4] = t4;
250
+ } else t4 = $[4];
239
251
  return t4;
240
252
  };
241
253
  function useBlockTreeItem(block, t0) {
242
- const $ = c(16);
254
+ const $ = c(17);
255
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
256
+ for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
257
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
258
+ }
243
259
  const isDragging = t0 === void 0 ? false : t0;
244
260
  const [ellipsisPopoverOpen, setEllipsisPopoverOpen] = React.useState(false);
245
261
  const selection = useSelector(previewStore, _temp6);
@@ -248,7 +264,7 @@ function useBlockTreeItem(block, t0) {
248
264
  const shouldShowHover = !isDragging && !isBlockSelected;
249
265
  const shouldShowActive = isDragging || isBlockSelected;
250
266
  let t1;
251
- if ($[0] !== block || $[1] !== iframeElement) {
267
+ if ($[1] !== block || $[2] !== iframeElement) {
252
268
  t1 = () => {
253
269
  if (!iframeElement?.contentWindow) return;
254
270
  const message = {
@@ -257,13 +273,13 @@ function useBlockTreeItem(block, t0) {
257
273
  };
258
274
  iframeElement.contentWindow.postMessage(message, "*");
259
275
  };
260
- $[0] = block;
261
- $[1] = iframeElement;
262
- $[2] = t1;
263
- } else t1 = $[2];
276
+ $[1] = block;
277
+ $[2] = iframeElement;
278
+ $[3] = t1;
279
+ } else t1 = $[3];
264
280
  const handleBlockMouseEnter = t1;
265
281
  let t2;
266
- if ($[3] !== block || $[4] !== iframeElement) {
282
+ if ($[4] !== block || $[5] !== iframeElement) {
267
283
  t2 = () => {
268
284
  if (!iframeElement?.contentWindow) return;
269
285
  const message_0 = {
@@ -272,13 +288,13 @@ function useBlockTreeItem(block, t0) {
272
288
  };
273
289
  iframeElement.contentWindow.postMessage(message_0, "*");
274
290
  };
275
- $[3] = block;
276
- $[4] = iframeElement;
277
- $[5] = t2;
278
- } else t2 = $[5];
291
+ $[4] = block;
292
+ $[5] = iframeElement;
293
+ $[6] = t2;
294
+ } else t2 = $[6];
279
295
  const handleBlockMouseLeave = t2;
280
296
  let t3;
281
- if ($[6] !== block || $[7] !== isBlockSelected) {
297
+ if ($[7] !== block || $[8] !== isBlockSelected) {
282
298
  t3 = () => {
283
299
  if (isBlockSelected) previewStore.send({ type: "clearSelection" });
284
300
  else previewStore.send({
@@ -286,13 +302,13 @@ function useBlockTreeItem(block, t0) {
286
302
  blockId: block.id
287
303
  });
288
304
  };
289
- $[6] = block;
290
- $[7] = isBlockSelected;
291
- $[8] = t3;
292
- } else t3 = $[8];
305
+ $[7] = block;
306
+ $[8] = isBlockSelected;
307
+ $[9] = t3;
308
+ } else t3 = $[9];
293
309
  const toggleSelection = t3;
294
310
  let t4;
295
- if ($[9] !== ellipsisPopoverOpen || $[10] !== handleBlockMouseEnter || $[11] !== handleBlockMouseLeave || $[12] !== shouldShowActive || $[13] !== shouldShowHover || $[14] !== toggleSelection) {
311
+ if ($[10] !== ellipsisPopoverOpen || $[11] !== handleBlockMouseEnter || $[12] !== handleBlockMouseLeave || $[13] !== shouldShowActive || $[14] !== shouldShowHover || $[15] !== toggleSelection) {
296
312
  t4 = {
297
313
  ellipsisPopoverOpen,
298
314
  setEllipsisPopoverOpen,
@@ -302,14 +318,14 @@ function useBlockTreeItem(block, t0) {
302
318
  handleBlockMouseLeave,
303
319
  toggleSelection
304
320
  };
305
- $[9] = ellipsisPopoverOpen;
306
- $[10] = handleBlockMouseEnter;
307
- $[11] = handleBlockMouseLeave;
308
- $[12] = shouldShowActive;
309
- $[13] = shouldShowHover;
310
- $[14] = toggleSelection;
311
- $[15] = t4;
312
- } else t4 = $[15];
321
+ $[10] = ellipsisPopoverOpen;
322
+ $[11] = handleBlockMouseEnter;
323
+ $[12] = handleBlockMouseLeave;
324
+ $[13] = shouldShowActive;
325
+ $[14] = shouldShowHover;
326
+ $[15] = toggleSelection;
327
+ $[16] = t4;
328
+ } else t4 = $[16];
313
329
  return t4;
314
330
  }
315
331
  function _temp7(state_0) {
@@ -319,66 +335,74 @@ function _temp6(state) {
319
335
  return state.context.selection;
320
336
  }
321
337
  const BlockTreeItemHeader = (t0) => {
322
- const $ = c(16);
338
+ const $ = c(17);
339
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
340
+ for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
341
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
342
+ }
323
343
  let children;
324
344
  let className;
325
345
  let props;
326
346
  let ref;
327
347
  let shouldShowActive;
328
348
  let shouldShowHover;
329
- if ($[0] !== t0) {
349
+ if ($[1] !== t0) {
330
350
  ({children, shouldShowHover, shouldShowActive, className, ref, ...props} = t0);
331
- $[0] = t0;
332
- $[1] = children;
333
- $[2] = className;
334
- $[3] = props;
335
- $[4] = ref;
336
- $[5] = shouldShowActive;
337
- $[6] = shouldShowHover;
351
+ $[1] = t0;
352
+ $[2] = children;
353
+ $[3] = className;
354
+ $[4] = props;
355
+ $[5] = ref;
356
+ $[6] = shouldShowActive;
357
+ $[7] = shouldShowHover;
338
358
  } else {
339
- children = $[1];
340
- className = $[2];
341
- props = $[3];
342
- ref = $[4];
343
- shouldShowActive = $[5];
344
- shouldShowHover = $[6];
359
+ children = $[2];
360
+ className = $[3];
361
+ props = $[4];
362
+ ref = $[5];
363
+ shouldShowActive = $[6];
364
+ shouldShowHover = $[7];
345
365
  }
346
366
  const t1 = shouldShowHover && "hover:bg-accent/75";
347
367
  const t2 = shouldShowActive && "bg-accent text-accent-foreground";
348
368
  let t3;
349
- if ($[7] !== className || $[8] !== t1 || $[9] !== t2) {
350
- t3 = cn("flex flex-row justify-between items-center gap-1 px-1 max-w-full rounded-lg text-foreground transition-all hover:transition-none", t1, t2, "data-[open]:rounded-b-none", className);
351
- $[7] = className;
352
- $[8] = t1;
353
- $[9] = t2;
354
- $[10] = t3;
355
- } else t3 = $[10];
369
+ if ($[8] !== className || $[9] !== t1 || $[10] !== t2) {
370
+ t3 = cn("flex flex-row justify-between items-center gap-1 px-1 max-w-full rounded-lg text-foreground transition-all hover:transition-none", t1, t2, "data-open:rounded-b-none", className);
371
+ $[8] = className;
372
+ $[9] = t1;
373
+ $[10] = t2;
374
+ $[11] = t3;
375
+ } else t3 = $[11];
356
376
  let t4;
357
- if ($[11] !== children || $[12] !== props || $[13] !== ref || $[14] !== t3) {
377
+ if ($[12] !== children || $[13] !== props || $[14] !== ref || $[15] !== t3) {
358
378
  t4 = /* @__PURE__ */ jsx("div", {
359
379
  ref,
360
380
  className: t3,
361
381
  ...props,
362
382
  children
363
383
  });
364
- $[11] = children;
365
- $[12] = props;
366
- $[13] = ref;
367
- $[14] = t3;
368
- $[15] = t4;
369
- } else t4 = $[15];
384
+ $[12] = children;
385
+ $[13] = props;
386
+ $[14] = ref;
387
+ $[15] = t3;
388
+ $[16] = t4;
389
+ } else t4 = $[16];
370
390
  return t4;
371
391
  };
372
392
  const BlockTreeItemTrigger = (t0) => {
373
- const $ = c(4);
393
+ const $ = c(5);
394
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
395
+ for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
396
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
397
+ }
374
398
  const { displayText, onClick } = t0;
375
399
  let t1;
376
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
400
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
377
401
  t1 = cn("cursor-default flex-1 truncate py-2 text-sm text-left rounded-sm", "focus-visible:underline outline-none focus-visible:decoration-ring/50 focus-visible:decoration-4");
378
- $[0] = t1;
379
- } else t1 = $[0];
402
+ $[1] = t1;
403
+ } else t1 = $[1];
380
404
  let t2;
381
- if ($[1] !== displayText || $[2] !== onClick) {
405
+ if ($[2] !== displayText || $[3] !== onClick) {
382
406
  t2 = /* @__PURE__ */ jsx("div", {
383
407
  className: "flex flex-1 items-center gap-1 overflow-x-hidden",
384
408
  children: /* @__PURE__ */ jsx(Accordion.Trigger, {
@@ -388,43 +412,47 @@ const BlockTreeItemTrigger = (t0) => {
388
412
  children: displayText
389
413
  })
390
414
  });
391
- $[1] = displayText;
392
- $[2] = onClick;
393
- $[3] = t2;
394
- } else t2 = $[3];
415
+ $[2] = displayText;
416
+ $[3] = onClick;
417
+ $[4] = t2;
418
+ } else t2 = $[4];
395
419
  return t2;
396
420
  };
397
421
  const BlockTreeItemEllipsis = (t0) => {
398
- const $ = c(11);
422
+ const $ = c(12);
423
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
424
+ for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
425
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
426
+ }
399
427
  let className;
400
428
  let open;
401
429
  let props;
402
- if ($[0] !== t0) {
430
+ if ($[1] !== t0) {
403
431
  ({open, className, ...props} = t0);
404
- $[0] = t0;
405
- $[1] = className;
406
- $[2] = open;
407
- $[3] = props;
432
+ $[1] = t0;
433
+ $[2] = className;
434
+ $[3] = open;
435
+ $[4] = props;
408
436
  } else {
409
- className = $[1];
410
- open = $[2];
411
- props = $[3];
437
+ className = $[2];
438
+ open = $[3];
439
+ props = $[4];
412
440
  }
413
441
  const t1 = open ? "flex" : "hidden group-hover:flex group-focus-within:flex";
414
442
  let t2;
415
- if ($[4] !== className || $[5] !== t1) {
443
+ if ($[5] !== className || $[6] !== t1) {
416
444
  t2 = cn("text-muted-foreground hover:text-foreground", t1, className);
417
- $[4] = className;
418
- $[5] = t1;
419
- $[6] = t2;
420
- } else t2 = $[6];
445
+ $[5] = className;
446
+ $[6] = t1;
447
+ $[7] = t2;
448
+ } else t2 = $[7];
421
449
  let t3;
422
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
450
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
423
451
  t3 = /* @__PURE__ */ jsx(Ellipsis, { className: "size-4" });
424
- $[7] = t3;
425
- } else t3 = $[7];
452
+ $[8] = t3;
453
+ } else t3 = $[8];
426
454
  let t4;
427
- if ($[8] !== props || $[9] !== t2) {
455
+ if ($[9] !== props || $[10] !== t2) {
428
456
  t4 = /* @__PURE__ */ jsx(Button, {
429
457
  variant: "ghost",
430
458
  size: "icon-sm",
@@ -432,24 +460,28 @@ const BlockTreeItemEllipsis = (t0) => {
432
460
  ...props,
433
461
  children: t3
434
462
  });
435
- $[8] = props;
436
- $[9] = t2;
437
- $[10] = t4;
438
- } else t4 = $[10];
463
+ $[9] = props;
464
+ $[10] = t2;
465
+ $[11] = t4;
466
+ } else t4 = $[11];
439
467
  return t4;
440
468
  };
441
469
  const BlockTreeItemContent = (t0) => {
442
- const $ = c(2);
470
+ const $ = c(3);
471
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
472
+ for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
473
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
474
+ }
443
475
  const { block } = t0;
444
476
  let t1;
445
- if ($[0] !== block) {
477
+ if ($[1] !== block) {
446
478
  t1 = /* @__PURE__ */ jsx(Accordion.Panel, {
447
479
  className: "text-muted-foreground h-[var(--accordion-panel-height)] overflow-hidden rounded-b-lg text-sm transition-[height] duration-200 data-[ending-style]:h-0 data-[starting-style]:h-0",
448
480
  children: /* @__PURE__ */ jsx(BlockFields, { block })
449
481
  });
450
- $[0] = block;
451
- $[1] = t1;
452
- } else t1 = $[1];
482
+ $[1] = block;
483
+ $[2] = t1;
484
+ } else t1 = $[2];
453
485
  return t1;
454
486
  };
455
487
  const animateLayoutChanges = (args) => {
@@ -458,77 +490,81 @@ const animateLayoutChanges = (args) => {
458
490
  return defaultAnimateLayoutChanges(args);
459
491
  };
460
492
  const SortableBlock = (t0) => {
461
- const $ = c(52);
493
+ const $ = c(53);
494
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
495
+ for (let $i = 0; $i < 53; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
496
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
497
+ }
462
498
  const { block } = t0;
463
499
  const [gripPopoverOpen, setGripPopoverOpen] = React.useState(false);
464
500
  const t1 = String(block.id);
465
501
  let t2;
466
- if ($[0] !== t1) {
502
+ if ($[1] !== t1) {
467
503
  t2 = {
468
504
  id: t1,
469
505
  animateLayoutChanges
470
506
  };
471
- $[0] = t1;
472
- $[1] = t2;
473
- } else t2 = $[1];
507
+ $[1] = t1;
508
+ $[2] = t2;
509
+ } else t2 = $[2];
474
510
  const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable(t2);
475
511
  let t3;
476
- if ($[2] !== transform) {
512
+ if ($[3] !== transform) {
477
513
  t3 = CSS.Transform.toString(transform);
478
- $[2] = transform;
479
- $[3] = t3;
480
- } else t3 = $[3];
514
+ $[3] = transform;
515
+ $[4] = t3;
516
+ } else t3 = $[4];
481
517
  const t4 = isDragging ? 0 : 1;
482
518
  let t5;
483
- if ($[4] !== t3 || $[5] !== t4 || $[6] !== transition) {
519
+ if ($[5] !== t3 || $[6] !== t4 || $[7] !== transition) {
484
520
  t5 = {
485
521
  transform: t3,
486
522
  transition,
487
523
  opacity: t4
488
524
  };
489
- $[4] = t3;
490
- $[5] = t4;
491
- $[6] = transition;
492
- $[7] = t5;
493
- } else t5 = $[7];
525
+ $[5] = t3;
526
+ $[6] = t4;
527
+ $[7] = transition;
528
+ $[8] = t5;
529
+ } else t5 = $[8];
494
530
  const style = t5;
495
531
  const ctx = useBlockTreeItem(block, isDragging);
496
532
  let t6;
497
- if ($[8] !== block.id) {
533
+ if ($[9] !== block.id) {
498
534
  t6 = (state) => state.context.selection?.blockId === block.id;
499
- $[8] = block.id;
500
- $[9] = t6;
501
- } else t6 = $[9];
535
+ $[9] = block.id;
536
+ $[10] = t6;
537
+ } else t6 = $[10];
502
538
  const isBlockFocused = useSelector(previewStore, t6);
503
539
  let t7;
504
- if ($[10] !== block.id || $[11] !== isBlockFocused) {
540
+ if ($[11] !== block.id || $[12] !== isBlockFocused) {
505
541
  t7 = isBlockFocused ? [String(block.id)] : [];
506
- $[10] = block.id;
507
- $[11] = isBlockFocused;
508
- $[12] = t7;
509
- } else t7 = $[12];
542
+ $[11] = block.id;
543
+ $[12] = isBlockFocused;
544
+ $[13] = t7;
545
+ } else t7 = $[13];
510
546
  const t8 = String(block.id);
511
547
  let t9;
512
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
548
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
513
549
  t9 = /* @__PURE__ */ jsx("div", {});
514
- $[13] = t9;
515
- } else t9 = $[13];
550
+ $[14] = t9;
551
+ } else t9 = $[14];
516
552
  let t10;
517
553
  let t11;
518
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
554
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
519
555
  t10 = /* @__PURE__ */ jsx("span", {
520
556
  className: "sr-only",
521
557
  children: "Click and use arrow keys to reorder"
522
558
  });
523
559
  t11 = /* @__PURE__ */ jsx(GripVertical, { className: "h-4 w-4" });
524
- $[14] = t10;
525
- $[15] = t11;
560
+ $[15] = t10;
561
+ $[16] = t11;
526
562
  } else {
527
- t10 = $[14];
528
- t11 = $[15];
563
+ t10 = $[15];
564
+ t11 = $[16];
529
565
  }
530
566
  let t12;
531
- if ($[16] !== attributes || $[17] !== listeners) {
567
+ if ($[17] !== attributes || $[18] !== listeners) {
532
568
  t12 = /* @__PURE__ */ jsxs(Button, {
533
569
  variant: "ghost",
534
570
  size: "icon-sm",
@@ -537,56 +573,56 @@ const SortableBlock = (t0) => {
537
573
  ...listeners,
538
574
  children: [t10, t11]
539
575
  });
540
- $[16] = attributes;
541
- $[17] = listeners;
542
- $[18] = t12;
543
- } else t12 = $[18];
576
+ $[17] = attributes;
577
+ $[18] = listeners;
578
+ $[19] = t12;
579
+ } else t12 = $[19];
544
580
  let t13;
545
- if ($[19] !== block || $[20] !== gripPopoverOpen || $[21] !== t12) {
581
+ if ($[20] !== block || $[21] !== gripPopoverOpen || $[22] !== t12) {
546
582
  t13 = /* @__PURE__ */ jsx(BlockActionsPopover, {
547
583
  block,
548
584
  open: gripPopoverOpen,
549
585
  onOpenChange: setGripPopoverOpen,
550
586
  children: t12
551
587
  });
552
- $[19] = block;
553
- $[20] = gripPopoverOpen;
554
- $[21] = t12;
555
- $[22] = t13;
556
- } else t13 = $[22];
588
+ $[20] = block;
589
+ $[21] = gripPopoverOpen;
590
+ $[22] = t12;
591
+ $[23] = t13;
592
+ } else t13 = $[23];
557
593
  const t14 = block.summary || block.type;
558
594
  let t15;
559
- if ($[23] !== ctx.toggleSelection || $[24] !== t14) {
595
+ if ($[24] !== ctx.toggleSelection || $[25] !== t14) {
560
596
  t15 = /* @__PURE__ */ jsx(BlockTreeItemTrigger, {
561
597
  displayText: t14,
562
598
  onClick: ctx.toggleSelection
563
599
  });
564
- $[23] = ctx.toggleSelection;
565
- $[24] = t14;
566
- $[25] = t15;
567
- } else t15 = $[25];
600
+ $[24] = ctx.toggleSelection;
601
+ $[25] = t14;
602
+ $[26] = t15;
603
+ } else t15 = $[26];
568
604
  let t16;
569
- if ($[26] !== ctx.ellipsisPopoverOpen) {
605
+ if ($[27] !== ctx.ellipsisPopoverOpen) {
570
606
  t16 = /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen });
571
- $[26] = ctx.ellipsisPopoverOpen;
572
- $[27] = t16;
573
- } else t16 = $[27];
607
+ $[27] = ctx.ellipsisPopoverOpen;
608
+ $[28] = t16;
609
+ } else t16 = $[28];
574
610
  let t17;
575
- if ($[28] !== block || $[29] !== ctx.ellipsisPopoverOpen || $[30] !== ctx.setEllipsisPopoverOpen || $[31] !== t16) {
611
+ if ($[29] !== block || $[30] !== ctx.ellipsisPopoverOpen || $[31] !== ctx.setEllipsisPopoverOpen || $[32] !== t16) {
576
612
  t17 = /* @__PURE__ */ jsx(BlockActionsPopover, {
577
613
  block,
578
614
  open: ctx.ellipsisPopoverOpen,
579
615
  onOpenChange: ctx.setEllipsisPopoverOpen,
580
616
  children: t16
581
617
  });
582
- $[28] = block;
583
- $[29] = ctx.ellipsisPopoverOpen;
584
- $[30] = ctx.setEllipsisPopoverOpen;
585
- $[31] = t16;
586
- $[32] = t17;
587
- } else t17 = $[32];
618
+ $[29] = block;
619
+ $[30] = ctx.ellipsisPopoverOpen;
620
+ $[31] = ctx.setEllipsisPopoverOpen;
621
+ $[32] = t16;
622
+ $[33] = t17;
623
+ } else t17 = $[33];
588
624
  let t18;
589
- if ($[33] !== ctx.shouldShowActive || $[34] !== ctx.shouldShowHover || $[35] !== t13 || $[36] !== t15 || $[37] !== t17) {
625
+ if ($[34] !== ctx.shouldShowActive || $[35] !== ctx.shouldShowHover || $[36] !== t13 || $[37] !== t15 || $[38] !== t17) {
590
626
  t18 = /* @__PURE__ */ jsx(Accordion.Header, {
591
627
  render: t9,
592
628
  children: /* @__PURE__ */ jsxs(BlockTreeItemHeader, {
@@ -599,21 +635,21 @@ const SortableBlock = (t0) => {
599
635
  ]
600
636
  })
601
637
  });
602
- $[33] = ctx.shouldShowActive;
603
- $[34] = ctx.shouldShowHover;
604
- $[35] = t13;
605
- $[36] = t15;
606
- $[37] = t17;
607
- $[38] = t18;
608
- } else t18 = $[38];
638
+ $[34] = ctx.shouldShowActive;
639
+ $[35] = ctx.shouldShowHover;
640
+ $[36] = t13;
641
+ $[37] = t15;
642
+ $[38] = t17;
643
+ $[39] = t18;
644
+ } else t18 = $[39];
609
645
  let t19;
610
- if ($[39] !== block) {
646
+ if ($[40] !== block) {
611
647
  t19 = /* @__PURE__ */ jsx(BlockTreeItemContent, { block });
612
- $[39] = block;
613
- $[40] = t19;
614
- } else t19 = $[40];
648
+ $[40] = block;
649
+ $[41] = t19;
650
+ } else t19 = $[41];
615
651
  let t20;
616
- if ($[41] !== ctx.handleBlockMouseEnter || $[42] !== ctx.handleBlockMouseLeave || $[43] !== setNodeRef || $[44] !== style || $[45] !== t18 || $[46] !== t19 || $[47] !== t8) {
652
+ if ($[42] !== ctx.handleBlockMouseEnter || $[43] !== ctx.handleBlockMouseLeave || $[44] !== setNodeRef || $[45] !== style || $[46] !== t18 || $[47] !== t19 || $[48] !== t8) {
617
653
  t20 = /* @__PURE__ */ jsxs(Accordion.Item, {
618
654
  value: t8,
619
655
  ref: setNodeRef,
@@ -623,82 +659,86 @@ const SortableBlock = (t0) => {
623
659
  onMouseLeave: ctx.handleBlockMouseLeave,
624
660
  children: [t18, t19]
625
661
  });
626
- $[41] = ctx.handleBlockMouseEnter;
627
- $[42] = ctx.handleBlockMouseLeave;
628
- $[43] = setNodeRef;
629
- $[44] = style;
630
- $[45] = t18;
631
- $[46] = t19;
632
- $[47] = t8;
633
- $[48] = t20;
634
- } else t20 = $[48];
662
+ $[42] = ctx.handleBlockMouseEnter;
663
+ $[43] = ctx.handleBlockMouseLeave;
664
+ $[44] = setNodeRef;
665
+ $[45] = style;
666
+ $[46] = t18;
667
+ $[47] = t19;
668
+ $[48] = t8;
669
+ $[49] = t20;
670
+ } else t20 = $[49];
635
671
  let t21;
636
- if ($[49] !== t20 || $[50] !== t7) {
672
+ if ($[50] !== t20 || $[51] !== t7) {
637
673
  t21 = /* @__PURE__ */ jsx(Accordion.Root, {
638
674
  value: t7,
639
675
  children: t20
640
676
  });
641
- $[49] = t20;
642
- $[50] = t7;
643
- $[51] = t21;
644
- } else t21 = $[51];
677
+ $[50] = t20;
678
+ $[51] = t7;
679
+ $[52] = t21;
680
+ } else t21 = $[52];
645
681
  return t21;
646
682
  };
647
683
  const LayoutBlockItem = (t0) => {
648
- const $ = c(43);
684
+ const $ = c(44);
685
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
686
+ for (let $i = 0; $i < 44; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
687
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
688
+ }
649
689
  const { block, layoutName } = t0;
650
690
  const camoxApp = useCamoxApp();
651
691
  let t1;
652
- if ($[0] !== block.type || $[1] !== camoxApp) {
692
+ if ($[1] !== block.type || $[2] !== camoxApp) {
653
693
  t1 = camoxApp.getBlockById(block.type);
654
- $[0] = block.type;
655
- $[1] = camoxApp;
656
- $[2] = t1;
657
- } else t1 = $[2];
694
+ $[1] = block.type;
695
+ $[2] = camoxApp;
696
+ $[3] = t1;
697
+ } else t1 = $[3];
658
698
  const blockDef = t1;
659
699
  const ctx = useBlockTreeItem(block);
660
700
  const displayText = blockDef?._internal.title ?? block.type;
661
701
  let t2;
662
- if ($[3] !== block.id) {
702
+ if ($[4] !== block.id) {
663
703
  t2 = (state) => state.context.selection?.blockId === block.id;
664
- $[3] = block.id;
665
- $[4] = t2;
666
- } else t2 = $[4];
704
+ $[4] = block.id;
705
+ $[5] = t2;
706
+ } else t2 = $[5];
667
707
  const isBlockFocused = useSelector(previewStore, t2);
668
708
  let t3;
669
- if ($[5] !== block.id || $[6] !== isBlockFocused) {
709
+ if ($[6] !== block.id || $[7] !== isBlockFocused) {
670
710
  t3 = isBlockFocused ? [String(block.id)] : [];
671
- $[5] = block.id;
672
- $[6] = isBlockFocused;
673
- $[7] = t3;
674
- } else t3 = $[7];
711
+ $[6] = block.id;
712
+ $[7] = isBlockFocused;
713
+ $[8] = t3;
714
+ } else t3 = $[8];
675
715
  const t4 = String(block.id);
676
716
  let t5;
677
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
717
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
678
718
  t5 = /* @__PURE__ */ jsx("div", {});
679
- $[8] = t5;
680
- } else t5 = $[8];
719
+ $[9] = t5;
720
+ } else t5 = $[9];
681
721
  let t6;
682
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
722
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
683
723
  t6 = /* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsx(LayoutTemplate, { className: "h-4 w-4" }) });
684
- $[9] = t6;
685
- } else t6 = $[9];
724
+ $[10] = t6;
725
+ } else t6 = $[10];
686
726
  let t7;
687
- if ($[10] !== layoutName) {
727
+ if ($[11] !== layoutName) {
688
728
  t7 = /* @__PURE__ */ jsx("span", {
689
729
  className: "font-semibold",
690
730
  children: layoutName
691
731
  });
692
- $[10] = layoutName;
693
- $[11] = t7;
694
- } else t7 = $[11];
732
+ $[11] = layoutName;
733
+ $[12] = t7;
734
+ } else t7 = $[12];
695
735
  let t8;
696
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
736
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
697
737
  t8 = /* @__PURE__ */ jsx("br", {});
698
- $[12] = t8;
699
- } else t8 = $[12];
738
+ $[13] = t8;
739
+ } else t8 = $[13];
700
740
  let t9;
701
- if ($[13] !== t7) {
741
+ if ($[14] !== t7) {
702
742
  t9 = /* @__PURE__ */ jsx("div", {
703
743
  className: "text-muted-foreground flex size-7 shrink-0 items-center justify-center",
704
744
  children: /* @__PURE__ */ jsxs(Tooltip, { children: [t6, /* @__PURE__ */ jsxs(TooltipContent, { children: [
@@ -709,28 +749,28 @@ const LayoutBlockItem = (t0) => {
709
749
  "Changing the content may affect other pages"
710
750
  ] })] })
711
751
  });
712
- $[13] = t7;
713
- $[14] = t9;
714
- } else t9 = $[14];
752
+ $[14] = t7;
753
+ $[15] = t9;
754
+ } else t9 = $[15];
715
755
  let t10;
716
- if ($[15] !== ctx.toggleSelection || $[16] !== displayText) {
756
+ if ($[16] !== ctx.toggleSelection || $[17] !== displayText) {
717
757
  t10 = /* @__PURE__ */ jsx(BlockTreeItemTrigger, {
718
758
  displayText,
719
759
  onClick: ctx.toggleSelection
720
760
  });
721
- $[15] = ctx.toggleSelection;
722
- $[16] = displayText;
723
- $[17] = t10;
724
- } else t10 = $[17];
761
+ $[16] = ctx.toggleSelection;
762
+ $[17] = displayText;
763
+ $[18] = t10;
764
+ } else t10 = $[18];
725
765
  const t11 = block.placement;
726
766
  let t12;
727
- if ($[18] !== ctx.ellipsisPopoverOpen) {
767
+ if ($[19] !== ctx.ellipsisPopoverOpen) {
728
768
  t12 = /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen });
729
- $[18] = ctx.ellipsisPopoverOpen;
730
- $[19] = t12;
731
- } else t12 = $[19];
769
+ $[19] = ctx.ellipsisPopoverOpen;
770
+ $[20] = t12;
771
+ } else t12 = $[20];
732
772
  let t13;
733
- if ($[20] !== block || $[21] !== ctx.ellipsisPopoverOpen || $[22] !== ctx.setEllipsisPopoverOpen || $[23] !== t11 || $[24] !== t12) {
773
+ if ($[21] !== block || $[22] !== ctx.ellipsisPopoverOpen || $[23] !== ctx.setEllipsisPopoverOpen || $[24] !== t11 || $[25] !== t12) {
734
774
  t13 = /* @__PURE__ */ jsx(BlockActionsPopover, {
735
775
  block,
736
776
  open: ctx.ellipsisPopoverOpen,
@@ -739,15 +779,15 @@ const LayoutBlockItem = (t0) => {
739
779
  layoutPlacement: t11,
740
780
  children: t12
741
781
  });
742
- $[20] = block;
743
- $[21] = ctx.ellipsisPopoverOpen;
744
- $[22] = ctx.setEllipsisPopoverOpen;
745
- $[23] = t11;
746
- $[24] = t12;
747
- $[25] = t13;
748
- } else t13 = $[25];
782
+ $[21] = block;
783
+ $[22] = ctx.ellipsisPopoverOpen;
784
+ $[23] = ctx.setEllipsisPopoverOpen;
785
+ $[24] = t11;
786
+ $[25] = t12;
787
+ $[26] = t13;
788
+ } else t13 = $[26];
749
789
  let t14;
750
- if ($[26] !== ctx.shouldShowActive || $[27] !== ctx.shouldShowHover || $[28] !== t10 || $[29] !== t13 || $[30] !== t9) {
790
+ if ($[27] !== ctx.shouldShowActive || $[28] !== ctx.shouldShowHover || $[29] !== t10 || $[30] !== t13 || $[31] !== t9) {
751
791
  t14 = /* @__PURE__ */ jsx(Accordion.Header, {
752
792
  render: t5,
753
793
  children: /* @__PURE__ */ jsxs(BlockTreeItemHeader, {
@@ -760,21 +800,21 @@ const LayoutBlockItem = (t0) => {
760
800
  ]
761
801
  })
762
802
  });
763
- $[26] = ctx.shouldShowActive;
764
- $[27] = ctx.shouldShowHover;
765
- $[28] = t10;
766
- $[29] = t13;
767
- $[30] = t9;
768
- $[31] = t14;
769
- } else t14 = $[31];
803
+ $[27] = ctx.shouldShowActive;
804
+ $[28] = ctx.shouldShowHover;
805
+ $[29] = t10;
806
+ $[30] = t13;
807
+ $[31] = t9;
808
+ $[32] = t14;
809
+ } else t14 = $[32];
770
810
  let t15;
771
- if ($[32] !== block) {
811
+ if ($[33] !== block) {
772
812
  t15 = /* @__PURE__ */ jsx(BlockTreeItemContent, { block });
773
- $[32] = block;
774
- $[33] = t15;
775
- } else t15 = $[33];
813
+ $[33] = block;
814
+ $[34] = t15;
815
+ } else t15 = $[34];
776
816
  let t16;
777
- if ($[34] !== ctx.handleBlockMouseEnter || $[35] !== ctx.handleBlockMouseLeave || $[36] !== t14 || $[37] !== t15 || $[38] !== t4) {
817
+ if ($[35] !== ctx.handleBlockMouseEnter || $[36] !== ctx.handleBlockMouseLeave || $[37] !== t14 || $[38] !== t15 || $[39] !== t4) {
778
818
  t16 = /* @__PURE__ */ jsxs(Accordion.Item, {
779
819
  value: t4,
780
820
  className: "group",
@@ -782,57 +822,61 @@ const LayoutBlockItem = (t0) => {
782
822
  onMouseLeave: ctx.handleBlockMouseLeave,
783
823
  children: [t14, t15]
784
824
  });
785
- $[34] = ctx.handleBlockMouseEnter;
786
- $[35] = ctx.handleBlockMouseLeave;
787
- $[36] = t14;
788
- $[37] = t15;
789
- $[38] = t4;
790
- $[39] = t16;
791
- } else t16 = $[39];
825
+ $[35] = ctx.handleBlockMouseEnter;
826
+ $[36] = ctx.handleBlockMouseLeave;
827
+ $[37] = t14;
828
+ $[38] = t15;
829
+ $[39] = t4;
830
+ $[40] = t16;
831
+ } else t16 = $[40];
792
832
  let t17;
793
- if ($[40] !== t16 || $[41] !== t3) {
833
+ if ($[41] !== t16 || $[42] !== t3) {
794
834
  t17 = /* @__PURE__ */ jsx(Accordion.Root, {
795
835
  value: t3,
796
836
  children: t16
797
837
  });
798
- $[40] = t16;
799
- $[41] = t3;
800
- $[42] = t17;
801
- } else t17 = $[42];
838
+ $[41] = t16;
839
+ $[42] = t3;
840
+ $[43] = t17;
841
+ } else t17 = $[43];
802
842
  return t17;
803
843
  };
804
844
  const PageTree = () => {
805
- const $ = c(46);
845
+ const $ = c(47);
846
+ if ($[0] !== "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd") {
847
+ for (let $i = 0; $i < 47; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
848
+ $[0] = "aafecc25c39d049bbe84407bf96c5e0ab529fb875843dc0f059bdf79cdd37bcd";
849
+ }
806
850
  const page = usePreviewedPage();
807
851
  const { pageBlocks, beforeBlocks: layoutBeforeBlocks, afterBlocks: layoutAfterBlocks } = usePageBlocks(page);
808
852
  const camoxApp = useCamoxApp();
809
853
  const updatePosition = useUpdateBlockPosition();
810
854
  const [activeId, setActiveId] = React.useState(null);
811
855
  let t0;
812
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
856
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
813
857
  t0 = { activationConstraint: {
814
858
  distance: 8,
815
859
  delay: 150,
816
860
  tolerance: 5
817
861
  } };
818
- $[0] = t0;
819
- } else t0 = $[0];
862
+ $[1] = t0;
863
+ } else t0 = $[1];
820
864
  let t1;
821
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
865
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
822
866
  t1 = { coordinateGetter: sortableKeyboardCoordinates };
823
- $[1] = t1;
824
- } else t1 = $[1];
867
+ $[2] = t1;
868
+ } else t1 = $[2];
825
869
  const sensors = useSensors(useSensor(PointerSensor, t0), useSensor(KeyboardSensor, t1));
826
870
  let t2;
827
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
871
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
828
872
  t2 = (event) => {
829
873
  setActiveId(String(event.active.id));
830
874
  };
831
- $[2] = t2;
832
- } else t2 = $[2];
875
+ $[3] = t2;
876
+ } else t2 = $[3];
833
877
  const handleDragStart = t2;
834
878
  let t3;
835
- if ($[3] !== page || $[4] !== pageBlocks || $[5] !== updatePosition) {
879
+ if ($[4] !== page || $[5] !== pageBlocks || $[6] !== updatePosition) {
836
880
  t3 = (event_0) => {
837
881
  const { active, over } = event_0;
838
882
  if (!over || active.id === over.id || !page) {
@@ -861,75 +905,75 @@ const PageTree = () => {
861
905
  });
862
906
  setActiveId(null);
863
907
  };
864
- $[3] = page;
865
- $[4] = pageBlocks;
866
- $[5] = updatePosition;
867
- $[6] = t3;
868
- } else t3 = $[6];
908
+ $[4] = page;
909
+ $[5] = pageBlocks;
910
+ $[6] = updatePosition;
911
+ $[7] = t3;
912
+ } else t3 = $[7];
869
913
  const handleDragEnd = t3;
870
914
  let t4;
871
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
915
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
872
916
  t4 = () => {
873
917
  setActiveId(null);
874
918
  };
875
- $[7] = t4;
876
- } else t4 = $[7];
919
+ $[8] = t4;
920
+ } else t4 = $[8];
877
921
  const handleDragCancel = t4;
878
922
  if (!page) return null;
879
923
  let t5;
880
- if ($[8] !== camoxApp || $[9] !== page.layout) {
924
+ if ($[9] !== camoxApp || $[10] !== page.layout) {
881
925
  t5 = page.layout ? camoxApp.getLayoutById(page.layout.layoutId) : void 0;
882
- $[8] = camoxApp;
883
- $[9] = page.layout;
884
- $[10] = t5;
885
- } else t5 = $[10];
926
+ $[9] = camoxApp;
927
+ $[10] = page.layout;
928
+ $[11] = t5;
929
+ } else t5 = $[11];
886
930
  const layout = t5;
887
931
  let t6;
888
- if ($[11] !== layout?._internal || $[12] !== layoutBeforeBlocks) {
932
+ if ($[12] !== layout?._internal || $[13] !== layoutBeforeBlocks) {
889
933
  let t7;
890
- if ($[14] !== layout?._internal) {
934
+ if ($[15] !== layout?._internal) {
891
935
  t7 = (block_1) => /* @__PURE__ */ jsx(LayoutBlockItem, {
892
936
  block: block_1,
893
937
  layoutName: layout?._internal.title ?? "Unknown"
894
938
  }, String(block_1.id));
895
- $[14] = layout?._internal;
896
- $[15] = t7;
897
- } else t7 = $[15];
939
+ $[15] = layout?._internal;
940
+ $[16] = t7;
941
+ } else t7 = $[16];
898
942
  t6 = layoutBeforeBlocks.map(t7);
899
- $[11] = layout?._internal;
900
- $[12] = layoutBeforeBlocks;
901
- $[13] = t6;
902
- } else t6 = $[13];
943
+ $[12] = layout?._internal;
944
+ $[13] = layoutBeforeBlocks;
945
+ $[14] = t6;
946
+ } else t6 = $[14];
903
947
  let t7;
904
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
948
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
905
949
  t7 = [restrictToVerticalAxis];
906
- $[16] = t7;
907
- } else t7 = $[16];
950
+ $[17] = t7;
951
+ } else t7 = $[17];
908
952
  let t8;
909
- if ($[17] !== pageBlocks) {
953
+ if ($[18] !== pageBlocks) {
910
954
  t8 = pageBlocks.map(_temp8);
911
- $[17] = pageBlocks;
912
- $[18] = t8;
913
- } else t8 = $[18];
955
+ $[18] = pageBlocks;
956
+ $[19] = t8;
957
+ } else t8 = $[19];
914
958
  let t9;
915
- if ($[19] !== pageBlocks) {
959
+ if ($[20] !== pageBlocks) {
916
960
  t9 = pageBlocks.map(_temp9);
917
- $[19] = pageBlocks;
918
- $[20] = t9;
919
- } else t9 = $[20];
961
+ $[20] = pageBlocks;
962
+ $[21] = t9;
963
+ } else t9 = $[21];
920
964
  let t10;
921
- if ($[21] !== t8 || $[22] !== t9) {
965
+ if ($[22] !== t8 || $[23] !== t9) {
922
966
  t10 = /* @__PURE__ */ jsx(SortableContext, {
923
967
  items: t8,
924
968
  strategy: verticalListSortingStrategy,
925
969
  children: t9
926
970
  });
927
- $[21] = t8;
928
- $[22] = t9;
929
- $[23] = t10;
930
- } else t10 = $[23];
971
+ $[22] = t8;
972
+ $[23] = t9;
973
+ $[24] = t10;
974
+ } else t10 = $[24];
931
975
  let t11;
932
- if ($[24] !== activeId || $[25] !== pageBlocks) {
976
+ if ($[25] !== activeId || $[26] !== pageBlocks) {
933
977
  t11 = activeId ? (() => {
934
978
  const activeBlock = pageBlocks.find((b) => String(b.id) === activeId);
935
979
  if (!activeBlock) return null;
@@ -944,21 +988,21 @@ const PageTree = () => {
944
988
  })
945
989
  });
946
990
  })() : null;
947
- $[24] = activeId;
948
- $[25] = pageBlocks;
949
- $[26] = t11;
950
- } else t11 = $[26];
991
+ $[25] = activeId;
992
+ $[26] = pageBlocks;
993
+ $[27] = t11;
994
+ } else t11 = $[27];
951
995
  let t12;
952
- if ($[27] !== t11) {
996
+ if ($[28] !== t11) {
953
997
  t12 = /* @__PURE__ */ jsx(DragOverlay, {
954
998
  dropAnimation: null,
955
999
  children: t11
956
1000
  });
957
- $[27] = t11;
958
- $[28] = t12;
959
- } else t12 = $[28];
1001
+ $[28] = t11;
1002
+ $[29] = t12;
1003
+ } else t12 = $[29];
960
1004
  let t13;
961
- if ($[29] !== handleDragEnd || $[30] !== sensors || $[31] !== t10 || $[32] !== t12) {
1005
+ if ($[30] !== handleDragEnd || $[31] !== sensors || $[32] !== t10 || $[33] !== t12) {
962
1006
  t13 = /* @__PURE__ */ jsxs(DndContext, {
963
1007
  sensors,
964
1008
  collisionDetection: closestCenter,
@@ -968,30 +1012,30 @@ const PageTree = () => {
968
1012
  modifiers: t7,
969
1013
  children: [t10, t12]
970
1014
  });
971
- $[29] = handleDragEnd;
972
- $[30] = sensors;
973
- $[31] = t10;
974
- $[32] = t12;
975
- $[33] = t13;
976
- } else t13 = $[33];
1015
+ $[30] = handleDragEnd;
1016
+ $[31] = sensors;
1017
+ $[32] = t10;
1018
+ $[33] = t12;
1019
+ $[34] = t13;
1020
+ } else t13 = $[34];
977
1021
  let t14;
978
- if ($[34] !== layout?._internal || $[35] !== layoutAfterBlocks) {
1022
+ if ($[35] !== layout?._internal || $[36] !== layoutAfterBlocks) {
979
1023
  let t15;
980
- if ($[37] !== layout?._internal) {
1024
+ if ($[38] !== layout?._internal) {
981
1025
  t15 = (block_4) => /* @__PURE__ */ jsx(LayoutBlockItem, {
982
1026
  block: block_4,
983
1027
  layoutName: layout?._internal.title ?? "Unknown"
984
1028
  }, String(block_4.id));
985
- $[37] = layout?._internal;
986
- $[38] = t15;
987
- } else t15 = $[38];
1029
+ $[38] = layout?._internal;
1030
+ $[39] = t15;
1031
+ } else t15 = $[39];
988
1032
  t14 = layoutAfterBlocks.map(t15);
989
- $[34] = layout?._internal;
990
- $[35] = layoutAfterBlocks;
991
- $[36] = t14;
992
- } else t14 = $[36];
1033
+ $[35] = layout?._internal;
1034
+ $[36] = layoutAfterBlocks;
1035
+ $[37] = t14;
1036
+ } else t14 = $[37];
993
1037
  let t15;
994
- if ($[39] !== t13 || $[40] !== t14 || $[41] !== t6) {
1038
+ if ($[40] !== t13 || $[41] !== t14 || $[42] !== t6) {
995
1039
  t15 = /* @__PURE__ */ jsxs("div", {
996
1040
  className: "flex flex-col gap-0.5",
997
1041
  children: [
@@ -1000,26 +1044,26 @@ const PageTree = () => {
1000
1044
  t14
1001
1045
  ]
1002
1046
  });
1003
- $[39] = t13;
1004
- $[40] = t14;
1005
- $[41] = t6;
1006
- $[42] = t15;
1007
- } else t15 = $[42];
1047
+ $[40] = t13;
1048
+ $[41] = t14;
1049
+ $[42] = t6;
1050
+ $[43] = t15;
1051
+ } else t15 = $[43];
1008
1052
  let t16;
1009
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
1053
+ if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
1010
1054
  t16 = /* @__PURE__ */ jsxs(Button, {
1011
1055
  variant: "secondary",
1012
1056
  onClick: _temp0,
1013
1057
  children: [/* @__PURE__ */ jsx(Plus, {}), "Add block"]
1014
1058
  });
1015
- $[43] = t16;
1016
- } else t16 = $[43];
1059
+ $[44] = t16;
1060
+ } else t16 = $[44];
1017
1061
  let t17;
1018
- if ($[44] !== t15) {
1062
+ if ($[45] !== t15) {
1019
1063
  t17 = /* @__PURE__ */ jsxs(Fragment, { children: [t15, t16] });
1020
- $[44] = t15;
1021
- $[45] = t17;
1022
- } else t17 = $[45];
1064
+ $[45] = t15;
1065
+ $[46] = t17;
1066
+ } else t17 = $[46];
1023
1067
  return t17;
1024
1068
  };
1025
1069
  function _temp3(state) {