camox 0.6.0 → 0.7.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 (79) hide show
  1. package/dist/core/components/AddBlockControlBar.d.ts.map +1 -1
  2. package/dist/core/components/AddBlockControlBar.js +51 -117
  3. package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
  4. package/dist/core/components/lexical/SidebarLexicalEditor.js +1 -1
  5. package/dist/core/createApp.d.ts +314 -44
  6. package/dist/core/createApp.d.ts.map +1 -1
  7. package/dist/core/createBlock.d.ts +160 -22
  8. package/dist/core/createBlock.d.ts.map +1 -1
  9. package/dist/core/createBlock.js +467 -579
  10. package/dist/features/content/components/AssetCard.js +1 -1
  11. package/dist/features/preview/CamoxPreview.d.ts.map +1 -1
  12. package/dist/features/preview/CamoxPreview.js +12 -16
  13. package/dist/features/preview/components/AddBlockSheet.d.ts.map +1 -1
  14. package/dist/features/preview/components/AddBlockSheet.js +1 -2
  15. package/dist/features/preview/components/AssetLightbox.d.ts.map +1 -1
  16. package/dist/features/preview/components/AssetLightbox.js +13 -15
  17. package/dist/features/preview/components/BlockActionsPopover.d.ts.map +1 -1
  18. package/dist/features/preview/components/BlockActionsPopover.js +19 -22
  19. package/dist/features/preview/components/CreatePageSheet.d.ts.map +1 -1
  20. package/dist/features/preview/components/CreatePageSheet.js +10 -4
  21. package/dist/features/preview/components/EditPageSheet.d.ts +1 -1
  22. package/dist/features/preview/components/EditPageSheet.d.ts.map +1 -1
  23. package/dist/features/preview/components/EditPageSheet.js +20 -17
  24. package/dist/features/preview/components/FieldOverlayStyles.d.ts +2 -0
  25. package/dist/features/preview/components/FieldOverlayStyles.d.ts.map +1 -0
  26. package/dist/features/preview/components/FieldOverlayStyles.js +15 -0
  27. package/dist/features/preview/components/Frame.d.ts +20 -0
  28. package/dist/features/preview/components/Frame.d.ts.map +1 -0
  29. package/dist/features/preview/components/Frame.js +162 -0
  30. package/dist/features/preview/components/LinkFieldEditor.d.ts.map +1 -1
  31. package/dist/features/preview/components/LinkFieldEditor.js +11 -12
  32. package/dist/features/preview/components/OverlayTracker.js +1 -1
  33. package/dist/features/preview/components/PageContentSheet.d.ts.map +1 -1
  34. package/dist/features/preview/components/PageContentSheet.js +3 -3
  35. package/dist/features/preview/components/PageLocationFieldset.d.ts.map +1 -1
  36. package/dist/features/preview/components/PageLocationFieldset.js +9 -11
  37. package/dist/features/preview/components/PagePicker.d.ts.map +1 -1
  38. package/dist/features/preview/components/PagePicker.js +15 -15
  39. package/dist/features/preview/components/PageTree.d.ts.map +1 -1
  40. package/dist/features/preview/components/PageTree.js +215 -203
  41. package/dist/features/preview/components/PreviewPanel.d.ts.map +1 -1
  42. package/dist/features/preview/components/PreviewPanel.js +21 -15
  43. package/dist/features/preview/components/PreviewSideSheet.d.ts.map +1 -1
  44. package/dist/features/preview/components/PreviewSideSheet.js +42 -26
  45. package/dist/features/preview/components/PreviewToolbar.d.ts.map +1 -1
  46. package/dist/features/preview/components/PreviewToolbar.js +191 -171
  47. package/dist/features/preview/components/RepeatableItemsList.d.ts.map +1 -1
  48. package/dist/features/preview/components/RepeatableItemsList.js +4 -5
  49. package/dist/features/preview/components/TextFormatToolbar.d.ts.map +1 -1
  50. package/dist/features/preview/components/TextFormatToolbar.js +5 -6
  51. package/dist/features/preview/components/UnlinkAssetButton.d.ts.map +1 -1
  52. package/dist/features/preview/components/UnlinkAssetButton.js +70 -91
  53. package/dist/features/preview/studio-overlays.css?inline.js +4 -0
  54. package/dist/features/provider/components/CamoxAppContext.d.ts +314 -44
  55. package/dist/features/provider/components/CamoxAppContext.d.ts.map +1 -1
  56. package/dist/features/provider/components/CommandPalette.d.ts.map +1 -1
  57. package/dist/features/provider/components/CommandPalette.js +22 -14
  58. package/dist/features/studio/CamoxStudio.d.ts +2 -3
  59. package/dist/features/studio/CamoxStudio.d.ts.map +1 -1
  60. package/dist/features/studio/components/EnvironmentMenu.d.ts.map +1 -1
  61. package/dist/features/studio/components/EnvironmentMenu.js +39 -35
  62. package/dist/features/studio/components/Navbar.js +2 -2
  63. package/dist/features/studio/components/ProjectMenu.d.ts.map +1 -1
  64. package/dist/features/studio/components/ProjectMenu.js +143 -129
  65. package/dist/features/studio/components/UserButton.d.ts.map +1 -1
  66. package/dist/features/studio/components/UserButton.js +8 -9
  67. package/dist/features/vite/definitionsSync.d.ts.map +1 -1
  68. package/dist/features/vite/definitionsSync.js +24 -2
  69. package/dist/features/vite/vite.d.ts +2 -0
  70. package/dist/features/vite/vite.d.ts.map +1 -1
  71. package/dist/features/vite/vite.js +27 -31
  72. package/dist/lib/api-client.d.ts +17 -17
  73. package/dist/lib/queries.d.ts +7 -7
  74. package/dist/studio.css +1 -1
  75. package/package.json +5 -6
  76. package/skills/camox-block/SKILL.md +55 -28
  77. package/dist/features/preview/overlayConstants.d.ts +0 -19
  78. package/dist/features/preview/overlayConstants.d.ts.map +0 -1
  79. package/dist/features/preview/overlayConstants.js +0 -21
@@ -49,7 +49,7 @@ var AssetCard = (t0) => {
49
49
  let t8;
50
50
  if ($[10] !== extension || $[11] !== file.alt || $[12] !== file.filename || $[13] !== file.url || $[14] !== isImage) {
51
51
  t8 = /* @__PURE__ */ jsx("div", {
52
- className: "bg-muted flex aspect-4/3 w-full items-center justify-center overflow-hidden rounded-md",
52
+ className: "bg-muted flex aspect-4/3 w-full items-center justify-center overflow-hidden rounded-sm",
53
53
  children: isImage ? /* @__PURE__ */ jsx("img", {
54
54
  src: file.url,
55
55
  alt: file.alt || file.filename,
@@ -1 +1 @@
1
- {"version":3,"file":"CamoxPreview.d.ts","sourceRoot":"","sources":["../../../src/features/preview/CamoxPreview.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;EAqC/B;AA6CD,eAAO,MAAM,WAAW,+CAoHvB,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CA0FvE,CAAC;AAEF,wBAAgB,sBAAsB,SAuErC"}
1
+ {"version":3,"file":"CamoxPreview.d.ts","sourceRoot":"","sources":["../../../src/features/preview/CamoxPreview.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;EAqC/B;AA6CD,eAAO,MAAM,WAAW,+CAoHvB,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CA4FvE,CAAC;AAEF,wBAAgB,sBAAsB,SAuErC"}
@@ -3,8 +3,8 @@ import { actionsStore } from "../provider/actionsStore.js";
3
3
  import { useIsAuthenticated, useProjectSlug } from "../../lib/auth.js";
4
4
  import { getApiClient } from "../../lib/api-client.js";
5
5
  import { blockQueries, pageQueries, projectQueries } from "../../lib/queries.js";
6
- import { NormalizedDataProvider, seedBlockCaches, usePageBlocks } from "../../lib/normalized-data.js";
7
6
  import { formatPathSegment } from "../../lib/utils.js";
7
+ import { NormalizedDataProvider, seedBlockCaches, usePageBlocks } from "../../lib/normalized-data.js";
8
8
  import { useCamoxApp } from "../provider/components/CamoxAppContext.js";
9
9
  import { Navbar } from "../studio/components/Navbar.js";
10
10
  import { AddBlockSheet } from "./components/AddBlockSheet.js";
@@ -371,22 +371,18 @@ var CamoxPreview = (t0) => {
371
371
  className: "flex w-[300px] flex-col border-r-2",
372
372
  children: [/* @__PURE__ */ jsxs(PanelHeader, {
373
373
  className: "flew-row flex gap-2 px-2 py-2",
374
- children: [/* @__PURE__ */ jsx(PagePicker, {}), /* @__PURE__ */ jsxs(Tooltip, {
375
- delayDuration: 500,
376
- children: [/* @__PURE__ */ jsx(TooltipTrigger, {
377
- asChild: true,
378
- children: /* @__PURE__ */ jsx(Button, {
379
- type: "button",
380
- variant: "outline",
381
- size: "icon",
382
- onClick: () => previewStore.send({
383
- type: "openEditPageSheet",
384
- pageId: pageData.page.id
385
- }),
386
- children: /* @__PURE__ */ jsx(Info, { className: "text-muted-foreground size-4" })
374
+ children: [/* @__PURE__ */ jsx(PagePicker, {}), /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
375
+ render: /* @__PURE__ */ jsx(Button, {
376
+ type: "button",
377
+ variant: "outline",
378
+ size: "icon",
379
+ onClick: () => previewStore.send({
380
+ type: "openEditPageSheet",
381
+ pageId: pageData.page.id
387
382
  })
388
- }), /* @__PURE__ */ jsx(TooltipContent, { children: "Page metadata, SEO and markdown" })]
389
- })]
383
+ }),
384
+ children: /* @__PURE__ */ jsx(Info, { className: "text-muted-foreground size-4" })
385
+ }), /* @__PURE__ */ jsx(TooltipContent, { children: "Page metadata, SEO and markdown" })] })]
390
386
  }), /* @__PURE__ */ jsx(PanelContent, {
391
387
  className: "flex grow basis-0 flex-col gap-2 overflow-auto p-2",
392
388
  children: /* @__PURE__ */ jsx(PageTree, {})
@@ -1 +1 @@
1
- {"version":3,"file":"AddBlockSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/AddBlockSheet.tsx"],"names":[],"mappings":"AAkCA,QAAA,MAAM,aAAa,+CAqPlB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"AddBlockSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/AddBlockSheet.tsx"],"names":[],"mappings":"AAkCA,QAAA,MAAM,aAAa,+CAiPlB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -259,8 +259,7 @@ var AddBlockSheet = () => {
259
259
  if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
260
260
  t19 = /* @__PURE__ */ jsx(CommandInput, {
261
261
  placeholder: "Search blocks...",
262
- autoFocus: true,
263
- wrapperClassName: "border border-input rounded-md shadow-xs focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]"
262
+ autoFocus: true
264
263
  });
265
264
  $[31] = t19;
266
265
  } else t19 = $[31];
@@ -1 +1 @@
1
- {"version":3,"file":"AssetLightbox.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/AssetLightbox.tsx"],"names":[],"mappings":"AAuDA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,aAAa,GAAI,gCAAgC,kBAAkB,mDAsUxE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"AssetLightbox.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/AssetLightbox.tsx"],"names":[],"mappings":"AAuDA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,aAAa,GAAI,gCAAgC,kBAAkB,mDAkVxE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -195,6 +195,7 @@ var AssetLightbox = ({ open, onOpenChange, fileId }) => {
195
195
  children: /* @__PURE__ */ jsxs(DialogContent, {
196
196
  className: "h-[90vh] max-h-[90vh] w-[90vw] max-w-[90vw] gap-0 overflow-hidden p-0 sm:max-w-[90vw]",
197
197
  showCloseButton: false,
198
+ forceOverlay: true,
198
199
  children: [
199
200
  /* @__PURE__ */ jsx(DialogTitle, {
200
201
  className: "sr-only",
@@ -306,34 +307,31 @@ var AssetLightbox = ({ open, onOpenChange, fileId }) => {
306
307
  children: [
307
308
  /* @__PURE__ */ jsxs(ButtonGroup, { children: [
308
309
  /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
309
- asChild: true,
310
- children: /* @__PURE__ */ jsx(Button, {
310
+ render: /* @__PURE__ */ jsx(Button, {
311
311
  type: "button",
312
312
  variant: "outline",
313
313
  size: "icon",
314
- onClick: handleCopyUrl,
315
- children: /* @__PURE__ */ jsx(Link, {})
316
- })
314
+ onClick: handleCopyUrl
315
+ }),
316
+ children: /* @__PURE__ */ jsx(Link, {})
317
317
  }), /* @__PURE__ */ jsx(TooltipContent, { children: "Copy URL" })] }),
318
318
  /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
319
- asChild: true,
320
- children: /* @__PURE__ */ jsx(Button, {
319
+ render: /* @__PURE__ */ jsx(Button, {
321
320
  type: "button",
322
321
  variant: "outline",
323
322
  size: "icon",
324
- onClick: handleDownload,
325
- children: /* @__PURE__ */ jsx(Download, {})
326
- })
323
+ onClick: handleDownload
324
+ }),
325
+ children: /* @__PURE__ */ jsx(Download, {})
327
326
  }), /* @__PURE__ */ jsx(TooltipContent, { children: "Download" })] }),
328
327
  /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
329
- asChild: true,
330
- children: /* @__PURE__ */ jsx(Button, {
328
+ render: /* @__PURE__ */ jsx(Button, {
331
329
  type: "button",
332
330
  variant: "outline",
333
331
  size: "icon",
334
- onClick: handleDelete,
335
- children: /* @__PURE__ */ jsx(Trash2, {})
336
- })
332
+ onClick: handleDelete
333
+ }),
334
+ children: /* @__PURE__ */ jsx(Trash2, {})
337
335
  }), /* @__PURE__ */ jsx(TooltipContent, { children: "Delete" })] })
338
336
  ] }),
339
337
  /* @__PURE__ */ jsxs("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"BlockActionsPopover.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/BlockActionsPopover.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAW5E,UAAU,wBAAwB;IAChC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,QAAA,MAAM,mBAAmB,GAAI,iFAQ1B,wBAAwB,4CAiT1B,CAAC;AAQF,iBAAS,wBAAwB,SA4NhC;AAED,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"BlockActionsPopover.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/BlockActionsPopover.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,uBAAuB,CAAC;AAW5E,UAAU,wBAAwB;IAChC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,QAAA,MAAM,mBAAmB,GAAI,iFAQ1B,wBAAwB,4CA2T1B,CAAC;AAQF,iBAAS,wBAAwB,SA4NhC;AAED,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { previewStore, selectionItemId } from "../previewStore.js";
2
2
  import { actionsStore } from "../../provider/actionsStore.js";
3
3
  import { blockMutations, repeatableItemMutations } from "../../../lib/queries.js";
4
- import { usePageBlocks } from "../../../lib/normalized-data.js";
5
4
  import { formatShortcut } from "../../../lib/utils.js";
5
+ import { usePageBlocks } from "../../../lib/normalized-data.js";
6
6
  import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
7
7
  import { trackClientEvent } from "../../../lib/analytics-client.js";
8
8
  import { useUpdateBlockPosition } from "./useUpdateBlockPosition.js";
@@ -14,9 +14,8 @@ import { useMutation } from "@tanstack/react-query";
14
14
  import { useSelector } from "@xstate/store/react";
15
15
  import * as React from "react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
- import { Button } from "@camox/ui/button";
18
17
  import { Copy, Pen, Settings, Trash2 } from "lucide-react";
19
- import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@camox/ui/command";
18
+ import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "@camox/ui/command";
20
19
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
21
20
  //#region src/features/preview/components/BlockActionsPopover.tsx
22
21
  var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start", isLayoutBlock, layoutPlacement }) => {
@@ -105,10 +104,7 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
105
104
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Popover, {
106
105
  open,
107
106
  onOpenChange,
108
- children: [/* @__PURE__ */ jsx(PopoverTrigger, {
109
- asChild: true,
110
- children
111
- }), block && /* @__PURE__ */ jsx(PopoverContent, {
107
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, { render: children }), block && /* @__PURE__ */ jsx(PopoverContent, {
112
108
  className: "w-[300px] p-0",
113
109
  align,
114
110
  children: /* @__PURE__ */ jsxs(Command, { children: [/* @__PURE__ */ jsx(CommandInput, { placeholder: "Search actions..." }), /* @__PURE__ */ jsxs(CommandList, {
@@ -126,10 +122,10 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
126
122
  children: [/* @__PURE__ */ jsxs("div", {
127
123
  className: "flex items-center gap-2",
128
124
  children: [/* @__PURE__ */ jsx(Pen, { className: "h-4 w-4" }), "Edit in form"]
129
- }), formatShortcut({
125
+ }), /* @__PURE__ */ jsx(CommandShortcut, { children: formatShortcut({
130
126
  key: "j",
131
127
  withMeta: true
132
- })]
128
+ }) })]
133
129
  }), !isLayoutBlock && (() => {
134
130
  const blockDef = camoxApp.getBlockById(block.type);
135
131
  if (!(blockDef?.settingsSchema?.properties && Object.keys(blockDef.settingsSchema.properties).length > 0)) return null;
@@ -186,7 +182,7 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
186
182
  children: [/* @__PURE__ */ jsxs("div", {
187
183
  className: "flex items-center gap-2",
188
184
  children: [/* @__PURE__ */ jsx("span", { className: "w-4" }), "Add block below"]
189
- }), formatShortcut({ key: "o" })]
185
+ }), /* @__PURE__ */ jsx(CommandShortcut, { children: formatShortcut({ key: "o" }) })]
190
186
  }), /* @__PURE__ */ jsxs(CommandItem, {
191
187
  className: "justify-between",
192
188
  onSelect: () => {
@@ -196,10 +192,10 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
196
192
  children: [/* @__PURE__ */ jsxs("div", {
197
193
  className: "flex items-center gap-2",
198
194
  children: [/* @__PURE__ */ jsx("span", { className: "w-4" }), "Add block above"]
199
- }), formatShortcut({
195
+ }), /* @__PURE__ */ jsx(CommandShortcut, { children: formatShortcut({
200
196
  key: "o",
201
197
  withShift: true
202
- })]
198
+ }) })]
203
199
  })] }),
204
200
  /* @__PURE__ */ jsx(CommandSeparator, {}),
205
201
  /* @__PURE__ */ jsx(CommandGroup, { children: /* @__PURE__ */ jsxs(CommandItem, {
@@ -211,10 +207,10 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
211
207
  children: [/* @__PURE__ */ jsxs("div", {
212
208
  className: "flex items-center gap-2",
213
209
  children: [/* @__PURE__ */ jsx(Copy, { className: "h-4 w-4" }), "Duplicate block"]
214
- }), formatShortcut({
210
+ }), /* @__PURE__ */ jsx(CommandShortcut, { children: formatShortcut({
215
211
  key: "d",
216
212
  withMeta: true
217
- })]
213
+ }) })]
218
214
  }) }),
219
215
  /* @__PURE__ */ jsx(CommandSeparator, {}),
220
216
  /* @__PURE__ */ jsxs(CommandGroup, { children: [
@@ -243,10 +239,10 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
243
239
  children: [/* @__PURE__ */ jsxs("div", {
244
240
  className: "flex items-center gap-2",
245
241
  children: [/* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" }), "Delete block"]
246
- }), formatShortcut({
242
+ }), /* @__PURE__ */ jsx(CommandShortcut, { children: formatShortcut({
247
243
  key: "Backspace",
248
244
  withMeta: true
249
- })]
245
+ }) })]
250
246
  })
251
247
  ] })
252
248
  ] })
@@ -260,13 +256,14 @@ var BlockActionsPopover = ({ block, children, open, onOpenChange, align = "start
260
256
  "Are you sure you want to delete ",
261
257
  /* @__PURE__ */ jsx("strong", { children: blockToDelete?.summary }),
262
258
  "? This action cannot be undone."
263
- ] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
259
+ ] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
260
+ variant: "outline",
261
+ size: "default",
262
+ children: "Cancel"
263
+ }), /* @__PURE__ */ jsx(AlertDialogAction, {
264
+ variant: "destructive",
264
265
  onClick: () => blockToDelete && handleDeleteBlock(blockToDelete),
265
- asChild: true,
266
- children: /* @__PURE__ */ jsx(Button, {
267
- variant: "destructive",
268
- children: "Delete"
269
- })
266
+ children: "Delete"
270
267
  })] })] })
271
268
  })] });
272
269
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CreatePageSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/CreatePageSheet.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,eAAe,+CA2JpB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"CreatePageSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/CreatePageSheet.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,eAAe,+CAiKpB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -118,12 +118,18 @@ var CreatePageSheet = () => {
118
118
  children: "Layout"
119
119
  }), /* @__PURE__ */ jsxs(Select, {
120
120
  value: field.state.value,
121
- onValueChange: field.handleChange,
121
+ onValueChange: (value_0) => {
122
+ if (value_0 != null) field.handleChange(value_0);
123
+ },
122
124
  disabled: layouts != null && layouts.length <= 1,
123
- children: [/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a layout" }) }), /* @__PURE__ */ jsx(SelectContent, { children: layouts?.map((t) => /* @__PURE__ */ jsx(SelectItem, {
125
+ items: layouts?.map((t) => ({
124
126
  value: String(t.id),
125
- children: camoxApp.getLayoutById(t.layoutId)?.title ?? t.layoutId
126
- }, t.id)) })]
127
+ label: camoxApp.getLayoutById(t.layoutId)?.title ?? t.layoutId
128
+ })),
129
+ children: [/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a layout" }) }), /* @__PURE__ */ jsx(SelectContent, { children: layouts?.map((t_0) => /* @__PURE__ */ jsx(SelectItem, {
130
+ value: String(t_0.id),
131
+ children: camoxApp.getLayoutById(t_0.layoutId)?.title ?? t_0.layoutId
132
+ }, t_0.id)) })]
127
133
  })]
128
134
  })
129
135
  }),
@@ -1,3 +1,3 @@
1
- declare const EditPageSheet: () => import("react/jsx-runtime").JSX.Element | null;
1
+ declare const EditPageSheet: () => import("react/jsx-runtime").JSX.Element;
2
2
  export { EditPageSheet };
3
3
  //# sourceMappingURL=EditPageSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditPageSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/EditPageSheet.tsx"],"names":[],"mappings":"AAqCA,QAAA,MAAM,aAAa,sDAMlB,CAAC;AAoXF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"EditPageSheet.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/EditPageSheet.tsx"],"names":[],"mappings":"AAqCA,QAAA,MAAM,aAAa,+CAIlB,CAAC;AA2XF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -27,7 +27,6 @@ import { Switch } from "@camox/ui/switch";
27
27
  var EditPageSheet = () => {
28
28
  const $ = c(2);
29
29
  const editingPageId = useSelector(previewStore, _temp);
30
- if (!editingPageId) return null;
31
30
  let t0;
32
31
  if ($[0] !== editingPageId) {
33
32
  t0 = /* @__PURE__ */ jsx(EditPageSheetContent, { pageId: editingPageId });
@@ -43,7 +42,10 @@ var EditPageSheetContent = ({ pageId }) => {
43
42
  const setAiSeo = useMutation(pageMutations.setAiSeo());
44
43
  const setMetaTitle = useMutation(pageMutations.setMetaTitle());
45
44
  const setMetaDescription = useMutation(pageMutations.setMetaDescription());
46
- const { data: page } = useQuery(pageQueries.getById(pageId));
45
+ const { data: page } = useQuery({
46
+ ...pageQueries.getById(pageId),
47
+ enabled: pageId != null
48
+ });
47
49
  const { data: project } = useQuery(projectQueries.getBySlug(projectSlug));
48
50
  const { data: pages } = useQuery({
49
51
  ...pageQueries.list(project?.id ?? 0),
@@ -106,17 +108,17 @@ var EditPageSheetContent = ({ pageId }) => {
106
108
  page,
107
109
  form
108
110
  ]);
109
- if (!page) return null;
110
- const isRootPage = page.fullPath === "/";
111
- const pageLayoutRecord = layouts?.find((l) => l.id === page.layoutId);
111
+ const isOpen = pageId != null && !!page;
112
+ const isRootPage = page?.fullPath === "/";
113
+ const pageLayoutRecord = layouts?.find((l) => l.id === page?.layoutId);
112
114
  const layoutDef = pageLayoutRecord ? camoxApp.getLayoutById(pageLayoutRecord.layoutId) : void 0;
113
- const metaTitle = layoutDef ? layoutDef.buildMetaTitle({
115
+ const metaTitle = layoutDef && page ? layoutDef.buildMetaTitle({
114
116
  pageMetaTitle: page.metaTitle ?? "",
115
117
  projectName: project?.name ?? "",
116
118
  pageFullPath: page.fullPath
117
- }) : page.metaTitle ?? "";
119
+ }) : page?.metaTitle ?? "";
118
120
  return /* @__PURE__ */ jsx(Sheet.Sheet, {
119
- open: true,
121
+ open: isOpen,
120
122
  onOpenChange: (value) => {
121
123
  if (!value) previewStore.send({ type: "closeEditPageSheet" });
122
124
  },
@@ -125,7 +127,7 @@ var EditPageSheetContent = ({ pageId }) => {
125
127
  children: [/* @__PURE__ */ jsxs(Sheet.SheetHeader, {
126
128
  className: "border-border border-b",
127
129
  children: [/* @__PURE__ */ jsx(Sheet.SheetTitle, { children: "Edit page" }), /* @__PURE__ */ jsx(Sheet.SheetDescription, { children: "Update the page details." })]
128
- }), /* @__PURE__ */ jsxs("div", {
130
+ }), page && /* @__PURE__ */ jsxs("div", {
129
131
  className: "flex-1 overflow-y-auto",
130
132
  children: [
131
133
  /* @__PURE__ */ jsxs("div", {
@@ -168,10 +170,14 @@ var EditPageSheetContent = ({ pageId }) => {
168
170
  children: [/* @__PURE__ */ jsx(Label, { children: "Layout" }), /* @__PURE__ */ jsxs(Select, {
169
171
  value: field.state.value ? String(field.state.value) : "",
170
172
  onValueChange: (value_0) => field.handleChange(Number(value_0)),
171
- children: [/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a layout" }) }), /* @__PURE__ */ jsx(SelectContent, { children: layouts.map((t) => /* @__PURE__ */ jsx(SelectItem, {
173
+ items: layouts.map((t) => ({
172
174
  value: String(t.id),
173
- children: camoxApp.getLayoutById(t.layoutId)?.title ?? t.layoutId
174
- }, t.id)) })]
175
+ label: camoxApp.getLayoutById(t.layoutId)?.title ?? t.layoutId
176
+ })),
177
+ children: [/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a layout" }) }), /* @__PURE__ */ jsx(SelectContent, { children: layouts.map((t_0) => /* @__PURE__ */ jsx(SelectItem, {
178
+ value: String(t_0.id),
179
+ children: camoxApp.getLayoutById(t_0.layoutId)?.title ?? t_0.layoutId
180
+ }, t_0.id)) })]
175
181
  })]
176
182
  })
177
183
  }),
@@ -291,10 +297,7 @@ var SearchEnginePreview = (t0) => {
291
297
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
292
298
  t2 = /* @__PURE__ */ jsxs("div", {
293
299
  className: "flex items-center gap-1.5",
294
- children: [t1, /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
295
- asChild: true,
296
- children: /* @__PURE__ */ jsx(Info, { className: "text-muted-foreground size-3.5" })
297
- }), /* @__PURE__ */ jsx(TooltipContent, { children: "Titles are cropped after 60 characters and descriptions after 155, like Google typically does." })] })]
300
+ children: [t1, /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Info, { className: "text-muted-foreground size-3.5" }) }), /* @__PURE__ */ jsx(TooltipContent, { children: "Titles are cropped after 60 characters and descriptions after 155, like Google typically does." })] })]
298
301
  });
299
302
  $[1] = t2;
300
303
  } else t2 = $[1];
@@ -458,7 +461,7 @@ var SocialPreviewSection = (t0) => {
458
461
  t11 = /* @__PURE__ */ jsxs("div", {
459
462
  className: "space-y-2 pt-2",
460
463
  children: [t2, /* @__PURE__ */ jsxs("div", {
461
- className: "border-border bg-background overflow-hidden rounded-lg border",
464
+ className: "border-border overflow-hidden rounded-lg border",
462
465
  children: [t3, t10]
463
466
  })]
464
467
  });
@@ -0,0 +1,2 @@
1
+ export declare const FieldOverlayStyles: () => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=FieldOverlayStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldOverlayStyles.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/FieldOverlayStyles.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,+CAE9B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import studio_overlays_default from "../studio-overlays.css?inline.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/features/preview/components/FieldOverlayStyles.tsx
5
+ var FieldOverlayStyles = () => {
6
+ const $ = c(1);
7
+ let t0;
8
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
9
+ t0 = /* @__PURE__ */ jsx("style", { children: studio_overlays_default });
10
+ $[0] = t0;
11
+ } else t0 = $[0];
12
+ return t0;
13
+ };
14
+ //#endregion
15
+ export { FieldOverlayStyles };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ interface FrameContextValue {
3
+ window: Window | null;
4
+ iframeElement: HTMLIFrameElement | null;
5
+ }
6
+ export declare function useFrame(): FrameContextValue;
7
+ interface FrameProps {
8
+ children: React.ReactNode;
9
+ /** Optional className for the iframe element */
10
+ className?: string;
11
+ /** Optional inline styles for the iframe element */
12
+ style?: React.CSSProperties;
13
+ /** Whether to copy parent document styles into the iframe (default: true) */
14
+ copyStyles?: boolean;
15
+ /** Callback when iframe is ready, receives the iframe element */
16
+ onIframeReady?: (iframe: HTMLIFrameElement) => void;
17
+ }
18
+ export declare const Frame: ({ children, className, style, copyStyles, onIframeReady, }: FrameProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=Frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/Frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACzC;AAOD,wBAAgB,QAAQ,sBAMvB;AAED,UAAU,UAAU;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,KAAK,GAAI,4DAMnB,UAAU,4CAyGZ,CAAC"}
@@ -0,0 +1,162 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import * as React from "react";
4
+ import { createPortal } from "react-dom";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/features/preview/components/Frame.tsx
7
+ var FrameContext = React.createContext({
8
+ window: null,
9
+ iframeElement: null
10
+ });
11
+ function useFrame() {
12
+ const context = React.use(FrameContext);
13
+ if (!context) throw new Error("useFrame must be used within a Frame");
14
+ return context;
15
+ }
16
+ var Frame = (t0) => {
17
+ const $ = c(25);
18
+ const { children, className, style, copyStyles: t1, onIframeReady } = t0;
19
+ const copyStyles = t1 === void 0 ? true : t1;
20
+ const iframeRef = React.useRef(null);
21
+ const [iframeWindow, setIframeWindow] = React.useState(null);
22
+ const [iframeElement, setIframeElement] = React.useState(null);
23
+ const [mountNode, setMountNode] = React.useState(null);
24
+ const [hasOpenPopup, setHasOpenPopup] = React.useState(false);
25
+ let t2;
26
+ let t3;
27
+ if ($[0] !== copyStyles || $[1] !== onIframeReady) {
28
+ t2 = () => {
29
+ const iframe = iframeRef.current;
30
+ if (!iframe) return;
31
+ const handleLoad = () => {
32
+ const iframeDoc = iframe.contentDocument;
33
+ const iframeWin = iframe.contentWindow;
34
+ if (!iframeDoc || !iframeWin) return;
35
+ iframeDoc.open();
36
+ iframeDoc.write("<!DOCTYPE html><html><head></head><body style='background: transparent;'></body></html>");
37
+ iframeDoc.close();
38
+ iframeWin.addEventListener("click", _temp);
39
+ if (copyStyles) Array.from(document.head.querySelectorAll("style, link[rel=\"stylesheet\"]")).forEach((style_0) => {
40
+ const clonedStyle = style_0.cloneNode(true);
41
+ iframeDoc.head.appendChild(clonedStyle);
42
+ });
43
+ setMountNode(iframeDoc.body);
44
+ setIframeWindow(iframeWin);
45
+ setIframeElement(iframe);
46
+ onIframeReady?.(iframe);
47
+ };
48
+ iframe.addEventListener("load", handleLoad);
49
+ if (iframe.contentDocument?.readyState === "complete") handleLoad();
50
+ return () => {
51
+ iframe.removeEventListener("load", handleLoad);
52
+ };
53
+ };
54
+ t3 = [copyStyles, onIframeReady];
55
+ $[0] = copyStyles;
56
+ $[1] = onIframeReady;
57
+ $[2] = t2;
58
+ $[3] = t3;
59
+ } else {
60
+ t2 = $[2];
61
+ t3 = $[3];
62
+ }
63
+ React.useEffect(t2, t3);
64
+ let t4;
65
+ let t5;
66
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
67
+ t4 = () => {
68
+ const checkForOpenPopup = () => {
69
+ setHasOpenPopup(document.body.querySelector(":scope > [data-open]") !== null);
70
+ };
71
+ checkForOpenPopup();
72
+ const observer = new MutationObserver(checkForOpenPopup);
73
+ observer.observe(document.body, {
74
+ childList: true,
75
+ subtree: true,
76
+ attributes: true,
77
+ attributeFilter: ["data-open", "data-closed"]
78
+ });
79
+ return () => {
80
+ observer.disconnect();
81
+ };
82
+ };
83
+ t5 = [];
84
+ $[4] = t4;
85
+ $[5] = t5;
86
+ } else {
87
+ t4 = $[4];
88
+ t5 = $[5];
89
+ }
90
+ React.useEffect(t4, t5);
91
+ let t6;
92
+ if ($[6] !== className) {
93
+ t6 = cn("relative w-full h-full", className);
94
+ $[6] = className;
95
+ $[7] = t6;
96
+ } else t6 = $[7];
97
+ let t7;
98
+ if ($[8] !== hasOpenPopup) {
99
+ t7 = hasOpenPopup && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 h-full w-full" });
100
+ $[8] = hasOpenPopup;
101
+ $[9] = t7;
102
+ } else t7 = $[9];
103
+ let t8;
104
+ if ($[10] !== iframeElement || $[11] !== iframeWindow) {
105
+ t8 = {
106
+ window: iframeWindow,
107
+ iframeElement
108
+ };
109
+ $[10] = iframeElement;
110
+ $[11] = iframeWindow;
111
+ $[12] = t8;
112
+ } else t8 = $[12];
113
+ let t9;
114
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
115
+ t9 = /* @__PURE__ */ jsx("iframe", {
116
+ ref: iframeRef,
117
+ className: cn("w-full h-full")
118
+ });
119
+ $[13] = t9;
120
+ } else t9 = $[13];
121
+ let t10;
122
+ if ($[14] !== children || $[15] !== mountNode) {
123
+ t10 = mountNode && createPortal(children, mountNode);
124
+ $[14] = children;
125
+ $[15] = mountNode;
126
+ $[16] = t10;
127
+ } else t10 = $[16];
128
+ let t11;
129
+ if ($[17] !== t10 || $[18] !== t8) {
130
+ t11 = /* @__PURE__ */ jsxs(FrameContext.Provider, {
131
+ value: t8,
132
+ children: [t9, t10]
133
+ });
134
+ $[17] = t10;
135
+ $[18] = t8;
136
+ $[19] = t11;
137
+ } else t11 = $[19];
138
+ let t12;
139
+ if ($[20] !== style || $[21] !== t11 || $[22] !== t6 || $[23] !== t7) {
140
+ t12 = /* @__PURE__ */ jsxs("div", {
141
+ className: t6,
142
+ style,
143
+ children: [t7, t11]
144
+ });
145
+ $[20] = style;
146
+ $[21] = t11;
147
+ $[22] = t6;
148
+ $[23] = t7;
149
+ $[24] = t12;
150
+ } else t12 = $[24];
151
+ return t12;
152
+ };
153
+ function _temp(e) {
154
+ if (e.defaultPrevented) return;
155
+ const anchor = e.target.closest("a");
156
+ if (!anchor?.href) return;
157
+ if (anchor.target === "_blank") return;
158
+ e.preventDefault();
159
+ window.top?.location.assign(anchor.href);
160
+ }
161
+ //#endregion
162
+ export { Frame, useFrame };
@@ -1 +1 @@
1
- {"version":3,"file":"LinkFieldEditor.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/LinkFieldEditor.tsx"],"names":[],"mappings":"AA2BA,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACrE;AAUD,QAAA,MAAM,eAAe,GAAI,gDAAgD,oBAAoB,4CA6K5F,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"LinkFieldEditor.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/LinkFieldEditor.tsx"],"names":[],"mappings":"AA2BA,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACrE;AAUD,QAAA,MAAM,eAAe,GAAI,gDAAgD,oBAAoB,4CA+K5F,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -271,20 +271,19 @@ var LinkFieldEditor = (t0) => {
271
271
  const t29 = linkValue.type === "page" ? /* @__PURE__ */ jsxs(Popover, {
272
272
  open: pagePickerOpen,
273
273
  onOpenChange: setPagePickerOpen,
274
- children: [/* @__PURE__ */ jsx(PopoverTrigger, {
275
- asChild: true,
276
- children: /* @__PURE__ */ jsxs(Button, {
274
+ children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
275
+ render: /* @__PURE__ */ jsx(Button, {
277
276
  variant: "outline",
278
277
  role: "combobox",
279
- className: "justify-between font-normal",
280
- children: [selectedPage ? /* @__PURE__ */ jsx("span", {
281
- className: "truncate",
282
- children: selectedPage.metaTitle ?? formatPathSegment(selectedPage.pathSegment)
283
- }) : /* @__PURE__ */ jsx("span", {
284
- className: "text-muted-foreground",
285
- children: "Select a page"
286
- }), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
287
- })
278
+ className: "justify-between font-normal"
279
+ }),
280
+ children: [selectedPage ? /* @__PURE__ */ jsx("span", {
281
+ className: "truncate",
282
+ children: selectedPage.metaTitle ?? formatPathSegment(selectedPage.pathSegment)
283
+ }) : /* @__PURE__ */ jsx("span", {
284
+ className: "text-muted-foreground",
285
+ children: "Select a page"
286
+ }), /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
288
287
  }), /* @__PURE__ */ jsx(PopoverContent, {
289
288
  align: "start",
290
289
  className: "p-0",