camox 0.75.0 → 0.76.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 (72) hide show
  1. package/dist/core/editing/createEditableBlock.js +1077 -1681
  2. package/dist/core/editing/fieldSlot.js +251 -0
  3. package/dist/core/editing/useFieldSlot.js +159 -0
  4. package/dist/core/layoutContext.d.ts +2 -0
  5. package/dist/core/layoutContext.js +27 -1
  6. package/dist/features/canvas/CanvasPageFrame.js +2 -2
  7. package/dist/features/canvas/CanvasPreviewPageSlot.js +1 -1
  8. package/dist/features/canvas/canvasCameraController.js +595 -0
  9. package/dist/features/canvas/useCanvasCamera.js +141 -587
  10. package/dist/features/canvas/useCanvasFrame.js +1 -1
  11. package/dist/features/page/DerivedPageContent.js +4 -8
  12. package/dist/features/preview/components/AssetLightbox.js +6 -65
  13. package/dist/features/preview/components/CanvasPreview.js +2 -2
  14. package/dist/features/preview/components/Frame.js +3 -3
  15. package/dist/features/preview/components/ItemFieldsEditor.js +376 -460
  16. package/dist/features/preview/components/Overlays.js +4 -9
  17. package/dist/features/preview/components/PreviewPanel.js +3 -3
  18. package/dist/features/preview/components/RemovedBlockPlaceholder.js +2 -2
  19. package/dist/features/preview/components/SelectionEditor.js +285 -339
  20. package/dist/features/preview/components/ZoomableImage.js +105 -0
  21. package/dist/features/preview/components/contentFieldSchema.js +3 -1
  22. package/dist/features/preview/components/useFieldWriter.js +30 -51
  23. package/dist/features/preview/components/useRecordView.js +3 -3
  24. package/dist/features/preview/overlayMessages.js +20 -58
  25. package/dist/features/preview/previewStore.js +6 -123
  26. package/dist/features/preview/repeatableItemPath.js +47 -0
  27. package/dist/features/provider/AuthenticatedCamoxProvider.js +75 -63
  28. package/dist/features/renderer/RendererApp.js +6 -6
  29. package/dist/features/renderer/RendererFrames.js +2 -2
  30. package/dist/features/renderer/rendererHost.js +1 -1
  31. package/dist/features/routes/pageRuntime.d.ts +8 -12
  32. package/dist/features/routes/pageRuntime.js +26 -106
  33. package/dist/features/runtime/pageApp.js +1 -1
  34. package/dist/features/runtime/pageRead.js +105 -0
  35. package/dist/features/runtime/reader.d.ts +25 -0
  36. package/dist/features/runtime/reader.js +142 -0
  37. package/dist/features/runtime/runtime.d.ts +9 -3
  38. package/dist/features/runtime/runtime.js +608 -776
  39. package/dist/features/sdkBundle/buildSdkBundle.d.ts +5 -0
  40. package/dist/features/sdkBundle/buildSdkBundle.js +9 -3
  41. package/dist/features/studio/components/ChatWidget.js +137 -121
  42. package/dist/features/studio/components/ClearThread.js +121 -0
  43. package/dist/features/studio/components/DeleteDraftDialog.js +67 -65
  44. package/dist/features/studio/components/DraftBar.js +60 -49
  45. package/dist/features/studio/components/DraftNotices.js +149 -0
  46. package/dist/features/studio/components/DraftsControl.js +217 -180
  47. package/dist/features/studio/components/DraftsSheet.js +446 -0
  48. package/dist/features/studio/components/PublishedTab.js +511 -0
  49. package/dist/features/studio/components/ReviewDraftDialog.js +104 -89
  50. package/dist/features/studio/components/SheetTable.js +46 -0
  51. package/dist/features/studio/components/Specialists.js +1 -1
  52. package/dist/features/studio/components/ThreadMessages.js +227 -176
  53. package/dist/features/studio/draftLabel.js +15 -1
  54. package/dist/features/studio/draftNotice.js +1 -0
  55. package/dist/features/studio/showInCanvas.js +9 -19
  56. package/dist/features/studio/studioStore.js +5 -5
  57. package/dist/features/studio/useArchiveDraft.js +60 -0
  58. package/dist/features/studio/useEditorSelection.js +8 -19
  59. package/dist/features/studio/useRestoreDraft.js +70 -0
  60. package/dist/features/studio/viewSwitch.js +19 -11
  61. package/dist/lib/draft-scope.d.ts +1 -1
  62. package/dist/lib/draft-scope.js +6 -3
  63. package/dist/lib/queries.js +12 -1
  64. package/dist/lib/studio-reads.js +22 -0
  65. package/dist/lib/use-project-room.js +19 -13
  66. package/dist/lib/use-thread.js +1 -1
  67. package/dist/package.js +1 -1
  68. package/dist/studio.css +1 -1
  69. package/package.json +4 -4
  70. package/dist/core/hooks/useFieldSelection.js +0 -67
  71. package/dist/core/hooks/useIsEditable.js +0 -21
  72. package/dist/core/hooks/useOverlayMessage.js +0 -70
@@ -7,102 +7,104 @@ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
7
7
  import { Spinner } from "@camox/ui/spinner";
8
8
 
9
9
  //#region src/features/studio/components/DeleteDraftDialog.tsx
10
- /** Asks before deleting the draft the studio is in, then deletes it. */
10
+ /** Asks before deleting an archived draft for good, then deletes it (ADR 0046). */
11
11
  function DeleteDraftDialog(t0) {
12
12
  const $ = c(26);
13
- const { projectId, open, onOpenChange, onDeleted } = t0;
13
+ const { projectId, draftId, onOpenChange } = t0;
14
14
  let t1;
15
15
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
16
16
  t1 = draftMutations.delete();
17
17
  $[0] = t1;
18
18
  } else t1 = $[0];
19
19
  let t2;
20
- if ($[1] !== onDeleted || $[2] !== onOpenChange) {
20
+ if ($[1] !== onOpenChange) {
21
21
  t2 = {
22
22
  ...t1,
23
- onSuccess: (t3) => {
24
- const { ended } = t3;
25
- onOpenChange(false);
26
- onDeleted(ended);
27
- },
23
+ onSuccess: () => onOpenChange(false),
28
24
  onError: _temp
29
25
  };
30
- $[1] = onDeleted;
31
- $[2] = onOpenChange;
32
- $[3] = t2;
33
- } else t2 = $[3];
26
+ $[1] = onOpenChange;
27
+ $[2] = t2;
28
+ } else t2 = $[2];
34
29
  const deleteDraft = useMutation(t2);
35
- let t3;
36
- if ($[4] !== deleteDraft.isPending || $[5] !== onOpenChange) {
37
- t3 = (next) => {
30
+ const t3 = draftId !== null;
31
+ let t4;
32
+ if ($[3] !== deleteDraft.isPending || $[4] !== onOpenChange) {
33
+ t4 = (next) => {
38
34
  if (!deleteDraft.isPending) onOpenChange(next);
39
35
  };
40
- $[4] = deleteDraft.isPending;
41
- $[5] = onOpenChange;
42
- $[6] = t3;
43
- } else t3 = $[6];
44
- let t4;
45
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
46
- t4 = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this draft?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Every change in this draft is deleted for everyone. Live stays as it is. This can't be undone." })] });
47
- $[7] = t4;
48
- } else t4 = $[7];
36
+ $[3] = deleteDraft.isPending;
37
+ $[4] = onOpenChange;
38
+ $[5] = t4;
39
+ } else t4 = $[5];
49
40
  let t5;
50
- if ($[8] !== deleteDraft.isPending) {
51
- t5 = /* @__PURE__ */ jsx(AlertDialogCancel, {
41
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
42
+ t5 = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this draft?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Its changes, its thread and its code are deleted for everyone. Live stays as it is. This can't be undone." })] });
43
+ $[6] = t5;
44
+ } else t5 = $[6];
45
+ let t6;
46
+ if ($[7] !== deleteDraft.isPending) {
47
+ t6 = /* @__PURE__ */ jsx(AlertDialogCancel, {
52
48
  variant: "outline",
53
49
  size: "default",
54
50
  disabled: deleteDraft.isPending,
55
51
  children: "Cancel"
56
52
  });
57
- $[8] = deleteDraft.isPending;
58
- $[9] = t5;
59
- } else t5 = $[9];
60
- let t6;
61
- if ($[10] !== deleteDraft || $[11] !== projectId) {
62
- t6 = () => deleteDraft.mutate({ projectId });
63
- $[10] = deleteDraft;
64
- $[11] = projectId;
65
- $[12] = t6;
66
- } else t6 = $[12];
53
+ $[7] = deleteDraft.isPending;
54
+ $[8] = t6;
55
+ } else t6 = $[8];
67
56
  let t7;
57
+ if ($[9] !== deleteDraft || $[10] !== draftId || $[11] !== projectId) {
58
+ t7 = () => {
59
+ if (draftId) deleteDraft.mutate({
60
+ projectId,
61
+ draftId
62
+ });
63
+ };
64
+ $[9] = deleteDraft;
65
+ $[10] = draftId;
66
+ $[11] = projectId;
67
+ $[12] = t7;
68
+ } else t7 = $[12];
69
+ let t8;
68
70
  if ($[13] !== deleteDraft.isPending) {
69
- t7 = deleteDraft.isPending ? /* @__PURE__ */ jsx(Spinner, {}) : null;
71
+ t8 = deleteDraft.isPending ? /* @__PURE__ */ jsx(Spinner, {}) : null;
70
72
  $[13] = deleteDraft.isPending;
71
- $[14] = t7;
72
- } else t7 = $[14];
73
- let t8;
74
- if ($[15] !== deleteDraft.isPending || $[16] !== t6 || $[17] !== t7) {
75
- t8 = /* @__PURE__ */ jsxs(AlertDialogAction, {
73
+ $[14] = t8;
74
+ } else t8 = $[14];
75
+ let t9;
76
+ if ($[15] !== deleteDraft.isPending || $[16] !== t7 || $[17] !== t8) {
77
+ t9 = /* @__PURE__ */ jsxs(AlertDialogAction, {
76
78
  variant: "destructive",
77
79
  disabled: deleteDraft.isPending,
78
- onClick: t6,
79
- children: [t7, "Delete draft"]
80
+ onClick: t7,
81
+ children: [t8, "Delete draft"]
80
82
  });
81
83
  $[15] = deleteDraft.isPending;
82
- $[16] = t6;
83
- $[17] = t7;
84
- $[18] = t8;
85
- } else t8 = $[18];
86
- let t9;
87
- if ($[19] !== t5 || $[20] !== t8) {
88
- t9 = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [t4, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [t5, t8] })] });
89
- $[19] = t5;
90
- $[20] = t8;
91
- $[21] = t9;
92
- } else t9 = $[21];
84
+ $[16] = t7;
85
+ $[17] = t8;
86
+ $[18] = t9;
87
+ } else t9 = $[18];
93
88
  let t10;
94
- if ($[22] !== open || $[23] !== t3 || $[24] !== t9) {
95
- t10 = /* @__PURE__ */ jsx(AlertDialog, {
96
- open,
97
- onOpenChange: t3,
98
- children: t9
89
+ if ($[19] !== t6 || $[20] !== t9) {
90
+ t10 = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [t5, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [t6, t9] })] });
91
+ $[19] = t6;
92
+ $[20] = t9;
93
+ $[21] = t10;
94
+ } else t10 = $[21];
95
+ let t11;
96
+ if ($[22] !== t10 || $[23] !== t3 || $[24] !== t4) {
97
+ t11 = /* @__PURE__ */ jsx(AlertDialog, {
98
+ open: t3,
99
+ onOpenChange: t4,
100
+ children: t10
99
101
  });
100
- $[22] = open;
102
+ $[22] = t10;
101
103
  $[23] = t3;
102
- $[24] = t9;
103
- $[25] = t10;
104
- } else t10 = $[25];
105
- return t10;
104
+ $[24] = t4;
105
+ $[25] = t11;
106
+ } else t11 = $[25];
107
+ return t11;
106
108
  }
107
109
  function _temp(error) {
108
110
  return toast.error(error.message || "Could not delete the draft");
@@ -1,6 +1,7 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { studioStore } from "../studioStore.js";
3
3
  import { plural } from "../draftLabel.js";
4
+ import { useArchiveDraft } from "../useArchiveDraft.js";
4
5
  import { useDrafts } from "./DraftsControl.js";
5
6
  import { c } from "react/compiler-runtime";
6
7
  import * as React from "react";
@@ -16,16 +17,18 @@ import { FloatingToolbar } from "@camox/ui/floating-toolbar";
16
17
  */
17
18
  const SETTLE_MS = 1500;
18
19
  /**
19
- * Asks what to do with the draft being viewed, once its edits settle: delete it or publish it.
20
+ * Asks what to do with the draft being viewed, once its edits settle: archive it, unless it's
21
+ * Camox's Catch-up Draft, or publish it.
20
22
  * Publishing waits while Camox's agent is mid-turn in the draft, so half a change never goes live;
21
23
  * nothing else Camox does holds it here. `stacked` places it in the Preview toolbar's column, just above the toolbar;
22
24
  * otherwise it floats at the bottom of the screen on its own.
23
25
  */
24
26
  function DraftBar(t0) {
25
- const $ = c(26);
27
+ const $ = c(32);
26
28
  const { stacked: t1 } = t0;
27
29
  const stacked = t1 === void 0 ? false : t1;
28
30
  const { projectId, current } = useDrafts();
31
+ const { archive, archiving } = useArchiveDraft(projectId);
29
32
  const settled = useSettled(current?.id ?? null, current?.lastChangedAt ?? null);
30
33
  let t2;
31
34
  if ($[0] !== current) {
@@ -68,82 +71,90 @@ function DraftBar(t0) {
68
71
  $[9] = t7;
69
72
  } else t7 = $[9];
70
73
  let t8;
71
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
72
- t8 = /* @__PURE__ */ jsx(Button, {
74
+ if ($[10] !== archive || $[11] !== archiving || $[12] !== current.catchUp) {
75
+ t8 = !current.catchUp && /* @__PURE__ */ jsx(Button, {
73
76
  type: "button",
74
77
  variant: "outline",
75
- onClick: _temp,
76
- children: "Delete"
78
+ disabled: archiving,
79
+ onClick: archive,
80
+ children: "Archive"
77
81
  });
78
- $[10] = t8;
79
- } else t8 = $[10];
82
+ $[10] = archive;
83
+ $[11] = archiving;
84
+ $[12] = current.catchUp;
85
+ $[13] = t8;
86
+ } else t8 = $[13];
80
87
  const t9 = !working;
81
88
  const t10 = working ? 0 : void 0;
82
89
  let t11;
83
- if ($[11] !== t10) {
90
+ if ($[14] !== t10) {
84
91
  t11 = /* @__PURE__ */ jsx("span", { tabIndex: t10 });
85
- $[11] = t10;
86
- $[12] = t11;
87
- } else t11 = $[12];
92
+ $[14] = t10;
93
+ $[15] = t11;
94
+ } else t11 = $[15];
88
95
  const t12 = empty || working;
89
96
  let t13;
90
- if ($[13] !== t12) {
97
+ if ($[16] !== t12) {
91
98
  t13 = /* @__PURE__ */ jsx(Button, {
92
99
  type: "button",
93
100
  disabled: t12,
94
- onClick: _temp2,
101
+ onClick: _temp,
95
102
  children: "Publish…"
96
103
  });
97
- $[13] = t12;
98
- $[14] = t13;
99
- } else t13 = $[14];
104
+ $[16] = t12;
105
+ $[17] = t13;
106
+ } else t13 = $[17];
100
107
  let t14;
101
- if ($[15] !== t11 || $[16] !== t13) {
108
+ if ($[18] !== t11 || $[19] !== t13) {
102
109
  t14 = /* @__PURE__ */ jsx(TooltipTrigger, {
103
110
  render: t11,
104
111
  children: t13
105
112
  });
106
- $[15] = t11;
107
- $[16] = t13;
108
- $[17] = t14;
109
- } else t14 = $[17];
113
+ $[18] = t11;
114
+ $[19] = t13;
115
+ $[20] = t14;
116
+ } else t14 = $[20];
110
117
  let t15;
111
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
118
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
112
119
  t15 = /* @__PURE__ */ jsx(TooltipContent, { children: "Camox's agent is working" });
113
- $[18] = t15;
114
- } else t15 = $[18];
120
+ $[21] = t15;
121
+ } else t15 = $[21];
115
122
  let t16;
116
- if ($[19] !== t14 || $[20] !== t9) {
117
- t16 = /* @__PURE__ */ jsxs("div", {
118
- className: "flex items-center gap-2",
119
- children: [t8, /* @__PURE__ */ jsxs(Tooltip, {
120
- disabled: t9,
121
- children: [t14, t15]
122
- })]
123
+ if ($[22] !== t14 || $[23] !== t9) {
124
+ t16 = /* @__PURE__ */ jsxs(Tooltip, {
125
+ disabled: t9,
126
+ children: [t14, t15]
123
127
  });
124
- $[19] = t14;
125
- $[20] = t9;
126
- $[21] = t16;
127
- } else t16 = $[21];
128
+ $[22] = t14;
129
+ $[23] = t9;
130
+ $[24] = t16;
131
+ } else t16 = $[24];
128
132
  let t17;
129
- if ($[22] !== t16 || $[23] !== t4 || $[24] !== t7) {
130
- t17 = /* @__PURE__ */ jsxs(FloatingToolbar, {
133
+ if ($[25] !== t16 || $[26] !== t8) {
134
+ t17 = /* @__PURE__ */ jsxs("div", {
135
+ className: "flex items-center gap-2",
136
+ children: [t8, t16]
137
+ });
138
+ $[25] = t16;
139
+ $[26] = t8;
140
+ $[27] = t17;
141
+ } else t17 = $[27];
142
+ let t18;
143
+ if ($[28] !== t17 || $[29] !== t4 || $[30] !== t7) {
144
+ t18 = /* @__PURE__ */ jsxs(FloatingToolbar, {
131
145
  "aria-label": "Draft",
132
146
  className: t4,
133
- children: [t7, t16]
147
+ children: [t7, t17]
134
148
  });
135
- $[22] = t16;
136
- $[23] = t4;
137
- $[24] = t7;
138
- $[25] = t17;
139
- } else t17 = $[25];
140
- return t17;
141
- }
142
- function _temp2() {
143
- return studioStore.send({ type: "openReviewDraftDialog" });
149
+ $[28] = t17;
150
+ $[29] = t4;
151
+ $[30] = t7;
152
+ $[31] = t18;
153
+ } else t18 = $[31];
154
+ return t18;
144
155
  }
145
156
  function _temp() {
146
- return studioStore.send({ type: "openDeleteDraftDialog" });
157
+ return studioStore.send({ type: "openReviewDraftDialog" });
147
158
  }
148
159
  /**
149
160
  * Whether the draft went without a change for `SETTLE_MS`. Once settled it stays so for that
@@ -0,0 +1,149 @@
1
+ import { useDraftScope } from "../../../lib/draft-scope.js";
2
+ import { AuthContext } from "../../../lib/auth.js";
3
+ import { reads, useReadQuery } from "../../../lib/studio-reads.js";
4
+ import { draftNoticeMessage } from "../draftNotice.js";
5
+ import { useRestoreDraft } from "../useRestoreDraft.js";
6
+ import { c } from "react/compiler-runtime";
7
+ import * as React from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { toast } from "@camox/ui/toaster";
10
+ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@camox/ui/alert-dialog";
11
+ import { Spinner } from "@camox/ui/spinner";
12
+
13
+ //#region src/features/studio/components/DraftNotices.tsx
14
+ /**
15
+ * Says why the studio shows Live when the draft a member opened, or was in, can't be shown. A
16
+ * draft that's only archived can come back (ADR 0046), so a dialog says so and offers to restore
17
+ * it; anything else is a toast. Opening the link restores nothing by itself.
18
+ */
19
+ function DraftNotices() {
20
+ const $ = c(34);
21
+ const draftScope = useDraftScope();
22
+ const [archived, setArchived] = React.useState(null);
23
+ let t0;
24
+ let t1;
25
+ if ($[0] !== draftScope) {
26
+ t0 = () => draftScope.onNotice((notice) => {
27
+ if (notice.reason === "archived") setArchived(notice);
28
+ else toast(draftNoticeMessage(notice));
29
+ });
30
+ t1 = [draftScope];
31
+ $[0] = draftScope;
32
+ $[1] = t0;
33
+ $[2] = t1;
34
+ } else {
35
+ t0 = $[1];
36
+ t1 = $[2];
37
+ }
38
+ React.useEffect(t0, t1);
39
+ const { projectUuid } = React.useContext(AuthContext);
40
+ let t2;
41
+ if ($[3] !== projectUuid) {
42
+ t2 = reads.project({ projectUuid });
43
+ $[3] = projectUuid;
44
+ $[4] = t2;
45
+ } else t2 = $[4];
46
+ const { data: project } = useReadQuery(t2);
47
+ let t3;
48
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
49
+ t3 = { onRestored: () => setArchived(null) };
50
+ $[5] = t3;
51
+ } else t3 = $[5];
52
+ const { restore, restoring } = useRestoreDraft(project?.id, t3);
53
+ const t4 = archived !== null;
54
+ let t5;
55
+ if ($[6] !== restoring) {
56
+ t5 = (open) => {
57
+ if (!open && !restoring) setArchived(null);
58
+ };
59
+ $[6] = restoring;
60
+ $[7] = t5;
61
+ } else t5 = $[7];
62
+ let t6;
63
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
64
+ t6 = /* @__PURE__ */ jsx(AlertDialogTitle, { children: "This draft is archived" });
65
+ $[8] = t6;
66
+ } else t6 = $[8];
67
+ let t7;
68
+ if ($[9] !== archived) {
69
+ t7 = archived && draftNoticeMessage(archived);
70
+ $[9] = archived;
71
+ $[10] = t7;
72
+ } else t7 = $[10];
73
+ let t8;
74
+ if ($[11] !== t7) {
75
+ t8 = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [t6, /* @__PURE__ */ jsxs(AlertDialogDescription, { children: [t7, " Restore it to pick up where it stopped."] })] });
76
+ $[11] = t7;
77
+ $[12] = t8;
78
+ } else t8 = $[12];
79
+ const t9 = restoring !== void 0;
80
+ let t10;
81
+ if ($[13] !== t9) {
82
+ t10 = /* @__PURE__ */ jsx(AlertDialogCancel, {
83
+ variant: "outline",
84
+ size: "default",
85
+ disabled: t9,
86
+ children: "Stay on Live"
87
+ });
88
+ $[13] = t9;
89
+ $[14] = t10;
90
+ } else t10 = $[14];
91
+ const t11 = restoring !== void 0 || !project;
92
+ let t12;
93
+ if ($[15] !== archived || $[16] !== restore) {
94
+ t12 = () => {
95
+ if (archived) restore(archived.draftId);
96
+ };
97
+ $[15] = archived;
98
+ $[16] = restore;
99
+ $[17] = t12;
100
+ } else t12 = $[17];
101
+ let t13;
102
+ if ($[18] !== restoring) {
103
+ t13 = restoring !== void 0 ? /* @__PURE__ */ jsx(Spinner, {}) : null;
104
+ $[18] = restoring;
105
+ $[19] = t13;
106
+ } else t13 = $[19];
107
+ let t14;
108
+ if ($[20] !== t11 || $[21] !== t12 || $[22] !== t13) {
109
+ t14 = /* @__PURE__ */ jsxs(AlertDialogAction, {
110
+ disabled: t11,
111
+ onClick: t12,
112
+ children: [t13, "Restore"]
113
+ });
114
+ $[20] = t11;
115
+ $[21] = t12;
116
+ $[22] = t13;
117
+ $[23] = t14;
118
+ } else t14 = $[23];
119
+ let t15;
120
+ if ($[24] !== t10 || $[25] !== t14) {
121
+ t15 = /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [t10, t14] });
122
+ $[24] = t10;
123
+ $[25] = t14;
124
+ $[26] = t15;
125
+ } else t15 = $[26];
126
+ let t16;
127
+ if ($[27] !== t15 || $[28] !== t8) {
128
+ t16 = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [t8, t15] });
129
+ $[27] = t15;
130
+ $[28] = t8;
131
+ $[29] = t16;
132
+ } else t16 = $[29];
133
+ let t17;
134
+ if ($[30] !== t16 || $[31] !== t4 || $[32] !== t5) {
135
+ t17 = /* @__PURE__ */ jsx(AlertDialog, {
136
+ open: t4,
137
+ onOpenChange: t5,
138
+ children: t16
139
+ });
140
+ $[30] = t16;
141
+ $[31] = t4;
142
+ $[32] = t5;
143
+ $[33] = t17;
144
+ } else t17 = $[33];
145
+ return t17;
146
+ }
147
+
148
+ //#endregion
149
+ export { DraftNotices };