@hiai-gg/docsmint 0.3.7 → 0.3.8

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 (196) hide show
  1. package/backend/src/lib/logger.ts +45 -15
  2. package/dist/backend/index.js +238 -150
  3. package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
  4. package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
  5. package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
  6. package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
  7. package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
  8. package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
  9. package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
  10. package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
  11. package/dist/frontend/Icon-CooFj4Ee.js +64 -0
  12. package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
  13. package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
  14. package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
  15. package/dist/frontend/camera-iKXDOOWT.js +29 -0
  16. package/dist/frontend/check-D-UuvBuh.js +25 -0
  17. package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
  18. package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
  19. package/dist/frontend/clock-DJHbHZb8.js +29 -0
  20. package/dist/frontend/{bundle-mjs-CP6Owz-8.js → clsx-C7bIvsDS.js} +16 -1
  21. package/dist/frontend/components/category-dialog.js +1 -1
  22. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  23. package/dist/frontend/components/delete-dialog.js +1 -1
  24. package/dist/frontend/components/editor/document-editor.js +1364 -1353
  25. package/dist/frontend/components/editor/document-title.js +25 -25
  26. package/dist/frontend/components/editor/markdown-toggle.js +45 -45
  27. package/dist/frontend/components/folder-node.js +1 -1
  28. package/dist/frontend/components/folder-tree-selector.js +1 -1
  29. package/dist/frontend/components/save-as-dialog.js +169 -151
  30. package/dist/frontend/components/settings.js +1 -1
  31. package/dist/frontend/components/share-dialog.js +1 -1
  32. package/dist/frontend/components/sidebar.js +1161 -1153
  33. package/dist/frontend/components/tag-create-dialog.js +1 -1
  34. package/dist/frontend/components/version-history.js +188 -187
  35. package/dist/frontend/copy-GppwRMjX.js +32 -0
  36. package/dist/frontend/dashboard.js +1188 -1156
  37. package/dist/frontend/dialog-D6NxYVmy.js +213 -0
  38. package/dist/frontend/doc-tabs.js +2 -2
  39. package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
  40. package/dist/frontend/extension.js +8 -8
  41. package/dist/frontend/{floating-layer-anchor-C51M4l6v.js → floating-layer-anchor-CPwucTfd.js} +1414 -1412
  42. package/dist/frontend/folder-DeWhnD7O.js +45 -0
  43. package/dist/frontend/folder-refresh.js +1 -1
  44. package/dist/frontend/input-B5Rak-5G.js +23 -0
  45. package/dist/frontend/keyboard.js +1 -1
  46. package/dist/frontend/{keyboard.svelte-D7H8DihC.js → keyboard.svelte-CApmX0vl.js} +53 -53
  47. package/dist/frontend/label-CW9rxoAb.js +30 -0
  48. package/dist/frontend/{loader-circle-Bk-WFz9g.js → loader-circle-BA6aLO71.js} +86 -85
  49. package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
  50. package/dist/frontend/search.js +680 -654
  51. package/dist/frontend/select-value-sF86Geyh.js +1446 -0
  52. package/dist/frontend/shared-document.js +94 -94
  53. package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
  54. package/dist/frontend/tag-HxRazVN_.js +54 -0
  55. package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
  56. package/dist/frontend/textarea-i1720bE7.js +23 -0
  57. package/dist/frontend/theme.js +1 -1
  58. package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
  59. package/dist/frontend/{utils-C0OW2678.js → utils-CffiyuTo.js} +2 -3
  60. package/dist/frontend/{utils-D8kmM3ub.js → utils-hzdMVeCv.js} +2 -3
  61. package/dist/frontend/utils.js +1 -1
  62. package/dist/frontend/x-CzBsnJ2x.js +25 -0
  63. package/dist/frontend-ssr/api/attachments.js +2 -0
  64. package/dist/frontend-ssr/api/categories.js +2 -0
  65. package/dist/frontend-ssr/api/documents.js +2 -0
  66. package/dist/frontend-ssr/api/folders.js +2 -0
  67. package/dist/frontend-ssr/api/settings.js +2 -0
  68. package/dist/frontend-ssr/api/share.js +2 -0
  69. package/dist/frontend-ssr/api/tags.js +2 -0
  70. package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
  71. package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
  72. package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
  73. package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
  74. package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
  75. package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
  76. package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
  77. package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
  78. package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
  79. package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
  80. package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
  81. package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
  82. package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
  83. package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
  84. package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
  85. package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
  86. package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
  87. package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
  88. package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
  89. package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
  90. package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
  91. package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
  92. package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
  93. package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
  94. package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
  95. package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
  96. package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
  97. package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
  98. package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
  99. package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
  100. package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
  101. package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
  102. package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
  103. package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
  104. package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
  105. package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
  106. package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
  107. package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
  108. package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
  109. package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
  110. package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
  111. package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
  112. package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
  113. package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
  114. package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
  115. package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
  116. package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
  117. package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
  118. package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
  119. package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
  120. package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
  121. package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
  122. package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
  123. package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
  124. package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
  125. package/dist/frontend-ssr/collaboration.js +39 -0
  126. package/dist/frontend-ssr/components/category-dialog.js +2 -0
  127. package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
  128. package/dist/frontend-ssr/components/delete-dialog.js +2 -0
  129. package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
  130. package/dist/frontend-ssr/components/editor/document-title.js +11 -0
  131. package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
  132. package/dist/frontend-ssr/components/editor/extensions.js +2 -0
  133. package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
  134. package/dist/frontend-ssr/components/editor/markdown.js +2 -0
  135. package/dist/frontend-ssr/components/folder-node.js +2 -0
  136. package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
  137. package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
  138. package/dist/frontend-ssr/components/settings.js +2 -0
  139. package/dist/frontend-ssr/components/share-dialog.js +2 -0
  140. package/dist/frontend-ssr/components/sidebar.js +2033 -0
  141. package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
  142. package/dist/frontend-ssr/components/version-history.js +370 -0
  143. package/dist/frontend-ssr/dashboard.js +2542 -0
  144. package/dist/frontend-ssr/doc-tabs.js +23 -0
  145. package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
  146. package/dist/frontend-ssr/extension.js +13 -0
  147. package/dist/frontend-ssr/folder-refresh.js +2 -0
  148. package/dist/frontend-ssr/i18n.js +10 -0
  149. package/dist/frontend-ssr/keyboard.js +2 -0
  150. package/dist/frontend-ssr/offline/identity.js +2 -0
  151. package/dist/frontend-ssr/search.js +332 -0
  152. package/dist/frontend-ssr/shared-document.js +273 -0
  153. package/dist/frontend-ssr/theme.js +9 -0
  154. package/dist/frontend-ssr/types.js +1 -0
  155. package/dist/frontend-ssr/utils/clipboard.js +2 -0
  156. package/dist/frontend-ssr/utils/dndzone.js +2 -0
  157. package/dist/frontend-ssr/utils.js +2 -0
  158. package/package.json +22 -1
  159. package/packages/cli/src/index.ts +1 -1
  160. package/packages/db/src/schema.ts +3 -0
  161. package/packages/mcp-server/src/index.ts +1 -1
  162. package/dist/frontend/CategoryDialog--rIE7FrH.js +0 -580
  163. package/dist/frontend/ConfirmDialog-Cpzyb55f.js +0 -212
  164. package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +0 -216
  165. package/dist/frontend/DatePicker-Byynca7V.js +0 -257
  166. package/dist/frontend/DeleteDialog-ap6nOywZ.js +0 -174
  167. package/dist/frontend/FolderDialog-DmN_trV0.js +0 -247
  168. package/dist/frontend/FolderNode-C4B8a2fd.js +0 -317
  169. package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +0 -100
  170. package/dist/frontend/Icon-DtNo0N1U.js +0 -64
  171. package/dist/frontend/SettingsDialog-2kTaTXAs.js +0 -992
  172. package/dist/frontend/ShareDialog-BBDGNF5n.js +0 -165
  173. package/dist/frontend/TagCreateDialog-DiLZnJo4.js +0 -258
  174. package/dist/frontend/camera-B7dAOd4s.js +0 -28
  175. package/dist/frontend/check-CDwRlG9T.js +0 -24
  176. package/dist/frontend/chevron-down-B7ZrjUmT.js +0 -24
  177. package/dist/frontend/circle-check-CDqeMB2d.js +0 -28
  178. package/dist/frontend/client-Bc5Fzx40.js +0 -2785
  179. package/dist/frontend/clock-Ck5Sn-Zl.js +0 -28
  180. package/dist/frontend/clsx-nmtDPO_P.js +0 -16
  181. package/dist/frontend/copy-CMAA6GP0.js +0 -31
  182. package/dist/frontend/dialog-BDkiG42a.js +0 -213
  183. package/dist/frontend/disclose-version-5I57E3LD.js +0 -3
  184. package/dist/frontend/ellipsis-vertical-BBuPldbW.js +0 -519
  185. package/dist/frontend/folder-TQjKY4yn.js +0 -44
  186. package/dist/frontend/index-client-jobkrWVL.js +0 -86
  187. package/dist/frontend/input-CBI6p4Xl.js +0 -23
  188. package/dist/frontend/label-C-GkhEp4.js +0 -30
  189. package/dist/frontend/rotate-ccw-CleZtJ5D.js +0 -24
  190. package/dist/frontend/select-value-CvrWRkXW.js +0 -1436
  191. package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +0 -65
  192. package/dist/frontend/tag-Dx3SmucJ.js +0 -53
  193. package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +0 -29
  194. package/dist/frontend/textarea-Dfp78XlL.js +0 -23
  195. package/dist/frontend/theme.svelte-CROg1Hi5.js +0 -49
  196. package/dist/frontend/x-DaTdeDXv.js +0 -24
@@ -1,165 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, E as n, I as r, K as i, L as a, M as o, Q as s, T as c, V as l, _t as u, at as d, c as f, ct as p, d as m, dt as h, et as g, ft as _, h as v, j as y, k as b, n as x, q as S, rt as C, tt as w, u as T, w as E, yt as ee } from "./client-Bc5Fzx40.js";
3
- import { Ar as te, Br as ne, Dr as D, Er as O, Fr as re, Ir as ie, Lr as ae, Mr as oe, Nr as se, Or as ce, Pr as le, Rr as ue, Tr as k, Vr as A, Yn as j, Zn as M, ir as N, jr as de, kr as fe, zr as pe } from "./messages-BpYaLbzE.js";
4
- import { t as P } from "./clipboard-Cgzxc0_R.js";
5
- import { n as F } from "./share-Cu7SSJuJ.js";
6
- import { h as I, u as L } from "./keyboard.svelte-D7H8DihC.js";
7
- //#region src/lib/components/ShareDialog.svelte
8
- var me = o("<input type=\"password\" class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/>"), he = o("<button> </button>"), ge = o("<span class=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"> <button class=\"text-muted-foreground hover:text-foreground\">&times;</button></span>"), _e = o("<div class=\"flex flex-wrap gap-1.5\"></div>"), ve = o("<p class=\"text-xs text-destructive\"> </p>"), ye = o("<div class=\"space-y-4\"><div class=\"flex items-center justify-between\"><span class=\"text-sm font-medium\"> </span> <button role=\"switch\"><span></span></button></div> <!> <div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"></div></div> <div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"><input type=\"email\" placeholder=\"guest@email.com\" class=\"flex h-9 flex-1 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/> <button class=\"rounded-md border border-border px-3 py-1.5 text-sm font-medium hover:bg-accent\"> </button></div> <!></div> <!> <button class=\"w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50\"> </button></div>"), R = o("<div class=\"space-y-4\"><p class=\"text-sm text-muted-foreground\"> </p> <div class=\"flex items-center gap-2\"><code class=\"flex-1 truncate rounded-md bg-muted px-3 py-2 text-sm\"> </code> <button class=\"rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90\"> </button></div> <button class=\"w-full rounded-md border border-border px-4 py-2 text-sm font-medium hover:bg-accent\"> </button></div>"), z = o("<div class=\"fixed inset-0 layer-modal flex items-center justify-center\"><button class=\"absolute inset-0 bg-black/50\"></button> <div class=\"relative z-10 w-full max-w-md rounded-lg border border-border bg-background p-6 shadow-lg\" role=\"dialog\" aria-modal=\"true\"><div class=\"mb-4 flex items-center justify-between\"><h2 class=\"text-lg font-semibold\"> </h2> <button class=\"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-foreground\">&#10005;</button></div> <!></div></div>");
9
- function B(r, o) {
10
- _(o, !0);
11
- let B = x(o, "open", 15, !1), V = x(o, "documentId", 3, ""), H = x(o, "documentTitle", 3, ""), be = x(o, "folderId", 3, ""), xe = x(o, "folderName", 3, ""), Se = x(o, "categoryId", 3, ""), Ce = x(o, "categoryName", 3, ""), U = d(!1), W = d(""), G = d("7d"), K = d(""), q = d(w([])), J = d(""), Y = d(!1), X = d(!1), Z = d("");
12
- S(() => (L({
13
- id: "share-dialog-escape",
14
- keys: "escape",
15
- description: "Close share dialog",
16
- scope: "dialog",
17
- enabled: B(),
18
- overrideInput: !0,
19
- handler: () => {
20
- B() && $();
21
- }
22
- }), () => {
23
- I("share-dialog-escape");
24
- }));
25
- function Q() {
26
- let e = l(K).trim();
27
- e?.includes("@") && !l(q).includes(e) && (C(q, [...l(q), e], !0), C(K, ""));
28
- }
29
- function we(e) {
30
- C(q, l(q).filter((t) => t !== e), !0);
31
- }
32
- async function Te() {
33
- C(X, !0), C(Z, "");
34
- try {
35
- let e = await F({
36
- documentId: V() || void 0,
37
- folderId: be() || void 0,
38
- categoryId: Se() || void 0,
39
- password: l(U) ? l(W) : void 0,
40
- expiresIn: l(G),
41
- guestEmails: l(q).length > 0 ? l(q) : void 0
42
- });
43
- C(J, `${window.location.origin}/s/${e.token}`);
44
- } catch (e) {
45
- C(Z, e instanceof Error ? e.message : N(), !0), console.error("ShareDialog: createShareLink failed", e);
46
- } finally {
47
- C(X, !1);
48
- }
49
- }
50
- async function Ee() {
51
- l(J) && (await P(l(J)), C(Y, !0), setTimeout(() => {
52
- C(Y, !1);
53
- }, 2e3));
54
- }
55
- function $() {
56
- B(!1), C(J, ""), C(U, !1), C(W, ""), C(G, "7d"), C(q, [], !0), C(Z, "");
57
- }
58
- var De = y(), Oe = e(De), ke = (e) => {
59
- var r = z(), o = s(r), d = g(o, 2), h = s(d), _ = s(h), y = s(_);
60
- u(_);
61
- var x = g(_, 2);
62
- u(h);
63
- var S = g(h, 2), w = (e) => {
64
- var r = ye(), o = s(r), d = s(o), h = s(d, !0);
65
- u(d);
66
- var _ = g(d, 2), y = s(_);
67
- u(_), u(o);
68
- var x = g(o, 2), S = (e) => {
69
- var n = me();
70
- T(n), i((e) => m(n, "placeholder", e), [() => ie()]), f(n, () => l(W), (e) => C(W, e)), t(e, n);
71
- };
72
- n(x, (e) => {
73
- l(U) && e(S);
74
- });
75
- var w = g(x, 2), D = s(w), O = s(D, !0);
76
- u(D);
77
- var k = g(D, 2);
78
- E(k, 21, () => [
79
- ["1h", se()],
80
- ["1d", oe()],
81
- ["7d", de()],
82
- ["30d", te()],
83
- ["never", le()]
84
- ], c, (e, n) => {
85
- var r = p(() => ee(l(n), 2));
86
- let o = () => l(r)[0], c = () => l(r)[1];
87
- var d = he(), f = s(d, !0);
88
- u(d), i(() => {
89
- v(d, 1, `rounded-md border px-2.5 py-1 text-xs font-medium transition-colors
90
- ${l(G) === o() ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent"}`), b(f, c());
91
- }), a("click", d, () => {
92
- C(G, o(), !0);
93
- }), t(e, d);
94
- }), u(k), u(w);
95
- var A = g(w, 2), j = s(A), M = s(j, !0);
96
- u(j);
97
- var N = g(j, 2), P = s(N);
98
- T(P);
99
- var F = g(P, 2), I = s(F, !0);
100
- u(F), u(N);
101
- var L = g(N, 2), R = (e) => {
102
- var n = _e();
103
- E(n, 21, () => l(q), c, (e, n) => {
104
- var r = ge(), o = s(r), c = g(o);
105
- u(r), i(() => b(o, `${l(n) ?? ""} `)), a("click", c, () => we(l(n))), t(e, r);
106
- }), u(n), t(e, n);
107
- };
108
- n(L, (e) => {
109
- l(q).length > 0 && e(R);
110
- }), u(A);
111
- var z = g(A, 2), B = (e) => {
112
- var n = ve(), r = s(n, !0);
113
- u(n), i(() => b(r, l(Z))), t(e, n);
114
- };
115
- n(z, (e) => {
116
- l(Z) && e(B);
117
- });
118
- var V = g(z, 2), H = s(V, !0);
119
- u(V), u(r), i((e, t, n, r, i, a) => {
120
- b(h, e), v(_, 1, `relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${l(U) ? "bg-primary" : "bg-input"}`), m(_, "aria-checked", l(U)), m(_, "aria-label", t), v(y, 1, `inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${l(U) ? "translate-x-4" : "translate-x-0.5"}`), b(O, n), b(M, r), b(I, i), V.disabled = l(X), b(H, a);
121
- }, [
122
- () => ue(),
123
- () => ae(),
124
- () => re(),
125
- () => fe(),
126
- () => ce(),
127
- () => l(X) ? pe() : ne()
128
- ]), a("click", _, () => {
129
- C(U, !l(U));
130
- }), a("keydown", P, (e) => {
131
- e.key === "Enter" && (e.preventDefault(), Q());
132
- }), f(P, () => l(K), (e) => C(K, e)), a("click", F, Q), a("click", V, Te), t(e, r);
133
- }, N = (e) => {
134
- var n = R(), r = s(n), o = s(r, !0);
135
- u(r);
136
- var c = g(r, 2), d = s(c), f = s(d, !0);
137
- u(d);
138
- var p = g(d, 2), m = s(p, !0);
139
- u(p), u(c);
140
- var h = g(c, 2), _ = s(h, !0);
141
- u(h), u(n), i((e, t, n) => {
142
- b(o, e), b(f, l(J)), b(m, t), b(_, n);
143
- }, [
144
- () => k(),
145
- () => l(Y) ? O() : D(),
146
- () => j()
147
- ]), a("click", p, Ee), a("click", h, $), t(e, n);
148
- };
149
- n(S, (e) => {
150
- l(J) ? e(N, -1) : e(w);
151
- }), u(d), u(r), i((e, t, n) => {
152
- m(o, "aria-label", e), b(y, `${t ?? ""} "${(Ce() || xe() || H()) ?? ""}"`), m(x, "aria-label", n);
153
- }, [
154
- () => M(),
155
- () => A(),
156
- () => M()
157
- ]), a("click", o, $), a("click", x, $), t(e, r);
158
- };
159
- n(Oe, (e) => {
160
- B() && e(ke);
161
- }), t(r, De), h();
162
- }
163
- r(["click", "keydown"]);
164
- //#endregion
165
- export { B as t };
@@ -1,258 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, E as n, F as r, I as i, K as a, L as o, M as s, Q as c, R as l, V as u, _t as d, at as f, ct as p, d as ee, dt as m, et as h, f as te, ft as g, g as _, gt as v, h as ne, k as y, m as b, n as x, q as S, rt as C, tt as w, u as re, w as ie } from "./client-Bc5Fzx40.js";
3
- import { t as ae } from "./loader-circle-Bk-WFz9g.js";
4
- import { a as T, i as oe, n as se, o as E, r as ce, t as le } from "./dialog-BDkiG42a.js";
5
- import { t as D } from "./label-C-GkhEp4.js";
6
- import { $r as O, Qn as k, ei as A, ir as j, nr as M, qn as N, ti as P, tr as ue } from "./messages-BpYaLbzE.js";
7
- import { t as F } from "./utils-C0OW2678.js";
8
- import { t as de } from "./input-CBI6p4Xl.js";
9
- import { c as I, l as L, n as R, r as fe } from "./tags-CtCV0Djo.js";
10
- //#region src/lib/components/TagCreateDialog.svelte
11
- var z = s("<!> <!>", 1), pe = s("<p id=\"tag-name-error\" class=\"text-xs text-destructive\"> </p>"), me = s("<button type=\"button\"></button>"), he = s("<p class=\"text-xs text-destructive\" role=\"alert\"> </p>"), ge = s("<!> ", 1), _e = s("<!> <form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!> <!></div> <div class=\"space-y-2\"><!> <div id=\"tag-color\" class=\"flex flex-wrap gap-2\"><!> <label title=\"Custom color\"><input type=\"color\" class=\"absolute inset-0 h-full w-full cursor-pointer opacity-0\" aria-label=\"Custom color\"/></label></div></div> <!></form> <!>", 1);
12
- function B(i, s) {
13
- g(s, !0);
14
- let B = [
15
- "#ef4444",
16
- "#f97316",
17
- "#f59e0b",
18
- "#eab308",
19
- "#84cc16",
20
- "#22c55e",
21
- "#10b981",
22
- "#06b6d4",
23
- "#3b82f6",
24
- "#8b5cf6",
25
- "#ec4899"
26
- ], V = B[9], H = x(s, "open", 15, !1), U = x(s, "mode", 3, "create"), W = x(s, "tag", 3, null), G = f(""), K = f(w(V)), q = f(null), J = f(null), Y = f(!1), X = p(() => U() === "edit"), ve = p(() => u(X) ? A() : P()), ye = p(() => u(Y) ? N() : u(X) ? M() : k());
27
- function Z() {
28
- C(G, ""), C(K, V, !0), C(q, null), C(J, null), C(Y, !1);
29
- }
30
- function be(e) {
31
- if (!e) {
32
- Z();
33
- return;
34
- }
35
- C(G, e.name, !0), C(K, e.color ?? V, !0), C(q, null), C(J, null), C(Y, !1);
36
- }
37
- function Q() {
38
- H(!1), Z(), s.onClose?.();
39
- }
40
- function xe(e) {
41
- e ? be(W()) : (Z(), H(!1), s.onClose?.());
42
- }
43
- function $(e) {
44
- e.preventDefault(), C(q, null), C(J, null);
45
- let t = u(G).trim();
46
- if (t.length === 0) {
47
- C(q, O(), !0);
48
- return;
49
- }
50
- if (u(X) && W()) {
51
- let e = L.safeParse({
52
- name: t,
53
- color: u(K)
54
- });
55
- if (!e.success) {
56
- let t = e.error.issues[0];
57
- C(q, t?.message ?? j(), !0);
58
- return;
59
- }
60
- Ce(W().id, e.data);
61
- } else {
62
- let e = fe.safeParse({
63
- name: t,
64
- color: u(K)
65
- });
66
- if (!e.success) {
67
- let t = e.error.issues[0];
68
- C(q, t?.message ?? j(), !0);
69
- return;
70
- }
71
- Se(e.data.name, u(K));
72
- }
73
- }
74
- async function Se(e, t) {
75
- C(Y, !0);
76
- try {
77
- let n = await R(e, t);
78
- s.onCreated?.(n), Q();
79
- } catch (e) {
80
- C(J, e instanceof Error ? e.message : j(), !0), console.error("TagCreateDialog: createTag failed", e);
81
- } finally {
82
- C(Y, !1);
83
- }
84
- }
85
- async function Ce(e, t) {
86
- C(Y, !0);
87
- try {
88
- let n = await I(e, t);
89
- s.onUpdated?.(n), Q();
90
- } catch (e) {
91
- C(J, e instanceof Error ? e.message : j(), !0), console.error("TagCreateDialog: updateTag failed", e);
92
- } finally {
93
- C(Y, !1);
94
- }
95
- }
96
- function we(e) {
97
- e.key === "Enter" && !u(Y) && (e.preventDefault(), $(new Event("submit")));
98
- }
99
- S(() => {
100
- H() && U() === "edit" && W() && (C(G, W().name, !0), C(K, W().color ?? V, !0), C(q, null), C(J, null));
101
- }), T(i, {
102
- onOpenChange: xe,
103
- get open() {
104
- return H();
105
- },
106
- set open(e) {
107
- H(e);
108
- },
109
- children: (i, s) => {
110
- var f = _e(), m = e(f);
111
- se(m, {
112
- children: (n, i) => {
113
- var o = z(), s = e(o);
114
- le(s, {
115
- children: (e, n) => {
116
- v();
117
- var i = r();
118
- a(() => y(i, u(ve))), t(e, i);
119
- },
120
- $$slots: { default: !0 }
121
- }), oe(h(s, 2), {
122
- children: (e, n) => {
123
- v();
124
- var i = r();
125
- a((e) => y(i, e), [() => O()]), t(e, i);
126
- },
127
- $$slots: { default: !0 }
128
- }), t(n, o);
129
- },
130
- $$slots: { default: !0 }
131
- });
132
- var g = h(m, 2), x = c(g), S = c(x);
133
- D(S, {
134
- for: "tag-name",
135
- class: "sr-only",
136
- children: (e, n) => {
137
- v();
138
- var i = r();
139
- a((e) => y(i, e), [() => O()]), t(e, i);
140
- },
141
- $$slots: { default: !0 }
142
- });
143
- var w = h(S, 2);
144
- {
145
- let e = p(() => O()), t = p(() => u(q) ? "true" : void 0), n = p(() => u(q) ? "tag-name-error" : void 0);
146
- de(w, {
147
- id: "tag-name",
148
- name: "name",
149
- type: "text",
150
- get placeholder() {
151
- return u(e);
152
- },
153
- maxlength: 50,
154
- required: !0,
155
- get disabled() {
156
- return u(Y);
157
- },
158
- get "aria-invalid"() {
159
- return u(t);
160
- },
161
- get "aria-describedby"() {
162
- return u(n);
163
- },
164
- autocomplete: "off",
165
- onkeydown: we,
166
- get value() {
167
- return u(G);
168
- },
169
- set value(e) {
170
- C(G, e, !0);
171
- }
172
- });
173
- }
174
- var T = h(w, 2), k = (e) => {
175
- var n = pe(), r = c(n, !0);
176
- d(n), a(() => y(r, u(q))), t(e, n);
177
- };
178
- n(T, (e) => {
179
- u(q) && e(k);
180
- }), d(x);
181
- var A = h(x, 2), j = c(A);
182
- D(j, {
183
- for: "tag-color",
184
- class: "text-xs text-muted-foreground",
185
- children: (e, n) => {
186
- v(), t(e, r("Color"));
187
- },
188
- $$slots: { default: !0 }
189
- });
190
- var M = h(j, 2), N = c(M);
191
- ie(N, 16, () => B, (e) => e, (e, n) => {
192
- let r = p(() => u(K) === n);
193
- var i = me();
194
- a((e) => {
195
- ne(i, 1, e), b(i, `background-color: ${n ?? ""};`), ee(i, "aria-label", `Color ${n ?? ""}`), ee(i, "aria-pressed", u(r)), i.disabled = u(Y);
196
- }, [() => _(F("size-6 shrink-0 rounded-full border-2 transition-all", u(r) ? "scale-110 border-foreground" : "border-transparent hover:scale-105"))]), o("click", i, () => C(K, n, !0)), t(e, i);
197
- });
198
- var P = h(N, 2), I = c(P);
199
- re(I), d(P), d(M), d(A);
200
- var L = h(A, 2), R = (e) => {
201
- var n = he(), r = c(n, !0);
202
- d(n), a(() => y(r, u(J))), t(e, n);
203
- };
204
- n(L, (e) => {
205
- u(J) && e(R);
206
- }), d(g), ce(h(g, 2), {
207
- class: "gap-2 max-sm:flex-col max-sm:items-stretch",
208
- children: (i, o) => {
209
- var s = z(), c = e(s);
210
- E(c, {
211
- variant: "outline",
212
- type: "button",
213
- onclick: Q,
214
- get disabled() {
215
- return u(Y);
216
- },
217
- children: (e, n) => {
218
- v();
219
- var i = r();
220
- a((e) => y(i, e), [() => ue()]), t(e, i);
221
- },
222
- $$slots: { default: !0 }
223
- });
224
- var l = h(c, 2);
225
- {
226
- let r = p(() => u(Y) || u(G).trim().length === 0);
227
- E(l, {
228
- type: "submit",
229
- onclick: $,
230
- get disabled() {
231
- return u(r);
232
- },
233
- children: (r, i) => {
234
- var o = ge(), s = e(o), c = (e) => {
235
- ae(e, { class: "mr-1 size-4 animate-spin" });
236
- };
237
- n(s, (e) => {
238
- u(Y) && e(c);
239
- });
240
- var l = h(s);
241
- a(() => y(l, ` ${u(ye) ?? ""}`)), t(r, o);
242
- },
243
- $$slots: { default: !0 }
244
- });
245
- }
246
- t(i, s);
247
- },
248
- $$slots: { default: !0 }
249
- }), a((e) => {
250
- ne(P, 1, e), b(P, `background-color: ${u(K) ?? ""};`), te(I, u(K)), I.disabled = u(Y);
251
- }, [() => _(F("relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-full border-2 transition-all", B.includes(u(K)) ? "border-transparent hover:scale-105" : "scale-110 border-foreground"))]), l("submit", g, $), o("input", I, (e) => C(K, e.currentTarget.value, !0)), t(i, f);
252
- },
253
- $$slots: { default: !0 }
254
- }), m();
255
- }
256
- i(["click", "input"]);
257
- //#endregion
258
- export { B as t };
@@ -1,28 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, S as n, i as r, j as i, t as a } from "./client-Bc5Fzx40.js";
3
- import { t as o } from "./Icon-DtNo0N1U.js";
4
- //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/camera.svelte
5
- function s(s, c) {
6
- let l = a(c, [
7
- "children",
8
- "$$slots",
9
- "$$events",
10
- "$$legacy"
11
- ]), u = [["path", { d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" }], ["circle", {
12
- cx: "12",
13
- cy: "13",
14
- r: "3"
15
- }]];
16
- o(s, r({ name: "camera" }, () => l, {
17
- get iconNode() {
18
- return u;
19
- },
20
- children: (r, a) => {
21
- var o = i();
22
- n(e(o), c, "default", {}, null), t(r, o);
23
- },
24
- $$slots: { default: !0 }
25
- }));
26
- }
27
- //#endregion
28
- export { s as t };
@@ -1,24 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, S as n, i as r, j as i, t as a } from "./client-Bc5Fzx40.js";
3
- import { t as o } from "./Icon-DtNo0N1U.js";
4
- //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/check.svelte
5
- function s(s, c) {
6
- let l = a(c, [
7
- "children",
8
- "$$slots",
9
- "$$events",
10
- "$$legacy"
11
- ]), u = [["path", { d: "M20 6 9 17l-5-5" }]];
12
- o(s, r({ name: "check" }, () => l, {
13
- get iconNode() {
14
- return u;
15
- },
16
- children: (r, a) => {
17
- var o = i();
18
- n(e(o), c, "default", {}, null), t(r, o);
19
- },
20
- $$slots: { default: !0 }
21
- }));
22
- }
23
- //#endregion
24
- export { s as t };
@@ -1,24 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, S as n, i as r, j as i, t as a } from "./client-Bc5Fzx40.js";
3
- import { t as o } from "./Icon-DtNo0N1U.js";
4
- //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/chevron-down.svelte
5
- function s(s, c) {
6
- let l = a(c, [
7
- "children",
8
- "$$slots",
9
- "$$events",
10
- "$$legacy"
11
- ]), u = [["path", { d: "m6 9 6 6 6-6" }]];
12
- o(s, r({ name: "chevron-down" }, () => l, {
13
- get iconNode() {
14
- return u;
15
- },
16
- children: (r, a) => {
17
- var o = i();
18
- n(e(o), c, "default", {}, null), t(r, o);
19
- },
20
- $$slots: { default: !0 }
21
- }));
22
- }
23
- //#endregion
24
- export { s as t };
@@ -1,28 +0,0 @@
1
- import "./disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, S as n, i as r, j as i, t as a } from "./client-Bc5Fzx40.js";
3
- import { t as o } from "./Icon-DtNo0N1U.js";
4
- //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/circle-check.svelte
5
- function s(s, c) {
6
- let l = a(c, [
7
- "children",
8
- "$$slots",
9
- "$$events",
10
- "$$legacy"
11
- ]), u = [["circle", {
12
- cx: "12",
13
- cy: "12",
14
- r: "10"
15
- }], ["path", { d: "m9 12 2 2 4-4" }]];
16
- o(s, r({ name: "circle-check" }, () => l, {
17
- get iconNode() {
18
- return u;
19
- },
20
- children: (r, a) => {
21
- var o = i();
22
- n(e(o), c, "default", {}, null), t(r, o);
23
- },
24
- $$slots: { default: !0 }
25
- }));
26
- }
27
- //#endregion
28
- export { s as t };