@hiai-gg/docsmint 0.3.9 → 0.4.1
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/FolderNode--l1g8bcL.js +298 -0
- package/dist/frontend/{SettingsDialog-BHh68rTB.js → SettingsDialog-LyZUxxku.js} +132 -132
- package/dist/frontend/Sidebar-BsJsD1mJ.js +2021 -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/app-shell.d.ts +10 -2
- package/dist/frontend/app-shell.js +118 -111
- package/dist/frontend/{categories-izQovv2w.js → categories-Drnns7N6.js} +14 -14
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +2 -2
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/dashboard.js +524 -522
- package/dist/frontend/{documents-BsDkvzCm.js → documents-Bc7b_MSZ.js} +15 -15
- package/dist/frontend/{folders-CTuV_JtU.js → folders-ONG03Dkv.js} +10 -10
- package/dist/frontend/route-context-BqQQ5c4i.js +29 -0
- package/dist/frontend/search.js +309 -309
- package/dist/frontend/{tag-store.svelte-CqrUXo0o.js → tag-store.svelte-CG7RrlDT.js} +1 -1
- package/dist/frontend-ssr/api/categories.js +1 -1
- package/dist/frontend-ssr/api/documents.js +1 -1
- package/dist/frontend-ssr/api/folders.js +1 -1
- package/dist/frontend-ssr/app-shell.js +12 -3
- package/dist/frontend-ssr/assets/{FolderNode-BZ0Q2QUS.js → FolderNode-CpHrpOED.js} +5 -3
- package/dist/frontend-ssr/assets/{SettingsDialog-B8L_YqNA.js → SettingsDialog-Dg97vv83.js} +4 -3
- package/dist/frontend-ssr/assets/{Sidebar-EHuUAx3W.js → Sidebar-CrDk_HYY.js} +28 -24
- package/dist/frontend-ssr/assets/{categories-AOqgcsn4.js → categories-CTCtdv7V.js} +10 -10
- package/dist/frontend-ssr/assets/{documents-BnOTRdTY.js → documents-PObdTOiT.js} +8 -8
- package/dist/frontend-ssr/assets/{folders-CTfbS24J.js → folders-BX30gHv6.js} +10 -10
- package/dist/frontend-ssr/assets/route-context-uca_b2Px.js +36 -0
- package/dist/frontend-ssr/assets/{tag-store.svelte-DPodKj6Z.js → tag-store.svelte-DvgUduhd.js} +1 -1
- package/dist/frontend-ssr/components/folder-node.js +1 -1
- package/dist/frontend-ssr/components/save-as-dialog.js +1 -1
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/dashboard.js +32 -24
- package/dist/frontend-ssr/search.js +6 -4
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/FolderNode-C6FJv99G.js +0 -298
- package/dist/frontend/Sidebar-Cu3JrKDC.js +0 -2021
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../categories-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../categories-Drnns7N6.js";
|
|
2
2
|
export { s as createCategory, r as createCategoryInputSchema, a as deleteCategory, n as listCategories, e as setDocumentCategory, i as setFolderCategory, o as updateCategory, t as updateCategoryInputSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../documents-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../documents-Bc7b_MSZ.js";
|
|
2
2
|
export { s as clearDocumentsCache, r as createDocument, a as deleteDocument, n as getDocument, e as importDocument, i as importDocuments, o as listDocuments, t as updateDocument };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../folders-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../folders-ONG03Dkv.js";
|
|
2
2
|
export { s as createFolder, r as deleteDocument, a as deleteFolder, n as duplicateDocument, e as getFolder, i as getFolderPath, o as listFolders, t as updateFolder };
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type { Component, Snippet } from "svelte";
|
|
2
|
+
export interface DocsmintNavigationOptions {
|
|
3
|
+
replaceState?: boolean;
|
|
4
|
+
noScroll?: boolean;
|
|
5
|
+
keepFocus?: boolean;
|
|
6
|
+
invalidateAll?: boolean;
|
|
7
|
+
state?: App.PageState;
|
|
8
|
+
}
|
|
2
9
|
export interface DocsmintRouteAdapter {
|
|
3
10
|
pathname: string;
|
|
4
11
|
resolve(path: string): string;
|
|
5
|
-
navigate?(path: string): void | Promise<void>;
|
|
12
|
+
navigate?(path: string, options?: DocsmintNavigationOptions): void | Promise<void>;
|
|
6
13
|
}
|
|
7
|
-
export interface
|
|
14
|
+
export interface DocsmintRequestAdapter { fetch: typeof fetch; }
|
|
15
|
+
export interface DocsmintAppShellHostProps { route: DocsmintRouteAdapter; request?: DocsmintRequestAdapter; extensions?: Record<string, unknown>; children: Snippet; }
|
|
8
16
|
export declare const DocsmintAppShellHost: Component<DocsmintAppShellHostProps>;
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { t as e } from "./Icon-CooFj4Ee.js";
|
|
2
|
-
import { n as t, r as n } from "./SettingsDialog-
|
|
3
|
-
import { t as r } from "./Sidebar-
|
|
2
|
+
import { n as t, r as n } from "./SettingsDialog-LyZUxxku.js";
|
|
3
|
+
import { t as r } from "./Sidebar-BsJsD1mJ.js";
|
|
4
4
|
import { E as i } from "./messages-C5Q890i2.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a, i as o } from "./route-context-BqQQ5c4i.js";
|
|
6
|
+
import { t as s } from "./HiaiDocsExtensionProvider-DHWLzRUu.js";
|
|
6
7
|
import "svelte/internal/disclose-version";
|
|
7
|
-
import * as
|
|
8
|
+
import * as c from "svelte/internal/client";
|
|
8
9
|
import "svelte/internal/flags/legacy";
|
|
9
|
-
import { onDestroy as
|
|
10
|
+
import { onDestroy as l } from "svelte";
|
|
10
11
|
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/arrow-up.svelte
|
|
11
|
-
function
|
|
12
|
-
let r =
|
|
12
|
+
function u(t, n) {
|
|
13
|
+
let r = c.legacy_rest_props(n, [
|
|
13
14
|
"children",
|
|
14
15
|
"$$slots",
|
|
15
16
|
"$$events",
|
|
16
17
|
"$$legacy"
|
|
17
18
|
]), i = [["path", { d: "m5 12 7-7 7 7" }], ["path", { d: "M12 19V5" }]];
|
|
18
|
-
e(t,
|
|
19
|
+
e(t, c.spread_props({ name: "arrow-up" }, () => r, {
|
|
19
20
|
get iconNode() {
|
|
20
21
|
return i;
|
|
21
22
|
},
|
|
22
23
|
children: (e, t) => {
|
|
23
|
-
var r =
|
|
24
|
-
|
|
24
|
+
var r = c.comment(), i = c.first_child(r);
|
|
25
|
+
c.slot(i, n, "default", {}, null), c.append(e, r);
|
|
25
26
|
},
|
|
26
27
|
$$slots: { default: !0 }
|
|
27
28
|
}));
|
|
28
29
|
}
|
|
29
30
|
//#endregion
|
|
30
31
|
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/menu.svelte
|
|
31
|
-
function
|
|
32
|
-
let r =
|
|
32
|
+
function d(t, n) {
|
|
33
|
+
let r = c.legacy_rest_props(n, [
|
|
33
34
|
"children",
|
|
34
35
|
"$$slots",
|
|
35
36
|
"$$events",
|
|
@@ -39,44 +40,44 @@ function l(t, n) {
|
|
|
39
40
|
["path", { d: "M4 12h16" }],
|
|
40
41
|
["path", { d: "M4 19h16" }]
|
|
41
42
|
];
|
|
42
|
-
e(t,
|
|
43
|
+
e(t, c.spread_props({ name: "menu" }, () => r, {
|
|
43
44
|
get iconNode() {
|
|
44
45
|
return i;
|
|
45
46
|
},
|
|
46
47
|
children: (e, t) => {
|
|
47
|
-
var r =
|
|
48
|
-
|
|
48
|
+
var r = c.comment(), i = c.first_child(r);
|
|
49
|
+
c.slot(i, n, "default", {}, null), c.append(e, r);
|
|
49
50
|
},
|
|
50
51
|
$$slots: { default: !0 }
|
|
51
52
|
}));
|
|
52
53
|
}
|
|
53
54
|
//#endregion
|
|
54
55
|
//#region src/lib/stores/mobile-sidebar.svelte.ts
|
|
55
|
-
var
|
|
56
|
+
var f = c.state(!1), p = {
|
|
56
57
|
get open() {
|
|
57
|
-
return
|
|
58
|
+
return c.get(f);
|
|
58
59
|
},
|
|
59
60
|
set open(e) {
|
|
60
|
-
|
|
61
|
+
c.set(f, e, !0);
|
|
61
62
|
},
|
|
62
63
|
toggle() {
|
|
63
|
-
|
|
64
|
+
c.set(f, !c.get(f));
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
|
-
function
|
|
67
|
-
|
|
67
|
+
function m() {
|
|
68
|
+
c.set(f, !1);
|
|
68
69
|
}
|
|
69
70
|
//#endregion
|
|
70
71
|
//#region src/lib/components/MobileSidebarToggle.svelte
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
let n =
|
|
72
|
+
var h = c.from_html("<button type=\"button\" class=\"mobile-sidebar-toggle fixed left-3 top-3 flex size-11 items-center justify-center rounded-md border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-accent md:hidden\" style=\"top: calc(0.75rem + env(safe-area-inset-top));\"><!></button>");
|
|
73
|
+
function g(e, t) {
|
|
74
|
+
c.push(t, !0);
|
|
75
|
+
let n = c.prop(t, "buttonRef", 15, null), r = c.prop(t, "controls", 3, "mobile-navigation"), i = c.state(!1);
|
|
75
76
|
function a() {
|
|
76
77
|
let e = Array.from(document.querySelectorAll("[role=\"dialog\"][aria-modal=\"true\"]"));
|
|
77
|
-
|
|
78
|
+
c.set(i, e.length > 0), document.documentElement.classList.toggle("nested-sidebar-modal-open", e.some((e) => e.tagName !== "ASIDE"));
|
|
78
79
|
}
|
|
79
|
-
|
|
80
|
+
c.user_effect(() => {
|
|
80
81
|
if (typeof document > "u") return;
|
|
81
82
|
let e = new MutationObserver(a);
|
|
82
83
|
return e.observe(document.body, {
|
|
@@ -88,28 +89,28 @@ function m(e, t) {
|
|
|
88
89
|
e.disconnect(), document.documentElement.classList.remove("nested-sidebar-modal-open");
|
|
89
90
|
};
|
|
90
91
|
});
|
|
91
|
-
function
|
|
92
|
-
|
|
92
|
+
function o() {
|
|
93
|
+
p.toggle();
|
|
93
94
|
}
|
|
94
|
-
var
|
|
95
|
-
var t =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}),
|
|
95
|
+
var s = c.comment(), l = c.first_child(s), u = (e) => {
|
|
96
|
+
var t = h();
|
|
97
|
+
d(c.child(t), { class: "size-5" }), c.reset(t), c.bind_this(t, (e) => n(e), () => n()), c.template_effect(() => {
|
|
98
|
+
c.set_attribute(t, "aria-label", p.open ? "Close navigation menu" : "Open navigation menu"), c.set_attribute(t, "aria-expanded", p.open), c.set_attribute(t, "aria-controls", r());
|
|
99
|
+
}), c.delegated("click", t, o), c.append(e, t);
|
|
99
100
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}),
|
|
101
|
+
c.if(l, (e) => {
|
|
102
|
+
c.get(i) || e(u);
|
|
103
|
+
}), c.append(e, s), c.pop();
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
+
c.delegate(["click"]);
|
|
105
106
|
//#endregion
|
|
106
107
|
//#region src/lib/components/ScrollToTop.svelte
|
|
107
|
-
var
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
let n =
|
|
108
|
+
var _ = c.from_html("<button type=\"button\"><!></button>");
|
|
109
|
+
function v(e, t) {
|
|
110
|
+
c.push(t, !0);
|
|
111
|
+
let n = c.prop(t, "avoidEditorToolbar", 3, !1), r = c.state(!1), a = null, o = c.state("none"), s = c.state(void 0);
|
|
111
112
|
function d() {
|
|
112
|
-
|
|
113
|
+
c.set(r, (a ? a.scrollTop : window.scrollY) > 300);
|
|
113
114
|
}
|
|
114
115
|
function f() {
|
|
115
116
|
a ? a.scrollTo({
|
|
@@ -126,34 +127,34 @@ function g(e, t) {
|
|
|
126
127
|
function m() {
|
|
127
128
|
a && a.removeEventListener("scroll", d), a = null;
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
+
c.user_effect(() => {
|
|
130
131
|
let e = t.scrollTarget;
|
|
131
132
|
return p(e), e ? () => {
|
|
132
133
|
m();
|
|
133
134
|
} : (window.addEventListener("scroll", d, { passive: !0 }), d(), () => {
|
|
134
135
|
window.removeEventListener("scroll", d);
|
|
135
136
|
});
|
|
136
|
-
}),
|
|
137
|
-
m(),
|
|
138
|
-
}),
|
|
137
|
+
}), l(() => {
|
|
138
|
+
m(), c.set(r, !1);
|
|
139
|
+
}), c.user_effect(() => {
|
|
139
140
|
if (!n() || typeof document > "u") {
|
|
140
|
-
|
|
141
|
+
c.set(o, "none"), c.set(s, void 0);
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
let e = () => {
|
|
144
145
|
let e = document.querySelector(".toolbar.floating-bar");
|
|
145
146
|
if (e) {
|
|
146
147
|
let t = e.getBoundingClientRect();
|
|
147
|
-
|
|
148
|
+
c.set(o, "toolbar"), c.set(s, `${Math.max(0, window.innerHeight - t.top + 12)}px`);
|
|
148
149
|
return;
|
|
149
150
|
}
|
|
150
151
|
let t = document.querySelector(".floating-fab");
|
|
151
152
|
if (t) {
|
|
152
153
|
let e = t.getBoundingClientRect();
|
|
153
|
-
|
|
154
|
+
c.set(o, "fab"), c.set(s, `${Math.max(12, window.innerHeight - e.bottom - 12 - 40)}px`);
|
|
154
155
|
return;
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
+
c.set(o, "none"), c.set(s, void 0);
|
|
157
158
|
}, t = new MutationObserver(e);
|
|
158
159
|
t.observe(document.body, {
|
|
159
160
|
childList: !0,
|
|
@@ -166,24 +167,30 @@ function g(e, t) {
|
|
|
166
167
|
t.disconnect(), r.disconnect(), window.removeEventListener("resize", e);
|
|
167
168
|
};
|
|
168
169
|
});
|
|
169
|
-
var
|
|
170
|
-
let
|
|
171
|
-
c
|
|
172
|
-
|
|
173
|
-
"above-editor-toolbar":
|
|
174
|
-
"below-editor-fab":
|
|
175
|
-
}),
|
|
176
|
-
}, [() => i(), () => i()]),
|
|
170
|
+
var h = _();
|
|
171
|
+
let g, v;
|
|
172
|
+
u(c.child(h), { class: "size-5" }), c.reset(h), c.template_effect((e, t) => {
|
|
173
|
+
g = c.set_class(h, 1, `scroll-to-top fixed bottom-6 right-6 z-50 inline-flex size-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-md transition-all hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${c.get(r) ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`, null, g, {
|
|
174
|
+
"above-editor-toolbar": c.get(o) === "toolbar",
|
|
175
|
+
"below-editor-fab": c.get(o) === "fab"
|
|
176
|
+
}), c.set_attribute(h, "aria-label", e), c.set_attribute(h, "title", t), v = c.set_style(h, "", v, { bottom: c.get(s) });
|
|
177
|
+
}, [() => i(), () => i()]), c.delegated("click", h, f), c.append(e, h), c.pop();
|
|
177
178
|
}
|
|
178
|
-
|
|
179
|
+
c.delegate(["click"]);
|
|
179
180
|
//#endregion
|
|
180
181
|
//#region src/lib/hosts/DocsmintAppShellHost.svelte
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
var y = c.from_html("<button type=\"button\" tabindex=\"-1\" aria-label=\"Close navigation menu\" class=\"fixed inset-0 z-40 bg-black/50\"></button>"), b = c.from_html("<div class=\"flex h-screen\" data-docsmint-app-shell-host=\"\"><!> <main id=\"main-content\" class=\"relative z-0 flex-1 overflow-auto\"><!></main></div> <!> <!>", 1), x = c.from_html("<!> <!>", 1);
|
|
183
|
+
function S(e, i) {
|
|
184
|
+
c.push(i, !0);
|
|
185
|
+
let l = c.prop(i, "request", 19, () => ({ fetch })), u = c.prop(i, "extensions", 19, () => ({}));
|
|
186
|
+
a({
|
|
187
|
+
get pathname() {
|
|
188
|
+
return i.route.pathname;
|
|
189
|
+
},
|
|
190
|
+
resolve: (e) => i.route.resolve(e),
|
|
191
|
+
navigate: (e, t) => i.route.navigate?.(e, t)
|
|
192
|
+
}), o({ fetch: (...e) => l().fetch(...e) }), n.init(), t.init();
|
|
193
|
+
let d = c.state(null), f = c.state(null), h = c.state(null), _ = c.state(!1), S = [
|
|
187
194
|
"a[href]",
|
|
188
195
|
"button:not([disabled])",
|
|
189
196
|
"input:not([disabled])",
|
|
@@ -191,101 +198,101 @@ function b(e, i) {
|
|
|
191
198
|
"textarea:not([disabled])",
|
|
192
199
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
193
200
|
].join(",");
|
|
194
|
-
|
|
201
|
+
c.user_effect(() => {
|
|
195
202
|
let e = window.matchMedia("(max-width: 767px)"), t = () => {
|
|
196
|
-
|
|
203
|
+
c.set(_, e.matches, !0), c.get(_) || m();
|
|
197
204
|
};
|
|
198
205
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
199
|
-
}),
|
|
200
|
-
i.route.pathname,
|
|
201
|
-
}),
|
|
202
|
-
if (!
|
|
203
|
-
let e = document.activeElement instanceof HTMLElement ? document.activeElement :
|
|
206
|
+
}), c.user_effect(() => {
|
|
207
|
+
i.route.pathname, m();
|
|
208
|
+
}), c.user_effect(() => {
|
|
209
|
+
if (!c.get(_) || !p.open || !c.get(f)) return;
|
|
210
|
+
let e = document.activeElement instanceof HTMLElement ? document.activeElement : c.get(h), t = document.body.style.overflow;
|
|
204
211
|
document.body.style.overflow = "hidden";
|
|
205
|
-
let n = () => Array.from(
|
|
212
|
+
let n = () => Array.from(c.get(f)?.querySelectorAll(S) ?? []).filter((e) => !e.hasAttribute("disabled")), r = (e) => {
|
|
206
213
|
let t = e.target instanceof Element ? e.target.closest("[role=\"dialog\"]") : null;
|
|
207
|
-
if (t && t !==
|
|
214
|
+
if (t && t !== c.get(f)) return;
|
|
208
215
|
if (e.key === "Escape") {
|
|
209
|
-
e.preventDefault(),
|
|
216
|
+
e.preventDefault(), m();
|
|
210
217
|
return;
|
|
211
218
|
}
|
|
212
219
|
if (e.key !== "Tab") return;
|
|
213
220
|
let r = n(), i = r.at(0), a = r.at(-1);
|
|
214
221
|
if (!i || !a) {
|
|
215
|
-
e.preventDefault(),
|
|
222
|
+
e.preventDefault(), c.get(f)?.focus();
|
|
216
223
|
return;
|
|
217
224
|
}
|
|
218
225
|
e.shiftKey && document.activeElement === i ? (e.preventDefault(), a.focus()) : !e.shiftKey && document.activeElement === a && (e.preventDefault(), i.focus());
|
|
219
226
|
};
|
|
220
227
|
document.addEventListener("keydown", r);
|
|
221
228
|
let i = requestAnimationFrame(() => {
|
|
222
|
-
(n().at(0) ??
|
|
229
|
+
(n().at(0) ?? c.get(f))?.focus();
|
|
223
230
|
});
|
|
224
231
|
return () => {
|
|
225
232
|
cancelAnimationFrame(i), document.removeEventListener("keydown", r), document.body.style.overflow = t, e?.isConnected && e.focus();
|
|
226
233
|
};
|
|
227
234
|
});
|
|
228
|
-
var
|
|
229
|
-
|
|
235
|
+
var C = x(), w = c.first_child(C);
|
|
236
|
+
s(w, {
|
|
230
237
|
get extensions() {
|
|
231
|
-
return
|
|
238
|
+
return u();
|
|
232
239
|
},
|
|
233
240
|
children: (e, t) => {
|
|
234
|
-
var n =
|
|
235
|
-
r(
|
|
241
|
+
var n = b(), a = c.first_child(n), o = c.child(a);
|
|
242
|
+
r(o, {
|
|
236
243
|
get mobile() {
|
|
237
|
-
return
|
|
244
|
+
return c.get(_);
|
|
238
245
|
},
|
|
239
246
|
get mobileOpen() {
|
|
240
|
-
return
|
|
247
|
+
return p.open;
|
|
241
248
|
},
|
|
242
249
|
get element() {
|
|
243
|
-
return
|
|
250
|
+
return c.get(f);
|
|
244
251
|
},
|
|
245
252
|
set element(e) {
|
|
246
|
-
|
|
253
|
+
c.set(f, e, !0);
|
|
247
254
|
}
|
|
248
255
|
});
|
|
249
|
-
var
|
|
250
|
-
|
|
251
|
-
var
|
|
252
|
-
|
|
256
|
+
var s = c.sibling(o, 2), l = c.child(s);
|
|
257
|
+
c.snippet(l, () => i.children), c.reset(s), c.bind_this(s, (e) => c.set(d, e), () => c.get(d)), c.reset(a);
|
|
258
|
+
var u = c.sibling(a, 2);
|
|
259
|
+
g(u, {
|
|
253
260
|
get buttonRef() {
|
|
254
|
-
return
|
|
261
|
+
return c.get(h);
|
|
255
262
|
},
|
|
256
263
|
set buttonRef(e) {
|
|
257
|
-
|
|
264
|
+
c.set(h, e, !0);
|
|
258
265
|
}
|
|
259
266
|
});
|
|
260
|
-
var
|
|
261
|
-
var t =
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}),
|
|
267
|
+
var v = c.sibling(u, 2), x = (e) => {
|
|
268
|
+
var t = y();
|
|
269
|
+
c.delegated("click", t, function(...e) {
|
|
270
|
+
m?.apply(this, e);
|
|
271
|
+
}), c.append(e, t);
|
|
265
272
|
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}),
|
|
273
|
+
c.if(v, (e) => {
|
|
274
|
+
c.get(_) && p.open && e(x);
|
|
275
|
+
}), c.template_effect(() => s.inert = c.get(_) && p.open), c.append(e, n);
|
|
269
276
|
},
|
|
270
277
|
$$slots: { default: !0 }
|
|
271
278
|
});
|
|
272
|
-
var
|
|
279
|
+
var T = c.sibling(w, 2), E = (e) => {
|
|
273
280
|
{
|
|
274
|
-
let t =
|
|
275
|
-
|
|
281
|
+
let t = c.derived(() => i.route.pathname.startsWith("/docs/"));
|
|
282
|
+
v(e, {
|
|
276
283
|
get scrollTarget() {
|
|
277
|
-
return
|
|
284
|
+
return c.get(d);
|
|
278
285
|
},
|
|
279
286
|
get avoidEditorToolbar() {
|
|
280
|
-
return
|
|
287
|
+
return c.get(t);
|
|
281
288
|
}
|
|
282
289
|
});
|
|
283
290
|
}
|
|
284
291
|
};
|
|
285
|
-
|
|
286
|
-
n.showScrollToTop && e(
|
|
287
|
-
}),
|
|
292
|
+
c.if(T, (e) => {
|
|
293
|
+
n.showScrollToTop && e(E);
|
|
294
|
+
}), c.append(e, C), c.pop();
|
|
288
295
|
}
|
|
289
|
-
|
|
296
|
+
c.delegate(["click"]);
|
|
290
297
|
//#endregion
|
|
291
|
-
export {
|
|
298
|
+
export { S as DocsmintAppShellHost };
|
|
@@ -28,34 +28,34 @@ var o = n({
|
|
|
28
28
|
function c(t) {
|
|
29
29
|
return e("/api/categories", {}, t);
|
|
30
30
|
}
|
|
31
|
-
function l(t) {
|
|
32
|
-
let
|
|
31
|
+
function l(t, n) {
|
|
32
|
+
let r = o.parse(typeof t == "string" ? { name: t } : t);
|
|
33
33
|
return e("/api/categories", {
|
|
34
34
|
method: "POST",
|
|
35
|
-
body: JSON.stringify(
|
|
36
|
-
});
|
|
35
|
+
body: JSON.stringify(r)
|
|
36
|
+
}, n);
|
|
37
37
|
}
|
|
38
|
-
function u(t, n) {
|
|
39
|
-
let
|
|
38
|
+
function u(t, n, r) {
|
|
39
|
+
let i = s.parse(n);
|
|
40
40
|
return e(`/api/categories/${encodeURIComponent(t)}`, {
|
|
41
41
|
method: "PATCH",
|
|
42
|
-
body: JSON.stringify(
|
|
43
|
-
});
|
|
42
|
+
body: JSON.stringify(i)
|
|
43
|
+
}, r);
|
|
44
44
|
}
|
|
45
|
-
function d(t) {
|
|
46
|
-
return e(`/api/categories/${encodeURIComponent(t)}`, { method: "DELETE" });
|
|
45
|
+
function d(t, n) {
|
|
46
|
+
return e(`/api/categories/${encodeURIComponent(t)}`, { method: "DELETE" }, n);
|
|
47
47
|
}
|
|
48
|
-
function f(t, n) {
|
|
48
|
+
function f(t, n, r) {
|
|
49
49
|
return e(`/api/documents/${encodeURIComponent(t)}`, {
|
|
50
50
|
method: "PATCH",
|
|
51
51
|
body: JSON.stringify({ categoryId: n })
|
|
52
|
-
});
|
|
52
|
+
}, r);
|
|
53
53
|
}
|
|
54
|
-
function p(t, n) {
|
|
54
|
+
function p(t, n, r) {
|
|
55
55
|
return e(`/api/folders/${encodeURIComponent(t)}`, {
|
|
56
56
|
method: "PATCH",
|
|
57
57
|
body: JSON.stringify({ categoryId: n })
|
|
58
|
-
});
|
|
58
|
+
}, r);
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
export { f as a, s as c, c as i, o as n, p as o, d as r, u as s, l as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../FolderNode
|
|
1
|
+
import { t as e } from "../FolderNode--l1g8bcL.js";
|
|
2
2
|
export { e as FolderNode };
|
|
@@ -4,9 +4,9 @@ import { n } from "../dist-C3857Spp.js";
|
|
|
4
4
|
import { nr as r, rr as i } from "../messages-C5Q890i2.js";
|
|
5
5
|
import { a, i as o, n as s, o as c, r as l, t as u } from "../dialog-Bevp9mmM.js";
|
|
6
6
|
import { t as d } from "../label-C2HfJNQ2.js";
|
|
7
|
-
import { i as f } from "../categories-
|
|
7
|
+
import { i as f } from "../categories-Drnns7N6.js";
|
|
8
8
|
import { a as p, i as m, n as h, r as g, t as _ } from "../select-value-GXwx90Pr.js";
|
|
9
|
-
import { s as v } from "../folders-
|
|
9
|
+
import { s as v } from "../folders-ONG03Dkv.js";
|
|
10
10
|
import { d as y } from "../subfolders-refresh-store.svelte-B2dKVmgz.js";
|
|
11
11
|
import "svelte/internal/disclose-version";
|
|
12
12
|
import * as b from "svelte/internal/client";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../SettingsDialog-
|
|
1
|
+
import { t as e } from "../SettingsDialog-LyZUxxku.js";
|
|
2
2
|
export { e as SettingsDialog };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../Sidebar-
|
|
1
|
+
import { t as e } from "../Sidebar-BsJsD1mJ.js";
|
|
2
2
|
export { e as Sidebar };
|