@hiai-gg/docsmint 0.5.3 → 0.5.6
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/CreateSnapshotDialog-FUq-ZfBH.js +217 -0
- package/dist/frontend/app-shell.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/version-history.js +81 -80
- package/dist/frontend/dashboard.js +994 -958
- package/dist/frontend-ssr/app-shell.js +5 -0
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-b6O0nUVp.js → CreateSnapshotDialog-CI8vXXcN.js} +3 -1
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/version-history.js +5 -3
- package/dist/frontend-ssr/dashboard.js +37 -3
- 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/CreateSnapshotDialog-CXW4sCuf.js +0 -216
|
@@ -245,6 +245,11 @@ function mutationRefreshImpact(input, init) {
|
|
|
245
245
|
folders: true,
|
|
246
246
|
tags: false
|
|
247
247
|
};
|
|
248
|
+
if (/^\/api\/(?:v1\/)?trash(?:\/|$)/.test(pathname)) return {
|
|
249
|
+
documents: true,
|
|
250
|
+
folders: true,
|
|
251
|
+
tags: false
|
|
252
|
+
};
|
|
248
253
|
if (/^\/api\/(?:v1\/)?(?:documents|import|imports)(?:\/|$)/.test(pathname)) return {
|
|
249
254
|
documents: true,
|
|
250
255
|
folders: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { At as version_snapshot_description_placeholder, Dt as version_snapshot_dialog_title, Et as version_snapshot_dialog_description, Mt as version_snapshot_description, Nt as version_snapshot_label, Ot as version_snapshot_creating, _n as action_cancel, jt as version_snapshot_label_placeholder, kt as version_snapshot_create, xt as version_restore_failed, yn as error_server, z as error_validation } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Loader_circle } from "./loader-circle-CIEWGyfP.js";
|
|
3
|
+
import { a as getDocsmintRequestAdapter } from "./route-context-BPRerEtZ.js";
|
|
3
4
|
import { a as Dialog, i as Dialog_description, n as Dialog_header, o as Button, r as Dialog_footer, t as Dialog_title } from "./dialog-BOV1u6zP.js";
|
|
4
5
|
import { t as Input } from "./input-DezGsU3y.js";
|
|
5
6
|
import { n as apiFetch, t as ApiError } from "./client-DZMkDkDn.js";
|
|
@@ -16,6 +17,7 @@ function CreateSnapshotDialog($$renderer, $$props) {
|
|
|
16
17
|
let labelError = null;
|
|
17
18
|
let submitError = null;
|
|
18
19
|
let submitting = false;
|
|
20
|
+
const request = getDocsmintRequestAdapter();
|
|
19
21
|
function reset() {
|
|
20
22
|
label = "";
|
|
21
23
|
description = "";
|
|
@@ -64,7 +66,7 @@ function CreateSnapshotDialog($$renderer, $$props) {
|
|
|
64
66
|
await apiFetch(`/api/documents/${documentId}/versions`, {
|
|
65
67
|
method: "POST",
|
|
66
68
|
body: JSON.stringify(body)
|
|
67
|
-
});
|
|
69
|
+
}, request.fetch);
|
|
68
70
|
onSuccess?.();
|
|
69
71
|
open = false;
|
|
70
72
|
reset();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-
|
|
1
|
+
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-CI8vXXcN.js";
|
|
2
2
|
export { CreateSnapshotDialog };
|
|
@@ -9,7 +9,7 @@ import { t as Input } from "../../assets/input-DezGsU3y.js";
|
|
|
9
9
|
import { a as resolveOfflineIdentity } from "../../assets/identity-B3uHoDtf.js";
|
|
10
10
|
import { n as getOfflineDB } from "../../assets/db-CnxeO66n.js";
|
|
11
11
|
import { h as unregisterShortcut, u as registerShortcut } from "../../assets/keyboard.svelte-BgF47N3L.js";
|
|
12
|
-
import { t as CreateSnapshotDialog } from "../../assets/CreateSnapshotDialog-
|
|
12
|
+
import { t as CreateSnapshotDialog } from "../../assets/CreateSnapshotDialog-CI8vXXcN.js";
|
|
13
13
|
import { r as editorExtensions } from "../../assets/editorExtensions-DUzwndMy.js";
|
|
14
14
|
import { t as markdownToJson } from "../../assets/markdown-CjqvGi5W.js";
|
|
15
15
|
import * as $ from "svelte/internal/server";
|
|
@@ -5,9 +5,10 @@ import { t as Clock } from "../assets/clock-CzsE58TH.js";
|
|
|
5
5
|
import { t as Rotate_ccw } from "../assets/rotate-ccw-dJSqPyTd.js";
|
|
6
6
|
import { t as Circle_check } from "../assets/circle-check-CPS9dKEo.js";
|
|
7
7
|
import { t as Loader_circle } from "../assets/loader-circle-CIEWGyfP.js";
|
|
8
|
+
import { a as getDocsmintRequestAdapter } from "../assets/route-context-BPRerEtZ.js";
|
|
8
9
|
import { n as apiFetch, t as ApiError } from "../assets/client-DZMkDkDn.js";
|
|
9
10
|
import { t as ConfirmDialog } from "../assets/ConfirmDialog-BhAelejz.js";
|
|
10
|
-
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-
|
|
11
|
+
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-CI8vXXcN.js";
|
|
11
12
|
import * as $ from "svelte/internal/server";
|
|
12
13
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/history.svelte
|
|
13
14
|
function History($$renderer, $$props) {
|
|
@@ -171,11 +172,12 @@ function VersionHistory($$renderer, $$props) {
|
|
|
171
172
|
let pendingRestore = null;
|
|
172
173
|
let restoring = false;
|
|
173
174
|
let restoreError = null;
|
|
175
|
+
const request = getDocsmintRequestAdapter();
|
|
174
176
|
async function loadVersions() {
|
|
175
177
|
loading = true;
|
|
176
178
|
loadError = null;
|
|
177
179
|
try {
|
|
178
|
-
versions = await apiFetch(`/api/documents/${documentId}/versions
|
|
180
|
+
versions = await apiFetch(`/api/documents/${documentId}/versions`, {}, request.fetch);
|
|
179
181
|
} catch (e) {
|
|
180
182
|
loadError = e instanceof Error ? e.message : String(e);
|
|
181
183
|
console.error("Failed to load versions", e);
|
|
@@ -216,7 +218,7 @@ function VersionHistory($$renderer, $$props) {
|
|
|
216
218
|
restoring = true;
|
|
217
219
|
restoreError = null;
|
|
218
220
|
try {
|
|
219
|
-
await apiFetch(`/api/documents/${documentId}/versions/${target.id}/restore`, { method: "POST" });
|
|
221
|
+
await apiFetch(`/api/documents/${documentId}/versions/${target.id}/restore`, { method: "POST" }, request.fetch);
|
|
220
222
|
await loadVersions();
|
|
221
223
|
pendingRestore = null;
|
|
222
224
|
restoreDialogOpen = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cr as doc_open, Dr as doc_share, Fr as dashboard_page_title, Ir as dashboard_new_document, Lr as dashboard_subtitle, Rr as dashboard_title, Sr as doc_duplicate, Tr as doc_updated, _n as action_cancel, _r as folders_rename, _t as folder_page_title, a as import_progress_error, bt as editor_more_options, c as import_progress_queued, cr as folders_subfolders, d as import_progress_title, f as sidebar_uncategorized, fn as action_back, gn as action_delete, gr as folders_delete, gt as share_copied, hr as folders_delete_title, i as import_progress_summary, k as dashboard_import, l as import_progress_uploading, lr as folders_document, mr as folders_delete_description, n as import_progress_empty, o as import_progress_done, or as folders_move, pn as action_close, r as import_progress_close, s as import_progress_processing, sr as folders_subfolder, u as import_progress_total, un as action_loading, ur as folders_documents, vn as action_save, vr as folders_empty_description, wr as doc_open_menu, xr as doc_move_to_folder, yr as folders_empty, yt as action_copy_content, zr as nav_documents } from "./assets/messages-BAQzILs4.js";
|
|
1
|
+
import { Cr as doc_open, Dr as doc_share, Fr as dashboard_page_title, Ir as dashboard_new_document, Lr as dashboard_subtitle, Pr as doc_title_placeholder, Rr as dashboard_title, Sr as doc_duplicate, Tr as doc_updated, _n as action_cancel, _r as folders_rename, _t as folder_page_title, a as import_progress_error, bt as editor_more_options, c as import_progress_queued, cr as folders_subfolders, d as import_progress_title, f as sidebar_uncategorized, fn as action_back, gn as action_delete, gr as folders_delete, gt as share_copied, hr as folders_delete_title, i as import_progress_summary, k as dashboard_import, l as import_progress_uploading, lr as folders_document, mr as folders_delete_description, n as import_progress_empty, o as import_progress_done, or as folders_move, pn as action_close, r as import_progress_close, s as import_progress_processing, sr as folders_subfolder, u as import_progress_total, un as action_loading, ur as folders_documents, vn as action_save, vr as folders_empty_description, wr as doc_open_menu, xr as doc_move_to_folder, yr as folders_empty, yt as action_copy_content, zr as nav_documents } from "./assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./assets/Icon-QwirKi9Y.js";
|
|
3
3
|
import { i as Folder_kanban, n as Badge, r as X, t as DatePicker } from "./assets/DatePicker-D84cJ-Eq.js";
|
|
4
4
|
import { i as Check, n as Plus, r as File_text, t as FolderDialog } from "./assets/confirm-dialog-XuyaL8sr.js";
|
|
@@ -1787,6 +1787,10 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1787
1787
|
let showDeleteFolderDialog = false;
|
|
1788
1788
|
let deleteFolderTargetId = null;
|
|
1789
1789
|
let deleteFolderBusy = false;
|
|
1790
|
+
let showDeleteDocumentDialog = false;
|
|
1791
|
+
let deleteDocumentTargetId = null;
|
|
1792
|
+
let deleteDocumentTargetTitle = "";
|
|
1793
|
+
let deleteDocumentBusy = false;
|
|
1790
1794
|
let showShareDialog = false;
|
|
1791
1795
|
let shareTarget = null;
|
|
1792
1796
|
let importOpen = false;
|
|
@@ -1874,14 +1878,26 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1874
1878
|
deleteFolderBusy = false;
|
|
1875
1879
|
}
|
|
1876
1880
|
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1881
|
+
function handleDeleteDocument(id) {
|
|
1882
|
+
const document = filteredDocuments().find((candidate) => candidate.id === id);
|
|
1883
|
+
deleteDocumentTargetId = id;
|
|
1884
|
+
deleteDocumentTargetTitle = document?.title || doc_title_placeholder();
|
|
1885
|
+
showDeleteDocumentDialog = true;
|
|
1886
|
+
}
|
|
1887
|
+
async function confirmDeleteDocument() {
|
|
1888
|
+
const id = deleteDocumentTargetId;
|
|
1889
|
+
if (!id || deleteDocumentBusy) return;
|
|
1890
|
+
deleteDocumentBusy = true;
|
|
1879
1891
|
try {
|
|
1880
1892
|
await apiFetch(`/api/documents/${id}`, { method: "DELETE" }, request.fetch);
|
|
1893
|
+
showDeleteDocumentDialog = false;
|
|
1894
|
+
deleteDocumentTargetId = null;
|
|
1881
1895
|
await invalidateAll();
|
|
1882
1896
|
refreshDocs();
|
|
1883
1897
|
} catch (e) {
|
|
1884
1898
|
console.error("Failed to delete document", e);
|
|
1899
|
+
} finally {
|
|
1900
|
+
deleteDocumentBusy = false;
|
|
1885
1901
|
}
|
|
1886
1902
|
}
|
|
1887
1903
|
async function handleDuplicateDocument(id) {
|
|
@@ -2676,6 +2692,24 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2676
2692
|
}
|
|
2677
2693
|
});
|
|
2678
2694
|
$$renderer.push(`<!----> `);
|
|
2695
|
+
ConfirmDialog($$renderer, {
|
|
2696
|
+
title: "Move to Trash?",
|
|
2697
|
+
description: `“${deleteDocumentTargetTitle}” will be moved to Trash and can be restored later.`,
|
|
2698
|
+
confirmLabel: "Move to Trash",
|
|
2699
|
+
cancelLabel: action_cancel(),
|
|
2700
|
+
variant: "destructive",
|
|
2701
|
+
busy: deleteDocumentBusy,
|
|
2702
|
+
onConfirm: confirmDeleteDocument,
|
|
2703
|
+
onCancel: () => showDeleteDocumentDialog = false,
|
|
2704
|
+
get open() {
|
|
2705
|
+
return showDeleteDocumentDialog;
|
|
2706
|
+
},
|
|
2707
|
+
set open($$value) {
|
|
2708
|
+
showDeleteDocumentDialog = $$value;
|
|
2709
|
+
$$settled = false;
|
|
2710
|
+
}
|
|
2711
|
+
});
|
|
2712
|
+
$$renderer.push(`<!----> `);
|
|
2679
2713
|
if (shareTarget) {
|
|
2680
2714
|
$$renderer.push("<!--[0-->");
|
|
2681
2715
|
ShareDialog($$renderer, {
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ import { registerSearch } from "./commands/search.js";
|
|
|
24
24
|
import { registerSnapshot } from "./commands/snapshot.js";
|
|
25
25
|
import { registerUpdate } from "./commands/update.js";
|
|
26
26
|
|
|
27
|
-
const VERSION = "0.5.
|
|
27
|
+
const VERSION = "0.5.6";
|
|
28
28
|
|
|
29
29
|
const program = new Command();
|
|
30
30
|
program
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./dist-DQa_OHOa.js";
|
|
2
|
-
import { V as t, Yt as n, an as r, ar as i, en as a, in as o, nn as s, on as c, rn as l, rr as u, sn as d, tn as f } from "./messages-DIovIZrK.js";
|
|
3
|
-
import { a as p, i as m, n as h, o as g, r as _, t as v } from "./dialog-Ce79C9fd.js";
|
|
4
|
-
import { t as y } from "./input-BWlOML_m.js";
|
|
5
|
-
import { n as b, t as x } from "./client-GbtOH90i.js";
|
|
6
|
-
import { t as S } from "./textarea-DOAE-h42.js";
|
|
7
|
-
import "svelte/internal/disclose-version";
|
|
8
|
-
import * as C from "svelte/internal/client";
|
|
9
|
-
//#region src/lib/components/CreateSnapshotDialog.svelte
|
|
10
|
-
var w = C.from_html("<!> <!>", 1), T = C.from_html("<p id=\"snapshot-label-error\" class=\"text-xs text-destructive\"> </p>"), E = C.from_html("<p class=\"text-xs text-destructive\" role=\"alert\"> </p>"), D = C.from_html("<!> ", 1), O = C.from_html("<!> <form class=\"space-y-4\"><div class=\"space-y-2\"><label for=\"snapshot-label\" class=\"text-sm font-medium\"> </label> <!> <!></div> <div class=\"space-y-2\"><label for=\"snapshot-description\" class=\"text-sm font-medium\"> </label> <!></div> <!></form> <!>", 1);
|
|
11
|
-
function k(k, A) {
|
|
12
|
-
C.push(A, !0);
|
|
13
|
-
let j = C.prop(A, "open", 15, !1), M = C.state(""), N = C.state(""), P = C.state(null), F = C.state(null), I = C.state(!1);
|
|
14
|
-
function L() {
|
|
15
|
-
C.set(M, ""), C.set(N, ""), C.set(P, null), C.set(F, null), C.set(I, !1);
|
|
16
|
-
}
|
|
17
|
-
function R() {
|
|
18
|
-
C.get(I) || (j(!1), L());
|
|
19
|
-
}
|
|
20
|
-
function z(e) {
|
|
21
|
-
e ? L() : C.get(I) || (j(!1), L());
|
|
22
|
-
}
|
|
23
|
-
function B(e) {
|
|
24
|
-
if (e?.preventDefault(), C.get(I)) return;
|
|
25
|
-
let n = C.get(M).trim();
|
|
26
|
-
if (n.length === 0) {
|
|
27
|
-
C.set(P, d(), !0);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (n.length > 100) {
|
|
31
|
-
C.set(P, t(), !0);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
let r = C.get(N).trim();
|
|
35
|
-
if (r.length > 500) {
|
|
36
|
-
C.set(F, t(), !0);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
V(n, r);
|
|
40
|
-
}
|
|
41
|
-
async function V(e, t) {
|
|
42
|
-
C.set(I, !0), C.set(P, null), C.set(F, null);
|
|
43
|
-
try {
|
|
44
|
-
let n = { label: e };
|
|
45
|
-
t.length > 0 && (n.description = t), await b(`/api/documents/${A.documentId}/versions`, {
|
|
46
|
-
method: "POST",
|
|
47
|
-
body: JSON.stringify(n)
|
|
48
|
-
}), A.onSuccess?.(), j(!1), L();
|
|
49
|
-
} catch (e) {
|
|
50
|
-
e instanceof x ? C.set(F, `${n()}: ${e.message}`) : C.set(F, e instanceof Error ? e.message : i(), !0), console.error("CreateSnapshotDialog: failed", e);
|
|
51
|
-
} finally {
|
|
52
|
-
C.set(I, !1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function H(e) {
|
|
56
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), B());
|
|
57
|
-
}
|
|
58
|
-
p(k, {
|
|
59
|
-
onOpenChange: z,
|
|
60
|
-
get open() {
|
|
61
|
-
return j();
|
|
62
|
-
},
|
|
63
|
-
set open(e) {
|
|
64
|
-
j(e);
|
|
65
|
-
},
|
|
66
|
-
children: (t, n) => {
|
|
67
|
-
var i = O(), p = C.first_child(i);
|
|
68
|
-
h(p, {
|
|
69
|
-
children: (e, t) => {
|
|
70
|
-
var n = w(), r = C.first_child(n);
|
|
71
|
-
v(r, {
|
|
72
|
-
children: (e, t) => {
|
|
73
|
-
C.next();
|
|
74
|
-
var n = C.text();
|
|
75
|
-
C.template_effect((e) => C.set_text(n, e), [() => f()]), C.append(e, n);
|
|
76
|
-
},
|
|
77
|
-
$$slots: { default: !0 }
|
|
78
|
-
}), m(C.sibling(r, 2), {
|
|
79
|
-
children: (e, t) => {
|
|
80
|
-
C.next();
|
|
81
|
-
var n = C.text();
|
|
82
|
-
C.template_effect((e) => C.set_text(n, e), [() => a()]), C.append(e, n);
|
|
83
|
-
},
|
|
84
|
-
$$slots: { default: !0 }
|
|
85
|
-
}), C.append(e, n);
|
|
86
|
-
},
|
|
87
|
-
$$slots: { default: !0 }
|
|
88
|
-
});
|
|
89
|
-
var b = C.sibling(p, 2), x = C.child(b), k = C.child(x), A = C.child(k, !0);
|
|
90
|
-
C.reset(k);
|
|
91
|
-
var j = C.sibling(k, 2);
|
|
92
|
-
{
|
|
93
|
-
let e = C.derived(() => r()), t = C.derived(() => C.get(P) ? "true" : void 0), n = C.derived(() => C.get(P) ? "snapshot-label-error" : void 0);
|
|
94
|
-
y(j, {
|
|
95
|
-
id: "snapshot-label",
|
|
96
|
-
name: "label",
|
|
97
|
-
type: "text",
|
|
98
|
-
get placeholder() {
|
|
99
|
-
return C.get(e);
|
|
100
|
-
},
|
|
101
|
-
maxlength: 100,
|
|
102
|
-
required: !0,
|
|
103
|
-
get disabled() {
|
|
104
|
-
return C.get(I);
|
|
105
|
-
},
|
|
106
|
-
get "aria-invalid"() {
|
|
107
|
-
return C.get(t);
|
|
108
|
-
},
|
|
109
|
-
get "aria-describedby"() {
|
|
110
|
-
return C.get(n);
|
|
111
|
-
},
|
|
112
|
-
autocomplete: "off",
|
|
113
|
-
onkeydown: H,
|
|
114
|
-
get value() {
|
|
115
|
-
return C.get(M);
|
|
116
|
-
},
|
|
117
|
-
set value(e) {
|
|
118
|
-
C.set(M, e, !0);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
var L = C.sibling(j, 2), z = (e) => {
|
|
123
|
-
var t = T(), n = C.child(t, !0);
|
|
124
|
-
C.reset(t), C.template_effect(() => C.set_text(n, C.get(P))), C.append(e, t);
|
|
125
|
-
};
|
|
126
|
-
C.if(L, (e) => {
|
|
127
|
-
C.get(P) && e(z);
|
|
128
|
-
}), C.reset(x);
|
|
129
|
-
var V = C.sibling(x, 2), U = C.child(V), W = C.child(U, !0);
|
|
130
|
-
C.reset(U);
|
|
131
|
-
var G = C.sibling(U, 2);
|
|
132
|
-
{
|
|
133
|
-
let e = C.derived(() => o());
|
|
134
|
-
S(G, {
|
|
135
|
-
id: "snapshot-description",
|
|
136
|
-
name: "description",
|
|
137
|
-
get placeholder() {
|
|
138
|
-
return C.get(e);
|
|
139
|
-
},
|
|
140
|
-
maxlength: 500,
|
|
141
|
-
rows: 3,
|
|
142
|
-
get disabled() {
|
|
143
|
-
return C.get(I);
|
|
144
|
-
},
|
|
145
|
-
get value() {
|
|
146
|
-
return C.get(N);
|
|
147
|
-
},
|
|
148
|
-
set value(e) {
|
|
149
|
-
C.set(N, e, !0);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
C.reset(V);
|
|
154
|
-
var K = C.sibling(V, 2), q = (e) => {
|
|
155
|
-
var t = E(), n = C.child(t, !0);
|
|
156
|
-
C.reset(t), C.template_effect(() => C.set_text(n, C.get(F))), C.append(e, t);
|
|
157
|
-
};
|
|
158
|
-
C.if(K, (e) => {
|
|
159
|
-
C.get(F) && e(q);
|
|
160
|
-
}), C.reset(b), _(C.sibling(b, 2), {
|
|
161
|
-
children: (t, n) => {
|
|
162
|
-
var r = w(), i = C.first_child(r);
|
|
163
|
-
g(i, {
|
|
164
|
-
variant: "outline",
|
|
165
|
-
type: "button",
|
|
166
|
-
onclick: R,
|
|
167
|
-
get disabled() {
|
|
168
|
-
return C.get(I);
|
|
169
|
-
},
|
|
170
|
-
children: (e, t) => {
|
|
171
|
-
C.next();
|
|
172
|
-
var n = C.text();
|
|
173
|
-
C.template_effect((e) => C.set_text(n, e), [() => u()]), C.append(e, n);
|
|
174
|
-
},
|
|
175
|
-
$$slots: { default: !0 }
|
|
176
|
-
});
|
|
177
|
-
var a = C.sibling(i, 2);
|
|
178
|
-
{
|
|
179
|
-
let t = C.derived(() => C.get(I) || C.get(M).trim().length === 0);
|
|
180
|
-
g(a, {
|
|
181
|
-
type: "button",
|
|
182
|
-
onclick: () => B(),
|
|
183
|
-
get disabled() {
|
|
184
|
-
return C.get(t);
|
|
185
|
-
},
|
|
186
|
-
children: (t, n) => {
|
|
187
|
-
var r = C.comment(), i = C.first_child(r), a = (t) => {
|
|
188
|
-
var n = D(), r = C.first_child(n);
|
|
189
|
-
e(r, { class: "mr-1 size-4 animate-spin" });
|
|
190
|
-
var i = C.sibling(r);
|
|
191
|
-
C.template_effect((e) => C.set_text(i, ` ${e ?? ""}`), [() => s()]), C.append(t, n);
|
|
192
|
-
}, o = (e) => {
|
|
193
|
-
var t = C.text();
|
|
194
|
-
C.template_effect((e) => C.set_text(t, e), [() => l()]), C.append(e, t);
|
|
195
|
-
};
|
|
196
|
-
C.if(i, (e) => {
|
|
197
|
-
C.get(I) ? e(a) : e(o, -1);
|
|
198
|
-
}), C.append(t, r);
|
|
199
|
-
},
|
|
200
|
-
$$slots: { default: !0 }
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
C.append(t, r);
|
|
204
|
-
},
|
|
205
|
-
$$slots: { default: !0 }
|
|
206
|
-
}), C.template_effect((e, t) => {
|
|
207
|
-
C.set_text(A, e), C.set_text(W, t);
|
|
208
|
-
}, [() => d(), () => c()]), C.event("submit", b, (e) => {
|
|
209
|
-
e.preventDefault(), B();
|
|
210
|
-
}), C.append(t, i);
|
|
211
|
-
},
|
|
212
|
-
$$slots: { default: !0 }
|
|
213
|
-
}), C.pop();
|
|
214
|
-
}
|
|
215
|
-
//#endregion
|
|
216
|
-
export { k as t };
|