camox 0.42.0 → 0.44.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 (99) hide show
  1. package/bin/camox.mjs +9 -1
  2. package/dist/core/components/lexical/{GradientNode.js → HighlightNode.js} +34 -34
  3. package/dist/core/components/lexical/InlineLexicalEditor.js +14 -14
  4. package/dist/core/components/lexical/InlineStylesPlugin.js +25 -9
  5. package/dist/core/components/lexical/SelectionBroadcaster.js +7 -7
  6. package/dist/core/components/lexical/SidebarLexicalEditor.js +24 -24
  7. package/dist/core/components/lexical/TextLinkPopover.js +191 -208
  8. package/dist/core/components/lexical/editorConfig.js +2 -2
  9. package/dist/core/createApp.d.ts +31 -4
  10. package/dist/core/createApp.js +2 -1
  11. package/dist/core/createBlock.js +24 -10
  12. package/dist/core/createLayout.d.ts +16 -3
  13. package/dist/core/createLayout.js +15 -15
  14. package/dist/core/derivedRoutes.js +1 -1
  15. package/dist/core/dom.d.ts +17 -0
  16. package/dist/core/dom.js +22 -0
  17. package/dist/core/editing/createEditableBlock.d.ts +135 -1
  18. package/dist/core/editing/createEditableBlock.js +209 -74
  19. package/dist/core/lib/contentType.d.ts +5 -0
  20. package/dist/core/lib/contentType.js +11 -0
  21. package/dist/core/lib/fieldTypes.js +1 -0
  22. package/dist/core/lib/iconTypes.d.ts +13 -0
  23. package/dist/core/lib/icons.d.ts +6 -0
  24. package/dist/core/lib/icons.js +130 -0
  25. package/dist/core/lib/lexicalReact.js +4 -4
  26. package/dist/core/lib/lexicalState.js +8 -8
  27. package/dist/core/lib/modifierFormats.js +2 -2
  28. package/dist/core/lib/textLinks.js +5 -2
  29. package/dist/core/lib/textStyles.d.ts +3 -3
  30. package/dist/core/lib/textStyles.js +9 -14
  31. package/dist/core/pageDestinations.js +37 -0
  32. package/dist/features/content/components/AssetCard.js +104 -68
  33. package/dist/features/og/imageResponse.node.js +11 -9
  34. package/dist/features/preview/CamoxPreview.js +148 -146
  35. package/dist/features/preview/commentsEnabled.js +2 -2
  36. package/dist/features/preview/components/AddBlockSidebar.js +1 -1
  37. package/dist/features/preview/components/AssetLightbox.js +17 -6
  38. package/dist/features/preview/components/AttachedComments.js +224 -87
  39. package/dist/features/preview/components/BlockActionsPopover.js +1 -1
  40. package/dist/features/preview/components/CommentTargetQuote.js +22 -21
  41. package/dist/features/preview/components/CreatePageModal.js +4 -4
  42. package/dist/features/preview/components/DerivedLayoutDialog.js +36 -21
  43. package/dist/features/preview/components/DerivedLayoutSidebar.js +45 -26
  44. package/dist/features/preview/components/DerivedPageInfoSidebar.js +38 -26
  45. package/dist/features/preview/components/FieldOverlayStyles.js +29 -9
  46. package/dist/features/preview/components/FieldToolbar.js +12 -12
  47. package/dist/features/preview/components/IconFieldEditor.js +231 -0
  48. package/dist/features/preview/components/ItemFieldsEditor.js +21 -14
  49. package/dist/features/preview/components/LinkFieldEditor.js +212 -209
  50. package/dist/features/preview/components/OverlayTracker.js +1 -1
  51. package/dist/features/preview/components/PageEditorSidebar.js +1 -1
  52. package/dist/features/preview/components/PageInfoSidebar.js +28 -28
  53. package/dist/features/preview/components/PagePicker.js +46 -46
  54. package/dist/features/preview/components/PageTree.js +1 -1
  55. package/dist/features/preview/components/PreviewPanel.js +1 -1
  56. package/dist/features/preview/components/PreviewToolbar.js +224 -225
  57. package/dist/features/preview/components/PublicationRow.js +8 -4
  58. package/dist/features/preview/components/SendFeedbackDialog.js +83 -0
  59. package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
  60. package/dist/features/preview/overlayHighlights.js +54 -0
  61. package/dist/features/preview/previewCommentsStore.js +54 -34
  62. package/dist/features/preview/previewSelection.js +28 -23
  63. package/dist/features/preview/publication.js +10 -0
  64. package/dist/features/preview/usePageComments.js +39 -0
  65. package/dist/features/provider/CoreCamoxProvider.js +38 -6
  66. package/dist/features/provider/LocalhostPreviewProvider.js +81 -45
  67. package/dist/features/provider/components/CommandPalette.js +35 -84
  68. package/dist/features/runtime/pageApp.js +32 -28
  69. package/dist/features/runtime/pageServer.js +4 -1
  70. package/dist/features/runtime/runtime.d.ts +2 -0
  71. package/dist/features/runtime/runtime.js +45 -21
  72. package/dist/features/studio/components/EnvironmentMenu.js +76 -63
  73. package/dist/features/studio/components/Navbar.js +53 -80
  74. package/dist/features/vite/auth.js +1 -50
  75. package/dist/features/vite/iconGeneration.js +16 -0
  76. package/dist/features/vite/layoutGeneration.js +7 -3
  77. package/dist/features/vite/vite.d.ts +4 -2
  78. package/dist/features/vite/vite.js +24 -3
  79. package/dist/hooks/use-page-destinations.js +53 -0
  80. package/dist/lib/auth.js +40 -20
  81. package/dist/lib/preview-handoff.js +13 -0
  82. package/dist/lib/queries.js +12 -1
  83. package/dist/lib/server-auth-cookie.js +21 -0
  84. package/dist/lib/use-project-room.js +5 -2
  85. package/dist/studio-overlays.css +19 -15
  86. package/dist/studio.css +1 -1
  87. package/package.json +9 -4
  88. package/skills/camox/SKILL.md +38 -9
  89. package/skills/camox/references/block-definitions.md +107 -286
  90. package/skills/camox/references/cli-common.md +16 -4
  91. package/skills/camox/references/cli-content.md +158 -0
  92. package/skills/camox/references/cli-environments.md +1 -1
  93. package/skills/camox/references/dom-integrations.md +93 -0
  94. package/skills/camox/references/field-styling.md +50 -0
  95. package/skills/camox/references/layout-definitions.md +33 -147
  96. package/skills/camox/references/routed-layouts.md +71 -0
  97. package/skills/camoxify/SKILL.md +66 -0
  98. package/skills/camox/references/cli-blocks.md +0 -78
  99. package/skills/camox/references/cli-pages.md +0 -53
@@ -1,8 +1,8 @@
1
1
  import { useNavigate } from "../../navigation/navigation.js";
2
2
  import { useProjectSlug } from "../../../lib/auth.js";
3
+ import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
3
4
  import { blockQueries, layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
4
5
  import { cn } from "../../../lib/utils.js";
5
- import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
6
  import { areCommentsEnabled } from "../commentsEnabled.js";
7
7
  import { PageLocationFieldset } from "./PageLocationFieldset.js";
8
8
  import { PageNicknameField } from "./PageNicknameField.js";
@@ -33,9 +33,9 @@ import { Switch } from "@camox/ui/switch";
33
33
  //#region src/features/preview/components/PageInfoSidebar.tsx
34
34
  const usePageMetadataData = (pageId) => {
35
35
  const $ = c(32);
36
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
36
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
37
37
  for (let $i = 0; $i < 32; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
38
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
38
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
39
39
  }
40
40
  const projectSlug = useProjectSlug();
41
41
  const camoxApp = useCamoxApp();
@@ -91,7 +91,7 @@ const usePageMetadataData = (pageId) => {
91
91
  const { data: allLayouts } = useQuery(t7);
92
92
  let t8;
93
93
  if ($[15] !== allLayouts || $[16] !== camoxApp) {
94
- t8 = allLayouts?.filter((layout) => camoxApp.getLayoutById(layout.layoutId)?._internal.kind !== "derived");
94
+ t8 = allLayouts?.filter((layout) => camoxApp.getLayoutById(layout.layoutId)?._internal.kind === "curated");
95
95
  $[15] = allLayouts;
96
96
  $[16] = camoxApp;
97
97
  $[17] = t8;
@@ -142,9 +142,9 @@ const usePageMetadataData = (pageId) => {
142
142
  };
143
143
  const PageInfoSidebar = (t0) => {
144
144
  const $ = c(69);
145
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
145
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
146
146
  for (let $i = 0; $i < 69; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
147
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
147
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
148
148
  }
149
149
  const { pageId, scrollable: t1, aboutOnly: t2 } = t0;
150
150
  const scrollable = t1 === void 0 ? true : t1;
@@ -436,9 +436,9 @@ const PageInfoSidebar = (t0) => {
436
436
  };
437
437
  const PageNicknameSidebarEditor = (t0) => {
438
438
  const $ = c(21);
439
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
439
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
440
440
  for (let $i = 0; $i < 21; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
441
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
441
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
442
442
  }
443
443
  const { data } = t0;
444
444
  const { page } = data;
@@ -534,9 +534,9 @@ const PageNicknameSidebarEditor = (t0) => {
534
534
  };
535
535
  const PageLayoutSidebarSelect = (t0) => {
536
536
  const $ = c(29);
537
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
537
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
538
538
  for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
539
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
539
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
540
540
  }
541
541
  const { data } = t0;
542
542
  const { page, layouts, camoxApp } = data;
@@ -654,9 +654,9 @@ const PageLayoutSidebarSelect = (t0) => {
654
654
  };
655
655
  const PageStructureModal = (t0) => {
656
656
  const $ = c(10);
657
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
657
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
658
658
  for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
659
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
659
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
660
660
  }
661
661
  const { open, onOpenChange, pageId } = t0;
662
662
  const data = usePageMetadataData(pageId);
@@ -821,9 +821,9 @@ const PageStructureEditor = ({ data, includeNickname = true, includeLayout = tru
821
821
  };
822
822
  const PageSeoModal = (t0) => {
823
823
  const $ = c(8);
824
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
824
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
825
825
  for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
826
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
826
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
827
827
  }
828
828
  const { open, onOpenChange, pageId } = t0;
829
829
  let t1;
@@ -856,9 +856,9 @@ const PageSeoModal = (t0) => {
856
856
  };
857
857
  const PageSeoContent = (t0) => {
858
858
  const $ = c(6);
859
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
859
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
860
860
  for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
861
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
861
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
862
862
  }
863
863
  const { pageId } = t0;
864
864
  const { page, metaTitle, pageLayoutRecord, project } = usePageMetadataData(pageId);
@@ -883,9 +883,9 @@ const PageSeoContent = (t0) => {
883
883
  };
884
884
  const PageSeoEditor = (t0) => {
885
885
  const $ = c(43);
886
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
886
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
887
887
  for (let $i = 0; $i < 43; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
888
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
888
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
889
889
  }
890
890
  const { page, metaTitle, layoutId, projectName } = t0;
891
891
  let t1;
@@ -1053,9 +1053,9 @@ const PageSeoEditor = (t0) => {
1053
1053
  };
1054
1054
  const PageMarkdownModal = (t0) => {
1055
1055
  const $ = c(10);
1056
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1056
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
1057
1057
  for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1058
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1058
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
1059
1059
  }
1060
1060
  const { open, onOpenChange, pageId, metaTitle, metaDescription } = t0;
1061
1061
  let t1;
@@ -1094,9 +1094,9 @@ const PageMarkdownModal = (t0) => {
1094
1094
  };
1095
1095
  const PageMarkdownContent = (t0) => {
1096
1096
  const $ = c(6);
1097
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1097
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
1098
1098
  for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1099
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1099
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
1100
1100
  }
1101
1101
  const { pageId } = t0;
1102
1102
  const { page, metaTitle } = usePageMetadataData(pageId);
@@ -1129,9 +1129,9 @@ function truncateText(text, maxLen) {
1129
1129
  }
1130
1130
  const SearchEnginePreview = (t0) => {
1131
1131
  const $ = c(17);
1132
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1132
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
1133
1133
  for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1134
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1134
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
1135
1135
  }
1136
1136
  const { page, metaTitle, metaDescription } = t0;
1137
1137
  const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
@@ -1214,9 +1214,9 @@ const SearchEnginePreview = (t0) => {
1214
1214
  };
1215
1215
  const SocialPreviewSection = (t0) => {
1216
1216
  const $ = c(60);
1217
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1217
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
1218
1218
  for (let $i = 0; $i < 60; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1219
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1219
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
1220
1220
  }
1221
1221
  const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
1222
1222
  const pageMetaTitle = page.metaTitle ?? page.pathSegment;
@@ -1488,9 +1488,9 @@ const SocialPreviewSection = (t0) => {
1488
1488
  };
1489
1489
  const PageMarkdownPreview = (t0) => {
1490
1490
  const $ = c(9);
1491
- if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1491
+ if ($[0] !== "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4") {
1492
1492
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1493
- $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1493
+ $[0] = "dedb426819c8cdba3ad2706e62e75231e53c7e782fd82aca9849a8543054a0e4";
1494
1494
  }
1495
1495
  const { pageId, metaTitle, metaDescription } = t0;
1496
1496
  let t1;
@@ -1,8 +1,8 @@
1
1
  import { useLocation, useNavigate } from "../../navigation/navigation.js";
2
2
  import { useProjectSlug } from "../../../lib/auth.js";
3
+ import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
3
4
  import { layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
4
5
  import { cn } from "../../../lib/utils.js";
5
- import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
6
  import { previewStore } from "../previewStore.js";
7
7
  import { matchDerivedLayout, routeSegments } from "../../../core/derivedRoutes.js";
8
8
  import { DerivedLayoutDialog } from "./DerivedLayoutDialog.js";
@@ -23,7 +23,7 @@ const CREATE_PAGE_VALUE = "__create_page__";
23
23
  const DERIVED_LAYOUT_PREFIX = "__derived_layout__:";
24
24
  const PagePicker = () => {
25
25
  const [open, setOpen] = React.useState(false);
26
- const derivedLayouts = useCamoxApp().getLayouts().filter((layout) => layout._internal.kind === "derived");
26
+ const derivedLayouts = useCamoxApp().getLayouts().filter((layout) => layout._internal.kind !== "curated");
27
27
  const [layoutToPreview, setLayoutToPreview] = React.useState(null);
28
28
  const [pageToDelete, setPageToDelete] = React.useState(null);
29
29
  const projectSlug = useProjectSlug();
@@ -99,21 +99,21 @@ const PagePicker = () => {
99
99
  ]
100
100
  }), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
101
101
  }), /* @__PURE__ */ jsx(PopoverContent, {
102
- className: "flex h-[300px] w-[400px] flex-col p-0",
102
+ className: "w-[400px] p-0",
103
103
  align: "start",
104
104
  side: "bottom",
105
105
  children: /* @__PURE__ */ jsxs(Command, {
106
- className: "flex flex-1 flex-col overflow-hidden",
106
+ className: "h-auto",
107
107
  children: [
108
108
  /* @__PURE__ */ jsx(CommandInput, {
109
109
  placeholder: "Search page...",
110
110
  className: "h-9"
111
111
  }),
112
- /* @__PURE__ */ jsxs(CommandList, {
113
- className: "flex-1 overflow-y-auto",
114
- children: [
115
- /* @__PURE__ */ jsx(CommandEmpty, { children: "No page found." }),
116
- /* @__PURE__ */ jsx(CommandGroup, { children: pages.map((page_1) => /* @__PURE__ */ jsxs(CommandItem, {
112
+ /* @__PURE__ */ jsxs(CommandList, { children: [
113
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "No page found." }),
114
+ /* @__PURE__ */ jsx(CommandGroup, {
115
+ heading: "Curated pages",
116
+ children: pages.map((page_1) => /* @__PURE__ */ jsxs(CommandItem, {
117
117
  value: page_1.fullPath,
118
118
  className: "group/item justify-between",
119
119
  hideCheck: true,
@@ -182,45 +182,45 @@ const PagePicker = () => {
182
182
  children: /* @__PURE__ */ jsx(Trash2, { className: "size-4" })
183
183
  })]
184
184
  })]
185
- }, page_1.id)) }),
186
- derivedLayouts.length > 0 && /* @__PURE__ */ jsx(CommandGroup, {
187
- heading: "Derived pages",
188
- children: derivedLayouts.map((layout_1) => /* @__PURE__ */ jsx(CommandItem, {
189
- value: `${DERIVED_LAYOUT_PREFIX}${layout_1._internal.id}`,
190
- keywords: [layout_1._internal.title],
191
- hideCheck: true,
192
- onSelect: () => {
193
- closePopover();
194
- const segments = routeSegments(layout_1._internal.id);
195
- if (!segments.some((segment) => segment.startsWith("$"))) {
196
- navigate({ to: `/${segments.map(encodeURIComponent).join("/")}` });
197
- return;
198
- }
199
- setLayoutToPreview(layout_1);
200
- },
201
- children: /* @__PURE__ */ jsxs("div", {
202
- className: "flex min-w-0 flex-1 items-start gap-2",
203
- children: [/* @__PURE__ */ jsx(Check, { className: cn("size-4 mt-0.5 shrink-0", currentDerived?.layout._internal.id !== layout_1._internal.id && "invisible") }), /* @__PURE__ */ jsxs("div", {
204
- className: "flex min-w-0 flex-col",
205
- children: [/* @__PURE__ */ jsxs("div", {
206
- className: "flex min-w-0 items-center gap-1.5",
207
- children: [/* @__PURE__ */ jsx("p", {
208
- className: "truncate",
209
- children: layout_1._internal.title
210
- }), layoutStatusById.has(layout_1._internal.id) && /* @__PURE__ */ jsx(PageStatusBadge, {
211
- size: "sm",
212
- status: layoutStatusById.get(layout_1._internal.id)
213
- })]
214
- }), /* @__PURE__ */ jsxs("p", {
215
- className: "text-muted-foreground truncate font-mono text-xs",
216
- children: ["/", routeSegments(layout_1._internal.id).join("/")]
185
+ }, page_1.id))
186
+ }),
187
+ ["singleton", "derived"].map((kind) => /* @__PURE__ */ jsx(CommandGroup, {
188
+ heading: kind === "singleton" ? "Singleton pages" : "Derived pages",
189
+ children: derivedLayouts.filter((layout_1) => layout_1._internal.kind === kind).map((layout_2) => /* @__PURE__ */ jsx(CommandItem, {
190
+ value: `${DERIVED_LAYOUT_PREFIX}${layout_2._internal.id}`,
191
+ keywords: [layout_2._internal.title],
192
+ hideCheck: true,
193
+ onSelect: () => {
194
+ closePopover();
195
+ const segments = routeSegments(layout_2._internal.id);
196
+ if (!segments.some((segment) => segment.startsWith("$"))) {
197
+ navigate({ to: `/${segments.map(encodeURIComponent).join("/")}` });
198
+ return;
199
+ }
200
+ setLayoutToPreview(layout_2);
201
+ },
202
+ children: /* @__PURE__ */ jsxs("div", {
203
+ className: "flex min-w-0 flex-1 items-start gap-2",
204
+ children: [/* @__PURE__ */ jsx(Check, { className: cn("size-4 mt-0.5 shrink-0", currentDerived?.layout._internal.id !== layout_2._internal.id && "invisible") }), /* @__PURE__ */ jsxs("div", {
205
+ className: "flex min-w-0 flex-col",
206
+ children: [/* @__PURE__ */ jsxs("div", {
207
+ className: "flex min-w-0 items-center gap-1.5",
208
+ children: [/* @__PURE__ */ jsx("p", {
209
+ className: "truncate",
210
+ children: layout_2._internal.title
211
+ }), layoutStatusById.has(layout_2._internal.id) && /* @__PURE__ */ jsx(PageStatusBadge, {
212
+ size: "sm",
213
+ status: layoutStatusById.get(layout_2._internal.id)
217
214
  })]
215
+ }), /* @__PURE__ */ jsxs("p", {
216
+ className: "text-muted-foreground truncate font-mono text-xs",
217
+ children: ["/", routeSegments(layout_2._internal.id).join("/")]
218
218
  })]
219
- })
220
- }, layout_1._internal.id))
221
- })
222
- ]
223
- }),
219
+ })]
220
+ })
221
+ }, layout_2._internal.id))
222
+ }, kind))
223
+ ] }),
224
224
  /* @__PURE__ */ jsx(CommandSeparator, {}),
225
225
  /* @__PURE__ */ jsx(CommandGroup, {
226
226
  className: "shrink-0 pt-2",
@@ -1,6 +1,6 @@
1
1
  import { usePageBlocks } from "../../../lib/normalized-data.js";
2
- import { cn } from "../../../lib/utils.js";
3
2
  import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
3
+ import { cn } from "../../../lib/utils.js";
4
4
  import { previewStore, selectPreviewSource } from "../previewStore.js";
5
5
  import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
6
6
  import { useUpdateBlockPosition } from "./useUpdateBlockPosition.js";
@@ -5,9 +5,9 @@ import { areCommentsEnabled } from "../commentsEnabled.js";
5
5
  import { previewStore, selectIsCommentMode, selectIsEditMode } from "../previewStore.js";
6
6
  import { useBlockActionsShortcuts } from "./BlockActionsPopover.js";
7
7
  import { PreviewPageContext } from "../previewSelection.js";
8
+ import { Frame, useFrame } from "./Frame.js";
8
9
  import { FieldOverlayStyles } from "./FieldOverlayStyles.js";
9
10
  import { FieldToolbar } from "./FieldToolbar.js";
10
- import { Frame, useFrame } from "./Frame.js";
11
11
  import { MobilePreviewDrawer } from "./MobilePreviewDrawer.js";
12
12
  import { Overlays } from "./Overlays.js";
13
13
  import { OverlayTracker } from "./OverlayTracker.js";