alinea 1.7.0 → 2.0.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.init/content/pages/welcome.json +1 -1
- package/dist/.init/src/app/(alinea)/api/cms/route.ts +8 -8
- package/dist/.init/src/cms.ts +45 -47
- package/dist/LICENSES.md +236 -561
- package/dist/adapter/core/cms.js +1 -1
- package/dist/adapter/core/handler.js +1 -1
- package/dist/adapter/core/preview.js +2 -2
- package/dist/adapter/core/previewContext.d.ts +1 -1
- package/dist/adapter/core/previewContext.js +1 -1
- package/dist/adapter/next/cms.d.ts +1 -1
- package/dist/adapter/next/cms.js +7 -7
- package/dist/adapter/next/context.js +1 -1
- package/dist/adapter/next/handler.d.ts +2 -4
- package/dist/adapter/next/handler.js +11 -5
- package/dist/adapter/next/previews.d.ts +2 -2
- package/dist/adapter/next/previews.js +13 -17
- package/dist/adapter/next/with-alinea.js +20 -10
- package/dist/adapter/vite/plugin.d.ts +2 -0
- package/dist/adapter/vite/plugin.js +66 -0
- package/dist/backend/Auth.js +1 -1
- package/dist/backend/HandleAction.d.ts +1 -0
- package/dist/backend/HandleAction.js +2 -1
- package/dist/backend/Handler.js +142 -31
- package/dist/backend/Previews.d.ts +2 -5
- package/dist/backend/api/BasicAuth.d.ts +2 -2
- package/dist/backend/api/BasicAuth.js +5 -3
- package/dist/backend/api/CreateBackend.d.ts +11 -2
- package/dist/backend/api/CreateBackend.js +45 -2502
- package/dist/backend/api/DatabaseApi.d.ts +8 -2
- package/dist/backend/api/DatabaseApi.js +252 -123
- package/dist/backend/api/GithubApi.d.ts +0 -4
- package/dist/backend/api/GithubApi.js +11 -7
- package/dist/backend/api/OAuth2.d.ts +3 -3
- package/dist/backend/api/OAuth2.js +36 -25
- package/dist/backend/api/S3Uploads.d.ts +32 -0
- package/dist/backend/api/S3Uploads.js +178 -0
- package/dist/backend/api/SupabaseUploads.d.ts +28 -0
- package/dist/backend/api/SupabaseUploads.js +41 -0
- package/dist/backend/api/UploadPaths.d.ts +7 -0
- package/dist/backend/api/UploadPaths.js +53 -0
- package/dist/backend/api/auth.d.ts +5 -0
- package/dist/backend/api/auth.js +15 -0
- package/dist/backend/api/database.d.ts +2 -0
- package/dist/backend/api/database.js +16 -0
- package/dist/backend/api/github.d.ts +3 -0
- package/dist/backend/api/github.js +10 -0
- package/dist/backend/api/uploads.d.ts +9 -0
- package/dist/backend/api/uploads.js +23 -0
- package/dist/backend/loader/JsonLoader.js +1 -1
- package/dist/backend/resolver/ParsePreview.js +2 -2
- package/dist/backend/router/NodeHandler.js +1 -1
- package/dist/backend/router/Router.d.ts +1 -0
- package/dist/backend/router/Router.js +53 -21
- package/dist/backend/store/GeneratedRelease.js +1 -1
- package/dist/backend/store/GeneratedSource.js +1 -1
- package/dist/backend/util/ExecGit.js +4 -4
- package/dist/backend/util/JWTPreviews.d.ts +3 -3
- package/dist/backend/util/JWTPreviews.js +19 -5
- package/dist/backend/util/JsonPatch.js +1 -1
- package/dist/backend/util/ORM.js +2 -2
- package/dist/backend/util/Syncable.js +2 -2
- package/dist/backend.d.ts +5 -0
- package/dist/backend.js +17 -0
- package/dist/bundled.d.ts +8368 -8238
- package/dist/chunks/chunk-53DZYORR.js +3705 -0
- package/dist/chunks/chunk-6UT4N4CO.js +919 -0
- package/dist/chunks/chunk-7ORQ7BYK.js +1187 -0
- package/dist/chunks/chunk-AC4U3IMS.js +205 -0
- package/dist/chunks/chunk-BYJRQTFR.js +57 -0
- package/dist/chunks/chunk-CQ52GEHY.js +39 -0
- package/dist/chunks/chunk-F36YGSHN.js +335 -0
- package/dist/chunks/chunk-FRYHNUEK.js +79 -0
- package/dist/chunks/chunk-G6E35DMJ.js +1997 -0
- package/dist/chunks/chunk-I4GC3E65.js +170 -0
- package/dist/chunks/chunk-I4OYYAX5.js +63 -0
- package/dist/chunks/chunk-I7X64JTZ.js +10402 -0
- package/dist/chunks/chunk-IWN3T3FL.js +19493 -0
- package/dist/chunks/chunk-IYAQC63Y.js +1265 -0
- package/dist/chunks/chunk-JFROOUG6.js +6363 -0
- package/dist/chunks/chunk-LB3UYTOL.js +95 -0
- package/dist/chunks/chunk-LUBOGJCG.js +129 -0
- package/dist/chunks/chunk-NWQXN4SB.js +227 -0
- package/dist/chunks/chunk-RKDPDEF7.js +160 -0
- package/dist/chunks/chunk-SJBZFMQ2.js +2966 -0
- package/dist/chunks/chunk-STAJCW4Z.js +322 -0
- package/dist/chunks/chunk-TL7ZW6BX.js +17963 -0
- package/dist/chunks/chunk-U4VOHNR2.js +210 -0
- package/dist/chunks/chunk-U5Z2VE7Z.js +120 -0
- package/dist/chunks/chunk-X47OVDF3.js +1974 -0
- package/dist/chunks/chunk-Y7XOMJOC.js +791 -0
- package/dist/chunks/chunk-YK3OSMDM.js +5473 -0
- package/dist/chunks/crypto-UO2XRCJS.js +11 -0
- package/dist/cli/Generate.js +9 -4
- package/dist/cli/Init.js +1 -1
- package/dist/cli/Serve.d.ts +2 -2
- package/dist/cli/Serve.js +54 -100
- package/dist/cli/bin.js +85 -12
- package/dist/cli/build/BuildEmitter.js +1 -1
- package/dist/cli/build/BuildOptions.js +1 -1
- package/dist/cli/generate/CompileConfig.d.ts +1 -1
- package/dist/cli/generate/CompileConfig.js +4 -3
- package/dist/cli/generate/CopyStaticFiles.js +2 -1
- package/dist/cli/generate/DevDB.js +2 -8
- package/dist/cli/generate/FillCache.js +2 -2
- package/dist/cli/generate/GenerateDashboard.js +1 -1
- package/dist/cli/generate/LoadConfig.js +2 -3
- package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
- package/dist/cli/serve/CreateLocalServer.js +81 -26
- package/dist/cli/serve/DevServer.d.ts +19 -0
- package/dist/cli/serve/DevServer.js +134 -0
- package/dist/cli/serve/GitHistory.d.ts +1 -2
- package/dist/cli/serve/GitHistory.js +15 -2
- package/dist/cli/serve/LiveReload.js +1 -1
- package/dist/cli/serve/LocalAuth.js +1 -1
- package/dist/cli/serve/MemoryDrafts.js +1 -1
- package/dist/cli/serve/StartServer.js +1 -1
- package/dist/cli/static/init/cms.js +45 -47
- package/dist/cli/static/init/next-handler.js +8 -8
- package/dist/cli/util/CommitMessage.js +1 -1
- package/dist/cli/util/CommitSha.js +1 -1
- package/dist/cli/util/Dirname.js +1 -1
- package/dist/cli/util/Emitter.js +1 -1
- package/dist/cli/util/EnsureEnv.js +1 -1
- package/dist/cli/util/EnsureLibs.js +1 -1
- package/dist/cli/util/EnsureNode.js +1 -1
- package/dist/cli/util/FS.js +1 -1
- package/dist/cli/util/FindConfigFile.js +1 -1
- package/dist/cli/util/ForwardCommand.js +1 -1
- package/dist/cli/util/IgnorePlugin.js +1 -1
- package/dist/cli/util/PublicDefines.js +1 -1
- package/dist/cli/util/Report.js +1 -1
- package/dist/cli/util/ViewsPlugin.js +2 -2
- package/dist/cli/util/WarnPublicEnv.js +1 -1
- package/dist/cli/util/Watcher.js +1 -1
- package/dist/cloud/AuthResult.js +1 -1
- package/dist/cloud/CloudConfig.d.ts +1 -0
- package/dist/cloud/CloudConfig.js +2 -1
- package/dist/cloud/CloudRemote.d.ts +12 -5
- package/dist/cloud/CloudRemote.js +58 -10
- package/dist/components/Breadcrumbs.d.ts +3 -0
- package/dist/components/Breadcrumbs.js +42 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.js +57 -0
- package/dist/components/Calendar.d.ts +3 -0
- package/dist/components/Calendar.js +94 -0
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.js +75 -0
- package/dist/components/CheckboxGroup.d.ts +6 -0
- package/dist/components/CheckboxGroup.js +45 -0
- package/dist/components/ColorSwatch.d.ts +2 -0
- package/dist/components/ColorSwatch.js +45 -0
- package/dist/components/ColorSwatchPicker.d.ts +3 -0
- package/dist/components/ColorSwatchPicker.js +66 -0
- package/dist/components/ComboBox.d.ts +13 -0
- package/dist/components/ComboBox.js +147 -0
- package/dist/components/DateField.d.ts +5 -0
- package/dist/components/DateField.js +61 -0
- package/dist/components/DatePicker.d.ts +5 -0
- package/dist/components/DatePicker.js +78 -0
- package/dist/components/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker.js +95 -0
- package/dist/components/Dialog.d.ts +3 -0
- package/dist/components/Dialog.js +43 -0
- package/dist/components/Disclosure.d.ts +5 -0
- package/dist/components/Disclosure.js +106 -0
- package/dist/components/DropZone.d.ts +4 -0
- package/dist/components/DropZone.js +41 -0
- package/dist/components/FoldIcon.d.ts +6 -0
- package/dist/components/FoldIcon.js +31 -0
- package/dist/components/Icon.d.ts +7 -0
- package/dist/components/Icon.js +40 -0
- package/dist/components/Label.d.ts +48 -0
- package/dist/components/Label.js +210 -0
- package/dist/components/Link.d.ts +5 -0
- package/dist/components/Link.js +42 -0
- package/dist/components/List.d.ts +99 -0
- package/dist/components/List.js +397 -0
- package/dist/components/Menu.d.ts +16 -0
- package/dist/components/Menu.js +95 -0
- package/dist/components/Modal.d.ts +7 -0
- package/dist/components/Modal.js +58 -0
- package/dist/components/MultipleSelect.d.ts +25 -0
- package/dist/components/MultipleSelect.js +278 -0
- package/dist/components/NumberField.d.ts +6 -0
- package/dist/components/NumberField.js +90 -0
- package/dist/components/Popover.d.ts +6 -0
- package/dist/components/Popover.js +42 -0
- package/dist/components/ProgressCircle.d.ts +6 -0
- package/dist/components/ProgressCircle.js +96 -0
- package/dist/components/RadioGroup.d.ts +8 -0
- package/dist/components/RadioGroup.js +64 -0
- package/dist/components/SearchField.d.ts +8 -0
- package/dist/components/SearchField.js +86 -0
- package/dist/components/Select.d.ts +13 -0
- package/dist/components/Select.js +150 -0
- package/dist/components/Surface.d.ts +15 -0
- package/dist/components/Surface.js +53 -0
- package/dist/components/Switch.d.ts +5 -0
- package/dist/components/Switch.js +47 -0
- package/dist/components/Table.d.ts +14 -0
- package/dist/components/Table.js +147 -0
- package/dist/components/Tabs.d.ts +13 -0
- package/dist/components/Tabs.js +96 -0
- package/dist/components/TagGroup.d.ts +10 -0
- package/dist/components/TagGroup.js +81 -0
- package/dist/components/TextField.d.ts +13 -0
- package/dist/components/TextField.js +77 -0
- package/dist/components/TimeField.d.ts +5 -0
- package/dist/components/TimeField.js +55 -0
- package/dist/components/Toggle.d.ts +8 -0
- package/dist/components/Toggle.js +61 -0
- package/dist/components/Toolbar.d.ts +8 -0
- package/dist/components/Toolbar.js +80 -0
- package/dist/components/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip.js +54 -0
- package/dist/components/Tree.d.ts +23 -0
- package/dist/components/Tree.js +130 -0
- package/dist/components.d.ts +38 -0
- package/dist/components.js +39 -0
- package/dist/config.js +1 -1
- package/dist/core/BlobTransport.d.ts +5 -0
- package/dist/core/BlobTransport.js +79 -0
- package/dist/core/CMS.js +1 -1
- package/dist/core/Client.d.ts +13 -8
- package/dist/core/Client.js +67 -20
- package/dist/core/Config.d.ts +2 -0
- package/dist/core/Config.js +1 -3
- package/dist/core/Connection.d.ts +30 -10
- package/dist/core/Document.js +10 -8
- package/dist/core/Draft.js +1 -1
- package/dist/core/Entry.d.ts +6 -0
- package/dist/core/Entry.js +16 -1
- package/dist/core/EntryFields.d.ts +4 -0
- package/dist/core/EntryFields.js +4 -2
- package/dist/core/EntryRecord.js +1 -1
- package/dist/core/Expr.d.ts +1 -0
- package/dist/core/Expr.js +1 -1
- package/dist/core/Field.d.ts +46 -5
- package/dist/core/Field.js +56 -10
- package/dist/core/Graph.d.ts +6 -0
- package/dist/core/Graph.js +1 -1
- package/dist/core/HttpError.js +1 -1
- package/dist/core/Id.js +1 -1
- package/dist/core/Infer.d.ts +1 -1
- package/dist/core/Internal.js +6 -6
- package/dist/core/ListRow.d.ts +10 -0
- package/dist/core/ListRow.js +12 -0
- package/dist/core/Outcome.js +1 -1
- package/dist/core/Page.js +2 -2
- package/dist/core/Picker.d.ts +0 -2
- package/dist/core/Picker.js +1 -1
- package/dist/core/Reference.js +1 -1
- package/dist/core/Role.d.ts +3 -0
- package/dist/core/Role.js +7 -1
- package/dist/core/Root.d.ts +4 -0
- package/dist/core/Root.js +7 -2
- package/dist/core/Schema.d.ts +0 -2
- package/dist/core/Schema.js +2 -16
- package/dist/core/Scope.js +1 -1
- package/dist/core/Section.js +2 -2
- package/dist/core/TextDoc.d.ts +4 -0
- package/dist/core/TextDoc.js +3 -1
- package/dist/core/Tracker.d.ts +1 -6
- package/dist/core/Tracker.js +2 -12
- package/dist/core/Trigger.js +1 -1
- package/dist/core/Type.d.ts +22 -7
- package/dist/core/Type.js +108 -28
- package/dist/core/UnionRow.d.ts +11 -0
- package/dist/core/UnionRow.js +11 -0
- package/dist/core/User.d.ts +7 -1
- package/dist/core/User.js +1 -1
- package/dist/core/View.js +1 -1
- package/dist/core/Workspace.d.ts +4 -1
- package/dist/core/Workspace.js +1 -1
- package/dist/core/db/CommitRequest.d.ts +2 -0
- package/dist/core/db/CommitRequest.js +1 -1
- package/dist/core/db/EntryAliases.d.ts +2 -0
- package/dist/core/db/EntryAliases.js +28 -0
- package/dist/core/db/EntryDB.d.ts +2 -2
- package/dist/core/db/EntryDB.js +3 -3
- package/dist/core/db/EntryIndex.d.ts +9 -2
- package/dist/core/db/EntryIndex.js +182 -39
- package/dist/core/db/EntryReference.d.ts +44 -0
- package/dist/core/db/EntryReference.js +9 -0
- package/dist/core/db/EntryReferenceIndex.d.ts +21 -0
- package/dist/core/db/EntryReferenceIndex.js +131 -0
- package/dist/core/db/EntryResolver.d.ts +10 -7
- package/dist/core/db/EntryResolver.js +90 -35
- package/dist/core/db/EntryTransaction.d.ts +1 -1
- package/dist/core/db/EntryTransaction.js +390 -57
- package/dist/core/db/EntryUrlConflictError.d.ts +11 -0
- package/dist/core/db/EntryUrlConflictError.js +16 -0
- package/dist/core/db/IndexEvent.d.ts +5 -2
- package/dist/core/db/IndexEvent.js +2 -1
- package/dist/core/db/LinkResolver.d.ts +1 -1
- package/dist/core/db/LinkResolver.js +4 -1
- package/dist/core/db/LocalDB.d.ts +7 -4
- package/dist/core/db/LocalDB.js +22 -10
- package/dist/core/db/Mutation.d.ts +3 -3
- package/dist/core/db/Operation.d.ts +8 -3
- package/dist/core/db/Operation.js +67 -23
- package/dist/core/db/TestDB.d.ts +9 -1
- package/dist/core/db/TestDB.js +24 -1
- package/dist/core/db/WriteableGraph.d.ts +15 -4
- package/dist/core/db/WriteableGraph.js +14 -2
- package/dist/core/field/CreateField.d.ts +5 -4
- package/dist/core/field/CreateField.js +9 -5
- package/dist/core/field/ListField.d.ts +13 -4
- package/dist/core/field/ListField.js +146 -13
- package/dist/core/field/RecordField.d.ts +5 -3
- package/dist/core/field/RecordField.js +58 -2
- package/dist/core/field/RichTextField.d.ts +7 -2
- package/dist/core/field/RichTextField.js +309 -10
- package/dist/core/field/ScalarField.js +9 -7
- package/dist/core/field/UnionField.d.ts +2 -3
- package/dist/core/field/UnionField.js +61 -12
- package/dist/core/media/CreatePreview.browser.js +5 -5
- package/dist/core/media/CreatePreview.js +15 -10
- package/dist/core/media/IsImage.js +1 -1
- package/dist/core/media/MediaAltField.d.ts +9 -0
- package/dist/core/media/MediaAltField.js +17 -0
- package/dist/core/media/MediaLocation.d.ts +42 -0
- package/dist/core/media/MediaLocation.js +54 -2
- package/dist/core/media/MediaRoot.d.ts +2 -2
- package/dist/core/media/MediaRoot.js +12 -11
- package/dist/core/media/MediaTypes.d.ts +21 -15
- package/dist/core/media/MediaTypes.js +44 -16
- package/dist/core/media/Summary.d.ts +8 -8
- package/dist/core/media/Summary.js +1 -1
- package/dist/core/media/UploadLimits.d.ts +1 -0
- package/dist/core/media/UploadLimits.js +20 -0
- package/dist/core/pages/Snippet.js +1 -1
- package/dist/core/shape/ListShape.d.ts +1 -47
- package/dist/core/shape/ListShape.js +1 -224
- package/dist/core/source/CombinedSource.d.ts +2 -2
- package/dist/core/source/CombinedSource.js +7 -4
- package/dist/core/source/FSSource.d.ts +7 -5
- package/dist/core/source/FSSource.js +79 -34
- package/dist/core/source/FilePatch.js +5 -2
- package/dist/core/source/GitDelta.js +1 -1
- package/dist/core/source/GitUtils.js +1 -1
- package/dist/core/source/GithubSource.d.ts +3 -2
- package/dist/core/source/GithubSource.js +38 -13
- package/dist/core/source/IndexedDBSource.d.ts +2 -2
- package/dist/core/source/IndexedDBSource.js +26 -12
- package/dist/core/source/MemorySource.d.ts +2 -2
- package/dist/core/source/MemorySource.js +4 -2
- package/dist/core/source/ShaMismatchError.js +3 -1
- package/dist/core/source/Source.d.ts +4 -1
- package/dist/core/source/Source.js +1 -1
- package/dist/core/source/SourceExport.js +3 -3
- package/dist/core/source/Tree.js +1 -1
- package/dist/core/source/Utils.js +2 -5
- package/dist/core/util/Anchors.d.ts +4 -0
- package/dist/core/util/Anchors.js +45 -0
- package/dist/core/util/ArrayBuffers.js +1 -1
- package/dist/core/util/Assert.js +1 -1
- package/dist/core/util/Async.d.ts +8 -2
- package/dist/core/util/Async.js +68 -1
- package/dist/core/util/BufferToBase64.js +1 -1
- package/dist/core/util/Callable.js +1 -1
- package/dist/core/util/Checks.js +2 -2
- package/dist/core/util/CodeGen.js +3 -1
- package/dist/core/util/ContentHash.js +1 -1
- package/dist/core/util/Debounce.js +1 -1
- package/dist/core/util/DeepMap.d.ts +14 -0
- package/dist/core/util/DeepMap.js +75 -0
- package/dist/core/util/Encoding.js +1 -1
- package/dist/core/util/EntryFilenames.d.ts +2 -3
- package/dist/core/util/EntryFilenames.js +5 -9
- package/dist/core/util/EntryRows.js +1 -1
- package/dist/core/util/FractionalIndexing.js +1 -1
- package/dist/core/util/GetRandomColor.js +20 -20
- package/dist/core/util/Identifiers.js +1 -1
- package/dist/core/util/JWT.js +1 -1
- package/dist/core/util/Lazy.js +1 -1
- package/dist/core/util/LazyRecord.js +1 -1
- package/dist/core/util/Logger.js +2 -1
- package/dist/core/util/Objects.d.ts +1 -0
- package/dist/core/util/Objects.js +5 -1
- package/dist/core/util/Paths.js +2 -2
- package/dist/core/util/RowId.js +1 -1
- package/dist/core/util/Slugs.js +1 -1
- package/dist/core/util/Timer.js +1 -1
- package/dist/core/util/Types.js +1 -1
- package/dist/core/util/Urls.js +1 -1
- package/dist/core.d.ts +1 -0
- package/dist/core.js +2 -1
- package/dist/dashboard/App.css +319 -0
- package/dist/dashboard/App.d.ts +8 -8
- package/dist/dashboard/App.js +188 -142
- package/dist/dashboard/StoryProvider.d.ts +12 -0
- package/dist/dashboard/StoryProvider.js +82 -0
- package/dist/dashboard/ViewKeys.d.ts +26 -0
- package/dist/dashboard/ViewKeys.js +32 -0
- package/dist/dashboard/app/AccessDenied.d.ts +5 -0
- package/dist/dashboard/app/AccessDenied.js +53 -0
- package/dist/dashboard/app/ActivityStatus.d.ts +10 -0
- package/dist/dashboard/app/ActivityStatus.js +459 -0
- package/dist/dashboard/app/AlineaLogo.d.ts +4 -0
- package/dist/dashboard/app/AlineaLogo.js +26 -0
- package/dist/dashboard/app/AppShell.d.ts +4 -0
- package/dist/dashboard/app/AppShell.js +29 -0
- package/dist/dashboard/app/AuthView.d.ts +8 -0
- package/dist/dashboard/app/AuthView.js +111 -0
- package/dist/dashboard/app/Badge.d.ts +8 -0
- package/dist/dashboard/app/Badge.js +42 -0
- package/dist/dashboard/app/CompactField.d.ts +14 -0
- package/dist/dashboard/app/CompactField.js +178 -0
- package/dist/dashboard/app/DashboardErrorBoundary.d.ts +2 -0
- package/dist/dashboard/app/DashboardErrorBoundary.js +122 -0
- package/dist/dashboard/app/DashboardLayout.d.ts +18 -0
- package/dist/dashboard/app/DashboardLayout.js +88 -0
- package/dist/dashboard/app/DashboardMeta.d.ts +7 -0
- package/dist/dashboard/app/DashboardMeta.js +28 -0
- package/dist/dashboard/app/EditorBackButton.d.ts +5 -0
- package/dist/dashboard/app/EditorBackButton.js +33 -0
- package/dist/dashboard/app/EntryFields.d.ts +21 -0
- package/dist/dashboard/app/EntryFields.js +101 -0
- package/dist/dashboard/app/EntryHeader.d.ts +15 -0
- package/dist/dashboard/app/EntryHeader.js +452 -0
- package/dist/dashboard/app/EntryHeaderActions.d.ts +37 -0
- package/dist/dashboard/app/EntryHeaderActions.js +71 -0
- package/dist/dashboard/app/EntryReferences.d.ts +6 -0
- package/dist/dashboard/app/EntryReferences.js +209 -0
- package/dist/dashboard/app/EntrySidebar.d.ts +25 -0
- package/dist/dashboard/app/EntrySidebar.js +378 -0
- package/dist/dashboard/app/EntrySidebarPreview.d.ts +10 -0
- package/dist/dashboard/app/EntrySidebarPreview.js +260 -0
- package/dist/dashboard/app/EntrySidebarPreview.story.d.ts +1 -0
- package/dist/dashboard/app/EntrySidebarToggle.d.ts +6 -0
- package/dist/dashboard/app/EntrySidebarToggle.js +29 -0
- package/dist/dashboard/app/EntryTranslationBanner.d.ts +7 -0
- package/dist/dashboard/app/EntryTranslationBanner.js +60 -0
- package/dist/dashboard/app/Explorer.d.ts +41 -0
- package/dist/dashboard/app/Explorer.js +812 -0
- package/dist/dashboard/app/ExplorerCards.d.ts +12 -0
- package/dist/dashboard/app/ExplorerCards.js +389 -0
- package/dist/dashboard/app/ExplorerFileCard.d.ts +10 -0
- package/dist/dashboard/app/ExplorerFileCard.js +115 -0
- package/dist/dashboard/app/ExplorerList.d.ts +9 -0
- package/dist/dashboard/app/ExplorerList.js +165 -0
- package/dist/dashboard/app/ExplorerModal.d.ts +16 -0
- package/dist/dashboard/app/ExplorerModal.js +89 -0
- package/dist/dashboard/app/ExplorerPickerContent.d.ts +13 -0
- package/dist/dashboard/app/ExplorerPickerContent.js +114 -0
- package/dist/dashboard/app/ExplorerTable.d.ts +14 -0
- package/dist/dashboard/app/ExplorerTable.js +512 -0
- package/dist/dashboard/app/ExternalLinkPicker.d.ts +12 -0
- package/dist/dashboard/app/ExternalLinkPicker.js +97 -0
- package/dist/dashboard/app/ImagePicker.d.ts +6 -0
- package/dist/dashboard/app/ImagePicker.js +145 -0
- package/dist/dashboard/app/LinkPicker.d.ts +9 -0
- package/dist/dashboard/app/LinkPicker.js +317 -0
- package/dist/dashboard/app/LocaleMenu.d.ts +8 -0
- package/dist/dashboard/app/LocaleMenu.js +110 -0
- package/dist/dashboard/app/LogoShape.d.ts +8 -0
- package/dist/dashboard/app/LogoShape.js +60 -0
- package/dist/dashboard/app/SidebarTree.d.ts +37 -0
- package/dist/dashboard/app/SidebarTree.js +433 -0
- package/dist/dashboard/app/StatusBadge.d.ts +6 -0
- package/dist/dashboard/app/StatusBadge.js +26 -0
- package/dist/dashboard/app/ViewToggle.d.ts +7 -0
- package/dist/dashboard/app/ViewToggle.js +27 -0
- package/dist/dashboard/app/WorkspaceMenu.d.ts +24 -0
- package/dist/dashboard/app/WorkspaceMenu.js +264 -0
- package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +5 -0
- package/dist/dashboard/app/WorkspaceRoots.d.ts +6 -0
- package/dist/dashboard/app/WorkspaceRoots.js +285 -0
- package/dist/dashboard/app/editor/FileEditor.d.ts +6 -0
- package/dist/dashboard/app/editor/FileEditor.js +200 -0
- package/dist/dashboard/app/editor/FilePreview.d.ts +13 -0
- package/dist/dashboard/app/editor/FilePreview.js +196 -0
- package/dist/dashboard/app/editor/MediaAltField.view.d.ts +5 -0
- package/dist/dashboard/app/editor/MediaAltField.view.js +98 -0
- package/dist/dashboard/app/modals/CreateEntry.d.ts +1 -0
- package/dist/dashboard/app/modals/CreateEntry.js +283 -0
- package/dist/dashboard/app/pages/EntryPage.d.ts +11 -0
- package/dist/dashboard/app/pages/EntryPage.js +356 -0
- package/dist/dashboard/app/pages/RootPage.d.ts +9 -0
- package/dist/dashboard/app/pages/RootPage.js +90 -0
- package/dist/dashboard/app/pages/UsersPage.d.ts +7 -0
- package/dist/dashboard/app/pages/UsersPage.js +552 -0
- package/dist/dashboard/app/ui/DashboardModal.d.ts +34 -0
- package/dist/dashboard/app/ui/DashboardModal.js +192 -0
- package/dist/dashboard/app/ui/Rail.d.ts +18 -0
- package/dist/dashboard/app/ui/Rail.js +41 -0
- package/dist/dashboard/app/ui/Sidebar.d.ts +15 -0
- package/dist/dashboard/app/ui/Sidebar.js +55 -0
- package/dist/dashboard/atoms/ReactiveNode.d.ts +41 -0
- package/dist/dashboard/atoms/ReactiveNode.js +248 -0
- package/dist/dashboard/atoms/activity.d.ts +48 -0
- package/dist/dashboard/atoms/activity.js +189 -0
- package/dist/dashboard/atoms/auth.d.ts +38 -0
- package/dist/dashboard/atoms/auth.js +106 -0
- package/dist/dashboard/atoms/config.d.ts +27 -0
- package/dist/dashboard/atoms/config.js +49 -0
- package/dist/dashboard/atoms/core.d.ts +15 -0
- package/dist/dashboard/atoms/core.js +37 -0
- package/dist/dashboard/atoms/create.d.ts +13 -0
- package/dist/dashboard/atoms/create.js +79 -0
- package/dist/dashboard/atoms/dashboard.d.ts +12 -0
- package/dist/dashboard/atoms/dashboard.js +71 -0
- package/dist/dashboard/atoms/editor.d.ts +80 -0
- package/dist/dashboard/atoms/editor.js +132 -0
- package/dist/dashboard/atoms/entry.d.ts +267 -0
- package/dist/dashboard/atoms/entry.js +774 -0
- package/dist/dashboard/atoms/explorer.d.ts +257 -0
- package/dist/dashboard/atoms/explorer.js +677 -0
- package/dist/dashboard/atoms/graph.d.ts +5 -0
- package/dist/dashboard/atoms/graph.js +62 -0
- package/dist/dashboard/atoms/link.d.ts +24 -0
- package/dist/dashboard/atoms/link.js +82 -0
- package/dist/dashboard/atoms/nav.d.ts +47 -0
- package/dist/dashboard/atoms/nav.js +220 -0
- package/dist/dashboard/atoms/preview.d.ts +4 -0
- package/dist/dashboard/atoms/preview.js +10 -0
- package/dist/dashboard/atoms/root.d.ts +91 -0
- package/dist/dashboard/atoms/root.js +383 -0
- package/dist/dashboard/atoms/upload.d.ts +9 -0
- package/dist/dashboard/atoms/upload.js +81 -0
- package/dist/dashboard/atoms/user.d.ts +9 -0
- package/dist/dashboard/atoms/user.js +75 -0
- package/dist/dashboard/atoms/utils.d.ts +17 -0
- package/dist/dashboard/atoms/utils.js +151 -0
- package/dist/dashboard/boot/ActivityEvent.d.ts +44 -0
- package/dist/dashboard/boot/ActivityEvent.js +14 -0
- package/dist/dashboard/boot/Boot.js +9 -5
- package/dist/dashboard/boot/BootDev.js +2 -1
- package/dist/dashboard/boot/BootProd.js +1 -1
- package/dist/dashboard/boot/DashboardWorker.d.ts +7 -7
- package/dist/dashboard/boot/DashboardWorker.js +370 -30
- package/dist/dashboard/boot/LoadWorker.js +6 -3
- package/dist/dashboard/boot/WorkerDB.d.ts +9 -2
- package/dist/dashboard/boot/WorkerDB.js +20 -3
- package/dist/dashboard/editor/UseField.d.ts +29 -10
- package/dist/dashboard/editor/UseField.js +27 -59
- package/dist/dashboard/fixture/cms.d.ts +116 -0
- package/dist/dashboard/fixture/cms.js +230 -0
- package/dist/dashboard/hook/UseEntryEditor.d.ts +25 -6
- package/dist/dashboard/hook/UseEntryEditor.js +34 -12
- package/dist/dashboard/hook/UseGraph.d.ts +3 -0
- package/dist/dashboard/hook/UseGraph.js +5 -5
- package/dist/dashboard/hook/UseLocale.d.ts +4 -1
- package/dist/dashboard/hook/UseLocale.js +5 -7
- package/dist/dashboard/hook/UseRoot.d.ts +7 -12
- package/dist/dashboard/hook/UseRoot.js +8 -5
- package/dist/dashboard/hook/UseWorkspace.d.ts +7 -9
- package/dist/dashboard/hook/UseWorkspace.js +5 -7
- package/dist/dashboard/hooks.d.ts +157 -0
- package/dist/dashboard/hooks.js +229 -0
- package/dist/dashboard/icons.d.ts +171 -0
- package/dist/dashboard/icons.js +2686 -0
- package/dist/dashboard/plugins/alineaFixturePlugin.d.ts +2 -0
- package/dist/dashboard/plugins/alineaFixturePlugin.js +200 -0
- package/dist/dashboard.d.ts +1 -2
- package/dist/dashboard.js +6 -2
- package/dist/edit.d.ts +1 -1
- package/dist/edit.js +2 -4
- package/dist/field/check/CheckField.js +3 -3
- package/dist/field/check/CheckField.view.d.ts +3 -3
- package/dist/field/check/CheckField.view.js +37 -84
- package/dist/field/code/CodeField.js +2 -2
- package/dist/field/code/CodeField.view.d.ts +21 -3
- package/dist/field/code/CodeField.view.js +177 -39
- package/dist/field/code/SimpleCodeEditor.d.ts +50 -0
- package/dist/field/code/SimpleCodeEditor.js +452 -0
- package/dist/field/date/DateField.js +3 -3
- package/dist/field/date/DateField.view.d.ts +3 -3
- package/dist/field/date/DateField.view.js +26 -26
- package/dist/field/hidden/HiddenField.js +2 -2
- package/dist/field/hidden/HiddenField.view.js +1 -1
- package/dist/field/json/JsonField.js +2 -2
- package/dist/field/json/JsonField.view.d.ts +4 -4
- package/dist/field/json/JsonField.view.js +53 -76
- package/dist/field/link/EntryLink.d.ts +9 -8
- package/dist/field/link/EntryLink.js +4 -2
- package/dist/field/link/FileLink.d.ts +7 -7
- package/dist/field/link/FileLink.js +12 -6
- package/dist/field/link/ImageLink.d.ts +5 -3
- package/dist/field/link/ImageLink.js +5 -2
- package/dist/field/link/Link.d.ts +1 -1
- package/dist/field/link/Link.js +1 -1
- package/dist/field/link/LinkEditor.d.ts +1 -1
- package/dist/field/link/LinkEditor.js +1 -1
- package/dist/field/link/LinkField.d.ts +5 -3
- package/dist/field/link/LinkField.js +56 -17
- package/dist/field/link/LinkField.stories.d.ts +11 -1
- package/dist/field/link/LinkField.view.d.ts +8 -10
- package/dist/field/link/LinkField.view.js +1461 -363
- package/dist/field/link/UrlLink.d.ts +2 -2
- package/dist/field/link/UrlLink.js +4 -2
- package/dist/field/list/ListField.d.ts +3 -3
- package/dist/field/list/ListField.js +5 -6
- package/dist/field/list/ListField.stories.d.ts +2 -1
- package/dist/field/list/ListField.view.d.ts +15 -7
- package/dist/field/list/ListField.view.js +888 -377
- package/dist/field/localiser/LocalisedField.view.d.ts +5 -0
- package/dist/field/localiser/LocalisedField.view.js +63 -0
- package/dist/field/localiser/LocalisedFieldTabs.d.ts +8 -0
- package/dist/field/localiser/LocalisedFieldTabs.js +38 -0
- package/dist/field/localiser/Localiser.d.ts +25 -0
- package/dist/field/localiser/Localiser.js +140 -0
- package/dist/field/localiser.d.ts +1 -0
- package/dist/field/localiser.js +2 -0
- package/dist/field/metadata/MetadataAliases.d.ts +20 -0
- package/dist/field/metadata/MetadataAliases.js +22 -0
- package/dist/field/metadata/MetadataField.d.ts +31 -8
- package/dist/field/metadata/MetadataField.js +127 -11
- package/dist/field/metadata/MetadataField.view.d.ts +11 -3
- package/dist/field/metadata/MetadataField.view.js +130 -96
- package/dist/field/number/NumberField.js +3 -3
- package/dist/field/number/NumberField.view.d.ts +3 -3
- package/dist/field/number/NumberField.view.js +22 -54
- package/dist/field/object/ObjectField.d.ts +1 -1
- package/dist/field/object/ObjectField.js +11 -4
- package/dist/field/object/ObjectField.view.d.ts +4 -4
- package/dist/field/object/ObjectField.view.js +28 -19
- package/dist/field/path/PathField.js +3 -3
- package/dist/field/path/PathField.view.d.ts +3 -3
- package/dist/field/path/PathField.view.js +33 -133
- package/dist/field/path/SlugField.d.ts +16 -0
- package/dist/field/path/SlugField.js +52 -0
- package/dist/field/richtext/Extensions.d.ts +1 -28
- package/dist/field/richtext/Extensions.js +2 -4146
- package/dist/field/richtext/PickTextAnchor.d.ts +19 -0
- package/dist/field/richtext/PickTextAnchor.js +99 -0
- package/dist/field/richtext/PickTextLink.d.ts +18 -17
- package/dist/field/richtext/PickTextLink.js +133 -88
- package/dist/field/richtext/ReferenceLink.d.ts +2 -0
- package/dist/field/richtext/ReferenceLink.js +13 -4
- package/dist/field/richtext/RichTextBlock.d.ts +11 -0
- package/dist/field/richtext/RichTextBlock.js +143 -0
- package/dist/field/richtext/RichTextBlockHost.d.ts +13 -0
- package/dist/field/richtext/RichTextBlockHost.js +56 -0
- package/dist/field/richtext/RichTextBlockValue.d.ts +5 -0
- package/dist/field/richtext/RichTextBlockValue.js +34 -0
- package/dist/field/richtext/RichTextBlocks.d.ts +16 -0
- package/dist/field/richtext/RichTextBlocks.js +40 -0
- package/dist/field/richtext/RichTextDocument.d.ts +4 -0
- package/dist/field/richtext/RichTextDocument.js +162 -0
- package/dist/field/richtext/RichTextExtensions.d.ts +67 -0
- package/dist/field/richtext/RichTextExtensions.js +8219 -0
- package/dist/field/richtext/RichTextField.d.ts +10 -3
- package/dist/field/richtext/RichTextField.js +13 -3
- package/dist/field/richtext/RichTextField.story.d.ts +8 -0
- package/dist/field/richtext/RichTextField.view.d.ts +11 -5
- package/dist/field/richtext/RichTextField.view.js +385 -2447
- package/dist/field/richtext/RichTextInsertMenu.d.ts +9 -0
- package/dist/field/richtext/RichTextInsertMenu.js +1014 -0
- package/dist/field/richtext/RichTextState.d.ts +6 -0
- package/dist/field/richtext/RichTextState.js +58 -0
- package/dist/field/richtext/RichTextToolbar.d.ts +9 -36
- package/dist/field/richtext/RichTextToolbar.js +206 -178
- package/dist/field/richtext/Toolbar.d.ts +111 -65
- package/dist/field/richtext/Toolbar.js +60 -45
- package/dist/field/richtext/extensions/Anchor.d.ts +19 -0
- package/dist/field/richtext/extensions/Anchor.js +94 -0
- package/dist/field/richtext/extensions/Link.d.ts +3 -13
- package/dist/field/richtext/extensions/Link.js +15 -37
- package/dist/field/richtext/extensions/Small.d.ts +1 -10
- package/dist/field/richtext/extensions/Small.js +7 -19
- package/dist/field/select/SelectField.d.ts +15 -4
- package/dist/field/select/SelectField.js +17 -2
- package/dist/field/select/SelectField.view.d.ts +7 -3
- package/dist/field/select/SelectField.view.js +112 -155
- package/dist/field/tabs/Tabs.js +3 -2
- package/dist/field/tabs/Tabs.view.d.ts +1 -6
- package/dist/field/tabs/Tabs.view.js +22 -29
- package/dist/field/text/TextField.js +8 -3
- package/dist/field/text/TextField.view.d.ts +2 -2
- package/dist/field/text/TextField.view.js +40 -60
- package/dist/field/time/TimeField.js +3 -3
- package/dist/field/time/TimeField.view.d.ts +3 -3
- package/dist/field/time/TimeField.view.js +30 -30
- package/dist/field/view/View.js +1 -1
- package/dist/field/views.d.ts +2 -0
- package/dist/field/views.js +65 -0
- package/dist/field.d.ts +1 -0
- package/dist/field.js +3 -1
- package/dist/index.css +7039 -3624
- package/dist/index.js +1 -1
- package/dist/inter-latin-500-normal-JSHNAZJU.woff2 +0 -0
- package/dist/inter-latin-ext-500-normal-5ARINTHO.woff2 +0 -0
- package/dist/next.cjs +19 -9
- package/dist/next.edge.js +1 -1
- package/dist/next.js +1 -1
- package/dist/picker/entry/EntryPicker.d.ts +9 -4
- package/dist/picker/entry/EntryPicker.js +71 -19
- package/dist/picker/entry/EntryReference.d.ts +4 -0
- package/dist/picker/entry/EntryReference.js +3 -1
- package/dist/picker/url/UrlPicker.js +2 -12
- package/dist/preview/ChunkCookieValue.js +1 -1
- package/dist/preview/PreviewCookies.js +1 -1
- package/dist/preview/PreviewMessage.js +1 -1
- package/dist/preview/PreviewPayload.js +35 -23
- package/dist/preview/RegisterPreview.js +1 -1
- package/dist/preview/react.js +10 -3
- package/dist/preview/widget.js +1 -1
- package/dist/query.d.ts +116 -92
- package/dist/query.js +7 -1
- package/dist/types.d.ts +1 -0
- package/dist/ui/Link.d.ts +6 -5
- package/dist/ui/Link.js +37 -13
- package/dist/ui/RichText.d.ts +37 -11
- package/dist/ui/RichText.js +81 -44
- package/dist/ui/Stack.d.ts +11 -22
- package/dist/ui/Stack.js +54 -67
- package/dist/ui/icons/IcAlignCenter.d.ts +4 -2
- package/dist/ui/icons/IcAlignCenter.js +6 -12
- package/dist/ui/icons/IcOutlineGridView.d.ts +3 -2
- package/dist/ui/icons/IcOutlineGridView.js +3 -11
- package/dist/ui/icons/IcOutlineSettings.d.ts +3 -2
- package/dist/ui/icons/IcOutlineSettings.js +3 -11
- package/dist/ui/icons/IcRoundAccountTree.d.ts +4 -2
- package/dist/ui/icons/IcRoundAccountTree.js +6 -22
- package/dist/ui/icons/IcRoundClose.d.ts +4 -2
- package/dist/ui/icons/IcRoundClose.js +6 -12
- package/dist/ui/icons/IcRoundCode.d.ts +4 -2
- package/dist/ui/icons/IcRoundCode.js +6 -12
- package/dist/ui/icons/IcRoundDateRange.d.ts +3 -2
- package/dist/ui/icons/IcRoundDateRange.js +3 -11
- package/dist/ui/icons/IcRoundDelete.d.ts +4 -2
- package/dist/ui/icons/IcRoundDelete.js +6 -12
- package/dist/ui/icons/IcRoundEdit.d.ts +4 -2
- package/dist/ui/icons/IcRoundEdit.js +6 -12
- package/dist/ui/icons/IcRoundFormatListNumbered.d.ts +3 -2
- package/dist/ui/icons/IcRoundFormatListNumbered.js +3 -11
- package/dist/ui/icons/IcRoundLink.d.ts +4 -2
- package/dist/ui/icons/IcRoundLink.js +6 -12
- package/dist/ui/icons/IcRoundOpenInNew.d.ts +4 -2
- package/dist/ui/icons/IcRoundOpenInNew.js +6 -12
- package/dist/ui/icons/IcRoundPanorama.d.ts +4 -2
- package/dist/ui/icons/IcRoundPanorama.js +6 -6
- package/dist/ui/icons/IcRoundRefresh.d.ts +3 -2
- package/dist/ui/icons/IcRoundRefresh.js +3 -11
- package/dist/ui/icons/IcRoundSave.d.ts +4 -2
- package/dist/ui/icons/IcRoundSave.js +6 -22
- package/dist/ui/icons/IcRoundSearch.d.ts +4 -2
- package/dist/ui/icons/IcRoundSearch.js +6 -12
- package/dist/ui/icons/IcRoundShare.d.ts +4 -2
- package/dist/ui/icons/IcRoundShare.js +6 -12
- package/dist/ui/icons/IcRoundSync.d.ts +4 -2
- package/dist/ui/icons/IcRoundSync.js +6 -22
- package/dist/ui/icons/MaterialSymbolsDatabase.d.ts +4 -2
- package/dist/ui/icons/MaterialSymbolsDatabase.js +6 -22
- package/dist/ui/icons/TableInsert.d.ts +4 -2
- package/dist/ui/icons/TableInsert.js +6 -12
- package/dist/ui/util/ImageBlurUrl.js +1 -1
- package/dist/ui.d.ts +0 -8
- package/dist/ui.js +0 -8
- package/package.json +49 -64
- package/dist/backend/router/Proxy.d.ts +0 -1
- package/dist/backend/router/Proxy.js +0 -32
- package/dist/chunks/chunk-2NTSADJL.js +0 -20
- package/dist/chunks/chunk-2STBQ2Y4.js +0 -166
- package/dist/chunks/chunk-2X5P2RZV.js +0 -94
- package/dist/chunks/chunk-3DIW62EI.js +0 -2900
- package/dist/chunks/chunk-3TNMMA3W.js +0 -249
- package/dist/chunks/chunk-467JA2PB.js +0 -29
- package/dist/chunks/chunk-5LTN67OE.js +0 -51
- package/dist/chunks/chunk-76QF5YTJ.js +0 -107
- package/dist/chunks/chunk-A5O3N2GS.js +0 -63
- package/dist/chunks/chunk-AICQFCVN.js +0 -19
- package/dist/chunks/chunk-AJJSW27C.js +0 -728
- package/dist/chunks/chunk-C53YJRET.js +0 -112
- package/dist/chunks/chunk-CKT37OYJ.js +0 -9
- package/dist/chunks/chunk-F2HHHLEQ.js +0 -72
- package/dist/chunks/chunk-FKWEJTSK.js +0 -16282
- package/dist/chunks/chunk-G2AFWRAD.js +0 -12
- package/dist/chunks/chunk-HSIHEWFC.js +0 -101
- package/dist/chunks/chunk-I26ZIF6Q.js +0 -360
- package/dist/chunks/chunk-JL5K3F7X.js +0 -1116
- package/dist/chunks/chunk-NZLE2WMY.js +0 -35
- package/dist/chunks/chunk-ORDS5C6Z.js +0 -83
- package/dist/chunks/chunk-PNILF4WM.js +0 -251
- package/dist/chunks/chunk-QUIANN6B.js +0 -8001
- package/dist/chunks/chunk-RSX2DILK.js +0 -335
- package/dist/chunks/chunk-SKF4L7JN.js +0 -401
- package/dist/chunks/chunk-SOTBYUJY.js +0 -120
- package/dist/chunks/chunk-TOJF2G3X.js +0 -96
- package/dist/chunks/chunk-TPUTTEHF.js +0 -3002
- package/dist/chunks/chunk-VUACWPFC.js +0 -892
- package/dist/chunks/chunk-WD7H5L2L.js +0 -168
- package/dist/chunks/chunk-WDCPVJJC.js +0 -341
- package/dist/chunks/chunk-WJ67RR7S.js +0 -554
- package/dist/chunks/chunk-WKC37UOZ.js +0 -143
- package/dist/chunks/chunk-WLKPH7JA.js +0 -2786
- package/dist/chunks/chunk-YWCPLD22.js +0 -2343
- package/dist/chunks/crypto-HZTUU327.js +0 -11
- package/dist/cli/util/ExternalPlugin.d.ts +0 -2
- package/dist/cli/util/ExternalPlugin.js +0 -810
- package/dist/cloud/view/CloudAuth.browser.d.ts +0 -2
- package/dist/cloud/view/CloudAuth.browser.js +0 -111
- package/dist/cloud/view/CloudAuth.d.ts +0 -1
- package/dist/cloud/view/CloudAuth.js +0 -9
- package/dist/core/Doc.d.ts +0 -11
- package/dist/core/Doc.js +0 -44
- package/dist/core/Role.test.d.ts +0 -1
- package/dist/core/Shape.d.ts +0 -19
- package/dist/core/Trigger.test.d.ts +0 -1
- package/dist/core/Type.test.d.ts +0 -1
- package/dist/core/db/EntryIndex.test.d.ts +0 -1
- package/dist/core/db/EntryResolver.test.d.ts +0 -1
- package/dist/core/db/LocalDB.test.d.ts +0 -1
- package/dist/core/field/RichTextField.test.d.ts +0 -1
- package/dist/core/shape/ListShape.test.d.ts +0 -1
- package/dist/core/shape/RecordShape.d.ts +0 -26
- package/dist/core/shape/RecordShape.js +0 -102
- package/dist/core/shape/RecordShape.test.d.ts +0 -1
- package/dist/core/shape/RichTextShape.d.ts +0 -75
- package/dist/core/shape/RichTextShape.js +0 -435
- package/dist/core/shape/RichTextShape.test.d.ts +0 -1
- package/dist/core/shape/ScalarShape.d.ts +0 -20
- package/dist/core/shape/ScalarShape.js +0 -53
- package/dist/core/shape/ScalarShape.test.d.ts +0 -1
- package/dist/core/shape/UnionShape.d.ts +0 -34
- package/dist/core/shape/UnionShape.js +0 -141
- package/dist/core/shape/UnionShape.test.d.ts +0 -1
- package/dist/core/source/CombinedSource.test.d.ts +0 -1
- package/dist/core/source/FSSource.test.d.ts +0 -1
- package/dist/core/source/FilePatch.test.d.ts +0 -1
- package/dist/core/source/GitDelta.test.d.ts +0 -1
- package/dist/core/source/GitUtils.test.d.ts +0 -1
- package/dist/core/source/GithubSource.test.d.ts +0 -1
- package/dist/core/source/IndexedDBSource.test.d.ts +0 -1
- package/dist/core/source/MemorySource.test.d.ts +0 -1
- package/dist/core/source/SourceExport.test.d.ts +0 -1
- package/dist/core/source/Tree.test.d.ts +0 -1
- package/dist/core/source/Utils.test.d.ts +0 -1
- package/dist/core/util/CodeGen.test.d.ts +0 -1
- package/dist/core/util/EntryFilenames.test.d.ts +0 -1
- package/dist/core/util/JWT.test.d.ts +0 -1
- package/dist/core/util/Paths.test.d.ts +0 -1
- package/dist/core/util/Slugs.test.d.ts +0 -1
- package/dist/dashboard/DashboardNav.d.ts +0 -22
- package/dist/dashboard/DashboardNav.js +0 -44
- package/dist/dashboard/DashboardProvider.d.ts +0 -16
- package/dist/dashboard/DashboardProvider.js +0 -28
- package/dist/dashboard/Routes.d.ts +0 -111
- package/dist/dashboard/Routes.js +0 -78
- package/dist/dashboard/Welcome.d.ts +0 -1
- package/dist/dashboard/Welcome.js +0 -21
- package/dist/dashboard/atoms/DashboardAtoms.d.ts +0 -18
- package/dist/dashboard/atoms/DashboardAtoms.js +0 -86
- package/dist/dashboard/atoms/DbAtoms.d.ts +0 -5
- package/dist/dashboard/atoms/DbAtoms.js +0 -95
- package/dist/dashboard/atoms/Edits.d.ts +0 -31
- package/dist/dashboard/atoms/Edits.js +0 -93
- package/dist/dashboard/atoms/EntryAtoms.d.ts +0 -34
- package/dist/dashboard/atoms/EntryAtoms.js +0 -298
- package/dist/dashboard/atoms/EntryEditorAtoms.d.ts +0 -255
- package/dist/dashboard/atoms/EntryEditorAtoms.js +0 -629
- package/dist/dashboard/atoms/EntrySummaryAtoms.d.ts +0 -21
- package/dist/dashboard/atoms/EntrySummaryAtoms.js +0 -58
- package/dist/dashboard/atoms/ErrorAtoms.d.ts +0 -4
- package/dist/dashboard/atoms/ErrorAtoms.js +0 -18
- package/dist/dashboard/atoms/FormAtoms.d.ts +0 -56
- package/dist/dashboard/atoms/FormAtoms.js +0 -189
- package/dist/dashboard/atoms/LocationAtoms.d.ts +0 -25
- package/dist/dashboard/atoms/LocationAtoms.js +0 -104
- package/dist/dashboard/atoms/NavigationAtoms.d.ts +0 -38
- package/dist/dashboard/atoms/NavigationAtoms.js +0 -124
- package/dist/dashboard/atoms/PolicyAtom.d.ts +0 -6
- package/dist/dashboard/atoms/PolicyAtom.js +0 -29
- package/dist/dashboard/atoms/PreferencesAtoms.d.ts +0 -16
- package/dist/dashboard/atoms/PreferencesAtoms.js +0 -53
- package/dist/dashboard/atoms/RouterAtoms.d.ts +0 -78
- package/dist/dashboard/atoms/RouterAtoms.js +0 -161
- package/dist/dashboard/atoms/StyleAtoms.d.ts +0 -1
- package/dist/dashboard/atoms/StyleAtoms.js +0 -14
- package/dist/dashboard/atoms/YAtom.d.ts +0 -2
- package/dist/dashboard/atoms/YAtom.js +0 -24
- package/dist/dashboard/editor/DefaultViews.d.ts +0 -19
- package/dist/dashboard/editor/DefaultViews.js +0 -52
- package/dist/dashboard/editor/InputForm.d.ts +0 -26
- package/dist/dashboard/editor/InputForm.js +0 -53
- package/dist/dashboard/editor/ViewKeys.d.ts +0 -23
- package/dist/dashboard/editor/ViewKeys.js +0 -29
- package/dist/dashboard/hook/UseConfig.d.ts +0 -1
- package/dist/dashboard/hook/UseConfig.js +0 -12
- package/dist/dashboard/hook/UseDashboard.d.ts +0 -1
- package/dist/dashboard/hook/UseDashboard.js +0 -12
- package/dist/dashboard/hook/UseDb.d.ts +0 -2
- package/dist/dashboard/hook/UseDb.js +0 -14
- package/dist/dashboard/hook/UseDebounce.d.ts +0 -1
- package/dist/dashboard/hook/UseDebounce.js +0 -23
- package/dist/dashboard/hook/UseEntryLocation.d.ts +0 -1
- package/dist/dashboard/hook/UseEntryLocation.js +0 -12
- package/dist/dashboard/hook/UseEntrySummary.d.ts +0 -1
- package/dist/dashboard/hook/UseEntrySummary.js +0 -16
- package/dist/dashboard/hook/UseExplorer.d.ts +0 -14
- package/dist/dashboard/hook/UseExplorer.js +0 -13
- package/dist/dashboard/hook/UseFocusList.d.ts +0 -14
- package/dist/dashboard/hook/UseFocusList.js +0 -113
- package/dist/dashboard/hook/UseNav.d.ts +0 -10
- package/dist/dashboard/hook/UseNav.js +0 -12
- package/dist/dashboard/hook/UsePolicy.d.ts +0 -1
- package/dist/dashboard/hook/UsePolicy.js +0 -14
- package/dist/dashboard/hook/UsePreferences.d.ts +0 -6
- package/dist/dashboard/hook/UsePreferences.js +0 -30
- package/dist/dashboard/hook/UseSession.d.ts +0 -1
- package/dist/dashboard/hook/UseSession.js +0 -12
- package/dist/dashboard/hook/UseUploads.d.ts +0 -42
- package/dist/dashboard/hook/UseUploads.js +0 -91
- package/dist/dashboard/pages/ContentView.d.ts +0 -5
- package/dist/dashboard/pages/ContentView.js +0 -96
- package/dist/dashboard/util/Atoms.d.ts +0 -2
- package/dist/dashboard/util/Atoms.js +0 -21
- package/dist/dashboard/util/DebounceAtom.d.ts +0 -2
- package/dist/dashboard/util/DebounceAtom.js +0 -26
- package/dist/dashboard/util/HashRouter.d.ts +0 -1
- package/dist/dashboard/util/HashRouter.js +0 -2
- package/dist/dashboard/util/Head.d.ts +0 -2
- package/dist/dashboard/util/Head.js +0 -10
- package/dist/dashboard/util/KeepInView.d.ts +0 -2
- package/dist/dashboard/util/KeepInView.js +0 -19
- package/dist/dashboard/util/KeepPreviousData.d.ts +0 -9
- package/dist/dashboard/util/KeepPreviousData.js +0 -32
- package/dist/dashboard/util/Loader.d.ts +0 -17
- package/dist/dashboard/util/Loader.js +0 -31
- package/dist/dashboard/util/SuspenseBoundary.d.ts +0 -4
- package/dist/dashboard/util/SuspenseBoundary.js +0 -23
- package/dist/dashboard/util/WithResolvers.d.ts +0 -2
- package/dist/dashboard/util/WithResolvers.js +0 -16
- package/dist/dashboard/view/AlineaLogo.d.ts +0 -2
- package/dist/dashboard/view/AlineaLogo.js +0 -16
- package/dist/dashboard/view/Breadcrumbs.d.ts +0 -3
- package/dist/dashboard/view/Breadcrumbs.js +0 -33
- package/dist/dashboard/view/Create.d.ts +0 -13
- package/dist/dashboard/view/Create.js +0 -75
- package/dist/dashboard/view/EntryEdit.d.ts +0 -5
- package/dist/dashboard/view/EntryEdit.js +0 -222
- package/dist/dashboard/view/EntryTree.d.ts +0 -5
- package/dist/dashboard/view/EntryTree.js +0 -1463
- package/dist/dashboard/view/ErrorBoundary.d.ts +0 -6
- package/dist/dashboard/view/ErrorBoundary.js +0 -95
- package/dist/dashboard/view/IconButton.d.ts +0 -18
- package/dist/dashboard/view/IconButton.js +0 -51
- package/dist/dashboard/view/InputLabel.d.ts +0 -36
- package/dist/dashboard/view/InputLabel.js +0 -151
- package/dist/dashboard/view/MediaExplorer.d.ts +0 -7
- package/dist/dashboard/view/MediaExplorer.js +0 -121
- package/dist/dashboard/view/Modal.d.ts +0 -8
- package/dist/dashboard/view/Modal.js +0 -63
- package/dist/dashboard/view/PageHeader.d.ts +0 -5
- package/dist/dashboard/view/PageHeader.js +0 -26
- package/dist/dashboard/view/Preview.d.ts +0 -3
- package/dist/dashboard/view/Preview.js +0 -20
- package/dist/dashboard/view/RootOverview.d.ts +0 -5
- package/dist/dashboard/view/RootOverview.js +0 -46
- package/dist/dashboard/view/SearchBox.d.ts +0 -1
- package/dist/dashboard/view/SearchBox.js +0 -126
- package/dist/dashboard/view/Sidebar.d.ts +0 -21
- package/dist/dashboard/view/Sidebar.js +0 -312
- package/dist/dashboard/view/Toolbar.d.ts +0 -9
- package/dist/dashboard/view/Toolbar.js +0 -240
- package/dist/dashboard/view/Viewport.d.ts +0 -8
- package/dist/dashboard/view/Viewport.js +0 -69
- package/dist/dashboard/view/WorkspaceLabel.d.ts +0 -7
- package/dist/dashboard/view/WorkspaceLabel.js +0 -32
- package/dist/dashboard/view/diff/ChangeBox.d.ts +0 -14
- package/dist/dashboard/view/diff/ChangeBox.js +0 -36
- package/dist/dashboard/view/diff/DiffUtils.d.ts +0 -16
- package/dist/dashboard/view/diff/DiffUtils.js +0 -82
- package/dist/dashboard/view/diff/DiffUtils.test.d.ts +0 -1
- package/dist/dashboard/view/diff/EntryDiff.d.ts +0 -6
- package/dist/dashboard/view/diff/EntryDiff.js +0 -45
- package/dist/dashboard/view/diff/FieldDiff.d.ts +0 -10
- package/dist/dashboard/view/diff/FieldDiff.js +0 -51
- package/dist/dashboard/view/diff/FieldsDiff.d.ts +0 -7
- package/dist/dashboard/view/diff/FieldsDiff.js +0 -24
- package/dist/dashboard/view/diff/ListDiff.d.ts +0 -10
- package/dist/dashboard/view/diff/ListDiff.js +0 -32
- package/dist/dashboard/view/diff/RichTextDiff.d.ts +0 -11
- package/dist/dashboard/view/diff/RichTextDiff.js +0 -94
- package/dist/dashboard/view/diff/ScalarDiff.d.ts +0 -5
- package/dist/dashboard/view/diff/ScalarDiff.js +0 -1520
- package/dist/dashboard/view/entry/EditModeToggle.d.ts +0 -9
- package/dist/dashboard/view/entry/EditModeToggle.js +0 -51
- package/dist/dashboard/view/entry/EntryHeader.d.ts +0 -5
- package/dist/dashboard/view/entry/EntryHeader.js +0 -414
- package/dist/dashboard/view/entry/EntryHistory.d.ts +0 -2
- package/dist/dashboard/view/entry/EntryHistory.js +0 -78
- package/dist/dashboard/view/entry/EntryNotice.d.ts +0 -7
- package/dist/dashboard/view/entry/EntryNotice.js +0 -44
- package/dist/dashboard/view/entry/EntryPreview.d.ts +0 -10
- package/dist/dashboard/view/entry/EntryPreview.js +0 -44
- package/dist/dashboard/view/entry/EntrySummary.d.ts +0 -3
- package/dist/dashboard/view/entry/EntrySummary.js +0 -75
- package/dist/dashboard/view/entry/EntryTitle.d.ts +0 -7
- package/dist/dashboard/view/entry/EntryTitle.js +0 -64
- package/dist/dashboard/view/entry/FieldToolbar.d.ts +0 -11
- package/dist/dashboard/view/entry/FieldToolbar.js +0 -41
- package/dist/dashboard/view/entry/LangSwitch.d.ts +0 -7
- package/dist/dashboard/view/entry/LangSwitch.js +0 -110
- package/dist/dashboard/view/entry/NewEntry.d.ts +0 -4
- package/dist/dashboard/view/entry/NewEntry.js +0 -288
- package/dist/dashboard/view/entry/RootHeader.d.ts +0 -4
- package/dist/dashboard/view/entry/RootHeader.js +0 -61
- package/dist/dashboard/view/explorer/Explorer.d.ts +0 -24
- package/dist/dashboard/view/explorer/Explorer.js +0 -2230
- package/dist/dashboard/view/explorer/ExplorerItem.d.ts +0 -11
- package/dist/dashboard/view/explorer/ExplorerItem.js +0 -128
- package/dist/dashboard/view/explorer/ExplorerRow.d.ts +0 -15
- package/dist/dashboard/view/explorer/ExplorerRow.js +0 -73
- package/dist/dashboard/view/media/CardOverview.d.ts +0 -1
- package/dist/dashboard/view/media/CardOverview.js +0 -10
- package/dist/dashboard/view/media/FileEntry.d.ts +0 -6
- package/dist/dashboard/view/media/FileEntry.js +0 -223
- package/dist/dashboard/view/media/FileSummary.d.ts +0 -3
- package/dist/dashboard/view/media/FileSummary.js +0 -102
- package/dist/dashboard/view/media/FileUploadRow.d.ts +0 -2
- package/dist/dashboard/view/media/FileUploadRow.js +0 -53
- package/dist/dashboard/view/media/FileUploader.d.ts +0 -10
- package/dist/dashboard/view/media/FileUploader.js +0 -151
- package/dist/dashboard/view/media/MediaThumbnail.d.ts +0 -11
- package/dist/dashboard/view/media/MediaThumbnail.js +0 -55
- package/dist/dashboard/view/preview/BrowserPreview.d.ts +0 -12
- package/dist/dashboard/view/preview/BrowserPreview.js +0 -210
- package/dist/dashboard/view/sidebar/SidebarSettings.d.ts +0 -1
- package/dist/dashboard/view/sidebar/SidebarSettings.js +0 -192
- package/dist/field/check/CheckField.stories.d.ts +0 -5
- package/dist/field/code/CodeField.stories.d.ts +0 -5
- package/dist/field/date/DateField.stories.d.ts +0 -5
- package/dist/field/json/JsonField.stories.d.ts +0 -5
- package/dist/field/metadata/MetadataField.stories.d.ts +0 -5
- package/dist/field/number/NumberField.stories.d.ts +0 -5
- package/dist/field/object/ObjectField.stories.d.ts +0 -5
- package/dist/field/path/PathField.stories.d.ts +0 -5
- package/dist/field/richtext/RichText.stories.d.ts +0 -5
- package/dist/field/select/SelectField.stories.d.ts +0 -5
- package/dist/field/tabs/Tabs.stories.d.ts +0 -5
- package/dist/field/text/TextField.stories.d.ts +0 -5
- package/dist/field/time/TimeField.stories.d.ts +0 -5
- package/dist/picker/entry/EntryPicker.browser.d.ts +0 -7
- package/dist/picker/entry/EntryPicker.browser.js +0 -373
- package/dist/picker/entry/EntryPicker.stories.d.ts +0 -2
- package/dist/picker/entry/EntryPickerRow.d.ts +0 -5
- package/dist/picker/entry/EntryPickerRow.js +0 -24
- package/dist/picker/url/UrlPicker.browser.d.ts +0 -6
- package/dist/picker/url/UrlPicker.browser.js +0 -83
- package/dist/picker/url/UrlPicker.stories.d.ts +0 -5
- package/dist/picker/url/UrlPickerRow.d.ts +0 -5
- package/dist/picker/url/UrlPickerRow.js +0 -38
- package/dist/preview/ChunkCookieValue.test.d.ts +0 -1
- package/dist/preview/PreviewPayload.test.d.ts +0 -1
- package/dist/test/EntryFixture.d.ts +0 -30
- package/dist/test/EntryFixture.js +0 -91
- package/dist/test/broken-index.test.d.ts +0 -1
- package/dist/test/cms.d.ts +0 -17
- package/dist/test/cms.js +0 -38
- package/dist/test/drafts.test.d.ts +0 -1
- package/dist/test/example.d.ts +0 -137
- package/dist/test/example.js +0 -230
- package/dist/test/insert-order.test.d.ts +0 -1
- package/dist/test/links.test.d.ts +0 -1
- package/dist/test/locales.test.d.ts +0 -1
- package/dist/test/moves.test.d.ts +0 -1
- package/dist/test/mutate.test.d.ts +0 -1
- package/dist/test/query.test.d.ts +0 -1
- package/dist/test/renames.test.d.ts +0 -1
- package/dist/test/roles.test.d.ts +0 -1
- package/dist/test/schema/DemoHome.d.ts +0 -25
- package/dist/test/schema/DemoHome.js +0 -25
- package/dist/test/schema/DemoRecipe.d.ts +0 -14
- package/dist/test/schema/DemoRecipe.js +0 -22
- package/dist/test/schema/DemoRecipes.d.ts +0 -4
- package/dist/test/schema/DemoRecipes.js +0 -14
- package/dist/test/schema/index.d.ts +0 -3
- package/dist/test/schema/index.js +0 -4
- package/dist/test/seeding.test.d.ts +0 -1
- package/dist/test/shared.test.d.ts +0 -1
- package/dist/test/status.test.d.ts +0 -1
- package/dist/test/uploads.test.d.ts +0 -1
- package/dist/ui/AppBar.d.ts +0 -14
- package/dist/ui/AppBar.js +0 -68
- package/dist/ui/Avatar.d.ts +0 -6
- package/dist/ui/Avatar.js +0 -33
- package/dist/ui/Badge.d.ts +0 -9
- package/dist/ui/Badge.js +0 -44
- package/dist/ui/Button.d.ts +0 -9
- package/dist/ui/Button.js +0 -57
- package/dist/ui/Button.stories.d.ts +0 -6
- package/dist/ui/Chip.d.ts +0 -8
- package/dist/ui/Chip.js +0 -46
- package/dist/ui/DropdownMenu.d.ts +0 -12
- package/dist/ui/DropdownMenu.js +0 -415
- package/dist/ui/Ellipsis.d.ts +0 -2
- package/dist/ui/Ellipsis.js +0 -33
- package/dist/ui/ErrorMessage.d.ts +0 -4
- package/dist/ui/ErrorMessage.js +0 -17
- package/dist/ui/Icon.d.ts +0 -9
- package/dist/ui/Icon.js +0 -41
- package/dist/ui/Lift.d.ts +0 -3
- package/dist/ui/Lift.js +0 -22
- package/dist/ui/Loader.d.ts +0 -8
- package/dist/ui/Loader.js +0 -32
- package/dist/ui/Main.d.ts +0 -12
- package/dist/ui/Main.js +0 -56
- package/dist/ui/Pane.d.ts +0 -9
- package/dist/ui/Pane.js +0 -132
- package/dist/ui/PopoverMenu.d.ts +0 -12
- package/dist/ui/PopoverMenu.js +0 -418
- package/dist/ui/Property.d.ts +0 -1
- package/dist/ui/Property.js +0 -7
- package/dist/ui/Sink.d.ts +0 -9
- package/dist/ui/Sink.js +0 -49
- package/dist/ui/Statusbar.d.ts +0 -15
- package/dist/ui/Statusbar.js +0 -54
- package/dist/ui/Tabs.d.ts +0 -11
- package/dist/ui/Tabs.js +0 -293
- package/dist/ui/TextLabel.d.ts +0 -5
- package/dist/ui/TextLabel.js +0 -10
- package/dist/ui/Typo.d.ts +0 -35
- package/dist/ui/Typo.js +0 -28
- package/dist/ui/UIStory.d.ts +0 -8
- package/dist/ui/branding/FavIcon.d.ts +0 -5
- package/dist/ui/branding/FavIcon.js +0 -56
- package/dist/ui/branding/LogoShape.d.ts +0 -6
- package/dist/ui/branding/LogoShape.js +0 -52
- package/dist/ui/hook/UseAutoHide.d.ts +0 -8
- package/dist/ui/hook/UseAutoHide.js +0 -43
- package/dist/ui/hook/UseColorScheme.d.ts +0 -4
- package/dist/ui/hook/UseColorScheme.js +0 -13
- package/dist/ui/hook/UseContrastColor.d.ts +0 -1
- package/dist/ui/hook/UseContrastColor.js +0 -12
- package/dist/ui/hook/UseElementSize.d.ts +0 -6
- package/dist/ui/hook/UseElementSize.js +0 -52
- package/dist/ui/hook/UseForceUpdate.d.ts +0 -1
- package/dist/ui/hook/UseForceUpdate.js +0 -11
- package/dist/ui/hook/UseHash.d.ts +0 -1
- package/dist/ui/hook/UseHash.js +0 -24
- package/dist/ui/hook/UseInitialEffect.d.ts +0 -2
- package/dist/ui/hook/UseInitialEffect.js +0 -15
- package/dist/ui/hook/UseLocalStorage.d.ts +0 -1
- package/dist/ui/hook/UseLocalStorage.js +0 -36
- package/dist/ui/hook/UseNonInitialEffect.d.ts +0 -2
- package/dist/ui/hook/UseNonInitialEffect.js +0 -17
- package/dist/ui/hook/UseTrigger.d.ts +0 -7
- package/dist/ui/hook/UseTrigger.js +0 -29
- package/dist/ui/icons/IcAlignJustify.d.ts +0 -3
- package/dist/ui/icons/IcAlignJustify.js +0 -18
- package/dist/ui/icons/IcAlignLeft.d.ts +0 -2
- package/dist/ui/icons/IcAlignLeft.js +0 -16
- package/dist/ui/icons/IcAlignRight.d.ts +0 -2
- package/dist/ui/icons/IcAlignRight.js +0 -16
- package/dist/ui/icons/IcBaselineAccountCircle.d.ts +0 -2
- package/dist/ui/icons/IcBaselineAccountCircle.js +0 -26
- package/dist/ui/icons/IcBaselineContentCopy.d.ts +0 -2
- package/dist/ui/icons/IcBaselineContentCopy.js +0 -26
- package/dist/ui/icons/IcBaselineContentPasteGo.d.ts +0 -2
- package/dist/ui/icons/IcBaselineContentPasteGo.js +0 -35
- package/dist/ui/icons/IcBaselineDesktopMac.d.ts +0 -2
- package/dist/ui/icons/IcBaselineDesktopMac.js +0 -16
- package/dist/ui/icons/IcBaselineErrorOutline.d.ts +0 -2
- package/dist/ui/icons/IcBaselineErrorOutline.js +0 -26
- package/dist/ui/icons/IcBaselinePause.d.ts +0 -2
- package/dist/ui/icons/IcBaselinePause.js +0 -20
- package/dist/ui/icons/IcBaselinePhoneIphone.d.ts +0 -2
- package/dist/ui/icons/IcBaselinePhoneIphone.js +0 -16
- package/dist/ui/icons/IcBaselineWifiTethering.d.ts +0 -2
- package/dist/ui/icons/IcBaselineWifiTethering.js +0 -26
- package/dist/ui/icons/IcOutlineArchive.d.ts +0 -2
- package/dist/ui/icons/IcOutlineArchive.js +0 -26
- package/dist/ui/icons/IcOutlineArrowCircleRight.d.ts +0 -2
- package/dist/ui/icons/IcOutlineArrowCircleRight.js +0 -16
- package/dist/ui/icons/IcOutlineAvTimer.d.ts +0 -2
- package/dist/ui/icons/IcOutlineAvTimer.js +0 -26
- package/dist/ui/icons/IcOutlineCloudUpload.d.ts +0 -2
- package/dist/ui/icons/IcOutlineCloudUpload.js +0 -26
- package/dist/ui/icons/IcOutlineDarkMode.d.ts +0 -2
- package/dist/ui/icons/IcOutlineDarkMode.js +0 -16
- package/dist/ui/icons/IcOutlineDescription.d.ts +0 -2
- package/dist/ui/icons/IcOutlineDescription.js +0 -26
- package/dist/ui/icons/IcOutlineDrafts.d.ts +0 -2
- package/dist/ui/icons/IcOutlineDrafts.js +0 -26
- package/dist/ui/icons/IcOutlineFolder.d.ts +0 -2
- package/dist/ui/icons/IcOutlineFolder.js +0 -26
- package/dist/ui/icons/IcOutlineInsertDriveFile.d.ts +0 -2
- package/dist/ui/icons/IcOutlineInsertDriveFile.js +0 -26
- package/dist/ui/icons/IcOutlineKeyboardTab.d.ts +0 -2
- package/dist/ui/icons/IcOutlineKeyboardTab.js +0 -26
- package/dist/ui/icons/IcOutlineLightMode.d.ts +0 -2
- package/dist/ui/icons/IcOutlineLightMode.js +0 -16
- package/dist/ui/icons/IcOutlineList.d.ts +0 -3
- package/dist/ui/icons/IcOutlineList.js +0 -18
- package/dist/ui/icons/IcOutlineLock.d.ts +0 -2
- package/dist/ui/icons/IcOutlineLock.js +0 -26
- package/dist/ui/icons/IcOutlineMoreHoriz.d.ts +0 -3
- package/dist/ui/icons/IcOutlineMoreHoriz.js +0 -18
- package/dist/ui/icons/IcOutlinePreview.d.ts +0 -2
- package/dist/ui/icons/IcOutlinePreview.js +0 -16
- package/dist/ui/icons/IcOutlineRemoveRedEye.d.ts +0 -2
- package/dist/ui/icons/IcOutlineRemoveRedEye.js +0 -26
- package/dist/ui/icons/IcOutlineScreenshot.d.ts +0 -2
- package/dist/ui/icons/IcOutlineScreenshot.js +0 -16
- package/dist/ui/icons/IcOutlineTableRows.d.ts +0 -2
- package/dist/ui/icons/IcOutlineTableRows.js +0 -26
- package/dist/ui/icons/IcRoundAdd.d.ts +0 -2
- package/dist/ui/icons/IcRoundAdd.js +0 -16
- package/dist/ui/icons/IcRoundAddCircle.d.ts +0 -3
- package/dist/ui/icons/IcRoundAddCircle.js +0 -18
- package/dist/ui/icons/IcRoundAddCircleOutline.d.ts +0 -2
- package/dist/ui/icons/IcRoundAddCircleOutline.js +0 -16
- package/dist/ui/icons/IcRoundArchive.d.ts +0 -2
- package/dist/ui/icons/IcRoundArchive.js +0 -16
- package/dist/ui/icons/IcRoundArrowBack.d.ts +0 -2
- package/dist/ui/icons/IcRoundArrowBack.js +0 -16
- package/dist/ui/icons/IcRoundArrowDownward.d.ts +0 -2
- package/dist/ui/icons/IcRoundArrowDownward.js +0 -26
- package/dist/ui/icons/IcRoundArrowDropDown.d.ts +0 -3
- package/dist/ui/icons/IcRoundArrowDropDown.js +0 -18
- package/dist/ui/icons/IcRoundArrowDropDownCircle.d.ts +0 -3
- package/dist/ui/icons/IcRoundArrowDropDownCircle.js +0 -18
- package/dist/ui/icons/IcRoundArrowDropUp.d.ts +0 -3
- package/dist/ui/icons/IcRoundArrowDropUp.js +0 -18
- package/dist/ui/icons/IcRoundArrowForward.d.ts +0 -2
- package/dist/ui/icons/IcRoundArrowForward.js +0 -16
- package/dist/ui/icons/IcRoundArrowUpward.d.ts +0 -2
- package/dist/ui/icons/IcRoundArrowUpward.js +0 -26
- package/dist/ui/icons/IcRoundAttachFile.d.ts +0 -2
- package/dist/ui/icons/IcRoundAttachFile.js +0 -10
- package/dist/ui/icons/IcRoundCheck.d.ts +0 -2
- package/dist/ui/icons/IcRoundCheck.js +0 -16
- package/dist/ui/icons/IcRoundCheckBox.d.ts +0 -2
- package/dist/ui/icons/IcRoundCheckBox.js +0 -16
- package/dist/ui/icons/IcRoundCheckBoxOutlineBlank.d.ts +0 -2
- package/dist/ui/icons/IcRoundCheckBoxOutlineBlank.js +0 -16
- package/dist/ui/icons/IcRoundChevronRight.d.ts +0 -2
- package/dist/ui/icons/IcRoundChevronRight.js +0 -26
- package/dist/ui/icons/IcRoundDescription.d.ts +0 -2
- package/dist/ui/icons/IcRoundDescription.js +0 -26
- package/dist/ui/icons/IcRoundDragHandle.d.ts +0 -3
- package/dist/ui/icons/IcRoundDragHandle.js +0 -18
- package/dist/ui/icons/IcRoundExitToApp.d.ts +0 -2
- package/dist/ui/icons/IcRoundExitToApp.js +0 -26
- package/dist/ui/icons/IcRoundFeed.d.ts +0 -2
- package/dist/ui/icons/IcRoundFeed.js +0 -16
- package/dist/ui/icons/IcRoundFormatBold.d.ts +0 -3
- package/dist/ui/icons/IcRoundFormatBold.js +0 -18
- package/dist/ui/icons/IcRoundFormatClear.d.ts +0 -3
- package/dist/ui/icons/IcRoundFormatClear.js +0 -18
- package/dist/ui/icons/IcRoundFormatItalic.d.ts +0 -3
- package/dist/ui/icons/IcRoundFormatItalic.js +0 -18
- package/dist/ui/icons/IcRoundFormatListBulleted.d.ts +0 -3
- package/dist/ui/icons/IcRoundFormatListBulleted.js +0 -18
- package/dist/ui/icons/IcRoundFormatPaint.d.ts +0 -2
- package/dist/ui/icons/IcRoundFormatPaint.js +0 -10
- package/dist/ui/icons/IcRoundHamburger.d.ts +0 -3
- package/dist/ui/icons/IcRoundHamburger.js +0 -18
- package/dist/ui/icons/IcRoundHdrStrong.d.ts +0 -3
- package/dist/ui/icons/IcRoundHdrStrong.js +0 -18
- package/dist/ui/icons/IcRoundHorizontalRule.d.ts +0 -3
- package/dist/ui/icons/IcRoundHorizontalRule.js +0 -19
- package/dist/ui/icons/IcRoundInsertDriveFile.d.ts +0 -2
- package/dist/ui/icons/IcRoundInsertDriveFile.js +0 -16
- package/dist/ui/icons/IcRoundKeyboardArrowDown.d.ts +0 -2
- package/dist/ui/icons/IcRoundKeyboardArrowDown.js +0 -16
- package/dist/ui/icons/IcRoundKeyboardArrowLeft.d.ts +0 -3
- package/dist/ui/icons/IcRoundKeyboardArrowLeft.js +0 -18
- package/dist/ui/icons/IcRoundKeyboardArrowRight.d.ts +0 -2
- package/dist/ui/icons/IcRoundKeyboardArrowRight.js +0 -16
- package/dist/ui/icons/IcRoundKeyboardArrowUp.d.ts +0 -2
- package/dist/ui/icons/IcRoundKeyboardArrowUp.js +0 -16
- package/dist/ui/icons/IcRoundLanguage.d.ts +0 -2
- package/dist/ui/icons/IcRoundLanguage.js +0 -16
- package/dist/ui/icons/IcRoundLastPage.d.ts +0 -2
- package/dist/ui/icons/IcRoundLastPage.js +0 -26
- package/dist/ui/icons/IcRoundLock.d.ts +0 -3
- package/dist/ui/icons/IcRoundLock.js +0 -18
- package/dist/ui/icons/IcRoundMenu.d.ts +0 -2
- package/dist/ui/icons/IcRoundMenu.js +0 -16
- package/dist/ui/icons/IcRoundMoreHoriz.d.ts +0 -2
- package/dist/ui/icons/IcRoundMoreHoriz.js +0 -16
- package/dist/ui/icons/IcRoundMoreVert.d.ts +0 -2
- package/dist/ui/icons/IcRoundMoreVert.js +0 -26
- package/dist/ui/icons/IcRoundNorthEast.d.ts +0 -2
- package/dist/ui/icons/IcRoundNorthEast.js +0 -16
- package/dist/ui/icons/IcRoundNotes.d.ts +0 -2
- package/dist/ui/icons/IcRoundNotes.js +0 -16
- package/dist/ui/icons/IcRoundNumbers.d.ts +0 -2
- package/dist/ui/icons/IcRoundNumbers.js +0 -16
- package/dist/ui/icons/IcRoundPermMedia.d.ts +0 -2
- package/dist/ui/icons/IcRoundPermMedia.js +0 -25
- package/dist/ui/icons/IcRoundPublish.d.ts +0 -2
- package/dist/ui/icons/IcRoundPublish.js +0 -16
- package/dist/ui/icons/IcRoundPublishedWithChanges.d.ts +0 -2
- package/dist/ui/icons/IcRoundPublishedWithChanges.js +0 -26
- package/dist/ui/icons/IcRoundQuote.d.ts +0 -2
- package/dist/ui/icons/IcRoundQuote.js +0 -16
- package/dist/ui/icons/IcRoundRedo.d.ts +0 -3
- package/dist/ui/icons/IcRoundRedo.js +0 -18
- package/dist/ui/icons/IcRoundRemoveCircleOutline.d.ts +0 -2
- package/dist/ui/icons/IcRoundRemoveCircleOutline.js +0 -16
- package/dist/ui/icons/IcRoundRotateLeft.d.ts +0 -2
- package/dist/ui/icons/IcRoundRotateLeft.js +0 -16
- package/dist/ui/icons/IcRoundSend.d.ts +0 -2
- package/dist/ui/icons/IcRoundSend.js +0 -26
- package/dist/ui/icons/IcRoundSouthWest.d.ts +0 -2
- package/dist/ui/icons/IcRoundSouthWest.js +0 -16
- package/dist/ui/icons/IcRoundSubscript.d.ts +0 -2
- package/dist/ui/icons/IcRoundSubscript.js +0 -26
- package/dist/ui/icons/IcRoundSuperscript.d.ts +0 -2
- package/dist/ui/icons/IcRoundSuperscript.js +0 -26
- package/dist/ui/icons/IcRoundTabletMac.d.ts +0 -2
- package/dist/ui/icons/IcRoundTabletMac.js +0 -16
- package/dist/ui/icons/IcRoundTextFields.d.ts +0 -2
- package/dist/ui/icons/IcRoundTextFields.js +0 -16
- package/dist/ui/icons/IcRoundTranslate.d.ts +0 -2
- package/dist/ui/icons/IcRoundTranslate.js +0 -26
- package/dist/ui/icons/IcRoundUndo.d.ts +0 -3
- package/dist/ui/icons/IcRoundUndo.js +0 -18
- package/dist/ui/icons/IcRoundUnfoldLess.d.ts +0 -2
- package/dist/ui/icons/IcRoundUnfoldLess.js +0 -26
- package/dist/ui/icons/IcRoundUnfoldMore.d.ts +0 -2
- package/dist/ui/icons/IcRoundUnfoldMore.js +0 -16
- package/dist/ui/icons/IcRoundUploadFile.d.ts +0 -3
- package/dist/ui/icons/IcRoundUploadFile.js +0 -18
- package/dist/ui/icons/IcRoundVisibilityOff.d.ts +0 -2
- package/dist/ui/icons/IcRoundVisibilityOff.js +0 -16
- package/dist/ui/icons/IcRoundWarning.d.ts +0 -2
- package/dist/ui/icons/IcRoundWarning.js +0 -16
- package/dist/ui/icons/IcSharpBrightnessMedium.d.ts +0 -2
- package/dist/ui/icons/IcSharpBrightnessMedium.js +0 -16
- package/dist/ui/icons/IcSharpVerticalAlignCenter.d.ts +0 -2
- package/dist/ui/icons/IcSharpVerticalAlignCenter.js +0 -16
- package/dist/ui/icons/IcTwotoneDescription.d.ts +0 -2
- package/dist/ui/icons/IcTwotoneDescription.js +0 -37
- package/dist/ui/icons/IcTwotoneFolder.d.ts +0 -2
- package/dist/ui/icons/IcTwotoneFolder.js +0 -37
- package/dist/ui/icons/IcTwotoneInsertDriveFile.d.ts +0 -2
- package/dist/ui/icons/IcTwotoneInsertDriveFile.js +0 -30
- package/dist/ui/icons/MdiGithub.d.ts +0 -3
- package/dist/ui/icons/MdiGithub.js +0 -18
- package/dist/ui/icons/MdiSourceBranch.d.ts +0 -2
- package/dist/ui/icons/MdiSourceBranch.js +0 -16
- package/dist/ui/icons/MdiTwitterCircle.d.ts +0 -2
- package/dist/ui/icons/MdiTwitterCircle.js +0 -26
- package/dist/ui/icons/MiLayers.d.ts +0 -3
- package/dist/ui/icons/MiLayers.js +0 -16
- package/dist/ui/icons/PhGlobe.d.ts +0 -2
- package/dist/ui/icons/PhGlobe.js +0 -26
- package/dist/ui/icons/RiFlashlightFill.d.ts +0 -2
- package/dist/ui/icons/RiFlashlightFill.js +0 -10
- package/dist/ui/icons/TableDelete.d.ts +0 -2
- package/dist/ui/icons/TableDelete.js +0 -25
- package/dist/ui/icons/TableDeleteColumn.d.ts +0 -2
- package/dist/ui/icons/TableDeleteColumn.js +0 -16
- package/dist/ui/icons/TableDeleteRow.d.ts +0 -2
- package/dist/ui/icons/TableDeleteRow.js +0 -16
- package/dist/ui/icons/TableHeaderCell.d.ts +0 -2
- package/dist/ui/icons/TableHeaderCell.js +0 -16
- package/dist/ui/icons/TableHeaderColumn.d.ts +0 -2
- package/dist/ui/icons/TableHeaderColumn.js +0 -16
- package/dist/ui/icons/TableHeaderRow.d.ts +0 -2
- package/dist/ui/icons/TableHeaderRow.js +0 -16
- package/dist/ui/icons/TableInsertColumnAfter.d.ts +0 -2
- package/dist/ui/icons/TableInsertColumnAfter.js +0 -16
- package/dist/ui/icons/TableInsertColumnBefore.d.ts +0 -2
- package/dist/ui/icons/TableInsertColumnBefore.js +0 -16
- package/dist/ui/icons/TableInsertRowAfter.d.ts +0 -2
- package/dist/ui/icons/TableInsertRowAfter.js +0 -16
- package/dist/ui/icons/TableInsertRowBefore.d.ts +0 -2
- package/dist/ui/icons/TableInsertRowBefore.js +0 -16
- package/dist/ui/icons/TableMergeCells.d.ts +0 -2
- package/dist/ui/icons/TableMergeCells.js +0 -16
- package/dist/ui/icons/TableSplitCell.d.ts +0 -2
- package/dist/ui/icons/TableSplitCell.js +0 -16
- package/dist/ui/util/ContrastColor.d.ts +0 -1
- package/dist/ui/util/ContrastColor.js +0 -17
- package/dist/ui/util/CreateTypo.d.ts +0 -62
- package/dist/ui/util/CreateTypo.js +0 -119
- package/dist/ui/util/Elevation.d.ts +0 -12
- package/dist/ui/util/Elevation.js +0 -20
- package/dist/ui/util/PropsWithAs.d.ts +0 -12
- package/dist/ui/util/PropsWithAs.js +0 -10
- package/dist/ui/util/Slots.d.ts +0 -11
- package/dist/ui/util/Slots.js +0 -50
- package/dist/ui/util/TextareaAutosize.d.ts +0 -2
- package/dist/ui/util/TextareaAutosize.js +0 -40
- package/dist/ui/util/Units.d.ts +0 -1
- package/dist/ui/util/Units.js +0 -7
- package/dist/ui/util/UseId.d.ts +0 -1
- package/dist/ui/util/UseId.js +0 -11
- package/dist/yjs.d.ts +0 -1
- package/dist/yjs.js +0 -206
- /package/dist/{core/Shape.js → chunks/chunk-NUFRM6SI.js} +0 -0
- /package/dist/{backend/Handler.test.d.ts → dashboard/app/EntrySidebarPreview.spec.d.ts} +0 -0
- /package/dist/{backend/router/Router.test.d.ts → dashboard/app/WorkspaceMenu.spec.d.ts} +0 -0
- /package/dist/{cli/Init.test.d.ts → field/link/LinkField.spec.d.ts} +0 -0
- /package/dist/{cli/util/CommitMessage.test.d.ts → field/list/ListField.spec.d.ts} +0 -0
- /package/dist/{core/Config.test.d.ts → field/richtext/RichTextField.spec.d.ts} +0 -0
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
pLimit
|
|
3
|
+
} from "../../chunks/chunk-U5Z2VE7Z.js";
|
|
4
|
+
import "../../chunks/chunk-CQ52GEHY.js";
|
|
2
5
|
|
|
3
6
|
// src/core/db/EntryIndex.ts
|
|
4
7
|
import * as paths from "alinea/core/util/Paths";
|
|
@@ -575,7 +578,7 @@ var MiniSearch = class _MiniSearch {
|
|
|
575
578
|
* @param document The document to be indexed
|
|
576
579
|
*/
|
|
577
580
|
add(document) {
|
|
578
|
-
const { extractField, tokenize, processTerm, fields, idField } = this._options;
|
|
581
|
+
const { extractField, stringifyField, tokenize, processTerm, fields, idField } = this._options;
|
|
579
582
|
const id = extractField(document, idField);
|
|
580
583
|
if (id == null) {
|
|
581
584
|
throw new Error(`MiniSearch: document does not have ID field "${idField}"`);
|
|
@@ -589,7 +592,7 @@ var MiniSearch = class _MiniSearch {
|
|
|
589
592
|
const fieldValue = extractField(document, field);
|
|
590
593
|
if (fieldValue == null)
|
|
591
594
|
continue;
|
|
592
|
-
const tokens = tokenize(fieldValue
|
|
595
|
+
const tokens = tokenize(stringifyField(fieldValue, field), field);
|
|
593
596
|
const fieldId = this._fieldIds[field];
|
|
594
597
|
const uniqueTerms = new Set(tokens).size;
|
|
595
598
|
this.addFieldLength(shortDocumentId, fieldId, this._documentCount - 1, uniqueTerms);
|
|
@@ -656,7 +659,7 @@ var MiniSearch = class _MiniSearch {
|
|
|
656
659
|
* @param document The document to be removed
|
|
657
660
|
*/
|
|
658
661
|
remove(document) {
|
|
659
|
-
const { tokenize, processTerm, extractField, fields, idField } = this._options;
|
|
662
|
+
const { tokenize, processTerm, extractField, stringifyField, fields, idField } = this._options;
|
|
660
663
|
const id = extractField(document, idField);
|
|
661
664
|
if (id == null) {
|
|
662
665
|
throw new Error(`MiniSearch: document does not have ID field "${idField}"`);
|
|
@@ -669,7 +672,7 @@ var MiniSearch = class _MiniSearch {
|
|
|
669
672
|
const fieldValue = extractField(document, field);
|
|
670
673
|
if (fieldValue == null)
|
|
671
674
|
continue;
|
|
672
|
-
const tokens = tokenize(fieldValue
|
|
675
|
+
const tokens = tokenize(stringifyField(fieldValue, field), field);
|
|
673
676
|
const fieldId = this._fieldIds[field];
|
|
674
677
|
const uniqueTerms = new Set(tokens).size;
|
|
675
678
|
this.removeFieldLength(shortId, fieldId, this._documentCount, uniqueTerms);
|
|
@@ -1698,7 +1701,7 @@ var MiniSearch = class _MiniSearch {
|
|
|
1698
1701
|
}
|
|
1699
1702
|
}
|
|
1700
1703
|
};
|
|
1701
|
-
MiniSearch.wildcard = Symbol("*");
|
|
1704
|
+
MiniSearch.wildcard = /* @__PURE__ */ Symbol("*");
|
|
1702
1705
|
var getOwnProperty = (object, property) => Object.prototype.hasOwnProperty.call(object, property) ? object[property] : void 0;
|
|
1703
1706
|
var combinators = {
|
|
1704
1707
|
[OR]: (a, b) => {
|
|
@@ -1752,6 +1755,7 @@ var termToQuerySpec = (options) => (term, i, terms) => {
|
|
|
1752
1755
|
var defaultOptions = {
|
|
1753
1756
|
idField: "id",
|
|
1754
1757
|
extractField: (document, fieldName) => document[fieldName],
|
|
1758
|
+
stringifyField: (fieldValue, fieldName) => fieldValue.toString(),
|
|
1755
1759
|
tokenize: (text) => text.split(SPACE_OR_PUNCTUATION),
|
|
1756
1760
|
processTerm: (term) => term.toLowerCase(),
|
|
1757
1761
|
fields: void 0,
|
|
@@ -1830,6 +1834,7 @@ import { entryInfo, entryUrl } from "../util/EntryFilenames.js";
|
|
|
1830
1834
|
import { entries, keys } from "../util/Objects.js";
|
|
1831
1835
|
import { slugify } from "../util/Slugs.js";
|
|
1832
1836
|
import { sourceChanges } from "./CommitRequest.js";
|
|
1837
|
+
import { EntryReferenceIndex } from "./EntryReferenceIndex.js";
|
|
1833
1838
|
import { EntryTransaction } from "./EntryTransaction.js";
|
|
1834
1839
|
import { IndexEvent } from "./IndexEvent.js";
|
|
1835
1840
|
function combineConditions(a, b) {
|
|
@@ -1911,6 +1916,7 @@ var EntryCollection = class extends Map {
|
|
|
1911
1916
|
this.set(locale, new EntryLanguage(entries2));
|
|
1912
1917
|
}
|
|
1913
1918
|
}
|
|
1919
|
+
versions;
|
|
1914
1920
|
type;
|
|
1915
1921
|
};
|
|
1916
1922
|
var EntryLanguageNode = class {
|
|
@@ -1934,6 +1940,8 @@ var EntryLanguageNode = class {
|
|
|
1934
1940
|
assert(active, `EntryLanguageNode missing active version`);
|
|
1935
1941
|
this.active = active;
|
|
1936
1942
|
this.url = entryUrl(node.entryType, {
|
|
1943
|
+
config: node.graph.config,
|
|
1944
|
+
data: main.data,
|
|
1937
1945
|
status: main.status,
|
|
1938
1946
|
path: main.path,
|
|
1939
1947
|
parentPaths: this.parentPaths,
|
|
@@ -1944,6 +1952,8 @@ var EntryLanguageNode = class {
|
|
|
1944
1952
|
this.path = this.main.path;
|
|
1945
1953
|
this.seeded = this.main.seeded;
|
|
1946
1954
|
}
|
|
1955
|
+
node;
|
|
1956
|
+
language;
|
|
1947
1957
|
inheritedStatus;
|
|
1948
1958
|
main;
|
|
1949
1959
|
active;
|
|
@@ -1971,6 +1981,7 @@ var EntryLanguageNode = class {
|
|
|
1971
1981
|
}
|
|
1972
1982
|
get entries() {
|
|
1973
1983
|
if (this.#entries) return this.#entries;
|
|
1984
|
+
const entryType = this.node.entryType;
|
|
1974
1985
|
const entries2 = (this.inheritedStatus ? [this.active] : [...this.language.values()]).map((version) => {
|
|
1975
1986
|
return {
|
|
1976
1987
|
...version,
|
|
@@ -1979,7 +1990,13 @@ var EntryLanguageNode = class {
|
|
|
1979
1990
|
parents: this.node.parents,
|
|
1980
1991
|
url: this.url,
|
|
1981
1992
|
active: version === this.active,
|
|
1982
|
-
main: version === this.main
|
|
1993
|
+
main: version === this.main,
|
|
1994
|
+
get searchableText() {
|
|
1995
|
+
return version.searchableText ??= Type.searchableText(
|
|
1996
|
+
entryType,
|
|
1997
|
+
version.data
|
|
1998
|
+
);
|
|
1999
|
+
}
|
|
1983
2000
|
};
|
|
1984
2001
|
});
|
|
1985
2002
|
this.#entries = entries2;
|
|
@@ -2021,6 +2038,10 @@ var EntryNode = class extends Map {
|
|
|
2021
2038
|
this.set(locale, new EntryLanguageNode(this, language));
|
|
2022
2039
|
}
|
|
2023
2040
|
}
|
|
2041
|
+
graph;
|
|
2042
|
+
entryType;
|
|
2043
|
+
parent;
|
|
2044
|
+
children;
|
|
2024
2045
|
id;
|
|
2025
2046
|
index;
|
|
2026
2047
|
parentId;
|
|
@@ -2038,12 +2059,30 @@ var EntryNode = class extends Map {
|
|
|
2038
2059
|
};
|
|
2039
2060
|
var SPACE_OR_PUNCTUATION2 = /[\n\r\p{Z}\p{P}]+/u;
|
|
2040
2061
|
var DIACRITIC = /\p{Diacritic}/gu;
|
|
2062
|
+
function tokenizeSearchText(text) {
|
|
2063
|
+
return text.normalize("NFD").replace(DIACRITIC, "").split(SPACE_OR_PUNCTUATION2);
|
|
2064
|
+
}
|
|
2065
|
+
function normalizedSearchTerms(text) {
|
|
2066
|
+
return tokenizeSearchText(text).filter(Boolean).map((term) => term.toLowerCase());
|
|
2067
|
+
}
|
|
2068
|
+
function searchPriority(entry, match, queryTerms) {
|
|
2069
|
+
const titleTerms = normalizedSearchTerms(entry.title);
|
|
2070
|
+
const titlePrefix = queryTerms.every(
|
|
2071
|
+
(term, index) => titleTerms[index]?.startsWith(term)
|
|
2072
|
+
);
|
|
2073
|
+
if (queryTerms.length > 0 && titlePrefix) return 2;
|
|
2074
|
+
const titleMatch = Object.values(match).some(
|
|
2075
|
+
(fields) => fields.includes("title")
|
|
2076
|
+
);
|
|
2077
|
+
return titleMatch ? 1 : 0;
|
|
2078
|
+
}
|
|
2041
2079
|
var EntryGraph = class _EntryGraph {
|
|
2042
2080
|
#config;
|
|
2043
2081
|
#versionData;
|
|
2044
2082
|
#filesById = /* @__PURE__ */ new Map();
|
|
2045
2083
|
#byId = /* @__PURE__ */ new Map();
|
|
2046
2084
|
#byDir = /* @__PURE__ */ new Map();
|
|
2085
|
+
#childrenByParentId = /* @__PURE__ */ new Map();
|
|
2047
2086
|
nodes;
|
|
2048
2087
|
#singleWorkspace;
|
|
2049
2088
|
#search;
|
|
@@ -2055,9 +2094,8 @@ var EntryGraph = class _EntryGraph {
|
|
|
2055
2094
|
this.#singleWorkspace = Config.multipleWorkspaces(config) ? void 0 : keys(config.workspaces)[0];
|
|
2056
2095
|
this.#search = new MiniSearch({
|
|
2057
2096
|
fields: ["title", "searchableText"],
|
|
2058
|
-
storeFields: ["entry"],
|
|
2059
2097
|
tokenize(text) {
|
|
2060
|
-
return text
|
|
2098
|
+
return tokenizeSearchText(text);
|
|
2061
2099
|
}
|
|
2062
2100
|
});
|
|
2063
2101
|
for (const [file, version] of versionData) {
|
|
@@ -2068,6 +2106,12 @@ var EntryGraph = class _EntryGraph {
|
|
|
2068
2106
|
this.#byDir.set(dir, version.id);
|
|
2069
2107
|
}
|
|
2070
2108
|
this.nodes = [...this.#filesById.keys()].map((file) => this.#mkNode(file)).sort((a, b) => compareStrings(a.index, b.index));
|
|
2109
|
+
for (const node of this.nodes) {
|
|
2110
|
+
if (!node.parentId) continue;
|
|
2111
|
+
const children = this.#childrenByParentId.get(node.parentId) ?? [];
|
|
2112
|
+
children.push(node);
|
|
2113
|
+
this.#childrenByParentId.set(node.parentId, children);
|
|
2114
|
+
}
|
|
2071
2115
|
}
|
|
2072
2116
|
byId(id) {
|
|
2073
2117
|
return this.#byId.get(id);
|
|
@@ -2080,6 +2124,17 @@ var EntryGraph = class _EntryGraph {
|
|
|
2080
2124
|
if (!id) return void 0;
|
|
2081
2125
|
return this.byId(id);
|
|
2082
2126
|
}
|
|
2127
|
+
entryByFilePath(filePath) {
|
|
2128
|
+
const node = this.byDir(getNodePath(filePath));
|
|
2129
|
+
if (!node) return void 0;
|
|
2130
|
+
return Array.from(
|
|
2131
|
+
node.filter({
|
|
2132
|
+
entry(entry) {
|
|
2133
|
+
return entry.filePath === filePath;
|
|
2134
|
+
}
|
|
2135
|
+
})
|
|
2136
|
+
)[0];
|
|
2137
|
+
}
|
|
2083
2138
|
withChanges(batch) {
|
|
2084
2139
|
const parser = getParser(this.#config);
|
|
2085
2140
|
const versions = new Map(this.#versionData);
|
|
@@ -2098,17 +2153,34 @@ var EntryGraph = class _EntryGraph {
|
|
|
2098
2153
|
}
|
|
2099
2154
|
*filter({ search, ...filter }) {
|
|
2100
2155
|
if (search) {
|
|
2101
|
-
const found = new
|
|
2102
|
-
|
|
2156
|
+
const found = new Map(
|
|
2157
|
+
Array.from(this.filter(filter), (entry) => [entry.filePath, entry])
|
|
2158
|
+
);
|
|
2159
|
+
for (const entry of found.values()) {
|
|
2103
2160
|
if (!this.#search.has(entry.filePath)) this.#updateSearch(entry);
|
|
2104
2161
|
}
|
|
2162
|
+
const queryTerms = normalizedSearchTerms(search);
|
|
2105
2163
|
const results = this.#search.search(search, {
|
|
2164
|
+
combineWith: "AND",
|
|
2106
2165
|
prefix: true,
|
|
2107
2166
|
fuzzy: 0.1,
|
|
2108
|
-
boost: { title:
|
|
2109
|
-
filter: (result) => found.has(result.
|
|
2110
|
-
}).
|
|
2111
|
-
|
|
2167
|
+
boost: { title: 10 },
|
|
2168
|
+
filter: (result) => typeof result.id === "string" && found.has(result.id)
|
|
2169
|
+
}).flatMap((result) => {
|
|
2170
|
+
if (typeof result.id !== "string") return [];
|
|
2171
|
+
const entry = found.get(result.id);
|
|
2172
|
+
if (!entry) return [];
|
|
2173
|
+
return [
|
|
2174
|
+
{
|
|
2175
|
+
entry,
|
|
2176
|
+
priority: searchPriority(entry, result.match, queryTerms),
|
|
2177
|
+
score: result.score
|
|
2178
|
+
}
|
|
2179
|
+
];
|
|
2180
|
+
});
|
|
2181
|
+
results.sort((a, b) => b.priority - a.priority || b.score - a.score);
|
|
2182
|
+
const entries2 = results.map((result) => result.entry);
|
|
2183
|
+
yield* entries2;
|
|
2112
2184
|
return;
|
|
2113
2185
|
}
|
|
2114
2186
|
for (const node of filter.nodes ?? this.nodes) {
|
|
@@ -2120,8 +2192,7 @@ var EntryGraph = class _EntryGraph {
|
|
|
2120
2192
|
this.#search.add({
|
|
2121
2193
|
id: entry.filePath,
|
|
2122
2194
|
title: entry.title,
|
|
2123
|
-
searchableText: entry.searchableText
|
|
2124
|
-
entry
|
|
2195
|
+
searchableText: entry.searchableText
|
|
2125
2196
|
});
|
|
2126
2197
|
}
|
|
2127
2198
|
#mkEntry(filePath) {
|
|
@@ -2136,7 +2207,7 @@ var EntryGraph = class _EntryGraph {
|
|
|
2136
2207
|
const parentDir = segments.slice(0, -1).join("/");
|
|
2137
2208
|
const childrenDir = `${parentDir}/${path}`;
|
|
2138
2209
|
const seed = this.#seeds.get(childrenDir);
|
|
2139
|
-
const data = { path, ...
|
|
2210
|
+
const data = { path, ...seed?.data, ...version.data };
|
|
2140
2211
|
let segmentIndex = 0;
|
|
2141
2212
|
const workspace = this.#singleWorkspace ?? segments[segmentIndex++];
|
|
2142
2213
|
const workspaceConfig = this.#config.workspaces[workspace];
|
|
@@ -2192,16 +2263,11 @@ var EntryGraph = class _EntryGraph {
|
|
|
2192
2263
|
}
|
|
2193
2264
|
const parent = parentId ? this.#mkNode(parentId) : null;
|
|
2194
2265
|
const type = this.#config.schema[collection.type];
|
|
2195
|
-
function* children() {
|
|
2196
|
-
for (const node2 of this.nodes) {
|
|
2197
|
-
if (node2.parentId === id) yield node2;
|
|
2198
|
-
}
|
|
2199
|
-
}
|
|
2200
2266
|
const node = new EntryNode(
|
|
2201
2267
|
this,
|
|
2202
2268
|
type,
|
|
2203
2269
|
parent,
|
|
2204
|
-
|
|
2270
|
+
() => this.#childrenByParentId.get(id) ?? [],
|
|
2205
2271
|
collection
|
|
2206
2272
|
);
|
|
2207
2273
|
this.#byId.set(id, node);
|
|
@@ -2209,26 +2275,18 @@ var EntryGraph = class _EntryGraph {
|
|
|
2209
2275
|
}
|
|
2210
2276
|
};
|
|
2211
2277
|
var VersionParser = class extends Map {
|
|
2212
|
-
#config;
|
|
2213
|
-
constructor(config) {
|
|
2214
|
-
super();
|
|
2215
|
-
this.#config = config;
|
|
2216
|
-
}
|
|
2217
2278
|
parse(sha, blob) {
|
|
2218
2279
|
if (super.has(sha)) return super.get(sha);
|
|
2219
2280
|
const decoder = new TextDecoder();
|
|
2220
2281
|
const text = decoder.decode(blob);
|
|
2221
2282
|
const raw = JSON.parse(text);
|
|
2222
2283
|
const { meta, data } = parseRecord(raw);
|
|
2223
|
-
const entryType = this.#config.schema[meta.type];
|
|
2224
|
-
const searchableText = Type.searchableText(entryType, data);
|
|
2225
2284
|
const version = {
|
|
2226
2285
|
id: meta.id,
|
|
2227
2286
|
type: meta.type,
|
|
2228
2287
|
index: meta.index,
|
|
2229
2288
|
data,
|
|
2230
2289
|
title: data.title,
|
|
2231
|
-
searchableText,
|
|
2232
2290
|
seeded: meta.seeded ?? null,
|
|
2233
2291
|
rowHash: sha,
|
|
2234
2292
|
fileHash: sha
|
|
@@ -2239,7 +2297,7 @@ var VersionParser = class extends Map {
|
|
|
2239
2297
|
};
|
|
2240
2298
|
var ParserCache = class extends WeakMap {
|
|
2241
2299
|
get = (config) => {
|
|
2242
|
-
if (!this.has(config)) this.set(config, new VersionParser(
|
|
2300
|
+
if (!this.has(config)) this.set(config, new VersionParser());
|
|
2243
2301
|
return super.get(config);
|
|
2244
2302
|
};
|
|
2245
2303
|
};
|
|
@@ -2254,6 +2312,29 @@ function getNodePath(filePath) {
|
|
|
2254
2312
|
if (base.endsWith(".draft")) base = base.slice(0, -".draft".length);
|
|
2255
2313
|
return `${dir}/${base}`;
|
|
2256
2314
|
}
|
|
2315
|
+
function entryRelation(node) {
|
|
2316
|
+
return {
|
|
2317
|
+
parentId: node.parentId,
|
|
2318
|
+
index: node.index
|
|
2319
|
+
};
|
|
2320
|
+
}
|
|
2321
|
+
function changedParentIds(previous, next) {
|
|
2322
|
+
const ids = /* @__PURE__ */ new Set([...previous.keys(), ...next.keys()]);
|
|
2323
|
+
const parents = /* @__PURE__ */ new Set();
|
|
2324
|
+
for (const id of ids) {
|
|
2325
|
+
const before = previous.get(id);
|
|
2326
|
+
const after = next.get(id);
|
|
2327
|
+
if (!before && after) {
|
|
2328
|
+
if (after.parentId) parents.add(after.parentId);
|
|
2329
|
+
} else if (before && !after) {
|
|
2330
|
+
if (before.parentId) parents.add(before.parentId);
|
|
2331
|
+
} else if (before && after && (before.parentId !== after.parentId || before.index !== after.index)) {
|
|
2332
|
+
if (before.parentId) parents.add(before.parentId);
|
|
2333
|
+
if (after.parentId) parents.add(after.parentId);
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
return parents;
|
|
2337
|
+
}
|
|
2257
2338
|
var EntryIndex = class extends EventTarget {
|
|
2258
2339
|
tree = ReadonlyTree.EMPTY;
|
|
2259
2340
|
initialSync;
|
|
@@ -2261,6 +2342,9 @@ var EntryIndex = class extends EventTarget {
|
|
|
2261
2342
|
#config;
|
|
2262
2343
|
#seeds;
|
|
2263
2344
|
#singleWorkspace;
|
|
2345
|
+
#references;
|
|
2346
|
+
#referencesBuild;
|
|
2347
|
+
#syncLimit = pLimit(1);
|
|
2264
2348
|
constructor(config) {
|
|
2265
2349
|
super();
|
|
2266
2350
|
this.#config = config;
|
|
@@ -2281,25 +2365,66 @@ var EntryIndex = class extends EventTarget {
|
|
|
2281
2365
|
findMany(filter) {
|
|
2282
2366
|
return this.graph.filter({ entry: filter });
|
|
2283
2367
|
}
|
|
2368
|
+
async referencesTo(query) {
|
|
2369
|
+
const references = await this.references;
|
|
2370
|
+
return references.referencesTo(query);
|
|
2371
|
+
}
|
|
2372
|
+
async referencesFrom(sourceId) {
|
|
2373
|
+
const references = await this.references;
|
|
2374
|
+
return references.referencesFrom(sourceId);
|
|
2375
|
+
}
|
|
2376
|
+
get references() {
|
|
2377
|
+
if (this.#references) return Promise.resolve(this.#references);
|
|
2378
|
+
this.#referencesBuild ??= EntryReferenceIndex.build(this.graph, {
|
|
2379
|
+
onProgress: (scan) => {
|
|
2380
|
+
this.dispatchEvent(new IndexEvent({ op: "references", ...scan }));
|
|
2381
|
+
}
|
|
2382
|
+
}).then((references) => {
|
|
2383
|
+
this.#references = references;
|
|
2384
|
+
return references;
|
|
2385
|
+
});
|
|
2386
|
+
return this.#referencesBuild;
|
|
2387
|
+
}
|
|
2388
|
+
async sync(source) {
|
|
2389
|
+
return this.#syncLimit(async () => {
|
|
2390
|
+
await this.syncWith(source);
|
|
2391
|
+
await this.seed(source);
|
|
2392
|
+
return this.sha;
|
|
2393
|
+
});
|
|
2394
|
+
}
|
|
2284
2395
|
async syncWith(source) {
|
|
2285
2396
|
const tree = await source.getTree();
|
|
2286
2397
|
if (!this.initialSync) this.initialSync = tree;
|
|
2287
2398
|
const batch = await bundleContents(source, this.tree.diff(tree));
|
|
2288
2399
|
if (batch.changes.length === 0) return tree.sha;
|
|
2289
|
-
return this.indexChanges(batch);
|
|
2400
|
+
return this.indexChanges(batch, tree);
|
|
2290
2401
|
}
|
|
2291
|
-
async indexChanges(batch) {
|
|
2402
|
+
async indexChanges(batch, targetTree) {
|
|
2292
2403
|
const { fromSha, changes } = batch;
|
|
2293
2404
|
if (fromSha !== this.tree.sha)
|
|
2294
2405
|
throw new ShaMismatchError(fromSha, this.tree.sha);
|
|
2295
2406
|
if (changes.length === 0) return this.tree.sha;
|
|
2407
|
+
if (this.#referencesBuild && !this.#references) await this.#referencesBuild;
|
|
2296
2408
|
const changed = /* @__PURE__ */ new Set();
|
|
2409
|
+
const previousRelations = /* @__PURE__ */ new Map();
|
|
2410
|
+
const nextRelations = /* @__PURE__ */ new Map();
|
|
2411
|
+
const affectedReferenceIds = /* @__PURE__ */ new Set();
|
|
2297
2412
|
for (const change of changes) {
|
|
2298
2413
|
if (change.op !== "delete") continue;
|
|
2299
2414
|
const nodePath = getNodePath(change.path);
|
|
2300
2415
|
const node = this.graph.byDir(nodePath);
|
|
2301
2416
|
assert(node, `Missing node for deleted path: ${change.path}`);
|
|
2302
2417
|
changed.add(node);
|
|
2418
|
+
previousRelations.set(node.id, entryRelation(node));
|
|
2419
|
+
}
|
|
2420
|
+
const references = this.#references;
|
|
2421
|
+
if (references) {
|
|
2422
|
+
for (const change of changes) {
|
|
2423
|
+
if (change.op !== "delete") continue;
|
|
2424
|
+
for (const id of references.removeFile(change.path)) {
|
|
2425
|
+
affectedReferenceIds.add(id);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2303
2428
|
}
|
|
2304
2429
|
this.graph = this.graph.withChanges(batch);
|
|
2305
2430
|
for (const change of changes) {
|
|
@@ -2308,19 +2433,37 @@ var EntryIndex = class extends EventTarget {
|
|
|
2308
2433
|
const node = this.graph.byDir(nodePath);
|
|
2309
2434
|
assert(node, `Missing node for added path: ${change.path}`);
|
|
2310
2435
|
changed.add(node);
|
|
2436
|
+
nextRelations.set(node.id, entryRelation(node));
|
|
2437
|
+
if (references) {
|
|
2438
|
+
const entry = this.graph.entryByFilePath(change.path);
|
|
2439
|
+
if (entry) {
|
|
2440
|
+
for (const id of references.replaceEntry(entry)) {
|
|
2441
|
+
affectedReferenceIds.add(id);
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2311
2445
|
}
|
|
2312
|
-
const updatedTree = await this.tree.withChanges(batch);
|
|
2446
|
+
const updatedTree = targetTree ?? await this.tree.withChanges(batch);
|
|
2313
2447
|
const sha = updatedTree.sha;
|
|
2314
2448
|
this.tree = updatedTree;
|
|
2449
|
+
const affectedParentIds = changedParentIds(previousRelations, nextRelations);
|
|
2450
|
+
const changedEntryIds = /* @__PURE__ */ new Set();
|
|
2315
2451
|
const pool = Array.from(changed);
|
|
2316
2452
|
while (pool.length > 0) {
|
|
2317
2453
|
const node = pool.shift();
|
|
2318
|
-
|
|
2454
|
+
changedEntryIds.add(node.id);
|
|
2319
2455
|
for (const child of node.children()) {
|
|
2320
|
-
if (!changed.has(child))
|
|
2456
|
+
if (!changed.has(child)) {
|
|
2457
|
+
changed.add(child);
|
|
2458
|
+
pool.push(child);
|
|
2459
|
+
}
|
|
2321
2460
|
}
|
|
2322
2461
|
}
|
|
2323
|
-
|
|
2462
|
+
for (const id of affectedParentIds) changedEntryIds.add(id);
|
|
2463
|
+
for (const id of affectedReferenceIds) changedEntryIds.add(id);
|
|
2464
|
+
this.dispatchEvent(
|
|
2465
|
+
new IndexEvent({ op: "index", sha, ids: Array.from(changedEntryIds) })
|
|
2466
|
+
);
|
|
2324
2467
|
return sha;
|
|
2325
2468
|
}
|
|
2326
2469
|
async seed(source) {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { EntryStatus } from 'alinea/core/Entry';
|
|
2
|
+
import type { Status } from 'alinea/core/Graph';
|
|
3
|
+
export type EntryReferenceLinkType = 'entry' | 'image' | 'file';
|
|
4
|
+
export interface EntryReferenceTarget {
|
|
5
|
+
targetId: string;
|
|
6
|
+
fieldPath: string;
|
|
7
|
+
fieldLabel?: string;
|
|
8
|
+
linkId?: string;
|
|
9
|
+
linkType?: EntryReferenceLinkType;
|
|
10
|
+
}
|
|
11
|
+
export interface EntryReference {
|
|
12
|
+
targetId: string;
|
|
13
|
+
sourceId: string;
|
|
14
|
+
sourceFilePath: string;
|
|
15
|
+
sourceType: string;
|
|
16
|
+
sourceLocale: string | null;
|
|
17
|
+
sourceStatus: EntryStatus;
|
|
18
|
+
sourceActive: boolean;
|
|
19
|
+
sourceMain: boolean;
|
|
20
|
+
fieldPath: string;
|
|
21
|
+
fieldLabel?: string;
|
|
22
|
+
linkId?: string;
|
|
23
|
+
linkType?: EntryReferenceLinkType;
|
|
24
|
+
}
|
|
25
|
+
export interface EntryReferenceQuery {
|
|
26
|
+
targetId: string;
|
|
27
|
+
status?: Status;
|
|
28
|
+
locale?: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface EntryReferenceResult {
|
|
31
|
+
references: Array<EntryReference>;
|
|
32
|
+
total: number;
|
|
33
|
+
scan: EntryReferenceScan;
|
|
34
|
+
}
|
|
35
|
+
export interface FieldReferenceContext {
|
|
36
|
+
path: Array<string>;
|
|
37
|
+
label?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function referenceFieldPath(path: Array<string>): string;
|
|
40
|
+
export interface EntryReferenceScan {
|
|
41
|
+
scanned: number;
|
|
42
|
+
total: number;
|
|
43
|
+
complete: boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Config } from 'alinea/core/Config';
|
|
2
|
+
import type { EntryCondition } from 'alinea/core/db/EntryIndex';
|
|
3
|
+
import { type EntryReference, type EntryReferenceQuery, type EntryReferenceResult, type EntryReferenceScan } from 'alinea/core/db/EntryReference';
|
|
4
|
+
import type { Entry } from 'alinea/core/Entry';
|
|
5
|
+
export interface EntryReferenceGraph {
|
|
6
|
+
config: Config;
|
|
7
|
+
filter(filter: EntryCondition): Iterable<Entry>;
|
|
8
|
+
}
|
|
9
|
+
export interface EntryReferenceBuildOptions {
|
|
10
|
+
onProgress?: (scan: EntryReferenceScan) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class EntryReferenceIndex {
|
|
13
|
+
#private;
|
|
14
|
+
static build(graph: EntryReferenceGraph, options?: EntryReferenceBuildOptions): Promise<EntryReferenceIndex>;
|
|
15
|
+
constructor(config: Config);
|
|
16
|
+
referencesTo(query: EntryReferenceQuery): EntryReferenceResult;
|
|
17
|
+
referencesFrom(sourceId: string): Array<EntryReference>;
|
|
18
|
+
replaceEntry(entry: Entry): Set<string>;
|
|
19
|
+
removeFile(filePath: string): Set<string>;
|
|
20
|
+
replaceFile(filePath: string, references: Array<EntryReference>): Set<string>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import "../../chunks/chunk-CQ52GEHY.js";
|
|
2
|
+
|
|
3
|
+
// src/core/db/EntryReferenceIndex.ts
|
|
4
|
+
import { Type } from "alinea/core/Type";
|
|
5
|
+
var EntryReferenceIndex = class _EntryReferenceIndex {
|
|
6
|
+
#config;
|
|
7
|
+
#refsByFilePath = /* @__PURE__ */ new Map();
|
|
8
|
+
#refsBySourceId = /* @__PURE__ */ new Map();
|
|
9
|
+
#refsByTargetId = /* @__PURE__ */ new Map();
|
|
10
|
+
#indexedFilePaths = /* @__PURE__ */ new Set();
|
|
11
|
+
static async build(graph, options = {}) {
|
|
12
|
+
const index = new _EntryReferenceIndex(graph.config);
|
|
13
|
+
const entries = Array.from(graph.filter({}));
|
|
14
|
+
let scanned = 0;
|
|
15
|
+
options.onProgress?.({
|
|
16
|
+
scanned,
|
|
17
|
+
total: entries.length,
|
|
18
|
+
complete: entries.length === 0
|
|
19
|
+
});
|
|
20
|
+
for (const entry of entries) {
|
|
21
|
+
index.replaceEntry(entry);
|
|
22
|
+
scanned += 1;
|
|
23
|
+
options.onProgress?.({
|
|
24
|
+
scanned,
|
|
25
|
+
total: entries.length,
|
|
26
|
+
complete: scanned === entries.length
|
|
27
|
+
});
|
|
28
|
+
if (scanned % 100 === 0) await Promise.resolve();
|
|
29
|
+
}
|
|
30
|
+
return index;
|
|
31
|
+
}
|
|
32
|
+
constructor(config) {
|
|
33
|
+
this.#config = config;
|
|
34
|
+
}
|
|
35
|
+
referencesTo(query) {
|
|
36
|
+
const all = this.#refsByTargetId.get(query.targetId) ?? [];
|
|
37
|
+
const filtered = all.filter((ref) => matchesReferenceQuery(ref, query));
|
|
38
|
+
return {
|
|
39
|
+
references: filtered,
|
|
40
|
+
total: filtered.length,
|
|
41
|
+
scan: {
|
|
42
|
+
scanned: this.#indexedFilePaths.size,
|
|
43
|
+
total: this.#indexedFilePaths.size,
|
|
44
|
+
complete: true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
referencesFrom(sourceId) {
|
|
49
|
+
return [...this.#refsBySourceId.get(sourceId) ?? []];
|
|
50
|
+
}
|
|
51
|
+
replaceEntry(entry) {
|
|
52
|
+
this.#indexedFilePaths.add(entry.filePath);
|
|
53
|
+
return this.replaceFile(
|
|
54
|
+
entry.filePath,
|
|
55
|
+
entryReferences(this.#config, entry)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
removeFile(filePath) {
|
|
59
|
+
this.#indexedFilePaths.delete(filePath);
|
|
60
|
+
return this.replaceFile(filePath, []);
|
|
61
|
+
}
|
|
62
|
+
replaceFile(filePath, references) {
|
|
63
|
+
const affected = /* @__PURE__ */ new Set();
|
|
64
|
+
const previous = this.#refsByFilePath.get(filePath) ?? [];
|
|
65
|
+
for (const reference of previous) {
|
|
66
|
+
affected.add(reference.targetId);
|
|
67
|
+
removeReference(this.#refsBySourceId, reference.sourceId, reference);
|
|
68
|
+
removeReference(this.#refsByTargetId, reference.targetId, reference);
|
|
69
|
+
}
|
|
70
|
+
if (references.length > 0) this.#refsByFilePath.set(filePath, references);
|
|
71
|
+
else this.#refsByFilePath.delete(filePath);
|
|
72
|
+
for (const reference of references) {
|
|
73
|
+
affected.add(reference.targetId);
|
|
74
|
+
addReference(this.#refsBySourceId, reference.sourceId, reference);
|
|
75
|
+
addReference(this.#refsByTargetId, reference.targetId, reference);
|
|
76
|
+
}
|
|
77
|
+
return affected;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
function entryReferences(config, entry) {
|
|
81
|
+
const type = config.schema[entry.type];
|
|
82
|
+
if (!type) return [];
|
|
83
|
+
return Type.references(type, entry.data).map((target) => {
|
|
84
|
+
return entryReference(entry, target);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function entryReference(entry, target) {
|
|
88
|
+
return {
|
|
89
|
+
...target,
|
|
90
|
+
sourceId: entry.id,
|
|
91
|
+
sourceFilePath: entry.filePath,
|
|
92
|
+
sourceType: entry.type,
|
|
93
|
+
sourceLocale: entry.locale,
|
|
94
|
+
sourceStatus: entry.status,
|
|
95
|
+
sourceActive: entry.active,
|
|
96
|
+
sourceMain: entry.main
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function addReference(map, key, reference) {
|
|
100
|
+
const references = map.get(key);
|
|
101
|
+
if (references) references.push(reference);
|
|
102
|
+
else map.set(key, [reference]);
|
|
103
|
+
}
|
|
104
|
+
function removeReference(map, key, reference) {
|
|
105
|
+
const current = map.get(key);
|
|
106
|
+
if (!current) return;
|
|
107
|
+
const next = current.filter((item) => item !== reference);
|
|
108
|
+
if (next.length > 0) map.set(key, next);
|
|
109
|
+
else map.delete(key);
|
|
110
|
+
}
|
|
111
|
+
function matchesReferenceQuery(reference, query) {
|
|
112
|
+
if (query.locale !== void 0 && reference.sourceLocale !== query.locale)
|
|
113
|
+
return false;
|
|
114
|
+
switch (query.status ?? "published") {
|
|
115
|
+
case "published":
|
|
116
|
+
return reference.sourceStatus === "published";
|
|
117
|
+
case "draft":
|
|
118
|
+
return reference.sourceStatus === "draft";
|
|
119
|
+
case "archived":
|
|
120
|
+
return reference.sourceStatus === "archived";
|
|
121
|
+
case "preferDraft":
|
|
122
|
+
return reference.sourceActive;
|
|
123
|
+
case "preferPublished":
|
|
124
|
+
return reference.sourceMain;
|
|
125
|
+
case "all":
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
EntryReferenceIndex
|
|
131
|
+
};
|