@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 { t as FolderNode } from "../assets/FolderNode-
|
|
1
|
+
import { t as FolderNode } from "../assets/FolderNode-CnFVWuQi.js";
|
|
2
2
|
export { FolderNode };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _n as action_cancel, vn as action_save } from "../assets/messages-
|
|
1
|
+
import { _n as action_cancel, vn as action_save } from "../assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Chevron_down } from "../assets/chevron-down-CvqKATjM.js";
|
|
3
3
|
import { t as FolderTreeSelector } from "../assets/FolderTreeSelector-Bxi8EqMm.js";
|
|
4
4
|
import { t as Loader_circle } from "../assets/loader-circle-CIEWGyfP.js";
|
|
@@ -6,7 +6,7 @@ import { a as getDocsmintRequestAdapter } from "../assets/route-context-BPRerEtZ
|
|
|
6
6
|
import { a as Dialog, i as Dialog_description, n as Dialog_header, o as Button, r as Dialog_footer, t as Dialog_title } from "../assets/dialog-BOV1u6zP.js";
|
|
7
7
|
import { t as Label } from "../assets/label-Bj8-TfFN.js";
|
|
8
8
|
import "../assets/categories-av9xjeg5.js";
|
|
9
|
-
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "../assets/select-value-
|
|
9
|
+
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "../assets/select-value-DBhbkNcc.js";
|
|
10
10
|
import { d as refreshFolders } from "../assets/subfolders-refresh-store.svelte-DAh4gT16.js";
|
|
11
11
|
import * as $ from "svelte/internal/server";
|
|
12
12
|
//#region src/lib/components/SaveAsDialog.svelte
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SettingsDialog } from "../assets/SettingsDialog-
|
|
1
|
+
import { t as SettingsDialog } from "../assets/SettingsDialog-BPdUl6pd.js";
|
|
2
2
|
export { SettingsDialog };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ShareDialog } from "../assets/ShareDialog-
|
|
1
|
+
import { t as ShareDialog } from "../assets/ShareDialog-BZd28sg-.js";
|
|
2
2
|
export { ShareDialog };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Sidebar } from "../assets/Sidebar-
|
|
1
|
+
import { t as Sidebar } from "../assets/Sidebar-DwYZH0Tr.js";
|
|
2
2
|
export { Sidebar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TagCreateDialog } from "../assets/TagCreateDialog-
|
|
1
|
+
import { t as TagCreateDialog } from "../assets/TagCreateDialog-DUPMitlL.js";
|
|
2
2
|
export { TagCreateDialog };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as version_badge_snapshot, Ft as version_restore_confirm, It as version_restore_short, Lt as version_restore, Pt as version_create_snapshot, Rt as version_history_title, St as version_restored_from, T as version_history_empty, Tt as version_filter_all, _n as action_cancel, bn as error_generic, cn as time_hours_ago, ln as time_minutes_ago, sn as time_days_ago, un as action_loading, wt as version_filter_snapshots, xt as version_restore_failed } from "../assets/messages-
|
|
1
|
+
import { Ct as version_badge_snapshot, Ft as version_restore_confirm, It as version_restore_short, Lt as version_restore, Pt as version_create_snapshot, Rt as version_history_title, St as version_restored_from, T as version_history_empty, Tt as version_filter_all, _n as action_cancel, bn as error_generic, cn as time_hours_ago, ln as time_minutes_ago, sn as time_days_ago, un as action_loading, wt as version_filter_snapshots, xt as version_restore_failed } 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 Clock } from "../assets/clock-CzsE58TH.js";
|
|
@@ -7,7 +7,7 @@ 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
8
|
import { n as apiFetch, t as ApiError } from "../assets/client-DZMkDkDn.js";
|
|
9
9
|
import { t as ConfirmDialog } from "../assets/ConfirmDialog-BhAelejz.js";
|
|
10
|
-
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-
|
|
10
|
+
import { t as CreateSnapshotDialog } from "../assets/CreateSnapshotDialog-b6O0nUVp.js";
|
|
11
11
|
import * as $ from "svelte/internal/server";
|
|
12
12
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/history.svelte
|
|
13
13
|
function History($$renderer, $$props) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
2
2
|
import { t as Icon } from "./assets/Icon-QwirKi9Y.js";
|
|
3
|
-
import { i as Folder_kanban, n as Badge, r as X, t as DatePicker } from "./assets/DatePicker-
|
|
4
|
-
import { i as Check, n as Plus, r as File_text, t as FolderDialog } from "./assets/confirm-dialog-
|
|
3
|
+
import { i as Folder_kanban, n as Badge, r as X, t as DatePicker } from "./assets/DatePicker-D84cJ-Eq.js";
|
|
4
|
+
import { i as Check, n as Plus, r as File_text, t as FolderDialog } from "./assets/confirm-dialog-XuyaL8sr.js";
|
|
5
5
|
import { t as Chevron_down } from "./assets/chevron-down-CvqKATjM.js";
|
|
6
6
|
import { t as Chevron_right } from "./assets/chevron-right-DKD7WXjz.js";
|
|
7
7
|
import { t as Copy } from "./assets/copy-DkkCPkBL.js";
|
|
8
8
|
import { n as Folder_open, t as FolderTreeSelector } from "./assets/FolderTreeSelector-Bxi8EqMm.js";
|
|
9
9
|
import { t as Folder } from "./assets/folder-DYIE-XPP.js";
|
|
10
10
|
import { t as Rotate_ccw } from "./assets/rotate-ccw-dJSqPyTd.js";
|
|
11
|
-
import { a as Dropdown_menu, i as Dropdown_menu_content, n as Dropdown_menu_separator, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./assets/dropdown-menu-
|
|
11
|
+
import { a as Dropdown_menu, i as Dropdown_menu_content, n as Dropdown_menu_separator, o as Ellipsis_vertical, r as Dropdown_menu_item, t as Dropdown_menu_trigger } from "./assets/dropdown-menu-Dn_vQq9b.js";
|
|
12
12
|
import { t as Loader_circle } from "./assets/loader-circle-CIEWGyfP.js";
|
|
13
13
|
import { a as getDocsmintRequestAdapter, i as resolveDocsmintRoute, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
14
14
|
import { n as formatRelativeTime } from "./assets/utils-DvZnctjz.js";
|
|
@@ -17,17 +17,19 @@ import { a as Dialog, i as Dialog_description, n as Dialog_header, o as Button,
|
|
|
17
17
|
import { t as Label } from "./assets/label-Bj8-TfFN.js";
|
|
18
18
|
import { n as apiFetch } from "./assets/client-DZMkDkDn.js";
|
|
19
19
|
import "./assets/categories-av9xjeg5.js";
|
|
20
|
-
import { t as getFrontendExtensions } from "./assets/context-
|
|
20
|
+
import { t as getFrontendExtensions } from "./assets/context-Bi_mO-NS.js";
|
|
21
21
|
import { t as resolveExtensions } from "./assets/resolve-BqHozBXl.js";
|
|
22
|
-
import {
|
|
22
|
+
import { A as isBrowser, K as watch, et as boxWith, q as Context } from "./assets/floating-layer-anchor-BIAu-252.js";
|
|
23
|
+
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "./assets/select-value-DBhbkNcc.js";
|
|
23
24
|
import { c as updateDocument, i as getDocument } from "./assets/documents-CZ-wQohy.js";
|
|
24
25
|
import { c as updateFolder, i as duplicateDocument } from "./assets/folders-BX30gHv6.js";
|
|
25
26
|
import { t as copyToClipboard } from "./assets/clipboard-CXOaoz2W.js";
|
|
26
|
-
import { t as ShareDialog } from "./assets/ShareDialog-
|
|
27
|
+
import { t as ShareDialog } from "./assets/ShareDialog-BZd28sg-.js";
|
|
27
28
|
import { d as refreshFolders, n as bumpSubfoldersRefresh } from "./assets/subfolders-refresh-store.svelte-DAh4gT16.js";
|
|
28
29
|
import { n as refreshDocs } from "./assets/tag-store.svelte-BM1lUI_P.js";
|
|
29
30
|
import { t as ConfirmDialog } from "./assets/ConfirmDialog-BhAelejz.js";
|
|
30
31
|
import * as $ from "svelte/internal/server";
|
|
32
|
+
import { getAllContexts, mount, unmount } from "svelte";
|
|
31
33
|
import { page } from "$app/state";
|
|
32
34
|
import { invalidateAll } from "$app/navigation";
|
|
33
35
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/arrow-left.svelte
|
|
@@ -843,6 +845,152 @@ function Circle_x($$renderer, $$props) {
|
|
|
843
845
|
]));
|
|
844
846
|
}
|
|
845
847
|
//#endregion
|
|
848
|
+
//#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/portal/portal-consumer.svelte
|
|
849
|
+
function Portal_consumer($$renderer, $$props) {
|
|
850
|
+
const { children } = $$props;
|
|
851
|
+
$$renderer.push(`<!---->`);
|
|
852
|
+
children?.($$renderer);
|
|
853
|
+
$$renderer.push(`<!---->`);
|
|
854
|
+
$$renderer.push(`<!---->`);
|
|
855
|
+
}
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/config/bits-config.js
|
|
858
|
+
var BitsConfigContext = new Context("BitsConfig");
|
|
859
|
+
/**
|
|
860
|
+
* Gets the current Bits UI configuration state from the context.
|
|
861
|
+
*
|
|
862
|
+
* Returns a default configuration (where all values are `undefined`) if no configuration is found.
|
|
863
|
+
*/
|
|
864
|
+
function getBitsConfig() {
|
|
865
|
+
const fallback = new BitsConfigState(null, {});
|
|
866
|
+
return BitsConfigContext.getOr(fallback).opts;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Configuration state that inherits from parent configurations.
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* Config resolution:
|
|
873
|
+
* ```
|
|
874
|
+
* Level 1: { defaultPortalTo: "#some-element", theme: "dark" }
|
|
875
|
+
* Level 2: { spacing: "large" } // inherits defaultPortalTo="#some-element", theme="dark"
|
|
876
|
+
* Level 3: { theme: "light" } // inherits defaultPortalTo="#some-element", spacing="large", overrides theme="light"
|
|
877
|
+
* ```
|
|
878
|
+
*/
|
|
879
|
+
var BitsConfigState = class {
|
|
880
|
+
opts;
|
|
881
|
+
constructor(parent, opts) {
|
|
882
|
+
const resolveConfigOption = createConfigResolver(parent, opts);
|
|
883
|
+
this.opts = {
|
|
884
|
+
defaultPortalTo: resolveConfigOption((config) => config.defaultPortalTo),
|
|
885
|
+
defaultLocale: resolveConfigOption((config) => config.defaultLocale)
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
/**
|
|
890
|
+
* Returns a config resolver that resolves a given config option's value.
|
|
891
|
+
*
|
|
892
|
+
* The resolver creates reactive boxes that resolve config option values using this priority:
|
|
893
|
+
* 1. Current level's value (if defined)
|
|
894
|
+
* 2. Parent level's value (if defined and current is undefined)
|
|
895
|
+
* 3. `undefined` (if no value is found in either parent or child)
|
|
896
|
+
*
|
|
897
|
+
* @param parent - Parent configuration state (null if this is root level)
|
|
898
|
+
* @param currentOpts - Current level's configuration options
|
|
899
|
+
*
|
|
900
|
+
* @example
|
|
901
|
+
* ```typescript
|
|
902
|
+
* // Given this hierarchy:
|
|
903
|
+
* // Root: { defaultPortalTo: "#some-element" }
|
|
904
|
+
* // Child: { someOtherProp: "value" } // no defaultPortalTo specified
|
|
905
|
+
*
|
|
906
|
+
* const resolveConfigOption = createConfigResolver(parent, opts);
|
|
907
|
+
* const portalTo = resolveConfigOption(config => config.defaultPortalTo);
|
|
908
|
+
*
|
|
909
|
+
* // portalTo.current === "#some-element" (inherited from parent)
|
|
910
|
+
* // even when child didn't specify `defaultPortalTo`
|
|
911
|
+
* ```
|
|
912
|
+
*/
|
|
913
|
+
function createConfigResolver(parent, currentOpts) {
|
|
914
|
+
return (getter) => {
|
|
915
|
+
return boxWith(() => {
|
|
916
|
+
const value = getter(currentOpts)?.current;
|
|
917
|
+
if (value !== void 0) return value;
|
|
918
|
+
if (parent === null) return void 0;
|
|
919
|
+
return getter(parent.opts)?.current;
|
|
920
|
+
});
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
//#endregion
|
|
924
|
+
//#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/config/prop-resolvers.js
|
|
925
|
+
/**
|
|
926
|
+
* Creates a generic prop resolver that follows a standard priority chain:
|
|
927
|
+
* 1. The getter's prop value (if defined)
|
|
928
|
+
* 2. The config default value (if no getter prop value is defined)
|
|
929
|
+
* 3. The fallback value (if no config value found)
|
|
930
|
+
*/
|
|
931
|
+
function createPropResolver(configOption, fallback) {
|
|
932
|
+
return (getProp) => {
|
|
933
|
+
const config = getBitsConfig();
|
|
934
|
+
return boxWith(() => {
|
|
935
|
+
const propValue = getProp();
|
|
936
|
+
if (propValue !== void 0) return propValue;
|
|
937
|
+
const option = configOption(config).current;
|
|
938
|
+
if (option !== void 0) return option;
|
|
939
|
+
return fallback;
|
|
940
|
+
});
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Resolves a portal's `to` value using the prop, the config default, or a fallback.
|
|
945
|
+
*
|
|
946
|
+
* Default value: `"body"`
|
|
947
|
+
*/
|
|
948
|
+
var resolvePortalToProp = createPropResolver((config) => config.defaultPortalTo, "body");
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/portal/portal.svelte
|
|
951
|
+
function Portal($$renderer, $$props) {
|
|
952
|
+
$$renderer.component(($$renderer) => {
|
|
953
|
+
let { to: toProp, children, disabled } = $$props;
|
|
954
|
+
const to = resolvePortalToProp(() => toProp);
|
|
955
|
+
const context = getAllContexts();
|
|
956
|
+
let target = $.derived(getTarget);
|
|
957
|
+
function getTarget() {
|
|
958
|
+
if (!isBrowser || disabled) return null;
|
|
959
|
+
let localTarget = null;
|
|
960
|
+
if (typeof to.current === "string") localTarget = document.querySelector(to.current);
|
|
961
|
+
else localTarget = to.current;
|
|
962
|
+
return localTarget;
|
|
963
|
+
}
|
|
964
|
+
let instance;
|
|
965
|
+
function unmountInstance() {
|
|
966
|
+
if (instance) {
|
|
967
|
+
unmount(instance);
|
|
968
|
+
instance = null;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
watch([() => target(), () => disabled], ([target, disabled]) => {
|
|
972
|
+
if (!target || disabled) {
|
|
973
|
+
unmountInstance();
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
instance = mount(Portal_consumer, {
|
|
977
|
+
target,
|
|
978
|
+
props: { children },
|
|
979
|
+
context
|
|
980
|
+
});
|
|
981
|
+
return () => {
|
|
982
|
+
unmountInstance();
|
|
983
|
+
};
|
|
984
|
+
});
|
|
985
|
+
if (disabled) {
|
|
986
|
+
$$renderer.push("<!--[0-->");
|
|
987
|
+
children?.($$renderer);
|
|
988
|
+
$$renderer.push(`<!---->`);
|
|
989
|
+
} else $$renderer.push("<!--[-1-->");
|
|
990
|
+
$$renderer.push(`<!--]-->`);
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
//#endregion
|
|
846
994
|
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/card/card.svelte
|
|
847
995
|
function Card($$renderer, $$props) {
|
|
848
996
|
$$renderer.component(($$renderer) => {
|
|
@@ -1616,6 +1764,17 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1616
1764
|
const route = getDocsmintRouteAdapter();
|
|
1617
1765
|
const request = getDocsmintRequestAdapter();
|
|
1618
1766
|
const dashboardWidgets = $.derived(() => resolveExtensions(frontendExtensions.dashboardWidgets, extensionContext));
|
|
1767
|
+
const importAccept = $.derived(() => {
|
|
1768
|
+
const formats = [
|
|
1769
|
+
".md",
|
|
1770
|
+
".txt",
|
|
1771
|
+
".json",
|
|
1772
|
+
".docx"
|
|
1773
|
+
];
|
|
1774
|
+
if (extensionContext.capabilities?.["docsmint.import.tier2"]) formats.push(".pdf", "image/*", "audio/*");
|
|
1775
|
+
if (extensionContext.capabilities?.["docsmint.import.tier3"]) formats.push("video/*", ".m4v", ".mkv", ".webm");
|
|
1776
|
+
return formats.join(",");
|
|
1777
|
+
});
|
|
1619
1778
|
const activeFolderId = $.derived(() => page.url.searchParams.get("folder") || null);
|
|
1620
1779
|
const activeCategoryId = $.derived(() => page.url.searchParams.get("category") || null);
|
|
1621
1780
|
let searchQuery = "";
|
|
@@ -1741,7 +1900,12 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1741
1900
|
duplicatingDocumentId = null;
|
|
1742
1901
|
}
|
|
1743
1902
|
}
|
|
1744
|
-
function triggerImport() {
|
|
1903
|
+
function triggerImport() {
|
|
1904
|
+
if (extensionContext.capabilities?.["docsmint.import.manager"]) {
|
|
1905
|
+
navigateDocsmintRoute(route, "/organize");
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1745
1909
|
function closeImport() {
|
|
1746
1910
|
importOpen = false;
|
|
1747
1911
|
setTimeout(() => {
|
|
@@ -1891,7 +2055,7 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1891
2055
|
Layout_dashboard($$renderer, { class: "size-5 text-primary" });
|
|
1892
2056
|
$$renderer.push(`<!----></div> <div><h1 class="text-2xl font-semibold tracking-tight svelte-e61um3">${$.escape(dashboard_title())}</h1> <p class="text-sm text-muted-foreground svelte-e61um3">${$.escape(dashboard_subtitle())}</p></div></div>`);
|
|
1893
2057
|
}
|
|
1894
|
-
$$renderer.push(`<!--]--></div> <div class="dashboard-header-actions ml-auto flex items-center justify-end gap-2 svelte-e61um3"><input type="file"
|
|
2058
|
+
$$renderer.push(`<!--]--></div> <div class="dashboard-header-actions ml-auto flex items-center justify-end gap-2 svelte-e61um3"><input type="file"${$.attr("accept", importAccept())} multiple="" class="hidden"/> `);
|
|
1895
2059
|
Button($$renderer, {
|
|
1896
2060
|
variant: "outline",
|
|
1897
2061
|
size: "sm",
|
|
@@ -1956,7 +2120,7 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1956
2120
|
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
1957
2121
|
let widget = each_array[$$index];
|
|
1958
2122
|
const Widget = widget.component;
|
|
1959
|
-
$$renderer.push(`<div
|
|
2123
|
+
$$renderer.push(`<div${$.attr_class($.clsx([widget.chrome === false ? "contents" : "rounded-xl border border-border bg-card p-4", widget.colSpan === 12 && "md:col-span-2"]))}${$.attr("data-hiai-docs-extension-id", widget.id)}>`);
|
|
1960
2124
|
if (widget.title) {
|
|
1961
2125
|
$$renderer.push("<!--[0-->");
|
|
1962
2126
|
$$renderer.push(`<h2 class="mb-3 text-sm font-semibold">${$.escape(widget.title)}</h2>`);
|
|
@@ -1977,7 +2141,7 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1977
2141
|
$$renderer.push(`<!--]--> `);
|
|
1978
2142
|
if (activeFolderId() && data.breadcrumb?.length > 0) {
|
|
1979
2143
|
$$renderer.push("<!--[0-->");
|
|
1980
|
-
$$renderer.push(`<nav class="mb-6 flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground" aria-label="Breadcrumbs"><a
|
|
2144
|
+
$$renderer.push(`<nav class="mb-6 flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground" aria-label="Breadcrumbs"><a${$.attr("href", resolveDocsmintRoute(route, "/"))} class="hover:text-foreground transition-colors">Home</a> <!--[-->`);
|
|
1981
2145
|
const each_array_1 = $.ensure_array_like(data.breadcrumb);
|
|
1982
2146
|
for (let idx = 0, $$length = each_array_1.length; idx < $$length; idx++) {
|
|
1983
2147
|
let path = each_array_1[idx];
|
|
@@ -1988,7 +2152,7 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
1988
2152
|
$$renderer.push(`<span class="font-medium text-foreground truncate max-w-[150px]">${$.escape(path.name)}</span>`);
|
|
1989
2153
|
} else {
|
|
1990
2154
|
$$renderer.push("<!--[-1-->");
|
|
1991
|
-
$$renderer.push(`<a${$.attr("href", `/?folder=${
|
|
2155
|
+
$$renderer.push(`<a${$.attr("href", resolveDocsmintRoute(route, `/?folder=${encodeURIComponent(path.id)}`))} class="hover:text-foreground transition-colors truncate max-w-[150px]">${$.escape(path.name)}</a>`);
|
|
1992
2156
|
}
|
|
1993
2157
|
$$renderer.push(`<!--]-->`);
|
|
1994
2158
|
}
|
|
@@ -2061,17 +2225,49 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2061
2225
|
$$renderer.push("<!--]-->");
|
|
2062
2226
|
}
|
|
2063
2227
|
$$renderer.push(` `);
|
|
2064
|
-
if (
|
|
2228
|
+
if (Portal) {
|
|
2065
2229
|
$$renderer.push("<!--[-->");
|
|
2066
|
-
|
|
2067
|
-
class: "w-[var(--bits-select-trigger-width)]",
|
|
2230
|
+
Portal($$renderer, {
|
|
2068
2231
|
children: ($$renderer) => {
|
|
2069
|
-
if (Select$1.
|
|
2232
|
+
if (Select$1.Content) {
|
|
2070
2233
|
$$renderer.push("<!--[-->");
|
|
2071
|
-
Select$1.
|
|
2072
|
-
|
|
2234
|
+
Select$1.Content($$renderer, {
|
|
2235
|
+
class: "w-[var(--bits-select-trigger-width)]",
|
|
2073
2236
|
children: ($$renderer) => {
|
|
2074
|
-
|
|
2237
|
+
if (Select$1.Item) {
|
|
2238
|
+
$$renderer.push("<!--[-->");
|
|
2239
|
+
Select$1.Item($$renderer, {
|
|
2240
|
+
value: "all",
|
|
2241
|
+
children: ($$renderer) => {
|
|
2242
|
+
$$renderer.push(`<!---->All Categories`);
|
|
2243
|
+
},
|
|
2244
|
+
$$slots: { default: true }
|
|
2245
|
+
});
|
|
2246
|
+
$$renderer.push("<!--]-->");
|
|
2247
|
+
} else {
|
|
2248
|
+
$$renderer.push("<!--[!-->");
|
|
2249
|
+
$$renderer.push("<!--]-->");
|
|
2250
|
+
}
|
|
2251
|
+
$$renderer.push(` <!--[-->`);
|
|
2252
|
+
const each_array_2 = $.ensure_array_like(data.categories);
|
|
2253
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
2254
|
+
let cat = each_array_2[$$index_2];
|
|
2255
|
+
if (Select$1.Item) {
|
|
2256
|
+
$$renderer.push("<!--[-->");
|
|
2257
|
+
Select$1.Item($$renderer, {
|
|
2258
|
+
value: cat.id,
|
|
2259
|
+
children: ($$renderer) => {
|
|
2260
|
+
$$renderer.push(`<!---->${$.escape(cat.name)}`);
|
|
2261
|
+
},
|
|
2262
|
+
$$slots: { default: true }
|
|
2263
|
+
});
|
|
2264
|
+
$$renderer.push("<!--]-->");
|
|
2265
|
+
} else {
|
|
2266
|
+
$$renderer.push("<!--[!-->");
|
|
2267
|
+
$$renderer.push("<!--]-->");
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
$$renderer.push(`<!--]-->`);
|
|
2075
2271
|
},
|
|
2076
2272
|
$$slots: { default: true }
|
|
2077
2273
|
});
|
|
@@ -2080,26 +2276,6 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2080
2276
|
$$renderer.push("<!--[!-->");
|
|
2081
2277
|
$$renderer.push("<!--]-->");
|
|
2082
2278
|
}
|
|
2083
|
-
$$renderer.push(` <!--[-->`);
|
|
2084
|
-
const each_array_2 = $.ensure_array_like(data.categories);
|
|
2085
|
-
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
2086
|
-
let cat = each_array_2[$$index_2];
|
|
2087
|
-
if (Select$1.Item) {
|
|
2088
|
-
$$renderer.push("<!--[-->");
|
|
2089
|
-
Select$1.Item($$renderer, {
|
|
2090
|
-
value: cat.id,
|
|
2091
|
-
children: ($$renderer) => {
|
|
2092
|
-
$$renderer.push(`<!---->${$.escape(cat.name)}`);
|
|
2093
|
-
},
|
|
2094
|
-
$$slots: { default: true }
|
|
2095
|
-
});
|
|
2096
|
-
$$renderer.push("<!--]-->");
|
|
2097
|
-
} else {
|
|
2098
|
-
$$renderer.push("<!--[!-->");
|
|
2099
|
-
$$renderer.push("<!--]-->");
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
$$renderer.push(`<!--]-->`);
|
|
2103
2279
|
},
|
|
2104
2280
|
$$slots: { default: true }
|
|
2105
2281
|
});
|
|
@@ -2168,17 +2344,49 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2168
2344
|
$$renderer.push("<!--]-->");
|
|
2169
2345
|
}
|
|
2170
2346
|
$$renderer.push(` `);
|
|
2171
|
-
if (
|
|
2347
|
+
if (Portal) {
|
|
2172
2348
|
$$renderer.push("<!--[-->");
|
|
2173
|
-
|
|
2174
|
-
class: "w-[var(--bits-select-trigger-width)]",
|
|
2349
|
+
Portal($$renderer, {
|
|
2175
2350
|
children: ($$renderer) => {
|
|
2176
|
-
if (Select$1.
|
|
2351
|
+
if (Select$1.Content) {
|
|
2177
2352
|
$$renderer.push("<!--[-->");
|
|
2178
|
-
Select$1.
|
|
2179
|
-
|
|
2353
|
+
Select$1.Content($$renderer, {
|
|
2354
|
+
class: "w-[var(--bits-select-trigger-width)]",
|
|
2180
2355
|
children: ($$renderer) => {
|
|
2181
|
-
|
|
2356
|
+
if (Select$1.Item) {
|
|
2357
|
+
$$renderer.push("<!--[-->");
|
|
2358
|
+
Select$1.Item($$renderer, {
|
|
2359
|
+
value: "all",
|
|
2360
|
+
children: ($$renderer) => {
|
|
2361
|
+
$$renderer.push(`<span class="inline-flex items-center gap-2"><span class="size-2 rounded-full bg-muted-foreground"></span>All Tags</span>`);
|
|
2362
|
+
},
|
|
2363
|
+
$$slots: { default: true }
|
|
2364
|
+
});
|
|
2365
|
+
$$renderer.push("<!--]-->");
|
|
2366
|
+
} else {
|
|
2367
|
+
$$renderer.push("<!--[!-->");
|
|
2368
|
+
$$renderer.push("<!--]-->");
|
|
2369
|
+
}
|
|
2370
|
+
$$renderer.push(` <!--[-->`);
|
|
2371
|
+
const each_array_3 = $.ensure_array_like(data.tags);
|
|
2372
|
+
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
2373
|
+
let tag = each_array_3[$$index_3];
|
|
2374
|
+
if (Select$1.Item) {
|
|
2375
|
+
$$renderer.push("<!--[-->");
|
|
2376
|
+
Select$1.Item($$renderer, {
|
|
2377
|
+
value: tag.id,
|
|
2378
|
+
children: ($$renderer) => {
|
|
2379
|
+
$$renderer.push(`<span class="inline-flex items-center gap-2"><span class="size-2 rounded-full"${$.attr_style(`background-color: ${$.stringify(tag.color || "#cccccc")}`)}></span>${$.escape(tag.name)}</span>`);
|
|
2380
|
+
},
|
|
2381
|
+
$$slots: { default: true }
|
|
2382
|
+
});
|
|
2383
|
+
$$renderer.push("<!--]-->");
|
|
2384
|
+
} else {
|
|
2385
|
+
$$renderer.push("<!--[!-->");
|
|
2386
|
+
$$renderer.push("<!--]-->");
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
$$renderer.push(`<!--]-->`);
|
|
2182
2390
|
},
|
|
2183
2391
|
$$slots: { default: true }
|
|
2184
2392
|
});
|
|
@@ -2187,26 +2395,6 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2187
2395
|
$$renderer.push("<!--[!-->");
|
|
2188
2396
|
$$renderer.push("<!--]-->");
|
|
2189
2397
|
}
|
|
2190
|
-
$$renderer.push(` <!--[-->`);
|
|
2191
|
-
const each_array_3 = $.ensure_array_like(data.tags);
|
|
2192
|
-
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
2193
|
-
let tag = each_array_3[$$index_3];
|
|
2194
|
-
if (Select$1.Item) {
|
|
2195
|
-
$$renderer.push("<!--[-->");
|
|
2196
|
-
Select$1.Item($$renderer, {
|
|
2197
|
-
value: tag.id,
|
|
2198
|
-
children: ($$renderer) => {
|
|
2199
|
-
$$renderer.push(`<!---->${$.escape(tag.name)}`);
|
|
2200
|
-
},
|
|
2201
|
-
$$slots: { default: true }
|
|
2202
|
-
});
|
|
2203
|
-
$$renderer.push("<!--]-->");
|
|
2204
|
-
} else {
|
|
2205
|
-
$$renderer.push("<!--[!-->");
|
|
2206
|
-
$$renderer.push("<!--]-->");
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
$$renderer.push(`<!--]-->`);
|
|
2210
2398
|
},
|
|
2211
2399
|
$$slots: { default: true }
|
|
2212
2400
|
});
|
|
@@ -2392,21 +2580,32 @@ function HiaiDocsDashboardHost($$renderer, $$props) {
|
|
|
2392
2580
|
$$slots: { default: true }
|
|
2393
2581
|
});
|
|
2394
2582
|
$$renderer.push(`<!----> `);
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2583
|
+
if (Portal) {
|
|
2584
|
+
$$renderer.push("<!--[-->");
|
|
2585
|
+
Portal($$renderer, {
|
|
2586
|
+
children: ($$renderer) => {
|
|
2587
|
+
Dropdown_menu_content($$renderer, {
|
|
2588
|
+
align: "end",
|
|
2589
|
+
children: ($$renderer) => {
|
|
2590
|
+
Dropdown_menu_item($$renderer, {
|
|
2591
|
+
onSelect: () => openShareDialogForCategory(section.category.id, section.category.name),
|
|
2592
|
+
children: ($$renderer) => {
|
|
2593
|
+
Share_2($$renderer, { class: "size-4" });
|
|
2594
|
+
$$renderer.push(`<!----> ${$.escape(doc_share())}`);
|
|
2595
|
+
},
|
|
2596
|
+
$$slots: { default: true }
|
|
2597
|
+
});
|
|
2598
|
+
},
|
|
2599
|
+
$$slots: { default: true }
|
|
2600
|
+
});
|
|
2601
|
+
},
|
|
2602
|
+
$$slots: { default: true }
|
|
2603
|
+
});
|
|
2604
|
+
$$renderer.push("<!--]-->");
|
|
2605
|
+
} else {
|
|
2606
|
+
$$renderer.push("<!--[!-->");
|
|
2607
|
+
$$renderer.push("<!--]-->");
|
|
2608
|
+
}
|
|
2410
2609
|
},
|
|
2411
2610
|
$$slots: { default: true }
|
|
2412
2611
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as HiaiDocsExtensionProvider } from "./assets/HiaiDocsExtensionProvider-
|
|
1
|
+
import { t as HiaiDocsExtensionProvider } from "./assets/HiaiDocsExtensionProvider-BRKWmcDd.js";
|
|
2
2
|
export { HiaiDocsExtensionProvider as DocsmintExtensionProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as setLocale$1, Vr as locales, t as messages_exports } from "./assets/messages-BAQzILs4.js";
|
|
2
2
|
//#region ../packages/sdk/frontend-entries/i18n.ts
|
|
3
3
|
var messages = messages_exports;
|
|
4
4
|
var supportedLocales = locales;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as search_title, Br as app_name, Xn as search_date_from, Yn as search_date_to, Zn as search_tags, ct as search_empty_description, dt as search_folders, ft as search_clear_all_filters, ht as search_title_with_query, lt as search_empty_title, mt as search_input_placeholder, pt as search_toggle_filters, st as search_popular, ut as search_date_range, w as categories_title } from "./assets/messages-BAQzILs4.js";
|
|
2
2
|
import { t as Icon } from "./assets/Icon-QwirKi9Y.js";
|
|
3
|
-
import { a as Calendar, i as Folder_kanban, r as X, t as DatePicker } from "./assets/DatePicker-
|
|
3
|
+
import { a as Calendar, i as Folder_kanban, r as X, t as DatePicker } from "./assets/DatePicker-D84cJ-Eq.js";
|
|
4
4
|
import { t as Chevron_down } from "./assets/chevron-down-CvqKATjM.js";
|
|
5
5
|
import { t as Folder } from "./assets/folder-DYIE-XPP.js";
|
|
6
6
|
import { t as Rotate_ccw } from "./assets/rotate-ccw-dJSqPyTd.js";
|
|
7
7
|
import { n as Search, t as Tag } from "./assets/tag-BmiVU_Ej.js";
|
|
8
8
|
import { a as getDocsmintRequestAdapter, n as navigateDocsmintRoute, t as getDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
9
9
|
import "./assets/categories-av9xjeg5.js";
|
|
10
|
-
import { t as getFrontendExtensions } from "./assets/context-
|
|
10
|
+
import { t as getFrontendExtensions } from "./assets/context-Bi_mO-NS.js";
|
|
11
11
|
import { t as resolveExtensions } from "./assets/resolve-BqHozBXl.js";
|
|
12
|
-
import "./assets/select-value-
|
|
12
|
+
import "./assets/select-value-DBhbkNcc.js";
|
|
13
13
|
import "./assets/tag-store.svelte-BM1lUI_P.js";
|
|
14
14
|
import * as $ from "svelte/internal/server";
|
|
15
15
|
//#region ../node_modules/.bun/lucide-svelte@0.577.0+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/sliders-horizontal.svelte
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getFrontendExtensions } from "./assets/context-
|
|
1
|
+
import { t as getFrontendExtensions } from "./assets/context-Bi_mO-NS.js";
|
|
2
2
|
import * as $ from "svelte/internal/server";
|
|
3
3
|
//#region src/lib/components/editor/shared-document.ts
|
|
4
4
|
var ATTACHMENT_PATH = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i;
|
|
@@ -22,6 +22,8 @@ var tsvector = customType({
|
|
|
22
22
|
});
|
|
23
23
|
var documentVisibilityEnum = pgEnum("document_visibility", ["private", "shared", "public"]);
|
|
24
24
|
var shareRoleEnum = pgEnum("share_role", ["viewer", "commenter", "editor"]);
|
|
25
|
+
var shareAccessModeEnum = pgEnum("share_access_mode", ["public", "restricted"]);
|
|
26
|
+
var shareGrantStatusEnum = pgEnum("share_grant_status", ["pending", "accepted", "revoked"]);
|
|
25
27
|
var embeddingStatusEnum = pgEnum("embedding_status", [
|
|
26
28
|
"pending",
|
|
27
29
|
"processing",
|
|
@@ -313,6 +315,9 @@ var shareLinks = pgTable("share_links", {
|
|
|
313
315
|
token: text("token").notNull().unique(),
|
|
314
316
|
passwordHash: text("password_hash"),
|
|
315
317
|
role: shareRoleEnum("role").notNull().default("viewer"),
|
|
318
|
+
accessMode: shareAccessModeEnum("access_mode").notNull().default("public"),
|
|
319
|
+
allowPasswordFallback: boolean("allow_password_fallback").notNull().default(false),
|
|
320
|
+
policyVersion: integer("policy_version").notNull().default(1),
|
|
316
321
|
expiresAt: timestamp("expires_at"),
|
|
317
322
|
createdBy: uuid("created_by").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
318
323
|
workspaceId: text("workspace_id"),
|
|
@@ -348,8 +353,15 @@ var guestAccess = pgTable("guest_access", {
|
|
|
348
353
|
shareLinkId: uuid("share_link_id").notNull().references(() => shareLinks.id, { onDelete: "cascade" }),
|
|
349
354
|
workspaceId: text("workspace_id"),
|
|
350
355
|
guestEmail: text("guest_email").notNull(),
|
|
351
|
-
|
|
352
|
-
|
|
356
|
+
role: shareRoleEnum("role").notNull().default("viewer"),
|
|
357
|
+
status: shareGrantStatusEnum("status").notNull().default("pending"),
|
|
358
|
+
grantedAt: timestamp("granted_at").defaultNow().notNull(),
|
|
359
|
+
acceptedAt: timestamp("accepted_at"),
|
|
360
|
+
revokedAt: timestamp("revoked_at")
|
|
361
|
+
}, (table) => [
|
|
362
|
+
index("guest_access_share_link_idx").on(table.shareLinkId),
|
|
363
|
+
uniqueIndex("guest_access_share_link_email_unique_idx").on(table.shareLinkId, table.guestEmail)
|
|
364
|
+
]);
|
|
353
365
|
var guestAccessRelations = relations(guestAccess, ({ one }) => ({
|
|
354
366
|
shareLink: one(shareLinks, {
|
|
355
367
|
fields: [guestAccess.shareLinkId],
|
|
@@ -365,7 +377,10 @@ var attachments = pgTable("attachments", {
|
|
|
365
377
|
size: bigint("size", { mode: "number" }).notNull(),
|
|
366
378
|
storageKey: text("storage_key").notNull(),
|
|
367
379
|
createdAt: timestamp("created_at").defaultNow().notNull()
|
|
368
|
-
}, (table) => [
|
|
380
|
+
}, (table) => [
|
|
381
|
+
index("attachments_document_id_idx").on(table.documentId),
|
|
382
|
+
uniqueIndex("attachments_storage_key_unique").on(table.storageKey)
|
|
383
|
+
]);
|
|
369
384
|
var attachmentRelations = relations(attachments, ({ one }) => ({
|
|
370
385
|
document: one(documents, {
|
|
371
386
|
fields: [attachments.documentId],
|
package/dist/types.d.ts
CHANGED
|
@@ -161,6 +161,11 @@ export interface DocsSearchResponse {
|
|
|
161
161
|
total: number;
|
|
162
162
|
page: number;
|
|
163
163
|
limit: number;
|
|
164
|
+
diagnostics?: {
|
|
165
|
+
graphAttempted: boolean;
|
|
166
|
+
graphFailed: boolean;
|
|
167
|
+
graphContribution: boolean;
|
|
168
|
+
};
|
|
164
169
|
}
|
|
165
170
|
export interface DocsSearchOptions {
|
|
166
171
|
folder?: string;
|