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
@@ -1,26 +0,0 @@
1
- import { POSTHOG_PUBLIC_KEY } from "@camox/api-contract";
2
-
3
- //#region src/lib/telemetry.ts
4
- let client = null;
5
- async function getClient() {
6
- if (__CAMOX_TELEMETRY_DISABLED__) return null;
7
- if (!client) {
8
- const { PostHog } = await import("posthog-node");
9
- client = new PostHog(POSTHOG_PUBLIC_KEY, { host: "https://us.i.posthog.com" });
10
- }
11
- return client;
12
- }
13
- /** Server-side tracking for page views (used in pageRoute.tsx) */
14
- async function trackEvent(event, properties) {
15
- const posthog = await getClient();
16
- if (!posthog) return;
17
- const distinctId = properties.projectId ?? "unknown";
18
- posthog.capture({
19
- distinctId,
20
- event,
21
- properties
22
- });
23
- }
24
-
25
- //#endregion
26
- export { trackEvent };