camox 0.32.0 → 0.33.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/core/createBlock.d.ts +1 -1
- package/dist/core/createBlock.js +88 -108
- package/dist/core/hooks/useIsEditable.js +6 -10
- package/dist/core/lib/fieldTypes.js +10 -219
- package/dist/features/agent-chat/components/AgentChatSidebar.js +172 -0
- package/dist/features/agent-chat/components/AgentChatThread.js +9 -9
- package/dist/features/preview/CamoxPreview.js +137 -729
- package/dist/features/preview/components/{AddBlockSheet.js → AddBlockSidebar.js} +121 -131
- package/dist/features/preview/components/AssetFieldEditor.js +107 -82
- package/dist/features/preview/components/AssetLightbox.js +4 -4
- package/dist/features/preview/components/AssetPickerModal.js +277 -0
- package/dist/features/preview/components/BlockActionsPopover.js +18 -24
- package/dist/features/preview/components/CreatePageModal.js +6 -6
- package/dist/features/preview/components/FieldToolbar.js +64 -127
- package/dist/features/preview/components/ItemFieldsEditor.js +98 -125
- package/dist/features/preview/components/LeftSidebar.js +64 -0
- package/dist/features/preview/components/LinkFieldEditor.js +1 -1
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +94 -56
- package/dist/features/preview/components/OverlayTracker.js +15 -15
- package/dist/features/preview/components/Overlays.js +12 -12
- package/dist/features/preview/components/PageEditorSidebar.js +563 -0
- package/dist/features/preview/components/PageInfoSidebar.js +1453 -0
- package/dist/features/preview/components/PageNavigatorSidebar.js +590 -0
- package/dist/features/preview/components/PagePicker.js +3 -3
- package/dist/features/preview/components/PageStatusBadge.js +1 -1
- package/dist/features/preview/components/PageTree.js +204 -564
- package/dist/features/preview/components/PreviewPanel.js +123 -158
- package/dist/features/preview/components/PreviewToolbar.js +260 -256
- package/dist/features/preview/components/PublishDialog.js +2 -2
- package/dist/features/preview/components/RepeatableItemsList.js +2 -2
- package/dist/features/preview/components/RightSidebar.js +109 -0
- package/dist/features/preview/components/UnlinkAssetButton.js +2 -2
- package/dist/features/preview/components/useRepeatableItemActions.js +3 -138
- package/dist/features/preview/components/useUpdateBlockPosition.js +1 -1
- package/dist/features/preview/previewQueryFns.js +23 -0
- package/dist/features/preview/previewStore.js +46 -63
- package/dist/features/provider/CamoxProvider.js +255 -70
- package/dist/features/provider/useAdminShortcuts.js +5 -48
- package/dist/features/routes/pageRoute.js +1 -1
- package/dist/features/studio/CamoxStudio.js +6 -5
- package/dist/features/studio/components/EnvironmentMenu.js +2 -2
- package/dist/features/studio/components/Navbar.js +53 -71
- package/dist/features/studio/components/ProjectMenu.js +1 -1
- package/dist/features/studio/components/UserButton.js +1 -1
- package/dist/features/studio/routes.js +7 -0
- package/dist/features/studio/useTheme.js +67 -33
- package/dist/features/vite/routeGeneration.js +68 -66
- package/dist/hooks/use-file-upload.js +1 -1
- package/dist/lib/auth.js +23 -22
- package/dist/lib/utils.js +1 -1
- package/dist/studio-overlays.css +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
- package/dist/features/agent-chat/components/AgentChatSheet.js +0 -207
- package/dist/features/preview/components/AssetPickerGrid.js +0 -236
- package/dist/features/preview/components/PageContentSheet.js +0 -608
- package/dist/features/preview/components/PageMetadataModal.js +0 -908
- package/dist/features/preview/components/PreviewSideSheet.js +0 -76
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { previewStore } from "../previewStore.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { useSelector } from "@xstate/store-react";
|
|
4
|
-
import "react";
|
|
5
|
-
import * as Sheet from "@camox/ui/sheet";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
//#region src/features/preview/components/PreviewSideSheet.tsx
|
|
9
|
-
const PreviewSideSheet = (t0) => {
|
|
10
|
-
const $ = c(12);
|
|
11
|
-
if ($[0] !== "35b29fa3a8db99001095e915d7f303b2951fe53b35120b98796276d54347b926") {
|
|
12
|
-
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
|
-
$[0] = "35b29fa3a8db99001095e915d7f303b2951fe53b35120b98796276d54347b926";
|
|
14
|
-
}
|
|
15
|
-
const { open, onOpenChange, initialFocus, children, className, keepMounted, showCloseButton } = t0;
|
|
16
|
-
let t1;
|
|
17
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18
|
-
t1 = { minWidth: 400 };
|
|
19
|
-
$[1] = t1;
|
|
20
|
-
} else t1 = $[1];
|
|
21
|
-
let t2;
|
|
22
|
-
if ($[2] !== children || $[3] !== className || $[4] !== initialFocus || $[5] !== keepMounted || $[6] !== showCloseButton) {
|
|
23
|
-
t2 = /* @__PURE__ */ jsx(Sheet.SheetContent, {
|
|
24
|
-
className,
|
|
25
|
-
side: "left",
|
|
26
|
-
showOverlay: false,
|
|
27
|
-
style: t1,
|
|
28
|
-
initialFocus,
|
|
29
|
-
keepMounted,
|
|
30
|
-
showCloseButton,
|
|
31
|
-
children
|
|
32
|
-
});
|
|
33
|
-
$[2] = children;
|
|
34
|
-
$[3] = className;
|
|
35
|
-
$[4] = initialFocus;
|
|
36
|
-
$[5] = keepMounted;
|
|
37
|
-
$[6] = showCloseButton;
|
|
38
|
-
$[7] = t2;
|
|
39
|
-
} else t2 = $[7];
|
|
40
|
-
let t3;
|
|
41
|
-
if ($[8] !== onOpenChange || $[9] !== open || $[10] !== t2) {
|
|
42
|
-
t3 = /* @__PURE__ */ jsx(Sheet.Sheet, {
|
|
43
|
-
open,
|
|
44
|
-
onOpenChange,
|
|
45
|
-
children: t2
|
|
46
|
-
});
|
|
47
|
-
$[8] = onOpenChange;
|
|
48
|
-
$[9] = open;
|
|
49
|
-
$[10] = t2;
|
|
50
|
-
$[11] = t3;
|
|
51
|
-
} else t3 = $[11];
|
|
52
|
-
return t3;
|
|
53
|
-
};
|
|
54
|
-
function useIsPreviewSheetOpen() {
|
|
55
|
-
const $ = c(1);
|
|
56
|
-
if ($[0] !== "35b29fa3a8db99001095e915d7f303b2951fe53b35120b98796276d54347b926") {
|
|
57
|
-
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
58
|
-
$[0] = "35b29fa3a8db99001095e915d7f303b2951fe53b35120b98796276d54347b926";
|
|
59
|
-
}
|
|
60
|
-
const isPageContentSheetOpen = useSelector(previewStore, _temp);
|
|
61
|
-
const isPeekingBlock = useSelector(previewStore, _temp2);
|
|
62
|
-
const isAgentChatSheetOpen = useSelector(previewStore, _temp3);
|
|
63
|
-
return isPageContentSheetOpen || isPeekingBlock || isAgentChatSheetOpen;
|
|
64
|
-
}
|
|
65
|
-
function _temp3(state_1) {
|
|
66
|
-
return state_1.context.isAgentChatSheetOpen;
|
|
67
|
-
}
|
|
68
|
-
function _temp2(state_0) {
|
|
69
|
-
return state_0.context.peekedBlock != null;
|
|
70
|
-
}
|
|
71
|
-
function _temp(state) {
|
|
72
|
-
return state.context.isPageContentSheetOpen;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
export { PreviewSideSheet, Sheet, useIsPreviewSheetOpen };
|