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,254 +0,0 @@
|
|
|
1
|
-
import { buildClearServerAuthCookieHeader, getAuthCookieHeader, getServerAuthCookieHeader } from "../../lib/auth.js";
|
|
2
|
-
import { seedBlockCaches } from "../../lib/normalized-data.js";
|
|
3
|
-
import { CamoxPreview, PageContent } from "../preview/CamoxPreview.js";
|
|
4
|
-
import { trackEvent } from "../../lib/telemetry.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { notFound } from "@tanstack/react-router";
|
|
7
|
-
import { queryKeys } from "@camox/api-contract/query-keys";
|
|
8
|
-
import { createORPCClient } from "@orpc/client";
|
|
9
|
-
import { RPCLink } from "@orpc/client/fetch";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
import { createMiddleware, createServerFn } from "@tanstack/react-start";
|
|
12
|
-
|
|
13
|
-
//#region src/features/routes/pageRoute.tsx
|
|
14
|
-
function parseQuality(part) {
|
|
15
|
-
const match = part.match(/;\s*q=([0-9.]+)/);
|
|
16
|
-
return match ? parseFloat(match[1]) : 1;
|
|
17
|
-
}
|
|
18
|
-
function prefersMarkdown(accept) {
|
|
19
|
-
let markdownQ = -1;
|
|
20
|
-
let htmlQ = -1;
|
|
21
|
-
for (const part of accept.split(",")) {
|
|
22
|
-
const trimmed = part.trim();
|
|
23
|
-
if (trimmed.startsWith("text/markdown")) markdownQ = parseQuality(trimmed);
|
|
24
|
-
else if (trimmed.startsWith("text/html")) htmlQ = parseQuality(trimmed);
|
|
25
|
-
}
|
|
26
|
-
return markdownQ > 0 && markdownQ >= htmlQ;
|
|
27
|
-
}
|
|
28
|
-
function createServerApiClient(apiUrl, environmentName, options) {
|
|
29
|
-
const headers = {};
|
|
30
|
-
if (environmentName) headers["x-environment-name"] = environmentName;
|
|
31
|
-
return createORPCClient(new RPCLink({
|
|
32
|
-
url: `${apiUrl}/rpc`,
|
|
33
|
-
headers,
|
|
34
|
-
fetch: (request, init) => {
|
|
35
|
-
if (options?.authCookieHeader && request instanceof Request) request.headers.set("Better-Auth-Cookie", options.authCookieHeader);
|
|
36
|
-
return fetch(request, init);
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
function getErrorDetails(error) {
|
|
41
|
-
if (!error || typeof error !== "object") return { message: String(error) };
|
|
42
|
-
const errorRecord = error;
|
|
43
|
-
return {
|
|
44
|
-
code: typeof errorRecord.code === "string" ? errorRecord.code : void 0,
|
|
45
|
-
status: typeof errorRecord.status === "number" ? errorRecord.status : void 0,
|
|
46
|
-
message: error instanceof Error ? error.message : typeof errorRecord.message === "string" ? errorRecord.message : ""
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function isAuthSessionError(error) {
|
|
50
|
-
const { code, status, message } = getErrorDetails(error);
|
|
51
|
-
if (code === "UNAUTHORIZED" || code === "FORBIDDEN") return true;
|
|
52
|
-
if (status === 401 || status === 403) return true;
|
|
53
|
-
const lowerMessage = message.toLowerCase();
|
|
54
|
-
return lowerMessage.includes("unauthorized") || lowerMessage.includes("forbidden") || lowerMessage.includes("invalid session") || lowerMessage.includes("session expired") || lowerMessage.includes("expired session");
|
|
55
|
-
}
|
|
56
|
-
function isNotFoundError(error) {
|
|
57
|
-
const { code, status } = getErrorDetails(error);
|
|
58
|
-
return code === "NOT_FOUND" || status === 404;
|
|
59
|
-
}
|
|
60
|
-
async function clearServerAuthCookie() {
|
|
61
|
-
if (typeof window !== "undefined") return;
|
|
62
|
-
const { setResponseHeader } = await import("@tanstack/react-start/server");
|
|
63
|
-
setResponseHeader("Set-Cookie", buildClearServerAuthCookieHeader());
|
|
64
|
-
}
|
|
65
|
-
async function loadPage({ apiUrl, authCookieHeader, context, environmentName, pathname, projectSlug, source }) {
|
|
66
|
-
const serverApi = createServerApiClient(apiUrl, environmentName, { authCookieHeader });
|
|
67
|
-
return context.queryClient.ensureQueryData({
|
|
68
|
-
queryKey: queryKeys.pages.getByPath(pathname, source),
|
|
69
|
-
queryFn: async () => {
|
|
70
|
-
const [data, pagesList] = await Promise.all([serverApi.pages.getByPath({
|
|
71
|
-
path: pathname,
|
|
72
|
-
projectSlug,
|
|
73
|
-
source
|
|
74
|
-
}), serverApi.pages.listBySlug({ projectSlug }).catch(() => null)]);
|
|
75
|
-
seedBlockCaches(context.queryClient, data, source);
|
|
76
|
-
context.queryClient.setQueryData(queryKeys.pages.getByPath(pathname, source), {
|
|
77
|
-
page: data.page,
|
|
78
|
-
layout: data.layout,
|
|
79
|
-
projectName: data.projectName,
|
|
80
|
-
project: data.project
|
|
81
|
-
});
|
|
82
|
-
if (source === "live") {
|
|
83
|
-
seedBlockCaches(context.queryClient, data, "draft");
|
|
84
|
-
context.queryClient.setQueryData(queryKeys.pages.getByPath(pathname, "draft"), {
|
|
85
|
-
page: data.page,
|
|
86
|
-
layout: data.layout,
|
|
87
|
-
projectName: data.projectName,
|
|
88
|
-
project: data.project
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
if (pagesList) context.queryClient.setQueryData(queryKeys.pages.list, pagesList);
|
|
92
|
-
return {
|
|
93
|
-
page: data.page,
|
|
94
|
-
layout: data.layout,
|
|
95
|
-
projectName: data.projectName,
|
|
96
|
-
project: data.project
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
staleTime: Infinity
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function throwNotFoundOrRethrow(error) {
|
|
103
|
-
if (isNotFoundError(error)) throw notFound();
|
|
104
|
-
throw error;
|
|
105
|
-
}
|
|
106
|
-
async function loadLivePage(options) {
|
|
107
|
-
try {
|
|
108
|
-
return await loadPage({
|
|
109
|
-
...options,
|
|
110
|
-
source: "live"
|
|
111
|
-
});
|
|
112
|
-
} catch (error) {
|
|
113
|
-
throwNotFoundOrRethrow(error);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
async function buildLoaderData(apiUrl, page) {
|
|
117
|
-
return {
|
|
118
|
-
page,
|
|
119
|
-
origin: await getOrigin(),
|
|
120
|
-
faviconUrl: `${apiUrl}/favicons/${page.project.id}?v=${page.project.updatedAt}`
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
const getOrigin = createServerFn({ method: "GET" }).handler(async () => {
|
|
124
|
-
const { getRequest } = await import("@tanstack/react-start/server");
|
|
125
|
-
const request = getRequest();
|
|
126
|
-
return new URL(request.url).origin;
|
|
127
|
-
});
|
|
128
|
-
const getServerLoaderAuthCookieHeader = createServerFn({ method: "GET" }).handler(async () => {
|
|
129
|
-
const { getRequest } = await import("@tanstack/react-start/server");
|
|
130
|
-
return getServerAuthCookieHeader(getRequest().headers);
|
|
131
|
-
});
|
|
132
|
-
function createMarkdownMiddleware(apiUrl, projectSlug, environmentName) {
|
|
133
|
-
const api = createServerApiClient(apiUrl, environmentName);
|
|
134
|
-
return createMiddleware().server(async ({ next, request }) => {
|
|
135
|
-
if (prefersMarkdown(request.headers.get("Accept") ?? "")) {
|
|
136
|
-
const url = new URL(request.url);
|
|
137
|
-
try {
|
|
138
|
-
const page = await api.pages.getByPath({
|
|
139
|
-
path: url.pathname,
|
|
140
|
-
projectSlug,
|
|
141
|
-
source: "live"
|
|
142
|
-
});
|
|
143
|
-
const { markdown } = await api.blocks.getPageMarkdown({ pageId: page.page.id });
|
|
144
|
-
if (markdown) {
|
|
145
|
-
trackEvent("markdown_served", {
|
|
146
|
-
pathname: url.pathname,
|
|
147
|
-
projectId: page.page.projectId,
|
|
148
|
-
projectName: page.projectName
|
|
149
|
-
});
|
|
150
|
-
throw new Response(markdown, { headers: { "Content-Type": "text/markdown; charset=utf-8" } });
|
|
151
|
-
}
|
|
152
|
-
} catch (e) {
|
|
153
|
-
if (e instanceof Response) throw e;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return next();
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function createPageLoader(apiUrl, projectSlug, environmentName) {
|
|
160
|
-
return async ({ location, context }) => {
|
|
161
|
-
const authCookieHeader = typeof window !== "undefined" ? getAuthCookieHeader() : await getServerLoaderAuthCookieHeader();
|
|
162
|
-
const loadOptions = {
|
|
163
|
-
apiUrl,
|
|
164
|
-
context,
|
|
165
|
-
environmentName,
|
|
166
|
-
pathname: location.pathname,
|
|
167
|
-
projectSlug
|
|
168
|
-
};
|
|
169
|
-
if (!authCookieHeader) return buildLoaderData(apiUrl, await loadLivePage(loadOptions));
|
|
170
|
-
try {
|
|
171
|
-
return buildLoaderData(apiUrl, await loadPage({
|
|
172
|
-
...loadOptions,
|
|
173
|
-
authCookieHeader,
|
|
174
|
-
source: "draft"
|
|
175
|
-
}));
|
|
176
|
-
} catch (error) {
|
|
177
|
-
if (!isAuthSessionError(error)) throwNotFoundOrRethrow(error);
|
|
178
|
-
await clearServerAuthCookie();
|
|
179
|
-
console.warn("[camox] Ignoring stale camox_auth_cookie and retrying published page load.");
|
|
180
|
-
return buildLoaderData(apiUrl, await loadLivePage(loadOptions));
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
function createPageHead(camoxApp) {
|
|
185
|
-
return ({ loaderData }) => {
|
|
186
|
-
if (!loaderData) return {};
|
|
187
|
-
const { page, origin, faviconUrl } = loaderData;
|
|
188
|
-
const pageMetaTitle = page.page.metaTitle ?? page.page.pathSegment;
|
|
189
|
-
const meta = [];
|
|
190
|
-
let title = pageMetaTitle;
|
|
191
|
-
if (page.layout) {
|
|
192
|
-
const layout = camoxApp.getLayoutById(page.layout.layoutId);
|
|
193
|
-
if (layout) {
|
|
194
|
-
title = layout._internal.buildMetaTitle({
|
|
195
|
-
pageMetaTitle,
|
|
196
|
-
projectName: page.projectName,
|
|
197
|
-
pageFullPath: page.page.fullPath
|
|
198
|
-
});
|
|
199
|
-
meta.push({ title });
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
if (page.page.metaDescription) meta.push({
|
|
203
|
-
name: "description",
|
|
204
|
-
content: page.page.metaDescription
|
|
205
|
-
});
|
|
206
|
-
const ogImageParams = new URLSearchParams({
|
|
207
|
-
...page.layout && { layoutId: page.layout.layoutId },
|
|
208
|
-
title: pageMetaTitle,
|
|
209
|
-
...page.page.metaDescription && { description: page.page.metaDescription },
|
|
210
|
-
...page.projectName && { projectName: page.projectName }
|
|
211
|
-
});
|
|
212
|
-
const ogImageUrl = page.page.customOgImageUrl ?? `${origin}/og?${ogImageParams.toString()}`;
|
|
213
|
-
meta.push({
|
|
214
|
-
property: "og:title",
|
|
215
|
-
content: title
|
|
216
|
-
}, {
|
|
217
|
-
property: "og:image",
|
|
218
|
-
content: ogImageUrl
|
|
219
|
-
}, {
|
|
220
|
-
property: "og:image:width",
|
|
221
|
-
content: "1200"
|
|
222
|
-
}, {
|
|
223
|
-
property: "og:image:height",
|
|
224
|
-
content: "630"
|
|
225
|
-
});
|
|
226
|
-
if (page.page.metaDescription) meta.push({
|
|
227
|
-
property: "og:description",
|
|
228
|
-
content: page.page.metaDescription
|
|
229
|
-
});
|
|
230
|
-
return {
|
|
231
|
-
meta,
|
|
232
|
-
links: [{
|
|
233
|
-
rel: "icon",
|
|
234
|
-
href: faviconUrl
|
|
235
|
-
}]
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
const PageRouteComponent = () => {
|
|
240
|
-
const $ = c(2);
|
|
241
|
-
if ($[0] !== "ce30c88896781a325be8bc6e48526eba781913727a9615f979bc6c2948f7a533") {
|
|
242
|
-
for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
243
|
-
$[0] = "ce30c88896781a325be8bc6e48526eba781913727a9615f979bc6c2948f7a533";
|
|
244
|
-
}
|
|
245
|
-
let t0;
|
|
246
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
247
|
-
t0 = /* @__PURE__ */ jsx(CamoxPreview, { children: /* @__PURE__ */ jsx(PageContent, {}) });
|
|
248
|
-
$[1] = t0;
|
|
249
|
-
} else t0 = $[1];
|
|
250
|
-
return t0;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
//#endregion
|
|
254
|
-
export { PageRouteComponent, createMarkdownMiddleware, createPageHead, createPageLoader, getOrigin, getServerLoaderAuthCookieHeader, parseQuality, prefersMarkdown };
|
package/dist/lib/api-client.d.ts
DELETED
package/dist/lib/queries.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApiClient } from "./api-client.js";
|
|
2
|
-
//#region src/lib/queries.d.ts
|
|
3
|
-
type PageWithBlocks = Awaited<ReturnType<ApiClient["pages"]["getByPath"]>>;
|
|
4
|
-
/** Slim structural data stored in the page query cache (no blocks/items/files). */
|
|
5
|
-
type PageStructure = {
|
|
6
|
-
page: PageWithBlocks["page"];
|
|
7
|
-
layout: PageWithBlocks["layout"];
|
|
8
|
-
projectName: string;
|
|
9
|
-
project: PageWithBlocks["project"];
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { PageStructure };
|