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
|
@@ -67,7 +67,11 @@ function pageFullQueryFn(queryClient, path, projectSlug) {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
function usePreviewedPage() {
|
|
70
|
-
const $ = c(
|
|
70
|
+
const $ = c(22);
|
|
71
|
+
if ($[0] !== "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa") {
|
|
72
|
+
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
73
|
+
$[0] = "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa";
|
|
74
|
+
}
|
|
71
75
|
const { pathname } = useLocation();
|
|
72
76
|
const queryClient = useQueryClient();
|
|
73
77
|
const projectSlug = useProjectSlug();
|
|
@@ -75,7 +79,7 @@ function usePreviewedPage() {
|
|
|
75
79
|
const prevPathnameRef = React.useRef(pathname);
|
|
76
80
|
let t0;
|
|
77
81
|
let t1;
|
|
78
|
-
if ($[
|
|
82
|
+
if ($[1] !== pathname) {
|
|
79
83
|
t0 = () => {
|
|
80
84
|
if (prevPathnameRef.current !== pathname) {
|
|
81
85
|
prevPathnameRef.current = pathname;
|
|
@@ -83,58 +87,58 @@ function usePreviewedPage() {
|
|
|
83
87
|
}
|
|
84
88
|
};
|
|
85
89
|
t1 = [pathname];
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
90
|
+
$[1] = pathname;
|
|
91
|
+
$[2] = t0;
|
|
92
|
+
$[3] = t1;
|
|
89
93
|
} else {
|
|
90
|
-
t0 = $[
|
|
91
|
-
t1 = $[
|
|
94
|
+
t0 = $[2];
|
|
95
|
+
t1 = $[3];
|
|
92
96
|
}
|
|
93
97
|
React.useEffect(t0, t1);
|
|
94
98
|
let t2;
|
|
95
|
-
if ($[
|
|
99
|
+
if ($[4] !== pathname) {
|
|
96
100
|
t2 = queryKeys.pages.getByPath(pathname);
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else t2 = $[
|
|
101
|
+
$[4] = pathname;
|
|
102
|
+
$[5] = t2;
|
|
103
|
+
} else t2 = $[5];
|
|
100
104
|
let t3;
|
|
101
|
-
if ($[
|
|
105
|
+
if ($[6] !== pathname || $[7] !== projectSlug) {
|
|
102
106
|
t3 = pageStructureQueryFn(pathname, projectSlug);
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else t3 = $[
|
|
107
|
+
$[6] = pathname;
|
|
108
|
+
$[7] = projectSlug;
|
|
109
|
+
$[8] = t3;
|
|
110
|
+
} else t3 = $[8];
|
|
107
111
|
let t4;
|
|
108
|
-
if ($[
|
|
112
|
+
if ($[9] !== t2 || $[10] !== t3) {
|
|
109
113
|
t4 = {
|
|
110
114
|
queryKey: t2,
|
|
111
115
|
queryFn: t3,
|
|
112
116
|
staleTime: Infinity
|
|
113
117
|
};
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
} else t4 = $[
|
|
118
|
+
$[9] = t2;
|
|
119
|
+
$[10] = t3;
|
|
120
|
+
$[11] = t4;
|
|
121
|
+
} else t4 = $[11];
|
|
118
122
|
const { data: currentPage } = useSuspenseQuery(t4);
|
|
119
123
|
const isAuthenticated = useIsAuthenticated();
|
|
120
124
|
let t5;
|
|
121
|
-
if ($[
|
|
125
|
+
if ($[12] !== peekedPagePathname) {
|
|
122
126
|
t5 = queryKeys.pages.getByPath(peekedPagePathname ?? "");
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
} else t5 = $[
|
|
127
|
+
$[12] = peekedPagePathname;
|
|
128
|
+
$[13] = t5;
|
|
129
|
+
} else t5 = $[13];
|
|
126
130
|
const t6 = peekedPagePathname ?? "";
|
|
127
131
|
let t7;
|
|
128
|
-
if ($[
|
|
132
|
+
if ($[14] !== projectSlug || $[15] !== queryClient || $[16] !== t6) {
|
|
129
133
|
t7 = pageFullQueryFn(queryClient, t6, projectSlug);
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
} else t7 = $[
|
|
134
|
+
$[14] = projectSlug;
|
|
135
|
+
$[15] = queryClient;
|
|
136
|
+
$[16] = t6;
|
|
137
|
+
$[17] = t7;
|
|
138
|
+
} else t7 = $[17];
|
|
135
139
|
const t8 = isAuthenticated && !!peekedPagePathname;
|
|
136
140
|
let t9;
|
|
137
|
-
if ($[
|
|
141
|
+
if ($[18] !== t5 || $[19] !== t7 || $[20] !== t8) {
|
|
138
142
|
t9 = {
|
|
139
143
|
queryKey: t5,
|
|
140
144
|
queryFn: t7,
|
|
@@ -142,11 +146,11 @@ function usePreviewedPage() {
|
|
|
142
146
|
placeholderData: keepPreviousData,
|
|
143
147
|
staleTime: Infinity
|
|
144
148
|
};
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else t9 = $[
|
|
149
|
+
$[18] = t5;
|
|
150
|
+
$[19] = t7;
|
|
151
|
+
$[20] = t8;
|
|
152
|
+
$[21] = t9;
|
|
153
|
+
} else t9 = $[21];
|
|
150
154
|
const { data: peekedPage } = useQuery(t9);
|
|
151
155
|
return peekedPagePathname ? peekedPage ?? currentPage : currentPage;
|
|
152
156
|
}
|
|
@@ -154,23 +158,27 @@ function _temp(state) {
|
|
|
154
158
|
return state.context.peekedPagePathname;
|
|
155
159
|
}
|
|
156
160
|
const BlockRenderer = (t0) => {
|
|
157
|
-
const $ = c(
|
|
161
|
+
const $ = c(22);
|
|
162
|
+
if ($[0] !== "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa") {
|
|
163
|
+
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
164
|
+
$[0] = "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa";
|
|
165
|
+
}
|
|
158
166
|
const { blockId, mode, showAddBlockTop, showAddBlockBottom } = t0;
|
|
159
167
|
let t1;
|
|
160
|
-
if ($[
|
|
168
|
+
if ($[1] !== blockId) {
|
|
161
169
|
t1 = blockQueries.get(blockId);
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
} else t1 = $[
|
|
170
|
+
$[1] = blockId;
|
|
171
|
+
$[2] = t1;
|
|
172
|
+
} else t1 = $[2];
|
|
165
173
|
const { data } = useSuspenseQuery(t1);
|
|
166
174
|
const camoxApp = useCamoxApp();
|
|
167
175
|
let t2;
|
|
168
|
-
if ($[
|
|
176
|
+
if ($[3] !== camoxApp || $[4] !== data.block.type) {
|
|
169
177
|
t2 = camoxApp.getBlockById(data.block.type);
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else t2 = $[
|
|
178
|
+
$[3] = camoxApp;
|
|
179
|
+
$[4] = data.block.type;
|
|
180
|
+
$[5] = t2;
|
|
181
|
+
} else t2 = $[5];
|
|
174
182
|
const blockDef = t2;
|
|
175
183
|
if (!blockDef) return null;
|
|
176
184
|
const t3 = data.files;
|
|
@@ -182,7 +190,7 @@ const BlockRenderer = (t0) => {
|
|
|
182
190
|
const t8 = data.block.settings;
|
|
183
191
|
const t9 = String(data.block.position);
|
|
184
192
|
let t10;
|
|
185
|
-
if ($[
|
|
193
|
+
if ($[6] !== data.block.id || $[7] !== data.block.type || $[8] !== t7 || $[9] !== t8 || $[10] !== t9) {
|
|
186
194
|
t10 = {
|
|
187
195
|
_id: t5,
|
|
188
196
|
type: t6,
|
|
@@ -190,40 +198,40 @@ const BlockRenderer = (t0) => {
|
|
|
190
198
|
settings: t8,
|
|
191
199
|
position: t9
|
|
192
200
|
};
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
} else t10 = $[
|
|
201
|
+
$[6] = data.block.id;
|
|
202
|
+
$[7] = data.block.type;
|
|
203
|
+
$[8] = t7;
|
|
204
|
+
$[9] = t8;
|
|
205
|
+
$[10] = t9;
|
|
206
|
+
$[11] = t10;
|
|
207
|
+
} else t10 = $[11];
|
|
200
208
|
let t11;
|
|
201
|
-
if ($[
|
|
209
|
+
if ($[12] !== blockDef._internal.Component || $[13] !== mode || $[14] !== showAddBlockBottom || $[15] !== showAddBlockTop || $[16] !== t10) {
|
|
202
210
|
t11 = /* @__PURE__ */ jsx(T0, {
|
|
203
211
|
blockData: t10,
|
|
204
212
|
mode,
|
|
205
213
|
showAddBlockTop,
|
|
206
214
|
showAddBlockBottom
|
|
207
215
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
} else t11 = $[
|
|
216
|
+
$[12] = blockDef._internal.Component;
|
|
217
|
+
$[13] = mode;
|
|
218
|
+
$[14] = showAddBlockBottom;
|
|
219
|
+
$[15] = showAddBlockTop;
|
|
220
|
+
$[16] = t10;
|
|
221
|
+
$[17] = t11;
|
|
222
|
+
} else t11 = $[17];
|
|
215
223
|
let t12;
|
|
216
|
-
if ($[
|
|
224
|
+
if ($[18] !== data.files || $[19] !== data.repeatableItems || $[20] !== t11) {
|
|
217
225
|
t12 = /* @__PURE__ */ jsx(NormalizedDataProvider, {
|
|
218
226
|
files: t3,
|
|
219
227
|
repeatableItems: t4,
|
|
220
228
|
children: t11
|
|
221
229
|
});
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
} else t12 = $[
|
|
230
|
+
$[18] = data.files;
|
|
231
|
+
$[19] = data.repeatableItems;
|
|
232
|
+
$[20] = t11;
|
|
233
|
+
$[21] = t12;
|
|
234
|
+
} else t12 = $[21];
|
|
227
235
|
return t12;
|
|
228
236
|
};
|
|
229
237
|
const PageContent = () => {
|
|
@@ -293,7 +301,11 @@ const PageContent = () => {
|
|
|
293
301
|
});
|
|
294
302
|
};
|
|
295
303
|
const CamoxPreview = (t0) => {
|
|
296
|
-
const $ = c(
|
|
304
|
+
const $ = c(29);
|
|
305
|
+
if ($[0] !== "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa") {
|
|
306
|
+
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
307
|
+
$[0] = "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa";
|
|
308
|
+
}
|
|
297
309
|
const { children } = t0;
|
|
298
310
|
const isAuthenticated = useIsAuthenticated();
|
|
299
311
|
const isPresentationMode = useSelector(previewStore, _temp2);
|
|
@@ -301,7 +313,7 @@ const CamoxPreview = (t0) => {
|
|
|
301
313
|
const pageData = usePreviewedPage();
|
|
302
314
|
let t1;
|
|
303
315
|
let t2;
|
|
304
|
-
if ($[
|
|
316
|
+
if ($[1] !== isAuthenticated || $[2] !== isPresentationMode) {
|
|
305
317
|
t1 = () => {
|
|
306
318
|
const actions = [
|
|
307
319
|
{
|
|
@@ -317,7 +329,7 @@ const CamoxPreview = (t0) => {
|
|
|
317
329
|
},
|
|
318
330
|
{
|
|
319
331
|
id: "exit-presentation-mode",
|
|
320
|
-
label: "",
|
|
332
|
+
label: "Show Camox Studio",
|
|
321
333
|
groupLabel: "Preview",
|
|
322
334
|
checkIfAvailable: () => isAuthenticated && isPresentationMode,
|
|
323
335
|
execute: _temp5,
|
|
@@ -347,43 +359,43 @@ const CamoxPreview = (t0) => {
|
|
|
347
359
|
};
|
|
348
360
|
};
|
|
349
361
|
t2 = [isPresentationMode, isAuthenticated];
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
362
|
+
$[1] = isAuthenticated;
|
|
363
|
+
$[2] = isPresentationMode;
|
|
364
|
+
$[3] = t1;
|
|
365
|
+
$[4] = t2;
|
|
354
366
|
} else {
|
|
355
|
-
t1 = $[
|
|
356
|
-
t2 = $[
|
|
367
|
+
t1 = $[3];
|
|
368
|
+
t2 = $[4];
|
|
357
369
|
}
|
|
358
370
|
React.useEffect(t1, t2);
|
|
359
371
|
if (isPresentationMode) {
|
|
360
372
|
let t3;
|
|
361
|
-
if ($[
|
|
373
|
+
if ($[5] !== children) {
|
|
362
374
|
t3 = /* @__PURE__ */ jsx(PreviewFrame, {
|
|
363
375
|
className: "h-screen w-full",
|
|
364
376
|
children
|
|
365
377
|
});
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
} else t3 = $[
|
|
378
|
+
$[5] = children;
|
|
379
|
+
$[6] = t3;
|
|
380
|
+
} else t3 = $[6];
|
|
369
381
|
return t3;
|
|
370
382
|
}
|
|
371
383
|
if (!isAuthenticated) {
|
|
372
384
|
let t3;
|
|
373
|
-
if ($[
|
|
385
|
+
if ($[7] !== children) {
|
|
374
386
|
t3 = /* @__PURE__ */ jsx(Fragment, { children });
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
} else t3 = $[
|
|
387
|
+
$[7] = children;
|
|
388
|
+
$[8] = t3;
|
|
389
|
+
} else t3 = $[8];
|
|
378
390
|
return t3;
|
|
379
391
|
}
|
|
380
392
|
let t3;
|
|
381
|
-
if ($[
|
|
393
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
382
394
|
t3 = /* @__PURE__ */ jsx(Navbar, {});
|
|
383
|
-
$[
|
|
384
|
-
} else t3 = $[
|
|
395
|
+
$[9] = t3;
|
|
396
|
+
} else t3 = $[9];
|
|
385
397
|
let t4;
|
|
386
|
-
if ($[
|
|
398
|
+
if ($[10] !== isSidebarOpen || $[11] !== pageData) {
|
|
387
399
|
t4 = isSidebarOpen && /* @__PURE__ */ jsxs("div", {
|
|
388
400
|
className: "flex w-[300px] flex-col border-r-2",
|
|
389
401
|
children: [/* @__PURE__ */ jsxs(PanelHeader, {
|
|
@@ -405,62 +417,62 @@ const CamoxPreview = (t0) => {
|
|
|
405
417
|
children: /* @__PURE__ */ jsx(PageTree, {})
|
|
406
418
|
})]
|
|
407
419
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
} else t4 = $[
|
|
420
|
+
$[10] = isSidebarOpen;
|
|
421
|
+
$[11] = pageData;
|
|
422
|
+
$[12] = t4;
|
|
423
|
+
} else t4 = $[12];
|
|
412
424
|
let t5;
|
|
413
|
-
if ($[
|
|
425
|
+
if ($[13] !== isAuthenticated || $[14] !== isPresentationMode) {
|
|
414
426
|
t5 = !isPresentationMode && isAuthenticated && /* @__PURE__ */ jsx("div", { style: {
|
|
415
427
|
height: "80px",
|
|
416
428
|
background: "transparent"
|
|
417
429
|
} });
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
} else t5 = $[
|
|
430
|
+
$[13] = isAuthenticated;
|
|
431
|
+
$[14] = isPresentationMode;
|
|
432
|
+
$[15] = t5;
|
|
433
|
+
} else t5 = $[15];
|
|
422
434
|
let t6;
|
|
423
|
-
if ($[
|
|
435
|
+
if ($[16] !== children || $[17] !== t5) {
|
|
424
436
|
t6 = /* @__PURE__ */ jsxs(PreviewPanel, { children: [children, t5] });
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
} else t6 = $[
|
|
437
|
+
$[16] = children;
|
|
438
|
+
$[17] = t5;
|
|
439
|
+
$[18] = t6;
|
|
440
|
+
} else t6 = $[18];
|
|
429
441
|
let t7;
|
|
430
|
-
if ($[
|
|
442
|
+
if ($[19] !== t4 || $[20] !== t6) {
|
|
431
443
|
t7 = /* @__PURE__ */ jsxs("div", {
|
|
432
444
|
className: "flex h-full flex-row items-stretch",
|
|
433
445
|
children: [t4, t6]
|
|
434
446
|
});
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
} else t7 = $[
|
|
447
|
+
$[19] = t4;
|
|
448
|
+
$[20] = t6;
|
|
449
|
+
$[21] = t7;
|
|
450
|
+
} else t7 = $[21];
|
|
439
451
|
let t10;
|
|
440
452
|
let t11;
|
|
441
453
|
let t12;
|
|
442
454
|
let t8;
|
|
443
455
|
let t9;
|
|
444
|
-
if ($[
|
|
456
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
445
457
|
t8 = /* @__PURE__ */ jsx(PageContentSheet, {});
|
|
446
458
|
t9 = /* @__PURE__ */ jsx(AddBlockSheet, {});
|
|
447
459
|
t10 = /* @__PURE__ */ jsx(AgentChatSheet, {});
|
|
448
460
|
t11 = /* @__PURE__ */ jsx(CreatePageModal, {});
|
|
449
461
|
t12 = /* @__PURE__ */ jsx(EditPageModal, {});
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
462
|
+
$[22] = t10;
|
|
463
|
+
$[23] = t11;
|
|
464
|
+
$[24] = t12;
|
|
465
|
+
$[25] = t8;
|
|
466
|
+
$[26] = t9;
|
|
455
467
|
} else {
|
|
456
|
-
t10 = $[
|
|
457
|
-
t11 = $[
|
|
458
|
-
t12 = $[
|
|
459
|
-
t8 = $[
|
|
460
|
-
t9 = $[
|
|
468
|
+
t10 = $[22];
|
|
469
|
+
t11 = $[23];
|
|
470
|
+
t12 = $[24];
|
|
471
|
+
t8 = $[25];
|
|
472
|
+
t9 = $[26];
|
|
461
473
|
}
|
|
462
474
|
let t13;
|
|
463
|
-
if ($[
|
|
475
|
+
if ($[27] !== t7) {
|
|
464
476
|
t13 = /* @__PURE__ */ jsxs("div", {
|
|
465
477
|
className: "bg-background flex h-screen flex-col overflow-hidden",
|
|
466
478
|
children: [
|
|
@@ -473,44 +485,48 @@ const CamoxPreview = (t0) => {
|
|
|
473
485
|
t12
|
|
474
486
|
]
|
|
475
487
|
});
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
} else t13 = $[
|
|
488
|
+
$[27] = t7;
|
|
489
|
+
$[28] = t13;
|
|
490
|
+
} else t13 = $[28];
|
|
479
491
|
return t13;
|
|
480
492
|
};
|
|
481
493
|
function usePreviewPagesActions() {
|
|
482
|
-
const $ = c(
|
|
494
|
+
const $ = c(13);
|
|
495
|
+
if ($[0] !== "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa") {
|
|
496
|
+
for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
497
|
+
$[0] = "b803e8bbb91b7986d49da585480a8df1d0a53a974dfaa5c596024b3634d8a3fa";
|
|
498
|
+
}
|
|
483
499
|
const navigate = useNavigate();
|
|
484
500
|
const { pathname } = useLocation();
|
|
485
501
|
const projectSlug = useProjectSlug();
|
|
486
502
|
let t0;
|
|
487
|
-
if ($[
|
|
503
|
+
if ($[1] !== projectSlug) {
|
|
488
504
|
t0 = projectQueries.getBySlug(projectSlug);
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
} else t0 = $[
|
|
505
|
+
$[1] = projectSlug;
|
|
506
|
+
$[2] = t0;
|
|
507
|
+
} else t0 = $[2];
|
|
492
508
|
const { data: project } = useQuery(t0);
|
|
493
509
|
let t1;
|
|
494
|
-
if ($[
|
|
510
|
+
if ($[3] !== project?.id) {
|
|
495
511
|
t1 = pageQueries.list(project?.id ?? 0);
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
} else t1 = $[
|
|
512
|
+
$[3] = project?.id;
|
|
513
|
+
$[4] = t1;
|
|
514
|
+
} else t1 = $[4];
|
|
499
515
|
const t2 = !!project;
|
|
500
516
|
let t3;
|
|
501
|
-
if ($[
|
|
517
|
+
if ($[5] !== t1 || $[6] !== t2) {
|
|
502
518
|
t3 = {
|
|
503
519
|
...t1,
|
|
504
520
|
enabled: t2
|
|
505
521
|
};
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
} else t3 = $[
|
|
522
|
+
$[5] = t1;
|
|
523
|
+
$[6] = t2;
|
|
524
|
+
$[7] = t3;
|
|
525
|
+
} else t3 = $[7];
|
|
510
526
|
const { data: pages } = useQuery(t3);
|
|
511
527
|
let t4;
|
|
512
528
|
let t5;
|
|
513
|
-
if ($[
|
|
529
|
+
if ($[8] !== navigate || $[9] !== pages || $[10] !== pathname) {
|
|
514
530
|
t4 = () => {
|
|
515
531
|
const currentPage = pages?.find((p) => p.fullPath === pathname);
|
|
516
532
|
const actions = [
|
|
@@ -567,14 +583,14 @@ function usePreviewPagesActions() {
|
|
|
567
583
|
pages,
|
|
568
584
|
pathname
|
|
569
585
|
];
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
586
|
+
$[8] = navigate;
|
|
587
|
+
$[9] = pages;
|
|
588
|
+
$[10] = pathname;
|
|
589
|
+
$[11] = t4;
|
|
590
|
+
$[12] = t5;
|
|
575
591
|
} else {
|
|
576
|
-
t4 = $[
|
|
577
|
-
t5 = $[
|
|
592
|
+
t4 = $[11];
|
|
593
|
+
t5 = $[12];
|
|
578
594
|
}
|
|
579
595
|
React.useEffect(t4, t5);
|
|
580
596
|
}
|