@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,31 +1,31 @@
1
- import "../../disclose-version-5I57E3LD.js";
2
- import { A as e, I as t, K as n, L as r, M as i, R as a, V as o, at as s, c, d as l, dt as u, ft as d, h as f, n as p, q as m, rt as h, u as g } from "../../client-Bc5Fzx40.js";
3
- import { Ai as _, ki as v } from "../../messages-BpYaLbzE.js";
1
+ import { Ai as e, ki as t } from "../../messages-BpYaLbzE.js";
2
+ import "svelte/internal/disclose-version";
3
+ import * as n from "svelte/internal/client";
4
4
  //#region src/lib/components/editor/DocumentTitle.svelte
5
- var y = i("<input type=\"text\"/>");
6
- function b(t, i) {
7
- d(i, !0);
8
- let b = p(i, "title", 3, ""), x = p(i, "onUpdate", 3, (e) => {}), S = s(!1), C = s("");
9
- m(() => {
10
- o(S) || h(C, b() ?? "", !0);
11
- }), m(() => {
12
- o(S) || h(C, b());
5
+ var r = n.from_html("<input type=\"text\"/>");
6
+ function i(i, a) {
7
+ n.push(a, !0);
8
+ let o = n.prop(a, "title", 3, ""), s = n.prop(a, "onUpdate", 3, (e) => {}), c = n.state(!1), l = n.state("");
9
+ n.user_effect(() => {
10
+ n.get(c) || n.set(l, o() ?? "", !0);
11
+ }), n.user_effect(() => {
12
+ n.get(c) || n.set(l, o());
13
13
  });
14
- function w() {
15
- h(S, !1), o(C) !== b() && x()(o(C));
14
+ function u() {
15
+ n.set(c, !1), n.get(l) !== o() && s()(n.get(l));
16
16
  }
17
- function T() {
18
- h(S, !0);
17
+ function d() {
18
+ n.set(c, !0);
19
19
  }
20
- var E = y();
21
- g(E);
22
- let D;
23
- n((e, t) => {
24
- D = f(E, 1, "title-input svelte-vc365t", null, D, { focused: o(S) }), l(E, "placeholder", e), l(E, "aria-label", t);
25
- }, [() => _(), () => v()]), a("focus", E, T), a("blur", E, w), r("keydown", E, (e) => {
26
- e.key === "Enter" && (e.preventDefault(), e.target.blur()), e.key === "Escape" && (h(C, b()), e.target.blur());
27
- }), c(E, () => o(C), (e) => h(C, e)), e(t, E), u();
20
+ var f = r();
21
+ n.remove_input_defaults(f);
22
+ let p;
23
+ n.template_effect((e, t) => {
24
+ p = n.set_class(f, 1, "title-input svelte-vc365t", null, p, { focused: n.get(c) }), n.set_attribute(f, "placeholder", e), n.set_attribute(f, "aria-label", t);
25
+ }, [() => e(), () => t()]), n.event("focus", f, d), n.event("blur", f, u), n.delegated("keydown", f, (e) => {
26
+ e.key === "Enter" && (e.preventDefault(), e.target.blur()), e.key === "Escape" && (n.set(l, o()), e.target.blur());
27
+ }), n.bind_value(f, () => n.get(l), (e) => n.set(l, e)), n.append(i, f), n.pop();
28
28
  }
29
- t(["keydown"]);
29
+ n.delegate(["keydown"]);
30
30
  //#endregion
31
- export { b as DocumentTitle };
31
+ export { i as DocumentTitle };
@@ -1,72 +1,72 @@
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, V as c, Y as l, _t as u, at as d, d as f, dt as p, et as m, f as h, ft as g, gt as _, n as v, o as y, q as b, rt as x } from "../../client-Bc5Fzx40.js";
3
- import { t as S } from "../../check-CDwRlG9T.js";
4
- import { t as C } from "../../copy-CMAA6GP0.js";
5
- import { dn as w, fn as T } from "../../messages-BpYaLbzE.js";
6
- import { t as E } from "../../markdown-BwnyjITU.js";
1
+ import { t as e } from "../../check-D-UuvBuh.js";
2
+ import { t } from "../../copy-GppwRMjX.js";
3
+ import { dn as n, fn as r } from "../../messages-BpYaLbzE.js";
4
+ import { t as i } from "../../markdown-BwnyjITU.js";
5
+ import "svelte/internal/disclose-version";
6
+ import * as a from "svelte/internal/client";
7
7
  //#region src/lib/components/editor/MarkdownToggle.svelte
8
- var D = o("<!> <span>Copied!</span>", 1), O = o("<!> <span>Copy Raw</span>", 1), k = o("<div class=\"markdown-toggle svelte-1k98zvf\"><button type=\"button\" class=\"copy-btn svelte-1k98zvf\" aria-label=\"Copy markdown\" title=\"Copy markdown content\"><!></button> <textarea class=\"markdown-textarea svelte-1k98zvf\" spellcheck=\"false\"></textarea></div>");
9
- function A(r, o) {
10
- g(o, !0);
11
- let A = v(o, "content", 3, ""), j = v(o, "onUpdate", 3, (e) => {}), M = d(!1), N = d(null), P = d(null), F = 0;
12
- function I() {
13
- if (c(P)) {
14
- if (F === 0) {
15
- let e = c(P).closest(".editor-container")?.clientHeight ?? 0;
16
- F = Math.max(c(N)?.clientHeight ?? 0, e);
8
+ var o = a.from_html("<!> <span>Copied!</span>", 1), s = a.from_html("<!> <span>Copy Raw</span>", 1), c = a.from_html("<div class=\"markdown-toggle svelte-1k98zvf\"><button type=\"button\" class=\"copy-btn svelte-1k98zvf\" aria-label=\"Copy markdown\" title=\"Copy markdown content\"><!></button> <textarea class=\"markdown-textarea svelte-1k98zvf\" spellcheck=\"false\"></textarea></div>");
9
+ function l(l, u) {
10
+ a.push(u, !0);
11
+ let d = a.prop(u, "content", 3, ""), f = a.prop(u, "onUpdate", 3, (e) => {}), p = a.state(!1), m = a.state(null), h = a.state(null), g = 0;
12
+ function _() {
13
+ if (a.get(h)) {
14
+ if (g === 0) {
15
+ let e = a.get(h).closest(".editor-container")?.clientHeight ?? 0;
16
+ g = Math.max(a.get(m)?.clientHeight ?? 0, e);
17
17
  }
18
- c(P).style.minHeight = `${F}px`, c(P).style.height = "auto", c(P).style.height = `${Math.max(F, c(P).scrollHeight)}px`;
18
+ a.get(h).style.minHeight = `${g}px`, a.get(h).style.height = "auto", a.get(h).style.height = `${Math.max(g, a.get(h).scrollHeight)}px`;
19
19
  }
20
20
  }
21
- b(() => {
22
- A(), typeof window < "u" && queueMicrotask(I);
21
+ a.user_effect(() => {
22
+ d(), typeof window < "u" && queueMicrotask(_);
23
23
  });
24
- function L(e) {
25
- let t = E(e);
26
- j()({
24
+ function v(e) {
25
+ let t = i(e);
26
+ f()({
27
27
  markdown: e,
28
28
  json: t
29
29
  });
30
30
  }
31
- function R(e) {
31
+ function y(e) {
32
32
  let t = e.target;
33
- I(), L(t.value);
33
+ _(), v(t.value);
34
34
  }
35
- function z() {
36
- A() && navigator.clipboard.writeText(A()).then(() => {
37
- x(M, !0), setTimeout(() => {
38
- x(M, !1);
35
+ function b() {
36
+ d() && navigator.clipboard.writeText(d()).then(() => {
37
+ a.set(p, !0), setTimeout(() => {
38
+ a.set(p, !1);
39
39
  }, 2e3);
40
40
  });
41
41
  }
42
- var B = k(), V = s(B), H = s(V), U = (n) => {
43
- var r = D();
44
- S(e(r), {
42
+ var x = c(), S = a.child(x), C = a.child(S), w = (t) => {
43
+ var n = o();
44
+ e(a.first_child(n), {
45
45
  size: 14,
46
46
  class: "text-emerald-500"
47
- }), _(2), t(n, r);
48
- }, W = (n) => {
49
- var r = O();
50
- C(e(r), { size: 14 }), _(2), t(n, r);
47
+ }), a.next(2), a.append(t, n);
48
+ }, T = (e) => {
49
+ var n = s();
50
+ t(a.first_child(n), { size: 14 }), a.next(2), a.append(e, n);
51
51
  };
52
- n(H, (e) => {
53
- c(M) ? e(U) : e(W, -1);
54
- }), u(V);
55
- var G = m(V, 2);
56
- l(G), y(G, (e) => x(P, e), () => c(P)), u(B), y(B, (e) => x(N, e), () => c(N)), i((e, t) => {
57
- h(G, A()), f(G, "placeholder", e), f(G, "aria-label", t);
58
- }, [() => T(), () => w()]), a("click", V, z), a("input", G, R), a("keydown", G, (e) => {
52
+ a.if(C, (e) => {
53
+ a.get(p) ? e(w) : e(T, -1);
54
+ }), a.reset(S);
55
+ var E = a.sibling(S, 2);
56
+ a.remove_textarea_child(E), a.bind_this(E, (e) => a.set(h, e), () => a.get(h)), a.reset(x), a.bind_this(x, (e) => a.set(m, e), () => a.get(m)), a.template_effect((e, t) => {
57
+ a.set_value(E, d()), a.set_attribute(E, "placeholder", e), a.set_attribute(E, "aria-label", t);
58
+ }, [() => r(), () => n()]), a.delegated("click", S, b), a.delegated("input", E, y), a.delegated("keydown", E, (e) => {
59
59
  if (e.key === "Tab") {
60
60
  e.preventDefault();
61
61
  let t = e.target, n = t.selectionStart, r = t.selectionEnd;
62
- t.value = `${t.value.substring(0, n)}\t${t.value.substring(r)}`, t.selectionStart = t.selectionEnd = n + 1, L(t.value);
62
+ t.value = `${t.value.substring(0, n)}\t${t.value.substring(r)}`, t.selectionStart = t.selectionEnd = n + 1, v(t.value);
63
63
  }
64
- }), t(r, B), p();
64
+ }), a.append(l, x), a.pop();
65
65
  }
66
- r([
66
+ a.delegate([
67
67
  "click",
68
68
  "input",
69
69
  "keydown"
70
70
  ]);
71
71
  //#endregion
72
- export { A as MarkdownToggle };
72
+ export { l as MarkdownToggle };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../FolderNode-C4B8a2fd.js";
1
+ import { t as e } from "../FolderNode-C2zG7uii.js";
2
2
  export { e as FolderNode };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../FolderTreeSelector-D6ijiZTA.js";
1
+ import { t as e } from "../FolderTreeSelector-CyB8y2Sm.js";
2
2
  export { e as FolderTreeSelector };
@@ -1,254 +1,272 @@
1
- import "../disclose-version-5I57E3LD.js";
2
- import { $ as e, A as t, E as n, F as r, K as i, M as a, Q as o, R as s, V as c, _t as l, at as u, c as ee, ct as d, dt as f, et as p, ft as m, gt as h, j as te, k as g, n as _, q as v, rt as y, tt as b, u as ne, w as re, x } from "../client-Bc5Fzx40.js";
3
- import { t as S } from "../loader-circle-Bk-WFz9g.js";
4
- import { a as C, i as w, n as T, o as E, r as ie, t as D } from "../dialog-BDkiG42a.js";
5
- import { a as O, i as k, n as ae, r as oe, t as se } from "../select-value-CvrWRkXW.js";
6
- import { t as A } from "../label-C-GkhEp4.js";
7
- import { t as ce } from "../chevron-down-B7ZrjUmT.js";
8
- import { t as le } from "../FolderTreeSelector-D6ijiZTA.js";
9
- import { s as ue } from "../folders-CTuV_JtU.js";
10
- import { nr as de, tr as j } from "../messages-BpYaLbzE.js";
11
- import { i as M } from "../categories-izQovv2w.js";
12
- import { d as N } from "../subfolders-refresh-store.svelte-BsheoQma.js";
1
+ import { t as e } from "../loader-circle-BA6aLO71.js";
2
+ import { a as t, i as n, n as r, o as i, r as a, t as o } from "../dialog-D6NxYVmy.js";
3
+ import { a as s, i as c, n as l, r as u, t as d } from "../select-value-sF86Geyh.js";
4
+ import { t as f } from "../label-CW9rxoAb.js";
5
+ import { t as p } from "../chevron-down-CiPtYyFh.js";
6
+ import { t as m } from "../FolderTreeSelector-CyB8y2Sm.js";
7
+ import { s as h } from "../folders-CTuV_JtU.js";
8
+ import { nr as g, tr as _ } from "../messages-BpYaLbzE.js";
9
+ import { i as v } from "../categories-izQovv2w.js";
10
+ import { d as y } from "../subfolders-refresh-store.svelte-B2dKVmgz.js";
11
+ import "svelte/internal/disclose-version";
12
+ import * as b from "svelte/internal/client";
13
13
  //#region src/lib/components/SaveAsDialog.svelte
14
- var P = a("<!> <!>", 1), F = a("<div class=\"flex items-center justify-center py-6\"><!></div>"), I = a("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), L = a("<form class=\"space-y-4 py-2\"><!> <div class=\"space-y-2\"><!> <input id=\"save-as-title\" type=\"text\" placeholder=\"Enter new document title\" required=\"\" class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\"/></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div></form>"), R = a("<!> ", 1), z = a("<!> <!> <!>", 1);
15
- function B(a, B) {
16
- m(B, !0);
17
- let V = {
18
- Root: O,
19
- Content: k,
20
- Item: oe,
21
- Trigger: ae,
22
- Value: se
23
- }, H = _(B, "open", 15, !1), U = _(B, "initialTitle", 3, ""), fe = _(B, "initialParentId", 3, null), pe = _(B, "initialCategoryId", 3, null), W = u(b([])), G = u(b([])), K = u(!1), q = u(!1), J = u(null), Y = u(""), X = u(null), Z = u(void 0);
24
- v(() => {
25
- H() && (y(Y, U() ? `${U()} (Copy)` : "Untitled (Copy)", !0), y(X, fe()), y(Z, pe() || "null", !0), y(J, null), me());
14
+ var x = b.from_html("<!> <!>", 1), S = b.from_html("<div class=\"flex items-center justify-center py-6\"><!></div>"), C = b.from_html("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), w = b.from_html("<form class=\"space-y-4 py-2\"><!> <div class=\"space-y-2\"><!> <input id=\"save-as-title\" type=\"text\" placeholder=\"Enter new document title\" required=\"\" class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\"/></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div></form>"), T = b.from_html("<!> ", 1), E = b.from_html("<!> <!> <!>", 1);
15
+ function D(D, O) {
16
+ b.push(O, !0);
17
+ let k = {
18
+ Root: s,
19
+ Content: c,
20
+ Item: u,
21
+ Trigger: l,
22
+ Value: d
23
+ }, A = b.prop(O, "open", 15, !1), j = b.prop(O, "initialTitle", 3, ""), M = b.prop(O, "initialParentId", 3, null), N = b.prop(O, "initialCategoryId", 3, null), P = b.state(b.proxy([])), F = b.state(b.proxy([])), I = b.state(!1), L = b.state(!1), R = b.state(null), z = b.state(""), B = b.state(null), V = b.state(void 0);
24
+ b.user_effect(() => {
25
+ A() && (b.set(z, j() ? `${j()} (Copy)` : "Untitled (Copy)", !0), b.set(B, M()), b.set(V, N() || "null", !0), b.set(R, null), H());
26
26
  });
27
- async function me() {
28
- y(K, !0);
27
+ async function H() {
28
+ b.set(I, !0);
29
29
  try {
30
- let [e, t] = await Promise.all([M(), ue(null, !0)]);
31
- y(G, e, !0), y(W, t, !0);
30
+ let [e, t] = await Promise.all([v(), h(null, !0)]);
31
+ b.set(F, e, !0), b.set(P, t, !0);
32
32
  } catch (e) {
33
- console.error("Failed to load SaveAsDialog options", e), y(J, "Failed to load folders or categories");
33
+ console.error("Failed to load SaveAsDialog options", e), b.set(R, "Failed to load folders or categories");
34
34
  } finally {
35
- y(K, !1);
35
+ b.set(I, !1);
36
36
  }
37
37
  }
38
- async function Q(e) {
39
- if (e?.preventDefault(), !c(Y).trim()) {
40
- y(J, "Title cannot be empty");
38
+ async function U(e) {
39
+ if (e?.preventDefault(), !b.get(z).trim()) {
40
+ b.set(R, "Title cannot be empty");
41
41
  return;
42
42
  }
43
- if (!c(q)) {
44
- y(q, !0);
43
+ if (!b.get(L)) {
44
+ b.set(L, !0);
45
45
  try {
46
- if (B.onSave) {
47
- let e = c(X) === "" || c(X) === "null" ? null : c(X), t = c(Z) === "" || c(Z) === "null" || c(Z) === void 0 ? null : c(Z);
48
- await B.onSave(c(Y).trim(), e, t);
46
+ if (O.onSave) {
47
+ let e = b.get(B) === "" || b.get(B) === "null" ? null : b.get(B), t = b.get(V) === "" || b.get(V) === "null" || b.get(V) === void 0 ? null : b.get(V);
48
+ await O.onSave(b.get(z).trim(), e, t);
49
49
  }
50
- N(), H(!1);
50
+ y(), A(!1);
51
51
  } catch (e) {
52
- console.error("Failed to duplicate item", e), y(J, e instanceof Error ? e.message : "Failed to duplicate item", !0);
52
+ console.error("Failed to duplicate item", e), b.set(R, e instanceof Error ? e.message : "Failed to duplicate item", !0);
53
53
  } finally {
54
- y(q, !1);
54
+ b.set(L, !1);
55
55
  }
56
56
  }
57
57
  }
58
- function $() {
59
- c(q) || (H(!1), B.onClose?.());
58
+ function W() {
59
+ b.get(L) || (A(!1), O.onClose?.());
60
60
  }
61
- C(a, {
61
+ t(D, {
62
62
  onOpenChange: (e) => {
63
- e || $();
63
+ e || W();
64
64
  },
65
65
  get open() {
66
- return H();
66
+ return A();
67
67
  },
68
68
  set open(e) {
69
- H(e);
69
+ A(e);
70
70
  },
71
- children: (a, u) => {
72
- var f = z(), m = e(f);
73
- T(m, {
74
- children: (n, i) => {
75
- var a = P(), o = e(a);
76
- D(o, {
77
- children: (e, n) => {
78
- h(), t(e, r("Save as Copy"));
71
+ children: (t, s) => {
72
+ var c = E(), l = b.first_child(c);
73
+ r(l, {
74
+ children: (e, t) => {
75
+ var r = x(), i = b.first_child(r);
76
+ o(i, {
77
+ children: (e, t) => {
78
+ b.next();
79
+ var n = b.text("Save as Copy");
80
+ b.append(e, n);
79
81
  },
80
82
  $$slots: { default: !0 }
81
- }), w(p(o, 2), {
82
- children: (e, n) => {
83
- h(), t(e, r("Create a copy of this document with a new title, folder, and category."));
83
+ }), n(b.sibling(i, 2), {
84
+ children: (e, t) => {
85
+ b.next();
86
+ var n = b.text("Create a copy of this document with a new title, folder, and category.");
87
+ b.append(e, n);
84
88
  },
85
89
  $$slots: { default: !0 }
86
- }), t(n, a);
90
+ }), b.append(e, r);
87
91
  },
88
92
  $$slots: { default: !0 }
89
93
  });
90
- var _ = p(m, 2), v = (e) => {
91
- var n = F();
92
- S(o(n), { class: "size-6 animate-spin text-muted-foreground" }), l(n), t(e, n);
93
- }, b = (a) => {
94
- var u = L(), d = o(u), f = (e) => {
95
- var n = I(), r = o(n, !0);
96
- l(n), i(() => g(r, c(J))), t(e, n);
94
+ var u = b.sibling(l, 2), d = (t) => {
95
+ var n = S();
96
+ e(b.child(n), { class: "size-6 animate-spin text-muted-foreground" }), b.reset(n), b.append(t, n);
97
+ }, h = (e) => {
98
+ var t = w(), n = b.child(t), r = (e) => {
99
+ var t = C(), n = b.child(t, !0);
100
+ b.reset(t), b.template_effect(() => b.set_text(n, b.get(R))), b.append(e, t);
97
101
  };
98
- n(d, (e) => {
99
- c(J) && e(f);
102
+ b.if(n, (e) => {
103
+ b.get(R) && e(r);
100
104
  });
101
- var m = p(d, 2), _ = o(m);
102
- A(_, {
105
+ var i = b.sibling(n, 2), a = b.child(i);
106
+ f(a, {
103
107
  for: "save-as-title",
104
- children: (e, n) => {
105
- h(), t(e, r("New Title"));
108
+ children: (e, t) => {
109
+ b.next();
110
+ var n = b.text("New Title");
111
+ b.append(e, n);
106
112
  },
107
113
  $$slots: { default: !0 }
108
114
  });
109
- var v = p(_, 2);
110
- ne(v), l(m);
111
- var b = p(m, 2), S = o(b);
112
- A(S, {
113
- children: (e, n) => {
114
- h(), t(e, r("Parent Folder"));
115
+ var o = b.sibling(a, 2);
116
+ b.remove_input_defaults(o), b.reset(i);
117
+ var s = b.sibling(i, 2), c = b.child(s);
118
+ f(c, {
119
+ children: (e, t) => {
120
+ b.next();
121
+ var n = b.text("Parent Folder");
122
+ b.append(e, n);
115
123
  },
116
124
  $$slots: { default: !0 }
117
- }), le(p(S, 2), {
125
+ }), m(b.sibling(c, 2), {
118
126
  get folders() {
119
- return c(W);
127
+ return b.get(P);
120
128
  },
121
129
  get selectedId() {
122
- return c(X);
130
+ return b.get(B);
123
131
  },
124
132
  set selectedId(e) {
125
- y(X, e, !0);
133
+ b.set(B, e, !0);
126
134
  }
127
- }), l(b);
128
- var C = p(b, 2), w = o(C);
129
- A(w, {
135
+ }), b.reset(s);
136
+ var l = b.sibling(s, 2), u = b.child(l);
137
+ f(u, {
130
138
  for: "save-as-category",
131
- children: (e, n) => {
132
- h(), t(e, r("Category"));
139
+ children: (e, t) => {
140
+ b.next();
141
+ var n = b.text("Category");
142
+ b.append(e, n);
133
143
  },
134
144
  $$slots: { default: !0 }
135
- }), x(p(w, 2), () => V.Root, (n, a) => {
136
- a(n, {
145
+ });
146
+ var d = b.sibling(u, 2);
147
+ b.component(d, () => k.Root, (e, t) => {
148
+ t(e, {
137
149
  type: "single",
138
150
  get value() {
139
- return c(Z);
151
+ return b.get(V);
140
152
  },
141
153
  set value(e) {
142
- y(Z, e, !0);
154
+ b.set(V, e, !0);
143
155
  },
144
- children: (n, a) => {
145
- var o = P(), s = e(o);
146
- x(s, () => V.Trigger, (n, a) => {
147
- a(n, {
156
+ children: (e, t) => {
157
+ var n = x(), r = b.first_child(n);
158
+ b.component(r, () => k.Trigger, (e, t) => {
159
+ t(e, {
148
160
  class: "w-full text-foreground flex items-center justify-between bg-background border border-input px-3 py-2 text-sm rounded-md shadow-sm",
149
- children: (n, a) => {
150
- var o = P(), s = e(o);
151
- x(s, () => V.Value, (e, n) => {
152
- n(e, {
161
+ children: (e, t) => {
162
+ var n = x(), r = b.first_child(n);
163
+ b.component(r, () => k.Value, (e, t) => {
164
+ t(e, {
153
165
  placeholder: "Select a category...",
154
- children: (e, n) => {
155
- h();
156
- var a = r();
157
- i((e) => g(a, e), [() => c(Z) && c(Z) !== "null" ? c(G).find((e) => e.id === c(Z))?.name ?? "Uncategorized" : "Uncategorized"]), t(e, a);
166
+ children: (e, t) => {
167
+ b.next();
168
+ var n = b.text();
169
+ b.template_effect((e) => b.set_text(n, e), [() => b.get(V) && b.get(V) !== "null" ? b.get(F).find((e) => e.id === b.get(V))?.name ?? "Uncategorized" : "Uncategorized"]), b.append(e, n);
158
170
  },
159
171
  $$slots: { default: !0 }
160
172
  });
161
- }), ce(p(s, 2), { class: "size-4 opacity-50" }), t(n, o);
173
+ }), p(b.sibling(r, 2), { class: "size-4 opacity-50" }), b.append(e, n);
162
174
  },
163
175
  $$slots: { default: !0 }
164
176
  });
165
- }), x(p(s, 2), () => V.Content, (n, a) => {
166
- a(n, {
177
+ });
178
+ var i = b.sibling(r, 2);
179
+ b.component(i, () => k.Content, (e, t) => {
180
+ t(e, {
167
181
  class: "w-[var(--bits-select-trigger-width)]",
168
- children: (n, a) => {
169
- var o = P(), s = e(o);
170
- x(s, () => V.Item, (e, n) => {
171
- n(e, {
182
+ children: (e, t) => {
183
+ var n = x(), r = b.first_child(n);
184
+ b.component(r, () => k.Item, (e, t) => {
185
+ t(e, {
172
186
  value: "null",
173
- children: (e, n) => {
174
- h(), t(e, r("Uncategorized"));
187
+ children: (e, t) => {
188
+ b.next();
189
+ var n = b.text("Uncategorized");
190
+ b.append(e, n);
175
191
  },
176
192
  $$slots: { default: !0 }
177
193
  });
178
- }), re(p(s, 2), 17, () => c(G), (e) => e.id, (n, a) => {
179
- var o = te();
180
- x(e(o), () => V.Item, (e, n) => {
194
+ });
195
+ var i = b.sibling(r, 2);
196
+ b.each(i, 17, () => b.get(F), (e) => e.id, (e, t) => {
197
+ var n = b.comment(), r = b.first_child(n);
198
+ b.component(r, () => k.Item, (e, n) => {
181
199
  n(e, {
182
200
  get value() {
183
- return c(a).id;
201
+ return b.get(t).id;
184
202
  },
185
203
  children: (e, n) => {
186
- h();
187
- var o = r();
188
- i(() => g(o, c(a).name)), t(e, o);
204
+ b.next();
205
+ var r = b.text();
206
+ b.template_effect(() => b.set_text(r, b.get(t).name)), b.append(e, r);
189
207
  },
190
208
  $$slots: { default: !0 }
191
209
  });
192
- }), t(n, o);
193
- }), t(n, o);
210
+ }), b.append(e, n);
211
+ }), b.append(e, n);
194
212
  },
195
213
  $$slots: { default: !0 }
196
214
  });
197
- }), t(n, o);
215
+ }), b.append(e, n);
198
216
  },
199
217
  $$slots: { default: !0 }
200
218
  });
201
- }), l(C), l(u), s("submit", u, Q), ee(v, () => c(Y), (e) => y(Y, e)), t(a, u);
219
+ }), b.reset(l), b.reset(t), b.event("submit", t, U), b.bind_value(o, () => b.get(z), (e) => b.set(z, e)), b.append(e, t);
202
220
  };
203
- n(_, (e) => {
204
- c(K) ? e(v) : e(b, -1);
205
- }), ie(p(_, 2), {
221
+ b.if(u, (e) => {
222
+ b.get(I) ? e(d) : e(h, -1);
223
+ }), a(b.sibling(u, 2), {
206
224
  class: "mt-4",
207
- children: (a, o) => {
208
- var s = P(), l = e(s);
209
- E(l, {
225
+ children: (t, n) => {
226
+ var r = x(), a = b.first_child(r);
227
+ i(a, {
210
228
  variant: "outline",
211
229
  type: "button",
212
- onclick: $,
230
+ onclick: W,
213
231
  get disabled() {
214
- return c(q);
232
+ return b.get(L);
215
233
  },
216
- children: (e, n) => {
217
- h();
218
- var a = r();
219
- i((e) => g(a, e), [() => j()]), t(e, a);
234
+ children: (e, t) => {
235
+ b.next();
236
+ var n = b.text();
237
+ b.template_effect((e) => b.set_text(n, e), [() => _()]), b.append(e, n);
220
238
  },
221
239
  $$slots: { default: !0 }
222
240
  });
223
- var u = p(l, 2);
241
+ var o = b.sibling(a, 2);
224
242
  {
225
- let r = d(() => c(q) || c(K));
226
- E(u, {
243
+ let t = b.derived(() => b.get(L) || b.get(I));
244
+ i(o, {
227
245
  type: "button",
228
- onclick: Q,
246
+ onclick: U,
229
247
  get disabled() {
230
- return c(r);
248
+ return b.get(t);
231
249
  },
232
- children: (r, a) => {
233
- var o = R(), s = e(o), l = (e) => {
234
- S(e, { class: "mr-1 size-4 animate-spin" });
250
+ children: (t, n) => {
251
+ var r = T(), i = b.first_child(r), a = (t) => {
252
+ e(t, { class: "mr-1 size-4 animate-spin" });
235
253
  };
236
- n(s, (e) => {
237
- c(q) && e(l);
254
+ b.if(i, (e) => {
255
+ b.get(L) && e(a);
238
256
  });
239
- var u = p(s);
240
- i((e) => g(u, ` ${e ?? ""}`), [() => de()]), t(r, o);
257
+ var o = b.sibling(i);
258
+ b.template_effect((e) => b.set_text(o, ` ${e ?? ""}`), [() => g()]), b.append(t, r);
241
259
  },
242
260
  $$slots: { default: !0 }
243
261
  });
244
262
  }
245
- t(a, s);
263
+ b.append(t, r);
246
264
  },
247
265
  $$slots: { default: !0 }
248
- }), t(a, f);
266
+ }), b.append(t, c);
249
267
  },
250
268
  $$slots: { default: !0 }
251
- }), f();
269
+ }), b.pop();
252
270
  }
253
271
  //#endregion
254
- export { B as SaveAsDialog };
272
+ export { D as SaveAsDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../SettingsDialog-2kTaTXAs.js";
1
+ import { t as e } from "../SettingsDialog-DCM4-N6_.js";
2
2
  export { e as SettingsDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../ShareDialog-BBDGNF5n.js";
1
+ import { t as e } from "../ShareDialog-DYu3RKQu.js";
2
2
  export { e as ShareDialog };