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
|
@@ -64,27 +64,27 @@ import { Fragment, useId } from "react";
|
|
|
64
64
|
|
|
65
65
|
// src/field/code/CodeField.module.css
|
|
66
66
|
var CodeField_default = {
|
|
67
|
-
"CodeEditorInput
|
|
68
|
-
"CodeEditorInputTextarea": "alinea-CodeEditorInput-textarea",
|
|
69
|
-
"CodeEditorInput-string": "alinea-CodeEditorInput-string",
|
|
70
|
-
"CodeEditorInputString": "alinea-CodeEditorInput-string",
|
|
67
|
+
"CodeEditorInput": "alinea-CodeEditorInput",
|
|
71
68
|
"CodeEditorInput-pre": "alinea-CodeEditorInput-pre",
|
|
72
69
|
"CodeEditorInputPre": "alinea-CodeEditorInput-pre",
|
|
73
|
-
"CodeEditorInput-regex": "alinea-CodeEditorInput-regex",
|
|
74
|
-
"CodeEditorInputRegex": "alinea-CodeEditorInput-regex",
|
|
75
|
-
"CodeEditorInput-identifier": "alinea-CodeEditorInput-identifier",
|
|
76
|
-
"CodeEditorInputIdentifier": "alinea-CodeEditorInput-identifier",
|
|
77
|
-
"CodeEditorInput": "alinea-CodeEditorInput",
|
|
78
70
|
"CodeEditorInput-keyword": "alinea-CodeEditorInput-keyword",
|
|
79
71
|
"CodeEditorInputKeyword": "alinea-CodeEditorInput-keyword",
|
|
80
|
-
"CodeEditorInput-
|
|
81
|
-
"
|
|
72
|
+
"CodeEditorInput-string": "alinea-CodeEditorInput-string",
|
|
73
|
+
"CodeEditorInputString": "alinea-CodeEditorInput-string",
|
|
74
|
+
"CodeEditorInput-number": "alinea-CodeEditorInput-number",
|
|
75
|
+
"CodeEditorInputNumber": "alinea-CodeEditorInput-number",
|
|
82
76
|
"CodeEditorInput-editor": "alinea-CodeEditorInput-editor",
|
|
83
77
|
"CodeEditorInputEditor": "alinea-CodeEditorInput-editor",
|
|
78
|
+
"CodeEditorInput-regex": "alinea-CodeEditorInput-regex",
|
|
79
|
+
"CodeEditorInputRegex": "alinea-CodeEditorInput-regex",
|
|
80
|
+
"CodeEditorInput-punctuation": "alinea-CodeEditorInput-punctuation",
|
|
81
|
+
"CodeEditorInputPunctuation": "alinea-CodeEditorInput-punctuation",
|
|
84
82
|
"CodeEditorInput-comment": "alinea-CodeEditorInput-comment",
|
|
85
83
|
"CodeEditorInputComment": "alinea-CodeEditorInput-comment",
|
|
86
|
-
"CodeEditorInput-
|
|
87
|
-
"
|
|
84
|
+
"CodeEditorInput-identifier": "alinea-CodeEditorInput-identifier",
|
|
85
|
+
"CodeEditorInputIdentifier": "alinea-CodeEditorInput-identifier",
|
|
86
|
+
"CodeEditorInput-textarea": "alinea-CodeEditorInput-textarea",
|
|
87
|
+
"CodeEditorInputTextarea": "alinea-CodeEditorInput-textarea"
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
// src/field/code/CodeField.view.tsx
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
import "../../chunks/chunk-VXZM6V4P.js";
|
|
2
|
+
import "../../chunks/chunk-O7XWTMCB.js";
|
|
3
|
+
import "../../chunks/chunk-RKDPDEF7.js";
|
|
4
|
+
import "../../chunks/chunk-NIVGVRDS.js";
|
|
1
5
|
import {
|
|
2
6
|
$58246871e4652552$export$6b862160d295c8e
|
|
3
7
|
} from "../../chunks/chunk-IYAQC63Y.js";
|
|
8
|
+
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
9
|
+
import "../../chunks/chunk-6V4TAD2N.js";
|
|
10
|
+
import {
|
|
11
|
+
$2eb8e6d23f3d0cb0$export$a54013f0d02a8f82
|
|
12
|
+
} from "../../chunks/chunk-S4AU6SRS.js";
|
|
13
|
+
import "../../chunks/chunk-AC4U3IMS.js";
|
|
4
14
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
5
15
|
|
|
6
16
|
// src/field/date/DateField.view.tsx
|
|
@@ -16,7 +26,7 @@ function DateFieldView({ field }) {
|
|
|
16
26
|
if (!value) return null;
|
|
17
27
|
return $58246871e4652552$export$6b862160d295c8e(value);
|
|
18
28
|
}, [value]);
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
+
return /* @__PURE__ */ jsx($2eb8e6d23f3d0cb0$export$a54013f0d02a8f82, { locale: "en-GB", children: /* @__PURE__ */ jsx(
|
|
20
30
|
DatePicker,
|
|
21
31
|
{
|
|
22
32
|
description: options.help,
|
|
@@ -28,7 +38,7 @@ function DateFieldView({ field }) {
|
|
|
28
38
|
onChange: (next) => setValue(next?.toString() || ""),
|
|
29
39
|
value: parsedValue
|
|
30
40
|
}
|
|
31
|
-
);
|
|
41
|
+
) });
|
|
32
42
|
}
|
|
33
43
|
export {
|
|
34
44
|
DateFieldView
|
package/dist/field/link/Link.js
CHANGED
|
@@ -20,7 +20,7 @@ function link(label, options = {}) {
|
|
|
20
20
|
selection: EntryLink
|
|
21
21
|
}),
|
|
22
22
|
url: urlPicker(options),
|
|
23
|
-
file: filePicker(false, options)
|
|
23
|
+
file: filePicker(false, { ...options, location: void 0 })
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -35,7 +35,7 @@ function link(label, options = {}) {
|
|
|
35
35
|
selection: EntryLink
|
|
36
36
|
}),
|
|
37
37
|
url: urlPicker(options),
|
|
38
|
-
file: filePicker(true, options)
|
|
38
|
+
file: filePicker(true, { ...options, location: void 0 })
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -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";
|
|
@@ -89,54 +89,56 @@ import { Fragment, useMemo, useRef, useState } from "react";
|
|
|
89
89
|
|
|
90
90
|
// src/field/link/LinkField.module.css
|
|
91
91
|
var LinkField_default = {
|
|
92
|
-
"LinkFieldView-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"LinkFieldView-
|
|
97
|
-
"
|
|
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",
|
|
98
98
|
"LinkFieldView-labelText": "alinea-LinkFieldView-labelText",
|
|
99
99
|
"LinkFieldViewLabelText": "alinea-LinkFieldView-labelText",
|
|
100
|
-
"LinkFieldView-type": "alinea-LinkFieldView-type",
|
|
101
|
-
"LinkFieldViewType": "alinea-LinkFieldView-type",
|
|
102
|
-
"is-wide": "alinea-is-wide",
|
|
103
|
-
"isWide": "alinea-is-wide",
|
|
104
100
|
"LinkFieldView-title": "alinea-LinkFieldView-title",
|
|
105
101
|
"LinkFieldViewTitle": "alinea-LinkFieldView-title",
|
|
106
|
-
"LinkFieldView-
|
|
107
|
-
"
|
|
108
|
-
"LinkFieldView-icon": "alinea-LinkFieldView-icon",
|
|
109
|
-
"LinkFieldViewIcon": "alinea-LinkFieldView-icon",
|
|
102
|
+
"LinkFieldView-anchorOption-label": "alinea-LinkFieldView-anchorOption-label",
|
|
103
|
+
"LinkFieldViewAnchorOptionLabel": "alinea-LinkFieldView-anchorOption-label",
|
|
110
104
|
"LinkFieldView-skeleton": "alinea-LinkFieldView-skeleton",
|
|
111
105
|
"LinkFieldViewSkeleton": "alinea-LinkFieldView-skeleton",
|
|
112
|
-
"LinkFieldView-imagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
113
|
-
"LinkFieldViewImagePlaceholder": "alinea-LinkFieldView-imagePlaceholder",
|
|
114
106
|
"LinkFieldView-label": "alinea-LinkFieldView-label",
|
|
115
107
|
"LinkFieldViewLabel": "alinea-LinkFieldView-label",
|
|
116
|
-
"LinkFieldView-
|
|
117
|
-
"
|
|
108
|
+
"LinkFieldView-previewImage": "alinea-LinkFieldView-previewImage",
|
|
109
|
+
"LinkFieldViewPreviewImage": "alinea-LinkFieldView-previewImage",
|
|
110
|
+
"is-wide": "alinea-is-wide",
|
|
111
|
+
"isWide": "alinea-is-wide",
|
|
112
|
+
"LinkFieldView-create": "alinea-LinkFieldView-create",
|
|
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",
|
|
118
120
|
"is-missing": "alinea-is-missing",
|
|
119
121
|
"isMissing": "alinea-is-missing",
|
|
122
|
+
"LinkFieldView-image": "alinea-LinkFieldView-image",
|
|
123
|
+
"LinkFieldViewImage": "alinea-LinkFieldView-image",
|
|
120
124
|
"LinkFieldView-skeleton-pulse": "alinea-LinkFieldView-skeleton-pulse",
|
|
121
125
|
"LinkFieldViewSkeletonPulse": "alinea-LinkFieldView-skeleton-pulse",
|
|
122
|
-
"LinkFieldView-previewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
|
|
123
|
-
"LinkFieldViewPreviewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
|
|
124
|
-
"LinkFieldView-anchorOption-label": "alinea-LinkFieldView-anchorOption-label",
|
|
125
|
-
"LinkFieldViewAnchorOptionLabel": "alinea-LinkFieldView-anchorOption-label",
|
|
126
|
-
"LinkFieldView-dropIndicator": "alinea-LinkFieldView-dropIndicator",
|
|
127
|
-
"LinkFieldViewDropIndicator": "alinea-LinkFieldView-dropIndicator",
|
|
128
|
-
"is-loading": "alinea-is-loading",
|
|
129
|
-
"isLoading": "alinea-is-loading",
|
|
130
|
-
"LinkFieldView-metaLabel": "alinea-LinkFieldView-metaLabel",
|
|
131
|
-
"LinkFieldViewMetaLabel": "alinea-LinkFieldView-metaLabel",
|
|
132
|
-
"LinkFieldView-anchorOption-location": "alinea-LinkFieldView-anchorOption-location",
|
|
133
|
-
"LinkFieldViewAnchorOptionLocation": "alinea-LinkFieldView-anchorOption-location",
|
|
134
126
|
"LinkFieldView-meta": "alinea-LinkFieldView-meta",
|
|
135
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",
|
|
136
134
|
"LinkFieldView-anchorOption": "alinea-LinkFieldView-anchorOption",
|
|
137
135
|
"LinkFieldViewAnchorOption": "alinea-LinkFieldView-anchorOption",
|
|
138
|
-
"LinkFieldView-
|
|
139
|
-
"
|
|
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"
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
// src/field/link/LinkField.view.tsx
|
|
@@ -1072,51 +1074,59 @@ function SingleLinkRow({ field, node, value }) {
|
|
|
1072
1074
|
] });
|
|
1073
1075
|
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1074
1076
|
/* @__PURE__ */ jsxs(ListRow, { "aria-label": "Link item 1", first: true, role: "listitem", children: [
|
|
1075
|
-
/* @__PURE__ */ jsxs(
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
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
|
+
] })
|
|
1115
|
+
] }),
|
|
1116
|
+
/* @__PURE__ */ jsx(
|
|
1117
|
+
Button,
|
|
1092
1118
|
{
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1119
|
+
appearance: "plain",
|
|
1120
|
+
"aria-label": "Remove link",
|
|
1121
|
+
icon: IcRoundClose,
|
|
1122
|
+
onPress: removeLink,
|
|
1123
|
+
size: "icon-small"
|
|
1098
1124
|
}
|
|
1099
|
-
)
|
|
1100
|
-
/* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
1101
|
-
/* @__PURE__ */ jsxs(ListRowSettings, { children: [
|
|
1102
|
-
/* @__PURE__ */ jsx(LinkLabelField, { node, value }),
|
|
1103
|
-
/* @__PURE__ */ jsx(EntryAnchorField, { node, value }),
|
|
1104
|
-
/* @__PURE__ */ jsx(EntryLinkSuffixField, { node, value })
|
|
1105
|
-
] })
|
|
1125
|
+
)
|
|
1106
1126
|
] })
|
|
1107
|
-
]
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
{
|
|
1111
|
-
appearance: "plain",
|
|
1112
|
-
"aria-label": "Remove link",
|
|
1113
|
-
icon: IcRoundClose,
|
|
1114
|
-
onPress: removeLink,
|
|
1115
|
-
size: "icon-small"
|
|
1116
|
-
}
|
|
1117
|
-
)
|
|
1118
|
-
] })
|
|
1119
|
-
] }),
|
|
1127
|
+
]
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1120
1130
|
hasFields && /* @__PURE__ */ jsx(ListRowBody, { children: /* @__PURE__ */ jsx(LinkRowEditor, { node, picker }) })
|
|
1121
1131
|
] }),
|
|
1122
1132
|
picker && /* @__PURE__ */ jsx(
|
|
@@ -1380,13 +1390,14 @@ function SingleLinkFieldView({ field }) {
|
|
|
1380
1390
|
value: selectedValue
|
|
1381
1391
|
}
|
|
1382
1392
|
),
|
|
1383
|
-
isEmpty && !readOnly && /* @__PURE__ */ jsx(ListCreateRow, { empty: true, children: /* @__PURE__ */ jsx(SingleLinkCreateActions, { field }) })
|
|
1393
|
+
isEmpty && !readOnly && /* @__PURE__ */ jsx(ListCreateRow, { empty: true, className: styles.LinkFieldView.inputHeader(), children: /* @__PURE__ */ jsx(SingleLinkCreateActions, { field }) })
|
|
1384
1394
|
] });
|
|
1385
1395
|
return /* @__PURE__ */ jsx(
|
|
1386
1396
|
Label,
|
|
1387
1397
|
{
|
|
1388
1398
|
description: options.help,
|
|
1389
1399
|
label: options.inline ? void 0 : options.label,
|
|
1400
|
+
isRequired: options.required,
|
|
1390
1401
|
shared: options.shared,
|
|
1391
1402
|
children: content
|
|
1392
1403
|
}
|
|
@@ -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 = {
|
|
97
|
+
"ListFieldTypePicker-item": "alinea-ListFieldTypePicker-item",
|
|
98
|
+
"ListFieldTypePickerItem": "alinea-ListFieldTypePicker-item",
|
|
99
99
|
"ListFieldView-insertAction": "alinea-ListFieldView-insertAction",
|
|
100
100
|
"ListFieldViewInsertAction": "alinea-ListFieldView-insertAction",
|
|
101
|
-
"ListFieldView-dropIndicator": "alinea-ListFieldView-dropIndicator",
|
|
102
|
-
"ListFieldViewDropIndicator": "alinea-ListFieldView-dropIndicator",
|
|
103
|
-
"ListFieldTypePicker-trigger": "alinea-ListFieldTypePicker-trigger",
|
|
104
|
-
"ListFieldTypePickerTrigger": "alinea-ListFieldTypePicker-trigger",
|
|
105
101
|
"ListFieldTypePicker-list": "alinea-ListFieldTypePicker-list",
|
|
106
102
|
"ListFieldTypePickerList": "alinea-ListFieldTypePicker-list",
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"ListFieldCreateActions": "alinea-ListFieldCreateActions",
|
|
103
|
+
"ListFieldView-dropIndicator": "alinea-ListFieldView-dropIndicator",
|
|
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",
|
|
110
109
|
"ListFieldTypePicker-empty": "alinea-ListFieldTypePicker-empty",
|
|
111
110
|
"ListFieldTypePickerEmpty": "alinea-ListFieldTypePicker-empty",
|
|
112
111
|
"ListFieldTypePicker-popover": "alinea-ListFieldTypePicker-popover",
|
|
113
112
|
"ListFieldTypePickerPopover": "alinea-ListFieldTypePicker-popover",
|
|
114
|
-
"ListFieldTypePicker-
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"ListFieldCreateActionsButton": "alinea-ListFieldCreateActions-button",
|
|
113
|
+
"ListFieldTypePicker-trigger": "alinea-ListFieldTypePicker-trigger",
|
|
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-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"SearchEnginePreview-og": "alinea-SearchEnginePreview-og",
|
|
25
|
-
"SearchEnginePreviewOg": "alinea-SearchEnginePreview-og",
|
|
26
|
-
"SearchEnginePreview": "alinea-SearchEnginePreview",
|
|
27
|
-
"OpenGraphPreview-title": "alinea-OpenGraphPreview-title",
|
|
28
|
-
"OpenGraphPreviewTitle": "alinea-OpenGraphPreview-title",
|
|
29
|
-
"MetadataUserFieldView": "alinea-MetadataUserFieldView",
|
|
30
|
-
"MetadataUserFieldView-contact": "alinea-MetadataUserFieldView-contact",
|
|
31
|
-
"MetadataUserFieldViewContact": "alinea-MetadataUserFieldView-contact",
|
|
20
|
+
"OpenGraphPreview-site": "alinea-OpenGraphPreview-site",
|
|
21
|
+
"OpenGraphPreviewSite": "alinea-OpenGraphPreview-site",
|
|
22
|
+
"SearchEnginePreview-description": "alinea-SearchEnginePreview-description",
|
|
23
|
+
"SearchEnginePreviewDescription": "alinea-SearchEnginePreview-description",
|
|
32
24
|
"SearchEnginePreview-og-label-small": "alinea-SearchEnginePreview-og-label-small",
|
|
33
25
|
"SearchEnginePreviewOgLabelSmall": "alinea-SearchEnginePreview-og-label-small",
|
|
26
|
+
"OpenGraphPreview": "alinea-OpenGraphPreview",
|
|
34
27
|
"SearchEnginePreview-og-label": "alinea-SearchEnginePreview-og-label",
|
|
35
28
|
"SearchEnginePreviewOgLabel": "alinea-SearchEnginePreview-og-label",
|
|
29
|
+
"MetadataUserFieldView-person": "alinea-MetadataUserFieldView-person",
|
|
30
|
+
"MetadataUserFieldViewPerson": "alinea-MetadataUserFieldView-person",
|
|
36
31
|
"OpenGraphPreview-description": "alinea-OpenGraphPreview-description",
|
|
37
32
|
"OpenGraphPreviewDescription": "alinea-OpenGraphPreview-description",
|
|
38
|
-
"OpenGraphPreview-
|
|
39
|
-
"
|
|
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",
|
|
40
42
|
"SearchEnginePreview-link": "alinea-SearchEnginePreview-link",
|
|
41
43
|
"SearchEnginePreviewLink": "alinea-SearchEnginePreview-link",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"OpenGraphPreview-content": "alinea-OpenGraphPreview-content",
|
|
47
|
-
"OpenGraphPreviewContent": "alinea-OpenGraphPreview-content"
|
|
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;
|