alinea 1.7.0 → 2.0.0-preview.0
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 +208 -560
- 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 +125 -17
- 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.js +32 -6
- 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 +8233 -8178
- package/dist/chunks/chunk-53DZYORR.js +3705 -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-EQ3TDHYD.js +79 -0
- package/dist/chunks/chunk-F36YGSHN.js +335 -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 +1 -1
- 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/ExternalPlugin.js +595 -486
- 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 +10 -4
- package/dist/cloud/CloudRemote.js +56 -9
- 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/CMS.js +1 -1
- package/dist/core/Client.d.ts +11 -7
- package/dist/core/Client.js +53 -10
- package/dist/core/Config.d.ts +2 -0
- package/dist/core/Config.js +1 -3
- package/dist/core/Connection.d.ts +28 -9
- 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 +15 -6
- 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 +7 -0
- package/dist/core/db/EntryIndex.js +168 -26
- 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 +395 -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 +4 -2
- package/dist/core/db/LocalDB.js +8 -6
- 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 +325 -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 +39 -0
- package/dist/core/media/MediaLocation.js +55 -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 +33 -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.js +1 -1
- package/dist/core/source/FSSource.d.ts +3 -2
- package/dist/core/source/FSSource.js +25 -12
- 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 +1 -0
- package/dist/core/source/GithubSource.js +17 -4
- package/dist/core/source/IndexedDBSource.js +23 -11
- package/dist/core/source/MemorySource.js +1 -1
- package/dist/core/source/ShaMismatchError.js +3 -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.js +1 -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 +0 -1
- package/dist/core/util/EntryFilenames.js +2 -6
- 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 +804 -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 +497 -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 +5 -0
- package/dist/dashboard/app/editor/FileEditor.js +190 -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 +354 -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 +223 -0
- package/dist/dashboard/atoms/entry.js +609 -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 +88 -0
- package/dist/dashboard/atoms/root.js +444 -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 +5 -5
- package/dist/field/link/FileLink.js +7 -3
- package/dist/field/link/ImageLink.d.ts +4 -2
- package/dist/field/link/ImageLink.js +4 -1
- 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 +1444 -362
- 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 +7034 -3625
- 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 +97 -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 +237 -10
- 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/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
|
@@ -0,0 +1,1187 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Editor
|
|
3
|
+
} from "./chunk-TL7ZW6BX.js";
|
|
4
|
+
import {
|
|
5
|
+
require_shim
|
|
6
|
+
} from "./chunk-RKDPDEF7.js";
|
|
7
|
+
import {
|
|
8
|
+
__commonJS,
|
|
9
|
+
__toESM
|
|
10
|
+
} from "./chunk-CQ52GEHY.js";
|
|
11
|
+
|
|
12
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
13
|
+
import __import_react from "react";
|
|
14
|
+
var require_with_selector_production = __commonJS({
|
|
15
|
+
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js"(exports) {
|
|
16
|
+
var React2 = __import_react;
|
|
17
|
+
var shim = require_shim();
|
|
18
|
+
function is(x, y) {
|
|
19
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
20
|
+
}
|
|
21
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
22
|
+
var useSyncExternalStore3 = shim.useSyncExternalStore;
|
|
23
|
+
var useRef2 = React2.useRef;
|
|
24
|
+
var useEffect3 = React2.useEffect;
|
|
25
|
+
var useMemo3 = React2.useMemo;
|
|
26
|
+
var useDebugValue3 = React2.useDebugValue;
|
|
27
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
28
|
+
var instRef = useRef2(null);
|
|
29
|
+
if (null === instRef.current) {
|
|
30
|
+
var inst = { hasValue: false, value: null };
|
|
31
|
+
instRef.current = inst;
|
|
32
|
+
} else inst = instRef.current;
|
|
33
|
+
instRef = useMemo3(
|
|
34
|
+
function() {
|
|
35
|
+
function memoizedSelector(nextSnapshot) {
|
|
36
|
+
if (!hasMemo) {
|
|
37
|
+
hasMemo = true;
|
|
38
|
+
memoizedSnapshot = nextSnapshot;
|
|
39
|
+
nextSnapshot = selector(nextSnapshot);
|
|
40
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
41
|
+
var currentSelection = inst.value;
|
|
42
|
+
if (isEqual(currentSelection, nextSnapshot))
|
|
43
|
+
return memoizedSelection = currentSelection;
|
|
44
|
+
}
|
|
45
|
+
return memoizedSelection = nextSnapshot;
|
|
46
|
+
}
|
|
47
|
+
currentSelection = memoizedSelection;
|
|
48
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
49
|
+
var nextSelection = selector(nextSnapshot);
|
|
50
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
51
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
52
|
+
memoizedSnapshot = nextSnapshot;
|
|
53
|
+
return memoizedSelection = nextSelection;
|
|
54
|
+
}
|
|
55
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
56
|
+
return [
|
|
57
|
+
function() {
|
|
58
|
+
return memoizedSelector(getSnapshot());
|
|
59
|
+
},
|
|
60
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
61
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
},
|
|
65
|
+
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
66
|
+
);
|
|
67
|
+
var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
|
|
68
|
+
useEffect3(
|
|
69
|
+
function() {
|
|
70
|
+
inst.hasValue = true;
|
|
71
|
+
inst.value = value;
|
|
72
|
+
},
|
|
73
|
+
[value]
|
|
74
|
+
);
|
|
75
|
+
useDebugValue3(value);
|
|
76
|
+
return value;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
82
|
+
import __import_react2 from "react";
|
|
83
|
+
var require_with_selector_development = __commonJS({
|
|
84
|
+
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
|
|
85
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
86
|
+
function is(x, y) {
|
|
87
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
88
|
+
}
|
|
89
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
90
|
+
var React2 = __import_react2, shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef2 = React2.useRef, useEffect3 = React2.useEffect, useMemo3 = React2.useMemo, useDebugValue3 = React2.useDebugValue;
|
|
91
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
92
|
+
var instRef = useRef2(null);
|
|
93
|
+
if (null === instRef.current) {
|
|
94
|
+
var inst = { hasValue: false, value: null };
|
|
95
|
+
instRef.current = inst;
|
|
96
|
+
} else inst = instRef.current;
|
|
97
|
+
instRef = useMemo3(
|
|
98
|
+
function() {
|
|
99
|
+
function memoizedSelector(nextSnapshot) {
|
|
100
|
+
if (!hasMemo) {
|
|
101
|
+
hasMemo = true;
|
|
102
|
+
memoizedSnapshot = nextSnapshot;
|
|
103
|
+
nextSnapshot = selector(nextSnapshot);
|
|
104
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
105
|
+
var currentSelection = inst.value;
|
|
106
|
+
if (isEqual(currentSelection, nextSnapshot))
|
|
107
|
+
return memoizedSelection = currentSelection;
|
|
108
|
+
}
|
|
109
|
+
return memoizedSelection = nextSnapshot;
|
|
110
|
+
}
|
|
111
|
+
currentSelection = memoizedSelection;
|
|
112
|
+
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
113
|
+
return currentSelection;
|
|
114
|
+
var nextSelection = selector(nextSnapshot);
|
|
115
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
116
|
+
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
117
|
+
memoizedSnapshot = nextSnapshot;
|
|
118
|
+
return memoizedSelection = nextSelection;
|
|
119
|
+
}
|
|
120
|
+
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
121
|
+
return [
|
|
122
|
+
function() {
|
|
123
|
+
return memoizedSelector(getSnapshot());
|
|
124
|
+
},
|
|
125
|
+
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
126
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
},
|
|
130
|
+
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
131
|
+
);
|
|
132
|
+
var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
|
|
133
|
+
useEffect3(
|
|
134
|
+
function() {
|
|
135
|
+
inst.hasValue = true;
|
|
136
|
+
inst.value = value;
|
|
137
|
+
},
|
|
138
|
+
[value]
|
|
139
|
+
);
|
|
140
|
+
useDebugValue3(value);
|
|
141
|
+
return value;
|
|
142
|
+
};
|
|
143
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
144
|
+
})();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// node_modules/use-sync-external-store/shim/with-selector.js
|
|
149
|
+
var require_with_selector = __commonJS({
|
|
150
|
+
"node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
|
|
151
|
+
"use strict";
|
|
152
|
+
if (process.env.NODE_ENV === "production") {
|
|
153
|
+
module.exports = require_with_selector_production();
|
|
154
|
+
} else {
|
|
155
|
+
module.exports = require_with_selector_development();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// node_modules/@tiptap/react/dist/index.js
|
|
161
|
+
var import_shim = __toESM(require_shim(), 1);
|
|
162
|
+
import { createContext, useContext, useMemo } from "react";
|
|
163
|
+
import React, { forwardRef } from "react";
|
|
164
|
+
import ReactDOM from "react-dom";
|
|
165
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
166
|
+
var import_shim2 = __toESM(require_shim(), 1);
|
|
167
|
+
import { useDebugValue as useDebugValue2, useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
168
|
+
|
|
169
|
+
// node_modules/fast-equals/dist/es/index.mjs
|
|
170
|
+
var { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
171
|
+
var { hasOwnProperty } = Object.prototype;
|
|
172
|
+
function combineComparators(comparatorA, comparatorB) {
|
|
173
|
+
return function isEqual(a, b, state) {
|
|
174
|
+
return comparatorA(a, b, state) && comparatorB(a, b, state);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function createIsCircular(areItemsEqual) {
|
|
178
|
+
return function isCircular(a, b, state) {
|
|
179
|
+
if (!a || !b || typeof a !== "object" || typeof b !== "object") {
|
|
180
|
+
return areItemsEqual(a, b, state);
|
|
181
|
+
}
|
|
182
|
+
const { cache } = state;
|
|
183
|
+
const cachedA = cache.get(a);
|
|
184
|
+
const cachedB = cache.get(b);
|
|
185
|
+
if (cachedA && cachedB) {
|
|
186
|
+
return cachedA === b && cachedB === a;
|
|
187
|
+
}
|
|
188
|
+
cache.set(a, b);
|
|
189
|
+
cache.set(b, a);
|
|
190
|
+
const result = areItemsEqual(a, b, state);
|
|
191
|
+
cache.delete(a);
|
|
192
|
+
cache.delete(b);
|
|
193
|
+
return result;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function getShortTag(value) {
|
|
197
|
+
return value != null ? value[Symbol.toStringTag] : void 0;
|
|
198
|
+
}
|
|
199
|
+
function getStrictProperties(object) {
|
|
200
|
+
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
|
201
|
+
}
|
|
202
|
+
var hasOwn = (
|
|
203
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
204
|
+
Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property))
|
|
205
|
+
);
|
|
206
|
+
function sameValueZeroEqual(a, b) {
|
|
207
|
+
return a === b || !a && !b && a !== a && b !== b;
|
|
208
|
+
}
|
|
209
|
+
var PREACT_VNODE = "__v";
|
|
210
|
+
var PREACT_OWNER = "__o";
|
|
211
|
+
var REACT_OWNER = "_owner";
|
|
212
|
+
var { getOwnPropertyDescriptor, keys } = Object;
|
|
213
|
+
function areArrayBuffersEqual(a, b) {
|
|
214
|
+
return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b));
|
|
215
|
+
}
|
|
216
|
+
function areArraysEqual(a, b, state) {
|
|
217
|
+
let index = a.length;
|
|
218
|
+
if (b.length !== index) {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
while (index-- > 0) {
|
|
222
|
+
if (!state.equals(a[index], b[index], index, index, a, b, state)) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
function areDataViewsEqual(a, b) {
|
|
229
|
+
return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength));
|
|
230
|
+
}
|
|
231
|
+
function areDatesEqual(a, b) {
|
|
232
|
+
return sameValueZeroEqual(a.getTime(), b.getTime());
|
|
233
|
+
}
|
|
234
|
+
function areErrorsEqual(a, b) {
|
|
235
|
+
return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;
|
|
236
|
+
}
|
|
237
|
+
function areFunctionsEqual(a, b) {
|
|
238
|
+
return a === b;
|
|
239
|
+
}
|
|
240
|
+
function areMapsEqual(a, b, state) {
|
|
241
|
+
const size = a.size;
|
|
242
|
+
if (size !== b.size) {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
if (!size) {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
const matchedIndices = new Array(size);
|
|
249
|
+
const aIterable = a.entries();
|
|
250
|
+
let aResult;
|
|
251
|
+
let bResult;
|
|
252
|
+
let index = 0;
|
|
253
|
+
while (aResult = aIterable.next()) {
|
|
254
|
+
if (aResult.done) {
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
const bIterable = b.entries();
|
|
258
|
+
let hasMatch = false;
|
|
259
|
+
let matchIndex = 0;
|
|
260
|
+
while (bResult = bIterable.next()) {
|
|
261
|
+
if (bResult.done) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
if (matchedIndices[matchIndex]) {
|
|
265
|
+
matchIndex++;
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
const aEntry = aResult.value;
|
|
269
|
+
const bEntry = bResult.value;
|
|
270
|
+
if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
|
|
271
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
matchIndex++;
|
|
275
|
+
}
|
|
276
|
+
if (!hasMatch) {
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
index++;
|
|
280
|
+
}
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
283
|
+
var areNumbersEqual = sameValueZeroEqual;
|
|
284
|
+
function areObjectsEqual(a, b, state) {
|
|
285
|
+
const properties = keys(a);
|
|
286
|
+
let index = properties.length;
|
|
287
|
+
if (keys(b).length !== index) {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
while (index-- > 0) {
|
|
291
|
+
if (!isPropertyEqual(a, b, state, properties[index])) {
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
function areObjectsEqualStrict(a, b, state) {
|
|
298
|
+
const properties = getStrictProperties(a);
|
|
299
|
+
let index = properties.length;
|
|
300
|
+
if (getStrictProperties(b).length !== index) {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
let property;
|
|
304
|
+
let descriptorA;
|
|
305
|
+
let descriptorB;
|
|
306
|
+
while (index-- > 0) {
|
|
307
|
+
property = properties[index];
|
|
308
|
+
if (!isPropertyEqual(a, b, state, property)) {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
descriptorA = getOwnPropertyDescriptor(a, property);
|
|
312
|
+
descriptorB = getOwnPropertyDescriptor(b, property);
|
|
313
|
+
if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
function arePrimitiveWrappersEqual(a, b) {
|
|
320
|
+
return sameValueZeroEqual(a.valueOf(), b.valueOf());
|
|
321
|
+
}
|
|
322
|
+
function areRegExpsEqual(a, b) {
|
|
323
|
+
return a.source === b.source && a.flags === b.flags;
|
|
324
|
+
}
|
|
325
|
+
function areSetsEqual(a, b, state) {
|
|
326
|
+
const size = a.size;
|
|
327
|
+
if (size !== b.size) {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
if (!size) {
|
|
331
|
+
return true;
|
|
332
|
+
}
|
|
333
|
+
const matchedIndices = new Array(size);
|
|
334
|
+
const aIterable = a.values();
|
|
335
|
+
let aResult;
|
|
336
|
+
let bResult;
|
|
337
|
+
while (aResult = aIterable.next()) {
|
|
338
|
+
if (aResult.done) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
const bIterable = b.values();
|
|
342
|
+
let hasMatch = false;
|
|
343
|
+
let matchIndex = 0;
|
|
344
|
+
while (bResult = bIterable.next()) {
|
|
345
|
+
if (bResult.done) {
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
|
|
349
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
matchIndex++;
|
|
353
|
+
}
|
|
354
|
+
if (!hasMatch) {
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
function areTypedArraysEqual(a, b) {
|
|
361
|
+
let index = a.byteLength;
|
|
362
|
+
if (b.byteLength !== index || a.byteOffset !== b.byteOffset) {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
while (index-- > 0) {
|
|
366
|
+
if (a[index] !== b[index]) {
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
function areUrlsEqual(a, b) {
|
|
373
|
+
return a.hostname === b.hostname && a.pathname === b.pathname && a.protocol === b.protocol && a.port === b.port && a.hash === b.hash && a.username === b.username && a.password === b.password;
|
|
374
|
+
}
|
|
375
|
+
function isPropertyEqual(a, b, state, property) {
|
|
376
|
+
if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) {
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
|
|
380
|
+
}
|
|
381
|
+
var ARRAY_BUFFER_TAG = "[object ArrayBuffer]";
|
|
382
|
+
var ARGUMENTS_TAG = "[object Arguments]";
|
|
383
|
+
var BOOLEAN_TAG = "[object Boolean]";
|
|
384
|
+
var DATA_VIEW_TAG = "[object DataView]";
|
|
385
|
+
var DATE_TAG = "[object Date]";
|
|
386
|
+
var ERROR_TAG = "[object Error]";
|
|
387
|
+
var MAP_TAG = "[object Map]";
|
|
388
|
+
var NUMBER_TAG = "[object Number]";
|
|
389
|
+
var OBJECT_TAG = "[object Object]";
|
|
390
|
+
var REG_EXP_TAG = "[object RegExp]";
|
|
391
|
+
var SET_TAG = "[object Set]";
|
|
392
|
+
var STRING_TAG = "[object String]";
|
|
393
|
+
var TYPED_ARRAY_TAGS = {
|
|
394
|
+
"[object Int8Array]": true,
|
|
395
|
+
"[object Uint8Array]": true,
|
|
396
|
+
"[object Uint8ClampedArray]": true,
|
|
397
|
+
"[object Int16Array]": true,
|
|
398
|
+
"[object Uint16Array]": true,
|
|
399
|
+
"[object Int32Array]": true,
|
|
400
|
+
"[object Uint32Array]": true,
|
|
401
|
+
"[object Float16Array]": true,
|
|
402
|
+
"[object Float32Array]": true,
|
|
403
|
+
"[object Float64Array]": true,
|
|
404
|
+
"[object BigInt64Array]": true,
|
|
405
|
+
"[object BigUint64Array]": true
|
|
406
|
+
};
|
|
407
|
+
var URL_TAG = "[object URL]";
|
|
408
|
+
var toString = Object.prototype.toString;
|
|
409
|
+
function createEqualityComparator({ areArrayBuffersEqual: areArrayBuffersEqual2, areArraysEqual: areArraysEqual2, areDataViewsEqual: areDataViewsEqual2, areDatesEqual: areDatesEqual2, areErrorsEqual: areErrorsEqual2, areFunctionsEqual: areFunctionsEqual2, areMapsEqual: areMapsEqual2, areNumbersEqual: areNumbersEqual2, areObjectsEqual: areObjectsEqual2, arePrimitiveWrappersEqual: arePrimitiveWrappersEqual2, areRegExpsEqual: areRegExpsEqual2, areSetsEqual: areSetsEqual2, areTypedArraysEqual: areTypedArraysEqual2, areUrlsEqual: areUrlsEqual2, unknownTagComparators }) {
|
|
410
|
+
return function comparator(a, b, state) {
|
|
411
|
+
if (a === b) {
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
if (a == null || b == null) {
|
|
415
|
+
return false;
|
|
416
|
+
}
|
|
417
|
+
const type = typeof a;
|
|
418
|
+
if (type !== typeof b) {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
if (type !== "object") {
|
|
422
|
+
if (type === "number") {
|
|
423
|
+
return areNumbersEqual2(a, b, state);
|
|
424
|
+
}
|
|
425
|
+
if (type === "function") {
|
|
426
|
+
return areFunctionsEqual2(a, b, state);
|
|
427
|
+
}
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
const constructor = a.constructor;
|
|
431
|
+
if (constructor !== b.constructor) {
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
if (constructor === Object) {
|
|
435
|
+
return areObjectsEqual2(a, b, state);
|
|
436
|
+
}
|
|
437
|
+
if (Array.isArray(a)) {
|
|
438
|
+
return areArraysEqual2(a, b, state);
|
|
439
|
+
}
|
|
440
|
+
if (constructor === Date) {
|
|
441
|
+
return areDatesEqual2(a, b, state);
|
|
442
|
+
}
|
|
443
|
+
if (constructor === RegExp) {
|
|
444
|
+
return areRegExpsEqual2(a, b, state);
|
|
445
|
+
}
|
|
446
|
+
if (constructor === Map) {
|
|
447
|
+
return areMapsEqual2(a, b, state);
|
|
448
|
+
}
|
|
449
|
+
if (constructor === Set) {
|
|
450
|
+
return areSetsEqual2(a, b, state);
|
|
451
|
+
}
|
|
452
|
+
const tag = toString.call(a);
|
|
453
|
+
if (tag === DATE_TAG) {
|
|
454
|
+
return areDatesEqual2(a, b, state);
|
|
455
|
+
}
|
|
456
|
+
if (tag === REG_EXP_TAG) {
|
|
457
|
+
return areRegExpsEqual2(a, b, state);
|
|
458
|
+
}
|
|
459
|
+
if (tag === MAP_TAG) {
|
|
460
|
+
return areMapsEqual2(a, b, state);
|
|
461
|
+
}
|
|
462
|
+
if (tag === SET_TAG) {
|
|
463
|
+
return areSetsEqual2(a, b, state);
|
|
464
|
+
}
|
|
465
|
+
if (tag === OBJECT_TAG) {
|
|
466
|
+
return typeof a.then !== "function" && typeof b.then !== "function" && areObjectsEqual2(a, b, state);
|
|
467
|
+
}
|
|
468
|
+
if (tag === URL_TAG) {
|
|
469
|
+
return areUrlsEqual2(a, b, state);
|
|
470
|
+
}
|
|
471
|
+
if (tag === ERROR_TAG) {
|
|
472
|
+
return areErrorsEqual2(a, b, state);
|
|
473
|
+
}
|
|
474
|
+
if (tag === ARGUMENTS_TAG) {
|
|
475
|
+
return areObjectsEqual2(a, b, state);
|
|
476
|
+
}
|
|
477
|
+
if (TYPED_ARRAY_TAGS[tag]) {
|
|
478
|
+
return areTypedArraysEqual2(a, b, state);
|
|
479
|
+
}
|
|
480
|
+
if (tag === ARRAY_BUFFER_TAG) {
|
|
481
|
+
return areArrayBuffersEqual2(a, b, state);
|
|
482
|
+
}
|
|
483
|
+
if (tag === DATA_VIEW_TAG) {
|
|
484
|
+
return areDataViewsEqual2(a, b, state);
|
|
485
|
+
}
|
|
486
|
+
if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
|
|
487
|
+
return arePrimitiveWrappersEqual2(a, b, state);
|
|
488
|
+
}
|
|
489
|
+
if (unknownTagComparators) {
|
|
490
|
+
let unknownTagComparator = unknownTagComparators[tag];
|
|
491
|
+
if (!unknownTagComparator) {
|
|
492
|
+
const shortTag = getShortTag(a);
|
|
493
|
+
if (shortTag) {
|
|
494
|
+
unknownTagComparator = unknownTagComparators[shortTag];
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (unknownTagComparator) {
|
|
498
|
+
return unknownTagComparator(a, b, state);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return false;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function createEqualityComparatorConfig({ circular, createCustomConfig, strict }) {
|
|
505
|
+
let config = {
|
|
506
|
+
areArrayBuffersEqual,
|
|
507
|
+
areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
|
|
508
|
+
areDataViewsEqual,
|
|
509
|
+
areDatesEqual,
|
|
510
|
+
areErrorsEqual,
|
|
511
|
+
areFunctionsEqual,
|
|
512
|
+
areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
|
|
513
|
+
areNumbersEqual,
|
|
514
|
+
areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
|
|
515
|
+
arePrimitiveWrappersEqual,
|
|
516
|
+
areRegExpsEqual,
|
|
517
|
+
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
|
|
518
|
+
areTypedArraysEqual: strict ? combineComparators(areTypedArraysEqual, areObjectsEqualStrict) : areTypedArraysEqual,
|
|
519
|
+
areUrlsEqual,
|
|
520
|
+
unknownTagComparators: void 0
|
|
521
|
+
};
|
|
522
|
+
if (createCustomConfig) {
|
|
523
|
+
config = Object.assign({}, config, createCustomConfig(config));
|
|
524
|
+
}
|
|
525
|
+
if (circular) {
|
|
526
|
+
const areArraysEqual2 = createIsCircular(config.areArraysEqual);
|
|
527
|
+
const areMapsEqual2 = createIsCircular(config.areMapsEqual);
|
|
528
|
+
const areObjectsEqual2 = createIsCircular(config.areObjectsEqual);
|
|
529
|
+
const areSetsEqual2 = createIsCircular(config.areSetsEqual);
|
|
530
|
+
config = Object.assign({}, config, {
|
|
531
|
+
areArraysEqual: areArraysEqual2,
|
|
532
|
+
areMapsEqual: areMapsEqual2,
|
|
533
|
+
areObjectsEqual: areObjectsEqual2,
|
|
534
|
+
areSetsEqual: areSetsEqual2
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
return config;
|
|
538
|
+
}
|
|
539
|
+
function createInternalEqualityComparator(compare) {
|
|
540
|
+
return function(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {
|
|
541
|
+
return compare(a, b, state);
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
function createIsEqual({ circular, comparator, createState, equals, strict }) {
|
|
545
|
+
if (createState) {
|
|
546
|
+
return function isEqual(a, b) {
|
|
547
|
+
const { cache = circular ? /* @__PURE__ */ new WeakMap() : void 0, meta } = createState();
|
|
548
|
+
return comparator(a, b, {
|
|
549
|
+
cache,
|
|
550
|
+
equals,
|
|
551
|
+
meta,
|
|
552
|
+
strict
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
if (circular) {
|
|
557
|
+
return function isEqual(a, b) {
|
|
558
|
+
return comparator(a, b, {
|
|
559
|
+
cache: /* @__PURE__ */ new WeakMap(),
|
|
560
|
+
equals,
|
|
561
|
+
meta: void 0,
|
|
562
|
+
strict
|
|
563
|
+
});
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
const state = {
|
|
567
|
+
cache: void 0,
|
|
568
|
+
equals,
|
|
569
|
+
meta: void 0,
|
|
570
|
+
strict
|
|
571
|
+
};
|
|
572
|
+
return function isEqual(a, b) {
|
|
573
|
+
return comparator(a, b, state);
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
var deepEqual = createCustomEqual();
|
|
577
|
+
var strictDeepEqual = createCustomEqual({ strict: true });
|
|
578
|
+
var circularDeepEqual = createCustomEqual({ circular: true });
|
|
579
|
+
var strictCircularDeepEqual = createCustomEqual({
|
|
580
|
+
circular: true,
|
|
581
|
+
strict: true
|
|
582
|
+
});
|
|
583
|
+
var shallowEqual = createCustomEqual({
|
|
584
|
+
createInternalComparator: () => sameValueZeroEqual
|
|
585
|
+
});
|
|
586
|
+
var strictShallowEqual = createCustomEqual({
|
|
587
|
+
strict: true,
|
|
588
|
+
createInternalComparator: () => sameValueZeroEqual
|
|
589
|
+
});
|
|
590
|
+
var circularShallowEqual = createCustomEqual({
|
|
591
|
+
circular: true,
|
|
592
|
+
createInternalComparator: () => sameValueZeroEqual
|
|
593
|
+
});
|
|
594
|
+
var strictCircularShallowEqual = createCustomEqual({
|
|
595
|
+
circular: true,
|
|
596
|
+
createInternalComparator: () => sameValueZeroEqual,
|
|
597
|
+
strict: true
|
|
598
|
+
});
|
|
599
|
+
function createCustomEqual(options = {}) {
|
|
600
|
+
const { circular = false, createInternalComparator: createCustomInternalComparator, createState, strict = false } = options;
|
|
601
|
+
const config = createEqualityComparatorConfig(options);
|
|
602
|
+
const comparator = createEqualityComparator(config);
|
|
603
|
+
const equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
|
|
604
|
+
return createIsEqual({ circular, comparator, createState, equals, strict });
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// node_modules/@tiptap/react/dist/index.js
|
|
608
|
+
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
609
|
+
import { useDebugValue, useEffect, useLayoutEffect, useState } from "react";
|
|
610
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
611
|
+
import { createContext as createContext2, createElement, useContext as useContext2 } from "react";
|
|
612
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
613
|
+
import React3 from "react";
|
|
614
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
615
|
+
import React4 from "react";
|
|
616
|
+
import { version as reactVersion } from "react";
|
|
617
|
+
import { flushSync } from "react-dom";
|
|
618
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
619
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
620
|
+
import { createElement as createElement2, createRef, memo } from "react";
|
|
621
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
622
|
+
import { createContext as createContext3, useContext as useContext3, useMemo as useMemo2 } from "react";
|
|
623
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
624
|
+
var mergeRefs = (...refs) => {
|
|
625
|
+
return (node) => {
|
|
626
|
+
refs.forEach((ref) => {
|
|
627
|
+
if (typeof ref === "function") {
|
|
628
|
+
ref(node);
|
|
629
|
+
} else if (ref) {
|
|
630
|
+
;
|
|
631
|
+
ref.current = node;
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
var Portals = ({ contentComponent }) => {
|
|
637
|
+
const renderers = (0, import_shim.useSyncExternalStore)(
|
|
638
|
+
contentComponent.subscribe,
|
|
639
|
+
contentComponent.getSnapshot,
|
|
640
|
+
contentComponent.getServerSnapshot
|
|
641
|
+
);
|
|
642
|
+
return /* @__PURE__ */ jsx(Fragment, { children: Object.values(renderers) });
|
|
643
|
+
};
|
|
644
|
+
function getInstance() {
|
|
645
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
646
|
+
let renderers = {};
|
|
647
|
+
return {
|
|
648
|
+
/**
|
|
649
|
+
* Subscribe to the editor instance's changes.
|
|
650
|
+
*/
|
|
651
|
+
subscribe(callback) {
|
|
652
|
+
subscribers.add(callback);
|
|
653
|
+
return () => {
|
|
654
|
+
subscribers.delete(callback);
|
|
655
|
+
};
|
|
656
|
+
},
|
|
657
|
+
getSnapshot() {
|
|
658
|
+
return renderers;
|
|
659
|
+
},
|
|
660
|
+
getServerSnapshot() {
|
|
661
|
+
return renderers;
|
|
662
|
+
},
|
|
663
|
+
/**
|
|
664
|
+
* Adds a new NodeView Renderer to the editor.
|
|
665
|
+
*/
|
|
666
|
+
setRenderer(id, renderer) {
|
|
667
|
+
renderers = {
|
|
668
|
+
...renderers,
|
|
669
|
+
[id]: ReactDOM.createPortal(renderer.reactElement, renderer.element, id)
|
|
670
|
+
};
|
|
671
|
+
subscribers.forEach((subscriber) => subscriber());
|
|
672
|
+
},
|
|
673
|
+
/**
|
|
674
|
+
* Removes a NodeView Renderer from the editor.
|
|
675
|
+
*/
|
|
676
|
+
removeRenderer(id) {
|
|
677
|
+
const nextRenderers = { ...renderers };
|
|
678
|
+
delete nextRenderers[id];
|
|
679
|
+
renderers = nextRenderers;
|
|
680
|
+
subscribers.forEach((subscriber) => subscriber());
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
var PureEditorContent = class extends React.Component {
|
|
685
|
+
constructor(props) {
|
|
686
|
+
super(props);
|
|
687
|
+
this.editorContentRef = React.createRef();
|
|
688
|
+
}
|
|
689
|
+
componentDidMount() {
|
|
690
|
+
this.init();
|
|
691
|
+
}
|
|
692
|
+
componentDidUpdate() {
|
|
693
|
+
this.init();
|
|
694
|
+
}
|
|
695
|
+
init() {
|
|
696
|
+
var _a;
|
|
697
|
+
const editor = this.props.editor;
|
|
698
|
+
if (editor && !editor.isDestroyed && ((_a = editor.view.dom) == null ? void 0 : _a.parentNode)) {
|
|
699
|
+
if (editor.contentComponent) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
const element = this.editorContentRef.current;
|
|
703
|
+
element.append(...editor.view.dom.parentNode.childNodes);
|
|
704
|
+
editor.setOptions({
|
|
705
|
+
element
|
|
706
|
+
});
|
|
707
|
+
editor.contentComponent = getInstance();
|
|
708
|
+
editor.createNodeViews();
|
|
709
|
+
editor.isEditorContentInitialized = true;
|
|
710
|
+
this.forceUpdate();
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
componentWillUnmount() {
|
|
714
|
+
var _a;
|
|
715
|
+
const editor = this.props.editor;
|
|
716
|
+
if (!editor) {
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
editor.isEditorContentInitialized = false;
|
|
720
|
+
if (!editor.isDestroyed) {
|
|
721
|
+
editor.view.setProps({
|
|
722
|
+
nodeViews: {}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
editor.contentComponent = null;
|
|
726
|
+
try {
|
|
727
|
+
if (!((_a = editor.view.dom) == null ? void 0 : _a.parentNode)) {
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
const newElement = document.createElement("div");
|
|
731
|
+
newElement.append(...editor.view.dom.parentNode.childNodes);
|
|
732
|
+
editor.setOptions({
|
|
733
|
+
element: newElement
|
|
734
|
+
});
|
|
735
|
+
} catch {
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
render() {
|
|
739
|
+
const { editor, innerRef, ...rest } = this.props;
|
|
740
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
741
|
+
/* @__PURE__ */ jsx("div", { ref: mergeRefs(innerRef, this.editorContentRef), ...rest }),
|
|
742
|
+
(editor == null ? void 0 : editor.contentComponent) && /* @__PURE__ */ jsx(Portals, { contentComponent: editor.contentComponent })
|
|
743
|
+
] });
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
var EditorContentWithKey = forwardRef(
|
|
747
|
+
(props, ref) => {
|
|
748
|
+
const key = React.useMemo(() => {
|
|
749
|
+
return Math.floor(Math.random() * 4294967295).toString();
|
|
750
|
+
}, [props.editor]);
|
|
751
|
+
return React.createElement(PureEditorContent, {
|
|
752
|
+
key,
|
|
753
|
+
innerRef: ref,
|
|
754
|
+
...props
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
);
|
|
758
|
+
var EditorContent = React.memo(EditorContentWithKey);
|
|
759
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
760
|
+
var EditorStateManager = class {
|
|
761
|
+
constructor(initialEditor) {
|
|
762
|
+
this.transactionNumber = 0;
|
|
763
|
+
this.lastTransactionNumber = 0;
|
|
764
|
+
this.subscribers = /* @__PURE__ */ new Set();
|
|
765
|
+
this.editor = initialEditor;
|
|
766
|
+
this.lastSnapshot = { editor: initialEditor, transactionNumber: 0 };
|
|
767
|
+
this.getSnapshot = this.getSnapshot.bind(this);
|
|
768
|
+
this.getServerSnapshot = this.getServerSnapshot.bind(this);
|
|
769
|
+
this.watch = this.watch.bind(this);
|
|
770
|
+
this.subscribe = this.subscribe.bind(this);
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Get the current editor instance.
|
|
774
|
+
*/
|
|
775
|
+
getSnapshot() {
|
|
776
|
+
if (this.transactionNumber === this.lastTransactionNumber) {
|
|
777
|
+
return this.lastSnapshot;
|
|
778
|
+
}
|
|
779
|
+
this.lastTransactionNumber = this.transactionNumber;
|
|
780
|
+
this.lastSnapshot = { editor: this.editor, transactionNumber: this.transactionNumber };
|
|
781
|
+
return this.lastSnapshot;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Always disable the editor on the server-side.
|
|
785
|
+
*/
|
|
786
|
+
getServerSnapshot() {
|
|
787
|
+
return { editor: null, transactionNumber: 0 };
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Subscribe to the editor instance's changes.
|
|
791
|
+
*/
|
|
792
|
+
subscribe(callback) {
|
|
793
|
+
this.subscribers.add(callback);
|
|
794
|
+
return () => {
|
|
795
|
+
this.subscribers.delete(callback);
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Watch the editor instance for changes.
|
|
800
|
+
*/
|
|
801
|
+
watch(nextEditor) {
|
|
802
|
+
this.editor = nextEditor;
|
|
803
|
+
if (this.editor) {
|
|
804
|
+
const fn = () => {
|
|
805
|
+
this.transactionNumber += 1;
|
|
806
|
+
this.subscribers.forEach((callback) => callback());
|
|
807
|
+
};
|
|
808
|
+
const currentEditor = this.editor;
|
|
809
|
+
currentEditor.on("transaction", fn);
|
|
810
|
+
return () => {
|
|
811
|
+
currentEditor.off("transaction", fn);
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
return void 0;
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
function useEditorState(options) {
|
|
818
|
+
var _a;
|
|
819
|
+
const [editorStateManager] = useState(() => new EditorStateManager(options.editor));
|
|
820
|
+
const selectedState = (0, import_with_selector.useSyncExternalStoreWithSelector)(
|
|
821
|
+
editorStateManager.subscribe,
|
|
822
|
+
editorStateManager.getSnapshot,
|
|
823
|
+
editorStateManager.getServerSnapshot,
|
|
824
|
+
options.selector,
|
|
825
|
+
(_a = options.equalityFn) != null ? _a : deepEqual
|
|
826
|
+
);
|
|
827
|
+
useIsomorphicLayoutEffect(() => {
|
|
828
|
+
return editorStateManager.watch(options.editor);
|
|
829
|
+
}, [options.editor, editorStateManager]);
|
|
830
|
+
useDebugValue(selectedState);
|
|
831
|
+
return selectedState;
|
|
832
|
+
}
|
|
833
|
+
var isDev = process.env.NODE_ENV !== "production";
|
|
834
|
+
var isSSR = typeof window === "undefined";
|
|
835
|
+
var isNext = isSSR || Boolean(typeof window !== "undefined" && window.next);
|
|
836
|
+
var EditorInstanceManager = class _EditorInstanceManager {
|
|
837
|
+
constructor(options) {
|
|
838
|
+
this.editor = null;
|
|
839
|
+
this.subscriptions = /* @__PURE__ */ new Set();
|
|
840
|
+
this.isComponentMounted = false;
|
|
841
|
+
this.previousDeps = null;
|
|
842
|
+
this.instanceId = "";
|
|
843
|
+
this.options = options;
|
|
844
|
+
this.subscriptions = /* @__PURE__ */ new Set();
|
|
845
|
+
this.setEditor(this.getInitialEditor());
|
|
846
|
+
this.scheduleDestroy();
|
|
847
|
+
this.getEditor = this.getEditor.bind(this);
|
|
848
|
+
this.getServerSnapshot = this.getServerSnapshot.bind(this);
|
|
849
|
+
this.subscribe = this.subscribe.bind(this);
|
|
850
|
+
this.refreshEditorInstance = this.refreshEditorInstance.bind(this);
|
|
851
|
+
this.scheduleDestroy = this.scheduleDestroy.bind(this);
|
|
852
|
+
this.onRender = this.onRender.bind(this);
|
|
853
|
+
this.createEditor = this.createEditor.bind(this);
|
|
854
|
+
}
|
|
855
|
+
setEditor(editor) {
|
|
856
|
+
this.editor = editor;
|
|
857
|
+
this.instanceId = Math.random().toString(36).slice(2, 9);
|
|
858
|
+
this.subscriptions.forEach((cb) => cb());
|
|
859
|
+
}
|
|
860
|
+
getInitialEditor() {
|
|
861
|
+
const explicit = this.options.current.immediatelyRender;
|
|
862
|
+
let immediatelyRender = explicit != null ? explicit : true;
|
|
863
|
+
if (isSSR) {
|
|
864
|
+
if (immediatelyRender && isDev) {
|
|
865
|
+
console.warn(
|
|
866
|
+
"SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
immediatelyRender = false;
|
|
870
|
+
} else if (isNext && explicit === void 0) {
|
|
871
|
+
immediatelyRender = false;
|
|
872
|
+
if (isDev) {
|
|
873
|
+
console.warn(
|
|
874
|
+
"Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client."
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
return immediatelyRender ? this.createEditor() : null;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Create a new editor instance. And attach event listeners.
|
|
882
|
+
*/
|
|
883
|
+
createEditor() {
|
|
884
|
+
const optionsToApply = {
|
|
885
|
+
...this.options.current,
|
|
886
|
+
// Always call the most recent version of the callback function by default
|
|
887
|
+
onBeforeCreate: (...args) => {
|
|
888
|
+
var _a, _b;
|
|
889
|
+
return (_b = (_a = this.options.current).onBeforeCreate) == null ? void 0 : _b.call(_a, ...args);
|
|
890
|
+
},
|
|
891
|
+
onBlur: (...args) => {
|
|
892
|
+
var _a, _b;
|
|
893
|
+
return (_b = (_a = this.options.current).onBlur) == null ? void 0 : _b.call(_a, ...args);
|
|
894
|
+
},
|
|
895
|
+
onCreate: (...args) => {
|
|
896
|
+
var _a, _b;
|
|
897
|
+
return (_b = (_a = this.options.current).onCreate) == null ? void 0 : _b.call(_a, ...args);
|
|
898
|
+
},
|
|
899
|
+
onDestroy: (...args) => {
|
|
900
|
+
var _a, _b;
|
|
901
|
+
return (_b = (_a = this.options.current).onDestroy) == null ? void 0 : _b.call(_a, ...args);
|
|
902
|
+
},
|
|
903
|
+
onFocus: (...args) => {
|
|
904
|
+
var _a, _b;
|
|
905
|
+
return (_b = (_a = this.options.current).onFocus) == null ? void 0 : _b.call(_a, ...args);
|
|
906
|
+
},
|
|
907
|
+
onSelectionUpdate: (...args) => {
|
|
908
|
+
var _a, _b;
|
|
909
|
+
return (_b = (_a = this.options.current).onSelectionUpdate) == null ? void 0 : _b.call(_a, ...args);
|
|
910
|
+
},
|
|
911
|
+
onTransaction: (...args) => {
|
|
912
|
+
var _a, _b;
|
|
913
|
+
return (_b = (_a = this.options.current).onTransaction) == null ? void 0 : _b.call(_a, ...args);
|
|
914
|
+
},
|
|
915
|
+
onUpdate: (...args) => {
|
|
916
|
+
var _a, _b;
|
|
917
|
+
return (_b = (_a = this.options.current).onUpdate) == null ? void 0 : _b.call(_a, ...args);
|
|
918
|
+
},
|
|
919
|
+
onContentError: (...args) => {
|
|
920
|
+
var _a, _b;
|
|
921
|
+
return (_b = (_a = this.options.current).onContentError) == null ? void 0 : _b.call(_a, ...args);
|
|
922
|
+
},
|
|
923
|
+
onDrop: (...args) => {
|
|
924
|
+
var _a, _b;
|
|
925
|
+
return (_b = (_a = this.options.current).onDrop) == null ? void 0 : _b.call(_a, ...args);
|
|
926
|
+
},
|
|
927
|
+
onPaste: (...args) => {
|
|
928
|
+
var _a, _b;
|
|
929
|
+
return (_b = (_a = this.options.current).onPaste) == null ? void 0 : _b.call(_a, ...args);
|
|
930
|
+
},
|
|
931
|
+
onDelete: (...args) => {
|
|
932
|
+
var _a, _b;
|
|
933
|
+
return (_b = (_a = this.options.current).onDelete) == null ? void 0 : _b.call(_a, ...args);
|
|
934
|
+
}
|
|
935
|
+
};
|
|
936
|
+
const editor = new Editor(optionsToApply);
|
|
937
|
+
return editor;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Get the current editor instance.
|
|
941
|
+
*/
|
|
942
|
+
getEditor() {
|
|
943
|
+
return this.editor;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Always disable the editor on the server-side.
|
|
947
|
+
*/
|
|
948
|
+
getServerSnapshot() {
|
|
949
|
+
return null;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Subscribe to the editor instance's changes.
|
|
953
|
+
*/
|
|
954
|
+
subscribe(onStoreChange) {
|
|
955
|
+
this.subscriptions.add(onStoreChange);
|
|
956
|
+
return () => {
|
|
957
|
+
this.subscriptions.delete(onStoreChange);
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
static compareOptions(a, b) {
|
|
961
|
+
return Object.keys(a).every((key) => {
|
|
962
|
+
if ([
|
|
963
|
+
"onCreate",
|
|
964
|
+
"onBeforeCreate",
|
|
965
|
+
"onDestroy",
|
|
966
|
+
"onUpdate",
|
|
967
|
+
"onTransaction",
|
|
968
|
+
"onFocus",
|
|
969
|
+
"onBlur",
|
|
970
|
+
"onSelectionUpdate",
|
|
971
|
+
"onContentError",
|
|
972
|
+
"onDrop",
|
|
973
|
+
"onPaste"
|
|
974
|
+
].includes(key)) {
|
|
975
|
+
return true;
|
|
976
|
+
}
|
|
977
|
+
if (key === "extensions" && a.extensions && b.extensions) {
|
|
978
|
+
if (a.extensions.length !== b.extensions.length) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
return a.extensions.every((extension, index) => {
|
|
982
|
+
var _a;
|
|
983
|
+
if (extension !== ((_a = b.extensions) == null ? void 0 : _a[index])) {
|
|
984
|
+
return false;
|
|
985
|
+
}
|
|
986
|
+
return true;
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
if (a[key] !== b[key]) {
|
|
990
|
+
return false;
|
|
991
|
+
}
|
|
992
|
+
return true;
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* On each render, we will create, update, or destroy the editor instance.
|
|
997
|
+
* @param deps The dependencies to watch for changes
|
|
998
|
+
* @returns A cleanup function
|
|
999
|
+
*/
|
|
1000
|
+
onRender(deps) {
|
|
1001
|
+
return () => {
|
|
1002
|
+
this.isComponentMounted = true;
|
|
1003
|
+
clearTimeout(this.scheduledDestructionTimeout);
|
|
1004
|
+
if (this.editor && !this.editor.isDestroyed && deps.length === 0) {
|
|
1005
|
+
if (!_EditorInstanceManager.compareOptions(this.options.current, this.editor.options)) {
|
|
1006
|
+
this.editor.setOptions({
|
|
1007
|
+
...this.options.current,
|
|
1008
|
+
editable: this.editor.isEditable
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
} else {
|
|
1012
|
+
this.refreshEditorInstance(deps);
|
|
1013
|
+
}
|
|
1014
|
+
return () => {
|
|
1015
|
+
this.isComponentMounted = false;
|
|
1016
|
+
this.scheduleDestroy();
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Recreate the editor instance if the dependencies have changed.
|
|
1022
|
+
*/
|
|
1023
|
+
refreshEditorInstance(deps) {
|
|
1024
|
+
if (this.editor && !this.editor.isDestroyed) {
|
|
1025
|
+
if (this.previousDeps === null) {
|
|
1026
|
+
this.previousDeps = deps;
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
const depsAreEqual = this.previousDeps.length === deps.length && this.previousDeps.every((dep, index) => dep === deps[index]);
|
|
1030
|
+
if (depsAreEqual) {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (this.editor && !this.editor.isDestroyed) {
|
|
1035
|
+
this.editor.destroy();
|
|
1036
|
+
}
|
|
1037
|
+
this.setEditor(this.createEditor());
|
|
1038
|
+
this.previousDeps = deps;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Schedule the destruction of the editor instance.
|
|
1042
|
+
* This will only destroy the editor if it was not mounted on the next tick.
|
|
1043
|
+
* This is to avoid destroying the editor instance when it's actually still mounted.
|
|
1044
|
+
*/
|
|
1045
|
+
scheduleDestroy() {
|
|
1046
|
+
const currentInstanceId = this.instanceId;
|
|
1047
|
+
const currentEditor = this.editor;
|
|
1048
|
+
this.scheduledDestructionTimeout = setTimeout(() => {
|
|
1049
|
+
if (this.isComponentMounted && this.instanceId === currentInstanceId) {
|
|
1050
|
+
if (currentEditor) {
|
|
1051
|
+
currentEditor.setOptions(this.options.current);
|
|
1052
|
+
}
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
if (currentEditor && !currentEditor.isDestroyed) {
|
|
1056
|
+
currentEditor.destroy();
|
|
1057
|
+
if (this.instanceId === currentInstanceId) {
|
|
1058
|
+
this.setEditor(null);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}, 1);
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
function useEditor(options = {}, deps = []) {
|
|
1065
|
+
const mostRecentOptions = useRef(options);
|
|
1066
|
+
mostRecentOptions.current = options;
|
|
1067
|
+
const [instanceManager] = useState2(() => new EditorInstanceManager(mostRecentOptions));
|
|
1068
|
+
const editor = (0, import_shim2.useSyncExternalStore)(
|
|
1069
|
+
instanceManager.subscribe,
|
|
1070
|
+
instanceManager.getEditor,
|
|
1071
|
+
instanceManager.getServerSnapshot
|
|
1072
|
+
);
|
|
1073
|
+
useDebugValue2(editor);
|
|
1074
|
+
useEffect2(instanceManager.onRender(deps));
|
|
1075
|
+
useEditorState({
|
|
1076
|
+
editor,
|
|
1077
|
+
selector: ({ transactionNumber }) => {
|
|
1078
|
+
if (options.shouldRerenderOnTransaction === false || options.shouldRerenderOnTransaction === void 0) {
|
|
1079
|
+
return null;
|
|
1080
|
+
}
|
|
1081
|
+
if (options.immediatelyRender && transactionNumber === 0) {
|
|
1082
|
+
return 0;
|
|
1083
|
+
}
|
|
1084
|
+
return transactionNumber + 1;
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
return editor;
|
|
1088
|
+
}
|
|
1089
|
+
var EditorContext = createContext({
|
|
1090
|
+
editor: null
|
|
1091
|
+
});
|
|
1092
|
+
var EditorConsumer = EditorContext.Consumer;
|
|
1093
|
+
var useCurrentEditor = () => useContext(EditorContext);
|
|
1094
|
+
var ReactNodeViewContext = createContext2({
|
|
1095
|
+
onDragStart: () => {
|
|
1096
|
+
},
|
|
1097
|
+
nodeViewContentChildren: void 0,
|
|
1098
|
+
nodeViewContentRef: () => {
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
var useReactNodeView = () => useContext2(ReactNodeViewContext);
|
|
1102
|
+
var NodeViewWrapper = React3.forwardRef((props, ref) => {
|
|
1103
|
+
const { onDragStart } = useReactNodeView();
|
|
1104
|
+
const Tag = props.as || "div";
|
|
1105
|
+
return (
|
|
1106
|
+
// @ts-ignore
|
|
1107
|
+
/* @__PURE__ */ jsx4(
|
|
1108
|
+
Tag,
|
|
1109
|
+
{
|
|
1110
|
+
...props,
|
|
1111
|
+
ref,
|
|
1112
|
+
"data-node-view-wrapper": "",
|
|
1113
|
+
onDragStart,
|
|
1114
|
+
style: {
|
|
1115
|
+
whiteSpace: "normal",
|
|
1116
|
+
...props.style
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
)
|
|
1120
|
+
);
|
|
1121
|
+
});
|
|
1122
|
+
var ReactMarkViewContext = React4.createContext({
|
|
1123
|
+
markViewContentRef: () => {
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
var TiptapContext = createContext3({
|
|
1127
|
+
get editor() {
|
|
1128
|
+
throw new Error("useTiptap must be used within a <Tiptap> provider");
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
TiptapContext.displayName = "TiptapContext";
|
|
1132
|
+
var useTiptap = () => useContext3(TiptapContext);
|
|
1133
|
+
function TiptapWrapper({ children, ...props }) {
|
|
1134
|
+
const resolvedEditor = "editor" in props ? props.editor : props.instance;
|
|
1135
|
+
if (!resolvedEditor) {
|
|
1136
|
+
throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");
|
|
1137
|
+
}
|
|
1138
|
+
const tiptapContextValue = useMemo2(
|
|
1139
|
+
() => ({ editor: resolvedEditor }),
|
|
1140
|
+
[resolvedEditor]
|
|
1141
|
+
);
|
|
1142
|
+
const legacyContextValue = useMemo2(() => ({ editor: resolvedEditor }), [resolvedEditor]);
|
|
1143
|
+
return /* @__PURE__ */ jsx8(EditorContext.Provider, { value: legacyContextValue, children: /* @__PURE__ */ jsx8(TiptapContext.Provider, { value: tiptapContextValue, children }) });
|
|
1144
|
+
}
|
|
1145
|
+
TiptapWrapper.displayName = "Tiptap";
|
|
1146
|
+
function TiptapContent({ ...rest }) {
|
|
1147
|
+
const { editor } = useTiptap();
|
|
1148
|
+
return /* @__PURE__ */ jsx8(EditorContent, { editor, ...rest });
|
|
1149
|
+
}
|
|
1150
|
+
TiptapContent.displayName = "Tiptap.Content";
|
|
1151
|
+
var Tiptap = Object.assign(TiptapWrapper, {
|
|
1152
|
+
/**
|
|
1153
|
+
* The Tiptap Content component that renders the EditorContent with the editor instance from the context.
|
|
1154
|
+
* @see TiptapContent
|
|
1155
|
+
*/
|
|
1156
|
+
Content: TiptapContent
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
export {
|
|
1160
|
+
EditorContent,
|
|
1161
|
+
useEditor,
|
|
1162
|
+
useCurrentEditor
|
|
1163
|
+
};
|
|
1164
|
+
/*! Bundled license information:
|
|
1165
|
+
|
|
1166
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
1167
|
+
(**
|
|
1168
|
+
* @license React
|
|
1169
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
1170
|
+
*
|
|
1171
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1172
|
+
*
|
|
1173
|
+
* This source code is licensed under the MIT license found in the
|
|
1174
|
+
* LICENSE file in the root directory of this source tree.
|
|
1175
|
+
*)
|
|
1176
|
+
|
|
1177
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
|
|
1178
|
+
(**
|
|
1179
|
+
* @license React
|
|
1180
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
1181
|
+
*
|
|
1182
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1183
|
+
*
|
|
1184
|
+
* This source code is licensed under the MIT license found in the
|
|
1185
|
+
* LICENSE file in the root directory of this source tree.
|
|
1186
|
+
*)
|
|
1187
|
+
*/
|