alinea 2.0.0-preview.12 → 2.0.0-preview.13
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/.mcp/later/dev.json +1 -1
- package/dist/.mcp/online/dev.json +1 -1
- package/dist/adapter/next/cms.js +16 -8
- package/dist/adapter/next/dashboardUrl.d.ts +6 -0
- package/dist/adapter/next/dashboardUrl.js +13 -0
- package/dist/adapter/next/syncCheck.d.ts +15 -2
- package/dist/adapter/next/syncCheck.js +26 -9
- package/dist/backend/Handler.js +5 -1
- package/dist/backend/api/BlobStore.d.ts +21 -0
- package/dist/backend/api/BlobStore.js +63 -0
- package/dist/backend/api/CreateBackend.js +10 -8
- package/dist/backend/api/DatabaseApi.d.ts +4 -1
- package/dist/backend/api/DatabaseApi.js +88 -4
- package/dist/backend/api/GithubApi.js +47 -24
- package/dist/backend/api/database.js +6 -6
- package/dist/bundled.d.ts +676 -280
- package/dist/chunks/{bun-sqlite-5SHXN3AT.js → bun-sqlite-RI6BYU5S.js} +3 -3
- package/dist/chunks/{chunk-OHGAVV4G.js → chunk-3QFSGTGF.js} +2 -3
- package/dist/chunks/{chunk-QJGGYF6E.js → chunk-4ZA6KZHS.js} +5 -5
- package/dist/chunks/{chunk-ASYKC6IE.js → chunk-5H4D5JQL.js} +1 -1
- package/dist/chunks/{chunk-ETWOY4AL.js → chunk-A2I6MCCS.js} +1 -1
- package/dist/chunks/{chunk-W5AXN7GH.js → chunk-CYVOGRSD.js} +1 -2
- package/dist/chunks/{chunk-TIJTT5ZI.js → chunk-G43W7AME.js} +1 -0
- package/dist/chunks/{chunk-RE523BQ7.js → chunk-HOETF6HN.js} +5829 -5830
- package/dist/chunks/{chunk-AIU6CMVT.js → chunk-PTYZMV5G.js} +1 -1
- package/dist/chunks/{chunk-JOF663EG.js → chunk-QHHMKJUO.js} +1 -1
- package/dist/chunks/{chunk-66YZ47TY.js → chunk-RAR44T5O.js} +1 -1
- package/dist/chunks/{chunk-QSN6RH6X.js → chunk-VA6NC3MI.js} +1 -1
- package/dist/chunks/{node-sqlite-XVNTNMCY.js → node-sqlite-C7VJ2NSN.js} +3 -3
- package/dist/cli/Mcp.js +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/serve/mcp/DevMcp.js +1 -1
- package/dist/cli/serve/mcp/McpTools.js +29 -1
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Alert.js +2 -2
- package/dist/components/AppShell.js +2 -2
- package/dist/components/Badge.d.ts +3 -1
- package/dist/components/Badge.js +5 -3
- package/dist/components/Breadcrumbs.js +7 -7
- package/dist/components/Button.d.ts +6 -1
- package/dist/components/Button.js +16 -7
- package/dist/components/Calendar.js +20 -20
- package/dist/components/Checkbox.js +7 -7
- package/dist/components/CheckboxGroup.js +4 -4
- package/dist/components/Code.js +2 -2
- package/dist/components/Collapsible.js +3 -3
- package/dist/components/ColorSwatch.js +2 -2
- package/dist/components/ColorSwatchPicker.js +2 -2
- package/dist/components/ComboBox.js +7 -7
- package/dist/components/Command.js +14 -13
- package/dist/components/ContentCard.d.ts +3 -1
- package/dist/components/ContentCard.js +46 -24
- package/dist/components/ContentGrid.js +17 -17
- package/dist/components/DataList.js +2 -2
- package/dist/components/DateField.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DateRangePicker.js +2 -2
- package/dist/components/Dialog.js +7 -7
- package/dist/components/DropZone.js +6 -6
- package/dist/components/DropdownMenu.js +9 -9
- package/dist/components/Empty.js +5 -5
- package/dist/components/Field.js +8 -8
- package/dist/components/List.js +27 -27
- package/dist/components/MediaPreview.js +5 -5
- package/dist/components/MultipleSelect.js +22 -22
- package/dist/components/NavRail.js +4 -4
- package/dist/components/NumberField.js +4 -4
- package/dist/components/Page.js +3 -3
- package/dist/components/Popover.js +2 -2
- package/dist/components/PreviewFrame.js +9 -9
- package/dist/components/RadioGroup.js +9 -9
- package/dist/components/Resizable.js +4 -4
- package/dist/components/SearchField.d.ts +6 -1
- package/dist/components/SearchField.js +5 -3
- package/dist/components/Select.js +13 -13
- package/dist/components/Sheet.d.ts +50 -0
- package/dist/components/Sheet.js +202 -0
- package/dist/components/Sidebar.js +4 -4
- package/dist/components/SortableList.d.ts +34 -30
- package/dist/components/SortableList.js +161 -264
- package/dist/components/Spinner.js +2 -2
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +8 -8
- package/dist/components/Table.d.ts +3 -1
- package/dist/components/Table.js +57 -46
- package/dist/components/Tabs.js +5 -5
- package/dist/components/TagGroup.js +8 -8
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +6 -6
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/Tree.js +24 -24
- package/dist/components/internal/DateControl.js +12 -12
- package/dist/components/internal/ListBoxOption.js +6 -6
- package/dist/components/internal/Locale.js +2 -2
- package/dist/components/internal/PopoverSurface.js +4 -4
- package/dist/components/internal/SelectionCheckbox.js +5 -5
- package/dist/components/internal/Slot.js +1 -1
- package/dist/components/internal/ToggleButton.js +3 -3
- package/dist/components/internal/Trigger.js +2 -2
- package/dist/components/internal/sortableDrag.d.ts +19 -0
- package/dist/components/internal/sortableDrag.js +175 -0
- package/dist/components/internal/useDragDrop.js +2 -2
- package/dist/components.d.ts +1 -0
- package/dist/components.js +1 -0
- package/dist/core/Config.d.ts +6 -1
- package/dist/core/Document.d.ts +9 -1
- package/dist/core/Document.js +31 -6
- package/dist/core/Overview.d.ts +2 -4
- package/dist/core/TextDoc.d.ts +4 -0
- package/dist/core/Validation.d.ts +0 -1
- package/dist/core/Validation.js +0 -6
- package/dist/core/field/RichTextField.js +23 -4
- package/dist/core/media/MediaTypes.js +1 -1
- package/dist/core/source/GithubSource.d.ts +4 -0
- package/dist/core/source/GithubSource.js +127 -25
- package/dist/core/source/GithubUsage.d.ts +21 -0
- package/dist/core/source/GithubUsage.js +47 -0
- package/dist/dashboard/App.d.ts +2 -2
- package/dist/dashboard/App.js +5 -3
- package/dist/dashboard/ViewKeys.d.ts +1 -0
- package/dist/dashboard/ViewKeys.js +1 -0
- package/dist/dashboard/app/ActivityStatus.js +7 -7
- package/dist/dashboard/app/AuthView.js +5 -5
- package/dist/dashboard/app/BlockSheet.d.ts +50 -0
- package/dist/dashboard/app/BlockSheet.js +207 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.d.ts +6 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.js +29 -0
- package/dist/dashboard/app/CompactField.js +16 -16
- package/dist/dashboard/app/DashboardLayout.js +3 -1
- package/dist/dashboard/app/EntryFields.js +2 -2
- package/dist/dashboard/app/EntryHeader.js +33 -34
- package/dist/dashboard/app/EntryReferences.js +7 -7
- package/dist/dashboard/app/EntrySidebar.js +15 -15
- package/dist/dashboard/app/EntrySidebarPreview.js +3 -3
- package/dist/dashboard/app/EntryStatusIcon.d.ts +23 -0
- package/dist/dashboard/app/EntryStatusIcon.js +58 -0
- package/dist/dashboard/app/EntryValidationModal.d.ts +6 -5
- package/dist/dashboard/app/EntryValidationModal.js +20 -20
- package/dist/dashboard/app/Explorer.d.ts +3 -1
- package/dist/dashboard/app/Explorer.js +48 -44
- package/dist/dashboard/app/ExplorerBatchActions.d.ts +3 -1
- package/dist/dashboard/app/ExplorerBatchActions.js +68 -43
- package/dist/dashboard/app/ExplorerCards.js +7 -1
- package/dist/dashboard/app/ExplorerControls.js +6 -6
- package/dist/dashboard/app/ExplorerList.js +5 -5
- package/dist/dashboard/app/ExplorerModal.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +11 -8
- package/dist/dashboard/app/ImageEditor.js +28 -28
- package/dist/dashboard/app/ImagePicker.js +3 -13
- package/dist/dashboard/app/LinkPicker.js +28 -26
- package/dist/dashboard/app/LocaleMenu.js +4 -4
- package/dist/dashboard/app/MediaPreviewCell.js +1 -1
- package/dist/dashboard/app/MoveConfirmDialog.d.ts +5 -0
- package/dist/dashboard/app/MoveConfirmDialog.js +79 -0
- package/dist/dashboard/app/OverviewCell.js +8 -13
- package/dist/dashboard/app/PendingUploadsView.js +3 -3
- package/dist/dashboard/app/ReadOnlyBadge.d.ts +1 -1
- package/dist/dashboard/app/RemoveDialog.d.ts +17 -0
- package/dist/dashboard/app/{DeleteDialog.js → RemoveDialog.js} +67 -27
- package/dist/dashboard/app/RemoveRedirect.d.ts +7 -0
- package/dist/dashboard/app/RemoveRedirect.js +123 -0
- package/dist/dashboard/app/SearchBar.d.ts +9 -0
- package/dist/dashboard/app/SearchBar.js +31 -0
- package/dist/dashboard/app/SidebarTree.js +27 -72
- package/dist/dashboard/app/WorkspaceMenu.js +7 -7
- package/dist/dashboard/app/WorkspaceRoots.js +12 -12
- package/dist/dashboard/app/editor/FileEditor.js +14 -14
- package/dist/dashboard/app/modals/CreateEntry.js +3 -3
- package/dist/dashboard/app/pages/EntryPage.d.ts +2 -1
- package/dist/dashboard/app/pages/EntryPage.js +34 -15
- package/dist/dashboard/app/pages/SplashPage.js +37 -37
- package/dist/dashboard/app/pages/UsersPage.js +12 -12
- package/dist/dashboard/app/ui/DashboardModal.js +15 -14
- package/dist/dashboard/atoms/dashboard.js +1 -1
- package/dist/dashboard/atoms/entry.js +1 -14
- package/dist/dashboard/atoms/entryTable.js +1 -0
- package/dist/dashboard/atoms/explorer.d.ts +4 -0
- package/dist/dashboard/atoms/explorer.js +19 -7
- package/dist/dashboard/atoms/graph.js +1 -1
- package/dist/dashboard/atoms/link.js +5 -2
- package/dist/dashboard/atoms/move.d.ts +5 -0
- package/dist/dashboard/atoms/move.js +29 -3
- package/dist/dashboard/atoms/moveConfirmation.d.ts +34 -0
- package/dist/dashboard/atoms/moveConfirmation.js +95 -0
- package/dist/dashboard/atoms/nav.d.ts +9 -5
- package/dist/dashboard/atoms/nav.js +120 -45
- package/dist/dashboard/atoms/overview.d.ts +6 -5
- package/dist/dashboard/atoms/overview.js +2 -16
- package/dist/dashboard/atoms/remove.d.ts +112 -0
- package/dist/dashboard/atoms/remove.js +268 -0
- package/dist/dashboard/atoms/root.d.ts +2 -2
- package/dist/dashboard/atoms/root.js +41 -26
- package/dist/dashboard/atoms/user.js +1 -1
- package/dist/dashboard/atoms/utils.js +1 -1
- package/dist/dashboard/boot/Boot.js +25 -17
- package/dist/dashboard/boot/DashboardWorker.d.ts +1 -0
- package/dist/dashboard/boot/DashboardWorker.js +10 -46
- package/dist/dashboard/boot/LoadWorker.js +17 -10
- package/dist/dashboard/cms/EntryTable.js +8 -5
- package/dist/database/BrowserEntryStore.d.ts +12 -62
- package/dist/database/BrowserEntryStore.js +97 -196
- package/dist/database/DatabaseTables.js +2 -2
- package/dist/database/EntryDatabase.js +21 -1
- package/dist/database/EntryTransaction.js +0 -35
- package/dist/database/EntryUrlAliases.d.ts +4 -0
- package/dist/database/EntryUrlAliases.js +16 -10
- package/dist/database/driver/RuntimeDatabase.js +3 -3
- package/dist/database/driver/WasmDatabase.d.ts +5 -18
- package/dist/database/driver/WasmDatabase.js +15 -16
- package/dist/database/entry/EntryTable.js +2 -2
- package/dist/database/query/EntryQuery.js +1 -1
- package/dist/database/query/Relation.js +1 -1
- package/dist/database/query/Search.js +2 -2
- package/dist/field/code/CodeField.view.js +16 -16
- package/dist/field/link/EntryLink.d.ts +4 -4
- package/dist/field/link/FileLink.d.ts +4 -4
- package/dist/field/link/ImageLink.d.ts +4 -4
- package/dist/field/link/Link.d.ts +1 -1
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +244 -370
- package/dist/field/link/UrlLink.d.ts +4 -4
- package/dist/field/list/ListField.d.ts +2 -0
- package/dist/field/list/ListField.view.d.ts +15 -0
- package/dist/field/list/ListField.view.js +343 -301
- package/dist/field/metadata/MetadataField.d.ts +17 -7
- package/dist/field/metadata/MetadataField.js +14 -3
- package/dist/field/metadata/MetadataField.view.d.ts +1 -0
- package/dist/field/metadata/MetadataField.view.js +25 -21
- package/dist/field/richtext/RichTextBlock.d.ts +3 -1
- package/dist/field/richtext/RichTextBlock.js +177 -74
- package/dist/field/richtext/RichTextBlockHost.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +31 -31
- package/dist/field/richtext/RichTextField.view.js +14 -8
- package/dist/field/richtext/RichTextInsertMenu.js +43 -27
- package/dist/field/views.js +2 -0
- package/dist/index.css +490 -309
- package/dist/picker/url/UrlPicker.js +1 -0
- package/docs/components/badge.md +1 -0
- package/docs/components/button.md +1 -0
- package/docs/components/content-card.md +1 -0
- package/docs/components/search-field.md +1 -0
- package/docs/components/sortable-list.md +5 -20
- package/docs/components/table.md +1 -0
- package/docs/configuration.md +1 -1
- package/docs/deploy/self-host.md +1 -1
- package/docs/deploy.md +5 -4
- package/docs/fields.md +1 -1
- package/docs/index.md +1 -1
- package/docs/instant-publishing.md +7 -22
- package/docs/overviews.md +3 -4
- package/docs/upgrading.md +3 -2
- package/llms-full.txt +31 -55
- package/package.json +2 -3
- package/dist/core/db/EntryValidationError.d.ts +0 -13
- package/dist/core/db/EntryValidationError.js +0 -23
- package/dist/dashboard/app/DeleteDialog.d.ts +0 -11
- package/dist/dashboard/atoms/delete.d.ts +0 -68
- package/dist/dashboard/atoms/delete.js +0 -143
- package/dist/chunks/{chunk-MOWR65LM.js → chunk-PYDOMKJZ.js} +71 -71
|
@@ -49,24 +49,24 @@ import { WorkspaceAvatarMenu } from "./WorkspaceMenu.js";
|
|
|
49
49
|
|
|
50
50
|
// src/dashboard/app/WorkspaceRoots.module.css
|
|
51
51
|
var WorkspaceRoots_default = {
|
|
52
|
-
"WorkspaceRoots-
|
|
53
|
-
"
|
|
52
|
+
"WorkspaceRoots-trigger": "alinea-WorkspaceRoots-trigger",
|
|
53
|
+
"WorkspaceRootsTrigger": "alinea-WorkspaceRoots-trigger",
|
|
54
54
|
"WorkspaceRoots-profile-popover-action-button": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
55
55
|
"WorkspaceRootsProfilePopoverActionButton": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
56
|
-
"WorkspaceRoots-profile-popover-user-title": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
57
|
-
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
58
|
-
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
59
|
-
"WorkspaceRootsProfilePopoverAction": "alinea-WorkspaceRoots-profile-popover-action",
|
|
60
|
-
"WorkspaceRoots-profile-popover-user": "alinea-WorkspaceRoots-profile-popover-user",
|
|
61
|
-
"WorkspaceRootsProfilePopoverUser": "alinea-WorkspaceRoots-profile-popover-user",
|
|
62
|
-
"WorkspaceRoots-profile-popover": "alinea-WorkspaceRoots-profile-popover",
|
|
63
|
-
"WorkspaceRootsProfilePopover": "alinea-WorkspaceRoots-profile-popover",
|
|
64
56
|
"WorkspaceRoots-profile-popover-user-icon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
65
57
|
"WorkspaceRootsProfilePopoverUserIcon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
58
|
+
"WorkspaceRoots-profile-popover-surface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
59
|
+
"WorkspaceRootsProfilePopoverSurface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
60
|
+
"WorkspaceRoots-profile-popover-user": "alinea-WorkspaceRoots-profile-popover-user",
|
|
61
|
+
"WorkspaceRootsProfilePopoverUser": "alinea-WorkspaceRoots-profile-popover-user",
|
|
66
62
|
"WorkspaceRoots-profile-popover-item": "alinea-WorkspaceRoots-profile-popover-item",
|
|
67
63
|
"WorkspaceRootsProfilePopoverItem": "alinea-WorkspaceRoots-profile-popover-item",
|
|
68
|
-
"WorkspaceRoots-
|
|
69
|
-
"
|
|
64
|
+
"WorkspaceRoots-profile-popover": "alinea-WorkspaceRoots-profile-popover",
|
|
65
|
+
"WorkspaceRootsProfilePopover": "alinea-WorkspaceRoots-profile-popover",
|
|
66
|
+
"WorkspaceRoots-profile-popover-user-title": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
67
|
+
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
68
|
+
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
69
|
+
"WorkspaceRootsProfilePopoverAction": "alinea-WorkspaceRoots-profile-popover-action"
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/dashboard/app/WorkspaceRoots.tsx
|
|
@@ -47,33 +47,33 @@ import { NodeEditor } from "../NodeEditor.js";
|
|
|
47
47
|
|
|
48
48
|
// src/dashboard/app/editor/FileEditor.module.css
|
|
49
49
|
var FileEditor_default = {
|
|
50
|
-
"FileEditor-
|
|
51
|
-
"
|
|
50
|
+
"FileEditor-tabs-header": "alinea-FileEditor-tabs-header",
|
|
51
|
+
"FileEditorTabsHeader": "alinea-FileEditor-tabs-header",
|
|
52
52
|
"FileEditor-details": "alinea-FileEditor-details",
|
|
53
53
|
"FileEditorDetails": "alinea-FileEditor-details",
|
|
54
|
-
"FileEditor-
|
|
55
|
-
"
|
|
54
|
+
"FileEditor-surface": "alinea-FileEditor-surface",
|
|
55
|
+
"FileEditorSurface": "alinea-FileEditor-surface",
|
|
56
|
+
"FileEditor-tabs": "alinea-FileEditor-tabs",
|
|
57
|
+
"FileEditorTabs": "alinea-FileEditor-tabs",
|
|
56
58
|
"FileEditor-focus-header": "alinea-FileEditor-focus-header",
|
|
57
59
|
"FileEditorFocusHeader": "alinea-FileEditor-focus-header",
|
|
58
60
|
"FileEditor": "alinea-FileEditor",
|
|
59
|
-
"FileEditor-tabs": "alinea-FileEditor-tabs",
|
|
60
|
-
"FileEditorTabs": "alinea-FileEditor-tabs",
|
|
61
61
|
"FileEditor-focus-label": "alinea-FileEditor-focus-label",
|
|
62
62
|
"FileEditorFocusLabel": "alinea-FileEditor-focus-label",
|
|
63
|
+
"FileEditor-tabPanel": "alinea-FileEditor-tabPanel",
|
|
64
|
+
"FileEditorTabPanel": "alinea-FileEditor-tabPanel",
|
|
63
65
|
"FileEditor-focus-value": "alinea-FileEditor-focus-value",
|
|
64
66
|
"FileEditorFocusValue": "alinea-FileEditor-focus-value",
|
|
65
|
-
"FileEditor-
|
|
66
|
-
"
|
|
67
|
-
"FileEditor-
|
|
68
|
-
"
|
|
67
|
+
"FileEditor-content": "alinea-FileEditor-content",
|
|
68
|
+
"FileEditorContent": "alinea-FileEditor-content",
|
|
69
|
+
"FileEditor-focus": "alinea-FileEditor-focus",
|
|
70
|
+
"FileEditorFocus": "alinea-FileEditor-focus",
|
|
69
71
|
"FileEditor-focus-description": "alinea-FileEditor-focus-description",
|
|
70
72
|
"FileEditorFocusDescription": "alinea-FileEditor-focus-description",
|
|
71
|
-
"FileEditor-tabs-header": "alinea-FileEditor-tabs-header",
|
|
72
|
-
"FileEditorTabsHeader": "alinea-FileEditor-tabs-header",
|
|
73
73
|
"FileEditor-metadata": "alinea-FileEditor-metadata",
|
|
74
74
|
"FileEditorMetadata": "alinea-FileEditor-metadata",
|
|
75
|
-
"FileEditor-
|
|
76
|
-
"
|
|
75
|
+
"FileEditor-fields": "alinea-FileEditor-fields",
|
|
76
|
+
"FileEditorFields": "alinea-FileEditor-fields"
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// src/dashboard/app/editor/FileEditor.tsx
|
|
@@ -59,10 +59,10 @@ var CreateEntry_default = {
|
|
|
59
59
|
"CreateEntryParentRow": "alinea-CreateEntry-parentRow",
|
|
60
60
|
"CreateEntry-insertOrder-toggle": "alinea-CreateEntry-insertOrder-toggle",
|
|
61
61
|
"CreateEntryInsertOrderToggle": "alinea-CreateEntry-insertOrder-toggle",
|
|
62
|
-
"CreateEntry-insertOrder": "alinea-CreateEntry-insertOrder",
|
|
63
|
-
"CreateEntryInsertOrder": "alinea-CreateEntry-insertOrder",
|
|
64
62
|
"CreateEntry-parentField": "alinea-CreateEntry-parentField",
|
|
65
|
-
"CreateEntryParentField": "alinea-CreateEntry-parentField"
|
|
63
|
+
"CreateEntryParentField": "alinea-CreateEntry-parentField",
|
|
64
|
+
"CreateEntry-insertOrder": "alinea-CreateEntry-insertOrder",
|
|
65
|
+
"CreateEntryInsertOrder": "alinea-CreateEntry-insertOrder"
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
// src/dashboard/app/modals/CreateEntry.tsx
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Page } from 'alinea/dashboard/atoms/nav';
|
|
2
|
-
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export declare const entryPage: (page: Page, get: import("jotai").Getter) => ReactNode | Promise<ReactNode>;
|
|
3
4
|
export interface NotFoundPanelProps {
|
|
4
5
|
title: string;
|
|
5
6
|
message: string;
|
|
@@ -65,6 +65,11 @@ import {
|
|
|
65
65
|
import { EntryTranslationBanner } from "./../EntryTranslationBanner.js";
|
|
66
66
|
import { Explorer } from "./../Explorer.js";
|
|
67
67
|
import { SidebarLayout } from "../SidebarLayout.js";
|
|
68
|
+
import {
|
|
69
|
+
BlockSheetProvider,
|
|
70
|
+
BlockSheetSlot,
|
|
71
|
+
useBlockSheetOpen
|
|
72
|
+
} from "../BlockSheet.js";
|
|
68
73
|
import {
|
|
69
74
|
DashboardModal,
|
|
70
75
|
DashboardModalContent,
|
|
@@ -74,21 +79,23 @@ import {
|
|
|
74
79
|
|
|
75
80
|
// src/dashboard/app/pages/EntryPage.module.css
|
|
76
81
|
var EntryPage_default = {
|
|
77
|
-
"EntryEditor-banner": "alinea-EntryEditor-banner",
|
|
78
|
-
"EntryEditorBanner": "alinea-EntryEditor-banner",
|
|
79
82
|
"EntryEditor-body": "alinea-EntryEditor-body",
|
|
80
83
|
"EntryEditorBody": "alinea-EntryEditor-body",
|
|
81
|
-
"MissingEntry": "alinea-MissingEntry",
|
|
82
|
-
"EntryOverview-mobileActions": "alinea-EntryOverview-mobileActions",
|
|
83
|
-
"EntryOverviewMobileActions": "alinea-EntryOverview-mobileActions",
|
|
84
84
|
"MissingEntry-media": "alinea-MissingEntry-media",
|
|
85
85
|
"MissingEntryMedia": "alinea-MissingEntry-media",
|
|
86
|
+
"EntryEditorLayout-sidebar": "alinea-EntryEditorLayout-sidebar",
|
|
87
|
+
"EntryEditorLayoutSidebar": "alinea-EntryEditorLayout-sidebar",
|
|
86
88
|
"EntryEditor-toolbar": "alinea-EntryEditor-toolbar",
|
|
87
89
|
"EntryEditorToolbar": "alinea-EntryEditor-toolbar",
|
|
90
|
+
"EntryEditorContent-navigationActions": "alinea-EntryEditorContent-navigationActions",
|
|
91
|
+
"EntryEditorContentNavigationActions": "alinea-EntryEditorContent-navigationActions",
|
|
88
92
|
"EntryEditor-fields": "alinea-EntryEditor-fields",
|
|
89
93
|
"EntryEditorFields": "alinea-EntryEditor-fields",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"EntryEditor-banner": "alinea-EntryEditor-banner",
|
|
95
|
+
"EntryEditorBanner": "alinea-EntryEditor-banner",
|
|
96
|
+
"MissingEntry": "alinea-MissingEntry",
|
|
97
|
+
"EntryOverview-mobileActions": "alinea-EntryOverview-mobileActions",
|
|
98
|
+
"EntryOverviewMobileActions": "alinea-EntryOverview-mobileActions"
|
|
92
99
|
};
|
|
93
100
|
|
|
94
101
|
// src/dashboard/app/pages/EntryPage.tsx
|
|
@@ -386,7 +393,7 @@ function EntryEditorContent({
|
|
|
386
393
|
children: routeBlock && /* @__PURE__ */ jsxs(DashboardModalDialog, { label: "Confirm navigation", children: [
|
|
387
394
|
/* @__PURE__ */ jsxs(DashboardModalContent, { children: [
|
|
388
395
|
"This entry has unsaved changes",
|
|
389
|
-
dirtyActions.publish && hasErrors ? ",
|
|
396
|
+
dirtyActions.publish && hasErrors ? ", and some fields are invalid" : ""
|
|
390
397
|
] }),
|
|
391
398
|
/* @__PURE__ */ jsxs(DashboardModalFooter, { children: [
|
|
392
399
|
/* @__PURE__ */ jsx(Button, { onClick: discardAndConfirm, variant: "ghost", children: "Discard my changes" }),
|
|
@@ -397,8 +404,7 @@ function EntryEditorContent({
|
|
|
397
404
|
onClick: publishAndConfirm,
|
|
398
405
|
color: canSaveDraft ? "secondary" : "primary",
|
|
399
406
|
icon: IcRoundCheck,
|
|
400
|
-
|
|
401
|
-
children: "Publish"
|
|
407
|
+
children: hasErrors ? "Publish anyway" : "Publish"
|
|
402
408
|
}
|
|
403
409
|
),
|
|
404
410
|
dirtyActions.saveDraft && /* @__PURE__ */ jsx(
|
|
@@ -422,19 +428,32 @@ function EntryEditorContent({
|
|
|
422
428
|
localeData,
|
|
423
429
|
richTextImages,
|
|
424
430
|
selectedEntry,
|
|
425
|
-
children: /* @__PURE__ */ jsx(
|
|
426
|
-
|
|
431
|
+
children: /* @__PURE__ */ jsx(BlockSheetProvider, { children: /* @__PURE__ */ jsx(
|
|
432
|
+
EntryEditorLayout,
|
|
427
433
|
{
|
|
428
|
-
side: "right",
|
|
429
|
-
visible: Boolean(sidebar && isSidebarOpen),
|
|
430
434
|
sidebar: sidebar && isSidebarOpen && /* @__PURE__ */ jsx(EntrySidebar, { ...sidebar, onOpenChange: setSidebarOpen }),
|
|
431
435
|
children: mainEditor
|
|
432
436
|
}
|
|
433
|
-
)
|
|
437
|
+
) })
|
|
434
438
|
}
|
|
435
439
|
)
|
|
436
440
|
] });
|
|
437
441
|
}
|
|
442
|
+
function EntryEditorLayout({ sidebar, children }) {
|
|
443
|
+
const sheetOpen = useBlockSheetOpen();
|
|
444
|
+
return /* @__PURE__ */ jsx(
|
|
445
|
+
SidebarLayout,
|
|
446
|
+
{
|
|
447
|
+
side: "right",
|
|
448
|
+
visible: Boolean(sidebar) || sheetOpen,
|
|
449
|
+
sidebar: /* @__PURE__ */ jsxs("div", { className: styles.EntryEditorLayout.sidebar(), children: [
|
|
450
|
+
sidebar,
|
|
451
|
+
/* @__PURE__ */ jsx(BlockSheetSlot, {})
|
|
452
|
+
] }),
|
|
453
|
+
children
|
|
454
|
+
}
|
|
455
|
+
);
|
|
456
|
+
}
|
|
438
457
|
export {
|
|
439
458
|
NotFoundPanel,
|
|
440
459
|
entryPage
|
|
@@ -44,57 +44,57 @@ import { GlobalSearch, WorkspaceAvatar } from "../WorkspaceMenu.js";
|
|
|
44
44
|
|
|
45
45
|
// src/dashboard/app/pages/SplashPage.module.css
|
|
46
46
|
var SplashPage_default = {
|
|
47
|
-
"SplashPage-sidebar-content": "alinea-SplashPage-sidebar-content",
|
|
48
|
-
"SplashPageSidebarContent": "alinea-SplashPage-sidebar-content",
|
|
49
|
-
"SplashPage-actionIcon": "alinea-SplashPage-actionIcon",
|
|
50
|
-
"SplashPageActionIcon": "alinea-SplashPage-actionIcon",
|
|
51
|
-
"SplashPage-card-header-button": "alinea-SplashPage-card-header-button",
|
|
52
|
-
"SplashPageCardHeaderButton": "alinea-SplashPage-card-header-button",
|
|
53
|
-
"SplashPage-card": "alinea-SplashPage-card",
|
|
54
|
-
"SplashPageCard": "alinea-SplashPage-card",
|
|
55
|
-
"SplashPage-root": "alinea-SplashPage-root",
|
|
56
|
-
"SplashPageRoot": "alinea-SplashPage-root",
|
|
57
|
-
"SplashPage-card-header": "alinea-SplashPage-card-header",
|
|
58
|
-
"SplashPageCardHeader": "alinea-SplashPage-card-header",
|
|
59
|
-
"SplashPage-entry-visual-icon": "alinea-SplashPage-entry-visual-icon",
|
|
60
|
-
"SplashPageEntryVisualIcon": "alinea-SplashPage-entry-visual-icon",
|
|
61
|
-
"SplashPage": "alinea-SplashPage",
|
|
62
|
-
"SplashPage-user": "alinea-SplashPage-user",
|
|
63
|
-
"SplashPageUser": "alinea-SplashPage-user",
|
|
64
|
-
"SplashPage-sidebar": "alinea-SplashPage-sidebar",
|
|
65
|
-
"SplashPageSidebar": "alinea-SplashPage-sidebar",
|
|
66
47
|
"SplashPage-content": "alinea-SplashPage-content",
|
|
67
48
|
"SplashPageContent": "alinea-SplashPage-content",
|
|
68
|
-
"SplashPage-
|
|
69
|
-
"
|
|
49
|
+
"SplashPage-card-header-content": "alinea-SplashPage-card-header-content",
|
|
50
|
+
"SplashPageCardHeaderContent": "alinea-SplashPage-card-header-content",
|
|
51
|
+
"SplashPage-card-footer": "alinea-SplashPage-card-footer",
|
|
52
|
+
"SplashPageCardFooter": "alinea-SplashPage-card-footer",
|
|
70
53
|
"SplashPage-card-header-label": "alinea-SplashPage-card-header-label",
|
|
71
54
|
"SplashPageCardHeaderLabel": "alinea-SplashPage-card-header-label",
|
|
72
|
-
"SplashPage-
|
|
73
|
-
"
|
|
74
|
-
"SplashPage-entry-title": "alinea-SplashPage-entry-title",
|
|
75
|
-
"SplashPageEntryTitle": "alinea-SplashPage-entry-title",
|
|
55
|
+
"SplashPage-sidebar-content": "alinea-SplashPage-sidebar-content",
|
|
56
|
+
"SplashPageSidebarContent": "alinea-SplashPage-sidebar-content",
|
|
76
57
|
"SplashPage-entry": "alinea-SplashPage-entry",
|
|
77
58
|
"SplashPageEntry": "alinea-SplashPage-entry",
|
|
59
|
+
"SplashPage-entry-user": "alinea-SplashPage-entry-user",
|
|
60
|
+
"SplashPageEntryUser": "alinea-SplashPage-entry-user",
|
|
61
|
+
"SplashPage-entry-content": "alinea-SplashPage-entry-content",
|
|
62
|
+
"SplashPageEntryContent": "alinea-SplashPage-entry-content",
|
|
63
|
+
"SplashPage-entry-primary": "alinea-SplashPage-entry-primary",
|
|
64
|
+
"SplashPageEntryPrimary": "alinea-SplashPage-entry-primary",
|
|
78
65
|
"SplashPage-grid": "alinea-SplashPage-grid",
|
|
79
66
|
"SplashPageGrid": "alinea-SplashPage-grid",
|
|
80
|
-
"SplashPage-
|
|
81
|
-
"
|
|
67
|
+
"SplashPage-card-header-button": "alinea-SplashPage-card-header-button",
|
|
68
|
+
"SplashPageCardHeaderButton": "alinea-SplashPage-card-header-button",
|
|
69
|
+
"SplashPage-sidebar": "alinea-SplashPage-sidebar",
|
|
70
|
+
"SplashPageSidebar": "alinea-SplashPage-sidebar",
|
|
82
71
|
"SplashPage-entry-meta": "alinea-SplashPage-entry-meta",
|
|
83
72
|
"SplashPageEntryMeta": "alinea-SplashPage-entry-meta",
|
|
73
|
+
"SplashPage-actionIcon": "alinea-SplashPage-actionIcon",
|
|
74
|
+
"SplashPageActionIcon": "alinea-SplashPage-actionIcon",
|
|
75
|
+
"SplashPage-entry-visual": "alinea-SplashPage-entry-visual",
|
|
76
|
+
"SplashPageEntryVisual": "alinea-SplashPage-entry-visual",
|
|
77
|
+
"SplashPage-entries": "alinea-SplashPage-entries",
|
|
78
|
+
"SplashPageEntries": "alinea-SplashPage-entries",
|
|
79
|
+
"SplashPage-entry-visual-icon": "alinea-SplashPage-entry-visual-icon",
|
|
80
|
+
"SplashPageEntryVisualIcon": "alinea-SplashPage-entry-visual-icon",
|
|
81
|
+
"SplashPage-user": "alinea-SplashPage-user",
|
|
82
|
+
"SplashPageUser": "alinea-SplashPage-user",
|
|
84
83
|
"SplashPage-action": "alinea-SplashPage-action",
|
|
85
84
|
"SplashPageAction": "alinea-SplashPage-action",
|
|
85
|
+
"SplashPage-card-header-title": "alinea-SplashPage-card-header-title",
|
|
86
|
+
"SplashPageCardHeaderTitle": "alinea-SplashPage-card-header-title",
|
|
87
|
+
"SplashPage-entry-title": "alinea-SplashPage-entry-title",
|
|
88
|
+
"SplashPageEntryTitle": "alinea-SplashPage-entry-title",
|
|
89
|
+
"SplashPage-root": "alinea-SplashPage-root",
|
|
90
|
+
"SplashPageRoot": "alinea-SplashPage-root",
|
|
86
91
|
"SplashPage-appearance": "alinea-SplashPage-appearance",
|
|
87
92
|
"SplashPageAppearance": "alinea-SplashPage-appearance",
|
|
88
|
-
"SplashPage-
|
|
89
|
-
"
|
|
90
|
-
"SplashPage
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"SplashPageCardHeaderContent": "alinea-SplashPage-card-header-content",
|
|
94
|
-
"SplashPage-entries": "alinea-SplashPage-entries",
|
|
95
|
-
"SplashPageEntries": "alinea-SplashPage-entries",
|
|
96
|
-
"SplashPage-card-header-title": "alinea-SplashPage-card-header-title",
|
|
97
|
-
"SplashPageCardHeaderTitle": "alinea-SplashPage-card-header-title"
|
|
93
|
+
"SplashPage-card": "alinea-SplashPage-card",
|
|
94
|
+
"SplashPageCard": "alinea-SplashPage-card",
|
|
95
|
+
"SplashPage": "alinea-SplashPage",
|
|
96
|
+
"SplashPage-card-header": "alinea-SplashPage-card-header",
|
|
97
|
+
"SplashPageCardHeader": "alinea-SplashPage-card-header"
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
// src/dashboard/app/pages/SplashPage.tsx
|
|
@@ -61,25 +61,25 @@ import {
|
|
|
61
61
|
|
|
62
62
|
// src/dashboard/app/pages/UsersPage.module.css
|
|
63
63
|
var UsersPage_default = {
|
|
64
|
-
"UsersPage-search": "alinea-UsersPage-search",
|
|
65
|
-
"UsersPageSearch": "alinea-UsersPage-search",
|
|
66
|
-
"UsersPage-table": "alinea-UsersPage-table",
|
|
67
|
-
"UsersPageTable": "alinea-UsersPage-table",
|
|
68
|
-
"UsersPage": "alinea-UsersPage",
|
|
69
64
|
"UsersPage-roles": "alinea-UsersPage-roles",
|
|
70
65
|
"UsersPageRoles": "alinea-UsersPage-roles",
|
|
71
|
-
"UsersPage-createButton": "alinea-UsersPage-createButton",
|
|
72
|
-
"UsersPageCreateButton": "alinea-UsersPage-createButton",
|
|
73
|
-
"UsersPage-status": "alinea-UsersPage-status",
|
|
74
|
-
"UsersPageStatus": "alinea-UsersPage-status",
|
|
75
|
-
"UsersPage-form-fields": "alinea-UsersPage-form-fields",
|
|
76
|
-
"UsersPageFormFields": "alinea-UsersPage-form-fields",
|
|
77
66
|
"UsersPage-identity": "alinea-UsersPage-identity",
|
|
78
67
|
"UsersPageIdentity": "alinea-UsersPage-identity",
|
|
68
|
+
"UsersPage": "alinea-UsersPage",
|
|
79
69
|
"UsersPage-header": "alinea-UsersPage-header",
|
|
80
70
|
"UsersPageHeader": "alinea-UsersPage-header",
|
|
71
|
+
"UsersPage-table": "alinea-UsersPage-table",
|
|
72
|
+
"UsersPageTable": "alinea-UsersPage-table",
|
|
73
|
+
"UsersPage-search": "alinea-UsersPage-search",
|
|
74
|
+
"UsersPageSearch": "alinea-UsersPage-search",
|
|
75
|
+
"UsersPage-createButton": "alinea-UsersPage-createButton",
|
|
76
|
+
"UsersPageCreateButton": "alinea-UsersPage-createButton",
|
|
81
77
|
"UsersPage-content": "alinea-UsersPage-content",
|
|
82
|
-
"UsersPageContent": "alinea-UsersPage-content"
|
|
78
|
+
"UsersPageContent": "alinea-UsersPage-content",
|
|
79
|
+
"UsersPage-status": "alinea-UsersPage-status",
|
|
80
|
+
"UsersPageStatus": "alinea-UsersPage-status",
|
|
81
|
+
"UsersPage-form-fields": "alinea-UsersPage-form-fields",
|
|
82
|
+
"UsersPageFormFields": "alinea-UsersPage-form-fields"
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
// src/dashboard/app/pages/UsersPage.tsx
|
|
@@ -21,29 +21,30 @@ import {
|
|
|
21
21
|
useContext
|
|
22
22
|
} from "react";
|
|
23
23
|
import { IcRoundClose } from "../../icons.js";
|
|
24
|
+
import { BlockSheetBoundary } from "../BlockSheet.js";
|
|
24
25
|
|
|
25
26
|
// src/dashboard/app/ui/DashboardModal.module.css
|
|
26
27
|
var DashboardModal_default = {
|
|
27
|
-
"
|
|
28
|
+
"DashboardModalFormBody": "alinea-DashboardModalFormBody",
|
|
29
|
+
"DashboardModalDialog-loader": "alinea-DashboardModalDialog-loader",
|
|
30
|
+
"DashboardModalDialogLoader": "alinea-DashboardModalDialog-loader",
|
|
31
|
+
"DashboardModalFormHeader": "alinea-DashboardModalFormHeader",
|
|
32
|
+
"is-loading": "alinea-is-loading",
|
|
33
|
+
"isLoading": "alinea-is-loading",
|
|
28
34
|
"DashboardModalCloseButton": "alinea-DashboardModalCloseButton",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
35
|
+
"DashboardModalContent": "alinea-DashboardModalContent",
|
|
36
|
+
"DashboardModalTitle": "alinea-DashboardModalTitle",
|
|
37
|
+
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
38
|
+
"DashboardModalDialog": "alinea-DashboardModalDialog",
|
|
39
|
+
"DashboardModalFooter": "alinea-DashboardModalFooter",
|
|
31
40
|
"DashboardModal": "alinea-DashboardModal",
|
|
32
41
|
"DashboardModalForm": "alinea-DashboardModalForm",
|
|
33
|
-
"DashboardModalFormHeader": "alinea-DashboardModalFormHeader",
|
|
34
42
|
"DashboardModalDialog-header": "alinea-DashboardModalDialog-header",
|
|
35
43
|
"DashboardModalDialogHeader": "alinea-DashboardModalDialog-header",
|
|
36
|
-
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
37
44
|
"DashboardModal-enter": "alinea-DashboardModal-enter",
|
|
38
45
|
"DashboardModalEnter": "alinea-DashboardModal-enter",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"DashboardModalDialog": "alinea-DashboardModalDialog",
|
|
42
|
-
"DashboardModalDialog-loader": "alinea-DashboardModalDialog-loader",
|
|
43
|
-
"DashboardModalDialogLoader": "alinea-DashboardModalDialog-loader",
|
|
44
|
-
"DashboardModalTitle": "alinea-DashboardModalTitle",
|
|
45
|
-
"DashboardModalFormBody": "alinea-DashboardModalFormBody",
|
|
46
|
-
"DashboardModalContent": "alinea-DashboardModalContent",
|
|
46
|
+
"DashboardModalDialog-controls": "alinea-DashboardModalDialog-controls",
|
|
47
|
+
"DashboardModalDialogControls": "alinea-DashboardModalDialog-controls",
|
|
47
48
|
"DashboardModal-surface": "alinea-DashboardModal-surface",
|
|
48
49
|
"DashboardModalSurface": "alinea-DashboardModal-surface"
|
|
49
50
|
};
|
|
@@ -68,7 +69,7 @@ function DashboardModal({
|
|
|
68
69
|
showCloseButton: false,
|
|
69
70
|
"aria-label": ariaLabel,
|
|
70
71
|
className: styles.DashboardModal(),
|
|
71
|
-
children: /* @__PURE__ */ jsx(DashboardModalLabel.Provider, { value: ariaLabel, children: /* @__PURE__ */ jsx(Surface, { className: styles.DashboardModal.surface(), children }) })
|
|
72
|
+
children: /* @__PURE__ */ jsx(DashboardModalLabel.Provider, { value: ariaLabel, children: /* @__PURE__ */ jsx(Surface, { className: styles.DashboardModal.surface(), children: /* @__PURE__ */ jsx(BlockSheetBoundary, { children }) }) })
|
|
72
73
|
}
|
|
73
74
|
);
|
|
74
75
|
if (open === void 0) return content;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-G43W7AME.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
6
|
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
@@ -9,7 +9,6 @@ import "../../chunks/chunk-CQ52GEHY.js";
|
|
|
9
9
|
// src/dashboard/atoms/entry.ts
|
|
10
10
|
import { JsonLoader } from "alinea/backend/loader/JsonLoader";
|
|
11
11
|
import { Config } from "alinea/core/Config";
|
|
12
|
-
import { EntryValidationError } from "alinea/core/db/EntryValidationError";
|
|
13
12
|
import { Entry } from "alinea/core/Entry";
|
|
14
13
|
import { createRecord, parseRecord } from "alinea/core/EntryRecord";
|
|
15
14
|
import { Field } from "alinea/core/Field";
|
|
@@ -372,16 +371,6 @@ var EntryLocaleAtoms = class {
|
|
|
372
371
|
hasErrors = dispense(
|
|
373
372
|
(node) => atom((get) => get(this.errors(node)).length > 0)
|
|
374
373
|
);
|
|
375
|
-
#assertValid(get, node) {
|
|
376
|
-
const errors = get(this.errors(node));
|
|
377
|
-
if (errors.length === 0) return;
|
|
378
|
-
const title = get(node.value).title;
|
|
379
|
-
throw new EntryValidationError({
|
|
380
|
-
entryId: this.entry.id,
|
|
381
|
-
title: typeof title === "string" ? title : void 0,
|
|
382
|
-
errors
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
374
|
saveDraft = atom(null, async (get, set, node) => {
|
|
386
375
|
const dataState = get(this.entry.data);
|
|
387
376
|
const { id, type } = dataState;
|
|
@@ -422,7 +411,6 @@ var EntryLocaleAtoms = class {
|
|
|
422
411
|
const graph = get(graphAtom);
|
|
423
412
|
const { checkpoint, data } = prepareData(get, node, typeConfig);
|
|
424
413
|
policy.assert(Permission.Publish, activeEntry);
|
|
425
|
-
this.#assertValid(get, node);
|
|
426
414
|
const saved = await graph.create({
|
|
427
415
|
type: typeConfig,
|
|
428
416
|
id,
|
|
@@ -460,7 +448,6 @@ var EntryLocaleAtoms = class {
|
|
|
460
448
|
const config = get(configAtom);
|
|
461
449
|
const type = config.schema[dataState.type];
|
|
462
450
|
assert(type, `Type "${dataState.type}" not found in config`);
|
|
463
|
-
if (!config.enableDrafts) this.#assertValid(get, node);
|
|
464
451
|
const { checkpoint, data } = prepareData(get, node, type);
|
|
465
452
|
const graph = get(graphAtom);
|
|
466
453
|
const saved = await graph.create({
|
|
@@ -38,6 +38,8 @@ export interface ExplorerOptions {
|
|
|
38
38
|
initialSearchScope?: 'workspace' | 'everything';
|
|
39
39
|
location?: ExplorerLocation;
|
|
40
40
|
limitLocations?: Array<ExplorerLimitLocation>;
|
|
41
|
+
/** Lists only the media roots, for pickers of files and images */
|
|
42
|
+
media?: boolean;
|
|
41
43
|
mode?: 'browse' | 'search';
|
|
42
44
|
nestedNavigation?: boolean;
|
|
43
45
|
/**
|
|
@@ -142,6 +144,8 @@ export interface ExplorerItemData {
|
|
|
142
144
|
createdAt?: number | null;
|
|
143
145
|
id: string;
|
|
144
146
|
status?: EntryStatus;
|
|
147
|
+
/** The version is the main one, a draft then was never published */
|
|
148
|
+
main?: boolean;
|
|
145
149
|
title: string;
|
|
146
150
|
path: string;
|
|
147
151
|
updatedAt?: number | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-G43W7AME.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
6
|
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
@@ -18,6 +18,7 @@ import { chunks } from "alinea/core/util/Arrays";
|
|
|
18
18
|
import { parents } from "alinea/query";
|
|
19
19
|
import { LucideFile } from "../icons.js";
|
|
20
20
|
import { activityAtom } from "./activity.js";
|
|
21
|
+
import { confirmMoveAtom, draggedEntriesAtom } from "./moveConfirmation.js";
|
|
21
22
|
import { configAtom, graphAtom } from "./core.js";
|
|
22
23
|
import { MissingEntryError, treeEntryAtoms } from "./entry.js";
|
|
23
24
|
import {
|
|
@@ -80,7 +81,14 @@ function explorerLocations(config, policy, options) {
|
|
|
80
81
|
const configured = options.limitLocations?.length ? options.limitLocations : Object.entries(config.workspaces).flatMap(
|
|
81
82
|
([workspace, value]) => Object.keys(getWorkspace(value).roots).map((root) => ({ workspace, root }))
|
|
82
83
|
);
|
|
83
|
-
return configured.filter(
|
|
84
|
+
return configured.filter(
|
|
85
|
+
(location) => policy.check(permission, location) && (!options.media || isMediaLocation(config, location))
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function isMediaLocation(config, location) {
|
|
89
|
+
const workspace = config.workspaces[location.workspace];
|
|
90
|
+
const root = workspace && getWorkspace(workspace).roots[location.root];
|
|
91
|
+
return Boolean(root && getRoot(root).isMediaRoot);
|
|
84
92
|
}
|
|
85
93
|
function explorerThumbnailId(type, data) {
|
|
86
94
|
return Type.references(type, data).find(
|
|
@@ -628,7 +636,8 @@ var ExplorerAtoms = class {
|
|
|
628
636
|
);
|
|
629
637
|
getDragData = atom(
|
|
630
638
|
null,
|
|
631
|
-
(_get,
|
|
639
|
+
(_get, set, keys) => {
|
|
640
|
+
set(draggedEntriesAtom, keys);
|
|
632
641
|
return [...keys].map(dashboardEntryDragItem);
|
|
633
642
|
}
|
|
634
643
|
);
|
|
@@ -657,10 +666,11 @@ var ExplorerAtoms = class {
|
|
|
657
666
|
/** Moves entries into the target entry */
|
|
658
667
|
moveInto = atom(
|
|
659
668
|
null,
|
|
660
|
-
async (get,
|
|
669
|
+
async (get, set, ids, target) => {
|
|
661
670
|
const graph = get(graphAtom);
|
|
662
|
-
|
|
663
|
-
|
|
671
|
+
const moving = [...ids].filter((id) => id !== String(target.key));
|
|
672
|
+
if (!await set(confirmMoveAtom, moving, target)) return;
|
|
673
|
+
for (const id of moving) {
|
|
664
674
|
await graph.move({
|
|
665
675
|
id,
|
|
666
676
|
target: String(target.key),
|
|
@@ -675,10 +685,11 @@ var ExplorerAtoms = class {
|
|
|
675
685
|
*/
|
|
676
686
|
reorder = atom(
|
|
677
687
|
null,
|
|
678
|
-
async (get,
|
|
688
|
+
async (get, set, ids, target, locale) => {
|
|
679
689
|
if (target.position === "on") return;
|
|
680
690
|
const listed = get(this.items(locale)).map((entry) => entry.id);
|
|
681
691
|
const moving = [...ids].filter((id) => id !== String(target.key)).sort((a, b) => listed.indexOf(a) - listed.indexOf(b));
|
|
692
|
+
if (!await set(confirmMoveAtom, moving, target)) return;
|
|
682
693
|
await moveEntries(get(graphAtom), moving, target);
|
|
683
694
|
}
|
|
684
695
|
);
|
|
@@ -936,6 +947,7 @@ var explorerItemSelect = {
|
|
|
936
947
|
createdAt: Entry.createdAt,
|
|
937
948
|
id: Entry.id,
|
|
938
949
|
status: Entry.status,
|
|
950
|
+
main: Entry.main,
|
|
939
951
|
title: Entry.title,
|
|
940
952
|
path: Entry.path,
|
|
941
953
|
updatedAt: Entry.updatedAt,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unwrap
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-G43W7AME.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
6
|
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
@@ -62,7 +62,10 @@ var linkEntryAtoms = dispense((id, locale) => {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
return unwrap(
|
|
65
|
+
return unwrap(
|
|
66
|
+
result,
|
|
67
|
+
(previous) => previous ?? { state: "loading" }
|
|
68
|
+
);
|
|
66
69
|
});
|
|
67
70
|
export {
|
|
68
71
|
linkEntryAtoms
|
|
@@ -25,6 +25,11 @@ export interface MoveTargets {
|
|
|
25
25
|
* and entries missing a language of the moved entries are not a target
|
|
26
26
|
*/
|
|
27
27
|
canSelect(item: ExplorerItemData): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Why the entries can not move into `parent`, or to the top level of the
|
|
30
|
+
* root with null; undefined when they can
|
|
31
|
+
*/
|
|
32
|
+
refusal(parent: MoveSubject | null): string | undefined;
|
|
28
33
|
/** The entries can be moved to the top level of the root */
|
|
29
34
|
rootAccepts: boolean;
|
|
30
35
|
}
|