camox 0.72.0 → 0.75.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 (38) hide show
  1. package/dist/core/lib/artifactRuntime.js +4 -2
  2. package/dist/features/preview/components/PageInfo.js +121 -98
  3. package/dist/features/preview/components/SelectionEditor.js +1 -1
  4. package/dist/features/renderer/RendererFrames.js +47 -41
  5. package/dist/features/routes/pageRuntime.js +15 -4
  6. package/dist/features/runtime/ClaimCard.js +192 -0
  7. package/dist/features/runtime/pageApp.js +4 -3
  8. package/dist/features/runtime/runtime.js +26 -5
  9. package/dist/features/runtime/worker.js +2 -2
  10. package/dist/features/runtime/workerRequest.d.ts +6 -0
  11. package/dist/features/runtime/workerRequest.js +13 -1
  12. package/dist/features/runtime/workerRuntime.d.ts +2 -2
  13. package/dist/features/runtime/workerRuntime.js +2 -2
  14. package/dist/features/studio/components/AgentSidebar.js +7 -7
  15. package/dist/features/studio/components/ChatWidget.js +142 -106
  16. package/dist/features/studio/components/ContentFindings.js +127 -230
  17. package/dist/features/studio/components/DeleteDraftDialog.js +112 -0
  18. package/dist/features/studio/components/DraftBar.js +98 -53
  19. package/dist/features/studio/components/DraftsControl.js +203 -190
  20. package/dist/features/studio/components/ReviewDraftDialog.js +670 -0
  21. package/dist/features/studio/components/{Patrol.js → Specialists.js} +291 -330
  22. package/dist/features/studio/components/Squareling.js +5 -5
  23. package/dist/features/studio/components/ThreadComposer.js +106 -127
  24. package/dist/features/studio/components/ThreadMessages.js +246 -71
  25. package/dist/features/studio/findingSentence.js +14 -12
  26. package/dist/features/studio/fixMessage.js +23 -0
  27. package/dist/features/studio/reportSentence.js +1 -1
  28. package/dist/features/studio/{patrollerBio.js → specialistBio.js} +8 -5
  29. package/dist/features/studio/studioStore.js +29 -15
  30. package/dist/features/studio/workingSentence.js +1 -1
  31. package/dist/lib/api-client.js +5 -1
  32. package/dist/lib/queries.js +5 -5
  33. package/dist/lib/studio-reads.d.ts +1 -1
  34. package/dist/lib/studio-reads.js +5 -5
  35. package/dist/package.js +1 -1
  36. package/dist/studio.css +1 -1
  37. package/package.json +4 -4
  38. package/dist/features/studio/components/ReviewDraftSheet.js +0 -1587
@@ -9,12 +9,12 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  * mark, or at the editor while idle. Its face and motion say what it is doing. The animations
10
10
  * live in `studio.css`.
11
11
  *
12
- * The agent's (the default) is the logo's square with its soft corner, in emerald. Each patroller
12
+ * The agent's (the default) is the logo's square with its soft corner, in emerald. Each specialist
13
13
  * has its own, one family: the Translator is the logo's wide wedge, in violet, glancing across
14
14
  * while it works; the SEO manager is a tall block with the small shape's soft corner, in amber,
15
15
  * scanning down while it works.
16
16
  *
17
- * A patroller off duty where the editor is sleeps, eyes closed, breathing slowly.
17
+ * A specialist off duty where the editor is sleeps, eyes closed, breathing slowly.
18
18
  *
19
19
  * One face flows into the next: its eyes glide to where the next face holds them, opening or
20
20
  * narrowing, and a looping motion settles before the next one starts (`useFaceChange`).
@@ -67,7 +67,7 @@ function Squareling(props) {
67
67
  children: props.variant === void 0 || props.variant === "agent" ? /* @__PURE__ */ jsx(AgentEyes, {
68
68
  eyes: look.eyes,
69
69
  status: props.status
70
- }) : /* @__PURE__ */ jsx(PatrollerEyes, {
70
+ }) : /* @__PURE__ */ jsx(SpecialistEyes, {
71
71
  eyes: look.eyes,
72
72
  working: props.status === "working",
73
73
  asleep: props.status === "asleep"
@@ -306,10 +306,10 @@ function AgentEyes(t0) {
306
306
  return t5;
307
307
  }
308
308
  /**
309
- * A patroller's eyes: open while idle, narrowed on the work while working, closed while asleep,
309
+ * A specialist's eyes: open while idle, narrowed on the work while working, closed while asleep,
310
310
  * when they don't blink.
311
311
  */
312
- function PatrollerEyes({ eyes, working, asleep }) {
312
+ function SpecialistEyes({ eyes, working, asleep }) {
313
313
  return eyes.x.map((x) => /* @__PURE__ */ jsx(Eye, {
314
314
  x,
315
315
  y: eyes.y,
@@ -8,14 +8,13 @@ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextarea } fro
8
8
  /**
9
9
  * Where an editor writes to the agent: Enter sends, Shift+Enter adds a line. While a run is
10
10
  * going, sending steers it, and a Stop button sits beside Send. Over the message, what the
11
- * editor has selected, which their messages carry to the agent until they clear it. A message
12
- * filled in from elsewhere in the studio replaces what the editor wrote, for them to send. Given a
11
+ * editor has selected, which their messages carry to the agent until they clear it. Given a
13
12
  * `carry`, the composer of the next thread goes on from this one, as when the studio enters the
14
13
  * draft the editor's request was handed off to: with what they were writing, focused if it was.
15
14
  */
16
15
  function ThreadComposer(t0) {
17
- const $ = c(48);
18
- const { onSend, onStop, selection, onClearSelection, running: t1, disabled: t2, filled, carry } = t0;
16
+ const $ = c(45);
17
+ const { onSend, onStop, selection, onClearSelection, running: t1, disabled: t2, carry } = t0;
19
18
  const running = t1 === void 0 ? false : t1;
20
19
  const disabled = t2 === void 0 ? false : t2;
21
20
  let t3;
@@ -25,11 +24,6 @@ function ThreadComposer(t0) {
25
24
  $[1] = t3;
26
25
  } else t3 = $[1];
27
26
  const [text, setText] = useState(t3);
28
- const [filledId, setFilledId] = useState();
29
- if (filled && filled.id !== filledId) {
30
- setFilledId(filled.id);
31
- setText(filled.text);
32
- }
33
27
  const box = useRef(null);
34
28
  let t4;
35
29
  let t5;
@@ -72,53 +66,38 @@ function ThreadComposer(t0) {
72
66
  }
73
67
  useLayoutEffect(t6, t7);
74
68
  let t8;
75
- let t9;
76
- if ($[9] !== filledId) {
77
- t8 = () => {
78
- if (filledId !== void 0) box.current?.focus();
79
- };
80
- t9 = [filledId];
81
- $[9] = filledId;
69
+ if ($[9] !== text) {
70
+ t8 = text.trim();
71
+ $[9] = text;
82
72
  $[10] = t8;
83
- $[11] = t9;
84
- } else {
85
- t8 = $[10];
86
- t9 = $[11];
87
- }
88
- useEffect(t8, t9);
89
- let t10;
90
- if ($[12] !== text) {
91
- t10 = text.trim();
92
- $[12] = text;
93
- $[13] = t10;
94
- } else t10 = $[13];
95
- const message = t10;
73
+ } else t8 = $[10];
74
+ const message = t8;
96
75
  const canSend = !disabled && message !== "" && onSend !== void 0;
97
- let t11;
98
- if ($[14] !== canSend || $[15] !== message || $[16] !== onSend) {
99
- t11 = () => {
76
+ let t9;
77
+ if ($[11] !== canSend || $[12] !== message || $[13] !== onSend) {
78
+ t9 = () => {
100
79
  if (!canSend) return;
101
80
  onSend(message);
102
81
  setText("");
103
82
  };
104
- $[14] = canSend;
105
- $[15] = message;
106
- $[16] = onSend;
107
- $[17] = t11;
108
- } else t11 = $[17];
109
- const submit = t11;
110
- let t12;
111
- if ($[18] !== submit) {
112
- t12 = (event) => {
83
+ $[11] = canSend;
84
+ $[12] = message;
85
+ $[13] = onSend;
86
+ $[14] = t9;
87
+ } else t9 = $[14];
88
+ const submit = t9;
89
+ let t10;
90
+ if ($[15] !== submit) {
91
+ t10 = (event) => {
113
92
  event.preventDefault();
114
93
  submit();
115
94
  };
116
- $[18] = submit;
117
- $[19] = t12;
118
- } else t12 = $[19];
119
- let t13;
120
- if ($[20] !== onClearSelection || $[21] !== selection) {
121
- t13 = selection && /* @__PURE__ */ jsx(InputGroupAddon, {
95
+ $[15] = submit;
96
+ $[16] = t10;
97
+ } else t10 = $[16];
98
+ let t11;
99
+ if ($[17] !== onClearSelection || $[18] !== selection) {
100
+ t11 = selection && /* @__PURE__ */ jsx(InputGroupAddon, {
122
101
  align: "block-start",
123
102
  className: "border-input border-b",
124
103
  children: /* @__PURE__ */ jsx(SelectionChip, {
@@ -126,45 +105,45 @@ function ThreadComposer(t0) {
126
105
  onClear: onClearSelection
127
106
  })
128
107
  });
129
- $[20] = onClearSelection;
130
- $[21] = selection;
131
- $[22] = t13;
132
- } else t13 = $[22];
133
- let t14;
134
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
135
- t14 = (event_0) => setText(event_0.target.value);
136
- $[23] = t14;
137
- } else t14 = $[23];
138
- let t15;
139
- if ($[24] !== submit) {
140
- t15 = (event_1) => {
108
+ $[17] = onClearSelection;
109
+ $[18] = selection;
110
+ $[19] = t11;
111
+ } else t11 = $[19];
112
+ let t12;
113
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
114
+ t12 = (event_0) => setText(event_0.target.value);
115
+ $[20] = t12;
116
+ } else t12 = $[20];
117
+ let t13;
118
+ if ($[21] !== submit) {
119
+ t13 = (event_1) => {
141
120
  if (event_1.key !== "Enter" || event_1.shiftKey || event_1.nativeEvent.isComposing) return;
142
121
  event_1.preventDefault();
143
122
  submit();
144
123
  };
145
- $[24] = submit;
146
- $[25] = t15;
147
- } else t15 = $[25];
148
- let t16;
149
- if ($[26] !== disabled || $[27] !== t15 || $[28] !== text) {
150
- t16 = /* @__PURE__ */ jsx(InputGroupTextarea, {
124
+ $[21] = submit;
125
+ $[22] = t13;
126
+ } else t13 = $[22];
127
+ let t14;
128
+ if ($[23] !== disabled || $[24] !== t13 || $[25] !== text) {
129
+ t14 = /* @__PURE__ */ jsx(InputGroupTextarea, {
151
130
  ref: box,
152
131
  "aria-label": "Message",
153
132
  placeholder: "Message Camox…",
154
133
  value: text,
155
134
  disabled,
156
- onChange: t14,
157
- onKeyDown: t15,
135
+ onChange: t12,
136
+ onKeyDown: t13,
158
137
  className: "max-h-48 min-h-14"
159
138
  });
160
- $[26] = disabled;
161
- $[27] = t15;
162
- $[28] = text;
163
- $[29] = t16;
164
- } else t16 = $[29];
165
- let t17;
166
- if ($[30] !== disabled || $[31] !== onStop || $[32] !== running) {
167
- t17 = running && onStop && /* @__PURE__ */ jsxs(InputGroupButton, {
139
+ $[23] = disabled;
140
+ $[24] = t13;
141
+ $[25] = text;
142
+ $[26] = t14;
143
+ } else t14 = $[26];
144
+ let t15;
145
+ if ($[27] !== disabled || $[28] !== onStop || $[29] !== running) {
146
+ t15 = running && onStop && /* @__PURE__ */ jsxs(InputGroupButton, {
168
147
  type: "button",
169
148
  variant: "outline",
170
149
  size: "icon-sm",
@@ -175,73 +154,73 @@ function ThreadComposer(t0) {
175
154
  children: "Stop"
176
155
  })]
177
156
  });
178
- $[30] = disabled;
179
- $[31] = onStop;
180
- $[32] = running;
181
- $[33] = t17;
182
- } else t17 = $[33];
183
- const t18 = !canSend;
184
- let t19;
185
- let t20;
186
- if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
187
- t19 = /* @__PURE__ */ jsx(ArrowUp, {});
188
- t20 = /* @__PURE__ */ jsx("span", {
157
+ $[27] = disabled;
158
+ $[28] = onStop;
159
+ $[29] = running;
160
+ $[30] = t15;
161
+ } else t15 = $[30];
162
+ const t16 = !canSend;
163
+ let t17;
164
+ let t18;
165
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
166
+ t17 = /* @__PURE__ */ jsx(ArrowUp, {});
167
+ t18 = /* @__PURE__ */ jsx("span", {
189
168
  className: "sr-only",
190
169
  children: "Send"
191
170
  });
192
- $[34] = t19;
193
- $[35] = t20;
171
+ $[31] = t17;
172
+ $[32] = t18;
194
173
  } else {
195
- t19 = $[34];
196
- t20 = $[35];
174
+ t17 = $[31];
175
+ t18 = $[32];
197
176
  }
198
- let t21;
199
- if ($[36] !== t18) {
200
- t21 = /* @__PURE__ */ jsxs(InputGroupButton, {
177
+ let t19;
178
+ if ($[33] !== t16) {
179
+ t19 = /* @__PURE__ */ jsxs(InputGroupButton, {
201
180
  type: "submit",
202
181
  variant: "default",
203
182
  size: "icon-sm",
204
- disabled: t18,
205
- children: [t19, t20]
183
+ disabled: t16,
184
+ children: [t17, t18]
206
185
  });
207
- $[36] = t18;
208
- $[37] = t21;
209
- } else t21 = $[37];
210
- let t22;
211
- if ($[38] !== t17 || $[39] !== t21) {
212
- t22 = /* @__PURE__ */ jsxs(InputGroupAddon, {
186
+ $[33] = t16;
187
+ $[34] = t19;
188
+ } else t19 = $[34];
189
+ let t20;
190
+ if ($[35] !== t15 || $[36] !== t19) {
191
+ t20 = /* @__PURE__ */ jsxs(InputGroupAddon, {
213
192
  align: "block-end",
214
193
  className: "justify-end",
215
- children: [t17, t21]
194
+ children: [t15, t19]
216
195
  });
217
- $[38] = t17;
218
- $[39] = t21;
219
- $[40] = t22;
220
- } else t22 = $[40];
221
- let t23;
222
- if ($[41] !== t13 || $[42] !== t16 || $[43] !== t22) {
223
- t23 = /* @__PURE__ */ jsxs(InputGroup, { children: [
224
- t13,
225
- t16,
226
- t22
196
+ $[35] = t15;
197
+ $[36] = t19;
198
+ $[37] = t20;
199
+ } else t20 = $[37];
200
+ let t21;
201
+ if ($[38] !== t11 || $[39] !== t14 || $[40] !== t20) {
202
+ t21 = /* @__PURE__ */ jsxs(InputGroup, { children: [
203
+ t11,
204
+ t14,
205
+ t20
227
206
  ] });
228
- $[41] = t13;
229
- $[42] = t16;
230
- $[43] = t22;
231
- $[44] = t23;
232
- } else t23 = $[44];
233
- let t24;
234
- if ($[45] !== t12 || $[46] !== t23) {
235
- t24 = /* @__PURE__ */ jsx("form", {
207
+ $[38] = t11;
208
+ $[39] = t14;
209
+ $[40] = t20;
210
+ $[41] = t21;
211
+ } else t21 = $[41];
212
+ let t22;
213
+ if ($[42] !== t10 || $[43] !== t21) {
214
+ t22 = /* @__PURE__ */ jsx("form", {
236
215
  className: "p-2",
237
- onSubmit: t12,
238
- children: t23
216
+ onSubmit: t10,
217
+ children: t21
239
218
  });
240
- $[45] = t12;
241
- $[46] = t23;
242
- $[47] = t24;
243
- } else t24 = $[47];
244
- return t24;
219
+ $[42] = t10;
220
+ $[43] = t21;
221
+ $[44] = t22;
222
+ } else t22 = $[44];
223
+ return t22;
245
224
  }
246
225
  /** A carrier that lasts as long as the component that keeps it. */
247
226
  function useComposerCarrier() {