alinea 2.0.0-preview.1 → 2.0.0-preview.2
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/LICENSES.md +61 -34
- package/dist/adapter/next/DevRemote.d.ts +3 -0
- package/dist/adapter/next/DevRemote.js +37 -0
- package/dist/adapter/next/ForwardCredentials.d.ts +1 -0
- package/dist/adapter/next/ForwardCredentials.js +17 -0
- package/dist/adapter/next/cms.js +86 -38
- package/dist/adapter/next/context.d.ts +1 -1
- package/dist/adapter/next/context.js +11 -3
- package/dist/adapter/next/handler.d.ts +2 -0
- package/dist/adapter/next/handler.js +23 -16
- package/dist/adapter/next/with-alinea.js +18 -16
- package/dist/backend/Handler.d.ts +14 -13
- package/dist/backend/Handler.js +53 -22
- package/dist/backend/resolver/ParsePreview.d.ts +8 -4
- package/dist/backend/resolver/ParsePreview.js +40 -43
- package/dist/bundled.d.ts +255 -60
- package/dist/chunks/{chunk-LUBOGJCG.js → chunk-6V4TAD2N.js} +1 -1
- package/dist/chunks/{chunk-TL7ZW6BX.js → chunk-A3XXZBOQ.js} +2535 -2999
- package/dist/chunks/chunk-AC5ATYI3.js +1434 -0
- package/dist/chunks/{chunk-7ORQ7BYK.js → chunk-KMLLLZ6X.js} +202 -269
- package/dist/chunks/{chunk-IWN3T3FL.js → chunk-O7XWTMCB.js} +1 -1
- package/dist/chunks/{chunk-53DZYORR.js → chunk-PAYSVIYI.js} +76 -176
- package/dist/chunks/{chunk-YK3OSMDM.js → chunk-S4AU6SRS.js} +188 -158
- package/dist/chunks/{chunk-FRYHNUEK.js → chunk-UVOEM4AH.js} +6 -3
- package/dist/chunks/{chunk-I7X64JTZ.js → chunk-VXZM6V4P.js} +4 -4
- package/dist/cli/Generate.js +3 -13
- package/dist/cli/Serve.js +7 -3
- package/dist/cli/bin.js +8 -5
- package/dist/cli/generate/CopyStaticFiles.js +2 -3
- package/dist/cli/generate/DevDB.d.ts +1 -1
- package/dist/cli/generate/DevDB.js +3 -5
- package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
- package/dist/cli/serve/CreateLocalServer.js +3 -2
- package/dist/cli/serve/DevServer.d.ts +3 -2
- package/dist/cli/serve/DevServer.js +60 -3
- package/dist/cli/serve/ServeContext.d.ts +1 -0
- package/dist/cli/serve/StartServer.d.ts +1 -0
- package/dist/cli/serve/StartServer.js +6 -1
- package/dist/cli/util/EnsureLibs.js +2 -2
- package/dist/cli/util/EnsureNode.js +2 -2
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Breadcrumbs.js +8 -8
- package/dist/components/Button.js +6 -6
- package/dist/components/Calendar.js +9 -9
- package/dist/components/Checkbox.js +9 -9
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/ColorSwatch.js +6 -6
- package/dist/components/ColorSwatchPicker.js +6 -6
- package/dist/components/ComboBox.js +16 -16
- package/dist/components/DateField.js +9 -9
- package/dist/components/DatePicker.js +11 -11
- package/dist/components/DateRangePicker.js +14 -14
- package/dist/components/Dialog.js +6 -6
- package/dist/components/Disclosure.js +14 -14
- package/dist/components/DropZone.js +6 -6
- package/dist/components/Label.js +14 -14
- package/dist/components/Link.js +6 -6
- package/dist/components/List.js +32 -32
- package/dist/components/Menu.js +10 -10
- package/dist/components/Modal.js +8 -8
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NumberField.d.ts +2 -1
- package/dist/components/NumberField.js +25 -15
- package/dist/components/Popover.js +6 -6
- package/dist/components/ProgressCircle.js +9 -9
- package/dist/components/RadioGroup.js +8 -8
- package/dist/components/SearchField.js +15 -15
- package/dist/components/Select.js +14 -14
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +8 -8
- package/dist/components/Table.js +14 -14
- package/dist/components/Tabs.js +7 -7
- package/dist/components/TagGroup.js +8 -8
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +8 -8
- package/dist/components/Toggle.js +8 -8
- package/dist/components/Toolbar.js +9 -9
- package/dist/components/Tooltip.js +7 -7
- package/dist/components/Tree.js +10 -10
- package/dist/core/Client.js +3 -2
- package/dist/core/Config.d.ts +4 -0
- package/dist/core/Config.js +6 -0
- package/dist/core/Connection.d.ts +2 -2
- package/dist/core/Connection.js +7 -0
- package/dist/core/Graph.d.ts +3 -4
- package/dist/core/ListRow.d.ts +2 -0
- package/dist/core/OrderBy.d.ts +7 -3
- package/dist/core/TextDoc.d.ts +11 -0
- package/dist/core/Trace.d.ts +8 -0
- package/dist/core/Trace.js +32 -0
- package/dist/core/db/CommitRequest.d.ts +0 -3
- package/dist/core/db/CommitRequest.js +0 -9
- package/dist/core/db/EntryDB.js +1 -1
- package/dist/core/db/EntryIndex.d.ts +10 -0
- package/dist/core/db/EntryIndex.js +117 -9
- package/dist/core/db/EntryResolver.js +104 -29
- package/dist/core/db/EntryTransaction.d.ts +1 -2
- package/dist/core/db/EntryTransaction.js +25 -13
- package/dist/core/db/LocalDB.d.ts +2 -3
- package/dist/core/db/LocalDB.js +24 -19
- package/dist/core/field/RichTextField.d.ts +30 -3
- package/dist/core/field/RichTextField.js +125 -41
- package/dist/core/media/MediaAltField.d.ts +1 -0
- package/dist/core/media/MediaAltField.js +9 -1
- package/dist/core/source/OverlaySource.d.ts +12 -0
- package/dist/core/source/OverlaySource.js +50 -0
- package/dist/core/source/Source.d.ts +1 -1
- package/dist/core/source/Source.js +3 -3
- package/dist/dashboard/App.css +158 -0
- package/dist/dashboard/App.js +3 -3
- package/dist/dashboard/app/AccessDenied.js +1 -1
- package/dist/dashboard/app/ActivityStatus.js +14 -14
- package/dist/dashboard/app/AppShell.js +2 -2
- package/dist/dashboard/app/AuthView.js +12 -12
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +13 -13
- package/dist/dashboard/app/DashboardErrorBoundary.js +6 -6
- package/dist/dashboard/app/DashboardLayout.js +22 -19
- package/dist/dashboard/app/EntryHeader.js +10 -10
- package/dist/dashboard/app/EntryReferences.js +9 -9
- package/dist/dashboard/app/EntrySidebar.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebar.js +19 -18
- package/dist/dashboard/app/EntrySidebarPreview.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebarPreview.js +20 -15
- package/dist/dashboard/app/EntryTranslationBanner.js +6 -6
- package/dist/dashboard/app/Explorer.js +46 -46
- package/dist/dashboard/app/ExplorerCards.js +42 -42
- package/dist/dashboard/app/ExplorerFileCard.js +16 -16
- package/dist/dashboard/app/ExplorerList.js +15 -15
- package/dist/dashboard/app/ExplorerModal.js +5 -5
- package/dist/dashboard/app/ExplorerTable.js +54 -54
- package/dist/dashboard/app/ExternalLinkPicker.js +15 -4
- package/dist/dashboard/app/LinkPicker.js +6 -6
- package/dist/dashboard/app/LocaleMenu.js +11 -11
- package/dist/dashboard/app/SidebarLayout.d.ts +8 -0
- package/dist/dashboard/app/SidebarLayout.js +1169 -0
- package/dist/dashboard/app/SidebarTree.js +44 -44
- package/dist/dashboard/app/WorkspaceMenu.js +17 -17
- package/dist/dashboard/app/WorkspaceRoots.js +26 -26
- package/dist/dashboard/app/editor/FileEditor.js +28 -29
- package/dist/dashboard/app/editor/FilePreview.js +2 -2
- package/dist/dashboard/app/editor/MediaAltField.view.d.ts +1 -1
- package/dist/dashboard/app/editor/MediaAltField.view.js +6 -9
- package/dist/dashboard/app/modals/CreateEntry.js +4 -4
- package/dist/dashboard/app/pages/EntryPage.js +49 -25
- package/dist/dashboard/app/pages/UsersPage.js +38 -38
- package/dist/dashboard/app/ui/DashboardModal.js +22 -22
- package/dist/dashboard/app/ui/Rail.js +2 -2
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- package/dist/dashboard/atoms/auth.js +2 -0
- package/dist/dashboard/atoms/dashboard.d.ts +9 -0
- package/dist/dashboard/atoms/dashboard.js +17 -0
- package/dist/dashboard/atoms/editor.d.ts +7 -1
- package/dist/dashboard/atoms/editor.js +4 -1
- package/dist/dashboard/atoms/entry.d.ts +3 -1
- package/dist/dashboard/atoms/entry.js +55 -15
- package/dist/dashboard/atoms/explorer.js +3 -8
- package/dist/dashboard/atoms/preview.d.ts +3 -0
- package/dist/dashboard/atoms/preview.js +18 -1
- package/dist/dashboard/hooks.d.ts +4 -2
- package/dist/dashboard/hooks.js +9 -5
- package/dist/dashboard/icons.d.ts +1 -0
- package/dist/dashboard/icons.js +10 -0
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +13 -13
- package/dist/field/date/DateField.view.js +12 -2
- package/dist/field/link/Link.js +2 -2
- package/dist/field/link/LinkField.view.js +88 -77
- package/dist/field/list/ListField.view.js +22 -33
- package/dist/field/metadata/MetadataField.view.js +20 -20
- package/dist/field/number/NumberField.d.ts +2 -0
- package/dist/field/number/NumberField.view.js +4 -2
- package/dist/field/richtext/PickTextLink.d.ts +7 -0
- package/dist/field/richtext/PickTextLink.js +104 -2
- package/dist/field/richtext/ReferenceLink.d.ts +4 -1
- package/dist/field/richtext/ReferenceLink.js +18 -4
- package/dist/field/richtext/RichTextDocument.d.ts +7 -2
- package/dist/field/richtext/RichTextDocument.js +34 -5
- package/dist/field/richtext/RichTextExtensions.d.ts +3 -1
- package/dist/field/richtext/RichTextExtensions.js +2704 -7467
- package/dist/field/richtext/RichTextField.d.ts +4 -0
- package/dist/field/richtext/RichTextField.story.d.ts +4 -0
- package/dist/field/richtext/RichTextField.view.js +44 -21
- package/dist/field/richtext/RichTextInsertMenu.js +281 -495
- package/dist/field/richtext/RichTextToolbar.d.ts +5 -2
- package/dist/field/richtext/RichTextToolbar.js +38 -3
- package/dist/field/richtext/Toolbar.d.ts +19 -1
- package/dist/field/richtext/Toolbar.js +18 -13
- package/dist/field/richtext/extensions/Anchor.js +1 -1
- package/dist/field/richtext/extensions/Link.js +1 -1
- package/dist/field/richtext/extensions/Small.js +1 -1
- package/dist/field/select/SelectField.view.js +8 -6
- package/dist/index.css +219 -14
- package/dist/next.cjs +18 -16
- package/dist/next.d.ts +2 -1
- package/dist/next.edge.d.ts +2 -1
- package/dist/ui/RichText.d.ts +1 -0
- package/dist/ui/RichText.js +29 -2
- package/package.json +6 -3
- package/dist/chunks/{chunk-JFROOUG6.js → chunk-NIVGVRDS.js} +17 -17
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "../../../chunks/chunk-Y7XOMJOC.js";
|
|
10
10
|
import {
|
|
11
11
|
$232f8dea1b0a4f2f$export$762f73dccccd255d
|
|
12
|
-
} from "../../../chunks/chunk-
|
|
13
|
-
import "../../../chunks/chunk-SJBZFMQ2.js";
|
|
12
|
+
} from "../../../chunks/chunk-NIVGVRDS.js";
|
|
14
13
|
import "../../../chunks/chunk-IYAQC63Y.js";
|
|
14
|
+
import "../../../chunks/chunk-SJBZFMQ2.js";
|
|
15
15
|
import "../../../chunks/chunk-AC4U3IMS.js";
|
|
16
16
|
import {
|
|
17
17
|
dist_default
|
|
@@ -56,54 +56,54 @@ import { SidebarHeader } from "../ui/Sidebar.js";
|
|
|
56
56
|
|
|
57
57
|
// src/dashboard/app/pages/UsersPage.module.css
|
|
58
58
|
var UsersPage_default = {
|
|
59
|
-
"UsersPage-search": "alinea-UsersPage-search",
|
|
60
|
-
"UsersPageSearch": "alinea-UsersPage-search",
|
|
61
|
-
"UsersPage-confirmation": "alinea-UsersPage-confirmation",
|
|
62
|
-
"UsersPageConfirmation": "alinea-UsersPage-confirmation",
|
|
63
|
-
"UsersPageSidebar-item": "alinea-UsersPageSidebar-item",
|
|
64
|
-
"UsersPageSidebarItem": "alinea-UsersPageSidebar-item",
|
|
65
|
-
"UsersPage-identity-title": "alinea-UsersPage-identity-title",
|
|
66
|
-
"UsersPageIdentityTitle": "alinea-UsersPage-identity-title",
|
|
67
|
-
"UsersPage-identity": "alinea-UsersPage-identity",
|
|
68
|
-
"UsersPageIdentity": "alinea-UsersPage-identity",
|
|
69
59
|
"UsersPage-createButton": "alinea-UsersPage-createButton",
|
|
70
60
|
"UsersPageCreateButton": "alinea-UsersPage-createButton",
|
|
71
|
-
"UsersPage-
|
|
72
|
-
"
|
|
61
|
+
"UsersPage-noRoles": "alinea-UsersPage-noRoles",
|
|
62
|
+
"UsersPageNoRoles": "alinea-UsersPage-noRoles",
|
|
63
|
+
"UsersPageSidebar-item": "alinea-UsersPageSidebar-item",
|
|
64
|
+
"UsersPageSidebarItem": "alinea-UsersPageSidebar-item",
|
|
73
65
|
"UsersPage-identity-text": "alinea-UsersPage-identity-text",
|
|
74
66
|
"UsersPageIdentityText": "alinea-UsersPage-identity-text",
|
|
67
|
+
"UsersPageSidebar-footer": "alinea-UsersPageSidebar-footer",
|
|
68
|
+
"UsersPageSidebarFooter": "alinea-UsersPageSidebar-footer",
|
|
69
|
+
"UsersPage-header": "alinea-UsersPage-header",
|
|
70
|
+
"UsersPageHeader": "alinea-UsersPage-header",
|
|
71
|
+
"UsersPage-identity-email": "alinea-UsersPage-identity-email",
|
|
72
|
+
"UsersPageIdentityEmail": "alinea-UsersPage-identity-email",
|
|
73
|
+
"UsersPage-table": "alinea-UsersPage-table",
|
|
74
|
+
"UsersPageTable": "alinea-UsersPage-table",
|
|
75
|
+
"UsersPage-header-title": "alinea-UsersPage-header-title",
|
|
76
|
+
"UsersPageHeaderTitle": "alinea-UsersPage-header-title",
|
|
77
|
+
"UsersPage-content": "alinea-UsersPage-content",
|
|
78
|
+
"UsersPageContent": "alinea-UsersPage-content",
|
|
79
|
+
"UsersPage-empty": "alinea-UsersPage-empty",
|
|
80
|
+
"UsersPageEmpty": "alinea-UsersPage-empty",
|
|
81
|
+
"UsersPage-status": "alinea-UsersPage-status",
|
|
82
|
+
"UsersPageStatus": "alinea-UsersPage-status",
|
|
83
|
+
"UsersPage": "alinea-UsersPage",
|
|
84
|
+
"UsersPage-roles": "alinea-UsersPage-roles",
|
|
85
|
+
"UsersPageRoles": "alinea-UsersPage-roles",
|
|
86
|
+
"UsersPage-status-text": "alinea-UsersPage-status-text",
|
|
87
|
+
"UsersPageStatusText": "alinea-UsersPage-status-text",
|
|
75
88
|
"UsersPage-form-fields": "alinea-UsersPage-form-fields",
|
|
76
89
|
"UsersPageFormFields": "alinea-UsersPage-form-fields",
|
|
90
|
+
"UsersPage-identity": "alinea-UsersPage-identity",
|
|
91
|
+
"UsersPageIdentity": "alinea-UsersPage-identity",
|
|
92
|
+
"UsersPage-identity-title": "alinea-UsersPage-identity-title",
|
|
93
|
+
"UsersPageIdentityTitle": "alinea-UsersPage-identity-title",
|
|
94
|
+
"UsersPage-rolesCell": "alinea-UsersPage-rolesCell",
|
|
95
|
+
"UsersPageRolesCell": "alinea-UsersPage-rolesCell",
|
|
77
96
|
"UsersPage-form-error": "alinea-UsersPage-form-error",
|
|
78
97
|
"UsersPageFormError": "alinea-UsersPage-form-error",
|
|
79
|
-
"UsersPage-
|
|
80
|
-
"
|
|
98
|
+
"UsersPage-confirmation": "alinea-UsersPage-confirmation",
|
|
99
|
+
"UsersPageConfirmation": "alinea-UsersPage-confirmation",
|
|
100
|
+
"UsersPageSidebar": "alinea-UsersPageSidebar",
|
|
81
101
|
"UsersPageSidebar-nav": "alinea-UsersPageSidebar-nav",
|
|
82
102
|
"UsersPageSidebarNav": "alinea-UsersPageSidebar-nav",
|
|
83
|
-
"UsersPage-header": "alinea-UsersPage-header",
|
|
84
|
-
"UsersPageHeader": "alinea-UsersPage-header",
|
|
85
103
|
"UsersPageSidebar-icon": "alinea-UsersPageSidebar-icon",
|
|
86
104
|
"UsersPageSidebarIcon": "alinea-UsersPageSidebar-icon",
|
|
87
|
-
"UsersPage-
|
|
88
|
-
"
|
|
89
|
-
"UsersPage": "alinea-UsersPage",
|
|
90
|
-
"UsersPage-content": "alinea-UsersPage-content",
|
|
91
|
-
"UsersPageContent": "alinea-UsersPage-content",
|
|
92
|
-
"UsersPage-rolesCell": "alinea-UsersPage-rolesCell",
|
|
93
|
-
"UsersPageRolesCell": "alinea-UsersPage-rolesCell",
|
|
94
|
-
"UsersPage-status-text": "alinea-UsersPage-status-text",
|
|
95
|
-
"UsersPageStatusText": "alinea-UsersPage-status-text",
|
|
96
|
-
"UsersPage-identity-email": "alinea-UsersPage-identity-email",
|
|
97
|
-
"UsersPageIdentityEmail": "alinea-UsersPage-identity-email",
|
|
98
|
-
"UsersPage-roles": "alinea-UsersPage-roles",
|
|
99
|
-
"UsersPageRoles": "alinea-UsersPage-roles",
|
|
100
|
-
"UsersPageSidebar-footer": "alinea-UsersPageSidebar-footer",
|
|
101
|
-
"UsersPageSidebarFooter": "alinea-UsersPageSidebar-footer",
|
|
102
|
-
"UsersPage-noRoles": "alinea-UsersPage-noRoles",
|
|
103
|
-
"UsersPageNoRoles": "alinea-UsersPage-noRoles",
|
|
104
|
-
"UsersPage-status": "alinea-UsersPage-status",
|
|
105
|
-
"UsersPageStatus": "alinea-UsersPage-status",
|
|
106
|
-
"UsersPageSidebar": "alinea-UsersPageSidebar"
|
|
105
|
+
"UsersPage-search": "alinea-UsersPage-search",
|
|
106
|
+
"UsersPageSearch": "alinea-UsersPage-search"
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
// src/dashboard/app/pages/UsersPage.tsx
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
$f2ff30fde7b014be$export$d2f961adcb0afbe
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
5
|
-
import "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-VXZM6V4P.js";
|
|
5
|
+
import "../../../chunks/chunk-O7XWTMCB.js";
|
|
6
6
|
import "../../../chunks/chunk-RKDPDEF7.js";
|
|
7
|
-
import "../../../chunks/chunk-
|
|
8
|
-
import "../../../chunks/chunk-SJBZFMQ2.js";
|
|
7
|
+
import "../../../chunks/chunk-NIVGVRDS.js";
|
|
9
8
|
import "../../../chunks/chunk-IYAQC63Y.js";
|
|
10
|
-
import "../../../chunks/chunk-
|
|
11
|
-
import "../../../chunks/chunk-
|
|
9
|
+
import "../../../chunks/chunk-SJBZFMQ2.js";
|
|
10
|
+
import "../../../chunks/chunk-6V4TAD2N.js";
|
|
11
|
+
import "../../../chunks/chunk-S4AU6SRS.js";
|
|
12
12
|
import "../../../chunks/chunk-AC4U3IMS.js";
|
|
13
13
|
import {
|
|
14
14
|
dist_default
|
|
@@ -24,32 +24,32 @@ import { IcRoundClose } from "../../icons.js";
|
|
|
24
24
|
|
|
25
25
|
// src/dashboard/app/ui/DashboardModal.module.css
|
|
26
26
|
var DashboardModal_default = {
|
|
27
|
-
"
|
|
28
|
-
"isLoading": "alinea-is-loading",
|
|
29
|
-
"DashboardModal-enter": "alinea-DashboardModal-enter",
|
|
30
|
-
"DashboardModalEnter": "alinea-DashboardModal-enter",
|
|
31
|
-
"DashboardModalForm": "alinea-DashboardModalForm",
|
|
32
|
-
"DashboardModalOverlay": "alinea-DashboardModalOverlay",
|
|
27
|
+
"DashboardModalContent": "alinea-DashboardModalContent",
|
|
33
28
|
"is-explorer": "alinea-is-explorer",
|
|
34
29
|
"isExplorer": "alinea-is-explorer",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
30
|
+
"DashboardModal": "alinea-DashboardModal",
|
|
31
|
+
"DashboardModalDialog-header": "alinea-DashboardModalDialog-header",
|
|
32
|
+
"DashboardModalDialogHeader": "alinea-DashboardModalDialog-header",
|
|
33
|
+
"DashboardModalSeparator": "alinea-DashboardModalSeparator",
|
|
34
|
+
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
37
35
|
"DashboardModalDialog": "alinea-DashboardModalDialog",
|
|
36
|
+
"DashboardModalForm": "alinea-DashboardModalForm",
|
|
37
|
+
"DashboardModalOverlay": "alinea-DashboardModalOverlay",
|
|
38
38
|
"DashboardModal-surface": "alinea-DashboardModal-surface",
|
|
39
39
|
"DashboardModalSurface": "alinea-DashboardModal-surface",
|
|
40
|
+
"DashboardModalCloseButton": "alinea-DashboardModalCloseButton",
|
|
41
|
+
"DashboardModalFooter": "alinea-DashboardModalFooter",
|
|
42
|
+
"DashboardModal-enter": "alinea-DashboardModal-enter",
|
|
43
|
+
"DashboardModalEnter": "alinea-DashboardModal-enter",
|
|
40
44
|
"DashboardModalDialog-controls": "alinea-DashboardModalDialog-controls",
|
|
41
45
|
"DashboardModalDialogControls": "alinea-DashboardModalDialog-controls",
|
|
42
46
|
"DashboardModalFormBody": "alinea-DashboardModalFormBody",
|
|
43
|
-
"DashboardModalTitle": "alinea-DashboardModalTitle",
|
|
44
|
-
"DashboardModalFooter": "alinea-DashboardModalFooter",
|
|
45
|
-
"DashboardModalFormFooter": "alinea-DashboardModalFormFooter",
|
|
46
47
|
"DashboardModalDialog-loader": "alinea-DashboardModalDialog-loader",
|
|
47
48
|
"DashboardModalDialogLoader": "alinea-DashboardModalDialog-loader",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"DashboardModalDialogHeader": "alinea-DashboardModalDialog-header"
|
|
49
|
+
"DashboardModalFormHeader": "alinea-DashboardModalFormHeader",
|
|
50
|
+
"is-loading": "alinea-is-loading",
|
|
51
|
+
"isLoading": "alinea-is-loading",
|
|
52
|
+
"DashboardModalTitle": "alinea-DashboardModalTitle"
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
// src/dashboard/app/ui/DashboardModal.tsx
|
|
@@ -5,12 +5,12 @@ import "../../../chunks/chunk-CQ52GEHY.js";
|
|
|
5
5
|
|
|
6
6
|
// src/dashboard/app/ui/Rail.module.css
|
|
7
7
|
var Rail_default = {
|
|
8
|
+
"RailFooter": "alinea-RailFooter",
|
|
8
9
|
"is-main": "alinea-is-main",
|
|
9
10
|
"isMain": "alinea-is-main",
|
|
10
|
-
"Rail": "alinea-Rail",
|
|
11
|
-
"RailFooter": "alinea-RailFooter",
|
|
12
11
|
"RailBody": "alinea-RailBody",
|
|
13
12
|
"RailHeader": "alinea-RailHeader",
|
|
13
|
+
"Rail": "alinea-Rail",
|
|
14
14
|
"RailContent": "alinea-RailContent"
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ import { Rail, RailHeader } from "./Rail.js";
|
|
|
8
8
|
|
|
9
9
|
// src/dashboard/app/ui/Sidebar.module.css
|
|
10
10
|
var Sidebar_default = {
|
|
11
|
+
"SidebarHeader": "alinea-SidebarHeader",
|
|
11
12
|
"SidebarBody": "alinea-SidebarBody",
|
|
12
|
-
"Sidebar": "alinea-Sidebar"
|
|
13
|
-
"SidebarHeader": "alinea-SidebarHeader"
|
|
13
|
+
"Sidebar": "alinea-Sidebar"
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// src/dashboard/app/ui/Sidebar.tsx
|
|
@@ -23,6 +23,8 @@ var authAtom = Object.assign(
|
|
|
23
23
|
atom(
|
|
24
24
|
(get) => {
|
|
25
25
|
if (!get(authRequiredAtom)) {
|
|
26
|
+
const state = get(authState);
|
|
27
|
+
if (state.status === "authenticated") return state;
|
|
26
28
|
const userData = typeof process !== "undefined" && process.env.ALINEA_USER;
|
|
27
29
|
return {
|
|
28
30
|
status: "authenticated",
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { SetStateAction } from 'react';
|
|
2
2
|
export type DashboardTheme = 'system' | 'light' | 'dark';
|
|
3
|
+
export declare const dashboardMobileAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
4
|
+
init: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const navigationSidebarWidthAtom: import("jotai").PrimitiveAtom<number> & {
|
|
7
|
+
init: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const entrySidebarWidthAtom: import("jotai").PrimitiveAtom<number> & {
|
|
10
|
+
init: number;
|
|
11
|
+
};
|
|
3
12
|
export declare const entrySidebarOpenAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
4
13
|
init: boolean;
|
|
5
14
|
};
|
|
@@ -15,6 +15,20 @@ var themeStorageAtom = atomWithStorage(
|
|
|
15
15
|
"system",
|
|
16
16
|
void 0
|
|
17
17
|
);
|
|
18
|
+
var mobileMediaQuery = "(max-width: 768px)";
|
|
19
|
+
var dashboardMobileAtom = atom(
|
|
20
|
+
typeof window !== "undefined" && (window.matchMedia?.(mobileMediaQuery).matches ?? false)
|
|
21
|
+
);
|
|
22
|
+
dashboardMobileAtom.onMount = (setMobile) => {
|
|
23
|
+
const media = window.matchMedia?.(mobileMediaQuery);
|
|
24
|
+
if (!media) return;
|
|
25
|
+
const update = () => setMobile(media.matches);
|
|
26
|
+
update();
|
|
27
|
+
media.addEventListener("change", update);
|
|
28
|
+
return () => media.removeEventListener("change", update);
|
|
29
|
+
};
|
|
30
|
+
var navigationSidebarWidthAtom = atom(320);
|
|
31
|
+
var entrySidebarWidthAtom = atom(320);
|
|
18
32
|
var entrySidebarOpenAtom = atom(
|
|
19
33
|
typeof window === "undefined" || !window.matchMedia?.("(max-width: 768px)").matches
|
|
20
34
|
);
|
|
@@ -65,7 +79,10 @@ function applyDashboardTheme(theme) {
|
|
|
65
79
|
}
|
|
66
80
|
export {
|
|
67
81
|
canLogoutAtom,
|
|
82
|
+
dashboardMobileAtom,
|
|
68
83
|
entrySidebarOpenAtom,
|
|
84
|
+
entrySidebarWidthAtom,
|
|
69
85
|
logoutAtom,
|
|
86
|
+
navigationSidebarWidthAtom,
|
|
70
87
|
themeAtom
|
|
71
88
|
};
|
|
@@ -5,6 +5,10 @@ import { Section } from 'alinea/core/Section';
|
|
|
5
5
|
import { Type } from 'alinea/core/Type';
|
|
6
6
|
import type { Atom, WritableAtom } from 'jotai';
|
|
7
7
|
import type { ComponentType, ReactNode } from 'react';
|
|
8
|
+
export interface ResolvedEditorImage {
|
|
9
|
+
src: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
}
|
|
8
12
|
export interface EditorNode {
|
|
9
13
|
readOnly: boolean;
|
|
10
14
|
nodes: WritableAtom<unknown, [unknown], void>;
|
|
@@ -15,6 +19,7 @@ export interface EditorModel {
|
|
|
15
19
|
anchors: Atom<Array<EntryAnchorTarget>>;
|
|
16
20
|
node: EditorNode;
|
|
17
21
|
parent?: EditorModel;
|
|
22
|
+
resolvedImages: ReadonlyMap<string, ResolvedEditorImage>;
|
|
18
23
|
sections: Array<EditorSection>;
|
|
19
24
|
type: Type;
|
|
20
25
|
field(key: string): EditorField | undefined;
|
|
@@ -45,10 +50,11 @@ export declare class EntryEditor implements EditorModel {
|
|
|
45
50
|
parent?: EntryEditor | undefined;
|
|
46
51
|
resource?: Resource | undefined;
|
|
47
52
|
policy?: Policy | undefined;
|
|
53
|
+
resolvedImages: ReadonlyMap<string, ResolvedEditorImage>;
|
|
48
54
|
anchors: Atom<Array<EntryAnchorTarget>>;
|
|
49
55
|
value: Atom<object>;
|
|
50
56
|
sections: Array<EntryEditorSection>;
|
|
51
|
-
constructor(type: Type, node: EditorNode, parent?: EntryEditor | undefined, resource?: Resource | undefined, policy?: Policy | undefined);
|
|
57
|
+
constructor(type: Type, node: EditorNode, parent?: EntryEditor | undefined, resource?: Resource | undefined, policy?: Policy | undefined, resolvedImages?: ReadonlyMap<string, ResolvedEditorImage>);
|
|
52
58
|
field: (key: string) => EntryEditorField | undefined;
|
|
53
59
|
get(field: Field): EntryEditorField | undefined;
|
|
54
60
|
}
|
|
@@ -12,13 +12,15 @@ import { Type } from "alinea/core/Type";
|
|
|
12
12
|
import { assert } from "alinea/core/util/Assert";
|
|
13
13
|
import { configAtom, viewsAtom } from "./core.js";
|
|
14
14
|
import { dispense } from "./utils.js";
|
|
15
|
+
var emptyResolvedImages = /* @__PURE__ */ new Map();
|
|
15
16
|
var EntryEditor = class {
|
|
16
|
-
constructor(type, node, parent, resource, policy) {
|
|
17
|
+
constructor(type, node, parent, resource, policy, resolvedImages = parent?.resolvedImages ?? emptyResolvedImages) {
|
|
17
18
|
this.type = type;
|
|
18
19
|
this.node = node;
|
|
19
20
|
this.parent = parent;
|
|
20
21
|
this.resource = resource;
|
|
21
22
|
this.policy = policy;
|
|
23
|
+
this.resolvedImages = resolvedImages;
|
|
22
24
|
this.resource ??= parent?.resource;
|
|
23
25
|
this.policy ??= parent?.policy;
|
|
24
26
|
this.value = node.value;
|
|
@@ -34,6 +36,7 @@ var EntryEditor = class {
|
|
|
34
36
|
parent;
|
|
35
37
|
resource;
|
|
36
38
|
policy;
|
|
39
|
+
resolvedImages;
|
|
37
40
|
anchors;
|
|
38
41
|
value;
|
|
39
42
|
sections;
|
|
@@ -3,6 +3,7 @@ import { Entry, EntryStatus } from 'alinea/core/Entry';
|
|
|
3
3
|
import type { Order } from 'alinea/core/Graph';
|
|
4
4
|
import { type EntryDefaultView } from 'alinea/core/Type';
|
|
5
5
|
import { Atom, Getter } from 'jotai';
|
|
6
|
+
import type { ResolvedEditorImage } from './editor.js';
|
|
6
7
|
import { ReactiveNode } from './ReactiveNode.js';
|
|
7
8
|
interface EntryData {
|
|
8
9
|
id: string;
|
|
@@ -68,6 +69,7 @@ export declare class EntryLocaleAtoms {
|
|
|
68
69
|
historyReady: Atom<Promise<import("../../core/Connection.js").Revision[]>>;
|
|
69
70
|
history: Atom<import("../../core/Connection.js").Revision[]>;
|
|
70
71
|
selectedNode: Atom<Promise<ReactiveNode<object>>>;
|
|
72
|
+
richTextImages: Atom<Promise<Map<string, ResolvedEditorImage>>>;
|
|
71
73
|
anchors: Atom<Promise<import("alinea/core/Field").EntryAnchorTarget[]>>;
|
|
72
74
|
retryPreviewUrl: import("jotai").WritableAtom<null, [], void> & {
|
|
73
75
|
init: null;
|
|
@@ -123,7 +125,7 @@ export declare class EntryLocaleAtoms {
|
|
|
123
125
|
searchableText: string;
|
|
124
126
|
} | undefined>;
|
|
125
127
|
previewUrlReady: Atom<Promise<string | undefined>>;
|
|
126
|
-
|
|
128
|
+
previewUrlState: Atom<readonly [false, string | undefined] | readonly [true, string | undefined]>;
|
|
127
129
|
previewPayloadSignal: Atom<(object | null | undefined)[]>;
|
|
128
130
|
updatePreviewPayload: import("jotai").WritableAtom<null, [], Promise<string | undefined>> & {
|
|
129
131
|
init: null;
|
|
@@ -13,6 +13,8 @@ import { Entry } from "alinea/core/Entry";
|
|
|
13
13
|
import { createRecord, parseRecord } from "alinea/core/EntryRecord";
|
|
14
14
|
import { getRoot, getType, getWorkspace } from "alinea/core/Internal";
|
|
15
15
|
import { createPreview } from "alinea/core/media/CreatePreview.browser";
|
|
16
|
+
import { mediaAltText } from "alinea/core/media/MediaAltField";
|
|
17
|
+
import { MediaFile } from "alinea/core/media/MediaTypes";
|
|
16
18
|
import { Permission } from "alinea/core/Role";
|
|
17
19
|
import { Root } from "alinea/core/Root";
|
|
18
20
|
import { createFilePatch } from "alinea/core/source/FilePatch";
|
|
@@ -24,9 +26,10 @@ import { encodePreviewPayload } from "alinea/preview/PreviewPayload";
|
|
|
24
26
|
import { parents, translations } from "alinea/query";
|
|
25
27
|
import { clientAtom, configAtom, graphAtom } from "./core.js";
|
|
26
28
|
import { entryRevisionAtom, shaAtom } from "./graph.js";
|
|
29
|
+
import { getPreviewToken, retryPreviewToken } from "./preview.js";
|
|
27
30
|
import { ReactiveNode } from "./ReactiveNode.js";
|
|
28
31
|
import { policyAtom, userAtom } from "./user.js";
|
|
29
|
-
import { dispense, loader } from "./utils.js";
|
|
32
|
+
import { atomWithPending, dispense, loader } from "./utils.js";
|
|
30
33
|
var selection = {
|
|
31
34
|
id: Entry.id,
|
|
32
35
|
type: Entry.type,
|
|
@@ -166,6 +169,46 @@ var EntryLocaleAtoms = class {
|
|
|
166
169
|
});
|
|
167
170
|
return new ReactiveNode(value, readOnly);
|
|
168
171
|
});
|
|
172
|
+
richTextImages = atom(async (get) => {
|
|
173
|
+
const entry = await get(this.selectedEntry);
|
|
174
|
+
const config = get(configAtom);
|
|
175
|
+
const type = config.schema[entry.type];
|
|
176
|
+
assert(type, `Type "${entry.type}" not found in config`);
|
|
177
|
+
const value = Type.withInitialValue(type, {
|
|
178
|
+
...Type.initialValue(type),
|
|
179
|
+
...entry.data
|
|
180
|
+
});
|
|
181
|
+
const imageIds = Array.from(
|
|
182
|
+
new Set(
|
|
183
|
+
Type.references(type, value).filter((reference) => reference.linkType === "image").map((reference) => reference.targetId)
|
|
184
|
+
)
|
|
185
|
+
);
|
|
186
|
+
if (imageIds.length === 0) return /* @__PURE__ */ new Map();
|
|
187
|
+
const graph = get(graphAtom);
|
|
188
|
+
const images = await graph.find({
|
|
189
|
+
id: { in: imageIds },
|
|
190
|
+
preferredLocale: this.requestedLocale ?? entry.locale ?? void 0,
|
|
191
|
+
status: "preferDraft",
|
|
192
|
+
select: {
|
|
193
|
+
id: Entry.id,
|
|
194
|
+
url: Entry.url,
|
|
195
|
+
alt: MediaFile.alt
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
const baseUrl = Config.baseUrl(config) ?? (typeof location === "undefined" ? void 0 : location.href);
|
|
199
|
+
return new Map(
|
|
200
|
+
images.map((image) => [
|
|
201
|
+
image.id,
|
|
202
|
+
{
|
|
203
|
+
src: URL.parse(image.url, baseUrl)?.href ?? "",
|
|
204
|
+
alt: mediaAltText(
|
|
205
|
+
image.alt,
|
|
206
|
+
this.requestedLocale ?? entry.locale ?? void 0
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
])
|
|
210
|
+
);
|
|
211
|
+
});
|
|
169
212
|
anchors = atom(async (get) => {
|
|
170
213
|
const entry = await get(this.selectedEntry);
|
|
171
214
|
const node = await get(this.selectedNode);
|
|
@@ -173,9 +216,10 @@ var EntryLocaleAtoms = class {
|
|
|
173
216
|
assert(type, `Type "${entry.type}" not found in config`);
|
|
174
217
|
return Type.anchors(type, get(node.value));
|
|
175
218
|
});
|
|
176
|
-
#
|
|
219
|
+
#previewUrlRetry = atom(0);
|
|
177
220
|
retryPreviewUrl = atom(null, (get, set) => {
|
|
178
|
-
|
|
221
|
+
retryPreviewToken(get(clientAtom));
|
|
222
|
+
set(this.#previewUrlRetry, (current) => current + 1);
|
|
179
223
|
});
|
|
180
224
|
previewEntryReady = atom(async (get) => {
|
|
181
225
|
const activeEntry = await get(this.selectedEntry);
|
|
@@ -189,31 +233,27 @@ var EntryLocaleAtoms = class {
|
|
|
189
233
|
};
|
|
190
234
|
});
|
|
191
235
|
previewEntry = unwrap(this.previewEntryReady, (previous) => previous);
|
|
192
|
-
#previewTargetUrl = atom((get) => {
|
|
193
|
-
const versions = get(this.versions);
|
|
194
|
-
const entry = Array.from(versions.values()).find((version) => version.active) ?? versions.values().next().value;
|
|
195
|
-
return entry?.url;
|
|
196
|
-
});
|
|
197
236
|
previewUrlReady = atom(async (get) => {
|
|
198
|
-
get(this.#
|
|
199
|
-
const
|
|
237
|
+
get(this.#previewUrlRetry);
|
|
238
|
+
const versions = get(this.versions);
|
|
239
|
+
const targetUrl = Array.from(versions.values()).find((version) => version.active)?.url ?? versions.values().next().value?.url;
|
|
200
240
|
if (!targetUrl) return void 0;
|
|
201
241
|
const config = get(configAtom);
|
|
202
|
-
const client = get(clientAtom);
|
|
203
|
-
if (typeof client.previewToken !== "function") return void 0;
|
|
204
242
|
try {
|
|
205
243
|
const base = new URL(
|
|
206
|
-
|
|
244
|
+
Config.handlerUrl(config),
|
|
207
245
|
Config.baseUrl(config) ?? (typeof location === "undefined" ? "http://localhost" : location.href)
|
|
208
246
|
);
|
|
209
|
-
|
|
247
|
+
const previewToken = await getPreviewToken(get(clientAtom));
|
|
248
|
+
if (!previewToken) return void 0;
|
|
249
|
+
base.searchParams.set("preview", previewToken);
|
|
210
250
|
base.searchParams.set("returnTo", targetUrl);
|
|
211
251
|
return base.toString();
|
|
212
252
|
} catch {
|
|
213
253
|
return void 0;
|
|
214
254
|
}
|
|
215
255
|
});
|
|
216
|
-
|
|
256
|
+
previewUrlState = atomWithPending(this.previewUrlReady);
|
|
217
257
|
previewPayloadSignal = atom((get) => {
|
|
218
258
|
const version = get(this.selectedVersion);
|
|
219
259
|
const editing = get(this.currentlyEditing);
|
|
@@ -496,6 +496,7 @@ var ExplorerAtoms = class {
|
|
|
496
496
|
const graph = get(graphAtom);
|
|
497
497
|
const sort = get(this.sort);
|
|
498
498
|
const filter = get(this.filter);
|
|
499
|
+
const orderField = sort.sortBy === "title" ? Entry.title : sort.sortBy === "path" ? Entry.path : sort.sortBy === "size" ? MediaFile.size : sort.sortBy === "id" ? Entry.id : Entry.index;
|
|
499
500
|
const entries = await graph.find({
|
|
500
501
|
workspace: entry.workspace,
|
|
501
502
|
root: entry.root,
|
|
@@ -505,10 +506,7 @@ var ExplorerAtoms = class {
|
|
|
505
506
|
type: filter,
|
|
506
507
|
status: "preferDraft",
|
|
507
508
|
groupBy: Entry.id,
|
|
508
|
-
orderBy: {
|
|
509
|
-
[sort.direction]: sort.sortBy === "title" ? Entry.title : sort.sortBy === "path" ? Entry.path : sort.sortBy === "size" ? MediaFile.size : sort.sortBy === "id" ? Entry.id : Entry.index,
|
|
510
|
-
caseSensitive: sort.sortBy !== "id"
|
|
511
|
-
},
|
|
509
|
+
orderBy: sort.direction === "asc" ? { asc: orderField, caseSensitive: sort.sortBy !== "id" } : { desc: orderField, caseSensitive: sort.sortBy !== "id" },
|
|
512
510
|
select: {
|
|
513
511
|
active: Entry.active,
|
|
514
512
|
createdAt: Entry.createdAt,
|
|
@@ -596,10 +594,7 @@ var ExplorerAtoms = class {
|
|
|
596
594
|
type: filter,
|
|
597
595
|
status: "preferDraft",
|
|
598
596
|
groupBy: Entry.id,
|
|
599
|
-
orderBy: search ? void 0 : selectedSort === void 0 && defaultOrderBy !== void 0 ? defaultOrderBy : {
|
|
600
|
-
[sort.direction]: orderField,
|
|
601
|
-
caseSensitive: sort.sortBy !== "id"
|
|
602
|
-
},
|
|
597
|
+
orderBy: search ? void 0 : selectedSort === void 0 && defaultOrderBy !== void 0 ? defaultOrderBy : sort.direction === "asc" ? { asc: orderField, caseSensitive: sort.sortBy !== "id" } : { desc: orderField, caseSensitive: sort.sortBy !== "id" },
|
|
603
598
|
select: {
|
|
604
599
|
active: Entry.active,
|
|
605
600
|
createdAt: Entry.createdAt,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { LocalConnection } from 'alinea/core/Connection';
|
|
1
2
|
import type { PreviewMetadata } from 'alinea/core/Preview';
|
|
3
|
+
export declare function getPreviewToken(client: LocalConnection): Promise<string | undefined>;
|
|
4
|
+
export declare function retryPreviewToken(client: LocalConnection): void;
|
|
2
5
|
export declare const previewMetadataAtom: import("jotai").PrimitiveAtom<PreviewMetadata | undefined> & {
|
|
3
6
|
init: PreviewMetadata | undefined;
|
|
4
7
|
};
|
|
@@ -4,7 +4,24 @@ import {
|
|
|
4
4
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
5
|
|
|
6
6
|
// src/dashboard/atoms/preview.ts
|
|
7
|
+
var previewTokens = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
function getPreviewToken(client) {
|
|
9
|
+
const current = previewTokens.get(client);
|
|
10
|
+
if (current) return current;
|
|
11
|
+
const request = typeof client.previewToken === "function" ? client.previewToken() : Promise.resolve(void 0);
|
|
12
|
+
const token = request.catch((error) => {
|
|
13
|
+
if (previewTokens.get(client) === token) previewTokens.delete(client);
|
|
14
|
+
throw error;
|
|
15
|
+
});
|
|
16
|
+
previewTokens.set(client, token);
|
|
17
|
+
return token;
|
|
18
|
+
}
|
|
19
|
+
function retryPreviewToken(client) {
|
|
20
|
+
previewTokens.delete(client);
|
|
21
|
+
}
|
|
7
22
|
var previewMetadataAtom = atom(void 0);
|
|
8
23
|
export {
|
|
9
|
-
|
|
24
|
+
getPreviewToken,
|
|
25
|
+
previewMetadataAtom,
|
|
26
|
+
retryPreviewToken
|
|
10
27
|
};
|
|
@@ -9,7 +9,7 @@ import type { User } from 'alinea/core/User';
|
|
|
9
9
|
import type { WorkspaceInternal } from 'alinea/core/Workspace';
|
|
10
10
|
import { Type } from 'alinea';
|
|
11
11
|
import type { ComponentType, Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
12
|
-
import { type EditorModel, type EditorNode, EntryEditor } from './atoms/editor.js';
|
|
12
|
+
import { type EditorModel, type EditorNode, EntryEditor, type ResolvedEditorImage } from './atoms/editor.js';
|
|
13
13
|
import type { EntryAtoms, EntryLocaleAtoms } from './atoms/entry.js';
|
|
14
14
|
import type { Page } from './atoms/nav.js';
|
|
15
15
|
import type { RootAtoms } from './atoms/root.js';
|
|
@@ -17,6 +17,7 @@ import type { ReactiveNode } from './atoms/ReactiveNode.js';
|
|
|
17
17
|
interface EntryContextValue {
|
|
18
18
|
entry: EntryAtoms;
|
|
19
19
|
localeData: EntryLocaleAtoms;
|
|
20
|
+
richTextImages: ReadonlyMap<string, ResolvedEditorImage>;
|
|
20
21
|
selectedEntry: EntryRecord<Record<string, unknown>>;
|
|
21
22
|
}
|
|
22
23
|
export interface DashboardOptions {
|
|
@@ -84,9 +85,10 @@ export declare function useDashboardContext(): DashboardContextValue;
|
|
|
84
85
|
export interface EntryScopeProps {
|
|
85
86
|
entry: EntryAtoms;
|
|
86
87
|
localeData: EntryLocaleAtoms;
|
|
88
|
+
richTextImages: ReadonlyMap<string, ResolvedEditorImage>;
|
|
87
89
|
selectedEntry: EntryRecord<Record<string, unknown>>;
|
|
88
90
|
}
|
|
89
|
-
export declare function EntryScope({ children, entry, localeData, selectedEntry }: PropsWithChildren<EntryScopeProps>): import("react").FunctionComponentElement<import("react").ProviderProps<EntryContextValue | null>>;
|
|
91
|
+
export declare function EntryScope({ children, entry, localeData, richTextImages, selectedEntry }: PropsWithChildren<EntryScopeProps>): import("react").FunctionComponentElement<import("react").ProviderProps<EntryContextValue | null>>;
|
|
90
92
|
export declare function useEntryAtoms(): EntryContextValue;
|
|
91
93
|
export declare function useOptionalEntryAtoms(): EntryContextValue | null;
|
|
92
94
|
/**
|
package/dist/dashboard/hooks.js
CHANGED
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
localAtom,
|
|
23
23
|
viewsAtom
|
|
24
24
|
} from "./atoms/core.js";
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
EntryEditor
|
|
27
|
+
} from "./atoms/editor.js";
|
|
26
28
|
import { previewMetadataAtom } from "./atoms/preview.js";
|
|
27
29
|
import { policyAtom, userAtom } from "./atoms/user.js";
|
|
28
30
|
var entryContext = createContext(null);
|
|
@@ -99,11 +101,12 @@ function EntryScope({
|
|
|
99
101
|
children,
|
|
100
102
|
entry,
|
|
101
103
|
localeData,
|
|
104
|
+
richTextImages,
|
|
102
105
|
selectedEntry
|
|
103
106
|
}) {
|
|
104
107
|
const value = useMemo(
|
|
105
|
-
() => ({ entry, localeData, selectedEntry }),
|
|
106
|
-
[entry, localeData, selectedEntry]
|
|
108
|
+
() => ({ entry, localeData, richTextImages, selectedEntry }),
|
|
109
|
+
[entry, localeData, richTextImages, selectedEntry]
|
|
107
110
|
);
|
|
108
111
|
return createElement(entryContext.Provider, { value }, children);
|
|
109
112
|
}
|
|
@@ -137,9 +140,10 @@ function useNodeEditor(node, type) {
|
|
|
137
140
|
node,
|
|
138
141
|
parent instanceof EntryEditor ? parent : void 0,
|
|
139
142
|
activeVersion ?? void 0,
|
|
140
|
-
policy
|
|
143
|
+
policy,
|
|
144
|
+
scope?.richTextImages
|
|
141
145
|
);
|
|
142
|
-
}, [activeVersion, node, parent, policy, type]);
|
|
146
|
+
}, [activeVersion, node, parent, policy, scope?.richTextImages, type]);
|
|
143
147
|
return editor;
|
|
144
148
|
}
|
|
145
149
|
function useFieldNode(field) {
|
|
@@ -107,6 +107,7 @@ export declare function IcRoundMoreHoriz(props: SVGProps<SVGSVGElement>): import
|
|
|
107
107
|
export declare function IcRoundMoreVert(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
108
108
|
export declare function IcRoundNorthEast(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
109
109
|
export declare function IcRoundNumbers(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
110
|
+
export declare function IcRoundOpenInFull(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
110
111
|
export declare function IcRoundOpenInNew(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
111
112
|
export declare function IcRoundPanorama(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
112
113
|
export declare function IcRoundPermMedia(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
package/dist/dashboard/icons.js
CHANGED
|
@@ -1631,6 +1631,15 @@ function IcRoundNumbers(props) {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
) });
|
|
1633
1633
|
}
|
|
1634
|
+
function IcRoundOpenInFull(props) {
|
|
1635
|
+
return /* @__PURE__ */ jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx(
|
|
1636
|
+
"path",
|
|
1637
|
+
{
|
|
1638
|
+
fill: "currentColor",
|
|
1639
|
+
d: "M21 8.59V4c0-.55-.45-1-1-1h-4.59c-.89 0-1.34 1.08-.71 1.71l1.59 1.59l-10 10l-1.59-1.59c-.62-.63-1.7-.19-1.7.7V20c0 .55.45 1 1 1h4.59c.89 0 1.34-1.08.71-1.71L7.71 17.7l10-10l1.59 1.59c.62.63 1.7.19 1.7-.7"
|
|
1640
|
+
}
|
|
1641
|
+
) });
|
|
1642
|
+
}
|
|
1634
1643
|
function IcRoundOpenInNew(props) {
|
|
1635
1644
|
return /* @__PURE__ */ jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx(
|
|
1636
1645
|
"path",
|
|
@@ -2615,6 +2624,7 @@ export {
|
|
|
2615
2624
|
IcRoundNorthEast,
|
|
2616
2625
|
IcRoundNotes,
|
|
2617
2626
|
IcRoundNumbers,
|
|
2627
|
+
IcRoundOpenInFull,
|
|
2618
2628
|
IcRoundOpenInNew,
|
|
2619
2629
|
IcRoundPanorama,
|
|
2620
2630
|
IcRoundPermMedia,
|
|
@@ -9,9 +9,9 @@ import { useField, useFieldError, useFieldOptions } from "alinea/dashboard/hooks
|
|
|
9
9
|
|
|
10
10
|
// src/field/check/CheckField.module.css
|
|
11
11
|
var CheckField_default = {
|
|
12
|
+
"checkline": "alinea-checkline",
|
|
12
13
|
"checkline-required": "alinea-checkline-required",
|
|
13
|
-
"checklineRequired": "alinea-checkline-required"
|
|
14
|
-
"checkline": "alinea-checkline"
|
|
14
|
+
"checklineRequired": "alinea-checkline-required"
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
// src/field/check/CheckField.view.tsx
|