@hiai-gg/docsmint 0.3.6 → 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/dist/backend/index.js +1 -1
- 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.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 +41 -40
- 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/package.json +109 -1
- package/packages/cli/src/index.ts +1 -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
package/dist/backend/index.js
CHANGED
|
@@ -214149,7 +214149,7 @@ var swaggerConfig = {
|
|
|
214149
214149
|
documentation: {
|
|
214150
214150
|
info: {
|
|
214151
214151
|
title: "DocsMint API",
|
|
214152
|
-
version: "0.3.
|
|
214152
|
+
version: "0.3.7",
|
|
214153
214153
|
description: "Self-hosted AI-first documentation platform. Full-text + semantic search, version history, sharing, and folder organization.",
|
|
214154
214154
|
contact: { name: "HiAi-gg", url: "https://github.com/HiAi-gg/docsmint" },
|
|
214155
214155
|
license: {
|
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
import "./disclose-version-5I57E3LD.js";
|
|
2
|
+
import { $ as e, A as t, E as n, F as r, K as i, M as a, Q as o, R as s, V as c, _t as l, at as u, ct as d, dt as f, et as p, ft as m, gt as h, j as g, k as _, n as v, q as y, rt as b, s as x, tt as S, u as C, w as ee, x as w } from "./client-Bc5Fzx40.js";
|
|
3
|
+
import { t as T } from "./loader-circle-Bk-WFz9g.js";
|
|
4
|
+
import { a as E, i as D, n as te, o as O, r as ne, t as re } from "./dialog-BDkiG42a.js";
|
|
5
|
+
import { a as ie, i as ae, n as oe, r as se, t as ce } from "./select-value-CvrWRkXW.js";
|
|
6
|
+
import { t as k } from "./label-C-GkhEp4.js";
|
|
7
|
+
import { t as le } from "./copy-CMAA6GP0.js";
|
|
8
|
+
import { t as ue } from "./circle-check-CDqeMB2d.js";
|
|
9
|
+
import { Qn as de, S as fe, _ as pe, b as A, er as me, g as he, h as ge, m as _e, nr as ve, p as ye, tr as be, v as xe, x as Se, y as Ce } from "./messages-BpYaLbzE.js";
|
|
10
|
+
import { t as we } from "./input-CBI6p4Xl.js";
|
|
11
|
+
import { a as Te, n as Ee, o as De, r as Oe, s as ke, t as Ae } from "./api-keys-CpkrA8rD.js";
|
|
12
|
+
//#region src/lib/components/sidebar/category-dialog-feedback.ts
|
|
13
|
+
function je(e, t) {
|
|
14
|
+
return typeof e == "object" && e && "status" in e && e.status === 409 ? "A category with this name already exists." : e instanceof Error && e.message.trim().length > 0 ? e.message : t;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/lib/components/sidebar/CategoryDialog.svelte
|
|
18
|
+
var Me = a("<span class=\"font-medium text-foreground\"> </span> ", 1), Ne = a("Delete <span class=\"font-medium text-foreground\"> </span> ", 1), j = a("<!> <!>", 1), Pe = a("<div class=\"flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/10 p-4\" role=\"status\" aria-live=\"polite\"><!> <div><p class=\"text-sm font-medium text-foreground\"> </p> <p class=\"text-sm text-muted-foreground\"><span class=\"font-medium text-foreground\"> </span> </p></div></div>"), Fe = a("<!> Copy API key", 1), Ie = a("<div class=\"rounded-md border border-primary/20 bg-background/80 p-3\"><p class=\"text-xs font-medium text-foreground\">Copy the API key now. It remains available in Settings → API.</p> <code class=\"mt-2 block break-all rounded bg-muted p-2 text-xs text-foreground\"> </code> <!></div>"), Le = a("<p class=\"text-xs text-destructive\" role=\"alert\"> </p>"), Re = a("<div class=\"space-y-3 rounded-lg border border-primary/30 bg-primary/10 p-4\" role=\"status\" aria-live=\"polite\"><div class=\"flex items-start gap-3\"><!> <div><p class=\"text-sm font-medium text-foreground\">Category created</p> <p class=\"text-sm text-muted-foreground\"> </p></div></div> <!> <!></div>"), ze = a("<p id=\"category-dialog-name-error\" class=\"text-xs text-destructive\" role=\"alert\"> </p>"), Be = a("<!> <!> <!>", 1), Ve = a("<div class=\"space-y-3 rounded-md border border-border/70 bg-muted/30 p-3\"><div class=\"flex flex-wrap items-center justify-between gap-2\"><!> <div class=\"flex flex-wrap gap-2\"><!> <!></div></div> <div class=\"grid gap-2 sm:grid-cols-3\"><label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Read</span></label> <label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Edit</span></label> <label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Write</span></label></div></div>"), He = a("<p class=\"text-xs text-muted-foreground\">Save Category API access first, then reopen settings to issue a key.</p>"), Ue = a("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-3 text-primary\"><p class=\"text-xs font-medium\">Copy now — this raw key is shown once.</p> <code class=\"mt-1 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), We = a("<div class=\"flex items-center justify-between gap-3 rounded-md bg-muted/40 px-3 py-2 text-xs\"><span> </span> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), Ge = a("<div class=\"space-y-3 rounded-md border border-border/70 p-3\"><div class=\"flex items-center justify-between gap-2\"><div><!><p class=\"text-xs text-muted-foreground\">Keys inherit the saved permissions above.</p></div> <!></div> <!> <!> <div class=\"max-h-48 space-y-2 overflow-y-auto pr-1\"></div></div>"), Ke = a("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), qe = a("<!> ", 1);
|
|
19
|
+
function M(a, M) {
|
|
20
|
+
m(M, !0);
|
|
21
|
+
let N = {
|
|
22
|
+
Root: ie,
|
|
23
|
+
Content: ae,
|
|
24
|
+
Item: se,
|
|
25
|
+
Trigger: oe,
|
|
26
|
+
Value: ce
|
|
27
|
+
}, P = v(M, "open", 15, !1), F = u(""), I = u(null), L = u(!1), R = u("unavailable"), z = u(!1), B = u(!1), V = u(!1), H = u(S([])), U = u(S({})), W = u(null), G = u(!1), K = u(null), q = u(null), J = u(null), Y = d(() => c(W) ? c(U)[c(W)] : void 0);
|
|
28
|
+
async function X(e) {
|
|
29
|
+
b(H, (await Te()).keys.filter((t) => Ee(t.scopes) === e), !0);
|
|
30
|
+
}
|
|
31
|
+
async function Je() {
|
|
32
|
+
if (M.category?.id) {
|
|
33
|
+
b(G, !0);
|
|
34
|
+
try {
|
|
35
|
+
let e = await Oe(M.category.id);
|
|
36
|
+
b(U, {
|
|
37
|
+
...c(U),
|
|
38
|
+
[e.id]: e.key
|
|
39
|
+
}, !0), b(W, e.id, !0), await X(M.category.id);
|
|
40
|
+
} catch (e) {
|
|
41
|
+
b(I, e instanceof Error ? e.message : "Failed to create category API key", !0);
|
|
42
|
+
} finally {
|
|
43
|
+
b(G, !1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function Ye(e) {
|
|
48
|
+
if (M.category?.id) {
|
|
49
|
+
b(G, !0);
|
|
50
|
+
try {
|
|
51
|
+
await ke(e);
|
|
52
|
+
let { [e]: t, ...n } = c(U);
|
|
53
|
+
b(U, n, !0), c(W) === e && b(W, null), await X(M.category.id);
|
|
54
|
+
} finally {
|
|
55
|
+
b(G, !1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function Xe(e) {
|
|
60
|
+
let t = c(U)[e.id] ?? await De(e.id);
|
|
61
|
+
await navigator.clipboard.writeText(Ae(e, t));
|
|
62
|
+
}
|
|
63
|
+
y(() => {
|
|
64
|
+
if (!P()) return;
|
|
65
|
+
b(F, M.category?.name ?? "", !0);
|
|
66
|
+
let e = M.category?.apiMode === "category" ? "category" : M.category?.apiMode === "global" || M.category?.apiMode === "general" ? "global" : "unavailable";
|
|
67
|
+
b(R, e, !0), b(z, !!M.category?.apiPermissionRead, !0), b(B, !!M.category?.apiPermissionEdit, !0), b(V, !!M.category?.apiPermissionWrite, !0), e === "unavailable" && (b(z, !1), b(B, !1), b(V, !1)), b(U, {}, !0), b(W, null), b(H, [], !0), b(K, null), b(q, null), b(J, null), M.mode === "edit" && M.category?.id && X(M.category.id), b(I, null);
|
|
68
|
+
});
|
|
69
|
+
let Z = d(() => c(F).trim()), Q = d(() => M.mode === "delete"), Ze = d(() => c(z) || c(B) || c(V)), Qe = d(() => c(J) ? _e() : c(Q) ? he() : M.mode === "edit" ? Se() : fe()), $e = d(() => c(Q) ? me() : M.mode === "edit" ? ve() : de());
|
|
70
|
+
function et(e) {
|
|
71
|
+
return e === "category" ? "category" : e === "global" ? "global" : "unavailable";
|
|
72
|
+
}
|
|
73
|
+
function tt(e) {
|
|
74
|
+
if (e === "read") {
|
|
75
|
+
b(z, !0), b(B, !1), b(V, !1);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (e === "write") {
|
|
79
|
+
b(z, !1), b(B, !1), b(V, !0);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (e === "read-write") {
|
|
83
|
+
b(z, !0), b(B, !1), b(V, !0);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
b(z, !0), b(B, !0), b(V, !0);
|
|
87
|
+
}
|
|
88
|
+
async function nt(e) {
|
|
89
|
+
if (e?.preventDefault(), !c(L)) {
|
|
90
|
+
if (c(Q)) {
|
|
91
|
+
if (!M.onDelete) {
|
|
92
|
+
$();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
b(L, !0);
|
|
96
|
+
try {
|
|
97
|
+
await M.onDelete(), b(J, M.category?.name ?? "Category", !0);
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.error("CategoryDialog: delete failed", e), b(I, e instanceof Error ? e.message : pe(), !0);
|
|
100
|
+
} finally {
|
|
101
|
+
b(L, !1);
|
|
102
|
+
}
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (c(Z).length === 0) {
|
|
106
|
+
b(I, "Name is required");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (c(R) !== "unavailable" && !c(Ze)) {
|
|
110
|
+
b(I, "Select at least one permission");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!M.onSave) {
|
|
114
|
+
$();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
b(I, null), b(L, !0);
|
|
118
|
+
try {
|
|
119
|
+
let e = await M.onSave({
|
|
120
|
+
name: c(Z),
|
|
121
|
+
apiMode: et(c(R)),
|
|
122
|
+
apiPermissionRead: c(R) === "unavailable" ? !1 : c(z),
|
|
123
|
+
apiPermissionEdit: c(R) === "unavailable" ? !1 : c(B),
|
|
124
|
+
apiPermissionWrite: c(R) === "unavailable" ? !1 : c(V)
|
|
125
|
+
});
|
|
126
|
+
if (M.mode === "create" && e) {
|
|
127
|
+
if (b(K, e.name, !0), c(R) === "category") try {
|
|
128
|
+
b(q, (await Oe(e.id)).key, !0);
|
|
129
|
+
} catch (e) {
|
|
130
|
+
b(I, `Category created, but its API key could not be created: ${je(e, "Unknown error")}`);
|
|
131
|
+
}
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
$();
|
|
135
|
+
} catch (e) {
|
|
136
|
+
console.error("CategoryDialog: save failed", e), b(I, je(e, M.mode === "edit" ? xe() : Ce()), !0);
|
|
137
|
+
} finally {
|
|
138
|
+
b(L, !1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function $() {
|
|
143
|
+
c(L) || (P(!1), M.onClose?.());
|
|
144
|
+
}
|
|
145
|
+
function rt(e) {
|
|
146
|
+
if (!e && c(L)) {
|
|
147
|
+
P(!0);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
e || $();
|
|
151
|
+
}
|
|
152
|
+
E(a, {
|
|
153
|
+
onOpenChange: rt,
|
|
154
|
+
get open() {
|
|
155
|
+
return P();
|
|
156
|
+
},
|
|
157
|
+
set open(e) {
|
|
158
|
+
P(e);
|
|
159
|
+
},
|
|
160
|
+
children: (a, u) => {
|
|
161
|
+
var f = Be(), m = e(f);
|
|
162
|
+
te(m, {
|
|
163
|
+
children: (a, s) => {
|
|
164
|
+
var u = j(), d = e(u);
|
|
165
|
+
re(d, {
|
|
166
|
+
children: (e, n) => {
|
|
167
|
+
h();
|
|
168
|
+
var a = r();
|
|
169
|
+
i(() => _(a, c(Qe))), t(e, a);
|
|
170
|
+
},
|
|
171
|
+
$$slots: { default: !0 }
|
|
172
|
+
});
|
|
173
|
+
var f = p(d, 2), m = (n) => {
|
|
174
|
+
D(n, {
|
|
175
|
+
children: (n, r) => {
|
|
176
|
+
var a = Me(), s = e(a), u = o(s);
|
|
177
|
+
l(s);
|
|
178
|
+
var d = p(s);
|
|
179
|
+
i((e) => {
|
|
180
|
+
_(u, `“${c(J) ?? ""}”`), _(d, ` ${e ?? ""}`);
|
|
181
|
+
}, [() => ye()]), t(n, a);
|
|
182
|
+
},
|
|
183
|
+
$$slots: { default: !0 }
|
|
184
|
+
});
|
|
185
|
+
}, g = (n) => {
|
|
186
|
+
D(n, {
|
|
187
|
+
children: (n, r) => {
|
|
188
|
+
h();
|
|
189
|
+
var a = Ne(), s = p(e(a)), c = o(s);
|
|
190
|
+
l(s);
|
|
191
|
+
var u = p(s);
|
|
192
|
+
i((e) => {
|
|
193
|
+
_(c, `“${M.category?.name ?? "Category" ?? ""}”`), _(u, `?
|
|
194
|
+
${e ?? ""}`);
|
|
195
|
+
}, [() => ge()]), t(n, a);
|
|
196
|
+
},
|
|
197
|
+
$$slots: { default: !0 }
|
|
198
|
+
});
|
|
199
|
+
}, v = (e) => {
|
|
200
|
+
D(e, {
|
|
201
|
+
children: (e, n) => {
|
|
202
|
+
h();
|
|
203
|
+
var a = r();
|
|
204
|
+
i((e) => _(a, e), [() => A()]), t(e, a);
|
|
205
|
+
},
|
|
206
|
+
$$slots: { default: !0 }
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
n(f, (e) => {
|
|
210
|
+
c(J) ? e(m) : c(Q) ? e(g, 1) : e(v, -1);
|
|
211
|
+
}), t(a, u);
|
|
212
|
+
},
|
|
213
|
+
$$slots: { default: !0 }
|
|
214
|
+
});
|
|
215
|
+
var v = p(m, 2), y = (e) => {
|
|
216
|
+
var n = Pe(), r = o(n);
|
|
217
|
+
ue(r, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
218
|
+
var a = p(r, 2), s = o(a), u = o(s, !0);
|
|
219
|
+
l(s);
|
|
220
|
+
var d = p(s, 2), f = o(d), m = o(f);
|
|
221
|
+
l(f);
|
|
222
|
+
var h = p(f);
|
|
223
|
+
l(d), l(a), l(n), i((e, t) => {
|
|
224
|
+
_(u, e), _(m, `“${c(J) ?? ""}”`), _(h, ` ${t ?? ""}`);
|
|
225
|
+
}, [() => _e(), () => ye()]), t(e, n);
|
|
226
|
+
}, S = (r) => {
|
|
227
|
+
var a = Re(), s = o(a), u = o(s);
|
|
228
|
+
ue(u, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
229
|
+
var d = p(u, 2), f = p(o(d), 2), m = o(f);
|
|
230
|
+
l(f), l(d), l(s);
|
|
231
|
+
var g = p(s, 2), v = (n) => {
|
|
232
|
+
var r = Ie(), a = p(o(r), 2), s = o(a, !0);
|
|
233
|
+
l(a), O(p(a, 2), {
|
|
234
|
+
type: "button",
|
|
235
|
+
size: "sm",
|
|
236
|
+
variant: "outline",
|
|
237
|
+
class: "mt-2",
|
|
238
|
+
onclick: () => navigator.clipboard.writeText(c(q) ?? ""),
|
|
239
|
+
children: (n, r) => {
|
|
240
|
+
var i = Fe();
|
|
241
|
+
le(e(i), { class: "mr-1 size-3.5" }), h(), t(n, i);
|
|
242
|
+
},
|
|
243
|
+
$$slots: { default: !0 }
|
|
244
|
+
}), l(r), i(() => _(s, c(q))), t(n, r);
|
|
245
|
+
};
|
|
246
|
+
n(g, (e) => {
|
|
247
|
+
c(q) && e(v);
|
|
248
|
+
});
|
|
249
|
+
var y = p(g, 2), b = (e) => {
|
|
250
|
+
var n = Le(), r = o(n, !0);
|
|
251
|
+
l(n), i(() => _(r, c(I))), t(e, n);
|
|
252
|
+
};
|
|
253
|
+
n(y, (e) => {
|
|
254
|
+
c(I) && e(b);
|
|
255
|
+
}), l(a), i(() => _(m, `${c(K) ?? ""} is ready to use.`)), t(r, a);
|
|
256
|
+
}, E = (a) => {
|
|
257
|
+
var u = Ke(), f = o(u), m = o(f);
|
|
258
|
+
k(m, {
|
|
259
|
+
for: "category-dialog-name",
|
|
260
|
+
children: (e, n) => {
|
|
261
|
+
h();
|
|
262
|
+
var a = r();
|
|
263
|
+
i((e) => _(a, e), [() => A()]), t(e, a);
|
|
264
|
+
},
|
|
265
|
+
$$slots: { default: !0 }
|
|
266
|
+
});
|
|
267
|
+
var v = p(m, 2);
|
|
268
|
+
{
|
|
269
|
+
let e = d(() => A()), t = d(() => c(I) ? "true" : void 0), n = d(() => c(I) ? "category-dialog-name-error" : void 0);
|
|
270
|
+
we(v, {
|
|
271
|
+
id: "category-dialog-name",
|
|
272
|
+
name: "name",
|
|
273
|
+
type: "text",
|
|
274
|
+
get placeholder() {
|
|
275
|
+
return c(e);
|
|
276
|
+
},
|
|
277
|
+
maxlength: 255,
|
|
278
|
+
required: !0,
|
|
279
|
+
get disabled() {
|
|
280
|
+
return c(L);
|
|
281
|
+
},
|
|
282
|
+
get "aria-invalid"() {
|
|
283
|
+
return c(t);
|
|
284
|
+
},
|
|
285
|
+
get "aria-describedby"() {
|
|
286
|
+
return c(n);
|
|
287
|
+
},
|
|
288
|
+
autocomplete: "off",
|
|
289
|
+
get value() {
|
|
290
|
+
return c(F);
|
|
291
|
+
},
|
|
292
|
+
set value(e) {
|
|
293
|
+
b(F, e, !0);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
var y = p(v, 2), S = (e) => {
|
|
298
|
+
var n = ze(), r = o(n, !0);
|
|
299
|
+
l(n), i(() => _(r, c(I))), t(e, n);
|
|
300
|
+
};
|
|
301
|
+
n(y, (e) => {
|
|
302
|
+
c(I) && e(S);
|
|
303
|
+
}), l(f);
|
|
304
|
+
var T = p(f, 2), E = o(T);
|
|
305
|
+
k(E, {
|
|
306
|
+
for: "category-dialog-api-mode",
|
|
307
|
+
children: (e, n) => {
|
|
308
|
+
h(), t(e, r("API access"));
|
|
309
|
+
},
|
|
310
|
+
$$slots: { default: !0 }
|
|
311
|
+
}), w(p(E, 2), () => N.Root, (n, a) => {
|
|
312
|
+
a(n, {
|
|
313
|
+
type: "single",
|
|
314
|
+
get value() {
|
|
315
|
+
return c(R);
|
|
316
|
+
},
|
|
317
|
+
get disabled() {
|
|
318
|
+
return c(L);
|
|
319
|
+
},
|
|
320
|
+
onValueChange: (e) => {
|
|
321
|
+
(e === "unavailable" || e === "global" || e === "category") && b(R, e, !0);
|
|
322
|
+
},
|
|
323
|
+
children: (n, a) => {
|
|
324
|
+
var o = j(), s = e(o);
|
|
325
|
+
w(s, () => N.Trigger, (n, a) => {
|
|
326
|
+
a(n, {
|
|
327
|
+
id: "category-dialog-api-mode",
|
|
328
|
+
class: "h-10 w-full",
|
|
329
|
+
children: (n, a) => {
|
|
330
|
+
var o = g();
|
|
331
|
+
w(e(o), () => N.Value, (e, n) => {
|
|
332
|
+
n(e, {
|
|
333
|
+
placeholder: "Select API access",
|
|
334
|
+
children: (e, n) => {
|
|
335
|
+
h();
|
|
336
|
+
var a = r();
|
|
337
|
+
i(() => _(a, c(R) === "unavailable" ? "Unavailable" : c(R) === "global" ? "Global" : "Category API")), t(e, a);
|
|
338
|
+
},
|
|
339
|
+
$$slots: { default: !0 }
|
|
340
|
+
});
|
|
341
|
+
}), t(n, o);
|
|
342
|
+
},
|
|
343
|
+
$$slots: { default: !0 }
|
|
344
|
+
});
|
|
345
|
+
}), w(p(s, 2), () => N.Content, (n, i) => {
|
|
346
|
+
i(n, {
|
|
347
|
+
children: (n, i) => {
|
|
348
|
+
var a = Be(), o = e(a);
|
|
349
|
+
w(o, () => N.Item, (e, n) => {
|
|
350
|
+
n(e, {
|
|
351
|
+
value: "unavailable",
|
|
352
|
+
children: (e, n) => {
|
|
353
|
+
h(), t(e, r("Unavailable"));
|
|
354
|
+
},
|
|
355
|
+
$$slots: { default: !0 }
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
var s = p(o, 2);
|
|
359
|
+
w(s, () => N.Item, (e, n) => {
|
|
360
|
+
n(e, {
|
|
361
|
+
value: "global",
|
|
362
|
+
children: (e, n) => {
|
|
363
|
+
h(), t(e, r("Global"));
|
|
364
|
+
},
|
|
365
|
+
$$slots: { default: !0 }
|
|
366
|
+
});
|
|
367
|
+
}), w(p(s, 2), () => N.Item, (e, n) => {
|
|
368
|
+
n(e, {
|
|
369
|
+
value: "category",
|
|
370
|
+
children: (e, n) => {
|
|
371
|
+
h(), t(e, r("Category API"));
|
|
372
|
+
},
|
|
373
|
+
$$slots: { default: !0 }
|
|
374
|
+
});
|
|
375
|
+
}), t(n, a);
|
|
376
|
+
},
|
|
377
|
+
$$slots: { default: !0 }
|
|
378
|
+
});
|
|
379
|
+
}), t(n, o);
|
|
380
|
+
},
|
|
381
|
+
$$slots: { default: !0 }
|
|
382
|
+
});
|
|
383
|
+
}), l(T);
|
|
384
|
+
var D = p(T, 2), te = (e) => {
|
|
385
|
+
var n = Ve(), a = o(n), s = o(a);
|
|
386
|
+
k(s, {
|
|
387
|
+
class: "text-sm",
|
|
388
|
+
children: (e, n) => {
|
|
389
|
+
h(), t(e, r("Permissions"));
|
|
390
|
+
},
|
|
391
|
+
$$slots: { default: !0 }
|
|
392
|
+
});
|
|
393
|
+
var u = p(s, 2), d = o(u);
|
|
394
|
+
O(d, {
|
|
395
|
+
type: "button",
|
|
396
|
+
variant: "outline",
|
|
397
|
+
size: "sm",
|
|
398
|
+
onclick: () => tt("read-write"),
|
|
399
|
+
children: (e, n) => {
|
|
400
|
+
h(), t(e, r("Read / Write"));
|
|
401
|
+
},
|
|
402
|
+
$$slots: { default: !0 }
|
|
403
|
+
}), O(p(d, 2), {
|
|
404
|
+
type: "button",
|
|
405
|
+
variant: "outline",
|
|
406
|
+
size: "sm",
|
|
407
|
+
onclick: () => tt("read-edit-write"),
|
|
408
|
+
children: (e, n) => {
|
|
409
|
+
h(), t(e, r("Read / Edit / Write"));
|
|
410
|
+
},
|
|
411
|
+
$$slots: { default: !0 }
|
|
412
|
+
}), l(u), l(a);
|
|
413
|
+
var f = p(a, 2), m = o(f), g = o(m);
|
|
414
|
+
C(g), h(2), l(m);
|
|
415
|
+
var _ = p(m, 2), v = o(_);
|
|
416
|
+
C(v), h(2), l(_);
|
|
417
|
+
var y = p(_, 2), S = o(y);
|
|
418
|
+
C(S), h(2), l(y), l(f), l(n), i(() => {
|
|
419
|
+
g.disabled = c(L), v.disabled = c(L), S.disabled = c(L);
|
|
420
|
+
}), x(g, () => c(z), (e) => b(z, e)), x(v, () => c(B), (e) => b(B, e)), x(S, () => c(V), (e) => b(V, e)), t(e, n);
|
|
421
|
+
};
|
|
422
|
+
n(D, (e) => {
|
|
423
|
+
c(R) !== "unavailable" && e(te);
|
|
424
|
+
});
|
|
425
|
+
var ne = p(D, 2), re = (e) => {
|
|
426
|
+
var a = Ge(), s = o(a), u = o(s);
|
|
427
|
+
k(o(u), {
|
|
428
|
+
children: (e, n) => {
|
|
429
|
+
h(), t(e, r("Category API keys"));
|
|
430
|
+
},
|
|
431
|
+
$$slots: { default: !0 }
|
|
432
|
+
}), h(), l(u);
|
|
433
|
+
var f = p(u, 2);
|
|
434
|
+
{
|
|
435
|
+
let e = d(() => c(L) || c(G) || M.category.apiMode !== "category");
|
|
436
|
+
O(f, {
|
|
437
|
+
type: "button",
|
|
438
|
+
size: "sm",
|
|
439
|
+
onclick: Je,
|
|
440
|
+
get disabled() {
|
|
441
|
+
return c(e);
|
|
442
|
+
},
|
|
443
|
+
children: (e, n) => {
|
|
444
|
+
h(), t(e, r("Create key"));
|
|
445
|
+
},
|
|
446
|
+
$$slots: { default: !0 }
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
l(s);
|
|
450
|
+
var m = p(s, 2), g = (e) => {
|
|
451
|
+
t(e, He());
|
|
452
|
+
};
|
|
453
|
+
n(m, (e) => {
|
|
454
|
+
M.category.apiMode !== "category" && e(g);
|
|
455
|
+
});
|
|
456
|
+
var v = p(m, 2), y = (e) => {
|
|
457
|
+
var n = Ue(), a = p(o(n), 2), s = o(a, !0);
|
|
458
|
+
l(a), O(p(a, 2), {
|
|
459
|
+
type: "button",
|
|
460
|
+
size: "sm",
|
|
461
|
+
variant: "outline",
|
|
462
|
+
class: "mt-2",
|
|
463
|
+
onclick: () => navigator.clipboard.writeText(c(Y)),
|
|
464
|
+
children: (e, n) => {
|
|
465
|
+
h(), t(e, r("Copy key"));
|
|
466
|
+
},
|
|
467
|
+
$$slots: { default: !0 }
|
|
468
|
+
}), l(n), i(() => _(s, c(Y))), t(e, n);
|
|
469
|
+
};
|
|
470
|
+
n(v, (e) => {
|
|
471
|
+
c(Y) && e(y);
|
|
472
|
+
});
|
|
473
|
+
var b = p(v, 2);
|
|
474
|
+
ee(b, 21, () => c(H), (e) => e.id, (e, n) => {
|
|
475
|
+
var a = We(), s = o(a), u = o(s);
|
|
476
|
+
l(s);
|
|
477
|
+
var f = p(s, 2), m = o(f);
|
|
478
|
+
{
|
|
479
|
+
let e = d(() => !c(n).recoverable && !c(U)[c(n).id]);
|
|
480
|
+
O(m, {
|
|
481
|
+
type: "button",
|
|
482
|
+
size: "sm",
|
|
483
|
+
variant: "outline",
|
|
484
|
+
onclick: () => Xe(c(n)),
|
|
485
|
+
get disabled() {
|
|
486
|
+
return c(e);
|
|
487
|
+
},
|
|
488
|
+
children: (e, a) => {
|
|
489
|
+
h();
|
|
490
|
+
var o = r();
|
|
491
|
+
i(() => _(o, c(n).recoverable || c(U)[c(n).id] ? "Copy key" : "Rotate to enable copy")), t(e, o);
|
|
492
|
+
},
|
|
493
|
+
$$slots: { default: !0 }
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
O(p(m, 2), {
|
|
497
|
+
type: "button",
|
|
498
|
+
size: "sm",
|
|
499
|
+
variant: "destructive",
|
|
500
|
+
onclick: () => Ye(c(n).id),
|
|
501
|
+
get disabled() {
|
|
502
|
+
return c(G);
|
|
503
|
+
},
|
|
504
|
+
children: (e, n) => {
|
|
505
|
+
h(), t(e, r("Revoke"));
|
|
506
|
+
},
|
|
507
|
+
$$slots: { default: !0 }
|
|
508
|
+
}), l(f), l(a), i(() => _(u, `${c(n).name ?? ""} · ${c(n).prefix ?? ""}…`)), t(e, a);
|
|
509
|
+
}), l(b), l(a), t(e, a);
|
|
510
|
+
};
|
|
511
|
+
n(ne, (e) => {
|
|
512
|
+
M.mode === "edit" && c(R) === "category" && M.category?.id && e(re);
|
|
513
|
+
}), l(u), s("submit", u, nt), t(a, u);
|
|
514
|
+
}, ie = (e) => {
|
|
515
|
+
var n = Le(), r = o(n, !0);
|
|
516
|
+
l(n), i(() => _(r, c(I))), t(e, n);
|
|
517
|
+
};
|
|
518
|
+
n(v, (e) => {
|
|
519
|
+
c(J) ? e(y) : c(K) ? e(S, 1) : c(Q) ? c(I) && e(ie, 3) : e(E, 2);
|
|
520
|
+
}), ne(p(v, 2), {
|
|
521
|
+
class: "gap-2 max-sm:flex-col max-sm:items-stretch",
|
|
522
|
+
children: (a, o) => {
|
|
523
|
+
var s = j(), l = e(s), u = (e) => {
|
|
524
|
+
O(e, {
|
|
525
|
+
variant: "outline",
|
|
526
|
+
type: "button",
|
|
527
|
+
onclick: $,
|
|
528
|
+
get disabled() {
|
|
529
|
+
return c(L);
|
|
530
|
+
},
|
|
531
|
+
children: (e, n) => {
|
|
532
|
+
h();
|
|
533
|
+
var a = r();
|
|
534
|
+
i((e) => _(a, e), [() => be()]), t(e, a);
|
|
535
|
+
},
|
|
536
|
+
$$slots: { default: !0 }
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
n(l, (e) => {
|
|
540
|
+
!c(K) && !c(J) && e(u);
|
|
541
|
+
});
|
|
542
|
+
var f = p(l, 2);
|
|
543
|
+
{
|
|
544
|
+
let r = d(() => c(Q) ? "button" : "submit"), a = d(() => c(Q) ? "destructive" : "default"), o = d(() => c(K) || c(J) ? $ : nt), s = d(() => c(L) || !c(Q) && !c(K) && !c(J) && c(Z).length === 0);
|
|
545
|
+
O(f, {
|
|
546
|
+
get type() {
|
|
547
|
+
return c(r);
|
|
548
|
+
},
|
|
549
|
+
get variant() {
|
|
550
|
+
return c(a);
|
|
551
|
+
},
|
|
552
|
+
get onclick() {
|
|
553
|
+
return c(o);
|
|
554
|
+
},
|
|
555
|
+
get disabled() {
|
|
556
|
+
return c(s);
|
|
557
|
+
},
|
|
558
|
+
children: (r, a) => {
|
|
559
|
+
var o = qe(), s = e(o), l = (e) => {
|
|
560
|
+
T(e, { class: "mr-1 size-4 animate-spin" });
|
|
561
|
+
};
|
|
562
|
+
n(s, (e) => {
|
|
563
|
+
c(L) && e(l);
|
|
564
|
+
});
|
|
565
|
+
var u = p(s);
|
|
566
|
+
i(() => _(u, ` ${(c(K) || c(J) ? "Done" : c($e)) ?? ""}`)), t(r, o);
|
|
567
|
+
},
|
|
568
|
+
$$slots: { default: !0 }
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
t(a, s);
|
|
572
|
+
},
|
|
573
|
+
$$slots: { default: !0 }
|
|
574
|
+
}), t(a, f);
|
|
575
|
+
},
|
|
576
|
+
$$slots: { default: !0 }
|
|
577
|
+
}), f();
|
|
578
|
+
}
|
|
579
|
+
//#endregion
|
|
580
|
+
export { M as t };
|