alinea 2.0.0-preview.0 → 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 +134 -80
- 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 +70 -36
- package/dist/backend/resolver/ParsePreview.d.ts +8 -4
- package/dist/backend/resolver/ParsePreview.js +40 -43
- package/dist/backend/router/Router.d.ts +1 -0
- package/dist/backend/router/Router.js +21 -15
- package/dist/bundled.d.ts +369 -99
- package/dist/chunks/chunk-6UT4N4CO.js +919 -0
- 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-EQ3TDHYD.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/CompileConfig.js +3 -2
- 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.d.ts +2 -1
- package/dist/cloud/CloudRemote.js +3 -2
- package/dist/components/Breadcrumbs.js +8 -8
- package/dist/components/Button.js +6 -6
- package/dist/components/Calendar.js +11 -11
- package/dist/components/Checkbox.js +7 -7
- 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 +17 -17
- package/dist/components/DateField.js +9 -9
- package/dist/components/DatePicker.js +10 -10
- package/dist/components/DateRangePicker.js +14 -14
- package/dist/components/Dialog.js +6 -6
- package/dist/components/Disclosure.js +13 -13
- package/dist/components/DropZone.js +6 -6
- package/dist/components/Label.js +16 -16
- package/dist/components/Link.js +6 -6
- package/dist/components/List.js +34 -34
- package/dist/components/Menu.js +10 -10
- package/dist/components/Modal.js +8 -8
- package/dist/components/MultipleSelect.js +33 -33
- package/dist/components/NumberField.d.ts +2 -1
- package/dist/components/NumberField.js +21 -11
- package/dist/components/Popover.js +6 -6
- package/dist/components/ProgressCircle.js +10 -10
- package/dist/components/RadioGroup.js +6 -6
- package/dist/components/SearchField.js +11 -11
- package/dist/components/Select.js +13 -13
- package/dist/components/Surface.js +3 -3
- package/dist/components/Switch.js +6 -6
- package/dist/components/Table.js +13 -13
- package/dist/components/Tabs.js +8 -8
- package/dist/components/TagGroup.js +7 -7
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +6 -6
- package/dist/components/Toggle.js +6 -6
- package/dist/components/Toolbar.js +7 -7
- package/dist/components/Tooltip.js +10 -10
- package/dist/components/Tree.js +9 -9
- package/dist/core/BlobTransport.d.ts +5 -0
- package/dist/core/BlobTransport.js +79 -0
- package/dist/core/Client.d.ts +2 -1
- package/dist/core/Client.js +17 -12
- package/dist/core/Config.d.ts +4 -0
- package/dist/core/Config.js +6 -0
- package/dist/core/Connection.d.ts +4 -3
- 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/Type.d.ts +7 -1
- 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 +12 -2
- package/dist/core/db/EntryIndex.js +131 -22
- package/dist/core/db/EntryResolver.js +104 -29
- package/dist/core/db/EntryTransaction.d.ts +1 -2
- package/dist/core/db/EntryTransaction.js +29 -22
- package/dist/core/db/LocalDB.d.ts +5 -5
- package/dist/core/db/LocalDB.js +27 -12
- package/dist/core/field/RichTextField.d.ts +30 -3
- package/dist/core/field/RichTextField.js +124 -56
- package/dist/core/media/MediaAltField.d.ts +1 -0
- package/dist/core/media/MediaAltField.js +9 -1
- package/dist/core/media/MediaLocation.d.ts +5 -2
- package/dist/core/media/MediaLocation.js +6 -7
- package/dist/core/media/MediaTypes.js +11 -0
- package/dist/core/source/CombinedSource.d.ts +2 -2
- package/dist/core/source/CombinedSource.js +6 -3
- package/dist/core/source/FSSource.d.ts +4 -3
- package/dist/core/source/FSSource.js +59 -27
- package/dist/core/source/GithubSource.d.ts +2 -2
- package/dist/core/source/GithubSource.js +21 -9
- package/dist/core/source/IndexedDBSource.d.ts +2 -2
- package/dist/core/source/IndexedDBSource.js +3 -1
- package/dist/core/source/MemorySource.d.ts +2 -2
- package/dist/core/source/MemorySource.js +3 -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 +5 -2
- package/dist/core/source/Source.js +3 -3
- package/dist/core/util/Async.d.ts +8 -2
- package/dist/core/util/Async.js +67 -0
- package/dist/core/util/EntryFilenames.d.ts +2 -2
- package/dist/core/util/EntryFilenames.js +3 -3
- package/dist/dashboard/App.css +158 -0
- package/dist/dashboard/App.js +2 -2
- package/dist/dashboard/app/AccessDenied.js +3 -3
- package/dist/dashboard/app/ActivityStatus.js +15 -15
- package/dist/dashboard/app/AppShell.js +1 -1
- package/dist/dashboard/app/AuthView.js +11 -11
- package/dist/dashboard/app/CompactField.js +10 -10
- package/dist/dashboard/app/DashboardErrorBoundary.js +5 -5
- package/dist/dashboard/app/DashboardLayout.js +22 -19
- package/dist/dashboard/app/EntryHeader.js +12 -12
- package/dist/dashboard/app/EntryReferences.js +9 -9
- package/dist/dashboard/app/EntrySidebar.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebar.js +17 -16
- package/dist/dashboard/app/EntrySidebarPreview.d.ts +1 -1
- package/dist/dashboard/app/EntrySidebarPreview.js +19 -14
- package/dist/dashboard/app/EntryTranslationBanner.js +7 -7
- package/dist/dashboard/app/Explorer.js +51 -43
- package/dist/dashboard/app/ExplorerCards.js +34 -34
- package/dist/dashboard/app/ExplorerFileCard.js +18 -18
- package/dist/dashboard/app/ExplorerList.js +13 -13
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerTable.js +76 -61
- package/dist/dashboard/app/ExternalLinkPicker.js +15 -4
- package/dist/dashboard/app/LinkPicker.js +8 -8
- package/dist/dashboard/app/LocaleMenu.js +12 -12
- package/dist/dashboard/app/SidebarLayout.d.ts +8 -0
- package/dist/dashboard/app/SidebarLayout.js +1169 -0
- package/dist/dashboard/app/SidebarTree.js +46 -46
- package/dist/dashboard/app/WorkspaceMenu.js +17 -17
- package/dist/dashboard/app/WorkspaceRoots.js +23 -23
- package/dist/dashboard/app/editor/FileEditor.d.ts +2 -1
- package/dist/dashboard/app/editor/FileEditor.js +41 -32
- package/dist/dashboard/app/editor/FilePreview.js +4 -4
- 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 +57 -31
- package/dist/dashboard/app/pages/UsersPage.js +33 -33
- package/dist/dashboard/app/ui/DashboardModal.js +23 -23
- package/dist/dashboard/app/ui/Rail.js +3 -3
- 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 +48 -2
- package/dist/dashboard/atoms/entry.js +222 -17
- package/dist/dashboard/atoms/explorer.js +4 -9
- package/dist/dashboard/atoms/preview.d.ts +3 -0
- package/dist/dashboard/atoms/preview.js +18 -1
- package/dist/dashboard/atoms/root.d.ts +4 -1
- package/dist/dashboard/atoms/root.js +96 -157
- 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 +12 -12
- package/dist/field/date/DateField.view.js +12 -2
- package/dist/field/link/FileLink.d.ts +2 -2
- package/dist/field/link/FileLink.js +5 -3
- package/dist/field/link/ImageLink.d.ts +1 -1
- package/dist/field/link/ImageLink.js +1 -1
- package/dist/field/link/Link.js +2 -2
- package/dist/field/link/LinkField.view.js +155 -128
- package/dist/field/list/ListField.view.js +22 -33
- package/dist/field/metadata/MetadataField.view.js +19 -19
- 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 +43 -20
- 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 +227 -16
- package/dist/next.cjs +18 -16
- package/dist/next.d.ts +2 -1
- package/dist/next.edge.d.ts +2 -1
- package/dist/picker/entry/EntryPicker.js +9 -35
- package/dist/preview/PreviewPayload.js +35 -250
- package/dist/ui/RichText.d.ts +1 -0
- package/dist/ui/RichText.js +29 -2
- package/package.json +6 -3
- package/dist/cli/util/ExternalPlugin.d.ts +0 -2
- package/dist/cli/util/ExternalPlugin.js +0 -919
- package/dist/chunks/{chunk-JFROOUG6.js → chunk-NIVGVRDS.js} +17 -17
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
atom
|
|
11
11
|
} from "../../chunks/chunk-Y7XOMJOC.js";
|
|
12
|
-
import "../../chunks/chunk-
|
|
12
|
+
import "../../chunks/chunk-O7XWTMCB.js";
|
|
13
13
|
import "../../chunks/chunk-RKDPDEF7.js";
|
|
14
14
|
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
15
15
|
import {
|
|
16
16
|
$5d3a17cc2564e64f$export$905ab40ac2179daa,
|
|
17
17
|
$74812c42150b3de8$export$7941f8aafa4b6021,
|
|
18
18
|
$f302ef02e940a6f8$export$ccdee5eaf73cf661
|
|
19
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-S4AU6SRS.js";
|
|
20
20
|
import {
|
|
21
21
|
dist_default
|
|
22
22
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
Button,
|
|
28
28
|
DialogTrigger,
|
|
29
29
|
Icon,
|
|
30
|
+
Label,
|
|
30
31
|
List,
|
|
31
32
|
ListCreateRow,
|
|
32
33
|
ListDragPreview,
|
|
@@ -88,52 +89,56 @@ import { Fragment, useMemo, useRef, useState } from "react";
|
|
|
88
89
|
|
|
89
90
|
// src/field/link/LinkField.module.css
|
|
90
91
|
var LinkField_default = {
|
|
91
|
-
"LinkFieldView-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"LinkFieldView-
|
|
96
|
-
"
|
|
97
|
-
"LinkFieldView-metaLabel": "alinea-LinkFieldView-metaLabel",
|
|
98
|
-
"LinkFieldViewMetaLabel": "alinea-LinkFieldView-metaLabel",
|
|
99
|
-
"LinkFieldView-meta": "alinea-LinkFieldView-meta",
|
|
100
|
-
"LinkFieldViewMeta": "alinea-LinkFieldView-meta",
|
|
101
|
-
"LinkFieldView-anchorOption": "alinea-LinkFieldView-anchorOption",
|
|
102
|
-
"LinkFieldViewAnchorOption": "alinea-LinkFieldView-anchorOption",
|
|
92
|
+
"LinkFieldView-anchorOption-location": "alinea-LinkFieldView-anchorOption-location",
|
|
93
|
+
"LinkFieldViewAnchorOptionLocation": "alinea-LinkFieldView-anchorOption-location",
|
|
94
|
+
"is-loading": "alinea-is-loading",
|
|
95
|
+
"isLoading": "alinea-is-loading",
|
|
96
|
+
"LinkFieldView-inputHeader": "alinea-LinkFieldView-inputHeader",
|
|
97
|
+
"LinkFieldViewInputHeader": "alinea-LinkFieldView-inputHeader",
|
|
103
98
|
"LinkFieldView-labelText": "alinea-LinkFieldView-labelText",
|
|
104
99
|
"LinkFieldViewLabelText": "alinea-LinkFieldView-labelText",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"LinkFieldView-type": "alinea-LinkFieldView-type",
|
|
108
|
-
"LinkFieldViewType": "alinea-LinkFieldView-type",
|
|
109
|
-
"is-wide": "alinea-is-wide",
|
|
110
|
-
"isWide": "alinea-is-wide",
|
|
111
|
-
"LinkFieldView-previewImage": "alinea-LinkFieldView-previewImage",
|
|
112
|
-
"LinkFieldViewPreviewImage": "alinea-LinkFieldView-previewImage",
|
|
113
|
-
"LinkFieldView-rowDropTarget": "alinea-LinkFieldView-rowDropTarget",
|
|
114
|
-
"LinkFieldViewRowDropTarget": "alinea-LinkFieldView-rowDropTarget",
|
|
100
|
+
"LinkFieldView-title": "alinea-LinkFieldView-title",
|
|
101
|
+
"LinkFieldViewTitle": "alinea-LinkFieldView-title",
|
|
115
102
|
"LinkFieldView-anchorOption-label": "alinea-LinkFieldView-anchorOption-label",
|
|
116
103
|
"LinkFieldViewAnchorOptionLabel": "alinea-LinkFieldView-anchorOption-label",
|
|
117
|
-
"LinkFieldView-
|
|
118
|
-
"
|
|
119
|
-
"LinkFieldView-icon": "alinea-LinkFieldView-icon",
|
|
120
|
-
"LinkFieldViewIcon": "alinea-LinkFieldView-icon",
|
|
121
|
-
"LinkFieldView-imagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
122
|
-
"LinkFieldViewImagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
123
|
-
"LinkFieldView-anchorOption-location": "alinea-LinkFieldView-anchorOption-location",
|
|
124
|
-
"LinkFieldViewAnchorOptionLocation": "alinea-LinkFieldView-anchorOption-location",
|
|
104
|
+
"LinkFieldView-skeleton": "alinea-LinkFieldView-skeleton",
|
|
105
|
+
"LinkFieldViewSkeleton": "alinea-LinkFieldView-skeleton",
|
|
125
106
|
"LinkFieldView-label": "alinea-LinkFieldView-label",
|
|
126
107
|
"LinkFieldViewLabel": "alinea-LinkFieldView-label",
|
|
108
|
+
"LinkFieldView-previewImage": "alinea-LinkFieldView-previewImage",
|
|
109
|
+
"LinkFieldViewPreviewImage": "alinea-LinkFieldView-previewImage",
|
|
110
|
+
"is-wide": "alinea-is-wide",
|
|
111
|
+
"isWide": "alinea-is-wide",
|
|
127
112
|
"LinkFieldView-create": "alinea-LinkFieldView-create",
|
|
128
113
|
"LinkFieldViewCreate": "alinea-LinkFieldView-create",
|
|
114
|
+
"LinkFieldView-createButton": "alinea-LinkFieldView-createButton",
|
|
115
|
+
"LinkFieldViewCreateButton": "alinea-LinkFieldView-createButton",
|
|
116
|
+
"LinkFieldView-type": "alinea-LinkFieldView-type",
|
|
117
|
+
"LinkFieldViewType": "alinea-LinkFieldView-type",
|
|
118
|
+
"LinkFieldView-dropIndicator": "alinea-LinkFieldView-dropIndicator",
|
|
119
|
+
"LinkFieldViewDropIndicator": "alinea-LinkFieldView-dropIndicator",
|
|
120
|
+
"is-missing": "alinea-is-missing",
|
|
121
|
+
"isMissing": "alinea-is-missing",
|
|
129
122
|
"LinkFieldView-image": "alinea-LinkFieldView-image",
|
|
130
123
|
"LinkFieldViewImage": "alinea-LinkFieldView-image",
|
|
131
|
-
"LinkFieldView-skeleton": "alinea-LinkFieldView-skeleton",
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"LinkFieldView-
|
|
136
|
-
"
|
|
124
|
+
"LinkFieldView-skeleton-pulse": "alinea-LinkFieldView-skeleton-pulse",
|
|
125
|
+
"LinkFieldViewSkeletonPulse": "alinea-LinkFieldView-skeleton-pulse",
|
|
126
|
+
"LinkFieldView-meta": "alinea-LinkFieldView-meta",
|
|
127
|
+
"LinkFieldViewMeta": "alinea-LinkFieldView-meta",
|
|
128
|
+
"LinkFieldView-previewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
|
|
129
|
+
"LinkFieldViewPreviewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
|
|
130
|
+
"LinkFieldView-icon": "alinea-LinkFieldView-icon",
|
|
131
|
+
"LinkFieldViewIcon": "alinea-LinkFieldView-icon",
|
|
132
|
+
"LinkFieldView-imagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
133
|
+
"LinkFieldViewImagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
134
|
+
"LinkFieldView-anchorOption": "alinea-LinkFieldView-anchorOption",
|
|
135
|
+
"LinkFieldViewAnchorOption": "alinea-LinkFieldView-anchorOption",
|
|
136
|
+
"LinkFieldView-rowDropTarget": "alinea-LinkFieldView-rowDropTarget",
|
|
137
|
+
"LinkFieldViewRowDropTarget": "alinea-LinkFieldView-rowDropTarget",
|
|
138
|
+
"LinkFieldView-metaLabel": "alinea-LinkFieldView-metaLabel",
|
|
139
|
+
"LinkFieldViewMetaLabel": "alinea-LinkFieldView-metaLabel",
|
|
140
|
+
"LinkFieldView-rowAction": "alinea-LinkFieldView-rowAction",
|
|
141
|
+
"LinkFieldViewRowAction": "alinea-LinkFieldView-rowAction"
|
|
137
142
|
};
|
|
138
143
|
|
|
139
144
|
// src/field/link/LinkField.view.tsx
|
|
@@ -394,7 +399,7 @@ function LinkPickerAction({
|
|
|
394
399
|
const handlesMultiple = Boolean(onPickMany && picker.handlesMultiple);
|
|
395
400
|
const pickerProps = {
|
|
396
401
|
condition,
|
|
397
|
-
initialView: type === "file" ? "
|
|
402
|
+
initialView: type === "file" || type === "image" ? "card" : void 0,
|
|
398
403
|
initialResultMode: entryPickerResultMode(
|
|
399
404
|
type,
|
|
400
405
|
condition,
|
|
@@ -512,7 +517,7 @@ function LinkPickerDialog({
|
|
|
512
517
|
const handlesMultiple = Boolean(onPickMany && picker.handlesMultiple);
|
|
513
518
|
const pickerProps = {
|
|
514
519
|
condition,
|
|
515
|
-
initialView: type === "file" ? "
|
|
520
|
+
initialView: type === "file" || type === "image" ? "card" : void 0,
|
|
516
521
|
initialResultMode: entryPickerResultMode(
|
|
517
522
|
type,
|
|
518
523
|
condition,
|
|
@@ -591,7 +596,8 @@ function entryPickerSearchScope(condition, location, enableNavigation, type) {
|
|
|
591
596
|
return condition && !location && enableNavigation !== true ? "everything" : "workspace";
|
|
592
597
|
}
|
|
593
598
|
function entryPickerResultMode(type, condition, enableNavigation, pickChildren) {
|
|
594
|
-
|
|
599
|
+
if (type === "file" || type === "image") return "browse";
|
|
600
|
+
return pickChildren || condition && enableNavigation !== true ? "matches" : "browse";
|
|
595
601
|
}
|
|
596
602
|
function externalLinkValue(value) {
|
|
597
603
|
if (value?.[Reference.type] !== "url") return void 0;
|
|
@@ -780,7 +786,7 @@ function EntryLinkSuffixField({
|
|
|
780
786
|
}
|
|
781
787
|
);
|
|
782
788
|
}
|
|
783
|
-
function EntryAnchorField({ node, value }) {
|
|
789
|
+
function EntryAnchorField({ isDisabled, node, value }) {
|
|
784
790
|
const anchor = useAtomValue(node.field("_anchor"));
|
|
785
791
|
const setAnchor = useSetAtom(node.field("_anchor"));
|
|
786
792
|
if (value[Reference.type] !== "entry") return null;
|
|
@@ -789,6 +795,7 @@ function EntryAnchorField({ node, value }) {
|
|
|
789
795
|
{
|
|
790
796
|
anchor,
|
|
791
797
|
entryId: value._entry,
|
|
798
|
+
isDisabled,
|
|
792
799
|
onChange: setAnchor
|
|
793
800
|
}
|
|
794
801
|
);
|
|
@@ -804,6 +811,7 @@ function EntryAnchorBadge({ node, value }) {
|
|
|
804
811
|
function EntryAnchorFieldInner({
|
|
805
812
|
anchor,
|
|
806
813
|
entryId,
|
|
814
|
+
isDisabled,
|
|
807
815
|
onChange
|
|
808
816
|
}) {
|
|
809
817
|
const state = useLinkEntryState(entryId);
|
|
@@ -811,6 +819,7 @@ function EntryAnchorFieldInner({
|
|
|
811
819
|
return /* @__PURE__ */ jsx(
|
|
812
820
|
Select,
|
|
813
821
|
{
|
|
822
|
+
isDisabled: isDisabled || anchors.length === 0,
|
|
814
823
|
items: anchors,
|
|
815
824
|
label: "Anchor",
|
|
816
825
|
onChange: (next) => onChange(next === null ? void 0 : String(next)),
|
|
@@ -1040,64 +1049,84 @@ function SingleLinkRow({ field, node, value }) {
|
|
|
1040
1049
|
function removeLink() {
|
|
1041
1050
|
setValue(void 0);
|
|
1042
1051
|
}
|
|
1052
|
+
const rowContent = /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1053
|
+
imagePreviewEntryId && /* @__PURE__ */ jsx(EntryLinkImagePreview, { entryId: imagePreviewEntryId }),
|
|
1054
|
+
/* @__PURE__ */ jsx(ListRowDrag, { children: /* @__PURE__ */ jsxs(ListRowBadges, { children: [
|
|
1055
|
+
/* @__PURE__ */ jsx(
|
|
1056
|
+
LinkTypeBadge,
|
|
1057
|
+
{
|
|
1058
|
+
className: styles.LinkFieldView.type(),
|
|
1059
|
+
picker,
|
|
1060
|
+
type,
|
|
1061
|
+
value
|
|
1062
|
+
}
|
|
1063
|
+
),
|
|
1064
|
+
/* @__PURE__ */ jsx(
|
|
1065
|
+
LinkMetaLabel,
|
|
1066
|
+
{
|
|
1067
|
+
className: styles.LinkFieldView.metaLabel(),
|
|
1068
|
+
node,
|
|
1069
|
+
value
|
|
1070
|
+
}
|
|
1071
|
+
),
|
|
1072
|
+
/* @__PURE__ */ jsx(EntryAnchorBadge, { node, value })
|
|
1073
|
+
] }) })
|
|
1074
|
+
] });
|
|
1043
1075
|
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1044
1076
|
/* @__PURE__ */ jsxs(ListRow, { "aria-label": "Link item 1", first: true, role: "listitem", children: [
|
|
1045
|
-
/* @__PURE__ */ jsxs(
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1077
|
+
/* @__PURE__ */ jsxs(
|
|
1078
|
+
ListRowHeader,
|
|
1079
|
+
{
|
|
1080
|
+
first: true,
|
|
1081
|
+
hasFold: false,
|
|
1082
|
+
className: styles.LinkFieldView.inputHeader(),
|
|
1083
|
+
children: [
|
|
1084
|
+
options.readOnly ? rowContent : /* @__PURE__ */ jsx(
|
|
1085
|
+
Button,
|
|
1086
|
+
{
|
|
1087
|
+
"aria-label": "Edit link",
|
|
1088
|
+
appearance: "plain",
|
|
1089
|
+
className: styles.LinkFieldView.rowAction(),
|
|
1090
|
+
onPress: () => setActionsOpen(true),
|
|
1091
|
+
children: rowContent
|
|
1092
|
+
}
|
|
1093
|
+
),
|
|
1094
|
+
!options.readOnly && /* @__PURE__ */ jsxs(ListRowActions, { children: [
|
|
1095
|
+
/* @__PURE__ */ jsxs(DialogTrigger, { isOpen: actionsOpen, onOpenChange: setActionsOpen, children: [
|
|
1096
|
+
/* @__PURE__ */ jsx(LinkSettingsButton, {}),
|
|
1097
|
+
/* @__PURE__ */ jsxs(Popover, { placement: "bottom right", children: [
|
|
1098
|
+
/* @__PURE__ */ jsx(ListRowSettings, { actions: true, children: /* @__PURE__ */ jsx(
|
|
1099
|
+
LinkRowActions,
|
|
1100
|
+
{
|
|
1101
|
+
closeActions,
|
|
1102
|
+
onEdit: () => setEditOpen(true),
|
|
1103
|
+
picker,
|
|
1104
|
+
type,
|
|
1105
|
+
value
|
|
1106
|
+
}
|
|
1107
|
+
) }),
|
|
1108
|
+
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
1109
|
+
/* @__PURE__ */ jsxs(ListRowSettings, { children: [
|
|
1110
|
+
/* @__PURE__ */ jsx(LinkLabelField, { node, value }),
|
|
1111
|
+
/* @__PURE__ */ jsx(EntryAnchorField, { node, value }),
|
|
1112
|
+
/* @__PURE__ */ jsx(EntryLinkSuffixField, { node, value })
|
|
1113
|
+
] })
|
|
1114
|
+
] })
|
|
1075
1115
|
] }),
|
|
1076
|
-
/* @__PURE__ */ jsx(
|
|
1077
|
-
|
|
1078
|
-
LinkRowActions,
|
|
1116
|
+
/* @__PURE__ */ jsx(
|
|
1117
|
+
Button,
|
|
1079
1118
|
{
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1119
|
+
appearance: "plain",
|
|
1120
|
+
"aria-label": "Remove link",
|
|
1121
|
+
icon: IcRoundClose,
|
|
1122
|
+
onPress: removeLink,
|
|
1123
|
+
size: "icon-small"
|
|
1085
1124
|
}
|
|
1086
|
-
)
|
|
1125
|
+
)
|
|
1087
1126
|
] })
|
|
1088
|
-
]
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
{
|
|
1092
|
-
appearance: "plain",
|
|
1093
|
-
"aria-label": "Remove link",
|
|
1094
|
-
icon: IcRoundClose,
|
|
1095
|
-
onPress: removeLink,
|
|
1096
|
-
size: "icon-small"
|
|
1097
|
-
}
|
|
1098
|
-
)
|
|
1099
|
-
] })
|
|
1100
|
-
] }),
|
|
1127
|
+
]
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1101
1130
|
hasFields && /* @__PURE__ */ jsx(ListRowBody, { children: /* @__PURE__ */ jsx(LinkRowEditor, { node, picker }) })
|
|
1102
1131
|
] }),
|
|
1103
1132
|
picker && /* @__PURE__ */ jsx(
|
|
@@ -1247,6 +1276,18 @@ function MultipleLinkRow({
|
|
|
1247
1276
|
/* @__PURE__ */ jsxs(DialogTrigger, { isOpen: actionsOpen, onOpenChange: setActionsOpen, children: [
|
|
1248
1277
|
/* @__PURE__ */ jsx(LinkSettingsButton, {}),
|
|
1249
1278
|
/* @__PURE__ */ jsxs(Popover, { placement: "bottom right", children: [
|
|
1279
|
+
/* @__PURE__ */ jsx(ListRowSettings, { actions: true, children: /* @__PURE__ */ jsx(
|
|
1280
|
+
LinkRowActions,
|
|
1281
|
+
{
|
|
1282
|
+
closeActions,
|
|
1283
|
+
isDisabled: readOnly,
|
|
1284
|
+
onEdit: () => setEditOpen(true),
|
|
1285
|
+
picker,
|
|
1286
|
+
type,
|
|
1287
|
+
value
|
|
1288
|
+
}
|
|
1289
|
+
) }),
|
|
1290
|
+
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
1250
1291
|
/* @__PURE__ */ jsxs(ListRowSettings, { children: [
|
|
1251
1292
|
/* @__PURE__ */ jsx(
|
|
1252
1293
|
LinkLabelField,
|
|
@@ -1256,7 +1297,14 @@ function MultipleLinkRow({
|
|
|
1256
1297
|
value
|
|
1257
1298
|
}
|
|
1258
1299
|
),
|
|
1259
|
-
/* @__PURE__ */ jsx(
|
|
1300
|
+
/* @__PURE__ */ jsx(
|
|
1301
|
+
EntryAnchorField,
|
|
1302
|
+
{
|
|
1303
|
+
isDisabled: readOnly,
|
|
1304
|
+
node,
|
|
1305
|
+
value
|
|
1306
|
+
}
|
|
1307
|
+
),
|
|
1260
1308
|
/* @__PURE__ */ jsx(
|
|
1261
1309
|
EntryLinkSuffixField,
|
|
1262
1310
|
{
|
|
@@ -1265,19 +1313,7 @@ function MultipleLinkRow({
|
|
|
1265
1313
|
value
|
|
1266
1314
|
}
|
|
1267
1315
|
)
|
|
1268
|
-
] })
|
|
1269
|
-
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
1270
|
-
/* @__PURE__ */ jsx(ListRowSettings, { actions: true, children: /* @__PURE__ */ jsx(
|
|
1271
|
-
LinkRowActions,
|
|
1272
|
-
{
|
|
1273
|
-
closeActions,
|
|
1274
|
-
isDisabled: readOnly,
|
|
1275
|
-
onEdit: () => setEditOpen(true),
|
|
1276
|
-
picker,
|
|
1277
|
-
type,
|
|
1278
|
-
value
|
|
1279
|
-
}
|
|
1280
|
-
) })
|
|
1316
|
+
] })
|
|
1281
1317
|
] })
|
|
1282
1318
|
] }),
|
|
1283
1319
|
/* @__PURE__ */ jsx(
|
|
@@ -1345,8 +1381,6 @@ function SingleLinkFieldView({ field }) {
|
|
|
1345
1381
|
const isEmpty = nodeIsEmpty || !selectedValue;
|
|
1346
1382
|
const hasRows = Boolean(selectedValue);
|
|
1347
1383
|
const readOnly = Boolean(options.readOnly);
|
|
1348
|
-
const selectedPicker = selectedValue ? options.pickers[getPickerType(selectedValue[Reference.type])] : void 0;
|
|
1349
|
-
const showFold = Boolean(selectedPicker?.fields);
|
|
1350
1384
|
const content = (hasRows || !readOnly) && /* @__PURE__ */ jsxs(List, { "aria-label": options.label || "Link", children: [
|
|
1351
1385
|
selectedValue && /* @__PURE__ */ jsx(
|
|
1352
1386
|
SingleLinkRow,
|
|
@@ -1356,25 +1390,18 @@ function SingleLinkFieldView({ field }) {
|
|
|
1356
1390
|
value: selectedValue
|
|
1357
1391
|
}
|
|
1358
1392
|
),
|
|
1359
|
-
isEmpty && !readOnly && /* @__PURE__ */ jsx(ListCreateRow, { empty: true, children: /* @__PURE__ */ jsx(SingleLinkCreateActions, { field }) })
|
|
1360
|
-
] });
|
|
1361
|
-
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1362
|
-
/* @__PURE__ */ jsx(
|
|
1363
|
-
ListLabel,
|
|
1364
|
-
{
|
|
1365
|
-
"aria-label": hasRows ? "Link selected" : "No link selected",
|
|
1366
|
-
expanded: true,
|
|
1367
|
-
hasRows,
|
|
1368
|
-
isDisabled: true,
|
|
1369
|
-
description: options.help,
|
|
1370
|
-
shared: options.shared,
|
|
1371
|
-
showFold,
|
|
1372
|
-
inline: options.inline,
|
|
1373
|
-
children: options.label
|
|
1374
|
-
}
|
|
1375
|
-
),
|
|
1376
|
-
content
|
|
1393
|
+
isEmpty && !readOnly && /* @__PURE__ */ jsx(ListCreateRow, { empty: true, className: styles.LinkFieldView.inputHeader(), children: /* @__PURE__ */ jsx(SingleLinkCreateActions, { field }) })
|
|
1377
1394
|
] });
|
|
1395
|
+
return /* @__PURE__ */ jsx(
|
|
1396
|
+
Label,
|
|
1397
|
+
{
|
|
1398
|
+
description: options.help,
|
|
1399
|
+
label: options.inline ? void 0 : options.label,
|
|
1400
|
+
isRequired: options.required,
|
|
1401
|
+
shared: options.shared,
|
|
1402
|
+
children: content
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1378
1405
|
}
|
|
1379
1406
|
function MultipleLinksFieldView({ field }) {
|
|
1380
1407
|
const [value] = useField(field);
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
$928221da08ecbc62$export$41f133550aa26f48,
|
|
15
15
|
$928221da08ecbc62$export$a11e76429ed99b4,
|
|
16
16
|
$f2ff30fde7b014be$export$d2f961adcb0afbe
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
18
18
|
import {
|
|
19
19
|
$ef182bb9912241d8$export$3274cf84b703fff
|
|
20
|
-
} from "../../chunks/chunk-
|
|
20
|
+
} from "../../chunks/chunk-O7XWTMCB.js";
|
|
21
21
|
import "../../chunks/chunk-RKDPDEF7.js";
|
|
22
|
-
import "../../chunks/chunk-
|
|
23
|
-
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
22
|
+
import "../../chunks/chunk-NIVGVRDS.js";
|
|
24
23
|
import "../../chunks/chunk-IYAQC63Y.js";
|
|
25
|
-
import "../../chunks/chunk-
|
|
24
|
+
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
25
|
+
import "../../chunks/chunk-6V4TAD2N.js";
|
|
26
26
|
import {
|
|
27
27
|
$5d3a17cc2564e64f$export$905ab40ac2179daa,
|
|
28
28
|
$74812c42150b3de8$export$7941f8aafa4b6021,
|
|
29
29
|
$f302ef02e940a6f8$export$ccdee5eaf73cf661
|
|
30
|
-
} from "../../chunks/chunk-
|
|
30
|
+
} from "../../chunks/chunk-S4AU6SRS.js";
|
|
31
31
|
import "../../chunks/chunk-AC4U3IMS.js";
|
|
32
32
|
import {
|
|
33
33
|
dist_default
|
|
@@ -51,7 +51,6 @@ import {
|
|
|
51
51
|
ListRowBody,
|
|
52
52
|
ListRowDrag,
|
|
53
53
|
ListRowDragHandle,
|
|
54
|
-
ListRowFooter,
|
|
55
54
|
ListRowHeader,
|
|
56
55
|
ListRowMeta,
|
|
57
56
|
ListRowSettings,
|
|
@@ -65,7 +64,6 @@ import { getType } from "alinea/core/Internal";
|
|
|
65
64
|
import { Type } from "alinea/core/Type";
|
|
66
65
|
import { slugify } from "alinea/core/util/Slugs";
|
|
67
66
|
import { Badge } from "alinea/dashboard/app/Badge";
|
|
68
|
-
import { CompactRecordFields } from "alinea/dashboard/app/CompactField";
|
|
69
67
|
import { NodeEditor } from "alinea/dashboard/app/EntryFields";
|
|
70
68
|
import {
|
|
71
69
|
useFieldError,
|
|
@@ -96,27 +94,27 @@ import {
|
|
|
96
94
|
|
|
97
95
|
// src/field/list/ListField.module.css
|
|
98
96
|
var ListField_default = {
|
|
99
|
-
"ListFieldTypePicker-dialog": "alinea-ListFieldTypePicker-dialog",
|
|
100
|
-
"ListFieldTypePickerDialog": "alinea-ListFieldTypePicker-dialog",
|
|
101
|
-
"ListFieldTypePicker-list": "alinea-ListFieldTypePicker-list",
|
|
102
|
-
"ListFieldTypePickerList": "alinea-ListFieldTypePicker-list",
|
|
103
97
|
"ListFieldTypePicker-item": "alinea-ListFieldTypePicker-item",
|
|
104
98
|
"ListFieldTypePickerItem": "alinea-ListFieldTypePicker-item",
|
|
105
|
-
"ListFieldTypePicker-popover": "alinea-ListFieldTypePicker-popover",
|
|
106
|
-
"ListFieldTypePickerPopover": "alinea-ListFieldTypePicker-popover",
|
|
107
|
-
"ListFieldCreateActions": "alinea-ListFieldCreateActions",
|
|
108
|
-
"ListFieldTypePicker-empty": "alinea-ListFieldTypePicker-empty",
|
|
109
|
-
"ListFieldTypePickerEmpty": "alinea-ListFieldTypePicker-empty",
|
|
110
|
-
"ListFieldCreateActions-button": "alinea-ListFieldCreateActions-button",
|
|
111
|
-
"ListFieldCreateActionsButton": "alinea-ListFieldCreateActions-button",
|
|
112
99
|
"ListFieldView-insertAction": "alinea-ListFieldView-insertAction",
|
|
113
100
|
"ListFieldViewInsertAction": "alinea-ListFieldView-insertAction",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
101
|
+
"ListFieldTypePicker-list": "alinea-ListFieldTypePicker-list",
|
|
102
|
+
"ListFieldTypePickerList": "alinea-ListFieldTypePicker-list",
|
|
116
103
|
"ListFieldView-dropIndicator": "alinea-ListFieldView-dropIndicator",
|
|
117
104
|
"ListFieldViewDropIndicator": "alinea-ListFieldView-dropIndicator",
|
|
105
|
+
"ListFieldCreateActions-button": "alinea-ListFieldCreateActions-button",
|
|
106
|
+
"ListFieldCreateActionsButton": "alinea-ListFieldCreateActions-button",
|
|
107
|
+
"ListFieldView-rowDropTarget": "alinea-ListFieldView-rowDropTarget",
|
|
108
|
+
"ListFieldViewRowDropTarget": "alinea-ListFieldView-rowDropTarget",
|
|
109
|
+
"ListFieldTypePicker-empty": "alinea-ListFieldTypePicker-empty",
|
|
110
|
+
"ListFieldTypePickerEmpty": "alinea-ListFieldTypePicker-empty",
|
|
111
|
+
"ListFieldTypePicker-popover": "alinea-ListFieldTypePicker-popover",
|
|
112
|
+
"ListFieldTypePickerPopover": "alinea-ListFieldTypePicker-popover",
|
|
118
113
|
"ListFieldTypePicker-trigger": "alinea-ListFieldTypePicker-trigger",
|
|
119
114
|
"ListFieldTypePickerTrigger": "alinea-ListFieldTypePicker-trigger",
|
|
115
|
+
"ListFieldCreateActions": "alinea-ListFieldCreateActions",
|
|
116
|
+
"ListFieldTypePicker-dialog": "alinea-ListFieldTypePicker-dialog",
|
|
117
|
+
"ListFieldTypePickerDialog": "alinea-ListFieldTypePicker-dialog",
|
|
120
118
|
"ListFieldTypePicker-search": "alinea-ListFieldTypePicker-search",
|
|
121
119
|
"ListFieldTypePickerSearch": "alinea-ListFieldTypePicker-search"
|
|
122
120
|
};
|
|
@@ -472,7 +470,6 @@ function ListFieldRow({
|
|
|
472
470
|
const customLabelValue = useAtomValue(row.field("_label"));
|
|
473
471
|
const anchorValue = useAtomValue(row.field("_anchor"));
|
|
474
472
|
const customLabel = customLabelValue ?? "";
|
|
475
|
-
const value = useAtomValue(row.value);
|
|
476
473
|
const setCustomLabel = useSetAtom(row.field("_label"));
|
|
477
474
|
const setAnchor = useSetAtom(row.field("_anchor"));
|
|
478
475
|
const moveListRow = useSetAtom(list.move);
|
|
@@ -576,22 +573,14 @@ function ListFieldRow({
|
|
|
576
573
|
onCustomLabelChange: updateCustomLabel,
|
|
577
574
|
onCopy: () => onCopyRow(itemId),
|
|
578
575
|
onDelete: deleteRow,
|
|
579
|
-
onInsertBefore: (
|
|
580
|
-
onInsertAfter: (
|
|
576
|
+
onInsertBefore: (value) => addBetweenRow(value, "before"),
|
|
577
|
+
onInsertAfter: (value) => addBetweenRow(value, "after"),
|
|
581
578
|
onMoveDown: () => moveCurrentRow(1),
|
|
582
579
|
onMoveUp: () => moveCurrentRow(-1),
|
|
583
580
|
onToggle: () => onToggleRow(itemId)
|
|
584
581
|
}
|
|
585
582
|
),
|
|
586
|
-
expanded && /* @__PURE__ */ jsx(ListRowBody, { children: /* @__PURE__ */ jsx(NodeEditor, { node: row, type }) })
|
|
587
|
-
!expanded && /* @__PURE__ */ jsx(ListRowFooter, { children: /* @__PURE__ */ jsx(
|
|
588
|
-
CompactRecordFields,
|
|
589
|
-
{
|
|
590
|
-
fields: Type.fields(type),
|
|
591
|
-
layout: "footer",
|
|
592
|
-
value
|
|
593
|
-
}
|
|
594
|
-
) })
|
|
583
|
+
expanded && /* @__PURE__ */ jsx(ListRowBody, { children: /* @__PURE__ */ jsx(NodeEditor, { node: row, type }) })
|
|
595
584
|
]
|
|
596
585
|
}
|
|
597
586
|
)
|
|
@@ -17,34 +17,34 @@ import { IcRoundPublic } from "alinea/dashboard/icons";
|
|
|
17
17
|
|
|
18
18
|
// src/field/metadata/MetadataField.module.css
|
|
19
19
|
var MetadataField_default = {
|
|
20
|
-
"OpenGraphPreview": "alinea-OpenGraphPreview",
|
|
21
|
-
"OpenGraphPreview-title": "alinea-OpenGraphPreview-title",
|
|
22
|
-
"OpenGraphPreviewTitle": "alinea-OpenGraphPreview-title",
|
|
23
|
-
"MetadataTimestampFieldView": "alinea-MetadataTimestampFieldView",
|
|
24
|
-
"MetadataUserFieldView-person": "alinea-MetadataUserFieldView-person",
|
|
25
|
-
"MetadataUserFieldViewPerson": "alinea-MetadataUserFieldView-person",
|
|
26
|
-
"MetadataUserFieldView-contact": "alinea-MetadataUserFieldView-contact",
|
|
27
|
-
"MetadataUserFieldViewContact": "alinea-MetadataUserFieldView-contact",
|
|
28
|
-
"OpenGraphPreview-content": "alinea-OpenGraphPreview-content",
|
|
29
|
-
"OpenGraphPreviewContent": "alinea-OpenGraphPreview-content",
|
|
30
|
-
"SearchEnginePreview": "alinea-SearchEnginePreview",
|
|
31
|
-
"MetadataUserFieldView": "alinea-MetadataUserFieldView",
|
|
32
|
-
"OpenGraphPreview-description": "alinea-OpenGraphPreview-description",
|
|
33
|
-
"OpenGraphPreviewDescription": "alinea-OpenGraphPreview-description",
|
|
34
|
-
"SearchEnginePreview-og": "alinea-SearchEnginePreview-og",
|
|
35
|
-
"SearchEnginePreviewOg": "alinea-SearchEnginePreview-og",
|
|
36
|
-
"OpenGraphPreview-image": "alinea-OpenGraphPreview-image",
|
|
37
|
-
"OpenGraphPreviewImage": "alinea-OpenGraphPreview-image",
|
|
38
20
|
"OpenGraphPreview-site": "alinea-OpenGraphPreview-site",
|
|
39
21
|
"OpenGraphPreviewSite": "alinea-OpenGraphPreview-site",
|
|
40
22
|
"SearchEnginePreview-description": "alinea-SearchEnginePreview-description",
|
|
41
23
|
"SearchEnginePreviewDescription": "alinea-SearchEnginePreview-description",
|
|
42
24
|
"SearchEnginePreview-og-label-small": "alinea-SearchEnginePreview-og-label-small",
|
|
43
25
|
"SearchEnginePreviewOgLabelSmall": "alinea-SearchEnginePreview-og-label-small",
|
|
26
|
+
"OpenGraphPreview": "alinea-OpenGraphPreview",
|
|
44
27
|
"SearchEnginePreview-og-label": "alinea-SearchEnginePreview-og-label",
|
|
45
28
|
"SearchEnginePreviewOgLabel": "alinea-SearchEnginePreview-og-label",
|
|
29
|
+
"MetadataUserFieldView-person": "alinea-MetadataUserFieldView-person",
|
|
30
|
+
"MetadataUserFieldViewPerson": "alinea-MetadataUserFieldView-person",
|
|
31
|
+
"OpenGraphPreview-description": "alinea-OpenGraphPreview-description",
|
|
32
|
+
"OpenGraphPreviewDescription": "alinea-OpenGraphPreview-description",
|
|
33
|
+
"OpenGraphPreview-content": "alinea-OpenGraphPreview-content",
|
|
34
|
+
"OpenGraphPreviewContent": "alinea-OpenGraphPreview-content",
|
|
35
|
+
"OpenGraphPreview-image": "alinea-OpenGraphPreview-image",
|
|
36
|
+
"OpenGraphPreviewImage": "alinea-OpenGraphPreview-image",
|
|
37
|
+
"MetadataUserFieldView-contact": "alinea-MetadataUserFieldView-contact",
|
|
38
|
+
"MetadataUserFieldViewContact": "alinea-MetadataUserFieldView-contact",
|
|
39
|
+
"MetadataUserFieldView": "alinea-MetadataUserFieldView",
|
|
40
|
+
"OpenGraphPreview-title": "alinea-OpenGraphPreview-title",
|
|
41
|
+
"OpenGraphPreviewTitle": "alinea-OpenGraphPreview-title",
|
|
46
42
|
"SearchEnginePreview-link": "alinea-SearchEnginePreview-link",
|
|
47
|
-
"SearchEnginePreviewLink": "alinea-SearchEnginePreview-link"
|
|
43
|
+
"SearchEnginePreviewLink": "alinea-SearchEnginePreview-link",
|
|
44
|
+
"SearchEnginePreview": "alinea-SearchEnginePreview",
|
|
45
|
+
"SearchEnginePreview-og": "alinea-SearchEnginePreview-og",
|
|
46
|
+
"SearchEnginePreviewOg": "alinea-SearchEnginePreview-og",
|
|
47
|
+
"MetadataTimestampFieldView": "alinea-MetadataTimestampFieldView"
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
// src/field/metadata/MetadataField.view.tsx
|
|
@@ -8,6 +8,8 @@ export interface NumberOptions extends FieldOptions<number | null> {
|
|
|
8
8
|
help?: ReactNode;
|
|
9
9
|
/** Display a minimal version */
|
|
10
10
|
inline?: boolean;
|
|
11
|
+
/** Text displayed when the field is empty */
|
|
12
|
+
placeholder?: string;
|
|
11
13
|
/** A minimum value */
|
|
12
14
|
minValue?: number;
|
|
13
15
|
/** A maximum value */
|
|
@@ -15,13 +15,15 @@ function NumberFieldView({ field }) {
|
|
|
15
15
|
errorMessage: error,
|
|
16
16
|
isDisabled: options.readOnly,
|
|
17
17
|
isRequired: options.required,
|
|
18
|
-
label: options.label,
|
|
18
|
+
"aria-label": options.inline ? options.label : void 0,
|
|
19
|
+
label: options.inline ? void 0 : options.label,
|
|
20
|
+
placeholder: options.placeholder ?? (options.inline ? options.label : void 0),
|
|
19
21
|
shared: options.shared,
|
|
20
22
|
maxValue: options.maxValue,
|
|
21
23
|
minValue: options.minValue,
|
|
22
24
|
onChange: (next) => setValue(Number.isNaN(next) ? null : next),
|
|
23
25
|
step: options.step || 1,
|
|
24
|
-
value: typeof value === "number" ? value :
|
|
26
|
+
value: typeof value === "number" ? value : Number.NaN
|
|
25
27
|
}
|
|
26
28
|
);
|
|
27
29
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Reference } from 'alinea/core/Reference';
|
|
2
2
|
export interface PickerValue {
|
|
3
3
|
link?: Reference;
|
|
4
|
+
alt?: string;
|
|
4
5
|
description?: string;
|
|
6
|
+
src?: string;
|
|
5
7
|
title?: string;
|
|
6
8
|
blank?: boolean;
|
|
7
9
|
}
|
|
@@ -12,9 +14,14 @@ export interface PickerOptions extends PickerValue {
|
|
|
12
14
|
export interface PickTextLinkFunc {
|
|
13
15
|
(options: Partial<PickerOptions>): Promise<PickerValue | undefined>;
|
|
14
16
|
}
|
|
17
|
+
export interface PickRichTextImageFunc {
|
|
18
|
+
(options: Partial<PickerOptions>): Promise<PickerValue | undefined>;
|
|
19
|
+
}
|
|
15
20
|
export interface PickTextLinkState {
|
|
16
21
|
isOpen: boolean;
|
|
22
|
+
kind: 'image' | 'link';
|
|
17
23
|
options: Partial<PickerOptions>;
|
|
24
|
+
pickImage: PickRichTextImageFunc;
|
|
18
25
|
pickLink: PickTextLinkFunc;
|
|
19
26
|
cancel: () => void;
|
|
20
27
|
confirm: (value: PickerValue | undefined) => void;
|