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.
- package/dist/features/canvas/CamoxCanvas.js +195 -173
- package/dist/features/canvas/canvasFrameCapture.js +5 -12
- package/dist/features/canvas/canvasFrameDocument.js +90 -29
- package/dist/features/canvas/canvasItems.js +22 -6
- package/dist/features/canvas/sidebar/ContentSidebar.js +19 -21
- package/dist/features/canvas/sidebar/LayoutPageOverview.js +22 -49
- package/dist/features/canvas/sidebar/LayoutPageSeo.js +73 -76
- package/dist/features/canvas/sidebar/PageInspector.js +61 -50
- package/dist/features/canvas/sidebar/PageInspectorSkeleton.js +4 -4
- package/dist/features/canvas/useCanvasCamera.js +22 -5
- package/dist/features/preview/components/PageInfo.js +103 -100
- package/dist/features/runtime/RuntimeChrome.js +66 -40
- package/dist/features/studio/components/AgentSidebar.js +3 -3
- package/dist/features/studio/components/ChatWidget.js +34 -29
- package/dist/features/studio/components/DraftsControl.js +172 -159
- package/dist/features/studio/components/Patrol.js +423 -418
- package/dist/features/studio/components/ReviewDraftSheet.js +227 -188
- package/dist/features/studio/components/ThreadComposer.js +183 -121
- package/dist/features/studio/components/ThreadMessages.js +19 -11
- package/dist/features/studio/components/UnnamedDraftBar.js +349 -0
- package/dist/features/studio/patrollerBio.js +40 -0
- package/dist/features/studio/studioStore.js +13 -0
- package/dist/features/studio/workingSentence.js +2 -7
- package/dist/lib/revisions.js +25 -3
- package/dist/lib/use-thread.js +1 -1
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
- package/dist/features/canvas/sidebar/DerivedPageInspector.js +0 -49
- package/dist/features/canvas/sidebar/SingletonPageInspector.js +0 -39
|
@@ -98,7 +98,7 @@ function useDrafts() {
|
|
|
98
98
|
* still names what the studio is viewing.
|
|
99
99
|
*/
|
|
100
100
|
function DraftPicker(t0) {
|
|
101
|
-
const $ = c(
|
|
101
|
+
const $ = c(66);
|
|
102
102
|
const { disabled: t1 } = t0;
|
|
103
103
|
const disabled = t1 === void 0 ? false : t1;
|
|
104
104
|
const { draftScope, draftId, projectId, list, current } = useDrafts();
|
|
@@ -149,11 +149,13 @@ function DraftPicker(t0) {
|
|
|
149
149
|
} else t6 = $[9];
|
|
150
150
|
const switchTo = t6;
|
|
151
151
|
const t7 = !!projectId;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
const t8 = current?.name === null;
|
|
153
|
+
let t9;
|
|
154
|
+
if ($[10] !== draftId || $[11] !== drafts || $[12] !== switchTo || $[13] !== t7 || $[14] !== t8) {
|
|
155
|
+
t9 = {
|
|
155
156
|
enabled: t7,
|
|
156
157
|
draftId,
|
|
158
|
+
unnamed: t8,
|
|
157
159
|
drafts,
|
|
158
160
|
switchTo
|
|
159
161
|
};
|
|
@@ -162,171 +164,172 @@ function DraftPicker(t0) {
|
|
|
162
164
|
$[12] = switchTo;
|
|
163
165
|
$[13] = t7;
|
|
164
166
|
$[14] = t8;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
$[15] = t9;
|
|
168
|
+
} else t9 = $[15];
|
|
169
|
+
useDraftsActions(t9);
|
|
167
170
|
if (draftId && !current) return null;
|
|
168
|
-
let
|
|
169
|
-
if ($[
|
|
170
|
-
|
|
171
|
+
let t10;
|
|
172
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
173
|
+
t10 = /* @__PURE__ */ jsx(Button, {
|
|
171
174
|
type: "button",
|
|
172
175
|
variant: "ghost"
|
|
173
176
|
});
|
|
174
|
-
$[15] = t9;
|
|
175
|
-
} else t9 = $[15];
|
|
176
|
-
const t10 = draftId ? "bg-blue-500" : "bg-emerald-500";
|
|
177
|
-
let t11;
|
|
178
|
-
if ($[16] !== t10) {
|
|
179
|
-
t11 = cn("size-2 shrink-0 rounded-full", t10);
|
|
180
177
|
$[16] = t10;
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
} else t10 = $[16];
|
|
179
|
+
const t11 = draftId ? "bg-blue-500" : "bg-emerald-500";
|
|
183
180
|
let t12;
|
|
184
|
-
if ($[
|
|
185
|
-
t12 =
|
|
181
|
+
if ($[17] !== t11) {
|
|
182
|
+
t12 = cn("size-2 shrink-0 rounded-full", t11);
|
|
183
|
+
$[17] = t11;
|
|
184
|
+
$[18] = t12;
|
|
185
|
+
} else t12 = $[18];
|
|
186
|
+
let t13;
|
|
187
|
+
if ($[19] !== t12) {
|
|
188
|
+
t13 = /* @__PURE__ */ jsx("span", {
|
|
186
189
|
"aria-hidden": true,
|
|
187
|
-
className:
|
|
190
|
+
className: t12
|
|
188
191
|
});
|
|
189
|
-
$[18] = t11;
|
|
190
192
|
$[19] = t12;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if ($[20] !== current || $[21] !== draftId) {
|
|
194
|
-
t13 = draftId ? draftLabel(current) : "Live";
|
|
195
|
-
$[20] = current;
|
|
196
|
-
$[21] = draftId;
|
|
197
|
-
$[22] = t13;
|
|
198
|
-
} else t13 = $[22];
|
|
193
|
+
$[20] = t13;
|
|
194
|
+
} else t13 = $[20];
|
|
199
195
|
let t14;
|
|
200
|
-
if ($[
|
|
201
|
-
t14 =
|
|
196
|
+
if ($[21] !== current || $[22] !== draftId) {
|
|
197
|
+
t14 = draftId ? draftLabel(current) : "Live";
|
|
198
|
+
$[21] = current;
|
|
199
|
+
$[22] = draftId;
|
|
200
|
+
$[23] = t14;
|
|
201
|
+
} else t14 = $[23];
|
|
202
|
+
let t15;
|
|
203
|
+
if ($[24] !== t14) {
|
|
204
|
+
t15 = /* @__PURE__ */ jsx("span", {
|
|
202
205
|
className: "max-w-48 truncate",
|
|
203
|
-
children:
|
|
206
|
+
children: t14
|
|
204
207
|
});
|
|
205
|
-
$[23] = t13;
|
|
206
208
|
$[24] = t14;
|
|
207
|
-
} else t14 = $[24];
|
|
208
|
-
let t15;
|
|
209
|
-
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
210
|
-
t15 = /* @__PURE__ */ jsx(ChevronsUpDown, {
|
|
211
|
-
"aria-hidden": true,
|
|
212
|
-
className: "size-4 opacity-50"
|
|
213
|
-
});
|
|
214
209
|
$[25] = t15;
|
|
215
210
|
} else t15 = $[25];
|
|
216
211
|
let t16;
|
|
217
|
-
if ($[26]
|
|
218
|
-
t16 = /* @__PURE__ */
|
|
212
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
+
t16 = /* @__PURE__ */ jsx(ChevronsUpDown, {
|
|
214
|
+
"aria-hidden": true,
|
|
215
|
+
className: "size-4 opacity-50"
|
|
216
|
+
});
|
|
217
|
+
$[26] = t16;
|
|
218
|
+
} else t16 = $[26];
|
|
219
|
+
let t17;
|
|
220
|
+
if ($[27] !== disabled || $[28] !== t13 || $[29] !== t15) {
|
|
221
|
+
t17 = /* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
219
222
|
disabled,
|
|
220
|
-
render:
|
|
223
|
+
render: t10,
|
|
221
224
|
children: [
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
+
t13,
|
|
226
|
+
t15,
|
|
227
|
+
t16
|
|
225
228
|
]
|
|
226
229
|
});
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
} else
|
|
232
|
-
let
|
|
233
|
-
if ($[
|
|
234
|
-
|
|
230
|
+
$[27] = disabled;
|
|
231
|
+
$[28] = t13;
|
|
232
|
+
$[29] = t15;
|
|
233
|
+
$[30] = t17;
|
|
234
|
+
} else t17 = $[30];
|
|
235
|
+
let t18;
|
|
236
|
+
if ($[31] !== draftId) {
|
|
237
|
+
t18 = !draftId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(DropdownMenuLabel, {
|
|
235
238
|
className: "text-muted-foreground font-normal",
|
|
236
239
|
children: "Live is read-only. Your first edit starts a new draft."
|
|
237
240
|
}) }), /* @__PURE__ */ jsx(DropdownMenuSeparator, {})] });
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
} else
|
|
241
|
-
const
|
|
242
|
-
let t19;
|
|
243
|
-
if ($[32] !== switchTo) {
|
|
244
|
-
t19 = (value) => switchTo(value === LIVE ? null : String(value));
|
|
245
|
-
$[32] = switchTo;
|
|
246
|
-
$[33] = t19;
|
|
247
|
-
} else t19 = $[33];
|
|
241
|
+
$[31] = draftId;
|
|
242
|
+
$[32] = t18;
|
|
243
|
+
} else t18 = $[32];
|
|
244
|
+
const t19 = draftId ?? LIVE;
|
|
248
245
|
let t20;
|
|
249
|
-
if ($[
|
|
250
|
-
t20 =
|
|
246
|
+
if ($[33] !== switchTo) {
|
|
247
|
+
t20 = (value) => switchTo(value === LIVE ? null : String(value));
|
|
248
|
+
$[33] = switchTo;
|
|
251
249
|
$[34] = t20;
|
|
252
250
|
} else t20 = $[34];
|
|
253
251
|
let t21;
|
|
254
252
|
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
255
|
-
t21 = /* @__PURE__ */ jsx(
|
|
253
|
+
t21 = /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Switch to" });
|
|
256
254
|
$[35] = t21;
|
|
257
255
|
} else t21 = $[35];
|
|
258
256
|
let t22;
|
|
259
|
-
if ($[36]
|
|
260
|
-
t22 =
|
|
257
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
258
|
+
t22 = /* @__PURE__ */ jsx("span", { children: "Live" });
|
|
259
|
+
$[36] = t22;
|
|
260
|
+
} else t22 = $[36];
|
|
261
|
+
let t23;
|
|
262
|
+
if ($[37] !== list) {
|
|
263
|
+
t23 = list && /* @__PURE__ */ jsx("span", {
|
|
261
264
|
className: "text-muted-foreground text-xs",
|
|
262
265
|
children: liveLine(list.live)
|
|
263
266
|
});
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
} else
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
267
|
+
$[37] = list;
|
|
268
|
+
$[38] = t23;
|
|
269
|
+
} else t23 = $[38];
|
|
270
|
+
let t24;
|
|
271
|
+
if ($[39] !== t23) {
|
|
272
|
+
t24 = /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
|
|
270
273
|
value: LIVE,
|
|
271
274
|
closeOnClick: true,
|
|
272
275
|
children: /* @__PURE__ */ jsxs("div", {
|
|
273
276
|
className: "flex flex-col",
|
|
274
|
-
children: [
|
|
277
|
+
children: [t22, t23]
|
|
275
278
|
})
|
|
276
279
|
});
|
|
277
|
-
$[38] = t22;
|
|
278
280
|
$[39] = t23;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if ($[40] !== drafts) {
|
|
282
|
-
t24 = drafts.map(_temp6);
|
|
283
|
-
$[40] = drafts;
|
|
284
|
-
$[41] = t24;
|
|
285
|
-
} else t24 = $[41];
|
|
281
|
+
$[40] = t24;
|
|
282
|
+
} else t24 = $[40];
|
|
286
283
|
let t25;
|
|
287
|
-
if ($[
|
|
288
|
-
t25 =
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
284
|
+
if ($[41] !== drafts) {
|
|
285
|
+
t25 = drafts.map(_temp6);
|
|
286
|
+
$[41] = drafts;
|
|
287
|
+
$[42] = t25;
|
|
288
|
+
} else t25 = $[42];
|
|
289
|
+
let t26;
|
|
290
|
+
if ($[43] !== t24 || $[44] !== t25) {
|
|
291
|
+
t26 = /* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
|
|
292
|
+
t21,
|
|
293
|
+
t24,
|
|
294
|
+
t25
|
|
292
295
|
] });
|
|
293
|
-
$[42] = t23;
|
|
294
296
|
$[43] = t24;
|
|
295
297
|
$[44] = t25;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
$[45] = t26;
|
|
299
|
+
} else t26 = $[45];
|
|
300
|
+
let t27;
|
|
301
|
+
if ($[46] !== t19 || $[47] !== t20 || $[48] !== t26) {
|
|
302
|
+
t27 = /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
303
|
+
value: t19,
|
|
304
|
+
onValueChange: t20,
|
|
305
|
+
children: t26
|
|
303
306
|
});
|
|
304
|
-
$[45] = t18;
|
|
305
307
|
$[46] = t19;
|
|
306
|
-
$[47] =
|
|
308
|
+
$[47] = t20;
|
|
307
309
|
$[48] = t26;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
$[49] = t27;
|
|
311
|
+
} else t27 = $[49];
|
|
312
|
+
let t28;
|
|
313
|
+
if ($[50] !== t18 || $[51] !== t27) {
|
|
314
|
+
t28 = /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
312
315
|
className: "w-80",
|
|
313
316
|
align: "start",
|
|
314
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
317
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [t18, t27] })
|
|
315
318
|
});
|
|
316
|
-
$[
|
|
317
|
-
$[50] = t26;
|
|
319
|
+
$[50] = t18;
|
|
318
320
|
$[51] = t27;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if ($[52] !== t16 || $[53] !== t27) {
|
|
322
|
-
t28 = /* @__PURE__ */ jsxs(DropdownMenu, { children: [t16, t27] });
|
|
323
|
-
$[52] = t16;
|
|
324
|
-
$[53] = t27;
|
|
325
|
-
$[54] = t28;
|
|
326
|
-
} else t28 = $[54];
|
|
321
|
+
$[52] = t28;
|
|
322
|
+
} else t28 = $[52];
|
|
327
323
|
let t29;
|
|
328
|
-
if ($[
|
|
329
|
-
t29 =
|
|
324
|
+
if ($[53] !== t17 || $[54] !== t28) {
|
|
325
|
+
t29 = /* @__PURE__ */ jsxs(DropdownMenu, { children: [t17, t28] });
|
|
326
|
+
$[53] = t17;
|
|
327
|
+
$[54] = t28;
|
|
328
|
+
$[55] = t29;
|
|
329
|
+
} else t29 = $[55];
|
|
330
|
+
let t30;
|
|
331
|
+
if ($[56] !== current?.name || $[57] !== deleting || $[58] !== draftId || $[59] !== leaveDraft || $[60] !== projectId || $[61] !== review) {
|
|
332
|
+
t30 = draftId && projectId && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ReviewDraftSheet, {
|
|
330
333
|
projectId,
|
|
331
334
|
draftId,
|
|
332
335
|
open: review.open,
|
|
@@ -335,24 +338,26 @@ function DraftPicker(t0) {
|
|
|
335
338
|
}), /* @__PURE__ */ jsx(DeleteDraftDialog, {
|
|
336
339
|
projectId,
|
|
337
340
|
open: deleting,
|
|
341
|
+
discard: current?.name === null,
|
|
338
342
|
onOpenChange: _temp8,
|
|
339
|
-
onDeleted: leaveDraft
|
|
343
|
+
onDeleted: (ended) => leaveDraft(ended, { discarded: current?.name === null })
|
|
340
344
|
})] });
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
|
|
355
|
-
|
|
345
|
+
$[56] = current?.name;
|
|
346
|
+
$[57] = deleting;
|
|
347
|
+
$[58] = draftId;
|
|
348
|
+
$[59] = leaveDraft;
|
|
349
|
+
$[60] = projectId;
|
|
350
|
+
$[61] = review;
|
|
351
|
+
$[62] = t30;
|
|
352
|
+
} else t30 = $[62];
|
|
353
|
+
let t31;
|
|
354
|
+
if ($[63] !== t29 || $[64] !== t30) {
|
|
355
|
+
t31 = /* @__PURE__ */ jsxs(Fragment, { children: [t29, t30] });
|
|
356
|
+
$[63] = t29;
|
|
357
|
+
$[64] = t30;
|
|
358
|
+
$[65] = t31;
|
|
359
|
+
} else t31 = $[65];
|
|
360
|
+
return t31;
|
|
356
361
|
}
|
|
357
362
|
function _temp8(open_0) {
|
|
358
363
|
if (!open_0) studioStore.send({ type: "closeDeleteDraftDialog" });
|
|
@@ -369,6 +374,7 @@ function _temp5() {
|
|
|
369
374
|
function _temp4() {
|
|
370
375
|
studioStore.send({ type: "closeReviewDraftSheet" });
|
|
371
376
|
studioStore.send({ type: "closeDeleteDraftDialog" });
|
|
377
|
+
studioStore.send({ type: "closeKeepDraft" });
|
|
372
378
|
}
|
|
373
379
|
function _temp3(t0) {
|
|
374
380
|
const { move } = t0;
|
|
@@ -382,12 +388,12 @@ function _temp(state) {
|
|
|
382
388
|
}
|
|
383
389
|
/**
|
|
384
390
|
* The current draft's pending changes, which open its review to publish or delete them. Live
|
|
385
|
-
* has none, so it shows nothing there.
|
|
391
|
+
* has none, so it shows nothing there. An unnamed draft shows the Unnamed Draft Bar instead.
|
|
386
392
|
*/
|
|
387
393
|
function PendingChanges() {
|
|
388
394
|
const $ = c(7);
|
|
389
395
|
const { current } = useDrafts();
|
|
390
|
-
if (!current) return null;
|
|
396
|
+
if (!current || current.name === null) return null;
|
|
391
397
|
let t0;
|
|
392
398
|
if ($[0] !== current.changeCount) {
|
|
393
399
|
t0 = plural(current.changeCount, "change");
|
|
@@ -426,11 +432,11 @@ function _temp9() {
|
|
|
426
432
|
* deletes by itself.
|
|
427
433
|
*/
|
|
428
434
|
function useDraftsActions(t0) {
|
|
429
|
-
const $ = c(
|
|
430
|
-
const { enabled, draftId, drafts, switchTo } = t0;
|
|
435
|
+
const $ = c(7);
|
|
436
|
+
const { enabled, draftId, unnamed, drafts, switchTo } = t0;
|
|
431
437
|
let t1;
|
|
432
438
|
let t2;
|
|
433
|
-
if ($[0] !== draftId || $[1] !== drafts || $[2] !== enabled || $[3] !== switchTo) {
|
|
439
|
+
if ($[0] !== draftId || $[1] !== drafts || $[2] !== enabled || $[3] !== switchTo || $[4] !== unnamed) {
|
|
434
440
|
t1 = () => {
|
|
435
441
|
const inDraft = enabled && !!draftId;
|
|
436
442
|
const others = drafts.filter((listed) => listed.id !== draftId);
|
|
@@ -451,11 +457,15 @@ function useDraftsActions(t0) {
|
|
|
451
457
|
},
|
|
452
458
|
{
|
|
453
459
|
id: "delete-draft",
|
|
454
|
-
label: "Delete draft…",
|
|
455
|
-
aliases: [
|
|
460
|
+
label: unnamed ? "Discard changes…" : "Delete draft…",
|
|
461
|
+
aliases: unnamed ? [
|
|
456
462
|
"Delete draft",
|
|
457
463
|
"Throw away changes",
|
|
458
464
|
"Revert changes"
|
|
465
|
+
] : [
|
|
466
|
+
"Discard changes",
|
|
467
|
+
"Throw away changes",
|
|
468
|
+
"Revert changes"
|
|
459
469
|
],
|
|
460
470
|
groupLabel: "Drafts",
|
|
461
471
|
checkIfAvailable: () => inDraft,
|
|
@@ -463,11 +473,18 @@ function useDraftsActions(t0) {
|
|
|
463
473
|
},
|
|
464
474
|
{
|
|
465
475
|
id: "rename-draft",
|
|
466
|
-
label: "Rename draft…",
|
|
467
|
-
aliases: [
|
|
476
|
+
label: unnamed ? "Keep as draft…" : "Rename draft…",
|
|
477
|
+
aliases: unnamed ? [
|
|
478
|
+
"Name draft",
|
|
479
|
+
"Rename draft",
|
|
480
|
+
"Save draft"
|
|
481
|
+
] : ["Name draft"],
|
|
468
482
|
groupLabel: "Drafts",
|
|
469
483
|
checkIfAvailable: () => inDraft,
|
|
470
|
-
execute:
|
|
484
|
+
execute: () => studioStore.send(unnamed ? { type: "openKeepDraft" } : {
|
|
485
|
+
type: "openReviewDraftSheet",
|
|
486
|
+
startRenaming: true
|
|
487
|
+
})
|
|
471
488
|
},
|
|
472
489
|
{
|
|
473
490
|
id: "switch-to-live",
|
|
@@ -493,7 +510,7 @@ function useDraftsActions(t0) {
|
|
|
493
510
|
groupLabel: "Drafts",
|
|
494
511
|
checkIfAvailable: () => others.length > 0,
|
|
495
512
|
hasChildren: true,
|
|
496
|
-
execute:
|
|
513
|
+
execute: _temp12
|
|
497
514
|
},
|
|
498
515
|
...others.map((other) => ({
|
|
499
516
|
id: `${SWITCH_TO_DRAFT_ID}-${other.id}`,
|
|
@@ -501,7 +518,7 @@ function useDraftsActions(t0) {
|
|
|
501
518
|
label: `Switch to "${draftLabel(other)}"`,
|
|
502
519
|
aliases: [other.createdBy.name],
|
|
503
520
|
groupLabel: "Drafts",
|
|
504
|
-
checkIfAvailable:
|
|
521
|
+
checkIfAvailable: _temp13,
|
|
505
522
|
execute: () => switchTo(other.id)
|
|
506
523
|
}))
|
|
507
524
|
];
|
|
@@ -512,13 +529,14 @@ function useDraftsActions(t0) {
|
|
|
512
529
|
return () => {
|
|
513
530
|
actionsStore.send({
|
|
514
531
|
type: "unregisterManyActions",
|
|
515
|
-
ids: actions.map(
|
|
532
|
+
ids: actions.map(_temp14)
|
|
516
533
|
});
|
|
517
534
|
};
|
|
518
535
|
};
|
|
519
536
|
t2 = [
|
|
520
537
|
enabled,
|
|
521
538
|
draftId,
|
|
539
|
+
unnamed,
|
|
522
540
|
drafts,
|
|
523
541
|
switchTo
|
|
524
542
|
];
|
|
@@ -526,27 +544,22 @@ function useDraftsActions(t0) {
|
|
|
526
544
|
$[1] = drafts;
|
|
527
545
|
$[2] = enabled;
|
|
528
546
|
$[3] = switchTo;
|
|
529
|
-
$[4] =
|
|
530
|
-
$[5] =
|
|
547
|
+
$[4] = unnamed;
|
|
548
|
+
$[5] = t1;
|
|
549
|
+
$[6] = t2;
|
|
531
550
|
} else {
|
|
532
|
-
t1 = $[
|
|
533
|
-
t2 = $[
|
|
551
|
+
t1 = $[5];
|
|
552
|
+
t2 = $[6];
|
|
534
553
|
}
|
|
535
554
|
React.useEffect(t1, t2);
|
|
536
555
|
}
|
|
537
|
-
function
|
|
556
|
+
function _temp14(a) {
|
|
538
557
|
return a.id;
|
|
539
558
|
}
|
|
540
|
-
function
|
|
559
|
+
function _temp13() {
|
|
541
560
|
return true;
|
|
542
561
|
}
|
|
543
|
-
function
|
|
544
|
-
function _temp12() {
|
|
545
|
-
return studioStore.send({
|
|
546
|
-
type: "openReviewDraftSheet",
|
|
547
|
-
startRenaming: true
|
|
548
|
-
});
|
|
549
|
-
}
|
|
562
|
+
function _temp12() {}
|
|
550
563
|
function _temp11() {
|
|
551
564
|
return studioStore.send({ type: "openDeleteDraftDialog" });
|
|
552
565
|
}
|
|
@@ -635,4 +648,4 @@ function DraftItem(t0) {
|
|
|
635
648
|
}
|
|
636
649
|
|
|
637
650
|
//#endregion
|
|
638
|
-
export { DraftPicker, PendingChanges };
|
|
651
|
+
export { DraftPicker, PendingChanges, useDrafts };
|