camox 0.71.0 → 0.74.1

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 (104) hide show
  1. package/dist/core/createApp.d.ts +4 -103
  2. package/dist/core/createApp.js +3 -24
  3. package/dist/core/createBlock.d.ts +2 -2
  4. package/dist/core/createBlock.js +41 -185
  5. package/dist/core/createLayout.d.ts +6 -77
  6. package/dist/core/createLayout.js +12 -50
  7. package/dist/core/editing/createEditableBlock.d.ts +9 -75
  8. package/dist/core/editing/createEditableBlock.js +258 -640
  9. package/dist/core/hooks/useIsEditable.js +2 -2
  10. package/dist/core/lib/artifactData.js +8 -3
  11. package/dist/core/lib/contentType.d.ts +23 -38
  12. package/dist/core/lib/contentType.js +34 -62
  13. package/dist/core/lib/iconTypes.d.ts +0 -3
  14. package/dist/core/lib/icons.js +63 -51
  15. package/dist/core/lib/recordScope.js +1 -1
  16. package/dist/features/canvas/CanvasOverlays.js +94 -176
  17. package/dist/features/canvas/CanvasPageFrame.js +62 -68
  18. package/dist/features/canvas/CanvasPreviewPageSlot.js +1 -3
  19. package/dist/features/canvas/canvasOverlayGeometry.js +1 -7
  20. package/dist/features/canvas/sidebar/CuratedPageInspector.js +3 -21
  21. package/dist/features/canvas/sidebar/LayoutPageBlocks.js +1 -2
  22. package/dist/features/canvas/useCanvasCamera.js +1 -1
  23. package/dist/features/canvas/useCanvasFrame.js +1 -1
  24. package/dist/features/content/ContentCollection.js +2 -2
  25. package/dist/features/content/collection-form.js +6 -7
  26. package/dist/features/page/CuratedPageContent.js +15 -24
  27. package/dist/features/page/UnplacedBlockContent.js +1 -6
  28. package/dist/features/preview/CamoxPreview.js +30 -33
  29. package/dist/features/preview/EditablePageContent.js +131 -151
  30. package/dist/features/preview/components/BlockActionsPopover.js +43 -152
  31. package/dist/features/preview/components/CanvasPreview.js +2 -2
  32. package/dist/features/preview/components/Frame.js +3 -3
  33. package/dist/features/preview/components/IconFieldEditor.js +1 -1
  34. package/dist/features/preview/components/ItemFieldsEditor.js +1 -3
  35. package/dist/features/preview/components/Overlays.js +18 -84
  36. package/dist/features/preview/components/PageInfo.js +121 -98
  37. package/dist/features/preview/components/PageTree.js +57 -103
  38. package/dist/features/preview/components/PreviewPanel.js +8 -11
  39. package/dist/features/preview/components/RecordCombobox.js +65 -78
  40. package/dist/features/preview/components/ReferenceFieldEditor.js +1 -19
  41. package/dist/features/preview/components/ReferenceListFieldEditor.js +1 -19
  42. package/dist/features/preview/components/RemovedBlockPlaceholder.js +2 -2
  43. package/dist/features/preview/components/SelectionEditor.js +6 -5
  44. package/dist/features/preview/components/useRepeatableItemActions.js +18 -24
  45. package/dist/features/preview/components/useUpdateBlockPosition.js +1 -1
  46. package/dist/features/preview/overlayMessages.js +1 -4
  47. package/dist/features/preview/previewStore.js +3 -23
  48. package/dist/features/renderer/RendererApp.js +17 -141
  49. package/dist/features/renderer/definitionAnswers.js +1 -8
  50. package/dist/features/renderer/rendererHost.js +1 -31
  51. package/dist/features/renderer/studioConnection.js +1 -25
  52. package/dist/features/routes/pageRuntime.js +15 -4
  53. package/dist/features/runtime/ClaimCard.js +192 -0
  54. package/dist/features/runtime/pageApp.js +5 -4
  55. package/dist/features/runtime/runtime.js +29 -8
  56. package/dist/features/runtime/worker.js +2 -2
  57. package/dist/features/runtime/workerRequest.d.ts +6 -0
  58. package/dist/features/runtime/workerRequest.js +13 -1
  59. package/dist/features/runtime/workerRuntime.d.ts +2 -2
  60. package/dist/features/runtime/workerRuntime.js +2 -2
  61. package/dist/features/studio/components/AgentSidebar.js +7 -7
  62. package/dist/features/studio/components/ChatWidget.js +142 -106
  63. package/dist/features/studio/components/ContentFindings.js +127 -230
  64. package/dist/features/studio/components/DeleteDraftDialog.js +112 -0
  65. package/dist/features/studio/components/DraftBar.js +98 -53
  66. package/dist/features/studio/components/DraftsControl.js +203 -190
  67. package/dist/features/studio/components/ReviewDraftDialog.js +670 -0
  68. package/dist/features/studio/components/{Patrol.js → Specialists.js} +291 -330
  69. package/dist/features/studio/components/Squareling.js +5 -5
  70. package/dist/features/studio/components/ThreadComposer.js +106 -127
  71. package/dist/features/studio/components/ThreadMessages.js +137 -45
  72. package/dist/features/studio/findingSentence.js +14 -12
  73. package/dist/features/studio/fixMessage.js +23 -0
  74. package/dist/features/studio/reportSentence.js +1 -1
  75. package/dist/features/studio/{patrollerBio.js → specialistBio.js} +8 -5
  76. package/dist/features/studio/studioStore.js +29 -15
  77. package/dist/features/studio/workingSentence.js +1 -1
  78. package/dist/features/vite/blockBoilerplate.js +1 -1
  79. package/dist/features/vite/definitionsSync.js +1 -8
  80. package/dist/lib/api-client.js +5 -1
  81. package/dist/lib/queries.js +5 -6
  82. package/dist/lib/studio-definitions.js +0 -2
  83. package/dist/lib/studio-reads.d.ts +1 -1
  84. package/dist/lib/studio-reads.js +5 -10
  85. package/dist/lib/use-thread.js +196 -138
  86. package/dist/package.js +1 -1
  87. package/dist/studio-overlays.css +0 -29
  88. package/dist/studio.css +1 -1
  89. package/package.json +4 -4
  90. package/skills/camox/SKILL.md +1 -1
  91. package/skills/camox/references/artifacts.md +4 -4
  92. package/skills/camox/references/block-definitions.md +21 -25
  93. package/skills/camox/references/dom-integrations.md +1 -1
  94. package/skills/camox/references/layout-definitions.md +3 -12
  95. package/skills/camox/references/routed-layouts.md +2 -2
  96. package/skills/camox-expand/SKILL.md +5 -5
  97. package/skills/camoxify/SKILL.md +4 -4
  98. package/dist/features/canvas/canvasInsertionSeams.js +0 -44
  99. package/dist/features/preview/components/AddBlockSheet.js +0 -314
  100. package/dist/features/preview/components/BlockPeek.js +0 -66
  101. package/dist/features/preview/components/BlockThumbnail.js +0 -281
  102. package/dist/features/preview/components/blockGridNavigation.js +0 -15
  103. package/dist/features/preview/referencePickerFocus.js +0 -29
  104. package/dist/features/studio/components/ReviewDraftSheet.js +0 -1587
@@ -7,7 +7,8 @@ import { cn } from "../../../lib/utils.js";
7
7
  import { studioStore } from "../studioStore.js";
8
8
  import { draftLabel, plural, timeAgo } from "../draftLabel.js";
9
9
  import { useLeaveDraft, useSwitchView } from "../viewSwitch.js";
10
- import { DeleteDraftDialog, ReviewDraftSheet } from "./ReviewDraftSheet.js";
10
+ import { DeleteDraftDialog } from "./DeleteDraftDialog.js";
11
+ import { ReviewDraftDialog } from "./ReviewDraftDialog.js";
11
12
  import { c } from "react/compiler-runtime";
12
13
  import * as React from "react";
13
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -98,7 +99,7 @@ function useDrafts() {
98
99
  * still names what the studio is viewing.
99
100
  */
100
101
  function DraftPicker(t0) {
101
- const $ = c(66);
102
+ const $ = c(69);
102
103
  const { disabled: t1 } = t0;
103
104
  const disabled = t1 === void 0 ? false : t1;
104
105
  const { draftScope, draftId, projectId, list, current } = useDrafts();
@@ -106,38 +107,45 @@ function DraftPicker(t0) {
106
107
  const leaveDraft = useLeaveDraft();
107
108
  const switchView = useSwitchView();
108
109
  const reviewing = useSelector(studioStore, _temp);
109
- const deleting = useSelector(studioStore, _temp2);
110
110
  let t2;
111
- let t3;
112
- if ($[0] !== draftScope) {
113
- t2 = () => draftScope.subscribe(_temp3);
114
- t3 = [draftScope];
115
- $[0] = draftScope;
111
+ if ($[0] !== draftId) {
112
+ t2 = (state_0) => !!draftId && state_0.context.agentWorkingIn === draftId;
113
+ $[0] = draftId;
116
114
  $[1] = t2;
117
- $[2] = t3;
118
- } else {
119
- t2 = $[1];
120
- t3 = $[2];
121
- }
122
- React.useEffect(t2, t3);
115
+ } else t2 = $[1];
116
+ const working = useSelector(studioStore, t2);
117
+ const deleting = useSelector(studioStore, _temp2);
118
+ let t3;
123
119
  let t4;
124
- if ($[3] !== draftId) {
125
- t4 = [draftId];
126
- $[3] = draftId;
120
+ if ($[2] !== draftScope) {
121
+ t3 = () => draftScope.subscribe(_temp3);
122
+ t4 = [draftScope];
123
+ $[2] = draftScope;
124
+ $[3] = t3;
127
125
  $[4] = t4;
128
- } else t4 = $[4];
129
- React.useEffect(_temp5, t4);
130
- const listed = list?.drafts;
126
+ } else {
127
+ t3 = $[3];
128
+ t4 = $[4];
129
+ }
130
+ React.useEffect(t3, t4);
131
131
  let t5;
132
- if ($[5] !== listed) {
133
- t5 = listed ?? [];
134
- $[5] = listed;
132
+ if ($[5] !== draftId) {
133
+ t5 = [draftId];
134
+ $[5] = draftId;
135
135
  $[6] = t5;
136
136
  } else t5 = $[6];
137
- const drafts = t5;
137
+ React.useEffect(_temp5, t5);
138
+ const listed = list?.drafts;
138
139
  let t6;
139
- if ($[7] !== draftId || $[8] !== drafts || $[9] !== navigate || $[10] !== switchView) {
140
- t6 = (next) => {
140
+ if ($[7] !== listed) {
141
+ t6 = listed ?? [];
142
+ $[7] = listed;
143
+ $[8] = t6;
144
+ } else t6 = $[8];
145
+ const drafts = t6;
146
+ let t7;
147
+ if ($[9] !== draftId || $[10] !== drafts || $[11] !== navigate || $[12] !== switchView) {
148
+ t7 = (next) => {
141
149
  if (next === draftId) return;
142
150
  const target = next ? drafts.find((draft) => draft.id === next) : void 0;
143
151
  const label = next ? target ? draftLabel(target) : "the draft" : "Live";
@@ -149,192 +157,194 @@ function DraftPicker(t0) {
149
157
  success: `You're now viewing ${label}.`
150
158
  });
151
159
  };
152
- $[7] = draftId;
153
- $[8] = drafts;
154
- $[9] = navigate;
155
- $[10] = switchView;
156
- $[11] = t6;
157
- } else t6 = $[11];
158
- const switchTo = t6;
159
- const t7 = !!projectId;
160
- let t8;
161
- if ($[12] !== draftId || $[13] !== drafts || $[14] !== switchTo || $[15] !== t7) {
162
- t8 = {
163
- enabled: t7,
160
+ $[9] = draftId;
161
+ $[10] = drafts;
162
+ $[11] = navigate;
163
+ $[12] = switchView;
164
+ $[13] = t7;
165
+ } else t7 = $[13];
166
+ const switchTo = t7;
167
+ const t8 = !!projectId;
168
+ let t9;
169
+ if ($[14] !== draftId || $[15] !== drafts || $[16] !== switchTo || $[17] !== t8 || $[18] !== working) {
170
+ t9 = {
171
+ enabled: t8,
164
172
  draftId,
165
173
  drafts,
166
- switchTo
174
+ switchTo,
175
+ working
167
176
  };
168
- $[12] = draftId;
169
- $[13] = drafts;
170
- $[14] = switchTo;
171
- $[15] = t7;
172
- $[16] = t8;
173
- } else t8 = $[16];
174
- useDraftsActions(t8);
177
+ $[14] = draftId;
178
+ $[15] = drafts;
179
+ $[16] = switchTo;
180
+ $[17] = t8;
181
+ $[18] = working;
182
+ $[19] = t9;
183
+ } else t9 = $[19];
184
+ useDraftsActions(t9);
175
185
  if (draftId && !current) return null;
176
- let t9;
177
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
178
- t9 = /* @__PURE__ */ jsx(Button, {
186
+ let t10;
187
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
188
+ t10 = /* @__PURE__ */ jsx(Button, {
179
189
  type: "button",
180
190
  variant: "ghost"
181
191
  });
182
- $[17] = t9;
183
- } else t9 = $[17];
184
- const t10 = draftId ? "bg-blue-500" : "bg-emerald-500";
185
- let t11;
186
- if ($[18] !== t10) {
187
- t11 = cn("size-2 shrink-0 rounded-full", t10);
188
- $[18] = t10;
189
- $[19] = t11;
190
- } else t11 = $[19];
192
+ $[20] = t10;
193
+ } else t10 = $[20];
194
+ const t11 = draftId ? "bg-blue-500" : "bg-emerald-500";
191
195
  let t12;
192
- if ($[20] !== t11) {
193
- t12 = /* @__PURE__ */ jsx("span", {
196
+ if ($[21] !== t11) {
197
+ t12 = cn("size-2 shrink-0 rounded-full", t11);
198
+ $[21] = t11;
199
+ $[22] = t12;
200
+ } else t12 = $[22];
201
+ let t13;
202
+ if ($[23] !== t12) {
203
+ t13 = /* @__PURE__ */ jsx("span", {
194
204
  "aria-hidden": true,
195
- className: t11
205
+ className: t12
196
206
  });
197
- $[20] = t11;
198
- $[21] = t12;
199
- } else t12 = $[21];
200
- let t13;
201
- if ($[22] !== current || $[23] !== draftId) {
202
- t13 = draftId ? draftLabel(current) : "Live";
203
- $[22] = current;
204
- $[23] = draftId;
207
+ $[23] = t12;
205
208
  $[24] = t13;
206
209
  } else t13 = $[24];
207
210
  let t14;
208
- if ($[25] !== t13) {
209
- t14 = /* @__PURE__ */ jsx("span", {
211
+ if ($[25] !== current || $[26] !== draftId) {
212
+ t14 = draftId ? draftLabel(current) : "Live";
213
+ $[25] = current;
214
+ $[26] = draftId;
215
+ $[27] = t14;
216
+ } else t14 = $[27];
217
+ let t15;
218
+ if ($[28] !== t14) {
219
+ t15 = /* @__PURE__ */ jsx("span", {
210
220
  className: "max-w-48 truncate",
211
- children: t13
221
+ children: t14
212
222
  });
213
- $[25] = t13;
214
- $[26] = t14;
215
- } else t14 = $[26];
216
- let t15;
217
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
218
- t15 = /* @__PURE__ */ jsx(ChevronsUpDown, {
223
+ $[28] = t14;
224
+ $[29] = t15;
225
+ } else t15 = $[29];
226
+ let t16;
227
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
228
+ t16 = /* @__PURE__ */ jsx(ChevronsUpDown, {
219
229
  "aria-hidden": true,
220
230
  className: "size-4 opacity-50"
221
231
  });
222
- $[27] = t15;
223
- } else t15 = $[27];
224
- let t16;
225
- if ($[28] !== disabled || $[29] !== t12 || $[30] !== t14) {
226
- t16 = /* @__PURE__ */ jsxs(DropdownMenuTrigger, {
232
+ $[30] = t16;
233
+ } else t16 = $[30];
234
+ let t17;
235
+ if ($[31] !== disabled || $[32] !== t13 || $[33] !== t15) {
236
+ t17 = /* @__PURE__ */ jsxs(DropdownMenuTrigger, {
227
237
  disabled,
228
- render: t9,
238
+ render: t10,
229
239
  children: [
230
- t12,
231
- t14,
232
- t15
240
+ t13,
241
+ t15,
242
+ t16
233
243
  ]
234
244
  });
235
- $[28] = disabled;
236
- $[29] = t12;
237
- $[30] = t14;
238
- $[31] = t16;
239
- } else t16 = $[31];
240
- let t17;
241
- if ($[32] !== draftId) {
242
- t17 = !draftId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(DropdownMenuLabel, {
245
+ $[31] = disabled;
246
+ $[32] = t13;
247
+ $[33] = t15;
248
+ $[34] = t17;
249
+ } else t17 = $[34];
250
+ let t18;
251
+ if ($[35] !== draftId) {
252
+ t18 = !draftId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(DropdownMenuLabel, {
243
253
  className: "text-muted-foreground font-normal",
244
254
  children: "Live is read-only. Your first edit starts a new draft."
245
255
  }) }), /* @__PURE__ */ jsx(DropdownMenuSeparator, {})] });
246
- $[32] = draftId;
247
- $[33] = t17;
248
- } else t17 = $[33];
249
- const t18 = draftId ?? LIVE;
250
- let t19;
251
- if ($[34] !== switchTo) {
252
- t19 = (value) => switchTo(value === LIVE ? null : String(value));
253
- $[34] = switchTo;
254
- $[35] = t19;
255
- } else t19 = $[35];
256
+ $[35] = draftId;
257
+ $[36] = t18;
258
+ } else t18 = $[36];
259
+ const t19 = draftId ?? LIVE;
256
260
  let t20;
257
- if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
258
- t20 = /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Switch to" });
259
- $[36] = t20;
260
- } else t20 = $[36];
261
+ if ($[37] !== switchTo) {
262
+ t20 = (value) => switchTo(value === LIVE ? null : String(value));
263
+ $[37] = switchTo;
264
+ $[38] = t20;
265
+ } else t20 = $[38];
261
266
  let t21;
262
- if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
263
- t21 = /* @__PURE__ */ jsx("span", { children: "Live" });
264
- $[37] = t21;
265
- } else t21 = $[37];
267
+ if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
268
+ t21 = /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Switch to" });
269
+ $[39] = t21;
270
+ } else t21 = $[39];
266
271
  let t22;
267
- if ($[38] !== list) {
268
- t22 = list && /* @__PURE__ */ jsx("span", {
272
+ if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
273
+ t22 = /* @__PURE__ */ jsx("span", { children: "Live" });
274
+ $[40] = t22;
275
+ } else t22 = $[40];
276
+ let t23;
277
+ if ($[41] !== list) {
278
+ t23 = list && /* @__PURE__ */ jsx("span", {
269
279
  className: "text-muted-foreground text-xs",
270
280
  children: liveLine(list.live)
271
281
  });
272
- $[38] = list;
273
- $[39] = t22;
274
- } else t22 = $[39];
275
- let t23;
276
- if ($[40] !== t22) {
277
- t23 = /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
282
+ $[41] = list;
283
+ $[42] = t23;
284
+ } else t23 = $[42];
285
+ let t24;
286
+ if ($[43] !== t23) {
287
+ t24 = /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
278
288
  value: LIVE,
279
289
  closeOnClick: true,
280
290
  children: /* @__PURE__ */ jsxs("div", {
281
291
  className: "flex flex-col",
282
- children: [t21, t22]
292
+ children: [t22, t23]
283
293
  })
284
294
  });
285
- $[40] = t22;
286
- $[41] = t23;
287
- } else t23 = $[41];
288
- let t24;
289
- if ($[42] !== drafts) {
290
- t24 = drafts.map(_temp6);
291
- $[42] = drafts;
292
- $[43] = t24;
293
- } else t24 = $[43];
295
+ $[43] = t23;
296
+ $[44] = t24;
297
+ } else t24 = $[44];
294
298
  let t25;
295
- if ($[44] !== t23 || $[45] !== t24) {
296
- t25 = /* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
297
- t20,
298
- t23,
299
- t24
300
- ] });
301
- $[44] = t23;
302
- $[45] = t24;
299
+ if ($[45] !== drafts) {
300
+ t25 = drafts.map(_temp6);
301
+ $[45] = drafts;
303
302
  $[46] = t25;
304
303
  } else t25 = $[46];
305
304
  let t26;
306
- if ($[47] !== t18 || $[48] !== t19 || $[49] !== t25) {
307
- t26 = /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
308
- value: t18,
309
- onValueChange: t19,
310
- children: t25
311
- });
312
- $[47] = t18;
313
- $[48] = t19;
314
- $[49] = t25;
315
- $[50] = t26;
316
- } else t26 = $[50];
305
+ if ($[47] !== t24 || $[48] !== t25) {
306
+ t26 = /* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
307
+ t21,
308
+ t24,
309
+ t25
310
+ ] });
311
+ $[47] = t24;
312
+ $[48] = t25;
313
+ $[49] = t26;
314
+ } else t26 = $[49];
317
315
  let t27;
318
- if ($[51] !== t17 || $[52] !== t26) {
319
- t27 = /* @__PURE__ */ jsx(DropdownMenuContent, {
320
- className: "w-80",
321
- align: "start",
322
- children: /* @__PURE__ */ jsxs(Fragment, { children: [t17, t26] })
316
+ if ($[50] !== t19 || $[51] !== t20 || $[52] !== t26) {
317
+ t27 = /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
318
+ value: t19,
319
+ onValueChange: t20,
320
+ children: t26
323
321
  });
324
- $[51] = t17;
322
+ $[50] = t19;
323
+ $[51] = t20;
325
324
  $[52] = t26;
326
325
  $[53] = t27;
327
326
  } else t27 = $[53];
328
327
  let t28;
329
- if ($[54] !== t16 || $[55] !== t27) {
330
- t28 = /* @__PURE__ */ jsxs(DropdownMenu, { children: [t16, t27] });
331
- $[54] = t16;
328
+ if ($[54] !== t18 || $[55] !== t27) {
329
+ t28 = /* @__PURE__ */ jsx(DropdownMenuContent, {
330
+ className: "w-80",
331
+ align: "start",
332
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [t18, t27] })
333
+ });
334
+ $[54] = t18;
332
335
  $[55] = t27;
333
336
  $[56] = t28;
334
337
  } else t28 = $[56];
335
338
  let t29;
336
- if ($[57] !== deleting || $[58] !== draftId || $[59] !== leaveDraft || $[60] !== projectId || $[61] !== reviewing) {
337
- t29 = draftId && projectId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ReviewDraftSheet, {
339
+ if ($[57] !== t17 || $[58] !== t28) {
340
+ t29 = /* @__PURE__ */ jsxs(DropdownMenu, { children: [t17, t28] });
341
+ $[57] = t17;
342
+ $[58] = t28;
343
+ $[59] = t29;
344
+ } else t29 = $[59];
345
+ let t30;
346
+ if ($[60] !== deleting || $[61] !== draftId || $[62] !== leaveDraft || $[63] !== projectId || $[64] !== reviewing) {
347
+ t30 = draftId && projectId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ReviewDraftDialog, {
338
348
  projectId,
339
349
  draftId,
340
350
  open: reviewing,
@@ -345,27 +355,27 @@ function DraftPicker(t0) {
345
355
  onOpenChange: _temp8,
346
356
  onDeleted: leaveDraft
347
357
  })] });
348
- $[57] = deleting;
349
- $[58] = draftId;
350
- $[59] = leaveDraft;
351
- $[60] = projectId;
352
- $[61] = reviewing;
353
- $[62] = t29;
354
- } else t29 = $[62];
355
- let t30;
356
- if ($[63] !== t28 || $[64] !== t29) {
357
- t30 = /* @__PURE__ */ jsxs(Fragment, { children: [t28, t29] });
358
- $[63] = t28;
359
- $[64] = t29;
358
+ $[60] = deleting;
359
+ $[61] = draftId;
360
+ $[62] = leaveDraft;
361
+ $[63] = projectId;
362
+ $[64] = reviewing;
360
363
  $[65] = t30;
361
364
  } else t30 = $[65];
362
- return t30;
365
+ let t31;
366
+ if ($[66] !== t29 || $[67] !== t30) {
367
+ t31 = /* @__PURE__ */ jsxs(Fragment, { children: [t29, t30] });
368
+ $[66] = t29;
369
+ $[67] = t30;
370
+ $[68] = t31;
371
+ } else t31 = $[68];
372
+ return t31;
363
373
  }
364
374
  function _temp8(open_0) {
365
375
  if (!open_0) studioStore.send({ type: "closeDeleteDraftDialog" });
366
376
  }
367
377
  function _temp7(open) {
368
- if (!open) studioStore.send({ type: "closeReviewDraftSheet" });
378
+ if (!open) studioStore.send({ type: "closeReviewDraftDialog" });
369
379
  }
370
380
  function _temp6(draft_0) {
371
381
  return /* @__PURE__ */ jsx(DraftItem, { draft: draft_0 }, draft_0.id);
@@ -374,29 +384,30 @@ function _temp5() {
374
384
  return _temp4;
375
385
  }
376
386
  function _temp4() {
377
- studioStore.send({ type: "closeReviewDraftSheet" });
387
+ studioStore.send({ type: "closeReviewDraftDialog" });
378
388
  studioStore.send({ type: "closeDeleteDraftDialog" });
379
389
  }
380
390
  function _temp3(t0) {
381
391
  const { move } = t0;
382
392
  if (move === "started") toast.success("Started a new draft");
383
393
  }
384
- function _temp2(state_0) {
385
- return state_0.context.isDeleteDraftDialogOpen;
394
+ function _temp2(state_1) {
395
+ return state_1.context.isDeleteDraftDialogOpen;
386
396
  }
387
397
  function _temp(state) {
388
- return state.context.isReviewDraftSheetOpen;
398
+ return state.context.isReviewDraftDialogOpen;
389
399
  }
390
400
  /**
391
401
  * The drafts controls' actions in the command palette, offered where the controls offer them. The palette only opens the review and the delete confirmation; it never publishes or
392
- * deletes by itself.
402
+ * deletes by itself. Like the Publish… button, it doesn't offer the review while Camox's agent is
403
+ * mid-turn in the draft (`working`).
393
404
  */
394
405
  function useDraftsActions(t0) {
395
- const $ = c(6);
396
- const { enabled, draftId, drafts, switchTo } = t0;
406
+ const $ = c(7);
407
+ const { enabled, draftId, drafts, switchTo, working } = t0;
397
408
  let t1;
398
409
  let t2;
399
- if ($[0] !== draftId || $[1] !== drafts || $[2] !== enabled || $[3] !== switchTo) {
410
+ if ($[0] !== draftId || $[1] !== drafts || $[2] !== enabled || $[3] !== switchTo || $[4] !== working) {
400
411
  t1 = () => {
401
412
  const inDraft = enabled && !!draftId;
402
413
  const others = drafts.filter((listed) => listed.id !== draftId);
@@ -412,7 +423,7 @@ function useDraftsActions(t0) {
412
423
  "Ship"
413
424
  ],
414
425
  groupLabel: "Drafts",
415
- checkIfAvailable: () => inDraft,
426
+ checkIfAvailable: () => inDraft && !working,
416
427
  execute: _temp9
417
428
  },
418
429
  {
@@ -478,17 +489,19 @@ function useDraftsActions(t0) {
478
489
  enabled,
479
490
  draftId,
480
491
  drafts,
481
- switchTo
492
+ switchTo,
493
+ working
482
494
  ];
483
495
  $[0] = draftId;
484
496
  $[1] = drafts;
485
497
  $[2] = enabled;
486
498
  $[3] = switchTo;
487
- $[4] = t1;
488
- $[5] = t2;
499
+ $[4] = working;
500
+ $[5] = t1;
501
+ $[6] = t2;
489
502
  } else {
490
- t1 = $[4];
491
- t2 = $[5];
503
+ t1 = $[5];
504
+ t2 = $[6];
492
505
  }
493
506
  React.useEffect(t1, t2);
494
507
  }
@@ -503,7 +516,7 @@ function _temp10() {
503
516
  return studioStore.send({ type: "openDeleteDraftDialog" });
504
517
  }
505
518
  function _temp9() {
506
- return studioStore.send({ type: "openReviewDraftSheet" });
519
+ return studioStore.send({ type: "openReviewDraftDialog" });
507
520
  }
508
521
  /** Who published Live last and when: a member, a release, or nobody yet. */
509
522
  function liveLine(live) {