alinea 2.0.0-preview.3 → 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 +144 -90
- package/dist/adapter/next/DevRemote.js +10 -2
- package/dist/adapter/next/previews.js +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 +96 -25
- 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-HFBZMKIN.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/Calendar.js +6 -6
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/ComboBox.js +12 -12
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/DateRangePicker.js +4 -4
- package/dist/components/Disclosure.js +6 -6
- package/dist/components/Label.js +6 -6
- package/dist/components/List.js +37 -37
- package/dist/components/Menu.js +4 -4
- package/dist/components/Modal.js +2 -2
- package/dist/components/MultipleSelect.js +23 -23
- package/dist/components/NumberField.js +5 -5
- package/dist/components/ProgressCircle.js +4 -4
- package/dist/components/SearchField.js +7 -7
- package/dist/components/Select.js +6 -6
- package/dist/components/Surface.js +1 -1
- package/dist/components/Table.js +8 -8
- package/dist/components/TextField.js +4 -4
- package/dist/components/TimeField.js +4 -4
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +3 -3
- package/dist/components/Tooltip.js +2 -2
- package/dist/components/Tree.js +6 -6
- 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/Id.d.ts +1 -0
- package/dist/core/Id.js +8 -0
- package/dist/core/db/Operation.js +4 -3
- package/dist/dashboard/App.js +30 -16
- package/dist/dashboard/StoryProvider.js +2 -2
- package/dist/dashboard/app/AccessDenied.js +3 -3
- package/dist/dashboard/app/ActivityStatus.js +23 -23
- package/dist/dashboard/app/AppShell.js +2 -2
- 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 +17 -19
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +17 -17
- package/dist/dashboard/app/DashboardErrorBoundary.js +23 -11
- 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 +27 -27
- package/dist/dashboard/app/EntryReferences.js +15 -15
- package/dist/dashboard/app/EntrySidebar.js +24 -24
- package/dist/dashboard/app/EntrySidebarPreview.js +20 -19
- package/dist/dashboard/app/EntryTranslationBanner.js +5 -5
- package/dist/dashboard/app/Explorer.js +64 -64
- package/dist/dashboard/app/ExplorerCards.js +46 -46
- package/dist/dashboard/app/ExplorerFileCard.js +19 -19
- package/dist/dashboard/app/ExplorerList.js +20 -20
- package/dist/dashboard/app/ExplorerModal.js +5 -5
- package/dist/dashboard/app/ExplorerPickerContent.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +63 -63
- package/dist/dashboard/app/ImagePicker.js +7 -7
- package/dist/dashboard/app/LinkPicker.js +17 -22
- package/dist/dashboard/app/LocaleMenu.js +10 -12
- package/dist/dashboard/app/SidebarLayout.js +4 -4
- package/dist/dashboard/app/SidebarTree.js +58 -58
- package/dist/dashboard/app/WorkspaceMenu.d.ts +10 -3
- package/dist/dashboard/app/WorkspaceMenu.js +88 -67
- 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 +86 -111
- package/dist/dashboard/app/editor/FileEditor.js +29 -29
- package/dist/dashboard/app/editor/FilePreview.js +6 -6
- package/dist/dashboard/app/editor/MediaAltField.view.js +4 -4
- package/dist/dashboard/app/modals/CreateEntry.js +15 -15
- package/dist/dashboard/app/pages/EntryPage.js +29 -31
- 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 +42 -42
- package/dist/dashboard/app/ui/DashboardModal.js +16 -16
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- 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/code/CodeField.view.js +12 -12
- package/dist/field/link/LinkField.view.js +56 -56
- package/dist/field/list/ListField.view.js +24 -24
- package/dist/field/localiser/LocalisedField.view.js +76 -5
- package/dist/field/metadata/MetadataField.view.js +19 -19
- package/dist/field/richtext/PickTextLink.js +6 -6
- package/dist/field/richtext/RichTextBlock.js +4 -4
- package/dist/field/richtext/RichTextBlocks.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +19 -19
- package/dist/field/richtext/RichTextField.view.js +6 -6
- package/dist/field/richtext/RichTextInsertMenu.js +3 -3
- package/dist/field/richtext/RichTextState.js +1 -1
- package/dist/field/text/TextField.view.js +2 -2
- package/dist/index.css +415 -28
- package/dist/preview/RegisterPreview.d.ts +1 -1
- package/dist/preview/RegisterPreview.js +4 -6
- package/dist/preview/react.d.ts +5 -1
- package/dist/preview/react.js +12 -9
- package/package.json +1 -1
- package/dist/chunks/chunk-STAJCW4Z.js +0 -322
- package/dist/chunks/chunk-U4VOHNR2.js +0 -210
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
useAtomValue,
|
|
2
|
+
useAtomValueRaw,
|
|
4
3
|
useSetAtom
|
|
5
|
-
} from "../../chunks/chunk-
|
|
6
|
-
import "../../chunks/chunk-
|
|
4
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
5
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
7
6
|
import {
|
|
8
7
|
dist_default
|
|
9
8
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -20,11 +19,7 @@ import {
|
|
|
20
19
|
Tooltip
|
|
21
20
|
} from "alinea/components";
|
|
22
21
|
import { rootAtoms } from "alinea/dashboard/atoms/root";
|
|
23
|
-
import {
|
|
24
|
-
canLogoutAtom,
|
|
25
|
-
logoutAtom,
|
|
26
|
-
themeAtom
|
|
27
|
-
} from "alinea/dashboard/atoms/dashboard";
|
|
22
|
+
import { canLogoutAtom, logoutAtom } from "alinea/dashboard/atoms/dashboard";
|
|
28
23
|
import { configAtom, localAtom } from "alinea/dashboard/atoms/core";
|
|
29
24
|
import { routeAtom } from "alinea/dashboard/atoms/nav";
|
|
30
25
|
import { workspaceAtom } from "alinea/dashboard/atoms/config";
|
|
@@ -34,67 +29,68 @@ import { useUser } from "alinea/dashboard/hooks";
|
|
|
34
29
|
import {
|
|
35
30
|
IcBaselineAccountCircle,
|
|
36
31
|
IcOutlineSettings,
|
|
37
|
-
IcRoundBrightness2,
|
|
38
|
-
IcRoundDesktopWindows,
|
|
39
32
|
IcRoundLogout,
|
|
40
|
-
|
|
41
|
-
IcRoundUnfoldMore,
|
|
42
|
-
IcRoundWbSunny
|
|
33
|
+
IcRoundUnfoldMore
|
|
43
34
|
} from "../icons.js";
|
|
44
35
|
import { ActivityStatus } from "./ActivityStatus.js";
|
|
36
|
+
import { AppearanceToggle } from "./AppearanceToggle.js";
|
|
45
37
|
import { WorkspaceAvatarMenu } from "./WorkspaceMenu.js";
|
|
46
38
|
|
|
47
39
|
// src/dashboard/app/WorkspaceRoots.module.css
|
|
48
40
|
var WorkspaceRoots_default = {
|
|
49
|
-
"WorkspaceRoots-footer": "alinea-WorkspaceRoots-footer",
|
|
50
|
-
"WorkspaceRootsFooter": "alinea-WorkspaceRoots-footer",
|
|
51
|
-
"WorkspaceRoots": "alinea-WorkspaceRoots",
|
|
52
41
|
"WorkspaceRoots-profile-popover-item-label": "alinea-WorkspaceRoots-profile-popover-item-label",
|
|
53
42
|
"WorkspaceRootsProfilePopoverItemLabel": "alinea-WorkspaceRoots-profile-popover-item-label",
|
|
54
|
-
"WorkspaceRoots-
|
|
55
|
-
"
|
|
56
|
-
"WorkspaceRoots-
|
|
57
|
-
"
|
|
43
|
+
"WorkspaceRoots-profile-popover-action-label": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
44
|
+
"WorkspaceRootsProfilePopoverActionLabel": "alinea-WorkspaceRoots-profile-popover-action-label",
|
|
45
|
+
"WorkspaceRoots-trigger-text": "alinea-WorkspaceRoots-trigger-text",
|
|
46
|
+
"WorkspaceRootsTriggerText": "alinea-WorkspaceRoots-trigger-text",
|
|
58
47
|
"WorkspaceRoots-workspace": "alinea-WorkspaceRoots-workspace",
|
|
59
48
|
"WorkspaceRootsWorkspace": "alinea-WorkspaceRoots-workspace",
|
|
60
|
-
"WorkspaceRoots
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
66
|
-
"WorkspaceRoots-profile-popover-themeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
67
|
-
"WorkspaceRootsProfilePopoverThemeOptions": "alinea-WorkspaceRoots-profile-popover-themeOptions",
|
|
68
|
-
"WorkspaceRoots-trigger": "alinea-WorkspaceRoots-trigger",
|
|
69
|
-
"WorkspaceRootsTrigger": "alinea-WorkspaceRoots-trigger",
|
|
70
|
-
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
71
|
-
"WorkspaceRootsProfilePopoverAction": "alinea-WorkspaceRoots-profile-popover-action",
|
|
49
|
+
"WorkspaceRoots": "alinea-WorkspaceRoots",
|
|
50
|
+
"WorkspaceRoots-roots": "alinea-WorkspaceRoots-roots",
|
|
51
|
+
"WorkspaceRootsRoots": "alinea-WorkspaceRoots-roots",
|
|
52
|
+
"WorkspaceRoots-footer": "alinea-WorkspaceRoots-footer",
|
|
53
|
+
"WorkspaceRootsFooter": "alinea-WorkspaceRoots-footer",
|
|
72
54
|
"WorkspaceRoots-profile-popover-item": "alinea-WorkspaceRoots-profile-popover-item",
|
|
73
55
|
"WorkspaceRootsProfilePopoverItem": "alinea-WorkspaceRoots-profile-popover-item",
|
|
74
|
-
"WorkspaceRoots-profile-popover-surface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
75
|
-
"WorkspaceRootsProfilePopoverSurface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
76
56
|
"WorkspaceRoots-profile-popover": "alinea-WorkspaceRoots-profile-popover",
|
|
77
57
|
"WorkspaceRootsProfilePopover": "alinea-WorkspaceRoots-profile-popover",
|
|
78
|
-
"WorkspaceRoots-
|
|
79
|
-
"
|
|
58
|
+
"WorkspaceRoots-rootButton": "alinea-WorkspaceRoots-rootButton",
|
|
59
|
+
"WorkspaceRootsRootButton": "alinea-WorkspaceRoots-rootButton",
|
|
60
|
+
"WorkspaceRoots-profile-popover-user": "alinea-WorkspaceRoots-profile-popover-user",
|
|
61
|
+
"WorkspaceRootsProfilePopoverUser": "alinea-WorkspaceRoots-profile-popover-user",
|
|
80
62
|
"WorkspaceRoots-profile-popover-action-button": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
81
63
|
"WorkspaceRootsProfilePopoverActionButton": "alinea-WorkspaceRoots-profile-popover-action-button",
|
|
82
|
-
"WorkspaceRoots-trigger
|
|
83
|
-
"
|
|
84
|
-
"WorkspaceRoots-
|
|
85
|
-
"
|
|
64
|
+
"WorkspaceRoots-trigger": "alinea-WorkspaceRoots-trigger",
|
|
65
|
+
"WorkspaceRootsTrigger": "alinea-WorkspaceRoots-trigger",
|
|
66
|
+
"WorkspaceRoots-profile-popover-user-icon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
67
|
+
"WorkspaceRootsProfilePopoverUserIcon": "alinea-WorkspaceRoots-profile-popover-user-icon",
|
|
68
|
+
"WorkspaceRoots-profile-popover-user-title": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
69
|
+
"WorkspaceRootsProfilePopoverUserTitle": "alinea-WorkspaceRoots-profile-popover-user-title",
|
|
70
|
+
"WorkspaceRoots-profile-popover-surface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
71
|
+
"WorkspaceRootsProfilePopoverSurface": "alinea-WorkspaceRoots-profile-popover-surface",
|
|
72
|
+
"WorkspaceRoots-profile-popover-action-icon": "alinea-WorkspaceRoots-profile-popover-action-icon",
|
|
73
|
+
"WorkspaceRootsProfilePopoverActionIcon": "alinea-WorkspaceRoots-profile-popover-action-icon",
|
|
74
|
+
"WorkspaceRoots-profile": "alinea-WorkspaceRoots-profile",
|
|
75
|
+
"WorkspaceRootsProfile": "alinea-WorkspaceRoots-profile",
|
|
76
|
+
"WorkspaceRoots-profile-popover-action": "alinea-WorkspaceRoots-profile-popover-action",
|
|
77
|
+
"WorkspaceRootsProfilePopoverAction": "alinea-WorkspaceRoots-profile-popover-action"
|
|
86
78
|
};
|
|
87
79
|
|
|
88
80
|
// src/dashboard/app/WorkspaceRoots.tsx
|
|
89
81
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
90
82
|
var styles = dist_default(WorkspaceRoots_default);
|
|
91
|
-
function WorkspaceRoots({
|
|
92
|
-
|
|
83
|
+
function WorkspaceRoots({
|
|
84
|
+
canManageMembers,
|
|
85
|
+
page,
|
|
86
|
+
root: currentRoot
|
|
87
|
+
}) {
|
|
88
|
+
const policy = useAtomValueRaw(policyAtom);
|
|
93
89
|
const workspace = page.workspace;
|
|
94
|
-
const settings =
|
|
90
|
+
const settings = useAtomValueRaw(workspaceAtom(workspace));
|
|
95
91
|
const roots = Object.keys(settings.roots).filter((key) => policy.canRead({ workspace, root: key })).map((key) => rootAtoms(workspace, key));
|
|
96
92
|
return /* @__PURE__ */ jsxs("aside", { className: styles.WorkspaceRoots(), "aria-label": "Workspace roots", children: [
|
|
97
|
-
/* @__PURE__ */ jsx("div", { className: styles.WorkspaceRoots.workspace(), children: /* @__PURE__ */ jsx(WorkspaceAvatarMenu, { page }) }),
|
|
93
|
+
/* @__PURE__ */ jsx("div", { className: styles.WorkspaceRoots.workspace(), children: /* @__PURE__ */ jsx(WorkspaceAvatarMenu, { page, root: currentRoot }) }),
|
|
98
94
|
/* @__PURE__ */ jsx("nav", { className: styles.WorkspaceRoots.roots(), children: roots.map((root) => /* @__PURE__ */ jsx(WorkspaceRootButton, { page, root }, root.key)) }),
|
|
99
95
|
/* @__PURE__ */ jsxs("div", { className: styles.WorkspaceRoots.footer(), children: [
|
|
100
96
|
/* @__PURE__ */ jsx(ActivityStatus, { mobilePlacement: "bottom right", openOnFail: true }),
|
|
@@ -103,8 +99,8 @@ function WorkspaceRoots({ canManageMembers, page }) {
|
|
|
103
99
|
] });
|
|
104
100
|
}
|
|
105
101
|
function WorkspaceRootButton({ page, root }) {
|
|
106
|
-
const icon =
|
|
107
|
-
const label =
|
|
102
|
+
const icon = useAtomValueRaw(root.icon);
|
|
103
|
+
const label = useAtomValueRaw(root.label);
|
|
108
104
|
const setRoute = useSetAtom(routeAtom);
|
|
109
105
|
const selected = page.root === root.key;
|
|
110
106
|
return /* @__PURE__ */ jsx(Tooltip, { placement: "right", delay: 100, tooltip: label, children: /* @__PURE__ */ jsx(
|
|
@@ -127,10 +123,9 @@ function WorkspaceProfileMenu({
|
|
|
127
123
|
page
|
|
128
124
|
}) {
|
|
129
125
|
const user = useUser();
|
|
130
|
-
const config =
|
|
131
|
-
const isLocal =
|
|
132
|
-
const canLogout =
|
|
133
|
-
const [theme, setTheme] = useAtom(themeAtom);
|
|
126
|
+
const config = useAtomValueRaw(configAtom);
|
|
127
|
+
const isLocal = useAtomValueRaw(localAtom);
|
|
128
|
+
const canLogout = useAtomValueRaw(canLogoutAtom);
|
|
134
129
|
const setUserRoles = useSetAtom(setUserRolesAtom);
|
|
135
130
|
const setRoute = useSetAtom(routeAtom);
|
|
136
131
|
const logout = useSetAtom(logoutAtom);
|
|
@@ -162,56 +157,49 @@ function WorkspaceProfileMenu({
|
|
|
162
157
|
style: { padding: "0", boxShadow: "0 8px 20px rgba(0, 0, 0, 0.12)" },
|
|
163
158
|
children: /* @__PURE__ */ jsxs("ul", { className: styles.WorkspaceRoots.profile.popover(), children: [
|
|
164
159
|
/* @__PURE__ */ jsxs("li", { className: styles.WorkspaceRoots.profile.popover.user(), children: [
|
|
165
|
-
/* @__PURE__ */ jsx(
|
|
160
|
+
/* @__PURE__ */ jsx(
|
|
161
|
+
Icon,
|
|
162
|
+
{
|
|
163
|
+
icon: IcBaselineAccountCircle,
|
|
164
|
+
className: styles.WorkspaceRoots.profile.popover.user.icon()
|
|
165
|
+
}
|
|
166
|
+
),
|
|
166
167
|
/* @__PURE__ */ jsx(
|
|
167
168
|
"span",
|
|
168
169
|
{
|
|
169
170
|
className: styles.WorkspaceRoots.profile.popover.user.title(),
|
|
170
171
|
children: userName
|
|
171
172
|
}
|
|
172
|
-
)
|
|
173
|
-
/* @__PURE__ */ jsx(IcRoundMoreHoriz, {})
|
|
173
|
+
)
|
|
174
174
|
] }),
|
|
175
|
+
canManageMembers && /* @__PURE__ */ jsx("li", { className: styles.WorkspaceRoots.profile.popover.action(), children: /* @__PURE__ */ jsxs(
|
|
176
|
+
Button,
|
|
177
|
+
{
|
|
178
|
+
appearance: "plain",
|
|
179
|
+
"aria-label": "Manage users",
|
|
180
|
+
className: styles.WorkspaceRoots.profile.popover.action.button(),
|
|
181
|
+
onPress: () => setRoute({ page: "users" }),
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ jsx(
|
|
184
|
+
Icon,
|
|
185
|
+
{
|
|
186
|
+
icon: IcOutlineSettings,
|
|
187
|
+
className: styles.WorkspaceRoots.profile.popover.action.icon()
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
/* @__PURE__ */ jsx(
|
|
191
|
+
"span",
|
|
192
|
+
{
|
|
193
|
+
className: styles.WorkspaceRoots.profile.popover.action.label(),
|
|
194
|
+
children: "Manage users"
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
) }),
|
|
175
200
|
/* @__PURE__ */ jsxs("li", { className: styles.WorkspaceRoots.profile.popover.item(), children: [
|
|
176
|
-
/* @__PURE__ */ jsx("p", { className: styles.WorkspaceRoots.profile.popover.item.label(), children: "
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
className: styles.WorkspaceRoots.profile.popover.themeOptions(),
|
|
181
|
-
children: [
|
|
182
|
-
/* @__PURE__ */ jsx(
|
|
183
|
-
Button,
|
|
184
|
-
{
|
|
185
|
-
size: "icon",
|
|
186
|
-
appearance: theme === "system" ? "active" : "outline",
|
|
187
|
-
icon: IcRoundDesktopWindows,
|
|
188
|
-
"aria-label": "Use system theme",
|
|
189
|
-
onPress: () => setTheme("system")
|
|
190
|
-
}
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ jsx(
|
|
193
|
-
Button,
|
|
194
|
-
{
|
|
195
|
-
size: "icon",
|
|
196
|
-
appearance: theme === "light" ? "active" : "outline",
|
|
197
|
-
icon: IcRoundWbSunny,
|
|
198
|
-
"aria-label": "Use light theme",
|
|
199
|
-
onPress: () => setTheme("light")
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
/* @__PURE__ */ jsx(
|
|
203
|
-
Button,
|
|
204
|
-
{
|
|
205
|
-
size: "icon",
|
|
206
|
-
appearance: theme === "dark" ? "active" : "outline",
|
|
207
|
-
icon: IcRoundBrightness2,
|
|
208
|
-
"aria-label": "Use dark theme",
|
|
209
|
-
onPress: () => setTheme("dark")
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
)
|
|
201
|
+
/* @__PURE__ */ jsx("p", { className: styles.WorkspaceRoots.profile.popover.item.label(), children: "Appearance" }),
|
|
202
|
+
/* @__PURE__ */ jsx(AppearanceToggle, {})
|
|
215
203
|
] }),
|
|
216
204
|
isLocal && roleEntries.length > 0 && /* @__PURE__ */ jsxs("li", { className: styles.WorkspaceRoots.profile.popover.item(), children: [
|
|
217
205
|
/* @__PURE__ */ jsx("p", { className: styles.WorkspaceRoots.profile.popover.item.label(), children: "Role" }),
|
|
@@ -245,31 +233,18 @@ function WorkspaceProfileMenu({
|
|
|
245
233
|
className: styles.WorkspaceRoots.profile.popover.action.button(),
|
|
246
234
|
onPress: logout,
|
|
247
235
|
children: [
|
|
248
|
-
/* @__PURE__ */ jsx(Icon, { icon: IcRoundLogout }),
|
|
249
236
|
/* @__PURE__ */ jsx(
|
|
250
|
-
|
|
237
|
+
Icon,
|
|
251
238
|
{
|
|
252
|
-
|
|
253
|
-
|
|
239
|
+
icon: IcRoundLogout,
|
|
240
|
+
className: styles.WorkspaceRoots.profile.popover.action.icon()
|
|
254
241
|
}
|
|
255
|
-
)
|
|
256
|
-
]
|
|
257
|
-
}
|
|
258
|
-
) }),
|
|
259
|
-
canManageMembers && /* @__PURE__ */ jsx("li", { className: styles.WorkspaceRoots.profile.popover.action(), children: /* @__PURE__ */ jsxs(
|
|
260
|
-
Button,
|
|
261
|
-
{
|
|
262
|
-
appearance: "plain",
|
|
263
|
-
"aria-label": "Manage users",
|
|
264
|
-
className: styles.WorkspaceRoots.profile.popover.action.button(),
|
|
265
|
-
onPress: () => setRoute({ page: "users" }),
|
|
266
|
-
children: [
|
|
267
|
-
/* @__PURE__ */ jsx(Icon, { icon: IcOutlineSettings }),
|
|
242
|
+
),
|
|
268
243
|
/* @__PURE__ */ jsx(
|
|
269
244
|
"span",
|
|
270
245
|
{
|
|
271
246
|
className: styles.WorkspaceRoots.profile.popover.action.label(),
|
|
272
|
-
children: "
|
|
247
|
+
children: "Logout"
|
|
273
248
|
}
|
|
274
249
|
)
|
|
275
250
|
]
|
|
@@ -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
|
thumbHashToDataURL
|
|
7
7
|
} from "../../../chunks/chunk-GWZU2AWQ.js";
|
|
@@ -28,45 +28,45 @@ import { NodeEditor } from "../EntryFields.js";
|
|
|
28
28
|
|
|
29
29
|
// src/dashboard/app/editor/FileEditor.module.css
|
|
30
30
|
var FileEditor_default = {
|
|
31
|
-
"FileEditor-tabs": "alinea-FileEditor-tabs",
|
|
32
|
-
"FileEditorTabs": "alinea-FileEditor-tabs",
|
|
33
|
-
"FileEditor-content": "alinea-FileEditor-content",
|
|
34
|
-
"FileEditorContent": "alinea-FileEditor-content",
|
|
35
31
|
"is-link": "alinea-is-link",
|
|
36
32
|
"isLink": "alinea-is-link",
|
|
37
|
-
"FileEditor-metadata": "alinea-FileEditor-metadata",
|
|
38
|
-
"FileEditorMetadata": "alinea-FileEditor-metadata",
|
|
39
|
-
"FileEditor-metadata-value": "alinea-FileEditor-metadata-value",
|
|
40
|
-
"FileEditorMetadataValue": "alinea-FileEditor-metadata-value",
|
|
41
|
-
"is-full": "alinea-is-full",
|
|
42
|
-
"isFull": "alinea-is-full",
|
|
43
33
|
"FileEditor-metadataPanel": "alinea-FileEditor-metadataPanel",
|
|
44
34
|
"FileEditorMetadataPanel": "alinea-FileEditor-metadataPanel",
|
|
35
|
+
"FileEditor-metadata": "alinea-FileEditor-metadata",
|
|
36
|
+
"FileEditorMetadata": "alinea-FileEditor-metadata",
|
|
45
37
|
"FileEditor-metadata-term": "alinea-FileEditor-metadata-term",
|
|
46
38
|
"FileEditorMetadataTerm": "alinea-FileEditor-metadata-term",
|
|
47
|
-
"FileEditor
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
39
|
+
"FileEditor": "alinea-FileEditor",
|
|
40
|
+
"FileEditor-content": "alinea-FileEditor-content",
|
|
41
|
+
"FileEditorContent": "alinea-FileEditor-content",
|
|
42
|
+
"FileEditor-focus-label": "alinea-FileEditor-focus-label",
|
|
43
|
+
"FileEditorFocusLabel": "alinea-FileEditor-focus-label",
|
|
44
|
+
"FileEditor-focus-value": "alinea-FileEditor-focus-value",
|
|
45
|
+
"FileEditorFocusValue": "alinea-FileEditor-focus-value",
|
|
46
|
+
"is-full": "alinea-is-full",
|
|
47
|
+
"isFull": "alinea-is-full",
|
|
51
48
|
"FileEditor-focus": "alinea-FileEditor-focus",
|
|
52
49
|
"FileEditorFocus": "alinea-FileEditor-focus",
|
|
53
50
|
"FileEditor-focus-description": "alinea-FileEditor-focus-description",
|
|
54
51
|
"FileEditorFocusDescription": "alinea-FileEditor-focus-description",
|
|
55
|
-
"FileEditor-
|
|
56
|
-
"
|
|
52
|
+
"FileEditor-tabPanel": "alinea-FileEditor-tabPanel",
|
|
53
|
+
"FileEditorTabPanel": "alinea-FileEditor-tabPanel",
|
|
54
|
+
"FileEditor-metadata-value": "alinea-FileEditor-metadata-value",
|
|
55
|
+
"FileEditorMetadataValue": "alinea-FileEditor-metadata-value",
|
|
56
|
+
"FileEditor-tabs-header": "alinea-FileEditor-tabs-header",
|
|
57
|
+
"FileEditorTabsHeader": "alinea-FileEditor-tabs-header",
|
|
58
|
+
"FileEditor-surface": "alinea-FileEditor-surface",
|
|
59
|
+
"FileEditorSurface": "alinea-FileEditor-surface",
|
|
57
60
|
"FileEditor-focus-header": "alinea-FileEditor-focus-header",
|
|
58
61
|
"FileEditorFocusHeader": "alinea-FileEditor-focus-header",
|
|
59
|
-
"FileEditor-focus-value": "alinea-FileEditor-focus-value",
|
|
60
|
-
"FileEditorFocusValue": "alinea-FileEditor-focus-value",
|
|
61
|
-
"FileEditor": "alinea-FileEditor",
|
|
62
62
|
"is-image": "alinea-is-image",
|
|
63
63
|
"isImage": "alinea-is-image",
|
|
64
|
-
"FileEditor-
|
|
65
|
-
"
|
|
66
|
-
"FileEditor-
|
|
67
|
-
"
|
|
68
|
-
"FileEditor-
|
|
69
|
-
"
|
|
64
|
+
"FileEditor-metadata-grid": "alinea-FileEditor-metadata-grid",
|
|
65
|
+
"FileEditorMetadataGrid": "alinea-FileEditor-metadata-grid",
|
|
66
|
+
"FileEditor-tabs": "alinea-FileEditor-tabs",
|
|
67
|
+
"FileEditorTabs": "alinea-FileEditor-tabs",
|
|
68
|
+
"FileEditor-metadata-item": "alinea-FileEditor-metadata-item",
|
|
69
|
+
"FileEditorMetadataItem": "alinea-FileEditor-metadata-item"
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// src/dashboard/app/editor/FileEditor.tsx
|
|
@@ -82,7 +82,7 @@ var metadataFields = type("Metadata", {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
function FileEditor({ entry, parentPaths }) {
|
|
85
|
-
const config =
|
|
85
|
+
const config = useAtomValueRaw(configAtom);
|
|
86
86
|
const location = useFieldValue(MediaFile.location);
|
|
87
87
|
const path = useFieldValue(MediaFile.path);
|
|
88
88
|
const extension = useFieldValue(MediaFile.extension);
|
|
@@ -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-focus-inner": "alinea-FilePreview-focus-inner",
|
|
14
|
-
"FilePreviewFocusInner": "alinea-FilePreview-focus-inner",
|
|
15
|
-
"FilePreview-interactive": "alinea-FilePreview-interactive",
|
|
16
|
-
"FilePreviewInteractive": "alinea-FilePreview-interactive",
|
|
17
13
|
"FilePreview-image": "alinea-FilePreview-image",
|
|
18
14
|
"FilePreviewImage": "alinea-FilePreview-image",
|
|
15
|
+
"FilePreview-interactive": "alinea-FilePreview-interactive",
|
|
16
|
+
"FilePreviewInteractive": "alinea-FilePreview-interactive",
|
|
17
|
+
"FilePreview-focus-inner": "alinea-FilePreview-focus-inner",
|
|
18
|
+
"FilePreviewFocusInner": "alinea-FilePreview-focus-inner",
|
|
19
19
|
"FilePreview-focus-dot": "alinea-FilePreview-focus-dot",
|
|
20
20
|
"FilePreviewFocusDot": "alinea-FilePreview-focus-dot",
|
|
21
|
-
"FilePreview": "alinea-FilePreview",
|
|
22
21
|
"FilePreview-focus": "alinea-FilePreview-focus",
|
|
23
|
-
"FilePreviewFocus": "alinea-FilePreview-focus"
|
|
22
|
+
"FilePreviewFocus": "alinea-FilePreview-focus",
|
|
23
|
+
"FilePreview": "alinea-FilePreview"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
// src/dashboard/app/editor/FilePreview.tsx
|
|
@@ -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 "../../../chunks/chunk-CQ52GEHY.js";
|
|
6
6
|
|
|
7
7
|
// src/dashboard/app/editor/MediaAltField.view.tsx
|
|
@@ -21,7 +21,7 @@ import { useState } from "react";
|
|
|
21
21
|
import { jsx } from "react/jsx-runtime";
|
|
22
22
|
function MediaAltFieldView({ field }) {
|
|
23
23
|
const { entry } = useEntryAtoms();
|
|
24
|
-
const i18n =
|
|
24
|
+
const i18n = useAtomValueRaw(entry.mediaI18n);
|
|
25
25
|
const [value, setValue] = useField(field);
|
|
26
26
|
const options = useFieldOptions(field);
|
|
27
27
|
const error = useFieldError(field);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
useAtomValueRaw,
|
|
3
3
|
useSetAtom
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-D6UJHBJJ.js";
|
|
5
5
|
import {
|
|
6
6
|
atom
|
|
7
|
-
} from "../../../chunks/chunk-
|
|
7
|
+
} from "../../../chunks/chunk-CFNRVI3Y.js";
|
|
8
8
|
import {
|
|
9
9
|
dist_default
|
|
10
10
|
} from "../../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -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-message": "alinea-CreateEntry-message",
|
|
51
|
+
"CreateEntryMessage": "alinea-CreateEntry-message",
|
|
52
52
|
"CreateEntry-parentRow": "alinea-CreateEntry-parentRow",
|
|
53
53
|
"CreateEntryParentRow": "alinea-CreateEntry-parentRow",
|
|
54
|
+
"CreateEntry-parentField": "alinea-CreateEntry-parentField",
|
|
55
|
+
"CreateEntryParentField": "alinea-CreateEntry-parentField",
|
|
54
56
|
"CreateEntry-insertOrder": "alinea-CreateEntry-insertOrder",
|
|
55
|
-
"CreateEntryInsertOrder": "alinea-CreateEntry-insertOrder"
|
|
56
|
-
"CreateEntry-message": "alinea-CreateEntry-message",
|
|
57
|
-
"CreateEntryMessage": "alinea-CreateEntry-message"
|
|
57
|
+
"CreateEntryInsertOrder": "alinea-CreateEntry-insertOrder"
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// src/dashboard/app/modals/CreateEntry.tsx
|
|
@@ -102,12 +102,12 @@ function CreateEntryForm() {
|
|
|
102
102
|
const modal = useDashboardModal();
|
|
103
103
|
const { page, root } = useDashboardContext();
|
|
104
104
|
const createEntry = useSetAtom(createEntryAtom);
|
|
105
|
-
const config =
|
|
106
|
-
const policy =
|
|
105
|
+
const config = useAtomValueRaw(configAtom).schema;
|
|
106
|
+
const policy = useAtomValueRaw(policyAtom);
|
|
107
107
|
const { locale } = page;
|
|
108
108
|
const tree = root.tree(locale);
|
|
109
|
-
const selectedItem =
|
|
110
|
-
const rootData =
|
|
109
|
+
const selectedItem = useAtomValueRaw(tree.selectedItem);
|
|
110
|
+
const rootData = useAtomValueRaw(root.data);
|
|
111
111
|
const initialParentId = useMemo(() => {
|
|
112
112
|
if (!page.entry || !selectedItem) return void 0;
|
|
113
113
|
const type = config[selectedItem.type];
|
|
@@ -134,7 +134,7 @@ function CreateEntryForm() {
|
|
|
134
134
|
initialParentId ? entryReference(initialParentId, "parent") : null
|
|
135
135
|
);
|
|
136
136
|
}, [containerTypes, initialParentId, root.key, root.workspace]);
|
|
137
|
-
const parentValue =
|
|
137
|
+
const parentValue = useAtomValueRaw(parent.value);
|
|
138
138
|
const parentId = entryIdOf(parentValue);
|
|
139
139
|
const parentItemAtom = useMemo(
|
|
140
140
|
() => atom((get) => {
|
|
@@ -143,7 +143,7 @@ function CreateEntryForm() {
|
|
|
143
143
|
}),
|
|
144
144
|
[parent.value, tree]
|
|
145
145
|
);
|
|
146
|
-
const parentItem =
|
|
146
|
+
const parentItem = useAtomValueRaw(parentItemAtom);
|
|
147
147
|
const parentType = parentItem ? config[parentItem.type] : void 0;
|
|
148
148
|
const allowed = parentType ? Schema.contained(config, Type.contains(parentType)) : Schema.contained(config, rootData.contains ?? []);
|
|
149
149
|
const parentIds = parentItem ? [parentItem.id, ...parentItem.parents] : [];
|
|
@@ -166,7 +166,7 @@ function CreateEntryForm() {
|
|
|
166
166
|
});
|
|
167
167
|
return createLinkEditor("copyFrom", field);
|
|
168
168
|
}, [root.key, root.workspace, selectedType]);
|
|
169
|
-
const copyFromValue =
|
|
169
|
+
const copyFromValue = useAtomValueRaw(copyFrom.value);
|
|
170
170
|
const copyFromId = entryIdOf(copyFromValue);
|
|
171
171
|
const showInsertOrder = parentType ? Type.insertOrder(parentType) === "free" : true;
|
|
172
172
|
async function onSubmit(event) {
|
|
@@ -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";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
routeGuardAtom
|
|
27
27
|
} from "alinea/dashboard/atoms/nav";
|
|
28
28
|
import { rootAtoms } from "alinea/dashboard/atoms/root";
|
|
29
|
-
import { useEffect, useLayoutEffect, useRef
|
|
29
|
+
import { useEffect, useLayoutEffect, useRef } from "react";
|
|
30
30
|
import { EntryScope } from "../../hooks.js";
|
|
31
31
|
import {
|
|
32
32
|
IcBaselineErrorOutline,
|
|
@@ -56,29 +56,29 @@ import { Rail, RailBody, RailContent } from "./../ui/Rail.js";
|
|
|
56
56
|
|
|
57
57
|
// src/dashboard/app/pages/EntryPage.module.css
|
|
58
58
|
var EntryPage_default = {
|
|
59
|
-
"EntryEditor-body": "alinea-EntryEditor-body",
|
|
60
|
-
"EntryEditorBody": "alinea-EntryEditor-body",
|
|
61
|
-
"MissingEntry": "alinea-MissingEntry",
|
|
62
|
-
"MissingEntry-card": "alinea-MissingEntry-card",
|
|
63
|
-
"MissingEntryCard": "alinea-MissingEntry-card",
|
|
64
|
-
"MissingEntry-message": "alinea-MissingEntry-message",
|
|
65
|
-
"MissingEntryMessage": "alinea-MissingEntry-message",
|
|
66
|
-
"MissingEntry-id": "alinea-MissingEntry-id",
|
|
67
|
-
"MissingEntryId": "alinea-MissingEntry-id",
|
|
68
|
-
"EntryEditor-fields": "alinea-EntryEditor-fields",
|
|
69
|
-
"EntryEditorFields": "alinea-EntryEditor-fields",
|
|
70
|
-
"EntryEditor-banner": "alinea-EntryEditor-banner",
|
|
71
|
-
"EntryEditorBanner": "alinea-EntryEditor-banner",
|
|
72
|
-
"EntryEditor-toolbar": "alinea-EntryEditor-toolbar",
|
|
73
|
-
"EntryEditorToolbar": "alinea-EntryEditor-toolbar",
|
|
74
59
|
"MissingEntry-icon": "alinea-MissingEntry-icon",
|
|
75
60
|
"MissingEntryIcon": "alinea-MissingEntry-icon",
|
|
76
|
-
"EntryEditor-title": "alinea-EntryEditor-title",
|
|
77
|
-
"EntryEditorTitle": "alinea-EntryEditor-title",
|
|
78
61
|
"MissingEntry-title": "alinea-MissingEntry-title",
|
|
79
62
|
"MissingEntryTitle": "alinea-MissingEntry-title",
|
|
63
|
+
"MissingEntry-id": "alinea-MissingEntry-id",
|
|
64
|
+
"MissingEntryId": "alinea-MissingEntry-id",
|
|
65
|
+
"MissingEntry-message": "alinea-MissingEntry-message",
|
|
66
|
+
"MissingEntryMessage": "alinea-MissingEntry-message",
|
|
67
|
+
"EntryEditor-toolbar": "alinea-EntryEditor-toolbar",
|
|
68
|
+
"EntryEditorToolbar": "alinea-EntryEditor-toolbar",
|
|
80
69
|
"EntryOverview-mobileActions": "alinea-EntryOverview-mobileActions",
|
|
81
70
|
"EntryOverviewMobileActions": "alinea-EntryOverview-mobileActions",
|
|
71
|
+
"EntryEditor-title": "alinea-EntryEditor-title",
|
|
72
|
+
"EntryEditorTitle": "alinea-EntryEditor-title",
|
|
73
|
+
"EntryEditor-fields": "alinea-EntryEditor-fields",
|
|
74
|
+
"EntryEditorFields": "alinea-EntryEditor-fields",
|
|
75
|
+
"MissingEntry-card": "alinea-MissingEntry-card",
|
|
76
|
+
"MissingEntryCard": "alinea-MissingEntry-card",
|
|
77
|
+
"EntryEditor-body": "alinea-EntryEditor-body",
|
|
78
|
+
"EntryEditorBody": "alinea-EntryEditor-body",
|
|
79
|
+
"EntryEditor-banner": "alinea-EntryEditor-banner",
|
|
80
|
+
"EntryEditorBanner": "alinea-EntryEditor-banner",
|
|
81
|
+
"MissingEntry": "alinea-MissingEntry",
|
|
82
82
|
"EntryEditor-header": "alinea-EntryEditor-header",
|
|
83
83
|
"EntryEditorHeader": "alinea-EntryEditor-header"
|
|
84
84
|
};
|
|
@@ -136,7 +136,7 @@ var entryPage = page(async (page2, get) => {
|
|
|
136
136
|
});
|
|
137
137
|
function MissingEntry({ page: page2 }) {
|
|
138
138
|
assert(page2.workspace && page2.root && page2.entry);
|
|
139
|
-
const root =
|
|
139
|
+
const root = useAtomValueRaw(rootAtoms(page2.workspace, page2.root).data);
|
|
140
140
|
const setRoute = useSetAtom(routeAtom);
|
|
141
141
|
return /* @__PURE__ */ jsx(
|
|
142
142
|
NotFoundPanel,
|
|
@@ -176,10 +176,9 @@ function NotFoundPanel({
|
|
|
176
176
|
] }) }) });
|
|
177
177
|
}
|
|
178
178
|
function EntryViewToggle({ entry, page: page2 }) {
|
|
179
|
-
const entryView =
|
|
179
|
+
const entryView = useAtomValueRaw(entry.view);
|
|
180
180
|
const view = page2.view ?? entryView;
|
|
181
181
|
const setRoute = useSetAtom(routeAtom);
|
|
182
|
-
const [isPending, startTransition] = useTransition();
|
|
183
182
|
const nextView = view === "overview" ? "edit" : "overview";
|
|
184
183
|
const label = nextView === "overview" ? "Show overview" : "Edit entry";
|
|
185
184
|
const tooltip = nextView === "overview" ? "Overview view" : "Edit view";
|
|
@@ -190,7 +189,6 @@ function EntryViewToggle({ entry, page: page2 }) {
|
|
|
190
189
|
"aria-label": label,
|
|
191
190
|
appearance: "plain",
|
|
192
191
|
icon: ViewIcon,
|
|
193
|
-
isDisabled: isPending,
|
|
194
192
|
size: "icon",
|
|
195
193
|
onPress: () => setRoute({
|
|
196
194
|
workspace: page2.workspace,
|
|
@@ -245,12 +243,12 @@ function EntryEditorContent({
|
|
|
245
243
|
sourceLocale,
|
|
246
244
|
node
|
|
247
245
|
}) {
|
|
248
|
-
const typeName =
|
|
249
|
-
const type =
|
|
250
|
-
const hasChildren =
|
|
251
|
-
const defaultView =
|
|
252
|
-
const sourceLocales =
|
|
253
|
-
const parentPaths =
|
|
246
|
+
const typeName = useAtomValueRaw(entry.type);
|
|
247
|
+
const type = useAtomValueRaw(typeAtoms(typeName));
|
|
248
|
+
const hasChildren = useAtomValueRaw(entry.hasChildren);
|
|
249
|
+
const defaultView = useAtomValueRaw(entry.view);
|
|
250
|
+
const sourceLocales = useAtomValueRaw(entry.translationSourceLocales);
|
|
251
|
+
const parentPaths = useAtomValueRaw(entry.parentPaths);
|
|
254
252
|
const View = type.customView;
|
|
255
253
|
const { locale } = page2;
|
|
256
254
|
const isUntranslated = selectedEntry.locale !== locale;
|
|
@@ -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";
|
|
@@ -66,7 +66,7 @@ function RootBrowser({ page: page2, root }) {
|
|
|
66
66
|
) });
|
|
67
67
|
}
|
|
68
68
|
function MissingRoot({ page: page2, requestedRoot, root }) {
|
|
69
|
-
const label =
|
|
69
|
+
const label = useAtomValueRaw(root.label);
|
|
70
70
|
const setRoute = useSetAtom(routeAtom);
|
|
71
71
|
return /* @__PURE__ */ jsx(
|
|
72
72
|
NotFoundPanel,
|