@hiai-gg/docsmint 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/backend/index.js +130026 -129609
- package/dist/backend-account-runtime-cleanup.js +2 -0
- package/dist/backend-api-key-facade.js +2 -0
- package/dist/backend-pipeline-cancellation.js +2 -0
- package/dist/frontend/CategoryDialog-D_xFSWGh.js +630 -0
- package/dist/frontend/ConfirmDialog-Cfq3D2Di.js +221 -0
- package/dist/frontend/{CreateSnapshotDialog-CojnWChs.js → CreateSnapshotDialog-BHODxZWK.js} +53 -52
- package/dist/frontend/{DatePicker-7FAbIOGg.js → DatePicker-CZyCnQ1q.js} +62 -64
- package/dist/frontend/{DeleteDialog-BIlqRb1u.js → DeleteDialog-DaJOO6SB.js} +17 -17
- package/dist/frontend/FolderNode-C_91NlEO.js +307 -0
- package/dist/frontend/{FolderTreeSelector-BMB1MS9N.js → FolderTreeSelector-DqO-f0nt.js} +7 -7
- package/dist/frontend/HiAiEditor-DtUGbQg6.js +3160 -0
- package/dist/frontend/{HiaiDocsExtensionProvider-OSn96BBw.js → HiaiDocsExtensionProvider-Cc3yzW5I.js} +5 -3
- package/dist/frontend/{Icon-Db-o32_E.js → Icon-y7xxAIC6.js} +1 -1
- package/dist/frontend/{SettingsDialog-DatuxOVX.js → SettingsDialog-BlIZqk2-.js} +169 -158
- package/dist/frontend/ShareDialog-CmX-VoJ9.js +273 -0
- package/dist/frontend/Sidebar-BVGm5BRR.js +2147 -0
- package/dist/frontend/{TagCreateDialog-Ch21yuWV.js → TagCreateDialog-BlGz4O9Z.js} +45 -36
- package/dist/frontend/action_cancel-Cuxsznzz.js +5 -0
- package/dist/frontend/action_close-BJm_52wm.js +5 -0
- package/dist/frontend/action_create-CtBQrRuj.js +5 -0
- package/dist/frontend/action_delete-BXBIzvn0.js +5 -0
- package/dist/frontend/action_go_to-VmK5jmEk.js +5 -0
- package/dist/frontend/action_loading-BLCGJVA9.js +5 -0
- package/dist/frontend/action_save-BRN2Z_GP.js +5 -0
- package/dist/frontend/api/attachments.js +1 -1
- package/dist/frontend/api/categories.js +1 -1
- package/dist/frontend/api/folders.js +1 -1
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/api/share.js +1 -1
- package/dist/frontend/api/tags.js +1 -1
- package/dist/frontend/app-shell.js +8 -8
- package/dist/frontend/{attachments-B2aH3hXF.js → attachments-C225gTA7.js} +2 -2
- package/dist/frontend/{auth-client-CnDZwPfp.js → auth-client-DCMne8vd.js} +630 -615
- package/dist/frontend/{bundle-mjs-DllmqUxV.js → bundle-mjs-CZ3g1Uzr.js} +35 -42
- package/dist/frontend/{camera-CzCxBOpc.js → camera-BI-BtnIm.js} +2 -2
- package/dist/frontend/{categories-X7gK8azc.js → categories-Bjcc41We.js} +1 -1
- package/dist/frontend/categories_update_error-4aSI8PTr.js +5 -0
- package/dist/frontend/{check-BIi-Ghti.js → check-sdTlLwi9.js} +2 -2
- package/dist/frontend/{chevron-down-C2ft7XUV.js → chevron-down-DlBnIE7Y.js} +2 -2
- package/dist/frontend/{circle-check-BrqfiQH1.js → circle-check-hWC-HeKu.js} +2 -2
- package/dist/frontend/{clock-Dz86E4Kz.js → clock-C4FHq-9q.js} +2 -2
- package/dist/frontend/collaboration.js +208 -103
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/compact-editor.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/editor/document-title.js +3 -2
- package/dist/frontend/components/editor/docx-serializer.js +140 -125
- package/dist/frontend/components/editor/extensions.js +1 -1
- package/dist/frontend/components/editor/markdown-toggle.js +9 -9
- package/dist/frontend/components/editor/markdown.js +1 -1
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/folder-tree-selector.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +34 -25
- 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/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +181 -176
- package/dist/frontend/{confirm-dialog-8T6vsWL7.js → confirm-dialog-BFTxjLv-.js} +46 -37
- package/dist/frontend/{copy-CvCh4ZVt.js → copy-4H99lwAQ.js} +2 -2
- package/dist/frontend/dashboard.js +462 -456
- package/dist/frontend/{db-Bo1t_76T.js → db-CbFRFAm2.js} +40 -38
- package/dist/frontend/{dialog-CiSwD-_v.js → dialog-tHAH3-9M.js} +10 -10
- package/dist/frontend/dist-Cg1BpNS7.js +2262 -0
- package/dist/frontend/dndzone-BrakBHwm.js +1375 -0
- package/dist/frontend/doc_title_label-DS9jSIh2.js +5 -0
- package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +5 -0
- package/dist/frontend/{document-drop-coordinator-C4xHMjwC.js → document-drop-coordinator-Da7HcXgv.js} +1 -1
- package/dist/frontend/document-drop-coordinator.js +1 -1
- package/dist/frontend/{dropdown-menu-Bi5Iipwf.js → dropdown-menu-AJYeFPHu.js} +145 -145
- package/dist/frontend/{editor-content-sanitizer-CC_A8aaI.js → editor-content-sanitizer-CWjqiz0T.js} +30 -30
- package/dist/frontend/{editorExtensions--HusV819.js → editorExtensions-B-mKiWqq.js} +5085 -6220
- package/dist/frontend/editor_markdown_placeholder-BIWDUF1E.js +5 -0
- package/dist/frontend/error_dismiss-Dx_JbRjs.js +5 -0
- package/dist/frontend/error_generic-CzNtmBT4.js +5 -0
- package/dist/frontend/extension.js +1 -1
- package/dist/frontend/{folder-Cx60MRpi.js → folder-BAX6qBYy.js} +3 -3
- package/dist/frontend/{folders-ONG03Dkv.js → folders-CC0UWkZH.js} +3 -3
- package/dist/frontend/folders_rename-BJo4Gipq.js +5 -0
- package/dist/frontend/i18n.js +1007 -6
- package/dist/frontend/{identity-Ynrglr5i.js → identity-O4lAuchv.js} +2 -2
- package/dist/frontend/{input-N9dNSOWF.js → input-CrlYAH2S.js} +2 -2
- package/dist/frontend/{label-CK72_fw8.js → label-B0syEfns.js} +2 -2
- package/dist/frontend/{markdown-H6QB53zu.js → markdown-CMij27Gg.js} +1 -1
- package/dist/frontend/offline/identity.js +1 -1
- package/dist/frontend/{floating-layer-anchor-BGIndLY-.js → popper-layer-force-mount-BAYjg6Pp.js} +2476 -2564
- package/dist/frontend/{rolldown-runtime-CWhphoD1.js → rolldown-runtime-DArdT4gl.js} +2 -2
- package/dist/frontend/{rotate-ccw-ta4NosZ0.js → rotate-ccw-DtZDfSK3.js} +2 -2
- package/dist/frontend/runtime-CwWSo6c9.js +128 -0
- package/dist/frontend/{schemas-DwtKylCJ.js → schemas-CdPhcuru.js} +6 -7
- package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +5 -0
- package/dist/frontend/search.js +237 -265
- package/dist/frontend/search_title-DOC0cPlQ.js +5 -0
- package/dist/frontend/{select-value-BD1DToYs.js → select-value-D9VqY5n5.js} +575 -572
- package/dist/frontend/{settings-BR48ihB4.js → settings-DJW8JkdF.js} +1 -1
- package/dist/frontend/{share-D7JtkC85.js → share-D5yo0JOh.js} +2 -1
- package/dist/frontend/share_copied-DPxVzfWh.js +5 -0
- package/dist/frontend/share_toggle_password-DdxfIjj1.js +5 -0
- package/dist/frontend/shared-document.js +1 -1
- package/dist/frontend/sidebar_uncategorized-qJ2_Aonf.js +5 -0
- package/dist/frontend/sort_relevance-DwYX5MO9.js +5 -0
- package/dist/frontend/{tag-DhVFHMcV.js → tag-ChpMfbfa.js} +3 -3
- package/dist/frontend/{tags-BdCaMGfj.js → tags-CzPNUoFw.js} +1 -1
- package/dist/frontend/tags_load_error-BKjA1pI0.js +5 -0
- package/dist/frontend/tags_new-BiNAJ9Bx.js +5 -0
- package/dist/frontend/{textarea-pl_fDBre.js → textarea-l_gRXsrH.js} +2 -2
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/{theme.svelte-DG3RS7wv.js → theme.svelte-Bzitjfh9.js} +2 -2
- package/dist/frontend/theme_system-BBNUhYKh.js +5 -0
- package/dist/frontend/utils/dndzone.js +1 -1
- package/dist/frontend/utils-B4LKx7VS.js +7 -0
- package/dist/frontend/{utils-DrfHTcei.js → utils-BovMJHdA.js} +2 -2
- package/dist/frontend/utils.js +1 -1
- package/dist/frontend/version_create_snapshot-3bu-0qzH.js +5 -0
- package/dist/frontend/version_restored_from-dVRN3Zdk.js +5 -0
- package/dist/frontend/version_snapshot_label_placeholder-DrMikux0.js +5 -0
- package/dist/frontend/weekday_we-C5H_M-df.js +5 -0
- package/dist/frontend/{x-cfdlccjs.js → x-B2ifxSH7.js} +2 -2
- package/dist/frontend/{awareness-snQ3RD9f.js → yjs-VUcKqaKW.js} +835 -944
- package/dist/frontend-ssr/api/attachments.js +92 -1
- package/dist/frontend-ssr/api/categories.js +1 -1
- package/dist/frontend-ssr/api/documents.js +1 -1
- package/dist/frontend-ssr/api/folders.js +1 -1
- package/dist/frontend-ssr/api/settings.js +1 -1
- package/dist/frontend-ssr/api/share.js +30 -1
- package/dist/frontend-ssr/api/tags.js +1 -1
- package/dist/frontend-ssr/app-shell.js +25 -18
- package/dist/frontend-ssr/assets/{CategoryDialog-DsXe54EF.js → CategoryDialog-C41IBNWG.js} +26 -35
- package/dist/frontend-ssr/assets/ConfirmDialog-CWO0HBaS.js +424 -0
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-D3-PjXVr.js → CreateSnapshotDialog-CECCRK0d.js} +12 -18
- package/dist/frontend-ssr/assets/{DatePicker-C9suIA1S.js → DatePicker-TZVeMZ2S.js} +32 -20
- package/dist/frontend-ssr/assets/{DeleteDialog-DxtMrS1O.js → DeleteDialog-BVnmzR2e.js} +5 -7
- package/dist/frontend-ssr/assets/{FolderNode-ChD10Elp.js → FolderNode-CClgk8BL.js} +7 -7
- package/dist/frontend-ssr/assets/{FolderTreeSelector-Bxi8EqMm.js → FolderTreeSelector-DnrKCYtl.js} +17 -20
- package/dist/frontend-ssr/assets/{HiAiEditor-2X3Uyg1B.js → HiAiEditor-_-m7MJDd.js} +330 -254
- package/dist/frontend-ssr/assets/{Icon-QwirKi9Y.js → Icon-Clqe8D8X.js} +28 -16
- package/dist/frontend-ssr/assets/{SettingsDialog-DDy0hN8x.js → SettingsDialog-BdvHRAxF.js} +45 -49
- package/dist/frontend-ssr/assets/{ShareDialog-BwW_wF4G.js → ShareDialog-DHPbSHZg.js} +5 -6
- package/dist/frontend-ssr/assets/{Sidebar-Dy-5gXOf.js → Sidebar-B3Saqn0O.js} +90 -93
- package/dist/frontend-ssr/assets/{TagCreateDialog-BPzgOaX8.js → TagCreateDialog-CPg-nG0D.js} +14 -14
- package/dist/frontend-ssr/assets/action_cancel-OVgQDP5Q.js +22 -0
- package/dist/frontend-ssr/assets/action_close-DagDyMXk.js +22 -0
- package/dist/frontend-ssr/assets/action_create-hqJWjyqh.js +22 -0
- package/dist/frontend-ssr/assets/action_delete-B1-16jSo.js +22 -0
- package/dist/frontend-ssr/assets/action_go_to-DQScgw7P.js +22 -0
- package/dist/frontend-ssr/assets/action_save-Bx7vlLZI.js +22 -0
- package/dist/frontend-ssr/assets/{api-keys-DIbclwj5.js → api-keys-CHOrbU-Q.js} +1 -1
- package/dist/frontend-ssr/assets/{auth-client-CojKIzqy.js → auth-client-DzkZlSQ8.js} +295 -261
- package/dist/frontend-ssr/assets/{camera-D6s20LDi.js → camera-Dwwtgvfn.js} +10 -6
- package/dist/frontend-ssr/assets/{categories-av9xjeg5.js → categories-C_dxFoHi.js} +1 -1
- package/dist/frontend-ssr/assets/categories_update_error-DkKgsqdD.js +202 -0
- package/dist/frontend-ssr/assets/{chevron-down-CvqKATjM.js → chevron-down-C6BTPJFz.js} +10 -6
- package/dist/frontend-ssr/assets/{chevron-right-DKD7WXjz.js → chevron-right-CseGE1qd.js} +10 -6
- package/dist/frontend-ssr/assets/{circle-check-CPS9dKEo.js → circle-check-BRhWPZo1.js} +10 -6
- package/dist/frontend-ssr/assets/{client-DZMkDkDn.js → client-rfwQYYHY.js} +4 -2
- package/dist/frontend-ssr/assets/{clock-CzsE58TH.js → clock-DpP_Y7WP.js} +10 -6
- package/dist/frontend-ssr/assets/{confirm-dialog-wYC07DPx.js → confirm-dialog-DeOR0SnQ.js} +44 -31
- package/dist/frontend-ssr/assets/{copy-DkkCPkBL.js → copy-DRMKiRZ0.js} +10 -6
- package/dist/frontend-ssr/assets/{db-BhwJPEkn.js → db-CUkQe9AU.js} +1 -1
- package/dist/frontend-ssr/assets/{dialog-ClcuF7nD.js → dialog--tDgDGw9.js} +12 -15
- package/dist/frontend-ssr/assets/{dndzone-DMvTO_Jz.js → dndzone-WtNaDxoQ.js} +309 -77
- package/dist/frontend-ssr/assets/doc_title_label-Ev_ltlh3.js +22 -0
- package/dist/frontend-ssr/assets/doc_title_placeholder-DSHpUb7w.js +22 -0
- package/dist/frontend-ssr/assets/{documents-CZ-wQohy.js → documents-CEuA1V6N.js} +1 -1
- package/dist/frontend-ssr/assets/{dropdown-menu-BKMGVNLL.js → dropdown-menu-CdEpn_LT.js} +74 -75
- package/dist/frontend-ssr/assets/editor_markdown_placeholder-BpezdkOr.js +42 -0
- package/dist/frontend-ssr/assets/editor_toolbar_undo-CKJAOqv2.js +562 -0
- package/dist/frontend-ssr/assets/error_generic-DTK0kwxT.js +42 -0
- package/dist/frontend-ssr/assets/{folder-DYIE-XPP.js → folder-DszunwKc.js} +10 -6
- package/dist/frontend-ssr/assets/{folders-BX30gHv6.js → folders-BOXeb9hz.js} +3 -2
- package/dist/frontend-ssr/assets/folders_rename-DvciOb6K.js +122 -0
- package/dist/frontend-ssr/assets/{identity-DcMMBKWg.js → identity-veXobEfE.js} +2 -2
- package/dist/frontend-ssr/assets/{input-DcDR8L8M.js → input-BlAj7LzC.js} +2 -2
- package/dist/frontend-ssr/assets/{label-Cz0_svJx.js → label-BRToaMg9.js} +2 -2
- package/dist/frontend-ssr/assets/{loader-circle-CIEWGyfP.js → loader-circle-BpRVrMZg.js} +10 -6
- package/dist/frontend-ssr/assets/{floating-layer-anchor-BoiiIEiK.js → popper-layer-force-mount-Djnq7l7a.js} +3684 -3674
- package/dist/frontend-ssr/assets/{rotate-ccw-dJSqPyTd.js → rotate-ccw-1GOD_yt_.js} +10 -6
- package/dist/frontend-ssr/assets/runtime-O78RzRqx.js +559 -0
- package/dist/frontend-ssr/assets/scroll_to_top_aria-BN4ZfOnM.js +22 -0
- package/dist/frontend-ssr/assets/search_title-CKUsQDT0.js +22 -0
- package/dist/frontend-ssr/assets/search_toggle_filters-hS9rvQhC.js +282 -0
- package/dist/frontend-ssr/assets/{select-value-CaDktvDW.js → select-value-BCWSsoTd.js} +204 -218
- package/dist/frontend-ssr/assets/{settings-Mp8EuFSn.js → settings-DwAcLGM1.js} +2 -2
- package/dist/frontend-ssr/assets/share_copied-BxU9rjXG.js +602 -0
- package/dist/frontend-ssr/assets/share_toggle_password-C6OmroqR.js +202 -0
- package/dist/frontend-ssr/assets/sidebar_uncategorized-Dx-LTd5w.js +102 -0
- package/dist/frontend-ssr/assets/{tag-BmiVU_Ej.js → tag-DFh6nF9R.js} +19 -11
- package/dist/frontend-ssr/assets/{tag-store.svelte-BM1lUI_P.js → tag-store.svelte-QRysvGKe.js} +1 -1
- package/dist/frontend-ssr/assets/{tags-BQsI_6OW.js → tags-BBCoFYro.js} +1 -1
- package/dist/frontend-ssr/assets/tags_load_error-CPrc6Gzs.js +362 -0
- package/dist/frontend-ssr/assets/tags_new-VmMr9v2V.js +62 -0
- package/dist/frontend-ssr/assets/{textarea-BGrjPOgU.js → textarea-BuszTo9i.js} +2 -2
- package/dist/frontend-ssr/assets/{theme.svelte-CN3BUhJG.js → theme.svelte-shZrSxz8.js} +1 -1
- package/dist/frontend-ssr/assets/theme_system-BucaNntV.js +362 -0
- package/dist/frontend-ssr/assets/{utils-Cg_R05dR.js → utils-BK35BJKQ.js} +1 -1
- package/dist/frontend-ssr/assets/version_create_snapshot-COHzwjle.js +22 -0
- package/dist/frontend-ssr/assets/version_restored_from-CertjFDl.js +242 -0
- package/dist/frontend-ssr/assets/version_snapshot_label_placeholder-Cy_rMCij.js +222 -0
- package/dist/frontend-ssr/assets/weekday_we-DrI3U230.js +422 -0
- 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/delete-dialog.js +1 -1
- package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-title.js +2 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +2 -2
- package/dist/frontend-ssr/components/folder-node.js +1 -1
- package/dist/frontend-ssr/components/folder-tree-selector.js +1 -1
- package/dist/frontend-ssr/components/save-as-dialog.js +12 -14
- 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 +47 -51
- package/dist/frontend-ssr/dashboard.js +243 -232
- package/dist/frontend-ssr/i18n.js +6698 -1
- package/dist/frontend-ssr/offline/identity.js +1 -1
- package/dist/frontend-ssr/search.js +28 -31
- package/dist/frontend-ssr/shared-document.js +1 -2
- package/dist/frontend-ssr/theme.js +1 -1
- package/dist/frontend-ssr/utils/dndzone.js +1 -1
- package/dist/lifecycle-runtime.js +4437 -2019
- package/dist/mcp-cli.js +1 -1
- package/dist/mcp-server.js +1 -1
- package/package.json +7 -7
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +2 -0
- package/server.json +2 -2
- package/dist/frontend/CategoryDialog-bQKMpVFD.js +0 -631
- package/dist/frontend/ConfirmDialog-DF7kgkyq.js +0 -139
- package/dist/frontend/FolderNode-Cf443LBa.js +0 -298
- package/dist/frontend/HiAiEditor-CMZ-eL8s.js +0 -2992
- package/dist/frontend/ShareDialog-Bwz2y3Le.js +0 -281
- package/dist/frontend/Sidebar-C_t5RrOJ.js +0 -2101
- package/dist/frontend/dist-DQa_OHOa.js +0 -268
- package/dist/frontend/dndzone-BzsOINtP.js +0 -1199
- package/dist/frontend/messages-DTRe4U2V.js +0 -1093
- package/dist/frontend/utils-CMQRlxbx.js +0 -7
- package/dist/frontend-ssr/assets/ConfirmDialog-DrH653ua.js +0 -136
- package/dist/frontend-ssr/assets/attachments-BdkOp8ha.js +0 -93
- package/dist/frontend-ssr/assets/messages-B1TjVIH8.js +0 -11147
- package/dist/frontend-ssr/assets/share-qTqvd6Lu.js +0 -30
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { t as e } from "./action_close-BJm_52wm.js";
|
|
2
|
+
import { _ as t, a as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p as ee, r as p, s as te, t as ne, u as re, v as m } from "./share_toggle_password-DdxfIjj1.js";
|
|
3
|
+
import { t as h } from "./error_generic-CzNtmBT4.js";
|
|
4
|
+
import { a as g } from "./route-context-DYQlUfzL.js";
|
|
5
|
+
import { a as ie, i as ae, n as oe, r as _, t as se } from "./select-value-D9VqY5n5.js";
|
|
6
|
+
import { n as v } from "./share-D5yo0JOh.js";
|
|
7
|
+
import { h as y, u as b } from "./keyboard.svelte-CApmX0vl.js";
|
|
8
|
+
import { t as x } from "./clipboard-Cgzxc0_R.js";
|
|
9
|
+
import "svelte/internal/disclose-version";
|
|
10
|
+
import * as S from "svelte/internal/client";
|
|
11
|
+
//#region src/lib/components/share-configuration.ts
|
|
12
|
+
function C(e) {
|
|
13
|
+
return e === "standalone" ? ["public"] : ["public", "restricted"];
|
|
14
|
+
}
|
|
15
|
+
function w(e) {
|
|
16
|
+
let t = e.displayMode === "standalone" ? "public" : e.accessMode, n = t === "restricted";
|
|
17
|
+
return {
|
|
18
|
+
documentId: e.documentId || void 0,
|
|
19
|
+
folderId: e.folderId || void 0,
|
|
20
|
+
categoryId: e.categoryId || void 0,
|
|
21
|
+
password: e.usePassword ? e.password : void 0,
|
|
22
|
+
expiresIn: e.expiresIn,
|
|
23
|
+
accessMode: t,
|
|
24
|
+
allowPasswordFallback: n && e.usePassword ? e.allowPasswordFallback : void 0,
|
|
25
|
+
guests: n ? e.guests : void 0
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/lib/components/ShareDialog.svelte
|
|
30
|
+
var ce = S.from_html("<button type=\"button\"> </button>"), le = S.from_html("<label class=\"flex items-start gap-2 text-xs text-muted-foreground\"><input type=\"checkbox\" class=\"mt-0.5\"/> Allow anyone with the password to view. Commenting and editing still require an invited account.</label>"), ue = S.from_html("<input type=\"password\" class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/> <!>", 1), de = S.from_html("<button> </button>"), T = S.from_html("<!> <!> <!>", 1), fe = S.from_html("<!> <!>", 1), pe = S.from_html("<span class=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"> <button class=\"text-muted-foreground hover:text-foreground\">×</button></span>"), E = S.from_html("<div class=\"flex flex-wrap gap-1.5\"></div>"), me = S.from_html("<div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"><input type=\"email\" placeholder=\"guest@email.com\" class=\"flex h-9 flex-1 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/> <!> <button class=\"rounded-md border border-border px-3 py-1.5 text-sm font-medium hover:bg-accent\"> </button></div> <!></div>"), he = S.from_html("<p class=\"text-xs text-destructive\"> </p>"), ge = S.from_html("<div class=\"space-y-4\"><div aria-label=\"Share access mode\"></div> <p class=\"rounded-md border border-border bg-muted/40 p-3 text-xs text-muted-foreground\"> </p> <div class=\"flex items-center justify-between\"><span class=\"text-sm font-medium\"> </span> <button role=\"switch\"><span></span></button></div> <!> <div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"></div></div> <!> <!> <button 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\"> </button></div>"), D = S.from_html("<div class=\"space-y-4\"><p class=\"text-sm text-muted-foreground\"> </p> <div data-share-created-url=\"\" class=\"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center\"><code class=\"min-w-0 flex-1 break-all rounded-md bg-muted px-3 py-2 text-sm\"> </code> <button data-share-copy-action=\"\" class=\"w-full shrink-0 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 sm:w-auto\"> </button></div> <button class=\"w-full rounded-md border border-border px-4 py-2 text-sm font-medium hover:bg-accent\"> </button></div>"), O = S.from_html("<div class=\"fixed inset-0 layer-modal z-[100] flex items-center justify-center\"><button class=\"absolute inset-0 z-[100] bg-black/50\"></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\"> </h2> <button class=\"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-foreground\">✕</button></div> <!></div></div>");
|
|
31
|
+
function k(k, A) {
|
|
32
|
+
S.push(A, !0);
|
|
33
|
+
let j = S.prop(A, "open", 15, !1), M = S.prop(A, "documentId", 3, ""), N = S.prop(A, "documentTitle", 3, ""), P = S.prop(A, "folderId", 3, ""), F = S.prop(A, "folderName", 3, ""), I = S.prop(A, "categoryId", 3, ""), _e = S.prop(A, "categoryName", 3, ""), L = S.prop(A, "displayMode", 3, "host-managed"), R = S.state(!1), z = S.state("public"), B = S.state(!1), V = S.state(""), H = S.state("7d"), U = S.state(""), W = S.state("viewer"), G = S.state(S.proxy([])), K = S.state(""), q = S.state(!1), J = S.state(!1), Y = S.state(""), ve = g(), X = S.derived(() => C(L()));
|
|
34
|
+
S.user_effect(() => (b({
|
|
35
|
+
id: "share-dialog-escape",
|
|
36
|
+
keys: "escape",
|
|
37
|
+
description: "Close share dialog",
|
|
38
|
+
scope: "dialog",
|
|
39
|
+
enabled: j(),
|
|
40
|
+
overrideInput: !0,
|
|
41
|
+
handler: () => {
|
|
42
|
+
j() && Q();
|
|
43
|
+
}
|
|
44
|
+
}), () => {
|
|
45
|
+
y("share-dialog-escape");
|
|
46
|
+
}));
|
|
47
|
+
function Z() {
|
|
48
|
+
let e = S.get(U).trim();
|
|
49
|
+
e?.includes("@") && !S.get(G).some((t) => t.email === e.toLowerCase()) && (S.set(G, [...S.get(G), {
|
|
50
|
+
email: e.toLowerCase(),
|
|
51
|
+
role: S.get(W)
|
|
52
|
+
}], !0), S.set(U, ""));
|
|
53
|
+
}
|
|
54
|
+
function ye(e) {
|
|
55
|
+
S.set(G, S.get(G).filter((t) => t.email !== e), !0);
|
|
56
|
+
}
|
|
57
|
+
async function be() {
|
|
58
|
+
S.set(J, !0), S.set(Y, "");
|
|
59
|
+
try {
|
|
60
|
+
let e = w({
|
|
61
|
+
displayMode: L(),
|
|
62
|
+
documentId: M(),
|
|
63
|
+
folderId: P(),
|
|
64
|
+
categoryId: I(),
|
|
65
|
+
usePassword: S.get(R),
|
|
66
|
+
password: S.get(V),
|
|
67
|
+
expiresIn: S.get(H),
|
|
68
|
+
accessMode: S.get(z),
|
|
69
|
+
allowPasswordFallback: S.get(B),
|
|
70
|
+
guests: S.get(G)
|
|
71
|
+
}), t = await v(e, ve.fetch);
|
|
72
|
+
S.set(K, `${window.location.origin}/s/${t.token}`), A.onCreated?.({
|
|
73
|
+
token: t.token,
|
|
74
|
+
url: S.get(K),
|
|
75
|
+
accessMode: e.accessMode
|
|
76
|
+
});
|
|
77
|
+
} catch (e) {
|
|
78
|
+
S.set(Y, e instanceof Error ? e.message : h(), !0), console.error("ShareDialog: createShareLink failed", e);
|
|
79
|
+
} finally {
|
|
80
|
+
S.set(J, !1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function xe() {
|
|
84
|
+
S.get(K) && (await x(S.get(K)), S.set(q, !0), setTimeout(() => {
|
|
85
|
+
S.set(q, !1);
|
|
86
|
+
}, 2e3));
|
|
87
|
+
}
|
|
88
|
+
function Q() {
|
|
89
|
+
j(!1), S.set(K, ""), S.set(R, !1), S.set(z, "public"), S.set(B, !1), S.set(V, ""), S.set(H, "7d"), S.set(G, [], !0), S.set(Y, "");
|
|
90
|
+
}
|
|
91
|
+
var $ = S.comment(), Se = S.first_child($), Ce = (h) => {
|
|
92
|
+
var g = O(), v = S.child(g), y = S.sibling(v, 2), b = S.child(y), x = S.child(b), C = S.only_child(x), w = S.sibling(x, 2);
|
|
93
|
+
S.reset(b);
|
|
94
|
+
var k = S.sibling(b, 2), A = (e) => {
|
|
95
|
+
var o = ge(), c = S.child(o);
|
|
96
|
+
S.each(c, 21, () => S.get(X), S.index, (e, t) => {
|
|
97
|
+
var n = ce(), r = S.only_child(n, !0);
|
|
98
|
+
S.template_effect(() => {
|
|
99
|
+
S.set_class(n, 1, `rounded-md px-3 py-2 text-sm font-medium ${S.get(z) === S.get(t) ? "bg-background shadow-sm" : "text-muted-foreground"}`), S.set_text(r, S.get(t) === "public" ? "Public link" : "Specific people");
|
|
100
|
+
}), S.delegated("click", n, () => {
|
|
101
|
+
S.set(z, S.get(t), !0), S.get(t) === "public" && (S.set(G, [], !0), S.set(B, !1));
|
|
102
|
+
}), S.append(e, n);
|
|
103
|
+
}), S.reset(c);
|
|
104
|
+
var u = S.sibling(c, 2), p = S.only_child(u, !0), m = S.sibling(u, 2), h = S.child(m), g = S.only_child(h, !0), v = S.sibling(h, 2), y = S.only_child(v);
|
|
105
|
+
S.reset(m);
|
|
106
|
+
var b = S.sibling(m, 2), x = (e) => {
|
|
107
|
+
var t = ue(), n = S.first_child(t);
|
|
108
|
+
S.remove_input_defaults(n);
|
|
109
|
+
var r = S.sibling(n, 2), i = (e) => {
|
|
110
|
+
var t = le(), n = S.child(t);
|
|
111
|
+
S.remove_input_defaults(n), S.next(), S.reset(t), S.bind_checked(n, () => S.get(B), (e) => S.set(B, e)), S.append(e, t);
|
|
112
|
+
};
|
|
113
|
+
S.if(r, (e) => {
|
|
114
|
+
S.get(z) === "restricted" && e(i);
|
|
115
|
+
}), S.template_effect((e) => S.set_attribute(n, "placeholder", e), [() => a()]), S.bind_value(n, () => S.get(V), (e) => S.set(V, e)), S.append(e, t);
|
|
116
|
+
};
|
|
117
|
+
S.if(b, (e) => {
|
|
118
|
+
S.get(R) && e(x);
|
|
119
|
+
});
|
|
120
|
+
var C = S.sibling(b, 2), w = S.child(C), D = S.only_child(w, !0), O = S.sibling(w, 2);
|
|
121
|
+
S.each(O, 21, () => [
|
|
122
|
+
["1h", l()],
|
|
123
|
+
["1d", re()],
|
|
124
|
+
["7d", te()],
|
|
125
|
+
["30d", r()],
|
|
126
|
+
["never", f()]
|
|
127
|
+
], S.index, (e, t) => {
|
|
128
|
+
var n = S.derived(() => S.to_array(S.get(t), 2));
|
|
129
|
+
let r = () => S.get(n)[0], i = () => S.get(n)[1];
|
|
130
|
+
var a = de(), o = S.only_child(a, !0);
|
|
131
|
+
S.template_effect(() => {
|
|
132
|
+
S.set_class(a, 1, `rounded-md border px-2.5 py-1 text-xs font-medium transition-colors
|
|
133
|
+
${S.get(H) === r() ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent"}`), S.set_text(o, i());
|
|
134
|
+
}), S.delegated("click", a, () => {
|
|
135
|
+
S.set(H, r(), !0);
|
|
136
|
+
}), S.append(e, a);
|
|
137
|
+
}), S.reset(O), S.reset(C);
|
|
138
|
+
var k = S.sibling(C, 2), A = (e) => {
|
|
139
|
+
var r = me(), i = S.child(r), a = S.only_child(i, !0), o = S.sibling(i, 2), s = S.child(o);
|
|
140
|
+
S.remove_input_defaults(s);
|
|
141
|
+
var c = S.sibling(s, 2);
|
|
142
|
+
ie(c, {
|
|
143
|
+
type: "single",
|
|
144
|
+
get value() {
|
|
145
|
+
return S.get(W);
|
|
146
|
+
},
|
|
147
|
+
onValueChange: (e) => {
|
|
148
|
+
(e === "viewer" || e === "commenter" || e === "editor") && S.set(W, e, !0);
|
|
149
|
+
},
|
|
150
|
+
children: (e, t) => {
|
|
151
|
+
var n = fe(), r = S.first_child(n);
|
|
152
|
+
oe(r, {
|
|
153
|
+
class: "h-9 w-32 justify-between px-3 text-sm",
|
|
154
|
+
"aria-label": "Guest role",
|
|
155
|
+
children: (e, t) => {
|
|
156
|
+
se(e, {
|
|
157
|
+
placeholder: "Role",
|
|
158
|
+
children: (e, t) => {
|
|
159
|
+
S.next();
|
|
160
|
+
var n = S.text();
|
|
161
|
+
S.template_effect(() => S.set_text(n, S.get(W) === "viewer" ? "Viewer" : S.get(W) === "commenter" ? "Commenter" : "Editor")), S.append(e, n);
|
|
162
|
+
},
|
|
163
|
+
$$slots: { default: !0 }
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
$$slots: { default: !0 }
|
|
167
|
+
});
|
|
168
|
+
var i = S.sibling(r, 2);
|
|
169
|
+
ae(i, {
|
|
170
|
+
children: (e, t) => {
|
|
171
|
+
var n = T(), r = S.first_child(n);
|
|
172
|
+
_(r, {
|
|
173
|
+
value: "viewer",
|
|
174
|
+
children: (e, t) => {
|
|
175
|
+
S.next();
|
|
176
|
+
var n = S.text("Viewer");
|
|
177
|
+
S.append(e, n);
|
|
178
|
+
},
|
|
179
|
+
$$slots: { default: !0 }
|
|
180
|
+
});
|
|
181
|
+
var i = S.sibling(r, 2);
|
|
182
|
+
_(i, {
|
|
183
|
+
value: "commenter",
|
|
184
|
+
children: (e, t) => {
|
|
185
|
+
S.next();
|
|
186
|
+
var n = S.text("Commenter");
|
|
187
|
+
S.append(e, n);
|
|
188
|
+
},
|
|
189
|
+
$$slots: { default: !0 }
|
|
190
|
+
});
|
|
191
|
+
var a = S.sibling(i, 2);
|
|
192
|
+
_(a, {
|
|
193
|
+
value: "editor",
|
|
194
|
+
children: (e, t) => {
|
|
195
|
+
S.next();
|
|
196
|
+
var n = S.text("Editor");
|
|
197
|
+
S.append(e, n);
|
|
198
|
+
},
|
|
199
|
+
$$slots: { default: !0 }
|
|
200
|
+
}), S.append(e, n);
|
|
201
|
+
},
|
|
202
|
+
$$slots: { default: !0 }
|
|
203
|
+
}), S.append(e, n);
|
|
204
|
+
},
|
|
205
|
+
$$slots: { default: !0 }
|
|
206
|
+
});
|
|
207
|
+
var l = S.sibling(c, 2), u = S.only_child(l, !0);
|
|
208
|
+
S.reset(o);
|
|
209
|
+
var d = S.sibling(o, 2), f = (e) => {
|
|
210
|
+
var t = E();
|
|
211
|
+
S.each(t, 21, () => S.get(G), S.index, (e, t) => {
|
|
212
|
+
var n = pe(), r = S.child(n), i = S.sibling(r);
|
|
213
|
+
S.reset(n), S.template_effect(() => S.set_text(r, `${S.get(t).email ?? ""} · ${S.get(t).role ?? ""} `)), S.delegated("click", i, () => ye(S.get(t).email)), S.append(e, n);
|
|
214
|
+
}), S.reset(t), S.append(e, t);
|
|
215
|
+
};
|
|
216
|
+
S.if(d, (e) => {
|
|
217
|
+
S.get(G).length > 0 && e(f);
|
|
218
|
+
}), S.reset(r), S.template_effect((e, t) => {
|
|
219
|
+
S.set_text(a, e), S.set_text(u, t);
|
|
220
|
+
}, [() => n(), () => t()]), S.delegated("keydown", s, (e) => {
|
|
221
|
+
e.key === "Enter" && (e.preventDefault(), Z());
|
|
222
|
+
}), S.bind_value(s, () => S.get(U), (e) => S.set(U, e)), S.delegated("click", l, Z), S.append(e, r);
|
|
223
|
+
};
|
|
224
|
+
S.if(k, (e) => {
|
|
225
|
+
S.get(z) === "restricted" && e(A);
|
|
226
|
+
});
|
|
227
|
+
var j = S.sibling(k, 2), M = (e) => {
|
|
228
|
+
var t = he(), n = S.only_child(t, !0);
|
|
229
|
+
S.template_effect(() => S.set_text(n, S.get(Y))), S.append(e, t);
|
|
230
|
+
};
|
|
231
|
+
S.if(j, (e) => {
|
|
232
|
+
S.get(Y) && e(M);
|
|
233
|
+
});
|
|
234
|
+
var N = S.sibling(j, 2), P = S.only_child(N, !0);
|
|
235
|
+
S.reset(o), S.template_effect((e, t, n, r) => {
|
|
236
|
+
S.set_class(c, 1, `grid ${S.get(X).length === 1 ? "grid-cols-1" : "grid-cols-2"} gap-2 rounded-lg bg-muted p-1`), S.set_text(p, S.get(z) === "public" ? "Anyone with this link can view the document. The link may be forwarded." : "Only invited email addresses can comment or edit. A password fallback, when enabled, grants view-only access."), S.set_text(g, e), S.set_class(v, 1, `relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${S.get(R) ? "bg-primary" : "bg-input"}`), S.set_attribute(v, "aria-checked", S.get(R)), S.set_attribute(v, "aria-label", t), S.set_class(y, 1, `inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${S.get(R) ? "translate-x-4" : "translate-x-0.5"}`), S.set_text(D, n), N.disabled = S.get(J) || S.get(z) === "restricted" && S.get(G).length === 0 || S.get(R) && S.get(V).length < 8, S.set_text(P, r);
|
|
237
|
+
}, [
|
|
238
|
+
() => d(),
|
|
239
|
+
() => ne(),
|
|
240
|
+
() => i(),
|
|
241
|
+
() => S.get(J) ? ee() : s()
|
|
242
|
+
]), S.delegated("click", v, () => {
|
|
243
|
+
S.set(R, !S.get(R));
|
|
244
|
+
}), S.delegated("click", N, be), S.append(e, o);
|
|
245
|
+
}, j = (e) => {
|
|
246
|
+
var t = D(), n = S.child(t), r = S.only_child(n, !0), i = S.sibling(n, 2), a = S.child(i), s = S.only_child(a, !0), l = S.sibling(a, 2), u = S.only_child(l, !0);
|
|
247
|
+
S.reset(i);
|
|
248
|
+
var d = S.sibling(i, 2), f = S.only_child(d, !0);
|
|
249
|
+
S.reset(t), S.template_effect((e, t, n) => {
|
|
250
|
+
S.set_text(r, e), S.set_text(s, S.get(K)), S.set_text(u, t), S.set_text(f, n);
|
|
251
|
+
}, [
|
|
252
|
+
() => S.get(z) === "restricted" ? "Invitations were queued for delivery. This is not a public link." : p(),
|
|
253
|
+
() => S.get(q) ? c() : o(),
|
|
254
|
+
() => m()
|
|
255
|
+
]), S.delegated("click", l, xe), S.delegated("click", d, Q), S.append(e, t);
|
|
256
|
+
};
|
|
257
|
+
S.if(k, (e) => {
|
|
258
|
+
S.get(K) ? e(j, -1) : e(A);
|
|
259
|
+
}), S.reset(y), S.reset(g), S.template_effect((e, t, n) => {
|
|
260
|
+
S.set_attribute(v, "aria-label", e), S.set_text(C, `${t ?? ""} "${(_e() || F() || N()) ?? ""}"`), S.set_attribute(w, "aria-label", n);
|
|
261
|
+
}, [
|
|
262
|
+
() => e(),
|
|
263
|
+
() => u(),
|
|
264
|
+
() => e()
|
|
265
|
+
]), S.delegated("click", v, Q), S.delegated("click", w, Q), S.append(h, g);
|
|
266
|
+
};
|
|
267
|
+
S.if(Se, (e) => {
|
|
268
|
+
j() && e(Ce);
|
|
269
|
+
}), S.append(k, $), S.pop();
|
|
270
|
+
}
|
|
271
|
+
S.delegate(["click", "keydown"]);
|
|
272
|
+
//#endregion
|
|
273
|
+
export { k as t };
|