@openrails/contentkit-ui 0.83.0 → 0.86.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 (219) hide show
  1. package/README.md +18 -7
  2. package/dist/client/beacons.d.ts +18 -6
  3. package/dist/client/beacons.js +26 -11
  4. package/dist/client/beacons.js.map +1 -1
  5. package/dist/client/client.d.ts +3 -0
  6. package/dist/client/client.js +29 -27
  7. package/dist/client/client.js.map +1 -1
  8. package/dist/client/codes.d.ts +6 -1
  9. package/dist/client/codes.js +4 -1
  10. package/dist/client/codes.js.map +1 -1
  11. package/dist/client/content/moderation.d.ts +14 -2
  12. package/dist/client/content/moderation.js +34 -0
  13. package/dist/client/content/moderation.js.map +1 -1
  14. package/dist/client/content/types.d.ts +13 -0
  15. package/dist/client/content/types.js.map +1 -1
  16. package/dist/client/discovery.d.ts +6 -0
  17. package/dist/client/discovery.js.map +1 -1
  18. package/dist/client/generated/error-codes.d.ts +1 -1
  19. package/dist/client/generated/error-codes.js +9 -1
  20. package/dist/client/generated/error-codes.js.map +1 -1
  21. package/dist/client/generated/routes.d.ts +91 -13
  22. package/dist/client/generated/routes.js +123 -2
  23. package/dist/client/generated/routes.js.map +1 -1
  24. package/dist/client/generated/wire.d.ts +81 -0
  25. package/dist/client/generated/wire.js.map +1 -1
  26. package/dist/client/index.d.ts +4 -2
  27. package/dist/client/media/queue.d.ts +4 -2
  28. package/dist/client/media/queue.js +18 -12
  29. package/dist/client/media/queue.js.map +1 -1
  30. package/dist/client/media/rules.d.ts +7 -1
  31. package/dist/client/media/rules.js +27 -21
  32. package/dist/client/media/rules.js.map +1 -1
  33. package/dist/client/reader-meta.d.ts +27 -0
  34. package/dist/client/reader-meta.js +99 -0
  35. package/dist/client/reader-meta.js.map +1 -0
  36. package/dist/client/stats.d.ts +32 -0
  37. package/dist/client/stats.js +35 -0
  38. package/dist/client/stats.js.map +1 -0
  39. package/dist/client/versions.d.ts +1 -1
  40. package/dist/client/versions.js +7 -2
  41. package/dist/client/versions.js.map +1 -1
  42. package/dist/client.js +30 -28
  43. package/dist/components/admin/content-manager.js +206 -206
  44. package/dist/components/admin/content-manager.js.map +1 -1
  45. package/dist/components/admin/group-manager.js +71 -70
  46. package/dist/components/admin/group-manager.js.map +1 -1
  47. package/dist/components/admin/media-item-panel.d.ts +24 -7
  48. package/dist/components/admin/media-item-panel.js +209 -197
  49. package/dist/components/admin/media-item-panel.js.map +1 -1
  50. package/dist/components/admin/poll-manager.js +25 -25
  51. package/dist/components/admin/reader-manifest.d.ts +18 -0
  52. package/dist/components/admin/reader-manifest.js +490 -0
  53. package/dist/components/admin/reader-manifest.js.map +1 -0
  54. package/dist/components/admin/stats-dashboard.d.ts +22 -0
  55. package/dist/components/admin/stats-dashboard.js +257 -0
  56. package/dist/components/admin/stats-dashboard.js.map +1 -0
  57. package/dist/components/content/card.js +43 -43
  58. package/dist/components/content/card.js.map +1 -1
  59. package/dist/components/content/editors.d.ts +2 -1
  60. package/dist/components/content/editors.js +479 -416
  61. package/dist/components/content/editors.js.map +1 -1
  62. package/dist/components/content/grid.js +47 -47
  63. package/dist/components/content/index.d.ts +2 -1
  64. package/dist/components/content/listing.js +34 -34
  65. package/dist/components/content/listing.js.map +1 -1
  66. package/dist/components/content/paywall.d.ts +17 -5
  67. package/dist/components/content/paywall.js +115 -100
  68. package/dist/components/content/paywall.js.map +1 -1
  69. package/dist/components/content/reader-stats.d.ts +12 -0
  70. package/dist/components/content/reader-stats.js +47 -0
  71. package/dist/components/content/reader-stats.js.map +1 -0
  72. package/dist/components/groups/banner.d.ts +1 -1
  73. package/dist/components/groups/banner.js +34 -34
  74. package/dist/components/groups/banner.js.map +1 -1
  75. package/dist/components/groups/directory.js +11 -11
  76. package/dist/components/groups/editor.js +294 -294
  77. package/dist/components/groups/editor.js.map +1 -1
  78. package/dist/components/groups/header.js +27 -27
  79. package/dist/components/groups/header.js.map +1 -1
  80. package/dist/components/groups/memberships.js +180 -180
  81. package/dist/components/groups/parts.d.ts +2 -4
  82. package/dist/components/groups/parts.js +69 -88
  83. package/dist/components/groups/parts.js.map +1 -1
  84. package/dist/components/media-folder-editor.js +239 -189
  85. package/dist/components/media-folder-editor.js.map +1 -1
  86. package/dist/components/notifications.js +17 -17
  87. package/dist/components/slot-upload.d.ts +2 -2
  88. package/dist/components/slot-upload.js +84 -79
  89. package/dist/components/slot-upload.js.map +1 -1
  90. package/dist/components/social/bans.js +34 -34
  91. package/dist/components/social/comments.js +59 -45
  92. package/dist/components/social/comments.js.map +1 -1
  93. package/dist/components/social/index.d.ts +1 -0
  94. package/dist/components/social/moderation.d.ts +5 -4
  95. package/dist/components/social/moderation.js +177 -160
  96. package/dist/components/social/moderation.js.map +1 -1
  97. package/dist/components/social/parts.js +22 -14
  98. package/dist/components/social/parts.js.map +1 -1
  99. package/dist/components/social/rules.d.ts +23 -0
  100. package/dist/components/social/rules.js +261 -0
  101. package/dist/components/social/rules.js.map +1 -0
  102. package/dist/components/video-player.d.ts +2 -0
  103. package/dist/components/video-player.js +318 -314
  104. package/dist/components/video-player.js.map +1 -1
  105. package/dist/i18n/context.d.ts +2 -0
  106. package/dist/i18n/context.js +23 -5
  107. package/dist/i18n/context.js.map +1 -1
  108. package/dist/index.d.ts +3 -1
  109. package/dist/index.js +28 -24
  110. package/dist/locales/admin/de.js +105 -0
  111. package/dist/locales/admin/de.js.map +1 -1
  112. package/dist/locales/admin/en.d.ts +105 -0
  113. package/dist/locales/admin/en.js +105 -0
  114. package/dist/locales/admin/en.js.map +1 -1
  115. package/dist/locales/admin/es.js +105 -0
  116. package/dist/locales/admin/es.js.map +1 -1
  117. package/dist/locales/admin/ja.js +105 -0
  118. package/dist/locales/admin/ja.js.map +1 -1
  119. package/dist/locales/admin/ko.js +105 -0
  120. package/dist/locales/admin/ko.js.map +1 -1
  121. package/dist/locales/admin/zh.js +105 -0
  122. package/dist/locales/admin/zh.js.map +1 -1
  123. package/dist/locales/content/de.js +6 -0
  124. package/dist/locales/content/de.js.map +1 -1
  125. package/dist/locales/content/en.d.ts +6 -0
  126. package/dist/locales/content/en.js +6 -0
  127. package/dist/locales/content/en.js.map +1 -1
  128. package/dist/locales/content/es.js +6 -0
  129. package/dist/locales/content/es.js.map +1 -1
  130. package/dist/locales/content/ja.js +6 -0
  131. package/dist/locales/content/ja.js.map +1 -1
  132. package/dist/locales/content/ko.js +6 -0
  133. package/dist/locales/content/ko.js.map +1 -1
  134. package/dist/locales/content/zh.js +6 -0
  135. package/dist/locales/content/zh.js.map +1 -1
  136. package/dist/locales/de.js +4 -1
  137. package/dist/locales/de.js.map +1 -1
  138. package/dist/locales/discovery/de.js +1 -0
  139. package/dist/locales/discovery/de.js.map +1 -1
  140. package/dist/locales/discovery/en.d.ts +1 -0
  141. package/dist/locales/discovery/en.js +1 -0
  142. package/dist/locales/discovery/en.js.map +1 -1
  143. package/dist/locales/discovery/es.js +1 -0
  144. package/dist/locales/discovery/es.js.map +1 -1
  145. package/dist/locales/discovery/ja.js +1 -0
  146. package/dist/locales/discovery/ja.js.map +1 -1
  147. package/dist/locales/discovery/ko.js +1 -0
  148. package/dist/locales/discovery/ko.js.map +1 -1
  149. package/dist/locales/discovery/zh.js +1 -0
  150. package/dist/locales/discovery/zh.js.map +1 -1
  151. package/dist/locales/en.d.ts +118 -0
  152. package/dist/locales/en.js +4 -1
  153. package/dist/locales/en.js.map +1 -1
  154. package/dist/locales/es.js +4 -1
  155. package/dist/locales/es.js.map +1 -1
  156. package/dist/locales/ja.js +4 -1
  157. package/dist/locales/ja.js.map +1 -1
  158. package/dist/locales/ko.js +4 -1
  159. package/dist/locales/ko.js.map +1 -1
  160. package/dist/locales/social/de.js +3 -0
  161. package/dist/locales/social/de.js.map +1 -1
  162. package/dist/locales/social/en.d.ts +3 -0
  163. package/dist/locales/social/en.js +3 -0
  164. package/dist/locales/social/en.js.map +1 -1
  165. package/dist/locales/social/es.js +3 -0
  166. package/dist/locales/social/es.js.map +1 -1
  167. package/dist/locales/social/ja.js +3 -0
  168. package/dist/locales/social/ja.js.map +1 -1
  169. package/dist/locales/social/ko.js +3 -0
  170. package/dist/locales/social/ko.js.map +1 -1
  171. package/dist/locales/social/zh.js +3 -0
  172. package/dist/locales/social/zh.js.map +1 -1
  173. package/dist/locales/zh.js +4 -1
  174. package/dist/locales/zh.js.map +1 -1
  175. package/dist/react/admin.d.ts +1 -1
  176. package/dist/react/admin.js +24 -23
  177. package/dist/react/admin.js.map +1 -1
  178. package/dist/react/canonical.d.ts +4 -3
  179. package/dist/react/canonical.js +34 -33
  180. package/dist/react/canonical.js.map +1 -1
  181. package/dist/react/comments.d.ts +29 -1
  182. package/dist/react/comments.js +30 -2
  183. package/dist/react/comments.js.map +1 -1
  184. package/dist/react/contents.js +144 -144
  185. package/dist/react/contents.js.map +1 -1
  186. package/dist/react/context.d.ts +1 -1
  187. package/dist/react/context.js.map +1 -1
  188. package/dist/react/detail.d.ts +12 -6
  189. package/dist/react/detail.js +31 -24
  190. package/dist/react/detail.js.map +1 -1
  191. package/dist/react/discovery.js +1 -1
  192. package/dist/react/discovery.js.map +1 -1
  193. package/dist/react/folder.d.ts +7 -2
  194. package/dist/react/folder.js +165 -147
  195. package/dist/react/folder.js.map +1 -1
  196. package/dist/react/groups.d.ts +0 -1
  197. package/dist/react/groups.js +13 -12
  198. package/dist/react/groups.js.map +1 -1
  199. package/dist/react/index.d.ts +5 -3
  200. package/dist/react/location.d.ts +11 -0
  201. package/dist/react/location.js +18 -0
  202. package/dist/react/location.js.map +1 -0
  203. package/dist/react/public.d.ts +8 -0
  204. package/dist/react/public.js +32 -27
  205. package/dist/react/public.js.map +1 -1
  206. package/dist/react/resources.js +6 -0
  207. package/dist/react/resources.js.map +1 -1
  208. package/dist/react/stats.d.ts +24 -0
  209. package/dist/react/stats.js +28 -0
  210. package/dist/react/stats.js.map +1 -0
  211. package/dist/react/use-resource.js +8 -7
  212. package/dist/react/use-resource.js.map +1 -1
  213. package/dist/react/versions.js +20 -20
  214. package/dist/react.js +26 -24
  215. package/dist/styles.css +1 -1
  216. package/dist/urls/index.d.ts +35 -10
  217. package/dist/urls.js +100 -70
  218. package/dist/urls.js.map +1 -1
  219. package/package.json +1 -1
@@ -11,15 +11,15 @@ import { isProcessing as u } from "../client/media/windows.js";
11
11
  import { Alert as d, AlertDescription as f, AlertTitle as p } from "../ui/alert.js";
12
12
  import { Button as m } from "../ui/button.js";
13
13
  import { progressLabel as h, progressValue as g } from "./progress.js";
14
- import { ImageCropDialog as ee } from "./image-crop-dialog.js";
15
- import { isAudioType as _, isImageType as v, isSubtitleType as y, isVideoType as b } from "../client/gallery.js";
16
- import { useEditorCrop as x } from "../react/crop.js";
17
- import { nameIn as S, thumbnailOf as C, useMediaFolder as w } from "../react/folder.js";
18
- import { SortableList as T } from "./sortable-list.js";
19
- import { useEffect as E, useImperativeHandle as te, useMemo as D, useRef as ne, useState as O } from "react";
20
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
21
- import { cn as M } from "cn";
22
- import { Alert02Icon as N, CropIcon as P, Delete02Icon as F, Edit02Icon as I, File01Icon as L, Image01Icon as R, ImageAdd01Icon as re, Loading03Icon as z, MusicNote01Icon as B, Refresh01Icon as V, RepeatIcon as H, Video01Icon as U } from "@hugeicons/core-free-icons";
14
+ import { ImageCropDialog as _ } from "./image-crop-dialog.js";
15
+ import { isAudioType as v, isImageType as y, isSubtitleType as b, isVideoType as x } from "../client/gallery.js";
16
+ import { useEditorCrop as S } from "../react/crop.js";
17
+ import { nameIn as C, thumbnailOf as w, useMediaFolder as T } from "../react/folder.js";
18
+ import { SortableList as E } from "./sortable-list.js";
19
+ import { useEffect as D, useImperativeHandle as ee, useMemo as O, useRef as te, useState as k } from "react";
20
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
21
+ import { cn as N } from "cn";
22
+ import { Alert02Icon as P, CropIcon as F, Delete02Icon as I, Edit02Icon as L, File01Icon as R, Image01Icon as z, ImageAdd01Icon as ne, Loading03Icon as re, MusicNote01Icon as B, Refresh01Icon as V, RepeatIcon as H, Video01Icon as U } from "@hugeicons/core-free-icons";
23
23
  import { HugeiconsIcon as W } from "@hugeicons/react";
24
24
  //#region src/components/media-folder-editor.tsx
25
25
  var ie = [
@@ -29,14 +29,14 @@ var ie = [
29
29
  "16:9"
30
30
  ];
31
31
  function G(e) {
32
- return v(e) ? "image" : b(e) ? "video" : _(e) ? "audio" : y(e) ? "subtitle" : "file";
32
+ return y(e) ? "image" : x(e) ? "video" : v(e) ? "audio" : b(e) ? "subtitle" : "file";
33
33
  }
34
34
  var K = {
35
- image: R,
35
+ image: z,
36
36
  video: U,
37
37
  audio: B,
38
- subtitle: L,
39
- file: L
38
+ subtitle: R,
39
+ file: R
40
40
  };
41
41
  function q(e) {
42
42
  let t = new Set((e?.types ?? []).map(G));
@@ -60,16 +60,16 @@ function ae(e, t) {
60
60
  function oe(e) {
61
61
  if (e.folder) {
62
62
  let { folder: n, ...r } = e;
63
- return /* @__PURE__ */ A(J, {
63
+ return /* @__PURE__ */ j(J, {
64
64
  folder: n,
65
65
  ...r
66
66
  }, n.ref ? t(n.ref) : "");
67
67
  }
68
- return /* @__PURE__ */ A(se, { ...e }, t(e.item));
68
+ return /* @__PURE__ */ j(se, { ...e }, t(e.item));
69
69
  }
70
70
  function se(e) {
71
- let { item: t, ref: n, label: r, toolbar: i, rowActions: a, footer: o, aspects: s, confirmRemove: c, disabled: l, className: u, appearance: d, ...f } = e, p = w(t, f);
72
- return /* @__PURE__ */ A(J, {
71
+ let { item: t, ref: n, label: r, toolbar: i, rowActions: a, footer: o, aspects: s, confirmRemove: c, disabled: l, className: u, appearance: d, ...f } = e, p = T(t, f);
72
+ return /* @__PURE__ */ j(J, {
73
73
  folder: p,
74
74
  ref: n,
75
75
  label: r,
@@ -88,57 +88,57 @@ var ce = {
88
88
  id: ""
89
89
  };
90
90
  function J(e) {
91
- let { folder: t, ref: n, label: i, toolbar: a, rowActions: c, footer: l, aspects: u = ie, confirmRemove: h, disabled: g, className: _, appearance: v } = e, { t: y, error: b } = o(), { groups: S, queue: C, read: w, options: D } = t;
92
- te(n, () => ({
91
+ let { folder: t, ref: n, label: i, toolbar: a, rowActions: c, footer: l, aspects: u = ie, confirmRemove: h, disabled: g, className: v, appearance: y } = e, { t: b, error: x } = o(), { groups: C, queue: w, read: T, options: O } = t;
92
+ ee(n, () => ({
93
93
  discard: t.discard,
94
94
  commit: t.commit,
95
95
  folder: t
96
96
  }), [t]);
97
- let k = D.commit === "auto", P = S.flatMap((e) => e.rule ? [e.rule] : []), I = r(P), L = t.uploads.length + C.items.length + t.waiting.length === 0, R = !!g, [B, V] = O(/* @__PURE__ */ new Set());
98
- E(() => {
97
+ let A = O.commit === "auto", F = C.flatMap((e) => e.rule ? [e.rule] : []), L = r(F), R = t.uploads.length + w.items.length + t.waiting.length + t.pending.length === 0, z = !!g, [B, V] = k(/* @__PURE__ */ new Set());
98
+ D(() => {
99
99
  let e = new Set(t.uploads.map((e) => e.path));
100
100
  V((t) => [...t].every((t) => e.has(t)) ? t : new Set([...t].filter((t) => e.has(t))));
101
101
  }, [t.uploads]);
102
- let [H, U] = O(null), K = x(t.ref ?? ce, H, {
103
- client: D.client,
104
- onError: D.onError,
102
+ let [H, U] = k(null), K = S(t.ref ?? ce, H, {
103
+ client: O.client,
104
+ onError: O.onError,
105
105
  onSaved: () => U(null)
106
- }), q = H ? S.find((e) => e.files.some((e) => e.path === H))?.rule : void 0, [oe, se] = O(null), J = ne(null), [X, Z] = O(null), [Q, $] = O(!1), de = {
106
+ }), q = H ? C.find((e) => e.files.some((e) => e.path === H))?.rule : void 0, [oe, se] = k(null), J = te(null), [X, Z] = k(null), [Q, $] = k(!1), fe = {
107
107
  onDragOver: (e) => {
108
- !R && e.dataTransfer.types.includes("Files") && (e.preventDefault(), $(!0));
108
+ !z && e.dataTransfer.types.includes("Files") && (e.preventDefault(), $(!0));
109
109
  },
110
110
  onDragLeave: (e) => {
111
111
  e.currentTarget.contains(e.relatedTarget) || $(!1);
112
112
  },
113
113
  onDrop: (e) => {
114
- !R && e.dataTransfer.files.length && (e.preventDefault(), $(!1), t.add(e.dataTransfer.files));
114
+ !z && e.dataTransfer.files.length && (e.preventDefault(), $(!1), t.add(e.dataTransfer.files));
115
115
  }
116
- }, fe = async () => {
116
+ }, pe = async () => {
117
117
  let e = [...B];
118
- (h === !1 || (h ? await h(e.length) : globalThis.confirm?.(y("folder.confirmRemove", { count: e.length })) ?? !0)) && await t.remove(e).then(() => V(/* @__PURE__ */ new Set()), () => {});
119
- }, pe = C.items.filter((e) => e.status === "uploaded").length, me = (e) => /* @__PURE__ */ j("label", {
120
- className: M(e ? "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-4 py-8 text-center text-sm text-muted-foreground transition-colors hover:border-primary hover:bg-primary/5" : "inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-sm font-medium transition-colors hover:bg-muted focus-within:ring-3 focus-within:ring-ring/50", e && Q && "border-primary bg-primary/5", R && "pointer-events-none opacity-50"),
118
+ (h === !1 || (h ? await h(e.length) : globalThis.confirm?.(b("folder.confirmRemove", { count: e.length })) ?? !0)) && await t.remove(e).then(() => V(/* @__PURE__ */ new Set()), () => {});
119
+ }, me = w.items.filter((e) => e.status === "uploaded").length + t.pending.length, he = (e) => /* @__PURE__ */ M("label", {
120
+ className: N(e ? "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-4 py-8 text-center text-sm text-muted-foreground transition-colors hover:border-primary hover:bg-primary/5" : "inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-sm font-medium transition-colors hover:bg-muted focus-within:ring-3 focus-within:ring-ring/50", e && Q && "border-primary bg-primary/5", z && "pointer-events-none opacity-50"),
121
121
  "data-ckui": e ? "folder-drop" : "folder-add",
122
122
  children: [
123
- /* @__PURE__ */ A(W, {
124
- icon: re,
123
+ /* @__PURE__ */ j(W, {
124
+ icon: ne,
125
125
  strokeWidth: 1.75,
126
126
  className: e ? "size-7" : "size-4"
127
127
  }),
128
- e ? /* @__PURE__ */ A("strong", {
128
+ e ? /* @__PURE__ */ j("strong", {
129
129
  className: "font-medium text-foreground",
130
- children: y("folder.drop")
131
- }) : y("folder.add"),
132
- e && P.length > 0 && /* @__PURE__ */ A("span", {
130
+ children: b("folder.drop")
131
+ }) : b("folder.add"),
132
+ e && F.length > 0 && /* @__PURE__ */ j("span", {
133
133
  className: "text-xs",
134
- children: ae(y, P)
134
+ children: ae(b, F)
135
135
  }),
136
- /* @__PURE__ */ A("input", {
136
+ /* @__PURE__ */ j("input", {
137
137
  type: "file",
138
138
  multiple: !0,
139
- accept: I,
139
+ accept: L,
140
140
  className: "sr-only",
141
- disabled: R,
141
+ disabled: z,
142
142
  "data-ckui": "file",
143
143
  onChange: (e) => {
144
144
  t.add([...e.target.files ?? []]), e.target.value = "";
@@ -146,118 +146,118 @@ function J(e) {
146
146
  })
147
147
  ]
148
148
  });
149
- return /* @__PURE__ */ j(s, {
150
- appearance: v,
151
- className: M("grid gap-3", _),
149
+ return /* @__PURE__ */ M(s, {
150
+ appearance: y,
151
+ className: N("grid gap-3", v),
152
152
  "data-ckui": "media-folder",
153
153
  "data-over": Q ? "" : void 0,
154
- ...de,
154
+ ...fe,
155
155
  children: [
156
- /* @__PURE__ */ j("div", {
156
+ /* @__PURE__ */ M("div", {
157
157
  className: "flex flex-wrap items-center justify-between gap-2",
158
158
  "data-ckui": "folder-header",
159
- children: [/* @__PURE__ */ A("h3", {
159
+ children: [/* @__PURE__ */ j("h3", {
160
160
  className: "text-sm font-semibold",
161
- children: i ?? y("folder.label")
162
- }), /* @__PURE__ */ j("div", {
161
+ children: i ?? b("folder.label")
162
+ }), /* @__PURE__ */ M("div", {
163
163
  className: "flex flex-wrap items-center gap-2",
164
- children: [a, !L && me(!1)]
164
+ children: [a, !R && he(!1)]
165
165
  })]
166
166
  }),
167
- L && (w.read || !t.ref) && me(!0),
168
- L && !w.read && w.loading && /* @__PURE__ */ A("div", {
167
+ R && (T.read || !t.ref) && he(!0),
168
+ R && !T.read && T.loading && /* @__PURE__ */ j("div", {
169
169
  className: "flex justify-center py-6 text-muted-foreground",
170
170
  "data-ckui": "folder-loading",
171
- children: /* @__PURE__ */ A(W, {
172
- icon: z,
171
+ children: /* @__PURE__ */ j(W, {
172
+ icon: re,
173
173
  strokeWidth: 2,
174
174
  className: "size-5 motion-safe:animate-spin"
175
175
  })
176
176
  }),
177
- t.refused.length > 0 && /* @__PURE__ */ j(d, {
177
+ t.refused.length > 0 && /* @__PURE__ */ M(d, {
178
178
  variant: "destructive",
179
179
  role: "alert",
180
180
  "data-ckui": "folder-refused",
181
- children: [/* @__PURE__ */ A(W, {
182
- icon: N,
181
+ children: [/* @__PURE__ */ j(W, {
182
+ icon: P,
183
183
  strokeWidth: 2
184
- }), /* @__PURE__ */ j(f, { children: [/* @__PURE__ */ A("ul", {
184
+ }), /* @__PURE__ */ M(f, { children: [/* @__PURE__ */ j("ul", {
185
185
  className: "grid gap-0.5",
186
- children: t.refused.map((e, t) => /* @__PURE__ */ j("li", { children: [
187
- /* @__PURE__ */ A("span", {
186
+ children: t.refused.map((e, t) => /* @__PURE__ */ M("li", { children: [
187
+ /* @__PURE__ */ j("span", {
188
188
  className: "font-medium",
189
189
  children: e.file.name
190
190
  }),
191
191
  ": ",
192
- b(e.error)
192
+ x(e.error)
193
193
  ] }, t))
194
- }), /* @__PURE__ */ A(m, {
194
+ }), /* @__PURE__ */ j(m, {
195
195
  variant: "outline",
196
196
  size: "xs",
197
197
  className: "mt-1 w-fit",
198
198
  onClick: t.dismiss,
199
- children: y("folder.dismiss")
199
+ children: b("folder.dismiss")
200
200
  })] })]
201
201
  }),
202
- C.blocked && /* @__PURE__ */ j(d, {
202
+ w.blocked && /* @__PURE__ */ M(d, {
203
203
  variant: "destructive",
204
204
  role: "alert",
205
205
  "data-ckui": "folder-paused",
206
206
  children: [
207
- /* @__PURE__ */ A(W, {
208
- icon: N,
207
+ /* @__PURE__ */ j(W, {
208
+ icon: P,
209
209
  strokeWidth: 2
210
210
  }),
211
- /* @__PURE__ */ A(p, { children: y("folder.paused") }),
212
- /* @__PURE__ */ j(f, { children: [b(C.blocked), /* @__PURE__ */ A(m, {
211
+ /* @__PURE__ */ j(p, { children: b("folder.paused") }),
212
+ /* @__PURE__ */ M(f, { children: [x(w.blocked), /* @__PURE__ */ j(m, {
213
213
  variant: "outline",
214
214
  size: "xs",
215
215
  className: "mt-1 w-fit",
216
- onClick: () => C.start(),
217
- children: y("folder.resume")
216
+ onClick: () => w.start(),
217
+ children: b("folder.resume")
218
218
  })] })
219
219
  ]
220
220
  }),
221
- t.error && /* @__PURE__ */ j(d, {
221
+ t.error && /* @__PURE__ */ M(d, {
222
222
  variant: "destructive",
223
223
  role: "alert",
224
224
  "data-ckui": "folder-error",
225
- children: [/* @__PURE__ */ A(W, {
226
- icon: N,
225
+ children: [/* @__PURE__ */ j(W, {
226
+ icon: P,
227
227
  strokeWidth: 2
228
- }), /* @__PURE__ */ A(f, { children: b(t.error) })]
228
+ }), /* @__PURE__ */ j(f, { children: x(t.error) })]
229
229
  }),
230
- B.size > 0 && /* @__PURE__ */ j("div", {
230
+ B.size > 0 && /* @__PURE__ */ M("div", {
231
231
  className: "flex flex-wrap items-center gap-2 rounded-md bg-muted px-3 py-1.5 text-sm",
232
232
  "data-ckui": "folder-selection",
233
233
  children: [
234
- /* @__PURE__ */ A("span", {
234
+ /* @__PURE__ */ j("span", {
235
235
  className: "tabular-nums",
236
- children: y("folder.selected", { count: B.size })
236
+ children: b("folder.selected", { count: B.size })
237
237
  }),
238
- /* @__PURE__ */ j(m, {
238
+ /* @__PURE__ */ M(m, {
239
239
  variant: "destructive",
240
240
  size: "xs",
241
- disabled: R || t.updating,
242
- onClick: () => void fe(),
243
- children: [/* @__PURE__ */ A(W, {
244
- icon: F,
241
+ disabled: z || t.updating,
242
+ onClick: () => void pe(),
243
+ children: [/* @__PURE__ */ j(W, {
244
+ icon: I,
245
245
  strokeWidth: 2
246
- }), y("folder.removeSelected")]
246
+ }), b("folder.removeSelected")]
247
247
  }),
248
- /* @__PURE__ */ A(m, {
248
+ /* @__PURE__ */ j(m, {
249
249
  variant: "ghost",
250
250
  size: "xs",
251
251
  onClick: () => V(/* @__PURE__ */ new Set()),
252
- children: y("folder.clearSelection")
252
+ children: b("folder.clearSelection")
253
253
  })
254
254
  ]
255
255
  }),
256
- S.map((e) => e.files.length ? /* @__PURE__ */ A(le, {
256
+ C.map((e) => e.files.length ? /* @__PURE__ */ j(le, {
257
257
  group: e,
258
- titled: S.length > 1,
258
+ titled: C.length > 1,
259
259
  folder: t,
260
- disabled: R,
260
+ disabled: z,
261
261
  selected: B,
262
262
  onSelect: (e, t) => V((n) => t ? /* @__PURE__ */ new Set([...n, e]) : new Set([...n].filter((t) => t !== e))),
263
263
  renaming: oe,
@@ -268,61 +268,72 @@ function J(e) {
268
268
  },
269
269
  rowActions: c
270
270
  }, e.path) : null),
271
- t.waiting.length > 0 && /* @__PURE__ */ A("ul", {
271
+ t.waiting.length > 0 && /* @__PURE__ */ j("ul", {
272
272
  className: "grid",
273
- "aria-label": y("folder.label"),
274
- children: t.waiting.map((e, t) => /* @__PURE__ */ j("li", {
273
+ "aria-label": b("folder.label"),
274
+ children: t.waiting.map((e, t) => /* @__PURE__ */ M("li", {
275
275
  className: "flex min-h-11 items-center gap-2 px-1",
276
276
  "data-ckui": "queue-row",
277
277
  "data-status": "waiting",
278
- children: [/* @__PURE__ */ A(Y, { kind: G(e.type) }), /* @__PURE__ */ j("div", {
278
+ children: [/* @__PURE__ */ j(Y, { kind: G(e.type) }), /* @__PURE__ */ M("div", {
279
279
  className: "grid min-w-0 flex-1 gap-1",
280
- children: [/* @__PURE__ */ A("span", {
280
+ children: [/* @__PURE__ */ j("span", {
281
281
  className: "truncate text-sm",
282
282
  children: e.name
283
- }), /* @__PURE__ */ A("span", {
283
+ }), /* @__PURE__ */ j("span", {
284
284
  className: "text-xs text-muted-foreground",
285
285
  "data-ckui": "queue-status",
286
- children: y("folder.queued")
286
+ children: b("folder.queued")
287
287
  })]
288
288
  })]
289
289
  }, t))
290
290
  }),
291
- C.items.length > 0 && /* @__PURE__ */ A(T, {
292
- items: C.items,
291
+ t.pending.length > 0 && /* @__PURE__ */ j("ul", {
292
+ className: "grid",
293
+ "aria-label": b("folder.label"),
294
+ "data-ckui": "folder-pending",
295
+ children: t.pending.map((e) => /* @__PURE__ */ j(ue, {
296
+ file: e,
297
+ folder: t,
298
+ auto: A,
299
+ disabled: z
300
+ }, e.path))
301
+ }),
302
+ w.items.length > 0 && /* @__PURE__ */ j(E, {
303
+ items: w.items,
293
304
  id: (e) => e.id,
294
305
  name: (e) => e.file.name,
295
- disabled: k || R,
296
- label: y("folder.label"),
297
- onMove: (e, t) => C.move(C.items[e].id, t),
306
+ disabled: A || z,
307
+ label: b("folder.label"),
308
+ onMove: (e, t) => w.move(w.items[e].id, t),
298
309
  row: (e) => ({
299
310
  className: "flex min-h-11 items-center gap-2 px-1",
300
311
  "data-ckui": "queue-row",
301
312
  "data-status": e.status
302
313
  }),
303
- children: (e, n) => /* @__PURE__ */ A(ue, {
314
+ children: (e, n) => /* @__PURE__ */ j(de, {
304
315
  item: e,
305
- handle: k ? null : n,
306
- auto: k,
316
+ handle: A ? null : n,
317
+ auto: A,
307
318
  folder: t
308
319
  })
309
320
  }),
310
- (!k && pe > 0 || k && t.error && pe > 0) && /* @__PURE__ */ j(m, {
321
+ (!A && me > 0 || A && t.error && me > 0) && /* @__PURE__ */ M(m, {
311
322
  className: "w-fit",
312
- disabled: R || !C.ready || t.committing,
323
+ disabled: z || w.items.length > 0 && !w.ready || t.committing,
313
324
  onClick: () => void t.commit().catch(() => {}),
314
325
  "data-ckui": "folder-commit",
315
- children: [t.committing && /* @__PURE__ */ A(W, {
316
- icon: z,
326
+ children: [t.committing && /* @__PURE__ */ j(W, {
327
+ icon: re,
317
328
  strokeWidth: 2,
318
329
  className: "motion-safe:animate-spin"
319
- }), k ? y("folder.commitAgain") : y("folder.commit", { count: C.items.filter((e) => e.status !== "committed").length })]
330
+ }), A ? b("folder.commitAgain") : b("folder.commit", { count: w.items.filter((e) => e.status !== "committed").length + t.pending.length })]
320
331
  }),
321
332
  l,
322
- /* @__PURE__ */ A("input", {
333
+ /* @__PURE__ */ j("input", {
323
334
  ref: J,
324
335
  type: "file",
325
- accept: I,
336
+ accept: L,
326
337
  className: "sr-only",
327
338
  tabIndex: -1,
328
339
  "aria-hidden": !0,
@@ -331,7 +342,7 @@ function J(e) {
331
342
  e.target.value = "", n && X && t.replace(X, n).catch(() => {}), Z(null);
332
343
  }
333
344
  }),
334
- /* @__PURE__ */ A(ee, {
345
+ /* @__PURE__ */ j(_, {
335
346
  open: !!H,
336
347
  onOpenChange: (e) => !e && K.status !== "saving" && U(null),
337
348
  source: "source" in K ? K.source ?? null : null,
@@ -339,9 +350,9 @@ function J(e) {
339
350
  aspects: q?.aspect ? void 0 : u,
340
351
  initialEdit: "edit" in K ? K.edit : null,
341
352
  minWidth: q?.min_width,
342
- title: y("folder.crop"),
353
+ title: b("folder.crop"),
343
354
  busy: K.status === "saving",
344
- error: K.status === "error" ? b(K.error) : void 0,
355
+ error: K.status === "error" ? x(K.error) : void 0,
345
356
  onConfirm: (e) => void K.save(e)
346
357
  })
347
358
  ]
@@ -349,21 +360,21 @@ function J(e) {
349
360
  }
350
361
  function le({ group: e, titled: t, folder: n, disabled: r, selected: i, onSelect: a, renaming: s, onRename: c, onCrop: l, onReplace: u, rowActions: d }) {
351
362
  let { t: f } = o(), p = f(`folder.kinds.${q(e.rule)}`), m = e.rule?.max;
352
- return /* @__PURE__ */ j("section", {
363
+ return /* @__PURE__ */ M("section", {
353
364
  className: "grid gap-1",
354
365
  "data-ckui": "folder-group",
355
366
  "data-path": e.path,
356
- children: [t && /* @__PURE__ */ j("h4", {
367
+ children: [t && /* @__PURE__ */ M("h4", {
357
368
  className: "px-1 text-xs font-medium text-muted-foreground tabular-nums",
358
369
  children: [
359
370
  p,
360
371
  " · ",
361
372
  m ? `${e.files.length} / ${m}` : e.files.length
362
373
  ]
363
- }), /* @__PURE__ */ A(T, {
374
+ }), /* @__PURE__ */ j(E, {
364
375
  items: e.files,
365
376
  id: (e) => e.path,
366
- name: (t) => S(e, t.path),
377
+ name: (t) => C(e, t.path),
367
378
  disabled: r || n.updating,
368
379
  label: p,
369
380
  onMove: (t, r) => void n.move(e.files[t].path, r).catch(() => {}),
@@ -372,7 +383,7 @@ function le({ group: e, titled: t, folder: n, disabled: r, selected: i, onSelect
372
383
  "data-ckui": "upload-row",
373
384
  "data-path": e.path
374
385
  }),
375
- children: (t, o) => /* @__PURE__ */ A(X, {
386
+ children: (t, o) => /* @__PURE__ */ j(X, {
376
387
  file: t,
377
388
  group: e,
378
389
  handle: o,
@@ -390,135 +401,135 @@ function le({ group: e, titled: t, folder: n, disabled: r, selected: i, onSelect
390
401
  });
391
402
  }
392
403
  function Y({ kind: e, url: t, busy: n }) {
393
- return /* @__PURE__ */ j("span", {
404
+ return /* @__PURE__ */ M("span", {
394
405
  className: "relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-muted text-muted-foreground",
395
406
  "data-ckui": "thumb",
396
- children: [t ? /* @__PURE__ */ A("img", {
407
+ children: [t ? /* @__PURE__ */ j("img", {
397
408
  src: t,
398
409
  alt: "",
399
410
  loading: "lazy",
400
411
  decoding: "async",
401
412
  className: "size-full object-cover"
402
- }) : /* @__PURE__ */ A(W, {
413
+ }) : /* @__PURE__ */ j(W, {
403
414
  icon: K[e],
404
415
  strokeWidth: 1.75,
405
416
  className: "size-4.5"
406
- }), n && !t && /* @__PURE__ */ A("span", {
417
+ }), n && !t && /* @__PURE__ */ j("span", {
407
418
  "aria-hidden": !0,
408
419
  className: "absolute inset-1.5 rounded-full border-2 border-current/25 border-t-current motion-safe:animate-spin"
409
420
  })]
410
421
  });
411
422
  }
412
- function X({ file: t, group: r, handle: i, folder: a, disabled: s, selected: c, onSelect: d, renaming: f, onRename: p, onCrop: h, onReplace: g, actions: ee }) {
413
- let { t: _, error: v } = o(), y = G(t.type), b = S(r, t.path), x = u(t), w = D(() => C(a.read.read, t), [a.read.read, t]), T = s || a.updating, E = t.failed ? v(e(t.failed)) : void 0;
414
- return /* @__PURE__ */ j(k, { children: [
423
+ function X({ file: t, group: r, handle: i, folder: a, disabled: s, selected: c, onSelect: d, renaming: f, onRename: p, onCrop: h, onReplace: g, actions: _ }) {
424
+ let { t: v, error: y } = o(), b = G(t.type), x = C(r, t.path), S = u(t), T = O(() => w(a.read.read, t), [a.read.read, t]), E = s || a.updating, D = t.failed ? y(e(t.failed)) : void 0;
425
+ return /* @__PURE__ */ M(A, { children: [
415
426
  i,
416
- /* @__PURE__ */ A("input", {
427
+ /* @__PURE__ */ j("input", {
417
428
  type: "checkbox",
418
429
  className: "size-4 shrink-0 accent-primary",
419
430
  checked: c,
420
431
  disabled: s,
421
- "aria-label": _("folder.select", { name: b }),
432
+ "aria-label": v("folder.select", { name: x }),
422
433
  onChange: (e) => d(e.target.checked)
423
434
  }),
424
- /* @__PURE__ */ A(Y, {
425
- kind: y,
426
- url: w?.url,
427
- busy: x
435
+ /* @__PURE__ */ j(Y, {
436
+ kind: b,
437
+ url: T?.url,
438
+ busy: S
428
439
  }),
429
- /* @__PURE__ */ j("div", {
440
+ /* @__PURE__ */ M("div", {
430
441
  className: "grid min-w-0 flex-1 gap-1",
431
442
  children: [
432
- /* @__PURE__ */ j("div", {
443
+ /* @__PURE__ */ M("div", {
433
444
  className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5",
434
445
  children: [
435
- f ? /* @__PURE__ */ A(Z, {
436
- name: n(b),
437
- label: _("folder.renameLabel", { name: b }),
446
+ f ? /* @__PURE__ */ j(Z, {
447
+ name: n(x),
448
+ label: v("folder.renameLabel", { name: x }),
438
449
  onDone: (e) => e === null ? p(null) : a.rename(t.path, e).then(() => p(null))
439
- }) : /* @__PURE__ */ A("span", {
450
+ }) : /* @__PURE__ */ j("span", {
440
451
  className: "max-w-full truncate text-sm",
441
452
  title: t.path,
442
453
  "data-ckui": "upload-name",
443
- children: b
454
+ children: x
444
455
  }),
445
- t.edit && /* @__PURE__ */ A("span", {
456
+ t.edit && /* @__PURE__ */ j("span", {
446
457
  className: "shrink-0 rounded-sm border border-border px-1.5 text-[11px] text-muted-foreground",
447
458
  "data-ckui": "edited",
448
- children: _("folder.edited")
459
+ children: v("folder.edited")
449
460
  }),
450
- E && /* @__PURE__ */ A("span", {
461
+ D && /* @__PURE__ */ j("span", {
451
462
  className: "shrink-0 rounded-sm bg-destructive/10 px-1.5 text-[11px] font-medium text-destructive",
452
- title: E,
463
+ title: D,
453
464
  "data-ckui": "failed",
454
- children: _(y === "video" ? "folder.failedVideo" : "folder.failed")
465
+ children: v(b === "video" ? "folder.failedVideo" : "folder.failed")
455
466
  })
456
467
  ]
457
468
  }),
458
- E && /* @__PURE__ */ A("p", {
469
+ D && /* @__PURE__ */ j("p", {
459
470
  className: "text-xs text-destructive",
460
- children: E
471
+ children: D
461
472
  }),
462
- x && y === "video" && /* @__PURE__ */ A(l, {
473
+ S && b === "video" && /* @__PURE__ */ j(l, {
463
474
  progress: t.progress,
464
475
  className: "max-w-sm text-xs"
465
476
  }),
466
- x && y !== "video" && /* @__PURE__ */ A("span", {
477
+ S && b !== "video" && /* @__PURE__ */ j("span", {
467
478
  className: "text-xs text-muted-foreground",
468
- children: _("folder.processing")
479
+ children: v("folder.processing")
469
480
  })
470
481
  ]
471
482
  }),
472
- /* @__PURE__ */ j("span", {
483
+ /* @__PURE__ */ M("span", {
473
484
  className: "flex shrink-0 items-center gap-0.5",
474
485
  "data-ckui": "upload-actions",
475
486
  children: [
476
- ee,
477
- y === "image" && /* @__PURE__ */ A(m, {
487
+ _,
488
+ b === "image" && /* @__PURE__ */ j(m, {
478
489
  variant: "ghost",
479
490
  size: "icon-sm",
480
- "aria-label": _("folder.crop"),
481
- title: _("folder.crop"),
482
- disabled: T || !!t.staged || !t.size,
491
+ "aria-label": v("folder.crop"),
492
+ title: v("folder.crop"),
493
+ disabled: E || !!t.staged || !t.size,
483
494
  onClick: () => h(t.path),
484
- children: /* @__PURE__ */ A(W, {
485
- icon: P,
495
+ children: /* @__PURE__ */ j(W, {
496
+ icon: F,
486
497
  strokeWidth: 2
487
498
  })
488
499
  }),
489
- !r.rule?.named && /* @__PURE__ */ A(m, {
500
+ !r.rule?.named && /* @__PURE__ */ j(m, {
490
501
  variant: "ghost",
491
502
  size: "icon-sm",
492
- "aria-label": _("common.rename"),
493
- title: _("common.rename"),
494
- disabled: T,
503
+ "aria-label": v("common.rename"),
504
+ title: v("common.rename"),
505
+ disabled: E,
495
506
  onClick: () => p(t.path),
496
- children: /* @__PURE__ */ A(W, {
497
- icon: I,
507
+ children: /* @__PURE__ */ j(W, {
508
+ icon: L,
498
509
  strokeWidth: 2
499
510
  })
500
511
  }),
501
- /* @__PURE__ */ A(m, {
512
+ /* @__PURE__ */ j(m, {
502
513
  variant: "ghost",
503
514
  size: "icon-sm",
504
- "aria-label": _("common.replace"),
505
- title: _("common.replace"),
506
- disabled: T,
515
+ "aria-label": v("common.replace"),
516
+ title: v("common.replace"),
517
+ disabled: E,
507
518
  onClick: () => g(t.path),
508
- children: /* @__PURE__ */ A(W, {
519
+ children: /* @__PURE__ */ j(W, {
509
520
  icon: H,
510
521
  strokeWidth: 2
511
522
  })
512
523
  }),
513
- /* @__PURE__ */ A(m, {
524
+ /* @__PURE__ */ j(m, {
514
525
  variant: "ghost",
515
526
  size: "icon-sm",
516
- "aria-label": _("common.remove"),
517
- title: _("common.remove"),
518
- disabled: T,
527
+ "aria-label": v("common.remove"),
528
+ title: v("common.remove"),
529
+ disabled: E,
519
530
  onClick: () => void a.remove([t.path]).catch(() => {}),
520
- children: /* @__PURE__ */ A(W, {
521
- icon: F,
531
+ children: /* @__PURE__ */ j(W, {
532
+ icon: I,
522
533
  strokeWidth: 2
523
534
  })
524
535
  })
@@ -527,10 +538,10 @@ function X({ file: t, group: r, handle: i, folder: a, disabled: s, selected: c,
527
538
  ] });
528
539
  }
529
540
  function Z({ name: e, label: t, onDone: n }) {
530
- let [r, i] = O(e), a = ne(!1), o = (t) => {
541
+ let [r, i] = k(e), a = te(!1), o = (t) => {
531
542
  a.current || (a.current = !0, Promise.resolve(n(t && t.trim() && t.trim() !== e ? t.trim() : null)).catch(() => a.current = !1));
532
543
  };
533
- return /* @__PURE__ */ A("input", {
544
+ return /* @__PURE__ */ j("input", {
534
545
  autoFocus: !0,
535
546
  "aria-label": t,
536
547
  value: r,
@@ -543,6 +554,45 @@ function Z({ name: e, label: t, onDone: n }) {
543
554
  "data-ckui": "rename"
544
555
  });
545
556
  }
557
+ function ue({ file: t, folder: n, auto: r, disabled: i }) {
558
+ let { t: a, error: s } = o(), c = G(t.type), l = u(t), d = O(() => w(n.read.read, t), [n.read.read, t]), f = t.failed ? s(e(t.failed)) : l ? t.progress && t.progress.phase !== "queued" ? a("folder.processingPercent", { percent: Math.round(t.progress.percent) }) : a("folder.processing") : a(r ? "folder.adding" : "folder.notAdded");
559
+ return /* @__PURE__ */ M("li", {
560
+ className: "flex min-h-11 items-center gap-2 px-1",
561
+ "data-ckui": "pending-row",
562
+ "data-path": t.path,
563
+ children: [
564
+ /* @__PURE__ */ j(Y, {
565
+ kind: c,
566
+ url: d?.url,
567
+ busy: l
568
+ }),
569
+ /* @__PURE__ */ M("div", {
570
+ className: "grid min-w-0 flex-1 gap-1",
571
+ children: [/* @__PURE__ */ j("span", {
572
+ className: "truncate text-sm",
573
+ title: t.path,
574
+ children: t.path.slice(t.path.lastIndexOf("/") + 1)
575
+ }), /* @__PURE__ */ j("span", {
576
+ className: N("text-xs", t.failed ? "text-destructive" : "text-muted-foreground"),
577
+ "data-ckui": "queue-status",
578
+ children: f
579
+ })]
580
+ }),
581
+ /* @__PURE__ */ j(m, {
582
+ variant: "ghost",
583
+ size: "icon-sm",
584
+ "aria-label": a("common.remove"),
585
+ title: a("common.remove"),
586
+ disabled: i || n.updating,
587
+ onClick: () => void n.remove([t.path]).catch(() => {}),
588
+ children: /* @__PURE__ */ j(W, {
589
+ icon: I,
590
+ strokeWidth: 2
591
+ })
592
+ })
593
+ ]
594
+ });
595
+ }
546
596
  function Q(t, n, r, i) {
547
597
  if (r.status === "failed") return n(r.error);
548
598
  if (r.status === "uploading") return h(t, r.progress);
@@ -552,54 +602,54 @@ function Q(t, n, r, i) {
552
602
  }
553
603
  return r.status === "committed" ? t("folder.adding") : t("folder.queued");
554
604
  }
555
- function ue({ item: e, handle: t, auto: n, folder: r }) {
605
+ function de({ item: e, handle: t, auto: n, folder: r }) {
556
606
  let { t: i, error: a } = o(), { queue: s } = r, l = G(e.file.type), u = Q(i, a, e, n), d = e.status === "uploading" ? g(e.progress) : e.unattached && !e.processed && e.processing?.progress ? e.processing.progress.percent : null;
557
- return /* @__PURE__ */ j(k, { children: [
607
+ return /* @__PURE__ */ M(A, { children: [
558
608
  t,
559
- /* @__PURE__ */ A(Y, {
609
+ /* @__PURE__ */ j(Y, {
560
610
  kind: l,
561
611
  busy: e.status === "uploading" || !!e.unattached && !e.processed
562
612
  }),
563
- /* @__PURE__ */ j("div", {
613
+ /* @__PURE__ */ M("div", {
564
614
  className: "grid min-w-0 flex-1 gap-1",
565
615
  children: [
566
- /* @__PURE__ */ A("span", {
616
+ /* @__PURE__ */ j("span", {
567
617
  className: "truncate text-sm",
568
618
  title: e.path,
569
619
  children: e.file.name
570
620
  }),
571
- d !== null && /* @__PURE__ */ A(c, {
621
+ d !== null && /* @__PURE__ */ j(c, {
572
622
  value: d,
573
623
  "aria-label": u,
574
624
  className: "max-w-sm"
575
625
  }),
576
- /* @__PURE__ */ A("span", {
577
- className: M("text-xs", e.status === "failed" ? "text-destructive" : "text-muted-foreground"),
626
+ /* @__PURE__ */ j("span", {
627
+ className: N("text-xs", e.status === "failed" ? "text-destructive" : "text-muted-foreground"),
578
628
  "data-ckui": "queue-status",
579
629
  children: u
580
630
  })
581
631
  ]
582
632
  }),
583
- /* @__PURE__ */ j("span", {
633
+ /* @__PURE__ */ M("span", {
584
634
  className: "flex shrink-0 items-center gap-0.5",
585
- children: [e.status === "failed" && /* @__PURE__ */ A(m, {
635
+ children: [e.status === "failed" && /* @__PURE__ */ j(m, {
586
636
  variant: "ghost",
587
637
  size: "icon-sm",
588
638
  "aria-label": i("common.retry"),
589
639
  title: i("common.retry"),
590
640
  onClick: () => s.retry(e.id),
591
- children: /* @__PURE__ */ A(W, {
641
+ children: /* @__PURE__ */ j(W, {
592
642
  icon: V,
593
643
  strokeWidth: 2
594
644
  })
595
- }), /* @__PURE__ */ A(m, {
645
+ }), /* @__PURE__ */ j(m, {
596
646
  variant: "ghost",
597
647
  size: "icon-sm",
598
648
  "aria-label": i("common.remove"),
599
649
  title: i("common.remove"),
600
650
  onClick: () => s.remove(e.id),
601
- children: /* @__PURE__ */ A(W, {
602
- icon: F,
651
+ children: /* @__PURE__ */ j(W, {
652
+ icon: I,
603
653
  strokeWidth: 2
604
654
  })
605
655
  })]