@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
|
@@ -1,2 +1,93 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as apiFetch } from "../assets/client-rfwQYYHY.js";
|
|
2
|
+
//#region src/lib/api/attachments.ts
|
|
3
|
+
/**
|
|
4
|
+
* Server-side attachment size limit (bytes). The backend reads this from
|
|
5
|
+
* `ATTACHMENT_MAX_SIZE_MB` (default 25 MB); we hard-code the same default
|
|
6
|
+
* here so the client UI rejects obviously-oversized files before they
|
|
7
|
+
* even hit the network. Operators who change the env var SHOULD also
|
|
8
|
+
* update this constant — they're intentionally separate to avoid a
|
|
9
|
+
* runtime config dependency in the frontend bundle.
|
|
10
|
+
*/
|
|
11
|
+
var MAX_FILE_SIZE = 26214400;
|
|
12
|
+
/**
|
|
13
|
+
* Request a presigned PUT URL from the backend. The returned URL is
|
|
14
|
+
* scoped to a single storage object and expires after `expiresIn` seconds.
|
|
15
|
+
* No file bytes cross the wire in this call.
|
|
16
|
+
*/
|
|
17
|
+
function presignAttachment(documentId, file, fetcher) {
|
|
18
|
+
return apiFetch(`/api/documents/${documentId}/attachments/presign`, {
|
|
19
|
+
method: "POST",
|
|
20
|
+
body: {
|
|
21
|
+
filename: file.name,
|
|
22
|
+
contentType: file.type,
|
|
23
|
+
size: file.size
|
|
24
|
+
}
|
|
25
|
+
}, fetcher);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Tell the backend to record an attachment row for an object that has
|
|
29
|
+
* already been PUT to storage. The backend verifies the object exists
|
|
30
|
+
* before inserting.
|
|
31
|
+
*/
|
|
32
|
+
function confirmAttachment(documentId, key, uploadToken, file, quotaReservationId, fetcher) {
|
|
33
|
+
return apiFetch(`/api/documents/${documentId}/attachments/confirm`, {
|
|
34
|
+
method: "POST",
|
|
35
|
+
body: {
|
|
36
|
+
key,
|
|
37
|
+
uploadToken,
|
|
38
|
+
filename: file.name,
|
|
39
|
+
contentType: file.type,
|
|
40
|
+
size: file.size,
|
|
41
|
+
...quotaReservationId ? { quotaReservationId } : {}
|
|
42
|
+
}
|
|
43
|
+
}, fetcher);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Upload an image attachment using the presigned-URL flow:
|
|
47
|
+
*
|
|
48
|
+
* 1. POST /attachments/presign — get a signed storage PUT URL (small JSON).
|
|
49
|
+
* 2. PUT <presigned URL> — stream the file bytes to storage directly
|
|
50
|
+
* (NOT through this API process).
|
|
51
|
+
* 3. POST /attachments/confirm — record the row; backend verifies the
|
|
52
|
+
* object actually exists in storage.
|
|
53
|
+
*
|
|
54
|
+
* The orchestration is transparent to callers — they keep calling
|
|
55
|
+
* `uploadAttachment(documentId, file)` exactly as before. Step 2 never
|
|
56
|
+
* touches `/api/*`, so the Bun/Elysia global body-size cap is irrelevant
|
|
57
|
+
* and large images (up to `MAX_FILE_SIZE`) upload without 413.
|
|
58
|
+
*/
|
|
59
|
+
async function uploadAttachment(documentId, file, fetcher) {
|
|
60
|
+
const presign = await presignAttachment(documentId, file, fetcher);
|
|
61
|
+
const putController = new AbortController();
|
|
62
|
+
const putTimeout = setTimeout(() => putController.abort(), 3e5);
|
|
63
|
+
let putResponse;
|
|
64
|
+
try {
|
|
65
|
+
putResponse = await fetch(presign.url, {
|
|
66
|
+
method: "PUT",
|
|
67
|
+
body: file,
|
|
68
|
+
headers: { "Content-Type": file.type },
|
|
69
|
+
signal: putController.signal
|
|
70
|
+
});
|
|
71
|
+
} catch (error) {
|
|
72
|
+
await confirmAttachment(documentId, presign.key, presign.uploadToken, file, presign.quotaReservationId, fetcher).catch(() => void 0);
|
|
73
|
+
throw error;
|
|
74
|
+
} finally {
|
|
75
|
+
clearTimeout(putTimeout);
|
|
76
|
+
}
|
|
77
|
+
if (!putResponse.ok) {
|
|
78
|
+
await confirmAttachment(documentId, presign.key, presign.uploadToken, file, presign.quotaReservationId, fetcher).catch(() => void 0);
|
|
79
|
+
throw new Error(`Storage upload failed: ${putResponse.status} ${putResponse.statusText}`);
|
|
80
|
+
}
|
|
81
|
+
return confirmAttachment(documentId, presign.key, presign.uploadToken, file, presign.quotaReservationId, fetcher);
|
|
82
|
+
}
|
|
83
|
+
function listAttachments(documentId, fetcher) {
|
|
84
|
+
return apiFetch(`/api/documents/${documentId}/attachments`, {}, fetcher);
|
|
85
|
+
}
|
|
86
|
+
function isImageFile(file) {
|
|
87
|
+
return file.type.startsWith("image/");
|
|
88
|
+
}
|
|
89
|
+
function isFileSizeAllowed(file) {
|
|
90
|
+
return file.size <= MAX_FILE_SIZE;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
2
93
|
export { confirmAttachment, isFileSizeAllowed, isImageFile, listAttachments, presignAttachment, uploadAttachment };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setDocumentCategory, c as updateCategoryInputSchema, i as listCategories, n as createCategoryInputSchema, o as setFolderCategory, r as deleteCategory, s as updateCategory, t as createCategory } from "../assets/categories-
|
|
1
|
+
import { a as setDocumentCategory, c as updateCategoryInputSchema, i as listCategories, n as createCategoryInputSchema, o as setFolderCategory, r as deleteCategory, s as updateCategory, t as createCategory } from "../assets/categories-C_dxFoHi.js";
|
|
2
2
|
export { createCategory, createCategoryInputSchema, deleteCategory, listCategories, setDocumentCategory, setFolderCategory, updateCategory, updateCategoryInputSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as importDocument, c as updateDocument, i as getDocument, n as createDocument, o as importDocuments, r as deleteDocument, s as listDocuments, t as clearDocumentsCache } from "../assets/documents-
|
|
1
|
+
import { a as importDocument, c as updateDocument, i as getDocument, n as createDocument, o as importDocuments, r as deleteDocument, s as listDocuments, t as clearDocumentsCache } from "../assets/documents-CEuA1V6N.js";
|
|
2
2
|
export { clearDocumentsCache, createDocument, deleteDocument, getDocument, importDocument, importDocuments, listDocuments, updateDocument };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getFolder, c as updateFolder, i as duplicateDocument, n as deleteDocument, o as getFolderPath, r as deleteFolder, s as listFolders, t as createFolder } from "../assets/folders-
|
|
1
|
+
import { a as getFolder, c as updateFolder, i as duplicateDocument, n as deleteDocument, o as getFolderPath, r as deleteFolder, s as listFolders, t as createFolder } from "../assets/folders-BOXeb9hz.js";
|
|
2
2
|
export { createFolder, deleteDocument, deleteFolder, duplicateDocument, getFolder, getFolderPath, listFolders, updateFolder };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateProfile, i as updateEmbeddingConfig, n as getEmbeddingConfig, r as getProfile, t as deleteAccount } from "../assets/settings-
|
|
1
|
+
import { a as updateProfile, i as updateEmbeddingConfig, n as getEmbeddingConfig, r as getProfile, t as deleteAccount } from "../assets/settings-DwAcLGM1.js";
|
|
2
2
|
export { deleteAccount, getEmbeddingConfig, getProfile, updateEmbeddingConfig, updateProfile };
|
|
@@ -1,2 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as apiFetch } from "../assets/client-rfwQYYHY.js";
|
|
2
|
+
//#region src/lib/api/share.ts
|
|
3
|
+
function createShareLink(data, fetcher) {
|
|
4
|
+
if (!data.documentId && !data.folderId && !data.categoryId) return Promise.reject(/* @__PURE__ */ new Error("createShareLink: documentId, folderId, or categoryId is required"));
|
|
5
|
+
return apiFetch("/api/share", {
|
|
6
|
+
method: "POST",
|
|
7
|
+
body: JSON.stringify(data)
|
|
8
|
+
}, fetcher);
|
|
9
|
+
}
|
|
10
|
+
function listShareLinks(params) {
|
|
11
|
+
const qs = params?.documentId ? `?documentId=${params.documentId}` : "";
|
|
12
|
+
return apiFetch(`/api/share${qs}`);
|
|
13
|
+
}
|
|
14
|
+
function getShareLink(token) {
|
|
15
|
+
if (!token) return Promise.reject(/* @__PURE__ */ new Error("getShareLink: token is required"));
|
|
16
|
+
return apiFetch(`/api/share/${token}`);
|
|
17
|
+
}
|
|
18
|
+
function revokeShareLink(id) {
|
|
19
|
+
return apiFetch(`/api/share/${id}`, { method: "DELETE" });
|
|
20
|
+
}
|
|
21
|
+
function addGuest(linkId, email) {
|
|
22
|
+
return apiFetch(`/api/share/${linkId}/guests`, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
body: JSON.stringify({ email })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function removeGuest(linkId, email) {
|
|
28
|
+
return apiFetch(`/api/share/${linkId}/guests/${encodeURIComponent(email)}`, { method: "DELETE" });
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
2
31
|
export { addGuest, createShareLink, getShareLink, listShareLinks, removeGuest, revokeShareLink };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getTag, c as updateTag, i as deleteTag, l as updateTagInputSchema, n as createTag, o as listTags, r as createTagInputSchema, s as removeTagFromDocument, t as addTagToDocument } from "../assets/tags-
|
|
1
|
+
import { a as getTag, c as updateTag, i as deleteTag, l as updateTagInputSchema, n as createTag, o as listTags, r as createTagInputSchema, s as removeTagFromDocument, t as addTagToDocument } from "../assets/tags-BBCoFYro.js";
|
|
2
2
|
export { addTagToDocument, createTag, createTagInputSchema, deleteTag, getTag, listTags, removeTagFromDocument, updateTag, updateTagInputSchema };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
import { t as Icon } from "./assets/Icon-Clqe8D8X.js";
|
|
2
|
+
import { n as provideDocsmintShareAdapter, t as getDocsmintShareAdapter } from "./assets/confirm-dialog-DeOR0SnQ.js";
|
|
3
|
+
import { n as searchPreferences } from "./assets/SettingsDialog-BdvHRAxF.js";
|
|
4
|
+
import { t as Sidebar } from "./assets/Sidebar-B3Saqn0O.js";
|
|
5
|
+
import { t as scroll_to_top_aria } from "./assets/scroll_to_top_aria-BN4ZfOnM.js";
|
|
6
6
|
import { o as provideDocsmintRequestAdapter, r as provideDocsmintRouteAdapter } from "./assets/route-context-BPRerEtZ.js";
|
|
7
7
|
import { t as editorPreferences } from "./assets/editor-preferences.svelte-iI5jJM1x.js";
|
|
8
8
|
import { d as refreshFolders } from "./assets/subfolders-refresh-store.svelte-CXHxQWKh.js";
|
|
9
|
-
import { n as refreshDocs, r as refreshTags } from "./assets/tag-store.svelte-
|
|
9
|
+
import { n as refreshDocs, r as refreshTags } from "./assets/tag-store.svelte-QRysvGKe.js";
|
|
10
10
|
import { t as HiaiDocsExtensionProvider } from "./assets/HiaiDocsExtensionProvider-BRKWmcDd.js";
|
|
11
11
|
import * as $ from "svelte/internal/server";
|
|
12
12
|
import { getContext, onDestroy, setContext, untrack } from "svelte";
|
|
13
|
-
//#region ../node_modules/.bun/lucide-svelte@0.
|
|
13
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+7a2629d9b18e82d0/node_modules/lucide-svelte/dist/icons/arrow-up.svelte
|
|
14
14
|
function Arrow_up($$renderer, $$props) {
|
|
15
15
|
const $$sanitized_props = $.sanitize_props($$props);
|
|
16
16
|
/**
|
|
17
|
-
* @license lucide-svelte
|
|
17
|
+
* @license lucide-svelte v1.0.1 - ISC
|
|
18
18
|
*
|
|
19
19
|
* ISC License
|
|
20
20
|
*
|
|
21
|
-
* Copyright (c)
|
|
21
|
+
* Copyright (c) 2026 Lucide Icons and Contributors
|
|
22
22
|
*
|
|
23
23
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
24
24
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -34,9 +34,13 @@ function Arrow_up($$renderer, $$props) {
|
|
|
34
34
|
*
|
|
35
35
|
* ---
|
|
36
36
|
*
|
|
37
|
-
* The
|
|
37
|
+
* The following Lucide icons are derived from the Feather project:
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
* airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
40
|
+
*
|
|
41
|
+
* The MIT License (MIT) (for the icons listed above)
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) 2013-present Cole Bemis
|
|
40
44
|
*
|
|
41
45
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
42
46
|
* of this software and associated documentation files (the "Software"), to deal
|
|
@@ -83,15 +87,15 @@ function Arrow_up($$renderer, $$props) {
|
|
|
83
87
|
]));
|
|
84
88
|
}
|
|
85
89
|
//#endregion
|
|
86
|
-
//#region ../node_modules/.bun/lucide-svelte@0.
|
|
90
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+7a2629d9b18e82d0/node_modules/lucide-svelte/dist/icons/menu.svelte
|
|
87
91
|
function Menu($$renderer, $$props) {
|
|
88
92
|
const $$sanitized_props = $.sanitize_props($$props);
|
|
89
93
|
/**
|
|
90
|
-
* @license lucide-svelte
|
|
94
|
+
* @license lucide-svelte v1.0.1 - ISC
|
|
91
95
|
*
|
|
92
96
|
* ISC License
|
|
93
97
|
*
|
|
94
|
-
* Copyright (c)
|
|
98
|
+
* Copyright (c) 2026 Lucide Icons and Contributors
|
|
95
99
|
*
|
|
96
100
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
97
101
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -107,9 +111,13 @@ function Menu($$renderer, $$props) {
|
|
|
107
111
|
*
|
|
108
112
|
* ---
|
|
109
113
|
*
|
|
110
|
-
* The
|
|
114
|
+
* The following Lucide icons are derived from the Feather project:
|
|
115
|
+
*
|
|
116
|
+
* airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
117
|
+
*
|
|
118
|
+
* The MIT License (MIT) (for the icons listed above)
|
|
111
119
|
*
|
|
112
|
-
* Copyright (c) 2013-
|
|
120
|
+
* Copyright (c) 2013-present Cole Bemis
|
|
113
121
|
*
|
|
114
122
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
115
123
|
* of this software and associated documentation files (the "Software"), to deal
|
|
@@ -178,8 +186,7 @@ var mobileSidebar = {
|
|
|
178
186
|
function MobileSidebarToggle($$renderer, $$props) {
|
|
179
187
|
$$renderer.component(($$renderer) => {
|
|
180
188
|
let { buttonRef = null, controls = "mobile-navigation" } = $$props;
|
|
181
|
-
$$renderer.push(
|
|
182
|
-
$$renderer.push(`<button type="button"${$.attr("aria-label", mobileSidebar.open ? "Close navigation menu" : "Open navigation menu")}${$.attr("aria-expanded", mobileSidebar.open)}${$.attr("aria-controls", controls)} class="mobile-sidebar-toggle fixed left-3 top-3 flex size-11 items-center justify-center rounded-md border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-accent md:hidden" style="top: calc(0.75rem + env(safe-area-inset-top));">`);
|
|
189
|
+
$$renderer.push(`<!--[0--><button type="button"${$.attr("aria-label", mobileSidebar.open ? "Close navigation menu" : "Open navigation menu")}${$.attr("aria-expanded", mobileSidebar.open)}${$.attr("aria-controls", controls)} class="mobile-sidebar-toggle fixed left-3 top-3 flex size-11 items-center justify-center rounded-md border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-accent md:hidden" style="top: calc(0.75rem + env(safe-area-inset-top));">`);
|
|
183
190
|
Menu($$renderer, { class: "size-5" });
|
|
184
191
|
$$renderer.push(`<!----></button>`);
|
|
185
192
|
$$renderer.push(`<!--]-->`);
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Copy } from "./copy-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
1
|
+
import { t as Circle_check } from "./circle-check-BRhWPZo1.js";
|
|
2
|
+
import { t as Copy } from "./copy-DRMKiRZ0.js";
|
|
3
|
+
import { t as Loader_circle } from "./loader-circle-BpRVrMZg.js";
|
|
4
|
+
import { t as action_cancel } from "./action_cancel-OVgQDP5Q.js";
|
|
5
|
+
import { t as action_create } from "./action_create-hqJWjyqh.js";
|
|
6
|
+
import { t as action_delete } from "./action_delete-B1-16jSo.js";
|
|
7
|
+
import { t as action_save } from "./action_save-Bx7vlLZI.js";
|
|
8
|
+
import { a as categories_delete_success_description, c as categories_delete_description, i as categories_delete_title, l as categories_create_title, n as categories_name_placeholder, o as categories_delete_success, r as categories_edit_title, s as categories_delete_error, t as categories_update_error, u as categories_create_error } from "./categories_update_error-DkKgsqdD.js";
|
|
5
9
|
import { a as getDocsmintRequestAdapter } from "./route-context-BPRerEtZ.js";
|
|
6
|
-
import { a as Dialog_content, i as Dialog_description, n as Dialog_header, o as Dialog, r as Dialog_footer, s as Button, t as Dialog_title } from "./dialog
|
|
7
|
-
import { t as Input } from "./input-
|
|
8
|
-
import { t as Label } from "./label-
|
|
9
|
-
import { a as listApiKeys, n as categoryIdFromScopes, o as revealCategoryApiKey, r as createCategoryApiKey, s as revokeApiKey, t as apiKeyClipboardValue } from "./api-keys-
|
|
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 Dialog_content, i as Dialog_description, n as Dialog_header, o as Dialog, r as Dialog_footer, s as Button, t as Dialog_title } from "./dialog--tDgDGw9.js";
|
|
11
|
+
import { t as Input } from "./input-BlAj7LzC.js";
|
|
12
|
+
import { t as Label } from "./label-BRToaMg9.js";
|
|
13
|
+
import { a as listApiKeys, n as categoryIdFromScopes, o as revealCategoryApiKey, r as createCategoryApiKey, s as revokeApiKey, t as apiKeyClipboardValue } from "./api-keys-CHOrbU-Q.js";
|
|
14
|
+
import { a as Select, i as Select_content, n as Select_trigger, r as Select_item, t as Select_value } from "./select-value-BCWSsoTd.js";
|
|
11
15
|
import * as $ from "svelte/internal/server";
|
|
12
16
|
//#region src/lib/components/sidebar/category-api-key-flow.ts
|
|
13
17
|
async function issueCategoryKeyAfterSavingAccess(input) {
|
|
@@ -262,18 +266,15 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
262
266
|
});
|
|
263
267
|
$$renderer.push(`<!----> `);
|
|
264
268
|
if (deletedCategoryName) {
|
|
265
|
-
$$renderer.push(
|
|
266
|
-
$$renderer.push(`<div class="flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/10 p-4" role="status" aria-live="polite">`);
|
|
269
|
+
$$renderer.push(`<!--[0--><div class="flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/10 p-4" role="status" aria-live="polite">`);
|
|
267
270
|
Circle_check($$renderer, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
268
271
|
$$renderer.push(`<!----> <div><p class="text-sm font-medium text-foreground">${$.escape(categories_delete_success())}</p> <p class="text-sm text-muted-foreground"><span class="font-medium text-foreground">“${$.escape(deletedCategoryName)}”</span> ${$.escape(categories_delete_success_description())}</p></div></div>`);
|
|
269
272
|
} else if (createdCategoryName) {
|
|
270
|
-
$$renderer.push(
|
|
271
|
-
$$renderer.push(`<div class="space-y-3 rounded-lg border border-primary/30 bg-primary/10 p-4" role="status" aria-live="polite"><div class="flex items-start gap-3">`);
|
|
273
|
+
$$renderer.push(`<!--[1--><div class="space-y-3 rounded-lg border border-primary/30 bg-primary/10 p-4" role="status" aria-live="polite"><div class="flex items-start gap-3">`);
|
|
272
274
|
Circle_check($$renderer, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
273
275
|
$$renderer.push(`<!----> <div><p class="text-sm font-medium text-foreground">Category created</p> <p class="text-sm text-muted-foreground">${$.escape(createdCategoryName)} is ready to use.</p></div></div> `);
|
|
274
276
|
if (createdCategoryKey) {
|
|
275
|
-
$$renderer.push(
|
|
276
|
-
$$renderer.push(`<div class="rounded-md border border-primary/20 bg-background/80 p-3"><p class="text-xs font-medium text-foreground">Copy the API key now. It remains available in Settings → API.</p> <code class="mt-2 block break-all rounded bg-muted p-2 text-xs text-foreground">${$.escape(createdCategoryKey)}</code> `);
|
|
277
|
+
$$renderer.push(`<!--[0--><div class="rounded-md border border-primary/20 bg-background/80 p-3"><p class="text-xs font-medium text-foreground">Copy the API key now. It remains available in Settings → API.</p> <code class="mt-2 block break-all rounded bg-muted p-2 text-xs text-foreground">${$.escape(createdCategoryKey)}</code> `);
|
|
277
278
|
Button($$renderer, {
|
|
278
279
|
type: "button",
|
|
279
280
|
size: "sm",
|
|
@@ -289,14 +290,11 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
289
290
|
$$renderer.push(`<!----></div>`);
|
|
290
291
|
} else $$renderer.push("<!--[-1-->");
|
|
291
292
|
$$renderer.push(`<!--]--> `);
|
|
292
|
-
if (error) {
|
|
293
|
-
|
|
294
|
-
$$renderer.push(`<p class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
295
|
-
} else $$renderer.push("<!--[-1-->");
|
|
293
|
+
if (error) $$renderer.push(`<!--[0--><p class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
294
|
+
else $$renderer.push("<!--[-1-->");
|
|
296
295
|
$$renderer.push(`<!--]--></div>`);
|
|
297
296
|
} else if (!isDeleteMode()) {
|
|
298
|
-
$$renderer.push("
|
|
299
|
-
$$renderer.push(`<form data-category-dialog-scroll="" class="max-h-[calc(100dvh-12rem)] space-y-4 overflow-y-auto overscroll-contain px-1"><div class="space-y-2">`);
|
|
297
|
+
$$renderer.push(`<!--[2--><form data-category-dialog-scroll="" class="max-h-[calc(100dvh-12rem)] space-y-4 overflow-y-auto overscroll-contain px-1"><div class="space-y-2">`);
|
|
300
298
|
Label($$renderer, {
|
|
301
299
|
for: "category-dialog-name",
|
|
302
300
|
children: ($$renderer) => {
|
|
@@ -325,10 +323,8 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
325
323
|
}
|
|
326
324
|
});
|
|
327
325
|
$$renderer.push(`<!----> `);
|
|
328
|
-
if (error) {
|
|
329
|
-
|
|
330
|
-
$$renderer.push(`<p id="category-dialog-name-error" class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
331
|
-
} else $$renderer.push("<!--[-1-->");
|
|
326
|
+
if (error) $$renderer.push(`<!--[0--><p id="category-dialog-name-error" class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
327
|
+
else $$renderer.push("<!--[-1-->");
|
|
332
328
|
$$renderer.push(`<!--]--></div> <div class="space-y-2">`);
|
|
333
329
|
Label($$renderer, {
|
|
334
330
|
for: "category-dialog-api-mode",
|
|
@@ -443,8 +439,7 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
443
439
|
}
|
|
444
440
|
$$renderer.push(`</div> `);
|
|
445
441
|
if (apiMode !== "unavailable") {
|
|
446
|
-
$$renderer.push(
|
|
447
|
-
$$renderer.push(`<div class="space-y-3 rounded-md border border-border/70 bg-muted/30 p-3"><div class="flex flex-wrap items-center justify-between gap-2">`);
|
|
442
|
+
$$renderer.push(`<!--[0--><div class="space-y-3 rounded-md border border-border/70 bg-muted/30 p-3"><div class="flex flex-wrap items-center justify-between gap-2">`);
|
|
448
443
|
Label($$renderer, {
|
|
449
444
|
class: "text-sm",
|
|
450
445
|
children: ($$renderer) => {
|
|
@@ -478,8 +473,7 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
478
473
|
} else $$renderer.push("<!--[-1-->");
|
|
479
474
|
$$renderer.push(`<!--]--> `);
|
|
480
475
|
if (mode === "edit" && apiMode === "category" && category?.id) {
|
|
481
|
-
$$renderer.push(
|
|
482
|
-
$$renderer.push(`<div class="space-y-3 rounded-md border border-border/70 p-3"><div class="flex items-center justify-between gap-2 max-sm:flex-col max-sm:items-stretch"><div>`);
|
|
476
|
+
$$renderer.push(`<!--[0--><div class="space-y-3 rounded-md border border-border/70 p-3"><div class="flex items-center justify-between gap-2 max-sm:flex-col max-sm:items-stretch"><div>`);
|
|
483
477
|
Label($$renderer, {
|
|
484
478
|
children: ($$renderer) => {
|
|
485
479
|
$$renderer.push(`<!---->Category API keys`);
|
|
@@ -499,8 +493,7 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
499
493
|
});
|
|
500
494
|
$$renderer.push(`<!----></div> `);
|
|
501
495
|
if (latestIssuedKey()) {
|
|
502
|
-
$$renderer.push(
|
|
503
|
-
$$renderer.push(`<div class="rounded-lg border border-primary/30 bg-primary/10 p-3 text-primary"><p class="text-xs font-medium">Copy now — this raw key is shown once.</p> <code class="mt-1 block break-all rounded bg-background/80 p-2 text-xs text-foreground">${$.escape(latestIssuedKey())}</code> `);
|
|
496
|
+
$$renderer.push(`<!--[0--><div class="rounded-lg border border-primary/30 bg-primary/10 p-3 text-primary"><p class="text-xs font-medium">Copy now — this raw key is shown once.</p> <code class="mt-1 block break-all rounded bg-background/80 p-2 text-xs text-foreground">${$.escape(latestIssuedKey())}</code> `);
|
|
504
497
|
Button($$renderer, {
|
|
505
498
|
type: "button",
|
|
506
499
|
size: "sm",
|
|
@@ -547,10 +540,8 @@ function CategoryDialog($$renderer, $$props) {
|
|
|
547
540
|
$$renderer.push(`<!--]--></div></div>`);
|
|
548
541
|
} else $$renderer.push("<!--[-1-->");
|
|
549
542
|
$$renderer.push(`<!--]--></form>`);
|
|
550
|
-
} else if (error) {
|
|
551
|
-
|
|
552
|
-
$$renderer.push(`<p class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
553
|
-
} else $$renderer.push("<!--[-1-->");
|
|
543
|
+
} else if (error) $$renderer.push(`<!--[3--><p class="text-xs text-destructive" role="alert">${$.escape(error)}</p>`);
|
|
544
|
+
else $$renderer.push("<!--[-1-->");
|
|
554
545
|
$$renderer.push(`<!--]--> `);
|
|
555
546
|
Dialog_footer($$renderer, {
|
|
556
547
|
class: "gap-2 max-sm:flex-col max-sm:items-stretch",
|