@hiai-gg/docsmint 0.7.6 → 0.8.2
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 +46 -113
- package/dist/backend/index.js +860 -132
- package/dist/backend-account-runtime-cleanup.js +2 -0
- package/dist/backend-api-key-facade.js +2 -0
- package/dist/backend-pipeline-cancellation.js +2 -0
- package/dist/client.d.ts +4 -3
- package/dist/client.js +9 -6
- package/dist/frontend/{CategoryDialog-D_xFSWGh.js → CategoryDialog-B6zqtwE6.js} +2 -2
- package/dist/frontend/{ConfirmDialog-Cfq3D2Di.js → ConfirmDialog-Dk7wwcj9.js} +1 -1
- package/dist/frontend/{CreateSnapshotDialog-BHODxZWK.js → CreateSnapshotDialog-BPYjO1qN.js} +2 -2
- package/dist/frontend/{DatePicker-CZyCnQ1q.js → DatePicker-SiGLx9yh.js} +46 -46
- package/dist/frontend/{DeleteDialog-DaJOO6SB.js → DeleteDialog-D1jox8h1.js} +2 -2
- package/dist/frontend/{FolderNode-C_91NlEO.js → FolderNode-BG4l6I5C.js} +100 -99
- package/dist/frontend/{HiAiEditor-DtUGbQg6.js → HiAiEditor-BpmzvTCP.js} +977 -1008
- package/dist/frontend/{SettingsDialog-BlIZqk2-.js → SettingsDialog-2d6ZA4Ze.js} +3 -3
- package/dist/frontend/Sidebar-Db_ffhAb.js +2149 -0
- package/dist/frontend/{TagCreateDialog-BlGz4O9Z.js → TagCreateDialog-C5j3H49u.js} +2 -2
- package/dist/frontend/app-shell.js +3 -3
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/compact-editor.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/editor/extensions.js +1 -1
- package/dist/frontend/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend/components/editor/markdown.js +1 -1
- 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/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +3 -3
- package/dist/frontend/dashboard.js +1034 -1034
- package/dist/frontend/{dialog-tHAH3-9M.js → dialog-DC97Hnxo.js} +1 -1
- package/dist/frontend/dist-BLpDfrDC.js +316 -0
- package/dist/frontend/dist-D7zL6zdU.js +40 -0
- package/dist/frontend/{dist-Cg1BpNS7.js → dist-qd_OnyUC.js} +492 -516
- package/dist/frontend/dropdown-menu-COZwS7c0.js +493 -0
- package/dist/frontend/editorExtensions-Cu__YKW7.js +158 -0
- package/dist/frontend/ellipsis-vertical-CObXWXZW.js +41 -0
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/{editorExtensions-B-mKiWqq.js → lib-DYgslUw1.js} +6782 -6935
- package/dist/frontend/loader-circle-DnyUzAmN.js +25 -0
- package/dist/frontend/{markdown-CMij27Gg.js → markdown-Co8ZAKf4.js} +2 -1
- package/dist/frontend/search.js +2 -2
- package/dist/frontend/{confirm-dialog-BFTxjLv-.js → share-context-DooXPYKd.js} +2 -3
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/{theme.svelte-Bzitjfh9.js → theme.svelte-gLPpG6eU.js} +1 -0
- package/dist/frontend-ssr/app-shell.js +3 -3
- package/dist/frontend-ssr/assets/{FolderNode-CClgk8BL.js → FolderNode-CscMQ9sf.js} +2 -1
- package/dist/frontend-ssr/assets/{HiAiEditor-_-m7MJDd.js → HiAiEditor-DCpulE6N.js} +4 -50
- package/dist/frontend-ssr/assets/{SettingsDialog-BdvHRAxF.js → SettingsDialog-CpPxZahd.js} +1 -1
- package/dist/frontend-ssr/assets/{Sidebar-B3Saqn0O.js → Sidebar-BJ1XZ1DH.js} +7 -5
- package/dist/frontend-ssr/assets/dist-CshZmNmp.js +50 -0
- package/dist/frontend-ssr/assets/dist-DqeAICTy.js +300 -0
- package/dist/frontend-ssr/assets/{dropdown-menu-CdEpn_LT.js → dropdown-menu--acO7nXs.js} +1 -94
- package/dist/frontend-ssr/assets/ellipsis-vertical-BErUuhWg.js +96 -0
- package/dist/frontend-ssr/assets/{markdown-MhPwNWrC.js → markdown-Co31-Tl2.js} +1 -1
- package/dist/frontend-ssr/assets/{confirm-dialog-DeOR0SnQ.js → share-context-BvXQrIIH.js} +0 -1
- package/dist/frontend-ssr/assets/{theme.svelte-shZrSxz8.js → theme.svelte-CGgnJc3k.js} +1 -0
- package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/extensions.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown.js +1 -1
- package/dist/frontend-ssr/components/folder-node.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 +6 -4
- package/dist/frontend-ssr/search.js +1 -1
- package/dist/frontend-ssr/theme.js +1 -1
- package/dist/lifecycle-runtime.js +42 -4
- package/dist/mcp-cli.js +9 -6
- package/dist/mcp-server.js +9 -6
- package/dist/types.d.ts +12 -0
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +2 -0
- package/server.json +2 -2
- package/skills/docsmint-document-manager/SKILL.md +2 -2
- package/dist/frontend/Sidebar-BVGm5BRR.js +0 -2147
- package/dist/frontend/dropdown-menu-AJYeFPHu.js +0 -530
- package/dist/frontend-ssr/assets/{DatePicker-TZVeMZ2S.js → DatePicker-CCylVH0q.js} +12 -12
- package/dist/frontend-ssr/assets/{editorExtensions-qNlZVP98.js → editorExtensions-rhletNji.js} +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as e } from "./Icon-y7xxAIC6.js";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import * as t from "svelte/internal/client";
|
|
4
|
+
import "svelte/internal/flags/legacy";
|
|
5
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+7a2629d9b18e82d0/node_modules/lucide-svelte/dist/icons/loader-circle.svelte
|
|
6
|
+
function n(n, r) {
|
|
7
|
+
let i = t.legacy_rest_props(r, [
|
|
8
|
+
"children",
|
|
9
|
+
"$$slots",
|
|
10
|
+
"$$events",
|
|
11
|
+
"$$legacy"
|
|
12
|
+
]), a = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }]];
|
|
13
|
+
e(n, t.spread_props({ name: "loader-circle" }, () => i, {
|
|
14
|
+
get iconNode() {
|
|
15
|
+
return a;
|
|
16
|
+
},
|
|
17
|
+
children: (e, n) => {
|
|
18
|
+
var i = t.comment(), a = t.first_child(i);
|
|
19
|
+
t.slot(a, r, "default", {}, null), t.append(e, i);
|
|
20
|
+
},
|
|
21
|
+
$$slots: { default: !0 }
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { n as t };
|
package/dist/frontend/search.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./Icon-y7xxAIC6.js";
|
|
2
|
-
import { a as t, i as n, o as r, r as i, t as a } from "./DatePicker-
|
|
2
|
+
import { a as t, i as n, o as r, r as i, t as a } from "./DatePicker-SiGLx9yh.js";
|
|
3
3
|
import { t as o } from "./check-sdTlLwi9.js";
|
|
4
4
|
import { t as s } from "./chevron-down-DlBnIE7Y.js";
|
|
5
5
|
import { n as c, t as l } from "./folder-BAX6qBYy.js";
|
|
6
|
-
import {
|
|
6
|
+
import { t as u } from "./loader-circle-DnyUzAmN.js";
|
|
7
7
|
import { t as d } from "./rotate-ccw-DtZDfSK3.js";
|
|
8
8
|
import { n as f, t as p } from "./tag-ChpMfbfa.js";
|
|
9
9
|
import { t as m } from "./x-B2ifxSH7.js";
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./Icon-y7xxAIC6.js";
|
|
2
2
|
import { t } from "./circle-check-hWC-HeKu.js";
|
|
3
|
-
import { n } from "./
|
|
3
|
+
import { t as n } from "./loader-circle-DnyUzAmN.js";
|
|
4
4
|
import { t as r } from "./action_cancel-Cuxsznzz.js";
|
|
5
5
|
import { r as i } from "./sidebar_uncategorized-qJ2_Aonf.js";
|
|
6
6
|
import { t as a } from "./action_create-CtBQrRuj.js";
|
|
7
7
|
import { t as o } from "./action_save-BRN2Z_GP.js";
|
|
8
8
|
import { n as s, t as c } from "./folders_rename-BJo4Gipq.js";
|
|
9
9
|
import { t as l } from "./error_generic-CzNtmBT4.js";
|
|
10
|
-
import { a as u, i as d, n as f, o as p, r as m, s as h, t as g } from "./dialog-
|
|
10
|
+
import { a as u, i as d, n as f, o as p, r as m, s as h, t as g } from "./dialog-DC97Hnxo.js";
|
|
11
11
|
import { t as _ } from "./input-CrlYAH2S.js";
|
|
12
12
|
import { t as v } from "./label-B0syEfns.js";
|
|
13
|
-
import "./ConfirmDialog-Cfq3D2Di.js";
|
|
14
13
|
import "svelte/internal/disclose-version";
|
|
15
14
|
import * as y from "svelte/internal/client";
|
|
16
15
|
import { getContext as b, setContext as x } from "svelte";
|
package/dist/frontend/theme.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Icon } from "./assets/Icon-Clqe8D8X.js";
|
|
2
|
-
import { n as provideDocsmintShareAdapter, t as getDocsmintShareAdapter } from "./assets/
|
|
3
|
-
import { n as searchPreferences } from "./assets/SettingsDialog-
|
|
4
|
-
import { t as Sidebar } from "./assets/Sidebar-
|
|
2
|
+
import { n as provideDocsmintShareAdapter, t as getDocsmintShareAdapter } from "./assets/share-context-BvXQrIIH.js";
|
|
3
|
+
import { n as searchPreferences } from "./assets/SettingsDialog-CpPxZahd.js";
|
|
4
|
+
import { t as Sidebar } from "./assets/Sidebar-BJ1XZ1DH.js";
|
|
5
5
|
import { t as scroll_to_top_aria } from "./assets/scroll_to_top_aria-BN4ZfOnM.js";
|
|
6
6
|
import { o as provideDocsmintRequestAdapter, r as provideDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
7
7
|
import { t as editorPreferences } from "./assets/editor-preferences.svelte-iI5jJM1x.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as Chevron_right } from "./chevron-right-CseGE1qd.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as Ellipsis_vertical } from "./ellipsis-vertical-BErUuhWg.js";
|
|
3
3
|
import { t as Folder } from "./folder-DszunwKc.js";
|
|
4
4
|
import { t as action_go_to } from "./action_go_to-DQScgw7P.js";
|
|
5
5
|
import { a as doc_share, i as editor_more_options, n as folders_new, o as dashboard_new_document, r as folders_delete, t as folders_rename } from "./folders_rename-DvciOb6K.js";
|
|
6
6
|
import { a as getDocsmintRequestAdapter, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./route-context-BPRerEtZ.js";
|
|
7
7
|
import { t as cn } from "./utils-DvZnctjz.js";
|
|
8
|
+
import { a as Dropdown_menu, i as Dropdown_menu_content, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu--acO7nXs.js";
|
|
8
9
|
import "./dndzone-WtNaDxoQ.js";
|
|
9
10
|
import "./subfolders-refresh-store.svelte-CXHxQWKh.js";
|
|
10
11
|
import * as $ from "svelte/internal/server";
|
|
@@ -11,18 +11,16 @@ import { a as Dialog_content, n as Dialog_header, o as Dialog, r as Dialog_foote
|
|
|
11
11
|
import { t as Input } from "./input-BlAj7LzC.js";
|
|
12
12
|
import { a as resolveOfflineIdentity } from "./identity-veXobEfE.js";
|
|
13
13
|
import { n as getOfflineDB } from "./db-CUkQe9AU.js";
|
|
14
|
+
import { n as createEditor, t as EditorContent } from "./dist-CshZmNmp.js";
|
|
14
15
|
import { h as unregisterShortcut, u as registerShortcut } from "./keyboard.svelte-BgF47N3L.js";
|
|
15
16
|
import { i as sanitizeEditorContent, r as removeUnavailableAttachmentImages } from "./editor-content-sanitizer-Gjm93iR-.js";
|
|
16
17
|
import { t as CreateSnapshotDialog } from "./CreateSnapshotDialog-CECCRK0d.js";
|
|
17
|
-
import { r as editorExtensions } from "./editorExtensions-
|
|
18
|
-
import { t as markdownToJson } from "./markdown-
|
|
18
|
+
import { r as editorExtensions } from "./editorExtensions-rhletNji.js";
|
|
19
|
+
import { t as markdownToJson } from "./markdown-Co31-Tl2.js";
|
|
19
20
|
import * as $ from "svelte/internal/server";
|
|
20
|
-
import { onDestroy, onMount
|
|
21
|
-
import "svelte/reactivity";
|
|
21
|
+
import { onDestroy, onMount } from "svelte";
|
|
22
22
|
import Collaboration from "@tiptap/extension-collaboration";
|
|
23
23
|
import CollaborationCaret from "@tiptap/extension-collaboration-caret";
|
|
24
|
-
import { Editor } from "@tiptap/core";
|
|
25
|
-
import { readable } from "svelte/store";
|
|
26
24
|
//#region ../node_modules/.bun/lucide-svelte@1.0.1+7a2629d9b18e82d0/node_modules/lucide-svelte/dist/icons/bold.svelte
|
|
27
25
|
function Bold($$renderer, $$props) {
|
|
28
26
|
const $$sanitized_props = $.sanitize_props($$props);
|
|
@@ -1668,50 +1666,6 @@ function Undo($$renderer, $$props) {
|
|
|
1668
1666
|
]));
|
|
1669
1667
|
}
|
|
1670
1668
|
//#endregion
|
|
1671
|
-
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/Editor.js
|
|
1672
|
-
var Editor$1 = class extends Editor {
|
|
1673
|
-
contentElement = null;
|
|
1674
|
-
};
|
|
1675
|
-
//#endregion
|
|
1676
|
-
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/createEditor.js
|
|
1677
|
-
var createEditor = (options) => {
|
|
1678
|
-
const editor = new Editor$1(options);
|
|
1679
|
-
return readable(editor, (set) => {
|
|
1680
|
-
editor.on("transaction", () => {
|
|
1681
|
-
set(editor);
|
|
1682
|
-
});
|
|
1683
|
-
return () => {
|
|
1684
|
-
editor.destroy();
|
|
1685
|
-
};
|
|
1686
|
-
});
|
|
1687
|
-
};
|
|
1688
|
-
//#endregion
|
|
1689
|
-
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/EditorContent.svelte
|
|
1690
|
-
function EditorContent($$renderer, $$props) {
|
|
1691
|
-
$$renderer.component(($$renderer) => {
|
|
1692
|
-
const { editor, children, class: className } = $$props;
|
|
1693
|
-
const init = async () => {
|
|
1694
|
-
await tick();
|
|
1695
|
-
};
|
|
1696
|
-
onMount(init);
|
|
1697
|
-
onDestroy(() => {
|
|
1698
|
-
if (!editor) return;
|
|
1699
|
-
editor.contentElement = null;
|
|
1700
|
-
if (!editor.options.element?.firstChild) return;
|
|
1701
|
-
const newElement = document.createElement("div");
|
|
1702
|
-
newElement.append(...Array.from(editor.options.element?.childNodes || []));
|
|
1703
|
-
editor.setOptions({ element: newElement });
|
|
1704
|
-
});
|
|
1705
|
-
$$renderer.push(`<div${$.attr_class($.clsx(className))}></div> `);
|
|
1706
|
-
if (children) {
|
|
1707
|
-
$$renderer.push("<!--[0-->");
|
|
1708
|
-
children($$renderer);
|
|
1709
|
-
$$renderer.push(`<!---->`);
|
|
1710
|
-
} else $$renderer.push("<!--[-1-->");
|
|
1711
|
-
$$renderer.push(`<!--]-->`);
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
//#endregion
|
|
1715
1669
|
//#region src/lib/components/editor/LinkDialog.svelte
|
|
1716
1670
|
function LinkDialog($$renderer, $$props) {
|
|
1717
1671
|
$$renderer.component(($$renderer) => {
|
|
@@ -15,7 +15,7 @@ import { t as resolveExtensions } from "./resolve-BqHozBXl.js";
|
|
|
15
15
|
import { a as resolveOfflineIdentity, t as disableOfflineAccess } from "./identity-veXobEfE.js";
|
|
16
16
|
import { n as getOfflineDB, t as deleteOfflineDB } from "./db-CUkQe9AU.js";
|
|
17
17
|
import { t as editorPreferences } from "./editor-preferences.svelte-iI5jJM1x.js";
|
|
18
|
-
import { t as themeStore } from "./theme.svelte-
|
|
18
|
+
import { t as themeStore } from "./theme.svelte-CGgnJc3k.js";
|
|
19
19
|
import * as $ from "svelte/internal/server";
|
|
20
20
|
import { onMount } from "svelte";
|
|
21
21
|
import { page } from "$app/state";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as Icon } from "./Icon-Clqe8D8X.js";
|
|
2
|
-
import { a as File_text, i as Plus, o as Check, r as FolderDialog, t as getDocsmintShareAdapter } from "./
|
|
2
|
+
import { a as File_text, i as Plus, o as Check, r as FolderDialog, t as getDocsmintShareAdapter } from "./share-context-BvXQrIIH.js";
|
|
3
3
|
import { t as Chevron_down } from "./chevron-down-C6BTPJFz.js";
|
|
4
4
|
import { t as Chevron_right } from "./chevron-right-CseGE1qd.js";
|
|
5
5
|
import { t as Clock } from "./clock-DpP_Y7WP.js";
|
|
6
6
|
import { t as Copy } from "./copy-DRMKiRZ0.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as Ellipsis_vertical } from "./ellipsis-vertical-BErUuhWg.js";
|
|
8
8
|
import { t as Folder } from "./folder-DszunwKc.js";
|
|
9
9
|
import { t as Loader_circle } from "./loader-circle-BpRVrMZg.js";
|
|
10
|
-
import { t as SettingsDialog } from "./SettingsDialog-
|
|
10
|
+
import { t as SettingsDialog } from "./SettingsDialog-CpPxZahd.js";
|
|
11
11
|
import { n as Search, t as Tag } from "./tag-DFh6nF9R.js";
|
|
12
12
|
import { t as action_cancel } from "./action_cancel-OVgQDP5Q.js";
|
|
13
13
|
import { a as action_copy_content, i as dashboard_title, n as folders_delete_title, t as sidebar_uncategorized } from "./sidebar_uncategorized-Dx-LTd5w.js";
|
|
@@ -30,6 +30,9 @@ import { n as apiFetch } from "./client-rfwQYYHY.js";
|
|
|
30
30
|
import { i as listCategories, r as deleteCategory } from "./categories-C_dxFoHi.js";
|
|
31
31
|
import { t as getFrontendExtensions } from "./context-Bi_mO-NS.js";
|
|
32
32
|
import { t as resolveExtensions } from "./resolve-BqHozBXl.js";
|
|
33
|
+
import "./dist-DqeAICTy.js";
|
|
34
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-CWO0HBaS.js";
|
|
35
|
+
import { a as Dropdown_menu, i as Dropdown_menu_content, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu--acO7nXs.js";
|
|
33
36
|
import { n as SHADOW_ITEM_MARKER_PROPERTY_NAME } from "./dndzone-WtNaDxoQ.js";
|
|
34
37
|
import { c as updateDocument, r as deleteDocument, s as listDocuments, t as clearDocumentsCache } from "./documents-CEuA1V6N.js";
|
|
35
38
|
import { c as updateFolder, r as deleteFolder, s as listFolders, t as createFolder } from "./folders-BOXeb9hz.js";
|
|
@@ -38,9 +41,8 @@ import { t as ShareDialog } from "./ShareDialog-DHPbSHZg.js";
|
|
|
38
41
|
import { t as CategoryDialog } from "./CategoryDialog-C41IBNWG.js";
|
|
39
42
|
import { n as createDocumentPlacementWriter, t as createDocumentDropCoordinator } from "./document-drop-coordinator-CEaYACsC.js";
|
|
40
43
|
import { a as getFolderFromRegistry, c as getPendingDocumentPlacement, d as refreshFolders, f as registerDocument, n as bumpSubfoldersRefresh, p as registerFolder, r as getDocumentFromRegistry, t as acknowledgeDocumentPlacement, u as publishDocumentPlacement } from "./subfolders-refresh-store.svelte-CXHxQWKh.js";
|
|
41
|
-
import { t as FolderNode } from "./FolderNode-
|
|
44
|
+
import { t as FolderNode } from "./FolderNode-CscMQ9sf.js";
|
|
42
45
|
import { i as setSelectedTag, n as refreshDocs, r as refreshTags, t as getSelectedTag } from "./tag-store.svelte-QRysvGKe.js";
|
|
43
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-CWO0HBaS.js";
|
|
44
46
|
import { i as deleteTag, o as listTags } from "./tags-BBCoFYro.js";
|
|
45
47
|
import { t as TagCreateDialog } from "./TagCreateDialog-CPg-nG0D.js";
|
|
46
48
|
import * as $ from "svelte/internal/server";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as $ from "svelte/internal/server";
|
|
2
|
+
import { onDestroy, onMount, tick } from "svelte";
|
|
3
|
+
import "svelte/reactivity";
|
|
4
|
+
import { Editor } from "@tiptap/core";
|
|
5
|
+
import { readable } from "svelte/store";
|
|
6
|
+
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/Editor.js
|
|
7
|
+
var Editor$1 = class extends Editor {
|
|
8
|
+
contentElement = null;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/createEditor.js
|
|
12
|
+
var createEditor = (options) => {
|
|
13
|
+
const editor = new Editor$1(options);
|
|
14
|
+
return readable(editor, (set) => {
|
|
15
|
+
editor.on("transaction", () => {
|
|
16
|
+
set(editor);
|
|
17
|
+
});
|
|
18
|
+
return () => {
|
|
19
|
+
editor.destroy();
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../node_modules/.bun/svelte-tiptap@3.0.1+832ddb9612b7c6e9/node_modules/svelte-tiptap/dist/EditorContent.svelte
|
|
25
|
+
function EditorContent($$renderer, $$props) {
|
|
26
|
+
$$renderer.component(($$renderer) => {
|
|
27
|
+
const { editor, children, class: className } = $$props;
|
|
28
|
+
const init = async () => {
|
|
29
|
+
await tick();
|
|
30
|
+
};
|
|
31
|
+
onMount(init);
|
|
32
|
+
onDestroy(() => {
|
|
33
|
+
if (!editor) return;
|
|
34
|
+
editor.contentElement = null;
|
|
35
|
+
if (!editor.options.element?.firstChild) return;
|
|
36
|
+
const newElement = document.createElement("div");
|
|
37
|
+
newElement.append(...Array.from(editor.options.element?.childNodes || []));
|
|
38
|
+
editor.setOptions({ element: newElement });
|
|
39
|
+
});
|
|
40
|
+
$$renderer.push(`<div${$.attr_class($.clsx(className))}></div> `);
|
|
41
|
+
if (children) {
|
|
42
|
+
$$renderer.push("<!--[0-->");
|
|
43
|
+
children($$renderer);
|
|
44
|
+
$$renderer.push(`<!---->`);
|
|
45
|
+
} else $$renderer.push("<!--[-1-->");
|
|
46
|
+
$$renderer.push(`<!--]-->`);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { createEditor as n, EditorContent as t };
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import "./utils-BK35BJKQ.js";
|
|
2
|
+
import "./dialog--tDgDGw9.js";
|
|
3
|
+
import "./input-BlAj7LzC.js";
|
|
4
|
+
import "./ConfirmDialog-CWO0HBaS.js";
|
|
5
|
+
import "./dropdown-menu--acO7nXs.js";
|
|
6
|
+
import "./dist-CshZmNmp.js";
|
|
7
|
+
import "svelte/internal/server";
|
|
8
|
+
import "svelte";
|
|
9
|
+
import "$app/state";
|
|
10
|
+
import "$app/navigation";
|
|
11
|
+
import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";
|
|
12
|
+
import Highlight from "@tiptap/extension-highlight";
|
|
13
|
+
import Image from "@tiptap/extension-image";
|
|
14
|
+
import Link from "@tiptap/extension-link";
|
|
15
|
+
import { TaskItem, TaskList } from "@tiptap/extension-list";
|
|
16
|
+
import { TableKit } from "@tiptap/extension-table";
|
|
17
|
+
import TextAlign from "@tiptap/extension-text-align";
|
|
18
|
+
import { Markdown } from "@tiptap/markdown";
|
|
19
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
20
|
+
import { common, createLowlight } from "lowlight";
|
|
21
|
+
import { get, writable } from "svelte/store";
|
|
22
|
+
import "$app/environment";
|
|
23
|
+
import "svelte/transition";
|
|
24
|
+
import "$app/stores";
|
|
25
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+2be6617fd6e54084/node_modules/@hiai-gg/hiai-ui/dist/lib/editor/editorExtensions.js
|
|
26
|
+
var lowlight = createLowlight(common);
|
|
27
|
+
function getEditorExtensions() {
|
|
28
|
+
return [
|
|
29
|
+
StarterKit.configure({
|
|
30
|
+
heading: { levels: [
|
|
31
|
+
1,
|
|
32
|
+
2,
|
|
33
|
+
3
|
|
34
|
+
] },
|
|
35
|
+
codeBlock: false,
|
|
36
|
+
link: false
|
|
37
|
+
}),
|
|
38
|
+
Markdown.configure({}),
|
|
39
|
+
Link.configure({
|
|
40
|
+
openOnClick: false,
|
|
41
|
+
HTMLAttributes: { class: "doc-link" }
|
|
42
|
+
}),
|
|
43
|
+
Image.configure({
|
|
44
|
+
inline: false,
|
|
45
|
+
allowBase64: false,
|
|
46
|
+
HTMLAttributes: { class: "doc-image" }
|
|
47
|
+
}),
|
|
48
|
+
Highlight.configure({ multicolor: true }),
|
|
49
|
+
CodeBlockLowlight.configure({ lowlight }),
|
|
50
|
+
TextAlign.configure({ types: ["heading", "paragraph"] }),
|
|
51
|
+
TableKit.configure({ table: { resizable: true } }),
|
|
52
|
+
TaskList.configure(),
|
|
53
|
+
TaskItem.configure({ nested: true })
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
getEditorExtensions();
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region ../node_modules/.bun/svelte-sonner@0.3.28+7a2629d9b18e82d0/node_modules/svelte-sonner/dist/internal/helpers.js
|
|
59
|
+
var isBrowser = typeof document !== "undefined";
|
|
60
|
+
/**
|
|
61
|
+
* A custom store that only allows setting/updating the value from the
|
|
62
|
+
* browser to avoid SSR data leaks. By defining this helper, we don't
|
|
63
|
+
* have to worry about checking for `isBrowser` in every place we
|
|
64
|
+
* mutate the various stores.
|
|
65
|
+
*
|
|
66
|
+
* This should only ever be initialized with an empty array or object,
|
|
67
|
+
* as otherwise the initial value will persist across requests.
|
|
68
|
+
*/
|
|
69
|
+
function clientWritable(initialValue) {
|
|
70
|
+
const store = writable(initialValue);
|
|
71
|
+
function set(value) {
|
|
72
|
+
if (isBrowser) store.set(value);
|
|
73
|
+
}
|
|
74
|
+
function update(updater) {
|
|
75
|
+
if (isBrowser) store.update(updater);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
subscribe: store.subscribe,
|
|
79
|
+
set,
|
|
80
|
+
update
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region ../node_modules/.bun/svelte-sonner@0.3.28+7a2629d9b18e82d0/node_modules/svelte-sonner/dist/state.js
|
|
85
|
+
var toastsCounter = 0;
|
|
86
|
+
function createToastState() {
|
|
87
|
+
const toasts = clientWritable([]);
|
|
88
|
+
const heights = clientWritable([]);
|
|
89
|
+
function addToast(data) {
|
|
90
|
+
toasts.update((prev) => [data, ...prev]);
|
|
91
|
+
}
|
|
92
|
+
function create(data) {
|
|
93
|
+
const { message, ...rest } = data;
|
|
94
|
+
const id = typeof data?.id === "number" || data.id && data.id?.length > 0 ? data.id : toastsCounter++;
|
|
95
|
+
const dismissable = data.dismissable === void 0 ? true : data.dismissable;
|
|
96
|
+
const type = data.type === void 0 ? "default" : data.type;
|
|
97
|
+
if (get(toasts).find((toast) => {
|
|
98
|
+
return toast.id === id;
|
|
99
|
+
})) toasts.update((prev) => prev.map((toast) => {
|
|
100
|
+
if (toast.id === id) return {
|
|
101
|
+
...toast,
|
|
102
|
+
...data,
|
|
103
|
+
id,
|
|
104
|
+
title: message,
|
|
105
|
+
dismissable,
|
|
106
|
+
type,
|
|
107
|
+
updated: true
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
...toast,
|
|
111
|
+
updated: false
|
|
112
|
+
};
|
|
113
|
+
}));
|
|
114
|
+
else addToast({
|
|
115
|
+
...rest,
|
|
116
|
+
id,
|
|
117
|
+
title: message,
|
|
118
|
+
dismissable,
|
|
119
|
+
type
|
|
120
|
+
});
|
|
121
|
+
return id;
|
|
122
|
+
}
|
|
123
|
+
function dismiss(id) {
|
|
124
|
+
if (id === void 0) {
|
|
125
|
+
toasts.update((prev) => prev.map((toast) => ({
|
|
126
|
+
...toast,
|
|
127
|
+
dismiss: true
|
|
128
|
+
})));
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
toasts.update((prev) => prev.map((toast) => toast.id === id ? {
|
|
132
|
+
...toast,
|
|
133
|
+
dismiss: true
|
|
134
|
+
} : toast));
|
|
135
|
+
return id;
|
|
136
|
+
}
|
|
137
|
+
function remove(id) {
|
|
138
|
+
if (id === void 0) {
|
|
139
|
+
toasts.set([]);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
toasts.update((prev) => prev.filter((toast) => toast.id !== id));
|
|
143
|
+
return id;
|
|
144
|
+
}
|
|
145
|
+
function message(message, data) {
|
|
146
|
+
return create({
|
|
147
|
+
...data,
|
|
148
|
+
type: "default",
|
|
149
|
+
message
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function error(message, data) {
|
|
153
|
+
return create({
|
|
154
|
+
...data,
|
|
155
|
+
type: "error",
|
|
156
|
+
message
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function success(message, data) {
|
|
160
|
+
return create({
|
|
161
|
+
...data,
|
|
162
|
+
type: "success",
|
|
163
|
+
message
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function info(message, data) {
|
|
167
|
+
return create({
|
|
168
|
+
...data,
|
|
169
|
+
type: "info",
|
|
170
|
+
message
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function warning(message, data) {
|
|
174
|
+
return create({
|
|
175
|
+
...data,
|
|
176
|
+
type: "warning",
|
|
177
|
+
message
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function loading(message, data) {
|
|
181
|
+
return create({
|
|
182
|
+
...data,
|
|
183
|
+
type: "loading",
|
|
184
|
+
message
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function promise(promise, data) {
|
|
188
|
+
if (!data) return;
|
|
189
|
+
let id = void 0;
|
|
190
|
+
if (data.loading !== void 0) id = create({
|
|
191
|
+
...data,
|
|
192
|
+
promise,
|
|
193
|
+
type: "loading",
|
|
194
|
+
message: data.loading
|
|
195
|
+
});
|
|
196
|
+
const p = promise instanceof Promise ? promise : promise();
|
|
197
|
+
let shouldDismiss = id !== void 0;
|
|
198
|
+
p.then((response) => {
|
|
199
|
+
if (response && typeof response.ok === "boolean" && !response.ok) {
|
|
200
|
+
shouldDismiss = false;
|
|
201
|
+
const message = typeof data.error === "function" ? data.error(`HTTP error! status: ${response.status}`) : data.error;
|
|
202
|
+
create({
|
|
203
|
+
id,
|
|
204
|
+
type: "error",
|
|
205
|
+
message
|
|
206
|
+
});
|
|
207
|
+
} else if (data.success !== void 0) {
|
|
208
|
+
shouldDismiss = false;
|
|
209
|
+
const message = typeof data.success === "function" ? data.success(response) : data.success;
|
|
210
|
+
create({
|
|
211
|
+
id,
|
|
212
|
+
type: "success",
|
|
213
|
+
message
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}).catch((error) => {
|
|
217
|
+
if (data.error !== void 0) {
|
|
218
|
+
shouldDismiss = false;
|
|
219
|
+
const message = typeof data.error === "function" ? data.error(error) : data.error;
|
|
220
|
+
create({
|
|
221
|
+
id,
|
|
222
|
+
type: "error",
|
|
223
|
+
message
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}).finally(() => {
|
|
227
|
+
if (shouldDismiss) {
|
|
228
|
+
dismiss(id);
|
|
229
|
+
id = void 0;
|
|
230
|
+
}
|
|
231
|
+
data.finally?.();
|
|
232
|
+
});
|
|
233
|
+
return id;
|
|
234
|
+
}
|
|
235
|
+
function custom(component, data) {
|
|
236
|
+
const id = data?.id || toastsCounter++;
|
|
237
|
+
create({
|
|
238
|
+
component,
|
|
239
|
+
id,
|
|
240
|
+
...data
|
|
241
|
+
});
|
|
242
|
+
return id;
|
|
243
|
+
}
|
|
244
|
+
function removeHeight(id) {
|
|
245
|
+
heights.update((prev) => prev.filter((height) => height.toastId !== id));
|
|
246
|
+
}
|
|
247
|
+
function setHeight(data) {
|
|
248
|
+
if (get(heights).find((el) => el.toastId === data.toastId) === void 0) {
|
|
249
|
+
heights.update((prev) => [data, ...prev]);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
heights.update((prev) => prev.map((el) => {
|
|
253
|
+
if (el.toastId === data.toastId) return data;
|
|
254
|
+
else return el;
|
|
255
|
+
}));
|
|
256
|
+
}
|
|
257
|
+
function reset() {
|
|
258
|
+
toasts.set([]);
|
|
259
|
+
heights.set([]);
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
create,
|
|
263
|
+
addToast,
|
|
264
|
+
dismiss,
|
|
265
|
+
remove,
|
|
266
|
+
message,
|
|
267
|
+
error,
|
|
268
|
+
success,
|
|
269
|
+
info,
|
|
270
|
+
warning,
|
|
271
|
+
loading,
|
|
272
|
+
promise,
|
|
273
|
+
custom,
|
|
274
|
+
removeHeight,
|
|
275
|
+
setHeight,
|
|
276
|
+
reset,
|
|
277
|
+
toasts,
|
|
278
|
+
heights
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
var toastState = createToastState();
|
|
282
|
+
function toastFunction(message, data) {
|
|
283
|
+
return toastState.create({
|
|
284
|
+
message,
|
|
285
|
+
...data
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
Object.assign(toastFunction, {
|
|
289
|
+
success: toastState.success,
|
|
290
|
+
info: toastState.info,
|
|
291
|
+
warning: toastState.warning,
|
|
292
|
+
error: toastState.error,
|
|
293
|
+
custom: toastState.custom,
|
|
294
|
+
message: toastState.message,
|
|
295
|
+
promise: toastState.promise,
|
|
296
|
+
dismiss: toastState.dismiss,
|
|
297
|
+
loading: toastState.loading
|
|
298
|
+
});
|
|
299
|
+
//#endregion
|
|
300
|
+
export {};
|