camox 0.32.0 → 0.33.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.
Files changed (61) hide show
  1. package/dist/components/AuthGate.js +5 -4
  2. package/dist/core/createBlock.d.ts +1 -1
  3. package/dist/core/createBlock.js +88 -108
  4. package/dist/core/hooks/useIsEditable.js +6 -10
  5. package/dist/core/lib/fieldTypes.js +10 -219
  6. package/dist/features/agent-chat/components/AgentChatSidebar.js +172 -0
  7. package/dist/features/agent-chat/components/AgentChatThread.js +14 -15
  8. package/dist/features/preview/CamoxPreview.js +137 -729
  9. package/dist/features/preview/components/{AddBlockSheet.js → AddBlockSidebar.js} +121 -131
  10. package/dist/features/preview/components/AssetFieldEditor.js +107 -82
  11. package/dist/features/preview/components/AssetLightbox.js +14 -13
  12. package/dist/features/preview/components/AssetPickerModal.js +277 -0
  13. package/dist/features/preview/components/BlockActionsPopover.js +18 -24
  14. package/dist/features/preview/components/CreatePageModal.js +6 -6
  15. package/dist/features/preview/components/FieldToolbar.js +64 -127
  16. package/dist/features/preview/components/ItemFieldsEditor.js +98 -125
  17. package/dist/features/preview/components/LeftSidebar.js +64 -0
  18. package/dist/features/preview/components/LinkFieldEditor.js +1 -1
  19. package/dist/features/preview/components/MultipleAssetFieldEditor.js +94 -56
  20. package/dist/features/preview/components/OverlayTracker.js +15 -15
  21. package/dist/features/preview/components/Overlays.js +12 -12
  22. package/dist/features/preview/components/PageEditorSidebar.js +563 -0
  23. package/dist/features/preview/components/PageInfoSidebar.js +1453 -0
  24. package/dist/features/preview/components/PageNavigatorSidebar.js +590 -0
  25. package/dist/features/preview/components/PagePicker.js +3 -3
  26. package/dist/features/preview/components/PageStatusBadge.js +1 -1
  27. package/dist/features/preview/components/PageTree.js +204 -564
  28. package/dist/features/preview/components/PreviewPanel.js +123 -158
  29. package/dist/features/preview/components/PreviewToolbar.js +260 -256
  30. package/dist/features/preview/components/PublishDialog.js +2 -2
  31. package/dist/features/preview/components/RepeatableItemsList.js +2 -2
  32. package/dist/features/preview/components/RightSidebar.js +109 -0
  33. package/dist/features/preview/components/UnlinkAssetButton.js +2 -2
  34. package/dist/features/preview/components/useRepeatableItemActions.js +3 -138
  35. package/dist/features/preview/components/useUpdateBlockPosition.js +1 -1
  36. package/dist/features/preview/previewQueryFns.js +23 -0
  37. package/dist/features/preview/previewStore.js +46 -63
  38. package/dist/features/provider/CamoxProvider.js +255 -70
  39. package/dist/features/provider/useAdminShortcuts.js +5 -48
  40. package/dist/features/routes/pageRoute.js +1 -1
  41. package/dist/features/studio/CamoxStudio.js +6 -5
  42. package/dist/features/studio/components/EnvironmentMenu.js +2 -2
  43. package/dist/features/studio/components/Navbar.js +53 -71
  44. package/dist/features/studio/components/ProjectMenu.js +1 -1
  45. package/dist/features/studio/components/UserButton.js +1 -1
  46. package/dist/features/studio/routes.js +7 -0
  47. package/dist/features/studio/useTheme.js +67 -33
  48. package/dist/features/vite/routeGeneration.js +68 -66
  49. package/dist/hooks/use-file-upload.js +4 -2
  50. package/dist/lib/api-client.js +6 -3
  51. package/dist/lib/auth.js +29 -25
  52. package/dist/lib/queries.js +6 -4
  53. package/dist/lib/utils.js +1 -1
  54. package/dist/studio-overlays.css +1 -1
  55. package/dist/studio.css +1 -1
  56. package/package.json +4 -4
  57. package/dist/features/agent-chat/components/AgentChatSheet.js +0 -207
  58. package/dist/features/preview/components/AssetPickerGrid.js +0 -236
  59. package/dist/features/preview/components/PageContentSheet.js +0 -608
  60. package/dist/features/preview/components/PageMetadataModal.js +0 -908
  61. 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 };