@hiai-gg/docsmint 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -18
- package/backend/src/lib/lifecycle-service.ts +334 -219
- package/dist/backend/index.js +232 -18
- package/dist/backend-launcher.d.ts +15 -0
- package/dist/backend-launcher.js +22 -0
- package/dist/frontend/CategoryDialog--rIE7FrH.js +580 -0
- package/dist/frontend/ConfirmDialog-Cpzyb55f.js +212 -0
- package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +216 -0
- package/dist/frontend/DatePicker-Byynca7V.js +257 -0
- package/dist/frontend/DeleteDialog-ap6nOywZ.js +174 -0
- package/dist/frontend/FolderDialog-DmN_trV0.js +247 -0
- package/dist/frontend/FolderNode-C4B8a2fd.js +317 -0
- package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +100 -0
- package/dist/frontend/Icon-DtNo0N1U.js +64 -0
- package/dist/frontend/SettingsDialog-2kTaTXAs.js +992 -0
- package/dist/frontend/ShareDialog-BBDGNF5n.js +165 -0
- package/dist/frontend/TagCreateDialog-DiLZnJo4.js +258 -0
- package/dist/frontend/api/attachments.d.ts +6 -0
- package/dist/frontend/api/attachments.js +2 -0
- package/dist/frontend/api/categories.js +1 -1
- package/dist/frontend/api/documents.js +1 -1
- package/dist/frontend/api/folders.js +1 -1
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/api/share.d.ts +5 -0
- package/dist/frontend/api/share.js +2 -0
- package/dist/frontend/api/tags.js +1 -1
- package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
- package/dist/frontend/attachments-BuILSs56.js +50 -0
- package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
- package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
- package/dist/frontend/bundle-mjs-CP6Owz-8.js +1723 -0
- package/dist/frontend/camera-B7dAOd4s.js +28 -0
- package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
- package/dist/frontend/check-CDwRlG9T.js +24 -0
- package/dist/frontend/chevron-down-B7ZrjUmT.js +24 -0
- package/dist/frontend/circle-check-CDqeMB2d.js +28 -0
- package/dist/frontend/{client-C6QQGb0e.js → client-Bc5Fzx40.js} +833 -814
- package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
- package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
- package/dist/frontend/clock-Ck5Sn-Zl.js +28 -0
- package/dist/frontend/clsx-nmtDPO_P.js +16 -0
- package/dist/frontend/collaboration.d.ts +6 -0
- package/dist/frontend/collaboration.js +182 -0
- package/dist/frontend/components/category-dialog.d.ts +2 -0
- package/dist/frontend/components/category-dialog.js +2 -0
- package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
- package/dist/frontend/components/create-snapshot-dialog.js +2 -0
- package/dist/frontend/components/delete-dialog.d.ts +2 -0
- package/dist/frontend/components/delete-dialog.js +2 -0
- package/dist/frontend/components/editor/document-editor.d.ts +3 -0
- package/dist/frontend/components/editor/document-editor.js +3021 -0
- package/dist/frontend/components/editor/document-title.d.ts +2 -0
- package/dist/frontend/components/editor/document-title.js +31 -0
- package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
- package/dist/frontend/components/editor/docx-serializer.js +14600 -0
- package/dist/frontend/components/editor/extensions.d.ts +2 -0
- package/dist/frontend/components/editor/extensions.js +2 -0
- package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
- package/dist/frontend/components/editor/markdown-toggle.js +72 -0
- package/dist/frontend/components/editor/markdown.d.ts +1 -0
- package/dist/frontend/components/editor/markdown.js +2 -0
- package/dist/frontend/components/folder-node.d.ts +3 -0
- package/dist/frontend/components/folder-node.js +2 -0
- package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
- package/dist/frontend/components/folder-tree-selector.js +2 -0
- package/dist/frontend/components/save-as-dialog.d.ts +2 -0
- package/dist/frontend/components/save-as-dialog.js +254 -0
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.d.ts +2 -0
- package/dist/frontend/components/share-dialog.js +2 -0
- package/dist/frontend/components/sidebar.js +1206 -3762
- package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
- package/dist/frontend/components/tag-create-dialog.js +2 -0
- package/dist/frontend/components/version-history.d.ts +2 -0
- package/dist/frontend/components/version-history.js +293 -0
- package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
- package/dist/frontend/copy-CMAA6GP0.js +31 -0
- package/dist/frontend/dashboard.js +1148 -1224
- package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
- package/dist/frontend/dialog-BDkiG42a.js +213 -0
- package/dist/frontend/disclose-version-5I57E3LD.js +3 -0
- package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
- package/dist/frontend/doc-tabs.d.ts +7 -0
- package/dist/frontend/doc-tabs.js +14 -0
- package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
- package/dist/frontend/document-drop-coordinator.d.ts +2 -0
- package/dist/frontend/document-drop-coordinator.js +2 -0
- package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
- package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
- package/dist/frontend/ellipsis-vertical-BBuPldbW.js +519 -0
- package/dist/frontend/extension.d.ts +2 -1
- package/dist/frontend/extension.js +6 -5
- package/dist/frontend/floating-layer-anchor-C51M4l6v.js +4513 -0
- package/dist/frontend/folder-TQjKY4yn.js +44 -0
- package/dist/frontend/folder-refresh.d.ts +8 -0
- package/dist/frontend/folder-refresh.js +2 -0
- package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/i18n.js +1 -1
- package/dist/frontend/identity-DyWeNzu_.js +69 -0
- package/dist/frontend/index-client-jobkrWVL.js +86 -0
- package/dist/frontend/input-CBI6p4Xl.js +23 -0
- package/dist/frontend/keyboard.d.ts +14 -0
- package/dist/frontend/keyboard.js +2 -0
- package/dist/frontend/keyboard.svelte-D7H8DihC.js +133 -0
- package/dist/frontend/label-C-GkhEp4.js +30 -0
- package/dist/frontend/loader-circle-Bk-WFz9g.js +267 -0
- package/dist/frontend/markdown-BwnyjITU.js +11 -0
- package/dist/frontend/messages-BpYaLbzE.js +1091 -0
- package/dist/frontend/offline/identity.d.ts +6 -0
- package/dist/frontend/offline/identity.js +2 -0
- package/dist/frontend/resolve-BG4HgzpN.js +19 -0
- package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
- package/dist/frontend/rotate-ccw-CleZtJ5D.js +24 -0
- package/dist/frontend/search.js +637 -628
- package/dist/frontend/select-value-CvrWRkXW.js +1436 -0
- package/dist/frontend/settings-blyobazp.js +62 -0
- package/dist/frontend/share-Cu7SSJuJ.js +28 -0
- package/dist/frontend/shared-document.js +105 -69
- package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +65 -0
- package/dist/frontend/{tag-C5xrg-bb.js → tag-Dx3SmucJ.js} +7 -7
- package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +29 -0
- package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
- package/dist/frontend/textarea-Dfp78XlL.js +23 -0
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/{theme.svelte-ei0QxXa8.js → theme.svelte-CROg1Hi5.js} +7 -7
- package/dist/frontend/types.d.ts +6 -0
- package/dist/frontend/types.js +0 -0
- package/dist/frontend/utils/clipboard.d.ts +1 -0
- package/dist/frontend/utils/clipboard.js +2 -0
- package/dist/frontend/utils/dndzone.d.ts +4 -0
- package/dist/frontend/utils/dndzone.js +2 -0
- package/dist/frontend/utils-C0OW2678.js +20 -0
- package/dist/frontend/utils-D8kmM3ub.js +8 -0
- package/dist/frontend/utils.d.ts +4 -0
- package/dist/frontend/utils.js +2 -0
- package/dist/frontend/x-DaTdeDXv.js +24 -0
- package/dist/lifecycle-persistent.d.ts +31 -0
- package/dist/lifecycle-persistent.js +33 -0
- package/dist/server-only-browser-entry.d.ts +0 -0
- package/dist/server-only-browser-entry.js +3 -0
- package/dist/storage-quota.d.ts +36 -0
- package/dist/storage-quota.js +14 -1
- package/dist/types.d.ts +7 -0
- package/dist/workspace.d.ts +4 -1
- package/dist/workspace.js +29 -8
- package/package.json +110 -3
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/index.ts +11 -2
- package/packages/db/src/schema.ts +30 -2
- package/packages/db/src/with-tenant.ts +38 -1
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
- package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
- package/dist/frontend/input-ieWIt8I7.js +0 -257
- package/dist/frontend/messages-CTGAsqFu.js +0 -1106
- package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
- package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
|
@@ -0,0 +1,992 @@
|
|
|
1
|
+
import "./disclose-version-5I57E3LD.js";
|
|
2
|
+
import { $ as e, A as t, E as n, F as r, I as i, K as a, L as o, M as s, O as c, Q as l, R as u, S as d, V as f, _t as p, at as m, ct as h, d as g, dt as _, et as v, ft as y, g as b, gt as x, h as S, i as C, j as w, k as T, n as E, rt as D, t as O, tt as k, w as A, x as j } from "./client-Bc5Fzx40.js";
|
|
3
|
+
import { t as M } from "./loader-circle-Bk-WFz9g.js";
|
|
4
|
+
import { t as N } from "./utils-D8kmM3ub.js";
|
|
5
|
+
import { a as P, i as F, n as I, o as L, r as ee, t as te } from "./dialog-BDkiG42a.js";
|
|
6
|
+
import { t as R } from "./label-C-GkhEp4.js";
|
|
7
|
+
import { t as z } from "./Icon-DtNo0N1U.js";
|
|
8
|
+
import { Cr as ne, R as re, Rt as ie, Sr as ae, Zn as oe, _r as se, ar as ce, br as le, cr as ue, dr as de, fr as fe, gr as pe, hr as me, ir as he, lr as ge, mr as _e, or as ve, pr as ye, sr as be, ur as xe, vr as Se, wr as Ce, xr as we, yr as Te } from "./messages-BpYaLbzE.js";
|
|
9
|
+
import { i as Ee } from "./categories-izQovv2w.js";
|
|
10
|
+
import { t as B } from "./input-CBI6p4Xl.js";
|
|
11
|
+
import { t as De } from "./context-BMD6XTPe.js";
|
|
12
|
+
import { t as Oe } from "./resolve-BG4HgzpN.js";
|
|
13
|
+
import { n as V, r as H, t as U } from "./search-preferences-B1GdbdUc.js";
|
|
14
|
+
import { r as ke, t as Ae } from "./auth-client-Cygmp1I2.js";
|
|
15
|
+
import { a as je, r as Me } from "./settings-blyobazp.js";
|
|
16
|
+
import { a as W, i as G, n as K, o as q, s as Ne, t as Pe } from "./api-keys-CpkrA8rD.js";
|
|
17
|
+
import { a as Fe, t as Ie } from "./identity-DyWeNzu_.js";
|
|
18
|
+
import { n as J, t as Le } from "./db-ByrlYfaI.js";
|
|
19
|
+
import { t as Re } from "./theme.svelte-CROg1Hi5.js";
|
|
20
|
+
import { onMount as ze } from "svelte";
|
|
21
|
+
import { goto as Be } from "$app/navigation";
|
|
22
|
+
import { page as Ve } from "$app/state";
|
|
23
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/log-out.svelte
|
|
24
|
+
function He(n, r) {
|
|
25
|
+
let i = O(r, [
|
|
26
|
+
"children",
|
|
27
|
+
"$$slots",
|
|
28
|
+
"$$events",
|
|
29
|
+
"$$legacy"
|
|
30
|
+
]), a = [
|
|
31
|
+
["path", { d: "m16 17 5-5-5-5" }],
|
|
32
|
+
["path", { d: "M21 12H9" }],
|
|
33
|
+
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]
|
|
34
|
+
];
|
|
35
|
+
z(n, C({ name: "log-out" }, () => i, {
|
|
36
|
+
get iconNode() {
|
|
37
|
+
return a;
|
|
38
|
+
},
|
|
39
|
+
children: (n, i) => {
|
|
40
|
+
var a = w();
|
|
41
|
+
d(e(a), r, "default", {}, null), t(n, a);
|
|
42
|
+
},
|
|
43
|
+
$$slots: { default: !0 }
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/save.svelte
|
|
48
|
+
function Ue(n, r) {
|
|
49
|
+
let i = O(r, [
|
|
50
|
+
"children",
|
|
51
|
+
"$$slots",
|
|
52
|
+
"$$events",
|
|
53
|
+
"$$legacy"
|
|
54
|
+
]), a = [
|
|
55
|
+
["path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }],
|
|
56
|
+
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }],
|
|
57
|
+
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7" }]
|
|
58
|
+
];
|
|
59
|
+
z(n, C({ name: "save" }, () => i, {
|
|
60
|
+
get iconNode() {
|
|
61
|
+
return a;
|
|
62
|
+
},
|
|
63
|
+
children: (n, i) => {
|
|
64
|
+
var a = w();
|
|
65
|
+
d(e(a), r, "default", {}, null), t(n, a);
|
|
66
|
+
},
|
|
67
|
+
$$slots: { default: !0 }
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
|
|
72
|
+
var We = s("<div><!></div>");
|
|
73
|
+
function Ge(r, i) {
|
|
74
|
+
y(i, !0);
|
|
75
|
+
let o = E(i, "value", 15, "");
|
|
76
|
+
var s = We(), u = l(s), d = (n) => {
|
|
77
|
+
var r = w();
|
|
78
|
+
c(e(r), () => i.children), t(n, r);
|
|
79
|
+
};
|
|
80
|
+
n(u, (e) => {
|
|
81
|
+
i.children && e(d);
|
|
82
|
+
}), p(s), a((e) => {
|
|
83
|
+
S(s, 1, e), g(s, "data-tabs-value", o());
|
|
84
|
+
}, [() => b(N("w-full", i.class))]), t(r, s), _();
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-content.svelte
|
|
88
|
+
var Ke = s("<div role=\"tabpanel\"><!></div>");
|
|
89
|
+
function Y(r, i) {
|
|
90
|
+
y(i, !0);
|
|
91
|
+
var o = w(), s = e(o), u = (r) => {
|
|
92
|
+
var o = Ke(), s = l(o), u = (n) => {
|
|
93
|
+
var r = w();
|
|
94
|
+
c(e(r), () => i.children), t(n, r);
|
|
95
|
+
};
|
|
96
|
+
n(s, (e) => {
|
|
97
|
+
i.children && e(u);
|
|
98
|
+
}), p(o), a((e) => S(o, 1, e), [() => b(N("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", i.class))]), t(r, o);
|
|
99
|
+
};
|
|
100
|
+
n(s, (e) => {
|
|
101
|
+
i.currentValue === i.value && e(u);
|
|
102
|
+
}), t(r, o), _();
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-list.svelte
|
|
106
|
+
var qe = s("<div role=\"tablist\"><!></div>");
|
|
107
|
+
function Je(r, i) {
|
|
108
|
+
y(i, !0);
|
|
109
|
+
var o = qe(), s = l(o), u = (n) => {
|
|
110
|
+
var r = w();
|
|
111
|
+
c(e(r), () => i.children), t(n, r);
|
|
112
|
+
};
|
|
113
|
+
n(s, (e) => {
|
|
114
|
+
i.children && e(u);
|
|
115
|
+
}), p(o), a((e) => S(o, 1, e), [() => b(N("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", i.class))]), t(r, o), _();
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-trigger.svelte
|
|
119
|
+
var Ye = s("<button type=\"button\" role=\"tab\"><!></button>");
|
|
120
|
+
function Xe(r, i) {
|
|
121
|
+
y(i, !0);
|
|
122
|
+
let s = E(i, "selected", 3, !1);
|
|
123
|
+
function u() {
|
|
124
|
+
i.onclick?.(i.value);
|
|
125
|
+
}
|
|
126
|
+
var d = Ye(), f = l(d), m = (n) => {
|
|
127
|
+
var r = w();
|
|
128
|
+
c(e(r), () => i.children), t(n, r);
|
|
129
|
+
};
|
|
130
|
+
n(f, (e) => {
|
|
131
|
+
i.children && e(m);
|
|
132
|
+
}), p(d), a((e) => {
|
|
133
|
+
g(d, "aria-selected", s()), g(d, "data-state", s() ? "active" : "inactive"), S(d, 1, e);
|
|
134
|
+
}, [() => b(N("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", s() ? "bg-primary text-primary-foreground shadow" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground", i.class))]), o("click", d, u), t(r, d), _();
|
|
135
|
+
}
|
|
136
|
+
i(["click"]);
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/lib/components/settings/ApiAccessSettings.svelte
|
|
139
|
+
var Ze = s("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-4 text-primary\"><p class=\"text-sm font-medium\">Copy this key now. It will not be shown again.</p> <code class=\"mt-2 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), Qe = s("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), $e = s("<p class=\"text-sm text-muted-foreground\">Loading API access…</p>"), et = s("<div class=\"flex items-center justify-between rounded-md border p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <!></div>"), tt = s("<p class=\"text-sm text-muted-foreground\">No global API keys.</p>"), nt = s("<div class=\"flex items-center justify-between gap-3 rounded-md border border-dashed p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), rt = s("<p class=\"text-sm text-muted-foreground\">No category API keys.</p>"), it = s("<div class=\"max-h-72 space-y-5 overflow-y-auto pr-1\" aria-label=\"API key management list\"><section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Global keys</h3> <!></section> <section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Category keys</h3> <!></section></div>"), at = s("<div class=\"space-y-5 rounded-lg border border-border bg-card p-6\"><div><h2 class=\"text-lg font-medium\">API</h2> <p class=\"text-sm text-muted-foreground\">Create a user-wide key or review category-scoped access. Global keys are shown once.</p></div> <div class=\"flex gap-2\"><!> <!></div> <!> <!> <!></div>");
|
|
140
|
+
function ot(e, i) {
|
|
141
|
+
y(i, !0);
|
|
142
|
+
let o = m(k([])), s = m(k([])), c = m("Global API key"), u = m(k({})), d = m(null), g = m(!0), b = m(!1), S = m(null), C = h(() => f(d) ? f(u)[f(d)] : void 0), w = h(() => f(o).filter((e) => e.scopes.includes("global"))), E = h(() => f(o).filter((e) => K(e.scopes) !== null));
|
|
143
|
+
function O(e) {
|
|
144
|
+
return f(s).find((t) => t.id === e)?.name ?? "Unknown category";
|
|
145
|
+
}
|
|
146
|
+
async function j() {
|
|
147
|
+
D(g, !0), D(S, null);
|
|
148
|
+
try {
|
|
149
|
+
let [e, t] = await Promise.all([W(), Ee()]);
|
|
150
|
+
D(o, e.keys, !0), D(s, t, !0);
|
|
151
|
+
} catch (e) {
|
|
152
|
+
D(S, e instanceof Error ? e.message : "Failed to load API access", !0);
|
|
153
|
+
} finally {
|
|
154
|
+
D(g, !1);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
ze(j);
|
|
158
|
+
async function M() {
|
|
159
|
+
D(b, !0), D(S, null);
|
|
160
|
+
try {
|
|
161
|
+
let e = await G(f(c).trim() || void 0);
|
|
162
|
+
D(u, {
|
|
163
|
+
...f(u),
|
|
164
|
+
[e.id]: e.key
|
|
165
|
+
}, !0), D(d, e.id, !0), await j();
|
|
166
|
+
} catch (e) {
|
|
167
|
+
D(S, e instanceof Error ? e.message : "Failed to create API key", !0);
|
|
168
|
+
} finally {
|
|
169
|
+
D(b, !1);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async function N(e) {
|
|
173
|
+
D(b, !0);
|
|
174
|
+
try {
|
|
175
|
+
await Ne(e);
|
|
176
|
+
let { [e]: t, ...n } = f(u);
|
|
177
|
+
D(u, n, !0), f(d) === e && D(d, null), await j();
|
|
178
|
+
} finally {
|
|
179
|
+
D(b, !1);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async function P(e) {
|
|
183
|
+
let t = f(u)[e.id] ?? await q(e.id);
|
|
184
|
+
await navigator.clipboard.writeText(Pe(e, t));
|
|
185
|
+
}
|
|
186
|
+
var F = at(), I = v(l(F), 2), ee = l(I);
|
|
187
|
+
B(ee, {
|
|
188
|
+
"aria-label": "Global API key name",
|
|
189
|
+
get value() {
|
|
190
|
+
return f(c);
|
|
191
|
+
},
|
|
192
|
+
set value(e) {
|
|
193
|
+
D(c, e, !0);
|
|
194
|
+
}
|
|
195
|
+
}), L(v(ee, 2), {
|
|
196
|
+
onclick: M,
|
|
197
|
+
get disabled() {
|
|
198
|
+
return f(b);
|
|
199
|
+
},
|
|
200
|
+
children: (e, n) => {
|
|
201
|
+
x(), t(e, r("Create global key"));
|
|
202
|
+
},
|
|
203
|
+
$$slots: { default: !0 }
|
|
204
|
+
}), p(I);
|
|
205
|
+
var te = v(I, 2), R = (e) => {
|
|
206
|
+
var n = Ze(), i = v(l(n), 2), o = l(i, !0);
|
|
207
|
+
p(i), L(v(i, 2), {
|
|
208
|
+
class: "mt-2",
|
|
209
|
+
size: "sm",
|
|
210
|
+
variant: "outline",
|
|
211
|
+
onclick: () => navigator.clipboard.writeText(f(C)),
|
|
212
|
+
children: (e, n) => {
|
|
213
|
+
x(), t(e, r("Copy key"));
|
|
214
|
+
},
|
|
215
|
+
$$slots: { default: !0 }
|
|
216
|
+
}), p(n), a(() => T(o, f(C))), t(e, n);
|
|
217
|
+
};
|
|
218
|
+
n(te, (e) => {
|
|
219
|
+
f(C) && e(R);
|
|
220
|
+
});
|
|
221
|
+
var z = v(te, 2), ne = (e) => {
|
|
222
|
+
var n = Qe(), r = l(n, !0);
|
|
223
|
+
p(n), a(() => T(r, f(S))), t(e, n);
|
|
224
|
+
};
|
|
225
|
+
n(z, (e) => {
|
|
226
|
+
f(S) && e(ne);
|
|
227
|
+
});
|
|
228
|
+
var re = v(z, 2), ie = (e) => {
|
|
229
|
+
t(e, $e());
|
|
230
|
+
}, ae = (e) => {
|
|
231
|
+
var n = it(), i = l(n);
|
|
232
|
+
A(v(l(i), 2), 17, () => f(w), (e) => e.id, (e, n) => {
|
|
233
|
+
var i = et(), o = l(i), s = l(o), c = l(s, !0);
|
|
234
|
+
p(s);
|
|
235
|
+
var u = v(s), d = l(u);
|
|
236
|
+
p(u), p(o), L(v(o, 2), {
|
|
237
|
+
size: "sm",
|
|
238
|
+
variant: "destructive",
|
|
239
|
+
onclick: () => N(f(n).id),
|
|
240
|
+
get disabled() {
|
|
241
|
+
return f(b);
|
|
242
|
+
},
|
|
243
|
+
children: (e, n) => {
|
|
244
|
+
x(), t(e, r("Revoke"));
|
|
245
|
+
},
|
|
246
|
+
$$slots: { default: !0 }
|
|
247
|
+
}), p(i), a(() => {
|
|
248
|
+
T(c, f(n).name), T(d, `${f(n).prefix ?? ""}…`);
|
|
249
|
+
}), t(e, i);
|
|
250
|
+
}, (e) => {
|
|
251
|
+
t(e, tt());
|
|
252
|
+
}), p(i);
|
|
253
|
+
var o = v(i, 2);
|
|
254
|
+
A(v(l(o), 2), 17, () => f(E), (e) => e.id, (e, n) => {
|
|
255
|
+
var i = nt(), o = l(i), s = l(o), c = l(s);
|
|
256
|
+
p(s);
|
|
257
|
+
var d = v(s), m = l(d);
|
|
258
|
+
p(d), p(o);
|
|
259
|
+
var g = v(o, 2), _ = l(g);
|
|
260
|
+
{
|
|
261
|
+
let e = h(() => !f(n).recoverable && !f(u)[f(n).id]);
|
|
262
|
+
L(_, {
|
|
263
|
+
size: "sm",
|
|
264
|
+
variant: "outline",
|
|
265
|
+
onclick: () => P(f(n)),
|
|
266
|
+
get disabled() {
|
|
267
|
+
return f(e);
|
|
268
|
+
},
|
|
269
|
+
children: (e, i) => {
|
|
270
|
+
x();
|
|
271
|
+
var o = r();
|
|
272
|
+
a(() => T(o, f(n).recoverable || f(u)[f(n).id] ? "Copy key" : "Rotate to enable copy")), t(e, o);
|
|
273
|
+
},
|
|
274
|
+
$$slots: { default: !0 }
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
L(v(_, 2), {
|
|
278
|
+
size: "sm",
|
|
279
|
+
variant: "destructive",
|
|
280
|
+
onclick: () => N(f(n).id),
|
|
281
|
+
get disabled() {
|
|
282
|
+
return f(b);
|
|
283
|
+
},
|
|
284
|
+
children: (e, n) => {
|
|
285
|
+
x(), t(e, r("Revoke"));
|
|
286
|
+
},
|
|
287
|
+
$$slots: { default: !0 }
|
|
288
|
+
}), p(g), p(i), a((e, t) => {
|
|
289
|
+
T(c, `${e ?? ""}: ${f(n).name ?? ""}`), T(m, `${f(n).prefix ?? ""}… · ${t ?? ""}`);
|
|
290
|
+
}, [() => O(K(f(n).scopes)), () => f(n).scopes.map((e) => e.split(":").at(-1)).join(" / ")]), t(e, i);
|
|
291
|
+
}, (e) => {
|
|
292
|
+
t(e, rt());
|
|
293
|
+
}), p(o), p(n), t(e, n);
|
|
294
|
+
};
|
|
295
|
+
n(re, (e) => {
|
|
296
|
+
f(g) ? e(ie) : e(ae, -1);
|
|
297
|
+
}), p(F), t(e, F), _();
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/lib/offline/cleanup.ts
|
|
301
|
+
async function st() {
|
|
302
|
+
let e = null;
|
|
303
|
+
try {
|
|
304
|
+
e = await Fe();
|
|
305
|
+
} catch {} finally {
|
|
306
|
+
Ie();
|
|
307
|
+
}
|
|
308
|
+
let t = "hiai-docs::hiai-docs-pwa-local::pwa-v1";
|
|
309
|
+
try {
|
|
310
|
+
if (e) try {
|
|
311
|
+
let t = J(e);
|
|
312
|
+
await Promise.allSettled([
|
|
313
|
+
t.documents.clear(),
|
|
314
|
+
t.folders.clear(),
|
|
315
|
+
t.drafts.clear(),
|
|
316
|
+
t.mutationQueue?.clear(),
|
|
317
|
+
t.metadata.clear()
|
|
318
|
+
]);
|
|
319
|
+
} finally {
|
|
320
|
+
await Le(e).catch(() => void 0);
|
|
321
|
+
}
|
|
322
|
+
let n = await caches.keys();
|
|
323
|
+
await Promise.all(n.filter((e) => e.startsWith(`${t}::`) || e.startsWith(`${t}-`)).map((e) => caches.delete(e))), "serviceWorker" in navigator && (await navigator.serviceWorker.getRegistration("/"))?.active?.postMessage({
|
|
324
|
+
type: "CLEAR_HOST_CACHES",
|
|
325
|
+
cachePrefix: t
|
|
326
|
+
});
|
|
327
|
+
} catch {}
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/lib/stores/editor-preferences.ts
|
|
331
|
+
var X = {
|
|
332
|
+
showVisualMode: !0,
|
|
333
|
+
showMarkdownMode: !0,
|
|
334
|
+
minimalToolbar: !1,
|
|
335
|
+
showScrollToTop: !0
|
|
336
|
+
};
|
|
337
|
+
function ct(e) {
|
|
338
|
+
if (!e || typeof e != "object") return { ...X };
|
|
339
|
+
let t = e, n = typeof t.showVisualMode == "boolean" ? t.showVisualMode : X.showVisualMode, r = typeof t.showMarkdownMode == "boolean" ? t.showMarkdownMode : X.showMarkdownMode;
|
|
340
|
+
return {
|
|
341
|
+
showVisualMode: n || !r,
|
|
342
|
+
showMarkdownMode: r,
|
|
343
|
+
minimalToolbar: typeof t.minimalToolbar == "boolean" ? t.minimalToolbar : X.minimalToolbar,
|
|
344
|
+
showScrollToTop: typeof t.showScrollToTop == "boolean" ? t.showScrollToTop : X.showScrollToTop
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region src/lib/stores/editor-preferences.svelte.ts
|
|
349
|
+
var lt = "docsmint-editor-preferences", Z = m(k({ ...X })), ut = !1;
|
|
350
|
+
function dt() {
|
|
351
|
+
return typeof window < "u" && typeof localStorage < "u";
|
|
352
|
+
}
|
|
353
|
+
function ft() {
|
|
354
|
+
if (!(!dt() || ut)) {
|
|
355
|
+
ut = !0;
|
|
356
|
+
try {
|
|
357
|
+
D(Z, ct(JSON.parse(localStorage.getItem(lt) ?? "null")), !0);
|
|
358
|
+
} catch {
|
|
359
|
+
D(Z, { ...X }, !0);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function pt(e) {
|
|
364
|
+
D(Z, ct({
|
|
365
|
+
...f(Z),
|
|
366
|
+
...e
|
|
367
|
+
}), !0), dt() && localStorage.setItem(lt, JSON.stringify(f(Z)));
|
|
368
|
+
}
|
|
369
|
+
var Q = {
|
|
370
|
+
get value() {
|
|
371
|
+
return f(Z);
|
|
372
|
+
},
|
|
373
|
+
get showMarkdownMode() {
|
|
374
|
+
return f(Z).showMarkdownMode;
|
|
375
|
+
},
|
|
376
|
+
get showVisualMode() {
|
|
377
|
+
return f(Z).showVisualMode;
|
|
378
|
+
},
|
|
379
|
+
get minimalToolbar() {
|
|
380
|
+
return f(Z).minimalToolbar;
|
|
381
|
+
},
|
|
382
|
+
get showScrollToTop() {
|
|
383
|
+
return f(Z).showScrollToTop;
|
|
384
|
+
},
|
|
385
|
+
init: ft,
|
|
386
|
+
update: pt
|
|
387
|
+
}, mt = !1, $ = m(k({ ...U }));
|
|
388
|
+
function ht() {
|
|
389
|
+
if (!(typeof localStorage > "u")) try {
|
|
390
|
+
localStorage.setItem(V, JSON.stringify(f($)));
|
|
391
|
+
} catch {}
|
|
392
|
+
}
|
|
393
|
+
function gt() {
|
|
394
|
+
if (!(mt || typeof window > "u")) {
|
|
395
|
+
mt = !0;
|
|
396
|
+
try {
|
|
397
|
+
D($, H(JSON.parse(localStorage.getItem("docsmint:search-preferences") ?? "null")), !0);
|
|
398
|
+
} catch {
|
|
399
|
+
D($, { ...U }, !0);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function _t(e) {
|
|
404
|
+
D($, {
|
|
405
|
+
...f($),
|
|
406
|
+
...e
|
|
407
|
+
}, !0), ht();
|
|
408
|
+
}
|
|
409
|
+
var vt = {
|
|
410
|
+
get graphSearchEnabled() {
|
|
411
|
+
return f($).graphSearchEnabled;
|
|
412
|
+
},
|
|
413
|
+
init: gt,
|
|
414
|
+
update: _t
|
|
415
|
+
}, yt = s("<!> <!>", 1), bt = s("<!> <!> <!> <!> <!>", 1), xt = s("<p class=\"text-xs text-muted-foreground\">Verification is required before the new address becomes active.</p>"), St = s("<p class=\"text-sm text-destructive\"> </p>"), Ct = s("<!> ", 1), wt = s("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!> <p class=\"text-xs text-muted-foreground\"> </p> <!></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">GraphRAG search</span> <span class=\"block text-xs text-muted-foreground\">Use graph expansion for related documents. Disable it for faster standard RAG search.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use GraphRAG search\"><span class=\"svelte-1eaqpj\"></span></button></div> <!> <!></form>"), Tt = s("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), Et = s("<button type=\"button\"> </button>"), Dt = s("<div class=\"space-y-6\"><div class=\"space-y-2\"><!> <p class=\"text-xs text-muted-foreground\"> </p></div> <div class=\"grid grid-cols-3 gap-2\"></div> <details class=\"editor-settings border-t pt-5 svelte-1eaqpj\"><summary class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj\"><span><span class=\"block text-sm font-medium\">Editor modes</span> <span class=\"block text-xs text-muted-foreground\">Source views and toolbar layout</span></span> <span class=\"editor-settings-chevron svelte-1eaqpj\" aria-hidden=\"true\">⌄</span></summary> <div class=\"mt-3 space-y-3\"><div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Visual editor</span> <span class=\"block text-xs text-muted-foreground\">Show the standard WYSIWYG editor mode.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show visual editor\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Raw Markdown</span> <span class=\"block text-xs text-muted-foreground\">Show the Markdown source button in documents.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show Raw Markdown\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Minimal toolbar</span> <span class=\"block text-xs text-muted-foreground\">Bold, italic, underline, lists, highlight, and copy.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use minimal toolbar\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Scroll to top</span> <span class=\"block text-xs text-muted-foreground\">Show the floating arrow after scrolling down.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show scroll to top\"><span class=\"svelte-1eaqpj\"></span></button></div></div></details></div>"), Ot = s("<!> <!> <!> <!> <!> <!>", 1), kt = s("<!> <!> <!>", 1);
|
|
416
|
+
function At(i, s) {
|
|
417
|
+
y(s, !0);
|
|
418
|
+
let c = E(s, "open", 15, !1), d = m("profile"), C = De(), O = h(() => Oe(C.settingsSections, { pathname: Ve.url.pathname })), k = m(""), N = m(""), z = m(""), Ee = m(""), V = m("idle"), H = m(""), U = m(""), W = m(""), G = m(""), K = m("idle"), q = m("");
|
|
419
|
+
ze(async () => {
|
|
420
|
+
Q.init(), vt.init();
|
|
421
|
+
try {
|
|
422
|
+
let e = await Me();
|
|
423
|
+
e.name && D(k, e.name, !0), e.email && (D(N, e.email, !0), D(z, e.email, !0));
|
|
424
|
+
} catch {}
|
|
425
|
+
});
|
|
426
|
+
async function Ne() {
|
|
427
|
+
D(V, "saving"), D(H, "");
|
|
428
|
+
try {
|
|
429
|
+
if (await je({ name: f(k) }), f(N).trim() !== "" && f(N).trim().toLowerCase() !== f(z).toLowerCase()) {
|
|
430
|
+
let { error: e } = await Ae.changeEmail({
|
|
431
|
+
newEmail: f(N).trim(),
|
|
432
|
+
callbackURL: "/"
|
|
433
|
+
});
|
|
434
|
+
if (e) throw Error(e.message ?? he());
|
|
435
|
+
D(Ee, f(N).trim(), !0);
|
|
436
|
+
}
|
|
437
|
+
D(V, "saved"), setTimeout(() => {
|
|
438
|
+
D(V, "idle");
|
|
439
|
+
}, 2e3);
|
|
440
|
+
} catch (e) {
|
|
441
|
+
D(V, "error"), D(H, e instanceof Error ? e.message : re(), !0);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async function Pe() {
|
|
445
|
+
if (D(q, ""), f(W) !== f(G)) {
|
|
446
|
+
D(K, "error"), D(q, be(), !0);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (f(W).length < 8) {
|
|
450
|
+
D(K, "error"), D(q, ve(), !0);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
D(K, "saving");
|
|
454
|
+
try {
|
|
455
|
+
let { error: e } = await Ae.changePassword({
|
|
456
|
+
currentPassword: f(U),
|
|
457
|
+
newPassword: f(W),
|
|
458
|
+
revokeOtherSessions: !0
|
|
459
|
+
});
|
|
460
|
+
if (e) {
|
|
461
|
+
D(K, "error"), D(q, e.message ?? he(), !0);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
D(K, "saved"), D(U, ""), D(W, ""), D(G, ""), setTimeout(() => {
|
|
465
|
+
D(K, "idle");
|
|
466
|
+
}, 2e3);
|
|
467
|
+
} catch (e) {
|
|
468
|
+
D(K, "error"), D(q, e instanceof Error ? e.message : he(), !0);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
function Fe(e) {
|
|
472
|
+
Re.set(e);
|
|
473
|
+
}
|
|
474
|
+
let Ie = [
|
|
475
|
+
{
|
|
476
|
+
value: "light",
|
|
477
|
+
label: Te(),
|
|
478
|
+
key: "light"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
value: "dark",
|
|
482
|
+
label: Se(),
|
|
483
|
+
key: "dark"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
value: "system",
|
|
487
|
+
label: se(),
|
|
488
|
+
key: "system"
|
|
489
|
+
}
|
|
490
|
+
], J = m(!1);
|
|
491
|
+
async function Le() {
|
|
492
|
+
D(J, !0);
|
|
493
|
+
try {
|
|
494
|
+
await st(), await ke(), c(!1), Be("/login");
|
|
495
|
+
} catch {
|
|
496
|
+
D(J, !1);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
function We() {
|
|
500
|
+
c(!1);
|
|
501
|
+
}
|
|
502
|
+
var Ke = w();
|
|
503
|
+
j(e(Ke), () => P, (i, s) => {
|
|
504
|
+
s(i, {
|
|
505
|
+
get open() {
|
|
506
|
+
return c();
|
|
507
|
+
},
|
|
508
|
+
set open(e) {
|
|
509
|
+
c(e);
|
|
510
|
+
},
|
|
511
|
+
children: (i, s) => {
|
|
512
|
+
var c = kt(), m = e(c);
|
|
513
|
+
j(m, () => I, (n, i) => {
|
|
514
|
+
i(n, {
|
|
515
|
+
children: (n, i) => {
|
|
516
|
+
var o = yt(), s = e(o);
|
|
517
|
+
j(s, () => te, (e, n) => {
|
|
518
|
+
n(e, {
|
|
519
|
+
children: (e, n) => {
|
|
520
|
+
x();
|
|
521
|
+
var i = r();
|
|
522
|
+
a((e) => T(i, e), [() => Ce()]), t(e, i);
|
|
523
|
+
},
|
|
524
|
+
$$slots: { default: !0 }
|
|
525
|
+
});
|
|
526
|
+
}), j(v(s, 2), () => F, (e, n) => {
|
|
527
|
+
n(e, {
|
|
528
|
+
children: (e, n) => {
|
|
529
|
+
x();
|
|
530
|
+
var i = r();
|
|
531
|
+
a((e) => T(i, e), [() => ae()]), t(e, i);
|
|
532
|
+
},
|
|
533
|
+
$$slots: { default: !0 }
|
|
534
|
+
});
|
|
535
|
+
}), t(n, o);
|
|
536
|
+
},
|
|
537
|
+
$$slots: { default: !0 }
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
var _ = v(m, 2);
|
|
541
|
+
j(_, () => Ge, (i, s) => {
|
|
542
|
+
s(i, {
|
|
543
|
+
class: "w-full",
|
|
544
|
+
get value() {
|
|
545
|
+
return f(d);
|
|
546
|
+
},
|
|
547
|
+
set value(e) {
|
|
548
|
+
D(d, e, !0);
|
|
549
|
+
},
|
|
550
|
+
children: (i, s) => {
|
|
551
|
+
var c = Ot(), m = e(c);
|
|
552
|
+
j(m, () => Je, (n, i) => {
|
|
553
|
+
i(n, {
|
|
554
|
+
class: "grid w-full grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-1",
|
|
555
|
+
children: (n, i) => {
|
|
556
|
+
var o = bt(), s = e(o);
|
|
557
|
+
{
|
|
558
|
+
let e = h(() => f(d) === "profile");
|
|
559
|
+
j(s, () => Xe, (n, i) => {
|
|
560
|
+
i(n, {
|
|
561
|
+
value: "profile",
|
|
562
|
+
get selected() {
|
|
563
|
+
return f(e);
|
|
564
|
+
},
|
|
565
|
+
onclick: (e) => D(d, e, !0),
|
|
566
|
+
children: (e, n) => {
|
|
567
|
+
x();
|
|
568
|
+
var i = r();
|
|
569
|
+
a((e) => T(i, e), [() => ne()]), t(e, i);
|
|
570
|
+
},
|
|
571
|
+
$$slots: { default: !0 }
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
var c = v(s, 2);
|
|
576
|
+
{
|
|
577
|
+
let e = h(() => f(d) === "password");
|
|
578
|
+
j(c, () => Xe, (n, i) => {
|
|
579
|
+
i(n, {
|
|
580
|
+
value: "password",
|
|
581
|
+
get selected() {
|
|
582
|
+
return f(e);
|
|
583
|
+
},
|
|
584
|
+
onclick: (e) => D(d, e, !0),
|
|
585
|
+
children: (e, n) => {
|
|
586
|
+
x();
|
|
587
|
+
var i = r();
|
|
588
|
+
a((e) => T(i, e), [() => fe()]), t(e, i);
|
|
589
|
+
},
|
|
590
|
+
$$slots: { default: !0 }
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
var l = v(c, 2);
|
|
595
|
+
{
|
|
596
|
+
let e = h(() => f(d) === "api");
|
|
597
|
+
j(l, () => Xe, (n, i) => {
|
|
598
|
+
i(n, {
|
|
599
|
+
value: "api",
|
|
600
|
+
get selected() {
|
|
601
|
+
return f(e);
|
|
602
|
+
},
|
|
603
|
+
onclick: (e) => D(d, e, !0),
|
|
604
|
+
children: (e, n) => {
|
|
605
|
+
x(), t(e, r("API"));
|
|
606
|
+
},
|
|
607
|
+
$$slots: { default: !0 }
|
|
608
|
+
});
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
var u = v(l, 2);
|
|
612
|
+
{
|
|
613
|
+
let e = h(() => f(d) === "appearance");
|
|
614
|
+
j(u, () => Xe, (n, i) => {
|
|
615
|
+
i(n, {
|
|
616
|
+
value: "appearance",
|
|
617
|
+
get selected() {
|
|
618
|
+
return f(e);
|
|
619
|
+
},
|
|
620
|
+
onclick: (e) => D(d, e, !0),
|
|
621
|
+
children: (e, n) => {
|
|
622
|
+
x(), t(e, r("Style"));
|
|
623
|
+
},
|
|
624
|
+
$$slots: { default: !0 }
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
A(v(u, 2), 17, () => f(O), (e) => e.id, (n, i) => {
|
|
629
|
+
var o = w(), s = e(o);
|
|
630
|
+
{
|
|
631
|
+
let e = h(() => f(d) === f(i).id);
|
|
632
|
+
j(s, () => Xe, (n, o) => {
|
|
633
|
+
o(n, {
|
|
634
|
+
get value() {
|
|
635
|
+
return f(i).id;
|
|
636
|
+
},
|
|
637
|
+
get selected() {
|
|
638
|
+
return f(e);
|
|
639
|
+
},
|
|
640
|
+
onclick: (e) => D(d, e, !0),
|
|
641
|
+
children: (e, n) => {
|
|
642
|
+
x();
|
|
643
|
+
var o = r();
|
|
644
|
+
a(() => T(o, f(i).label)), t(e, o);
|
|
645
|
+
},
|
|
646
|
+
$$slots: { default: !0 }
|
|
647
|
+
});
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
t(n, o);
|
|
651
|
+
}), t(n, o);
|
|
652
|
+
},
|
|
653
|
+
$$slots: { default: !0 }
|
|
654
|
+
});
|
|
655
|
+
});
|
|
656
|
+
var _ = v(m, 2);
|
|
657
|
+
j(_, () => Y, (i, s) => {
|
|
658
|
+
s(i, {
|
|
659
|
+
value: "profile",
|
|
660
|
+
get currentValue() {
|
|
661
|
+
return f(d);
|
|
662
|
+
},
|
|
663
|
+
children: (i, s) => {
|
|
664
|
+
var c = wt(), d = l(c), m = l(d);
|
|
665
|
+
R(m, {
|
|
666
|
+
for: "settings-name",
|
|
667
|
+
children: (e, n) => {
|
|
668
|
+
x();
|
|
669
|
+
var i = r();
|
|
670
|
+
a((e) => T(i, e), [() => _e()]), t(e, i);
|
|
671
|
+
},
|
|
672
|
+
$$slots: { default: !0 }
|
|
673
|
+
}), B(v(m, 2), {
|
|
674
|
+
id: "settings-name",
|
|
675
|
+
type: "text",
|
|
676
|
+
name: "name",
|
|
677
|
+
autocomplete: "name",
|
|
678
|
+
get value() {
|
|
679
|
+
return f(k);
|
|
680
|
+
},
|
|
681
|
+
set value(e) {
|
|
682
|
+
D(k, e, !0);
|
|
683
|
+
}
|
|
684
|
+
}), p(d);
|
|
685
|
+
var _ = v(d, 2), y = l(_);
|
|
686
|
+
R(y, {
|
|
687
|
+
for: "settings-email",
|
|
688
|
+
children: (e, n) => {
|
|
689
|
+
x();
|
|
690
|
+
var i = r();
|
|
691
|
+
a((e) => T(i, e), [() => pe()]), t(e, i);
|
|
692
|
+
},
|
|
693
|
+
$$slots: { default: !0 }
|
|
694
|
+
});
|
|
695
|
+
var b = v(y, 2);
|
|
696
|
+
B(b, {
|
|
697
|
+
id: "settings-email",
|
|
698
|
+
type: "email",
|
|
699
|
+
name: "email",
|
|
700
|
+
autocomplete: "email",
|
|
701
|
+
get value() {
|
|
702
|
+
return f(N);
|
|
703
|
+
},
|
|
704
|
+
set value(e) {
|
|
705
|
+
D(N, e, !0);
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
var C = v(b, 2), w = l(C, !0);
|
|
709
|
+
p(C);
|
|
710
|
+
var E = v(C, 2), O = (e) => {
|
|
711
|
+
t(e, xt());
|
|
712
|
+
};
|
|
713
|
+
n(E, (e) => {
|
|
714
|
+
f(Ee) && e(O);
|
|
715
|
+
}), p(_);
|
|
716
|
+
var A = v(_, 2), j = v(l(A), 2);
|
|
717
|
+
let P;
|
|
718
|
+
p(A);
|
|
719
|
+
var F = v(A, 2), I = (e) => {
|
|
720
|
+
var n = St(), r = l(n, !0);
|
|
721
|
+
p(n), a(() => T(r, f(H))), t(e, n);
|
|
722
|
+
};
|
|
723
|
+
n(F, (e) => {
|
|
724
|
+
f(H) && e(I);
|
|
725
|
+
});
|
|
726
|
+
var ee = v(F, 2);
|
|
727
|
+
{
|
|
728
|
+
let r = h(() => f(V) === "saving");
|
|
729
|
+
L(ee, {
|
|
730
|
+
type: "submit",
|
|
731
|
+
get disabled() {
|
|
732
|
+
return f(r);
|
|
733
|
+
},
|
|
734
|
+
class: "w-full sm:w-auto",
|
|
735
|
+
children: (r, i) => {
|
|
736
|
+
var o = Ct(), s = e(o), c = (e) => {
|
|
737
|
+
M(e, { class: "mr-2 size-4 animate-spin" });
|
|
738
|
+
}, l = (e) => {
|
|
739
|
+
Ue(e, { class: "mr-2 size-4" });
|
|
740
|
+
};
|
|
741
|
+
n(s, (e) => {
|
|
742
|
+
f(V) === "saving" ? e(c) : e(l, -1);
|
|
743
|
+
});
|
|
744
|
+
var u = v(s);
|
|
745
|
+
a((e) => T(u, ` ${e ?? ""}`), [() => f(V) === "saved" ? ie() : ye()]), t(r, o);
|
|
746
|
+
},
|
|
747
|
+
$$slots: { default: !0 }
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
p(c), a((e) => {
|
|
751
|
+
T(w, e), P = S(j, 1, "preference-switch svelte-1eaqpj", null, P, { enabled: vt.graphSearchEnabled }), g(j, "aria-checked", vt.graphSearchEnabled);
|
|
752
|
+
}, [() => me()]), u("submit", c, (e) => {
|
|
753
|
+
e.preventDefault(), Ne();
|
|
754
|
+
}), o("click", j, () => vt.update({ graphSearchEnabled: !vt.graphSearchEnabled })), t(i, c);
|
|
755
|
+
},
|
|
756
|
+
$$slots: { default: !0 }
|
|
757
|
+
});
|
|
758
|
+
});
|
|
759
|
+
var y = v(_, 2);
|
|
760
|
+
j(y, () => Y, (i, o) => {
|
|
761
|
+
o(i, {
|
|
762
|
+
value: "password",
|
|
763
|
+
get currentValue() {
|
|
764
|
+
return f(d);
|
|
765
|
+
},
|
|
766
|
+
children: (i, o) => {
|
|
767
|
+
var s = Tt(), c = l(s), d = l(c);
|
|
768
|
+
R(d, {
|
|
769
|
+
for: "settings-current-password",
|
|
770
|
+
children: (e, n) => {
|
|
771
|
+
x();
|
|
772
|
+
var i = r();
|
|
773
|
+
a((e) => T(i, e), [() => ue()]), t(e, i);
|
|
774
|
+
},
|
|
775
|
+
$$slots: { default: !0 }
|
|
776
|
+
}), B(v(d, 2), {
|
|
777
|
+
id: "settings-current-password",
|
|
778
|
+
type: "password",
|
|
779
|
+
name: "current-password",
|
|
780
|
+
autocomplete: "current-password",
|
|
781
|
+
get value() {
|
|
782
|
+
return f(U);
|
|
783
|
+
},
|
|
784
|
+
set value(e) {
|
|
785
|
+
D(U, e, !0);
|
|
786
|
+
}
|
|
787
|
+
}), p(c);
|
|
788
|
+
var m = v(c, 2), g = l(m);
|
|
789
|
+
R(g, {
|
|
790
|
+
for: "settings-new-password",
|
|
791
|
+
children: (e, n) => {
|
|
792
|
+
x();
|
|
793
|
+
var i = r();
|
|
794
|
+
a((e) => T(i, e), [() => de()]), t(e, i);
|
|
795
|
+
},
|
|
796
|
+
$$slots: { default: !0 }
|
|
797
|
+
}), B(v(g, 2), {
|
|
798
|
+
id: "settings-new-password",
|
|
799
|
+
type: "password",
|
|
800
|
+
name: "new-password",
|
|
801
|
+
autocomplete: "new-password",
|
|
802
|
+
get value() {
|
|
803
|
+
return f(W);
|
|
804
|
+
},
|
|
805
|
+
set value(e) {
|
|
806
|
+
D(W, e, !0);
|
|
807
|
+
}
|
|
808
|
+
}), p(m);
|
|
809
|
+
var _ = v(m, 2), y = l(_);
|
|
810
|
+
R(y, {
|
|
811
|
+
for: "settings-confirm-password",
|
|
812
|
+
children: (e, n) => {
|
|
813
|
+
x();
|
|
814
|
+
var i = r();
|
|
815
|
+
a((e) => T(i, e), [() => xe()]), t(e, i);
|
|
816
|
+
},
|
|
817
|
+
$$slots: { default: !0 }
|
|
818
|
+
}), B(v(y, 2), {
|
|
819
|
+
id: "settings-confirm-password",
|
|
820
|
+
type: "password",
|
|
821
|
+
name: "confirm-password",
|
|
822
|
+
autocomplete: "new-password",
|
|
823
|
+
get value() {
|
|
824
|
+
return f(G);
|
|
825
|
+
},
|
|
826
|
+
set value(e) {
|
|
827
|
+
D(G, e, !0);
|
|
828
|
+
}
|
|
829
|
+
}), p(_);
|
|
830
|
+
var b = v(_, 2), S = (e) => {
|
|
831
|
+
var n = St(), r = l(n, !0);
|
|
832
|
+
p(n), a(() => T(r, f(q))), t(e, n);
|
|
833
|
+
};
|
|
834
|
+
n(b, (e) => {
|
|
835
|
+
f(q) && e(S);
|
|
836
|
+
});
|
|
837
|
+
var C = v(b, 2);
|
|
838
|
+
{
|
|
839
|
+
let r = h(() => f(K) === "saving");
|
|
840
|
+
L(C, {
|
|
841
|
+
type: "submit",
|
|
842
|
+
get disabled() {
|
|
843
|
+
return f(r);
|
|
844
|
+
},
|
|
845
|
+
class: "w-full sm:w-auto",
|
|
846
|
+
children: (r, i) => {
|
|
847
|
+
var o = Ct(), s = e(o), c = (e) => {
|
|
848
|
+
M(e, { class: "mr-2 size-4 animate-spin" });
|
|
849
|
+
};
|
|
850
|
+
n(s, (e) => {
|
|
851
|
+
f(K) === "saving" && e(c);
|
|
852
|
+
});
|
|
853
|
+
var l = v(s);
|
|
854
|
+
a((e) => T(l, ` ${e ?? ""}`), [() => f(K) === "saved" ? ie() : ge()]), t(r, o);
|
|
855
|
+
},
|
|
856
|
+
$$slots: { default: !0 }
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
p(s), u("submit", s, (e) => {
|
|
860
|
+
e.preventDefault(), Pe();
|
|
861
|
+
}), t(i, s);
|
|
862
|
+
},
|
|
863
|
+
$$slots: { default: !0 }
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
var C = v(y, 2);
|
|
867
|
+
j(C, () => Y, (e, n) => {
|
|
868
|
+
n(e, {
|
|
869
|
+
value: "appearance",
|
|
870
|
+
get currentValue() {
|
|
871
|
+
return f(d);
|
|
872
|
+
},
|
|
873
|
+
children: (e, n) => {
|
|
874
|
+
var i = Dt(), s = l(i), c = l(s);
|
|
875
|
+
R(c, {
|
|
876
|
+
children: (e, n) => {
|
|
877
|
+
x();
|
|
878
|
+
var i = r();
|
|
879
|
+
a((e) => T(i, e), [() => le()]), t(e, i);
|
|
880
|
+
},
|
|
881
|
+
$$slots: { default: !0 }
|
|
882
|
+
});
|
|
883
|
+
var u = v(c, 2), d = l(u, !0);
|
|
884
|
+
p(u), p(s);
|
|
885
|
+
var m = v(s, 2);
|
|
886
|
+
A(m, 21, () => Ie, (e) => e.key, (e, n) => {
|
|
887
|
+
var r = Et(), i = l(r, !0);
|
|
888
|
+
p(r), a((e) => {
|
|
889
|
+
S(r, 1, e, "svelte-1eaqpj"), T(i, f(n).label);
|
|
890
|
+
}, [() => b(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", Re.value === f(n).value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" "))]), o("click", r, () => Fe(f(n).value)), t(e, r);
|
|
891
|
+
}), p(m);
|
|
892
|
+
var h = v(m, 2), _ = v(l(h), 2), y = l(_), C = v(l(y), 2);
|
|
893
|
+
let w;
|
|
894
|
+
p(y);
|
|
895
|
+
var E = v(y, 2), D = v(l(E), 2);
|
|
896
|
+
let O;
|
|
897
|
+
p(E);
|
|
898
|
+
var k = v(E, 2), j = v(l(k), 2);
|
|
899
|
+
let M;
|
|
900
|
+
p(k);
|
|
901
|
+
var N = v(k, 2), P = v(l(N), 2);
|
|
902
|
+
let F;
|
|
903
|
+
p(N), p(_), p(h), p(i), a((e) => {
|
|
904
|
+
T(d, e), w = S(C, 1, "preference-switch svelte-1eaqpj", null, w, { enabled: Q.showVisualMode }), g(C, "aria-checked", Q.showVisualMode), C.disabled = !Q.showMarkdownMode, O = S(D, 1, "preference-switch svelte-1eaqpj", null, O, { enabled: Q.showMarkdownMode }), g(D, "aria-checked", Q.showMarkdownMode), D.disabled = !Q.showVisualMode, M = S(j, 1, "preference-switch svelte-1eaqpj", null, M, { enabled: Q.minimalToolbar }), g(j, "aria-checked", Q.minimalToolbar), F = S(P, 1, "preference-switch svelte-1eaqpj", null, F, { enabled: Q.showScrollToTop }), g(P, "aria-checked", Q.showScrollToTop);
|
|
905
|
+
}, [() => we()]), o("click", C, () => Q.update({ showVisualMode: !Q.showVisualMode })), o("click", D, () => Q.update({ showMarkdownMode: !Q.showMarkdownMode })), o("click", j, () => Q.update({ minimalToolbar: !Q.minimalToolbar })), o("click", P, () => Q.update({ showScrollToTop: !Q.showScrollToTop })), t(e, i);
|
|
906
|
+
},
|
|
907
|
+
$$slots: { default: !0 }
|
|
908
|
+
});
|
|
909
|
+
});
|
|
910
|
+
var E = v(C, 2);
|
|
911
|
+
j(E, () => Y, (e, t) => {
|
|
912
|
+
t(e, {
|
|
913
|
+
value: "api",
|
|
914
|
+
get currentValue() {
|
|
915
|
+
return f(d);
|
|
916
|
+
},
|
|
917
|
+
children: (e, t) => {
|
|
918
|
+
ot(e, {});
|
|
919
|
+
},
|
|
920
|
+
$$slots: { default: !0 }
|
|
921
|
+
});
|
|
922
|
+
}), A(v(E, 2), 17, () => f(O), (e) => e.id, (n, r) => {
|
|
923
|
+
var i = w();
|
|
924
|
+
j(e(i), () => Y, (n, i) => {
|
|
925
|
+
i(n, {
|
|
926
|
+
get value() {
|
|
927
|
+
return f(r).id;
|
|
928
|
+
},
|
|
929
|
+
get currentValue() {
|
|
930
|
+
return f(d);
|
|
931
|
+
},
|
|
932
|
+
children: (n, i) => {
|
|
933
|
+
let a = h(() => f(r).component);
|
|
934
|
+
var o = w();
|
|
935
|
+
j(e(o), () => f(a), (e, t) => {
|
|
936
|
+
t(e, {});
|
|
937
|
+
}), t(n, o);
|
|
938
|
+
},
|
|
939
|
+
$$slots: { default: !0 }
|
|
940
|
+
});
|
|
941
|
+
}), t(n, i);
|
|
942
|
+
}), t(i, c);
|
|
943
|
+
},
|
|
944
|
+
$$slots: { default: !0 }
|
|
945
|
+
});
|
|
946
|
+
}), j(v(_, 2), () => ee, (i, o) => {
|
|
947
|
+
o(i, {
|
|
948
|
+
class: "settings-dialog-footer gap-4 max-sm:flex-col max-sm:items-stretch",
|
|
949
|
+
children: (i, o) => {
|
|
950
|
+
var s = yt(), c = e(s), l = (n) => {
|
|
951
|
+
L(n, {
|
|
952
|
+
id: "logout-button",
|
|
953
|
+
variant: "ghost",
|
|
954
|
+
onclick: Le,
|
|
955
|
+
get disabled() {
|
|
956
|
+
return f(J);
|
|
957
|
+
},
|
|
958
|
+
class: "mr-auto text-muted-foreground hover:text-destructive max-sm:mr-0",
|
|
959
|
+
children: (n, r) => {
|
|
960
|
+
var i = Ct(), o = e(i);
|
|
961
|
+
He(o, { class: "mr-2 size-4" });
|
|
962
|
+
var s = v(o);
|
|
963
|
+
a((e) => T(s, ` ${e ?? ""}`), [() => f(J) ? "…" : ce()]), t(n, i);
|
|
964
|
+
},
|
|
965
|
+
$$slots: { default: !0 }
|
|
966
|
+
});
|
|
967
|
+
};
|
|
968
|
+
n(c, (e) => {
|
|
969
|
+
f(d) === "profile" && e(l);
|
|
970
|
+
}), L(v(c, 2), {
|
|
971
|
+
variant: "outline",
|
|
972
|
+
onclick: We,
|
|
973
|
+
class: "w-full sm:w-auto",
|
|
974
|
+
children: (e, n) => {
|
|
975
|
+
x();
|
|
976
|
+
var i = r();
|
|
977
|
+
a((e) => T(i, e), [() => oe()]), t(e, i);
|
|
978
|
+
},
|
|
979
|
+
$$slots: { default: !0 }
|
|
980
|
+
}), t(i, s);
|
|
981
|
+
},
|
|
982
|
+
$$slots: { default: !0 }
|
|
983
|
+
});
|
|
984
|
+
}), t(i, c);
|
|
985
|
+
},
|
|
986
|
+
$$slots: { default: !0 }
|
|
987
|
+
});
|
|
988
|
+
}), t(i, Ke), _();
|
|
989
|
+
}
|
|
990
|
+
i(["click"]);
|
|
991
|
+
//#endregion
|
|
992
|
+
export { At as t };
|