@hiai-gg/docsmint 0.3.8 → 0.3.9

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 (90) hide show
  1. package/dist/backend/index.js +1 -1
  2. package/dist/client.d.ts +11 -0
  3. package/dist/client.js +9 -0
  4. package/dist/frontend/CategoryDialog-CxVyaBV5.js +611 -0
  5. package/dist/frontend/{ConfirmDialog-BLF3x_hr.js → ConfirmDialog-NFGXRa3E.js} +2 -2
  6. package/dist/frontend/{CreateSnapshotDialog-D5vPvFTL.js → CreateSnapshotDialog-BDgFTeFn.js} +40 -40
  7. package/dist/frontend/{DatePicker-CLNTdvTk.js → DatePicker-BZRBluzF.js} +102 -105
  8. package/dist/frontend/{DeleteDialog-DxYFJivN.js → DeleteDialog-CvAr2WPu.js} +39 -39
  9. package/dist/frontend/{FolderNode-C2zG7uii.js → FolderNode-C6FJv99G.js} +41 -41
  10. package/dist/frontend/HiaiDocsExtensionProvider-DHWLzRUu.js +11 -0
  11. package/dist/frontend/SettingsDialog-BHh68rTB.js +1016 -0
  12. package/dist/frontend/{ShareDialog-DYu3RKQu.js → ShareDialog-BUOkYSlw.js} +35 -35
  13. package/dist/frontend/Sidebar-Cu3JrKDC.js +2021 -0
  14. package/dist/frontend/{TagCreateDialog-DXQs2bL9.js → TagCreateDialog-B9YZBNHi.js} +38 -38
  15. package/dist/frontend/api/settings.js +1 -1
  16. package/dist/frontend/app-shell.d.ts +8 -0
  17. package/dist/frontend/app-shell.js +291 -0
  18. package/dist/frontend/{clsx-C7bIvsDS.js → bundle-mjs-DllmqUxV.js} +583 -583
  19. package/dist/frontend/components/category-dialog.js +1 -1
  20. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  21. package/dist/frontend/components/delete-dialog.js +1 -1
  22. package/dist/frontend/components/editor/document-editor.js +1102 -1102
  23. package/dist/frontend/components/editor/document-title.js +2 -2
  24. package/dist/frontend/components/editor/markdown-toggle.js +1 -1
  25. package/dist/frontend/components/folder-node.js +1 -1
  26. package/dist/frontend/components/save-as-dialog.js +75 -75
  27. package/dist/frontend/components/settings.js +1 -1
  28. package/dist/frontend/components/share-dialog.js +1 -1
  29. package/dist/frontend/components/sidebar.js +2 -2021
  30. package/dist/frontend/components/tag-create-dialog.js +1 -1
  31. package/dist/frontend/components/version-history.js +58 -58
  32. package/dist/frontend/{FolderDialog-CRVZM2Oi.js → confirm-dialog-C4jTRbiS.js} +69 -69
  33. package/dist/frontend/dashboard.js +1118 -1118
  34. package/dist/frontend/{dialog-D6NxYVmy.js → dialog-Bevp9mmM.js} +2 -2
  35. package/dist/frontend/{loader-circle-BA6aLO71.js → dist-C3857Spp.js} +81 -81
  36. package/dist/frontend/{ellipsis-vertical-P9MHvCps.js → dropdown-menu-CRSby3e9.js} +182 -182
  37. package/dist/frontend/extension.js +2 -11
  38. package/dist/frontend/{floating-layer-anchor-CPwucTfd.js → floating-layer-anchor-BDs7vO-M.js} +1 -1
  39. package/dist/frontend/frontend.css +1 -1
  40. package/dist/frontend/i18n.js +2 -2
  41. package/dist/frontend/{input-B5Rak-5G.js → input-BWlOML_m.js} +1 -1
  42. package/dist/frontend/{label-CW9rxoAb.js → label-C2HfJNQ2.js} +1 -1
  43. package/dist/frontend/{messages-BpYaLbzE.js → messages-C5Q890i2.js} +8 -8
  44. package/dist/frontend/search.js +613 -613
  45. package/dist/frontend/{select-value-sF86Geyh.js → select-value-GXwx90Pr.js} +2 -2
  46. package/dist/frontend/{settings-blyobazp.js → settings-DSrUl4hW.js} +9 -9
  47. package/dist/frontend/{textarea-i1720bE7.js → textarea-DOAE-h42.js} +1 -1
  48. package/dist/frontend/{utils-hzdMVeCv.js → utils-BPDRytUU.js} +1 -1
  49. package/dist/frontend/{utils-CffiyuTo.js → utils-DrfHTcei.js} +1 -1
  50. package/dist/frontend/utils.js +1 -1
  51. package/dist/frontend-ssr/api/settings.js +1 -1
  52. package/dist/frontend-ssr/app-shell.js +294 -0
  53. package/dist/frontend-ssr/assets/{CategoryDialog-C2xaZKHq.js → CategoryDialog-BcGW8-Kf.js} +4 -4
  54. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-BRw1xJW1.js → CreateSnapshotDialog-1bROJ-Rn.js} +4 -4
  55. package/dist/frontend-ssr/assets/{DatePicker-DnXniwlZ.js → DatePicker-B1ML8OVz.js} +33 -33
  56. package/dist/frontend-ssr/assets/{FolderNode-DRfBfpft.js → FolderNode-BZ0Q2QUS.js} +3 -3
  57. package/dist/frontend-ssr/assets/HiaiDocsExtensionProvider-DAM-lX4R.js +13 -0
  58. package/dist/frontend-ssr/assets/{SettingsDialog-CX8Noa8A.js → SettingsDialog-B8L_YqNA.js} +16 -16
  59. package/dist/frontend-ssr/assets/{ShareDialog-Cge49ZdJ.js → ShareDialog-vMvJLRfn.js} +1 -1
  60. package/dist/frontend-ssr/assets/Sidebar-EHuUAx3W.js +2033 -0
  61. package/dist/frontend-ssr/assets/{TagCreateDialog-EAChgBF-.js → TagCreateDialog-B0DPEfmQ.js} +3 -3
  62. package/dist/frontend-ssr/assets/{FolderDialog-Dq7I2cKZ.js → confirm-dialog-BCthVwUY.js} +4 -4
  63. package/dist/frontend-ssr/assets/{ellipsis-vertical-C-0hgkZn.js → dropdown-menu-Bj5rbqbB.js} +96 -96
  64. package/dist/frontend-ssr/assets/{messages-DhXqlcJI.js → messages-CvqpZNJe.js} +1 -1
  65. package/dist/frontend-ssr/assets/{select-value-DngdSmLI.js → select-value-6Lk0ToYd.js} +1 -1
  66. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  67. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
  68. package/dist/frontend-ssr/components/delete-dialog.js +1 -1
  69. package/dist/frontend-ssr/components/editor/document-editor.js +5 -5
  70. package/dist/frontend-ssr/components/editor/document-title.js +1 -1
  71. package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
  72. package/dist/frontend-ssr/components/folder-node.js +1 -1
  73. package/dist/frontend-ssr/components/save-as-dialog.js +4 -4
  74. package/dist/frontend-ssr/components/settings.js +1 -1
  75. package/dist/frontend-ssr/components/share-dialog.js +1 -1
  76. package/dist/frontend-ssr/components/sidebar.js +1 -2032
  77. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
  78. package/dist/frontend-ssr/components/version-history.js +3 -3
  79. package/dist/frontend-ssr/dashboard.js +15 -15
  80. package/dist/frontend-ssr/extension.js +1 -12
  81. package/dist/frontend-ssr/i18n.js +1 -1
  82. package/dist/frontend-ssr/search.js +3 -3
  83. package/package.json +7 -1
  84. package/packages/cli/src/index.ts +1 -1
  85. package/packages/mcp-server/src/index.ts +1 -1
  86. package/dist/frontend/CategoryDialog-DphkZqIB.js +0 -611
  87. package/dist/frontend/SettingsDialog-DCM4-N6_.js +0 -1016
  88. package/dist/frontend-ssr/assets/{DeleteDialog-BCfZy3Zn.js → DeleteDialog-tBYaP0L3.js} +1 -1
  89. package/dist/frontend-ssr/assets/{floating-layer-anchor-uzw9K8qN.js → floating-layer-anchor-CYIE8Oj6.js} +1 -1
  90. package/dist/frontend-ssr/assets/{settings-E6qSAWM2.js → settings-Bk5Hk9Vq.js} +1 -1
@@ -1,9 +1,9 @@
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 { t as s } from "./label-CW9rxoAb.js";
4
- import { $r as c, Qn as l, ei as u, ir as d, nr as f, qn as p, ti as m, tr as h } from "./messages-BpYaLbzE.js";
5
- import { t as g } from "./utils-CffiyuTo.js";
6
- import { t as _ } from "./input-B5Rak-5G.js";
1
+ import { n as e } from "./dist-C3857Spp.js";
2
+ import { $n as t, Jn as n, ar as r, ei as i, ni as a, nr as o, rr as s, ti as c } from "./messages-C5Q890i2.js";
3
+ import { t as l } from "./utils-DrfHTcei.js";
4
+ import { a as u, i as d, n as f, o as p, r as m, t as h } from "./dialog-Bevp9mmM.js";
5
+ import { t as g } from "./input-BWlOML_m.js";
6
+ import { t as _ } from "./label-C2HfJNQ2.js";
7
7
  import { c as v, l as y, n as b, r as x } from "./tags-CtCV0Djo.js";
8
8
  import "svelte/internal/disclose-version";
9
9
  import * as S from "svelte/internal/client";
@@ -23,7 +23,7 @@ function k(k, A) {
23
23
  "#3b82f6",
24
24
  "#8b5cf6",
25
25
  "#ec4899"
26
- ], M = j[9], N = S.prop(A, "open", 15, !1), P = S.prop(A, "mode", 3, "create"), F = S.prop(A, "tag", 3, null), I = S.state(""), L = S.state(S.proxy(M)), R = S.state(null), z = S.state(null), B = S.state(!1), V = S.derived(() => P() === "edit"), H = S.derived(() => S.get(V) ? u() : m()), U = S.derived(() => S.get(B) ? p() : S.get(V) ? f() : l());
26
+ ], M = j[9], N = S.prop(A, "open", 15, !1), P = S.prop(A, "mode", 3, "create"), F = S.prop(A, "tag", 3, null), I = S.state(""), L = S.state(S.proxy(M)), R = S.state(null), z = S.state(null), B = S.state(!1), V = S.derived(() => P() === "edit"), H = S.derived(() => S.get(V) ? c() : a()), U = S.derived(() => S.get(B) ? n() : S.get(V) ? s() : t());
27
27
  function W() {
28
28
  S.set(I, ""), S.set(L, M, !0), S.set(R, null), S.set(z, null), S.set(B, !1);
29
29
  }
@@ -44,7 +44,7 @@ function k(k, A) {
44
44
  e.preventDefault(), S.set(R, null), S.set(z, null);
45
45
  let t = S.get(I).trim();
46
46
  if (t.length === 0) {
47
- S.set(R, c(), !0);
47
+ S.set(R, i(), !0);
48
48
  return;
49
49
  }
50
50
  if (S.get(V) && F()) {
@@ -54,7 +54,7 @@ function k(k, A) {
54
54
  });
55
55
  if (!e.success) {
56
56
  let t = e.error.issues[0];
57
- S.set(R, t?.message ?? d(), !0);
57
+ S.set(R, t?.message ?? r(), !0);
58
58
  return;
59
59
  }
60
60
  X(F().id, e.data);
@@ -65,7 +65,7 @@ function k(k, A) {
65
65
  });
66
66
  if (!e.success) {
67
67
  let t = e.error.issues[0];
68
- S.set(R, t?.message ?? d(), !0);
68
+ S.set(R, t?.message ?? r(), !0);
69
69
  return;
70
70
  }
71
71
  Y(e.data.name, S.get(L));
@@ -77,7 +77,7 @@ function k(k, A) {
77
77
  let n = await b(e, t);
78
78
  A.onCreated?.(n), K();
79
79
  } catch (e) {
80
- S.set(z, e instanceof Error ? e.message : d(), !0), console.error("TagCreateDialog: createTag failed", e);
80
+ S.set(z, e instanceof Error ? e.message : r(), !0), console.error("TagCreateDialog: createTag failed", e);
81
81
  } finally {
82
82
  S.set(B, !1);
83
83
  }
@@ -88,7 +88,7 @@ function k(k, A) {
88
88
  let n = await v(e, t);
89
89
  A.onUpdated?.(n), K();
90
90
  } catch (e) {
91
- S.set(z, e instanceof Error ? e.message : d(), !0), console.error("TagCreateDialog: updateTag failed", e);
91
+ S.set(z, e instanceof Error ? e.message : r(), !0), console.error("TagCreateDialog: updateTag failed", e);
92
92
  } finally {
93
93
  S.set(B, !1);
94
94
  }
@@ -98,7 +98,7 @@ function k(k, A) {
98
98
  }
99
99
  S.user_effect(() => {
100
100
  N() && P() === "edit" && F() && (S.set(I, F().name, !0), S.set(L, F().color ?? M, !0), S.set(R, null), S.set(z, null));
101
- }), t(k, {
101
+ }), u(k, {
102
102
  onOpenChange: q,
103
103
  get open() {
104
104
  return N();
@@ -106,44 +106,44 @@ function k(k, A) {
106
106
  set open(e) {
107
107
  N(e);
108
108
  },
109
- children: (t, l) => {
110
- var u = O(), d = S.first_child(u);
111
- r(d, {
109
+ children: (t, n) => {
110
+ var r = O(), a = S.first_child(r);
111
+ f(a, {
112
112
  children: (e, t) => {
113
- var r = C(), i = S.first_child(r);
114
- o(i, {
113
+ var n = C(), r = S.first_child(n);
114
+ h(r, {
115
115
  children: (e, t) => {
116
116
  S.next();
117
117
  var n = S.text();
118
118
  S.template_effect(() => S.set_text(n, S.get(H))), S.append(e, n);
119
119
  },
120
120
  $$slots: { default: !0 }
121
- }), n(S.sibling(i, 2), {
121
+ }), d(S.sibling(r, 2), {
122
122
  children: (e, t) => {
123
123
  S.next();
124
124
  var n = S.text();
125
- S.template_effect((e) => S.set_text(n, e), [() => c()]), S.append(e, n);
125
+ S.template_effect((e) => S.set_text(n, e), [() => i()]), S.append(e, n);
126
126
  },
127
127
  $$slots: { default: !0 }
128
- }), S.append(e, r);
128
+ }), S.append(e, n);
129
129
  },
130
130
  $$slots: { default: !0 }
131
131
  });
132
- var f = S.sibling(d, 2), p = S.child(f), m = S.child(p);
133
- s(m, {
132
+ var s = S.sibling(a, 2), c = S.child(s), u = S.child(c);
133
+ _(u, {
134
134
  for: "tag-name",
135
135
  class: "sr-only",
136
136
  children: (e, t) => {
137
137
  S.next();
138
138
  var n = S.text();
139
- S.template_effect((e) => S.set_text(n, e), [() => c()]), S.append(e, n);
139
+ S.template_effect((e) => S.set_text(n, e), [() => i()]), S.append(e, n);
140
140
  },
141
141
  $$slots: { default: !0 }
142
142
  });
143
- var v = S.sibling(m, 2);
143
+ var v = S.sibling(u, 2);
144
144
  {
145
- let e = S.derived(() => c()), t = S.derived(() => S.get(R) ? "true" : void 0), n = S.derived(() => S.get(R) ? "tag-name-error" : void 0);
146
- _(v, {
145
+ let e = S.derived(() => i()), t = S.derived(() => S.get(R) ? "true" : void 0), n = S.derived(() => S.get(R) ? "tag-name-error" : void 0);
146
+ g(v, {
147
147
  id: "tag-name",
148
148
  name: "name",
149
149
  type: "text",
@@ -177,9 +177,9 @@ function k(k, A) {
177
177
  };
178
178
  S.if(y, (e) => {
179
179
  S.get(R) && e(b);
180
- }), S.reset(p);
181
- var x = S.sibling(p, 2), k = S.child(x);
182
- s(k, {
180
+ }), S.reset(c);
181
+ var x = S.sibling(c, 2), k = S.child(x);
182
+ _(k, {
183
183
  for: "tag-color",
184
184
  class: "text-xs text-muted-foreground",
185
185
  children: (e, t) => {
@@ -195,7 +195,7 @@ function k(k, A) {
195
195
  var r = T();
196
196
  S.template_effect((e) => {
197
197
  S.set_class(r, 1, e), S.set_style(r, `background-color: ${t ?? ""};`), S.set_attribute(r, "aria-label", `Color ${t ?? ""}`), S.set_attribute(r, "aria-pressed", S.get(n)), r.disabled = S.get(B);
198
- }, [() => S.clsx(g("size-6 shrink-0 rounded-full border-2 transition-all", S.get(n) ? "scale-110 border-foreground" : "border-transparent hover:scale-105"))]), S.delegated("click", r, () => S.set(L, t, !0)), S.append(e, r);
198
+ }, [() => S.clsx(l("size-6 shrink-0 rounded-full border-2 transition-all", S.get(n) ? "scale-110 border-foreground" : "border-transparent hover:scale-105"))]), S.delegated("click", r, () => S.set(L, t, !0)), S.append(e, r);
199
199
  });
200
200
  var N = S.sibling(M, 2), P = S.child(N);
201
201
  S.remove_input_defaults(P), S.reset(N), S.reset(A), S.reset(x);
@@ -205,11 +205,11 @@ function k(k, A) {
205
205
  };
206
206
  S.if(F, (e) => {
207
207
  S.get(z) && e(V);
208
- }), S.reset(f), a(S.sibling(f, 2), {
208
+ }), S.reset(s), m(S.sibling(s, 2), {
209
209
  class: "gap-2 max-sm:flex-col max-sm:items-stretch",
210
210
  children: (t, n) => {
211
- var r = C(), a = S.first_child(r);
212
- i(a, {
211
+ var r = C(), i = S.first_child(r);
212
+ p(i, {
213
213
  variant: "outline",
214
214
  type: "button",
215
215
  onclick: K,
@@ -219,14 +219,14 @@ function k(k, A) {
219
219
  children: (e, t) => {
220
220
  S.next();
221
221
  var n = S.text();
222
- S.template_effect((e) => S.set_text(n, e), [() => h()]), S.append(e, n);
222
+ S.template_effect((e) => S.set_text(n, e), [() => o()]), S.append(e, n);
223
223
  },
224
224
  $$slots: { default: !0 }
225
225
  });
226
- var o = S.sibling(a, 2);
226
+ var a = S.sibling(i, 2);
227
227
  {
228
228
  let t = S.derived(() => S.get(B) || S.get(I).trim().length === 0);
229
- i(o, {
229
+ p(a, {
230
230
  type: "submit",
231
231
  onclick: J,
232
232
  get disabled() {
@@ -250,7 +250,7 @@ function k(k, A) {
250
250
  $$slots: { default: !0 }
251
251
  }), S.template_effect((e) => {
252
252
  S.set_class(N, 1, e), S.set_style(N, `background-color: ${S.get(L) ?? ""};`), S.set_value(P, S.get(L)), P.disabled = S.get(B);
253
- }, [() => S.clsx(g("relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-full border-2 transition-all", j.includes(S.get(L)) ? "border-transparent hover:scale-105" : "scale-110 border-foreground"))]), S.event("submit", f, J), S.delegated("input", P, (e) => S.set(L, e.currentTarget.value, !0)), S.append(t, u);
253
+ }, [() => S.clsx(l("relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-full border-2 transition-all", j.includes(S.get(L)) ? "border-transparent hover:scale-105" : "scale-110 border-foreground"))]), S.event("submit", s, J), S.delegated("input", P, (e) => S.set(L, e.currentTarget.value, !0)), S.append(t, r);
254
254
  },
255
255
  $$slots: { default: !0 }
256
256
  }), S.pop();
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "../settings-blyobazp.js";
1
+ import { a as e, i as t, n, r, t as i } from "../settings-DSrUl4hW.js";
2
2
  export { i as deleteAccount, n as getEmbeddingConfig, r as getProfile, t as updateEmbeddingConfig, e as updateProfile };
@@ -0,0 +1,8 @@
1
+ import type { Component, Snippet } from "svelte";
2
+ export interface DocsmintRouteAdapter {
3
+ pathname: string;
4
+ resolve(path: string): string;
5
+ navigate?(path: string): void | Promise<void>;
6
+ }
7
+ export interface DocsmintAppShellHostProps { route: DocsmintRouteAdapter; extensions?: Record<string, unknown>; children: Snippet; }
8
+ export declare const DocsmintAppShellHost: Component<DocsmintAppShellHostProps>;
@@ -0,0 +1,291 @@
1
+ import { t as e } from "./Icon-CooFj4Ee.js";
2
+ import { n as t, r as n } from "./SettingsDialog-BHh68rTB.js";
3
+ import { t as r } from "./Sidebar-Cu3JrKDC.js";
4
+ import { E as i } from "./messages-C5Q890i2.js";
5
+ import { t as a } from "./HiaiDocsExtensionProvider-DHWLzRUu.js";
6
+ import "svelte/internal/disclose-version";
7
+ import * as o from "svelte/internal/client";
8
+ import "svelte/internal/flags/legacy";
9
+ import { onDestroy as s } from "svelte";
10
+ //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/arrow-up.svelte
11
+ function c(t, n) {
12
+ let r = o.legacy_rest_props(n, [
13
+ "children",
14
+ "$$slots",
15
+ "$$events",
16
+ "$$legacy"
17
+ ]), i = [["path", { d: "m5 12 7-7 7 7" }], ["path", { d: "M12 19V5" }]];
18
+ e(t, o.spread_props({ name: "arrow-up" }, () => r, {
19
+ get iconNode() {
20
+ return i;
21
+ },
22
+ children: (e, t) => {
23
+ var r = o.comment(), i = o.first_child(r);
24
+ o.slot(i, n, "default", {}, null), o.append(e, r);
25
+ },
26
+ $$slots: { default: !0 }
27
+ }));
28
+ }
29
+ //#endregion
30
+ //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/menu.svelte
31
+ function l(t, n) {
32
+ let r = o.legacy_rest_props(n, [
33
+ "children",
34
+ "$$slots",
35
+ "$$events",
36
+ "$$legacy"
37
+ ]), i = [
38
+ ["path", { d: "M4 5h16" }],
39
+ ["path", { d: "M4 12h16" }],
40
+ ["path", { d: "M4 19h16" }]
41
+ ];
42
+ e(t, o.spread_props({ name: "menu" }, () => r, {
43
+ get iconNode() {
44
+ return i;
45
+ },
46
+ children: (e, t) => {
47
+ var r = o.comment(), i = o.first_child(r);
48
+ o.slot(i, n, "default", {}, null), o.append(e, r);
49
+ },
50
+ $$slots: { default: !0 }
51
+ }));
52
+ }
53
+ //#endregion
54
+ //#region src/lib/stores/mobile-sidebar.svelte.ts
55
+ var u = o.state(!1), d = {
56
+ get open() {
57
+ return o.get(u);
58
+ },
59
+ set open(e) {
60
+ o.set(u, e, !0);
61
+ },
62
+ toggle() {
63
+ o.set(u, !o.get(u));
64
+ }
65
+ };
66
+ function f() {
67
+ o.set(u, !1);
68
+ }
69
+ //#endregion
70
+ //#region src/lib/components/MobileSidebarToggle.svelte
71
+ var p = o.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>");
72
+ function m(e, t) {
73
+ o.push(t, !0);
74
+ let n = o.prop(t, "buttonRef", 15, null), r = o.prop(t, "controls", 3, "mobile-navigation"), i = o.state(!1);
75
+ function a() {
76
+ let e = Array.from(document.querySelectorAll("[role=\"dialog\"][aria-modal=\"true\"]"));
77
+ o.set(i, e.length > 0), document.documentElement.classList.toggle("nested-sidebar-modal-open", e.some((e) => e.tagName !== "ASIDE"));
78
+ }
79
+ o.user_effect(() => {
80
+ if (typeof document > "u") return;
81
+ let e = new MutationObserver(a);
82
+ return e.observe(document.body, {
83
+ childList: !0,
84
+ subtree: !0,
85
+ attributes: !0,
86
+ attributeFilter: ["role", "aria-modal"]
87
+ }), a(), () => {
88
+ e.disconnect(), document.documentElement.classList.remove("nested-sidebar-modal-open");
89
+ };
90
+ });
91
+ function s() {
92
+ d.toggle();
93
+ }
94
+ var c = o.comment(), u = o.first_child(c), f = (e) => {
95
+ var t = p();
96
+ l(o.child(t), { class: "size-5" }), o.reset(t), o.bind_this(t, (e) => n(e), () => n()), o.template_effect(() => {
97
+ o.set_attribute(t, "aria-label", d.open ? "Close navigation menu" : "Open navigation menu"), o.set_attribute(t, "aria-expanded", d.open), o.set_attribute(t, "aria-controls", r());
98
+ }), o.delegated("click", t, s), o.append(e, t);
99
+ };
100
+ o.if(u, (e) => {
101
+ o.get(i) || e(f);
102
+ }), o.append(e, c), o.pop();
103
+ }
104
+ o.delegate(["click"]);
105
+ //#endregion
106
+ //#region src/lib/components/ScrollToTop.svelte
107
+ var h = o.from_html("<button type=\"button\"><!></button>");
108
+ function g(e, t) {
109
+ o.push(t, !0);
110
+ let n = o.prop(t, "avoidEditorToolbar", 3, !1), r = o.state(!1), a = null, l = o.state("none"), u = o.state(void 0);
111
+ function d() {
112
+ o.set(r, (a ? a.scrollTop : window.scrollY) > 300);
113
+ }
114
+ function f() {
115
+ a ? a.scrollTo({
116
+ top: 0,
117
+ behavior: "smooth"
118
+ }) : window.scrollTo({
119
+ top: 0,
120
+ behavior: "smooth"
121
+ });
122
+ }
123
+ function p(e) {
124
+ m(), e && (a = e, e.addEventListener("scroll", d, { passive: !0 }), d());
125
+ }
126
+ function m() {
127
+ a && a.removeEventListener("scroll", d), a = null;
128
+ }
129
+ o.user_effect(() => {
130
+ let e = t.scrollTarget;
131
+ return p(e), e ? () => {
132
+ m();
133
+ } : (window.addEventListener("scroll", d, { passive: !0 }), d(), () => {
134
+ window.removeEventListener("scroll", d);
135
+ });
136
+ }), s(() => {
137
+ m(), o.set(r, !1);
138
+ }), o.user_effect(() => {
139
+ if (!n() || typeof document > "u") {
140
+ o.set(l, "none"), o.set(u, void 0);
141
+ return;
142
+ }
143
+ let e = () => {
144
+ let e = document.querySelector(".toolbar.floating-bar");
145
+ if (e) {
146
+ let t = e.getBoundingClientRect();
147
+ o.set(l, "toolbar"), o.set(u, `${Math.max(0, window.innerHeight - t.top + 12)}px`);
148
+ return;
149
+ }
150
+ let t = document.querySelector(".floating-fab");
151
+ if (t) {
152
+ let e = t.getBoundingClientRect();
153
+ o.set(l, "fab"), o.set(u, `${Math.max(12, window.innerHeight - e.bottom - 12 - 40)}px`);
154
+ return;
155
+ }
156
+ o.set(l, "none"), o.set(u, void 0);
157
+ }, t = new MutationObserver(e);
158
+ t.observe(document.body, {
159
+ childList: !0,
160
+ subtree: !0,
161
+ attributes: !0,
162
+ attributeFilter: ["class"]
163
+ });
164
+ let r = new ResizeObserver(e);
165
+ return r.observe(document.body), window.addEventListener("resize", e, { passive: !0 }), e(), () => {
166
+ t.disconnect(), r.disconnect(), window.removeEventListener("resize", e);
167
+ };
168
+ });
169
+ var g = h();
170
+ let _, v;
171
+ c(o.child(g), { class: "size-5" }), o.reset(g), o.template_effect((e, t) => {
172
+ _ = o.set_class(g, 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 ${o.get(r) ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`, null, _, {
173
+ "above-editor-toolbar": o.get(l) === "toolbar",
174
+ "below-editor-fab": o.get(l) === "fab"
175
+ }), o.set_attribute(g, "aria-label", e), o.set_attribute(g, "title", t), v = o.set_style(g, "", v, { bottom: o.get(u) });
176
+ }, [() => i(), () => i()]), o.delegated("click", g, f), o.append(e, g), o.pop();
177
+ }
178
+ o.delegate(["click"]);
179
+ //#endregion
180
+ //#region src/lib/hosts/DocsmintAppShellHost.svelte
181
+ var _ = o.from_html("<button type=\"button\" tabindex=\"-1\" aria-label=\"Close navigation menu\" class=\"fixed inset-0 z-40 bg-black/50\"></button>"), v = o.from_html("<div class=\"flex h-screen\" data-docsmint-app-shell-host=\"\"><!> <main id=\"main-content\" class=\"relative z-0 flex-1 overflow-auto\"><!></main></div> <!> <!>", 1), y = o.from_html("<!> <!>", 1);
182
+ function b(e, i) {
183
+ o.push(i, !0);
184
+ let s = o.prop(i, "extensions", 19, () => ({}));
185
+ n.init(), t.init();
186
+ let c = o.state(null), l = o.state(null), u = o.state(null), p = o.state(!1), h = [
187
+ "a[href]",
188
+ "button:not([disabled])",
189
+ "input:not([disabled])",
190
+ "select:not([disabled])",
191
+ "textarea:not([disabled])",
192
+ "[tabindex]:not([tabindex=\"-1\"])"
193
+ ].join(",");
194
+ o.user_effect(() => {
195
+ let e = window.matchMedia("(max-width: 767px)"), t = () => {
196
+ o.set(p, e.matches, !0), o.get(p) || f();
197
+ };
198
+ return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
199
+ }), o.user_effect(() => {
200
+ i.route.pathname, f();
201
+ }), o.user_effect(() => {
202
+ if (!o.get(p) || !d.open || !o.get(l)) return;
203
+ let e = document.activeElement instanceof HTMLElement ? document.activeElement : o.get(u), t = document.body.style.overflow;
204
+ document.body.style.overflow = "hidden";
205
+ let n = () => Array.from(o.get(l)?.querySelectorAll(h) ?? []).filter((e) => !e.hasAttribute("disabled")), r = (e) => {
206
+ let t = e.target instanceof Element ? e.target.closest("[role=\"dialog\"]") : null;
207
+ if (t && t !== o.get(l)) return;
208
+ if (e.key === "Escape") {
209
+ e.preventDefault(), f();
210
+ return;
211
+ }
212
+ if (e.key !== "Tab") return;
213
+ let r = n(), i = r.at(0), a = r.at(-1);
214
+ if (!i || !a) {
215
+ e.preventDefault(), o.get(l)?.focus();
216
+ return;
217
+ }
218
+ e.shiftKey && document.activeElement === i ? (e.preventDefault(), a.focus()) : !e.shiftKey && document.activeElement === a && (e.preventDefault(), i.focus());
219
+ };
220
+ document.addEventListener("keydown", r);
221
+ let i = requestAnimationFrame(() => {
222
+ (n().at(0) ?? o.get(l))?.focus();
223
+ });
224
+ return () => {
225
+ cancelAnimationFrame(i), document.removeEventListener("keydown", r), document.body.style.overflow = t, e?.isConnected && e.focus();
226
+ };
227
+ });
228
+ var b = y(), x = o.first_child(b);
229
+ a(x, {
230
+ get extensions() {
231
+ return s();
232
+ },
233
+ children: (e, t) => {
234
+ var n = v(), a = o.first_child(n), s = o.child(a);
235
+ r(s, {
236
+ get mobile() {
237
+ return o.get(p);
238
+ },
239
+ get mobileOpen() {
240
+ return d.open;
241
+ },
242
+ get element() {
243
+ return o.get(l);
244
+ },
245
+ set element(e) {
246
+ o.set(l, e, !0);
247
+ }
248
+ });
249
+ var h = o.sibling(s, 2), g = o.child(h);
250
+ o.snippet(g, () => i.children), o.reset(h), o.bind_this(h, (e) => o.set(c, e), () => o.get(c)), o.reset(a);
251
+ var y = o.sibling(a, 2);
252
+ m(y, {
253
+ get buttonRef() {
254
+ return o.get(u);
255
+ },
256
+ set buttonRef(e) {
257
+ o.set(u, e, !0);
258
+ }
259
+ });
260
+ var b = o.sibling(y, 2), x = (e) => {
261
+ var t = _();
262
+ o.delegated("click", t, function(...e) {
263
+ f?.apply(this, e);
264
+ }), o.append(e, t);
265
+ };
266
+ o.if(b, (e) => {
267
+ o.get(p) && d.open && e(x);
268
+ }), o.template_effect(() => h.inert = o.get(p) && d.open), o.append(e, n);
269
+ },
270
+ $$slots: { default: !0 }
271
+ });
272
+ var S = o.sibling(x, 2), C = (e) => {
273
+ {
274
+ let t = o.derived(() => i.route.pathname.startsWith("/docs/"));
275
+ g(e, {
276
+ get scrollTarget() {
277
+ return o.get(c);
278
+ },
279
+ get avoidEditorToolbar() {
280
+ return o.get(t);
281
+ }
282
+ });
283
+ }
284
+ };
285
+ o.if(S, (e) => {
286
+ n.showScrollToTop && e(C);
287
+ }), o.append(e, b), o.pop();
288
+ }
289
+ o.delegate(["click"]);
290
+ //#endregion
291
+ export { b as DocsmintAppShellHost };