@hiai-gg/docsmint 0.5.0 → 0.5.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/dist/backend/index.js +47 -8
- package/dist/backend-account-runtime-cleanup.js +20 -3
- package/dist/backend-api-key-facade.js +20 -3
- package/dist/backend-pipeline-cancellation.js +20 -3
- package/dist/frontend/{CategoryDialog-DyytjQn6.js → CategoryDialog-DmlX0Z97.js} +1 -1
- package/dist/frontend/DatePicker-D6E-EEtZ.js +340 -0
- package/dist/frontend/{FolderNode-DAGPgi-M.js → FolderNode-D3rN3yLV.js} +1 -1
- package/dist/frontend/{HiaiDocsExtensionProvider-CMiTXi2J.js → HiaiDocsExtensionProvider-OSn96BBw.js} +1 -1
- package/dist/frontend/{SettingsDialog-DEx1eEZm.js → SettingsDialog-Bd_S2RKW.js} +104 -96
- package/dist/frontend/ShareDialog-BC-Jl6v1.js +257 -0
- package/dist/frontend/{Sidebar-BdB8CfXS.js → Sidebar-BnZgNl_8.js} +679 -657
- package/dist/frontend/api/attachments.js +1 -1
- package/dist/frontend/app-shell.js +3 -3
- package/dist/frontend/{attachments-C2DBzU-r.js → attachments-B8AuDjno.js} +8 -5
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +240 -228
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +1 -1
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/{context-KLiM3QQ0.js → context-D0zPFXZ4.js} +2 -0
- package/dist/frontend/dashboard.js +1106 -1068
- package/dist/frontend/{dropdown-menu-Cre80-CJ.js → dropdown-menu-CJ_7V3N0.js} +43 -43
- package/dist/frontend/extension.d.ts +3 -2
- package/dist/frontend/extension.js +1 -1
- package/dist/frontend/{floating-layer-anchor-BDs7vO-M.js → floating-layer-anchor-S5RSefGN.js} +1 -1
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/search.js +421 -405
- package/dist/frontend/{select-value-GXwx90Pr.js → select-value-JCAp2PmU.js} +466 -466
- package/dist/frontend/shared-document.js +1 -1
- package/dist/frontend-ssr/api/attachments.js +1 -1
- package/dist/frontend-ssr/app-shell.js +4 -4
- package/dist/frontend-ssr/assets/{CategoryDialog-CLAGMZPz.js → CategoryDialog-Cnlmr1sz.js} +2 -2
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-DNAjd4eD.js → CreateSnapshotDialog-b6O0nUVp.js} +1 -1
- package/dist/frontend-ssr/assets/{DatePicker-Cp6Qmgdb.js → DatePicker-D84cJ-Eq.js} +1 -1
- package/dist/frontend-ssr/assets/{FolderNode-Ty6fMbDu.js → FolderNode-CnFVWuQi.js} +2 -2
- package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-B_MrN08c.js → HiaiDocsExtensionProvider-BRKWmcDd.js} +1 -1
- package/dist/frontend-ssr/assets/{SettingsDialog-BymUxBgg.js → SettingsDialog-BPdUl6pd.js} +23 -9
- package/dist/frontend-ssr/assets/ShareDialog-BZd28sg-.js +45 -0
- package/dist/frontend-ssr/assets/{Sidebar-DzbIUZFc.js → Sidebar-DwYZH0Tr.js} +49 -14
- package/dist/frontend-ssr/assets/{TagCreateDialog-B7wDbVqG.js → TagCreateDialog-DUPMitlL.js} +1 -1
- package/dist/frontend-ssr/assets/{attachments-CXgatN0B.js → attachments-Cj3fQyUp.js} +11 -4
- package/dist/frontend-ssr/assets/{confirm-dialog-B3C0WeMn.js → confirm-dialog-XuyaL8sr.js} +1 -1
- package/dist/frontend-ssr/assets/{context-BtCMqdVe.js → context-Bi_mO-NS.js} +2 -0
- package/dist/frontend-ssr/assets/{dropdown-menu-CGkf8-rb.js → dropdown-menu-Dn_vQq9b.js} +1 -1
- package/dist/frontend-ssr/assets/{floating-layer-anchor-CYIE8Oj6.js → floating-layer-anchor-BIAu-252.js} +1 -1
- package/dist/frontend-ssr/assets/{messages-D-auzk9H.js → messages-BAQzILs4.js} +1 -1
- package/dist/frontend-ssr/assets/{select-value-6Lk0ToYd.js → select-value-DBhbkNcc.js} +1 -1
- package/dist/frontend-ssr/components/category-dialog.js +1 -1
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +37 -23
- package/dist/frontend-ssr/components/editor/document-title.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend-ssr/components/folder-node.js +1 -1
- package/dist/frontend-ssr/components/save-as-dialog.js +2 -2
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/share-dialog.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
- package/dist/frontend-ssr/components/version-history.js +2 -2
- package/dist/frontend-ssr/dashboard.js +280 -81
- package/dist/frontend-ssr/extension.js +1 -1
- package/dist/frontend-ssr/i18n.js +1 -1
- package/dist/frontend-ssr/search.js +4 -4
- package/dist/frontend-ssr/shared-document.js +1 -1
- package/dist/lifecycle-runtime.js +18 -3
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +17 -2
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/DatePicker-BkaaNS1l.js +0 -256
- package/dist/frontend/ShareDialog-ChZogJtW.js +0 -166
- package/dist/frontend-ssr/assets/ShareDialog-C-9VDKSz.js +0 -56
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as presignAttachment, i as listAttachments, n as isFileSizeAllowed, o as uploadAttachment, r as isImageFile, t as confirmAttachment } from "../assets/attachments-
|
|
1
|
+
import { a as presignAttachment, i as listAttachments, n as isFileSizeAllowed, o as uploadAttachment, r as isImageFile, t as confirmAttachment } from "../assets/attachments-Cj3fQyUp.js";
|
|
2
2
|
export { confirmAttachment, isFileSizeAllowed, isImageFile, listAttachments, presignAttachment, uploadAttachment };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as scroll_to_top_aria } from "./assets/messages-
|
|
1
|
+
import { E as scroll_to_top_aria } from "./assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./assets/Icon-QwirKi9Y.js";
|
|
3
|
-
import { n as searchPreferences, r as editorPreferences } from "./assets/SettingsDialog-
|
|
4
|
-
import { t as Sidebar } from "./assets/Sidebar-
|
|
3
|
+
import { n as searchPreferences, r as editorPreferences } from "./assets/SettingsDialog-BPdUl6pd.js";
|
|
4
|
+
import { t as Sidebar } from "./assets/Sidebar-DwYZH0Tr.js";
|
|
5
5
|
import { o as provideDocsmintRequestAdapter, r as provideDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
6
|
-
import { t as HiaiDocsExtensionProvider } from "./assets/HiaiDocsExtensionProvider-
|
|
6
|
+
import { t as HiaiDocsExtensionProvider } from "./assets/HiaiDocsExtensionProvider-BRKWmcDd.js";
|
|
7
7
|
import * as $ from "svelte/internal/server";
|
|
8
8
|
import { getContext, onDestroy, setContext, untrack } from "svelte";
|
|
9
9
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/arrow-up.svelte
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as categories_create_title, _ as categories_delete_error, _n as action_cancel, b as categories_name_placeholder, g as categories_delete_title, gn as action_delete, h as categories_delete_description, m as categories_delete_success, mn as action_create, p as categories_delete_success_description, v as categories_update_error, vn as action_save, x as categories_edit_title, y as categories_create_error } from "./messages-
|
|
1
|
+
import { S as categories_create_title, _ as categories_delete_error, _n as action_cancel, b as categories_name_placeholder, g as categories_delete_title, gn as action_delete, h as categories_delete_description, m as categories_delete_success, mn as action_create, p as categories_delete_success_description, v as categories_update_error, vn as action_save, x as categories_edit_title, y as categories_create_error } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Copy } from "./copy-DkkCPkBL.js";
|
|
3
3
|
import { t as Circle_check } from "./circle-check-CPS9dKEo.js";
|
|
4
4
|
import { t as Loader_circle } from "./loader-circle-CIEWGyfP.js";
|
|
@@ -7,7 +7,7 @@ import { a as Dialog, i as Dialog_description, n as Dialog_header, o as Button,
|
|
|
7
7
|
import { t as Input } from "./input-DezGsU3y.js";
|
|
8
8
|
import { t as Label } from "./label-Bj8-TfFN.js";
|
|
9
9
|
import { a as listApiKeys, n as categoryIdFromScopes, o as revealCategoryApiKey, r as createCategoryApiKey, s as revokeApiKey, t as apiKeyClipboardValue } from "./api-keys-DIbclwj5.js";
|
|
10
|
-
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "./select-value-
|
|
10
|
+
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "./select-value-DBhbkNcc.js";
|
|
11
11
|
import * as $ from "svelte/internal/server";
|
|
12
12
|
//#region src/lib/components/sidebar/category-dialog-feedback.ts
|
|
13
13
|
function categoryDialogErrorMessage(error, fallback) {
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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
3
|
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
4
|
import { t as Input } from "./input-DezGsU3y.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as month_august, B as date_picker_aria, G as weekday_th, H as weekday_su, J as weekday_mo, K as weekday_we, Q as month_september, U as weekday_sa, V as date_picker_placeholder, W as weekday_fr, X as month_november, Y as month_december, Z as month_october, at as month_february, et as month_july, it as month_march, nt as month_may, ot as month_january, q as weekday_tu, rt as month_april, tt as month_june } from "./messages-
|
|
1
|
+
import { $ as month_august, B as date_picker_aria, G as weekday_th, H as weekday_su, J as weekday_mo, K as weekday_we, Q as month_september, U as weekday_sa, V as date_picker_placeholder, W as weekday_fr, X as month_november, Y as month_december, Z as month_october, at as month_february, et as month_july, it as month_march, nt as month_may, ot as month_january, q as weekday_tu, rt as month_april, tt as month_june } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./Icon-QwirKi9Y.js";
|
|
3
3
|
import { t as cn } from "./utils-DtlPPXpJ.js";
|
|
4
4
|
import * as $ from "svelte/internal/server";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dr as doc_share, Ir as dashboard_new_document, _r as folders_rename, br as folders_new, bt as editor_more_options, dn as action_go_to, gr as folders_delete } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Chevron_right } from "./chevron-right-DKD7WXjz.js";
|
|
3
3
|
import { t as Folder } from "./folder-DYIE-XPP.js";
|
|
4
|
-
import { a as Dropdown_menu, i as Dropdown_menu_content, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu-
|
|
4
|
+
import { a as Dropdown_menu, i as Dropdown_menu_content, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu-Dn_vQq9b.js";
|
|
5
5
|
import { a as getDocsmintRequestAdapter, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./route-context-BPRerEtZ.js";
|
|
6
6
|
import { t as cn } from "./utils-DvZnctjz.js";
|
|
7
7
|
import "./dndzone-DMvTO_Jz.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as provideFrontendExtensions } from "./context-
|
|
1
|
+
import { n as provideFrontendExtensions } from "./context-Bi_mO-NS.js";
|
|
2
2
|
import "svelte/internal/server";
|
|
3
3
|
//#region src/lib/hosts/HiaiDocsExtensionProvider.svelte
|
|
4
4
|
function HiaiDocsExtensionProvider($$renderer, $$props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as settings_email, Cn as change_password, Dn as settings_save, En as password_label, Fn as settings_appearance, In as settings_account, Ln as settings_profile, Mn as theme_dark, Nn as theme_light, On as settings_name, Pn as settings_theme, Rn as settings_title, Sn as auth_password, Tn as new_password, jn as theme_system, kn as settings_email_change_warning, pn as action_close, wn as confirm_password, xn as auth_logout } from "./messages-
|
|
1
|
+
import { An as settings_email, Cn as change_password, Dn as settings_save, En as password_label, Fn as settings_appearance, In as settings_account, Ln as settings_profile, Mn as theme_dark, Nn as theme_light, On as settings_name, Pn as settings_theme, Rn as settings_title, Sn as auth_password, Tn as new_password, jn as theme_system, kn as settings_email_change_warning, pn as action_close, wn as confirm_password, xn as auth_logout } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./Icon-QwirKi9Y.js";
|
|
3
3
|
import { a as getDocsmintRequestAdapter, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./route-context-BPRerEtZ.js";
|
|
4
4
|
import { t as cn } from "./utils-DtlPPXpJ.js";
|
|
@@ -9,7 +9,7 @@ import { r as signOut } from "./auth-client-x26kqY8Z.js";
|
|
|
9
9
|
import { r as getProfile } from "./settings-Bk5Hk9Vq.js";
|
|
10
10
|
import { a as listApiKeys, i as createGlobalApiKey, n as categoryIdFromScopes, o as revealCategoryApiKey, s as revokeApiKey, t as apiKeyClipboardValue } from "./api-keys-DIbclwj5.js";
|
|
11
11
|
import { i as listCategories } from "./categories-av9xjeg5.js";
|
|
12
|
-
import { t as getFrontendExtensions } from "./context-
|
|
12
|
+
import { t as getFrontendExtensions } from "./context-Bi_mO-NS.js";
|
|
13
13
|
import { t as resolveExtensions } from "./resolve-BqHozBXl.js";
|
|
14
14
|
import { a as resolveOfflineIdentity, t as disableOfflineAccess } from "./identity-B3uHoDtf.js";
|
|
15
15
|
import { n as getOfflineDB, t as deleteOfflineDB } from "./db-CnxeO66n.js";
|
|
@@ -568,6 +568,7 @@ function SettingsDialog($$renderer, $$props) {
|
|
|
568
568
|
let activeTab = "profile";
|
|
569
569
|
const frontendExtensions = getFrontendExtensions();
|
|
570
570
|
const settingsExtensions = $.derived(() => resolveExtensions(frontendExtensions.settingsSections, { pathname: page.url.pathname }));
|
|
571
|
+
const profileActions = $.derived(() => resolveExtensions(frontendExtensions.profileActions, { pathname: page.url.pathname }));
|
|
571
572
|
let name = "";
|
|
572
573
|
let email = "";
|
|
573
574
|
let currentPassword = "";
|
|
@@ -839,7 +840,20 @@ function SettingsDialog($$renderer, $$props) {
|
|
|
839
840
|
});
|
|
840
841
|
$$renderer.push(`<!----> <p class="text-xs text-muted-foreground">${$.escape(settings_email_change_warning())}</p> `);
|
|
841
842
|
$$renderer.push("<!--[-1-->");
|
|
842
|
-
$$renderer.push(`<!--]--></div> <div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">GraphRAG search</span> <span class="block text-xs text-muted-foreground">Use graph expansion for related documents. Disable it for faster standard RAG search.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": searchPreferences.graphSearchEnabled })}${$.attr("aria-checked", searchPreferences.graphSearchEnabled)} aria-label="Use GraphRAG search"><span class="svelte-1eaqpj"></span></button></div>
|
|
843
|
+
$$renderer.push(`<!--]--></div> <div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">GraphRAG search</span> <span class="block text-xs text-muted-foreground">Use graph expansion for related documents. Disable it for faster standard RAG search.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": searchPreferences.graphSearchEnabled })}${$.attr("aria-checked", searchPreferences.graphSearchEnabled)} aria-label="Use GraphRAG search"><span class="svelte-1eaqpj"></span></button></div> <!--[-->`);
|
|
844
|
+
const each_array_1 = $.ensure_array_like(profileActions());
|
|
845
|
+
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
846
|
+
const ProfileAction = each_array_1[$$index_1].component;
|
|
847
|
+
if (ProfileAction) {
|
|
848
|
+
$$renderer.push("<!--[-->");
|
|
849
|
+
ProfileAction($$renderer, {});
|
|
850
|
+
$$renderer.push("<!--]-->");
|
|
851
|
+
} else {
|
|
852
|
+
$$renderer.push("<!--[!-->");
|
|
853
|
+
$$renderer.push("<!--]-->");
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
$$renderer.push(`<!--]--> `);
|
|
843
857
|
$$renderer.push("<!--[-1-->");
|
|
844
858
|
$$renderer.push(`<!--]--> `);
|
|
845
859
|
Button($$renderer, {
|
|
@@ -972,9 +986,9 @@ function SettingsDialog($$renderer, $$props) {
|
|
|
972
986
|
$$slots: { default: true }
|
|
973
987
|
});
|
|
974
988
|
$$renderer.push(`<!----> <p class="text-xs text-muted-foreground">${$.escape(settings_appearance())}</p></div> <div class="grid grid-cols-3 gap-2"><!--[-->`);
|
|
975
|
-
const
|
|
976
|
-
for (let $$
|
|
977
|
-
let opt =
|
|
989
|
+
const each_array_2 = $.ensure_array_like(themeOptions);
|
|
990
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
991
|
+
let opt = each_array_2[$$index_2];
|
|
978
992
|
$$renderer.push(`<button type="button"${$.attr_class($.clsx(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", themeStore.value === opt.value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" ")), "svelte-1eaqpj")}>${$.escape(opt.label)}</button>`);
|
|
979
993
|
}
|
|
980
994
|
$$renderer.push(`<!--]--></div> <details class="editor-settings border-t pt-5 svelte-1eaqpj"><summary class="flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj"><span><span class="block text-sm font-medium">Editor modes</span> <span class="block text-xs text-muted-foreground">Source views and toolbar layout</span></span> <span class="editor-settings-chevron svelte-1eaqpj" aria-hidden="true">⌄</span></summary> <div class="mt-3 space-y-3"><div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">Visual editor</span> <span class="block text-xs text-muted-foreground">Show the standard WYSIWYG editor mode.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": editorPreferences.showVisualMode })}${$.attr("aria-checked", editorPreferences.showVisualMode)} aria-label="Show visual editor"${$.attr("disabled", !editorPreferences.showMarkdownMode, true)}><span class="svelte-1eaqpj"></span></button></div> <div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">Raw Markdown</span> <span class="block text-xs text-muted-foreground">Show the Markdown source button in documents.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": editorPreferences.showMarkdownMode })}${$.attr("aria-checked", editorPreferences.showMarkdownMode)} aria-label="Show Raw Markdown"${$.attr("disabled", !editorPreferences.showVisualMode, true)}><span class="svelte-1eaqpj"></span></button></div> <div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">Minimal toolbar</span> <span class="block text-xs text-muted-foreground">Bold, italic, underline, lists, highlight, and copy.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": editorPreferences.minimalToolbar })}${$.attr("aria-checked", editorPreferences.minimalToolbar)} aria-label="Use minimal toolbar"><span class="svelte-1eaqpj"></span></button></div> <div class="flex items-center justify-between gap-4 rounded-md border p-3"><span><span class="block text-sm font-medium">Scroll to top</span> <span class="block text-xs text-muted-foreground">Show the floating arrow after scrolling down.</span></span> <button type="button" role="switch"${$.attr_class("preference-switch svelte-1eaqpj", void 0, { "enabled": editorPreferences.showScrollToTop })}${$.attr("aria-checked", editorPreferences.showScrollToTop)} aria-label="Show scroll to top"><span class="svelte-1eaqpj"></span></button></div></div></details></div>`);
|
|
@@ -1003,9 +1017,9 @@ function SettingsDialog($$renderer, $$props) {
|
|
|
1003
1017
|
$$renderer.push("<!--]-->");
|
|
1004
1018
|
}
|
|
1005
1019
|
$$renderer.push(` <!--[-->`);
|
|
1006
|
-
const
|
|
1007
|
-
for (let $$
|
|
1008
|
-
let section =
|
|
1020
|
+
const each_array_3 = $.ensure_array_like(settingsExtensions());
|
|
1021
|
+
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
1022
|
+
let section = each_array_3[$$index_3];
|
|
1009
1023
|
if (Tabs_content) {
|
|
1010
1024
|
$$renderer.push("<!--[-->");
|
|
1011
1025
|
Tabs_content($$renderer, {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Bn as share_expires_7d, Gn as share_toggle_password, Hn as share_expires_1h, Jn as share_create_title, Kn as share_password_protection, Un as share_expires_never, Vn as share_expires_1d, Wn as share_expires, pn as action_close, qn as share_create_link, zn as share_expires_30d } from "./messages-BAQzILs4.js";
|
|
2
|
+
import { a as getDocsmintRequestAdapter } from "./route-context-BPRerEtZ.js";
|
|
3
|
+
import "./select-value-DBhbkNcc.js";
|
|
4
|
+
import "./keyboard.svelte-BgF47N3L.js";
|
|
5
|
+
import * as $ from "svelte/internal/server";
|
|
6
|
+
//#region src/lib/components/ShareDialog.svelte
|
|
7
|
+
function ShareDialog($$renderer, $$props) {
|
|
8
|
+
$$renderer.component(($$renderer) => {
|
|
9
|
+
let { open = false, documentId = "", documentTitle = "", folderId = "", folderName = "", categoryId = "", categoryName = "" } = $$props;
|
|
10
|
+
let usePassword = false;
|
|
11
|
+
let expiresIn = "7d";
|
|
12
|
+
getDocsmintRequestAdapter();
|
|
13
|
+
if (open) {
|
|
14
|
+
$$renderer.push("<!--[0-->");
|
|
15
|
+
$$renderer.push(`<div class="fixed inset-0 layer-modal z-[100] flex items-center justify-center"><button class="absolute inset-0 z-[100] bg-black/50"${$.attr("aria-label", action_close())}></button> <div class="relative z-[101] w-full max-w-md rounded-lg border border-border bg-background p-6 shadow-lg" role="dialog" aria-modal="true"><div class="mb-4 flex items-center justify-between"><h2 class="text-lg font-semibold">${$.escape(share_create_title())} "${$.escape(categoryName || folderName || documentTitle)}"</h2> <button class="rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-foreground"${$.attr("aria-label", action_close())}>✕</button></div> `);
|
|
16
|
+
{
|
|
17
|
+
$$renderer.push("<!--[0-->");
|
|
18
|
+
$$renderer.push(`<div class="space-y-4"><div class="grid grid-cols-2 gap-2 rounded-lg bg-muted p-1" aria-label="Share access mode"><button type="button"${$.attr_class(`rounded-md px-3 py-2 text-sm font-medium bg-background shadow-sm`)}>Public link</button> <button type="button"${$.attr_class(`rounded-md px-3 py-2 text-sm font-medium text-muted-foreground`)}>Specific people</button></div> <p class="rounded-md border border-border bg-muted/40 p-3 text-xs text-muted-foreground">${$.escape("Anyone with this link can view the document. The link may be forwarded.")}</p> <div class="flex items-center justify-between"><span class="text-sm font-medium">${$.escape(share_password_protection())}</span> <button${$.attr_class(`relative inline-flex h-5 w-9 items-center rounded-full transition-colors bg-input`)} role="switch"${$.attr("aria-checked", usePassword)}${$.attr("aria-label", share_toggle_password())}><span${$.attr_class(`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform translate-x-0.5`)}></span></button></div> `);
|
|
19
|
+
$$renderer.push("<!--[-1-->");
|
|
20
|
+
$$renderer.push(`<!--]--> <div class="space-y-2"><span class="text-sm font-medium">${$.escape(share_expires())}</span> <div class="flex gap-2"><!--[-->`);
|
|
21
|
+
const each_array = $.ensure_array_like([
|
|
22
|
+
["1h", share_expires_1h()],
|
|
23
|
+
["1d", share_expires_1d()],
|
|
24
|
+
["7d", share_expires_7d()],
|
|
25
|
+
["30d", share_expires_30d()],
|
|
26
|
+
["never", share_expires_never()]
|
|
27
|
+
]);
|
|
28
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
29
|
+
let [val, label] = each_array[$$index];
|
|
30
|
+
$$renderer.push(`<button${$.attr_class(`rounded-md border px-2.5 py-1 text-xs font-medium transition-colors ${expiresIn === val ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent"}`)}>${$.escape(label)}</button>`);
|
|
31
|
+
}
|
|
32
|
+
$$renderer.push(`<!--]--></div></div> `);
|
|
33
|
+
$$renderer.push("<!--[-1-->");
|
|
34
|
+
$$renderer.push(`<!--]--> `);
|
|
35
|
+
$$renderer.push("<!--[-1-->");
|
|
36
|
+
$$renderer.push(`<!--]--> <button${$.attr("disabled", usePassword, true)} class="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50">${$.escape(share_create_link())}</button></div>`);
|
|
37
|
+
}
|
|
38
|
+
$$renderer.push(`<!--]--></div></div>`);
|
|
39
|
+
} else $$renderer.push("<!--[-1-->");
|
|
40
|
+
$$renderer.push(`<!--]-->`);
|
|
41
|
+
$.bind_props($$props, { open });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { ShareDialog as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as search_title, Ar as doc_delete_success, C as categories_new, D as sidebar_powered_by, Dr as doc_share, Er as doc_delete, Ir as dashboard_new_document, Nr as doc_title_label, Or as doc_tags, Qn as search_placeholder, Rn as settings_title, Rr as dashboard_title, _n as action_cancel, _r as folders_rename, an as sidebar_folders, ar as tags_new, bn as error_generic, br as folders_new, bt as editor_more_options, dn as action_go_to, dr as folders_name_placeholder, er as tags_add, f as sidebar_uncategorized, fr as folders_delete_success_description, gn as action_delete, hn as action_edit, hr as folders_delete_title, jr as doc_delete_confirm, kr as doc_delete_success_description, nr as tags_delete_title, on as sidebar_recent, pr as folders_delete_success, tr as tags_delete_description, un as action_loading, vn as action_save, vt as tags_load_error, yt as action_copy_content } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./Icon-QwirKi9Y.js";
|
|
3
|
-
import { i as Check, n as Plus, r as File_text, t as FolderDialog } from "./confirm-dialog-
|
|
3
|
+
import { i as Check, n as Plus, r as File_text, t as FolderDialog } from "./confirm-dialog-XuyaL8sr.js";
|
|
4
4
|
import { t as Chevron_down } from "./chevron-down-CvqKATjM.js";
|
|
5
5
|
import { t as Chevron_right } from "./chevron-right-DKD7WXjz.js";
|
|
6
6
|
import { t as Clock } from "./clock-CzsE58TH.js";
|
|
7
7
|
import { t as Copy } from "./copy-DkkCPkBL.js";
|
|
8
8
|
import { t as Folder } from "./folder-DYIE-XPP.js";
|
|
9
|
-
import { t as SettingsDialog } from "./SettingsDialog-
|
|
9
|
+
import { t as SettingsDialog } from "./SettingsDialog-BPdUl6pd.js";
|
|
10
10
|
import { n as Search, t as Tag } from "./tag-BmiVU_Ej.js";
|
|
11
|
-
import { a as Dropdown_menu, i as Dropdown_menu_content, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu-
|
|
11
|
+
import { a as Dropdown_menu, i as Dropdown_menu_content, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./dropdown-menu-Dn_vQq9b.js";
|
|
12
12
|
import { t as Loader_circle } from "./loader-circle-CIEWGyfP.js";
|
|
13
13
|
import { a as getDocsmintRequestAdapter, i as resolveDocsmintRoute, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./route-context-BPRerEtZ.js";
|
|
14
14
|
import { t as cn } from "./utils-DvZnctjz.js";
|
|
@@ -17,21 +17,21 @@ import { t as Input } from "./input-DezGsU3y.js";
|
|
|
17
17
|
import { t as Label } from "./label-Bj8-TfFN.js";
|
|
18
18
|
import { n as apiFetch } from "./client-DZMkDkDn.js";
|
|
19
19
|
import { i as listCategories, r as deleteCategory } from "./categories-av9xjeg5.js";
|
|
20
|
-
import { t as getFrontendExtensions } from "./context-
|
|
20
|
+
import { t as getFrontendExtensions } from "./context-Bi_mO-NS.js";
|
|
21
21
|
import { t as resolveExtensions } from "./resolve-BqHozBXl.js";
|
|
22
22
|
import { n as SHADOW_ITEM_MARKER_PROPERTY_NAME } from "./dndzone-DMvTO_Jz.js";
|
|
23
23
|
import { c as updateDocument, r as deleteDocument, s as listDocuments, t as clearDocumentsCache } from "./documents-CZ-wQohy.js";
|
|
24
24
|
import { c as updateFolder, r as deleteFolder, s as listFolders, t as createFolder } from "./folders-BX30gHv6.js";
|
|
25
25
|
import { t as DeleteDialog } from "./DeleteDialog-DG9Lm38J.js";
|
|
26
|
-
import { t as ShareDialog } from "./ShareDialog-
|
|
27
|
-
import { t as CategoryDialog } from "./CategoryDialog-
|
|
26
|
+
import { t as ShareDialog } from "./ShareDialog-BZd28sg-.js";
|
|
27
|
+
import { t as CategoryDialog } from "./CategoryDialog-Cnlmr1sz.js";
|
|
28
28
|
import { n as createDocumentPlacementWriter, t as createDocumentDropCoordinator } from "./document-drop-coordinator-CEaYACsC.js";
|
|
29
|
-
import { a as getFolderFromRegistry, c as getPendingDocumentPlacement, f as registerDocument, n as bumpSubfoldersRefresh, p as registerFolder, r as getDocumentFromRegistry, t as acknowledgeDocumentPlacement, u as publishDocumentPlacement } from "./subfolders-refresh-store.svelte-DAh4gT16.js";
|
|
30
|
-
import { t as FolderNode } from "./FolderNode-
|
|
29
|
+
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-DAh4gT16.js";
|
|
30
|
+
import { t as FolderNode } from "./FolderNode-CnFVWuQi.js";
|
|
31
31
|
import { i as setSelectedTag, n as refreshDocs, r as refreshTags, t as getSelectedTag } from "./tag-store.svelte-BM1lUI_P.js";
|
|
32
32
|
import { t as ConfirmDialog } from "./ConfirmDialog-BhAelejz.js";
|
|
33
33
|
import { i as deleteTag, o as listTags } from "./tags-BQsI_6OW.js";
|
|
34
|
-
import { t as TagCreateDialog } from "./TagCreateDialog-
|
|
34
|
+
import { t as TagCreateDialog } from "./TagCreateDialog-DUPMitlL.js";
|
|
35
35
|
import * as $ from "svelte/internal/server";
|
|
36
36
|
import { onDestroy, onMount } from "svelte";
|
|
37
37
|
import { page } from "$app/state";
|
|
@@ -1044,7 +1044,7 @@ function FolderTree($$renderer, $$props) {
|
|
|
1044
1044
|
let $$settled = true;
|
|
1045
1045
|
let $$inner_renderer;
|
|
1046
1046
|
function $$render_inner($$renderer) {
|
|
1047
|
-
$$renderer.push(`<div class="space-y-1"><div class="mb-2 flex items-center justify-between gap-1"><a
|
|
1047
|
+
$$renderer.push(`<div class="space-y-1"><div class="mb-2 flex items-center justify-between gap-1"><a${$.attr("href", resolveDocsmintRoute(route, "/"))} class="block flex-1 px-2 text-xs font-medium uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground"${$.attr("title", dashboard_title())}>${$.escape(sidebar_folders())}</a> <button type="button" class="inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"${$.attr("aria-label", categories_new())}${$.attr("title", categories_new())}>`);
|
|
1048
1048
|
Plus($$renderer, { class: "size-3.5" });
|
|
1049
1049
|
$$renderer.push(`<!----></button></div> `);
|
|
1050
1050
|
if (loadError) {
|
|
@@ -1889,7 +1889,16 @@ function Sidebar($$renderer, $$props) {
|
|
|
1889
1889
|
let isResizing = false;
|
|
1890
1890
|
const frontendExtensions = getFrontendExtensions();
|
|
1891
1891
|
const sidebarTopExtensions = $.derived(() => resolveExtensions(frontendExtensions.sidebarTop, { pathname: page.url.pathname }));
|
|
1892
|
+
const sidebarFooterActions = $.derived(() => resolveExtensions(frontendExtensions.sidebarFooterActions, { pathname: page.url.pathname }));
|
|
1892
1893
|
const navigationExtensions = $.derived(() => resolveExtensions(frontendExtensions.navigation, { pathname: page.url.pathname }));
|
|
1894
|
+
onMount(() => {
|
|
1895
|
+
const refreshWorkspaceViews = () => {
|
|
1896
|
+
refreshFolders();
|
|
1897
|
+
refreshDocs();
|
|
1898
|
+
};
|
|
1899
|
+
window.addEventListener("hiai-docs:documents-updated", refreshWorkspaceViews);
|
|
1900
|
+
return () => window.removeEventListener("hiai-docs:documents-updated", refreshWorkspaceViews);
|
|
1901
|
+
});
|
|
1893
1902
|
let $$settled = true;
|
|
1894
1903
|
let $$inner_renderer;
|
|
1895
1904
|
function $$render_inner($$renderer) {
|
|
@@ -2020,14 +2029,40 @@ function Sidebar($$renderer, $$props) {
|
|
|
2020
2029
|
$$renderer.push(`<!--]--> <div class="border-t border-border p-2">`);
|
|
2021
2030
|
if (isCollapsed()) {
|
|
2022
2031
|
$$renderer.push("<!--[0-->");
|
|
2023
|
-
$$renderer.push(`<div class="flex flex-col items-center gap-2"
|
|
2032
|
+
$$renderer.push(`<div class="flex flex-col items-center gap-2"><!--[-->`);
|
|
2033
|
+
const each_array_4 = $.ensure_array_like(sidebarFooterActions());
|
|
2034
|
+
for (let $$index_4 = 0, $$length = each_array_4.length; $$index_4 < $$length; $$index_4++) {
|
|
2035
|
+
const FooterAction = each_array_4[$$index_4].component;
|
|
2036
|
+
if (FooterAction) {
|
|
2037
|
+
$$renderer.push("<!--[-->");
|
|
2038
|
+
FooterAction($$renderer, { collapsed: true });
|
|
2039
|
+
$$renderer.push("<!--]-->");
|
|
2040
|
+
} else {
|
|
2041
|
+
$$renderer.push("<!--[!-->");
|
|
2042
|
+
$$renderer.push("<!--]-->");
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
$$renderer.push(`<!--]--> <button type="button" class="flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"${$.attr("title", settings_title())}${$.attr("aria-label", settings_title())}>`);
|
|
2024
2046
|
Settings($$renderer, { class: "size-4" });
|
|
2025
2047
|
$$renderer.push(`<!----></button> <a href="https://docsmint.com" target="_blank" rel="noopener noreferrer" class="flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"${$.attr("title", sidebar_powered_by())}${$.attr("aria-label", sidebar_powered_by())}><img src="/favicon.ico" alt="DocsMint" class="size-5 object-contain dark:hidden"/> <img src="/favicon_white.ico" alt="" aria-hidden="true" class="hidden size-5 object-contain dark:block"/></a></div>`);
|
|
2026
2048
|
} else {
|
|
2027
2049
|
$$renderer.push("<!--[-1-->");
|
|
2028
|
-
$$renderer.push(`<div class="flex items-center justify-between"><a href="https://docsmint.com" target="_blank" rel="noopener noreferrer" class="text-xs text-muted-foreground hover:text-foreground transition-colors"${$.attr("title", sidebar_powered_by())}>${$.escape(sidebar_powered_by())}</a> <
|
|
2050
|
+
$$renderer.push(`<div class="flex items-center justify-between"><a href="https://docsmint.com" target="_blank" rel="noopener noreferrer" class="text-xs text-muted-foreground hover:text-foreground transition-colors"${$.attr("title", sidebar_powered_by())}>${$.escape(sidebar_powered_by())}</a> <div class="flex items-center gap-1"><!--[-->`);
|
|
2051
|
+
const each_array_5 = $.ensure_array_like(sidebarFooterActions());
|
|
2052
|
+
for (let $$index_5 = 0, $$length = each_array_5.length; $$index_5 < $$length; $$index_5++) {
|
|
2053
|
+
const FooterAction = each_array_5[$$index_5].component;
|
|
2054
|
+
if (FooterAction) {
|
|
2055
|
+
$$renderer.push("<!--[-->");
|
|
2056
|
+
FooterAction($$renderer, { collapsed: false });
|
|
2057
|
+
$$renderer.push("<!--]-->");
|
|
2058
|
+
} else {
|
|
2059
|
+
$$renderer.push("<!--[!-->");
|
|
2060
|
+
$$renderer.push("<!--]-->");
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
$$renderer.push(`<!--]--> <button type="button" class="flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"${$.attr("title", settings_title())}${$.attr("aria-label", settings_title())}>`);
|
|
2029
2064
|
Settings($$renderer, { class: "size-4" });
|
|
2030
|
-
$$renderer.push(`<!----></button></div>`);
|
|
2065
|
+
$$renderer.push(`<!----></button></div></div>`);
|
|
2031
2066
|
}
|
|
2032
2067
|
$$renderer.push(`<!--]--></div></aside> `);
|
|
2033
2068
|
SettingsDialog($$renderer, {
|
package/dist/frontend-ssr/assets/{TagCreateDialog-B7wDbVqG.js → TagCreateDialog-DUPMitlL.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _n as action_cancel, ar as
|
|
1
|
+
import { _n as action_cancel, ar as tags_new, bn as error_generic, ir as tags_edit, mn as action_create, rr as tags_name_placeholder, un as action_loading, vn as action_save } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Loader_circle } from "./loader-circle-CIEWGyfP.js";
|
|
3
3
|
import { a as getDocsmintRequestAdapter } from "./route-context-BPRerEtZ.js";
|
|
4
4
|
import { t as cn } from "./utils-DvZnctjz.js";
|
|
@@ -29,14 +29,15 @@ function presignAttachment(documentId, file, fetcher) {
|
|
|
29
29
|
* already been PUT to storage. The backend verifies the object exists
|
|
30
30
|
* before inserting.
|
|
31
31
|
*/
|
|
32
|
-
function confirmAttachment(documentId, key, file, fetcher) {
|
|
32
|
+
function confirmAttachment(documentId, key, file, quotaReservationId, fetcher) {
|
|
33
33
|
return apiFetch(`/api/documents/${documentId}/attachments/confirm`, {
|
|
34
34
|
method: "POST",
|
|
35
35
|
body: {
|
|
36
36
|
key,
|
|
37
37
|
filename: file.name,
|
|
38
38
|
contentType: file.type,
|
|
39
|
-
size: file.size
|
|
39
|
+
size: file.size,
|
|
40
|
+
...quotaReservationId ? { quotaReservationId } : {}
|
|
40
41
|
}
|
|
41
42
|
}, fetcher);
|
|
42
43
|
}
|
|
@@ -66,11 +67,17 @@ async function uploadAttachment(documentId, file, fetcher) {
|
|
|
66
67
|
headers: { "Content-Type": file.type },
|
|
67
68
|
signal: putController.signal
|
|
68
69
|
});
|
|
70
|
+
} catch (error) {
|
|
71
|
+
await confirmAttachment(documentId, presign.key, file, presign.quotaReservationId, fetcher).catch(() => void 0);
|
|
72
|
+
throw error;
|
|
69
73
|
} finally {
|
|
70
74
|
clearTimeout(putTimeout);
|
|
71
75
|
}
|
|
72
|
-
if (!putResponse.ok)
|
|
73
|
-
|
|
76
|
+
if (!putResponse.ok) {
|
|
77
|
+
await confirmAttachment(documentId, presign.key, file, presign.quotaReservationId, fetcher).catch(() => void 0);
|
|
78
|
+
throw new Error(`Storage upload failed: ${putResponse.status} ${putResponse.statusText}`);
|
|
79
|
+
}
|
|
80
|
+
return confirmAttachment(documentId, presign.key, file, presign.quotaReservationId, fetcher);
|
|
74
81
|
}
|
|
75
82
|
function listAttachments(documentId, fetcher) {
|
|
76
83
|
return apiFetch(`/api/documents/${documentId}/attachments`, {}, fetcher);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as doc_new_folder_name,
|
|
1
|
+
import { O as doc_new_folder_name, _n as action_cancel, _r as folders_rename, bn as error_generic, br as folders_new, mn as action_create, vn as action_save } from "./messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./Icon-QwirKi9Y.js";
|
|
3
3
|
import { t as Circle_check } from "./circle-check-CPS9dKEo.js";
|
|
4
4
|
import { t as Loader_circle } from "./loader-circle-CIEWGyfP.js";
|
|
@@ -9,6 +9,7 @@ import { createContext } from "svelte";
|
|
|
9
9
|
function createFrontendExtensions(initial = {}) {
|
|
10
10
|
return {
|
|
11
11
|
sidebarTop: [...initial.sidebarTop ?? []],
|
|
12
|
+
sidebarFooterActions: [...initial.sidebarFooterActions ?? []],
|
|
12
13
|
navigation: [...initial.navigation ?? []],
|
|
13
14
|
dashboardWidgets: [...initial.dashboardWidgets ?? []],
|
|
14
15
|
searchWidgets: [...initial.searchWidgets ?? []],
|
|
@@ -16,6 +17,7 @@ function createFrontendExtensions(initial = {}) {
|
|
|
16
17
|
editorActions: [...initial.editorActions ?? []],
|
|
17
18
|
documentMenuActions: [...initial.documentMenuActions ?? []],
|
|
18
19
|
settingsSections: [...initial.settingsSections ?? []],
|
|
20
|
+
profileActions: [...initial.profileActions ?? []],
|
|
19
21
|
commandPaletteActions: [...initial.commandPaletteActions ?? []],
|
|
20
22
|
sharedDocumentHeaderActions: [...initial.sharedDocumentHeaderActions ?? []],
|
|
21
23
|
sharedDocumentTabs: [...initial.sharedDocumentTabs ?? []],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Icon } from "./Icon-QwirKi9Y.js";
|
|
2
2
|
import { t as cn } from "./utils-DtlPPXpJ.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Q as mergeProps, a as Floating_layer, c as MenuContentState, d as MenuMenuState, et as boxWith, f as MenuRootState, i as createId, n as Popper_layer_force_mount, o as getFloatingContentCSSVars, p as MenuSeparatorState, r as Popper_layer, s as DropdownMenuTriggerState, t as Floating_layer_anchor, u as MenuItemState, v as noop } from "./floating-layer-anchor-BIAu-252.js";
|
|
4
4
|
import * as $ from "svelte/internal/server";
|
|
5
5
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/ellipsis-vertical.svelte
|
|
6
6
|
function Ellipsis_vertical($$renderer, $$props) {
|
|
@@ -6111,4 +6111,4 @@ function Floating_layer_anchor($$renderer, $$props) {
|
|
|
6111
6111
|
});
|
|
6112
6112
|
}
|
|
6113
6113
|
//#endregion
|
|
6114
|
-
export {
|
|
6114
|
+
export { styleToString as $, isBrowser as A, HOME as B, prev as C, createBitsAttrs as D, boolToTrueOrUndef as E, ARROW_UP as F, Previous as G, PAGE_DOWN as H, CAPS_LOCK as I, attachRef as J, watch as K, CONTROL as L, ARROW_DOWN as M, ARROW_LEFT as N, getDataOpenClosed as O, ARROW_RIGHT as P, mergeProps as Q, ENTER as R, next as S, boolToStr as T, PAGE_UP as U, META as V, SHIFT as W, afterTick as X, DOMContext as Y, onDestroyEffect as Z, boxAutoReset as _, Floating_layer as a, forward as b, MenuContentState as c, MenuMenuState as d, boxWith as et, MenuRootState as f, DOMTypeahead as g, PresenceManager as h, createId as i, isIOS as j, getDataTransitionAttrs as k, MenuGroupState as l, MenuSubmenuState as m, Popper_layer_force_mount as n, getFloatingContentCSSVars as o, MenuSeparatorState as p, Context as q, Popper_layer as r, DropdownMenuTriggerState as s, Floating_layer_anchor as t, MenuItemState as u, noop as v, boolToEmptyStrOrUndef as w, getNextMatch as x, backward as y, ESCAPE as z };
|
|
@@ -11144,4 +11144,4 @@ var messages_exports = /* @__PURE__ */ __exportAll({
|
|
|
11144
11144
|
weekday_we: () => weekday_we
|
|
11145
11145
|
});
|
|
11146
11146
|
//#endregion
|
|
11147
|
-
export { month_august as $,
|
|
11147
|
+
export { month_august as $, search_title as $n, editor_toolbar_list as $t, editor_highlight_gray as A, settings_email as An, doc_delete_success as Ar, version_snapshot_description_placeholder as At, date_picker_aria as B, share_expires_7d as Bn, app_name as Br, editor_markdown_placeholder as Bt, categories_new as C, change_password as Cn, doc_open as Cr, version_badge_snapshot as Ct, sidebar_powered_by as D, settings_save as Dn, doc_share as Dr, version_snapshot_dialog_title as Dt, scroll_to_top_aria as E, password_label as En, doc_delete as Er, version_snapshot_dialog_description as Et, editor_highlight_red as F, settings_appearance as Fn, dashboard_page_title as Fr, version_restore_confirm as Ft, weekday_th as G, share_toggle_password as Gn, editor_toolbar_emoji as Gt, weekday_su as H, share_expires_1h as Hn, setLocale as Hr, editor_enter_url as Ht, editor_highlight_orange as I, settings_account as In, dashboard_new_document as Ir, version_restore_short as It, weekday_mo as J, share_create_title as Jn, editor_toolbar_redo as Jt, weekday_we as K, share_password_protection as Kn, editor_toolbar_text_formatting as Kt, editor_highlight_yellow as L, settings_profile as Ln, dashboard_subtitle as Lr, version_restore as Lt, editor_highlight_purple as M, theme_dark as Mn, doc_content_placeholder as Mr, version_snapshot_description as Mt, editor_highlight_blue as N, theme_light as Nn, doc_title_label as Nr, version_snapshot_label as Nt, doc_new_folder_name as O, settings_name as On, doc_tags as Or, version_snapshot_creating as Ot, editor_highlight_green as P, settings_theme as Pn, doc_title_placeholder as Pr, version_create_snapshot as Pt, month_september as Q, search_placeholder as Qn, editor_toolbar_heading as Qt, editor_anonymous as R, settings_title as Rn, dashboard_title as Rr, version_history_title as Rt, categories_create_title as S, auth_password as Sn, doc_duplicate as Sr, version_restored_from as St, version_history_empty as T, new_password as Tn, doc_updated as Tr, version_filter_all as Tt, weekday_sa as U, share_expires_never as Un, editor_toolbar_copy as Ut, date_picker_placeholder as V, share_expires_1d as Vn, locales as Vr, editor_content_label as Vt, weekday_fr as W, share_expires as Wn, editor_toolbar_align as Wt, month_november as X, search_date_from as Xn, editor_toolbar_horizontal_rule as Xt, month_december as Y, search_date_to as Yn, editor_toolbar_undo as Yt, month_october as Z, search_tags as Zn, editor_toolbar_code_block as Zt, categories_delete_error as _, action_cancel as _n, folders_rename as _r, folder_page_title as _t, import_progress_error as a, sidebar_folders as an, tags_new as ar, month_february as at, categories_name_placeholder as b, error_generic as bn, folders_new as br, editor_more_options as bt, import_progress_queued as c, time_hours_ago as cn, folders_subfolders as cr, search_empty_description as ct, import_progress_title as d, action_go_to as dn, folders_name_placeholder as dr, search_folders as dt, editor_toolbar_image as en, tags_add as er, month_july as et, sidebar_uncategorized as f, action_back as fn, folders_delete_success_description as fr, search_clear_all_filters as ft, categories_delete_title as g, action_delete as gn, folders_delete as gr, share_copied as gt, categories_delete_description as h, action_edit as hn, folders_delete_title as hr, search_title_with_query as ht, import_progress_summary as i, editor_toolbar_bold as in, tags_edit as ir, month_march as it, editor_highlight_pink as j, theme_system as jn, doc_delete_confirm as jr, version_snapshot_label_placeholder as jt, dashboard_import as k, settings_email_change_warning as kn, doc_delete_success_description as kr, version_snapshot_create as kt, import_progress_uploading as l, time_minutes_ago as ln, folders_document as lr, search_empty_title as lt, categories_delete_success as m, action_create as mn, folders_delete_description as mr, search_input_placeholder as mt, import_progress_empty as n, editor_toolbar_underline as nn, tags_delete_title as nr, month_may as nt, import_progress_done as o, sidebar_recent as on, folders_move as or, month_january as ot, categories_delete_success_description as p, action_close as pn, folders_delete_success as pr, search_toggle_filters as pt, weekday_tu as q, share_create_link as qn, editor_toolbar_highlight as qt, import_progress_close as r, editor_toolbar_italic as rn, tags_name_placeholder as rr, month_april as rt, import_progress_processing as s, time_days_ago as sn, folders_subfolder as sr, search_popular as st, messages_exports as t, editor_toolbar_link as tn, tags_delete_description as tr, month_june as tt, import_progress_total as u, action_loading as un, folders_documents as ur, search_date_range as ut, categories_update_error as v, action_save as vn, folders_empty_description as vr, tags_load_error as vt, categories_title as w, confirm_password as wn, doc_open_menu as wr, version_filter_snapshots as wt, categories_edit_title as x, auth_logout as xn, doc_move_to_folder as xr, version_restore_failed as xt, categories_create_error as y, error_server as yn, folders_empty as yr, action_copy_content as yt, error_validation as z, share_expires_30d as zn, nav_documents as zr, editor_markdown_label as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cn } from "./utils-DtlPPXpJ.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as styleToString, B as HOME, C as prev, D as createBitsAttrs, E as boolToTrueOrUndef, F as ARROW_UP, G as Previous, H as PAGE_DOWN, J as attachRef, K as watch, M as ARROW_DOWN, O as getDataOpenClosed, Q as mergeProps, S as next, T as boolToStr, U as PAGE_UP, X as afterTick, Y as DOMContext, _ as boxAutoReset, a as Floating_layer, b as forward, et as boxWith, g as DOMTypeahead, h as PresenceManager, i as createId, j as isIOS, k as getDataTransitionAttrs, n as Popper_layer_force_mount, o as getFloatingContentCSSVars, q as Context, r as Popper_layer, t as Floating_layer_anchor, v as noop, w as boolToEmptyStrOrUndef, x as getNextMatch, y as backward } from "./floating-layer-anchor-BIAu-252.js";
|
|
3
3
|
import * as $ from "svelte/internal/server";
|
|
4
4
|
import "svelte";
|
|
5
5
|
import { on } from "svelte/events";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CategoryDialog } from "../assets/CategoryDialog-
|
|
1
|
+
import { t as CategoryDialog } from "../assets/CategoryDialog-Cnlmr1sz.js";
|
|
2
2
|
export { CategoryDialog };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-
|
|
1
|
+
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-b6O0nUVp.js";
|
|
2
2
|
export { CreateSnapshotDialog };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as editor_toolbar_list, A as editor_highlight_gray, F as editor_highlight_red, Gt as editor_toolbar_emoji, Ht as editor_enter_url, I as editor_highlight_orange, Jt as editor_toolbar_redo, Kt as editor_toolbar_text_formatting, L as editor_highlight_yellow, M as editor_highlight_purple,
|
|
1
|
+
import { $t as editor_toolbar_list, A as editor_highlight_gray, F as editor_highlight_red, Gt as editor_toolbar_emoji, Ht as editor_enter_url, I as editor_highlight_orange, Jt as editor_toolbar_redo, Kt as editor_toolbar_text_formatting, L as editor_highlight_yellow, M as editor_highlight_purple, Mr as doc_content_placeholder, N as editor_highlight_blue, P as editor_highlight_green, Pt as version_create_snapshot, Qt as editor_toolbar_heading, R as editor_anonymous, Ut as editor_toolbar_copy, Vt as editor_content_label, Wt as editor_toolbar_align, Xt as editor_toolbar_horizontal_rule, Yt as editor_toolbar_undo, Zt as editor_toolbar_code_block, _n as action_cancel, en as editor_toolbar_image, in as editor_toolbar_bold, j as editor_highlight_pink, nn as editor_toolbar_underline, qt as editor_toolbar_highlight, rn as editor_toolbar_italic, tn as editor_toolbar_link, vn as action_save } from "../../assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "../../assets/Icon-QwirKi9Y.js";
|
|
3
3
|
import { t as Camera } from "../../assets/camera-D6s20LDi.js";
|
|
4
4
|
import { t as Chevron_down } from "../../assets/chevron-down-CvqKATjM.js";
|
|
@@ -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-b6O0nUVp.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";
|
|
@@ -2263,6 +2263,39 @@ function HiAiEditor($$renderer, $$props) {
|
|
|
2263
2263
|
let editor = null;
|
|
2264
2264
|
let ready = false;
|
|
2265
2265
|
let deferredContentLoading = false;
|
|
2266
|
+
let deferredParseKey = "";
|
|
2267
|
+
let deferredParseGeneration = 0;
|
|
2268
|
+
function scheduleDeferredMarkdownParse(ed) {
|
|
2269
|
+
if (collaboration?.doc || contentJson || !shouldDeferMarkdownParsing(content)) return;
|
|
2270
|
+
const source = content;
|
|
2271
|
+
const cacheDocumentId = documentId;
|
|
2272
|
+
const cacheUpdatedAt = documentUpdatedAt;
|
|
2273
|
+
const parseKey = `${cacheDocumentId}:${cacheUpdatedAt}:${source.length}:${source.slice(0, 64)}`;
|
|
2274
|
+
if (deferredParseKey === parseKey) return;
|
|
2275
|
+
deferredParseKey = parseKey;
|
|
2276
|
+
const generation = ++deferredParseGeneration;
|
|
2277
|
+
deferredContentLoading = true;
|
|
2278
|
+
const parse = async () => {
|
|
2279
|
+
try {
|
|
2280
|
+
const cached = cacheDocumentId && cacheUpdatedAt ? await getCachedParsedContent(cacheDocumentId, cacheUpdatedAt) : null;
|
|
2281
|
+
if (generation !== deferredParseGeneration || editor !== ed) return;
|
|
2282
|
+
const parsed = cached ?? sanitizeEditorContent(markdownToJson(source));
|
|
2283
|
+
ed.commands.setContent(parsed, { emitUpdate: false });
|
|
2284
|
+
onUpdate({
|
|
2285
|
+
markdown: source,
|
|
2286
|
+
json: parsed
|
|
2287
|
+
});
|
|
2288
|
+
if (!cached && cacheDocumentId && cacheUpdatedAt) cacheParsedContent(cacheDocumentId, cacheUpdatedAt, parsed);
|
|
2289
|
+
} catch (err) {
|
|
2290
|
+
if (generation === deferredParseGeneration) console.warn("HiAiEditor: deferred markdown parsing failed", err);
|
|
2291
|
+
} finally {
|
|
2292
|
+
if (generation === deferredParseGeneration) deferredContentLoading = false;
|
|
2293
|
+
}
|
|
2294
|
+
};
|
|
2295
|
+
requestAnimationFrame(() => {
|
|
2296
|
+
setTimeout(() => void parse(), 0);
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2266
2299
|
/**
|
|
2267
2300
|
* Resolve the initial editor content. Prefer the persisted ProseMirror JSON
|
|
2268
2301
|
* when it is present. When it is missing but the markdown source is
|
|
@@ -2333,31 +2366,11 @@ function HiAiEditor($$renderer, $$props) {
|
|
|
2333
2366
|
const unsubscribe = editorStore.subscribe((ed) => {
|
|
2334
2367
|
editor = ed;
|
|
2335
2368
|
if (ed && !ready) ready = true;
|
|
2369
|
+
if (ed) scheduleDeferredMarkdownParse(ed);
|
|
2336
2370
|
});
|
|
2337
2371
|
if (!collaboration?.doc && contentJson) removeUnavailableAttachmentImages(contentJson).then(({ content: clean }) => {
|
|
2338
2372
|
if (editor && clean && JSON.stringify(editor.getJSON()) !== JSON.stringify(clean)) editor.commands.setContent(clean, { emitUpdate: false });
|
|
2339
2373
|
});
|
|
2340
|
-
if (!collaboration?.doc && !contentJson && shouldDeferMarkdownParsing(content)) {
|
|
2341
|
-
const parse = async () => {
|
|
2342
|
-
if (!editor) {
|
|
2343
|
-
deferredContentLoading = false;
|
|
2344
|
-
return;
|
|
2345
|
-
}
|
|
2346
|
-
try {
|
|
2347
|
-
const cached = documentId && documentUpdatedAt ? await getCachedParsedContent(documentId, documentUpdatedAt) : null;
|
|
2348
|
-
if (!editor) return;
|
|
2349
|
-
const parsed = cached ?? sanitizeEditorContent(markdownToJson(content));
|
|
2350
|
-
editor.commands.setContent(parsed, { emitUpdate: false });
|
|
2351
|
-
if (!cached && documentId && documentUpdatedAt) cacheParsedContent(documentId, documentUpdatedAt, parsed);
|
|
2352
|
-
} catch (err) {
|
|
2353
|
-
console.warn("HiAiEditor: deferred markdown parsing failed", err);
|
|
2354
|
-
} finally {
|
|
2355
|
-
deferredContentLoading = false;
|
|
2356
|
-
}
|
|
2357
|
-
};
|
|
2358
|
-
if ("requestIdleCallback" in window) window.requestIdleCallback(() => void parse(), { timeout: 250 });
|
|
2359
|
-
else setTimeout(() => void parse(), 0);
|
|
2360
|
-
}
|
|
2361
2374
|
registerShortcut({
|
|
2362
2375
|
id: "editor-toggle-markdown",
|
|
2363
2376
|
keys: "mod+shift+7",
|
|
@@ -2383,6 +2396,7 @@ function HiAiEditor($$renderer, $$props) {
|
|
|
2383
2396
|
};
|
|
2384
2397
|
});
|
|
2385
2398
|
onDestroy(() => {
|
|
2399
|
+
deferredParseGeneration += 1;
|
|
2386
2400
|
editor?.destroy?.();
|
|
2387
2401
|
});
|
|
2388
2402
|
$$renderer.push(`<div class="editor-wrapper svelte-9hjz5q" role="presentation">`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nr as doc_title_label, Pr as doc_title_placeholder } from "../../assets/messages-BAQzILs4.js";
|
|
2
2
|
import * as $ from "svelte/internal/server";
|
|
3
3
|
//#region src/lib/components/editor/DocumentTitle.svelte
|
|
4
4
|
function DocumentTitle($$renderer, $$props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as editor_markdown_placeholder, zt as editor_markdown_label } from "../../assets/messages-
|
|
1
|
+
import { Bt as editor_markdown_placeholder, zt as editor_markdown_label } from "../../assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Copy } from "../../assets/copy-DkkCPkBL.js";
|
|
3
3
|
import "../../assets/markdown-CjqvGi5W.js";
|
|
4
4
|
import * as $ from "svelte/internal/server";
|