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.
Files changed (75) hide show
  1. package/dist/components/AuthGate.js +6 -0
  2. package/dist/core/components/AddBlockControlBar.js +30 -26
  3. package/dist/core/components/lexical/InlineContentEditable.js +19 -15
  4. package/dist/core/components/lexical/InlineLexicalEditor.js +62 -42
  5. package/dist/core/components/lexical/SelectionBroadcaster.js +25 -21
  6. package/dist/core/components/lexical/SidebarLexicalEditor.js +33 -21
  7. package/dist/core/createBlock.js +524 -488
  8. package/dist/core/createLayout.js +40 -28
  9. package/dist/core/hooks/useFieldSelection.js +12 -8
  10. package/dist/core/hooks/useIsEditable.js +6 -0
  11. package/dist/core/hooks/useOverlayMessage.js +19 -15
  12. package/dist/core/lib/contentType.d.ts +8 -8
  13. package/dist/core/lib/contentType.js +63 -0
  14. package/dist/features/content/CamoxContent.js +92 -88
  15. package/dist/features/content/components/AssetCard.js +46 -42
  16. package/dist/features/content/components/AssetCardSkeleton.js +8 -4
  17. package/dist/features/content/components/ContentSidebar.js +8 -4
  18. package/dist/features/content/components/UploadDropZone.js +31 -27
  19. package/dist/features/content/components/UploadProgressDrawer.js +98 -90
  20. package/dist/features/preview/CamoxPreview.js +162 -146
  21. package/dist/features/preview/components/AddBlockSheet.js +105 -101
  22. package/dist/features/preview/components/AgentChatSheet.js +74 -21
  23. package/dist/features/preview/components/AssetFieldEditor.js +98 -90
  24. package/dist/features/preview/components/AssetLightbox.js +21 -17
  25. package/dist/features/preview/components/AssetPickerGrid.js +84 -80
  26. package/dist/features/preview/components/BlockActionsPopover.js +35 -31
  27. package/dist/features/preview/components/BlockErrorBoundary.js +12 -8
  28. package/dist/features/preview/components/CreatePageModal.js +1 -1
  29. package/dist/features/preview/components/DebouncedFieldEditor.js +41 -37
  30. package/dist/features/preview/components/EditPageModal.js +114 -98
  31. package/dist/features/preview/components/FieldOverlayStyles.js +8 -4
  32. package/dist/features/preview/components/FieldToolbar.js +95 -54
  33. package/dist/features/preview/components/Frame.js +50 -46
  34. package/dist/features/preview/components/ItemFieldsEditor.js +81 -79
  35. package/dist/features/preview/components/LinkFieldEditor.js +138 -134
  36. package/dist/features/preview/components/MultipleAssetFieldEditor.js +105 -97
  37. package/dist/features/preview/components/OverlayTracker.js +19 -15
  38. package/dist/features/preview/components/Overlays.js +27 -23
  39. package/dist/features/preview/components/PageContentSheet.js +54 -4
  40. package/dist/features/preview/components/PageLocationFieldset.js +113 -109
  41. package/dist/features/preview/components/PagePicker.js +1 -1
  42. package/dist/features/preview/components/PageTree.js +443 -399
  43. package/dist/features/preview/components/PeekedBlock.js +69 -65
  44. package/dist/features/preview/components/PreviewPanel.js +64 -52
  45. package/dist/features/preview/components/PreviewSideSheet.js +25 -16
  46. package/dist/features/preview/components/PreviewToolbar.js +127 -123
  47. package/dist/features/preview/components/RepeatableItemsList.js +176 -171
  48. package/dist/features/preview/components/ShikiMarkdown.js +18 -14
  49. package/dist/features/preview/components/UnlinkAssetButton.js +74 -70
  50. package/dist/features/preview/components/useRepeatableItemActions.js +266 -0
  51. package/dist/features/preview/components/useUpdateBlockPosition.js +13 -9
  52. package/dist/features/provider/CamoxProvider.js +60 -52
  53. package/dist/features/provider/components/CamoxAppContext.js +10 -6
  54. package/dist/features/provider/components/CommandPalette.js +77 -69
  55. package/dist/features/provider/useAdminShortcuts.js +11 -7
  56. package/dist/features/routes/pageRoute.js +8 -4
  57. package/dist/features/studio/CamoxStudio.js +23 -19
  58. package/dist/features/studio/components/EnvironmentMenu.js +32 -28
  59. package/dist/features/studio/components/Navbar.js +62 -54
  60. package/dist/features/studio/components/ProjectMenu.js +131 -123
  61. package/dist/features/studio/components/UserButton.js +15 -11
  62. package/dist/features/studio/useTheme.js +82 -42
  63. package/dist/features/vite/definitionsSync.js +5 -5
  64. package/dist/features/vite/skillGeneration.js +43 -8
  65. package/dist/features/vite/vite.d.ts +1 -1
  66. package/dist/features/vite/vite.js +20 -2
  67. package/dist/hooks/use-marquee-selection.js +36 -32
  68. package/dist/lib/auth.js +49 -22
  69. package/dist/lib/normalized-data.js +55 -47
  70. package/dist/lib/use-project-room.js +22 -18
  71. package/dist/studio.css +1 -1
  72. package/package.json +10 -11
  73. package/skills/camox-block/SKILL.md +4 -0
  74. package/skills/camox-cli/SKILL.md +142 -0
  75. package/skills/camox-layout/SKILL.md +4 -0
@@ -2,7 +2,7 @@ import { AuthContext, createCamoxAuthClient, useAuthActions, useAuthContext, use
2
2
  import { initApiClient } from "../../lib/api-client.js";
3
3
  import { projectQueries } from "../../lib/queries.js";
4
4
  import { CamoxAppProvider } from "./components/CamoxAppContext.js";
5
- import { useTheme, useThemeActions } from "../studio/useTheme.js";
5
+ import { useApplyTheme, useThemeActions, useThemeValue } from "../studio/useTheme.js";
6
6
  import { useNavbarActions } from "../studio/components/Navbar.js";
7
7
  import { usePreviewPagesActions } from "../preview/CamoxPreview.js";
8
8
  import { AuthGate } from "../../components/AuthGate.js";
@@ -19,7 +19,11 @@ import studioCssUrl from "virtual:camox-studio-css";
19
19
 
20
20
  //#region src/features/provider/CamoxProvider.tsx
21
21
  const AuthenticatedCamoxProvider = (t0) => {
22
- const $ = c(8);
22
+ const $ = c(9);
23
+ if ($[0] !== "4aa858f2d01b8522f136fc586f47d0bfc585b3ef0680197aead771149ae36446") {
24
+ for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
25
+ $[0] = "4aa858f2d01b8522f136fc586f47d0bfc585b3ef0680197aead771149ae36446";
26
+ }
23
27
  const { children } = t0;
24
28
  useAdminShortcuts();
25
29
  useCommandPaletteActions();
@@ -29,45 +33,49 @@ const AuthenticatedCamoxProvider = (t0) => {
29
33
  usePreviewPagesActions();
30
34
  const { apiUrl, projectSlug } = React.useContext(AuthContext);
31
35
  let t1;
32
- if ($[0] !== projectSlug) {
36
+ if ($[1] !== projectSlug) {
33
37
  t1 = projectQueries.getBySlug(projectSlug);
34
- $[0] = projectSlug;
35
- $[1] = t1;
36
- } else t1 = $[1];
38
+ $[1] = projectSlug;
39
+ $[2] = t1;
40
+ } else t1 = $[2];
37
41
  const { data: project } = useQuery(t1);
38
42
  useProjectRoom(apiUrl, project?.id);
39
- const { theme } = useTheme();
43
+ const { theme } = useApplyTheme();
40
44
  let t2;
41
- if ($[2] !== theme) {
45
+ if ($[3] !== theme) {
42
46
  t2 = /* @__PURE__ */ jsx(Toaster, { theme });
43
- $[2] = theme;
44
- $[3] = t2;
45
- } else t2 = $[3];
47
+ $[3] = theme;
48
+ $[4] = t2;
49
+ } else t2 = $[4];
46
50
  let t3;
47
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
51
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
48
52
  t3 = /* @__PURE__ */ jsx(CommandPalette, {});
49
- $[4] = t3;
50
- } else t3 = $[4];
53
+ $[5] = t3;
54
+ } else t3 = $[5];
51
55
  let t4;
52
- if ($[5] !== children || $[6] !== t2) {
56
+ if ($[6] !== children || $[7] !== t2) {
53
57
  t4 = /* @__PURE__ */ jsxs(Fragment, { children: [
54
58
  children,
55
59
  t2,
56
60
  t3
57
61
  ] });
58
- $[5] = children;
59
- $[6] = t2;
60
- $[7] = t4;
61
- } else t4 = $[7];
62
+ $[6] = children;
63
+ $[7] = t2;
64
+ $[8] = t4;
65
+ } else t4 = $[8];
62
66
  return t4;
63
67
  };
64
68
  const UnauthenticatedCamoxProvider = (t0) => {
65
- const $ = c(16);
69
+ const $ = c(17);
70
+ if ($[0] !== "4aa858f2d01b8522f136fc586f47d0bfc585b3ef0680197aead771149ae36446") {
71
+ for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
72
+ $[0] = "4aa858f2d01b8522f136fc586f47d0bfc585b3ef0680197aead771149ae36446";
73
+ }
66
74
  const { children } = t0;
67
75
  const signInRedirect = useSignInRedirect();
68
76
  const { authenticationUrl } = useAuthContext();
69
77
  let t1;
70
- if ($[0] !== signInRedirect) {
78
+ if ($[1] !== signInRedirect) {
71
79
  t1 = () => {
72
80
  const handleKeyDown = (event) => {
73
81
  if ((event.metaKey || event.ctrlKey) && event.key === "Enter") {
@@ -78,20 +86,20 @@ const UnauthenticatedCamoxProvider = (t0) => {
78
86
  document.addEventListener("keydown", handleKeyDown);
79
87
  return () => document.removeEventListener("keydown", handleKeyDown);
80
88
  };
81
- $[0] = signInRedirect;
82
- $[1] = t1;
83
- } else t1 = $[1];
89
+ $[1] = signInRedirect;
90
+ $[2] = t1;
91
+ } else t1 = $[2];
84
92
  let t2;
85
- if ($[2] !== authenticationUrl || $[3] !== signInRedirect) {
93
+ if ($[3] !== authenticationUrl || $[4] !== signInRedirect) {
86
94
  t2 = [signInRedirect, authenticationUrl];
87
- $[2] = authenticationUrl;
88
- $[3] = signInRedirect;
89
- $[4] = t2;
90
- } else t2 = $[4];
95
+ $[3] = authenticationUrl;
96
+ $[4] = signInRedirect;
97
+ $[5] = t2;
98
+ } else t2 = $[5];
91
99
  React.useEffect(t1, t2);
92
100
  let t3;
93
101
  let t4;
94
- if ($[5] !== signInRedirect) {
102
+ if ($[6] !== signInRedirect) {
95
103
  t3 = () => {
96
104
  if (import.meta.env.PROD) return;
97
105
  const toastId = toast("Sign in to open Camox Studio", {
@@ -104,46 +112,46 @@ const UnauthenticatedCamoxProvider = (t0) => {
104
112
  return () => void toast.dismiss(toastId);
105
113
  };
106
114
  t4 = [signInRedirect];
107
- $[5] = signInRedirect;
108
- $[6] = t3;
109
- $[7] = t4;
115
+ $[6] = signInRedirect;
116
+ $[7] = t3;
117
+ $[8] = t4;
110
118
  } else {
111
- t3 = $[6];
112
- t4 = $[7];
119
+ t3 = $[7];
120
+ t4 = $[8];
113
121
  }
114
122
  React.useEffect(t3, t4);
115
- const { theme } = useTheme();
123
+ const { theme } = useThemeValue();
116
124
  let t5;
117
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
125
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
118
126
  t5 = { bottom: "1rem" };
119
- $[8] = t5;
120
- } else t5 = $[8];
127
+ $[9] = t5;
128
+ } else t5 = $[9];
121
129
  let t6;
122
- if ($[9] !== theme) {
130
+ if ($[10] !== theme) {
123
131
  t6 = /* @__PURE__ */ jsx(Toaster, {
124
132
  theme,
125
133
  position: "bottom-right",
126
134
  offset: t5
127
135
  });
128
- $[9] = theme;
129
- $[10] = t6;
130
- } else t6 = $[10];
136
+ $[10] = theme;
137
+ $[11] = t6;
138
+ } else t6 = $[11];
131
139
  let t7;
132
- if ($[11] !== children) {
140
+ if ($[12] !== children) {
133
141
  t7 = /* @__PURE__ */ jsx("div", {
134
142
  className: "bg-background min-h-screen",
135
143
  children
136
144
  });
137
- $[11] = children;
138
- $[12] = t7;
139
- } else t7 = $[12];
145
+ $[12] = children;
146
+ $[13] = t7;
147
+ } else t7 = $[13];
140
148
  let t8;
141
- if ($[13] !== t6 || $[14] !== t7) {
149
+ if ($[14] !== t6 || $[15] !== t7) {
142
150
  t8 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t7] });
143
- $[13] = t6;
144
- $[14] = t7;
145
- $[15] = t8;
146
- } else t8 = $[15];
151
+ $[14] = t6;
152
+ $[15] = t7;
153
+ $[16] = t8;
154
+ } else t8 = $[16];
147
155
  return t8;
148
156
  };
149
157
  function CamoxProvider({ children, camoxApp, authenticationUrl, apiUrl, projectSlug, environmentName }) {
@@ -5,18 +5,22 @@ import { jsx } from "react/jsx-runtime";
5
5
  //#region src/features/provider/components/CamoxAppContext.tsx
6
6
  const CamoxAppContext = React.createContext(void 0);
7
7
  const CamoxAppProvider = (t0) => {
8
- const $ = c(3);
8
+ const $ = c(4);
9
+ if ($[0] !== "cfc0a475262929aa7e48b641cf046b98b7db1f481967ecd4c95c21c437ee2fc9") {
10
+ for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
11
+ $[0] = "cfc0a475262929aa7e48b641cf046b98b7db1f481967ecd4c95c21c437ee2fc9";
12
+ }
9
13
  const { app, children } = t0;
10
14
  let t1;
11
- if ($[0] !== app || $[1] !== children) {
15
+ if ($[1] !== app || $[2] !== children) {
12
16
  t1 = /* @__PURE__ */ jsx(CamoxAppContext.Provider, {
13
17
  value: app,
14
18
  children
15
19
  });
16
- $[0] = app;
17
- $[1] = children;
18
- $[2] = t1;
19
- } else t1 = $[2];
20
+ $[1] = app;
21
+ $[2] = children;
22
+ $[3] = t1;
23
+ } else t1 = $[3];
20
24
  return t1;
21
25
  };
22
26
  function useCamoxApp() {
@@ -9,23 +9,27 @@ import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, Comma
9
9
 
10
10
  //#region src/features/provider/components/CommandPalette.tsx
11
11
  function CommandPalette() {
12
- const $ = c(35);
12
+ const $ = c(36);
13
+ if ($[0] !== "b0ad4f19a3dc6d4a4fe7526b8e36e81edac4d14fbd285a6f9072557a7161c92c") {
14
+ for (let $i = 0; $i < 36; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
15
+ $[0] = "b0ad4f19a3dc6d4a4fe7526b8e36e81edac4d14fbd285a6f9072557a7161c92c";
16
+ }
13
17
  const isOpen = useSelector(studioStore, _temp);
14
18
  const [search, setSearch] = React.useState("");
15
19
  const [value, setValue] = React.useState("");
16
20
  const actions = useSelector(actionsStore, _temp2);
17
21
  const pages = useSelector(studioStore, _temp3);
18
22
  let t0;
19
- if ($[0] !== pages) {
23
+ if ($[1] !== pages) {
20
24
  t0 = pages.at(-1);
21
- $[0] = pages;
22
- $[1] = t0;
23
- } else t0 = $[1];
25
+ $[1] = pages;
26
+ $[2] = t0;
27
+ } else t0 = $[2];
24
28
  const page = t0;
25
29
  let groups;
26
- if ($[2] !== actions || $[3] !== page || $[4] !== search) {
30
+ if ($[3] !== actions || $[4] !== page || $[5] !== search) {
27
31
  let t1;
28
- if ($[6] !== page || $[7] !== search) {
32
+ if ($[7] !== page || $[8] !== search) {
29
33
  t1 = (action) => {
30
34
  if (!action.checkIfAvailable()) return false;
31
35
  if (action.groupLabel === "Invisible") return false;
@@ -33,42 +37,42 @@ function CommandPalette() {
33
37
  if (search.length > 0) return true;
34
38
  return !action.parentActionId;
35
39
  };
36
- $[6] = page;
37
- $[7] = search;
38
- $[8] = t1;
39
- } else t1 = $[8];
40
+ $[7] = page;
41
+ $[8] = search;
42
+ $[9] = t1;
43
+ } else t1 = $[9];
40
44
  const availableActions = actions.filter(t1);
41
45
  groups = /* @__PURE__ */ new Map();
42
46
  for (const action_0 of availableActions) {
43
47
  const existing = groups.get(action_0.groupLabel) || [];
44
48
  groups.set(action_0.groupLabel, [...existing, action_0]);
45
49
  }
46
- $[2] = actions;
47
- $[3] = page;
48
- $[4] = search;
49
- $[5] = groups;
50
- } else groups = $[5];
50
+ $[3] = actions;
51
+ $[4] = page;
52
+ $[5] = search;
53
+ $[6] = groups;
54
+ } else groups = $[6];
51
55
  let t1;
52
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
56
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
53
57
  t1 = [
54
58
  "Preview",
55
59
  "Navigation",
56
60
  "Studio"
57
61
  ];
58
- $[9] = t1;
59
- } else t1 = $[9];
62
+ $[10] = t1;
63
+ } else t1 = $[10];
60
64
  const groupOrder = t1;
61
65
  let sortedGroups;
62
- if ($[10] !== groups) {
66
+ if ($[11] !== groups) {
63
67
  sortedGroups = /* @__PURE__ */ new Map();
64
68
  for (const groupLabel of groupOrder) if (groups.has(groupLabel)) sortedGroups.set(groupLabel, groups.get(groupLabel));
65
- $[10] = groups;
66
- $[11] = sortedGroups;
67
- } else sortedGroups = $[11];
69
+ $[11] = groups;
70
+ $[12] = sortedGroups;
71
+ } else sortedGroups = $[12];
68
72
  const groupedActions = sortedGroups;
69
73
  let t2;
70
74
  let t3;
71
- if ($[12] !== actions || $[13] !== page) {
75
+ if ($[13] !== actions || $[14] !== page) {
72
76
  t2 = () => {
73
77
  if (page) {
74
78
  const firstChild = actions.find((a) => a.parentActionId === page && a.checkIfAvailable());
@@ -76,17 +80,17 @@ function CommandPalette() {
76
80
  }
77
81
  };
78
82
  t3 = [page, actions];
79
- $[12] = actions;
80
- $[13] = page;
81
- $[14] = t2;
82
- $[15] = t3;
83
+ $[13] = actions;
84
+ $[14] = page;
85
+ $[15] = t2;
86
+ $[16] = t3;
83
87
  } else {
84
- t2 = $[14];
85
- t3 = $[15];
88
+ t2 = $[15];
89
+ t3 = $[16];
86
90
  }
87
91
  React.useEffect(t2, t3);
88
92
  let t4;
89
- if ($[16] !== actions) {
93
+ if ($[17] !== actions) {
90
94
  t4 = (actionId) => {
91
95
  const action_1 = actions.find((a_0) => a_0.id === actionId);
92
96
  if (!action_1) return;
@@ -98,12 +102,12 @@ function CommandPalette() {
98
102
  });
99
103
  else studioStore.send({ type: "closeCommandPalette" });
100
104
  };
101
- $[16] = actions;
102
- $[17] = t4;
103
- } else t4 = $[17];
105
+ $[17] = actions;
106
+ $[18] = t4;
107
+ } else t4 = $[18];
104
108
  const handleSelect = t4;
105
109
  let t5;
106
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
110
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
107
111
  t5 = (open) => {
108
112
  if (open) studioStore.send({ type: "openCommandPalette" });
109
113
  else {
@@ -111,39 +115,39 @@ function CommandPalette() {
111
115
  studioStore.send({ type: "closeCommandPalette" });
112
116
  }
113
117
  };
114
- $[18] = t5;
115
- } else t5 = $[18];
118
+ $[19] = t5;
119
+ } else t5 = $[19];
116
120
  const handleOpenChange = t5;
117
121
  let t6;
118
- if ($[19] !== search) {
122
+ if ($[20] !== search) {
119
123
  t6 = (e) => {
120
124
  if (e.key === "Escape" || e.key === "Backspace" && !search) {
121
125
  e.preventDefault();
122
126
  studioStore.send({ type: "popCommandPalettePage" });
123
127
  }
124
128
  };
125
- $[19] = search;
126
- $[20] = t6;
127
- } else t6 = $[20];
129
+ $[20] = search;
130
+ $[21] = t6;
131
+ } else t6 = $[21];
128
132
  let t7;
129
- if ($[21] !== search || $[22] !== t6) {
133
+ if ($[22] !== search || $[23] !== t6) {
130
134
  t7 = /* @__PURE__ */ jsx(CommandInput, {
131
135
  value: search,
132
136
  onValueChange: setSearch,
133
137
  placeholder: "Type a command or search...",
134
138
  onKeyDown: t6
135
139
  });
136
- $[21] = search;
137
- $[22] = t6;
138
- $[23] = t7;
139
- } else t7 = $[23];
140
+ $[22] = search;
141
+ $[23] = t6;
142
+ $[24] = t7;
143
+ } else t7 = $[24];
140
144
  let t8;
141
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
145
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
142
146
  t8 = /* @__PURE__ */ jsx(CommandEmpty, { children: "No results found." });
143
- $[24] = t8;
144
- } else t8 = $[24];
147
+ $[25] = t8;
148
+ } else t8 = $[25];
145
149
  let t9;
146
- if ($[25] !== groupedActions || $[26] !== handleSelect) {
150
+ if ($[26] !== groupedActions || $[27] !== handleSelect) {
147
151
  t9 = /* @__PURE__ */ jsxs(CommandList, { children: [t8, Array.from(groupedActions.entries()).map((t10) => {
148
152
  const [groupLabel_0, groupActions] = t10;
149
153
  return /* @__PURE__ */ jsx(CommandGroup, {
@@ -155,33 +159,33 @@ function CommandPalette() {
155
159
  }, action_2.id))
156
160
  }, groupLabel_0);
157
161
  })] });
158
- $[25] = groupedActions;
159
- $[26] = handleSelect;
160
- $[27] = t9;
161
- } else t9 = $[27];
162
+ $[26] = groupedActions;
163
+ $[27] = handleSelect;
164
+ $[28] = t9;
165
+ } else t9 = $[28];
162
166
  let t10;
163
- if ($[28] !== t7 || $[29] !== t9 || $[30] !== value) {
167
+ if ($[29] !== t7 || $[30] !== t9 || $[31] !== value) {
164
168
  t10 = /* @__PURE__ */ jsxs(Command, {
165
169
  value,
166
170
  onValueChange: setValue,
167
171
  children: [t7, t9]
168
172
  });
169
- $[28] = t7;
170
- $[29] = t9;
171
- $[30] = value;
172
- $[31] = t10;
173
- } else t10 = $[31];
173
+ $[29] = t7;
174
+ $[30] = t9;
175
+ $[31] = value;
176
+ $[32] = t10;
177
+ } else t10 = $[32];
174
178
  let t11;
175
- if ($[32] !== isOpen || $[33] !== t10) {
179
+ if ($[33] !== isOpen || $[34] !== t10) {
176
180
  t11 = /* @__PURE__ */ jsx(CommandDialog, {
177
181
  open: isOpen,
178
182
  onOpenChange: handleOpenChange,
179
183
  children: t10
180
184
  });
181
- $[32] = isOpen;
182
- $[33] = t10;
183
- $[34] = t11;
184
- } else t11 = $[34];
185
+ $[33] = isOpen;
186
+ $[34] = t10;
187
+ $[35] = t11;
188
+ } else t11 = $[35];
185
189
  return t11;
186
190
  }
187
191
  function _temp3(state_1) {
@@ -194,12 +198,16 @@ function _temp(state) {
194
198
  return state.context.isCommandPaletteOpen;
195
199
  }
196
200
  function useCommandPaletteActions() {
197
- const $ = c(1);
201
+ const $ = c(2);
202
+ if ($[0] !== "b0ad4f19a3dc6d4a4fe7526b8e36e81edac4d14fbd285a6f9072557a7161c92c") {
203
+ for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
204
+ $[0] = "b0ad4f19a3dc6d4a4fe7526b8e36e81edac4d14fbd285a6f9072557a7161c92c";
205
+ }
198
206
  let t0;
199
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
207
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
200
208
  t0 = [];
201
- $[0] = t0;
202
- } else t0 = $[0];
209
+ $[1] = t0;
210
+ } else t0 = $[1];
203
211
  React.useEffect(_temp7, t0);
204
212
  }
205
213
  function _temp7() {
@@ -10,13 +10,17 @@ import * as React from "react";
10
10
  * Hook that listens for global keyboard shortcuts defined in the actionsStore
11
11
  */
12
12
  function useAdminShortcuts() {
13
- const $ = c(3);
13
+ const $ = c(4);
14
+ if ($[0] !== "2b8dd3469466f90598b3d7b0455afcd6bdaf343cac010c363cd2e2e8b07e4754") {
15
+ for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
16
+ $[0] = "2b8dd3469466f90598b3d7b0455afcd6bdaf343cac010c363cd2e2e8b07e4754";
17
+ }
14
18
  const actions = useSelector(actionsStore, _temp);
15
19
  const previousLockState = React.useRef(null);
16
20
  const lockKeyDownTime = React.useRef(null);
17
21
  let t0;
18
22
  let t1;
19
- if ($[0] !== actions) {
23
+ if ($[1] !== actions) {
20
24
  t0 = () => {
21
25
  const handleKeyDown = (event) => {
22
26
  if (event.key.toLowerCase() === "l" && !event.metaKey && !event.altKey && !event.shiftKey) {
@@ -84,12 +88,12 @@ function useAdminShortcuts() {
84
88
  };
85
89
  };
86
90
  t1 = [actions];
87
- $[0] = actions;
88
- $[1] = t0;
89
- $[2] = t1;
91
+ $[1] = actions;
92
+ $[2] = t0;
93
+ $[3] = t1;
90
94
  } else {
91
- t0 = $[1];
92
- t1 = $[2];
95
+ t0 = $[2];
96
+ t1 = $[3];
93
97
  }
94
98
  React.useEffect(t0, t1);
95
99
  }
@@ -142,12 +142,16 @@ function createPageHead(camoxApp) {
142
142
  };
143
143
  }
144
144
  const PageRouteComponent = () => {
145
- const $ = c(1);
145
+ const $ = c(2);
146
+ if ($[0] !== "868ae726f7b5958b542919849be1144cc4a493498385015b5825d8132609202a") {
147
+ for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
148
+ $[0] = "868ae726f7b5958b542919849be1144cc4a493498385015b5825d8132609202a";
149
+ }
146
150
  let t0;
147
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
151
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
148
152
  t0 = /* @__PURE__ */ jsx(CamoxPreview, { children: /* @__PURE__ */ jsx(PageContent, {}) });
149
- $[0] = t0;
150
- } else t0 = $[0];
153
+ $[1] = t0;
154
+ } else t0 = $[1];
151
155
  return t0;
152
156
  };
153
157
 
@@ -7,14 +7,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/features/studio/CamoxStudio.tsx
9
9
  const CamoxStudio = (t0) => {
10
- const $ = c(9);
10
+ const $ = c(10);
11
+ if ($[0] !== "974cf0d1f779b675cbbe8c8d600e9d789e2718cb2b7aaea29f2828cbe4b25895") {
12
+ for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
13
+ $[0] = "974cf0d1f779b675cbbe8c8d600e9d789e2718cb2b7aaea29f2828cbe4b25895";
14
+ }
11
15
  const { children } = t0;
12
16
  const { isAuthenticated, isLoading: isLoadingAuth } = useAuthState();
13
17
  const { pathname } = useLocation();
14
18
  const signInRedirect = useSignInRedirect();
15
19
  let t1;
16
20
  let t2;
17
- if ($[0] !== isAuthenticated || $[1] !== isLoadingAuth || $[2] !== signInRedirect) {
21
+ if ($[1] !== isAuthenticated || $[2] !== isLoadingAuth || $[3] !== signInRedirect) {
18
22
  t1 = () => {
19
23
  if (!isAuthenticated && !isLoadingAuth) signInRedirect();
20
24
  };
@@ -23,39 +27,39 @@ const CamoxStudio = (t0) => {
23
27
  isLoadingAuth,
24
28
  signInRedirect
25
29
  ];
26
- $[0] = isAuthenticated;
27
- $[1] = isLoadingAuth;
28
- $[2] = signInRedirect;
29
- $[3] = t1;
30
- $[4] = t2;
30
+ $[1] = isAuthenticated;
31
+ $[2] = isLoadingAuth;
32
+ $[3] = signInRedirect;
33
+ $[4] = t1;
34
+ $[5] = t2;
31
35
  } else {
32
- t1 = $[3];
33
- t2 = $[4];
36
+ t1 = $[4];
37
+ t2 = $[5];
34
38
  }
35
39
  React.useEffect(t1, t2);
36
40
  if (pathname === "cmx-studio") {
37
41
  let t3;
38
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
42
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
39
43
  t3 = /* @__PURE__ */ jsx(Navigate, { to: "/" });
40
- $[5] = t3;
41
- } else t3 = $[5];
44
+ $[6] = t3;
45
+ } else t3 = $[6];
42
46
  return t3;
43
47
  }
44
48
  if (!isAuthenticated) return null;
45
49
  let t3;
46
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
50
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
47
51
  t3 = /* @__PURE__ */ jsx(Navbar, {});
48
- $[6] = t3;
49
- } else t3 = $[6];
52
+ $[7] = t3;
53
+ } else t3 = $[7];
50
54
  let t4;
51
- if ($[7] !== children) {
55
+ if ($[8] !== children) {
52
56
  t4 = /* @__PURE__ */ jsxs("div", {
53
57
  className: "bg-background flex h-screen flex-col overflow-hidden",
54
58
  children: [t3, children]
55
59
  });
56
- $[7] = children;
57
- $[8] = t4;
58
- } else t4 = $[8];
60
+ $[8] = children;
61
+ $[9] = t4;
62
+ } else t4 = $[9];
59
63
  return t4;
60
64
  };
61
65