camox 0.16.0 → 0.16.1
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/core/createBlock.js +19 -19
- package/dist/core/hooks/useFieldSelection.js +3 -3
- package/dist/core/hooks/useIsEditable.js +3 -3
- package/dist/features/preview/CamoxPreview.js +9 -9
- package/dist/features/preview/components/AddBlockSheet.js +6 -15
- package/dist/features/preview/components/AgentChatSheet.js +3 -3
- package/dist/features/preview/components/BlockActionsPopover.js +3 -3
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/EditPageModal.js +9 -9
- package/dist/features/preview/components/FieldToolbar.js +3 -3
- package/dist/features/preview/components/OverlayTracker.js +3 -3
- package/dist/features/preview/components/Overlays.js +3 -3
- package/dist/features/preview/components/PageContentSheet.js +1 -1
- package/dist/features/preview/components/PagePicker.js +1 -1
- package/dist/features/preview/components/PageTree.js +23 -23
- package/dist/features/preview/components/PeekedBlock.js +3 -3
- package/dist/features/preview/components/PreviewPanel.js +7 -7
- package/dist/features/preview/components/PreviewSideSheet.js +5 -5
- package/dist/features/preview/components/PreviewToolbar.js +3 -3
- package/dist/features/preview/components/RepeatableItemsList.js +5 -5
- package/dist/features/preview/components/useUpdateBlockPosition.js +3 -3
- package/dist/features/preview/previewStore.js +1 -1
- package/dist/features/provider/actionsStore.js +1 -1
- package/dist/features/provider/components/CommandPalette.js +5 -5
- package/dist/features/provider/useAdminShortcuts.js +3 -3
- package/dist/features/studio/studioStore.js +1 -1
- package/dist/features/vite/vite.js +1 -2
- package/dist/studio.css +1 -1
- package/package.json +5 -5
package/dist/core/createBlock.js
CHANGED
|
@@ -21,7 +21,7 @@ import { toast } from "@camox/ui/toaster";
|
|
|
21
21
|
import { Type as Type$1 } from "@sinclair/typebox";
|
|
22
22
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
23
23
|
import { useLocation } from "@tanstack/react-router";
|
|
24
|
-
import { useSelector } from "@xstate/store
|
|
24
|
+
import { useSelector } from "@xstate/store-react";
|
|
25
25
|
import { generateKeyBetween } from "fractional-indexing";
|
|
26
26
|
import * as React from "react";
|
|
27
27
|
import { createPortal } from "react-dom";
|
|
@@ -275,9 +275,9 @@ function createBlock(options) {
|
|
|
275
275
|
};
|
|
276
276
|
const Embed = (t0) => {
|
|
277
277
|
const $ = c(59);
|
|
278
|
-
if ($[0] !== "
|
|
278
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
279
279
|
for (let $i = 0; $i < 59; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
280
|
-
$[0] = "
|
|
280
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
281
281
|
}
|
|
282
282
|
const { name, children } = t0;
|
|
283
283
|
const blockContext = React.use(Context);
|
|
@@ -525,9 +525,9 @@ function createBlock(options) {
|
|
|
525
525
|
};
|
|
526
526
|
const Link = (t0) => {
|
|
527
527
|
const $ = c(38);
|
|
528
|
-
if ($[0] !== "
|
|
528
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
529
529
|
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
530
|
-
$[0] = "
|
|
530
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
531
531
|
}
|
|
532
532
|
const { name, children } = t0;
|
|
533
533
|
const blockContext = React.use(Context);
|
|
@@ -766,9 +766,9 @@ function createBlock(options) {
|
|
|
766
766
|
};
|
|
767
767
|
const Image = (t0) => {
|
|
768
768
|
const $ = c(22);
|
|
769
|
-
if ($[0] !== "
|
|
769
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
770
770
|
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
771
|
-
$[0] = "
|
|
771
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
772
772
|
}
|
|
773
773
|
const { name, children } = t0;
|
|
774
774
|
const blockContext = React.use(Context);
|
|
@@ -884,9 +884,9 @@ function createBlock(options) {
|
|
|
884
884
|
};
|
|
885
885
|
const File = (t0) => {
|
|
886
886
|
const $ = c(9);
|
|
887
|
-
if ($[0] !== "
|
|
887
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
888
888
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
889
|
-
$[0] = "
|
|
889
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
890
890
|
}
|
|
891
891
|
const { name, children } = t0;
|
|
892
892
|
const blockContext = React.use(Context);
|
|
@@ -921,9 +921,9 @@ function createBlock(options) {
|
|
|
921
921
|
};
|
|
922
922
|
const RepeaterItemWrapper = (t0) => {
|
|
923
923
|
const $ = c(9);
|
|
924
|
-
if ($[0] !== "
|
|
924
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
925
925
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
926
|
-
$[0] = "
|
|
926
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
927
927
|
}
|
|
928
928
|
const { itemId, blockId, mode, children } = t0;
|
|
929
929
|
const isContentEditable = useIsEditable(mode);
|
|
@@ -964,9 +964,9 @@ function createBlock(options) {
|
|
|
964
964
|
};
|
|
965
965
|
const RepeaterHoverProvider = (t0) => {
|
|
966
966
|
const $ = c(7);
|
|
967
|
-
if ($[0] !== "
|
|
967
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
968
968
|
for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
969
|
-
$[0] = "
|
|
969
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
970
970
|
}
|
|
971
971
|
const { blockId, fieldName, children } = t0;
|
|
972
972
|
const isContentEditable = useIsEditable("site");
|
|
@@ -997,9 +997,9 @@ function createBlock(options) {
|
|
|
997
997
|
};
|
|
998
998
|
const Repeater = (t0) => {
|
|
999
999
|
const $ = c(30);
|
|
1000
|
-
if ($[0] !== "
|
|
1000
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
1001
1001
|
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1002
|
-
$[0] = "
|
|
1002
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
1003
1003
|
}
|
|
1004
1004
|
const { name, children } = t0;
|
|
1005
1005
|
const blockContext = React.use(Context);
|
|
@@ -1140,9 +1140,9 @@ function createBlock(options) {
|
|
|
1140
1140
|
};
|
|
1141
1141
|
const BlockComponent = (t0) => {
|
|
1142
1142
|
const $ = c(70);
|
|
1143
|
-
if ($[0] !== "
|
|
1143
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
1144
1144
|
for (let $i = 0; $i < 70; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1145
|
-
$[0] = "
|
|
1145
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
1146
1146
|
}
|
|
1147
1147
|
const { blockData, mode, isFirstBlock, showAddBlockTop, showAddBlockBottom, addBlockAfterPosition } = t0;
|
|
1148
1148
|
const isContentEditable = useIsEditable(mode);
|
|
@@ -1442,9 +1442,9 @@ function createBlock(options) {
|
|
|
1442
1442
|
*/
|
|
1443
1443
|
const Detached = (t0) => {
|
|
1444
1444
|
const $ = c(31);
|
|
1445
|
-
if ($[0] !== "
|
|
1445
|
+
if ($[0] !== "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf") {
|
|
1446
1446
|
for (let $i = 0; $i < 31; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1447
|
-
$[0] = "
|
|
1447
|
+
$[0] = "0821d9358337304686019b44ab594c54818420d4b9313ae3430dbfd8e6246bcf";
|
|
1448
1448
|
}
|
|
1449
1449
|
const { children } = t0;
|
|
1450
1450
|
const ctx = React.use(Context);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { previewStore } from "../../features/preview/previewStore.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { useSelector } from "@xstate/store
|
|
3
|
+
import { useSelector } from "@xstate/store-react";
|
|
4
4
|
|
|
5
5
|
//#region src/core/hooks/useFieldSelection.ts
|
|
6
6
|
/**
|
|
@@ -10,9 +10,9 @@ import { useSelector } from "@xstate/store/react";
|
|
|
10
10
|
*/
|
|
11
11
|
function useFieldSelection(blockId, fieldName, fieldType, repeaterItemId) {
|
|
12
12
|
const $ = c(6);
|
|
13
|
-
if ($[0] !== "
|
|
13
|
+
if ($[0] !== "d38da1cfe1462f293f7a9f0ae3e6649ca277091bc93b0a6a0e1cbbe5ba4d1fef") {
|
|
14
14
|
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
15
|
-
$[0] = "
|
|
15
|
+
$[0] = "d38da1cfe1462f293f7a9f0ae3e6649ca277091bc93b0a6a0e1cbbe5ba4d1fef";
|
|
16
16
|
}
|
|
17
17
|
let t0;
|
|
18
18
|
if ($[1] !== blockId || $[2] !== fieldName || $[3] !== fieldType || $[4] !== repeaterItemId) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { previewStore } from "../../features/preview/previewStore.js";
|
|
2
2
|
import { useIsAuthenticated } from "../../lib/auth.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useSelector } from "@xstate/store
|
|
4
|
+
import { useSelector } from "@xstate/store-react";
|
|
5
5
|
|
|
6
6
|
//#region src/core/hooks/useIsEditable.ts
|
|
7
7
|
function useIsEditable(mode) {
|
|
8
8
|
const $ = c(1);
|
|
9
|
-
if ($[0] !== "
|
|
9
|
+
if ($[0] !== "347fec28a4ea3c02be549a08c202826fd143b88bdb1612c4c4107a1c95d687b3") {
|
|
10
10
|
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
11
|
-
$[0] = "
|
|
11
|
+
$[0] = "347fec28a4ea3c02be549a08c202826fd143b88bdb1612c4c4107a1c95d687b3";
|
|
12
12
|
}
|
|
13
13
|
const isAuthenticated = useIsAuthenticated();
|
|
14
14
|
const isPresentationMode = useSelector(previewStore, _temp);
|
|
@@ -20,7 +20,7 @@ import { PreviewFrame, PreviewPanel } from "./components/PreviewPanel.js";
|
|
|
20
20
|
import { c } from "react/compiler-runtime";
|
|
21
21
|
import { keepPreviousData, useQuery, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
|
|
22
22
|
import { useLocation, useNavigate } from "@tanstack/react-router";
|
|
23
|
-
import { useSelector } from "@xstate/store
|
|
23
|
+
import { useSelector } from "@xstate/store-react";
|
|
24
24
|
import * as React from "react";
|
|
25
25
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
26
26
|
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
@@ -68,9 +68,9 @@ function pageFullQueryFn(queryClient, path, projectSlug) {
|
|
|
68
68
|
}
|
|
69
69
|
function usePreviewedPage() {
|
|
70
70
|
const $ = c(22);
|
|
71
|
-
if ($[0] !== "
|
|
71
|
+
if ($[0] !== "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c") {
|
|
72
72
|
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
73
|
-
$[0] = "
|
|
73
|
+
$[0] = "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c";
|
|
74
74
|
}
|
|
75
75
|
const { pathname } = useLocation();
|
|
76
76
|
const queryClient = useQueryClient();
|
|
@@ -159,9 +159,9 @@ function _temp(state) {
|
|
|
159
159
|
}
|
|
160
160
|
const BlockRenderer = (t0) => {
|
|
161
161
|
const $ = c(22);
|
|
162
|
-
if ($[0] !== "
|
|
162
|
+
if ($[0] !== "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c") {
|
|
163
163
|
for (let $i = 0; $i < 22; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
164
|
-
$[0] = "
|
|
164
|
+
$[0] = "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c";
|
|
165
165
|
}
|
|
166
166
|
const { blockId, mode, showAddBlockTop, showAddBlockBottom } = t0;
|
|
167
167
|
let t1;
|
|
@@ -302,9 +302,9 @@ const PageContent = () => {
|
|
|
302
302
|
};
|
|
303
303
|
const CamoxPreview = (t0) => {
|
|
304
304
|
const $ = c(29);
|
|
305
|
-
if ($[0] !== "
|
|
305
|
+
if ($[0] !== "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c") {
|
|
306
306
|
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
307
|
-
$[0] = "
|
|
307
|
+
$[0] = "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c";
|
|
308
308
|
}
|
|
309
309
|
const { children } = t0;
|
|
310
310
|
const isAuthenticated = useIsAuthenticated();
|
|
@@ -492,9 +492,9 @@ const CamoxPreview = (t0) => {
|
|
|
492
492
|
};
|
|
493
493
|
function usePreviewPagesActions() {
|
|
494
494
|
const $ = c(13);
|
|
495
|
-
if ($[0] !== "
|
|
495
|
+
if ($[0] !== "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c") {
|
|
496
496
|
for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
497
|
-
$[0] = "
|
|
497
|
+
$[0] = "1904ead0ba438223b84fc30561cf474bfcc8d3ce9c88c2aa8502ed3a3535ff4c";
|
|
498
498
|
}
|
|
499
499
|
const navigate = useNavigate();
|
|
500
500
|
const { pathname } = useLocation();
|
|
@@ -9,21 +9,19 @@ import { usePreviewedPage } from "../CamoxPreview.js";
|
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
11
11
|
import { useLocation } from "@tanstack/react-router";
|
|
12
|
-
import { useSelector } from "@xstate/store
|
|
12
|
+
import { useSelector } from "@xstate/store-react";
|
|
13
13
|
import { generateKeyBetween } from "fractional-indexing";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
17
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
18
|
-
import { InfoIcon } from "lucide-react";
|
|
19
17
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@camox/ui/command";
|
|
20
18
|
|
|
21
19
|
//#region src/features/preview/components/AddBlockSheet.tsx
|
|
22
20
|
const AddBlockSheet = () => {
|
|
23
21
|
const $ = c(59);
|
|
24
|
-
if ($[0] !== "
|
|
22
|
+
if ($[0] !== "894d300254ebf5c7f95deeb5f42b80dba7f6945707872f83eac91b9d226ff2bb") {
|
|
25
23
|
for (let $i = 0; $i < 59; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
|
-
$[0] = "
|
|
24
|
+
$[0] = "894d300254ebf5c7f95deeb5f42b80dba7f6945707872f83eac91b9d226ff2bb";
|
|
27
25
|
}
|
|
28
26
|
const [highlightedValue, setHighlightedValue] = React.useState("");
|
|
29
27
|
const queryClient = useQueryClient();
|
|
@@ -284,26 +282,19 @@ const AddBlockSheet = () => {
|
|
|
284
282
|
} else t22 = $[35];
|
|
285
283
|
let t23;
|
|
286
284
|
if ($[36] !== displayCount || $[37] !== handleAddBlock) {
|
|
287
|
-
t23 = (block_3) => /* @__PURE__ */
|
|
285
|
+
t23 = (block_3) => /* @__PURE__ */ jsx(CommandItem, {
|
|
288
286
|
value: block_3._internal.title,
|
|
289
287
|
onSelect: () => {
|
|
290
288
|
handleAddBlock(block_3);
|
|
291
289
|
},
|
|
292
290
|
className: "group flex items-center justify-between gap-2",
|
|
293
|
-
children:
|
|
291
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
294
292
|
className: "flex-1",
|
|
295
293
|
children: [/* @__PURE__ */ jsx("span", { children: block_3._internal.title }), /* @__PURE__ */ jsx("span", {
|
|
296
294
|
className: "text-muted-foreground block",
|
|
297
295
|
children: displayCount(block_3._internal.id)
|
|
298
296
|
})]
|
|
299
|
-
})
|
|
300
|
-
className: "hidden group-focus-within:flex group-hover:flex",
|
|
301
|
-
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
302
|
-
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
303
|
-
className: "max-w-75",
|
|
304
|
-
side: "right",
|
|
305
|
-
children: block_3._internal.description
|
|
306
|
-
})] })]
|
|
297
|
+
})
|
|
307
298
|
}, block_3._internal.id);
|
|
308
299
|
$[36] = displayCount;
|
|
309
300
|
$[37] = handleAddBlock;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { previewStore } from "../previewStore.js";
|
|
2
2
|
import { PreviewSideSheet, Sheet } from "./PreviewSideSheet.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useSelector } from "@xstate/store
|
|
4
|
+
import { useSelector } from "@xstate/store-react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Info } from "lucide-react";
|
|
7
7
|
import { Alert, AlertDescription, AlertTitle } from "@camox/ui/alert";
|
|
@@ -9,9 +9,9 @@ import { Alert, AlertDescription, AlertTitle } from "@camox/ui/alert";
|
|
|
9
9
|
//#region src/features/preview/components/AgentChatSheet.tsx
|
|
10
10
|
const AgentChatSheet = () => {
|
|
11
11
|
const $ = c(9);
|
|
12
|
-
if ($[0] !== "
|
|
12
|
+
if ($[0] !== "ea78faddb013742f473dd38a97781323d2a1639b8a590608b8392a867f2321b6") {
|
|
13
13
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
-
$[0] = "
|
|
14
|
+
$[0] = "ea78faddb013742f473dd38a97781323d2a1639b8a590608b8392a867f2321b6";
|
|
15
15
|
}
|
|
16
16
|
const isOpen = useSelector(previewStore, _temp);
|
|
17
17
|
const handleOpenChange = _temp2;
|
|
@@ -11,7 +11,7 @@ import { c } from "react/compiler-runtime";
|
|
|
11
11
|
import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
12
12
|
import { toast } from "@camox/ui/toaster";
|
|
13
13
|
import { useMutation } from "@tanstack/react-query";
|
|
14
|
-
import { useSelector } from "@xstate/store
|
|
14
|
+
import { useSelector } from "@xstate/store-react";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { Copy, Pen, Settings, Trash2 } from "lucide-react";
|
|
@@ -274,9 +274,9 @@ function isLayoutBlockId(page, blockId) {
|
|
|
274
274
|
}
|
|
275
275
|
function useBlockActionsShortcuts() {
|
|
276
276
|
const $ = c(18);
|
|
277
|
-
if ($[0] !== "
|
|
277
|
+
if ($[0] !== "278bb4ea768197670f5e143ba3f4245e5a15abef30a4e32a51eb498fc72dc0dd") {
|
|
278
278
|
for (let $i = 0; $i < 18; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
279
|
-
$[0] = "
|
|
279
|
+
$[0] = "278bb4ea768197670f5e143ba3f4245e5a15abef30a4e32a51eb498fc72dc0dd";
|
|
280
280
|
}
|
|
281
281
|
const camoxApp = useCamoxApp();
|
|
282
282
|
const page = usePreviewedPage();
|
|
@@ -8,7 +8,7 @@ import { Label } from "@camox/ui/label";
|
|
|
8
8
|
import { toast } from "@camox/ui/toaster";
|
|
9
9
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
10
10
|
import { useNavigate } from "@tanstack/react-router";
|
|
11
|
-
import { useSelector } from "@xstate/store
|
|
11
|
+
import { useSelector } from "@xstate/store-react";
|
|
12
12
|
import { useEffect } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Button } from "@camox/ui/button";
|
|
@@ -12,7 +12,7 @@ import { Label } from "@camox/ui/label";
|
|
|
12
12
|
import { toast } from "@camox/ui/toaster";
|
|
13
13
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
14
14
|
import { useNavigate } from "@tanstack/react-router";
|
|
15
|
-
import { useSelector } from "@xstate/store
|
|
15
|
+
import { useSelector } from "@xstate/store-react";
|
|
16
16
|
import * as React from "react";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { Button } from "@camox/ui/button";
|
|
@@ -28,9 +28,9 @@ import { Switch } from "@camox/ui/switch";
|
|
|
28
28
|
//#region src/features/preview/components/EditPageModal.tsx
|
|
29
29
|
const EditPageModal = () => {
|
|
30
30
|
const $ = c(3);
|
|
31
|
-
if ($[0] !== "
|
|
31
|
+
if ($[0] !== "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59") {
|
|
32
32
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
33
|
-
$[0] = "
|
|
33
|
+
$[0] = "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59";
|
|
34
34
|
}
|
|
35
35
|
const editingPageId = useSelector(previewStore, _temp);
|
|
36
36
|
let t0;
|
|
@@ -295,9 +295,9 @@ function truncateText(text, maxLen) {
|
|
|
295
295
|
}
|
|
296
296
|
const SearchEnginePreview = (t0) => {
|
|
297
297
|
const $ = c(17);
|
|
298
|
-
if ($[0] !== "
|
|
298
|
+
if ($[0] !== "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59") {
|
|
299
299
|
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
300
|
-
$[0] = "
|
|
300
|
+
$[0] = "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59";
|
|
301
301
|
}
|
|
302
302
|
const { page, metaTitle, metaDescription } = t0;
|
|
303
303
|
const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
|
|
@@ -380,9 +380,9 @@ const SearchEnginePreview = (t0) => {
|
|
|
380
380
|
};
|
|
381
381
|
const SocialPreviewSection = (t0) => {
|
|
382
382
|
const $ = c(23);
|
|
383
|
-
if ($[0] !== "
|
|
383
|
+
if ($[0] !== "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59") {
|
|
384
384
|
for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
385
|
-
$[0] = "
|
|
385
|
+
$[0] = "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59";
|
|
386
386
|
}
|
|
387
387
|
const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
|
|
388
388
|
const pageMetaTitle = page.metaTitle ?? page.pathSegment;
|
|
@@ -493,9 +493,9 @@ const SocialPreviewSection = (t0) => {
|
|
|
493
493
|
};
|
|
494
494
|
const PageMarkdownPreview = (t0) => {
|
|
495
495
|
const $ = c(9);
|
|
496
|
-
if ($[0] !== "
|
|
496
|
+
if ($[0] !== "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59") {
|
|
497
497
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
498
|
-
$[0] = "
|
|
498
|
+
$[0] = "77e099cc2262abd4d5933b5ccdac9b8a465b2ec9734a24e689cb553e1f237c59";
|
|
499
499
|
}
|
|
500
500
|
const { pageId, metaTitle, metaDescription } = t0;
|
|
501
501
|
let t1;
|
|
@@ -7,7 +7,7 @@ import { useCurrentItemActions } from "./useRepeatableItemActions.js";
|
|
|
7
7
|
import { formatFieldName } from "./ItemFieldsEditor.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { Kbd } from "@camox/ui/kbd";
|
|
10
|
-
import { useSelector } from "@xstate/store
|
|
10
|
+
import { useSelector } from "@xstate/store-react";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Button } from "@camox/ui/button";
|
|
@@ -33,9 +33,9 @@ const FORMAT_BUTTONS = [{
|
|
|
33
33
|
}];
|
|
34
34
|
const FieldToolbar = () => {
|
|
35
35
|
const $ = c(28);
|
|
36
|
-
if ($[0] !== "
|
|
36
|
+
if ($[0] !== "a34e7a229eb426498bf253b287fe77f34bd074a248fe59749809701f61b66f8c") {
|
|
37
37
|
for (let $i = 0; $i < 28; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
38
|
-
$[0] = "
|
|
38
|
+
$[0] = "a34e7a229eb426498bf253b287fe77f34bd074a248fe59749809701f61b66f8c";
|
|
39
39
|
}
|
|
40
40
|
const iframeElement = useSelector(previewStore, _temp);
|
|
41
41
|
const selection = useSelector(previewStore, _temp2);
|
|
@@ -2,7 +2,7 @@ import { previewStore } from "../previewStore.js";
|
|
|
2
2
|
import { useFrame } from "./Frame.js";
|
|
3
3
|
import { isOverlayMessage } from "../overlayMessages.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useSelector } from "@xstate/store
|
|
5
|
+
import { useSelector } from "@xstate/store-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
|
|
8
8
|
//#region src/features/preview/components/OverlayTracker.tsx
|
|
@@ -12,9 +12,9 @@ import * as React from "react";
|
|
|
12
12
|
*/
|
|
13
13
|
const OverlayTracker = () => {
|
|
14
14
|
const $ = c(9);
|
|
15
|
-
if ($[0] !== "
|
|
15
|
+
if ($[0] !== "e30e2d44ddd11434fba7914649cce579c7f2cb5f9cba2ea52958570ba7530abf") {
|
|
16
16
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
17
|
-
$[0] = "
|
|
17
|
+
$[0] = "e30e2d44ddd11434fba7914649cce579c7f2cb5f9cba2ea52958570ba7530abf";
|
|
18
18
|
}
|
|
19
19
|
const { window: iframeWindow } = useFrame();
|
|
20
20
|
const isPageContentSheetOpen = useSelector(previewStore, _temp);
|
|
@@ -3,15 +3,15 @@ import { isOverlayMessage } from "../overlayMessages.js";
|
|
|
3
3
|
import { usePageBlocks } from "../../../lib/normalized-data.js";
|
|
4
4
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { useSelector } from "@xstate/store
|
|
6
|
+
import { useSelector } from "@xstate/store-react";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/Overlays.tsx
|
|
10
10
|
const Overlays = (t0) => {
|
|
11
11
|
const $ = c(15);
|
|
12
|
-
if ($[0] !== "
|
|
12
|
+
if ($[0] !== "c0f7c4c8a7e0ca42965ee74bb3077e5ef65c52138c6801bfc431adeaaaed697c") {
|
|
13
13
|
for (let $i = 0; $i < 15; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
-
$[0] = "
|
|
14
|
+
$[0] = "c0f7c4c8a7e0ca42965ee74bb3077e5ef65c52138c6801bfc431adeaaaed697c";
|
|
15
15
|
}
|
|
16
16
|
const { iframeElement } = t0;
|
|
17
17
|
const isPageContentSheetOpen = useSelector(previewStore, _temp);
|
|
@@ -14,7 +14,7 @@ import { MultipleAssetFieldEditor } from "./MultipleAssetFieldEditor.js";
|
|
|
14
14
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
15
15
|
import { Label } from "@camox/ui/label";
|
|
16
16
|
import { useMutation, useQueries, useQuery } from "@tanstack/react-query";
|
|
17
|
-
import { useSelector } from "@xstate/store
|
|
17
|
+
import { useSelector } from "@xstate/store-react";
|
|
18
18
|
import * as React from "react";
|
|
19
19
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
import { Button } from "@camox/ui/button";
|
|
@@ -6,7 +6,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
|
6
6
|
import { toast } from "@camox/ui/toaster";
|
|
7
7
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
8
8
|
import { useLocation, useNavigate } from "@tanstack/react-router";
|
|
9
|
-
import { useSelector } from "@xstate/store
|
|
9
|
+
import { useSelector } from "@xstate/store-react";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Button } from "@camox/ui/button";
|
|
@@ -9,7 +9,7 @@ import { BlockActionsPopover } from "./BlockActionsPopover.js";
|
|
|
9
9
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { useQuery } from "@tanstack/react-query";
|
|
12
|
-
import { useSelector } from "@xstate/store
|
|
12
|
+
import { useSelector } from "@xstate/store-react";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { Button } from "@camox/ui/button";
|
|
@@ -24,9 +24,9 @@ import { Accordion } from "@base-ui/react/accordion";
|
|
|
24
24
|
//#region src/features/preview/components/PageTree.tsx
|
|
25
25
|
function useEmbedTitle(url) {
|
|
26
26
|
const $ = c(4);
|
|
27
|
-
if ($[0] !== "
|
|
27
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
28
28
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
29
|
-
$[0] = "
|
|
29
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
30
30
|
}
|
|
31
31
|
const [title, setTitle] = React.useState(null);
|
|
32
32
|
let t0;
|
|
@@ -59,9 +59,9 @@ function _temp(res) {
|
|
|
59
59
|
}
|
|
60
60
|
const FieldItem = (t0) => {
|
|
61
61
|
const $ = c(30);
|
|
62
|
-
if ($[0] !== "
|
|
62
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
63
63
|
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
64
|
-
$[0] = "
|
|
64
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
65
65
|
}
|
|
66
66
|
const { fieldName, value, fieldType, schemaTitle, arrayItemType, isSelected, onFieldClick, onFieldDoubleClick, onMouseEnter, onMouseLeave } = t0;
|
|
67
67
|
const fetchedEmbedTitle = useEmbedTitle(fieldType === "Embed" ? value : null);
|
|
@@ -148,9 +148,9 @@ const FieldItem = (t0) => {
|
|
|
148
148
|
};
|
|
149
149
|
const BlockFields = (t0) => {
|
|
150
150
|
const $ = c(5);
|
|
151
|
-
if ($[0] !== "
|
|
151
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
152
152
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
153
|
-
$[0] = "
|
|
153
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
154
154
|
}
|
|
155
155
|
const { block } = t0;
|
|
156
156
|
const schemaProperties = useCamoxApp().getBlockById(block.type)?._internal.contentSchema.properties;
|
|
@@ -252,9 +252,9 @@ const BlockFields = (t0) => {
|
|
|
252
252
|
};
|
|
253
253
|
function useBlockTreeItem(block, t0) {
|
|
254
254
|
const $ = c(17);
|
|
255
|
-
if ($[0] !== "
|
|
255
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
256
256
|
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
257
|
-
$[0] = "
|
|
257
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
258
258
|
}
|
|
259
259
|
const isDragging = t0 === void 0 ? false : t0;
|
|
260
260
|
const [ellipsisPopoverOpen, setEllipsisPopoverOpen] = React.useState(false);
|
|
@@ -336,9 +336,9 @@ function _temp6(state) {
|
|
|
336
336
|
}
|
|
337
337
|
const BlockTreeItemHeader = (t0) => {
|
|
338
338
|
const $ = c(17);
|
|
339
|
-
if ($[0] !== "
|
|
339
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
340
340
|
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
341
|
-
$[0] = "
|
|
341
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
342
342
|
}
|
|
343
343
|
let children;
|
|
344
344
|
let className;
|
|
@@ -391,9 +391,9 @@ const BlockTreeItemHeader = (t0) => {
|
|
|
391
391
|
};
|
|
392
392
|
const BlockTreeItemTrigger = (t0) => {
|
|
393
393
|
const $ = c(5);
|
|
394
|
-
if ($[0] !== "
|
|
394
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
395
395
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
396
|
-
$[0] = "
|
|
396
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
397
397
|
}
|
|
398
398
|
const { displayText, onClick } = t0;
|
|
399
399
|
let t1;
|
|
@@ -420,9 +420,9 @@ const BlockTreeItemTrigger = (t0) => {
|
|
|
420
420
|
};
|
|
421
421
|
const BlockTreeItemEllipsis = (t0) => {
|
|
422
422
|
const $ = c(12);
|
|
423
|
-
if ($[0] !== "
|
|
423
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
424
424
|
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
425
|
-
$[0] = "
|
|
425
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
426
426
|
}
|
|
427
427
|
let className;
|
|
428
428
|
let open;
|
|
@@ -468,9 +468,9 @@ const BlockTreeItemEllipsis = (t0) => {
|
|
|
468
468
|
};
|
|
469
469
|
const BlockTreeItemContent = (t0) => {
|
|
470
470
|
const $ = c(3);
|
|
471
|
-
if ($[0] !== "
|
|
471
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
472
472
|
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
473
|
-
$[0] = "
|
|
473
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
474
474
|
}
|
|
475
475
|
const { block } = t0;
|
|
476
476
|
let t1;
|
|
@@ -491,9 +491,9 @@ const animateLayoutChanges = (args) => {
|
|
|
491
491
|
};
|
|
492
492
|
const SortableBlock = (t0) => {
|
|
493
493
|
const $ = c(53);
|
|
494
|
-
if ($[0] !== "
|
|
494
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
495
495
|
for (let $i = 0; $i < 53; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
496
|
-
$[0] = "
|
|
496
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
497
497
|
}
|
|
498
498
|
const { block } = t0;
|
|
499
499
|
const [gripPopoverOpen, setGripPopoverOpen] = React.useState(false);
|
|
@@ -682,9 +682,9 @@ const SortableBlock = (t0) => {
|
|
|
682
682
|
};
|
|
683
683
|
const LayoutBlockItem = (t0) => {
|
|
684
684
|
const $ = c(44);
|
|
685
|
-
if ($[0] !== "
|
|
685
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
686
686
|
for (let $i = 0; $i < 44; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
687
|
-
$[0] = "
|
|
687
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
688
688
|
}
|
|
689
689
|
const { block, layoutName } = t0;
|
|
690
690
|
const camoxApp = useCamoxApp();
|
|
@@ -843,9 +843,9 @@ const LayoutBlockItem = (t0) => {
|
|
|
843
843
|
};
|
|
844
844
|
const PageTree = () => {
|
|
845
845
|
const $ = c(47);
|
|
846
|
-
if ($[0] !== "
|
|
846
|
+
if ($[0] !== "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903") {
|
|
847
847
|
for (let $i = 0; $i < 47; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
848
|
-
$[0] = "
|
|
848
|
+
$[0] = "79ab6b120b2bb787a1048ac6df2d27952726deab51bb8be3775e9053c83d0903";
|
|
849
849
|
}
|
|
850
850
|
const page = usePreviewedPage();
|
|
851
851
|
const { pageBlocks, beforeBlocks: layoutBeforeBlocks, afterBlocks: layoutAfterBlocks } = usePageBlocks(page);
|
|
@@ -2,16 +2,16 @@ import { previewStore } from "../previewStore.js";
|
|
|
2
2
|
import { NormalizedDataProvider } from "../../../lib/normalized-data.js";
|
|
3
3
|
import { BlockErrorBoundary } from "./BlockErrorBoundary.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useSelector } from "@xstate/store
|
|
5
|
+
import { useSelector } from "@xstate/store-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/PeekedBlock.tsx
|
|
10
10
|
const PeekedBlock = (t0) => {
|
|
11
11
|
const $ = c(38);
|
|
12
|
-
if ($[0] !== "
|
|
12
|
+
if ($[0] !== "d06a0d1e44a842e15e76eed856e723e3d0d83c1a0085743d97152ca90675d851") {
|
|
13
13
|
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
-
$[0] = "
|
|
14
|
+
$[0] = "d06a0d1e44a842e15e76eed856e723e3d0d83c1a0085743d97152ca90675d851";
|
|
15
15
|
}
|
|
16
16
|
const { onExitComplete } = t0;
|
|
17
17
|
const peekedBlock = useSelector(previewStore, _temp);
|