braian 0.0.4 → 0.0.7
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 +31 -7
- package/bin/braian.mjs +339 -60
- package/bin/launch-target.mjs +15 -27
- package/bin/node-version.mjs +72 -0
- package/bin/run-state.mjs +203 -0
- package/dist/agent/graph-agent.service.js +43 -0
- package/dist/app.module.js +4 -0
- package/dist/auth/auth.controller.js +2 -2
- package/dist/auth/auth.guard.js +34 -5
- package/dist/auth/auth.module.js +13 -2
- package/dist/auth/auth.service.js +8 -2
- package/dist/auth/link-route-policies.js +267 -0
- package/dist/auth/link-route-policy.js +27 -0
- package/dist/auth/vault-access-denied.filter.js +30 -0
- package/dist/auth/vault-access.interceptor.js +45 -0
- package/dist/auth/vault-link-principal.js +15 -0
- package/dist/auth/vault-link-sessions.service.js +186 -0
- package/dist/bootstrap.js +9 -1
- package/dist/collab/collab.service.js +12 -2
- package/dist/desktop/exposure.js +7 -1
- package/dist/entity/entity.controller.js +9 -1
- package/dist/events/vault-events.service.js +17 -4
- package/dist/files/dto/vault-files.dto.js +113 -6
- package/dist/files/file-url-signer.js +37 -11
- package/dist/files/files-http-error.js +1 -1
- package/dist/files/vault-file-archive.service.js +19 -4
- package/dist/files/vault-file-content.controller.js +29 -1
- package/dist/files/vault-file-content.service.js +18 -2
- package/dist/http/api-controllers.js +12 -0
- package/dist/http/log-redaction.js +23 -0
- package/dist/http/published-page-address.js +58 -0
- package/dist/http/request-guards.js +51 -1
- package/dist/http/security-headers.js +2 -1
- package/dist/http/vault-http-error.js +4 -1
- package/dist/http/web-app-fallback.js +37 -0
- package/dist/journal/active-journal.dto.js +4 -3
- package/dist/logging/logging.middleware.js +3 -1
- package/dist/main.js +3 -0
- package/dist/mcp/mcp-path.js +12 -0
- package/dist/mcp/mcp-settings.controller.js +78 -0
- package/dist/mcp/mcp.controller.js +147 -0
- package/dist/mcp/mcp.dto.js +53 -0
- package/dist/mcp/mcp.module.js +20 -0
- package/dist/mcp/mcp.service.js +117 -0
- package/dist/navigation/navigation.service.js +16 -1
- package/dist/providers/claude-messages-model.js +2 -2
- package/dist/providers/model-provider.service.js +74 -11
- package/dist/providers/provider-catalog-storage.js +4 -3
- package/dist/providers/provider-model-catalog.js +46 -0
- package/dist/providers/provider.controller.js +83 -0
- package/dist/rss/rss-profiles.controller.js +167 -0
- package/dist/rss/rss-profiles.dto.js +512 -0
- package/dist/rss/rss-profiles.service.js +149 -0
- package/dist/rss/rss.module.js +5 -2
- package/dist/search/search-database.service.js +40 -24
- package/dist/search/search-embedding-settings.controller.js +82 -0
- package/dist/search/search-embedding.service.js +33 -28
- package/dist/search/search-index-health.js +1 -1
- package/dist/search/search-sync.service.js +8 -0
- package/dist/search/search.controller.js +34 -54
- package/dist/search/search.module.js +3 -3
- package/dist/sessions/agent-runs.controller.js +3 -3
- package/dist/sessions/dto/graph-session.dto.js +6 -5
- package/dist/sessions/sessions.service.js +33 -1
- package/dist/settings/settings.controller.js +11 -0
- package/dist/settings/settings.dto.js +29 -24
- package/dist/settings/settings.service.js +6 -0
- package/dist/shares/share-http-error.js +2 -2
- package/dist/shares/share.dto.js +74 -16
- package/dist/shares/shared-webpage-headers.js +45 -0
- package/dist/shares/shared-webpage.controller.js +179 -0
- package/dist/shares/shares.controller.js +3 -3
- package/dist/shares/shares.module.js +2 -1
- package/dist/shares/shares.service.js +11 -4
- package/dist/sqlite-files/vault-sqlite.service.js +1 -0
- package/dist/vault-access/vault-access.controller.js +73 -0
- package/dist/vault-access/vault-access.dto.js +28 -0
- package/dist/vault-access/vault-access.module.js +19 -0
- package/dist/vault-access/vault-access.service.js +49 -0
- package/dist/vaults/vault.controller.js +61 -0
- package/dist/vaults/vault.dto.js +188 -50
- package/dist/vaults/vaults.module.js +2 -1
- package/dist/vaults/vaults.service.js +58 -2
- package/dist/versioning/versioning.service.js +47 -8
- package/dist/workspace/workspace-config.js +3 -3
- package/node_modules/@braian/ai-providers/dist/index.js +13 -3
- package/node_modules/@braian/ai-providers/dist/jev-routing.js +41 -13
- package/node_modules/@braian/ai-providers/dist/openrouter-catalog.js +57 -0
- package/node_modules/@braian/ai-providers/dist/provider-catalog.js +47 -2
- package/node_modules/@braian/ai-providers/dist/providers-models.js +27 -7
- package/node_modules/@braian/graph-agent/assets/agent-instructions/default/26-schema.md +1 -1
- package/node_modules/@braian/graph-agent/dist/agent-features.js +1 -1
- package/node_modules/@braian/graph-agent/dist/agent-profiles/registry.js +9 -0
- package/node_modules/@braian/graph-agent/dist/agent-profiles/tool-catalog.js +4 -4
- package/node_modules/@braian/graph-agent/dist/agent-runs/run-registry.js +1 -1
- package/node_modules/@braian/graph-agent/dist/auth-registry.js +29 -0
- package/node_modules/@braian/graph-agent/dist/boards/boards-settings.js +20 -0
- package/node_modules/@braian/graph-agent/dist/boards/index.js +5 -0
- package/node_modules/@braian/graph-agent/dist/data-workspace.js +171 -14
- package/node_modules/@braian/graph-agent/dist/demo-vaults.js +348 -0
- package/node_modules/@braian/graph-agent/dist/feature-switch.js +6 -2
- package/node_modules/@braian/graph-agent/dist/files-settings.js +10 -2
- package/node_modules/@braian/graph-agent/dist/graph-agent.js +40 -7
- package/node_modules/@braian/graph-agent/dist/ide/ide-settings.js +58 -0
- package/node_modules/@braian/graph-agent/dist/ide/index.js +6 -0
- package/node_modules/@braian/graph-agent/dist/ide-layout.js +1 -1
- package/node_modules/@braian/graph-agent/dist/index.js +45 -6
- package/node_modules/@braian/graph-agent/dist/journal-reflection.js +2 -1
- package/node_modules/@braian/graph-agent/dist/locked-graph-store.js +11 -2
- package/node_modules/@braian/graph-agent/dist/mcp-tokens.js +62 -0
- package/node_modules/@braian/graph-agent/dist/mentioned-notes-input.js +1 -1
- package/node_modules/@braian/graph-agent/dist/navigation-settings.js +20 -14
- package/node_modules/@braian/graph-agent/dist/note-collab-policy.js +4 -1
- package/node_modules/@braian/graph-agent/dist/note-collab-projection.js +4 -3
- package/node_modules/@braian/graph-agent/dist/note-collab-registry.js +12 -9
- package/node_modules/@braian/graph-agent/dist/note-collab-session.js +2 -1
- package/node_modules/@braian/graph-agent/dist/note-editor/index.js +13 -0
- package/node_modules/@braian/graph-agent/dist/note-editor/note-editor-settings.js +98 -0
- package/node_modules/@braian/graph-agent/dist/note-key-settings.js +34 -2
- package/node_modules/@braian/graph-agent/dist/rss/index.js +45 -1
- package/node_modules/@braian/graph-agent/dist/rss/rss-feed-parse.js +18 -1
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-model.js +378 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-store.js +179 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-test.js +120 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-use-cases.js +76 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-settings.js +15 -0
- package/node_modules/@braian/graph-agent/dist/screen-context-input.js +1 -1
- package/node_modules/@braian/graph-agent/dist/secret-masking.js +54 -15
- package/node_modules/@braian/graph-agent/dist/secret-vault.js +48 -3
- package/node_modules/@braian/graph-agent/dist/session-registry.js +3 -2
- package/node_modules/@braian/graph-agent/dist/settings-registry.js +21 -178
- package/node_modules/@braian/graph-agent/dist/settings-reset/index.js +9 -0
- package/node_modules/@braian/graph-agent/dist/settings-reset/settings-reset.js +85 -0
- package/node_modules/@braian/graph-agent/dist/share-edit-references.js +15 -14
- package/node_modules/@braian/graph-agent/dist/share-policy.js +86 -21
- package/node_modules/@braian/graph-agent/dist/share-registry.js +18 -11
- package/node_modules/@braian/graph-agent/dist/share-target-description.js +6 -0
- package/node_modules/@braian/graph-agent/dist/share-use-cases.js +99 -3
- package/node_modules/@braian/graph-agent/dist/share-webpage-links.js +40 -0
- package/node_modules/@braian/graph-agent/dist/shared-dashboard-view.js +2 -1
- package/node_modules/@braian/graph-agent/dist/spotlight-settings.js +2 -15
- package/node_modules/@braian/graph-agent/dist/standalone-pages.js +111 -0
- package/node_modules/@braian/graph-agent/dist/tools.js +4 -2
- package/node_modules/@braian/graph-agent/dist/types.js +7 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/index.js +36 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-access-policy.js +127 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-access-scope.js +60 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-link-features.js +48 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-link-grant.js +47 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-settings-access.js +44 -0
- package/node_modules/@braian/graph-agent/dist/vault-changes.js +3 -0
- package/node_modules/@braian/graph-agent/dist/vault-files.js +73 -14
- package/node_modules/@braian/graph-agent/dist/vault-settings-operations.js +43 -12
- package/node_modules/@braian/graph-agent/dist/vault-settings-registry.js +111 -20
- package/node_modules/@braian/html-standalone/dist/css.js +44 -0
- package/node_modules/@braian/html-standalone/dist/data-uri.js +48 -0
- package/node_modules/@braian/html-standalone/dist/html.js +118 -0
- package/node_modules/@braian/html-standalone/dist/index.js +9 -0
- package/node_modules/@braian/html-standalone/dist/local-reference.js +64 -0
- package/node_modules/@braian/html-standalone/dist/standalone.js +143 -0
- package/node_modules/@braian/html-standalone/package.json +22 -0
- package/node_modules/@braian/sqlite-browser/dist/execute.js +47 -2
- package/node_modules/@braian/vault-fs-sdk/dist/fs-vault-strategy.js +23 -0
- package/node_modules/@braian/vault-fs-sdk/dist/index.js +5 -1
- package/node_modules/@braian/vault-fs-sdk/dist/vault-index.js +5 -0
- package/node_modules/@braian/voice-transcription/dist/transcribe.js +1 -1
- package/package.json +7 -2
- package/public/assets/{ArrowClockwise.es-DWqWLk15.js → ArrowClockwise.es-3-WDmIeI.js} +1 -1
- package/public/assets/{ArrowDown.es-COHGTGu_.js → ArrowDown.es--soRLxEp.js} +1 -1
- package/public/assets/{ArrowLeft.es-Dvz_4AVp.js → ArrowLeft.es-CbZG51Gr.js} +1 -1
- package/public/assets/{ArrowSquareOut.es-ssfQ7LE-.js → ArrowSquareOut.es-yh2fX_Cs.js} +1 -1
- package/public/assets/{ArrowUp.es-DflnZKsA.js → ArrowUp.es-CIIkDrf9.js} +1 -1
- package/public/assets/{ArrowsClockwise.es-DSXy5pW3.js → ArrowsClockwise.es-D0399ubU.js} +1 -1
- package/public/assets/{ArrowsIn.es-B4Aie-uw.js → ArrowsIn.es-B54L_O6A.js} +1 -1
- package/public/assets/Browser.es-BqZU_2qv.js +1 -0
- package/public/assets/Circle.es-j7f1_WI9.js +1 -0
- package/public/assets/{Clock.es-D6bs8ZLR.js → Clock.es-DkUjmG8U.js} +1 -1
- package/public/assets/{Copy.es-CglRiQSZ.js → Copy.es-DfOdr0jv.js} +1 -1
- package/public/assets/CopySimple.es-BBthx5Du.js +1 -0
- package/public/assets/CornersOut.es-Cd9DgMlt.js +1 -0
- package/public/assets/Crosshair.es-9qdLaRA1.js +1 -0
- package/public/assets/{Desktop.es-DVtEXtRb.js → Desktop.es-DSRSg0hy.js} +1 -1
- package/public/assets/{DotsSixVertical.es-B7kGbvvH.js → DotsSixVertical.es-Cg2wLxmG.js} +1 -1
- package/public/assets/{Eye.es-DKoV8w-8.js → Eye.es-CxGbwLRS.js} +1 -1
- package/public/assets/{EyeSlash.es-C_H7lJGL.js → EyeSlash.es-DfTto7s1.js} +1 -1
- package/public/assets/{File.es-47KQbmb4.js → File.es-D3fdUSmS.js} +1 -1
- package/public/assets/FloppyDisk.es-CVEXDdFf.js +1 -0
- package/public/assets/{Folder.es-DKrkcRQj.js → Folder.es-BUMi6qzZ.js} +1 -1
- package/public/assets/{FolderOpen.es-DaW9wv8-.js → FolderOpen.es-FcjULnXZ.js} +1 -1
- package/public/assets/{FolderPlus.es-D0scempH.js → FolderPlus.es-Deuvtys5.js} +1 -1
- package/public/assets/GearSix.es-CWRB8Up2.js +1 -0
- package/public/assets/List.es-C0rMRBfB.js +1 -0
- package/public/assets/{ListBullets.es-DGeupXZ3.js → ListBullets.es-B7JvZb2M.js} +1 -1
- package/public/assets/{LockSimple.es-DiQO6y_F.js → LockSimple.es-D5Ul9U6c.js} +1 -1
- package/public/assets/LockSimpleOpen.es-C2JGRKEE.js +1 -0
- package/public/assets/{MagnifyingGlass.es-CHks7m9E.js → MagnifyingGlass.es-BPnvTl_3.js} +1 -1
- package/public/assets/{Microphone.es-CQat-MJ8.js → Microphone.es-BXBLW9YD.js} +1 -1
- package/public/assets/{Play.es-h1Fhb5wo.js → Play.es-BT5cMJ7L.js} +1 -1
- package/public/assets/{Plus.es-B-svcAlu.js → Plus.es-aakfbgmy.js} +1 -1
- package/public/assets/{Prohibit.es-M5ljYyQ3.js → Prohibit.es-pwiGfWLj.js} +1 -1
- package/public/assets/{QrCode.es-CVlyfpjq.js → QrCode.es-DCPGPGYZ.js} +1 -1
- package/public/assets/ShareNetwork-CTDRol5F.css +1 -0
- package/public/assets/ShareNetwork.es-Do0IWaE9.js +3 -0
- package/public/assets/SidebarSimple.es-UdNMyfL-.js +1 -0
- package/public/assets/{SlidersHorizontal.es-DkPz8o7o.js → SlidersHorizontal.es-957OxRrd.js} +1 -1
- package/public/assets/{TextAa.es-CymAJ91v.js → TextAa.es-8d8-rRe1.js} +1 -1
- package/public/assets/{Trash.es-B7UVM9v_.js → Trash.es-chxTwNhO.js} +1 -1
- package/public/assets/WarningCircle.es-CF4lQ1bU.js +1 -0
- package/public/assets/advanced-security-B_SegWCz.js +1 -0
- package/public/assets/agent-profiles-settings-DZv5BUzj.js +1 -0
- package/public/assets/appearance-settings-module-DlOVkZXP.js +1 -0
- package/public/assets/{ar-SA-G6X2FPQ2-BPq1dwIU.js → ar-SA-G6X2FPQ2-DZP7qz6u.js} +1 -1
- package/public/assets/{attachment-embed-Bt5qCuKC.css → attachment-embed-CJkoG50a.css} +1 -1
- package/public/assets/attachment-embed-DVbcGTLJ.js +1 -0
- package/public/assets/attachments-settings-BuqoRFuK.js +1 -0
- package/public/assets/az-AZ-76LH7QW2-ByX_zd4F.js +1 -0
- package/public/assets/{bg-BG-XCXSNQG7-CpTkmSSX.js → bg-BG-XCXSNQG7-wxiUF1_6.js} +1 -1
- package/public/assets/blue-pgMgVzKw.css +1 -0
- package/public/assets/{bn-BD-2XOGV67Q-BDMEyCuA.js → bn-BD-2XOGV67Q-BBIhV1oq.js} +1 -1
- package/public/assets/{board-workspace-D9prroo0.css → board-workspace-CUeGZca9.css} +1 -1
- package/public/assets/board-workspace-pt2JAfWJ.js +1 -0
- package/public/assets/boards-settings-module-CaOcLdGN.js +1 -0
- package/public/assets/{boards-view-B1B8wHHn.js → boards-view-DEVAYmzH.js} +1 -1
- package/public/assets/{ca-ES-6MX7JW3Y-D0UEot-K.js → ca-ES-6MX7JW3Y-CKplVKfE.js} +1 -1
- package/public/assets/calendar-view-B-w_4BV-.js +1 -0
- package/public/assets/calendar-workspace-BiPYwfJr.js +1 -0
- package/public/assets/{calendars-settings-module-ActBZM9v.js → calendars-settings-module-DuwhjpAm.js} +1 -1
- package/public/assets/card-fields-BJ9YVWI0.css +1 -0
- package/public/assets/{card-fields-nzhTsBAW.js → card-fields-iDvc1GXx.js} +1 -1
- package/public/assets/{chat-composer-editor-CRtsZz3W.js → chat-composer-editor-CPfqqfXn.js} +1 -1
- package/public/assets/chat-message-list-Ds52ru39.js +1 -0
- package/public/assets/chunk-6U3AYISY-C6-Mtja1.js +12 -0
- package/public/assets/{chunk-EIO257PC-CGqfS2j0.js → chunk-EIO257PC-DvUJi4Nw.js} +1 -1
- package/public/assets/chunk-K2UTITRG-ZTIxemJp.js +41 -0
- package/public/assets/chunk-SRAX5OIU-wzfotNc-.js +1 -0
- package/public/assets/chunk-Z3N5DIM6-D9TMVU7m.js +1 -0
- package/public/assets/{code-editor-DnrGU9QQ.js → code-editor-BTcitmHE.js} +1 -1
- package/public/assets/code-editor-DIB7VOIc.css +1 -0
- package/public/assets/{color-picker-Cmg2HIDb.css → color-picker-BV0aOd4w.css} +1 -1
- package/public/assets/color-picker-WHiWktCJ.js +1 -0
- package/public/assets/{contents-view-C6RdJxE2.js → contents-view-DOVe1FVg.js} +1 -1
- package/public/assets/contents-view-XuasBH0m.css +1 -0
- package/public/assets/{conversation-debug-panel-DIjQShXO.js → conversation-debug-panel-C73_GL9P.js} +1 -1
- package/public/assets/{settings-view-6_hMxTXD.css → core-settings-module-DNS3W-dj.css} +1 -1
- package/public/assets/core-settings-module-_wQSD6hP.js +4 -0
- package/public/assets/create-note-popup-B-wM8Q5O.js +1 -0
- package/public/assets/{cs-CZ-2BRQDIVT-DvEBYfBD.js → cs-CZ-2BRQDIVT-CHlJO48i.js} +1 -1
- package/public/assets/{cypher-editor-Cdd9vqJj.js → cypher-editor-M9g--02t.js} +1 -1
- package/public/assets/{da-DK-5WZEPLOC-nBVf9B0e.js → da-DK-5WZEPLOC-B2KbOKlk.js} +1 -1
- package/public/assets/daily-notes-settings-CrgXHhLI.js +1 -0
- package/public/assets/{dashboard-grid-BvlcalWZ.js → dashboard-grid-BZ8kYdV4.js} +2 -2
- package/public/assets/dashboard-workspace-CIhpZ3rj.js +4 -0
- package/public/assets/dashboard-workspace-ChhR6uFw.css +1 -0
- package/public/assets/{dashboards-settings-module-CMkRnuLc.js → dashboards-settings-module-CUyrJjUX.js} +1 -1
- package/public/assets/dashboards-view-CkheD5RG.js +1 -0
- package/public/assets/{de-DE-XR44H4JA-wIoI5uHM.js → de-DE-XR44H4JA-CraH52sB.js} +1 -1
- package/public/assets/{desktop-server-settings-j8RrUDQh.js → desktop-server-settings-CDuPB2R6.js} +1 -1
- package/public/assets/discovery-create-popup-aCpL7caq.js +1 -0
- package/public/assets/discovery-import-popup-qmw9XOW8.js +1 -0
- package/public/assets/{discovery-settings-module-CSz3wdqd.js → discovery-settings-module-BiY4ib2N.js} +1 -1
- package/public/assets/discovery-view-CPYP4CTN.js +1 -0
- package/public/assets/discovery-workspace-COn6jS_C.js +2 -0
- package/public/assets/{dist-tLZONR8L.js → dist-BmY58onI.js} +1 -1
- package/public/assets/drag-preview-i140CAXv.js +1 -0
- package/public/assets/{drawing-note-BZkhWRBb.js → drawing-note-CZIRcZb4.js} +1 -1
- package/public/assets/{el-GR-BZB4AONW-BoxDB0UD.js → el-GR-BZB4AONW-hWxkjrdo.js} +1 -1
- package/public/assets/en-B4ZKOASM-CDD2_KUt.js +1 -0
- package/public/assets/{es-ES-U4NZUMDT-BTF8-J9f.js → es-ES-U4NZUMDT-D3W7yrM9.js} +1 -1
- package/public/assets/{esm-zhVSGSwY.js → esm-BwVJXUDM.js} +1 -1
- package/public/assets/{eu-ES-A7QVB2H4-PqSQa04Y.js → eu-ES-A7QVB2H4-C6t3pMxo.js} +1 -1
- package/public/assets/export-formats-BEyzF7fr.js +1 -0
- package/public/assets/{fa-IR-HGAKTJCU-B03HX6BC.js → fa-IR-HGAKTJCU-DJOOVnVh.js} +1 -1
- package/public/assets/{feature-switch-section-CDTUV6B-.js → feature-switch-section-DWkHmh9Q.js} +1 -1
- package/public/assets/{fi-FI-Z5N7JZ37-D5Rn9AGc.js → fi-FI-Z5N7JZ37-DEhnpOQb.js} +1 -1
- package/public/assets/file-editor-BMcxRFx_.css +1 -0
- package/public/assets/file-editor-WXaKLCia.js +3 -0
- package/public/assets/{file-language-C8bPT8Wh.js → file-language-BAXzYrUs.js} +1 -1
- package/public/assets/file-picker-Bo4sE6ud.css +1 -0
- package/public/assets/file-picker-DalNc5HP.js +1 -0
- package/public/assets/file-preview-B2sjiYV9.css +1 -0
- package/public/assets/file-preview-CBXgB9qm.js +1 -0
- package/public/assets/{file-preview-media-CNZHdx05.js → file-preview-media-D5_7dD-7.js} +1 -1
- package/public/assets/file-references-api-IoK82adM.js +1 -0
- package/public/assets/files-settings-module-DTmzlXAF.js +1 -0
- package/public/assets/files-view-D7awxVSV.js +3 -0
- package/public/assets/files-view-DyPI1vLx.css +1 -0
- package/public/assets/{format-panel-value-DYwL3ttM.js → format-panel-value-Qry4ewBT.js} +1 -1
- package/public/assets/format-rules-BFnbjJsr.js +1 -0
- package/public/assets/{fr-FR-RHASNOE6-BoIuGpVa.js → fr-FR-RHASNOE6-D9pFTuqa.js} +1 -1
- package/public/assets/{gl-ES-HMX3MZ6V-R9gfMkm_.js → gl-ES-HMX3MZ6V-CIK6mfAj.js} +1 -1
- package/public/assets/graph-explorer-DEddRhZU.js +329 -0
- package/public/assets/graph-settings-module-CdwcXpWv.js +1 -0
- package/public/assets/{he-IL-6SHJWFNN-DLh6r8yJ.js → he-IL-6SHJWFNN-sIPLWf4m.js} +1 -1
- package/public/assets/{hi-IN-IWLTKZ5I-DsP1yUVR.js → hi-IN-IWLTKZ5I-BUJucdSj.js} +1 -1
- package/public/assets/{hu-HU-A5ZG7DT2-ttWV7_mJ.js → hu-HU-A5ZG7DT2-B29-4soS.js} +1 -1
- package/public/assets/icons-BQSaMzmI.js +1 -0
- package/public/assets/{id-ID-SAP4L64H-DIFD1Rmb.js → id-ID-SAP4L64H-CyIfHt3t.js} +1 -1
- package/public/assets/ide-settings-module-DmJJdyaW.js +1 -0
- package/public/assets/ide-view-BhQVUYYS.js +1 -0
- package/public/assets/ide-view-Cou_U3E6.css +1 -0
- package/public/assets/image-GAAHSSAO-BxryKUrU.js +1 -0
- package/public/assets/imap-accounts-my6l8ble.js +1 -0
- package/public/assets/index-CfVw4gte.js +9 -0
- package/public/assets/index-CuWXx5Sr.css +1 -0
- package/public/assets/{it-IT-JPQ66NNP-D9CIdJgS.js → it-IT-JPQ66NNP-Dq23HshR.js} +1 -1
- package/public/assets/{ja-JP-DBVTYXUO-CYn7dH3E.js → ja-JP-DBVTYXUO-8NNxRVWb.js} +1 -1
- package/public/assets/journal-create-popup-DsFTus7q.js +1 -0
- package/public/assets/journal-day-route-BX4-KaSl.js +1 -0
- package/public/assets/journal-folder-field-hSCfQuop.js +1 -0
- package/public/assets/journal-page-CoLcbMGG.css +1 -0
- package/public/assets/journal-page-CuUs4DCL.js +2 -0
- package/public/assets/journal-settings-BeM9sz5z.js +1 -0
- package/public/assets/journal-typography-BB4TqmXu.js +1 -0
- package/public/assets/journal-writing-route-Ba7mqWJS.js +1 -0
- package/public/assets/journals-view-Cf89lTyQ.js +1 -0
- package/public/assets/kaa-6HZHGXH3-DWQlZzTI.js +1 -0
- package/public/assets/{kab-KAB-ZGHBKWFO-BnEoO3f6.js → kab-KAB-ZGHBKWFO-BCP7pvXg.js} +1 -1
- package/public/assets/kk-KZ-P5N5QNE5-xOkOQsTw.js +1 -0
- package/public/assets/{km-KH-HSX4SM5Z-DO6DHT6h.js → km-KH-HSX4SM5Z-D0xjNROe.js} +1 -1
- package/public/assets/{ko-KR-MTYHY66A-Ch6OwlXE.js → ko-KR-MTYHY66A-E5aEyLj-.js} +1 -1
- package/public/assets/{ku-TR-6OUDTVRD-C9KHFYbx.js → ku-TR-6OUDTVRD-CDQOo-yR.js} +1 -1
- package/public/assets/link-choices-CRTxLpuA.js +1 -0
- package/public/assets/link-entry-route-C1tWLndS.js +1 -0
- package/public/assets/link-file-browser-RuO2yY0g.js +1 -0
- package/public/assets/{link-kind-icon-r9mUfWOh.js → link-kind-icon-BgeZ5N-E.js} +1 -1
- package/public/assets/link-picker-CWK41zM0.js +2 -0
- package/public/assets/locked-shares-prompt-eH6sWg93.js +1 -0
- package/public/assets/{logging-settings-contribution-C55dtngt.js → logging-settings-contribution-Btq9ioZn.js} +1 -1
- package/public/assets/logic-CiFwn-O5.js +28 -0
- package/public/assets/long-press-C_vMz2E6.js +1 -0
- package/public/assets/{lt-LT-XHIRWOB4-CrK3hZ26.js → lt-LT-XHIRWOB4-CZPudjgc.js} +1 -1
- package/public/assets/{lv-LV-5QDEKY6T-BOA9oRt-.js → lv-LV-5QDEKY6T-BFIvtooB.js} +1 -1
- package/public/assets/markdown-message-BmuXZdEl.js +3 -0
- package/public/assets/markdown-message-CEFw-l9n.css +1 -0
- package/public/assets/markdown-task-toggle-BdNMBrC0.css +1 -0
- package/public/assets/markdown-task-toggle-j4VvSqsD.js +4 -0
- package/public/assets/{matrices-settings-module-DPI1_WsY.js → matrices-settings-module-CoOYPwEU.js} +1 -1
- package/public/assets/matrices-view-CcjCls3L.js +1 -0
- package/public/assets/matrix-workspace-98WdHTfO.js +1 -0
- package/public/assets/{maximize-2-C6N1RKlt.js → maximize-2-BOW9VTPW.js} +1 -1
- package/public/assets/mermaid-diagram-kld9fHwj.js +1 -0
- package/public/assets/{mobile-file-text-B4j-_eP4.js → mobile-file-text-BqyOwF0N.js} +1 -1
- package/public/assets/mobile-note-content-editor-BPxespTd.js +2 -0
- package/public/assets/{mobile-panel-layer-C2OowtdM.js → mobile-panel-layer-CA_yph77.js} +1 -1
- package/public/assets/model-provider-settings-contribution-CECr7FiG.js +1 -0
- package/public/assets/model-providers-Ptlz_trq.js +1 -0
- package/public/assets/move-destination-2AXvBdlJ.js +1 -0
- package/public/assets/move-entries-dialog-BEJJSv8J.js +1 -0
- package/public/assets/{mr-IN-CRQNXWMA-GWTqYMNI.js → mr-IN-CRQNXWMA-DmnSBhlL.js} +1 -1
- package/public/assets/my-MM-5M5IBNSE-DDu4zmzX.js +1 -0
- package/public/assets/{nb-NO-T6EIAALU-DyrWt8fZ.js → nb-NO-T6EIAALU-BLzt9sXj.js} +1 -1
- package/public/assets/{nl-NL-IS3SIHDZ-COWPkkr8.js → nl-NL-IS3SIHDZ-FtFhrALS.js} +1 -1
- package/public/assets/{nn-NO-6E72VCQL-8aH2uP9Y.js → nn-NO-6E72VCQL-B_SymEE5.js} +1 -1
- package/public/assets/note-body-focus-d1lrm6Vw.js +1 -0
- package/public/assets/note-collab-provider-B5sEpjH1.js +1 -0
- package/public/assets/note-collab-transport-HTl4Zdug.js +1 -0
- package/public/assets/note-create-settings-module-iEVdyRFV.js +1 -0
- package/public/assets/{note-documents-DCd2HaSQ.js → note-documents-BPTwtsVi.js} +2 -2
- package/public/assets/note-editor-container-Ct9S4xJq.css +1 -0
- package/public/assets/note-editor-container-DzXoYKkT.js +2 -0
- package/public/assets/note-editor-settings-module-BZalej3y.js +1 -0
- package/public/assets/note-excalidraw-editor-CYHK-nyq.js +118 -0
- package/public/assets/note-excalidraw-editor-DVHMAsgJ.css +1 -0
- package/public/assets/{note-export-api-2u0sbOpc.js → note-export-api-Cdb5DLzA.js} +1 -1
- package/public/assets/note-export-flow-CfLnfRzg.js +1 -0
- package/public/assets/{note-filter-rule-rows-BajgD2k3.js → note-filter-rule-rows-DmVis2Dw.js} +1 -1
- package/public/assets/note-folds-settings-module-DeVre4gm.js +1 -0
- package/public/assets/note-frontmatter-summary-DNdQjzv5.js +1 -0
- package/public/assets/note-history-retention-B5aE8fKh.js +1 -0
- package/public/assets/note-link-list-C2i2SrSh.css +1 -0
- package/public/assets/note-link-list-DD4FzeUb.js +2 -0
- package/public/assets/note-markdown-editor-BlWCUXb9.js +26 -0
- package/public/assets/note-markdown-editor-Dp1k8dWQ.css +1 -0
- package/public/assets/{note-outline-CNoqBtUP.js → note-outline-C-dPTJrB.js} +2 -2
- package/public/assets/note-outline-DTpLzjGU.css +1 -0
- package/public/assets/note-page-content-CZH9UDn0.js +2 -0
- package/public/assets/{note-page-editor-BgcMK_4q.css → note-page-editor-D7Wt_Giv.css} +1 -1
- package/public/assets/{note-page-editor-rhBoxKYB.js → note-page-editor-D8M6gjmG.js} +4 -4
- package/public/assets/note-path-breadcrumb-CLfo-0XG.js +1 -0
- package/public/assets/{note-path-breadcrumb-YC4bHnwX.css → note-path-breadcrumb-Drkebhvm.css} +1 -1
- package/public/assets/{note-picker-BD8rmAOq.js → note-picker-DIFcqGgZ.js} +1 -1
- package/public/assets/note-picker-KBB6aonj.css +1 -0
- package/public/assets/{note-picker-popover-DI9Wc706.js → note-picker-popover-CoT73GG-.js} +1 -1
- package/public/assets/note-shares-popup-CmUAI6V-.js +1 -0
- package/public/assets/note-side-panel-BFno3955.js +1 -0
- package/public/assets/note-side-panel-DLOy2dVw.css +1 -0
- package/public/assets/note-side-panel-host-iIfi_4c4.js +1 -0
- package/public/assets/note-source-editor-CVo_ZXww.js +1 -0
- package/public/assets/{note-type-grid-BFX3oTAC.js → note-type-grid-Bfdc8U-T.js} +2 -2
- package/public/assets/{note-type-grid-BM33ZYF-.css → note-type-grid-BzMZLAzW.css} +1 -1
- package/public/assets/{note-values-BqD4746M.js → note-values-C4A12_CE.js} +1 -1
- package/public/assets/notes-settings-module-DBSeNBYj.js +1 -0
- package/public/assets/notes-view-C_mX24NH.js +1 -0
- package/public/assets/notes-view-D212ymqf.css +1 -0
- package/public/assets/{oc-FR-POXYY2M6-C_R_VP74.js → oc-FR-POXYY2M6-DM9hsX9Q.js} +1 -1
- package/public/assets/{open-journal-writing-Bd-CppeX.js → open-journal-writing-Da9CBYtR.js} +1 -1
- package/public/assets/{pa-IN-N4M65BXN-B21EEaul.js → pa-IN-N4M65BXN-CJJQ9oPk.js} +1 -1
- package/public/assets/page-content-27iX_YpJ.js +1 -0
- package/public/assets/page-content-CdioJybS.css +1 -0
- package/public/assets/page-export-api-BqvyvK1O.js +1 -0
- package/public/assets/page-export-flow-HzZ0AmjW.js +1 -0
- package/public/assets/page-files-C30eoBCR.js +1 -0
- package/public/assets/page-note-7Oo1OmH0.js +1 -0
- package/public/assets/pane-layout-BaHTn1Oz.js +1 -0
- package/public/assets/{panel-columns-fields-DPjV39xn.js → panel-columns-fields-B9Biz8Xm.js} +1 -1
- package/public/assets/pdf-view-B5Y12R4H.js +1 -0
- package/public/assets/pdf-view-X71jeHKm.css +1 -0
- package/public/assets/{pencil-DQ9fAqT6.js → pencil-BQzjBcpa.js} +1 -1
- package/public/assets/percentages-BXMCSKIN-DRPvI3O-.js +1 -0
- package/public/assets/{phone-numbers-CHQaYRah.js → phone-numbers-lV_IC3Pq.js} +1 -1
- package/public/assets/{pl-PL-T2D74RX3-Bdo_j9QK.js → pl-PL-T2D74RX3-BLAcchR-.js} +1 -1
- package/public/assets/progress-bar-BxjnW3uQ.js +1 -0
- package/public/assets/provider-configuration-DBW3Pa0C.js +8 -0
- package/public/assets/provider-configuration-dpnYrEZm.css +1 -0
- package/public/assets/provider-use-select-C0EI8kSQ.js +1 -0
- package/public/assets/{pt-BR-5N22H2LF-C9DRQ7CW.js → pt-BR-5N22H2LF-BiLQ-V_W.js} +1 -1
- package/public/assets/{pt-PT-UZXXM6DQ-ColydZPV.js → pt-PT-UZXXM6DQ-DKEXacg3.js} +1 -1
- package/public/assets/qr-code-DgTUKCej.js +2 -0
- package/public/assets/{qr-code-svg-D0RAuUIk.js → qr-code-svg-DdWw4ovA.js} +1 -1
- package/public/assets/qr-defaults-settings-BbbzxV5k.js +1 -0
- package/public/assets/qr-settings-fields-C8GCAxa_.js +1 -0
- package/public/assets/qr-viewer-DTCnaLOP.js +1 -0
- package/public/assets/queryOptions-Dfvzj6n2.js +1 -0
- package/public/assets/{reader-clock-22DkpiWR.js → reader-clock-s4x6Qtz_.js} +1 -1
- package/public/assets/{recording-bar-DOm-SEGc.js → recording-bar-C5jkIsLX.js} +2 -2
- package/public/assets/{recording-setup-CV3LE2_1.js → recording-setup-fZ6fe1MX.js} +1 -1
- package/public/assets/{recordings-api-C-Bxpzgo.js → recordings-api-CxuXFNaM.js} +1 -1
- package/public/assets/resource-overview-card-CAxT9QxY.js +1 -0
- package/public/assets/{ro-RO-JPDTUUEW-iJAQDPe9.js → ro-RO-JPDTUUEW-DPtQ18Fr.js} +1 -1
- package/public/assets/rss-settings-module-Bg7BBsC4.js +1 -0
- package/public/assets/rss-view-DIPQBTLT.css +1 -0
- package/public/assets/rss-view-DeSvhXEa.js +3 -0
- package/public/assets/{ru-RU-B4JR7IUQ-CX_CWbT7.js → ru-RU-B4JR7IUQ-n-7DhzM7.js} +1 -1
- package/public/assets/{safe-block-copy-DygjvDD4.js → safe-block-copy-B7NrP_YX.js} +1 -1
- package/public/assets/{safe-block-qr-button-Cn9WpEkl.js → safe-block-qr-button-DomQCK7l.js} +1 -1
- package/public/assets/safe-block-reader-BGmIVIwN.js +1 -0
- package/public/assets/safe-folder-conversion-Re-4B3nf.js +1 -0
- package/public/assets/{safe-folders-DCf8IdrM.js → safe-folders-B4zJo8qB.js} +1 -1
- package/public/assets/{safe-move-leaving-tN-IMhDo.js → safe-move-leaving-D4dKIwTJ.js} +1 -1
- package/public/assets/{safe-note-locked-B_lt0XcX.js → safe-note-locked-BGUjggd4.js} +1 -1
- package/public/assets/safe-notes-settings-module-zJbcwdU7.js +1 -0
- package/public/assets/{markdown-task-toggle-CuRdtBn0.css → safe-text-B4Q6DSRg.css} +1 -1
- package/public/assets/safe-text-MPRw9KNQ.js +2 -0
- package/public/assets/search-settings-module-CMWbEyvZ.js +1 -0
- package/public/assets/{secret-form-DSD348Om.js → secret-form-DoNXw27T.js} +1 -1
- package/public/assets/secret-popup-Vn5Xkv4s.js +1 -0
- package/public/assets/section-navigation-1mCyY2Gm.js +1 -0
- package/public/assets/{security-settings-contribution-B_Syg5ab.js → security-settings-contribution-BrPrGp5q.js} +1 -1
- package/public/assets/settings-CxK-AM0A.js +1 -0
- package/public/assets/settings-actions-DnTiS3-h.js +1 -0
- package/public/assets/{settings-edit-dialog-B5emNjJi.js → settings-edit-dialog-CE5ZTszW.js} +1 -1
- package/public/assets/settings-panel-BF5baIMl.js +1 -0
- package/public/assets/settings-surface-CDwMuN24.js +3 -0
- package/public/assets/settings-surface-DzW4lcds.css +1 -0
- package/public/assets/{setup-prompt-6JRbE0oa.js → setup-prompt-Bmv_QxoH.js} +1 -1
- package/public/assets/{share-access-control-C5mpELVT.js → share-access-control-CB7J42Dn.js} +1 -1
- package/public/assets/shared-board-CLRkwNKE.js +1 -0
- package/public/assets/shared-board-lanes-OZo3pA9j.js +1 -0
- package/public/assets/{shared-calendar-view-DcCO3mNo.js → shared-calendar-view-BSmK0NDE.js} +1 -1
- package/public/assets/shared-note-route-CnykVAYu.css +1 -0
- package/public/assets/shared-note-route-DtZVqLMu.js +4 -0
- package/public/assets/shared-note-text-C6nccM7z.js +1 -0
- package/public/assets/{shares-settings-module-9oF4v70A.js → shares-settings-module-gI5s2PT6.js} +1 -1
- package/public/assets/si-LK-N5RQ5JYF-BpI-kBDz.js +1 -0
- package/public/assets/{sk-SK-C5VTKIMK-DrAaUVFC.js → sk-SK-C5VTKIMK-BRXRBgRU.js} +1 -1
- package/public/assets/{sl-SI-NN7IZMDC-WxYLW2Uj.js → sl-SI-NN7IZMDC-BXKt0fnN.js} +1 -1
- package/public/assets/{spaces-settings-module-Dh_QfANj.js → spaces-settings-module-BOkTwY_Z.js} +1 -1
- package/public/assets/spaces-view-K5_OKPoW.js +2 -0
- package/public/assets/sqlite-browser-BVA27ofB.css +1 -0
- package/public/assets/sqlite-browser-DCKBF2SI.js +2 -0
- package/public/assets/stack-widgets-CLUFu_vQ.js +1 -0
- package/public/assets/store-attachments-DQ63HVZo.js +1 -0
- package/public/assets/stored-color-picker-BLs1gClm.css +1 -0
- package/public/assets/stored-color-picker-CZ66rDog.js +1 -0
- package/public/assets/style-DPV_jdGg.css +1 -0
- package/public/assets/subset-shared.chunk-DYH4c2c2.js +1 -0
- package/public/assets/subset-worker.chunk-yCTTgC3G.js +1 -0
- package/public/assets/{sv-SE-XGPEYMSR-DOB2jm3x.js → sv-SE-XGPEYMSR-nBH8YjQ4.js} +1 -1
- package/public/assets/{ta-IN-2NMHFXQM-DfC3wGVU.js → ta-IN-2NMHFXQM-f0oprEqN.js} +1 -1
- package/public/assets/{text-diff-BzNG8nfy.js → text-diff-BMS8apwf.js} +1 -1
- package/public/assets/th-TH-HPSO5L25-CUOH0u8u.js +2 -0
- package/public/assets/{theme-colors-2LJ6VIeK.js → theme-colors-BcoD3SUn.js} +1 -1
- package/public/assets/{toolbar-items-DF7H0MSb.js → toolbar-items-DtGvJf3U.js} +1 -1
- package/public/assets/{topology-code-editor-B7zxDyT3.js → topology-code-editor-ClyHjN--.js} +1 -1
- package/public/assets/topology-designer-DmhzdlOY.js +1 -0
- package/public/assets/{topology-editor-DUaww3cM.css → topology-editor-CZnvLbBi.css} +1 -1
- package/public/assets/topology-editor-YK_2uGkR.js +8 -0
- package/public/assets/{topology-folder-migration-popup-Bj4nu8HE.js → topology-folder-migration-popup-AZFR8-44.js} +1 -1
- package/public/assets/{tr-TR-DEFEU3FU-DWO1lNTH.js → tr-TR-DEFEU3FU-CTsS8Qy-.js} +1 -1
- package/public/assets/transcription-settings-D7_ViMfp.js +4 -0
- package/public/assets/tree-header-CmCmDZKG.js +1 -0
- package/public/assets/tree-header-DlATpadF.css +1 -0
- package/public/assets/types-settings-module-L4wPTMty.js +1 -0
- package/public/assets/{uk-UA-QMV73CPH-ZHBKj9kv.js → uk-UA-QMV73CPH-BJo17WQM.js} +1 -1
- package/public/assets/{unlock-prompt-C1AEyIR_.js → unlock-prompt-BQVrb-4k.js} +1 -1
- package/public/assets/{use-candidate-notes-Du1V_uun.js → use-candidate-notes-YOxWyJCJ.js} +1 -1
- package/public/assets/{directory-picker-columns-BpDkvDO0.css → use-directory-columns-DILivjwk.css} +1 -1
- package/public/assets/use-directory-columns-DYequGsf.js +1 -0
- package/public/assets/use-directory-listing-Bj3F5kA3.js +1 -0
- package/public/assets/use-folding-enabled-N7w9iIqy.js +1 -0
- package/public/assets/use-heading-location-BZ9wUH2j.js +1 -0
- package/public/assets/{use-live-document-Ck_XPFVd.js → use-live-document-4fc8FCW3.js} +1 -1
- package/public/assets/use-mobile-layer-navigation-Il_7QdXn.js +1 -0
- package/public/assets/{use-note-attachments-SPgAe-M0.js → use-note-attachments-DAFyHvYo.js} +1 -1
- package/public/assets/{use-note-delete-Dvrzq6Pl.js → use-note-delete-JQISrVQ4.js} +1 -1
- package/public/assets/use-note-editor-session-BlLoBd41.js +1 -0
- package/public/assets/use-note-maximize-offer-DpU6Ms0_.js +1 -0
- package/public/assets/use-note-side-column-CFBvrpKH.css +1 -0
- package/public/assets/use-note-side-column-CVs74c26.js +1 -0
- package/public/assets/use-provider-dialogs-BRoAomhX.css +1 -0
- package/public/assets/use-provider-dialogs-HkxDcuJv.js +1 -0
- package/public/assets/{use-reflection-request-DV5-_c14.js → use-reflection-request-BuFnMuQC.js} +4 -4
- package/public/assets/use-safe-folder-moves-CjbmSWSM.js +1 -0
- package/public/assets/use-safe-folders-apply-D_7a5l_T.js +1 -0
- package/public/assets/{use-screen-source-BllYITR6.js → use-screen-source-BZ0GGtml.js} +1 -1
- package/public/assets/use-share-actions-DBYaF7Wp.css +1 -0
- package/public/assets/use-share-actions-Tfr6NI4j.js +1 -0
- package/public/assets/use-tab-style-B5YK0cIz.js +2 -0
- package/public/assets/use-tab-style-CRx5AnD1.css +1 -0
- package/public/assets/use-vault-file-link-BCQahdir.js +1 -0
- package/public/assets/{use-voice-questions-Bjgb45Dc.js → use-voice-questions-DmxYfc8M.js} +1 -1
- package/public/assets/vault-entries-api-CZHdxv7-.js +1 -0
- package/public/assets/vault-file-links-D1RzhVkx.js +1 -0
- package/public/assets/vault-folder-field-C5b24MNS.js +1 -0
- package/public/assets/vault-folder-field-X-B1weCe.css +1 -0
- package/public/assets/vault-links-popup-zkFCHyoP.js +1 -0
- package/public/assets/vault-manager-CZnYayEU.js +1 -0
- package/public/assets/{vault-settings-module-DMjLQmKz.js → vault-settings-module-CL2DHG69.js} +1 -1
- package/public/assets/vault-shares-popup-Cnew0vMQ.js +1 -0
- package/public/assets/vault-workspace-settings-module-D_n4aQfC.js +1 -0
- package/public/assets/{versioning-preferences-dvxhrMo9.js → versioning-preferences-BK-mZYhi.js} +1 -1
- package/public/assets/{versioning-settings-module-CnDDngKG.js → versioning-settings-module-lq4k7b3C.js} +1 -1
- package/public/assets/versioning-view-BdEZaF8n.js +2 -0
- package/public/assets/{vi-VN-M7AON7JQ-uUfHJEho.js → vi-VN-M7AON7JQ-DpgVSDWc.js} +1 -1
- package/public/assets/{video-recording-dialog-7IGrQMwx.js → video-recording-dialog-ByevPvCN.js} +1 -1
- package/public/assets/{video-recording-settings-D6YT_FW3.js → video-recording-settings-Ce2plgiG.js} +1 -1
- package/public/assets/widget-frame-DzlpiABF.js +1 -0
- package/public/assets/widget-layouts-DS7nWc80.js +1 -0
- package/public/assets/workspace-layout-3hjN1Wng.js +1 -0
- package/public/assets/{zh-CN-LNUGB5OW-COz3oRg3.js → zh-CN-LNUGB5OW-Cfb6--Ow.js} +1 -1
- package/public/assets/zh-HK-E62DVLB3-vaMRVwdL.js +1 -0
- package/public/assets/{zh-TW-RAJ6MFWO-AYdVqmV8.js → zh-TW-RAJ6MFWO-CNUUB_PG.js} +1 -1
- package/public/index.html +6 -6
- package/dist/search/embedding-connection-migration.js +0 -57
- package/node_modules/@braian/ai-providers/dist/legacy-embedding-migration.js +0 -21
- package/public/assets/FileText.es-4c63tWmA.js +0 -1
- package/public/assets/TerminalWindow.es-DwLjQ_88.js +0 -1
- package/public/assets/Warning.es-4HWtj9Nt.js +0 -1
- package/public/assets/agent-profiles-settings-I5Ux2GnH.js +0 -1
- package/public/assets/appearance-settings-module-CD3bJpfR.js +0 -1
- package/public/assets/attachment-embed-BkP-B_Pa.js +0 -1
- package/public/assets/attachments-settings-BeAekkzf.js +0 -1
- package/public/assets/az-AZ-76LH7QW2-nXEHcVXP.js +0 -1
- package/public/assets/blue-ezN0uv0j.css +0 -1
- package/public/assets/board-workspace-DPSlmJ8w.js +0 -1
- package/public/assets/boards-settings-module-CCN_ZNks.js +0 -1
- package/public/assets/calendar-view-BlTCcAzD.js +0 -1
- package/public/assets/calendar-workspace-6t1kuFgj.js +0 -1
- package/public/assets/card-fields-C1JCmDVz.css +0 -1
- package/public/assets/chat-message-list-ClUR56GV.js +0 -1
- package/public/assets/code-editor-wFimHbMT.css +0 -1
- package/public/assets/color-picker-ClAn42eA.js +0 -1
- package/public/assets/contents-view-EQyMaey-.css +0 -1
- package/public/assets/create-note-popup-CRi210cC.js +0 -1
- package/public/assets/daily-notes-settings-DG9RUcYk.js +0 -1
- package/public/assets/dashboard-workspace-CW4tbadO.css +0 -1
- package/public/assets/dashboard-workspace-D45MA_Wf.js +0 -4
- package/public/assets/dashboards-view-BB1CRB2G.js +0 -1
- package/public/assets/directory-picker-columns-BDdL8yxc.js +0 -1
- package/public/assets/discovery-create-popup-DpDB1MTg.js +0 -1
- package/public/assets/discovery-import-popup-BsyONSTT.js +0 -1
- package/public/assets/discovery-view-DOb6HJff.js +0 -1
- package/public/assets/discovery-workspace-Cyc70gQ1.js +0 -2
- package/public/assets/drag-preview-Cb6aidku.js +0 -1
- package/public/assets/en-B4ZKOASM-D3_h4H29.js +0 -1
- package/public/assets/file-editor-B-9eXvH3.css +0 -1
- package/public/assets/file-editor-DTm2a8_D.js +0 -3
- package/public/assets/file-preview-Bp9k2YvK.js +0 -1
- package/public/assets/file-preview-Dynm8laQ.css +0 -1
- package/public/assets/file-references-api-CSyFnFFm.js +0 -1
- package/public/assets/files-settings-module-D4HPlkbW.js +0 -1
- package/public/assets/files-view-BIDZtZgg.js +0 -3
- package/public/assets/files-view-Bo1uBB_W.css +0 -1
- package/public/assets/folder-picker-dialog-CxiRBtQb.css +0 -1
- package/public/assets/folder-picker-dialog-D57Q15N4.js +0 -1
- package/public/assets/format-rules-GzYB7Vvh.js +0 -1
- package/public/assets/graph-explorer-DtYVExeD.js +0 -329
- package/public/assets/graph-settings-module-D--vzqKr.js +0 -1
- package/public/assets/icons-CxH3_W-q.js +0 -1
- package/public/assets/ide-settings-module-Dsg4tJV6.js +0 -1
- package/public/assets/ide-view-DCvwb5Bx.js +0 -2
- package/public/assets/ide-view-isgMvraA.css +0 -1
- package/public/assets/image-GAAHSSAO-C38PUNrv.js +0 -1
- package/public/assets/imap-accounts-QVDGlYad.js +0 -1
- package/public/assets/index-B8xguO4f.css +0 -1
- package/public/assets/index-CCUyKE6q.js +0 -11
- package/public/assets/journal-create-popup-DnYgWgDU.js +0 -1
- package/public/assets/journal-day-route-DpsYGWU7.js +0 -1
- package/public/assets/journal-folder-field-B8yNmuTt.css +0 -1
- package/public/assets/journal-folder-field-DuvIgT6Y.js +0 -1
- package/public/assets/journal-page-BdQlNdyB.js +0 -2
- package/public/assets/journal-page-CAXrq4hj.css +0 -1
- package/public/assets/journal-settings-Dq-9Conv.js +0 -1
- package/public/assets/journal-typography-QR4z5v0X.js +0 -1
- package/public/assets/journal-writing-route-JP-jPBGZ.js +0 -1
- package/public/assets/journals-view-No5xQN8-.js +0 -1
- package/public/assets/kaa-6HZHGXH3-DmZqyxcr.js +0 -1
- package/public/assets/kk-KZ-P5N5QNE5-DcYcuRxx.js +0 -1
- package/public/assets/link-file-browser-BvVwFMvC.js +0 -1
- package/public/assets/link-picker-C90irWTA.js +0 -2
- package/public/assets/locked-shares-prompt-CA0MuZ_G.js +0 -1
- package/public/assets/logic-BNk_20eJ.js +0 -28
- package/public/assets/markdown-message-9f2rcF0-.js +0 -3
- package/public/assets/markdown-message-C2w22wrW.css +0 -1
- package/public/assets/markdown-task-toggle-DiIwYCgC.js +0 -5
- package/public/assets/matrices-view-CQlirOdv.js +0 -1
- package/public/assets/matrix-workspace-C3LhTNPX.js +0 -1
- package/public/assets/mermaid-diagram-CnzQOrTI.js +0 -1
- package/public/assets/mobile-note-content-editor-znLhIM9A.js +0 -2
- package/public/assets/model-provider-settings-contribution-DYmNbsgA.js +0 -1
- package/public/assets/model-providers-7VKk3K9H.js +0 -8
- package/public/assets/model-providers-DgRkVmP5.css +0 -1
- package/public/assets/my-MM-5M5IBNSE-DnqvLQeM.js +0 -1
- package/public/assets/note-body-focus-BKKGEgBj.js +0 -1
- package/public/assets/note-collab-provider-969Kgyu8.js +0 -1
- package/public/assets/note-collab-transport-CQDYt_Db.js +0 -1
- package/public/assets/note-create-settings-module-CV4dWr8t.js +0 -1
- package/public/assets/note-editor-container-8DkvXTPN.css +0 -1
- package/public/assets/note-editor-container-CTnEE-98.js +0 -2
- package/public/assets/note-editor-settings-module-CbPu_40k.js +0 -1
- package/public/assets/note-excalidraw-editor-CKSC5Oww.css +0 -1
- package/public/assets/note-excalidraw-editor-RjnG4My9.js +0 -168
- package/public/assets/note-export-flow-B3wRdMj0.js +0 -1
- package/public/assets/note-folds-settings-module-DZju6Mum.js +0 -1
- package/public/assets/note-frontmatter-summary-BSKg__aS.js +0 -1
- package/public/assets/note-link-list-DKU2PqtO.js +0 -1
- package/public/assets/note-link-list-hmCbBMA2.css +0 -1
- package/public/assets/note-markdown-editor-CXelEHqr.js +0 -26
- package/public/assets/note-markdown-editor-DlBj1yv3.css +0 -1
- package/public/assets/note-outline-CAyXKuOh.css +0 -1
- package/public/assets/note-page-content-DIqkiMvt.js +0 -2
- package/public/assets/note-path-breadcrumb-uTSXCQK4.js +0 -1
- package/public/assets/note-picker-BURTnmWF.css +0 -1
- package/public/assets/note-shares-popup-9sJOmL1-.js +0 -1
- package/public/assets/note-source-editor-DWyDYMCj.js +0 -1
- package/public/assets/notes-settings-module-C5IPmwKt.js +0 -1
- package/public/assets/page-content-C1jtzs7H.js +0 -1
- package/public/assets/page-content-lnIaLh4X.css +0 -1
- package/public/assets/page-files-BMj9IzfB.js +0 -1
- package/public/assets/page-note-Chw2UF0u.js +0 -1
- package/public/assets/pane-keys-CTLoUZZR.js +0 -1
- package/public/assets/pane-keys-DiGU3yVB.css +0 -1
- package/public/assets/pdf-view-BK5qKL4y.css +0 -1
- package/public/assets/pdf-view-Cm78nuSA.js +0 -1
- package/public/assets/percentages-BXMCSKIN-CUt8fyAS.js +0 -1
- package/public/assets/provider-use-select-DCSwSrlz.js +0 -1
- package/public/assets/qr-code-Bm7I0KYt.js +0 -2
- package/public/assets/qr-defaults-settings-2_Yt9x4N.js +0 -1
- package/public/assets/qr-settings-fields-DDO4XgMl.js +0 -1
- package/public/assets/qr-viewer-CvEfRC2r.js +0 -1
- package/public/assets/resource-overview-card-Co8aU6jw.js +0 -1
- package/public/assets/rss-preferences-Bx1Wa4ri.js +0 -1
- package/public/assets/rss-settings-module-BmDISWDk.js +0 -1
- package/public/assets/rss-view-5aqCVOCs.css +0 -1
- package/public/assets/rss-view-BCEFsYtS.js +0 -1
- package/public/assets/safe-block-reader-CNfzTExh.js +0 -1
- package/public/assets/safe-folder-conversion-BOLpnv8P.js +0 -1
- package/public/assets/safe-notes-settings-module-CMvkyfNG.js +0 -1
- package/public/assets/search-settings-module-DmczYjcQ.js +0 -1
- package/public/assets/secret-popup-y9W7WIrZ.js +0 -1
- package/public/assets/settings-ChT117Ke.js +0 -1
- package/public/assets/settings-panel-Cl5kUs9O.js +0 -1
- package/public/assets/settings-view-C_lfjngd.js +0 -3
- package/public/assets/share-label-BU3So3s7.js +0 -1
- package/public/assets/shared-board-lanes-UWl9klys.js +0 -1
- package/public/assets/shared-note-route-B5rcAeES.css +0 -1
- package/public/assets/shared-note-route-DaI6hm83.js +0 -4
- package/public/assets/shared-note-text-BdCw7a9a.js +0 -1
- package/public/assets/si-LK-N5RQ5JYF-DfLSaLm6.js +0 -1
- package/public/assets/spaces-view-Dw2uxDxU.js +0 -2
- package/public/assets/sqlite-browser-BKjuAUqe.css +0 -1
- package/public/assets/sqlite-browser-BfIrq_0x.js +0 -2
- package/public/assets/store-attachments-DNyH0asy.js +0 -1
- package/public/assets/stored-color-picker-BoVzUatG.css +0 -1
- package/public/assets/stored-color-picker-CYL7LYdQ.js +0 -1
- package/public/assets/style-DLioOiRN.css +0 -1
- package/public/assets/subset-shared.chunk-D1nlqSEH.js +0 -1
- package/public/assets/subset-worker.chunk-BrbK91mW.js +0 -1
- package/public/assets/th-TH-HPSO5L25-BsqplWuv.js +0 -2
- package/public/assets/topology-designer-CvJN6QTV.js +0 -1
- package/public/assets/topology-editor-RZ0_yLuO.js +0 -8
- package/public/assets/topology-settings-module-cWWujj9j.js +0 -1
- package/public/assets/transcription-settings-HrJHl14H.js +0 -4
- package/public/assets/use-directory-listing-BaYgcuHI.js +0 -1
- package/public/assets/use-folding-enabled-CyYip5Go.js +0 -1
- package/public/assets/use-mobile-layer-navigation-CBRepW9w.js +0 -1
- package/public/assets/use-note-editor-session-CRC-natg.js +0 -1
- package/public/assets/use-note-export-flow-0uAfXAwf.js +0 -2
- package/public/assets/use-safe-folder-moves-0nw2jjTX.js +0 -1
- package/public/assets/use-safe-folders-apply-C9pni8YW.js +0 -1
- package/public/assets/use-share-actions-RxO2M3y0.css +0 -1
- package/public/assets/use-share-actions-ujEMhCfl.js +0 -1
- package/public/assets/use-vault-file-link-C0ZO_VPm.js +0 -1
- package/public/assets/vault-entries-api-DVVjgeZh.js +0 -1
- package/public/assets/vault-manager-CMQaGDss.js +0 -1
- package/public/assets/vault-shares-popup-CCPGkRmF.js +0 -1
- package/public/assets/versioning-view-BsIFugt4.js +0 -2
- package/public/assets/widget-frame-CjlAZSUy.js +0 -1
- package/public/assets/zh-HK-E62DVLB3-C8ICkLhf.js +0 -1
- /package/public/assets/{blue-CDYoCZOg.js → blue-DQyE4k0K.js} +0 -0
- /package/public/assets/{use-safe-folders-apply-DGWTaX5A.css → progress-bar-DGWTaX5A.css} +0 -0
- /package/public/assets/{style-DA65Bz1d.js → style-CXzDJL_q.js} +0 -0
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VaultSettingsRegistry = exports.defaultVaultSettings = exports.featureDefaultsVersion = void 0;
|
|
4
4
|
exports.isFeatureEnabled = isFeatureEnabled;
|
|
5
5
|
exports.migrateFeatureDefaults = migrateFeatureDefaults;
|
|
6
|
+
exports.migrateTypesSwitch = migrateTypesSwitch;
|
|
6
7
|
exports.validateVaultSettings = validateVaultSettings;
|
|
7
8
|
const node_crypto_1 = require("node:crypto");
|
|
8
9
|
const promises_1 = require("node:fs/promises");
|
|
@@ -19,6 +20,10 @@ const discovery_settings_1 = require("./discovery-settings");
|
|
|
19
20
|
const errors_1 = require("./errors");
|
|
20
21
|
const feature_switch_1 = require("./feature-switch");
|
|
21
22
|
const files_settings_1 = require("./files-settings");
|
|
23
|
+
const boards_1 = require("./boards");
|
|
24
|
+
const ide_1 = require("./ide");
|
|
25
|
+
const note_editor_1 = require("./note-editor");
|
|
26
|
+
const rss_1 = require("./rss");
|
|
22
27
|
const journal_settings_1 = require("./journal-settings");
|
|
23
28
|
const matrix_settings_1 = require("./matrix-settings");
|
|
24
29
|
const navigation_settings_1 = require("./navigation-settings");
|
|
@@ -39,35 +44,48 @@ const versioning_settings_1 = require("./versioning-settings");
|
|
|
39
44
|
* The version of the rule that an absent switch reads as off. A `vault.yaml` without it predates the
|
|
40
45
|
* rule, when Chat, Boards, Calendars, Notes, Files, Topology, Graph, Daily Notes and Versioning were on
|
|
41
46
|
* unless turned off; one marked 2 predates Attachments joining it, when Attachments was on unless
|
|
42
|
-
* turned off
|
|
47
|
+
* turned off; one marked 3 predates the Notes view (ENG-424), when `notes` switched the type browser
|
|
48
|
+
* now called Types and `topology` its visual designer. Each is migrated once by writing down the
|
|
49
|
+
* switches it was showing.
|
|
43
50
|
*/
|
|
44
|
-
exports.featureDefaultsVersion =
|
|
51
|
+
exports.featureDefaultsVersion = 4;
|
|
45
52
|
/** The marker of a file written before Attachments joined the rule. */
|
|
46
53
|
const attachmentsOnByDefaultVersion = 2;
|
|
54
|
+
/** The marker of a file written before the type browser became Types and Notes became a view of its own. */
|
|
55
|
+
const typesSwitchVersion = 3;
|
|
47
56
|
/**
|
|
48
|
-
* What a vault created through the app starts with:
|
|
49
|
-
*
|
|
57
|
+
* What a vault created through the app starts with: Notes alone switched on, so it opens on its own
|
|
58
|
+
* notes rather than on Settings. The rule for a file is unchanged: a switch it leaves out is off.
|
|
50
59
|
*/
|
|
51
|
-
exports.defaultVaultSettings = { featureDefaults: exports.featureDefaultsVersion, notes: {}, dailyNotes: { ...daily_notes_settings_1.defaultDailyNotesSettings }, navigation: structuredClone(navigation_settings_1.defaultNavigationSettings),
|
|
60
|
+
exports.defaultVaultSettings = { featureDefaults: exports.featureDefaultsVersion, notes: { enabled: true }, dailyNotes: { ...daily_notes_settings_1.defaultDailyNotesSettings }, navigation: structuredClone(navigation_settings_1.defaultNavigationSettings), agent: { variables: {}, entityBindings: [] } };
|
|
52
61
|
/** Whether a switchable feature is on for a vault, off when the vault has no record; the Notes view reads its switch from the shared `notes` record. */
|
|
53
62
|
function isFeatureEnabled(settings, feature) {
|
|
54
63
|
return (feature === 'notes' ? settings.notes.enabled : settings[feature]?.enabled) ?? feature_switch_1.defaultFeatureSwitch.enabled;
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
57
|
-
* A parsed `vault.yaml` written
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
66
|
+
* A parsed `vault.yaml` written under an older rule, given the switches it was showing. Without a
|
|
67
|
+
* marker, Chat, Boards, Calendars, Notes, Files, Topology, Graph, Daily Notes and Versioning were on
|
|
68
|
+
* unless a vault turned them off; under marker 2, Attachments still was. Each one the file does not
|
|
69
|
+
* mention is written on. Under marker 3 (and so after either of those), `notes` was the type browser
|
|
70
|
+
* and `topology` its designer: both become `types` (see `migrateTypesSwitch`). The marker records that
|
|
71
|
+
* it has been done. The other switches were already off by default, so nothing is written for them. A
|
|
72
|
+
* file that carries the current marker, an unknown one, or is not an object, is returned as it came.
|
|
73
|
+
* It works on the parsed YAML rather than validated settings because validation already reads an
|
|
74
|
+
* absent switch as off, and refuses the menu IDs a version 3 file still names.
|
|
64
75
|
*/
|
|
65
76
|
function migrateFeatureDefaults(parsed) {
|
|
66
|
-
if (!(0, records_1.isRecord)(parsed)
|
|
77
|
+
if (!(0, records_1.isRecord)(parsed))
|
|
67
78
|
return parsed;
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
const marker = parsed.featureDefaults;
|
|
80
|
+
if (marker !== undefined && marker !== attachmentsOnByDefaultVersion && marker !== typesSwitchVersion)
|
|
81
|
+
return parsed;
|
|
82
|
+
return migrateTypesSwitch(marker === typesSwitchVersion ? parsed : migrateSwitchesShown(parsed));
|
|
83
|
+
}
|
|
84
|
+
/** Markers absent and 2 to 3: the switches the file was showing, written down. */
|
|
85
|
+
function migrateSwitchesShown(parsed) {
|
|
86
|
+
const migrated = { featureDefaults: typesSwitchVersion, ...parsed };
|
|
87
|
+
// A marked file keeps its marker where it was, at the top, with the next version.
|
|
88
|
+
migrated.featureDefaults = typesSwitchVersion;
|
|
71
89
|
if (parsed.attachments === undefined)
|
|
72
90
|
migrated.attachments = { ...attachment_settings_1.defaultAttachmentSettings, enabled: true };
|
|
73
91
|
else if ((0, records_1.isRecord)(parsed.attachments) && parsed.attachments.enabled === undefined)
|
|
@@ -87,6 +105,51 @@ function migrateFeatureDefaults(parsed) {
|
|
|
87
105
|
migrated[feature] = { enabled: true };
|
|
88
106
|
return migrated;
|
|
89
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Marker 3 to 4 (ENG-424): the type browser's `notes` switch becomes `types`, and the designer's
|
|
110
|
+
* `topology` folds into it, on when either was. `notes` now switches the new Notes view, written off,
|
|
111
|
+
* so the vault shows what it showed; its note keys stay. In the menu, `notes` becomes `types` where it
|
|
112
|
+
* stood and `topology` goes; on desktop the new Notes leads the top list, and on the phone it keeps
|
|
113
|
+
* the old item's slot, with Types first under More (or right after it when it was there).
|
|
114
|
+
*/
|
|
115
|
+
function migrateTypesSwitch(parsed) {
|
|
116
|
+
const { topology, ...rest } = parsed;
|
|
117
|
+
const migrated = { featureDefaults: exports.featureDefaultsVersion, ...rest };
|
|
118
|
+
// The marker stays where it was, at the top, with the current version.
|
|
119
|
+
migrated.featureDefaults = exports.featureDefaultsVersion;
|
|
120
|
+
const notes = parsed.notes;
|
|
121
|
+
const wasOn = (record) => (0, records_1.isRecord)(record) && record.enabled === true;
|
|
122
|
+
// Written only when on: under the rule a switch left out is off.
|
|
123
|
+
if (parsed.types === undefined && (wasOn(notes) || wasOn(topology)))
|
|
124
|
+
migrated.types = { enabled: true };
|
|
125
|
+
// A switch that is not true or false is left as it came, for validation to report.
|
|
126
|
+
if (notes === undefined || ((0, records_1.isRecord)(notes) && (notes.enabled === undefined || typeof notes.enabled === 'boolean'))) {
|
|
127
|
+
const { enabled: _browser, ...keys } = (0, records_1.isRecord)(notes) ? notes : {};
|
|
128
|
+
migrated.notes = { ...keys, enabled: false };
|
|
129
|
+
}
|
|
130
|
+
if ((0, records_1.isRecord)(parsed.navigation))
|
|
131
|
+
migrated.navigation = migrateTypesNavigation(parsed.navigation);
|
|
132
|
+
return migrated;
|
|
133
|
+
}
|
|
134
|
+
function migrateTypesNavigation(navigation) {
|
|
135
|
+
const rename = (list) => Array.isArray(list) ? list.filter((item) => item !== 'topology').map((item) => item === 'notes' ? 'types' : item) : list;
|
|
136
|
+
const migrated = { ...navigation };
|
|
137
|
+
if ((0, records_1.isRecord)(navigation.desktop)) {
|
|
138
|
+
const top = rename(navigation.desktop.top);
|
|
139
|
+
migrated.desktop = { ...navigation.desktop, top: Array.isArray(top) ? ['notes', ...top] : top, bottom: rename(navigation.desktop.bottom) };
|
|
140
|
+
}
|
|
141
|
+
if ((0, records_1.isRecord)(navigation.mobile)) {
|
|
142
|
+
const strip = (list) => Array.isArray(list) ? list.filter((item) => item !== 'topology') : list;
|
|
143
|
+
const primary = strip(navigation.mobile.primary);
|
|
144
|
+
const more = strip(navigation.mobile.more);
|
|
145
|
+
if (Array.isArray(more) && !more.includes('types')) {
|
|
146
|
+
const at = more.indexOf('notes');
|
|
147
|
+
more.splice(at + 1, 0, 'types');
|
|
148
|
+
}
|
|
149
|
+
migrated.mobile = { ...navigation.mobile, primary, more };
|
|
150
|
+
}
|
|
151
|
+
return migrated;
|
|
152
|
+
}
|
|
90
153
|
class VaultSettingsRegistry {
|
|
91
154
|
vault;
|
|
92
155
|
changes;
|
|
@@ -145,9 +208,33 @@ class VaultSettingsRegistry {
|
|
|
145
208
|
const settings = await this.read();
|
|
146
209
|
return settings.agent.entityBindings.filter((item) => item.entityId === entityId).map((item) => ({ provider: 'vault-settings', kind: 'semantic-entity-binding', label: item.meaning }));
|
|
147
210
|
}
|
|
148
|
-
/** Every note ID this document points at, for the cleanup that follows a note vanishing from disk. */
|
|
149
|
-
async referencedNoteIds() {
|
|
211
|
+
/** Every note ID this document points at (semantic bindings and the Notes view's home note), for the cleanup that follows a note vanishing from disk. */
|
|
212
|
+
async referencedNoteIds() { const settings = await this.read(); return new Set([...settings.agent.entityBindings.map((item) => item.entityId), ...(settings.notes.home ? [settings.notes.home] : [])]); }
|
|
150
213
|
removeEntityBinding(entityId) { return this.update({ op: 'remove_entity_binding', entityId }); }
|
|
214
|
+
/** The home note follows a move or rename of itself or a folder holding it; whether it did. */
|
|
215
|
+
relocateNotesHome(from, to) {
|
|
216
|
+
return this.lock.run(async () => {
|
|
217
|
+
const settings = await this.readUnlocked();
|
|
218
|
+
const home = (0, note_key_settings_1.relocatedNotesHome)(settings.notes.home, from, to);
|
|
219
|
+
if (home === undefined)
|
|
220
|
+
return false;
|
|
221
|
+
settings.notes = { ...settings.notes, home };
|
|
222
|
+
await this.writeUnlocked(validateVaultSettings(settings));
|
|
223
|
+
return true;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/** The home note is cleared when it, or a folder holding it, is deleted; whether it was. */
|
|
227
|
+
removeNotesHome(path) {
|
|
228
|
+
return this.lock.run(async () => {
|
|
229
|
+
const settings = await this.readUnlocked();
|
|
230
|
+
if (!(0, note_key_settings_1.deletesNotesHome)(settings.notes.home, path))
|
|
231
|
+
return false;
|
|
232
|
+
const { home: _deleted, ...notes } = settings.notes;
|
|
233
|
+
settings.notes = notes;
|
|
234
|
+
await this.writeUnlocked(validateVaultSettings(settings));
|
|
235
|
+
return true;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
151
238
|
renameEntityBinding(fromId, toId) {
|
|
152
239
|
return this.lock.run(async () => {
|
|
153
240
|
const settings = await this.readUnlocked();
|
|
@@ -256,11 +343,15 @@ function validateVaultSettings(value) {
|
|
|
256
343
|
if (featureDefaults !== undefined && featureDefaults !== exports.featureDefaultsVersion)
|
|
257
344
|
throw new errors_1.GraphAgentError('malformed_settings', `featureDefaults must be ${exports.featureDefaultsVersion} when present.`);
|
|
258
345
|
// Files keeps its place among the switches, so a file written again keeps its order; its record carries more than the switch.
|
|
259
|
-
|
|
346
|
+
// Files, Kanban, RSS and the IDE carry more than the switch (ENG-433).
|
|
347
|
+
const records = { files: files_settings_1.validateFilesSettings, boards: boards_1.validateBoardsSettings, rss: rss_1.validateRssSettings, ide: ide_1.validateIdeSettings };
|
|
348
|
+
const switches = Object.fromEntries(['chat', 'boards', 'calendars', 'files', 'types', 'graph', 'rss', 'ide', 'mcp'].flatMap((feature) => { const raw = value[feature]; return raw === undefined ? [] : [[feature, (records[feature] ?? ((input) => (0, feature_switch_1.validateFeatureSwitch)(input, feature)))(raw)]]; }));
|
|
260
349
|
const rawSpotlight = value.spotlight;
|
|
261
350
|
const spotlight = rawSpotlight === undefined ? undefined : (0, spotlight_settings_1.validateSpotlightSettings)(rawSpotlight);
|
|
351
|
+
const noteEditor = (0, note_editor_1.validateNoteEditorSettings)(value.noteEditor);
|
|
352
|
+
const workspace = (0, note_editor_1.validateWorkspaceSettings)(value.workspace);
|
|
262
353
|
const rawTranscription = value.transcription;
|
|
263
354
|
const transcription = rawTranscription === undefined ? undefined : (0, transcription_settings_1.validateTranscriptionGuidance)(rawTranscription);
|
|
264
|
-
return { ...(transcription ? { transcription } : {}), ...(featureDefaults === undefined ? {} : { featureDefaults }), notes, dailyNotes, navigation, ...(journal ? { journal } : {}), ...(versioning ? { versioning } : {}), ...(matrices ? { matrices } : {}), ...(dashboards ? { dashboards } : {}), ...(spaces ? { spaces } : {}), ...(discovery ? { discovery } : {}), ...(shares ? { shares } : {}), ...(safeNotes ? { safeNotes } : {}), ...switches, ...(attachments ? { attachments } : {}), ...(recordings ? { recordings } : {}), ...(colorSlots ? { colorSlots } : {}), ...(qrCode ? { qrCode } : {}), ...(spotlight ? { spotlight } : {}), agent: { variables: (0, agent_context_1.validateAgentVariables)(agent.variables), ...(instructions ? { instructions } : {}), entityBindings, ...(editing ? { editing } : {}), ...(tools ? { tools } : {}) } };
|
|
355
|
+
return { ...(transcription ? { transcription } : {}), ...(featureDefaults === undefined ? {} : { featureDefaults }), notes, dailyNotes, navigation, ...(journal ? { journal } : {}), ...(versioning ? { versioning } : {}), ...(matrices ? { matrices } : {}), ...(dashboards ? { dashboards } : {}), ...(spaces ? { spaces } : {}), ...(discovery ? { discovery } : {}), ...(shares ? { shares } : {}), ...(safeNotes ? { safeNotes } : {}), ...switches, ...(attachments ? { attachments } : {}), ...(recordings ? { recordings } : {}), ...(colorSlots ? { colorSlots } : {}), ...(qrCode ? { qrCode } : {}), ...(spotlight ? { spotlight } : {}), ...(noteEditor ? { noteEditor } : {}), ...(workspace ? { workspace } : {}), agent: { variables: (0, agent_context_1.validateAgentVariables)(agent.variables), ...(instructions ? { instructions } : {}), entityBindings, ...(editing ? { editing } : {}), ...(tools ? { tools } : {}) } };
|
|
265
356
|
}
|
|
266
357
|
function isNodeError(error) { return error instanceof Error && 'code' in error; }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// The files a stylesheet names: `url(…)` anywhere (backgrounds, `@font-face` sources) and `@import`.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.cssReferences = cssReferences;
|
|
5
|
+
exports.replaceCssReferences = replaceCssReferences;
|
|
6
|
+
// In order: a comment (skipped), `@import "…"`, `url(…)` quoted or bare, and any other string (skipped, so a `url(` inside one is not read).
|
|
7
|
+
const token = /\/\*[\s\S]*?\*\/|(@import\s+)(["'])((?:\\[\s\S]|(?!\2)[^\\\n])*)\2|url\(\s*(?:(["'])((?:\\[\s\S]|(?!\4)[^\\\n])*)\4|((?:\\[\s\S]|[^"'()\\\s])+))\s*\)|(["'])(?:\\[\s\S]|(?!\7)[^\\\n])*\7/gi;
|
|
8
|
+
function unescapeCss(value) {
|
|
9
|
+
return value.replace(/\\(?:([0-9a-f]{1,6})\s?|([\s\S]))/gi, (_whole, hex, literal) => {
|
|
10
|
+
if (hex === undefined)
|
|
11
|
+
return literal === '\n' ? '' : literal ?? '';
|
|
12
|
+
const code = Number.parseInt(hex, 16);
|
|
13
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : '�';
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** Every address a stylesheet names, in source order. `@import url(…)` is read as its `url(…)`. */
|
|
17
|
+
function cssReferences(css) {
|
|
18
|
+
const found = [];
|
|
19
|
+
for (const match of css.matchAll(token)) {
|
|
20
|
+
const start = match.index;
|
|
21
|
+
if (match[1] !== undefined)
|
|
22
|
+
found.push({ start, end: start + match[0].length, reference: unescapeCss(match[3]), form: 'import' });
|
|
23
|
+
else if (match[5] !== undefined || match[6] !== undefined)
|
|
24
|
+
found.push({ start, end: start + match[0].length, reference: unescapeCss(match[5] ?? match[6]), form: 'url' });
|
|
25
|
+
}
|
|
26
|
+
return found;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The stylesheet with each reference `addressOf` answers for written as that address; one it leaves
|
|
30
|
+
* undefined keeps its source text. An address must hold no `"`, `\` or line break, as a `data:`
|
|
31
|
+
* address from `data-uri.ts` never does.
|
|
32
|
+
*/
|
|
33
|
+
function replaceCssReferences(css, references, addressOf) {
|
|
34
|
+
let out = '';
|
|
35
|
+
let at = 0;
|
|
36
|
+
for (const reference of references) {
|
|
37
|
+
const address = addressOf(reference);
|
|
38
|
+
if (address === undefined)
|
|
39
|
+
continue;
|
|
40
|
+
out += `${css.slice(at, reference.start)}${reference.form === 'import' ? '@import ' : ''}url("${address}")`;
|
|
41
|
+
at = reference.end;
|
|
42
|
+
}
|
|
43
|
+
return out + css.slice(at);
|
|
44
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// A file as a `data:` address a page can load in place of the file.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.bareType = bareType;
|
|
5
|
+
exports.isTextType = isTextType;
|
|
6
|
+
exports.decodeText = decodeText;
|
|
7
|
+
exports.textDataUri = textDataUri;
|
|
8
|
+
exports.bytesDataUri = bytesDataUri;
|
|
9
|
+
const textType = /^(?:text\/.+|application\/(?:javascript|ecmascript|json|xml|xhtml\+xml)|image\/svg\+xml|.+\+(?:xml|json))$/;
|
|
10
|
+
/** A media type without its parameters, lower-cased. */
|
|
11
|
+
function bareType(mimeType) { return mimeType.split(';')[0].trim().toLowerCase(); }
|
|
12
|
+
/** Whether a type is text a `data:` address can carry as it is, rather than as base64. */
|
|
13
|
+
function isTextType(mimeType) { return textType.test(bareType(mimeType)); }
|
|
14
|
+
/** The file's text when it is valid UTF-8, without a byte-order mark; undefined for anything else, which is embedded as bytes. */
|
|
15
|
+
function decodeText(bytes) {
|
|
16
|
+
try {
|
|
17
|
+
return new TextDecoder('utf-8', { fatal: true, ignoreBOM: false }).decode(bytes);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Everything but the printable ASCII that is safe inside a quoted attribute, a CSS `url("…")` and a `srcset` alike. */
|
|
24
|
+
const escaped = /[^!$()*+,\-./0-9:;=?@A-Z[\]^_`a-z{|}~]/gu;
|
|
25
|
+
function percentEncode(character) {
|
|
26
|
+
if (character === "'")
|
|
27
|
+
return '%27';
|
|
28
|
+
// A lone surrogate has no UTF-8 form; it becomes the replacement character, as a browser would show it.
|
|
29
|
+
try {
|
|
30
|
+
return encodeURIComponent(character);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return '%EF%BF%BD';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Text as a `data:` address with no base64 around it, so a stylesheet that already holds embedded
|
|
38
|
+
* pictures does not grow by a third again. Whitespace, quotes, `<`, `&`, `#` and `%` are
|
|
39
|
+
* percent-encoded: the address holds no character that ends an attribute, a `url("…")`, a `srcset`
|
|
40
|
+
* candidate or a `<style>` element. A final comma is encoded too, since `srcset` would drop it.
|
|
41
|
+
*/
|
|
42
|
+
function textDataUri(mimeType, text) {
|
|
43
|
+
const body = text.replace(escaped, percentEncode).replace(/,$/, '%2C');
|
|
44
|
+
return `data:${bareType(mimeType)};charset=utf-8,${body}`;
|
|
45
|
+
}
|
|
46
|
+
function bytesDataUri(mimeType, bytes) {
|
|
47
|
+
return `data:${bareType(mimeType)};base64,${Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64')}`;
|
|
48
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeAttribute = decodeAttribute;
|
|
4
|
+
exports.encodeAttribute = encodeAttribute;
|
|
5
|
+
exports.scanHtml = scanHtml;
|
|
6
|
+
exports.parseSrcset = parseSrcset;
|
|
7
|
+
exports.formatSrcset = formatSrcset;
|
|
8
|
+
// The files a page names, each with the exact source range to rewrite, so the rest of the page stays byte for byte as written.
|
|
9
|
+
const htmlparser2_1 = require("htmlparser2");
|
|
10
|
+
const addressAttributes = {
|
|
11
|
+
img: ['src'], source: ['src'], video: ['src', 'poster'], audio: ['src'], track: ['src'], embed: ['src'], object: ['data'], input: ['src'],
|
|
12
|
+
script: ['src'], iframe: ['src'], frame: ['src'], image: ['href', 'xlink:href'], body: ['background'], table: ['background'], td: ['background'], th: ['background']
|
|
13
|
+
};
|
|
14
|
+
const srcsetElements = new Set(['img', 'source']);
|
|
15
|
+
const frames = new Set(['iframe', 'frame']);
|
|
16
|
+
/** The `<link>` relations that load a file; `canonical`, `alternate`, `next` and the like only point at one. */
|
|
17
|
+
const embeddedRelations = new Set(['stylesheet', 'icon', 'apple-touch-icon', 'apple-touch-icon-precomposed', 'mask-icon', 'preload', 'modulepreload', 'manifest']);
|
|
18
|
+
const named = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'" };
|
|
19
|
+
/** An attribute's value with the character references a path or a style can hold resolved. */
|
|
20
|
+
function decodeAttribute(raw) {
|
|
21
|
+
return raw.replace(/&(?:#(\d+)|#x([0-9a-f]+)|(amp|lt|gt|quot|apos));/gi, (whole, decimal, hex, name) => {
|
|
22
|
+
if (name !== undefined)
|
|
23
|
+
return named[name.toLowerCase()] ?? whole;
|
|
24
|
+
const code = decimal !== undefined ? Number.parseInt(decimal, 10) : Number.parseInt(hex ?? '', 16);
|
|
25
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : whole;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** A value as the source of an attribute quoted the way it was; an unquoted one gains double quotes, since the new value may hold what a bare one cannot. */
|
|
29
|
+
function encodeAttribute(value, quote) {
|
|
30
|
+
const ampersands = value.replace(/&/g, '&');
|
|
31
|
+
if (quote === 'single')
|
|
32
|
+
return ampersands.replace(/'/g, ''');
|
|
33
|
+
const encoded = ampersands.replace(/"/g, '"');
|
|
34
|
+
return quote === 'none' ? `"${encoded}"` : encoded;
|
|
35
|
+
}
|
|
36
|
+
/** Every place a page names a file, in source order, and its `<base>`. Comments, scripts' text and anything a tag does not load are left alone. */
|
|
37
|
+
function scanHtml(html) {
|
|
38
|
+
const references = [];
|
|
39
|
+
let base;
|
|
40
|
+
let element = '';
|
|
41
|
+
let attributes = [];
|
|
42
|
+
let name = '';
|
|
43
|
+
let valueStart = -1;
|
|
44
|
+
let valueEnd = -1;
|
|
45
|
+
let style;
|
|
46
|
+
let inStyle = false;
|
|
47
|
+
const valueOf = (attribute) => decodeAttribute(html.slice(attribute.start, attribute.end));
|
|
48
|
+
const attribute = (wanted) => attributes.find((candidate) => candidate.name === wanted);
|
|
49
|
+
function closeTag(selfClosing) {
|
|
50
|
+
if (element === 'base' && base === undefined) {
|
|
51
|
+
const href = attribute('href');
|
|
52
|
+
if (href)
|
|
53
|
+
base = valueOf(href);
|
|
54
|
+
}
|
|
55
|
+
if (element === 'link') {
|
|
56
|
+
const relation = attribute('rel');
|
|
57
|
+
const href = attribute('href');
|
|
58
|
+
if (relation && href && valueOf(relation).toLowerCase().split(/\s+/).some((word) => embeddedRelations.has(word)))
|
|
59
|
+
references.push({ kind: 'address', ...rangeOf(href), value: valueOf(href), quote: href.quote, element, attribute: 'href', frame: false });
|
|
60
|
+
}
|
|
61
|
+
for (const wanted of addressAttributes[element] ?? []) {
|
|
62
|
+
const found = attribute(wanted);
|
|
63
|
+
if (found)
|
|
64
|
+
references.push({ kind: 'address', ...rangeOf(found), value: valueOf(found), quote: found.quote, element, attribute: wanted, frame: frames.has(element) });
|
|
65
|
+
}
|
|
66
|
+
if (srcsetElements.has(element)) {
|
|
67
|
+
const srcset = attribute('srcset');
|
|
68
|
+
if (srcset)
|
|
69
|
+
references.push({ kind: 'srcset', ...rangeOf(srcset), value: valueOf(srcset), quote: srcset.quote });
|
|
70
|
+
}
|
|
71
|
+
const inline = attribute('style');
|
|
72
|
+
if (inline)
|
|
73
|
+
references.push({ kind: 'inline-style', ...rangeOf(inline), value: valueOf(inline), quote: inline.quote });
|
|
74
|
+
inStyle = element === 'style' && !selfClosing;
|
|
75
|
+
style = undefined;
|
|
76
|
+
attributes = [];
|
|
77
|
+
}
|
|
78
|
+
const tokenizer = new htmlparser2_1.Tokenizer({ xmlMode: false, decodeEntities: false }, {
|
|
79
|
+
onopentagname(start, end) { element = html.slice(start, end).toLowerCase(); attributes = []; },
|
|
80
|
+
onattribname(start, end) { name = html.slice(start, end).toLowerCase(); valueStart = -1; valueEnd = -1; },
|
|
81
|
+
onattribdata(start, end) { if (valueStart < 0)
|
|
82
|
+
valueStart = start; valueEnd = end; },
|
|
83
|
+
onattribentity() { },
|
|
84
|
+
onattribend(quote) {
|
|
85
|
+
// The first of a repeated attribute wins, as it does in a browser; one with no value names nothing.
|
|
86
|
+
if (valueEnd > valueStart && valueStart >= 0 && !attributes.some((candidate) => candidate.name === name))
|
|
87
|
+
attributes.push({ name, start: valueStart, end: valueEnd, quote: quote === htmlparser2_1.QuoteType.Double ? 'double' : quote === htmlparser2_1.QuoteType.Single ? 'single' : 'none' });
|
|
88
|
+
},
|
|
89
|
+
onopentagend() { closeTag(false); },
|
|
90
|
+
onselfclosingtag() { closeTag(true); },
|
|
91
|
+
ontext(start, end) { if (inStyle)
|
|
92
|
+
style = { start: style?.start ?? start, end }; },
|
|
93
|
+
ontextentity() { },
|
|
94
|
+
onclosetag(start, end) {
|
|
95
|
+
if (inStyle && html.slice(start, end).toLowerCase() === 'style') {
|
|
96
|
+
if (style)
|
|
97
|
+
references.push({ kind: 'style-element', ...style, value: html.slice(style.start, style.end) });
|
|
98
|
+
inStyle = false;
|
|
99
|
+
style = undefined;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
oncomment() { }, oncdata() { }, ondeclaration() { }, onprocessinginstruction() { }, onend() { }
|
|
103
|
+
});
|
|
104
|
+
tokenizer.write(html);
|
|
105
|
+
tokenizer.end();
|
|
106
|
+
return { references: references.sort((left, right) => left.start - right.start), ...(base === undefined ? {} : { base }) };
|
|
107
|
+
}
|
|
108
|
+
function rangeOf(attribute) { return { start: attribute.start, end: attribute.end }; }
|
|
109
|
+
/** The candidates of a `srcset`: an address is a run without whitespace that does not end in a comma, then its descriptor up to the next comma. */
|
|
110
|
+
function parseSrcset(value) {
|
|
111
|
+
const candidates = [];
|
|
112
|
+
for (const match of value.matchAll(/\s*([^\s,](?:\S*[^\s,])?)(?:\s+([^,]*))?\s*,?/g))
|
|
113
|
+
candidates.push({ address: match[1], descriptor: (match[2] ?? '').trim() });
|
|
114
|
+
return candidates;
|
|
115
|
+
}
|
|
116
|
+
function formatSrcset(candidates) {
|
|
117
|
+
return candidates.map((candidate) => candidate.descriptor ? `${candidate.address} ${candidate.descriptor}` : candidate.address).join(', ');
|
|
118
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveLocalReference = exports.folderOf = exports.defaultStandaloneLimits = exports.buildStandalonePage = void 0;
|
|
4
|
+
var standalone_1 = require("./standalone");
|
|
5
|
+
Object.defineProperty(exports, "buildStandalonePage", { enumerable: true, get: function () { return standalone_1.buildStandalonePage; } });
|
|
6
|
+
Object.defineProperty(exports, "defaultStandaloneLimits", { enumerable: true, get: function () { return standalone_1.defaultStandaloneLimits; } });
|
|
7
|
+
var local_reference_1 = require("./local-reference");
|
|
8
|
+
Object.defineProperty(exports, "folderOf", { enumerable: true, get: function () { return local_reference_1.folderOf; } });
|
|
9
|
+
Object.defineProperty(exports, "resolveLocalReference", { enumerable: true, get: function () { return local_reference_1.resolveLocalReference; } });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Which vault file a reference written in a page or a stylesheet names.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.folderOf = folderOf;
|
|
5
|
+
exports.resolveLocalReference = resolveLocalReference;
|
|
6
|
+
exports.baseFolder = baseFolder;
|
|
7
|
+
const ownAddress = /^[a-z][a-z0-9+.-]*:/i;
|
|
8
|
+
/** The folder a vault path sits in; empty for one at the root. */
|
|
9
|
+
function folderOf(path) { return path.includes('/') ? path.slice(0, path.lastIndexOf('/')) : ''; }
|
|
10
|
+
/** `folder` walked along a relative path; undefined when a segment climbs above the vault or names nothing a path can hold. */
|
|
11
|
+
function walk(folder, relative) {
|
|
12
|
+
const parts = folder ? folder.split('/') : [];
|
|
13
|
+
for (const segment of relative.split('/')) {
|
|
14
|
+
let name;
|
|
15
|
+
try {
|
|
16
|
+
name = decodeURIComponent(segment);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
name = segment;
|
|
20
|
+
}
|
|
21
|
+
if (name === '' || name === '.')
|
|
22
|
+
continue;
|
|
23
|
+
if (name === '..') {
|
|
24
|
+
if (!parts.length)
|
|
25
|
+
return undefined;
|
|
26
|
+
parts.pop();
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (/[/\\\u0000-\u001f]/.test(name))
|
|
30
|
+
return undefined;
|
|
31
|
+
parts.push(name);
|
|
32
|
+
}
|
|
33
|
+
return parts;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The vault file a reference made from `folder` names, or undefined for an address of its own (a
|
|
37
|
+
* scheme such as `https:` or `data:`, a protocol-relative or root path, a bare fragment) and for one
|
|
38
|
+
* that climbs above the vault. A query is dropped: it names the same file.
|
|
39
|
+
*/
|
|
40
|
+
function resolveLocalReference(folder, reference) {
|
|
41
|
+
const trimmed = reference.trim();
|
|
42
|
+
const hash = trimmed.indexOf('#');
|
|
43
|
+
const fragment = hash < 0 ? '' : trimmed.slice(hash);
|
|
44
|
+
const bare = (hash < 0 ? trimmed : trimmed.slice(0, hash)).replace(/\?.*$/, '');
|
|
45
|
+
if (!bare || ownAddress.test(bare) || bare.startsWith('/') || bare.startsWith('\\'))
|
|
46
|
+
return undefined;
|
|
47
|
+
const path = walk(folder, bare)?.join('/');
|
|
48
|
+
return path ? { path, fragment } : undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The folder a page's `<base href>` moves its references to: the page's own folder without one,
|
|
52
|
+
* the folder the base names when it is relative, and `undefined` when it names another site, where
|
|
53
|
+
* nothing the page references is a vault file.
|
|
54
|
+
*/
|
|
55
|
+
function baseFolder(pageFolder, base) {
|
|
56
|
+
if (base === undefined)
|
|
57
|
+
return pageFolder;
|
|
58
|
+
const bare = base.trim().replace(/[?#].*$/, '');
|
|
59
|
+
if (!bare)
|
|
60
|
+
return pageFolder;
|
|
61
|
+
if (ownAddress.test(bare) || bare.startsWith('/') || bare.startsWith('\\'))
|
|
62
|
+
return undefined;
|
|
63
|
+
return walk(pageFolder, bare.endsWith('/') ? bare : folderOf(bare))?.join('/');
|
|
64
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultStandaloneLimits = void 0;
|
|
4
|
+
exports.buildStandalonePage = buildStandalonePage;
|
|
5
|
+
// A page as one document: every local file it names, and what those name in turn, embedded as `data:` addresses.
|
|
6
|
+
const css_1 = require("./css");
|
|
7
|
+
const data_uri_1 = require("./data-uri");
|
|
8
|
+
const html_1 = require("./html");
|
|
9
|
+
const local_reference_1 = require("./local-reference");
|
|
10
|
+
exports.defaultStandaloneLimits = Object.freeze({ maxFileBytes: 10 * 1024 * 1024, maxTotalBytes: 64 * 1024 * 1024 });
|
|
11
|
+
const htmlTypes = new Set(['text/html', 'application/xhtml+xml']);
|
|
12
|
+
/**
|
|
13
|
+
* Walks the page's references to a fixed point: HTML attributes and `srcset`, `<style>` and `style`,
|
|
14
|
+
* and in every stylesheet `url()` and `@import`; a frame's page is built the same way. Each file is
|
|
15
|
+
* read once and reused wherever it is named again, a file that names one of its own ancestors keeps
|
|
16
|
+
* that reference as written, and addresses of another site are never touched.
|
|
17
|
+
*/
|
|
18
|
+
async function buildStandalonePage(page, files, limits = exports.defaultStandaloneLimits) {
|
|
19
|
+
const build = new Build(files, limits);
|
|
20
|
+
const html = await build.page(page.path, page.html, [page.path]);
|
|
21
|
+
return { html, embedded: [...build.embedded], skipped: build.skipped, probed: [...build.probed] };
|
|
22
|
+
}
|
|
23
|
+
class Build {
|
|
24
|
+
files;
|
|
25
|
+
limits;
|
|
26
|
+
embedded = new Set();
|
|
27
|
+
skipped = [];
|
|
28
|
+
probed = new Set();
|
|
29
|
+
/** A finished file's address by path, or undefined for one that stays a link. */
|
|
30
|
+
addresses = new Map();
|
|
31
|
+
total = 0;
|
|
32
|
+
constructor(files, limits) {
|
|
33
|
+
this.files = files;
|
|
34
|
+
this.limits = limits;
|
|
35
|
+
}
|
|
36
|
+
async page(path, html, ancestors) {
|
|
37
|
+
const scan = (0, html_1.scanHtml)(html);
|
|
38
|
+
const folder = (0, local_reference_1.baseFolder)((0, local_reference_1.folderOf)(path), scan.base);
|
|
39
|
+
if (folder === undefined)
|
|
40
|
+
return html;
|
|
41
|
+
let out = '';
|
|
42
|
+
let at = 0;
|
|
43
|
+
// One at a time: a file named twice is read once, and no two files ever wait on each other.
|
|
44
|
+
for (const reference of scan.references) {
|
|
45
|
+
let next;
|
|
46
|
+
if (reference.kind === 'address') {
|
|
47
|
+
const address = await this.address(folder, reference.value, ancestors, reference.frame);
|
|
48
|
+
if (address !== undefined)
|
|
49
|
+
next = (0, html_1.encodeAttribute)(address, reference.quote);
|
|
50
|
+
}
|
|
51
|
+
else if (reference.kind === 'srcset') {
|
|
52
|
+
const candidates = (0, html_1.parseSrcset)(reference.value);
|
|
53
|
+
let changed = false;
|
|
54
|
+
for (const candidate of candidates) {
|
|
55
|
+
const address = await this.address(folder, candidate.address, ancestors, false);
|
|
56
|
+
if (address !== undefined) {
|
|
57
|
+
candidate.address = address;
|
|
58
|
+
changed = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (changed)
|
|
62
|
+
next = (0, html_1.encodeAttribute)((0, html_1.formatSrcset)(candidates), reference.quote);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const css = await this.css(reference.value, folder, ancestors);
|
|
66
|
+
if (css !== reference.value)
|
|
67
|
+
next = reference.kind === 'inline-style' ? (0, html_1.encodeAttribute)(css, reference.quote) : css;
|
|
68
|
+
}
|
|
69
|
+
if (next === undefined)
|
|
70
|
+
continue;
|
|
71
|
+
out += html.slice(at, reference.start) + next;
|
|
72
|
+
at = reference.end;
|
|
73
|
+
}
|
|
74
|
+
return out + html.slice(at);
|
|
75
|
+
}
|
|
76
|
+
async css(css, folder, ancestors) {
|
|
77
|
+
const references = (0, css_1.cssReferences)(css);
|
|
78
|
+
const addresses = new Map();
|
|
79
|
+
for (const reference of references) {
|
|
80
|
+
const address = await this.address(folder, reference.reference, ancestors, false);
|
|
81
|
+
if (address !== undefined)
|
|
82
|
+
addresses.set(reference.start, address);
|
|
83
|
+
}
|
|
84
|
+
return addresses.size ? (0, css_1.replaceCssReferences)(css, references, (reference) => addresses.get(reference.start)) : css;
|
|
85
|
+
}
|
|
86
|
+
async address(folder, reference, ancestors, frame) {
|
|
87
|
+
const local = (0, local_reference_1.resolveLocalReference)(folder, reference);
|
|
88
|
+
if (!local)
|
|
89
|
+
return undefined;
|
|
90
|
+
const address = await this.embed(local.path, reference, ancestors, frame);
|
|
91
|
+
return address === undefined ? undefined : `${address}${local.fragment}`;
|
|
92
|
+
}
|
|
93
|
+
async embed(path, reference, ancestors, frame) {
|
|
94
|
+
if (ancestors.includes(path))
|
|
95
|
+
return this.skip(path, reference, 'cycle');
|
|
96
|
+
const key = `${frame ? 'frame' : 'file'}\u0000${path}`;
|
|
97
|
+
if (this.addresses.has(key)) {
|
|
98
|
+
const known = this.addresses.get(key);
|
|
99
|
+
return known === undefined || this.spend(known.length) ? known : this.skip(path, reference, 'over-budget');
|
|
100
|
+
}
|
|
101
|
+
this.probed.add(path);
|
|
102
|
+
const file = await this.files.describe(path);
|
|
103
|
+
if (typeof file === 'string')
|
|
104
|
+
return this.leave(key, path, reference, file);
|
|
105
|
+
if (file.size > this.limits.maxFileBytes)
|
|
106
|
+
return this.leave(key, path, reference, 'too-large');
|
|
107
|
+
if (this.total + file.size > this.limits.maxTotalBytes)
|
|
108
|
+
return this.leave(key, path, reference, 'over-budget');
|
|
109
|
+
const bytes = await this.files.read(path);
|
|
110
|
+
const type = (0, data_uri_1.bareType)(file.mimeType);
|
|
111
|
+
const text = (0, data_uri_1.isTextType)(type) ? (0, data_uri_1.decodeText)(bytes) : undefined;
|
|
112
|
+
const within = [...ancestors, path];
|
|
113
|
+
let address;
|
|
114
|
+
if (text === undefined)
|
|
115
|
+
address = (0, data_uri_1.bytesDataUri)(type, bytes);
|
|
116
|
+
else if (type === 'text/css')
|
|
117
|
+
address = (0, data_uri_1.textDataUri)(type, await this.css(text, (0, local_reference_1.folderOf)(path), within));
|
|
118
|
+
else if (frame && htmlTypes.has(type))
|
|
119
|
+
address = (0, data_uri_1.textDataUri)(type, await this.page(path, text, within));
|
|
120
|
+
else
|
|
121
|
+
address = (0, data_uri_1.textDataUri)(type, text);
|
|
122
|
+
if (!this.spend(address.length))
|
|
123
|
+
return this.leave(key, path, reference, 'over-budget');
|
|
124
|
+
this.addresses.set(key, address);
|
|
125
|
+
this.embedded.add(path);
|
|
126
|
+
return address;
|
|
127
|
+
}
|
|
128
|
+
spend(length) {
|
|
129
|
+
if (this.total + length > this.limits.maxTotalBytes)
|
|
130
|
+
return false;
|
|
131
|
+
this.total += length;
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
leave(key, path, reference, reason) {
|
|
135
|
+
this.addresses.set(key, undefined);
|
|
136
|
+
return this.skip(path, reference, reason);
|
|
137
|
+
}
|
|
138
|
+
skip(path, reference, reason) {
|
|
139
|
+
if (!this.skipped.some((entry) => entry.path === path && entry.reason === reason))
|
|
140
|
+
this.skipped.push({ path, reference, reason });
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@braian/html-standalone",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "A web page as one self-contained document: every local file it names, and what those name in turn, embedded as data: addresses. Shared by the page export and a published page's standalone link.",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"import": "./src/index.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"src"
|
|
21
|
+
]
|
|
22
|
+
}
|