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
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
import "../../chunks/chunk-Y7XOMJOC.js";
|
|
7
7
|
import {
|
|
8
8
|
$143fb904d86051ce$export$89be5a243e59c4b2
|
|
9
|
-
} from "../../chunks/chunk-
|
|
9
|
+
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
10
10
|
import {
|
|
11
11
|
$42ceafc619f9c3ba$export$fb8073518f34e6ec
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-O7XWTMCB.js";
|
|
13
13
|
import "../../chunks/chunk-RKDPDEF7.js";
|
|
14
14
|
import {
|
|
15
15
|
$942f06a693c162e2$export$cacbb3924155d68e
|
|
16
|
-
} from "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
16
|
+
} from "../../chunks/chunk-NIVGVRDS.js";
|
|
18
17
|
import "../../chunks/chunk-IYAQC63Y.js";
|
|
18
|
+
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
19
19
|
import {
|
|
20
20
|
$32ef394310635fd5$export$2cfc5be7a55829f6
|
|
21
|
-
} from "../../chunks/chunk-
|
|
22
|
-
import "../../chunks/chunk-
|
|
21
|
+
} from "../../chunks/chunk-6V4TAD2N.js";
|
|
22
|
+
import "../../chunks/chunk-S4AU6SRS.js";
|
|
23
23
|
import "../../chunks/chunk-AC4U3IMS.js";
|
|
24
24
|
import {
|
|
25
25
|
dist_default
|
|
@@ -43,62 +43,62 @@ import { LocaleMenu } from "./LocaleMenu.js";
|
|
|
43
43
|
|
|
44
44
|
// src/dashboard/app/SidebarTree.module.css
|
|
45
45
|
var SidebarTree_default = {
|
|
46
|
-
"SidebarTree-
|
|
47
|
-
"
|
|
48
|
-
"SidebarTree-
|
|
49
|
-
"
|
|
46
|
+
"SidebarTree-rootButton": "alinea-SidebarTree-rootButton",
|
|
47
|
+
"SidebarTreeRootButton": "alinea-SidebarTree-rootButton",
|
|
48
|
+
"SidebarTree-itemSkeleton-label": "alinea-SidebarTree-itemSkeleton-label",
|
|
49
|
+
"SidebarTreeItemSkeletonLabel": "alinea-SidebarTree-itemSkeleton-label",
|
|
50
|
+
"is-selected": "alinea-is-selected",
|
|
51
|
+
"isSelected": "alinea-is-selected",
|
|
50
52
|
"SidebarTree-rootButton-label": "alinea-SidebarTree-rootButton-label",
|
|
51
53
|
"SidebarTreeRootButtonLabel": "alinea-SidebarTree-rootButton-label",
|
|
52
|
-
"SidebarTree-
|
|
53
|
-
"
|
|
54
|
+
"SidebarTree-root": "alinea-SidebarTree-root",
|
|
55
|
+
"SidebarTreeRoot": "alinea-SidebarTree-root",
|
|
56
|
+
"SidebarTree-rootButton-locale": "alinea-SidebarTree-rootButton-locale",
|
|
57
|
+
"SidebarTreeRootButtonLocale": "alinea-SidebarTree-rootButton-locale",
|
|
58
|
+
"is-draft": "alinea-is-draft",
|
|
59
|
+
"isDraft": "alinea-is-draft",
|
|
60
|
+
"SidebarTree-tree": "alinea-SidebarTree-tree",
|
|
61
|
+
"SidebarTreeTree": "alinea-SidebarTree-tree",
|
|
62
|
+
"SidebarTree-skeleton-pulse": "alinea-SidebarTree-skeleton-pulse",
|
|
63
|
+
"SidebarTreeSkeletonPulse": "alinea-SidebarTree-skeleton-pulse",
|
|
64
|
+
"SidebarTree-skeleton-label": "alinea-SidebarTree-skeleton-label",
|
|
65
|
+
"SidebarTreeSkeletonLabel": "alinea-SidebarTree-skeleton-label",
|
|
54
66
|
"SidebarTree-skeleton-row": "alinea-SidebarTree-skeleton-row",
|
|
55
67
|
"SidebarTreeSkeletonRow": "alinea-SidebarTree-skeleton-row",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
68
|
+
"is-archived": "alinea-is-archived",
|
|
69
|
+
"isArchived": "alinea-is-archived",
|
|
70
|
+
"is-untranslated": "alinea-is-untranslated",
|
|
71
|
+
"isUntranslated": "alinea-is-untranslated",
|
|
72
|
+
"SidebarTree-entryLink": "alinea-SidebarTree-entryLink",
|
|
73
|
+
"SidebarTreeEntryLink": "alinea-SidebarTree-entryLink",
|
|
58
74
|
"SidebarTree-skeleton": "alinea-SidebarTree-skeleton",
|
|
59
75
|
"SidebarTreeSkeleton": "alinea-SidebarTree-skeleton",
|
|
76
|
+
"is-short": "alinea-is-short",
|
|
77
|
+
"isShort": "alinea-is-short",
|
|
78
|
+
"SidebarTree-loading": "alinea-SidebarTree-loading",
|
|
79
|
+
"SidebarTreeLoading": "alinea-SidebarTree-loading",
|
|
80
|
+
"SidebarTree-itemLoading": "alinea-SidebarTree-itemLoading",
|
|
81
|
+
"SidebarTreeItemLoading": "alinea-SidebarTree-itemLoading",
|
|
60
82
|
"SidebarTree-itemLoading-pulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
61
83
|
"SidebarTreeItemLoadingPulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
62
|
-
"SidebarTree-status": "alinea-SidebarTree-status",
|
|
63
|
-
"SidebarTreeStatus": "alinea-SidebarTree-status",
|
|
64
84
|
"SidebarTree-item": "alinea-SidebarTree-item",
|
|
65
85
|
"SidebarTreeItem": "alinea-SidebarTree-item",
|
|
66
|
-
"SidebarTree-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"SidebarTree-tree": "alinea-SidebarTree-tree",
|
|
71
|
-
"SidebarTreeTree": "alinea-SidebarTree-tree",
|
|
86
|
+
"SidebarTree-skeleton-chevron": "alinea-SidebarTree-skeleton-chevron",
|
|
87
|
+
"SidebarTreeSkeletonChevron": "alinea-SidebarTree-skeleton-chevron",
|
|
88
|
+
"SidebarTree-skeleton-icon": "alinea-SidebarTree-skeleton-icon",
|
|
89
|
+
"SidebarTreeSkeletonIcon": "alinea-SidebarTree-skeleton-icon",
|
|
72
90
|
"is-loading": "alinea-is-loading",
|
|
73
91
|
"isLoading": "alinea-is-loading",
|
|
74
|
-
"is-unpublished": "alinea-is-unpublished",
|
|
75
|
-
"isUnpublished": "alinea-is-unpublished",
|
|
76
92
|
"SidebarTree-tree-viewport": "alinea-SidebarTree-tree-viewport",
|
|
77
93
|
"SidebarTreeTreeViewport": "alinea-SidebarTree-tree-viewport",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"SidebarTree-skeleton-pulse": "alinea-SidebarTree-skeleton-pulse",
|
|
81
|
-
"SidebarTreeSkeletonPulse": "alinea-SidebarTree-skeleton-pulse",
|
|
94
|
+
"is-unpublished": "alinea-is-unpublished",
|
|
95
|
+
"isUnpublished": "alinea-is-unpublished",
|
|
82
96
|
"is-parentSelected": "alinea-is-parentSelected",
|
|
83
97
|
"isParentSelected": "alinea-is-parentSelected",
|
|
84
|
-
"SidebarTree-
|
|
85
|
-
"
|
|
86
|
-
"SidebarTree-
|
|
87
|
-
"
|
|
88
|
-
"SidebarTree-itemLoading": "alinea-SidebarTree-itemLoading",
|
|
89
|
-
"SidebarTreeItemLoading": "alinea-SidebarTree-itemLoading",
|
|
90
|
-
"is-selected": "alinea-is-selected",
|
|
91
|
-
"isSelected": "alinea-is-selected",
|
|
92
|
-
"SidebarTree-loading": "alinea-SidebarTree-loading",
|
|
93
|
-
"SidebarTreeLoading": "alinea-SidebarTree-loading",
|
|
94
|
-
"SidebarTree-skeleton-chevron": "alinea-SidebarTree-skeleton-chevron",
|
|
95
|
-
"SidebarTreeSkeletonChevron": "alinea-SidebarTree-skeleton-chevron",
|
|
96
|
-
"is-short": "alinea-is-short",
|
|
97
|
-
"isShort": "alinea-is-short",
|
|
98
|
-
"is-archived": "alinea-is-archived",
|
|
99
|
-
"isArchived": "alinea-is-archived",
|
|
100
|
-
"is-draft": "alinea-is-draft",
|
|
101
|
-
"isDraft": "alinea-is-draft"
|
|
98
|
+
"SidebarTree-status": "alinea-SidebarTree-status",
|
|
99
|
+
"SidebarTreeStatus": "alinea-SidebarTree-status",
|
|
100
|
+
"SidebarTree-rootButton-action": "alinea-SidebarTree-rootButton-action",
|
|
101
|
+
"SidebarTreeRootButtonAction": "alinea-SidebarTree-rootButton-action"
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
// src/dashboard/app/SidebarTree.tsx
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import "../../chunks/chunk-Y7XOMJOC.js";
|
|
6
6
|
import {
|
|
7
7
|
$7705c033048f6da7$export$353f5b6fc5456de1
|
|
8
|
-
} from "../../chunks/chunk-
|
|
9
|
-
import "../../chunks/chunk-
|
|
8
|
+
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
9
|
+
import "../../chunks/chunk-O7XWTMCB.js";
|
|
10
10
|
import "../../chunks/chunk-RKDPDEF7.js";
|
|
11
|
-
import "../../chunks/chunk-
|
|
12
|
-
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
11
|
+
import "../../chunks/chunk-NIVGVRDS.js";
|
|
13
12
|
import "../../chunks/chunk-IYAQC63Y.js";
|
|
14
|
-
import "../../chunks/chunk-
|
|
15
|
-
import "../../chunks/chunk-
|
|
13
|
+
import "../../chunks/chunk-SJBZFMQ2.js";
|
|
14
|
+
import "../../chunks/chunk-6V4TAD2N.js";
|
|
15
|
+
import "../../chunks/chunk-S4AU6SRS.js";
|
|
16
16
|
import "../../chunks/chunk-AC4U3IMS.js";
|
|
17
17
|
import {
|
|
18
18
|
dist_default
|
|
@@ -47,22 +47,22 @@ import {
|
|
|
47
47
|
|
|
48
48
|
// src/dashboard/app/WorkspaceMenu.module.css
|
|
49
49
|
var WorkspaceMenu_default = {
|
|
50
|
-
"WorkspaceMenu-avatar-logo": "alinea-WorkspaceMenu-avatar-logo",
|
|
51
|
-
"WorkspaceMenuAvatarLogo": "alinea-WorkspaceMenu-avatar-logo",
|
|
52
|
-
"WorkspaceMenu-search": "alinea-WorkspaceMenu-search",
|
|
53
|
-
"WorkspaceMenuSearch": "alinea-WorkspaceMenu-search",
|
|
54
|
-
"WorkspaceMenu-trigger-text": "alinea-WorkspaceMenu-trigger-text",
|
|
55
|
-
"WorkspaceMenuTriggerText": "alinea-WorkspaceMenu-trigger-text",
|
|
56
|
-
"WorkspaceMenu-menuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
57
|
-
"WorkspaceMenuMenuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
58
50
|
"WorkspaceMenu-trigger": "alinea-WorkspaceMenu-trigger",
|
|
59
51
|
"WorkspaceMenuTrigger": "alinea-WorkspaceMenu-trigger",
|
|
60
|
-
"WorkspaceMenu-
|
|
61
|
-
"
|
|
52
|
+
"WorkspaceMenu-search": "alinea-WorkspaceMenu-search",
|
|
53
|
+
"WorkspaceMenuSearch": "alinea-WorkspaceMenu-search",
|
|
62
54
|
"WorkspaceMenu-avatarTrigger": "alinea-WorkspaceMenu-avatarTrigger",
|
|
63
55
|
"WorkspaceMenuAvatarTrigger": "alinea-WorkspaceMenu-avatarTrigger",
|
|
56
|
+
"WorkspaceMenu-avatar": "alinea-WorkspaceMenu-avatar",
|
|
57
|
+
"WorkspaceMenuAvatar": "alinea-WorkspaceMenu-avatar",
|
|
58
|
+
"WorkspaceMenu-menuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
59
|
+
"WorkspaceMenuMenuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
60
|
+
"WorkspaceMenu-avatar-logo": "alinea-WorkspaceMenu-avatar-logo",
|
|
61
|
+
"WorkspaceMenuAvatarLogo": "alinea-WorkspaceMenu-avatar-logo",
|
|
64
62
|
"WorkspaceMenu-parent": "alinea-WorkspaceMenu-parent",
|
|
65
|
-
"WorkspaceMenuParent": "alinea-WorkspaceMenu-parent"
|
|
63
|
+
"WorkspaceMenuParent": "alinea-WorkspaceMenu-parent",
|
|
64
|
+
"WorkspaceMenu-trigger-text": "alinea-WorkspaceMenu-trigger-text",
|
|
65
|
+
"WorkspaceMenuTriggerText": "alinea-WorkspaceMenu-trigger-text"
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
// src/dashboard/app/WorkspaceMenu.tsx
|
|
@@ -46,43 +46,43 @@ import { WorkspaceAvatarMenu } from "./WorkspaceMenu.js";
|
|
|
46
46
|
|
|
47
47
|
// src/dashboard/app/WorkspaceRoots.module.css
|
|
48
48
|
var WorkspaceRoots_default = {
|
|
49
|
-
"WorkspaceRoots-profile-popover-surface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
50
|
-
"WorkspaceRootsProfilePopoverSurface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
51
|
-
"WorkspaceRoots-roots": "alinea-WorkspaceRoots-roots",
|
|
52
|
-
"WorkspaceRootsRoots": "alinea-WorkspaceRoots-roots",
|
|
53
|
-
"WorkspaceRoots-profile-popover-user-icon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
54
|
-
"WorkspaceRootsProfilePopoverUserIcon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
55
|
-
"WorkspaceRoots-profile-popover-user-title": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
56
|
-
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
57
|
-
"WorkspaceRoots-profile-popover-action-label": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
58
|
-
"WorkspaceRootsProfilePopoverActionLabel": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
59
|
-
"WorkspaceRoots-profile-popover-themeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
60
|
-
"WorkspaceRootsProfilePopoverThemeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
61
49
|
"WorkspaceRoots-profile": "alinea-WorkspaceRoots-profile",
|
|
62
50
|
"WorkspaceRootsProfile": "alinea-WorkspaceRoots-profile",
|
|
51
|
+
"WorkspaceRoots-profile-popover-user-title": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
52
|
+
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
63
53
|
"WorkspaceRoots-profile-popover-item-label": "alinea-WorkspaceRoots-profile-popover-item-label",
|
|
64
54
|
"WorkspaceRootsProfilePopoverItemLabel": "alinea-WorkspaceRoots-profile-popover-item-label",
|
|
65
|
-
"WorkspaceRoots-
|
|
66
|
-
"
|
|
67
|
-
"WorkspaceRoots
|
|
68
|
-
"WorkspaceRootsProfilePopoverActionButton": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
69
|
-
"WorkspaceRoots-trigger-text": "alinea-WorkspaceRoots-trigger-text",
|
|
70
|
-
"WorkspaceRootsTriggerText": "alinea-WorkspaceRoots-trigger-text",
|
|
55
|
+
"WorkspaceRoots-profile-popover-user-icon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
56
|
+
"WorkspaceRootsProfilePopoverUserIcon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
57
|
+
"WorkspaceRoots": "alinea-WorkspaceRoots",
|
|
71
58
|
"WorkspaceRoots-profile-popover-user": "alinea-WorkspaceRoots-profile-popover-user",
|
|
72
59
|
"WorkspaceRootsProfilePopoverUser": "alinea-WorkspaceRoots-profile-popover-user",
|
|
73
|
-
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
74
|
-
"
|
|
60
|
+
"WorkspaceRoots-profile-popover-action-label": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
61
|
+
"WorkspaceRootsProfilePopoverActionLabel": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
62
|
+
"WorkspaceRoots-profile-popover-action-button": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
63
|
+
"WorkspaceRootsProfilePopoverActionButton": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
64
|
+
"WorkspaceRoots-profile-popover-surface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
65
|
+
"WorkspaceRootsProfilePopoverSurface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
75
66
|
"WorkspaceRoots-workspace": "alinea-WorkspaceRoots-workspace",
|
|
76
67
|
"WorkspaceRootsWorkspace": "alinea-WorkspaceRoots-workspace",
|
|
77
|
-
"WorkspaceRoots-rootButton": "alinea-WorkspaceRoots-rootButton",
|
|
78
|
-
"WorkspaceRootsRootButton": "alinea-WorkspaceRoots-rootButton",
|
|
79
68
|
"WorkspaceRoots-profile-popover": "alinea-WorkspaceRoots-profile-popover",
|
|
80
69
|
"WorkspaceRootsProfilePopover": "alinea-WorkspaceRoots-profile-popover",
|
|
70
|
+
"WorkspaceRoots-footer": "alinea-WorkspaceRoots-footer",
|
|
71
|
+
"WorkspaceRootsFooter": "alinea-WorkspaceRoots-footer",
|
|
72
|
+
"WorkspaceRoots-profile-popover-themeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
73
|
+
"WorkspaceRootsProfilePopoverThemeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
74
|
+
"WorkspaceRoots-trigger-text": "alinea-WorkspaceRoots-trigger-text",
|
|
75
|
+
"WorkspaceRootsTriggerText": "alinea-WorkspaceRoots-trigger-text",
|
|
76
|
+
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
77
|
+
"WorkspaceRootsProfilePopoverAction": "alinea-WorkspaceRoots-profile-popover-action",
|
|
81
78
|
"WorkspaceRoots-profile-popover-item": "alinea-WorkspaceRoots-profile-popover-item",
|
|
82
79
|
"WorkspaceRootsProfilePopoverItem": "alinea-WorkspaceRoots-profile-popover-item",
|
|
80
|
+
"WorkspaceRoots-rootButton": "alinea-WorkspaceRoots-rootButton",
|
|
81
|
+
"WorkspaceRootsRootButton": "alinea-WorkspaceRoots-rootButton",
|
|
83
82
|
"WorkspaceRoots-trigger": "alinea-WorkspaceRoots-trigger",
|
|
84
83
|
"WorkspaceRootsTrigger": "alinea-WorkspaceRoots-trigger",
|
|
85
|
-
"WorkspaceRoots": "alinea-WorkspaceRoots"
|
|
84
|
+
"WorkspaceRoots-roots": "alinea-WorkspaceRoots-roots",
|
|
85
|
+
"WorkspaceRootsRoots": "alinea-WorkspaceRoots-roots"
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
// src/dashboard/app/WorkspaceRoots.tsx
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Entry } from 'alinea/core/Entry';
|
|
2
2
|
export interface FileEditorProps {
|
|
3
3
|
entry: Pick<Entry, 'root' | 'url' | 'workspace'>;
|
|
4
|
+
parentPaths: Array<string>;
|
|
4
5
|
}
|
|
5
|
-
export declare function FileEditor({ entry }: FileEditorProps): import("react").JSX.Element;
|
|
6
|
+
export declare function FileEditor({ entry, parentPaths }: FileEditorProps): import("react").JSX.Element;
|
|
@@ -20,7 +20,6 @@ import { Config } from "alinea/core/Config";
|
|
|
20
20
|
import { isImage as isImageExtension } from "alinea/core/media/IsImage";
|
|
21
21
|
import { MediaLocation } from "alinea/core/media/MediaLocation";
|
|
22
22
|
import { MediaFile } from "alinea/core/media/MediaTypes";
|
|
23
|
-
import { outcome } from "alinea/core/Outcome";
|
|
24
23
|
import { base64 } from "alinea/core/util/Encoding";
|
|
25
24
|
import { configAtom } from "alinea/dashboard/atoms/core";
|
|
26
25
|
import { useEditor, useField, useFieldValue } from "alinea/dashboard/hooks";
|
|
@@ -29,43 +28,45 @@ import { NodeEditor } from "../EntryFields.js";
|
|
|
29
28
|
|
|
30
29
|
// src/dashboard/app/editor/FileEditor.module.css
|
|
31
30
|
var FileEditor_default = {
|
|
32
|
-
"FileEditor-content": "alinea-FileEditor-content",
|
|
33
|
-
"FileEditorContent": "alinea-FileEditor-content",
|
|
34
|
-
"FileEditor-metadata-grid": "alinea-FileEditor-metadata-grid",
|
|
35
|
-
"FileEditorMetadataGrid": "alinea-FileEditor-metadata-grid",
|
|
36
31
|
"FileEditor-focus-header": "alinea-FileEditor-focus-header",
|
|
37
32
|
"FileEditorFocusHeader": "alinea-FileEditor-focus-header",
|
|
38
|
-
"FileEditor-focus-label": "alinea-FileEditor-focus-label",
|
|
39
|
-
"FileEditorFocusLabel": "alinea-FileEditor-focus-label",
|
|
40
|
-
"FileEditor-focus-description": "alinea-FileEditor-focus-description",
|
|
41
|
-
"FileEditorFocusDescription": "alinea-FileEditor-focus-description",
|
|
42
33
|
"is-full": "alinea-is-full",
|
|
43
34
|
"isFull": "alinea-is-full",
|
|
35
|
+
"FileEditor-metadata-value": "alinea-FileEditor-metadata-value",
|
|
36
|
+
"FileEditorMetadataValue": "alinea-FileEditor-metadata-value",
|
|
37
|
+
"FileEditor-metadata-term": "alinea-FileEditor-metadata-term",
|
|
38
|
+
"FileEditorMetadataTerm": "alinea-FileEditor-metadata-term",
|
|
44
39
|
"FileEditor-tabs": "alinea-FileEditor-tabs",
|
|
45
40
|
"FileEditorTabs": "alinea-FileEditor-tabs",
|
|
46
|
-
"FileEditor-metadataPanel": "alinea-FileEditor-metadataPanel",
|
|
47
|
-
"FileEditorMetadataPanel": "alinea-FileEditor-metadataPanel",
|
|
48
41
|
"FileEditor-metadata-item": "alinea-FileEditor-metadata-item",
|
|
49
42
|
"FileEditorMetadataItem": "alinea-FileEditor-metadata-item",
|
|
43
|
+
"is-link": "alinea-is-link",
|
|
44
|
+
"isLink": "alinea-is-link",
|
|
45
|
+
"FileEditor-metadataPanel": "alinea-FileEditor-metadataPanel",
|
|
46
|
+
"FileEditorMetadataPanel": "alinea-FileEditor-metadataPanel",
|
|
47
|
+
"FileEditor-focus-label": "alinea-FileEditor-focus-label",
|
|
48
|
+
"FileEditorFocusLabel": "alinea-FileEditor-focus-label",
|
|
49
|
+
"FileEditor-surface": "alinea-FileEditor-surface",
|
|
50
|
+
"FileEditorSurface": "alinea-FileEditor-surface",
|
|
51
|
+
"FileEditor-tabPanel": "alinea-FileEditor-tabPanel",
|
|
52
|
+
"FileEditorTabPanel": "alinea-FileEditor-tabPanel",
|
|
50
53
|
"FileEditor-focus": "alinea-FileEditor-focus",
|
|
51
54
|
"FileEditorFocus": "alinea-FileEditor-focus",
|
|
52
55
|
"FileEditor-tabs-header": "alinea-FileEditor-tabs-header",
|
|
53
56
|
"FileEditorTabsHeader": "alinea-FileEditor-tabs-header",
|
|
54
|
-
"FileEditor-
|
|
55
|
-
"
|
|
57
|
+
"FileEditor-content": "alinea-FileEditor-content",
|
|
58
|
+
"FileEditorContent": "alinea-FileEditor-content",
|
|
56
59
|
"FileEditor-metadata": "alinea-FileEditor-metadata",
|
|
57
60
|
"FileEditorMetadata": "alinea-FileEditor-metadata",
|
|
58
|
-
"is-image": "alinea-is-image",
|
|
59
|
-
"isImage": "alinea-is-image",
|
|
60
61
|
"FileEditor": "alinea-FileEditor",
|
|
61
|
-
"FileEditor-metadata-
|
|
62
|
-
"
|
|
63
|
-
"FileEditor-
|
|
64
|
-
"
|
|
65
|
-
"FileEditor-surface": "alinea-FileEditor-surface",
|
|
66
|
-
"FileEditorSurface": "alinea-FileEditor-surface",
|
|
62
|
+
"FileEditor-metadata-grid": "alinea-FileEditor-metadata-grid",
|
|
63
|
+
"FileEditorMetadataGrid": "alinea-FileEditor-metadata-grid",
|
|
64
|
+
"FileEditor-focus-description": "alinea-FileEditor-focus-description",
|
|
65
|
+
"FileEditorFocusDescription": "alinea-FileEditor-focus-description",
|
|
67
66
|
"FileEditor-focus-value": "alinea-FileEditor-focus-value",
|
|
68
|
-
"FileEditorFocusValue": "alinea-FileEditor-focus-value"
|
|
67
|
+
"FileEditorFocusValue": "alinea-FileEditor-focus-value",
|
|
68
|
+
"is-image": "alinea-is-image",
|
|
69
|
+
"isImage": "alinea-is-image"
|
|
69
70
|
};
|
|
70
71
|
|
|
71
72
|
// src/dashboard/app/editor/FileEditor.tsx
|
|
@@ -80,7 +81,7 @@ var metadataFields = type("Metadata", {
|
|
|
80
81
|
metadata: MediaFile.metadata
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
|
-
function FileEditor({ entry }) {
|
|
84
|
+
function FileEditor({ entry, parentPaths }) {
|
|
84
85
|
const config = useAtomValue(configAtom);
|
|
85
86
|
const location = useFieldValue(MediaFile.location);
|
|
86
87
|
const path = useFieldValue(MediaFile.path);
|
|
@@ -98,15 +99,15 @@ function FileEditor({ entry }) {
|
|
|
98
99
|
const [focusPoint = { x: 0.5, y: 0.5 }] = useField(MediaFile.focus);
|
|
99
100
|
const [hoverPoint, setHoverPoint] = useState(null);
|
|
100
101
|
const publicLocation = MediaLocation.publicUrl(config, {
|
|
101
|
-
entryUrl: entry.url,
|
|
102
102
|
extension,
|
|
103
103
|
location,
|
|
104
|
+
parentPaths,
|
|
104
105
|
path,
|
|
105
106
|
root: entry.root,
|
|
106
107
|
workspace: entry.workspace
|
|
107
108
|
});
|
|
108
109
|
const baseUrl = Config.baseUrl(config) ?? window.location.href;
|
|
109
|
-
const
|
|
110
|
+
const liveUrl = URL.parse(publicLocation, baseUrl);
|
|
110
111
|
const parsedBaseUrl = URL.parse(baseUrl);
|
|
111
112
|
const displayedUrl = liveUrl ? parsedBaseUrl && liveUrl.origin === parsedBaseUrl.origin ? `${liveUrl.pathname}${liveUrl.search}${liveUrl.hash}` : liveUrl.href : void 0;
|
|
112
113
|
const displayedFocusPoint = hoverPoint ?? focusPoint;
|
|
@@ -153,15 +154,23 @@ function FileEditor({ entry }) {
|
|
|
153
154
|
className: styles.FileEditor.metadata.item({ full: true }),
|
|
154
155
|
children: [
|
|
155
156
|
/* @__PURE__ */ jsx("dt", { className: styles.FileEditor.metadata.term(), children: "URL" }),
|
|
156
|
-
/* @__PURE__ */ jsx(
|
|
157
|
-
"
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
"dd",
|
|
158
159
|
{
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
children:
|
|
160
|
+
className: styles.FileEditor.metadata.value({
|
|
161
|
+
link: true
|
|
162
|
+
}),
|
|
163
|
+
children: /* @__PURE__ */ jsx(
|
|
164
|
+
"a",
|
|
165
|
+
{
|
|
166
|
+
href: liveUrl.href,
|
|
167
|
+
target: "_blank",
|
|
168
|
+
rel: "noopener noreferrer",
|
|
169
|
+
children: displayedUrl
|
|
170
|
+
}
|
|
171
|
+
)
|
|
163
172
|
}
|
|
164
|
-
)
|
|
173
|
+
)
|
|
165
174
|
]
|
|
166
175
|
}
|
|
167
176
|
)
|
|
@@ -10,17 +10,17 @@ import { useEffect, useRef, useState } from "react";
|
|
|
10
10
|
|
|
11
11
|
// src/dashboard/app/editor/FilePreview.module.css
|
|
12
12
|
var FilePreview_default = {
|
|
13
|
-
"FilePreview": "alinea-FilePreview",
|
|
14
13
|
"FilePreview-interactive": "alinea-FilePreview-interactive",
|
|
15
14
|
"FilePreviewInteractive": "alinea-FilePreview-interactive",
|
|
16
15
|
"FilePreview-image": "alinea-FilePreview-image",
|
|
17
16
|
"FilePreviewImage": "alinea-FilePreview-image",
|
|
18
|
-
"FilePreview-focus-inner": "alinea-FilePreview-focus-inner",
|
|
19
|
-
"FilePreviewFocusInner": "alinea-FilePreview-focus-inner",
|
|
20
17
|
"FilePreview-focus-dot": "alinea-FilePreview-focus-dot",
|
|
21
18
|
"FilePreviewFocusDot": "alinea-FilePreview-focus-dot",
|
|
22
19
|
"FilePreview-focus": "alinea-FilePreview-focus",
|
|
23
|
-
"FilePreviewFocus": "alinea-FilePreview-focus"
|
|
20
|
+
"FilePreviewFocus": "alinea-FilePreview-focus",
|
|
21
|
+
"FilePreview-focus-inner": "alinea-FilePreview-focus-inner",
|
|
22
|
+
"FilePreviewFocusInner": "alinea-FilePreview-focus-inner",
|
|
23
|
+
"FilePreview": "alinea-FilePreview"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
// src/dashboard/app/editor/FilePreview.tsx
|
|
@@ -6,13 +6,16 @@ import "../../../chunks/chunk-CQ52GEHY.js";
|
|
|
6
6
|
|
|
7
7
|
// src/dashboard/app/editor/MediaAltField.view.tsx
|
|
8
8
|
import { TextField } from "alinea/components";
|
|
9
|
+
import {
|
|
10
|
+
mediaAltText
|
|
11
|
+
} from "alinea/core/media/MediaAltField";
|
|
12
|
+
import { isRecord } from "alinea/core/util/Objects";
|
|
9
13
|
import {
|
|
10
14
|
useEntryAtoms,
|
|
11
15
|
useField,
|
|
12
16
|
useFieldError,
|
|
13
17
|
useFieldOptions
|
|
14
18
|
} from "alinea/dashboard/hooks";
|
|
15
|
-
import { isRecord } from "alinea/core/util/Objects";
|
|
16
19
|
import { LocalisedFieldTabs } from "alinea/field/localiser/LocalisedFieldTabs";
|
|
17
20
|
import { useState } from "react";
|
|
18
21
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -29,7 +32,7 @@ function MediaAltFieldView({ field }) {
|
|
|
29
32
|
{
|
|
30
33
|
error,
|
|
31
34
|
options,
|
|
32
|
-
value:
|
|
35
|
+
value: mediaAltText(value),
|
|
33
36
|
onChange: (next) => setValue(next)
|
|
34
37
|
}
|
|
35
38
|
);
|
|
@@ -46,7 +49,7 @@ function MediaAltFieldView({ field }) {
|
|
|
46
49
|
{
|
|
47
50
|
error,
|
|
48
51
|
options,
|
|
49
|
-
value:
|
|
52
|
+
value: mediaAltText(value, locale2),
|
|
50
53
|
onChange: (next) => {
|
|
51
54
|
setValue((current) => mediaAltLocalise(current, locale2, next));
|
|
52
55
|
}
|
|
@@ -78,12 +81,6 @@ function MediaAltTextField({
|
|
|
78
81
|
}
|
|
79
82
|
);
|
|
80
83
|
}
|
|
81
|
-
function mediaAltString(value, locale) {
|
|
82
|
-
if (typeof value === "string") return value;
|
|
83
|
-
if (!isRecord(value)) return "";
|
|
84
|
-
if (locale && typeof value[locale] === "string") return value[locale];
|
|
85
|
-
return Object.values(value).find((value2) => typeof value2 === "string") ?? "";
|
|
86
|
-
}
|
|
87
84
|
function mediaAltLocalise(value, locale, next) {
|
|
88
85
|
const current = isRecord(value) ? Object.fromEntries(
|
|
89
86
|
Object.entries(value).filter(
|
|
@@ -47,14 +47,14 @@ import {
|
|
|
47
47
|
|
|
48
48
|
// src/dashboard/app/modals/CreateEntry.module.css
|
|
49
49
|
var CreateEntry_default = {
|
|
50
|
-
"CreateEntry-
|
|
51
|
-
"
|
|
50
|
+
"CreateEntry-parentRow": "alinea-CreateEntry-parentRow",
|
|
51
|
+
"CreateEntryParentRow": "alinea-CreateEntry-parentRow",
|
|
52
52
|
"CreateEntry-insertOrder": "alinea-CreateEntry-insertOrder",
|
|
53
53
|
"CreateEntryInsertOrder": "alinea-CreateEntry-insertOrder",
|
|
54
54
|
"CreateEntry-parentField": "alinea-CreateEntry-parentField",
|
|
55
55
|
"CreateEntryParentField": "alinea-CreateEntry-parentField",
|
|
56
|
-
"CreateEntry-
|
|
57
|
-
"
|
|
56
|
+
"CreateEntry-message": "alinea-CreateEntry-message",
|
|
57
|
+
"CreateEntryMessage": "alinea-CreateEntry-message"
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// src/dashboard/app/modals/CreateEntry.tsx
|