camox 0.26.0 → 0.28.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 (30) hide show
  1. package/dist/core/components/lexical/InlineLexicalEditor.js +14 -11
  2. package/dist/core/components/lexical/SidebarLexicalEditor.js +10 -7
  3. package/dist/features/preview/CamoxPreview.d.ts +1 -0
  4. package/dist/features/preview/CamoxPreview.js +507 -147
  5. package/dist/features/preview/components/AssetLightbox.js +1 -1
  6. package/dist/features/preview/components/BlockActionsPopover.js +1 -1
  7. package/dist/features/preview/components/CreatePageModal.js +23 -8
  8. package/dist/features/preview/components/FieldToolbar.js +1 -1
  9. package/dist/features/preview/components/LinkFieldEditor.js +192 -204
  10. package/dist/features/preview/components/PageContentSheet.js +1 -1
  11. package/dist/features/preview/components/PageLocationFieldset.js +3 -4
  12. package/dist/features/preview/components/{EditPageModal.js → PageMetadataModal.js} +413 -229
  13. package/dist/features/preview/components/PageNicknameField.js +69 -0
  14. package/dist/features/preview/components/PagePicker.js +21 -84
  15. package/dist/features/preview/components/PageStatusBadge.js +97 -0
  16. package/dist/features/preview/components/PreviewPanel.js +111 -117
  17. package/dist/features/preview/components/PreviewToolbar.js +4 -4
  18. package/dist/features/preview/components/PublishDialog.js +1 -1
  19. package/dist/features/preview/components/UnlinkAssetButton.js +1 -1
  20. package/dist/features/routes/pageRoute.d.ts +3 -1
  21. package/dist/features/routes/pageRoute.js +34 -11
  22. package/dist/features/studio/components/EnvironmentMenu.js +1 -1
  23. package/dist/features/studio/components/ProjectMenu.js +1 -1
  24. package/dist/features/studio/components/UserButton.js +1 -1
  25. package/dist/lib/auth.js +43 -15
  26. package/dist/lib/queries.js +1 -0
  27. package/dist/lib/utils.js +1 -11
  28. package/dist/studio.css +1 -1
  29. package/package.json +4 -4
  30. package/skills/camox-cli/SKILL.md +79 -12
@@ -12,11 +12,11 @@ import { useMutation, useQuery } from "@tanstack/react-query";
12
12
  import { useCallback, useEffect, useRef, useState } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  import { Button } from "@camox/ui/button";
15
+ import { ButtonGroup } from "@camox/ui/button-group";
15
16
  import { Switch } from "@camox/ui/switch";
16
17
  import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
17
18
  import { Check, Download, FileIcon, Info, Link, Loader2, Trash2, X } from "lucide-react";
18
19
  import { Dialog, DialogContent, DialogTitle } from "@camox/ui/dialog";
19
- import { ButtonGroup } from "@camox/ui/button-group";
20
20
 
21
21
  //#region src/features/preview/components/AssetLightbox.tsx
22
22
  function MetadataRow(t0) {
@@ -15,8 +15,8 @@ import { useMutation } from "@tanstack/react-query";
15
15
  import { useSelector } from "@xstate/store-react";
16
16
  import * as React from "react";
17
17
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
- import { Copy, Pen, Settings, Trash2 } from "lucide-react";
19
18
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
19
+ import { Copy, Pen, Settings, Trash2 } from "lucide-react";
20
20
  import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "@camox/ui/command";
21
21
 
22
22
  //#region src/features/preview/components/BlockActionsPopover.tsx
@@ -4,6 +4,7 @@ import { useProjectSlug } from "../../../lib/auth.js";
4
4
  import { layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
5
5
  import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
6
  import { PageLocationFieldset } from "./PageLocationFieldset.js";
7
+ import { PageNicknameField } from "./PageNicknameField.js";
7
8
  import { Label } from "@camox/ui/label";
8
9
  import { toast } from "@camox/ui/toaster";
9
10
  import { useMutation, useQuery } from "@tanstack/react-query";
@@ -36,6 +37,7 @@ const CreatePageModal = () => {
36
37
  const navigate = useNavigate();
37
38
  const form = useForm({
38
39
  defaultValues: {
40
+ nickname: "",
39
41
  parentPageId: void 0,
40
42
  pathSegment: "",
41
43
  layoutId: "",
@@ -47,8 +49,14 @@ const CreatePageModal = () => {
47
49
  toast.error("Project not found");
48
50
  return;
49
51
  }
52
+ const nickname = values.value.nickname.trim();
53
+ if (!nickname) {
54
+ toast.error("Page nickname is required");
55
+ return;
56
+ }
50
57
  const createPagePromise = createPage.mutateAsync({
51
58
  projectId: project.id,
59
+ nickname,
52
60
  pathSegment: values.value.pathSegment,
53
61
  parentPageId: values.value.parentPageId,
54
62
  layoutId: Number(values.value.layoutId),
@@ -94,6 +102,14 @@ const CreatePageModal = () => {
94
102
  },
95
103
  className: "-mx-1 space-y-4 overflow-y-auto px-1 py-2",
96
104
  children: [
105
+ /* @__PURE__ */ jsx(form.Field, {
106
+ name: "nickname",
107
+ children: (field) => /* @__PURE__ */ jsx(PageNicknameField, {
108
+ value: field.state.value,
109
+ onChange: field.handleChange,
110
+ autoFocus: true
111
+ })
112
+ }),
97
113
  /* @__PURE__ */ jsx(form.Field, {
98
114
  name: "parentPageId",
99
115
  children: (parentField) => /* @__PURE__ */ jsx(form.Field, {
@@ -103,22 +119,21 @@ const CreatePageModal = () => {
103
119
  onParentPageIdChange: parentField.handleChange,
104
120
  pathSegment: pathField.state.value,
105
121
  onPathSegmentChange: pathField.handleChange,
106
- pages,
107
- autoFocusPathSegment: true
122
+ pages
108
123
  })
109
124
  })
110
125
  }),
111
126
  /* @__PURE__ */ jsx(form.Field, {
112
127
  name: "layoutId",
113
- children: (field) => /* @__PURE__ */ jsxs("div", {
128
+ children: (field_0) => /* @__PURE__ */ jsxs("div", {
114
129
  className: "space-y-2",
115
130
  children: [/* @__PURE__ */ jsx(Label, {
116
131
  htmlFor: "layoutId",
117
132
  children: "Layout"
118
133
  }), /* @__PURE__ */ jsxs(Select, {
119
- value: field.state.value,
134
+ value: field_0.state.value,
120
135
  onValueChange: (value_0) => {
121
- if (value_0 != null) field.handleChange(value_0);
136
+ if (value_0 != null) field_0.handleChange(value_0);
122
137
  },
123
138
  disabled: layouts != null && layouts.length <= 1,
124
139
  items: layouts?.map((t) => ({
@@ -134,7 +149,7 @@ const CreatePageModal = () => {
134
149
  }),
135
150
  /* @__PURE__ */ jsx(form.Field, {
136
151
  name: "contentDescription",
137
- children: (field_0) => /* @__PURE__ */ jsxs("div", {
152
+ children: (field_1) => /* @__PURE__ */ jsxs("div", {
138
153
  className: "space-y-2",
139
154
  children: [
140
155
  /* @__PURE__ */ jsx(Label, {
@@ -143,8 +158,8 @@ const CreatePageModal = () => {
143
158
  }),
144
159
  /* @__PURE__ */ jsx(Textarea, {
145
160
  id: "contentDescription",
146
- value: field_0.state.value,
147
- onChange: (e_0) => field_0.handleChange(e_0.target.value),
161
+ value: field_1.state.value,
162
+ onChange: (e_0) => field_1.handleChange(e_0.target.value),
148
163
  placeholder: "What your page will be about"
149
164
  }),
150
165
  /* @__PURE__ */ jsx("p", {
@@ -11,9 +11,9 @@ 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";
14
+ import { ButtonGroup } from "@camox/ui/button-group";
14
15
  import * as Tooltip$1 from "@camox/ui/tooltip";
15
16
  import { Bold, CircleMinus, CirclePlus, Italic } from "lucide-react";
16
- import { ButtonGroup } from "@camox/ui/button-group";
17
17
  import { FloatingToolbar } from "@camox/ui/floating-toolbar";
18
18
  import { Toggle } from "@camox/ui/toggle";
19
19
 
@@ -1,6 +1,6 @@
1
1
  import { useProjectSlug } from "../../../lib/auth.js";
2
2
  import { pageQueries, projectQueries } from "../../../lib/queries.js";
3
- import { cn, formatPathSegment } from "../../../lib/utils.js";
3
+ import { cn } from "../../../lib/utils.js";
4
4
  import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { Input } from "@camox/ui/input";
@@ -25,10 +25,10 @@ const normalizeLinkValue = (value) => {
25
25
  return value;
26
26
  };
27
27
  const LinkFieldEditor = (t0) => {
28
- const $ = c(79);
29
- if ($[0] !== "95e7177e7020f25e169b343158727482bdf3b88263993823abf2f5febed7d12e") {
30
- for (let $i = 0; $i < 79; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
31
- $[0] = "95e7177e7020f25e169b343158727482bdf3b88263993823abf2f5febed7d12e";
28
+ const $ = c(74);
29
+ if ($[0] !== "d6e76ca161ece5e3c3ab2fca39477fdbca4669ce2a59cab1e307374e6d56bc57") {
30
+ for (let $i = 0; $i < 74; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
31
+ $[0] = "d6e76ca161ece5e3c3ab2fca39477fdbca4669ce2a59cab1e307374e6d56bc57";
32
32
  }
33
33
  const { fieldName, linkValue: rawLinkValue, onSave } = t0;
34
34
  let t1;
@@ -104,124 +104,128 @@ const LinkFieldEditor = (t0) => {
104
104
  } else t9 = $[18];
105
105
  const { data: pages } = useQuery(t9);
106
106
  let t10;
107
+ if ($[19] !== linkValue.pageId || $[20] !== linkValue.type || $[21] !== pages) {
108
+ t10 = linkValue.type === "page" ? pages?.find((p) => String(p.id) === linkValue.pageId) : null;
109
+ $[19] = linkValue.pageId;
110
+ $[20] = linkValue.type;
111
+ $[21] = pages;
112
+ $[22] = t10;
113
+ } else t10 = $[22];
114
+ const selectedPage = t10;
107
115
  let t11;
108
- let t12;
109
- let t13;
110
- let t14;
111
- let t15;
112
- if ($[19] !== fieldName || $[20] !== hrefField || $[21] !== linkValue.pageId || $[22] !== linkValue.type || $[23] !== onSave || $[24] !== pagePickerOpen || $[25] !== pages || $[26] !== textField) {
113
- const selectedPage = linkValue.type === "page" ? pages?.find((p) => String(p.id) === linkValue.pageId) : null;
114
- let t16;
115
- if ($[33] !== fieldName || $[34] !== onSave) {
116
- t16 = (mode) => {
117
- if (mode === "page") onSave(fieldName, {
118
- type: "page",
119
- text: linkValueRef.current.text,
120
- pageId: "",
121
- newTab: linkValueRef.current.newTab
122
- });
123
- else onSave(fieldName, {
124
- type: "external",
125
- text: linkValueRef.current.text,
126
- href: "",
127
- newTab: linkValueRef.current.newTab
128
- });
129
- };
130
- $[33] = fieldName;
131
- $[34] = onSave;
132
- $[35] = t16;
133
- } else t16 = $[35];
134
- const handleModeChange = t16;
135
- let t17;
136
- if ($[36] !== fieldName || $[37] !== onSave) {
137
- t17 = (pageId) => {
138
- onSave(fieldName, {
139
- type: "page",
140
- text: linkValueRef.current.text,
141
- pageId,
142
- newTab: linkValueRef.current.newTab
143
- });
144
- setPagePickerOpen(false);
145
- };
146
- $[36] = fieldName;
147
- $[37] = onSave;
148
- $[38] = t17;
149
- } else t17 = $[38];
150
- const handlePageSelect = t17;
151
- t14 = "grid gap-3";
152
- const t18 = `${fieldName}-text`;
153
- let t19;
154
- if ($[39] !== t18) {
155
- t19 = /* @__PURE__ */ jsx(Label, {
156
- htmlFor: t18,
157
- children: "Text"
158
- });
159
- $[39] = t18;
160
- $[40] = t19;
161
- } else t19 = $[40];
162
- const t20 = `${fieldName}-text`;
163
- let t21;
164
- if ($[41] !== textField) {
165
- t21 = (e) => textField.setValue(e.target.value);
166
- $[41] = textField;
167
- $[42] = t21;
168
- } else t21 = $[42];
169
- let t22;
170
- if ($[43] !== t20 || $[44] !== t21 || $[45] !== textField.onBlur || $[46] !== textField.onFocus || $[47] !== textField.value) {
171
- t22 = /* @__PURE__ */ jsx(Input, {
172
- id: t20,
173
- value: textField.value,
174
- onChange: t21,
175
- onFocus: textField.onFocus,
176
- onBlur: textField.onBlur,
177
- autoFocus: true
178
- });
179
- $[43] = t20;
180
- $[44] = t21;
181
- $[45] = textField.onBlur;
182
- $[46] = textField.onFocus;
183
- $[47] = textField.value;
184
- $[48] = t22;
185
- } else t22 = $[48];
186
- if ($[49] !== t19 || $[50] !== t22) {
187
- t15 = /* @__PURE__ */ jsxs("div", {
188
- className: "grid gap-1.5",
189
- children: [t19, t22]
116
+ if ($[23] !== fieldName || $[24] !== onSave) {
117
+ t11 = (mode) => {
118
+ if (mode === "page") onSave(fieldName, {
119
+ type: "page",
120
+ text: linkValueRef.current.text,
121
+ pageId: "",
122
+ newTab: linkValueRef.current.newTab
190
123
  });
191
- $[49] = t19;
192
- $[50] = t22;
193
- $[51] = t15;
194
- } else t15 = $[51];
195
- t10 = "grid gap-1.5";
196
- if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
197
- t11 = /* @__PURE__ */ jsx(Label, { children: "Destination" });
198
- $[52] = t11;
199
- } else t11 = $[52];
200
- let t23;
201
- if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
202
- t23 = /* @__PURE__ */ jsxs(TabsList, {
203
- className: "w-full",
204
- children: [/* @__PURE__ */ jsx(TabsTrigger, {
205
- value: "page",
206
- children: "Page"
207
- }), /* @__PURE__ */ jsx(TabsTrigger, {
208
- value: "external",
209
- children: "URL"
210
- })]
124
+ else onSave(fieldName, {
125
+ type: "external",
126
+ text: linkValueRef.current.text,
127
+ href: "",
128
+ newTab: linkValueRef.current.newTab
211
129
  });
212
- $[53] = t23;
213
- } else t23 = $[53];
214
- if ($[54] !== handleModeChange || $[55] !== linkValue.type) {
215
- t12 = /* @__PURE__ */ jsx(Tabs, {
216
- value: linkValue.type,
217
- onValueChange: handleModeChange,
218
- children: t23
130
+ };
131
+ $[23] = fieldName;
132
+ $[24] = onSave;
133
+ $[25] = t11;
134
+ } else t11 = $[25];
135
+ const handleModeChange = t11;
136
+ let t12;
137
+ if ($[26] !== fieldName || $[27] !== onSave) {
138
+ t12 = (pageId) => {
139
+ onSave(fieldName, {
140
+ type: "page",
141
+ text: linkValueRef.current.text,
142
+ pageId,
143
+ newTab: linkValueRef.current.newTab
219
144
  });
220
- $[54] = handleModeChange;
221
- $[55] = linkValue.type;
222
- $[56] = t12;
223
- } else t12 = $[56];
224
- t13 = linkValue.type === "page" ? /* @__PURE__ */ jsxs(Popover, {
145
+ setPagePickerOpen(false);
146
+ };
147
+ $[26] = fieldName;
148
+ $[27] = onSave;
149
+ $[28] = t12;
150
+ } else t12 = $[28];
151
+ const handlePageSelect = t12;
152
+ const t13 = `${fieldName}-text`;
153
+ let t14;
154
+ if ($[29] !== t13) {
155
+ t14 = /* @__PURE__ */ jsx(Label, {
156
+ htmlFor: t13,
157
+ children: "Text"
158
+ });
159
+ $[29] = t13;
160
+ $[30] = t14;
161
+ } else t14 = $[30];
162
+ const t15 = `${fieldName}-text`;
163
+ let t16;
164
+ if ($[31] !== textField) {
165
+ t16 = (e) => textField.setValue(e.target.value);
166
+ $[31] = textField;
167
+ $[32] = t16;
168
+ } else t16 = $[32];
169
+ let t17;
170
+ if ($[33] !== t15 || $[34] !== t16 || $[35] !== textField.onBlur || $[36] !== textField.onFocus || $[37] !== textField.value) {
171
+ t17 = /* @__PURE__ */ jsx(Input, {
172
+ id: t15,
173
+ value: textField.value,
174
+ onChange: t16,
175
+ onFocus: textField.onFocus,
176
+ onBlur: textField.onBlur,
177
+ autoFocus: true
178
+ });
179
+ $[33] = t15;
180
+ $[34] = t16;
181
+ $[35] = textField.onBlur;
182
+ $[36] = textField.onFocus;
183
+ $[37] = textField.value;
184
+ $[38] = t17;
185
+ } else t17 = $[38];
186
+ let t18;
187
+ if ($[39] !== t14 || $[40] !== t17) {
188
+ t18 = /* @__PURE__ */ jsxs("div", {
189
+ className: "grid gap-1.5",
190
+ children: [t14, t17]
191
+ });
192
+ $[39] = t14;
193
+ $[40] = t17;
194
+ $[41] = t18;
195
+ } else t18 = $[41];
196
+ let t19;
197
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
198
+ t19 = /* @__PURE__ */ jsx(Label, { children: "Destination" });
199
+ $[42] = t19;
200
+ } else t19 = $[42];
201
+ let t20;
202
+ if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
203
+ t20 = /* @__PURE__ */ jsxs(TabsList, {
204
+ className: "w-full",
205
+ children: [/* @__PURE__ */ jsx(TabsTrigger, {
206
+ value: "page",
207
+ children: "Page"
208
+ }), /* @__PURE__ */ jsx(TabsTrigger, {
209
+ value: "external",
210
+ children: "URL"
211
+ })]
212
+ });
213
+ $[43] = t20;
214
+ } else t20 = $[43];
215
+ let t21;
216
+ if ($[44] !== handleModeChange || $[45] !== linkValue.type) {
217
+ t21 = /* @__PURE__ */ jsx(Tabs, {
218
+ value: linkValue.type,
219
+ onValueChange: handleModeChange,
220
+ children: t20
221
+ });
222
+ $[44] = handleModeChange;
223
+ $[45] = linkValue.type;
224
+ $[46] = t21;
225
+ } else t21 = $[46];
226
+ let t22;
227
+ if ($[47] !== fieldName || $[48] !== handlePageSelect || $[49] !== hrefField || $[50] !== linkValue.type || $[51] !== pagePickerOpen || $[52] !== pages || $[53] !== selectedPage) {
228
+ t22 = linkValue.type === "page" ? /* @__PURE__ */ jsxs(Popover, {
225
229
  open: pagePickerOpen,
226
230
  onOpenChange: setPagePickerOpen,
227
231
  children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
@@ -232,7 +236,7 @@ const LinkFieldEditor = (t0) => {
232
236
  }),
233
237
  children: [selectedPage ? /* @__PURE__ */ jsx("span", {
234
238
  className: "truncate",
235
- children: selectedPage.metaTitle ?? formatPathSegment(selectedPage.pathSegment)
239
+ children: selectedPage.nickname
236
240
  }) : /* @__PURE__ */ jsx("span", {
237
241
  className: "text-muted-foreground",
238
242
  children: "Select a page"
@@ -248,7 +252,7 @@ const LinkFieldEditor = (t0) => {
248
252
  onSelect: () => handlePageSelect(String(page.id)),
249
253
  children: [/* @__PURE__ */ jsx(Check, { className: cn("mr-2 size-4", selectedPage?.id === page.id ? "opacity-100" : "opacity-0") }), /* @__PURE__ */ jsxs("div", {
250
254
  className: "flex flex-col",
251
- children: [/* @__PURE__ */ jsx("span", { children: page.metaTitle ?? formatPathSegment(page.pathSegment) }), /* @__PURE__ */ jsx("span", {
255
+ children: [/* @__PURE__ */ jsx("span", { children: page.nickname }), /* @__PURE__ */ jsx("span", {
252
256
  className: "text-muted-foreground font-mono text-xs",
253
257
  children: page.fullPath
254
258
  })]
@@ -264,106 +268,90 @@ const LinkFieldEditor = (t0) => {
264
268
  onFocus: hrefField.onFocus,
265
269
  onBlur: hrefField.onBlur
266
270
  });
267
- $[19] = fieldName;
268
- $[20] = hrefField;
269
- $[21] = linkValue.pageId;
270
- $[22] = linkValue.type;
271
- $[23] = onSave;
272
- $[24] = pagePickerOpen;
273
- $[25] = pages;
274
- $[26] = textField;
275
- $[27] = t10;
276
- $[28] = t11;
277
- $[29] = t12;
278
- $[30] = t13;
279
- $[31] = t14;
280
- $[32] = t15;
281
- } else {
282
- t10 = $[27];
283
- t11 = $[28];
284
- t12 = $[29];
285
- t13 = $[30];
286
- t14 = $[31];
287
- t15 = $[32];
288
- }
289
- let t16;
290
- if ($[57] !== t10 || $[58] !== t11 || $[59] !== t12 || $[60] !== t13) {
291
- t16 = /* @__PURE__ */ jsxs("div", {
292
- className: t10,
271
+ $[47] = fieldName;
272
+ $[48] = handlePageSelect;
273
+ $[49] = hrefField;
274
+ $[50] = linkValue.type;
275
+ $[51] = pagePickerOpen;
276
+ $[52] = pages;
277
+ $[53] = selectedPage;
278
+ $[54] = t22;
279
+ } else t22 = $[54];
280
+ let t23;
281
+ if ($[55] !== t21 || $[56] !== t22) {
282
+ t23 = /* @__PURE__ */ jsxs("div", {
283
+ className: "grid gap-1.5",
293
284
  children: [
294
- t11,
295
- t12,
296
- t13
285
+ t19,
286
+ t21,
287
+ t22
297
288
  ]
298
289
  });
299
- $[57] = t10;
300
- $[58] = t11;
301
- $[59] = t12;
302
- $[60] = t13;
303
- $[61] = t16;
304
- } else t16 = $[61];
305
- const t17 = `${fieldName}-newtab`;
306
- let t18;
307
- if ($[62] !== fieldName || $[63] !== onSave) {
308
- t18 = (checked) => {
290
+ $[55] = t21;
291
+ $[56] = t22;
292
+ $[57] = t23;
293
+ } else t23 = $[57];
294
+ const t24 = `${fieldName}-newtab`;
295
+ let t25;
296
+ if ($[58] !== fieldName || $[59] !== onSave) {
297
+ t25 = (checked) => {
309
298
  onSave(fieldName, {
310
299
  ...linkValueRef.current,
311
300
  newTab: checked
312
301
  });
313
302
  };
314
- $[62] = fieldName;
315
- $[63] = onSave;
316
- $[64] = t18;
317
- } else t18 = $[64];
318
- let t19;
319
- if ($[65] !== linkValue.newTab || $[66] !== t17 || $[67] !== t18) {
320
- t19 = /* @__PURE__ */ jsx(Switch, {
321
- id: t17,
303
+ $[58] = fieldName;
304
+ $[59] = onSave;
305
+ $[60] = t25;
306
+ } else t25 = $[60];
307
+ let t26;
308
+ if ($[61] !== linkValue.newTab || $[62] !== t24 || $[63] !== t25) {
309
+ t26 = /* @__PURE__ */ jsx(Switch, {
310
+ id: t24,
322
311
  checked: linkValue.newTab,
323
- onCheckedChange: t18
312
+ onCheckedChange: t25
324
313
  });
325
- $[65] = linkValue.newTab;
326
- $[66] = t17;
327
- $[67] = t18;
328
- $[68] = t19;
329
- } else t19 = $[68];
330
- const t20 = `${fieldName}-newtab`;
331
- let t21;
332
- if ($[69] !== t20) {
333
- t21 = /* @__PURE__ */ jsx(Label, {
334
- htmlFor: t20,
314
+ $[61] = linkValue.newTab;
315
+ $[62] = t24;
316
+ $[63] = t25;
317
+ $[64] = t26;
318
+ } else t26 = $[64];
319
+ const t27 = `${fieldName}-newtab`;
320
+ let t28;
321
+ if ($[65] !== t27) {
322
+ t28 = /* @__PURE__ */ jsx(Label, {
323
+ htmlFor: t27,
335
324
  children: "Open in new tab"
336
325
  });
337
- $[69] = t20;
338
- $[70] = t21;
339
- } else t21 = $[70];
340
- let t22;
341
- if ($[71] !== t19 || $[72] !== t21) {
342
- t22 = /* @__PURE__ */ jsxs("div", {
326
+ $[65] = t27;
327
+ $[66] = t28;
328
+ } else t28 = $[66];
329
+ let t29;
330
+ if ($[67] !== t26 || $[68] !== t28) {
331
+ t29 = /* @__PURE__ */ jsxs("div", {
343
332
  className: "flex items-center gap-2",
344
- children: [t19, t21]
333
+ children: [t26, t28]
345
334
  });
346
- $[71] = t19;
347
- $[72] = t21;
348
- $[73] = t22;
349
- } else t22 = $[73];
350
- let t23;
351
- if ($[74] !== t14 || $[75] !== t15 || $[76] !== t16 || $[77] !== t22) {
352
- t23 = /* @__PURE__ */ jsxs("form", {
353
- className: t14,
335
+ $[67] = t26;
336
+ $[68] = t28;
337
+ $[69] = t29;
338
+ } else t29 = $[69];
339
+ let t30;
340
+ if ($[70] !== t18 || $[71] !== t23 || $[72] !== t29) {
341
+ t30 = /* @__PURE__ */ jsxs("form", {
342
+ className: "grid gap-3",
354
343
  children: [
355
- t15,
356
- t16,
357
- t22
344
+ t18,
345
+ t23,
346
+ t29
358
347
  ]
359
348
  });
360
- $[74] = t14;
361
- $[75] = t15;
362
- $[76] = t16;
363
- $[77] = t22;
364
- $[78] = t23;
365
- } else t23 = $[78];
366
- return t23;
349
+ $[70] = t18;
350
+ $[71] = t23;
351
+ $[72] = t29;
352
+ $[73] = t30;
353
+ } else t30 = $[73];
354
+ return t30;
367
355
  };
368
356
 
369
357
  //#endregion
@@ -19,10 +19,10 @@ import { useSelector } from "@xstate/store-react";
19
19
  import * as React from "react";
20
20
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
21
21
  import { Button } from "@camox/ui/button";
22
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@camox/ui/dropdown-menu";
22
23
  import { Switch } from "@camox/ui/switch";
23
24
  import { CircleMinus, CirclePlus, CornerLeftUp } from "lucide-react";
24
25
  import { Spinner } from "@camox/ui/spinner";
25
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@camox/ui/dropdown-menu";
26
26
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@camox/ui/select";
27
27
  import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@camox/ui/breadcrumb";
28
28
 
@@ -1,4 +1,3 @@
1
- import { formatPathSegment } from "../../../lib/utils.js";
2
1
  import { c } from "react/compiler-runtime";
3
2
  import { Label } from "@camox/ui/label";
4
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -9,9 +8,9 @@ import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "@c
9
8
  const NO_PARENT_VALUE = "__no_parent__";
10
9
  const PageLocationFieldset = (t0) => {
11
10
  const $ = c(62);
12
- if ($[0] !== "b2799a1c747cb3d8810eb257f36745e1b5fcbbfe8659b68c9d233a42301c1eca") {
11
+ if ($[0] !== "02f031bb7bf6362841b0de76209d1faf3d13d10e565f795a27672b32d20e2ce2") {
13
12
  for (let $i = 0; $i < 62; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
14
- $[0] = "b2799a1c747cb3d8810eb257f36745e1b5fcbbfe8659b68c9d233a42301c1eca";
13
+ $[0] = "02f031bb7bf6362841b0de76209d1faf3d13d10e565f795a27672b32d20e2ce2";
15
14
  }
16
15
  const { parentPageId, onParentPageIdChange, pathSegment, onPathSegmentChange, disabled, pages, excludePageId, autoFocusPathSegment } = t0;
17
16
  let t1;
@@ -237,7 +236,7 @@ function _temp(page_1) {
237
236
  value: String(page_1.id),
238
237
  children: /* @__PURE__ */ jsxs("div", {
239
238
  className: "flex flex-col items-start",
240
- children: [/* @__PURE__ */ jsx("span", { children: page_1.metaTitle ?? formatPathSegment(page_1.pathSegment) }), /* @__PURE__ */ jsx("span", {
239
+ children: [/* @__PURE__ */ jsx("span", { children: page_1.nickname }), /* @__PURE__ */ jsx("span", {
241
240
  className: "text-muted-foreground font-mono text-xs [[data-slot=select-value]_&]:hidden",
242
241
  children: page_1.fullPath
243
242
  })]