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
|
@@ -20,18 +20,22 @@ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, Command
|
|
|
20
20
|
|
|
21
21
|
//#region src/features/preview/components/AddBlockSheet.tsx
|
|
22
22
|
const AddBlockSheet = () => {
|
|
23
|
-
const $ = c(
|
|
23
|
+
const $ = c(59);
|
|
24
|
+
if ($[0] !== "8763aa071e35caf6be6fe7de97ee503b9321631f9ce9abdbf0e15b6a425577e9") {
|
|
25
|
+
for (let $i = 0; $i < 59; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
|
+
$[0] = "8763aa071e35caf6be6fe7de97ee503b9321631f9ce9abdbf0e15b6a425577e9";
|
|
27
|
+
}
|
|
24
28
|
const [highlightedValue, setHighlightedValue] = React.useState("");
|
|
25
29
|
const queryClient = useQueryClient();
|
|
26
30
|
const { pathname } = useLocation();
|
|
27
31
|
const pagePathname = useSelector(previewStore, _temp) ?? pathname;
|
|
28
32
|
let t0;
|
|
29
|
-
if ($[
|
|
33
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
34
|
t0 = blockMutations.create();
|
|
31
|
-
$[
|
|
32
|
-
} else t0 = $[
|
|
35
|
+
$[1] = t0;
|
|
36
|
+
} else t0 = $[1];
|
|
33
37
|
let t1;
|
|
34
|
-
if ($[
|
|
38
|
+
if ($[2] !== pagePathname || $[3] !== queryClient) {
|
|
35
39
|
t1 = {
|
|
36
40
|
...t0,
|
|
37
41
|
onMutate: (variables) => {
|
|
@@ -102,49 +106,49 @@ const AddBlockSheet = () => {
|
|
|
102
106
|
queryClient.invalidateQueries({ queryKey: queryKeys.pages.getByPath(pagePathname) });
|
|
103
107
|
}
|
|
104
108
|
};
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
} else t1 = $[
|
|
109
|
+
$[2] = pagePathname;
|
|
110
|
+
$[3] = queryClient;
|
|
111
|
+
$[4] = t1;
|
|
112
|
+
} else t1 = $[4];
|
|
109
113
|
const createBlock = useMutation(t1);
|
|
110
114
|
const projectSlug = useProjectSlug();
|
|
111
115
|
let t2;
|
|
112
|
-
if ($[
|
|
116
|
+
if ($[5] !== projectSlug) {
|
|
113
117
|
t2 = projectQueries.getBySlug(projectSlug);
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
} else t2 = $[
|
|
118
|
+
$[5] = projectSlug;
|
|
119
|
+
$[6] = t2;
|
|
120
|
+
} else t2 = $[6];
|
|
117
121
|
const { data: project } = useQuery(t2);
|
|
118
122
|
const availableBlocks = useCamoxApp().getBlocks().filter(_temp3);
|
|
119
123
|
const page = usePreviewedPage();
|
|
120
124
|
const { pageBlocks: pageBlocks_0 } = usePageBlocks(page);
|
|
121
125
|
let t3;
|
|
122
|
-
if ($[
|
|
126
|
+
if ($[7] !== project?.id) {
|
|
123
127
|
t3 = blockQueries.getUsageCounts(project?.id ?? 0);
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
} else t3 = $[
|
|
128
|
+
$[7] = project?.id;
|
|
129
|
+
$[8] = t3;
|
|
130
|
+
} else t3 = $[8];
|
|
127
131
|
const t4 = !!project;
|
|
128
132
|
let t5;
|
|
129
|
-
if ($[
|
|
133
|
+
if ($[9] !== t3 || $[10] !== t4) {
|
|
130
134
|
t5 = {
|
|
131
135
|
...t3,
|
|
132
136
|
enabled: t4
|
|
133
137
|
};
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
} else t5 = $[
|
|
138
|
+
$[9] = t3;
|
|
139
|
+
$[10] = t4;
|
|
140
|
+
$[11] = t5;
|
|
141
|
+
} else t5 = $[11];
|
|
138
142
|
const { data: t6 } = useQuery(t5);
|
|
139
143
|
let t7;
|
|
140
|
-
if ($[
|
|
144
|
+
if ($[12] !== t6) {
|
|
141
145
|
t7 = t6 === void 0 ? {} : t6;
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
} else t7 = $[
|
|
146
|
+
$[12] = t6;
|
|
147
|
+
$[13] = t7;
|
|
148
|
+
} else t7 = $[13];
|
|
145
149
|
const totalCounts = t7;
|
|
146
150
|
let t8;
|
|
147
|
-
if ($[
|
|
151
|
+
if ($[14] !== page || $[15] !== pageBlocks_0) {
|
|
148
152
|
bb0: {
|
|
149
153
|
const counts = {};
|
|
150
154
|
if (!page) {
|
|
@@ -154,15 +158,15 @@ const AddBlockSheet = () => {
|
|
|
154
158
|
for (const block of pageBlocks_0) counts[block.type] = (counts[block.type] ?? 0) + 1;
|
|
155
159
|
t8 = counts;
|
|
156
160
|
}
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
} else t8 = $[
|
|
161
|
+
$[14] = page;
|
|
162
|
+
$[15] = pageBlocks_0;
|
|
163
|
+
$[16] = t8;
|
|
164
|
+
} else t8 = $[16];
|
|
161
165
|
const pageCounts = t8;
|
|
162
166
|
const isOpen = useSelector(previewStore, _temp4);
|
|
163
167
|
const peekedBlockPosition = useSelector(previewStore, _temp5);
|
|
164
168
|
let t9;
|
|
165
|
-
if ($[
|
|
169
|
+
if ($[17] !== createBlock || $[18] !== page || $[19] !== pageBlocks_0 || $[20] !== peekedBlockPosition) {
|
|
166
170
|
t9 = async (block_0) => {
|
|
167
171
|
if (!page) return;
|
|
168
172
|
const afterPosition_0 = peekedBlockPosition === "" ? "" : peekedBlockPosition ?? pageBlocks_0[pageBlocks_0.length - 1]?.position;
|
|
@@ -185,15 +189,15 @@ const AddBlockSheet = () => {
|
|
|
185
189
|
});
|
|
186
190
|
previewStore.send({ type: "exitPeekedBlock" });
|
|
187
191
|
};
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else t9 = $[
|
|
192
|
+
$[17] = createBlock;
|
|
193
|
+
$[18] = page;
|
|
194
|
+
$[19] = pageBlocks_0;
|
|
195
|
+
$[20] = peekedBlockPosition;
|
|
196
|
+
$[21] = t9;
|
|
197
|
+
} else t9 = $[21];
|
|
194
198
|
const handleAddBlock = t9;
|
|
195
199
|
let t10;
|
|
196
|
-
if ($[
|
|
200
|
+
if ($[22] !== pageBlocks_0 || $[23] !== peekedBlockPosition) {
|
|
197
201
|
t10 = (block_1) => {
|
|
198
202
|
const afterPosition_1 = peekedBlockPosition === "" ? "" : peekedBlockPosition ?? pageBlocks_0[pageBlocks_0.length - 1]?.position;
|
|
199
203
|
previewStore.send({
|
|
@@ -202,10 +206,10 @@ const AddBlockSheet = () => {
|
|
|
202
206
|
afterPosition: afterPosition_1
|
|
203
207
|
});
|
|
204
208
|
};
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
} else t10 = $[
|
|
209
|
+
$[22] = pageBlocks_0;
|
|
210
|
+
$[23] = peekedBlockPosition;
|
|
211
|
+
$[24] = t10;
|
|
212
|
+
} else t10 = $[24];
|
|
209
213
|
const handlePreviewBlock = t10;
|
|
210
214
|
const handleValueChange = (value) => {
|
|
211
215
|
setHighlightedValue(value);
|
|
@@ -216,70 +220,70 @@ const AddBlockSheet = () => {
|
|
|
216
220
|
const handleOpenChange = _temp6;
|
|
217
221
|
let t11;
|
|
218
222
|
let t12;
|
|
219
|
-
if ($[
|
|
223
|
+
if ($[25] !== isOpen) {
|
|
220
224
|
t11 = () => {
|
|
221
225
|
if (isOpen) setHighlightedValue("");
|
|
222
226
|
};
|
|
223
227
|
t12 = [isOpen];
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
228
|
+
$[25] = isOpen;
|
|
229
|
+
$[26] = t11;
|
|
230
|
+
$[27] = t12;
|
|
227
231
|
} else {
|
|
228
|
-
t11 = $[
|
|
229
|
-
t12 = $[
|
|
232
|
+
t11 = $[26];
|
|
233
|
+
t12 = $[27];
|
|
230
234
|
}
|
|
231
235
|
React.useEffect(t11, t12);
|
|
232
236
|
let t13;
|
|
233
|
-
if ($[
|
|
237
|
+
if ($[28] !== pageCounts || $[29] !== totalCounts) {
|
|
234
238
|
t13 = (blockId_0) => {
|
|
235
239
|
const total = totalCounts[blockId_0] ?? 0;
|
|
236
240
|
if (total === 0) return "Never used";
|
|
237
241
|
const page_0 = pageCounts[blockId_0] ?? "none";
|
|
238
242
|
return `${total} use${total > 1 ? "s" : ""} (${page_0} here)`;
|
|
239
243
|
};
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
} else t13 = $[
|
|
244
|
+
$[28] = pageCounts;
|
|
245
|
+
$[29] = totalCounts;
|
|
246
|
+
$[30] = t13;
|
|
247
|
+
} else t13 = $[30];
|
|
244
248
|
const displayCount = t13;
|
|
245
249
|
const T0 = PreviewSideSheet;
|
|
246
250
|
const t14 = "flex flex-col gap-0";
|
|
247
251
|
let t15;
|
|
248
|
-
if ($[
|
|
252
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
249
253
|
t15 = /* @__PURE__ */ jsxs(Sheet.SheetHeader, {
|
|
250
254
|
className: "border-border border-b",
|
|
251
255
|
children: [/* @__PURE__ */ jsx(Sheet.SheetTitle, { children: "Add new block" }), /* @__PURE__ */ jsx(Sheet.SheetDescription, { children: "Search and select a block to add to the page." })]
|
|
252
256
|
});
|
|
253
|
-
$[
|
|
254
|
-
} else t15 = $[
|
|
257
|
+
$[31] = t15;
|
|
258
|
+
} else t15 = $[31];
|
|
255
259
|
const t16 = "flex-1 overflow-auto p-2";
|
|
256
260
|
const T1 = Command;
|
|
257
261
|
const t17 = "overflow-visible";
|
|
258
262
|
const t18 = _temp7;
|
|
259
263
|
let t19;
|
|
260
|
-
if ($[
|
|
264
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
261
265
|
t19 = /* @__PURE__ */ jsx(CommandInput, {
|
|
262
266
|
placeholder: "Search blocks...",
|
|
263
267
|
autoFocus: true
|
|
264
268
|
});
|
|
265
|
-
$[
|
|
266
|
-
} else t19 = $[
|
|
269
|
+
$[32] = t19;
|
|
270
|
+
} else t19 = $[32];
|
|
267
271
|
const T2 = CommandList;
|
|
268
272
|
const t20 = "mt-1 max-h-full";
|
|
269
273
|
let t21;
|
|
270
|
-
if ($[
|
|
274
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
271
275
|
t21 = /* @__PURE__ */ jsx(CommandEmpty, { children: "No blocks found." });
|
|
272
|
-
$[
|
|
273
|
-
} else t21 = $[
|
|
276
|
+
$[33] = t21;
|
|
277
|
+
} else t21 = $[33];
|
|
274
278
|
const T3 = CommandGroup;
|
|
275
279
|
let t22;
|
|
276
|
-
if ($[
|
|
280
|
+
if ($[34] !== totalCounts) {
|
|
277
281
|
t22 = (a, b_3) => (totalCounts[b_3._internal.id] ?? 0) - (totalCounts[a._internal.id] ?? 0);
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else t22 = $[
|
|
282
|
+
$[34] = totalCounts;
|
|
283
|
+
$[35] = t22;
|
|
284
|
+
} else t22 = $[35];
|
|
281
285
|
let t23;
|
|
282
|
-
if ($[
|
|
286
|
+
if ($[36] !== displayCount || $[37] !== handleAddBlock) {
|
|
283
287
|
t23 = (block_3) => /* @__PURE__ */ jsxs(CommandItem, {
|
|
284
288
|
value: block_3._internal.title,
|
|
285
289
|
onSelect: () => {
|
|
@@ -296,36 +300,36 @@ const AddBlockSheet = () => {
|
|
|
296
300
|
className: "hidden group-focus-within:flex group-hover:flex",
|
|
297
301
|
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
298
302
|
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
299
|
-
className: "max-w-
|
|
303
|
+
className: "max-w-75",
|
|
300
304
|
side: "right",
|
|
301
305
|
children: block_3._internal.description
|
|
302
306
|
})] })]
|
|
303
307
|
}, block_3._internal.id);
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else t23 = $[
|
|
308
|
+
$[36] = displayCount;
|
|
309
|
+
$[37] = handleAddBlock;
|
|
310
|
+
$[38] = t23;
|
|
311
|
+
} else t23 = $[38];
|
|
308
312
|
const t24 = availableBlocks.sort(t22).map(t23);
|
|
309
313
|
let t25;
|
|
310
|
-
if ($[
|
|
314
|
+
if ($[39] !== T3 || $[40] !== t24) {
|
|
311
315
|
t25 = /* @__PURE__ */ jsx(T3, { children: t24 });
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
} else t25 = $[
|
|
316
|
+
$[39] = T3;
|
|
317
|
+
$[40] = t24;
|
|
318
|
+
$[41] = t25;
|
|
319
|
+
} else t25 = $[41];
|
|
316
320
|
let t26;
|
|
317
|
-
if ($[
|
|
321
|
+
if ($[42] !== T2 || $[43] !== t21 || $[44] !== t25) {
|
|
318
322
|
t26 = /* @__PURE__ */ jsxs(T2, {
|
|
319
323
|
className: t20,
|
|
320
324
|
children: [t21, t25]
|
|
321
325
|
});
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
} else t26 = $[
|
|
326
|
+
$[42] = T2;
|
|
327
|
+
$[43] = t21;
|
|
328
|
+
$[44] = t25;
|
|
329
|
+
$[45] = t26;
|
|
330
|
+
} else t26 = $[45];
|
|
327
331
|
let t27;
|
|
328
|
-
if ($[
|
|
332
|
+
if ($[46] !== T1 || $[47] !== handleValueChange || $[48] !== highlightedValue || $[49] !== t18 || $[50] !== t19 || $[51] !== t26) {
|
|
329
333
|
t27 = /* @__PURE__ */ jsx("div", {
|
|
330
334
|
className: t16,
|
|
331
335
|
children: /* @__PURE__ */ jsxs(T1, {
|
|
@@ -336,29 +340,29 @@ const AddBlockSheet = () => {
|
|
|
336
340
|
children: [t19, t26]
|
|
337
341
|
})
|
|
338
342
|
});
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
} else t27 = $[
|
|
343
|
+
$[46] = T1;
|
|
344
|
+
$[47] = handleValueChange;
|
|
345
|
+
$[48] = highlightedValue;
|
|
346
|
+
$[49] = t18;
|
|
347
|
+
$[50] = t19;
|
|
348
|
+
$[51] = t26;
|
|
349
|
+
$[52] = t27;
|
|
350
|
+
} else t27 = $[52];
|
|
347
351
|
let t28;
|
|
348
|
-
if ($[
|
|
352
|
+
if ($[53] !== T0 || $[54] !== handleOpenChange || $[55] !== isOpen || $[56] !== t15 || $[57] !== t27) {
|
|
349
353
|
t28 = /* @__PURE__ */ jsxs(T0, {
|
|
350
354
|
open: isOpen,
|
|
351
355
|
onOpenChange: handleOpenChange,
|
|
352
356
|
className: t14,
|
|
353
357
|
children: [t15, t27]
|
|
354
358
|
});
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
} else t28 = $[
|
|
359
|
+
$[53] = T0;
|
|
360
|
+
$[54] = handleOpenChange;
|
|
361
|
+
$[55] = isOpen;
|
|
362
|
+
$[56] = t15;
|
|
363
|
+
$[57] = t27;
|
|
364
|
+
$[58] = t28;
|
|
365
|
+
} else t28 = $[58];
|
|
362
366
|
return t28;
|
|
363
367
|
};
|
|
364
368
|
function _temp(state) {
|
|
@@ -3,39 +3,92 @@ import { PreviewSideSheet, Sheet } from "./PreviewSideSheet.js";
|
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useSelector } from "@xstate/store/react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Info } from "lucide-react";
|
|
7
|
+
import { Alert, AlertDescription, AlertTitle } from "@camox/ui/alert";
|
|
6
8
|
|
|
7
9
|
//#region src/features/preview/components/AgentChatSheet.tsx
|
|
8
10
|
const AgentChatSheet = () => {
|
|
9
|
-
const $ = c(
|
|
11
|
+
const $ = c(9);
|
|
12
|
+
if ($[0] !== "c20d48a4fd3b9b3c33b623c97e01394a05d71fe73cd1e3f495a45671d8fbcda3") {
|
|
13
|
+
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
+
$[0] = "c20d48a4fd3b9b3c33b623c97e01394a05d71fe73cd1e3f495a45671d8fbcda3";
|
|
15
|
+
}
|
|
10
16
|
const isOpen = useSelector(previewStore, _temp);
|
|
11
17
|
const handleOpenChange = _temp2;
|
|
12
18
|
let t0;
|
|
13
|
-
if ($[
|
|
19
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
20
|
t0 = /* @__PURE__ */ jsxs(Sheet.SheetHeader, { children: [/* @__PURE__ */ jsx(Sheet.SheetTitle, { children: "Agent Chat" }), /* @__PURE__ */ jsx(Sheet.SheetDescription, { children: "Describe the changes you'd like to make to this page." })] });
|
|
15
|
-
$[
|
|
16
|
-
} else t0 = $[
|
|
21
|
+
$[1] = t0;
|
|
22
|
+
} else t0 = $[1];
|
|
17
23
|
let t1;
|
|
18
|
-
if ($[
|
|
19
|
-
t1 = /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
$[1] = t1;
|
|
27
|
-
} else t1 = $[1];
|
|
24
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
|
+
t1 = /* @__PURE__ */ jsxs(Alert, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Info, { className: "size-4" }),
|
|
27
|
+
/* @__PURE__ */ jsx(AlertTitle, { children: "In-app agentic chat is coming soon" }),
|
|
28
|
+
/* @__PURE__ */ jsx(AlertDescription, { children: "You'll be able to describe changes right here without leaving the preview." })
|
|
29
|
+
] });
|
|
30
|
+
$[2] = t1;
|
|
31
|
+
} else t1 = $[2];
|
|
28
32
|
let t2;
|
|
29
|
-
if ($[
|
|
30
|
-
t2 = /* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
children: [t0, t1]
|
|
33
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t2 = /* @__PURE__ */ jsx("p", {
|
|
35
|
+
className: "text-foreground text-sm font-medium",
|
|
36
|
+
children: "Edit your site from your coding agent"
|
|
34
37
|
});
|
|
35
|
-
$[2] = isOpen;
|
|
36
38
|
$[3] = t2;
|
|
37
39
|
} else t2 = $[3];
|
|
38
|
-
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t3 = /* @__PURE__ */ jsx("strong", { children: "CLI" });
|
|
43
|
+
$[4] = t3;
|
|
44
|
+
} else t3 = $[4];
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
47
|
+
t4 = /* @__PURE__ */ jsxs("p", {
|
|
48
|
+
className: "text-muted-foreground text-sm",
|
|
49
|
+
children: [
|
|
50
|
+
"Your app comes with a ",
|
|
51
|
+
t3,
|
|
52
|
+
" and a set of ",
|
|
53
|
+
/* @__PURE__ */ jsx("strong", { children: "Skills" }),
|
|
54
|
+
" that let Claude Code, Cursor, or any other coding agent create pages, edit blocks, and update layouts directly."
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
$[5] = t4;
|
|
58
|
+
} else t4 = $[5];
|
|
59
|
+
let t5;
|
|
60
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex flex-1 flex-col gap-4 p-6",
|
|
63
|
+
children: [t1, /* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "border-primary bg-primary/5 space-y-2 rounded-lg border-2 p-4",
|
|
65
|
+
children: [
|
|
66
|
+
t2,
|
|
67
|
+
t4,
|
|
68
|
+
/* @__PURE__ */ jsxs("p", {
|
|
69
|
+
className: "text-muted-foreground text-sm",
|
|
70
|
+
children: [
|
|
71
|
+
"Your agent has the ability to edit both the structure of blocks ",
|
|
72
|
+
/* @__PURE__ */ jsx("em", { children: "and" }),
|
|
73
|
+
" their content, making it the most powerful way to manage your Camox website."
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
$[6] = t5;
|
|
80
|
+
} else t5 = $[6];
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[7] !== isOpen) {
|
|
83
|
+
t6 = /* @__PURE__ */ jsxs(PreviewSideSheet, {
|
|
84
|
+
open: isOpen,
|
|
85
|
+
onOpenChange: handleOpenChange,
|
|
86
|
+
children: [t0, t5]
|
|
87
|
+
});
|
|
88
|
+
$[7] = isOpen;
|
|
89
|
+
$[8] = t6;
|
|
90
|
+
} else t6 = $[8];
|
|
91
|
+
return t6;
|
|
39
92
|
};
|
|
40
93
|
function _temp(state) {
|
|
41
94
|
return state.context.isAgentChatSheetOpen;
|