camox 0.41.0 → 0.42.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 (60) hide show
  1. package/dist/core/components/lexical/SidebarLexicalEditor.js +42 -39
  2. package/dist/core/createApp.d.ts +16 -2
  3. package/dist/core/createBlock.js +11 -25
  4. package/dist/core/editing/BlockEditingRuntime.js +4 -4
  5. package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
  6. package/dist/core/editing/createEditableBlock.d.ts +8 -1
  7. package/dist/core/editing/createEditableBlock.js +684 -644
  8. package/dist/core/hooks/useIsEditable.js +4 -7
  9. package/dist/core/hooks/useOverlayState.js +11 -0
  10. package/dist/core/hooks/useRequireDraftSource.js +7 -11
  11. package/dist/core/lib/fieldTypes.js +5 -5
  12. package/dist/core/lib/lexicalState.js +17 -1
  13. package/dist/features/preview/CamoxPreview.js +123 -137
  14. package/dist/features/preview/DerivedPreview.js +6 -9
  15. package/dist/features/preview/commentsEnabled.js +8 -0
  16. package/dist/features/preview/components/AddBlockSidebar.js +79 -89
  17. package/dist/features/preview/components/AssetLightbox.js +4 -11
  18. package/dist/features/preview/components/AttachedComments.js +194 -0
  19. package/dist/features/preview/components/BlockActionsPopover.js +19 -70
  20. package/dist/features/preview/components/CommentHeader.js +122 -0
  21. package/dist/features/preview/components/CommentSidebar.js +29 -0
  22. package/dist/features/preview/components/CommentTargetQuote.js +166 -0
  23. package/dist/features/preview/components/CreatePageModal.js +2 -8
  24. package/dist/features/preview/components/DerivedLayoutSidebar.js +4 -7
  25. package/dist/features/preview/components/ItemFieldsEditor.js +275 -204
  26. package/dist/features/preview/components/LeftSidebar.js +18 -18
  27. package/dist/features/preview/components/LinkFieldEditor.js +3 -4
  28. package/dist/features/preview/components/MobilePreviewDrawer.js +3 -3
  29. package/dist/features/preview/components/OverlayTracker.js +14 -20
  30. package/dist/features/preview/components/Overlays.js +28 -40
  31. package/dist/features/preview/components/PageEditorSidebar.js +231 -241
  32. package/dist/features/preview/components/PageInfoSidebar.js +126 -157
  33. package/dist/features/preview/components/PagePicker.js +13 -8
  34. package/dist/features/preview/components/PageTree.js +255 -319
  35. package/dist/features/preview/components/PreviewComments.js +56 -0
  36. package/dist/features/preview/components/PreviewPanel.js +149 -107
  37. package/dist/features/preview/components/PreviewToolbar.js +292 -246
  38. package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
  39. package/dist/features/preview/components/PublicationRow.js +11 -24
  40. package/dist/features/preview/components/RightSidebar.js +14 -11
  41. package/dist/features/preview/components/SidebarSection.js +121 -0
  42. package/dist/features/preview/previewCommentsStore.js +115 -0
  43. package/dist/features/preview/previewSelection.js +75 -0
  44. package/dist/features/preview/previewStore.js +32 -63
  45. package/dist/features/provider/AuthenticatedCamoxProvider.js +46 -34
  46. package/dist/features/provider/components/CommandPalette.js +142 -58
  47. package/dist/features/provider/useAdminShortcuts.js +20 -8
  48. package/dist/features/routes/pageRuntime.js +0 -6
  49. package/dist/features/runtime/RuntimeChrome.js +102 -87
  50. package/dist/features/studio/CamoxStudio.js +30 -50
  51. package/dist/features/studio/components/UserButton.js +4 -4
  52. package/dist/features/vite/runtimeDev.js +4 -1
  53. package/dist/features/vite/vite.d.ts +3 -2
  54. package/dist/features/vite/vite.js +9 -5
  55. package/dist/hooks/use-file-upload.js +0 -2
  56. package/dist/studio.css +1 -1
  57. package/package.json +5 -7
  58. package/dist/features/preview/components/DraftSwitchDialog.js +0 -66
  59. package/dist/lib/telemetry-client.js +0 -66
  60. package/dist/lib/telemetry.js +0 -26
@@ -3,13 +3,14 @@ import { useProjectSlug } from "../../../lib/auth.js";
3
3
  import { blockQueries, layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
4
4
  import { cn } from "../../../lib/utils.js";
5
5
  import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
- import { trackClientEvent } from "../../../lib/telemetry-client.js";
6
+ import { areCommentsEnabled } from "../commentsEnabled.js";
7
7
  import { PageLocationFieldset } from "./PageLocationFieldset.js";
8
8
  import { PageNicknameField } from "./PageNicknameField.js";
9
9
  import { UploadDropZone } from "../../content/components/UploadDropZone.js";
10
10
  import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
11
11
  import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
12
12
  import { Metadata, MetadataRow, formatRelativeTime } from "./Metadata.js";
13
+ import { AttachedComments } from "./AttachedComments.js";
13
14
  import { ShikiMarkdown } from "./ShikiMarkdown.js";
14
15
  import { c } from "react/compiler-runtime";
15
16
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
@@ -32,9 +33,9 @@ import { Switch } from "@camox/ui/switch";
32
33
  //#region src/features/preview/components/PageInfoSidebar.tsx
33
34
  const usePageMetadataData = (pageId) => {
34
35
  const $ = c(32);
35
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
36
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
36
37
  for (let $i = 0; $i < 32; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
37
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
38
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
38
39
  }
39
40
  const projectSlug = useProjectSlug();
40
41
  const camoxApp = useCamoxApp();
@@ -140,10 +141,10 @@ const usePageMetadataData = (pageId) => {
140
141
  return t10;
141
142
  };
142
143
  const PageInfoSidebar = (t0) => {
143
- const $ = c(66);
144
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
145
- for (let $i = 0; $i < 66; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
146
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
144
+ const $ = c(69);
145
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
146
+ for (let $i = 0; $i < 69; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
147
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
147
148
  }
148
149
  const { pageId, scrollable: t1, aboutOnly: t2 } = t0;
149
150
  const scrollable = t1 === void 0 ? true : t1;
@@ -215,7 +216,7 @@ const PageInfoSidebar = (t0) => {
215
216
  size: "icon-xs",
216
217
  onClick: t9,
217
218
  "aria-label": "Edit page structure",
218
- children: /* @__PURE__ */ jsx(Pencil, { className: "size-4" })
219
+ children: /* @__PURE__ */ jsx(Pencil, {})
219
220
  })
220
221
  });
221
222
  $[12] = t10;
@@ -225,7 +226,7 @@ const PageInfoSidebar = (t0) => {
225
226
  t11 = /* @__PURE__ */ jsxs("div", {
226
227
  className: "space-y-2",
227
228
  children: [t7, /* @__PURE__ */ jsxs(InputGroup, {
228
- className: "h-auto min-h-9 px-1",
229
+ className: "px-1",
229
230
  children: [t8, t10]
230
231
  })]
231
232
  });
@@ -361,35 +362,46 @@ const PageInfoSidebar = (t0) => {
361
362
  $[46] = t24;
362
363
  } else t24 = $[46];
363
364
  let t25;
364
- if ($[47] !== t13 || $[48] !== t14 || $[49] !== t24 || $[50] !== t4) {
365
- t25 = /* @__PURE__ */ jsxs("div", {
365
+ if ($[47] !== pageId) {
366
+ t25 = areCommentsEnabled() && /* @__PURE__ */ jsx("div", {
367
+ className: "-mx-2",
368
+ children: /* @__PURE__ */ jsx(AttachedComments, { pageId })
369
+ });
370
+ $[47] = pageId;
371
+ $[48] = t25;
372
+ } else t25 = $[48];
373
+ let t26;
374
+ if ($[49] !== t13 || $[50] !== t14 || $[51] !== t24 || $[52] !== t25 || $[53] !== t4) {
375
+ t26 = /* @__PURE__ */ jsxs("div", {
366
376
  className: t4,
367
377
  children: [
368
378
  t13,
369
379
  t14,
370
- t24
380
+ t24,
381
+ t25
371
382
  ]
372
383
  });
373
- $[47] = t13;
374
- $[48] = t14;
375
- $[49] = t24;
376
- $[50] = t4;
377
- $[51] = t25;
378
- } else t25 = $[51];
379
- let t26;
380
- if ($[52] !== isStructureModalOpen || $[53] !== page.id) {
381
- t26 = /* @__PURE__ */ jsx(PageStructureModal, {
384
+ $[49] = t13;
385
+ $[50] = t14;
386
+ $[51] = t24;
387
+ $[52] = t25;
388
+ $[53] = t4;
389
+ $[54] = t26;
390
+ } else t26 = $[54];
391
+ let t27;
392
+ if ($[55] !== isStructureModalOpen || $[56] !== page.id) {
393
+ t27 = /* @__PURE__ */ jsx(PageStructureModal, {
382
394
  open: isStructureModalOpen,
383
395
  onOpenChange: setIsStructureModalOpen,
384
396
  pageId: page.id
385
397
  });
386
- $[52] = isStructureModalOpen;
387
- $[53] = page.id;
388
- $[54] = t26;
389
- } else t26 = $[54];
390
- let t27;
391
- if ($[55] !== aboutOnly || $[56] !== isMarkdownModalOpen || $[57] !== isSeoModalOpen || $[58] !== metaTitle || $[59] !== page.id || $[60] !== page.metaDescription) {
392
- t27 = !aboutOnly && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PageSeoModal, {
398
+ $[55] = isStructureModalOpen;
399
+ $[56] = page.id;
400
+ $[57] = t27;
401
+ } else t27 = $[57];
402
+ let t28;
403
+ if ($[58] !== aboutOnly || $[59] !== isMarkdownModalOpen || $[60] !== isSeoModalOpen || $[61] !== metaTitle || $[62] !== page.id || $[63] !== page.metaDescription) {
404
+ t28 = !aboutOnly && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PageSeoModal, {
393
405
  open: isSeoModalOpen,
394
406
  onOpenChange: setIsSeoModalOpen,
395
407
  pageId: page.id
@@ -400,33 +412,33 @@ const PageInfoSidebar = (t0) => {
400
412
  metaTitle,
401
413
  metaDescription: page.metaDescription ?? ""
402
414
  })] });
403
- $[55] = aboutOnly;
404
- $[56] = isMarkdownModalOpen;
405
- $[57] = isSeoModalOpen;
406
- $[58] = metaTitle;
407
- $[59] = page.id;
408
- $[60] = page.metaDescription;
409
- $[61] = t27;
410
- } else t27 = $[61];
411
- let t28;
412
- if ($[62] !== t25 || $[63] !== t26 || $[64] !== t27) {
413
- t28 = /* @__PURE__ */ jsxs(Fragment, { children: [
414
- t25,
415
+ $[58] = aboutOnly;
416
+ $[59] = isMarkdownModalOpen;
417
+ $[60] = isSeoModalOpen;
418
+ $[61] = metaTitle;
419
+ $[62] = page.id;
420
+ $[63] = page.metaDescription;
421
+ $[64] = t28;
422
+ } else t28 = $[64];
423
+ let t29;
424
+ if ($[65] !== t26 || $[66] !== t27 || $[67] !== t28) {
425
+ t29 = /* @__PURE__ */ jsxs(Fragment, { children: [
415
426
  t26,
416
- t27
427
+ t27,
428
+ t28
417
429
  ] });
418
- $[62] = t25;
419
- $[63] = t26;
420
- $[64] = t27;
421
- $[65] = t28;
422
- } else t28 = $[65];
423
- return t28;
430
+ $[65] = t26;
431
+ $[66] = t27;
432
+ $[67] = t28;
433
+ $[68] = t29;
434
+ } else t29 = $[68];
435
+ return t29;
424
436
  };
425
437
  const PageNicknameSidebarEditor = (t0) => {
426
438
  const $ = c(21);
427
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
439
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
428
440
  for (let $i = 0; $i < 21; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
429
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
441
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
430
442
  }
431
443
  const { data } = t0;
432
444
  const { page } = data;
@@ -452,20 +464,7 @@ const PageNicknameSidebarEditor = (t0) => {
452
464
  nickname,
453
465
  pathSegment: page.pathSegment,
454
466
  parentPageId: page.parentPageId
455
- }, {
456
- onSuccess: () => {
457
- trackClientEvent("page_updated", {
458
- projectId: page.projectId,
459
- changes: {
460
- nickname: true,
461
- path: false,
462
- layout: false,
463
- parent: false
464
- }
465
- });
466
- },
467
- onError: _temp
468
- });
467
+ }, { onError: _temp });
469
468
  };
470
469
  $[2] = page;
471
470
  $[3] = updatePage;
@@ -534,10 +533,10 @@ const PageNicknameSidebarEditor = (t0) => {
534
533
  return t8;
535
534
  };
536
535
  const PageLayoutSidebarSelect = (t0) => {
537
- const $ = c(30);
538
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
539
- for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
540
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
536
+ const $ = c(29);
537
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
538
+ for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
539
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
541
540
  }
542
541
  const { data } = t0;
543
542
  const { page, layouts, camoxApp } = data;
@@ -566,89 +565,75 @@ const PageLayoutSidebarSelect = (t0) => {
566
565
  } else t3 = $[3];
567
566
  const t4 = page.layoutId ? String(page.layoutId) : "";
568
567
  let t5;
569
- if ($[4] !== page.id || $[5] !== page.layoutId || $[6] !== page.projectId || $[7] !== setLayout) {
568
+ if ($[4] !== page.id || $[5] !== page.layoutId || $[6] !== setLayout) {
570
569
  t5 = (value) => {
571
570
  const layoutId = Number(value);
572
571
  if (layoutId === page.layoutId) return;
573
572
  setLayout.mutate({
574
573
  id: page.id,
575
574
  layoutId
576
- }, {
577
- onSuccess: () => {
578
- trackClientEvent("page_updated", {
579
- projectId: page.projectId,
580
- changes: {
581
- nickname: false,
582
- path: false,
583
- layout: true,
584
- parent: false
585
- }
586
- });
587
- },
588
- onError: _temp2
589
- });
575
+ }, { onError: _temp2 });
590
576
  };
591
577
  $[4] = page.id;
592
578
  $[5] = page.layoutId;
593
- $[6] = page.projectId;
594
- $[7] = setLayout;
595
- $[8] = t5;
596
- } else t5 = $[8];
579
+ $[6] = setLayout;
580
+ $[7] = t5;
581
+ } else t5 = $[7];
597
582
  let t6;
598
- if ($[9] !== camoxApp || $[10] !== layouts) {
583
+ if ($[8] !== camoxApp || $[9] !== layouts) {
599
584
  let t7;
600
- if ($[12] !== camoxApp) {
585
+ if ($[11] !== camoxApp) {
601
586
  t7 = (t) => ({
602
587
  value: String(t.id),
603
588
  label: camoxApp.getLayoutById(t.layoutId)?._internal.title ?? t.layoutId
604
589
  });
605
- $[12] = camoxApp;
606
- $[13] = t7;
607
- } else t7 = $[13];
590
+ $[11] = camoxApp;
591
+ $[12] = t7;
592
+ } else t7 = $[12];
608
593
  t6 = layouts.map(t7);
609
- $[9] = camoxApp;
610
- $[10] = layouts;
611
- $[11] = t6;
612
- } else t6 = $[11];
594
+ $[8] = camoxApp;
595
+ $[9] = layouts;
596
+ $[10] = t6;
597
+ } else t6 = $[10];
613
598
  let t7;
614
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
599
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
615
600
  t7 = /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a layout" });
616
- $[14] = t7;
617
- } else t7 = $[14];
601
+ $[13] = t7;
602
+ } else t7 = $[13];
618
603
  let t8;
619
- if ($[15] !== setLayout.isPending) {
604
+ if ($[14] !== setLayout.isPending) {
620
605
  t8 = /* @__PURE__ */ jsx(SelectTrigger, {
621
606
  disabled: setLayout.isPending,
622
607
  className: "w-full",
623
608
  children: t7
624
609
  });
625
- $[15] = setLayout.isPending;
626
- $[16] = t8;
627
- } else t8 = $[16];
610
+ $[14] = setLayout.isPending;
611
+ $[15] = t8;
612
+ } else t8 = $[15];
628
613
  let t9;
629
- if ($[17] !== camoxApp || $[18] !== layouts) {
614
+ if ($[16] !== camoxApp || $[17] !== layouts) {
630
615
  let t10;
631
- if ($[20] !== camoxApp) {
616
+ if ($[19] !== camoxApp) {
632
617
  t10 = (t_0) => /* @__PURE__ */ jsx(SelectItem, {
633
618
  value: String(t_0.id),
634
619
  children: camoxApp.getLayoutById(t_0.layoutId)?._internal.title ?? t_0.layoutId
635
620
  }, t_0.id);
636
- $[20] = camoxApp;
637
- $[21] = t10;
638
- } else t10 = $[21];
621
+ $[19] = camoxApp;
622
+ $[20] = t10;
623
+ } else t10 = $[20];
639
624
  t9 = layouts.map(t10);
640
- $[17] = camoxApp;
641
- $[18] = layouts;
642
- $[19] = t9;
643
- } else t9 = $[19];
625
+ $[16] = camoxApp;
626
+ $[17] = layouts;
627
+ $[18] = t9;
628
+ } else t9 = $[18];
644
629
  let t10;
645
- if ($[22] !== t9) {
630
+ if ($[21] !== t9) {
646
631
  t10 = /* @__PURE__ */ jsx(SelectContent, { children: t9 });
647
- $[22] = t9;
648
- $[23] = t10;
649
- } else t10 = $[23];
632
+ $[21] = t9;
633
+ $[22] = t10;
634
+ } else t10 = $[22];
650
635
  let t11;
651
- if ($[24] !== t10 || $[25] !== t4 || $[26] !== t5 || $[27] !== t6 || $[28] !== t8) {
636
+ if ($[23] !== t10 || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t8) {
652
637
  t11 = /* @__PURE__ */ jsxs("div", {
653
638
  className: "space-y-2",
654
639
  children: [t3, /* @__PURE__ */ jsxs(Select, {
@@ -658,20 +643,20 @@ const PageLayoutSidebarSelect = (t0) => {
658
643
  children: [t8, t10]
659
644
  })]
660
645
  });
661
- $[24] = t10;
662
- $[25] = t4;
663
- $[26] = t5;
664
- $[27] = t6;
665
- $[28] = t8;
666
- $[29] = t11;
667
- } else t11 = $[29];
646
+ $[23] = t10;
647
+ $[24] = t4;
648
+ $[25] = t5;
649
+ $[26] = t6;
650
+ $[27] = t8;
651
+ $[28] = t11;
652
+ } else t11 = $[28];
668
653
  return t11;
669
654
  };
670
655
  const PageStructureModal = (t0) => {
671
656
  const $ = c(10);
672
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
657
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
673
658
  for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
674
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
659
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
675
660
  }
676
661
  const { open, onOpenChange, pageId } = t0;
677
662
  const data = usePageMetadataData(pageId);
@@ -744,15 +729,6 @@ const PageStructureEditor = ({ data, includeNickname = true, includeLayout = tru
744
729
  id: page.id,
745
730
  layoutId: values.value.layoutId
746
731
  });
747
- trackClientEvent("page_updated", {
748
- projectId: page.projectId,
749
- changes: {
750
- nickname: nickname !== page.nickname,
751
- path: values.value.pathSegment !== page.pathSegment,
752
- layout: includeLayout && values.value.layoutId !== page.layoutId,
753
- parent: values.value.parentPageId !== page.parentPageId
754
- }
755
- });
756
732
  toast.success(`Updated ${nickname} page`);
757
733
  form.reset();
758
734
  onSaved?.();
@@ -845,9 +821,9 @@ const PageStructureEditor = ({ data, includeNickname = true, includeLayout = tru
845
821
  };
846
822
  const PageSeoModal = (t0) => {
847
823
  const $ = c(8);
848
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
824
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
849
825
  for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
850
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
826
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
851
827
  }
852
828
  const { open, onOpenChange, pageId } = t0;
853
829
  let t1;
@@ -880,9 +856,9 @@ const PageSeoModal = (t0) => {
880
856
  };
881
857
  const PageSeoContent = (t0) => {
882
858
  const $ = c(6);
883
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
859
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
884
860
  for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
885
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
861
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
886
862
  }
887
863
  const { pageId } = t0;
888
864
  const { page, metaTitle, pageLayoutRecord, project } = usePageMetadataData(pageId);
@@ -907,9 +883,9 @@ const PageSeoContent = (t0) => {
907
883
  };
908
884
  const PageSeoEditor = (t0) => {
909
885
  const $ = c(43);
910
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
886
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
911
887
  for (let $i = 0; $i < 43; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
912
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
888
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
913
889
  }
914
890
  const { page, metaTitle, layoutId, projectName } = t0;
915
891
  let t1;
@@ -938,11 +914,6 @@ const PageSeoEditor = (t0) => {
938
914
  id: page.id,
939
915
  enabled: checked
940
916
  });
941
- trackClientEvent("ai_metadata_toggled", {
942
- target: "page",
943
- enabled: checked,
944
- pageId: page.id
945
- });
946
917
  };
947
918
  $[4] = page.id;
948
919
  $[5] = setAiSeo;
@@ -1082,9 +1053,9 @@ const PageSeoEditor = (t0) => {
1082
1053
  };
1083
1054
  const PageMarkdownModal = (t0) => {
1084
1055
  const $ = c(10);
1085
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
1056
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1086
1057
  for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1087
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
1058
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1088
1059
  }
1089
1060
  const { open, onOpenChange, pageId, metaTitle, metaDescription } = t0;
1090
1061
  let t1;
@@ -1123,9 +1094,9 @@ const PageMarkdownModal = (t0) => {
1123
1094
  };
1124
1095
  const PageMarkdownContent = (t0) => {
1125
1096
  const $ = c(6);
1126
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
1097
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1127
1098
  for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1128
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
1099
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1129
1100
  }
1130
1101
  const { pageId } = t0;
1131
1102
  const { page, metaTitle } = usePageMetadataData(pageId);
@@ -1158,9 +1129,9 @@ function truncateText(text, maxLen) {
1158
1129
  }
1159
1130
  const SearchEnginePreview = (t0) => {
1160
1131
  const $ = c(17);
1161
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
1132
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1162
1133
  for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1163
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
1134
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1164
1135
  }
1165
1136
  const { page, metaTitle, metaDescription } = t0;
1166
1137
  const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
@@ -1243,9 +1214,9 @@ const SearchEnginePreview = (t0) => {
1243
1214
  };
1244
1215
  const SocialPreviewSection = (t0) => {
1245
1216
  const $ = c(60);
1246
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
1217
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1247
1218
  for (let $i = 0; $i < 60; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1248
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
1219
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1249
1220
  }
1250
1221
  const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
1251
1222
  const pageMetaTitle = page.metaTitle ?? page.pathSegment;
@@ -1279,7 +1250,6 @@ const SocialPreviewSection = (t0) => {
1279
1250
  ...t2,
1280
1251
  onSuccess: () => {
1281
1252
  queryClient.invalidateQueries({ queryKey: pageQueries.getById(page.id).queryKey });
1282
- trackClientEvent("page_custom_og_image_uploaded", { pageId: page.id });
1283
1253
  },
1284
1254
  onError: _temp6
1285
1255
  };
@@ -1299,7 +1269,6 @@ const SocialPreviewSection = (t0) => {
1299
1269
  ...t4,
1300
1270
  onSuccess: () => {
1301
1271
  queryClient.invalidateQueries({ queryKey: pageQueries.getById(page.id).queryKey });
1302
- trackClientEvent("page_custom_og_image_removed", { pageId: page.id });
1303
1272
  },
1304
1273
  onError: _temp7
1305
1274
  };
@@ -1519,9 +1488,9 @@ const SocialPreviewSection = (t0) => {
1519
1488
  };
1520
1489
  const PageMarkdownPreview = (t0) => {
1521
1490
  const $ = c(9);
1522
- if ($[0] !== "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0") {
1491
+ if ($[0] !== "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639") {
1523
1492
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1524
- $[0] = "cd84946ba5d655224ba80e40321889a8fc523c868499649dee3151d8808afbe0";
1493
+ $[0] = "f14881fbdeca138d8eb32185f2d3259957dcb91e0de821aeac5cc1ede49b5639";
1525
1494
  }
1526
1495
  const { pageId, metaTitle, metaDescription } = t0;
1527
1496
  let t1;
@@ -222,14 +222,19 @@ const PagePicker = () => {
222
222
  ]
223
223
  }),
224
224
  /* @__PURE__ */ jsx(CommandSeparator, {}),
225
- /* @__PURE__ */ jsx(CommandGroup, { children: /* @__PURE__ */ jsxs(CommandItem, {
226
- onSelect: () => {
227
- closePopover();
228
- previewStore.send({ type: "openCreatePageModal" });
229
- },
230
- value: CREATE_PAGE_VALUE,
231
- children: [/* @__PURE__ */ jsx(Plus, { className: "size-4" }), "Create page"]
232
- }) })
225
+ /* @__PURE__ */ jsx(CommandGroup, {
226
+ className: "shrink-0 pt-2",
227
+ children: /* @__PURE__ */ jsxs(CommandItem, {
228
+ className: "h-9 gap-2 px-2 py-0",
229
+ hideCheck: true,
230
+ onSelect: () => {
231
+ closePopover();
232
+ previewStore.send({ type: "openCreatePageModal" });
233
+ },
234
+ value: CREATE_PAGE_VALUE,
235
+ children: [/* @__PURE__ */ jsx(Plus, { className: "size-4 shrink-0" }), /* @__PURE__ */ jsx("span", { children: "Create page" })]
236
+ })
237
+ })
233
238
  ]
234
239
  })
235
240
  })]