camox 0.54.0 → 0.56.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/features/canvas/CamoxCanvas.js +14 -11
- package/dist/features/canvas/CanvasLoadingScreen.js +1 -1
- package/dist/features/canvas/sidebar/CanvasViewHeader.js +1 -1
- package/dist/features/canvas/sidebar/{CanvasSidebar.js → ContentSidebar.js} +5 -5
- package/dist/features/canvas/sidebar/{CanvasSidebarFrame.js → ContentSidebarFrame.js} +4 -4
- package/dist/features/canvas/sidebar/{CanvasSidebarSkeleton.js → ContentSidebarSkeleton.js} +7 -7
- package/dist/features/preview/CamoxPreview.js +2 -2
- package/dist/features/preview/components/PreviewToolbar.js +1 -1
- package/dist/features/preview/components/SelectionEditor.js +2 -2
- package/dist/features/preview/components/SidebarStack.js +11 -13
- package/dist/features/preview/components/StudioEditingFallback.js +3 -3
- package/dist/features/routes/pageRuntime.d.ts +1 -1
- package/dist/features/runtime/RuntimeChrome.js +4 -4
- package/dist/features/studio/components/AgentSidebar.js +56 -0
- package/dist/features/studio/components/{ChatSidebar.js → ChatWidget.js} +60 -169
- package/dist/features/studio/components/DraftsControl.js +17 -17
- package/dist/features/studio/components/ReviewDraftSheet.js +38 -38
- package/dist/features/studio/components/Squareling.js +10 -8
- package/dist/features/studio/components/ThreadMessages.js +128 -105
- package/dist/features/studio/components/WorkersWidget.js +52 -0
- package/dist/features/studio/studioStore.js +5 -5
- package/dist/lib/queries.js +1 -1
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
- package/skills/camox/SKILL.md +3 -10
- package/skills/camox/references/artifacts.md +2 -2
- package/skills/camox/references/block-definitions.md +1 -1
- package/skills/camox/references/layout-definitions.md +1 -1
- package/skills/camox/references/routed-layouts.md +2 -2
- package/skills/camox-cli/SKILL.md +15 -0
- package/skills/{camox → camox-cli}/references/cli-common.md +1 -1
- package/skills/{camox → camox-cli}/references/cli-content.md +2 -2
- package/skills/{camox → camox-cli}/references/cli-publishing.md +4 -4
- package/skills/camox-expand/SKILL.md +1 -1
- package/skills/camoxify/SKILL.md +1 -1
|
@@ -29,7 +29,7 @@ import { CanvasPageHeader } from "./CanvasPageHeader.js";
|
|
|
29
29
|
import { CanvasPreviewPageSlot } from "./CanvasPreviewPageSlot.js";
|
|
30
30
|
import { CANVAS_WORLD_TRANSFORM, canvasScreenAbove, canvasScreenLength, canvasScreenX } from "./canvasScreenSpace.js";
|
|
31
31
|
import { selectedCanvasPage } from "./canvasSelection.js";
|
|
32
|
-
import {
|
|
32
|
+
import { ContentSidebar } from "./sidebar/ContentSidebar.js";
|
|
33
33
|
import { useCanvasCamera } from "./useCanvasCamera.js";
|
|
34
34
|
import { useCanvasNearness } from "./useCanvasNearness.js";
|
|
35
35
|
import { useDiscoveredPreviewPaths } from "./useDiscoveredPreviewPaths.js";
|
|
@@ -42,7 +42,7 @@ import { createStore as createStore$1 } from "@xstate/store";
|
|
|
42
42
|
|
|
43
43
|
//#region src/features/canvas/CamoxCanvas.tsx
|
|
44
44
|
/**
|
|
45
|
-
* The Canvas spans the studio under its sidebars, the
|
|
45
|
+
* The Canvas spans the studio under its sidebars, the Content Sidebar on its left and the Agent Sidebar on
|
|
46
46
|
* its right: the camera frames and snaps Pages between them, and above the studio's bottom edge.
|
|
47
47
|
*/
|
|
48
48
|
const CANVAS_INSETS = {
|
|
@@ -459,10 +459,10 @@ function CanvasPageFrameLoader(t0) {
|
|
|
459
459
|
return t2;
|
|
460
460
|
}
|
|
461
461
|
/**
|
|
462
|
-
*
|
|
463
|
-
*
|
|
462
|
+
* Where a sidebar's scrim starts fading, in px from the studio's edge: past the sidebar's outer
|
|
463
|
+
* gutter (`SIDEBAR_GUTTER`), so it fades across the whole of the sidebar's contents.
|
|
464
464
|
*/
|
|
465
|
-
const
|
|
465
|
+
const SCRIM_FADE_START = 8;
|
|
466
466
|
/** How opaque the scrim gets at most: what's under it always shows through, faintly. */
|
|
467
467
|
const SCRIM_MAX_OPACITY = .8;
|
|
468
468
|
/** Opacity along the fade, relative to the most, eased so it leaves no visible edge where it ends. */
|
|
@@ -477,11 +477,14 @@ const SCRIM_EASING = [
|
|
|
477
477
|
.05,
|
|
478
478
|
0
|
|
479
479
|
];
|
|
480
|
-
/**
|
|
480
|
+
/**
|
|
481
|
+
* Fades what the Canvas shows around a sidebar into the Canvas's background, toward the sidebar:
|
|
482
|
+
* from nothing past a snapped Page's edge, to the most only at the sidebar's outer gutter.
|
|
483
|
+
*/
|
|
481
484
|
function scrimGradient(towards, inset) {
|
|
482
|
-
const from =
|
|
483
|
-
const length =
|
|
484
|
-
const stops = SCRIM_EASING.map((alpha, index) => `color-mix(in oklab, var(--color-
|
|
485
|
+
const from = SCRIM_FADE_START;
|
|
486
|
+
const length = inset + 16 - SCRIM_FADE_START;
|
|
487
|
+
const stops = SCRIM_EASING.map((alpha, index) => `color-mix(in oklab, var(--color-canvas) ${alpha * SCRIM_MAX_OPACITY * 100}%, transparent) ${from + length * index / (SCRIM_EASING.length - 1)}px`);
|
|
485
488
|
return `linear-gradient(to ${towards === "left" ? "right" : "left"}, ${stops.join(", ")})`;
|
|
486
489
|
}
|
|
487
490
|
/** A frame header above an item's slot, at a constant on-screen height. */
|
|
@@ -1049,7 +1052,7 @@ function CanvasWorkspace(t0) {
|
|
|
1049
1052
|
"aria-describedby": instructionsId,
|
|
1050
1053
|
tabIndex: 0,
|
|
1051
1054
|
"data-camox-canvas": true,
|
|
1052
|
-
className: "bg-
|
|
1055
|
+
className: "bg-canvas relative min-h-0 min-w-0 flex-1 touch-none overflow-clip outline-none *:*:[--canvas-x:initial] *:*:[--canvas-y:initial] data-[canvas-pan]:cursor-grab data-[canvas-pan]:**:cursor-[inherit]! data-[canvas-pan=dragging]:cursor-grabbing data-[canvas-pan]:[&_iframe]:pointer-events-none",
|
|
1053
1056
|
style: t13,
|
|
1054
1057
|
children: [
|
|
1055
1058
|
/* @__PURE__ */ jsx(CanvasWorkspaceContext, {
|
|
@@ -1305,7 +1308,7 @@ function CamoxCanvas(t0) {
|
|
|
1305
1308
|
} else t17 = $[37];
|
|
1306
1309
|
let t18;
|
|
1307
1310
|
if ($[38] !== editingOwner || $[39] !== intendedPage || $[40] !== pageRecord || $[41] !== runtimeBasePath || $[42] !== t16) {
|
|
1308
|
-
t18 = /* @__PURE__ */ jsx(
|
|
1311
|
+
t18 = /* @__PURE__ */ jsx(ContentSidebar, {
|
|
1309
1312
|
page: intendedPage,
|
|
1310
1313
|
navigator: t16,
|
|
1311
1314
|
onShowWholeCanvas: t17,
|
|
@@ -26,7 +26,7 @@ function CanvasLoadingScreen(t0) {
|
|
|
26
26
|
if ($[3] !== t2) {
|
|
27
27
|
t3 = /* @__PURE__ */ jsx("div", {
|
|
28
28
|
"data-canvas-loading": true,
|
|
29
|
-
className: "bg-
|
|
29
|
+
className: "bg-canvas absolute inset-0 grid place-items-center",
|
|
30
30
|
children: t2
|
|
31
31
|
});
|
|
32
32
|
$[3] = t2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SidebarStackHeader, useSelectionViewCount } from "../../preview/components/SidebarStack.js";
|
|
2
|
-
import { SHOW_WHOLE_CANVAS_SHORTCUT } from "../../preview/previewConstants.js";
|
|
3
2
|
import { formatShortcut } from "../../../lib/shortcuts.js";
|
|
3
|
+
import { SHOW_WHOLE_CANVAS_SHORTCUT } from "../../preview/previewConstants.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { SidebarStack, SidebarStackView } from "../../preview/components/SidebarStack.js";
|
|
2
|
-
import { CanvasSidebarFrame } from "./CanvasSidebarFrame.js";
|
|
3
2
|
import { CanvasViewHeader } from "./CanvasViewHeader.js";
|
|
3
|
+
import { ContentSidebarFrame } from "./ContentSidebarFrame.js";
|
|
4
4
|
import { CreatePageModal } from "../../preview/components/CreatePageModal.js";
|
|
5
5
|
import { CanvasNavigator } from "./CanvasNavigator.js";
|
|
6
6
|
import { PageInspector } from "./PageInspector.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
|
-
//#region src/features/canvas/sidebar/
|
|
10
|
+
//#region src/features/canvas/sidebar/ContentSidebar.tsx
|
|
11
11
|
/**
|
|
12
12
|
* The sidebar beside the Canvas, a stack of views: the Canvas's own, which shows the Canvas
|
|
13
13
|
* Navigator, then the Canvas Inspector of the selected Page laid over it, if any.
|
|
14
14
|
*/
|
|
15
|
-
function
|
|
15
|
+
function ContentSidebar(t0) {
|
|
16
16
|
const $ = c(16);
|
|
17
17
|
const { page, navigator, onShowWholeCanvas, owner: t1, pageRecord, runtimeBasePath } = t0;
|
|
18
18
|
const owner = t1 === void 0 ? null : t1;
|
|
@@ -61,7 +61,7 @@ function CanvasSidebar(t0) {
|
|
|
61
61
|
} else t7 = $[12];
|
|
62
62
|
let t8;
|
|
63
63
|
if ($[13] !== t2 || $[14] !== t6) {
|
|
64
|
-
t8 = /* @__PURE__ */ jsxs(
|
|
64
|
+
t8 = /* @__PURE__ */ jsxs(ContentSidebarFrame, {
|
|
65
65
|
label: t2,
|
|
66
66
|
children: [t6, t7]
|
|
67
67
|
});
|
|
@@ -73,4 +73,4 @@ function CanvasSidebar(t0) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
|
-
export {
|
|
76
|
+
export { ContentSidebar };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
//#region src/features/canvas/sidebar/
|
|
4
|
+
//#region src/features/canvas/sidebar/ContentSidebarFrame.tsx
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The Content Sidebar's own box, laid over the Canvas's left side: the Canvas Navigator or the
|
|
7
7
|
* Canvas Inspector, or a stand-in for either, goes in it. Only its cards have a background:
|
|
8
8
|
* around them, the Canvas shows through.
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
10
|
+
function ContentSidebarFrame(t0) {
|
|
11
11
|
const $ = c(9);
|
|
12
12
|
let children;
|
|
13
13
|
let label;
|
|
@@ -46,4 +46,4 @@ function CanvasSidebarFrame(t0) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
//#endregion
|
|
49
|
-
export {
|
|
49
|
+
export { ContentSidebarFrame };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { SidebarStack, SidebarStackView } from "../../preview/components/SidebarStack.js";
|
|
2
2
|
import { CanvasInspectorBody, CanvasInspectorHeaderSkeleton } from "./CanvasInspector.js";
|
|
3
|
-
import { CanvasSidebarFrame } from "./CanvasSidebarFrame.js";
|
|
4
3
|
import { CanvasViewHeader } from "./CanvasViewHeader.js";
|
|
4
|
+
import { ContentSidebarFrame } from "./ContentSidebarFrame.js";
|
|
5
5
|
import { CuratedPageSkeleton, LayoutPageSkeleton } from "./PageInspectorSkeleton.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
|
-
//#region src/features/canvas/sidebar/
|
|
9
|
+
//#region src/features/canvas/sidebar/ContentSidebarSkeleton.tsx
|
|
10
10
|
/**
|
|
11
|
-
* Stands in for the
|
|
11
|
+
* Stands in for the Content Sidebar while the Canvas loads, where the sidebar will show. For a
|
|
12
12
|
* selected Page, it takes the Canvas Inspector's layout. Without one, it is empty.
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
14
|
+
function ContentSidebarSkeleton(t0) {
|
|
15
15
|
const $ = c(5);
|
|
16
16
|
const { page: t1, layoutPage: t2 } = t0;
|
|
17
17
|
const page = t1 === void 0 ? true : t1;
|
|
@@ -33,8 +33,8 @@ function CanvasSidebarSkeleton(t0) {
|
|
|
33
33
|
} else t3 = $[2];
|
|
34
34
|
let t4;
|
|
35
35
|
if ($[3] !== t3) {
|
|
36
|
-
t4 = /* @__PURE__ */ jsx(
|
|
37
|
-
"data-
|
|
36
|
+
t4 = /* @__PURE__ */ jsx(ContentSidebarFrame, {
|
|
37
|
+
"data-content-sidebar-skeleton": true,
|
|
38
38
|
children: t3
|
|
39
39
|
});
|
|
40
40
|
$[3] = t3;
|
|
@@ -44,4 +44,4 @@ function CanvasSidebarSkeleton(t0) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
|
-
export {
|
|
47
|
+
export { ContentSidebarSkeleton };
|
|
@@ -14,7 +14,7 @@ import { CanvasLoadingScreen } from "../canvas/CanvasLoadingScreen.js";
|
|
|
14
14
|
import { canvasStore } from "../canvas/canvasStore.js";
|
|
15
15
|
import { previewStore, selectIsCanvasShown } from "./previewStore.js";
|
|
16
16
|
import { SHOW_WHOLE_CANVAS_SHORTCUT, TOGGLE_CANVAS_SHORTCUT } from "./previewConstants.js";
|
|
17
|
-
import {
|
|
17
|
+
import { ContentSidebarSkeleton } from "../canvas/sidebar/ContentSidebarSkeleton.js";
|
|
18
18
|
import { takeShowCanvasRequest } from "../provider/signInShortcut.js";
|
|
19
19
|
import { PreviewEditingOwnerContext } from "./previewSelection.js";
|
|
20
20
|
import { RendererFramesProvider, RendererSlot, useRendererHost, useRendererStatus } from "../renderer/RendererFrames.js";
|
|
@@ -577,7 +577,7 @@ const PreviewShell = (t0) => {
|
|
|
577
577
|
const t14 = !!derivedLayout;
|
|
578
578
|
let t15;
|
|
579
579
|
if ($[20] !== t13 || $[21] !== t14) {
|
|
580
|
-
t15 = /* @__PURE__ */ jsx(
|
|
580
|
+
t15 = /* @__PURE__ */ jsx(ContentSidebarSkeleton, {
|
|
581
581
|
page: t13,
|
|
582
582
|
layoutPage: t14
|
|
583
583
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { previewStore, selectIsCanvasShown } from "../previewStore.js";
|
|
2
|
-
import { TOGGLE_CANVAS_SHORTCUT } from "../previewConstants.js";
|
|
3
2
|
import { formatShortcut } from "../../../lib/shortcuts.js";
|
|
3
|
+
import { TOGGLE_CANVAS_SHORTCUT } from "../previewConstants.js";
|
|
4
4
|
import { prefetchCanvas } from "./CanvasPreview.js";
|
|
5
5
|
import { DeviceSelector } from "../../../components/DeviceSelector.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
@@ -35,7 +35,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
|
|
|
35
35
|
//#region src/features/preview/components/SelectionEditor.tsx
|
|
36
36
|
const EMPTY_CONTENT = {};
|
|
37
37
|
/**
|
|
38
|
-
* The path's headers. The `kept` first steps
|
|
38
|
+
* The path's headers. The `kept` first steps and the selection always show; two or
|
|
39
39
|
* more steps between them collapse into one header, which lists them.
|
|
40
40
|
*/
|
|
41
41
|
function stackRows(items, kept) {
|
|
@@ -43,7 +43,7 @@ function stackRows(items, kept) {
|
|
|
43
43
|
index,
|
|
44
44
|
item
|
|
45
45
|
}));
|
|
46
|
-
const between = items.slice(kept, -
|
|
46
|
+
const between = items.slice(kept, -1);
|
|
47
47
|
if (between.length < 2) return rows;
|
|
48
48
|
return [
|
|
49
49
|
...rows.slice(0, kept),
|
|
@@ -31,16 +31,14 @@ const DARK_SHADE_STRENGTH = 2.5;
|
|
|
31
31
|
/** Keeps a sidebar's cards off its sides, so their edges show. */
|
|
32
32
|
const SIDEBAR_GUTTER = "px-2";
|
|
33
33
|
/**
|
|
34
|
-
* The
|
|
35
|
-
*
|
|
34
|
+
* The front card's bottom, under its header, with a soft shadow down its sides that stops short
|
|
35
|
+
* of its top, so it doesn't fall on its header.
|
|
36
36
|
*/
|
|
37
|
-
const
|
|
38
|
-
/** The
|
|
39
|
-
const
|
|
40
|
-
/**
|
|
41
|
-
const
|
|
42
|
-
/** The front card's top and sides, over the cards behind it. */
|
|
43
|
-
const FRONT_CARD_EDGES = `border border-b-0 ${CARD_EDGE_COLOR}`;
|
|
37
|
+
const CARD_BODY_EDGES = "rounded-b-lg inset-shadow-raised-bottom shadow-[0_12px_24px_-12px_rgb(0_0_0/0.14)] dark:shadow-[0_12px_24px_-12px_rgb(0_0_0/0.6)]";
|
|
38
|
+
/** The bottom card's top, as it meets the top of a sidebar. */
|
|
39
|
+
const BOTTOM_CARD_EDGES = "rounded-t-lg inset-shadow-raised-top";
|
|
40
|
+
/** A card's top, over the cards behind it. */
|
|
41
|
+
const CARD_TOP_EDGE = "inset-shadow-raised-top";
|
|
44
42
|
/**
|
|
45
43
|
* How much the second card behind the front fades its name, which shows depth on dark
|
|
46
44
|
* backgrounds too. The card right behind the front doesn't fade.
|
|
@@ -352,7 +350,7 @@ function SidebarStackView(t0) {
|
|
|
352
350
|
const { depth, className, children } = t0;
|
|
353
351
|
const ref = React.useRef(null);
|
|
354
352
|
useStackCard(ref, depth, true);
|
|
355
|
-
const t1 = React.useContext(StackMotionContext) != null && "rounded-b-lg
|
|
353
|
+
const t1 = React.useContext(StackMotionContext) != null && "rounded-b-lg inset-shadow-raised-bottom shadow-[0_12px_24px_-12px_rgb(0_0_0/0.14)] dark:shadow-[0_12px_24px_-12px_rgb(0_0_0/0.6)]";
|
|
356
354
|
let t2;
|
|
357
355
|
if ($[0] !== className || $[1] !== t1) {
|
|
358
356
|
t2 = cn("bg-background min-h-0 flex-1 origin-top", t1, className);
|
|
@@ -461,9 +459,9 @@ function SidebarStackHeader(t0) {
|
|
|
461
459
|
} else t10 = $[18];
|
|
462
460
|
const t11 = !flat && !first && "rounded-t-sm";
|
|
463
461
|
const t12 = covered ? "h-[38px] pb-1" : "h-11 px-3";
|
|
464
|
-
const t13 = first && !flat && "rounded-t-lg
|
|
465
|
-
const t14 = covered && !first &&
|
|
466
|
-
const t15 = !covered && !first &&
|
|
462
|
+
const t13 = first && !flat && "rounded-t-lg inset-shadow-raised-top";
|
|
463
|
+
const t14 = covered && !first && `${CARD_TOP_EDGE} shadow-[0_-2px_5px_-3px_rgb(0_0_0/0.08)] dark:shadow-[0_-2px_5px_-3px_rgb(0_0_0/0.4)]`;
|
|
464
|
+
const t15 = !covered && !first && `${CARD_TOP_EDGE} shadow-[0_-3px_8px_-4px_rgb(0_0_0/0.08)] dark:shadow-[0_-3px_8px_-4px_rgb(0_0_0/0.4)]`;
|
|
467
465
|
const t16 = liftable && "hover:[--fade:1] hover:[--lift:var(--hover-lift)] hover:[--shade:var(--hover-shade)] hover:[--tilt:var(--hover-tilt)]";
|
|
468
466
|
const t17 = liftable && "has-focus-visible:[--fade:1] has-focus-visible:[--lift:var(--hover-lift)] has-focus-visible:[--shade:var(--hover-shade)] has-focus-visible:[--tilt:var(--hover-tilt)]";
|
|
469
467
|
const t18 = liftable && "has-data-popup-open:[--fade:1] has-data-popup-open:[--lift:var(--hover-lift)] has-data-popup-open:[--shade:var(--hover-shade)] has-data-popup-open:[--tilt:var(--hover-tilt)]";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CanvasLoadingScreen } from "../../canvas/CanvasLoadingScreen.js";
|
|
2
2
|
import { previewStore, selectIsCanvasShown } from "../previewStore.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ContentSidebarSkeleton } from "../../canvas/sidebar/ContentSidebarSkeleton.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { useSelector } from "@xstate/store-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
/**
|
|
10
10
|
* What holds the page's place while the editor loads. The studio never renders the site's code:
|
|
11
11
|
* a loading screen shows where the page will, in the Canvas's background, until the renderer
|
|
12
|
-
* frame shows it. Showing the Canvas before the editor is ready also shows the
|
|
12
|
+
* frame shows it. Showing the Canvas before the editor is ready also shows the Content Sidebar's
|
|
13
13
|
* placeholder, as the editor does while the Canvas prepares.
|
|
14
14
|
*/
|
|
15
15
|
function StudioEditingFallback(t0) {
|
|
@@ -18,7 +18,7 @@ function StudioEditingFallback(t0) {
|
|
|
18
18
|
const isCanvasShown = useSelector(previewStore, selectIsCanvasShown);
|
|
19
19
|
let t1;
|
|
20
20
|
if ($[0] !== isCanvasShown || $[1] !== layoutPage) {
|
|
21
|
-
t1 = isCanvasShown && /* @__PURE__ */ jsx(
|
|
21
|
+
t1 = isCanvasShown && /* @__PURE__ */ jsx(ContentSidebarSkeleton, { layoutPage });
|
|
22
22
|
$[0] = isCanvasShown;
|
|
23
23
|
$[1] = layoutPage;
|
|
24
24
|
$[2] = t1;
|
|
@@ -23,7 +23,7 @@ export type PageStructure = {
|
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Why a member can't see the draft a URL names: it doesn't exist, it's someone else's
|
|
26
|
-
* development draft, or it was published or
|
|
26
|
+
* development draft, or it was published or deleted (ADR 0011). In dev mode, the caller's
|
|
27
27
|
* own development draft doesn't exist until the dev server's first sync creates it.
|
|
28
28
|
*/
|
|
29
29
|
export type DraftNotice = {
|
|
@@ -4,7 +4,7 @@ import { StudioEditingFallback } from "../preview/components/StudioEditingFallba
|
|
|
4
4
|
import { Navbar } from "../studio/components/Navbar.js";
|
|
5
5
|
import { EditingFallbackContext } from "./editingFallback.js";
|
|
6
6
|
import { PreviewToolbar } from "../preview/components/PreviewToolbar.js";
|
|
7
|
-
import {
|
|
7
|
+
import { AgentSidebar } from "../studio/components/AgentSidebar.js";
|
|
8
8
|
import { FollowAgentProvider } from "../studio/FollowAgentProvider.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { useSelector } from "@xstate/store-react";
|
|
@@ -19,7 +19,7 @@ function RuntimeChrome(t0) {
|
|
|
19
19
|
const website = !input.routeKind;
|
|
20
20
|
const hidden = useSelector(previewStore, _temp);
|
|
21
21
|
const isCanvasShown = useSelector(previewStore, selectIsCanvasShown);
|
|
22
|
-
const
|
|
22
|
+
const showAgentSidebar = website && isCanvasShown;
|
|
23
23
|
const t1 = input.runtimeBasePath;
|
|
24
24
|
let t2;
|
|
25
25
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -102,10 +102,10 @@ function RuntimeChrome(t0) {
|
|
|
102
102
|
$[18] = t9;
|
|
103
103
|
$[19] = t14;
|
|
104
104
|
} else t14 = $[19];
|
|
105
|
-
const t15 = !
|
|
105
|
+
const t15 = !showAgentSidebar;
|
|
106
106
|
let t16;
|
|
107
107
|
if ($[20] !== t15) {
|
|
108
|
-
t16 = /* @__PURE__ */ jsx(
|
|
108
|
+
t16 = /* @__PURE__ */ jsx(AgentSidebar, { hidden: t15 });
|
|
109
109
|
$[20] = t15;
|
|
110
110
|
$[21] = t16;
|
|
111
111
|
} else t16 = $[21];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils.js";
|
|
2
|
+
import { SIDEBAR_GUTTER } from "../../preview/components/SidebarStack.js";
|
|
3
|
+
import { ChatWidget } from "./ChatWidget.js";
|
|
4
|
+
import { WorkersWidget } from "./WorkersWidget.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/features/studio/components/AgentSidebar.tsx
|
|
9
|
+
/**
|
|
10
|
+
* The sidebar on the Canvas's right side, where editors work with Camox's agent: the Workers
|
|
11
|
+
* widget over the Chat widget, which gets the larger share of the height. Laid over the Canvas,
|
|
12
|
+
* as the Content Sidebar is over its left: only the cards have a background, and the Canvas shows
|
|
13
|
+
* around them. Elsewhere in the studio it is only hidden, so the chat keeps its thread and the
|
|
14
|
+
* Preview and Studio pages follow the editor's runs too.
|
|
15
|
+
*/
|
|
16
|
+
function AgentSidebar(t0) {
|
|
17
|
+
const $ = c(6);
|
|
18
|
+
const { hidden: t1 } = t0;
|
|
19
|
+
const hidden = t1 === void 0 ? false : t1;
|
|
20
|
+
let t2;
|
|
21
|
+
let t3;
|
|
22
|
+
let t4;
|
|
23
|
+
let t5;
|
|
24
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
|
+
t2 = cn("absolute inset-y-0 right-0 z-10 flex flex-col gap-2 py-2 max-md:hidden", SIDEBAR_GUTTER);
|
|
26
|
+
t3 = { width: 265 };
|
|
27
|
+
t4 = /* @__PURE__ */ jsx(WorkersWidget, { className: "min-h-0 flex-[3_1_0]" });
|
|
28
|
+
t5 = /* @__PURE__ */ jsx(ChatWidget, { className: "min-h-0 flex-[7_1_0]" });
|
|
29
|
+
$[0] = t2;
|
|
30
|
+
$[1] = t3;
|
|
31
|
+
$[2] = t4;
|
|
32
|
+
$[3] = t5;
|
|
33
|
+
} else {
|
|
34
|
+
t2 = $[0];
|
|
35
|
+
t3 = $[1];
|
|
36
|
+
t4 = $[2];
|
|
37
|
+
t5 = $[3];
|
|
38
|
+
}
|
|
39
|
+
let t6;
|
|
40
|
+
if ($[4] !== hidden) {
|
|
41
|
+
t6 = /* @__PURE__ */ jsxs("aside", {
|
|
42
|
+
"aria-label": "Agent",
|
|
43
|
+
"data-agent-sidebar": true,
|
|
44
|
+
hidden,
|
|
45
|
+
className: t2,
|
|
46
|
+
style: t3,
|
|
47
|
+
children: [t4, t5]
|
|
48
|
+
});
|
|
49
|
+
$[4] = hidden;
|
|
50
|
+
$[5] = t6;
|
|
51
|
+
} else t6 = $[5];
|
|
52
|
+
return t6;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { AgentSidebar };
|