alinea 2.0.0-preview.2 → 2.0.0-preview.4
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 +157 -103
- package/dist/adapter/next/DevRemote.js +10 -2
- package/dist/adapter/next/previews.js +4 -1
- package/dist/adapter/next/previews.spec.d.ts +1 -0
- package/dist/backend/Handler.js +14 -7
- package/dist/backend/api/BasicAuth.d.ts +1 -1
- package/dist/backend/api/BasicAuth.js +14 -14
- package/dist/backend/api/OAuth2.d.ts +3 -3
- package/dist/backend/api/OAuth2.js +7 -4
- package/dist/bundled.d.ts +159 -42
- package/dist/chunks/{chunk-Y7XOMJOC.js → chunk-CFNRVI3Y.js} +220 -247
- package/dist/chunks/chunk-D6UJHBJJ.js +183 -0
- package/dist/chunks/chunk-TIJTT5ZI.js +228 -0
- package/dist/chunks/{chunk-UVOEM4AH.js → chunk-XMOVGDFI.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/serve/LocalAuth.js +1 -1
- package/dist/cloud/AuthResult.d.ts +2 -0
- package/dist/cloud/CloudHandshake.d.ts +7 -0
- package/dist/cloud/CloudHandshake.js +64 -0
- package/dist/cloud/CloudRemote.d.ts +4 -1
- package/dist/cloud/CloudRemote.js +21 -3
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/Calendar.js +6 -6
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ComboBox.js +11 -11
- package/dist/components/DateField.js +3 -3
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/DateRangePicker.js +6 -6
- package/dist/components/Disclosure.js +8 -8
- package/dist/components/Label.js +5 -5
- package/dist/components/List.js +34 -34
- package/dist/components/Menu.js +4 -4
- package/dist/components/Modal.js +3 -3
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NumberField.js +6 -6
- package/dist/components/ProgressCircle.js +2 -2
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/SearchField.js +3 -3
- package/dist/components/Select.js +7 -7
- package/dist/components/Surface.js +2 -2
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TagGroup.js +2 -2
- package/dist/components/TextField.js +6 -6
- package/dist/components/TimeField.js +2 -2
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tree.d.ts +4 -2
- package/dist/components/Tree.js +18 -4
- package/dist/core/Connection.d.ts +7 -4
- package/dist/core/Entry.d.ts +6 -0
- package/dist/core/Entry.js +10 -0
- package/dist/core/Graph.d.ts +1 -1
- package/dist/core/Id.d.ts +1 -0
- package/dist/core/Id.js +8 -0
- package/dist/core/Infer.d.ts +8 -1
- package/dist/core/db/EntryAliases.js +1 -4
- package/dist/core/db/EntryResolver.js +6 -6
- package/dist/core/db/EntryTransaction.js +1 -0
- package/dist/core/db/Operation.d.ts +2 -2
- package/dist/core/db/Operation.js +15 -4
- package/dist/dashboard/App.js +37 -17
- package/dist/dashboard/StoryProvider.js +2 -2
- package/dist/dashboard/app/AccessDenied.d.ts +16 -1
- package/dist/dashboard/app/AccessDenied.js +21 -12
- package/dist/dashboard/app/ActivityStatus.js +19 -19
- package/dist/dashboard/app/AppearanceToggle.d.ts +1 -0
- package/dist/dashboard/app/AppearanceToggle.js +43 -0
- package/dist/dashboard/app/AuthView.d.ts +1 -1
- package/dist/dashboard/app/AuthView.js +16 -18
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +17 -17
- package/dist/dashboard/app/DashboardErrorBoundary.js +22 -10
- package/dist/dashboard/app/DashboardLayout.js +15 -8
- package/dist/dashboard/app/DashboardMeta.d.ts +2 -1
- package/dist/dashboard/app/DashboardMeta.js +20 -5
- package/dist/dashboard/app/EntryFields.js +6 -6
- package/dist/dashboard/app/EntryHeader.js +25 -25
- package/dist/dashboard/app/EntryReferences.js +16 -16
- package/dist/dashboard/app/EntrySidebar.js +26 -26
- package/dist/dashboard/app/EntrySidebarPreview.js +61 -34
- package/dist/dashboard/app/EntrySidebarPreview.story.d.ts +6 -1
- package/dist/dashboard/app/EntryTranslationBanner.js +8 -8
- package/dist/dashboard/app/Explorer.d.ts +2 -1
- package/dist/dashboard/app/Explorer.js +79 -67
- package/dist/dashboard/app/ExplorerCards.js +62 -66
- package/dist/dashboard/app/ExplorerFileCard.js +20 -20
- package/dist/dashboard/app/ExplorerList.js +22 -22
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerPickerContent.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +68 -68
- package/dist/dashboard/app/ImagePicker.js +7 -7
- package/dist/dashboard/app/LinkPicker.js +44 -24
- package/dist/dashboard/app/LocaleMenu.js +5 -7
- package/dist/dashboard/app/SidebarLayout.js +7 -7
- package/dist/dashboard/app/SidebarTree.js +66 -74
- package/dist/dashboard/app/WorkspaceMenu.d.ts +10 -3
- package/dist/dashboard/app/WorkspaceMenu.js +85 -64
- package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +2 -0
- package/dist/dashboard/app/WorkspaceRoots.d.ts +3 -1
- package/dist/dashboard/app/WorkspaceRoots.js +82 -107
- package/dist/dashboard/app/editor/FileEditor.js +31 -31
- package/dist/dashboard/app/editor/FilePreview.js +4 -4
- package/dist/dashboard/app/editor/MediaAltField.view.js +4 -4
- package/dist/dashboard/app/modals/CreateEntry.js +14 -14
- package/dist/dashboard/app/pages/EntryPage.js +28 -30
- package/dist/dashboard/app/pages/RootPage.js +4 -4
- package/dist/dashboard/app/pages/SplashPage.d.ts +3 -0
- package/dist/dashboard/app/pages/SplashPage.js +414 -0
- package/dist/dashboard/app/pages/UsersPage.js +35 -35
- package/dist/dashboard/app/ui/DashboardModal.js +19 -19
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/atoms/ReactiveNode.js +1 -1
- package/dist/dashboard/atoms/activity.js +2 -3
- package/dist/dashboard/atoms/auth.d.ts +2 -0
- package/dist/dashboard/atoms/auth.js +6 -2
- package/dist/dashboard/atoms/config.js +1 -1
- package/dist/dashboard/atoms/core.js +2 -2
- package/dist/dashboard/atoms/create.js +1 -1
- package/dist/dashboard/atoms/dashboard.js +2 -2
- package/dist/dashboard/atoms/editor.js +1 -1
- package/dist/dashboard/atoms/entry.js +2 -2
- package/dist/dashboard/atoms/explorer.d.ts +1 -3
- package/dist/dashboard/atoms/explorer.js +7 -9
- package/dist/dashboard/atoms/graph.d.ts +1 -0
- package/dist/dashboard/atoms/graph.js +7 -2
- package/dist/dashboard/atoms/link.js +2 -2
- package/dist/dashboard/atoms/nav.d.ts +4 -3
- package/dist/dashboard/atoms/nav.js +10 -5
- package/dist/dashboard/atoms/preview.js +1 -1
- package/dist/dashboard/atoms/root.js +2 -2
- package/dist/dashboard/atoms/upload.js +1 -1
- package/dist/dashboard/atoms/user.d.ts +1 -1
- package/dist/dashboard/atoms/user.js +8 -6
- package/dist/dashboard/atoms/utils.js +2 -2
- package/dist/dashboard/boot/Boot.js +2 -4
- package/dist/dashboard/boot/DashboardWorker.js +34 -29
- package/dist/dashboard/editor/UseField.js +6 -6
- package/dist/dashboard/fixture/cms.d.ts +12 -0
- package/dist/dashboard/fixture/cms.js +53 -2
- package/dist/dashboard/hook/UseGraph.js +4 -4
- package/dist/dashboard/hook/UseRoot.js +4 -4
- package/dist/dashboard/hooks.js +16 -16
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +15 -15
- package/dist/field/link/EntryLink.d.ts +1 -1
- package/dist/field/link/EntryLink.js +1 -0
- package/dist/field/link/Link.js +1 -0
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +81 -64
- package/dist/field/list/ListField.view.js +26 -26
- package/dist/field/localiser/LocalisedField.view.js +76 -5
- package/dist/field/metadata/MetadataField.d.ts +2 -0
- package/dist/field/metadata/MetadataField.js +2 -1
- package/dist/field/metadata/MetadataField.view.js +20 -20
- package/dist/field/richtext/PickTextLink.js +6 -6
- package/dist/field/richtext/RichTextBlock.js +6 -6
- package/dist/field/richtext/RichTextBlocks.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +23 -23
- package/dist/field/richtext/RichTextField.view.js +9 -9
- package/dist/field/richtext/RichTextState.js +1 -1
- package/dist/field/text/TextField.view.js +2 -2
- package/dist/index.css +436 -28
- package/dist/preview/PreviewMessage.d.ts +3 -0
- package/dist/preview/PreviewMessage.js +1 -0
- package/dist/preview/RegisterPreview.d.ts +1 -1
- package/dist/preview/RegisterPreview.js +28 -10
- package/dist/preview/react.d.ts +5 -1
- package/dist/preview/react.js +12 -9
- package/dist/preview/widget.js +6 -12
- package/dist/query.d.ts +7 -7
- package/package.json +1 -1
- package/dist/chunks/chunk-STAJCW4Z.js +0 -322
- package/dist/chunks/chunk-U4VOHNR2.js +0 -210
|
@@ -5,4 +5,4 @@ export interface AuthViewProps {
|
|
|
5
5
|
action?: DashboardAuthAction
|
|
6
6
|
], unknown>;
|
|
7
7
|
}
|
|
8
|
-
export declare function AuthView({ auth: authState }: AuthViewProps): import("react").JSX.Element
|
|
8
|
+
export declare function AuthView({ auth: authState }: AuthViewProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAtom
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
4
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
dist_default
|
|
7
7
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -16,25 +16,25 @@ import { IcRoundArrowForward, IcRoundPublish } from "../icons.js";
|
|
|
16
16
|
|
|
17
17
|
// src/dashboard/app/AuthView.module.css
|
|
18
18
|
var AuthView_default = {
|
|
19
|
-
"AuthView-panel": "alinea-AuthView-panel",
|
|
20
|
-
"AuthViewPanel": "alinea-AuthView-panel",
|
|
21
|
-
"AuthView-loader": "alinea-AuthView-loader",
|
|
22
|
-
"AuthViewLoader": "alinea-AuthView-loader",
|
|
23
19
|
"AuthView-surface": "alinea-AuthView-surface",
|
|
24
20
|
"AuthViewSurface": "alinea-AuthView-surface",
|
|
25
21
|
"AuthView": "alinea-AuthView",
|
|
26
|
-
"AuthView-
|
|
27
|
-
"
|
|
22
|
+
"AuthView-link": "alinea-AuthView-link",
|
|
23
|
+
"AuthViewLink": "alinea-AuthView-link",
|
|
24
|
+
"AuthView-actionRow": "alinea-AuthView-actionRow",
|
|
25
|
+
"AuthViewActionRow": "alinea-AuthView-actionRow",
|
|
26
|
+
"AuthView-loader": "alinea-AuthView-loader",
|
|
27
|
+
"AuthViewLoader": "alinea-AuthView-loader",
|
|
28
|
+
"AuthView-panel": "alinea-AuthView-panel",
|
|
29
|
+
"AuthViewPanel": "alinea-AuthView-panel",
|
|
28
30
|
"AuthView-heading": "alinea-AuthView-heading",
|
|
29
31
|
"AuthViewHeading": "alinea-AuthView-heading",
|
|
32
|
+
"AuthView-mark": "alinea-AuthView-mark",
|
|
33
|
+
"AuthViewMark": "alinea-AuthView-mark",
|
|
30
34
|
"AuthView-text": "alinea-AuthView-text",
|
|
31
35
|
"AuthViewText": "alinea-AuthView-text",
|
|
32
|
-
"AuthView-link": "alinea-AuthView-link",
|
|
33
|
-
"AuthViewLink": "alinea-AuthView-link",
|
|
34
36
|
"AuthView-title": "alinea-AuthView-title",
|
|
35
|
-
"AuthViewTitle": "alinea-AuthView-title"
|
|
36
|
-
"AuthView-actionRow": "alinea-AuthView-actionRow",
|
|
37
|
-
"AuthViewActionRow": "alinea-AuthView-actionRow"
|
|
37
|
+
"AuthViewTitle": "alinea-AuthView-title"
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// src/dashboard/app/AuthView.tsx
|
|
@@ -42,15 +42,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
42
42
|
var styles = dist_default(AuthView_default);
|
|
43
43
|
function AuthView({ auth: authState = authAtom }) {
|
|
44
44
|
const [auth, setAuth] = useAtom(authState);
|
|
45
|
-
|
|
45
|
+
const isLoading = auth.status === "loading" || auth.status === "redirecting" || auth.status === "authenticated";
|
|
46
|
+
if (isLoading) {
|
|
46
47
|
return /* @__PURE__ */ jsx(AuthViewLoader, {});
|
|
47
48
|
}
|
|
48
49
|
if (auth.status === "error") {
|
|
49
50
|
throw auth.error;
|
|
50
51
|
}
|
|
51
|
-
if (auth.status === "authenticated") {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
52
|
if (auth.status === "missingHandler") {
|
|
55
53
|
return /* @__PURE__ */ jsx(AuthViewFrame, { title: "Ready to deploy?", children: /* @__PURE__ */ jsxs("p", { className: styles.AuthView.text(), children: [
|
|
56
54
|
"Alinea requires a",
|
|
@@ -95,7 +93,7 @@ function AuthView({ auth: authState = authAtom }) {
|
|
|
95
93
|
] });
|
|
96
94
|
}
|
|
97
95
|
function AuthViewLoader() {
|
|
98
|
-
return /* @__PURE__ */ jsx("div", { className: styles.AuthView(), children: /* @__PURE__ */ jsx("div", { className: styles.AuthView.panel(), children: /* @__PURE__ */ jsx("div", { className: styles.AuthView.loader(), children: /* @__PURE__ */ jsx(ProgressCircle, { isIndeterminate: true, "aria-label": "
|
|
96
|
+
return /* @__PURE__ */ jsx("div", { className: styles.AuthView(), children: /* @__PURE__ */ jsx("div", { className: styles.AuthView.panel(), children: /* @__PURE__ */ jsx("div", { className: styles.AuthView.loader(), children: /* @__PURE__ */ jsx(ProgressCircle, { isIndeterminate: true, "aria-label": "Loading" }) }) }) });
|
|
99
97
|
}
|
|
100
98
|
function AuthViewFrame({ title, children }) {
|
|
101
99
|
return /* @__PURE__ */ jsx("div", { className: styles.AuthView(), children: /* @__PURE__ */ jsx("div", { className: styles.AuthView.panel(), children: /* @__PURE__ */ jsxs(Surface, { className: styles.AuthView.surface(), children: [
|
|
@@ -8,9 +8,9 @@ import { Icon } from "../../components/Icon.js";
|
|
|
8
8
|
|
|
9
9
|
// src/dashboard/app/Badge.module.css
|
|
10
10
|
var Badge_default = {
|
|
11
|
-
"Badge": "alinea-Badge",
|
|
12
11
|
"Badge-label": "alinea-Badge-label",
|
|
13
|
-
"BadgeLabel": "alinea-Badge-label"
|
|
12
|
+
"BadgeLabel": "alinea-Badge-label",
|
|
13
|
+
"Badge": "alinea-Badge"
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// src/dashboard/app/Badge.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunks/chunk-
|
|
2
|
+
useAtomValueRaw
|
|
3
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
4
4
|
import {
|
|
5
5
|
atom
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import {
|
|
8
8
|
dist_default
|
|
9
9
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -19,25 +19,25 @@ import { Badge } from "./Badge.js";
|
|
|
19
19
|
|
|
20
20
|
// src/dashboard/app/CompactField.module.css
|
|
21
21
|
var CompactField_default = {
|
|
22
|
-
"CompactField-record-field": "alinea-CompactField-record-field",
|
|
23
|
-
"CompactFieldRecordField": "alinea-CompactField-record-field",
|
|
24
|
-
"CompactField-list-count": "alinea-CompactField-list-count",
|
|
25
|
-
"CompactFieldListCount": "alinea-CompactField-list-count",
|
|
26
|
-
"CompactField-record": "alinea-CompactField-record",
|
|
27
|
-
"CompactFieldRecord": "alinea-CompactField-record",
|
|
28
22
|
"CompactField-json": "alinea-CompactField-json",
|
|
29
23
|
"CompactFieldJson": "alinea-CompactField-json",
|
|
30
|
-
"CompactField-
|
|
31
|
-
"
|
|
32
|
-
"CompactField-text": "alinea-CompactField-text",
|
|
33
|
-
"CompactFieldText": "alinea-CompactField-text",
|
|
34
|
-
"CompactField-items": "alinea-CompactField-items",
|
|
35
|
-
"CompactFieldItems": "alinea-CompactField-items",
|
|
24
|
+
"CompactField-record": "alinea-CompactField-record",
|
|
25
|
+
"CompactFieldRecord": "alinea-CompactField-record",
|
|
36
26
|
"CompactField": "alinea-CompactField",
|
|
37
27
|
"CompactField-record-value": "alinea-CompactField-record-value",
|
|
38
28
|
"CompactFieldRecordValue": "alinea-CompactField-record-value",
|
|
39
29
|
"CompactField-record-label": "alinea-CompactField-record-label",
|
|
40
|
-
"CompactFieldRecordLabel": "alinea-CompactField-record-label"
|
|
30
|
+
"CompactFieldRecordLabel": "alinea-CompactField-record-label",
|
|
31
|
+
"CompactField-items": "alinea-CompactField-items",
|
|
32
|
+
"CompactFieldItems": "alinea-CompactField-items",
|
|
33
|
+
"CompactField-muted": "alinea-CompactField-muted",
|
|
34
|
+
"CompactFieldMuted": "alinea-CompactField-muted",
|
|
35
|
+
"CompactField-list-count": "alinea-CompactField-list-count",
|
|
36
|
+
"CompactFieldListCount": "alinea-CompactField-list-count",
|
|
37
|
+
"CompactField-text": "alinea-CompactField-text",
|
|
38
|
+
"CompactFieldText": "alinea-CompactField-text",
|
|
39
|
+
"CompactField-record-field": "alinea-CompactField-record-field",
|
|
40
|
+
"CompactFieldRecordField": "alinea-CompactField-record-field"
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// src/dashboard/app/CompactField.tsx
|
|
@@ -51,7 +51,7 @@ function CompactField({ field, value }) {
|
|
|
51
51
|
),
|
|
52
52
|
[customView]
|
|
53
53
|
);
|
|
54
|
-
const ResolvedView =
|
|
54
|
+
const ResolvedView = useAtomValueRaw(resolvedViewAtom);
|
|
55
55
|
if (typeof customView === "function") return customView({ field, value });
|
|
56
56
|
if (ResolvedView) return /* @__PURE__ */ jsx(ResolvedView, { field, value });
|
|
57
57
|
return /* @__PURE__ */ jsx(CompactFieldFallback, { field, value });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
useAtomValueRaw,
|
|
3
3
|
useSetAtom
|
|
4
|
-
} from "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
4
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
5
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
6
6
|
import {
|
|
7
7
|
styler
|
|
8
8
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
9
9
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
10
10
|
|
|
11
11
|
// src/dashboard/app/DashboardErrorBoundary.tsx
|
|
12
|
-
import { Icon, Surface } from "alinea/components";
|
|
12
|
+
import { Button, Icon, Surface } from "alinea/components";
|
|
13
13
|
import { MissingEntryError } from "alinea/dashboard/atoms/entry";
|
|
14
14
|
import { routeAtom, routeGuardAtom } from "alinea/dashboard/atoms/nav";
|
|
15
15
|
import { useEffect, useRef } from "react";
|
|
@@ -67,11 +67,13 @@ import { IcRoundWarning } from "../icons.js";
|
|
|
67
67
|
var DashboardErrorBoundary_default = {
|
|
68
68
|
"DashboardErrorBoundary-title": "alinea-DashboardErrorBoundary-title",
|
|
69
69
|
"DashboardErrorBoundaryTitle": "alinea-DashboardErrorBoundary-title",
|
|
70
|
+
"DashboardErrorBoundary-actions": "alinea-DashboardErrorBoundary-actions",
|
|
71
|
+
"DashboardErrorBoundaryActions": "alinea-DashboardErrorBoundary-actions",
|
|
72
|
+
"DashboardErrorBoundary-message": "alinea-DashboardErrorBoundary-message",
|
|
73
|
+
"DashboardErrorBoundaryMessage": "alinea-DashboardErrorBoundary-message",
|
|
70
74
|
"DashboardErrorBoundary": "alinea-DashboardErrorBoundary",
|
|
71
75
|
"DashboardErrorBoundary-card": "alinea-DashboardErrorBoundary-card",
|
|
72
76
|
"DashboardErrorBoundaryCard": "alinea-DashboardErrorBoundary-card",
|
|
73
|
-
"DashboardErrorBoundary-message": "alinea-DashboardErrorBoundary-message",
|
|
74
|
-
"DashboardErrorBoundaryMessage": "alinea-DashboardErrorBoundary-message",
|
|
75
77
|
"DashboardErrorBoundary-heading": "alinea-DashboardErrorBoundary-heading",
|
|
76
78
|
"DashboardErrorBoundaryHeading": "alinea-DashboardErrorBoundary-heading"
|
|
77
79
|
};
|
|
@@ -80,7 +82,7 @@ var DashboardErrorBoundary_default = {
|
|
|
80
82
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
81
83
|
var styles = styler(DashboardErrorBoundary_default);
|
|
82
84
|
function DashboardErrorBoundary({ children }) {
|
|
83
|
-
const route =
|
|
85
|
+
const route = useAtomValueRaw(routeAtom);
|
|
84
86
|
const routeKey = JSON.stringify(route);
|
|
85
87
|
return /* @__PURE__ */ jsx(DashboardRouteErrorBoundary, { routeKey, children });
|
|
86
88
|
}
|
|
@@ -89,7 +91,7 @@ function DashboardRouteErrorBoundary({
|
|
|
89
91
|
routeKey
|
|
90
92
|
}) {
|
|
91
93
|
const { ErrorBoundary, didCatch, error, reset } = index_module_default();
|
|
92
|
-
const route =
|
|
94
|
+
const route = useAtomValueRaw(routeAtom);
|
|
93
95
|
const setRoute = useSetAtom(routeAtom);
|
|
94
96
|
const setRouteGuard = useSetAtom(routeGuardAtom);
|
|
95
97
|
const previousRouteKey = useRef(routeKey);
|
|
@@ -106,17 +108,27 @@ function DashboardRouteErrorBoundary({
|
|
|
106
108
|
}, [error, route, setRoute, setRouteGuard]);
|
|
107
109
|
if (didCatch && error instanceof MissingEntryError) return null;
|
|
108
110
|
if (didCatch) {
|
|
109
|
-
const message =
|
|
111
|
+
const message = errorMessage(error);
|
|
110
112
|
return /* @__PURE__ */ jsx("div", { className: styles.DashboardErrorBoundary(), children: /* @__PURE__ */ jsxs(Surface, { className: styles.DashboardErrorBoundary.card(), children: [
|
|
111
113
|
/* @__PURE__ */ jsxs("div", { className: styles.DashboardErrorBoundary.heading(), children: [
|
|
112
114
|
/* @__PURE__ */ jsx(Icon, { icon: IcRoundWarning }),
|
|
113
115
|
/* @__PURE__ */ jsx("h1", { className: styles.DashboardErrorBoundary.title(), children: "Oops, something went wrong" })
|
|
114
116
|
] }),
|
|
115
|
-
/* @__PURE__ */ jsx("pre", { className: styles.DashboardErrorBoundary.message(), children: message })
|
|
117
|
+
/* @__PURE__ */ jsx("pre", { className: styles.DashboardErrorBoundary.message(), children: message }),
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: styles.DashboardErrorBoundary.actions(), children: /* @__PURE__ */ jsx(Button, { intent: "primary", onPress: reloadDashboard, children: "Reload dashboard" }) })
|
|
116
119
|
] }) });
|
|
117
120
|
}
|
|
118
121
|
return /* @__PURE__ */ jsx(ErrorBoundary, { children });
|
|
119
122
|
}
|
|
123
|
+
function errorMessage(error) {
|
|
124
|
+
if (!(error instanceof Error)) return String(error);
|
|
125
|
+
if (!(error.cause instanceof Error)) return error.message;
|
|
126
|
+
return `${error.message}
|
|
127
|
+
Caused by: ${error.cause.message}`;
|
|
128
|
+
}
|
|
129
|
+
function reloadDashboard() {
|
|
130
|
+
window.location.reload();
|
|
131
|
+
}
|
|
120
132
|
export {
|
|
121
133
|
DashboardErrorBoundary
|
|
122
134
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
2
|
+
useAtomValueRaw
|
|
3
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
4
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
styler
|
|
7
7
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -22,10 +22,10 @@ import { Sidebar, SidebarFooter, SidebarHeader } from "./ui/Sidebar.js";
|
|
|
22
22
|
|
|
23
23
|
// src/dashboard/app/DashboardLayout.module.css
|
|
24
24
|
var DashboardLayout_default = {
|
|
25
|
-
"DashboardLayout-create": "alinea-DashboardLayout-create",
|
|
26
|
-
"DashboardLayoutCreate": "alinea-DashboardLayout-create",
|
|
27
25
|
"is-toolbar": "alinea-is-toolbar",
|
|
28
|
-
"isToolbar": "alinea-is-toolbar"
|
|
26
|
+
"isToolbar": "alinea-is-toolbar",
|
|
27
|
+
"DashboardLayout-create": "alinea-DashboardLayout-create",
|
|
28
|
+
"DashboardLayoutCreate": "alinea-DashboardLayout-create"
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/dashboard/app/DashboardLayout.tsx
|
|
@@ -39,7 +39,14 @@ function DashboardLayout({
|
|
|
39
39
|
workspace
|
|
40
40
|
}) {
|
|
41
41
|
return /* @__PURE__ */ jsx(DashboardScope, { value: { page, root, workspace }, children: /* @__PURE__ */ jsx(AppShell, { children: /* @__PURE__ */ jsxs(AppShellInner, { children: [
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
WorkspaceRoots,
|
|
44
|
+
{
|
|
45
|
+
canManageMembers,
|
|
46
|
+
page,
|
|
47
|
+
root
|
|
48
|
+
}
|
|
49
|
+
),
|
|
43
50
|
/* @__PURE__ */ jsx(AppShellContent, { children: /* @__PURE__ */ jsx(
|
|
44
51
|
SidebarLayout,
|
|
45
52
|
{
|
|
@@ -69,7 +76,7 @@ function CreateEntryButton({
|
|
|
69
76
|
root,
|
|
70
77
|
toolbar = false
|
|
71
78
|
}) {
|
|
72
|
-
const canCreate =
|
|
79
|
+
const canCreate = useAtomValueRaw(root.canCreate);
|
|
73
80
|
if (!canCreate) return null;
|
|
74
81
|
return /* @__PURE__ */ jsxs(DialogTrigger, { children: [
|
|
75
82
|
/* @__PURE__ */ jsx(
|
|
@@ -2,6 +2,7 @@ import type { ComponentType } from 'react';
|
|
|
2
2
|
export interface DashboardMetaProps {
|
|
3
3
|
color: string;
|
|
4
4
|
icon?: ComponentType;
|
|
5
|
+
plain?: boolean;
|
|
5
6
|
title: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function DashboardMeta({ color, icon, title }: DashboardMetaProps): import("react").JSX.Element;
|
|
8
|
+
export declare function DashboardMeta({ color, icon, plain, title }: DashboardMetaProps): import("react").JSX.Element;
|
|
@@ -7,16 +7,31 @@ import { renderToString } from "react-dom/server";
|
|
|
7
7
|
import { AlineaLogo } from "./AlineaLogo.js";
|
|
8
8
|
import { LogoShape } from "./LogoShape.js";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
function faviconHref(color, Icon) {
|
|
11
|
-
const svg = renderToString(
|
|
10
|
+
function faviconHref(color, Icon, plain) {
|
|
11
|
+
const svg = plain ? renderToString(
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
AlineaLogo,
|
|
14
|
+
{
|
|
15
|
+
width: "36",
|
|
16
|
+
height: "36",
|
|
17
|
+
viewBox: "-4 -4 32 32",
|
|
18
|
+
style: { color }
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
) : renderToString(
|
|
12
22
|
/* @__PURE__ */ jsx(LogoShape, { width: "36", height: "36", background: color, icon: Icon })
|
|
13
23
|
);
|
|
14
24
|
return `data:image/svg+xml;base64,${btoa(svg)}`;
|
|
15
25
|
}
|
|
16
|
-
function DashboardMeta({
|
|
26
|
+
function DashboardMeta({
|
|
27
|
+
color,
|
|
28
|
+
icon,
|
|
29
|
+
plain = false,
|
|
30
|
+
title
|
|
31
|
+
}) {
|
|
17
32
|
const href = useMemo(
|
|
18
|
-
() => faviconHref(color, icon ?? AlineaLogo),
|
|
19
|
-
[color, icon]
|
|
33
|
+
() => faviconHref(color, icon ?? AlineaLogo, plain),
|
|
34
|
+
[color, icon, plain]
|
|
20
35
|
);
|
|
21
36
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
37
|
/* @__PURE__ */ jsx("title", { children: title }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
2
|
+
useAtomValueRaw
|
|
3
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
4
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
styler
|
|
7
7
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
|
|
25
25
|
// src/dashboard/app/EntryFields.module.css
|
|
26
26
|
var EntryFields_default = {
|
|
27
|
+
"EditFields": "alinea-EditFields",
|
|
27
28
|
"EditField-slot": "alinea-EditField-slot",
|
|
28
|
-
"EditFieldSlot": "alinea-EditField-slot"
|
|
29
|
-
"EditFields": "alinea-EditFields"
|
|
29
|
+
"EditFieldSlot": "alinea-EditField-slot"
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// src/dashboard/app/EntryFields.tsx
|
|
@@ -45,7 +45,7 @@ function EntryFields() {
|
|
|
45
45
|
return editor.sections.map((section, index) => /* @__PURE__ */ jsx(EntryFormSection, { section }, index));
|
|
46
46
|
}
|
|
47
47
|
var FormSection = memo(function FormSection2({ section }) {
|
|
48
|
-
const View =
|
|
48
|
+
const View = useAtomValueRaw(section.view);
|
|
49
49
|
if (View) return /* @__PURE__ */ jsx(View, { section: section.section });
|
|
50
50
|
return /* @__PURE__ */ jsx(EditFields, { fields: Section.definition(section.section) });
|
|
51
51
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAtom,
|
|
3
|
-
|
|
3
|
+
useAtomValueRaw,
|
|
4
4
|
useSetAtom
|
|
5
|
-
} from "../../chunks/chunk-
|
|
6
|
-
import "../../chunks/chunk-
|
|
5
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
6
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
7
|
import {
|
|
8
8
|
styler
|
|
9
9
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -41,23 +41,23 @@ import { EditorBackButton } from "./EditorBackButton.js";
|
|
|
41
41
|
|
|
42
42
|
// src/dashboard/app/EntryHeader.module.css
|
|
43
43
|
var EntryHeader_default = {
|
|
44
|
-
"EntryHeader
|
|
45
|
-
"
|
|
44
|
+
"EntryHeader": "alinea-EntryHeader",
|
|
45
|
+
"EntryHeader-actions": "alinea-EntryHeader-actions",
|
|
46
|
+
"EntryHeaderActions": "alinea-EntryHeader-actions",
|
|
46
47
|
"EntryHeader-status": "alinea-EntryHeader-status",
|
|
47
48
|
"EntryHeaderStatus": "alinea-EntryHeader-status",
|
|
48
49
|
"is-dirty": "alinea-is-dirty",
|
|
49
50
|
"isDirty": "alinea-is-dirty",
|
|
50
|
-
"EntryHeader-
|
|
51
|
-
"
|
|
52
|
-
"EntryHeader": "alinea-EntryHeader",
|
|
51
|
+
"EntryHeader-content": "alinea-EntryHeader-content",
|
|
52
|
+
"EntryHeaderContent": "alinea-EntryHeader-content",
|
|
53
|
+
"EntryHeader-sidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
54
|
+
"EntryHeaderSidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
53
55
|
"EntryHeader-main": "alinea-EntryHeader-main",
|
|
54
56
|
"EntryHeaderMain": "alinea-EntryHeader-main",
|
|
55
57
|
"EntryHeader-type": "alinea-EntryHeader-type",
|
|
56
58
|
"EntryHeaderType": "alinea-EntryHeader-type",
|
|
57
|
-
"EntryHeader-
|
|
58
|
-
"
|
|
59
|
-
"EntryHeader-content": "alinea-EntryHeader-content",
|
|
60
|
-
"EntryHeaderContent": "alinea-EntryHeader-content"
|
|
59
|
+
"EntryHeader-title": "alinea-EntryHeader-title",
|
|
60
|
+
"EntryHeaderTitle": "alinea-EntryHeader-title"
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
// src/dashboard/app/EntryHeader.tsx
|
|
@@ -141,18 +141,18 @@ function EntryHeader({
|
|
|
141
141
|
parentNeedsTranslation,
|
|
142
142
|
selectedEntry
|
|
143
143
|
}) {
|
|
144
|
-
const config =
|
|
145
|
-
const policy =
|
|
146
|
-
const route =
|
|
144
|
+
const config = useAtomValueRaw(configAtom);
|
|
145
|
+
const policy = useAtomValueRaw(policyAtom);
|
|
146
|
+
const route = useAtomValueRaw(routeAtom);
|
|
147
147
|
const setRoute = useSetAtom(routeAtom);
|
|
148
|
-
const versions =
|
|
149
|
-
const untranslated =
|
|
150
|
-
const typeName =
|
|
151
|
-
const parentId =
|
|
152
|
-
const workspace =
|
|
153
|
-
const root =
|
|
154
|
-
const canPublishParents =
|
|
155
|
-
const isParentUnpublished =
|
|
148
|
+
const versions = useAtomValueRaw(localeData.versions);
|
|
149
|
+
const untranslated = useAtomValueRaw(localeData.untranslated);
|
|
150
|
+
const typeName = useAtomValueRaw(entry.type);
|
|
151
|
+
const parentId = useAtomValueRaw(entry.parentId);
|
|
152
|
+
const workspace = useAtomValueRaw(entry.workspace);
|
|
153
|
+
const root = useAtomValueRaw(entry.root);
|
|
154
|
+
const canPublishParents = useAtomValueRaw(entry.canPublishParents);
|
|
155
|
+
const isParentUnpublished = useAtomValueRaw(entry.parentUnpublished);
|
|
156
156
|
const [selectedVersion, setSelectedVersion] = useAtom(
|
|
157
157
|
localeData.selectedVersion
|
|
158
158
|
);
|
|
@@ -167,8 +167,8 @@ function EntryHeader({
|
|
|
167
167
|
const deleteEntry = useSetAtom(localeData.deleteEntry);
|
|
168
168
|
const replaceFile = useSetAtom(localeData.replaceFile);
|
|
169
169
|
const reset = useSetAtom(node.reset);
|
|
170
|
-
const isDirty =
|
|
171
|
-
const activity =
|
|
170
|
+
const isDirty = useAtomValueRaw(node.isDirty);
|
|
171
|
+
const activity = useAtomValueRaw(activityAtom);
|
|
172
172
|
const activeVersion = Array.from(versions.values()).find(
|
|
173
173
|
(version) => version.active
|
|
174
174
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
useAtomValueRaw,
|
|
3
3
|
useSetAtom
|
|
4
|
-
} from "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
4
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
5
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
6
6
|
import {
|
|
7
7
|
styler
|
|
8
8
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -26,30 +26,30 @@ import { IcRoundImage, IcRoundInsertDriveFile, IcRoundLink } from "../icons.js";
|
|
|
26
26
|
|
|
27
27
|
// src/dashboard/app/EntryReferences.module.css
|
|
28
28
|
var EntryReferences_default = {
|
|
29
|
+
"EntryReferences-other": "alinea-EntryReferences-other",
|
|
30
|
+
"EntryReferencesOther": "alinea-EntryReferences-other",
|
|
29
31
|
"EntryReferences-loadingText": "alinea-EntryReferences-loadingText",
|
|
30
32
|
"EntryReferencesLoadingText": "alinea-EntryReferences-loadingText",
|
|
31
|
-
"EntryReferences-loading": "alinea-EntryReferences-loading",
|
|
32
|
-
"EntryReferencesLoading": "alinea-EntryReferences-loading",
|
|
33
|
-
"EntryReferences": "alinea-EntryReferences",
|
|
34
|
-
"EntryReferences-pending": "alinea-EntryReferences-pending",
|
|
35
|
-
"EntryReferencesPending": "alinea-EntryReferences-pending",
|
|
36
|
-
"EntryReferences-trailing": "alinea-EntryReferences-trailing",
|
|
37
|
-
"EntryReferencesTrailing": "alinea-EntryReferences-trailing",
|
|
38
33
|
"EntryReferences-pendingText": "alinea-EntryReferences-pendingText",
|
|
39
34
|
"EntryReferencesPendingText": "alinea-EntryReferences-pendingText",
|
|
40
|
-
"EntryReferences-other": "alinea-EntryReferences-other",
|
|
41
|
-
"EntryReferencesOther": "alinea-EntryReferences-other",
|
|
42
35
|
"EntryReferences-list": "alinea-EntryReferences-list",
|
|
43
|
-
"EntryReferencesList": "alinea-EntryReferences-list"
|
|
36
|
+
"EntryReferencesList": "alinea-EntryReferences-list",
|
|
37
|
+
"EntryReferences-trailing": "alinea-EntryReferences-trailing",
|
|
38
|
+
"EntryReferencesTrailing": "alinea-EntryReferences-trailing",
|
|
39
|
+
"EntryReferences-pending": "alinea-EntryReferences-pending",
|
|
40
|
+
"EntryReferencesPending": "alinea-EntryReferences-pending",
|
|
41
|
+
"EntryReferences-loading": "alinea-EntryReferences-loading",
|
|
42
|
+
"EntryReferencesLoading": "alinea-EntryReferences-loading",
|
|
43
|
+
"EntryReferences": "alinea-EntryReferences"
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
// src/dashboard/app/EntryReferences.tsx
|
|
47
47
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
48
48
|
var styles = styler(EntryReferences_default);
|
|
49
49
|
function EntryReferences({ entry, localeData }) {
|
|
50
|
-
const data =
|
|
51
|
-
const config =
|
|
52
|
-
const typeName =
|
|
50
|
+
const data = useAtomValueRaw(entry.incomingReferences);
|
|
51
|
+
const config = useAtomValueRaw(configAtom);
|
|
52
|
+
const typeName = useAtomValueRaw(entry.type);
|
|
53
53
|
const setRoute = useSetAtom(routeAtom);
|
|
54
54
|
if (!data) return null;
|
|
55
55
|
const type = config.schema[typeName];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAtom,
|
|
3
|
-
|
|
3
|
+
useAtomValueRaw,
|
|
4
4
|
useSetAtom
|
|
5
|
-
} from "../../chunks/chunk-
|
|
5
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
6
6
|
import {
|
|
7
7
|
atom
|
|
8
|
-
} from "../../chunks/chunk-
|
|
8
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
9
9
|
import {
|
|
10
10
|
styler
|
|
11
11
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -47,28 +47,28 @@ import { EntryReferences } from "./EntryReferences.js";
|
|
|
47
47
|
|
|
48
48
|
// src/dashboard/app/EntrySidebar.module.css
|
|
49
49
|
var EntrySidebar_default = {
|
|
50
|
-
"EntrySidebar-
|
|
51
|
-
"
|
|
52
|
-
"EntrySidebar-
|
|
53
|
-
"
|
|
54
|
-
"EntrySidebar-disclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
55
|
-
"EntrySidebarDisclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
50
|
+
"EntrySidebar-previewPanel": "alinea-EntrySidebar-previewPanel",
|
|
51
|
+
"EntrySidebarPreviewPanel": "alinea-EntrySidebar-previewPanel",
|
|
52
|
+
"EntrySidebar-history": "alinea-EntrySidebar-history",
|
|
53
|
+
"EntrySidebarHistory": "alinea-EntrySidebar-history",
|
|
56
54
|
"EntrySidebar-historyPanel": "alinea-EntrySidebar-historyPanel",
|
|
57
55
|
"EntrySidebarHistoryPanel": "alinea-EntrySidebar-historyPanel",
|
|
56
|
+
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
57
|
+
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
58
58
|
"EntrySidebar-header": "alinea-EntrySidebar-header",
|
|
59
59
|
"EntrySidebarHeader": "alinea-EntrySidebar-header",
|
|
60
|
+
"EntrySidebar-disclosure": "alinea-EntrySidebar-disclosure",
|
|
61
|
+
"EntrySidebarDisclosure": "alinea-EntrySidebar-disclosure",
|
|
62
|
+
"EntrySidebar-tabs": "alinea-EntrySidebar-tabs",
|
|
63
|
+
"EntrySidebarTabs": "alinea-EntrySidebar-tabs",
|
|
64
|
+
"EntrySidebar-section": "alinea-EntrySidebar-section",
|
|
65
|
+
"EntrySidebarSection": "alinea-EntrySidebar-section",
|
|
66
|
+
"EntrySidebar-disclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
67
|
+
"EntrySidebarDisclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
60
68
|
"EntrySidebar-sectionTitle": "alinea-EntrySidebar-sectionTitle",
|
|
61
69
|
"EntrySidebarSectionTitle": "alinea-EntrySidebar-sectionTitle",
|
|
62
|
-
"EntrySidebar-history": "alinea-EntrySidebar-history",
|
|
63
|
-
"EntrySidebarHistory": "alinea-EntrySidebar-history",
|
|
64
70
|
"EntrySidebar-body": "alinea-EntrySidebar-body",
|
|
65
|
-
"EntrySidebarBody": "alinea-EntrySidebar-body"
|
|
66
|
-
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
67
|
-
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
68
|
-
"EntrySidebar-tabs": "alinea-EntrySidebar-tabs",
|
|
69
|
-
"EntrySidebarTabs": "alinea-EntrySidebar-tabs",
|
|
70
|
-
"EntrySidebar-previewPanel": "alinea-EntrySidebar-previewPanel",
|
|
71
|
-
"EntrySidebarPreviewPanel": "alinea-EntrySidebar-previewPanel"
|
|
71
|
+
"EntrySidebarBody": "alinea-EntrySidebar-body"
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
// src/dashboard/app/EntrySidebar.tsx
|
|
@@ -116,8 +116,8 @@ function EntrySidebar({
|
|
|
116
116
|
previousVersionsOpen,
|
|
117
117
|
onOpenChange
|
|
118
118
|
}) {
|
|
119
|
-
const typeName =
|
|
120
|
-
const type =
|
|
119
|
+
const typeName = useAtomValueRaw(entry.type);
|
|
120
|
+
const type = useAtomValueRaw(typeAtoms(typeName)).type;
|
|
121
121
|
const setSelectedTab = useSetAtom(entrySidebarTabAtom);
|
|
122
122
|
const isMediaFile = type === MediaFile;
|
|
123
123
|
const isMediaLibrary = type === MediaLibrary;
|
|
@@ -183,7 +183,7 @@ function EntrySidebarHistory({
|
|
|
183
183
|
localeData,
|
|
184
184
|
previousVersionsOpen
|
|
185
185
|
}) {
|
|
186
|
-
const statuses =
|
|
186
|
+
const statuses = useAtomValueRaw(localeData.availableStatuses);
|
|
187
187
|
const setPreviousVersionsOpen = useSetAtom(entry.previousVersionsOpen);
|
|
188
188
|
return /* @__PURE__ */ jsxs("div", { className: styles.EntrySidebar.history(), children: [
|
|
189
189
|
/* @__PURE__ */ jsxs("section", { className: styles.EntrySidebar.section(), children: [
|
|
@@ -216,7 +216,7 @@ function EntrySidebarHistory({
|
|
|
216
216
|
function EntrySidebarPreviousVersions({
|
|
217
217
|
localeData
|
|
218
218
|
}) {
|
|
219
|
-
const history =
|
|
219
|
+
const history = useAtomValueRaw(localeData.history);
|
|
220
220
|
if (history.length === 0)
|
|
221
221
|
return /* @__PURE__ */ jsx(List, { "aria-label": "Previous versions", empty: true, children: /* @__PURE__ */ jsx(ListEmpty, { icon: IcRoundHistory, title: "No history", children: "No previous versions yet." }) });
|
|
222
222
|
return /* @__PURE__ */ jsx(List, { "aria-label": "Previous versions", children: history.map((revision) => /* @__PURE__ */ jsx(
|
|
@@ -233,10 +233,10 @@ function EntrySidebarStatusItem({
|
|
|
233
233
|
localeData,
|
|
234
234
|
status
|
|
235
235
|
}) {
|
|
236
|
-
const typeName =
|
|
237
|
-
const type =
|
|
238
|
-
const versions =
|
|
239
|
-
const currentlyEditing =
|
|
236
|
+
const typeName = useAtomValueRaw(entry.type);
|
|
237
|
+
const type = useAtomValueRaw(typeAtoms(typeName)).type;
|
|
238
|
+
const versions = useAtomValueRaw(localeData.versions);
|
|
239
|
+
const currentlyEditing = useAtomValueRaw(localeData.currentlyEditing);
|
|
240
240
|
const [selectedVersion, setSelectedVersion] = useAtom(
|
|
241
241
|
localeData.selectedVersion
|
|
242
242
|
);
|