camox 0.33.1 → 0.35.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 (146) hide show
  1. package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
  2. package/dist/core/components/lexical/SidebarLexicalEditor.js +7 -7
  3. package/dist/core/components/lexical/TextLinkPopover.js +4 -4
  4. package/dist/core/createApp.d.ts +2 -1
  5. package/dist/core/createBlock.d.ts +5 -1451
  6. package/dist/core/createBlock.js +450 -1603
  7. package/dist/core/defineDocument.d.ts +7 -0
  8. package/dist/core/defineDocument.js +7 -0
  9. package/dist/core/editing/BlockEditingRuntime.js +36 -0
  10. package/dist/core/editing/CompleteBlockEditingRuntime.js +76 -0
  11. package/dist/core/editing/createEditableBlock.d.ts +1455 -0
  12. package/dist/core/editing/createEditableBlock.js +1751 -0
  13. package/dist/core/lib/lexicalState.js +1 -1
  14. package/dist/features/agent-chat/components/AgentChatSidebar.js +4 -4
  15. package/dist/features/agent-chat/components/AgentChatThread.js +5 -5
  16. package/dist/features/content/components/AssetCard.js +1 -1
  17. package/dist/features/navigation/navigation.d.ts +39 -0
  18. package/dist/features/navigation/navigation.js +231 -0
  19. package/dist/features/page/PublishedPageContent.js +236 -0
  20. package/dist/features/page/PublishedPageExperience.js +23 -0
  21. package/dist/features/preview/CamoxPreview.d.ts +4 -0
  22. package/dist/features/preview/CamoxPreview.js +16 -16
  23. package/dist/features/preview/EditablePageContent.js +3 -0
  24. package/dist/features/preview/EditablePageExperience.js +24 -0
  25. package/dist/features/preview/components/AddBlockSidebar.js +7 -7
  26. package/dist/features/preview/components/AssetFieldEditor.js +1 -1
  27. package/dist/features/preview/components/AssetLightbox.js +46 -110
  28. package/dist/features/preview/components/BlockActionsPopover.js +6 -6
  29. package/dist/features/preview/components/CreatePageModal.js +7 -7
  30. package/dist/features/preview/components/DebouncedFieldEditor.js +2 -2
  31. package/dist/features/preview/components/DraftSwitchDialog.js +1 -1
  32. package/dist/features/preview/components/FieldToolbar.js +4 -4
  33. package/dist/features/preview/components/Frame.js +1 -1
  34. package/dist/features/preview/components/ItemFieldsEditor.js +3 -3
  35. package/dist/features/preview/components/LeftSidebar.js +1 -1
  36. package/dist/features/preview/components/LinkFieldEditor.js +3 -3
  37. package/dist/features/preview/components/Metadata.js +87 -0
  38. package/dist/features/preview/components/MultipleAssetFieldEditor.js +1 -1
  39. package/dist/features/preview/components/OverlayTracker.js +3 -3
  40. package/dist/features/preview/components/Overlays.js +3 -3
  41. package/dist/features/preview/components/PageEditorSidebar.js +5 -5
  42. package/dist/features/preview/components/PageInfoSidebar.js +158 -74
  43. package/dist/features/preview/components/PageLocationFieldset.js +1 -1
  44. package/dist/features/preview/components/PageNavigatorSidebar.js +10 -10
  45. package/dist/features/preview/components/PageNicknameField.js +2 -2
  46. package/dist/features/preview/components/PagePicker.js +4 -4
  47. package/dist/features/preview/components/PageTree.js +3 -3
  48. package/dist/features/preview/components/PeekedBlock.js +2 -2
  49. package/dist/features/preview/components/PreviewPanel.js +2 -2
  50. package/dist/features/preview/components/PreviewToolbar.js +2 -2
  51. package/dist/features/preview/components/PublishDialog.js +2 -2
  52. package/dist/features/preview/components/RepeatableItemsList.js +1 -1
  53. package/dist/features/preview/components/RightSidebar.js +1 -1
  54. package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
  55. package/dist/features/preview/components/useUpdateBlockPosition.js +4 -4
  56. package/dist/features/provider/AuthenticatedCamoxProvider.js +63 -0
  57. package/dist/features/provider/CamoxProvider.d.ts +5 -12
  58. package/dist/features/provider/CamoxProvider.js +81 -337
  59. package/dist/features/provider/CoreCamoxProvider.js +37 -0
  60. package/dist/features/provider/LocalhostPreviewProvider.js +159 -0
  61. package/dist/features/provider/components/CommandPalette.js +1 -1
  62. package/dist/features/provider/useAdminShortcuts.js +1 -1
  63. package/dist/features/routes/pageRuntime.js +6 -0
  64. package/dist/features/runtime/hydrationData.js +9 -0
  65. package/dist/features/runtime/pageApp.js +188 -0
  66. package/dist/features/runtime/pageClient.d.ts +6 -0
  67. package/dist/features/runtime/pageClient.js +20 -0
  68. package/dist/features/runtime/pageNavigation.js +170 -0
  69. package/dist/features/runtime/pageServer.d.ts +9 -0
  70. package/dist/features/runtime/pageServer.js +18 -0
  71. package/dist/features/runtime/runtime.d.ts +25 -0
  72. package/dist/features/runtime/runtime.js +44 -0
  73. package/dist/features/runtime/studioApp.d.ts +15 -0
  74. package/dist/features/runtime/studioApp.js +185 -0
  75. package/dist/features/runtime/studioClient.d.ts +6 -0
  76. package/dist/features/runtime/studioClient.js +20 -0
  77. package/dist/features/runtime/studioNavigation.js +115 -0
  78. package/dist/features/runtime/studioServer.d.ts +9 -0
  79. package/dist/features/runtime/studioServer.js +18 -0
  80. package/dist/features/studio/CamoxStudio.js +4 -4
  81. package/dist/features/studio/components/EnvironmentMenu.js +2 -2
  82. package/dist/features/studio/components/Navbar.js +7 -7
  83. package/dist/features/studio/components/ProjectMenu.js +9 -9
  84. package/dist/features/studio/components/UserButton.js +3 -3
  85. package/dist/features/studio/useTheme.js +1 -22
  86. package/dist/features/vite/appGeneration.js +16 -5
  87. package/dist/features/vite/blockBoilerplate.js +1 -1
  88. package/dist/features/vite/definitionsSync.js +4 -4
  89. package/dist/features/vite/routeGeneration.js +9 -156
  90. package/dist/features/vite/runtimeDev.js +291 -0
  91. package/dist/features/vite/utils.js +3 -1
  92. package/dist/features/vite/vite.d.ts +22 -3
  93. package/dist/features/vite/vite.js +42 -19
  94. package/dist/lib/auth.js +42 -68
  95. package/dist/lib/normalized-data.js +6 -6
  96. package/dist/lib/telemetry.js +1 -24
  97. package/dist/lib/utils.js +1 -1
  98. package/dist/lib/view-queries.js +28 -0
  99. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +114 -0
  100. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +25 -0
  101. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +1 -0
  102. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +1 -0
  103. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +20 -0
  104. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +8 -0
  105. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +1 -0
  106. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +18 -0
  107. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +161 -0
  108. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +6 -0
  109. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +54 -0
  110. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +8 -0
  111. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +32 -0
  112. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.d.ts +115 -0
  113. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +1 -0
  114. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +49 -0
  115. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +1 -0
  116. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +6 -0
  117. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +343 -0
  118. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +48 -0
  119. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +695 -0
  120. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +1 -0
  121. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +1 -0
  122. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +5 -0
  123. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/RawStream.d.ts +38 -0
  124. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/seroval-plugins.d.ts +1 -0
  125. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/transformer.d.ts +65 -0
  126. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +69 -0
  127. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +1 -0
  128. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +1 -0
  129. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +1 -0
  130. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +1 -0
  131. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +10 -0
  132. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +1 -0
  133. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +1 -0
  134. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +1 -0
  135. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +28 -0
  136. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +49 -0
  137. package/package.json +39 -12
  138. package/skills/camox-block/SKILL.md +4 -4
  139. package/skills/camox-cli/SKILL.md +3 -3
  140. package/skills/camox-layout/SKILL.md +2 -2
  141. package/dist/features/routes/ogRoute.d.ts +0 -12
  142. package/dist/features/routes/ogRoute.js +0 -20
  143. package/dist/features/routes/pageRoute.d.ts +0 -48
  144. package/dist/features/routes/pageRoute.js +0 -254
  145. package/dist/lib/api-client.d.ts +0 -7
  146. package/dist/lib/queries.d.ts +0 -12
@@ -1,13 +1,14 @@
1
+ import { useLocation, useNavigate } from "../navigation/navigation.js";
1
2
  import { actionsStore } from "../provider/actionsStore.js";
2
3
  import { useIsAuthenticated, useProjectSlug } from "../../lib/auth.js";
3
4
  import { getApiClient } from "../../lib/api-client.js";
4
- import { blockQueries, pageQueries, projectQueries } from "../../lib/queries.js";
5
- import { cn } from "../../lib/utils.js";
6
- import { previewStore } from "./previewStore.js";
7
5
  import { NormalizedDataProvider, seedBlockCaches, usePageBlocks } from "../../lib/normalized-data.js";
8
6
  import { BlockErrorBoundary } from "./components/BlockErrorBoundary.js";
7
+ import { blockQueries, pageQueries, projectQueries } from "../../lib/queries.js";
8
+ import { cn } from "../../lib/utils.js";
9
9
  import { useCamoxApp } from "../provider/components/CamoxAppContext.js";
10
10
  import { Navbar } from "../studio/components/Navbar.js";
11
+ import { previewStore } from "./previewStore.js";
11
12
  import { CreatePageModal } from "./components/CreatePageModal.js";
12
13
  import { DraftSwitchDialog } from "./components/DraftSwitchDialog.js";
13
14
  import { pageFullQueryFn } from "./previewQueryFns.js";
@@ -17,11 +18,10 @@ import { PreviewPanel } from "./components/PreviewPanel.js";
17
18
  import { RightSidebar } from "./components/RightSidebar.js";
18
19
  import { c } from "react/compiler-runtime";
19
20
  import { keepPreviousData, useQuery, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
20
- import { useLocation, useNavigate } from "@tanstack/react-router";
21
- import { useSelector } from "@xstate/store-react";
22
21
  import * as React from "react";
23
- import { queryKeys } from "@camox/api-contract/query-keys";
24
22
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
23
+ import { useSelector } from "@xstate/store-react";
24
+ import { queryKeys } from "@camox/api-contract/query-keys";
25
25
 
26
26
  //#region src/features/preview/CamoxPreview.tsx
27
27
  /**
@@ -51,9 +51,9 @@ function pageStructureQueryFn(path, projectSlug, source) {
51
51
  }
52
52
  function usePreviewedPage() {
53
53
  const $ = c(26);
54
- if ($[0] !== "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3") {
54
+ if ($[0] !== "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772") {
55
55
  for (let $i = 0; $i < 26; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
56
- $[0] = "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3";
56
+ $[0] = "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772";
57
57
  }
58
58
  const { pathname } = useLocation();
59
59
  const queryClient = useQueryClient();
@@ -150,9 +150,9 @@ function _temp(state) {
150
150
  }
151
151
  const BlockRenderer = (t0) => {
152
152
  const $ = c(23);
153
- if ($[0] !== "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3") {
153
+ if ($[0] !== "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772") {
154
154
  for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
155
- $[0] = "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3";
155
+ $[0] = "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772";
156
156
  }
157
157
  const { blockId, mode, showAddBlockTop, showAddBlockBottom } = t0;
158
158
  const previewSource = useSelector(previewStore, _temp3);
@@ -295,9 +295,9 @@ const PageContent = () => {
295
295
  };
296
296
  function useHydrateDraftCache() {
297
297
  const $ = c(7);
298
- if ($[0] !== "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3") {
298
+ if ($[0] !== "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772") {
299
299
  for (let $i = 0; $i < 7; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
300
- $[0] = "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3";
300
+ $[0] = "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772";
301
301
  }
302
302
  const isAuthenticated = useIsAuthenticated();
303
303
  const queryClient = useQueryClient();
@@ -348,9 +348,9 @@ function useHydrateDraftCache() {
348
348
  function _temp4() {}
349
349
  const CamoxPreview = (t0) => {
350
350
  const $ = c(35);
351
- if ($[0] !== "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3") {
351
+ if ($[0] !== "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772") {
352
352
  for (let $i = 0; $i < 35; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
353
- $[0] = "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3";
353
+ $[0] = "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772";
354
354
  }
355
355
  const { children } = t0;
356
356
  const isAuthenticated = useIsAuthenticated();
@@ -561,9 +561,9 @@ const CamoxPreview = (t0) => {
561
561
  };
562
562
  function usePreviewPagesActions() {
563
563
  const $ = c(13);
564
- if ($[0] !== "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3") {
564
+ if ($[0] !== "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772") {
565
565
  for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
566
- $[0] = "368878cc357f559a41241bfa8387ebbcf6457dabf75b71445e9ead672ed8deb3";
566
+ $[0] = "670b66d6cc9d1448ea3caf37ecbbb00789310266338f543cbce54775c049c772";
567
567
  }
568
568
  const navigate = useNavigate();
569
569
  const { pathname } = useLocation();
@@ -0,0 +1,3 @@
1
+ import { PageContent } from "./CamoxPreview.js";
2
+
3
+ export { };
@@ -0,0 +1,24 @@
1
+ import { CamoxPreview, PageContent } from "./CamoxPreview.js";
2
+ import { AuthenticatedCamoxProvider } from "../provider/AuthenticatedCamoxProvider.js";
3
+ import { CompleteBlockEditingRuntimeProvider } from "../../core/editing/CompleteBlockEditingRuntime.js";
4
+ import "./EditablePageContent.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/features/preview/EditablePageExperience.tsx
9
+ function EditablePageExperience(t0) {
10
+ const $ = c(2);
11
+ if ($[0] !== "62fa8b2b4207f6a9197bd7473308418337b4719a942b8cb83f05f5f584c962c9") {
12
+ for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
13
+ $[0] = "62fa8b2b4207f6a9197bd7473308418337b4719a942b8cb83f05f5f584c962c9";
14
+ }
15
+ let t1;
16
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
17
+ t1 = /* @__PURE__ */ jsx(AuthenticatedCamoxProvider, { children: /* @__PURE__ */ jsx(CompleteBlockEditingRuntimeProvider, { children: /* @__PURE__ */ jsx(CamoxPreview, { children: /* @__PURE__ */ jsx(PageContent, {}) }) }) });
18
+ $[1] = t1;
19
+ } else t1 = $[1];
20
+ return t1;
21
+ }
22
+
23
+ //#endregion
24
+ export { EditablePageExperience };
@@ -1,19 +1,19 @@
1
+ import { useLocation } from "../../navigation/navigation.js";
1
2
  import { useProjectSlug } from "../../../lib/auth.js";
3
+ import { usePageBlocks } from "../../../lib/normalized-data.js";
2
4
  import { blockMutations, blockQueries, projectQueries } from "../../../lib/queries.js";
5
+ import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
3
6
  import { trackClientEvent } from "../../../lib/telemetry-client.js";
4
7
  import { previewStore } from "../previewStore.js";
5
- import { usePageBlocks } from "../../../lib/normalized-data.js";
6
- import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
7
8
  import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
8
9
  import { usePreviewedPage } from "../CamoxPreview.js";
9
10
  import { c } from "react/compiler-runtime";
10
11
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
11
- import { useLocation } from "@tanstack/react-router";
12
- import { useSelector } from "@xstate/store-react";
13
12
  import { generateKeyBetween } from "fractional-indexing";
14
13
  import * as React from "react";
15
- import { queryKeys } from "@camox/api-contract/query-keys";
16
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ import { useSelector } from "@xstate/store-react";
16
+ import { queryKeys } from "@camox/api-contract/query-keys";
17
17
  import { Button } from "@camox/ui/button";
18
18
  import { ArrowLeft } from "lucide-react";
19
19
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@camox/ui/command";
@@ -22,9 +22,9 @@ import { PanelContent } from "@camox/ui/panel";
22
22
  //#region src/features/preview/components/AddBlockSidebar.tsx
23
23
  const AddBlockSidebar = () => {
24
24
  const $ = c(58);
25
- if ($[0] !== "27e7cb036200fff6fa774c3b5c9184e0f19bdb13228e0c714ed0cebcdf6abec5") {
25
+ if ($[0] !== "e90c6519081e1159c7b7b2dea03fb3f0a6ad85218cb70141acd0c7462b3c8ff5") {
26
26
  for (let $i = 0; $i < 58; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
27
- $[0] = "27e7cb036200fff6fa774c3b5c9184e0f19bdb13228e0c714ed0cebcdf6abec5";
27
+ $[0] = "e90c6519081e1159c7b7b2dea03fb3f0a6ad85218cb70141acd0c7462b3c8ff5";
28
28
  }
29
29
  const [highlightedValue, setHighlightedValue] = React.useState("");
30
30
  const queryClient = useQueryClient();
@@ -1,6 +1,6 @@
1
1
  import { useProjectSlug } from "../../../lib/auth.js";
2
- import { projectQueries } from "../../../lib/queries.js";
3
2
  import { transformImageUrl } from "../../../core/lib/imageTransform.js";
3
+ import { projectQueries } from "../../../lib/queries.js";
4
4
  import { UploadDropZone } from "../../content/components/UploadDropZone.js";
5
5
  import { UploadItemRow } from "../../content/components/UploadProgressDrawer.js";
6
6
  import { useFileUpload } from "../../../hooks/use-file-upload.js";
@@ -1,75 +1,30 @@
1
1
  import { getAuthCookieHeader, getAuthRequestCredentials } from "../../../lib/auth.js";
2
2
  import { getApiUrl, getEnvironmentName } from "../../../lib/api-client.js";
3
+ import { isRasterImage, transformImageUrl } from "../../../core/lib/imageTransform.js";
3
4
  import { fileMutations, fileQueries } from "../../../lib/queries.js";
4
5
  import { trackClientEvent } from "../../../lib/telemetry-client.js";
5
- import { isRasterImage, transformImageUrl } from "../../../core/lib/imageTransform.js";
6
6
  import { UploadDropZone } from "../../content/components/UploadDropZone.js";
7
7
  import { DebouncedFieldEditor } from "./DebouncedFieldEditor.js";
8
+ import { Metadata, MetadataRow, formatRelativeTime } from "./Metadata.js";
8
9
  import { c } from "react/compiler-runtime";
9
- import { Label } from "@camox/ui/label";
10
10
  import { useMutation, useQuery } from "@tanstack/react-query";
11
11
  import { useCallback, useEffect, useRef, useState } from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
- import { toast } from "@camox/ui/toaster";
14
13
  import { Button } from "@camox/ui/button";
15
14
  import { Check, Download, FileIcon, Info, Link, Loader2, Trash2, X } from "lucide-react";
15
+ import { toast } from "@camox/ui/toaster";
16
16
  import { Dialog, DialogContent, DialogTitle } from "@camox/ui/dialog";
17
+ import { Label } from "@camox/ui/label";
17
18
  import { ButtonGroup } from "@camox/ui/button-group";
18
19
  import { Switch } from "@camox/ui/switch";
19
20
  import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
20
21
 
21
22
  //#region src/features/preview/components/AssetLightbox.tsx
22
- function MetadataRow(t0) {
23
- const $ = c(9);
24
- if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
25
- for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
26
- $[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
27
- }
28
- const { label, children } = t0;
29
- let t1;
30
- if ($[1] !== label) {
31
- t1 = /* @__PURE__ */ jsx("span", {
32
- className: "shrink-0",
33
- children: label
34
- });
35
- $[1] = label;
36
- $[2] = t1;
37
- } else t1 = $[2];
38
- let t2;
39
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
40
- t2 = /* @__PURE__ */ jsx("span", { className: "border-border min-w-0 flex-1 border-b" });
41
- $[3] = t2;
42
- } else t2 = $[3];
43
- let t3;
44
- if ($[4] !== children) {
45
- t3 = /* @__PURE__ */ jsx("span", {
46
- className: "text-foreground shrink-0",
47
- children
48
- });
49
- $[4] = children;
50
- $[5] = t3;
51
- } else t3 = $[5];
52
- let t4;
53
- if ($[6] !== t1 || $[7] !== t3) {
54
- t4 = /* @__PURE__ */ jsxs("div", {
55
- className: "flex items-baseline gap-2",
56
- children: [
57
- t1,
58
- t2,
59
- t3
60
- ]
61
- });
62
- $[6] = t1;
63
- $[7] = t3;
64
- $[8] = t4;
65
- } else t4 = $[8];
66
- return t4;
67
- }
68
23
  function DeliveredSize(t0) {
69
24
  const $ = c(16);
70
- if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
25
+ if ($[0] !== "1dc3a839581aee4dce763fdadc5f599293f7d6288e481a0914cf562382a66ab9") {
71
26
  for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
72
- $[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
27
+ $[0] = "1dc3a839581aee4dce763fdadc5f599293f7d6288e481a0914cf562382a66ab9";
73
28
  }
74
29
  const { bytes, raw } = t0;
75
30
  if (bytes == null) {
@@ -138,9 +93,9 @@ function DeliveredSize(t0) {
138
93
  }
139
94
  function DeliveredLabel(t0) {
140
95
  const $ = c(4);
141
- if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
96
+ if ($[0] !== "1dc3a839581aee4dce763fdadc5f599293f7d6288e481a0914cf562382a66ab9") {
142
97
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
143
- $[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
98
+ $[0] = "1dc3a839581aee4dce763fdadc5f599293f7d6288e481a0914cf562382a66ab9";
144
99
  }
145
100
  const { children } = t0;
146
101
  let t1;
@@ -175,22 +130,6 @@ function DeliveredLabel(t0) {
175
130
  } else t2 = $[3];
176
131
  return t2;
177
132
  }
178
- function formatRelativeTime(epochMs) {
179
- const now = Temporal.Now.instant();
180
- const then = Temporal.Instant.fromEpochMilliseconds(epochMs);
181
- const totalSeconds = now.since(then).total("seconds");
182
- const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
183
- if (totalSeconds < 60) return rtf.format(-Math.floor(totalSeconds), "second");
184
- const totalMinutes = Math.floor(totalSeconds / 60);
185
- if (totalMinutes < 60) return rtf.format(-totalMinutes, "minute");
186
- const totalHours = Math.floor(totalMinutes / 60);
187
- if (totalHours < 24) return rtf.format(-totalHours, "hour");
188
- const totalDays = Math.floor(totalHours / 24);
189
- if (totalDays < 30) return rtf.format(-totalDays, "day");
190
- const totalMonths = Math.floor(totalDays / 30);
191
- if (totalMonths < 12) return rtf.format(-totalMonths, "month");
192
- return rtf.format(-Math.floor(totalDays / 365), "year");
193
- }
194
133
  function formatFileSize(bytes) {
195
134
  if (bytes < 1024) return `${bytes} B`;
196
135
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -555,48 +494,45 @@ const AssetLightbox = ({ open, onOpenChange, fileId }) => {
555
494
  alt: value_0
556
495
  })
557
496
  }),
558
- /* @__PURE__ */ jsxs("div", {
559
- className: "text-muted-foreground space-y-1 text-sm",
560
- children: [
561
- /* @__PURE__ */ jsx(MetadataRow, {
562
- label: "Format",
563
- children: file.mimeType.split("/").pop()?.toUpperCase() ?? "Unknown"
564
- }),
565
- /* @__PURE__ */ jsx(MetadataRow, {
566
- label: "Raw size",
567
- children: file.size != null ? formatFileSize(file.size) : "Unknown"
568
- }),
569
- isImage && deliveredSizes && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MetadataRow, {
570
- label: /* @__PURE__ */ jsx(DeliveredLabel, { children: "On phone" }),
571
- children: /* @__PURE__ */ jsx(DeliveredSize, {
572
- bytes: deliveredSizes.phone,
573
- raw: file.size
574
- })
575
- }), /* @__PURE__ */ jsx(MetadataRow, {
576
- label: /* @__PURE__ */ jsx(DeliveredLabel, { children: "On laptop" }),
577
- children: /* @__PURE__ */ jsx(DeliveredSize, {
578
- bytes: deliveredSizes.laptop,
579
- raw: file.size
580
- })
581
- })] }),
582
- /* @__PURE__ */ jsx(MetadataRow, {
583
- label: "Created",
584
- children: formatRelativeTime(file.createdAt)
585
- }),
586
- /* @__PURE__ */ jsx(MetadataRow, {
587
- label: "Updated",
588
- children: formatRelativeTime(file.updatedAt)
589
- }),
590
- /* @__PURE__ */ jsxs(MetadataRow, {
591
- label: "Used in",
592
- children: [
593
- usageCount == null && "…",
594
- usageCount === 0 && "No blocks",
595
- usageCount != null && usageCount > 0 && `${usageCount} ${usageCount === 1 ? "block" : "blocks"}`
596
- ]
497
+ /* @__PURE__ */ jsxs(Metadata, { children: [
498
+ /* @__PURE__ */ jsx(MetadataRow, {
499
+ label: "Format",
500
+ children: file.mimeType.split("/").pop()?.toUpperCase() ?? "Unknown"
501
+ }),
502
+ /* @__PURE__ */ jsx(MetadataRow, {
503
+ label: "Raw size",
504
+ children: file.size != null ? formatFileSize(file.size) : "Unknown"
505
+ }),
506
+ isImage && deliveredSizes && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MetadataRow, {
507
+ label: /* @__PURE__ */ jsx(DeliveredLabel, { children: "On phone" }),
508
+ children: /* @__PURE__ */ jsx(DeliveredSize, {
509
+ bytes: deliveredSizes.phone,
510
+ raw: file.size
597
511
  })
598
- ]
599
- }),
512
+ }), /* @__PURE__ */ jsx(MetadataRow, {
513
+ label: /* @__PURE__ */ jsx(DeliveredLabel, { children: "On laptop" }),
514
+ children: /* @__PURE__ */ jsx(DeliveredSize, {
515
+ bytes: deliveredSizes.laptop,
516
+ raw: file.size
517
+ })
518
+ })] }),
519
+ /* @__PURE__ */ jsx(MetadataRow, {
520
+ label: "Created",
521
+ children: formatRelativeTime(file.createdAt)
522
+ }),
523
+ /* @__PURE__ */ jsx(MetadataRow, {
524
+ label: "Updated",
525
+ children: formatRelativeTime(file.updatedAt)
526
+ }),
527
+ /* @__PURE__ */ jsxs(MetadataRow, {
528
+ label: "Used in",
529
+ children: [
530
+ usageCount == null && "…",
531
+ usageCount === 0 && "No blocks",
532
+ usageCount != null && usageCount > 0 && `${usageCount} ${usageCount === 1 ? "block" : "blocks"}`
533
+ ]
534
+ })
535
+ ] }),
600
536
  /* @__PURE__ */ jsx("input", {
601
537
  ref: replaceInputRef,
602
538
  type: "file",
@@ -1,22 +1,22 @@
1
1
  import { actionsStore } from "../../provider/actionsStore.js";
2
+ import { usePageBlocks } from "../../../lib/normalized-data.js";
2
3
  import { blockMutations, repeatableItemMutations } from "../../../lib/queries.js";
3
- import { trackClientEvent } from "../../../lib/telemetry-client.js";
4
4
  import { formatShortcut } from "../../../lib/utils.js";
5
- import { previewStore, selectionItemId } from "../previewStore.js";
6
- import { usePageBlocks } from "../../../lib/normalized-data.js";
7
5
  import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
+ import { trackClientEvent } from "../../../lib/telemetry-client.js";
7
+ import { previewStore, selectionItemId } from "../previewStore.js";
8
8
  import { useRequireDraftSource } from "../../../core/hooks/useRequireDraftSource.js";
9
9
  import { useUpdateBlockPosition } from "./useUpdateBlockPosition.js";
10
10
  import { usePreviewedPage } from "../CamoxPreview.js";
11
11
  import { c } from "react/compiler-runtime";
12
- import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
13
12
  import { useMutation } from "@tanstack/react-query";
14
- import { useSelector } from "@xstate/store-react";
15
13
  import * as React from "react";
16
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
- import { toast } from "@camox/ui/toaster";
15
+ import { useSelector } from "@xstate/store-react";
18
16
  import { Copy, Pen, Settings, Trash2 } from "lucide-react";
19
17
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
18
+ import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
19
+ import { toast } from "@camox/ui/toaster";
20
20
  import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "@camox/ui/command";
21
21
 
22
22
  //#region src/features/preview/components/BlockActionsPopover.tsx
@@ -1,21 +1,21 @@
1
+ import { useNavigate } from "../../navigation/navigation.js";
1
2
  import { useProjectSlug } from "../../../lib/auth.js";
2
3
  import { layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
4
+ import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
3
5
  import { trackClientEvent } from "../../../lib/telemetry-client.js";
4
6
  import { previewStore } from "../previewStore.js";
5
- import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
6
7
  import { PageLocationFieldset } from "./PageLocationFieldset.js";
7
8
  import { PageNicknameField } from "./PageNicknameField.js";
8
9
  import { c } from "react/compiler-runtime";
9
- import { Label } from "@camox/ui/label";
10
10
  import { useMutation, useQuery } from "@tanstack/react-query";
11
- import { useNavigate } from "@tanstack/react-router";
12
- import { useSelector } from "@xstate/store-react";
13
11
  import { useEffect } from "react";
14
12
  import { jsx, jsxs } from "react/jsx-runtime";
15
- import { toast } from "@camox/ui/toaster";
13
+ import { useSelector } from "@xstate/store-react";
16
14
  import { Button } from "@camox/ui/button";
17
15
  import { Spinner } from "@camox/ui/spinner";
16
+ import { toast } from "@camox/ui/toaster";
18
17
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@camox/ui/dialog";
18
+ import { Label } from "@camox/ui/label";
19
19
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@camox/ui/select";
20
20
  import { useForm } from "@tanstack/react-form";
21
21
 
@@ -27,9 +27,9 @@ const slugifyPathSegment = (nickname) => {
27
27
  };
28
28
  const CreatePageModal = () => {
29
29
  const $ = c(56);
30
- if ($[0] !== "0bdc1cbbe76a506d23a387e0cb27a62f7a2ffc3ace0fcab2f383b3d3afedba17") {
30
+ if ($[0] !== "195c3824082641033afd94300951785a25a5c10bf582f4f474c373a01e440e23") {
31
31
  for (let $i = 0; $i < 56; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
32
- $[0] = "0bdc1cbbe76a506d23a387e0cb27a62f7a2ffc3ace0fcab2f383b3d3afedba17";
32
+ $[0] = "195c3824082641033afd94300951785a25a5c10bf582f4f474c373a01e440e23";
33
33
  }
34
34
  const projectSlug = useProjectSlug();
35
35
  const open = useSelector(previewStore, _temp);
@@ -1,9 +1,9 @@
1
1
  import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { Input } from "@camox/ui/input";
4
- import { Label } from "@camox/ui/label";
5
3
  import * as React from "react";
6
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Label } from "@camox/ui/label";
6
+ import { Input } from "@camox/ui/input";
7
7
  import { Textarea } from "@camox/ui/textarea";
8
8
 
9
9
  //#region src/features/preview/components/DebouncedFieldEditor.tsx
@@ -1,7 +1,7 @@
1
1
  import { previewStore } from "../previewStore.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { useSelector } from "@xstate/store-react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useSelector } from "@xstate/store-react";
5
5
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
6
6
 
7
7
  //#region src/features/preview/components/DraftSwitchDialog.tsx
@@ -1,13 +1,13 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { isOverlayMessage } from "../overlayMessages.js";
3
2
  import { previewStore } from "../previewStore.js";
4
- import { FORMAT_FLAGS } from "../../../core/lib/modifierFormats.js";
5
3
  import { TextLinkPopover } from "../../../core/components/lexical/TextLinkPopover.js";
4
+ import { FORMAT_FLAGS } from "../../../core/lib/modifierFormats.js";
5
+ import { isOverlayMessage } from "../overlayMessages.js";
6
6
  import { c } from "react/compiler-runtime";
7
- import { useSelector } from "@xstate/store-react";
8
7
  import * as React from "react";
9
- import { Kbd } from "@camox/ui/kbd";
10
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { useSelector } from "@xstate/store-react";
10
+ import { Kbd } from "@camox/ui/kbd";
11
11
  import { Button } from "@camox/ui/button";
12
12
  import { Bold, Italic } from "lucide-react";
13
13
  import { ButtonGroup } from "@camox/ui/button-group";
@@ -1,8 +1,8 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
- import { createPortal } from "react-dom";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { createPortal } from "react-dom";
6
6
 
7
7
  //#region src/features/preview/components/Frame.tsx
8
8
  const FrameContext = React.createContext({
@@ -1,14 +1,14 @@
1
- import { previewStore } from "../previewStore.js";
2
1
  import { isFileMarker, isItemMarker, resolveFileMarker } from "../../../lib/normalized-data.js";
2
+ import { previewStore } from "../previewStore.js";
3
3
  import { SidebarLexicalEditor } from "../../../core/components/lexical/SidebarLexicalEditor.js";
4
4
  import { RepeatableItemsList } from "./RepeatableItemsList.js";
5
5
  import { c } from "react/compiler-runtime";
6
- import { Input } from "@camox/ui/input";
7
- import { Label } from "@camox/ui/label";
8
6
  import * as React from "react";
9
7
  import { jsx, jsxs } from "react/jsx-runtime";
10
8
  import { FileIcon, ImageIcon, Images, Link2 } from "lucide-react";
9
+ import { Label } from "@camox/ui/label";
11
10
  import { useForm } from "@tanstack/react-form";
11
+ import { Input } from "@camox/ui/input";
12
12
 
13
13
  //#region src/features/preview/components/ItemFieldsEditor.tsx
14
14
  const formatFieldName = (fieldName) => {
@@ -2,8 +2,8 @@ import { previewStore } from "../previewStore.js";
2
2
  import { AddBlockSidebar } from "./AddBlockSidebar.js";
3
3
  import { PageNavigatorSidebar } from "./PageNavigatorSidebar.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { useSelector } from "@xstate/store-react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { useSelector } from "@xstate/store-react";
7
7
 
8
8
  //#region src/features/preview/components/LeftSidebar.tsx
9
9
  const getLeftSidebarRoute = ({ isAddBlockSidebarOpen }) => {
@@ -3,14 +3,14 @@ import { pageQueries, projectQueries } from "../../../lib/queries.js";
3
3
  import { cn } from "../../../lib/utils.js";
4
4
  import { useDebouncedField } from "../../../hooks/use-debounced-field.js";
5
5
  import { c } from "react/compiler-runtime";
6
- import { Input } from "@camox/ui/input";
7
- import { Label } from "@camox/ui/label";
8
- import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
9
6
  import { useQuery } from "@tanstack/react-query";
10
7
  import * as React from "react";
11
8
  import { jsx, jsxs } from "react/jsx-runtime";
12
9
  import { Button } from "@camox/ui/button";
13
10
  import { Check, ChevronsUpDown } from "lucide-react";
11
+ import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
12
+ import { Label } from "@camox/ui/label";
13
+ import { Input } from "@camox/ui/input";
14
14
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@camox/ui/command";
15
15
  import { Switch } from "@camox/ui/switch";
16
16
  import { Tabs, TabsList, TabsTrigger } from "@camox/ui/tabs";
@@ -0,0 +1,87 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/features/preview/components/Metadata.tsx
5
+ function Metadata(t0) {
6
+ const $ = c(3);
7
+ if ($[0] !== "0cab1dfcfdb2036df169f46d25dd9f41685cc99f911ce3094b6e2273b2fb83fa") {
8
+ for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
9
+ $[0] = "0cab1dfcfdb2036df169f46d25dd9f41685cc99f911ce3094b6e2273b2fb83fa";
10
+ }
11
+ const { children } = t0;
12
+ let t1;
13
+ if ($[1] !== children) {
14
+ t1 = /* @__PURE__ */ jsx("div", {
15
+ className: "text-muted-foreground space-y-1 text-sm",
16
+ children
17
+ });
18
+ $[1] = children;
19
+ $[2] = t1;
20
+ } else t1 = $[2];
21
+ return t1;
22
+ }
23
+ function MetadataRow(t0) {
24
+ const $ = c(9);
25
+ if ($[0] !== "0cab1dfcfdb2036df169f46d25dd9f41685cc99f911ce3094b6e2273b2fb83fa") {
26
+ for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
27
+ $[0] = "0cab1dfcfdb2036df169f46d25dd9f41685cc99f911ce3094b6e2273b2fb83fa";
28
+ }
29
+ const { label, children } = t0;
30
+ let t1;
31
+ if ($[1] !== label) {
32
+ t1 = /* @__PURE__ */ jsx("span", {
33
+ className: "shrink-0",
34
+ children: label
35
+ });
36
+ $[1] = label;
37
+ $[2] = t1;
38
+ } else t1 = $[2];
39
+ let t2;
40
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t2 = /* @__PURE__ */ jsx("span", { className: "border-border min-w-0 flex-1 border-b" });
42
+ $[3] = t2;
43
+ } else t2 = $[3];
44
+ let t3;
45
+ if ($[4] !== children) {
46
+ t3 = /* @__PURE__ */ jsx("span", {
47
+ className: "text-foreground min-w-0 truncate",
48
+ children
49
+ });
50
+ $[4] = children;
51
+ $[5] = t3;
52
+ } else t3 = $[5];
53
+ let t4;
54
+ if ($[6] !== t1 || $[7] !== t3) {
55
+ t4 = /* @__PURE__ */ jsxs("div", {
56
+ className: "flex items-baseline gap-2",
57
+ children: [
58
+ t1,
59
+ t2,
60
+ t3
61
+ ]
62
+ });
63
+ $[6] = t1;
64
+ $[7] = t3;
65
+ $[8] = t4;
66
+ } else t4 = $[8];
67
+ return t4;
68
+ }
69
+ function formatRelativeTime(epochMs) {
70
+ const now = Temporal.Now.instant();
71
+ const then = Temporal.Instant.fromEpochMilliseconds(epochMs);
72
+ const totalSeconds = now.since(then).total("seconds");
73
+ const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
74
+ if (totalSeconds < 60) return rtf.format(-Math.floor(totalSeconds), "second");
75
+ const totalMinutes = Math.floor(totalSeconds / 60);
76
+ if (totalMinutes < 60) return rtf.format(-totalMinutes, "minute");
77
+ const totalHours = Math.floor(totalMinutes / 60);
78
+ if (totalHours < 24) return rtf.format(-totalHours, "hour");
79
+ const totalDays = Math.floor(totalHours / 24);
80
+ if (totalDays < 30) return rtf.format(-totalDays, "day");
81
+ const totalMonths = Math.floor(totalDays / 30);
82
+ if (totalMonths < 12) return rtf.format(-totalMonths, "month");
83
+ return rtf.format(-Math.floor(totalDays / 365), "year");
84
+ }
85
+
86
+ //#endregion
87
+ export { Metadata, MetadataRow, formatRelativeTime };
@@ -1,7 +1,7 @@
1
1
  import { useProjectSlug } from "../../../lib/auth.js";
2
+ import { transformImageUrl } from "../../../core/lib/imageTransform.js";
2
3
  import { projectQueries } from "../../../lib/queries.js";
3
4
  import { cn } from "../../../lib/utils.js";
4
- import { transformImageUrl } from "../../../core/lib/imageTransform.js";
5
5
  import { UploadDropZone } from "../../content/components/UploadDropZone.js";
6
6
  import { useFileUpload } from "../../../hooks/use-file-upload.js";
7
7
  import { AssetLightbox } from "./AssetLightbox.js";