camox 0.45.0 → 0.46.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/core/hooks/useArtifactHost.js +2 -2
- package/dist/features/canvas/CamoxCanvas.js +438 -771
- package/dist/features/canvas/CanvasPageFrame.js +1 -3
- package/dist/features/canvas/CanvasPreviewPageSlot.js +26 -6
- package/dist/features/canvas/canvasCamera.js +3 -3
- package/dist/features/canvas/canvasFrameDocument.js +4 -19
- package/dist/features/canvas/canvasItems.js +12 -102
- package/dist/features/canvas/canvasStore.js +3 -92
- package/dist/features/canvas/sidebar/CanvasNavigator.js +81 -183
- package/dist/features/canvas/sidebar/CanvasSidebar.js +22 -28
- package/dist/features/canvas/sidebar/CuratedPageInspector.js +2 -2
- package/dist/features/canvas/useCanvasCamera.js +0 -20
- package/dist/features/canvas/useCanvasFrame.js +5 -6
- package/dist/features/preview/CamoxPreview.js +3 -3
- package/dist/features/preview/components/{AddBlockDialog.js → AddBlockSheet.js} +35 -32
- package/dist/features/preview/components/BlockActionsPopover.js +6 -6
- package/dist/features/preview/components/BlockThumbnail.js +31 -33
- package/dist/features/preview/components/Overlays.js +1 -1
- package/dist/features/preview/components/PageTree.js +1 -1
- package/dist/features/preview/components/PreviewPanel.js +1 -1
- package/dist/features/preview/previewStore.js +9 -9
- package/dist/features/provider/CoreCamoxProvider.js +9 -6
- package/dist/features/routes/pageRuntime.js +8 -8
- package/dist/features/runtime/runtime.d.ts +2 -7
- package/dist/features/runtime/runtime.js +6 -19
- package/dist/features/studio/FollowAgentProvider.js +11 -22
- package/dist/features/studio/components/FaviconDialog.js +3 -3
- package/dist/features/studio/followAgent.js +5 -14
- package/dist/features/studio/routes.js +1 -23
- package/dist/lib/auth.js +36 -24
- package/dist/lib/studio-reads.js +0 -20
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
- package/skills/camox-expand/SKILL.md +5 -4
- package/dist/features/canvas/CanvasBlockFrame.js +0 -353
- package/dist/features/canvas/CanvasBlockHeader.js +0 -55
- package/dist/features/canvas/CanvasShelfMarker.js +0 -255
- package/dist/features/canvas/sidebar/CatalogBlockInspector.js +0 -189
package/dist/lib/auth.js
CHANGED
|
@@ -285,46 +285,58 @@ function useSessionState(authClient, track) {
|
|
|
285
285
|
return React.useSyncExternalStore(track ? subscribe : noSubscription, getSnapshot, getSnapshot);
|
|
286
286
|
}
|
|
287
287
|
function useAuthState() {
|
|
288
|
-
const $ = c(
|
|
289
|
-
const { authClient, initialAuthenticated: t0 } = useAuthContext();
|
|
288
|
+
const $ = c(9);
|
|
289
|
+
const { authClient, initialAuthenticated: t0, exchangingToken: t1 } = useAuthContext();
|
|
290
290
|
const initialAuthenticated = t0 === void 0 ? false : t0;
|
|
291
|
+
const exchangingToken = t1 === void 0 ? false : t1;
|
|
291
292
|
const hydrated = React.useSyncExternalStore(subscribeToHydration, _temp2, _temp3);
|
|
292
|
-
let
|
|
293
|
+
let t2;
|
|
293
294
|
if ($[0] !== hydrated || $[1] !== initialAuthenticated) {
|
|
294
|
-
|
|
295
|
+
t2 = initialAuthenticated || hydrated && hasStoredAuthCookie();
|
|
295
296
|
$[0] = hydrated;
|
|
296
297
|
$[1] = initialAuthenticated;
|
|
297
|
-
$[2] =
|
|
298
|
-
} else
|
|
299
|
-
const tracksSession =
|
|
298
|
+
$[2] = t2;
|
|
299
|
+
} else t2 = $[2];
|
|
300
|
+
const tracksSession = t2;
|
|
300
301
|
const { data: session, isPending } = useSessionState(authClient, tracksSession);
|
|
301
|
-
if (!
|
|
302
|
-
const t2 = !hydrated;
|
|
302
|
+
if (exchangingToken && !initialAuthenticated) {
|
|
303
303
|
let t3;
|
|
304
|
-
if ($[3]
|
|
304
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
305
305
|
t3 = {
|
|
306
306
|
isAuthenticated: false,
|
|
307
|
-
isLoading:
|
|
307
|
+
isLoading: true
|
|
308
308
|
};
|
|
309
|
-
$[3] =
|
|
310
|
-
|
|
311
|
-
} else t3 = $[4];
|
|
309
|
+
$[3] = t3;
|
|
310
|
+
} else t3 = $[3];
|
|
312
311
|
return t3;
|
|
313
312
|
}
|
|
313
|
+
if (!tracksSession) {
|
|
314
|
+
const t3 = !hydrated;
|
|
315
|
+
let t4;
|
|
316
|
+
if ($[4] !== t3) {
|
|
317
|
+
t4 = {
|
|
318
|
+
isAuthenticated: false,
|
|
319
|
+
isLoading: t3
|
|
320
|
+
};
|
|
321
|
+
$[4] = t3;
|
|
322
|
+
$[5] = t4;
|
|
323
|
+
} else t4 = $[5];
|
|
324
|
+
return t4;
|
|
325
|
+
}
|
|
314
326
|
const useInitial = !hydrated || isPending;
|
|
315
|
-
const
|
|
316
|
-
const
|
|
317
|
-
let
|
|
318
|
-
if ($[
|
|
319
|
-
|
|
320
|
-
isAuthenticated:
|
|
321
|
-
isLoading:
|
|
327
|
+
const t3 = useInitial ? initialAuthenticated : !!session;
|
|
328
|
+
const t4 = useInitial && !initialAuthenticated;
|
|
329
|
+
let t5;
|
|
330
|
+
if ($[6] !== t3 || $[7] !== t4) {
|
|
331
|
+
t5 = {
|
|
332
|
+
isAuthenticated: t3,
|
|
333
|
+
isLoading: t4
|
|
322
334
|
};
|
|
323
|
-
$[5] = t2;
|
|
324
335
|
$[6] = t3;
|
|
325
336
|
$[7] = t4;
|
|
326
|
-
|
|
327
|
-
|
|
337
|
+
$[8] = t5;
|
|
338
|
+
} else t5 = $[8];
|
|
339
|
+
return t5;
|
|
328
340
|
}
|
|
329
341
|
function _temp3() {
|
|
330
342
|
return false;
|
package/dist/lib/studio-reads.js
CHANGED
|
@@ -148,26 +148,6 @@ const reads = {
|
|
|
148
148
|
fetch: async ({ api, signal }, { projectId }) => Object.fromEntries((await api.blocks.getUsageCounts({ projectId }, { signal })).map(({ type, count }) => [type, count])),
|
|
149
149
|
staleTime: Infinity
|
|
150
150
|
}),
|
|
151
|
-
pagesUsingBlock: entry({
|
|
152
|
-
key: ({ type }) => [
|
|
153
|
-
...usageCountsPrefix,
|
|
154
|
-
"pages",
|
|
155
|
-
type
|
|
156
|
-
],
|
|
157
|
-
fetch: ({ api, signal }, { projectId, type }) => api.blocks.getPagesUsing({
|
|
158
|
-
projectId,
|
|
159
|
-
type
|
|
160
|
-
}, { signal }),
|
|
161
|
-
staleTime: Infinity
|
|
162
|
-
}),
|
|
163
|
-
syncedContent: entry({
|
|
164
|
-
key: ({ type }) => queryKeys.blocks.getSyncedContent(type),
|
|
165
|
-
fetch: ({ api, signal }, { projectId, type }) => api.blocks.getSyncedContent({
|
|
166
|
-
projectId,
|
|
167
|
-
type
|
|
168
|
-
}, { signal }),
|
|
169
|
-
staleTime: Infinity
|
|
170
|
-
}),
|
|
171
151
|
pageMarkdown: entry({
|
|
172
152
|
key: (pageId) => queryKeys.blocks.getPageMarkdown(pageId),
|
|
173
153
|
fetch: async ({ api, signal }, pageId) => (await api.blocks.getPageMarkdown({ pageId }, { signal })).markdown,
|
package/dist/package.js
CHANGED