camox 0.72.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.
- package/dist/features/preview/components/PageInfo.js +121 -98
- package/dist/features/preview/components/SelectionEditor.js +1 -1
- package/dist/features/routes/pageRuntime.js +15 -4
- package/dist/features/runtime/ClaimCard.js +192 -0
- package/dist/features/runtime/pageApp.js +4 -3
- package/dist/features/runtime/runtime.js +26 -5
- package/dist/features/runtime/worker.js +2 -2
- package/dist/features/runtime/workerRequest.d.ts +6 -0
- package/dist/features/runtime/workerRequest.js +13 -1
- package/dist/features/runtime/workerRuntime.d.ts +2 -2
- package/dist/features/runtime/workerRuntime.js +2 -2
- package/dist/features/studio/components/AgentSidebar.js +7 -7
- package/dist/features/studio/components/ChatWidget.js +142 -106
- package/dist/features/studio/components/ContentFindings.js +127 -230
- package/dist/features/studio/components/DeleteDraftDialog.js +112 -0
- package/dist/features/studio/components/DraftBar.js +98 -53
- package/dist/features/studio/components/DraftsControl.js +203 -190
- package/dist/features/studio/components/ReviewDraftDialog.js +670 -0
- package/dist/features/studio/components/{Patrol.js → Specialists.js} +291 -330
- package/dist/features/studio/components/Squareling.js +5 -5
- package/dist/features/studio/components/ThreadComposer.js +106 -127
- package/dist/features/studio/components/ThreadMessages.js +94 -69
- package/dist/features/studio/findingSentence.js +14 -12
- package/dist/features/studio/fixMessage.js +23 -0
- package/dist/features/studio/reportSentence.js +1 -1
- package/dist/features/studio/{patrollerBio.js → specialistBio.js} +8 -5
- package/dist/features/studio/studioStore.js +29 -15
- package/dist/features/studio/workingSentence.js +1 -1
- package/dist/lib/api-client.js +5 -1
- package/dist/lib/queries.js +5 -5
- package/dist/lib/studio-reads.d.ts +1 -1
- package/dist/lib/studio-reads.js +5 -5
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
- 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
|
|
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(
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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 ($[
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
if ($[2] !== draftScope) {
|
|
121
|
+
t3 = () => draftScope.subscribe(_temp3);
|
|
122
|
+
t4 = [draftScope];
|
|
123
|
+
$[2] = draftScope;
|
|
124
|
+
$[3] = t3;
|
|
127
125
|
$[4] = t4;
|
|
128
|
-
} else
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
} else {
|
|
127
|
+
t3 = $[3];
|
|
128
|
+
t4 = $[4];
|
|
129
|
+
}
|
|
130
|
+
React.useEffect(t3, t4);
|
|
131
131
|
let t5;
|
|
132
|
-
if ($[5] !==
|
|
133
|
-
t5 =
|
|
134
|
-
$[5] =
|
|
132
|
+
if ($[5] !== draftId) {
|
|
133
|
+
t5 = [draftId];
|
|
134
|
+
$[5] = draftId;
|
|
135
135
|
$[6] = t5;
|
|
136
136
|
} else t5 = $[6];
|
|
137
|
-
|
|
137
|
+
React.useEffect(_temp5, t5);
|
|
138
|
+
const listed = list?.drafts;
|
|
138
139
|
let t6;
|
|
139
|
-
if ($[7] !==
|
|
140
|
-
t6 =
|
|
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
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
} else
|
|
158
|
-
const switchTo =
|
|
159
|
-
const
|
|
160
|
-
let
|
|
161
|
-
if ($[
|
|
162
|
-
|
|
163
|
-
enabled:
|
|
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
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
|
|
174
|
-
|
|
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
|
|
177
|
-
if ($[
|
|
178
|
-
|
|
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
|
-
$[
|
|
183
|
-
} else
|
|
184
|
-
const
|
|
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 ($[
|
|
193
|
-
t12 =
|
|
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:
|
|
205
|
+
className: t12
|
|
196
206
|
});
|
|
197
|
-
$[
|
|
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] !==
|
|
209
|
-
t14 =
|
|
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:
|
|
221
|
+
children: t14
|
|
212
222
|
});
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
} else
|
|
216
|
-
let
|
|
217
|
-
if ($[
|
|
218
|
-
|
|
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
|
-
$[
|
|
223
|
-
} else
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
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:
|
|
238
|
+
render: t10,
|
|
229
239
|
children: [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
240
|
+
t13,
|
|
241
|
+
t15,
|
|
242
|
+
t16
|
|
233
243
|
]
|
|
234
244
|
});
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
} else
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
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
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else
|
|
249
|
-
const
|
|
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 ($[
|
|
258
|
-
t20 =
|
|
259
|
-
$[
|
|
260
|
-
|
|
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 ($[
|
|
263
|
-
t21 = /* @__PURE__ */ jsx(
|
|
264
|
-
$[
|
|
265
|
-
} else t21 = $[
|
|
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 ($[
|
|
268
|
-
t22 =
|
|
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
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
} else
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
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: [
|
|
292
|
+
children: [t22, t23]
|
|
283
293
|
})
|
|
284
294
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
} else
|
|
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 ($[
|
|
296
|
-
t25 =
|
|
297
|
-
|
|
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] !==
|
|
307
|
-
t26 = /* @__PURE__ */
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
});
|
|
312
|
-
$[47] =
|
|
313
|
-
$[48] =
|
|
314
|
-
$[49] =
|
|
315
|
-
|
|
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] !==
|
|
319
|
-
t27 = /* @__PURE__ */ jsx(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
children:
|
|
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
|
-
$[
|
|
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] !==
|
|
330
|
-
t28 = /* @__PURE__ */
|
|
331
|
-
|
|
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] !==
|
|
337
|
-
t29 =
|
|
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
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
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
|
-
|
|
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: "
|
|
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: "
|
|
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(
|
|
385
|
-
return
|
|
394
|
+
function _temp2(state_1) {
|
|
395
|
+
return state_1.context.isDeleteDraftDialogOpen;
|
|
386
396
|
}
|
|
387
397
|
function _temp(state) {
|
|
388
|
-
return state.context.
|
|
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(
|
|
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] =
|
|
488
|
-
$[5] =
|
|
499
|
+
$[4] = working;
|
|
500
|
+
$[5] = t1;
|
|
501
|
+
$[6] = t2;
|
|
489
502
|
} else {
|
|
490
|
-
t1 = $[
|
|
491
|
-
t2 = $[
|
|
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: "
|
|
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) {
|