@hiai-gg/docsmint 0.5.2 → 0.5.3

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 (34) hide show
  1. package/dist/backend/index.js +1 -1
  2. package/dist/frontend/{CategoryDialog-DmlX0Z97.js → CategoryDialog-BYAFjX7E.js} +152 -138
  3. package/dist/frontend/{FolderNode-D3rN3yLV.js → FolderNode-DAAn_T8_.js} +1 -1
  4. package/dist/frontend/SettingsDialog-CyZSOjLE.js +1024 -0
  5. package/dist/frontend/{Sidebar-BnZgNl_8.js → Sidebar-B-zCJT9i.js} +4 -4
  6. package/dist/frontend/app-shell.js +160 -126
  7. package/dist/frontend/components/category-dialog.js +1 -1
  8. package/dist/frontend/components/folder-node.js +1 -1
  9. package/dist/frontend/components/save-as-dialog.js +1 -1
  10. package/dist/frontend/components/settings.js +1 -1
  11. package/dist/frontend/components/sidebar.js +1 -1
  12. package/dist/frontend/dashboard.js +1 -1
  13. package/dist/frontend/folder-refresh.js +1 -1
  14. package/dist/frontend/frontend.css +1 -1
  15. package/dist/frontend/search.js +593 -575
  16. package/dist/frontend/{subfolders-refresh-store.svelte-B2dKVmgz.js → subfolders-refresh-store.svelte-DxP21a1c.js} +1 -0
  17. package/dist/frontend-ssr/app-shell.js +57 -3
  18. package/dist/frontend-ssr/assets/{CategoryDialog-Cnlmr1sz.js → CategoryDialog-BLxVoynx.js} +26 -9
  19. package/dist/frontend-ssr/assets/{FolderNode-CnFVWuQi.js → FolderNode-kmilhDjO.js} +1 -1
  20. package/dist/frontend-ssr/assets/{SettingsDialog-BPdUl6pd.js → SettingsDialog-DVp0OxPO.js} +2 -2
  21. package/dist/frontend-ssr/assets/{Sidebar-DwYZH0Tr.js → Sidebar-CO9LZRPa.js} +4 -4
  22. package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-DAh4gT16.js → subfolders-refresh-store.svelte-CXHxQWKh.js} +1 -0
  23. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  24. package/dist/frontend-ssr/components/folder-node.js +1 -1
  25. package/dist/frontend-ssr/components/save-as-dialog.js +1 -1
  26. package/dist/frontend-ssr/components/settings.js +1 -1
  27. package/dist/frontend-ssr/components/sidebar.js +1 -1
  28. package/dist/frontend-ssr/dashboard.js +1 -1
  29. package/dist/frontend-ssr/folder-refresh.js +1 -1
  30. package/dist/frontend-ssr/search.js +52 -33
  31. package/package.json +1 -1
  32. package/packages/cli/src/index.ts +1 -1
  33. package/packages/mcp-server/src/index.ts +1 -1
  34. package/dist/frontend/SettingsDialog-Bd_S2RKW.js +0 -1024
@@ -5,7 +5,7 @@ import { n as r, t as i } from "./folder-Cx60MRpi.js";
5
5
  import { t as a } from "./clock-Dz86E4Kz.js";
6
6
  import { t as o } from "./copy-CvCh4ZVt.js";
7
7
  import { n as s, r as c, t as l } from "./confirm-dialog-CzmoZw3a.js";
8
- import { t as u } from "./SettingsDialog-Bd_S2RKW.js";
8
+ import { t as u } from "./SettingsDialog-CyZSOjLE.js";
9
9
  import { n as d, t as f } from "./tag-DhVFHMcV.js";
10
10
  import { t as p } from "./x-cfdlccjs.js";
11
11
  import { a as m, i as h, o as ee, r as g, t as te } from "./dropdown-menu-CJ_7V3N0.js";
@@ -26,10 +26,10 @@ import { c as Ke, r as qe, s as Je, t as Ye } from "./folders-ONG03Dkv.js";
26
26
  import { t as Xe } from "./DeleteDialog-8k6JYWCx.js";
27
27
  import { t as Ze } from "./clipboard-Cgzxc0_R.js";
28
28
  import { t as Qe } from "./ShareDialog-BC-Jl6v1.js";
29
- import { t as $e } from "./CategoryDialog-DmlX0Z97.js";
29
+ import { t as $e } from "./CategoryDialog-BYAFjX7E.js";
30
30
  import { n as et, t as tt } from "./document-drop-coordinator-C4xHMjwC.js";
31
- import { a as nt, c as rt, d as it, f as at, i as ot, n as st, o as ct, p as lt, r as ut, s as dt, t as ft, u as pt } from "./subfolders-refresh-store.svelte-B2dKVmgz.js";
32
- import { t as mt } from "./FolderNode-D3rN3yLV.js";
31
+ import { a as nt, c as rt, d as it, f as at, i as ot, n as st, o as ct, p as lt, r as ut, s as dt, t as ft, u as pt } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
32
+ import { t as mt } from "./FolderNode-DAAn_T8_.js";
33
33
  import { a as ht, i as R, n as z, o as B, s as gt, t as _t } from "./tag-store.svelte-ogVCMCbv.js";
34
34
  import { t as vt } from "./ConfirmDialog-DgMTQBq4.js";
35
35
  import { i as yt, o as bt } from "./tags-BdCaMGfj.js";
@@ -1,36 +1,38 @@
1
1
  import { t as e } from "./Icon-Db-o32_E.js";
2
- import { n as t, r as n } from "./SettingsDialog-Bd_S2RKW.js";
3
- import { t as r } from "./Sidebar-BnZgNl_8.js";
2
+ import { n as t, r as n } from "./SettingsDialog-CyZSOjLE.js";
3
+ import { t as r } from "./Sidebar-B-zCJT9i.js";
4
4
  import { D as i } from "./messages-DIovIZrK.js";
5
5
  import { o as a, r as o } from "./route-context-DYQlUfzL.js";
6
- import { t as s } from "./HiaiDocsExtensionProvider-OSn96BBw.js";
6
+ import { d as s } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
7
+ import { a as c, o as l } from "./tag-store.svelte-ogVCMCbv.js";
8
+ import { t as u } from "./HiaiDocsExtensionProvider-OSn96BBw.js";
7
9
  import "svelte/internal/disclose-version";
8
- import * as c from "svelte/internal/client";
9
- import { getContext as l, onDestroy as u, setContext as d, untrack as f } from "svelte";
10
+ import * as d from "svelte/internal/client";
11
+ import { getContext as f, onDestroy as p, setContext as m, untrack as h } from "svelte";
10
12
  import "svelte/internal/flags/legacy";
11
13
  //#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/arrow-up.svelte
12
- function p(t, n) {
13
- let r = c.legacy_rest_props(n, [
14
+ function g(t, n) {
15
+ let r = d.legacy_rest_props(n, [
14
16
  "children",
15
17
  "$$slots",
16
18
  "$$events",
17
19
  "$$legacy"
18
20
  ]), i = [["path", { d: "m5 12 7-7 7 7" }], ["path", { d: "M12 19V5" }]];
19
- e(t, c.spread_props({ name: "arrow-up" }, () => r, {
21
+ e(t, d.spread_props({ name: "arrow-up" }, () => r, {
20
22
  get iconNode() {
21
23
  return i;
22
24
  },
23
25
  children: (e, t) => {
24
- var r = c.comment(), i = c.first_child(r);
25
- c.slot(i, n, "default", {}, null), c.append(e, r);
26
+ var r = d.comment(), i = d.first_child(r);
27
+ d.slot(i, n, "default", {}, null), d.append(e, r);
26
28
  },
27
29
  $$slots: { default: !0 }
28
30
  }));
29
31
  }
30
32
  //#endregion
31
33
  //#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/menu.svelte
32
- function m(t, n) {
33
- let r = c.legacy_rest_props(n, [
34
+ function _(t, n) {
35
+ let r = d.legacy_rest_props(n, [
34
36
  "children",
35
37
  "$$slots",
36
38
  "$$events",
@@ -40,44 +42,44 @@ function m(t, n) {
40
42
  ["path", { d: "M4 12h16" }],
41
43
  ["path", { d: "M4 19h16" }]
42
44
  ];
43
- e(t, c.spread_props({ name: "menu" }, () => r, {
45
+ e(t, d.spread_props({ name: "menu" }, () => r, {
44
46
  get iconNode() {
45
47
  return i;
46
48
  },
47
49
  children: (e, t) => {
48
- var r = c.comment(), i = c.first_child(r);
49
- c.slot(i, n, "default", {}, null), c.append(e, r);
50
+ var r = d.comment(), i = d.first_child(r);
51
+ d.slot(i, n, "default", {}, null), d.append(e, r);
50
52
  },
51
53
  $$slots: { default: !0 }
52
54
  }));
53
55
  }
54
56
  //#endregion
55
57
  //#region src/lib/stores/mobile-sidebar.svelte.ts
56
- var h = c.state(!1), g = {
58
+ var v = d.state(!1), y = {
57
59
  get open() {
58
- return c.get(h);
60
+ return d.get(v);
59
61
  },
60
62
  set open(e) {
61
- c.set(h, e, !0);
63
+ d.set(v, e, !0);
62
64
  },
63
65
  toggle() {
64
- c.set(h, !c.get(h));
66
+ d.set(v, !d.get(v));
65
67
  }
66
68
  };
67
- function _() {
68
- c.set(h, !1);
69
+ function b() {
70
+ d.set(v, !1);
69
71
  }
70
72
  //#endregion
71
73
  //#region src/lib/components/MobileSidebarToggle.svelte
72
- var v = c.from_html("<button type=\"button\" class=\"mobile-sidebar-toggle fixed left-3 top-3 flex size-11 items-center justify-center rounded-md border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-accent md:hidden\" style=\"top: calc(0.75rem + env(safe-area-inset-top));\"><!></button>");
73
- function y(e, t) {
74
- c.push(t, !0);
75
- let n = c.prop(t, "buttonRef", 15, null), r = c.prop(t, "controls", 3, "mobile-navigation"), i = c.state(!1);
74
+ var x = d.from_html("<button type=\"button\" class=\"mobile-sidebar-toggle fixed left-3 top-3 flex size-11 items-center justify-center rounded-md border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-accent md:hidden\" style=\"top: calc(0.75rem + env(safe-area-inset-top));\"><!></button>");
75
+ function S(e, t) {
76
+ d.push(t, !0);
77
+ let n = d.prop(t, "buttonRef", 15, null), r = d.prop(t, "controls", 3, "mobile-navigation"), i = d.state(!1);
76
78
  function a() {
77
79
  let e = Array.from(document.querySelectorAll("[role=\"dialog\"][aria-modal=\"true\"]"));
78
- c.set(i, e.length > 0), document.documentElement.classList.toggle("nested-sidebar-modal-open", e.some((e) => e.tagName !== "ASIDE"));
80
+ d.set(i, e.length > 0), document.documentElement.classList.toggle("nested-sidebar-modal-open", e.some((e) => e.tagName !== "ASIDE"));
79
81
  }
80
- c.user_effect(() => {
82
+ d.user_effect(() => {
81
83
  if (typeof document > "u") return;
82
84
  let e = new MutationObserver(a);
83
85
  return e.observe(document.body, {
@@ -90,29 +92,29 @@ function y(e, t) {
90
92
  };
91
93
  });
92
94
  function o() {
93
- g.toggle();
95
+ y.toggle();
94
96
  }
95
- var s = c.comment(), l = c.first_child(s), u = (e) => {
96
- var t = v();
97
- m(c.child(t), { class: "size-5" }), c.reset(t), c.bind_this(t, (e) => n(e), () => n()), c.template_effect(() => {
98
- c.set_attribute(t, "aria-label", g.open ? "Close navigation menu" : "Open navigation menu"), c.set_attribute(t, "aria-expanded", g.open), c.set_attribute(t, "aria-controls", r());
99
- }), c.delegated("click", t, o), c.append(e, t);
97
+ var s = d.comment(), c = d.first_child(s), l = (e) => {
98
+ var t = x();
99
+ _(d.child(t), { class: "size-5" }), d.reset(t), d.bind_this(t, (e) => n(e), () => n()), d.template_effect(() => {
100
+ d.set_attribute(t, "aria-label", y.open ? "Close navigation menu" : "Open navigation menu"), d.set_attribute(t, "aria-expanded", y.open), d.set_attribute(t, "aria-controls", r());
101
+ }), d.delegated("click", t, o), d.append(e, t);
100
102
  };
101
- c.if(l, (e) => {
102
- c.get(i) || e(u);
103
- }), c.append(e, s), c.pop();
103
+ d.if(c, (e) => {
104
+ d.get(i) || e(l);
105
+ }), d.append(e, s), d.pop();
104
106
  }
105
- c.delegate(["click"]);
107
+ d.delegate(["click"]);
106
108
  //#endregion
107
109
  //#region src/lib/components/ScrollToTop.svelte
108
- var b = c.from_html("<button type=\"button\"><!></button>");
109
- function x(e, t) {
110
- c.push(t, !0);
111
- let n = c.prop(t, "avoidEditorToolbar", 3, !1), r = c.state(!1), a = null, o = c.state("none"), s = c.state(void 0);
112
- function l() {
113
- c.set(r, (a ? a.scrollTop : window.scrollY) > 300);
110
+ var C = d.from_html("<button type=\"button\"><!></button>");
111
+ function w(e, t) {
112
+ d.push(t, !0);
113
+ let n = d.prop(t, "avoidEditorToolbar", 3, !1), r = d.state(!1), a = null, o = d.state("none"), s = d.state(void 0);
114
+ function c() {
115
+ d.set(r, (a ? a.scrollTop : window.scrollY) > 300);
114
116
  }
115
- function d() {
117
+ function l() {
116
118
  a ? a.scrollTo({
117
119
  top: 0,
118
120
  behavior: "smooth"
@@ -121,40 +123,40 @@ function x(e, t) {
121
123
  behavior: "smooth"
122
124
  });
123
125
  }
124
- function f(e) {
125
- m(), e && (a = e, e.addEventListener("scroll", l, { passive: !0 }), l());
126
+ function u(e) {
127
+ f(), e && (a = e, e.addEventListener("scroll", c, { passive: !0 }), c());
126
128
  }
127
- function m() {
128
- a && a.removeEventListener("scroll", l), a = null;
129
+ function f() {
130
+ a && a.removeEventListener("scroll", c), a = null;
129
131
  }
130
- c.user_effect(() => {
132
+ d.user_effect(() => {
131
133
  let e = t.scrollTarget;
132
- return f(e), e ? () => {
133
- m();
134
- } : (window.addEventListener("scroll", l, { passive: !0 }), l(), () => {
135
- window.removeEventListener("scroll", l);
134
+ return u(e), e ? () => {
135
+ f();
136
+ } : (window.addEventListener("scroll", c, { passive: !0 }), c(), () => {
137
+ window.removeEventListener("scroll", c);
136
138
  });
137
- }), u(() => {
138
- m(), c.set(r, !1);
139
- }), c.user_effect(() => {
139
+ }), p(() => {
140
+ f(), d.set(r, !1);
141
+ }), d.user_effect(() => {
140
142
  if (!n() || typeof document > "u") {
141
- c.set(o, "none"), c.set(s, void 0);
143
+ d.set(o, "none"), d.set(s, void 0);
142
144
  return;
143
145
  }
144
146
  let e = () => {
145
147
  let e = document.querySelector(".toolbar.floating-bar");
146
148
  if (e) {
147
149
  let t = e.getBoundingClientRect();
148
- c.set(o, "toolbar"), c.set(s, `${Math.max(0, window.innerHeight - t.top + 12)}px`);
150
+ d.set(o, "toolbar"), d.set(s, `${Math.max(0, window.innerHeight - t.top + 12)}px`);
149
151
  return;
150
152
  }
151
153
  let t = document.querySelector(".floating-fab");
152
154
  if (t) {
153
155
  let e = t.getBoundingClientRect();
154
- c.set(o, "fab"), c.set(s, `${Math.max(12, window.innerHeight - e.bottom - 12 - 40)}px`);
156
+ d.set(o, "fab"), d.set(s, `${Math.max(12, window.innerHeight - e.bottom - 12 - 40)}px`);
155
157
  return;
156
158
  }
157
- c.set(o, "none"), c.set(s, void 0);
159
+ d.set(o, "none"), d.set(s, void 0);
158
160
  }, t = new MutationObserver(e);
159
161
  t.observe(document.body, {
160
162
  childList: !0,
@@ -167,41 +169,73 @@ function x(e, t) {
167
169
  t.disconnect(), r.disconnect(), window.removeEventListener("resize", e);
168
170
  };
169
171
  });
170
- var h = b();
171
- let g, _;
172
- p(c.child(h), { class: "size-5" }), c.reset(h), c.template_effect((e, t) => {
173
- g = c.set_class(h, 1, `scroll-to-top fixed bottom-6 right-6 z-50 inline-flex size-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-md transition-all hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${c.get(r) ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`, null, g, {
174
- "above-editor-toolbar": c.get(o) === "toolbar",
175
- "below-editor-fab": c.get(o) === "fab"
176
- }), c.set_attribute(h, "aria-label", e), c.set_attribute(h, "title", t), _ = c.set_style(h, "", _, { bottom: c.get(s) });
177
- }, [() => i(), () => i()]), c.delegated("click", h, d), c.append(e, h), c.pop();
172
+ var m = C();
173
+ let h, _;
174
+ g(d.child(m), { class: "size-5" }), d.reset(m), d.template_effect((e, t) => {
175
+ h = d.set_class(m, 1, `scroll-to-top fixed bottom-6 right-6 z-50 inline-flex size-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-md transition-all hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${d.get(r) ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`, null, h, {
176
+ "above-editor-toolbar": d.get(o) === "toolbar",
177
+ "below-editor-fab": d.get(o) === "fab"
178
+ }), d.set_attribute(m, "aria-label", e), d.set_attribute(m, "title", t), _ = d.set_style(m, "", _, { bottom: d.get(s) });
179
+ }, [() => i(), () => i()]), d.delegated("click", m, l), d.append(e, m), d.pop();
180
+ }
181
+ d.delegate(["click"]);
182
+ //#endregion
183
+ //#region src/lib/hosts/mutation-refresh.ts
184
+ var T = {
185
+ documents: !1,
186
+ folders: !1,
187
+ tags: !1
188
+ };
189
+ function E(e, t) {
190
+ let n = (t?.method ?? (e instanceof Request ? e.method : "GET")).toUpperCase();
191
+ if (![
192
+ "POST",
193
+ "PUT",
194
+ "PATCH",
195
+ "DELETE"
196
+ ].includes(n)) return T;
197
+ let r = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, i = new URL(r, "http://docsmint.local").pathname;
198
+ return /\/keys(?:\/|$)/.test(i) ? T : /^\/api\/(?:v1\/)?tags(?:\/|$)/.test(i) || /^\/api\/(?:v1\/)?documents\/[^/]+\/tags(?:\/|$)/.test(i) ? {
199
+ documents: !0,
200
+ folders: !1,
201
+ tags: !0
202
+ } : /^\/api\/(?:v1\/)?(?:folders|categories)(?:\/|$)/.test(i) || /^\/api\/(?:v1\/)?(?:documents|import|imports)(?:\/|$)/.test(i) ? {
203
+ documents: !0,
204
+ folders: !0,
205
+ tags: !1
206
+ } : T;
207
+ }
208
+ function D(e) {
209
+ return e.documents || e.folders || e.tags;
178
210
  }
179
- c.delegate(["click"]);
180
211
  //#endregion
181
212
  //#region src/lib/hosts/realtime-context.ts
182
- var S = Symbol("docsmint-realtime-adapter");
183
- function C(e) {
184
- d(S, e);
213
+ var O = Symbol("docsmint-realtime-adapter");
214
+ function k(e) {
215
+ m(O, e);
185
216
  }
186
- function w() {
187
- return l(S);
217
+ function A() {
218
+ return f(O);
188
219
  }
189
220
  //#endregion
190
221
  //#region src/lib/hosts/DocsmintAppShellHost.svelte
191
- var T = c.from_html("<button type=\"button\" tabindex=\"-1\" aria-label=\"Close navigation menu\" class=\"fixed inset-0 z-40 bg-black/50\"></button>"), E = c.from_html("<div class=\"flex h-screen\" data-docsmint-app-shell-host=\"\"><!> <main id=\"main-content\" class=\"relative flex-1 overflow-auto\"><!></main></div> <!> <!>", 1), D = c.from_html("<!> <!>", 1);
192
- function O(e, i) {
193
- c.push(i, !0);
194
- let l = c.prop(i, "request", 19, () => ({ fetch })), u = c.prop(i, "extensions", 19, () => ({}));
222
+ var j = d.from_html("<button type=\"button\" tabindex=\"-1\" aria-label=\"Close navigation menu\" class=\"fixed inset-0 z-40 bg-black/50\"></button>"), M = d.from_html("<div class=\"flex h-screen\" data-docsmint-app-shell-host=\"\"><!> <main id=\"main-content\" class=\"relative flex-1 overflow-auto\"><!></main></div> <!> <!>", 1), N = d.from_html("<!> <!>", 1);
223
+ function P(e, i) {
224
+ d.push(i, !0);
225
+ let f = d.prop(i, "request", 19, () => ({ fetch })), p = d.prop(i, "extensions", 19, () => ({}));
195
226
  o({
196
227
  get pathname() {
197
228
  return i.route.pathname;
198
229
  },
199
230
  resolve: (e) => i.route.resolve(e),
200
231
  navigate: (e, t) => i.route.navigate?.(e, t)
201
- }), a({ fetch: (...e) => l().fetch(...e) });
202
- let d = f(() => i.realtime);
203
- d && C(d), n.init(), t.init();
204
- let p = c.state(null), m = c.state(null), h = c.state(null), v = c.state(!1), b = [
232
+ }), a({ fetch: async (...e) => {
233
+ let t = await f().fetch(...e), n = E(e[0], e[1]);
234
+ return t.ok && D(n) && (n.documents && c(), n.folders && s(), n.tags && l()), t;
235
+ } });
236
+ let m = h(() => i.realtime);
237
+ m && k(m), n.init(), t.init();
238
+ let g = d.state(null), _ = d.state(null), v = d.state(null), x = d.state(!1), C = [
205
239
  "a[href]",
206
240
  "button:not([disabled])",
207
241
  "input:not([disabled])",
@@ -209,101 +243,101 @@ function O(e, i) {
209
243
  "textarea:not([disabled])",
210
244
  "[tabindex]:not([tabindex=\"-1\"])"
211
245
  ].join(",");
212
- c.user_effect(() => {
246
+ d.user_effect(() => {
213
247
  let e = window.matchMedia("(max-width: 767px)"), t = () => {
214
- c.set(v, e.matches, !0), c.get(v) || _();
248
+ d.set(x, e.matches, !0), d.get(x) || b();
215
249
  };
216
250
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
217
- }), c.user_effect(() => {
218
- i.route.pathname, _();
219
- }), c.user_effect(() => {
220
- if (!c.get(v) || !g.open || !c.get(m)) return;
221
- let e = document.activeElement instanceof HTMLElement ? document.activeElement : c.get(h), t = document.body.style.overflow;
251
+ }), d.user_effect(() => {
252
+ i.route.pathname, b();
253
+ }), d.user_effect(() => {
254
+ if (!d.get(x) || !y.open || !d.get(_)) return;
255
+ let e = document.activeElement instanceof HTMLElement ? document.activeElement : d.get(v), t = document.body.style.overflow;
222
256
  document.body.style.overflow = "hidden";
223
- let n = () => Array.from(c.get(m)?.querySelectorAll(b) ?? []).filter((e) => !e.hasAttribute("disabled")), r = (e) => {
257
+ let n = () => Array.from(d.get(_)?.querySelectorAll(C) ?? []).filter((e) => !e.hasAttribute("disabled")), r = (e) => {
224
258
  let t = e.target instanceof Element ? e.target.closest("[role=\"dialog\"]") : null;
225
- if (t && t !== c.get(m)) return;
259
+ if (t && t !== d.get(_)) return;
226
260
  if (e.key === "Escape") {
227
- e.preventDefault(), _();
261
+ e.preventDefault(), b();
228
262
  return;
229
263
  }
230
264
  if (e.key !== "Tab") return;
231
265
  let r = n(), i = r.at(0), a = r.at(-1);
232
266
  if (!i || !a) {
233
- e.preventDefault(), c.get(m)?.focus();
267
+ e.preventDefault(), d.get(_)?.focus();
234
268
  return;
235
269
  }
236
270
  e.shiftKey && document.activeElement === i ? (e.preventDefault(), a.focus()) : !e.shiftKey && document.activeElement === a && (e.preventDefault(), i.focus());
237
271
  };
238
272
  document.addEventListener("keydown", r);
239
273
  let i = requestAnimationFrame(() => {
240
- (n().at(0) ?? c.get(m))?.focus();
274
+ (n().at(0) ?? d.get(_))?.focus();
241
275
  });
242
276
  return () => {
243
277
  cancelAnimationFrame(i), document.removeEventListener("keydown", r), document.body.style.overflow = t, e?.isConnected && e.focus();
244
278
  };
245
279
  });
246
- var S = D(), w = c.first_child(S);
247
- s(w, {
280
+ var T = N(), O = d.first_child(T);
281
+ u(O, {
248
282
  get extensions() {
249
- return u();
283
+ return p();
250
284
  },
251
285
  children: (e, t) => {
252
- var n = E(), a = c.first_child(n), o = c.child(a);
286
+ var n = M(), a = d.first_child(n), o = d.child(a);
253
287
  r(o, {
254
288
  get mobile() {
255
- return c.get(v);
289
+ return d.get(x);
256
290
  },
257
291
  get mobileOpen() {
258
- return g.open;
292
+ return y.open;
259
293
  },
260
294
  get element() {
261
- return c.get(m);
295
+ return d.get(_);
262
296
  },
263
297
  set element(e) {
264
- c.set(m, e, !0);
298
+ d.set(_, e, !0);
265
299
  }
266
300
  });
267
- var s = c.sibling(o, 2), l = c.child(s);
268
- c.snippet(l, () => i.children), c.reset(s), c.bind_this(s, (e) => c.set(p, e), () => c.get(p)), c.reset(a);
269
- var u = c.sibling(a, 2);
270
- y(u, {
301
+ var s = d.sibling(o, 2), c = d.child(s);
302
+ d.snippet(c, () => i.children), d.reset(s), d.bind_this(s, (e) => d.set(g, e), () => d.get(g)), d.reset(a);
303
+ var l = d.sibling(a, 2);
304
+ S(l, {
271
305
  get buttonRef() {
272
- return c.get(h);
306
+ return d.get(v);
273
307
  },
274
308
  set buttonRef(e) {
275
- c.set(h, e, !0);
309
+ d.set(v, e, !0);
276
310
  }
277
311
  });
278
- var d = c.sibling(u, 2), f = (e) => {
279
- var t = T();
280
- c.delegated("click", t, function(...e) {
281
- _?.apply(this, e);
282
- }), c.append(e, t);
312
+ var u = d.sibling(l, 2), f = (e) => {
313
+ var t = j();
314
+ d.delegated("click", t, function(...e) {
315
+ b?.apply(this, e);
316
+ }), d.append(e, t);
283
317
  };
284
- c.if(d, (e) => {
285
- c.get(v) && g.open && e(f);
286
- }), c.template_effect(() => s.inert = c.get(v) && g.open), c.append(e, n);
318
+ d.if(u, (e) => {
319
+ d.get(x) && y.open && e(f);
320
+ }), d.template_effect(() => s.inert = d.get(x) && y.open), d.append(e, n);
287
321
  },
288
322
  $$slots: { default: !0 }
289
323
  });
290
- var O = c.sibling(w, 2), k = (e) => {
324
+ var A = d.sibling(O, 2), P = (e) => {
291
325
  {
292
- let t = c.derived(() => i.route.pathname.startsWith("/docs/"));
293
- x(e, {
326
+ let t = d.derived(() => i.route.pathname.startsWith("/docs/"));
327
+ w(e, {
294
328
  get scrollTarget() {
295
- return c.get(p);
329
+ return d.get(g);
296
330
  },
297
331
  get avoidEditorToolbar() {
298
- return c.get(t);
332
+ return d.get(t);
299
333
  }
300
334
  });
301
335
  }
302
336
  };
303
- c.if(O, (e) => {
304
- n.showScrollToTop && e(k);
305
- }), c.append(e, S), c.pop();
337
+ d.if(A, (e) => {
338
+ n.showScrollToTop && e(P);
339
+ }), d.append(e, T), d.pop();
306
340
  }
307
- c.delegate(["click"]);
341
+ d.delegate(["click"]);
308
342
  //#endregion
309
- export { O as DocsmintAppShellHost, w as getDocsmintRealtimeAdapter };
343
+ export { P as DocsmintAppShellHost, A as getDocsmintRealtimeAdapter };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../CategoryDialog-DmlX0Z97.js";
1
+ import { t as e } from "../CategoryDialog-BYAFjX7E.js";
2
2
  export { e as CategoryDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../FolderNode-D3rN3yLV.js";
1
+ import { t as e } from "../FolderNode-DAAn_T8_.js";
2
2
  export { e as FolderNode };
@@ -8,7 +8,7 @@ import { t as f } from "../label-C2HfJNQ2.js";
8
8
  import { i as p } from "../categories-X7gK8azc.js";
9
9
  import { a as m, i as h, n as g, r as _, t as v } from "../select-value-JCAp2PmU.js";
10
10
  import { s as y } from "../folders-ONG03Dkv.js";
11
- import { d as b } from "../subfolders-refresh-store.svelte-B2dKVmgz.js";
11
+ import { d as b } from "../subfolders-refresh-store.svelte-DxP21a1c.js";
12
12
  import "svelte/internal/disclose-version";
13
13
  import * as x from "svelte/internal/client";
14
14
  //#region src/lib/components/SaveAsDialog.svelte
@@ -1,2 +1,2 @@
1
- import { t as e } from "../SettingsDialog-Bd_S2RKW.js";
1
+ import { t as e } from "../SettingsDialog-CyZSOjLE.js";
2
2
  export { e as SettingsDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../Sidebar-BnZgNl_8.js";
1
+ import { t as e } from "../Sidebar-B-zCJT9i.js";
2
2
  export { e as Sidebar };
@@ -25,7 +25,7 @@ import { c as qe, i as W, o as Je } from "./documents-CwCs1rA7.js";
25
25
  import { c as Ye, i as Xe, s as G } from "./folders-ONG03Dkv.js";
26
26
  import { t as K } from "./clipboard-Cgzxc0_R.js";
27
27
  import { t as Ze } from "./ShareDialog-BC-Jl6v1.js";
28
- import { d as Qe, n as $e } from "./subfolders-refresh-store.svelte-B2dKVmgz.js";
28
+ import { d as Qe, n as $e } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
29
29
  import { a as et } from "./tag-store.svelte-ogVCMCbv.js";
30
30
  import { t as tt } from "./ConfirmDialog-DgMTQBq4.js";
31
31
  import "svelte/internal/disclose-version";
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./subfolders-refresh-store.svelte-B2dKVmgz.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
2
2
  export { f as acknowledgeDocumentPlacement, s as bumpSubfoldersRefresh, u as getDocumentFromRegistry, i as getDocumentPlacementNonce, e as getFolderFromRegistry, c as getGlobalFolderRefreshNonce, d as getLatestDocumentPlacement, t as getPendingDocumentPlacement, a as getSubfoldersRefresh, p as publishDocumentPlacement, n as refreshFolders, r as registerDocument, l as registerFolder, o as supersedePendingDocumentPlacement };