@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,62 @@
1
+ import { n as e } from "./client-GbtOH90i.js";
2
+ import { t } from "./auth-client-Cygmp1I2.js";
3
+ //#region src/lib/api/settings.ts
4
+ async function n() {
5
+ try {
6
+ let t = await e("/api/auth/get-session");
7
+ if (t.user?.name || t.user?.email) return t.user;
8
+ } catch {}
9
+ let { data: n } = await t.getSession();
10
+ return n?.user ? {
11
+ id: n.user.id ?? "",
12
+ name: n.user.name ?? "User",
13
+ email: n.user.email ?? "",
14
+ avatar: null
15
+ } : {
16
+ id: "",
17
+ name: "User",
18
+ email: "",
19
+ avatar: null
20
+ };
21
+ }
22
+ async function r(t) {
23
+ return e("/api/auth/update-user", {
24
+ method: "POST",
25
+ body: JSON.stringify({ name: t.name })
26
+ });
27
+ }
28
+ var i = "hiai-docs:embedding-config";
29
+ function a() {
30
+ if (typeof window > "u") return {
31
+ baseUrl: "",
32
+ apiKey: "",
33
+ model: "",
34
+ fallbackBaseUrl: null,
35
+ fallbackApiKey: null,
36
+ fallbackModel: null
37
+ };
38
+ try {
39
+ let e = localStorage.getItem(i);
40
+ if (e) return JSON.parse(e);
41
+ } catch {}
42
+ return {
43
+ baseUrl: "",
44
+ apiKey: "",
45
+ model: "",
46
+ fallbackBaseUrl: null,
47
+ fallbackApiKey: null,
48
+ fallbackModel: null
49
+ };
50
+ }
51
+ function o(e) {
52
+ let t = {
53
+ ...a(),
54
+ ...e
55
+ };
56
+ return localStorage.setItem(i, JSON.stringify(t)), t;
57
+ }
58
+ async function s() {
59
+ await e("/api/auth/delete-user", { method: "POST" });
60
+ }
61
+ //#endregion
62
+ export { r as a, o as i, a as n, n as r, s as t };
@@ -0,0 +1,28 @@
1
+ import { n as e } from "./client-GbtOH90i.js";
2
+ //#region src/lib/api/share.ts
3
+ function t(t) {
4
+ return !t.documentId && !t.folderId && !t.categoryId ? Promise.reject(/* @__PURE__ */ Error("createShareLink: documentId, folderId, or categoryId is required")) : e("/api/share", {
5
+ method: "POST",
6
+ body: JSON.stringify(t)
7
+ });
8
+ }
9
+ function n(t) {
10
+ return e(`/api/share${t?.documentId ? `?documentId=${t.documentId}` : ""}`);
11
+ }
12
+ function r(t) {
13
+ return t ? e(`/api/share/${t}`) : Promise.reject(/* @__PURE__ */ Error("getShareLink: token is required"));
14
+ }
15
+ function i(t) {
16
+ return e(`/api/share/${t}`, { method: "DELETE" });
17
+ }
18
+ function a(t, n) {
19
+ return e(`/api/share/${t}/guests`, {
20
+ method: "POST",
21
+ body: JSON.stringify({ email: n })
22
+ });
23
+ }
24
+ function o(t, n) {
25
+ return e(`/api/share/${t}/guests/${encodeURIComponent(n)}`, { method: "DELETE" });
26
+ }
27
+ //#endregion
28
+ export { o as a, n as i, t as n, i as o, r, a as t };
@@ -1,5 +1,6 @@
1
- import { t as e } from "./context-DbnW5yib.js";
2
- import { $ as t, D as n, H as r, M as i, N as a, S as o, T as s, _t as c, dt as l, et as u, ft as d, j as f, k as p, lt as m, tt as h } from "./client-C6QQGb0e.js";
1
+ import "./disclose-version-5I57E3LD.js";
2
+ import { $ as e, A as t, E as n, M as r, O as i, Q as a, V as o, _t as s, ct as c, dt as l, et as u, ft as d, j as f, w as p, x as m } from "./client-Bc5Fzx40.js";
3
+ import { t as h } from "./context-BMD6XTPe.js";
3
4
  //#region src/lib/components/editor/shared-document.ts
4
5
  var g = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i, _ = /* @__PURE__ */ new Set([
5
6
  "http:",
@@ -161,12 +162,12 @@ function A(e) {
161
162
  }
162
163
  //#endregion
163
164
  //#region src/lib/hosts/DocsmintSharedDocumentHost.svelte
164
- var j = a("<div data-docsmint-shared-document-host=\"\"><div data-extension-zone=\"shared-header-actions\"></div> <!> <div data-extension-zone=\"shared-document-tabs\"></div> <div data-extension-zone=\"shared-document-notes\"></div> <div data-extension-zone=\"shared-document-editor\"><!></div></div>");
165
- function M(a, g) {
165
+ var j = r("<div data-docsmint-shared-document-host=\"\"><div data-extension-zone=\"shared-header-actions\"></div> <!> <div data-extension-zone=\"shared-document-tabs\"></div> <div data-extension-zone=\"shared-document-notes\"></div> <div data-extension-zone=\"shared-document-editor\"><!></div></div>");
166
+ function M(r, g) {
166
167
  d(g, !0);
167
- let _ = e(), v = m(() => A(g.context));
168
+ let _ = h(), v = c(() => A(g.context));
168
169
  function y(e) {
169
- return e.permission === "annotate" ? r(v).permissions.annotate : r(v).permissions.edit;
170
+ return e.permission === "annotate" ? o(v).permissions.annotate : o(v).permissions.edit;
170
171
  }
171
172
  function b(e) {
172
173
  let t = /* @__PURE__ */ new Set();
@@ -174,55 +175,55 @@ function M(a, g) {
174
175
  if (t.has(e.id) || !y(e)) return !1;
175
176
  t.add(e.id);
176
177
  try {
177
- return e.visible?.(r(v)) ?? !0;
178
+ return e.visible?.(o(v)) ?? !0;
178
179
  } catch {
179
180
  return !1;
180
181
  }
181
182
  }).sort((e, t) => (e.order ?? 0) - (t.order ?? 0) || e.id.localeCompare(t.id));
182
183
  }
183
- var x = j(), S = t(x);
184
- s(S, 21, () => b(_.sharedDocumentHeaderActions), (e) => e.id, (e, t) => {
185
- var n = i();
186
- o(u(n), () => r(t).component, (e, t) => {
184
+ var x = j(), S = a(x);
185
+ p(S, 21, () => b(_.sharedDocumentHeaderActions), (e) => e.id, (n, r) => {
186
+ var i = f();
187
+ m(e(i), () => o(r).component, (e, t) => {
187
188
  t(e, { get context() {
188
- return r(v);
189
+ return o(v);
189
190
  } });
190
- }), f(e, n);
191
- }), c(S);
192
- var C = h(S, 2);
193
- p(C, () => g.children);
194
- var w = h(C, 2);
195
- s(w, 21, () => b(_.sharedDocumentTabs), (e) => e.id, (e, t) => {
196
- var n = i();
197
- o(u(n), () => r(t).component, (e, t) => {
191
+ }), t(n, i);
192
+ }), s(S);
193
+ var C = u(S, 2);
194
+ i(C, () => g.children);
195
+ var w = u(C, 2);
196
+ p(w, 21, () => b(_.sharedDocumentTabs), (e) => e.id, (n, r) => {
197
+ var i = f();
198
+ m(e(i), () => o(r).component, (e, t) => {
198
199
  t(e, { get context() {
199
- return r(v);
200
+ return o(v);
200
201
  } });
201
- }), f(e, n);
202
- }), c(w);
203
- var T = h(w, 2);
204
- s(T, 21, () => b(_.sharedDocumentNotesModes), (e) => e.id, (e, t) => {
205
- var n = i();
206
- o(u(n), () => r(t).component, (e, t) => {
202
+ }), t(n, i);
203
+ }), s(w);
204
+ var T = u(w, 2);
205
+ p(T, 21, () => b(_.sharedDocumentNotesModes), (e) => e.id, (n, r) => {
206
+ var i = f();
207
+ m(e(i), () => o(r).component, (e, t) => {
207
208
  t(e, { get context() {
208
- return r(v);
209
+ return o(v);
209
210
  } });
210
- }), f(e, n);
211
- }), c(T);
212
- var E = h(T, 2), D = t(E), O = (e) => {
213
- var t = i();
214
- s(u(t), 17, () => b(_.sharedDocumentEditorModes), (e) => e.id, (e, t) => {
215
- var n = i();
216
- o(u(n), () => r(t).component, (e, t) => {
211
+ }), t(n, i);
212
+ }), s(T);
213
+ var E = u(T, 2), D = a(E), O = (n) => {
214
+ var r = f();
215
+ p(e(r), 17, () => b(_.sharedDocumentEditorModes), (e) => e.id, (n, r) => {
216
+ var i = f();
217
+ m(e(i), () => o(r).component, (e, t) => {
217
218
  t(e, { get context() {
218
- return r(v);
219
+ return o(v);
219
220
  } });
220
- }), f(e, n);
221
- }), f(e, t);
221
+ }), t(n, i);
222
+ }), t(n, r);
222
223
  };
223
224
  n(D, (e) => {
224
- r(v).permissions.edit && e(O);
225
- }), c(E), c(x), f(a, x), l();
225
+ o(v).permissions.edit && e(O);
226
+ }), s(E), s(x), t(r, x), l();
226
227
  }
227
228
  //#endregion
228
229
  export { M as DocsmintSharedDocumentHost, E as hydrateSharedAttachmentImages, w as markMarkdownTaskItems, C as renderSharedDocument, T as sharedAttachmentHeaders, D as waitForSharedDocumentImages };
@@ -0,0 +1,65 @@
1
+ import { V as e, at as t, ot as n, rt as r, st as i, tt as a } from "./client-Bc5Fzx40.js";
2
+ //#region src/lib/stores/subfolders-refresh-store.svelte.ts
3
+ var o = a({}), s = a({}), c = a({}), l = t(0), u = t(null), d = a({}), f = t(0);
4
+ function p() {
5
+ n(f);
6
+ }
7
+ function m() {
8
+ return e(f);
9
+ }
10
+ function h(e) {
11
+ o[e] = (o[e] ?? 0) + 1;
12
+ }
13
+ function g(e) {
14
+ return o[e] ?? 0;
15
+ }
16
+ function _(e, t, n, r) {
17
+ s[e] = {
18
+ parentId: t,
19
+ categoryId: n,
20
+ order: r
21
+ };
22
+ }
23
+ function v(e) {
24
+ return s[e];
25
+ }
26
+ function y(e, t, n) {
27
+ c[e] = {
28
+ folderId: t,
29
+ categoryId: n
30
+ };
31
+ }
32
+ function b(e, t, n) {
33
+ y(e, t, n);
34
+ let a = i(l);
35
+ return r(u, {
36
+ id: e,
37
+ folderId: t,
38
+ categoryId: n,
39
+ version: a
40
+ }, !0), d[e] = {
41
+ folderId: t,
42
+ categoryId: n,
43
+ version: a
44
+ }, a;
45
+ }
46
+ function x(e, t) {
47
+ d[e]?.version === t && delete d[e];
48
+ }
49
+ function S(e) {
50
+ delete d[e];
51
+ }
52
+ function C(e) {
53
+ return d[e];
54
+ }
55
+ function w() {
56
+ return e(l);
57
+ }
58
+ function T() {
59
+ return e(u);
60
+ }
61
+ function E(e) {
62
+ return c[e];
63
+ }
64
+ //#endregion
65
+ export { v as a, C as c, p as d, y as f, w as i, g as l, S as m, h as n, m as o, _ as p, E as r, T as s, x as t, b as u };
@@ -1,6 +1,6 @@
1
- import "./context-DbnW5yib.js";
2
- import { C as e, M as t, et as n, i as r, j as i, t as a } from "./client-C6QQGb0e.js";
3
- import { r as o } from "./resolve-Bl6xmJl_.js";
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
4
  //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/search.svelte
5
5
  function s(s, c) {
6
6
  let l = a(c, [
@@ -18,8 +18,8 @@ function s(s, c) {
18
18
  return u;
19
19
  },
20
20
  children: (r, a) => {
21
- var o = t();
22
- e(n(o), c, "default", {}, null), i(r, o);
21
+ var o = i();
22
+ n(e(o), c, "default", {}, null), t(r, o);
23
23
  },
24
24
  $$slots: { default: !0 }
25
25
  }));
@@ -43,8 +43,8 @@ function c(s, c) {
43
43
  return u;
44
44
  },
45
45
  children: (r, a) => {
46
- var o = t();
47
- e(n(o), c, "default", {}, null), i(r, o);
46
+ var o = i();
47
+ n(e(o), c, "default", {}, null), t(r, o);
48
48
  },
49
49
  $$slots: { default: !0 }
50
50
  }));
@@ -0,0 +1,29 @@
1
+ import { V as e, at as t, ot as n, rt as r } from "./client-Bc5Fzx40.js";
2
+ import { t as i } from "./documents-BsDkvzCm.js";
3
+ //#region src/lib/stores/tag-store.svelte.ts
4
+ var a = t(0);
5
+ function o() {
6
+ n(a);
7
+ }
8
+ function s() {
9
+ return e(a);
10
+ }
11
+ var c = t(0);
12
+ function l() {
13
+ i(), n(c);
14
+ }
15
+ function u() {
16
+ return e(c);
17
+ }
18
+ var d = t(null), f = t(null);
19
+ function p(e, t = null) {
20
+ r(d, e, !0), r(f, e ? t : null, !0);
21
+ }
22
+ function m() {
23
+ return e(d);
24
+ }
25
+ function h() {
26
+ return e(f);
27
+ }
28
+ //#endregion
29
+ export { l as a, s as i, m as n, o, h as r, p as s, u as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./client-B9hzI0W8.js";
1
+ import { n as e } from "./client-GbtOH90i.js";
2
2
  import { a as t, i as n } from "./schemas-DwtKylCJ.js";
3
3
  //#region src/lib/api/tags.ts
4
4
  var r = n({
@@ -0,0 +1,23 @@
1
+ import "./disclose-version-5I57E3LD.js";
2
+ import { A as e, M as t, Y as n, c as r, dt as i, ft as a, l as o, n as s, o as c, r as l } from "./client-Bc5Fzx40.js";
3
+ import { t as u } from "./utils-D8kmM3ub.js";
4
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/textarea/textarea.svelte
5
+ var d = /* @__PURE__ */ new Set([
6
+ "$$slots",
7
+ "$$events",
8
+ "$$legacy",
9
+ "ref",
10
+ "class",
11
+ "value"
12
+ ]), f = t("<textarea></textarea>");
13
+ function p(t, p) {
14
+ a(p, !0);
15
+ let m = s(p, "ref", 15, null), h = s(p, "value", 15, ""), g = l(p, d);
16
+ var _ = f();
17
+ n(_), o(_, (e) => ({
18
+ class: e,
19
+ ...g
20
+ }), [() => u("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", p.class)]), c(_, (e) => m(e), () => m()), r(_, h), e(t, _), i();
21
+ }
22
+ //#endregion
23
+ export { p as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./theme.svelte-ei0QxXa8.js";
1
+ import { t as e } from "./theme.svelte-CROg1Hi5.js";
2
2
  //#region ../packages/sdk/frontend-entries/theme.ts
3
3
  var t = e, n = e.set;
4
4
  function r() {
@@ -1,4 +1,4 @@
1
- import { H as e, it as t, ot as n } from "./client-C6QQGb0e.js";
1
+ import { V as e, at as t, rt as n } from "./client-Bc5Fzx40.js";
2
2
  import { browser as r } from "$app/environment";
3
3
  //#region src/lib/stores/theme.svelte.ts
4
4
  var i = "hiai-docs-theme", a = /* @__PURE__ */ new Set();
@@ -23,17 +23,17 @@ function l(e) {
23
23
  function u() {
24
24
  for (let e of a) e();
25
25
  }
26
- var d = n("system"), f = n(!1), p = !1;
26
+ var d = t("system"), f = t(!1), p = !1;
27
27
  function m() {
28
28
  if (!r || p) return;
29
- p = !0, t(d, o(), !0), t(f, c(e(d)), !0), l(e(d));
30
- let n = window.matchMedia("(prefers-color-scheme: dark)");
31
- n.addEventListener("change", () => {
32
- e(d) === "system" && (t(f, n.matches, !0), l("system"), u());
29
+ p = !0, n(d, o(), !0), n(f, c(e(d)), !0), l(e(d));
30
+ let t = window.matchMedia("(prefers-color-scheme: dark)");
31
+ t.addEventListener("change", () => {
32
+ e(d) === "system" && (n(f, t.matches, !0), l("system"), u());
33
33
  });
34
34
  }
35
35
  function h(e) {
36
- t(d, e, !0), r && localStorage.setItem(i, e), t(f, c(e), !0), l(e), u();
36
+ n(d, e, !0), r && localStorage.setItem(i, e), n(f, c(e), !0), l(e), u();
37
37
  }
38
38
  var g = {
39
39
  get value() {
@@ -0,0 +1,6 @@
1
+ export interface Document { id: string; title: string; content?: string; folderId: string | null; folderName: string; categoryId?: string | null; tags: string[]; createdAt: string; updatedAt: string; excerpt: string; }
2
+ export interface Folder { id: string; name: string; parentId: string | null; categoryId?: string | null; order: number; documentCount: number; subfolderCount: number; children: Folder[]; documents: Document[]; createdAt: string; updatedAt: string; }
3
+ export interface Tag { id: string; name: string; color: string; }
4
+ export type ViewMode = "grid" | "list";
5
+ export type SortOption = "name" | "updated" | "created";
6
+ export type SortDirection = "asc" | "desc";
File without changes
@@ -0,0 +1 @@
1
+ export declare function copyToClipboard(text: string): Promise<boolean>;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../clipboard-Cgzxc0_R.js";
2
+ export { e as copyToClipboard };
@@ -0,0 +1,4 @@
1
+ import type { ActionReturn } from "svelte/action";
2
+ import type { DndEvent, DndZoneAttributes, Item, Options } from "svelte-dnd-action";
3
+ export type { DndEvent, Item, Options };
4
+ export declare function dndzone<T extends Item>(node: HTMLElement, options: Options<T>): ActionReturn<Options<T>, DndZoneAttributes<T>>;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../dndzone-BzsOINtP.js";
2
+ export { e as dndzone };
@@ -0,0 +1,20 @@
1
+ import { t as e } from "./clsx-nmtDPO_P.js";
2
+ import { n as t } from "./bundle-mjs-CP6Owz-8.js";
3
+ //#region src/lib/utils.ts
4
+ function n(...n) {
5
+ return t(e(n));
6
+ }
7
+ function r(e) {
8
+ let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 1e3);
9
+ if (n < 60) return "just now";
10
+ let r = Math.floor(n / 60);
11
+ if (r < 60) return `${r}m ago`;
12
+ let i = Math.floor(r / 60);
13
+ if (i < 24) return `${i}h ago`;
14
+ let a = Math.floor(i / 24);
15
+ if (a < 30) return `${a}d ago`;
16
+ let o = Math.floor(a / 30);
17
+ return o < 12 ? `${o}mo ago` : `${Math.floor(o / 12)}y ago`;
18
+ }
19
+ //#endregion
20
+ export { r as n, n as t };
@@ -0,0 +1,8 @@
1
+ import { t as e } from "./clsx-nmtDPO_P.js";
2
+ import { n as t } from "./bundle-mjs-CP6Owz-8.js";
3
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/lib/utils.js
4
+ function n(...n) {
5
+ return t(e(n));
6
+ }
7
+ //#endregion
8
+ export { n as t };
@@ -0,0 +1,4 @@
1
+ import type { ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ export type WithElementRef<T> = T & { ref?: Element | null };
4
+ export declare function formatRelativeTime(isoDate: string): string;
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./utils-C0OW2678.js";
2
+ export { t as cn, e as formatRelativeTime };
@@ -0,0 +1,24 @@
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/x.svelte
5
+ function s(s, c) {
6
+ let l = a(c, [
7
+ "children",
8
+ "$$slots",
9
+ "$$events",
10
+ "$$legacy"
11
+ ]), u = [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]];
12
+ o(s, r({ name: "x" }, () => 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiai-gg/docsmint",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "type": "module",
5
5
  "browser": {
6
6
  "./dist/backend-launcher.js": false,
@@ -110,6 +110,86 @@
110
110
  "import": "./dist/frontend/api/settings.js",
111
111
  "types": "./dist/frontend/api/settings.d.ts"
112
112
  },
113
+ "./frontend/api/attachments": {
114
+ "import": "./dist/frontend/api/attachments.js",
115
+ "types": "./dist/frontend/api/attachments.d.ts"
116
+ },
117
+ "./frontend/collaboration": {
118
+ "import": "./dist/frontend/collaboration.js",
119
+ "types": "./dist/frontend/collaboration.d.ts"
120
+ },
121
+ "./frontend/components/create-snapshot-dialog": {
122
+ "import": "./dist/frontend/components/create-snapshot-dialog.js",
123
+ "types": "./dist/frontend/components/create-snapshot-dialog.d.ts"
124
+ },
125
+ "./frontend/components/delete-dialog": {
126
+ "import": "./dist/frontend/components/delete-dialog.js",
127
+ "types": "./dist/frontend/components/delete-dialog.d.ts"
128
+ },
129
+ "./frontend/components/category-dialog": {
130
+ "import": "./dist/frontend/components/category-dialog.js",
131
+ "types": "./dist/frontend/components/category-dialog.d.ts"
132
+ },
133
+ "./frontend/components/folder-node": {
134
+ "import": "./dist/frontend/components/folder-node.js",
135
+ "types": "./dist/frontend/components/folder-node.d.ts"
136
+ },
137
+ "./frontend/document-drop-coordinator": {
138
+ "import": "./dist/frontend/document-drop-coordinator.js",
139
+ "types": "./dist/frontend/document-drop-coordinator.d.ts"
140
+ },
141
+ "./frontend/offline/identity": {
142
+ "import": "./dist/frontend/offline/identity.js",
143
+ "types": "./dist/frontend/offline/identity.d.ts"
144
+ },
145
+ "./frontend/doc-tabs": {
146
+ "import": "./dist/frontend/doc-tabs.js",
147
+ "types": "./dist/frontend/doc-tabs.d.ts"
148
+ },
149
+ "./frontend/components/editor/document-editor": {
150
+ "import": "./dist/frontend/components/editor/document-editor.js",
151
+ "types": "./dist/frontend/components/editor/document-editor.d.ts"
152
+ },
153
+ "./frontend/components/folder-tree-selector": {
154
+ "import": "./dist/frontend/components/folder-tree-selector.js",
155
+ "types": "./dist/frontend/components/folder-tree-selector.d.ts"
156
+ },
157
+ "./frontend/components/save-as-dialog": {
158
+ "import": "./dist/frontend/components/save-as-dialog.js",
159
+ "types": "./dist/frontend/components/save-as-dialog.d.ts"
160
+ },
161
+ "./frontend/components/share-dialog": {
162
+ "import": "./dist/frontend/components/share-dialog.js",
163
+ "types": "./dist/frontend/components/share-dialog.d.ts"
164
+ },
165
+ "./frontend/components/tag-create-dialog": {
166
+ "import": "./dist/frontend/components/tag-create-dialog.js",
167
+ "types": "./dist/frontend/components/tag-create-dialog.d.ts"
168
+ },
169
+ "./frontend/components/version-history": {
170
+ "import": "./dist/frontend/components/version-history.js",
171
+ "types": "./dist/frontend/components/version-history.d.ts"
172
+ },
173
+ "./frontend/components/editor/document-title": {
174
+ "import": "./dist/frontend/components/editor/document-title.js",
175
+ "types": "./dist/frontend/components/editor/document-title.d.ts"
176
+ },
177
+ "./frontend/components/editor/markdown-toggle": {
178
+ "import": "./dist/frontend/components/editor/markdown-toggle.js",
179
+ "types": "./dist/frontend/components/editor/markdown-toggle.d.ts"
180
+ },
181
+ "./frontend/components/editor/extensions": {
182
+ "import": "./dist/frontend/components/editor/extensions.js",
183
+ "types": "./dist/frontend/components/editor/extensions.d.ts"
184
+ },
185
+ "./frontend/components/editor/markdown": {
186
+ "import": "./dist/frontend/components/editor/markdown.js",
187
+ "types": "./dist/frontend/components/editor/markdown.d.ts"
188
+ },
189
+ "./frontend/components/editor/docx-serializer": {
190
+ "import": "./dist/frontend/components/editor/docx-serializer.js",
191
+ "types": "./dist/frontend/components/editor/docx-serializer.d.ts"
192
+ },
113
193
  "./frontend/components/sidebar": {
114
194
  "import": "./dist/frontend/components/sidebar.js",
115
195
  "types": "./dist/frontend/components/sidebar.d.ts"
@@ -118,6 +198,34 @@
118
198
  "import": "./dist/frontend/components/settings.js",
119
199
  "types": "./dist/frontend/components/settings.d.ts"
120
200
  },
201
+ "./frontend/types": {
202
+ "import": "./dist/frontend/types.js",
203
+ "types": "./dist/frontend/types.d.ts"
204
+ },
205
+ "./frontend/keyboard": {
206
+ "import": "./dist/frontend/keyboard.js",
207
+ "types": "./dist/frontend/keyboard.d.ts"
208
+ },
209
+ "./frontend/folder-refresh": {
210
+ "import": "./dist/frontend/folder-refresh.js",
211
+ "types": "./dist/frontend/folder-refresh.d.ts"
212
+ },
213
+ "./frontend/utils": {
214
+ "import": "./dist/frontend/utils.js",
215
+ "types": "./dist/frontend/utils.d.ts"
216
+ },
217
+ "./frontend/utils/clipboard": {
218
+ "import": "./dist/frontend/utils/clipboard.js",
219
+ "types": "./dist/frontend/utils/clipboard.d.ts"
220
+ },
221
+ "./frontend/utils/dndzone": {
222
+ "import": "./dist/frontend/utils/dndzone.js",
223
+ "types": "./dist/frontend/utils/dndzone.d.ts"
224
+ },
225
+ "./frontend/api/share": {
226
+ "import": "./dist/frontend/api/share.js",
227
+ "types": "./dist/frontend/api/share.d.ts"
228
+ },
121
229
  "./frontend/theme": {
122
230
  "import": "./dist/frontend/theme.js",
123
231
  "types": "./dist/frontend/theme.d.ts"
@@ -24,7 +24,7 @@ import { registerSearch } from "./commands/search.js";
24
24
  import { registerSnapshot } from "./commands/snapshot.js";
25
25
  import { registerUpdate } from "./commands/update.js";
26
26
 
27
- const VERSION = "0.3.6";
27
+ const VERSION = "0.3.7";
28
28
 
29
29
  const program = new Command();
30
30
  program
@@ -35,7 +35,7 @@ interface McpToolResult {
35
35
 
36
36
  const server = new McpServer({
37
37
  name: "hiai-docs",
38
- version: "0.3.6",
38
+ version: "0.3.7",
39
39
  });
40
40
 
41
41
  /**