@hiai-gg/docsmint 0.3.2 → 0.3.4

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.
@@ -9,7 +9,8 @@ import { t as W } from "./client-B9hzI0W8.js";
9
9
  import { s as it } from "./documents-DFVS9SsL.js";
10
10
  import { s as at } from "./folders-CGe9diAG.js";
11
11
  import { i as ot } from "./categories-BE6ZpZl8.js";
12
- import { goto as G } from "$app/navigation";
12
+ import { i as G } from "./search-preferences-B1GdbdUc.js";
13
+ import { goto as K } from "$app/navigation";
13
14
  //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/file-search.svelte
14
15
  function st(e, t) {
15
16
  let n = Fe(t, [
@@ -82,7 +83,10 @@ async function lt(e, t = 1, n = 20, r = "relevance", i) {
82
83
  page: String(t),
83
84
  limit: String(n)
84
85
  });
85
- return r !== "relevance" && a.set("sort", r), i?.folder && a.set("folder", i.folder), i?.tags && i.tags.length > 0 && a.set("tags", i.tags.join(",")), i?.category && a.set("category", i.category), i?.dateFrom && a.set("dateFrom", i.dateFrom), i?.dateTo && a.set("dateTo", i.dateTo), W(`/api/search?${a}`, { timeout: 15e3 });
86
+ return r !== "relevance" && a.set("sort", r), i?.folder && a.set("folder", i.folder), i?.tags && i.tags.length > 0 && a.set("tags", i.tags.join(",")), i?.category && a.set("category", i.category), i?.dateFrom && a.set("dateFrom", i.dateFrom), i?.dateTo && a.set("dateTo", i.dateTo), W(`/api/search?${a}`, {
87
+ timeout: 15e3,
88
+ headers: G().graphSearchEnabled ? void 0 : { "X-Docsmint-Graph-Search": "disabled" }
89
+ });
86
90
  }
87
91
  async function ut() {
88
92
  let [e, t, n] = await Promise.allSettled([
@@ -98,8 +102,8 @@ async function ut() {
98
102
  }
99
103
  //#endregion
100
104
  //#region src/lib/components/SearchResult.svelte
101
- var K = T("<span class=\"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300\"><!> </span>"), q = T("<span class=\"inline-flex min-w-0 max-w-full break-words [overflow-wrap:anywhere] items-center rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground\"> </span>"), J = T("<div class=\"mt-3 flex flex-wrap gap-1.5\" aria-label=\"Search match explanations\"></div>"), Y = T("<span class=\"inline-flex min-w-0 max-w-full items-center gap-1 break-words [overflow-wrap:anywhere]\"><!> </span>"), X = T("<span class=\"inline-block size-2 rounded-full\"></span>"), dt = T("<span class=\"inline-flex min-w-0 max-w-full items-center gap-1 rounded-full bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground break-words [overflow-wrap:anywhere]\"><!> </span>"), ft = T("<a class=\"group block min-w-0 overflow-hidden rounded-lg border border-border bg-card p-5 shadow-sm transition-all hover:border-primary/30 hover:shadow-md\"><div class=\"flex min-w-0 items-start justify-between gap-3\"><h3 class=\"min-w-0 break-words [overflow-wrap:anywhere] text-lg font-semibold leading-snug text-foreground group-hover:text-primary transition-colors\"> </h3> <div class=\"flex shrink-0 items-center gap-1.5\"><!> <span> </span></div></div> <p class=\"mt-2 min-w-0 break-words [overflow-wrap:anywhere] text-sm leading-relaxed text-muted-foreground [&amp;_mark]:rounded-sm [&amp;_mark]:bg-primary/20 [&amp;_mark]:px-0.5 [&amp;_mark]:text-inherit dark:[&amp;_mark]:bg-primary/30\"></p> <!> <div class=\"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground\"><!> <!> <span class=\"inline-flex items-center gap-1\"><!> </span></div></a>");
102
- function pt(e, t) {
105
+ var q = T("<span class=\"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300\"><!> </span>"), J = T("<span class=\"inline-flex min-w-0 max-w-full break-words [overflow-wrap:anywhere] items-center rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground\"> </span>"), Y = T("<div class=\"mt-3 flex flex-wrap gap-1.5\" aria-label=\"Search match explanations\"></div>"), X = T("<span class=\"inline-flex min-w-0 max-w-full items-center gap-1 break-words [overflow-wrap:anywhere]\"><!> </span>"), dt = T("<span class=\"inline-block size-2 rounded-full\"></span>"), ft = T("<span class=\"inline-flex min-w-0 max-w-full items-center gap-1 rounded-full bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground break-words [overflow-wrap:anywhere]\"><!> </span>"), pt = T("<a class=\"group block min-w-0 overflow-hidden rounded-lg border border-border bg-card p-5 shadow-sm transition-all hover:border-primary/30 hover:shadow-md\"><div class=\"flex min-w-0 items-start justify-between gap-3\"><h3 class=\"min-w-0 break-words [overflow-wrap:anywhere] text-lg font-semibold leading-snug text-foreground group-hover:text-primary transition-colors\"> </h3> <div class=\"flex shrink-0 items-center gap-1.5\"><!> <span> </span></div></div> <p class=\"mt-2 min-w-0 break-words [overflow-wrap:anywhere] text-sm leading-relaxed text-muted-foreground [&amp;_mark]:rounded-sm [&amp;_mark]:bg-primary/20 [&amp;_mark]:px-0.5 [&amp;_mark]:text-inherit dark:[&amp;_mark]:bg-primary/30\"></p> <!> <div class=\"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground\"><!> <!> <span class=\"inline-flex items-center gap-1\"><!> </span></div></a>");
106
+ function mt(e, t) {
103
107
  je(t, !0);
104
108
  let n = Pe(t, "query", 3, ""), r = Pe(t, "titleMatch", 3, !1), i = Pe(t, "explanations", 19, () => []), a = I(() => u(t.snippet, n())), o = I(() => Math.round(t.score * 100)), s = I(() => r() || S(o) >= 90 ? "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300" : S(o) >= 75 ? "bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300" : "bg-muted text-muted-foreground"), c = I(() => new Date(t.createdAt).toLocaleDateString("en-US", {
105
109
  year: "numeric",
@@ -114,10 +118,10 @@ function pt(e, t) {
114
118
  let n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
115
119
  return l(e).replace(RegExp(`(${n})`, "gi"), "<mark>$1</mark>");
116
120
  }
117
- var d = ft(), f = v(d), p = v(f), ee = v(p, !0);
121
+ var d = pt(), f = v(d), p = v(f), ee = v(p, !0);
118
122
  k(p);
119
123
  var te = B(p, 2), ne = v(te), m = (e) => {
120
- var t = K(), n = v(t);
124
+ var t = q(), n = v(t);
121
125
  U(n, { class: "size-3" });
122
126
  var r = B(n);
123
127
  k(t), z((e, n) => {
@@ -132,9 +136,9 @@ function pt(e, t) {
132
136
  var ie = B(f, 2);
133
137
  Le(ie, () => S(a), !0), k(ie);
134
138
  var ae = B(ie, 2), oe = (e) => {
135
- var t = J();
139
+ var t = Y();
136
140
  O(t, 21, () => i().slice(0, 3), x, (e, t) => {
137
- var n = q(), r = v(n, !0);
141
+ var n = J(), r = v(n, !0);
138
142
  k(n), z(() => y(r, S(t).label)), F(e, n);
139
143
  }), k(t), F(e, t);
140
144
  };
@@ -142,7 +146,7 @@ function pt(e, t) {
142
146
  i().length > 0 && e(oe);
143
147
  });
144
148
  var se = B(ae, 2), ce = v(se), le = (e) => {
145
- var n = Y(), r = v(n);
149
+ var n = X(), r = v(n);
146
150
  Ze(r, { class: "size-3.5" });
147
151
  var i = B(r);
148
152
  k(n), z(() => y(i, ` ${t.folderName ?? ""}`)), F(e, n);
@@ -153,8 +157,8 @@ function pt(e, t) {
153
157
  var _ = B(ce, 2), ue = (e) => {
154
158
  var n = w();
155
159
  O(j(n), 17, () => t.tags, (e) => e.id, (e, t) => {
156
- var n = dt(), r = v(n), i = (e) => {
157
- var n = X();
160
+ var n = ft(), r = v(n), i = (e) => {
161
+ var n = dt();
158
162
  z(() => Ne(n, `background-color: ${S(t).color ?? ""}`)), F(e, n);
159
163
  };
160
164
  b(r, (e) => {
@@ -173,23 +177,23 @@ function pt(e, t) {
173
177
  k(de), k(se), k(d), z(() => {
174
178
  A(d, "href", `/docs/${t.id ?? ""}`), y(ee, t.title), Me(h, 1, `rounded-full px-2.5 py-0.5 text-xs font-medium ${S(s) ?? ""}`), y(re, `${S(o) ?? ""}%`), y(pe, ` ${S(c) ?? ""}`);
175
179
  }), E("click", d, (e) => {
176
- e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), G(`/docs/${t.id}`));
180
+ e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), K(`/docs/${t.id}`));
177
181
  }), F(e, d), Ae();
178
182
  }
179
183
  Ee(["click"]);
180
184
  //#endregion
181
185
  //#region src/lib/search/resubmit.ts
182
- function mt(e) {
186
+ function ht(e) {
183
187
  return e.trim();
184
188
  }
185
- function ht({ submittedQuery: e, loadedQuery: t, currentPage: n }) {
186
- let r = mt(e);
187
- return r.length > 0 && r === mt(t ?? "") && n === 1;
189
+ function gt({ submittedQuery: e, loadedQuery: t, currentPage: n }) {
190
+ let r = ht(e);
191
+ return r.length > 0 && r === ht(t ?? "") && n === 1;
188
192
  }
189
193
  //#endregion
190
194
  //#region src/lib/hosts/HiaiDocsSearchHost.svelte
191
- var gt = (e) => {
192
- var t = Et(), n = v(t), r = B(v(n), 2), i = v(r);
195
+ var _t = (e) => {
196
+ var t = Dt(), n = v(t), r = B(v(n), 2), i = v(r);
193
197
  V(v(i), { class: "size-5 animate-spin" }), k(i);
194
198
  var a = B(i, 2), o = v(a), s = v(o, !0);
195
199
  k(o);
@@ -199,16 +203,16 @@ var gt = (e) => {
199
203
  ,
200
204
  ,
201
205
  ], x, (e, t) => {
202
- F(e, Tt());
206
+ F(e, Et());
203
207
  }), k(t), z((e, t) => {
204
208
  y(s, e), y(l, t);
205
209
  }, [() => ge(), () => d()]), F(e, t);
206
- }, _t = T("<button class=\"inline-flex w-full items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground\"><!> </button>"), vt = T("<button><span class=\"truncate\"> </span> <!></button>"), yt = T("<div class=\"space-y-0.5\"></div>"), bt = T("<div><button type=\"button\" class=\"mb-2 flex w-full items-center justify-between text-xs font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"><span class=\"flex items-center gap-1.5\"><!> </span> <!></button> <!></div>"), xt = T("<span class=\"mr-1.5 inline-block size-2 rounded-full\"></span>"), St = T("<button><!> </button>"), Ct = T("<div><h4 class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"><!> </h4> <div class=\"flex flex-wrap gap-1.5\"></div></div>"), wt = T("<div class=\"space-y-6\"><!> <!> <!> <!> <div><h4 class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"><!> </h4> <div class=\"space-y-2\"><div><label for=\"dateFrom\" class=\"text-xs text-muted-foreground\"> </label> <div class=\"mt-0.5\"><!></div></div> <div><label for=\"dateTo\" class=\"text-xs text-muted-foreground\"> </label> <div class=\"mt-0.5\"><!></div></div></div></div></div>"), Tt = T("<div class=\"animate-pulse rounded-lg border border-border bg-card p-5\"><div class=\"flex items-start justify-between gap-3\"><div class=\"h-5 w-2/3 rounded bg-muted\"></div> <div class=\"h-5 w-12 rounded-full bg-muted\"></div></div> <div class=\"mt-3 space-y-2\"><div class=\"h-4 w-full rounded bg-muted\"></div> <div class=\"h-4 w-5/6 rounded bg-muted\"></div></div> <div class=\"mt-3 flex gap-4\"><div class=\"h-3.5 w-20 rounded bg-muted\"></div> <div class=\"h-3.5 w-28 rounded bg-muted\"></div> <div class=\"h-3.5 w-24 rounded bg-muted\"></div></div></div>"), Et = T("<div class=\"space-y-4\" aria-live=\"polite\" aria-busy=\"true\"><div class=\"relative overflow-hidden rounded-xl border border-primary/20 bg-gradient-to-r from-primary/10 via-card to-primary/5 px-5 py-4\"><div class=\"absolute inset-y-0 left-0 w-1 bg-primary\"></div> <div class=\"flex items-center gap-3\"><div class=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary\"><!></div> <div><p class=\"font-medium text-foreground\"> </p> <p class=\"mt-0.5 text-sm text-muted-foreground\"> </p></div></div></div> <!></div>"), Dt = T("<!> <!> <!> <!>", 1), Ot = T("<!> <!>", 1), kt = T("<!> <!> <!> <!> <!>", 1), At = T("<button> </button>"), jt = T("<span class=\"px-1 text-muted-foreground\">...</span>"), Mt = T("<nav class=\"mt-8 flex items-center justify-center gap-1.5\"><button class=\"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-2.5 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50\"><!></button> <!> <button class=\"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-2.5 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50\"><!></button></nav>"), Nt = T("<div><div class=\"mb-4 flex items-center justify-between gap-3\"><div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground\"><p> <span class=\"font-medium text-foreground\"> </span>\"</p></div> <div class=\"flex items-center gap-4\"><div class=\"flex items-center gap-1.5 text-sm text-muted-foreground\"><span>Results per page:</span> <!></div> <!></div></div> <div class=\"space-y-3\"></div> <!></div>"), Pt = T("<button class=\"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-input bg-background px-4 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground\"><!> </button>"), Ft = T("<button class=\"rounded-full border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:border-primary/30 hover:bg-muted hover:text-foreground\"> </button>"), It = T("<div class=\"flex flex-col items-center justify-center py-20 text-center\"><!> <h2 class=\"text-xl font-semibold text-foreground\"> </h2> <p class=\"mt-2 max-w-sm text-sm text-muted-foreground\"> </p> <div class=\"mt-6 flex gap-3\"><!> <button class=\"inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90\"> </button></div> <div class=\"mt-10\"><p class=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"> </p> <div class=\"flex flex-wrap justify-center gap-2\"></div></div></div>"), Lt = T("<div class=\"flex flex-col items-center justify-center py-20 text-center\"><!> <h2 class=\"text-xl font-semibold text-foreground\"> </h2> <p class=\"mt-2 max-w-sm text-sm text-muted-foreground\"> </p> <div class=\"mt-8\"><p class=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"> </p> <div class=\"flex flex-wrap justify-center gap-2\"></div></div></div>"), Rt = T("<button type=\"button\" class=\"rounded-md p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground\"><!></button>"), zt = T("<div class=\"fixed inset-0 z-50 bg-black/50 lg:hidden\"><div class=\"absolute right-0 top-0 h-full w-72 overflow-y-auto bg-background p-6 shadow-xl\"><div class=\"mb-4 flex items-center justify-between\"><h3 class=\"text-sm font-semibold uppercase tracking-wider text-muted-foreground\"> </h3> <button class=\"rounded-md p-1 text-muted-foreground hover:text-foreground\"><!></button></div> <!></div></div>"), Bt = T("<a class=\"flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent\"><!> <span class=\"font-medium text-sm truncate\"> </span></a>"), Vt = T("<div class=\"space-y-2\"><h4 class=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground/80\"> </h4> <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\"></div></div>"), Ht = T("<div class=\"mb-6 space-y-4\"><h3 class=\"text-sm font-semibold uppercase tracking-wider text-muted-foreground\">Instant Title Matches</h3> <!> <!> <!></div>"), Ut = T("<h4 class=\"mb-2 text-sm font-medium\"> </h4>"), Wt = T("<div><!> <!></div>"), Gt = T("<section class=\"mb-4 space-y-3\" data-hiai-docs-extension-zone=\"search-widgets\" aria-label=\"Search extensions\"></section>"), Kt = T("<div class=\"border-t border-border/60 pt-6\"><h3 class=\"mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground\">AI-powered Semantic Search</h3> <!> <!></div>"), qt = T("<div class=\"search-shell mx-auto max-w-6xl px-4 py-8\"><form class=\"search-form relative mb-6 svelte-itf76n\"><!> <input type=\"text\" class=\"h-14 w-full rounded-xl border border-input bg-background pl-12 pr-24 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"/> <div class=\"absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1\"><!> <button type=\"button\" class=\"rounded-md p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground lg:hidden\"><!></button></div></form> <div class=\"flex gap-8\"><aside class=\"hidden lg:block w-56 shrink-0 space-y-6\"><!></aside> <!> <main class=\"min-w-0 flex-1\"><!> <!></main></div></div>");
207
- function Jt(d, g) {
210
+ }, vt = T("<button class=\"inline-flex w-full items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground\"><!> </button>"), yt = T("<button><span class=\"truncate\"> </span> <!></button>"), bt = T("<div class=\"space-y-0.5\"></div>"), xt = T("<div><button type=\"button\" class=\"mb-2 flex w-full items-center justify-between text-xs font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"><span class=\"flex items-center gap-1.5\"><!> </span> <!></button> <!></div>"), St = T("<span class=\"mr-1.5 inline-block size-2 rounded-full\"></span>"), Ct = T("<button><!> </button>"), wt = T("<div><h4 class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"><!> </h4> <div class=\"flex flex-wrap gap-1.5\"></div></div>"), Tt = T("<div class=\"space-y-6\"><!> <!> <!> <!> <div><h4 class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"><!> </h4> <div class=\"space-y-2\"><div><label for=\"dateFrom\" class=\"text-xs text-muted-foreground\"> </label> <div class=\"mt-0.5\"><!></div></div> <div><label for=\"dateTo\" class=\"text-xs text-muted-foreground\"> </label> <div class=\"mt-0.5\"><!></div></div></div></div></div>"), Et = T("<div class=\"animate-pulse rounded-lg border border-border bg-card p-5\"><div class=\"flex items-start justify-between gap-3\"><div class=\"h-5 w-2/3 rounded bg-muted\"></div> <div class=\"h-5 w-12 rounded-full bg-muted\"></div></div> <div class=\"mt-3 space-y-2\"><div class=\"h-4 w-full rounded bg-muted\"></div> <div class=\"h-4 w-5/6 rounded bg-muted\"></div></div> <div class=\"mt-3 flex gap-4\"><div class=\"h-3.5 w-20 rounded bg-muted\"></div> <div class=\"h-3.5 w-28 rounded bg-muted\"></div> <div class=\"h-3.5 w-24 rounded bg-muted\"></div></div></div>"), Dt = T("<div class=\"space-y-4\" aria-live=\"polite\" aria-busy=\"true\"><div class=\"relative overflow-hidden rounded-xl border border-primary/20 bg-gradient-to-r from-primary/10 via-card to-primary/5 px-5 py-4\"><div class=\"absolute inset-y-0 left-0 w-1 bg-primary\"></div> <div class=\"flex items-center gap-3\"><div class=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary\"><!></div> <div><p class=\"font-medium text-foreground\"> </p> <p class=\"mt-0.5 text-sm text-muted-foreground\"> </p></div></div></div> <!></div>"), Ot = T("<!> <!> <!> <!>", 1), kt = T("<!> <!>", 1), At = T("<!> <!> <!> <!> <!>", 1), jt = T("<button> </button>"), Mt = T("<span class=\"px-1 text-muted-foreground\">...</span>"), Nt = T("<nav class=\"mt-8 flex items-center justify-center gap-1.5\"><button class=\"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-2.5 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50\"><!></button> <!> <button class=\"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-2.5 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50\"><!></button></nav>"), Pt = T("<div><div class=\"mb-4 flex items-center justify-between gap-3\"><div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground\"><p> <span class=\"font-medium text-foreground\"> </span>\"</p></div> <div class=\"flex items-center gap-4\"><div class=\"flex items-center gap-1.5 text-sm text-muted-foreground\"><span>Results per page:</span> <!></div> <!></div></div> <div class=\"space-y-3\"></div> <!></div>"), Ft = T("<button class=\"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-input bg-background px-4 text-sm font-medium text-muted-foreground shadow-sm transition-colors hover:bg-muted hover:text-foreground\"><!> </button>"), It = T("<button class=\"rounded-full border border-border bg-card px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:border-primary/30 hover:bg-muted hover:text-foreground\"> </button>"), Lt = T("<div class=\"flex flex-col items-center justify-center py-20 text-center\"><!> <h2 class=\"text-xl font-semibold text-foreground\"> </h2> <p class=\"mt-2 max-w-sm text-sm text-muted-foreground\"> </p> <div class=\"mt-6 flex gap-3\"><!> <button class=\"inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90\"> </button></div> <div class=\"mt-10\"><p class=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"> </p> <div class=\"flex flex-wrap justify-center gap-2\"></div></div></div>"), Rt = T("<div class=\"flex flex-col items-center justify-center py-20 text-center\"><!> <h2 class=\"text-xl font-semibold text-foreground\"> </h2> <p class=\"mt-2 max-w-sm text-sm text-muted-foreground\"> </p> <div class=\"mt-8\"><p class=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\"> </p> <div class=\"flex flex-wrap justify-center gap-2\"></div></div></div>"), zt = T("<button type=\"button\" class=\"rounded-md p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground\"><!></button>"), Bt = T("<div class=\"fixed inset-0 z-50 bg-black/50 lg:hidden\"><div class=\"absolute right-0 top-0 h-full w-72 overflow-y-auto bg-background p-6 shadow-xl\"><div class=\"mb-4 flex items-center justify-between\"><h3 class=\"text-sm font-semibold uppercase tracking-wider text-muted-foreground\"> </h3> <button class=\"rounded-md p-1 text-muted-foreground hover:text-foreground\"><!></button></div> <!></div></div>"), Vt = T("<a class=\"flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent\"><!> <span class=\"font-medium text-sm truncate\"> </span></a>"), Ht = T("<div class=\"space-y-2\"><h4 class=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground/80\"> </h4> <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\"></div></div>"), Ut = T("<div class=\"mb-6 space-y-4\"><h3 class=\"text-sm font-semibold uppercase tracking-wider text-muted-foreground\">Instant Title Matches</h3> <!> <!> <!></div>"), Wt = T("<h4 class=\"mb-2 text-sm font-medium\"> </h4>"), Gt = T("<div><!> <!></div>"), Kt = T("<section class=\"mb-4 space-y-3\" data-hiai-docs-extension-zone=\"search-widgets\" aria-label=\"Search extensions\"></section>"), qt = T("<div class=\"border-t border-border/60 pt-6\"><h3 class=\"mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground\">AI-powered Semantic Search</h3> <!> <!></div>"), Jt = T("<div class=\"search-shell mx-auto max-w-6xl px-4 py-8\"><form class=\"search-form relative mb-6 svelte-itf76n\"><!> <input type=\"text\" class=\"h-14 w-full rounded-xl border border-input bg-background pl-12 pr-24 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"/> <div class=\"absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1\"><!> <button type=\"button\" class=\"rounded-md p-2 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground lg:hidden\"><!></button></div></form> <div class=\"flex gap-8\"><aside class=\"hidden lg:block w-56 shrink-0 space-y-6\"><!></aside> <!> <main class=\"min-w-0 flex-1\"><!> <!></main></div></div>");
211
+ function Z(d, g) {
208
212
  je(g, !0);
209
213
  let ge = (e) => {
210
- var n = wt(), r = v(n), i = (e) => {
211
- var t = _t(), n = v(t);
214
+ var n = Tt(), r = v(n), i = (e) => {
215
+ var t = vt(), n = v(t);
212
216
  Ue(n, { class: "size-3" });
213
217
  var r = B(n);
214
218
  k(t), z((e) => y(r, ` ${e ?? ""}`), [() => be()]), E("click", t, _n), F(e, t);
@@ -217,7 +221,7 @@ function Jt(d, g) {
217
221
  S(rn) && e(i);
218
222
  });
219
223
  var o = B(r, 2), s = (e) => {
220
- var t = bt(), n = v(t), r = v(n), i = v(r);
224
+ var t = xt(), n = v(t), r = v(n), i = v(r);
221
225
  Ze(i, { class: "size-3.5" });
222
226
  var a = B(i);
223
227
  k(r);
@@ -230,9 +234,9 @@ function Jt(d, g) {
230
234
  S(dt) ? e(s) : e(c, -1);
231
235
  }), k(n);
232
236
  var l = B(n, 2), u = (e) => {
233
- var t = yt();
237
+ var t = bt();
234
238
  O(t, 21, () => S(Qt), x, (e, t) => {
235
- var n = vt(), r = v(n), i = v(r, !0);
239
+ var n = yt(), r = v(n), i = v(r, !0);
236
240
  k(r);
237
241
  var a = B(r, 2), o = (e) => {
238
242
  qe(e, { class: "size-3 shrink-0" });
@@ -252,14 +256,14 @@ function Jt(d, g) {
252
256
  S(Qt).length > 0 && e(s);
253
257
  });
254
258
  var c = B(o, 2), l = (e) => {
255
- var t = Ct(), n = v(t), r = v(n);
259
+ var t = wt(), n = v(t), r = v(n);
256
260
  rt(r, { class: "size-3.5" });
257
261
  var i = B(r);
258
262
  k(n);
259
263
  var o = B(n, 2);
260
264
  O(o, 21, () => S($t), (e) => e.id, (e, t) => {
261
- var n = St(), r = v(n), i = (e) => {
262
- var n = xt();
265
+ var n = Ct(), r = v(n), i = (e) => {
266
+ var n = St();
263
267
  z(() => Ne(n, `background-color: ${S(t).color ?? ""}`)), F(e, n);
264
268
  };
265
269
  b(r, (e) => {
@@ -275,7 +279,7 @@ function Jt(d, g) {
275
279
  S($t).length > 0 && e(l);
276
280
  });
277
281
  var u = B(c, 2), d = (e) => {
278
- var t = bt(), n = v(t), r = v(n), i = v(r);
282
+ var t = xt(), n = v(t), r = v(n), i = v(r);
279
283
  We(i, { class: "size-3.5" });
280
284
  var a = B(i);
281
285
  k(r);
@@ -288,9 +292,9 @@ function Jt(d, g) {
288
292
  S(ft) ? e(s) : e(c, -1);
289
293
  }), k(n);
290
294
  var l = B(n, 2), u = (e) => {
291
- var t = yt();
295
+ var t = bt();
292
296
  O(t, 21, () => S(en), (e) => e.id, (e, t) => {
293
- var n = vt(), r = v(n), i = v(r, !0);
297
+ var n = yt(), r = v(n), i = v(r, !0);
294
298
  k(r);
295
299
  var a = B(r, 2), o = (e) => {
296
300
  qe(e, { class: "size-3 shrink-0" });
@@ -328,10 +332,10 @@ function Jt(d, g) {
328
332
  return S(t);
329
333
  },
330
334
  get value() {
331
- return S(K);
335
+ return S(G);
332
336
  },
333
337
  set value(e) {
334
- P(K, e, !0);
338
+ P(G, e, !0);
335
339
  }
336
340
  });
337
341
  }
@@ -366,7 +370,7 @@ function Jt(d, g) {
366
370
  () => t()
367
371
  ]), F(e, n);
368
372
  }, Ce = (t) => {
369
- var n = Nt(), r = v(n), i = v(r), a = v(i), o = v(a), s = B(o), c = v(s, !0);
373
+ var n = Pt(), r = v(n), i = v(r), a = v(i), o = v(a), s = B(o), c = v(s, !0);
370
374
  k(s), M(), k(a), k(i);
371
375
  var l = B(i, 2), u = v(l), d = B(v(u), 2);
372
376
  {
@@ -378,13 +382,13 @@ function Jt(d, g) {
378
382
  return S(e);
379
383
  },
380
384
  onValueChange: (e) => {
381
- e && (P(Y, Number(e), !0), P(J, 1), G($({
385
+ e && (P(Y, Number(e), !0), P(J, 1), K($({
382
386
  page: "1",
383
387
  limit: e
384
388
  }), { replaceState: !0 }));
385
389
  },
386
390
  children: (e, t) => {
387
- var n = Ot(), r = j(n);
391
+ var n = kt(), r = j(n);
388
392
  D(r, () => N.Trigger, (e, t) => {
389
393
  t(e, {
390
394
  class: "h-9 w-[70px] text-foreground flex items-center justify-between bg-background border border-input px-3 py-2 text-sm rounded-md shadow-sm",
@@ -414,7 +418,7 @@ function Jt(d, g) {
414
418
  t(e, {
415
419
  class: "w-[70px]",
416
420
  children: (e, t) => {
417
- var n = Dt(), r = j(n);
421
+ var n = Ot(), r = j(n);
418
422
  D(r, () => N.Item, (e, t) => {
419
423
  t(e, {
420
424
  value: "5",
@@ -470,11 +474,11 @@ function Jt(d, g) {
470
474
  onValueChange: (e) => {
471
475
  if (e) {
472
476
  let t = S(X);
473
- P(X, e, !0), t !== e && (P(J, 1), G($({ page: "1" }), { replaceState: !0 }));
477
+ P(X, e, !0), t !== e && (P(J, 1), K($({ page: "1" }), { replaceState: !0 }));
474
478
  }
475
479
  },
476
480
  children: (t, n) => {
477
- var r = Ot(), i = j(r);
481
+ var r = kt(), i = j(r);
478
482
  D(i, () => N.Trigger, (t, n) => {
479
483
  n(t, {
480
484
  class: "h-9 w-[180px] text-foreground flex items-center justify-between bg-background border border-input px-3 py-2 text-sm rounded-md shadow-sm",
@@ -520,7 +524,7 @@ function Jt(d, g) {
520
524
  n(t, {
521
525
  class: "w-[180px]",
522
526
  children: (t, n) => {
523
- var r = kt(), i = j(r);
527
+ var r = At(), i = j(r);
524
528
  D(i, () => N.Item, (e, t) => {
525
529
  t(e, {
526
530
  value: "relevance",
@@ -590,7 +594,7 @@ function Jt(d, g) {
590
594
  O(f, 21, () => S(Z)?.items ?? [], (e) => e.id, (e, t) => {
591
595
  {
592
596
  let n = I(() => S(t).folder_name ?? ""), r = I(() => S(t).tags ?? []);
593
- pt(e, {
597
+ mt(e, {
594
598
  get id() {
595
599
  return S(t).id;
596
600
  },
@@ -625,18 +629,18 @@ function Jt(d, g) {
625
629
  }
626
630
  }), k(f);
627
631
  var p = B(f, 2), ee = (e) => {
628
- var t = Mt(), n = v(t);
632
+ var t = Nt(), n = v(t);
629
633
  He(v(n), { class: "h-4 w-4" }), k(n);
630
634
  var r = B(n, 2);
631
635
  O(r, 17, () => Array(S(nn)), x, (e, t, n) => {
632
636
  let r = I(() => n + 1);
633
637
  var i = w(), a = j(i), o = (e) => {
634
- var t = At(), n = v(t, !0);
638
+ var t = jt(), n = v(t, !0);
635
639
  k(t), z((e) => {
636
640
  A(t, "aria-label", e), A(t, "aria-current", S(r) === S(J) ? "page" : void 0), Me(t, 1, `inline-flex h-9 min-w-9 items-center justify-center rounded-md px-2.5 text-sm font-medium shadow-sm transition-colors ${S(r) === S(J) ? "bg-primary text-primary-foreground" : "border border-input bg-background text-muted-foreground hover:bg-muted hover:text-foreground"}`), y(n, S(r));
637
641
  }, [() => ne({ num: S(r) })]), E("click", t, () => vn(S(r))), F(e, t);
638
642
  }, s = (e) => {
639
- F(e, jt());
643
+ F(e, Mt());
640
644
  };
641
645
  b(a, (e) => {
642
646
  S(nn) <= 7 || S(r) === 1 || S(r) === S(nn) || S(r) >= S(J) - 1 && S(r) <= S(J) + 1 ? e(o) : (S(r) === 2 || S(r) === S(nn) - 1) && e(s, 1);
@@ -658,14 +662,14 @@ function Jt(d, g) {
658
662
  "`), y(c, g.data.query);
659
663
  }, [() => (S(Z)?.total ?? 0) === 1 ? re({ count: S(Z).total }) : ie({ count: S(Z).total })]), F(t, n);
660
664
  }, Ee = (e) => {
661
- var t = It(), n = v(t);
665
+ var t = Lt(), n = v(t);
662
666
  st(n, { class: "mb-4 h-16 w-16 text-muted-foreground/40" });
663
667
  var r = B(n, 2), i = v(r, !0);
664
668
  k(r);
665
669
  var a = B(r, 2), o = v(a);
666
670
  k(a);
667
671
  var c = B(a, 2), l = v(c), u = (e) => {
668
- var t = Pt(), n = v(t);
672
+ var t = Ft(), n = v(t);
669
673
  Ue(n, { class: "size-3.5" });
670
674
  var r = B(n);
671
675
  k(t), z((e) => y(r, ` ${e ?? ""}`), [() => se()]), E("click", t, _n), F(e, t);
@@ -685,9 +689,9 @@ function Jt(d, g) {
685
689
  "authentication",
686
690
  "embeddings"
687
691
  ], x, (e, t) => {
688
- var n = Ft(), r = v(n, !0);
692
+ var n = It(), r = v(n, !0);
689
693
  k(n), z(() => y(r, t)), E("click", n, () => {
690
- P(V, t, !0), G($({
694
+ P(V, t, !0), K($({
691
695
  q: t,
692
696
  page: "1"
693
697
  }), { replaceState: !0 });
@@ -703,7 +707,7 @@ function Jt(d, g) {
703
707
  () => pe()
704
708
  ]), E("click", d, fn), F(e, t);
705
709
  }, T = (e) => {
706
- var t = Lt(), n = v(t);
710
+ var t = Rt(), n = v(t);
707
711
  nt(n, { class: "mb-4 h-16 w-16 text-muted-foreground/40" });
708
712
  var r = B(n, 2), i = v(r, !0);
709
713
  k(r);
@@ -720,9 +724,9 @@ function Jt(d, g) {
720
724
  "embeddings",
721
725
  "Svelte 5"
722
726
  ], x, (e, t) => {
723
- var n = Ft(), r = v(n, !0);
727
+ var n = It(), r = v(n, !0);
724
728
  k(n), z(() => y(r, t)), E("click", n, () => {
725
- P(V, t, !0), G($({
729
+ P(V, t, !0), K($({
726
730
  q: t,
727
731
  page: "1"
728
732
  }), { replaceState: !0 });
@@ -740,27 +744,27 @@ function Jt(d, g) {
740
744
  Item: Xe,
741
745
  Trigger: Qe,
742
746
  Value: $e
743
- }, Fe = Pe(g, "extensionContext", 19, () => ({ pathname: "/search" })), Le = Se(), V = R(""), H = R(""), U = R(L([])), W = R(""), K = R(""), q = R(""), J = R(1), Y = R(5), X = R("relevance"), dt = R(!0), ft = R(!0), Tt = R(L([])), Et = R(L([])), Jt = R(L([]));
747
+ }, Fe = Pe(g, "extensionContext", 19, () => ({ pathname: "/search" })), Le = Se(), V = R(""), H = R(""), U = R(L([])), W = R(""), G = R(""), q = R(""), J = R(1), Y = R(5), X = R("relevance"), dt = R(!0), ft = R(!0), pt = R(L([])), Et = R(L([])), Dt = R(L([]));
744
748
  Te(() => {
745
- P(V, g.data.query ?? "", !0), P(H, g.data.filters?.folder ?? "", !0), P(U, g.data.filters?.tags ?? [], !0), P(W, g.data.filters?.category ?? "", !0), P(K, g.data.filters?.dateFrom ?? "", !0), P(q, g.data.filters?.dateTo ?? "", !0), P(J, g.data.page ?? 1, !0), P(Y, g.data.limit ?? 5, !0);
749
+ P(V, g.data.query ?? "", !0), P(H, g.data.filters?.folder ?? "", !0), P(U, g.data.filters?.tags ?? [], !0), P(W, g.data.filters?.category ?? "", !0), P(G, g.data.filters?.dateFrom ?? "", !0), P(q, g.data.filters?.dateTo ?? "", !0), P(J, g.data.page ?? 1, !0), P(Y, g.data.limit ?? 5, !0);
746
750
  });
747
- let Z = R(null), Yt = R(!1), Xt = 0, Zt = R(0), Q = R(!1), Qt = R(L([])), $t = R(L([])), en = R(L([])), tn = I(() => Be(Le.searchWidgets, Fe())), nn = I(() => S(Z) ? Math.ceil(S(Z).total / S(Y)) : 0), rn = I(() => S(H) !== "" || S(U).length > 0 || S(W) !== "" || S(K) !== "" || S(q) !== "");
751
+ let Z = R(null), Yt = R(!1), Xt = 0, Zt = R(0), Q = R(!1), Qt = R(L([])), $t = R(L([])), en = R(L([])), tn = I(() => Be(Le.searchWidgets, Fe())), nn = I(() => S(Z) ? Math.ceil(S(Z).total / S(Y)) : 0), rn = I(() => S(H) !== "" || S(U).length > 0 || S(W) !== "" || S(G) !== "" || S(q) !== "");
748
752
  Te(() => {
749
753
  ut().then((e) => {
750
754
  P(Qt, e.folders, !0), P($t, e.tags, !0), P(en, e.categories, !0);
751
755
  }), it({ limit: 1e3 }).then((e) => {
752
- P(Tt, e.items, !0);
756
+ P(pt, e.items, !0);
753
757
  }), at(null, !0).then((e) => {
754
758
  P(Et, e, !0);
755
759
  }), ot().then((e) => {
756
- P(Jt, e, !0);
760
+ P(Dt, e, !0);
757
761
  });
758
762
  });
759
- let an = I(() => S(V).trim().toLowerCase()), on = I(() => S(an) ? S(Tt).filter((e) => e.title.toLowerCase().includes(S(an))) : []), sn = I(() => S(an) ? S(Et).filter((e) => e.name.toLowerCase().includes(S(an))) : []), cn = I(() => S(an) ? S(Jt).filter((e) => e.name.toLowerCase().includes(S(an))) : []), ln = I(() => S(on).length > 0 || S(sn).length > 0 || S(cn).length > 0);
763
+ let an = I(() => S(V).trim().toLowerCase()), on = I(() => S(an) ? S(pt).filter((e) => e.title.toLowerCase().includes(S(an))) : []), sn = I(() => S(an) ? S(Et).filter((e) => e.name.toLowerCase().includes(S(an))) : []), cn = I(() => S(an) ? S(Dt).filter((e) => e.name.toLowerCase().includes(S(an))) : []), ln = I(() => S(on).length > 0 || S(sn).length > 0 || S(cn).length > 0);
760
764
  Te(() => {
761
765
  let e = g.data.query;
762
766
  S(Zt);
763
- let t = g.data.page, n = S(X), r = S(H), i = S(U), a = S(W), o = S(K), s = S(q), c = et(), l = c && !i.includes(c) ? [...i, c] : i;
767
+ let t = g.data.page, n = S(X), r = S(H), i = S(U), a = S(W), o = S(G), s = S(q), c = et(), l = c && !i.includes(c) ? [...i, c] : i;
764
768
  if (!e) {
765
769
  Xt += 1, P(Z, null), P(Yt, !1);
766
770
  return;
@@ -784,17 +788,17 @@ function Jt(d, g) {
784
788
  });
785
789
  });
786
790
  function $(e) {
787
- let t = new URLSearchParams(), n = "q" in e ? e.q : S(V), r = "folder" in e ? e.folder : S(H), i = "tags" in e ? e.tags : S(U).join(","), a = "category" in e ? e.category : S(W), o = "dateFrom" in e ? e.dateFrom : S(K), s = "dateTo" in e ? e.dateTo : S(q), c = "page" in e ? e.page : String(S(J)), l = "limit" in e ? e.limit : String(S(Y));
791
+ let t = new URLSearchParams(), n = "q" in e ? e.q : S(V), r = "folder" in e ? e.folder : S(H), i = "tags" in e ? e.tags : S(U).join(","), a = "category" in e ? e.category : S(W), o = "dateFrom" in e ? e.dateFrom : S(G), s = "dateTo" in e ? e.dateTo : S(q), c = "page" in e ? e.page : String(S(J)), l = "limit" in e ? e.limit : String(S(Y));
788
792
  return n && t.set("q", n), r && t.set("folder", r), i && t.set("tags", i), a && t.set("category", a), o && t.set("dateFrom", o), s && t.set("dateTo", s), c && c !== "1" && t.set("page", c), l && l !== "5" && t.set("limit", l), `/search?${t.toString()}`;
789
793
  }
790
794
  function un(e) {
791
795
  e.preventDefault();
792
- let t = mt(S(V));
796
+ let t = ht(S(V));
793
797
  if (!t) {
794
798
  fn();
795
799
  return;
796
800
  }
797
- if (P(V, t, !0), ht({
801
+ if (P(V, t, !0), gt({
798
802
  submittedQuery: t,
799
803
  loadedQuery: g.data.query,
800
804
  currentPage: S(J)
@@ -802,7 +806,7 @@ function Jt(d, g) {
802
806
  P(J, 1), P(Zt, S(Zt) + 1);
803
807
  return;
804
808
  }
805
- P(J, 1), G($({
809
+ P(J, 1), K($({
806
810
  q: t,
807
811
  page: "1"
808
812
  }), { replaceState: !0 });
@@ -811,35 +815,35 @@ function Jt(d, g) {
811
815
  e.key === "Escape" && (S(Q) ? P(Q, !1) : (S(V) || S(rn)) && fn());
812
816
  }
813
817
  function fn() {
814
- P(V, ""), P(H, ""), P(U, [], !0), P(W, ""), P(K, ""), P(q, ""), P(J, 1), G("/search", { replaceState: !0 });
818
+ P(V, ""), P(H, ""), P(U, [], !0), P(W, ""), P(G, ""), P(q, ""), P(J, 1), K("/search", { replaceState: !0 });
815
819
  }
816
820
  function pn(e) {
817
- P(H, S(H) === e ? "" : e, !0), P(J, 1), G($({
821
+ P(H, S(H) === e ? "" : e, !0), P(J, 1), K($({
818
822
  folder: S(H),
819
823
  page: "1"
820
824
  }), { replaceState: !0 });
821
825
  }
822
826
  function mn(e) {
823
- P(U, S(U).includes(e) ? S(U).filter((t) => t !== e) : [...S(U), e], !0), P(J, 1), G($({
827
+ P(U, S(U).includes(e) ? S(U).filter((t) => t !== e) : [...S(U), e], !0), P(J, 1), K($({
824
828
  tags: S(U).join(","),
825
829
  page: "1"
826
830
  }), { replaceState: !0 });
827
831
  }
828
832
  function hn(e) {
829
- P(W, S(W) === e ? "" : e, !0), P(J, 1), G($({
833
+ P(W, S(W) === e ? "" : e, !0), P(J, 1), K($({
830
834
  category: S(W),
831
835
  page: "1"
832
836
  }), { replaceState: !0 });
833
837
  }
834
838
  function gn() {
835
- P(J, 1), G($({
836
- dateFrom: S(K),
839
+ P(J, 1), K($({
840
+ dateFrom: S(G),
837
841
  dateTo: S(q),
838
842
  page: "1"
839
843
  }), { replaceState: !0 });
840
844
  }
841
845
  function _n() {
842
- P(H, ""), P(U, [], !0), P(W, ""), P(K, ""), P(q, ""), P(J, 1), G($({
846
+ P(H, ""), P(U, [], !0), P(W, ""), P(G, ""), P(q, ""), P(J, 1), K($({
843
847
  folder: void 0,
844
848
  tags: void 0,
845
849
  category: void 0,
@@ -849,9 +853,9 @@ function Jt(d, g) {
849
853
  }), { replaceState: !0 });
850
854
  }
851
855
  function vn(e) {
852
- P(J, e, !0), G($({ page: String(e) }), { replaceState: !0 });
856
+ P(J, e, !0), K($({ page: String(e) }), { replaceState: !0 });
853
857
  }
854
- var yn = qt();
858
+ var yn = Jt();
855
859
  ze("keydown", De, dn), Re("itf76n", (e) => {
856
860
  we((e, t) => {
857
861
  Oe.title = `${e ?? ""} - ${t ?? ""}`;
@@ -862,7 +866,7 @@ function Jt(d, g) {
862
866
  var Sn = B(xn, 2);
863
867
  Ie(Sn);
864
868
  var Cn = B(Sn, 2), wn = v(Cn), Tn = (e) => {
865
- var t = Rt();
869
+ var t = zt();
866
870
  qe(v(t), { class: "h-4 w-4" }), k(t), z((e) => A(t, "aria-label", e), [() => ve()]), E("click", t, fn), F(e, t);
867
871
  };
868
872
  b(wn, (e) => {
@@ -873,7 +877,7 @@ function Jt(d, g) {
873
877
  var Dn = B(bn, 2), On = v(Dn);
874
878
  ge(v(On)), k(On);
875
879
  var kn = B(On, 2), An = (e) => {
876
- var t = zt(), n = v(t), r = v(n), i = v(r), a = v(i, !0);
880
+ var t = Bt(), n = v(t), r = v(n), i = v(r), a = v(i, !0);
877
881
  k(i);
878
882
  var s = B(i, 2);
879
883
  qe(v(s), { class: "h-4 w-4" }), k(s), k(r), ge(B(r, 2)), k(n), k(t), z((e, t) => {
@@ -884,18 +888,18 @@ function Jt(d, g) {
884
888
  S(Q) && e(An);
885
889
  });
886
890
  var jn = B(kn, 2), Mn = v(jn), Nn = (e) => {
887
- var t = Ht(), n = B(v(t), 2), r = (e) => {
888
- var t = Vt(), n = v(t), r = v(n, !0);
891
+ var t = Ut(), n = B(v(t), 2), r = (e) => {
892
+ var t = Ht(), n = v(t), r = v(n, !0);
889
893
  k(n);
890
894
  var i = B(n, 2);
891
895
  O(i, 21, () => S(on), (e) => e.id, (e, t) => {
892
- var n = Bt(), r = v(n);
896
+ var n = Vt(), r = v(n);
893
897
  st(r, { class: "size-4 shrink-0 text-muted-foreground" });
894
898
  var i = B(r, 2), a = v(i, !0);
895
899
  k(i), k(n), z(() => {
896
900
  A(n, "href", `/docs/${S(t).id ?? ""}`), y(a, S(t).title);
897
901
  }), E("click", n, (e) => {
898
- e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), G(`/docs/${S(t).id}`));
902
+ e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), K(`/docs/${S(t).id}`));
899
903
  }), F(e, n);
900
904
  }), k(i), k(t), z((e) => y(r, e), [() => ye()]), F(e, t);
901
905
  };
@@ -903,17 +907,17 @@ function Jt(d, g) {
903
907
  S(on).length > 0 && e(r);
904
908
  });
905
909
  var i = B(n, 2), a = (e) => {
906
- var t = Vt(), n = v(t), r = v(n, !0);
910
+ var t = Ht(), n = v(t), r = v(n, !0);
907
911
  k(n);
908
912
  var i = B(n, 2);
909
913
  O(i, 21, () => S(sn), (e) => e.id, (e, t) => {
910
- var n = Bt(), r = v(n);
914
+ var n = Vt(), r = v(n);
911
915
  Ze(r, { class: "size-4 shrink-0 text-muted-foreground" });
912
916
  var i = B(r, 2), a = v(i, !0);
913
917
  k(i), k(n), z(() => {
914
918
  A(n, "href", `/folders/${S(t).id ?? ""}`), y(a, S(t).name);
915
919
  }), E("click", n, (e) => {
916
- e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), G(`/folders/${S(t).id}`));
920
+ e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), K(`/folders/${S(t).id}`));
917
921
  }), F(e, n);
918
922
  }), k(i), k(t), z((e) => y(r, e), [() => p()]), F(e, t);
919
923
  };
@@ -921,17 +925,17 @@ function Jt(d, g) {
921
925
  S(sn).length > 0 && e(a);
922
926
  });
923
927
  var o = B(i, 2), s = (e) => {
924
- var t = Vt(), n = v(t), r = v(n, !0);
928
+ var t = Ht(), n = v(t), r = v(n, !0);
925
929
  k(n);
926
930
  var i = B(n, 2);
927
931
  O(i, 21, () => S(cn), (e) => e.id, (e, t) => {
928
- var n = Bt(), r = v(n);
932
+ var n = Vt(), r = v(n);
929
933
  We(r, { class: "size-4 shrink-0 text-muted-foreground" });
930
934
  var i = B(r, 2), a = v(i, !0);
931
935
  k(i), k(n), z(() => {
932
936
  A(n, "href", `/folders#category-${S(t).id ?? ""}`), y(a, S(t).name);
933
937
  }), E("click", n, (e) => {
934
- e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), G(`/folders#category-${S(t).id}`));
938
+ e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey && (e.preventDefault(), K(`/folders#category-${S(t).id}`));
935
939
  }), F(e, n);
936
940
  }), k(i), k(t), z((e) => y(r, e), [() => _e()]), F(e, t);
937
941
  };
@@ -943,12 +947,12 @@ function Jt(d, g) {
943
947
  S(Pn) && e(Nn);
944
948
  });
945
949
  var Fn = B(Mn, 2), In = (e) => {
946
- var t = Kt(), n = B(v(t), 2), r = (e) => {
947
- var t = Gt();
950
+ var t = qt(), n = B(v(t), 2), r = (e) => {
951
+ var t = Kt();
948
952
  O(t, 21, () => S(tn), (e) => e.id, (e, t) => {
949
953
  let n = I(() => S(t).component);
950
- var r = Wt(), i = v(r), a = (e) => {
951
- var n = Ut(), r = v(n, !0);
954
+ var r = Gt(), i = v(r), a = (e) => {
955
+ var n = Wt(), r = v(n, !0);
952
956
  k(n), z(() => y(r, S(t).title)), F(e, n);
953
957
  };
954
958
  b(i, (e) => {
@@ -978,7 +982,7 @@ function Jt(d, g) {
978
982
  S(tn).length > 0 && e(r);
979
983
  });
980
984
  var i = B(n, 2), a = (e) => {
981
- gt(e);
985
+ _t(e);
982
986
  }, o = (e) => {
983
987
  Ce(e);
984
988
  }, s = (e) => {
@@ -998,4 +1002,4 @@ function Jt(d, g) {
998
1002
  }
999
1003
  Ee(["click"]);
1000
1004
  //#endregion
1001
- export { Jt as DocsmintSearchHost };
1005
+ export { Z as DocsmintSearchHost };
@@ -1,3 +1,16 @@
1
1
  import type { Component } from "svelte";
2
2
  export declare const DocsmintSharedDocumentHost: Component;
3
- export declare function renderSharedDocument(...args: readonly unknown[]): unknown;
3
+ export interface ProseMirrorNode {
4
+ type: string;
5
+ text?: string;
6
+ content?: ProseMirrorNode[];
7
+ attrs?: Record<string, unknown>;
8
+ marks?: Array<{ type: string; attrs?: Record<string, unknown> }>;
9
+ }
10
+ export type ProseMirrorDoc = ProseMirrorNode & { content?: ProseMirrorNode[] };
11
+ export type SharedAttachmentObjectUrls = string[];
12
+ export declare function renderSharedDocument(doc: ProseMirrorDoc): string;
13
+ export declare function markMarkdownTaskItems(html: string): string;
14
+ export declare function sharedAttachmentHeaders(token: string, password?: string): HeadersInit;
15
+ export declare function hydrateSharedAttachmentImages(root: ParentNode, token: string, password?: string): Promise<SharedAttachmentObjectUrls>;
16
+ export declare function waitForSharedDocumentImages(root: ParentNode): Promise<void>;