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.
- package/dist/components/AuthGate.js +6 -0
- package/dist/core/components/AddBlockControlBar.js +30 -26
- package/dist/core/components/lexical/InlineContentEditable.js +19 -15
- package/dist/core/components/lexical/InlineLexicalEditor.js +62 -42
- package/dist/core/components/lexical/SelectionBroadcaster.js +25 -21
- package/dist/core/components/lexical/SidebarLexicalEditor.js +33 -21
- package/dist/core/createBlock.js +524 -488
- package/dist/core/createLayout.js +40 -28
- package/dist/core/hooks/useFieldSelection.js +12 -8
- package/dist/core/hooks/useIsEditable.js +6 -0
- package/dist/core/hooks/useOverlayMessage.js +19 -15
- package/dist/core/lib/contentType.d.ts +8 -8
- package/dist/core/lib/contentType.js +63 -0
- package/dist/features/content/CamoxContent.js +92 -88
- package/dist/features/content/components/AssetCard.js +46 -42
- package/dist/features/content/components/AssetCardSkeleton.js +8 -4
- package/dist/features/content/components/ContentSidebar.js +8 -4
- package/dist/features/content/components/UploadDropZone.js +31 -27
- package/dist/features/content/components/UploadProgressDrawer.js +98 -90
- package/dist/features/preview/CamoxPreview.js +162 -146
- package/dist/features/preview/components/AddBlockSheet.js +105 -101
- package/dist/features/preview/components/AgentChatSheet.js +74 -21
- package/dist/features/preview/components/AssetFieldEditor.js +98 -90
- package/dist/features/preview/components/AssetLightbox.js +21 -17
- package/dist/features/preview/components/AssetPickerGrid.js +84 -80
- package/dist/features/preview/components/BlockActionsPopover.js +35 -31
- package/dist/features/preview/components/BlockErrorBoundary.js +12 -8
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/DebouncedFieldEditor.js +41 -37
- package/dist/features/preview/components/EditPageModal.js +114 -98
- package/dist/features/preview/components/FieldOverlayStyles.js +8 -4
- package/dist/features/preview/components/FieldToolbar.js +95 -54
- package/dist/features/preview/components/Frame.js +50 -46
- package/dist/features/preview/components/ItemFieldsEditor.js +81 -79
- package/dist/features/preview/components/LinkFieldEditor.js +138 -134
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +105 -97
- package/dist/features/preview/components/OverlayTracker.js +19 -15
- package/dist/features/preview/components/Overlays.js +27 -23
- package/dist/features/preview/components/PageContentSheet.js +54 -4
- package/dist/features/preview/components/PageLocationFieldset.js +113 -109
- package/dist/features/preview/components/PagePicker.js +1 -1
- package/dist/features/preview/components/PageTree.js +443 -399
- package/dist/features/preview/components/PeekedBlock.js +69 -65
- package/dist/features/preview/components/PreviewPanel.js +64 -52
- package/dist/features/preview/components/PreviewSideSheet.js +25 -16
- package/dist/features/preview/components/PreviewToolbar.js +127 -123
- package/dist/features/preview/components/RepeatableItemsList.js +176 -171
- package/dist/features/preview/components/ShikiMarkdown.js +18 -14
- package/dist/features/preview/components/UnlinkAssetButton.js +74 -70
- package/dist/features/preview/components/useRepeatableItemActions.js +266 -0
- package/dist/features/preview/components/useUpdateBlockPosition.js +13 -9
- package/dist/features/provider/CamoxProvider.js +60 -52
- package/dist/features/provider/components/CamoxAppContext.js +10 -6
- package/dist/features/provider/components/CommandPalette.js +77 -69
- package/dist/features/provider/useAdminShortcuts.js +11 -7
- package/dist/features/routes/pageRoute.js +8 -4
- package/dist/features/studio/CamoxStudio.js +23 -19
- package/dist/features/studio/components/EnvironmentMenu.js +32 -28
- package/dist/features/studio/components/Navbar.js +62 -54
- package/dist/features/studio/components/ProjectMenu.js +131 -123
- package/dist/features/studio/components/UserButton.js +15 -11
- package/dist/features/studio/useTheme.js +82 -42
- package/dist/features/vite/definitionsSync.js +5 -5
- package/dist/features/vite/skillGeneration.js +43 -8
- package/dist/features/vite/vite.d.ts +1 -1
- package/dist/features/vite/vite.js +20 -2
- package/dist/hooks/use-marquee-selection.js +36 -32
- package/dist/lib/auth.js +49 -22
- package/dist/lib/normalized-data.js +55 -47
- package/dist/lib/use-project-room.js +22 -18
- package/dist/studio.css +1 -1
- package/package.json +10 -11
- package/skills/camox-block/SKILL.md +4 -0
- package/skills/camox-cli/SKILL.md +142 -0
- 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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
$[
|
|
46
|
+
$[1] = url;
|
|
47
|
+
$[2] = t0;
|
|
48
|
+
$[3] = t1;
|
|
45
49
|
} else {
|
|
46
|
-
t0 = $[
|
|
47
|
-
t1 = $[
|
|
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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
} else t1 = $[
|
|
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 ($[
|
|
85
|
+
if ($[7] !== arrayItemType || $[8] !== fieldDef) {
|
|
78
86
|
t2 = fieldDef?.getIcon({ arrayItemType }) ?? Type;
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
} else t2 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else t4 = $[
|
|
96
|
+
$[10] = t3;
|
|
97
|
+
$[11] = t4;
|
|
98
|
+
} else t4 = $[11];
|
|
91
99
|
let t5;
|
|
92
|
-
if ($[
|
|
100
|
+
if ($[12] !== fieldType || $[13] !== onFieldClick) {
|
|
93
101
|
t5 = () => fieldType && onFieldClick();
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
} else t5 = $[
|
|
102
|
+
$[12] = fieldType;
|
|
103
|
+
$[13] = onFieldClick;
|
|
104
|
+
$[14] = t5;
|
|
105
|
+
} else t5 = $[14];
|
|
98
106
|
let t6;
|
|
99
|
-
if ($[
|
|
107
|
+
if ($[15] !== fieldType || $[16] !== onFieldDoubleClick) {
|
|
100
108
|
t6 = () => fieldType && onFieldDoubleClick();
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
} else t6 = $[
|
|
109
|
+
$[15] = fieldType;
|
|
110
|
+
$[16] = onFieldDoubleClick;
|
|
111
|
+
$[17] = t6;
|
|
112
|
+
} else t6 = $[17];
|
|
105
113
|
let t7;
|
|
106
|
-
if ($[
|
|
114
|
+
if ($[18] !== FieldIcon) {
|
|
107
115
|
t7 = /* @__PURE__ */ jsx(FieldIcon, { className: "size-4 shrink-0" });
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
} else t7 = $[
|
|
116
|
+
$[18] = FieldIcon;
|
|
117
|
+
$[19] = t7;
|
|
118
|
+
} else t7 = $[19];
|
|
111
119
|
let t8;
|
|
112
|
-
if ($[
|
|
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
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
} else t8 = $[
|
|
125
|
+
$[20] = displayValue;
|
|
126
|
+
$[21] = t8;
|
|
127
|
+
} else t8 = $[21];
|
|
120
128
|
let t9;
|
|
121
|
-
if ($[
|
|
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
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
} else t9 = $[
|
|
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(
|
|
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 ($[
|
|
160
|
+
if ($[1] !== block.id) {
|
|
149
161
|
t1 = blockQueries.get(block.id);
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
} else t1 = $[
|
|
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 ($[
|
|
243
|
+
if ($[3] !== t3) {
|
|
232
244
|
t4 = /* @__PURE__ */ jsx("ul", {
|
|
233
245
|
className: t2,
|
|
234
246
|
children: t3
|
|
235
247
|
});
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
} else t4 = $[
|
|
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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
} else t1 = $[
|
|
276
|
+
$[1] = block;
|
|
277
|
+
$[2] = iframeElement;
|
|
278
|
+
$[3] = t1;
|
|
279
|
+
} else t1 = $[3];
|
|
264
280
|
const handleBlockMouseEnter = t1;
|
|
265
281
|
let t2;
|
|
266
|
-
if ($[
|
|
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
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
} else t2 = $[
|
|
291
|
+
$[4] = block;
|
|
292
|
+
$[5] = iframeElement;
|
|
293
|
+
$[6] = t2;
|
|
294
|
+
} else t2 = $[6];
|
|
279
295
|
const handleBlockMouseLeave = t2;
|
|
280
296
|
let t3;
|
|
281
|
-
if ($[
|
|
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
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
} else t3 = $[
|
|
305
|
+
$[7] = block;
|
|
306
|
+
$[8] = isBlockSelected;
|
|
307
|
+
$[9] = t3;
|
|
308
|
+
} else t3 = $[9];
|
|
293
309
|
const toggleSelection = t3;
|
|
294
310
|
let t4;
|
|
295
|
-
if ($[
|
|
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
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
} else t4 = $[
|
|
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(
|
|
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 ($[
|
|
349
|
+
if ($[1] !== t0) {
|
|
330
350
|
({children, shouldShowHover, shouldShowActive, className, ref, ...props} = t0);
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
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 = $[
|
|
340
|
-
className = $[
|
|
341
|
-
props = $[
|
|
342
|
-
ref = $[
|
|
343
|
-
shouldShowActive = $[
|
|
344
|
-
shouldShowHover = $[
|
|
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 ($[
|
|
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-
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
} else t3 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else t4 = $[
|
|
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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
379
|
-
} else t1 = $[
|
|
402
|
+
$[1] = t1;
|
|
403
|
+
} else t1 = $[1];
|
|
380
404
|
let t2;
|
|
381
|
-
if ($[
|
|
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
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
} else t2 = $[
|
|
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(
|
|
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 ($[
|
|
430
|
+
if ($[1] !== t0) {
|
|
403
431
|
({open, className, ...props} = t0);
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
432
|
+
$[1] = t0;
|
|
433
|
+
$[2] = className;
|
|
434
|
+
$[3] = open;
|
|
435
|
+
$[4] = props;
|
|
408
436
|
} else {
|
|
409
|
-
className = $[
|
|
410
|
-
open = $[
|
|
411
|
-
props = $[
|
|
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 ($[
|
|
443
|
+
if ($[5] !== className || $[6] !== t1) {
|
|
416
444
|
t2 = cn("text-muted-foreground hover:text-foreground", t1, className);
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
} else t2 = $[
|
|
445
|
+
$[5] = className;
|
|
446
|
+
$[6] = t1;
|
|
447
|
+
$[7] = t2;
|
|
448
|
+
} else t2 = $[7];
|
|
421
449
|
let t3;
|
|
422
|
-
if ($[
|
|
450
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
423
451
|
t3 = /* @__PURE__ */ jsx(Ellipsis, { className: "size-4" });
|
|
424
|
-
$[
|
|
425
|
-
} else t3 = $[
|
|
452
|
+
$[8] = t3;
|
|
453
|
+
} else t3 = $[8];
|
|
426
454
|
let t4;
|
|
427
|
-
if ($[
|
|
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
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
} else t4 = $[
|
|
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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
} else t1 = $[
|
|
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(
|
|
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 ($[
|
|
502
|
+
if ($[1] !== t1) {
|
|
467
503
|
t2 = {
|
|
468
504
|
id: t1,
|
|
469
505
|
animateLayoutChanges
|
|
470
506
|
};
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
} else t2 = $[
|
|
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 ($[
|
|
512
|
+
if ($[3] !== transform) {
|
|
477
513
|
t3 = CSS.Transform.toString(transform);
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
} else t3 = $[
|
|
514
|
+
$[3] = transform;
|
|
515
|
+
$[4] = t3;
|
|
516
|
+
} else t3 = $[4];
|
|
481
517
|
const t4 = isDragging ? 0 : 1;
|
|
482
518
|
let t5;
|
|
483
|
-
if ($[
|
|
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
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
} else t5 = $[
|
|
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 ($[
|
|
533
|
+
if ($[9] !== block.id) {
|
|
498
534
|
t6 = (state) => state.context.selection?.blockId === block.id;
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
} else t6 = $[
|
|
535
|
+
$[9] = block.id;
|
|
536
|
+
$[10] = t6;
|
|
537
|
+
} else t6 = $[10];
|
|
502
538
|
const isBlockFocused = useSelector(previewStore, t6);
|
|
503
539
|
let t7;
|
|
504
|
-
if ($[
|
|
540
|
+
if ($[11] !== block.id || $[12] !== isBlockFocused) {
|
|
505
541
|
t7 = isBlockFocused ? [String(block.id)] : [];
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
} else t7 = $[
|
|
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 ($[
|
|
548
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
513
549
|
t9 = /* @__PURE__ */ jsx("div", {});
|
|
514
|
-
$[
|
|
515
|
-
} else t9 = $[
|
|
550
|
+
$[14] = t9;
|
|
551
|
+
} else t9 = $[14];
|
|
516
552
|
let t10;
|
|
517
553
|
let t11;
|
|
518
|
-
if ($[
|
|
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
|
-
$[
|
|
525
|
-
$[
|
|
560
|
+
$[15] = t10;
|
|
561
|
+
$[16] = t11;
|
|
526
562
|
} else {
|
|
527
|
-
t10 = $[
|
|
528
|
-
t11 = $[
|
|
563
|
+
t10 = $[15];
|
|
564
|
+
t11 = $[16];
|
|
529
565
|
}
|
|
530
566
|
let t12;
|
|
531
|
-
if ($[
|
|
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
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
} else t12 = $[
|
|
576
|
+
$[17] = attributes;
|
|
577
|
+
$[18] = listeners;
|
|
578
|
+
$[19] = t12;
|
|
579
|
+
} else t12 = $[19];
|
|
544
580
|
let t13;
|
|
545
|
-
if ($[
|
|
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
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
} else t13 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
567
|
-
} else t15 = $[
|
|
600
|
+
$[24] = ctx.toggleSelection;
|
|
601
|
+
$[25] = t14;
|
|
602
|
+
$[26] = t15;
|
|
603
|
+
} else t15 = $[26];
|
|
568
604
|
let t16;
|
|
569
|
-
if ($[
|
|
605
|
+
if ($[27] !== ctx.ellipsisPopoverOpen) {
|
|
570
606
|
t16 = /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen });
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
} else t16 = $[
|
|
607
|
+
$[27] = ctx.ellipsisPopoverOpen;
|
|
608
|
+
$[28] = t16;
|
|
609
|
+
} else t16 = $[28];
|
|
574
610
|
let t17;
|
|
575
|
-
if ($[
|
|
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
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
} else t17 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
603
|
-
$[
|
|
604
|
-
$[
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
608
|
-
} else t18 = $[
|
|
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 ($[
|
|
646
|
+
if ($[40] !== block) {
|
|
611
647
|
t19 = /* @__PURE__ */ jsx(BlockTreeItemContent, { block });
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
} else t19 = $[
|
|
648
|
+
$[40] = block;
|
|
649
|
+
$[41] = t19;
|
|
650
|
+
} else t19 = $[41];
|
|
615
651
|
let t20;
|
|
616
|
-
if ($[
|
|
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
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
} else t20 = $[
|
|
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 ($[
|
|
672
|
+
if ($[50] !== t20 || $[51] !== t7) {
|
|
637
673
|
t21 = /* @__PURE__ */ jsx(Accordion.Root, {
|
|
638
674
|
value: t7,
|
|
639
675
|
children: t20
|
|
640
676
|
});
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
644
|
-
} else t21 = $[
|
|
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(
|
|
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 ($[
|
|
692
|
+
if ($[1] !== block.type || $[2] !== camoxApp) {
|
|
653
693
|
t1 = camoxApp.getBlockById(block.type);
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
$[
|
|
657
|
-
} else t1 = $[
|
|
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 ($[
|
|
702
|
+
if ($[4] !== block.id) {
|
|
663
703
|
t2 = (state) => state.context.selection?.blockId === block.id;
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
} else t2 = $[
|
|
704
|
+
$[4] = block.id;
|
|
705
|
+
$[5] = t2;
|
|
706
|
+
} else t2 = $[5];
|
|
667
707
|
const isBlockFocused = useSelector(previewStore, t2);
|
|
668
708
|
let t3;
|
|
669
|
-
if ($[
|
|
709
|
+
if ($[6] !== block.id || $[7] !== isBlockFocused) {
|
|
670
710
|
t3 = isBlockFocused ? [String(block.id)] : [];
|
|
671
|
-
$[
|
|
672
|
-
$[
|
|
673
|
-
$[
|
|
674
|
-
} else t3 = $[
|
|
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 ($[
|
|
717
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
678
718
|
t5 = /* @__PURE__ */ jsx("div", {});
|
|
679
|
-
$[
|
|
680
|
-
} else t5 = $[
|
|
719
|
+
$[9] = t5;
|
|
720
|
+
} else t5 = $[9];
|
|
681
721
|
let t6;
|
|
682
|
-
if ($[
|
|
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
|
-
$[
|
|
685
|
-
} else t6 = $[
|
|
724
|
+
$[10] = t6;
|
|
725
|
+
} else t6 = $[10];
|
|
686
726
|
let t7;
|
|
687
|
-
if ($[
|
|
727
|
+
if ($[11] !== layoutName) {
|
|
688
728
|
t7 = /* @__PURE__ */ jsx("span", {
|
|
689
729
|
className: "font-semibold",
|
|
690
730
|
children: layoutName
|
|
691
731
|
});
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
} else t7 = $[
|
|
732
|
+
$[11] = layoutName;
|
|
733
|
+
$[12] = t7;
|
|
734
|
+
} else t7 = $[12];
|
|
695
735
|
let t8;
|
|
696
|
-
if ($[
|
|
736
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
697
737
|
t8 = /* @__PURE__ */ jsx("br", {});
|
|
698
|
-
$[
|
|
699
|
-
} else t8 = $[
|
|
738
|
+
$[13] = t8;
|
|
739
|
+
} else t8 = $[13];
|
|
700
740
|
let t9;
|
|
701
|
-
if ($[
|
|
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
|
-
$[
|
|
713
|
-
$[
|
|
714
|
-
} else t9 = $[
|
|
752
|
+
$[14] = t7;
|
|
753
|
+
$[15] = t9;
|
|
754
|
+
} else t9 = $[15];
|
|
715
755
|
let t10;
|
|
716
|
-
if ($[
|
|
756
|
+
if ($[16] !== ctx.toggleSelection || $[17] !== displayText) {
|
|
717
757
|
t10 = /* @__PURE__ */ jsx(BlockTreeItemTrigger, {
|
|
718
758
|
displayText,
|
|
719
759
|
onClick: ctx.toggleSelection
|
|
720
760
|
});
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
} else t10 = $[
|
|
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 ($[
|
|
767
|
+
if ($[19] !== ctx.ellipsisPopoverOpen) {
|
|
728
768
|
t12 = /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen });
|
|
729
|
-
$[
|
|
730
|
-
$[
|
|
731
|
-
} else t12 = $[
|
|
769
|
+
$[19] = ctx.ellipsisPopoverOpen;
|
|
770
|
+
$[20] = t12;
|
|
771
|
+
} else t12 = $[20];
|
|
732
772
|
let t13;
|
|
733
|
-
if ($[
|
|
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
|
-
$[
|
|
743
|
-
$[
|
|
744
|
-
$[
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
$[
|
|
748
|
-
} else t13 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
764
|
-
$[
|
|
765
|
-
$[
|
|
766
|
-
$[
|
|
767
|
-
$[
|
|
768
|
-
$[
|
|
769
|
-
} else t14 = $[
|
|
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 ($[
|
|
811
|
+
if ($[33] !== block) {
|
|
772
812
|
t15 = /* @__PURE__ */ jsx(BlockTreeItemContent, { block });
|
|
773
|
-
$[
|
|
774
|
-
$[
|
|
775
|
-
} else t15 = $[
|
|
813
|
+
$[33] = block;
|
|
814
|
+
$[34] = t15;
|
|
815
|
+
} else t15 = $[34];
|
|
776
816
|
let t16;
|
|
777
|
-
if ($[
|
|
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
|
-
$[
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
788
|
-
$[
|
|
789
|
-
$[
|
|
790
|
-
$[
|
|
791
|
-
} else t16 = $[
|
|
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 ($[
|
|
833
|
+
if ($[41] !== t16 || $[42] !== t3) {
|
|
794
834
|
t17 = /* @__PURE__ */ jsx(Accordion.Root, {
|
|
795
835
|
value: t3,
|
|
796
836
|
children: t16
|
|
797
837
|
});
|
|
798
|
-
$[
|
|
799
|
-
$[
|
|
800
|
-
$[
|
|
801
|
-
} else t17 = $[
|
|
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(
|
|
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 ($[
|
|
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
|
-
$[
|
|
819
|
-
} else t0 = $[
|
|
862
|
+
$[1] = t0;
|
|
863
|
+
} else t0 = $[1];
|
|
820
864
|
let t1;
|
|
821
|
-
if ($[
|
|
865
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
822
866
|
t1 = { coordinateGetter: sortableKeyboardCoordinates };
|
|
823
|
-
$[
|
|
824
|
-
} else t1 = $[
|
|
867
|
+
$[2] = t1;
|
|
868
|
+
} else t1 = $[2];
|
|
825
869
|
const sensors = useSensors(useSensor(PointerSensor, t0), useSensor(KeyboardSensor, t1));
|
|
826
870
|
let t2;
|
|
827
|
-
if ($[
|
|
871
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
828
872
|
t2 = (event) => {
|
|
829
873
|
setActiveId(String(event.active.id));
|
|
830
874
|
};
|
|
831
|
-
$[
|
|
832
|
-
} else t2 = $[
|
|
875
|
+
$[3] = t2;
|
|
876
|
+
} else t2 = $[3];
|
|
833
877
|
const handleDragStart = t2;
|
|
834
878
|
let t3;
|
|
835
|
-
if ($[
|
|
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
|
-
$[
|
|
865
|
-
$[
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
868
|
-
} else t3 = $[
|
|
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 ($[
|
|
915
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
872
916
|
t4 = () => {
|
|
873
917
|
setActiveId(null);
|
|
874
918
|
};
|
|
875
|
-
$[
|
|
876
|
-
} else t4 = $[
|
|
919
|
+
$[8] = t4;
|
|
920
|
+
} else t4 = $[8];
|
|
877
921
|
const handleDragCancel = t4;
|
|
878
922
|
if (!page) return null;
|
|
879
923
|
let t5;
|
|
880
|
-
if ($[
|
|
924
|
+
if ($[9] !== camoxApp || $[10] !== page.layout) {
|
|
881
925
|
t5 = page.layout ? camoxApp.getLayoutById(page.layout.layoutId) : void 0;
|
|
882
|
-
$[
|
|
883
|
-
$[
|
|
884
|
-
$[
|
|
885
|
-
} else t5 = $[
|
|
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 ($[
|
|
932
|
+
if ($[12] !== layout?._internal || $[13] !== layoutBeforeBlocks) {
|
|
889
933
|
let t7;
|
|
890
|
-
if ($[
|
|
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
|
-
$[
|
|
896
|
-
$[
|
|
897
|
-
} else t7 = $[
|
|
939
|
+
$[15] = layout?._internal;
|
|
940
|
+
$[16] = t7;
|
|
941
|
+
} else t7 = $[16];
|
|
898
942
|
t6 = layoutBeforeBlocks.map(t7);
|
|
899
|
-
$[
|
|
900
|
-
$[
|
|
901
|
-
$[
|
|
902
|
-
} else t6 = $[
|
|
943
|
+
$[12] = layout?._internal;
|
|
944
|
+
$[13] = layoutBeforeBlocks;
|
|
945
|
+
$[14] = t6;
|
|
946
|
+
} else t6 = $[14];
|
|
903
947
|
let t7;
|
|
904
|
-
if ($[
|
|
948
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
905
949
|
t7 = [restrictToVerticalAxis];
|
|
906
|
-
$[
|
|
907
|
-
} else t7 = $[
|
|
950
|
+
$[17] = t7;
|
|
951
|
+
} else t7 = $[17];
|
|
908
952
|
let t8;
|
|
909
|
-
if ($[
|
|
953
|
+
if ($[18] !== pageBlocks) {
|
|
910
954
|
t8 = pageBlocks.map(_temp8);
|
|
911
|
-
$[
|
|
912
|
-
$[
|
|
913
|
-
} else t8 = $[
|
|
955
|
+
$[18] = pageBlocks;
|
|
956
|
+
$[19] = t8;
|
|
957
|
+
} else t8 = $[19];
|
|
914
958
|
let t9;
|
|
915
|
-
if ($[
|
|
959
|
+
if ($[20] !== pageBlocks) {
|
|
916
960
|
t9 = pageBlocks.map(_temp9);
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
919
|
-
} else t9 = $[
|
|
961
|
+
$[20] = pageBlocks;
|
|
962
|
+
$[21] = t9;
|
|
963
|
+
} else t9 = $[21];
|
|
920
964
|
let t10;
|
|
921
|
-
if ($[
|
|
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
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
} else t10 = $[
|
|
971
|
+
$[22] = t8;
|
|
972
|
+
$[23] = t9;
|
|
973
|
+
$[24] = t10;
|
|
974
|
+
} else t10 = $[24];
|
|
931
975
|
let t11;
|
|
932
|
-
if ($[
|
|
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
|
-
$[
|
|
948
|
-
$[
|
|
949
|
-
$[
|
|
950
|
-
} else t11 = $[
|
|
991
|
+
$[25] = activeId;
|
|
992
|
+
$[26] = pageBlocks;
|
|
993
|
+
$[27] = t11;
|
|
994
|
+
} else t11 = $[27];
|
|
951
995
|
let t12;
|
|
952
|
-
if ($[
|
|
996
|
+
if ($[28] !== t11) {
|
|
953
997
|
t12 = /* @__PURE__ */ jsx(DragOverlay, {
|
|
954
998
|
dropAnimation: null,
|
|
955
999
|
children: t11
|
|
956
1000
|
});
|
|
957
|
-
$[
|
|
958
|
-
$[
|
|
959
|
-
} else t12 = $[
|
|
1001
|
+
$[28] = t11;
|
|
1002
|
+
$[29] = t12;
|
|
1003
|
+
} else t12 = $[29];
|
|
960
1004
|
let t13;
|
|
961
|
-
if ($[
|
|
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
|
-
$[
|
|
972
|
-
$[
|
|
973
|
-
$[
|
|
974
|
-
$[
|
|
975
|
-
$[
|
|
976
|
-
} else t13 = $[
|
|
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 ($[
|
|
1022
|
+
if ($[35] !== layout?._internal || $[36] !== layoutAfterBlocks) {
|
|
979
1023
|
let t15;
|
|
980
|
-
if ($[
|
|
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
|
-
$[
|
|
986
|
-
$[
|
|
987
|
-
} else t15 = $[
|
|
1029
|
+
$[38] = layout?._internal;
|
|
1030
|
+
$[39] = t15;
|
|
1031
|
+
} else t15 = $[39];
|
|
988
1032
|
t14 = layoutAfterBlocks.map(t15);
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
991
|
-
$[
|
|
992
|
-
} else t14 = $[
|
|
1033
|
+
$[35] = layout?._internal;
|
|
1034
|
+
$[36] = layoutAfterBlocks;
|
|
1035
|
+
$[37] = t14;
|
|
1036
|
+
} else t14 = $[37];
|
|
993
1037
|
let t15;
|
|
994
|
-
if ($[
|
|
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
|
-
$[
|
|
1004
|
-
$[
|
|
1005
|
-
$[
|
|
1006
|
-
$[
|
|
1007
|
-
} else t15 = $[
|
|
1047
|
+
$[40] = t13;
|
|
1048
|
+
$[41] = t14;
|
|
1049
|
+
$[42] = t6;
|
|
1050
|
+
$[43] = t15;
|
|
1051
|
+
} else t15 = $[43];
|
|
1008
1052
|
let t16;
|
|
1009
|
-
if ($[
|
|
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
|
-
$[
|
|
1016
|
-
} else t16 = $[
|
|
1059
|
+
$[44] = t16;
|
|
1060
|
+
} else t16 = $[44];
|
|
1017
1061
|
let t17;
|
|
1018
|
-
if ($[
|
|
1062
|
+
if ($[45] !== t15) {
|
|
1019
1063
|
t17 = /* @__PURE__ */ jsxs(Fragment, { children: [t15, t16] });
|
|
1020
|
-
$[
|
|
1021
|
-
$[
|
|
1022
|
-
} else t17 = $[
|
|
1064
|
+
$[45] = t15;
|
|
1065
|
+
$[46] = t17;
|
|
1066
|
+
} else t17 = $[46];
|
|
1023
1067
|
return t17;
|
|
1024
1068
|
};
|
|
1025
1069
|
function _temp3(state) {
|