camox 0.65.1 → 0.66.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 (30) hide show
  1. package/dist/features/canvas/CamoxCanvas.js +195 -173
  2. package/dist/features/canvas/canvasFrameCapture.js +5 -12
  3. package/dist/features/canvas/canvasFrameDocument.js +90 -29
  4. package/dist/features/canvas/canvasItems.js +22 -6
  5. package/dist/features/canvas/sidebar/ContentSidebar.js +19 -21
  6. package/dist/features/canvas/sidebar/LayoutPageOverview.js +22 -49
  7. package/dist/features/canvas/sidebar/LayoutPageSeo.js +73 -76
  8. package/dist/features/canvas/sidebar/PageInspector.js +61 -50
  9. package/dist/features/canvas/sidebar/PageInspectorSkeleton.js +4 -4
  10. package/dist/features/canvas/useCanvasCamera.js +22 -5
  11. package/dist/features/preview/components/PageInfo.js +103 -100
  12. package/dist/features/runtime/RuntimeChrome.js +66 -40
  13. package/dist/features/studio/components/AgentSidebar.js +3 -3
  14. package/dist/features/studio/components/ChatWidget.js +34 -29
  15. package/dist/features/studio/components/DraftsControl.js +172 -159
  16. package/dist/features/studio/components/Patrol.js +423 -418
  17. package/dist/features/studio/components/ReviewDraftSheet.js +227 -188
  18. package/dist/features/studio/components/ThreadComposer.js +183 -121
  19. package/dist/features/studio/components/ThreadMessages.js +19 -11
  20. package/dist/features/studio/components/UnnamedDraftBar.js +349 -0
  21. package/dist/features/studio/patrollerBio.js +40 -0
  22. package/dist/features/studio/studioStore.js +13 -0
  23. package/dist/features/studio/workingSentence.js +2 -7
  24. package/dist/lib/revisions.js +25 -3
  25. package/dist/lib/use-thread.js +1 -1
  26. package/dist/package.js +1 -1
  27. package/dist/studio.css +1 -1
  28. package/package.json +4 -4
  29. package/dist/features/canvas/sidebar/DerivedPageInspector.js +0 -49
  30. package/dist/features/canvas/sidebar/SingletonPageInspector.js +0 -39
@@ -5,6 +5,7 @@ import { Navbar } from "../studio/components/Navbar.js";
5
5
  import { EditingFallbackContext } from "./editingFallback.js";
6
6
  import { PreviewToolbar } from "../preview/components/PreviewToolbar.js";
7
7
  import { AgentSidebar } from "../studio/components/AgentSidebar.js";
8
+ import { UnnamedDraftBar } from "../studio/components/UnnamedDraftBar.js";
8
9
  import { FollowAgentProvider } from "../studio/FollowAgentProvider.js";
9
10
  import { c } from "react/compiler-runtime";
10
11
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -14,7 +15,7 @@ import studioCssUrl from "virtual:camox-studio-css";
14
15
  //#region src/features/runtime/RuntimeChrome.tsx
15
16
  const renderEditingFallback = ({ layoutPage }) => /* @__PURE__ */ jsx(StudioEditingFallback, { layoutPage });
16
17
  function RuntimeChrome(t0) {
17
- const $ = c(32);
18
+ const $ = c(39);
18
19
  const { input, children } = t0;
19
20
  const website = !input.routeKind;
20
21
  const hidden = useSelector(previewStore, _temp);
@@ -92,56 +93,81 @@ function RuntimeChrome(t0) {
92
93
  $[15] = t11;
93
94
  $[16] = t13;
94
95
  } else t13 = $[16];
95
- let t14;
96
- if ($[17] !== t13 || $[18] !== t9) {
97
- t14 = /* @__PURE__ */ jsxs("div", {
98
- className: "relative flex min-h-0 min-w-0 flex-1 flex-col",
99
- children: [t9, t13]
96
+ const t14 = website && hidden;
97
+ const t15 = website ? "max-md:hidden" : void 0;
98
+ let t16;
99
+ if ($[17] !== website) {
100
+ t16 = /* @__PURE__ */ jsx(UnnamedDraftBar, { stacked: website });
101
+ $[17] = website;
102
+ $[18] = t16;
103
+ } else t16 = $[18];
104
+ let t17;
105
+ if ($[19] !== t14 || $[20] !== t15 || $[21] !== t16) {
106
+ t17 = /* @__PURE__ */ jsx("div", {
107
+ hidden: t14,
108
+ className: t15,
109
+ children: t16
100
110
  });
101
- $[17] = t13;
102
- $[18] = t9;
103
111
  $[19] = t14;
104
- } else t14 = $[19];
105
- const t15 = !showAgentSidebar;
106
- let t16;
107
- if ($[20] !== t15) {
108
- t16 = /* @__PURE__ */ jsx(AgentSidebar, { hidden: t15 });
109
112
  $[20] = t15;
110
113
  $[21] = t16;
111
- } else t16 = $[21];
112
- let t17;
113
- if ($[22] !== t14 || $[23] !== t16) {
114
- t17 = /* @__PURE__ */ jsxs("div", {
115
- className: "relative flex min-h-0 flex-1",
116
- children: [t14, t16]
117
- });
118
- $[22] = t14;
119
- $[23] = t16;
120
- $[24] = t17;
121
- } else t17 = $[24];
114
+ $[22] = t17;
115
+ } else t17 = $[22];
122
116
  let t18;
123
- if ($[25] !== t17 || $[26] !== t7) {
117
+ if ($[23] !== t13 || $[24] !== t17 || $[25] !== t9) {
124
118
  t18 = /* @__PURE__ */ jsxs("div", {
119
+ className: "relative flex min-h-0 min-w-0 flex-1 flex-col",
120
+ children: [
121
+ t9,
122
+ t13,
123
+ t17
124
+ ]
125
+ });
126
+ $[23] = t13;
127
+ $[24] = t17;
128
+ $[25] = t9;
129
+ $[26] = t18;
130
+ } else t18 = $[26];
131
+ const t19 = !showAgentSidebar;
132
+ let t20;
133
+ if ($[27] !== t19) {
134
+ t20 = /* @__PURE__ */ jsx(AgentSidebar, { hidden: t19 });
135
+ $[27] = t19;
136
+ $[28] = t20;
137
+ } else t20 = $[28];
138
+ let t21;
139
+ if ($[29] !== t18 || $[30] !== t20) {
140
+ t21 = /* @__PURE__ */ jsxs("div", {
141
+ className: "relative flex min-h-0 flex-1",
142
+ children: [t18, t20]
143
+ });
144
+ $[29] = t18;
145
+ $[30] = t20;
146
+ $[31] = t21;
147
+ } else t21 = $[31];
148
+ let t22;
149
+ if ($[32] !== t21 || $[33] !== t7) {
150
+ t22 = /* @__PURE__ */ jsxs("div", {
125
151
  className: "bg-background flex h-screen flex-col overflow-hidden",
126
- children: [t7, t17]
152
+ children: [t7, t21]
127
153
  });
128
- $[25] = t17;
129
- $[26] = t7;
130
- $[27] = t18;
131
- } else t18 = $[27];
132
- let t19;
133
- if ($[28] !== input.runtimeBasePath || $[29] !== t18 || $[30] !== website) {
134
- t19 = /* @__PURE__ */ jsxs(FollowAgentProvider, {
154
+ $[32] = t21;
155
+ $[33] = t7;
156
+ $[34] = t22;
157
+ } else t22 = $[34];
158
+ let t23;
159
+ if ($[35] !== input.runtimeBasePath || $[36] !== t22 || $[37] !== website) {
160
+ t23 = /* @__PURE__ */ jsxs(FollowAgentProvider, {
135
161
  runtimeBasePath: t1,
136
162
  website,
137
- children: [t2, t18]
163
+ children: [t2, t22]
138
164
  });
139
- $[28] = input.runtimeBasePath;
140
- $[29] = t18;
141
- $[30] = website;
142
- $[31] = t19;
143
- } else t19 = $[31];
144
- return t19;
165
+ $[35] = input.runtimeBasePath;
166
+ $[36] = t22;
167
+ $[37] = website;
168
+ $[38] = t23;
169
+ } else t23 = $[38];
170
+ return t23;
145
171
  }
146
172
  function _temp(state) {
147
173
  return state.context.isToolbarHidden;
@@ -7,8 +7,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/features/studio/components/AgentSidebar.tsx
9
9
  /**
10
- * The sidebar on the Canvas's right side, where editors work with Camox's agent: the Patrol
11
- * over the Chat widget, which gets the larger share of the height. Laid over the Canvas,
10
+ * The sidebar on the Canvas's right side, where editors work with Camox's agent: the Patrol, as
11
+ * tall as its patrollers, over the Chat widget, which gets the rest of the height. Laid over the Canvas,
12
12
  * as the Content Sidebar is over its left: only the cards have a background, and the Canvas shows
13
13
  * around them. Elsewhere in the studio it is only hidden, so the chat keeps its thread and the
14
14
  * Preview and Studio pages follow the editor's runs too.
@@ -24,7 +24,7 @@ function AgentSidebar(t0) {
24
24
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
25
25
  t2 = cn("absolute inset-y-0 right-0 z-10 flex flex-col gap-2 py-2 max-md:hidden", SIDEBAR_GUTTER);
26
26
  t3 = { width: 265 };
27
- t4 = /* @__PURE__ */ jsx(Patrol, { className: "min-h-0 flex-[3_1_0]" });
27
+ t4 = /* @__PURE__ */ jsx(Patrol, { className: "min-h-0 flex-[0_1_auto]" });
28
28
  t5 = /* @__PURE__ */ jsx(ChatWidget, { className: "min-h-0 flex-[7_1_0]" });
29
29
  $[0] = t2;
30
30
  $[1] = t3;
@@ -10,7 +10,7 @@ import { useThread } from "../../../lib/use-thread.js";
10
10
  import { EditorWhereContext } from "../editorWhereContext.js";
11
11
  import { useEditorSelection } from "../useEditorSelection.js";
12
12
  import { ConnectAgent } from "./ConnectAgent.js";
13
- import { ThreadComposer } from "./ThreadComposer.js";
13
+ import { ThreadComposer, useComposerCarrier } from "./ThreadComposer.js";
14
14
  import { ThreadMessages } from "./ThreadMessages.js";
15
15
  import { c } from "react/compiler-runtime";
16
16
  import * as React from "react";
@@ -72,7 +72,7 @@ function ChatWidget(t0) {
72
72
  return t4;
73
73
  }
74
74
  function CurrentThread() {
75
- const $ = c(14);
75
+ const $ = c(15);
76
76
  const { apiUrl, projectUuid } = React.useContext(AuthContext);
77
77
  let t0;
78
78
  if ($[0] !== projectUuid) {
@@ -84,6 +84,7 @@ function CurrentThread() {
84
84
  const draftId = useCurrentDraftId();
85
85
  const draftScope = useDraftScope();
86
86
  const navigate = useNavigate();
87
+ const composerCarry = useComposerCarrier();
87
88
  let t1;
88
89
  if ($[2] !== draftScope) {
89
90
  t1 = (started) => draftScope.enterStarted(started);
@@ -111,27 +112,29 @@ function CurrentThread() {
111
112
  }
112
113
  const t3 = `${project.id}:${draftId ?? "live"}`;
113
114
  let t4;
114
- if ($[7] !== apiUrl || $[8] !== draftId || $[9] !== enterDraft || $[10] !== openDraft || $[11] !== project.id || $[12] !== t3) {
115
+ if ($[7] !== apiUrl || $[8] !== composerCarry || $[9] !== draftId || $[10] !== enterDraft || $[11] !== openDraft || $[12] !== project.id || $[13] !== t3) {
115
116
  t4 = /* @__PURE__ */ jsx(Thread, {
116
117
  apiUrl,
117
118
  projectId: project.id,
118
119
  draftId,
119
120
  onEnterDraft: enterDraft,
120
- onOpenDraft: openDraft
121
+ onOpenDraft: openDraft,
122
+ composerCarry
121
123
  }, t3);
122
124
  $[7] = apiUrl;
123
- $[8] = draftId;
124
- $[9] = enterDraft;
125
- $[10] = openDraft;
126
- $[11] = project.id;
127
- $[12] = t3;
128
- $[13] = t4;
129
- } else t4 = $[13];
125
+ $[8] = composerCarry;
126
+ $[9] = draftId;
127
+ $[10] = enterDraft;
128
+ $[11] = openDraft;
129
+ $[12] = project.id;
130
+ $[13] = t3;
131
+ $[14] = t4;
132
+ } else t4 = $[14];
130
133
  return t4;
131
134
  }
132
135
  function Thread(t0) {
133
- const $ = c(40);
134
- const { apiUrl, projectId, draftId, onEnterDraft, onOpenDraft } = t0;
136
+ const $ = c(41);
137
+ const { apiUrl, projectId, draftId, onEnterDraft, onOpenDraft, composerCarry } = t0;
135
138
  let t1;
136
139
  if ($[0] !== onEnterDraft) {
137
140
  t1 = { onEnterDraft };
@@ -248,35 +251,37 @@ function Thread(t0) {
248
251
  } else t12 = $[28];
249
252
  const t13 = asked ?? void 0;
250
253
  let t14;
251
- if ($[29] !== sendFollowing || $[30] !== stop || $[31] !== t11 || $[32] !== t12 || $[33] !== t13 || $[34] !== view.running) {
254
+ if ($[29] !== composerCarry || $[30] !== sendFollowing || $[31] !== stop || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== view.running) {
252
255
  t14 = /* @__PURE__ */ jsx(ThreadComposer, {
253
256
  onSend: sendFollowing,
254
257
  onStop: stop,
255
258
  selection: t11,
256
259
  onClearSelection: t12,
257
260
  running: view.running,
258
- filled: t13
261
+ filled: t13,
262
+ carry: composerCarry
259
263
  });
260
- $[29] = sendFollowing;
261
- $[30] = stop;
262
- $[31] = t11;
263
- $[32] = t12;
264
- $[33] = t13;
265
- $[34] = view.running;
266
- $[35] = t14;
267
- } else t14 = $[35];
264
+ $[29] = composerCarry;
265
+ $[30] = sendFollowing;
266
+ $[31] = stop;
267
+ $[32] = t11;
268
+ $[33] = t12;
269
+ $[34] = t13;
270
+ $[35] = view.running;
271
+ $[36] = t14;
272
+ } else t14 = $[36];
268
273
  let t15;
269
- if ($[36] !== t10 || $[37] !== t14 || $[38] !== t9) {
274
+ if ($[37] !== t10 || $[38] !== t14 || $[39] !== t9) {
270
275
  t15 = /* @__PURE__ */ jsxs(Fragment, { children: [
271
276
  t9,
272
277
  t10,
273
278
  t14
274
279
  ] });
275
- $[36] = t10;
276
- $[37] = t14;
277
- $[38] = t9;
278
- $[39] = t15;
279
- } else t15 = $[39];
280
+ $[37] = t10;
281
+ $[38] = t14;
282
+ $[39] = t9;
283
+ $[40] = t15;
284
+ } else t15 = $[40];
280
285
  return t15;
281
286
  }
282
287
  function _temp(state) {