@hiai-gg/docsmint 0.3.6 → 0.3.7

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 (141) hide show
  1. package/dist/backend/index.js +1 -1
  2. package/dist/frontend/CategoryDialog--rIE7FrH.js +580 -0
  3. package/dist/frontend/ConfirmDialog-Cpzyb55f.js +212 -0
  4. package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +216 -0
  5. package/dist/frontend/DatePicker-Byynca7V.js +257 -0
  6. package/dist/frontend/DeleteDialog-ap6nOywZ.js +174 -0
  7. package/dist/frontend/FolderDialog-DmN_trV0.js +247 -0
  8. package/dist/frontend/FolderNode-C4B8a2fd.js +317 -0
  9. package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +100 -0
  10. package/dist/frontend/Icon-DtNo0N1U.js +64 -0
  11. package/dist/frontend/SettingsDialog-2kTaTXAs.js +992 -0
  12. package/dist/frontend/ShareDialog-BBDGNF5n.js +165 -0
  13. package/dist/frontend/TagCreateDialog-DiLZnJo4.js +258 -0
  14. package/dist/frontend/api/attachments.d.ts +6 -0
  15. package/dist/frontend/api/attachments.js +2 -0
  16. package/dist/frontend/api/categories.js +1 -1
  17. package/dist/frontend/api/documents.js +1 -1
  18. package/dist/frontend/api/folders.js +1 -1
  19. package/dist/frontend/api/settings.js +1 -1
  20. package/dist/frontend/api/share.d.ts +5 -0
  21. package/dist/frontend/api/share.js +2 -0
  22. package/dist/frontend/api/tags.js +1 -1
  23. package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
  24. package/dist/frontend/attachments-BuILSs56.js +50 -0
  25. package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
  26. package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
  27. package/dist/frontend/bundle-mjs-CP6Owz-8.js +1723 -0
  28. package/dist/frontend/camera-B7dAOd4s.js +28 -0
  29. package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
  30. package/dist/frontend/check-CDwRlG9T.js +24 -0
  31. package/dist/frontend/chevron-down-B7ZrjUmT.js +24 -0
  32. package/dist/frontend/circle-check-CDqeMB2d.js +28 -0
  33. package/dist/frontend/{client-C6QQGb0e.js → client-Bc5Fzx40.js} +833 -814
  34. package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
  35. package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
  36. package/dist/frontend/clock-Ck5Sn-Zl.js +28 -0
  37. package/dist/frontend/clsx-nmtDPO_P.js +16 -0
  38. package/dist/frontend/collaboration.d.ts +6 -0
  39. package/dist/frontend/collaboration.js +182 -0
  40. package/dist/frontend/components/category-dialog.d.ts +2 -0
  41. package/dist/frontend/components/category-dialog.js +2 -0
  42. package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
  43. package/dist/frontend/components/create-snapshot-dialog.js +2 -0
  44. package/dist/frontend/components/delete-dialog.d.ts +2 -0
  45. package/dist/frontend/components/delete-dialog.js +2 -0
  46. package/dist/frontend/components/editor/document-editor.d.ts +3 -0
  47. package/dist/frontend/components/editor/document-editor.js +3021 -0
  48. package/dist/frontend/components/editor/document-title.d.ts +2 -0
  49. package/dist/frontend/components/editor/document-title.js +31 -0
  50. package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
  51. package/dist/frontend/components/editor/docx-serializer.js +14600 -0
  52. package/dist/frontend/components/editor/extensions.d.ts +2 -0
  53. package/dist/frontend/components/editor/extensions.js +2 -0
  54. package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
  55. package/dist/frontend/components/editor/markdown-toggle.js +72 -0
  56. package/dist/frontend/components/editor/markdown.d.ts +1 -0
  57. package/dist/frontend/components/editor/markdown.js +2 -0
  58. package/dist/frontend/components/folder-node.d.ts +3 -0
  59. package/dist/frontend/components/folder-node.js +2 -0
  60. package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
  61. package/dist/frontend/components/folder-tree-selector.js +2 -0
  62. package/dist/frontend/components/save-as-dialog.d.ts +2 -0
  63. package/dist/frontend/components/save-as-dialog.js +254 -0
  64. package/dist/frontend/components/settings.js +1 -1
  65. package/dist/frontend/components/share-dialog.d.ts +2 -0
  66. package/dist/frontend/components/share-dialog.js +2 -0
  67. package/dist/frontend/components/sidebar.js +1206 -3762
  68. package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
  69. package/dist/frontend/components/tag-create-dialog.js +2 -0
  70. package/dist/frontend/components/version-history.d.ts +2 -0
  71. package/dist/frontend/components/version-history.js +293 -0
  72. package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
  73. package/dist/frontend/copy-CMAA6GP0.js +31 -0
  74. package/dist/frontend/dashboard.js +1148 -1224
  75. package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
  76. package/dist/frontend/dialog-BDkiG42a.js +213 -0
  77. package/dist/frontend/disclose-version-5I57E3LD.js +3 -0
  78. package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
  79. package/dist/frontend/doc-tabs.d.ts +7 -0
  80. package/dist/frontend/doc-tabs.js +14 -0
  81. package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
  82. package/dist/frontend/document-drop-coordinator.d.ts +2 -0
  83. package/dist/frontend/document-drop-coordinator.js +2 -0
  84. package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
  85. package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
  86. package/dist/frontend/ellipsis-vertical-BBuPldbW.js +519 -0
  87. package/dist/frontend/extension.js +6 -5
  88. package/dist/frontend/floating-layer-anchor-C51M4l6v.js +4513 -0
  89. package/dist/frontend/folder-TQjKY4yn.js +44 -0
  90. package/dist/frontend/folder-refresh.d.ts +8 -0
  91. package/dist/frontend/folder-refresh.js +2 -0
  92. package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
  93. package/dist/frontend/frontend.css +1 -1
  94. package/dist/frontend/i18n.js +1 -1
  95. package/dist/frontend/identity-DyWeNzu_.js +69 -0
  96. package/dist/frontend/index-client-jobkrWVL.js +86 -0
  97. package/dist/frontend/input-CBI6p4Xl.js +23 -0
  98. package/dist/frontend/keyboard.d.ts +14 -0
  99. package/dist/frontend/keyboard.js +2 -0
  100. package/dist/frontend/keyboard.svelte-D7H8DihC.js +133 -0
  101. package/dist/frontend/label-C-GkhEp4.js +30 -0
  102. package/dist/frontend/loader-circle-Bk-WFz9g.js +267 -0
  103. package/dist/frontend/markdown-BwnyjITU.js +11 -0
  104. package/dist/frontend/messages-BpYaLbzE.js +1091 -0
  105. package/dist/frontend/offline/identity.d.ts +6 -0
  106. package/dist/frontend/offline/identity.js +2 -0
  107. package/dist/frontend/resolve-BG4HgzpN.js +19 -0
  108. package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
  109. package/dist/frontend/rotate-ccw-CleZtJ5D.js +24 -0
  110. package/dist/frontend/search.js +637 -628
  111. package/dist/frontend/select-value-CvrWRkXW.js +1436 -0
  112. package/dist/frontend/settings-blyobazp.js +62 -0
  113. package/dist/frontend/share-Cu7SSJuJ.js +28 -0
  114. package/dist/frontend/shared-document.js +41 -40
  115. package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +65 -0
  116. package/dist/frontend/{tag-C5xrg-bb.js → tag-Dx3SmucJ.js} +7 -7
  117. package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +29 -0
  118. package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
  119. package/dist/frontend/textarea-Dfp78XlL.js +23 -0
  120. package/dist/frontend/theme.js +1 -1
  121. package/dist/frontend/{theme.svelte-ei0QxXa8.js → theme.svelte-CROg1Hi5.js} +7 -7
  122. package/dist/frontend/types.d.ts +6 -0
  123. package/dist/frontend/types.js +0 -0
  124. package/dist/frontend/utils/clipboard.d.ts +1 -0
  125. package/dist/frontend/utils/clipboard.js +2 -0
  126. package/dist/frontend/utils/dndzone.d.ts +4 -0
  127. package/dist/frontend/utils/dndzone.js +2 -0
  128. package/dist/frontend/utils-C0OW2678.js +20 -0
  129. package/dist/frontend/utils-D8kmM3ub.js +8 -0
  130. package/dist/frontend/utils.d.ts +4 -0
  131. package/dist/frontend/utils.js +2 -0
  132. package/dist/frontend/x-DaTdeDXv.js +24 -0
  133. package/package.json +109 -1
  134. package/packages/cli/src/index.ts +1 -1
  135. package/packages/mcp-server/src/index.ts +1 -1
  136. package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
  137. package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
  138. package/dist/frontend/input-ieWIt8I7.js +0 -257
  139. package/dist/frontend/messages-CTGAsqFu.js +0 -1106
  140. package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
  141. package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
@@ -0,0 +1,165 @@
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 };
@@ -0,0 +1,258 @@
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 };
@@ -0,0 +1,6 @@
1
+ export interface Attachment { id: string; filename: string; mimeType: string; size: number; url: string; }
2
+ export interface AttachmentListResponse { items: Attachment[]; }
3
+ export declare function uploadAttachment(documentId: string, file: File): Promise<Attachment>;
4
+ export declare function listAttachments(documentId: string): Promise<AttachmentListResponse>;
5
+ export declare function isImageFile(file: File): boolean;
6
+ export declare function isFileSizeAllowed(file: File): boolean;
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../attachments-BuILSs56.js";
2
+ export { a as confirmAttachment, n as isFileSizeAllowed, i as isImageFile, t as listAttachments, e as presignAttachment, r as uploadAttachment };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../categories-BE6ZpZl8.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../categories-izQovv2w.js";
2
2
  export { s as createCategory, r as createCategoryInputSchema, a as deleteCategory, n as listCategories, e as setDocumentCategory, i as setFolderCategory, o as updateCategory, t as updateCategoryInputSchema };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../documents-DFVS9SsL.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../documents-BsDkvzCm.js";
2
2
  export { s as clearDocumentsCache, r as createDocument, a as deleteDocument, n as getDocument, e as importDocument, i as importDocuments, o as listDocuments, t as updateDocument };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../folders-CGe9diAG.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../folders-CTuV_JtU.js";
2
2
  export { s as createFolder, r as deleteDocument, a as deleteFolder, n as duplicateDocument, e as getFolder, i as getFolderPath, o as listFolders, t as updateFolder };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "../settings-PCrOtied.js";
1
+ import { a as e, i as t, n, r, t as i } from "../settings-blyobazp.js";
2
2
  export { i as deleteAccount, n as getEmbeddingConfig, r as getProfile, t as updateEmbeddingConfig, e as updateProfile };
@@ -0,0 +1,5 @@
1
+ export interface ShareLink { id: string; token: string; documentId?: string; folderId?: string; categoryId?: string; hasPassword: boolean; expiresAt?: string | null; createdAt: string; title?: string; type?: "document" | "folder" | "category"; guestEmails: string[]; }
2
+ export interface CreateShareLinkInput { documentId?: string; folderId?: string; categoryId?: string; password?: string; expiresIn?: "1h" | "1d" | "7d" | "30d" | "never"; guestEmails?: string[]; }
3
+ export declare function createShareLink(data: CreateShareLinkInput): Promise<ShareLink>;
4
+ export declare function listShareLinks(params?: { documentId?: string }): Promise<{ links: ShareLink[] }>;
5
+ export declare function revokeShareLink(id: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../share-Cu7SSJuJ.js";
2
+ export { a as addGuest, n as createShareLink, i as getShareLink, t as listShareLinks, e as removeGuest, r as revokeShareLink };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../tags-DVXTut0p.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../tags-CtCV0Djo.js";
2
2
  export { c as addTagToDocument, i as createTag, o as createTagInputSchema, n as deleteTag, e as getTag, a as listTags, s as removeTagFromDocument, t as updateTag, r as updateTagInputSchema };
@@ -0,0 +1,35 @@
1
+ import { n as e } from "./client-GbtOH90i.js";
2
+ //#region src/lib/api/api-keys.ts
3
+ function t() {
4
+ return e("/api/keys");
5
+ }
6
+ function n(t) {
7
+ return e("/api/keys/global", {
8
+ method: "POST",
9
+ body: { name: t }
10
+ });
11
+ }
12
+ function r(t, n) {
13
+ return e(`/api/categories/${encodeURIComponent(t)}/keys`, {
14
+ method: "POST",
15
+ body: { name: n }
16
+ });
17
+ }
18
+ function i(t) {
19
+ return e(`/api/keys/${encodeURIComponent(t)}`, { method: "DELETE" });
20
+ }
21
+ async function a(t) {
22
+ return (await e(`/api/keys/${encodeURIComponent(t)}/secret`)).key;
23
+ }
24
+ function o(e) {
25
+ for (let t of e) {
26
+ let e = /^category:([0-9a-f-]{36}):(read|edit|write)$/i.exec(t);
27
+ if (e?.[1]) return e[1];
28
+ }
29
+ return null;
30
+ }
31
+ function s(e, t) {
32
+ return t ?? e.prefix;
33
+ }
34
+ //#endregion
35
+ export { t as a, n as i, o as n, a as o, r, i as s, s as t };
@@ -0,0 +1,50 @@
1
+ import { n as e } from "./client-GbtOH90i.js";
2
+ //#region src/lib/api/attachments.ts
3
+ var t = 25 * 1024 * 1024;
4
+ function n(t, n) {
5
+ return e(`/api/documents/${t}/attachments/presign`, {
6
+ method: "POST",
7
+ body: {
8
+ filename: n.name,
9
+ contentType: n.type,
10
+ size: n.size
11
+ }
12
+ });
13
+ }
14
+ function r(t, n, r) {
15
+ return e(`/api/documents/${t}/attachments/confirm`, {
16
+ method: "POST",
17
+ body: {
18
+ key: n,
19
+ filename: r.name,
20
+ contentType: r.type,
21
+ size: r.size
22
+ }
23
+ });
24
+ }
25
+ async function i(e, t) {
26
+ let i = await n(e, t), a = new AbortController(), o = setTimeout(() => a.abort(), 5 * 6e4), s;
27
+ try {
28
+ s = await fetch(i.url, {
29
+ method: "PUT",
30
+ body: t,
31
+ headers: { "Content-Type": t.type },
32
+ signal: a.signal
33
+ });
34
+ } finally {
35
+ clearTimeout(o);
36
+ }
37
+ if (!s.ok) throw Error(`Storage upload failed: ${s.status} ${s.statusText}`);
38
+ return r(e, i.key, t);
39
+ }
40
+ function a(t) {
41
+ return e(`/api/documents/${t}/attachments`);
42
+ }
43
+ function o(e) {
44
+ return e.type.startsWith("image/");
45
+ }
46
+ function s(e) {
47
+ return e.size <= t;
48
+ }
49
+ //#endregion
50
+ export { n as a, a as i, s as n, i as o, o as r, r as t };