camox 0.33.0 → 0.34.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.
- package/dist/components/AuthGate.js +5 -4
- package/dist/core/createBlock.js +19 -19
- package/dist/core/defineDocument.d.ts +7 -0
- package/dist/core/defineDocument.js +7 -0
- package/dist/features/agent-chat/components/AgentChatSidebar.js +3 -3
- package/dist/features/agent-chat/components/AgentChatThread.js +10 -11
- package/dist/features/navigation/navigation.d.ts +39 -0
- package/dist/features/navigation/navigation.js +231 -0
- package/dist/features/preview/CamoxPreview.d.ts +3 -0
- package/dist/features/preview/CamoxPreview.js +12 -12
- package/dist/features/preview/components/AddBlockSidebar.js +4 -4
- package/dist/features/preview/components/AssetLightbox.js +10 -9
- package/dist/features/preview/components/CreatePageModal.js +3 -3
- package/dist/features/preview/components/FieldToolbar.js +1 -1
- package/dist/features/preview/components/PageInfoSidebar.js +23 -23
- package/dist/features/preview/components/PageNavigatorSidebar.js +6 -6
- package/dist/features/preview/components/PagePicker.js +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +3 -3
- package/dist/features/preview/components/useUpdateBlockPosition.js +3 -3
- package/dist/features/provider/CamoxProvider.js +10 -8
- package/dist/features/routes/pageRuntime.js +6 -0
- package/dist/features/runtime/pageApp.js +75 -0
- package/dist/features/runtime/pageClient.d.ts +7 -0
- package/dist/features/runtime/pageClient.js +37 -0
- package/dist/features/runtime/pageNavigation.js +170 -0
- package/dist/features/runtime/pageServer.d.ts +9 -0
- package/dist/features/runtime/pageServer.js +18 -0
- package/dist/features/runtime/runtime.d.ts +24 -0
- package/dist/features/runtime/runtime.js +44 -0
- package/dist/features/runtime/studioApp.d.ts +15 -0
- package/dist/features/runtime/studioApp.js +117 -0
- package/dist/features/runtime/studioNavigation.js +115 -0
- package/dist/features/runtime/studioServer.d.ts +9 -0
- package/dist/features/runtime/studioServer.js +18 -0
- package/dist/features/studio/CamoxStudio.js +3 -3
- package/dist/features/studio/components/Navbar.js +7 -7
- package/dist/features/studio/components/ProjectMenu.js +9 -9
- package/dist/features/studio/components/UserButton.js +3 -3
- package/dist/features/vite/appGeneration.js +16 -5
- package/dist/features/vite/blockBoilerplate.js +1 -1
- package/dist/features/vite/definitionsSync.js +4 -4
- package/dist/features/vite/routeGeneration.js +9 -156
- package/dist/features/vite/runtimeDev.js +270 -0
- package/dist/features/vite/utils.js +3 -1
- package/dist/features/vite/vite.d.ts +22 -3
- package/dist/features/vite/vite.js +36 -19
- package/dist/hooks/use-file-upload.js +3 -1
- package/dist/lib/api-client.js +6 -3
- package/dist/lib/auth.js +45 -68
- package/dist/lib/queries.js +6 -4
- package/dist/lib/telemetry.js +1 -24
- package/dist/lib/utils.js +1 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +114 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +25 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +20 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +8 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +18 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +161 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +6 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +54 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +8 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +32 -0
- 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
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +49 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +6 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +343 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +48 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +695 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +5 -0
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +69 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +10 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +1 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +28 -0
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +49 -0
- package/package.json +34 -12
- package/skills/camox-block/SKILL.md +4 -4
- package/skills/camox-cli/SKILL.md +3 -3
- package/skills/camox-layout/SKILL.md +2 -2
- package/dist/features/routes/ogRoute.d.ts +0 -12
- package/dist/features/routes/ogRoute.js +0 -20
- package/dist/features/routes/pageRoute.d.ts +0 -48
- package/dist/features/routes/pageRoute.js +0 -254
- package/dist/lib/api-client.d.ts +0 -7
- package/dist/lib/queries.d.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAuthCookieHeader } from "../../../lib/auth.js";
|
|
1
|
+
import { getAuthCookieHeader, getAuthRequestCredentials } from "../../../lib/auth.js";
|
|
2
2
|
import { getApiUrl, getEnvironmentName } from "../../../lib/api-client.js";
|
|
3
3
|
import { fileMutations, fileQueries } from "../../../lib/queries.js";
|
|
4
4
|
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
@@ -21,9 +21,9 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
|
21
21
|
//#region src/features/preview/components/AssetLightbox.tsx
|
|
22
22
|
function MetadataRow(t0) {
|
|
23
23
|
const $ = c(9);
|
|
24
|
-
if ($[0] !== "
|
|
24
|
+
if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
|
|
25
25
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
|
-
$[0] = "
|
|
26
|
+
$[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
|
|
27
27
|
}
|
|
28
28
|
const { label, children } = t0;
|
|
29
29
|
let t1;
|
|
@@ -67,9 +67,9 @@ function MetadataRow(t0) {
|
|
|
67
67
|
}
|
|
68
68
|
function DeliveredSize(t0) {
|
|
69
69
|
const $ = c(16);
|
|
70
|
-
if ($[0] !== "
|
|
70
|
+
if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
|
|
71
71
|
for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
72
|
-
$[0] = "
|
|
72
|
+
$[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
|
|
73
73
|
}
|
|
74
74
|
const { bytes, raw } = t0;
|
|
75
75
|
if (bytes == null) {
|
|
@@ -138,9 +138,9 @@ function DeliveredSize(t0) {
|
|
|
138
138
|
}
|
|
139
139
|
function DeliveredLabel(t0) {
|
|
140
140
|
const $ = c(4);
|
|
141
|
-
if ($[0] !== "
|
|
141
|
+
if ($[0] !== "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553") {
|
|
142
142
|
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
143
|
-
$[0] = "
|
|
143
|
+
$[0] = "57c6d07de7206779e7a888ace2e7d9e6b374e2f3c9aed614f5bd25f704694553";
|
|
144
144
|
}
|
|
145
145
|
const { children } = t0;
|
|
146
146
|
let t1;
|
|
@@ -302,12 +302,13 @@ const AssetLightbox = ({ open, onOpenChange, fileId }) => {
|
|
|
302
302
|
formData.append("file", droppedFile);
|
|
303
303
|
formData.append("projectId", String(file?.projectId ?? 0));
|
|
304
304
|
const envName = getEnvironmentName();
|
|
305
|
+
const authCookieHeader = getAuthCookieHeader();
|
|
305
306
|
const uploadRes = await fetch(`${getApiUrl()}/files/upload`, {
|
|
306
307
|
method: "POST",
|
|
307
308
|
body: formData,
|
|
308
|
-
credentials:
|
|
309
|
+
credentials: getAuthRequestCredentials(authCookieHeader),
|
|
309
310
|
headers: {
|
|
310
|
-
"Better-Auth-Cookie":
|
|
311
|
+
...authCookieHeader ? { "Better-Auth-Cookie": authCookieHeader } : {},
|
|
311
312
|
...envName ? { "x-environment-name": envName } : {}
|
|
312
313
|
}
|
|
313
314
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
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";
|
|
3
4
|
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
@@ -8,7 +9,6 @@ import { PageNicknameField } from "./PageNicknameField.js";
|
|
|
8
9
|
import { c } from "react/compiler-runtime";
|
|
9
10
|
import { Label } from "@camox/ui/label";
|
|
10
11
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
11
|
-
import { useNavigate } from "@tanstack/react-router";
|
|
12
12
|
import { useSelector } from "@xstate/store-react";
|
|
13
13
|
import { useEffect } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -27,9 +27,9 @@ const slugifyPathSegment = (nickname) => {
|
|
|
27
27
|
};
|
|
28
28
|
const CreatePageModal = () => {
|
|
29
29
|
const $ = c(56);
|
|
30
|
-
if ($[0] !== "
|
|
30
|
+
if ($[0] !== "195c3824082641033afd94300951785a25a5c10bf582f4f474c373a01e440e23") {
|
|
31
31
|
for (let $i = 0; $i < 56; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
32
|
-
$[0] = "
|
|
32
|
+
$[0] = "195c3824082641033afd94300951785a25a5c10bf582f4f474c373a01e440e23";
|
|
33
33
|
}
|
|
34
34
|
const projectSlug = useProjectSlug();
|
|
35
35
|
const open = useSelector(previewStore, _temp);
|
|
@@ -6,8 +6,8 @@ import { TextLinkPopover } from "../../../core/components/lexical/TextLinkPopove
|
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { useSelector } from "@xstate/store-react";
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import { Kbd } from "@camox/ui/kbd";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import { useNavigate } from "../../navigation/navigation.js";
|
|
1
2
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
2
3
|
import { blockQueries, layoutQueries, pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
|
|
3
4
|
import { trackClientEvent } from "../../../lib/telemetry-client.js";
|
|
@@ -12,7 +13,6 @@ import { c } from "react/compiler-runtime";
|
|
|
12
13
|
import { Input } from "@camox/ui/input";
|
|
13
14
|
import { Label } from "@camox/ui/label";
|
|
14
15
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
|
-
import { useNavigate } from "@tanstack/react-router";
|
|
16
16
|
import * as React from "react";
|
|
17
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { toast } from "@camox/ui/toaster";
|
|
@@ -30,9 +30,9 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
|
30
30
|
//#region src/features/preview/components/PageInfoSidebar.tsx
|
|
31
31
|
const usePageMetadataData = (pageId) => {
|
|
32
32
|
const $ = c(29);
|
|
33
|
-
if ($[0] !== "
|
|
33
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
34
34
|
for (let $i = 0; $i < 29; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
35
|
-
$[0] = "
|
|
35
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
36
36
|
}
|
|
37
37
|
const projectSlug = useProjectSlug();
|
|
38
38
|
const camoxApp = useCamoxApp();
|
|
@@ -131,9 +131,9 @@ const usePageMetadataData = (pageId) => {
|
|
|
131
131
|
};
|
|
132
132
|
const PageInfoSidebar = (t0) => {
|
|
133
133
|
const $ = c(40);
|
|
134
|
-
if ($[0] !== "
|
|
134
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
135
135
|
for (let $i = 0; $i < 40; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
136
|
-
$[0] = "
|
|
136
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
137
137
|
}
|
|
138
138
|
const { pageId } = t0;
|
|
139
139
|
const data = usePageMetadataData(pageId);
|
|
@@ -341,9 +341,9 @@ const PageInfoSidebar = (t0) => {
|
|
|
341
341
|
};
|
|
342
342
|
const PageNicknameSidebarEditor = (t0) => {
|
|
343
343
|
const $ = c(21);
|
|
344
|
-
if ($[0] !== "
|
|
344
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
345
345
|
for (let $i = 0; $i < 21; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
346
|
-
$[0] = "
|
|
346
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
347
347
|
}
|
|
348
348
|
const { data } = t0;
|
|
349
349
|
const { page } = data;
|
|
@@ -452,9 +452,9 @@ const PageNicknameSidebarEditor = (t0) => {
|
|
|
452
452
|
};
|
|
453
453
|
const PageLayoutSidebarSelect = (t0) => {
|
|
454
454
|
const $ = c(30);
|
|
455
|
-
if ($[0] !== "
|
|
455
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
456
456
|
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
457
|
-
$[0] = "
|
|
457
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
458
458
|
}
|
|
459
459
|
const { data } = t0;
|
|
460
460
|
const { page, layouts, camoxApp } = data;
|
|
@@ -586,9 +586,9 @@ const PageLayoutSidebarSelect = (t0) => {
|
|
|
586
586
|
};
|
|
587
587
|
const PageStructureModal = (t0) => {
|
|
588
588
|
const $ = c(10);
|
|
589
|
-
if ($[0] !== "
|
|
589
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
590
590
|
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
591
|
-
$[0] = "
|
|
591
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
592
592
|
}
|
|
593
593
|
const { open, onOpenChange, pageId } = t0;
|
|
594
594
|
const data = usePageMetadataData(pageId);
|
|
@@ -762,9 +762,9 @@ const PageStructureEditor = ({ data, includeNickname = true, includeLayout = tru
|
|
|
762
762
|
};
|
|
763
763
|
const PageSeoModal = (t0) => {
|
|
764
764
|
const $ = c(11);
|
|
765
|
-
if ($[0] !== "
|
|
765
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
766
766
|
for (let $i = 0; $i < 11; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
767
|
-
$[0] = "
|
|
767
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
768
768
|
}
|
|
769
769
|
const { open, onOpenChange, pageId } = t0;
|
|
770
770
|
const { page, metaTitle, pageLayoutRecord, project } = usePageMetadataData(pageId);
|
|
@@ -809,9 +809,9 @@ const PageSeoModal = (t0) => {
|
|
|
809
809
|
};
|
|
810
810
|
const PageSeoEditor = (t0) => {
|
|
811
811
|
const $ = c(43);
|
|
812
|
-
if ($[0] !== "
|
|
812
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
813
813
|
for (let $i = 0; $i < 43; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
814
|
-
$[0] = "
|
|
814
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
815
815
|
}
|
|
816
816
|
const { page, metaTitle, layoutId, projectName } = t0;
|
|
817
817
|
let t1;
|
|
@@ -984,9 +984,9 @@ const PageSeoEditor = (t0) => {
|
|
|
984
984
|
};
|
|
985
985
|
const PageMarkdownModal = (t0) => {
|
|
986
986
|
const $ = c(10);
|
|
987
|
-
if ($[0] !== "
|
|
987
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
988
988
|
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
989
|
-
$[0] = "
|
|
989
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
990
990
|
}
|
|
991
991
|
const { open, onOpenChange, pageId, metaTitle, metaDescription } = t0;
|
|
992
992
|
let t1;
|
|
@@ -1029,9 +1029,9 @@ function truncateText(text, maxLen) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
const SearchEnginePreview = (t0) => {
|
|
1031
1031
|
const $ = c(17);
|
|
1032
|
-
if ($[0] !== "
|
|
1032
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
1033
1033
|
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1034
|
-
$[0] = "
|
|
1034
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
1035
1035
|
}
|
|
1036
1036
|
const { page, metaTitle, metaDescription } = t0;
|
|
1037
1037
|
const url = `${typeof window !== "undefined" ? window.location.origin : ""}${page.fullPath}`;
|
|
@@ -1114,9 +1114,9 @@ const SearchEnginePreview = (t0) => {
|
|
|
1114
1114
|
};
|
|
1115
1115
|
const SocialPreviewSection = (t0) => {
|
|
1116
1116
|
const $ = c(60);
|
|
1117
|
-
if ($[0] !== "
|
|
1117
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
1118
1118
|
for (let $i = 0; $i < 60; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1119
|
-
$[0] = "
|
|
1119
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
1120
1120
|
}
|
|
1121
1121
|
const { page, metaTitle, metaDescription, layoutId, projectName } = t0;
|
|
1122
1122
|
const pageMetaTitle = page.metaTitle ?? page.pathSegment;
|
|
@@ -1390,9 +1390,9 @@ const SocialPreviewSection = (t0) => {
|
|
|
1390
1390
|
};
|
|
1391
1391
|
const PageMarkdownPreview = (t0) => {
|
|
1392
1392
|
const $ = c(9);
|
|
1393
|
-
if ($[0] !== "
|
|
1393
|
+
if ($[0] !== "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a") {
|
|
1394
1394
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
1395
|
-
$[0] = "
|
|
1395
|
+
$[0] = "c39febcc5c5794903cee3680a6ac31c541b522c2ffa947517d81cc13746b8b7a";
|
|
1396
1396
|
}
|
|
1397
1397
|
const { pageId, metaTitle, metaDescription } = t0;
|
|
1398
1398
|
let t1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocation } from "../../navigation/navigation.js";
|
|
1
2
|
import { actionsStore } from "../../provider/actionsStore.js";
|
|
2
3
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
3
4
|
import { pageMutations } from "../../../lib/queries.js";
|
|
@@ -11,11 +12,10 @@ import { PublishDialog } from "./PublishDialog.js";
|
|
|
11
12
|
import { c } from "react/compiler-runtime";
|
|
12
13
|
import { Label } from "@camox/ui/label";
|
|
13
14
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
14
|
-
import { useLocation } from "@tanstack/react-router";
|
|
15
15
|
import { useSelector } from "@xstate/store-react";
|
|
16
16
|
import * as React from "react";
|
|
17
|
-
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
18
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
19
19
|
import { toast } from "@camox/ui/toaster";
|
|
20
20
|
import { Button } from "@camox/ui/button";
|
|
21
21
|
import { MoreHorizontal } from "lucide-react";
|
|
@@ -28,9 +28,9 @@ import { Switch } from "@camox/ui/switch";
|
|
|
28
28
|
//#region src/features/preview/components/PageNavigatorSidebar.tsx
|
|
29
29
|
const PageNavigatorPublishRow = (t0) => {
|
|
30
30
|
const $ = c(102);
|
|
31
|
-
if ($[0] !== "
|
|
31
|
+
if ($[0] !== "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827") {
|
|
32
32
|
for (let $i = 0; $i < 102; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
33
|
-
$[0] = "
|
|
33
|
+
$[0] = "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827";
|
|
34
34
|
}
|
|
35
35
|
const { page } = t0;
|
|
36
36
|
const previewSource = useSelector(previewStore, _temp);
|
|
@@ -519,9 +519,9 @@ const PageNavigatorPublishRow = (t0) => {
|
|
|
519
519
|
};
|
|
520
520
|
const PageNavigatorSidebar = (t0) => {
|
|
521
521
|
const $ = c(8);
|
|
522
|
-
if ($[0] !== "
|
|
522
|
+
if ($[0] !== "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827") {
|
|
523
523
|
for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
524
|
-
$[0] = "
|
|
524
|
+
$[0] = "a5c20885a61abde1950615d7a7429cbcd798dd8fc1df8fe6d4416f9d12ca4827";
|
|
525
525
|
}
|
|
526
526
|
const { page } = t0;
|
|
527
527
|
let t1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocation, useNavigate } from "../../navigation/navigation.js";
|
|
1
2
|
import { useProjectSlug } from "../../../lib/auth.js";
|
|
2
3
|
import { pageMutations, pageQueries, projectQueries } from "../../../lib/queries.js";
|
|
3
4
|
import { cn } from "../../../lib/utils.js";
|
|
@@ -5,7 +6,6 @@ import { previewStore } from "../previewStore.js";
|
|
|
5
6
|
import { PageStatusBadge } from "./PageStatusBadge.js";
|
|
6
7
|
import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
|
|
7
8
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
8
|
-
import { useLocation, useNavigate } from "@tanstack/react-router";
|
|
9
9
|
import { useSelector } from "@xstate/store-react";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,9 +16,9 @@ import { Toggle } from "@camox/ui/toggle";
|
|
|
16
16
|
//#region src/features/preview/components/PreviewToolbar.tsx
|
|
17
17
|
const PreviewToolbar = (t0) => {
|
|
18
18
|
const $ = c(68);
|
|
19
|
-
if ($[0] !== "
|
|
19
|
+
if ($[0] !== "68e35a20462160afd6c2aeaffaf03edcd93240318bca212e17001e624c1d829c") {
|
|
20
20
|
for (let $i = 0; $i < 68; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
21
|
-
$[0] = "
|
|
21
|
+
$[0] = "68e35a20462160afd6c2aeaffaf03edcd93240318bca212e17001e624c1d829c";
|
|
22
22
|
}
|
|
23
23
|
const { onEditModeChange } = t0;
|
|
24
24
|
const isEditMode = useSelector(previewStore, _temp);
|
|
@@ -297,7 +297,7 @@ const PreviewToolbar = (t0) => {
|
|
|
297
297
|
let t37;
|
|
298
298
|
if ($[65] !== t36 || $[66] !== t5) {
|
|
299
299
|
t37 = /* @__PURE__ */ jsxs(FloatingToolbar, {
|
|
300
|
-
className: "bottom-2 justify-between gap-8",
|
|
300
|
+
className: "bottom-2 justify-between gap-8 transition-none",
|
|
301
301
|
children: [t5, t36]
|
|
302
302
|
});
|
|
303
303
|
$[65] = t36;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useLocation } from "../../navigation/navigation.js";
|
|
1
2
|
import { blockMutations } from "../../../lib/queries.js";
|
|
2
3
|
import { previewStore } from "../previewStore.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { useLocation } from "@tanstack/react-router";
|
|
6
6
|
import { useSelector } from "@xstate/store-react";
|
|
7
7
|
import { generateKeyBetween } from "fractional-indexing";
|
|
8
8
|
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
@@ -10,9 +10,9 @@ import { queryKeys } from "@camox/api-contract/query-keys";
|
|
|
10
10
|
//#region src/features/preview/components/useUpdateBlockPosition.ts
|
|
11
11
|
function useUpdateBlockPosition() {
|
|
12
12
|
const $ = c(5);
|
|
13
|
-
if ($[0] !== "
|
|
13
|
+
if ($[0] !== "c7adf6cdbf960268a5bfbb85b92c76404d7abbe36258eed14eb7062e652330a8") {
|
|
14
14
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
15
|
-
$[0] = "
|
|
15
|
+
$[0] = "c7adf6cdbf960268a5bfbb85b92c76404d7abbe36258eed14eb7062e652330a8";
|
|
16
16
|
}
|
|
17
17
|
const queryClient = useQueryClient();
|
|
18
18
|
const { pathname } = useLocation();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocation } from "../navigation/navigation.js";
|
|
1
2
|
import { actionsStore } from "./actionsStore.js";
|
|
2
3
|
import { AuthContext, createCamoxAuthClient, useAuthActions, useProcessOtt, useSignInRedirect } from "../../lib/auth.js";
|
|
3
4
|
import { initApiClient } from "../../lib/api-client.js";
|
|
@@ -15,7 +16,6 @@ import { CommandPalette, useCommandPaletteActions } from "./components/CommandPa
|
|
|
15
16
|
import { useAdminShortcuts } from "./useAdminShortcuts.js";
|
|
16
17
|
import { c } from "react/compiler-runtime";
|
|
17
18
|
import { useQuery } from "@tanstack/react-query";
|
|
18
|
-
import { useLocation } from "@tanstack/react-router";
|
|
19
19
|
import * as React from "react";
|
|
20
20
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
21
|
import { Toaster } from "@camox/ui/toaster";
|
|
@@ -74,9 +74,9 @@ const AuthenticatedCamoxProvider = ({ children }) => {
|
|
|
74
74
|
};
|
|
75
75
|
const UnauthenticatedLocalhostPreview = (t0) => {
|
|
76
76
|
const $ = c(21);
|
|
77
|
-
if ($[0] !== "
|
|
77
|
+
if ($[0] !== "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203") {
|
|
78
78
|
for (let $i = 0; $i < 21; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
79
|
-
$[0] = "
|
|
79
|
+
$[0] = "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203";
|
|
80
80
|
}
|
|
81
81
|
const { children } = t0;
|
|
82
82
|
const signInRedirect = useSignInRedirect();
|
|
@@ -211,9 +211,9 @@ const UnauthenticatedLocalhostPreview = (t0) => {
|
|
|
211
211
|
};
|
|
212
212
|
const UnauthenticatedPage = (t0) => {
|
|
213
213
|
const $ = c(9);
|
|
214
|
-
if ($[0] !== "
|
|
214
|
+
if ($[0] !== "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203") {
|
|
215
215
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
216
|
-
$[0] = "
|
|
216
|
+
$[0] = "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203";
|
|
217
217
|
}
|
|
218
218
|
const { children } = t0;
|
|
219
219
|
const { theme } = useThemeValue();
|
|
@@ -252,9 +252,9 @@ const UnauthenticatedPage = (t0) => {
|
|
|
252
252
|
};
|
|
253
253
|
const UnauthenticatedCamoxProvider = (t0) => {
|
|
254
254
|
const $ = c(14);
|
|
255
|
-
if ($[0] !== "
|
|
255
|
+
if ($[0] !== "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203") {
|
|
256
256
|
for (let $i = 0; $i < 14; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
257
|
-
$[0] = "
|
|
257
|
+
$[0] = "b1c15713f3d5278144fdb4341407ebb87565133d460491e2bdc2f40d8bd07203";
|
|
258
258
|
}
|
|
259
259
|
const { children } = t0;
|
|
260
260
|
const { pathname } = useLocation();
|
|
@@ -335,6 +335,7 @@ function CamoxProvider({ children, camoxApp, authenticationUrl, apiUrl, projectS
|
|
|
335
335
|
initializedApiUrl.current = apiUrl;
|
|
336
336
|
}
|
|
337
337
|
if (!useProcessOtt(authClient)) return null;
|
|
338
|
+
const unauthenticated = /* @__PURE__ */ jsx(UnauthenticatedCamoxProvider, { children });
|
|
338
339
|
return /* @__PURE__ */ jsx(AuthContext.Provider, {
|
|
339
340
|
value: {
|
|
340
341
|
authClient,
|
|
@@ -350,7 +351,8 @@ function CamoxProvider({ children, camoxApp, authenticationUrl, apiUrl, projectS
|
|
|
350
351
|
rel: "stylesheet",
|
|
351
352
|
href: studioCssUrl
|
|
352
353
|
}), /* @__PURE__ */ jsx(AuthenticatedCamoxProvider, { children })] }),
|
|
353
|
-
|
|
354
|
+
loading: unauthenticated,
|
|
355
|
+
unauthenticated
|
|
354
356
|
})]
|
|
355
357
|
})
|
|
356
358
|
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CamoxPreview, PageContent } from "../preview/CamoxPreview.js";
|
|
2
|
+
import { CamoxProvider } from "../provider/CamoxProvider.js";
|
|
3
|
+
import { PageNavigationProvider } from "./pageNavigation.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/features/runtime/pageApp.tsx
|
|
9
|
+
function PageApp(t0) {
|
|
10
|
+
const $ = c(18);
|
|
11
|
+
if ($[0] !== "557a21bc6b4aed13935ede3368115a90db9c6fcffe823bb869ddbaeb394cf48e") {
|
|
12
|
+
for (let $i = 0; $i < 18; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
|
+
$[0] = "557a21bc6b4aed13935ede3368115a90db9c6fcffe823bb869ddbaeb394cf48e";
|
|
14
|
+
}
|
|
15
|
+
const { camoxApp, input, queryClient } = t0;
|
|
16
|
+
const t1 = input.dehydratedState;
|
|
17
|
+
let t2;
|
|
18
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
19
|
+
t2 = /* @__PURE__ */ jsx(CamoxPreview, { children: /* @__PURE__ */ jsx(PageContent, {}) });
|
|
20
|
+
$[1] = t2;
|
|
21
|
+
} else t2 = $[1];
|
|
22
|
+
let t3;
|
|
23
|
+
if ($[2] !== camoxApp || $[3] !== input.apiUrl || $[4] !== input.authenticationUrl || $[5] !== input.environmentName || $[6] !== input.projectSlug) {
|
|
24
|
+
t3 = /* @__PURE__ */ jsx(CamoxProvider, {
|
|
25
|
+
camoxApp,
|
|
26
|
+
authenticationUrl: input.authenticationUrl,
|
|
27
|
+
apiUrl: input.apiUrl,
|
|
28
|
+
projectSlug: input.projectSlug,
|
|
29
|
+
environmentName: input.environmentName,
|
|
30
|
+
children: t2
|
|
31
|
+
});
|
|
32
|
+
$[2] = camoxApp;
|
|
33
|
+
$[3] = input.apiUrl;
|
|
34
|
+
$[4] = input.authenticationUrl;
|
|
35
|
+
$[5] = input.environmentName;
|
|
36
|
+
$[6] = input.projectSlug;
|
|
37
|
+
$[7] = t3;
|
|
38
|
+
} else t3 = $[7];
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[8] !== input || $[9] !== queryClient || $[10] !== t3) {
|
|
41
|
+
t4 = /* @__PURE__ */ jsx(PageNavigationProvider, {
|
|
42
|
+
initialInput: input,
|
|
43
|
+
queryClient,
|
|
44
|
+
children: t3
|
|
45
|
+
});
|
|
46
|
+
$[8] = input;
|
|
47
|
+
$[9] = queryClient;
|
|
48
|
+
$[10] = t3;
|
|
49
|
+
$[11] = t4;
|
|
50
|
+
} else t4 = $[11];
|
|
51
|
+
let t5;
|
|
52
|
+
if ($[12] !== t1 || $[13] !== t4) {
|
|
53
|
+
t5 = /* @__PURE__ */ jsx(HydrationBoundary, {
|
|
54
|
+
state: t1,
|
|
55
|
+
children: t4
|
|
56
|
+
});
|
|
57
|
+
$[12] = t1;
|
|
58
|
+
$[13] = t4;
|
|
59
|
+
$[14] = t5;
|
|
60
|
+
} else t5 = $[14];
|
|
61
|
+
let t6;
|
|
62
|
+
if ($[15] !== queryClient || $[16] !== t5) {
|
|
63
|
+
t6 = /* @__PURE__ */ jsx(QueryClientProvider, {
|
|
64
|
+
client: queryClient,
|
|
65
|
+
children: t5
|
|
66
|
+
});
|
|
67
|
+
$[15] = queryClient;
|
|
68
|
+
$[16] = t5;
|
|
69
|
+
$[17] = t6;
|
|
70
|
+
} else t6 = $[17];
|
|
71
|
+
return t6;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { PageApp };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CamoxApp } from "../../core/createApp.js";
|
|
2
|
+
|
|
3
|
+
//#region src/features/runtime/pageClient.d.ts
|
|
4
|
+
declare function hydratePageWithApp(camoxApp: CamoxApp): void;
|
|
5
|
+
declare function hydrateRuntimeWithApp(camoxApp: CamoxApp): void;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { hydratePageWithApp, hydrateRuntimeWithApp };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PageApp } from "./pageApp.js";
|
|
2
|
+
import { StudioApp } from "./studioApp.js";
|
|
3
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { hydrateRoot } from "react-dom/client";
|
|
6
|
+
|
|
7
|
+
//#region src/features/runtime/pageClient.tsx
|
|
8
|
+
function readHydrationData() {
|
|
9
|
+
const script = document.getElementById("__CAMOX_DATA__");
|
|
10
|
+
if (!script?.textContent) throw new Error("Camox runtime hydration data was not found.");
|
|
11
|
+
return JSON.parse(script.textContent);
|
|
12
|
+
}
|
|
13
|
+
function hydratePageWithApp(camoxApp) {
|
|
14
|
+
hydrateRuntimeWithApp(camoxApp);
|
|
15
|
+
}
|
|
16
|
+
function hydrateRuntimeWithApp(camoxApp) {
|
|
17
|
+
const root = document.getElementById("root");
|
|
18
|
+
if (!root) throw new Error("Camox runtime root element was not found.");
|
|
19
|
+
const queryClient = new QueryClient();
|
|
20
|
+
const input = readHydrationData();
|
|
21
|
+
if (input.runtimeKind === "studio") {
|
|
22
|
+
hydrateRoot(root, /* @__PURE__ */ jsx(StudioApp, {
|
|
23
|
+
camoxApp,
|
|
24
|
+
input,
|
|
25
|
+
queryClient
|
|
26
|
+
}));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
hydrateRoot(root, /* @__PURE__ */ jsx(PageApp, {
|
|
30
|
+
camoxApp,
|
|
31
|
+
input,
|
|
32
|
+
queryClient
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { hydratePageWithApp, hydrateRuntimeWithApp };
|