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,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";
|
|
@@ -19,7 +19,6 @@ import { rootAtoms } from "alinea/dashboard/atoms/root";
|
|
|
19
19
|
import { useDashboardContext } from "alinea/dashboard/hooks";
|
|
20
20
|
import {
|
|
21
21
|
Suspense,
|
|
22
|
-
startTransition,
|
|
23
22
|
useMemo,
|
|
24
23
|
useState
|
|
25
24
|
} from "react";
|
|
@@ -40,15 +39,15 @@ import {
|
|
|
40
39
|
|
|
41
40
|
// src/dashboard/app/LinkPicker.module.css
|
|
42
41
|
var LinkPicker_default = {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
42
|
+
"LinkPickerCompact-footer": "alinea-LinkPickerCompact-footer",
|
|
43
|
+
"LinkPickerCompactFooter": "alinea-LinkPickerCompact-footer",
|
|
45
44
|
"LinkPickerCompact-selection": "alinea-LinkPickerCompact-selection",
|
|
46
45
|
"LinkPickerCompactSelection": "alinea-LinkPickerCompact-selection",
|
|
47
46
|
"LinkPickerCompact": "alinea-LinkPickerCompact",
|
|
47
|
+
"LinkPicker-popover": "alinea-LinkPicker-popover",
|
|
48
|
+
"LinkPickerPopover": "alinea-LinkPicker-popover",
|
|
48
49
|
"LinkPickerCompact-header": "alinea-LinkPickerCompact-header",
|
|
49
|
-
"LinkPickerCompactHeader": "alinea-LinkPickerCompact-header"
|
|
50
|
-
"LinkPickerCompact-footer": "alinea-LinkPickerCompact-footer",
|
|
51
|
-
"LinkPickerCompactFooter": "alinea-LinkPickerCompact-footer"
|
|
50
|
+
"LinkPickerCompactHeader": "alinea-LinkPickerCompact-header"
|
|
52
51
|
};
|
|
53
52
|
|
|
54
53
|
// src/dashboard/app/LinkPicker.tsx
|
|
@@ -96,7 +95,7 @@ function LinkPickerModalLoading() {
|
|
|
96
95
|
}
|
|
97
96
|
function LinkPickerModalContent({ options }) {
|
|
98
97
|
const { explorer, tree } = useLinkPickerExplorer(options);
|
|
99
|
-
const page =
|
|
98
|
+
const page = useAtomValueRaw(explorer.page);
|
|
100
99
|
if (!page) return /* @__PURE__ */ jsx(LinkPickerModalLoading, {});
|
|
101
100
|
return /* @__PURE__ */ jsx(
|
|
102
101
|
LinkPickerExpanded,
|
|
@@ -133,7 +132,7 @@ function LinkPickerReady({
|
|
|
133
132
|
options
|
|
134
133
|
}) {
|
|
135
134
|
const { explorer, tree } = useLinkPickerExplorer(options);
|
|
136
|
-
const page =
|
|
135
|
+
const page = useAtomValueRaw(explorer.page);
|
|
137
136
|
if (!page)
|
|
138
137
|
return /* @__PURE__ */ jsx(
|
|
139
138
|
LinkPickerLoading,
|
|
@@ -178,7 +177,7 @@ function useLinkPickerExplorer(options) {
|
|
|
178
177
|
root: root.key
|
|
179
178
|
};
|
|
180
179
|
const pickerRoot = rootAtoms(location.workspace, location.root ?? root.key);
|
|
181
|
-
const pickerI18n =
|
|
180
|
+
const pickerI18n = useAtomValueRaw(pickerRoot.i18n);
|
|
182
181
|
const initialLocale = normalizePickerLocale(
|
|
183
182
|
location.locale ?? options.selectedLocale ?? page.locale,
|
|
184
183
|
pickerI18n?.locales ?? []
|
|
@@ -214,17 +213,15 @@ function LinkPickerCompact({
|
|
|
214
213
|
onExpand
|
|
215
214
|
}) {
|
|
216
215
|
const popover = useDashboardModal();
|
|
217
|
-
const selection =
|
|
216
|
+
const selection = useAtomValueRaw(explorer.selection);
|
|
218
217
|
const setSelection = useSetAtom(explorer.selection);
|
|
219
218
|
const selectsMultiple = explorer.selectionMode === "multiple";
|
|
220
219
|
const selectedItems = selection === "all" ? 0 : selection.size;
|
|
221
220
|
function commitSelection(selection2) {
|
|
222
221
|
if (selection2 === "all" || selection2.size === 0 && explorer.selectionMode !== "multiple")
|
|
223
222
|
return;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
popover.close();
|
|
227
|
-
});
|
|
223
|
+
onCommit?.([...selection2].map(String));
|
|
224
|
+
popover.close();
|
|
228
225
|
}
|
|
229
226
|
function commitEntry(entry) {
|
|
230
227
|
if (selectsMultiple) {
|
|
@@ -292,13 +289,11 @@ function LinkPickerExpanded({
|
|
|
292
289
|
}) {
|
|
293
290
|
const modal = useDashboardModal();
|
|
294
291
|
const onConfirm = useSetAtom(explorer.onConfirm);
|
|
295
|
-
const selection =
|
|
292
|
+
const selection = useAtomValueRaw(explorer.selection);
|
|
296
293
|
const selectedItems = selection === "all" ? 0 : selection.size;
|
|
297
294
|
function onSubmit() {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
modal.close();
|
|
301
|
-
});
|
|
295
|
+
onConfirm();
|
|
296
|
+
modal.close();
|
|
302
297
|
}
|
|
303
298
|
return /* @__PURE__ */ jsx(DashboardModalDialog, { "aria-label": expandedPickerLabel, variant: "explorer", children: /* @__PURE__ */ jsx(ExplorerModalSuspense, { children: /* @__PURE__ */ jsxs(ExplorerModal, { children: [
|
|
304
299
|
/* @__PURE__ */ jsx(
|
|
@@ -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
|
$7705c033048f6da7$export$353f5b6fc5456de1
|
|
7
7
|
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
@@ -20,21 +20,20 @@ import "../../chunks/chunk-CQ52GEHY.js";
|
|
|
20
20
|
|
|
21
21
|
// src/dashboard/app/LocaleMenu.tsx
|
|
22
22
|
import { Icon, Menu, MenuItem } from "alinea/components";
|
|
23
|
-
import { useTransition } from "react";
|
|
24
23
|
import { IcRoundUnfoldMore } from "../icons.js";
|
|
25
24
|
|
|
26
25
|
// src/dashboard/app/LocaleMenu.module.css
|
|
27
26
|
var LocaleMenu_default = {
|
|
28
|
-
"LocaleMenu-trigger": "alinea-LocaleMenu-trigger",
|
|
29
|
-
"LocaleMenuTrigger": "alinea-LocaleMenu-trigger",
|
|
30
|
-
"LocaleMenu-label-fullName": "alinea-LocaleMenu-label-fullName",
|
|
31
|
-
"LocaleMenuLabelFullName": "alinea-LocaleMenu-label-fullName",
|
|
32
27
|
"LocaleMenu-label": "alinea-LocaleMenu-label",
|
|
33
28
|
"LocaleMenuLabel": "alinea-LocaleMenu-label",
|
|
29
|
+
"LocaleMenu-label-fullName": "alinea-LocaleMenu-label-fullName",
|
|
30
|
+
"LocaleMenuLabelFullName": "alinea-LocaleMenu-label-fullName",
|
|
34
31
|
"LocaleMenu-label-code": "alinea-LocaleMenu-label-code",
|
|
35
32
|
"LocaleMenuLabelCode": "alinea-LocaleMenu-label-code",
|
|
36
33
|
"LocaleMenu-trigger-icon": "alinea-LocaleMenu-trigger-icon",
|
|
37
|
-
"LocaleMenuTriggerIcon": "alinea-LocaleMenu-trigger-icon"
|
|
34
|
+
"LocaleMenuTriggerIcon": "alinea-LocaleMenu-trigger-icon",
|
|
35
|
+
"LocaleMenu-trigger": "alinea-LocaleMenu-trigger",
|
|
36
|
+
"LocaleMenuTrigger": "alinea-LocaleMenu-trigger"
|
|
38
37
|
};
|
|
39
38
|
|
|
40
39
|
// src/dashboard/app/LocaleMenu.tsx
|
|
@@ -68,15 +67,14 @@ function LocaleLabel({ locale }) {
|
|
|
68
67
|
] });
|
|
69
68
|
}
|
|
70
69
|
function LocaleMenu({ root, locale, onLocaleChange }) {
|
|
71
|
-
const i18n =
|
|
72
|
-
const [isPending, startTransition] = useTransition();
|
|
70
|
+
const i18n = useAtomValueRaw(root.i18n);
|
|
73
71
|
if (!i18n || i18n.locales.length === 0) return null;
|
|
74
72
|
const activeLocale = locale ?? i18n.locales[0];
|
|
75
73
|
if (!activeLocale) return null;
|
|
76
74
|
return /* @__PURE__ */ jsx(
|
|
77
75
|
Menu,
|
|
78
76
|
{
|
|
79
|
-
label: /* @__PURE__ */ jsxs($7705c033048f6da7$export$353f5b6fc5456de1, { className: styles.LocaleMenu.trigger(),
|
|
77
|
+
label: /* @__PURE__ */ jsxs($7705c033048f6da7$export$353f5b6fc5456de1, { className: styles.LocaleMenu.trigger(), children: [
|
|
80
78
|
/* @__PURE__ */ jsx(LocaleLabel, { locale: activeLocale }),
|
|
81
79
|
/* @__PURE__ */ jsx(
|
|
82
80
|
Icon,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAtom,
|
|
3
|
-
|
|
4
|
-
} from "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
3
|
+
useAtomValueRaw
|
|
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";
|
|
@@ -1100,7 +1100,7 @@ function SidebarLayout({
|
|
|
1100
1100
|
side,
|
|
1101
1101
|
visible = true
|
|
1102
1102
|
}) {
|
|
1103
|
-
const isMobile =
|
|
1103
|
+
const isMobile = useAtomValueRaw(dashboardMobileAtom);
|
|
1104
1104
|
const [width, setWidth] = useAtom(
|
|
1105
1105
|
side === "left" ? navigationSidebarWidthAtom : entrySidebarWidthAtom
|
|
1106
1106
|
);
|
|
@@ -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
|
$143fb904d86051ce$export$89be5a243e59c4b2
|
|
9
9
|
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
@@ -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-status": "alinea-SidebarTree-status",
|
|
47
|
-
"SidebarTreeStatus": "alinea-SidebarTree-status",
|
|
48
|
-
"is-archived": "alinea-is-archived",
|
|
49
|
-
"isArchived": "alinea-is-archived",
|
|
50
|
-
"SidebarTree-skeleton": "alinea-SidebarTree-skeleton",
|
|
51
|
-
"SidebarTreeSkeleton": "alinea-SidebarTree-skeleton",
|
|
52
|
-
"is-parentSelected": "alinea-is-parentSelected",
|
|
53
|
-
"isParentSelected": "alinea-is-parentSelected",
|
|
54
|
-
"SidebarTree-entryLink": "alinea-SidebarTree-entryLink",
|
|
55
|
-
"SidebarTreeEntryLink": "alinea-SidebarTree-entryLink",
|
|
56
|
-
"SidebarTree-skeleton-row": "alinea-SidebarTree-skeleton-row",
|
|
57
|
-
"SidebarTreeSkeletonRow": "alinea-SidebarTree-skeleton-row",
|
|
58
|
-
"is-draft": "alinea-is-draft",
|
|
59
|
-
"isDraft": "alinea-is-draft",
|
|
60
|
-
"SidebarTree-tree": "alinea-SidebarTree-tree",
|
|
61
|
-
"SidebarTreeTree": "alinea-SidebarTree-tree",
|
|
62
|
-
"SidebarTree-tree-viewport": "alinea-SidebarTree-tree-viewport",
|
|
63
|
-
"SidebarTreeTreeViewport": "alinea-SidebarTree-tree-viewport",
|
|
64
|
-
"SidebarTree-skeleton-label": "alinea-SidebarTree-skeleton-label",
|
|
65
|
-
"SidebarTreeSkeletonLabel": "alinea-SidebarTree-skeleton-label",
|
|
66
46
|
"is-short": "alinea-is-short",
|
|
67
47
|
"isShort": "alinea-is-short",
|
|
68
|
-
"SidebarTree-
|
|
69
|
-
"
|
|
48
|
+
"SidebarTree-skeleton-row": "alinea-SidebarTree-skeleton-row",
|
|
49
|
+
"SidebarTreeSkeletonRow": "alinea-SidebarTree-skeleton-row",
|
|
50
|
+
"SidebarTree-itemLoading": "alinea-SidebarTree-itemLoading",
|
|
51
|
+
"SidebarTreeItemLoading": "alinea-SidebarTree-itemLoading",
|
|
70
52
|
"SidebarTree-root": "alinea-SidebarTree-root",
|
|
71
53
|
"SidebarTreeRoot": "alinea-SidebarTree-root",
|
|
54
|
+
"SidebarTree-rootButton-locale": "alinea-SidebarTree-rootButton-locale",
|
|
55
|
+
"SidebarTreeRootButtonLocale": "alinea-SidebarTree-rootButton-locale",
|
|
56
|
+
"is-loading": "alinea-is-loading",
|
|
57
|
+
"isLoading": "alinea-is-loading",
|
|
72
58
|
"SidebarTree-rootButton-action": "alinea-SidebarTree-rootButton-action",
|
|
73
59
|
"SidebarTreeRootButtonAction": "alinea-SidebarTree-rootButton-action",
|
|
60
|
+
"SidebarTree-entryLink": "alinea-SidebarTree-entryLink",
|
|
61
|
+
"SidebarTreeEntryLink": "alinea-SidebarTree-entryLink",
|
|
62
|
+
"SidebarTree-tree-viewport": "alinea-SidebarTree-tree-viewport",
|
|
63
|
+
"SidebarTreeTreeViewport": "alinea-SidebarTree-tree-viewport",
|
|
64
|
+
"is-archived": "alinea-is-archived",
|
|
65
|
+
"isArchived": "alinea-is-archived",
|
|
66
|
+
"is-untranslated": "alinea-is-untranslated",
|
|
67
|
+
"isUntranslated": "alinea-is-untranslated",
|
|
68
|
+
"SidebarTree-skeleton-chevron": "alinea-SidebarTree-skeleton-chevron",
|
|
69
|
+
"SidebarTreeSkeletonChevron": "alinea-SidebarTree-skeleton-chevron",
|
|
70
|
+
"SidebarTree-skeleton-pulse": "alinea-SidebarTree-skeleton-pulse",
|
|
71
|
+
"SidebarTreeSkeletonPulse": "alinea-SidebarTree-skeleton-pulse",
|
|
72
|
+
"is-parentSelected": "alinea-is-parentSelected",
|
|
73
|
+
"isParentSelected": "alinea-is-parentSelected",
|
|
74
|
+
"SidebarTree-status": "alinea-SidebarTree-status",
|
|
75
|
+
"SidebarTreeStatus": "alinea-SidebarTree-status",
|
|
74
76
|
"is-selected": "alinea-is-selected",
|
|
75
77
|
"isSelected": "alinea-is-selected",
|
|
76
|
-
"SidebarTree-item": "alinea-SidebarTree-item",
|
|
77
|
-
"SidebarTreeItem": "alinea-SidebarTree-item",
|
|
78
78
|
"SidebarTree-skeleton-icon": "alinea-SidebarTree-skeleton-icon",
|
|
79
79
|
"SidebarTreeSkeletonIcon": "alinea-SidebarTree-skeleton-icon",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"is-untranslated": "alinea-is-untranslated",
|
|
83
|
-
"isUntranslated": "alinea-is-untranslated",
|
|
80
|
+
"is-draft": "alinea-is-draft",
|
|
81
|
+
"isDraft": "alinea-is-draft",
|
|
84
82
|
"SidebarTree-rootButton-label": "alinea-SidebarTree-rootButton-label",
|
|
85
83
|
"SidebarTreeRootButtonLabel": "alinea-SidebarTree-rootButton-label",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
84
|
+
"is-unpublished": "alinea-is-unpublished",
|
|
85
|
+
"isUnpublished": "alinea-is-unpublished",
|
|
86
|
+
"SidebarTree-rootButton": "alinea-SidebarTree-rootButton",
|
|
87
|
+
"SidebarTreeRootButton": "alinea-SidebarTree-rootButton",
|
|
88
|
+
"SidebarTree-item": "alinea-SidebarTree-item",
|
|
89
|
+
"SidebarTreeItem": "alinea-SidebarTree-item",
|
|
90
|
+
"SidebarTree-itemLoading-pulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
91
|
+
"SidebarTreeItemLoadingPulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
88
92
|
"SidebarTree-loading": "alinea-SidebarTree-loading",
|
|
89
93
|
"SidebarTreeLoading": "alinea-SidebarTree-loading",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"SidebarTree-skeleton": "alinea-SidebarTree-skeleton",
|
|
95
|
+
"SidebarTreeSkeleton": "alinea-SidebarTree-skeleton",
|
|
96
|
+
"SidebarTree-tree": "alinea-SidebarTree-tree",
|
|
97
|
+
"SidebarTreeTree": "alinea-SidebarTree-tree",
|
|
98
|
+
"SidebarTree-skeleton-label": "alinea-SidebarTree-skeleton-label",
|
|
99
|
+
"SidebarTreeSkeletonLabel": "alinea-SidebarTree-skeleton-label",
|
|
92
100
|
"SidebarTree-itemSkeleton-label": "alinea-SidebarTree-itemSkeleton-label",
|
|
93
|
-
"SidebarTreeItemSkeletonLabel": "alinea-SidebarTree-itemSkeleton-label"
|
|
94
|
-
"SidebarTree-skeleton-pulse": "alinea-SidebarTree-skeleton-pulse",
|
|
95
|
-
"SidebarTreeSkeletonPulse": "alinea-SidebarTree-skeleton-pulse",
|
|
96
|
-
"SidebarTree-itemLoading-pulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
97
|
-
"SidebarTreeItemLoadingPulse": "alinea-SidebarTree-itemLoading-pulse",
|
|
98
|
-
"SidebarTree-itemLoading": "alinea-SidebarTree-itemLoading",
|
|
99
|
-
"SidebarTreeItemLoading": "alinea-SidebarTree-itemLoading",
|
|
100
|
-
"is-unpublished": "alinea-is-unpublished",
|
|
101
|
-
"isUnpublished": "alinea-is-unpublished"
|
|
101
|
+
"SidebarTreeItemSkeletonLabel": "alinea-SidebarTree-itemSkeleton-label"
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
// src/dashboard/app/SidebarTree.tsx
|
|
@@ -127,8 +127,8 @@ var SidebarTreeItem = memo(function SidebarTreeItem2({
|
|
|
127
127
|
selectedItem,
|
|
128
128
|
tree
|
|
129
129
|
}) {
|
|
130
|
-
const data =
|
|
131
|
-
const configuredIcon =
|
|
130
|
+
const data = useAtomValueRaw(tree.item(item.id));
|
|
131
|
+
const configuredIcon = useAtomValueRaw(typeAtoms(data.type)).icon;
|
|
132
132
|
const displayStatus = sidebarStatus(data, locale);
|
|
133
133
|
const selectedAncestor = selectedItem && data.parents.includes(selectedItem.id) ? selectedItem : void 0;
|
|
134
134
|
const selectedStatus = selectedAncestor ? sidebarStatus(selectedAncestor, locale) : void 0;
|
|
@@ -188,15 +188,15 @@ var SidebarTree = memo(function SidebarTree2({
|
|
|
188
188
|
}) {
|
|
189
189
|
const { locale } = page;
|
|
190
190
|
const tree = root.tree(locale);
|
|
191
|
-
const snapshot =
|
|
192
|
-
const selectedItem =
|
|
193
|
-
const label =
|
|
194
|
-
const icon =
|
|
195
|
-
const i18n =
|
|
191
|
+
const snapshot = useAtomValueRaw(tree.snapshot);
|
|
192
|
+
const selectedItem = useAtomValueRaw(tree.selectedItem);
|
|
193
|
+
const label = useAtomValueRaw(root.label);
|
|
194
|
+
const icon = useAtomValueRaw(root.icon);
|
|
195
|
+
const i18n = useAtomValueRaw(root.i18n);
|
|
196
196
|
const setRoute = useSetAtom(routeAtom);
|
|
197
197
|
const setExpandedKeys = useSetAtom(tree.expandedKeys);
|
|
198
198
|
const [collapsed, setCollapsed] = useAtom(tree.collapsedKeys);
|
|
199
|
-
const dragDisabled =
|
|
199
|
+
const dragDisabled = useAtomValueRaw(root.dragDisabled);
|
|
200
200
|
const getItems = useSetAtom(root.getItems);
|
|
201
201
|
const getDropOperation = useSetAtom(root.getDropOperation);
|
|
202
202
|
const drop = useSetAtom(root.onDrop);
|
|
@@ -328,13 +328,13 @@ var SidebarTreeExplorer = memo(function SidebarTreeExplorer2({
|
|
|
328
328
|
tree
|
|
329
329
|
}) {
|
|
330
330
|
const [locale, setLocale] = useAtom(selectedLocale);
|
|
331
|
-
const label =
|
|
332
|
-
const icon =
|
|
333
|
-
const i18n =
|
|
331
|
+
const label = useAtomValueRaw(root.label);
|
|
332
|
+
const icon = useAtomValueRaw(root.icon);
|
|
333
|
+
const i18n = useAtomValueRaw(root.i18n);
|
|
334
334
|
const setExpandedKeys = useSetAtom(tree.expandedKeys);
|
|
335
|
-
const snapshot =
|
|
336
|
-
const selectedItem =
|
|
337
|
-
const dragDisabled =
|
|
335
|
+
const snapshot = useAtomValueRaw(tree.snapshot);
|
|
336
|
+
const selectedItem = useAtomValueRaw(tree.selectedItem);
|
|
337
|
+
const dragDisabled = useAtomValueRaw(root.dragDisabled);
|
|
338
338
|
const getItems = useSetAtom(root.getItems);
|
|
339
339
|
const getDropOperation = useSetAtom(root.getDropOperation);
|
|
340
340
|
const drop = useSetAtom(root.onDrop);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WorkspaceInternal } from 'alinea/core/Workspace';
|
|
2
2
|
import type { Page } from 'alinea/dashboard/atoms/nav';
|
|
3
3
|
import type { RootAtoms } from 'alinea/dashboard/atoms/root';
|
|
4
|
-
import { type ComponentType } from 'react';
|
|
4
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
5
5
|
interface WorkspaceMenuProps {
|
|
6
6
|
canManageMembers: boolean;
|
|
7
7
|
page: Page;
|
|
@@ -13,12 +13,19 @@ interface WorkspaceMenuProps {
|
|
|
13
13
|
interface WorkspaceAvatarProps {
|
|
14
14
|
color: string;
|
|
15
15
|
icon?: ComponentType;
|
|
16
|
-
size?: 'default' | 'small';
|
|
16
|
+
size?: 'default' | 'large' | 'small';
|
|
17
17
|
}
|
|
18
18
|
declare function WorkspaceAvatar({ color, icon, size }: WorkspaceAvatarProps): import("react").JSX.Element;
|
|
19
19
|
export { WorkspaceAvatar };
|
|
20
20
|
interface WorkspaceAvatarMenuProps {
|
|
21
21
|
page: Page;
|
|
22
|
+
root: RootAtoms;
|
|
23
|
+
}
|
|
24
|
+
export declare function WorkspaceAvatarMenu({ page, root }: WorkspaceAvatarMenuProps): import("react").JSX.Element;
|
|
25
|
+
interface GlobalSearchProps {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
initialSearchScope?: 'everything' | 'workspace';
|
|
28
|
+
root: RootAtoms;
|
|
22
29
|
}
|
|
23
|
-
export declare function
|
|
30
|
+
export declare function GlobalSearch({ children, initialSearchScope, root }: GlobalSearchProps): import("react").JSX.Element;
|
|
24
31
|
export declare function WorkspaceMenu({ canManageMembers, page, root, workspace }: WorkspaceMenuProps): import("react").JSX.Element;
|
|
@@ -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
|
$7705c033048f6da7$export$353f5b6fc5456de1
|
|
8
8
|
} from "../../chunks/chunk-VXZM6V4P.js";
|
|
@@ -47,22 +47,24 @@ import {
|
|
|
47
47
|
|
|
48
48
|
// src/dashboard/app/WorkspaceMenu.module.css
|
|
49
49
|
var WorkspaceMenu_default = {
|
|
50
|
-
"WorkspaceMenu-
|
|
51
|
-
"
|
|
52
|
-
"WorkspaceMenu-avatar-logo": "alinea-WorkspaceMenu-avatar-logo",
|
|
53
|
-
"WorkspaceMenuAvatarLogo": "alinea-WorkspaceMenu-avatar-logo",
|
|
50
|
+
"WorkspaceMenu-trigger-text": "alinea-WorkspaceMenu-trigger-text",
|
|
51
|
+
"WorkspaceMenuTriggerText": "alinea-WorkspaceMenu-trigger-text",
|
|
54
52
|
"WorkspaceMenu-avatarTrigger": "alinea-WorkspaceMenu-avatarTrigger",
|
|
55
53
|
"WorkspaceMenuAvatarTrigger": "alinea-WorkspaceMenu-avatarTrigger",
|
|
56
|
-
"WorkspaceMenu-menuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
57
|
-
"WorkspaceMenuMenuItemIcon": "alinea-WorkspaceMenu-menuItemIcon",
|
|
58
54
|
"WorkspaceMenu-trigger": "alinea-WorkspaceMenu-trigger",
|
|
59
55
|
"WorkspaceMenuTrigger": "alinea-WorkspaceMenu-trigger",
|
|
60
56
|
"WorkspaceMenu-search": "alinea-WorkspaceMenu-search",
|
|
61
57
|
"WorkspaceMenuSearch": "alinea-WorkspaceMenu-search",
|
|
62
|
-
"WorkspaceMenu-
|
|
63
|
-
"
|
|
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",
|
|
62
|
+
"WorkspaceMenu-avatar": "alinea-WorkspaceMenu-avatar",
|
|
63
|
+
"WorkspaceMenuAvatar": "alinea-WorkspaceMenu-avatar",
|
|
64
64
|
"WorkspaceMenu-parent": "alinea-WorkspaceMenu-parent",
|
|
65
|
-
"WorkspaceMenuParent": "alinea-WorkspaceMenu-parent"
|
|
65
|
+
"WorkspaceMenuParent": "alinea-WorkspaceMenu-parent",
|
|
66
|
+
"WorkspaceMenu-avatar-large": "alinea-WorkspaceMenu-avatar-large",
|
|
67
|
+
"WorkspaceMenuAvatarLarge": "alinea-WorkspaceMenu-avatar-large"
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
// src/dashboard/app/WorkspaceMenu.tsx
|
|
@@ -90,7 +92,7 @@ function WorkspaceSelectorMenu({
|
|
|
90
92
|
popoverProps
|
|
91
93
|
}) {
|
|
92
94
|
const setRoute = useSetAtom(routeAtom);
|
|
93
|
-
const workspaces =
|
|
95
|
+
const workspaces = useAtomValueRaw(workspacesAtom);
|
|
94
96
|
if (workspaces.length <= 1 && !includeUsersLink) return label;
|
|
95
97
|
return /* @__PURE__ */ jsxs(
|
|
96
98
|
Menu,
|
|
@@ -125,35 +127,46 @@ function WorkspaceSelectorMenu({
|
|
|
125
127
|
}
|
|
126
128
|
);
|
|
127
129
|
}
|
|
128
|
-
function WorkspaceAvatarMenu({ page }) {
|
|
129
|
-
const workspace =
|
|
130
|
+
function WorkspaceAvatarMenu({ page, root }) {
|
|
131
|
+
const workspace = useAtomValueRaw(workspaceAtom(page.workspace));
|
|
132
|
+
const workspaces = useAtomValueRaw(workspacesAtom);
|
|
133
|
+
const setRoute = useSetAtom(routeAtom);
|
|
134
|
+
const setExplorerLocale = useSetAtom(root.explorer.selectedLocale);
|
|
135
|
+
const avatar = /* @__PURE__ */ jsx(
|
|
136
|
+
WorkspaceAvatar,
|
|
137
|
+
{
|
|
138
|
+
color: workspace.color,
|
|
139
|
+
icon: workspace.icon,
|
|
140
|
+
size: "small"
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
if (workspaces.length <= 1) {
|
|
144
|
+
return /* @__PURE__ */ jsx(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
className: styles.WorkspaceMenu.avatarTrigger(),
|
|
148
|
+
"aria-label": workspace.label,
|
|
149
|
+
children: avatar
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function showWorkspaces() {
|
|
154
|
+
setExplorerLocale(page.locale);
|
|
155
|
+
setRoute({ page: "splash" });
|
|
156
|
+
}
|
|
130
157
|
return /* @__PURE__ */ jsx(
|
|
131
|
-
|
|
158
|
+
Button,
|
|
132
159
|
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
label:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
size: "icon-nav",
|
|
140
|
-
appearance: "plain",
|
|
141
|
-
className: styles.WorkspaceMenu.avatarTrigger(),
|
|
142
|
-
"aria-label": workspace.label,
|
|
143
|
-
children: /* @__PURE__ */ jsx(
|
|
144
|
-
WorkspaceAvatar,
|
|
145
|
-
{
|
|
146
|
-
color: workspace.color,
|
|
147
|
-
icon: workspace.icon,
|
|
148
|
-
size: "small"
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
)
|
|
160
|
+
size: "icon-nav",
|
|
161
|
+
appearance: "plain",
|
|
162
|
+
className: styles.WorkspaceMenu.avatarTrigger(),
|
|
163
|
+
"aria-label": "Back to workspaces",
|
|
164
|
+
onPress: showWorkspaces,
|
|
165
|
+
children: avatar
|
|
153
166
|
}
|
|
154
167
|
);
|
|
155
168
|
}
|
|
156
|
-
function SearchPopup({ root }) {
|
|
169
|
+
function SearchPopup({ initialSearchScope, root }) {
|
|
157
170
|
const modal = useDashboardModal();
|
|
158
171
|
const setRoute = useSetAtom(routeAtom);
|
|
159
172
|
const [explorer] = useState(
|
|
@@ -164,7 +177,7 @@ function SearchPopup({ root }) {
|
|
|
164
177
|
autoSelectFirstItem: true,
|
|
165
178
|
breadcrumbs: true,
|
|
166
179
|
enableNavigation: true,
|
|
167
|
-
|
|
180
|
+
initialSearchScope,
|
|
168
181
|
mode: "search",
|
|
169
182
|
rootData: root.data,
|
|
170
183
|
searchDepth: "all",
|
|
@@ -181,7 +194,7 @@ function SearchPopup({ root }) {
|
|
|
181
194
|
}
|
|
182
195
|
)
|
|
183
196
|
);
|
|
184
|
-
const explorerPage =
|
|
197
|
+
const explorerPage = useAtomValueRaw(explorer.page);
|
|
185
198
|
if (!explorerPage)
|
|
186
199
|
return /* @__PURE__ */ jsx(
|
|
187
200
|
DashboardModalDialog,
|
|
@@ -204,13 +217,36 @@ function SearchPopup({ root }) {
|
|
|
204
217
|
/* @__PURE__ */ jsx(ExplorerBody, { explorer, page: explorerPage })
|
|
205
218
|
] }) }) });
|
|
206
219
|
}
|
|
220
|
+
function GlobalSearch({
|
|
221
|
+
children,
|
|
222
|
+
initialSearchScope,
|
|
223
|
+
root
|
|
224
|
+
}) {
|
|
225
|
+
return /* @__PURE__ */ jsxs(DialogTrigger, { children: [
|
|
226
|
+
children,
|
|
227
|
+
/* @__PURE__ */ jsx(DashboardModal, { size: "explorer", children: /* @__PURE__ */ jsx(
|
|
228
|
+
Suspense,
|
|
229
|
+
{
|
|
230
|
+
fallback: /* @__PURE__ */ jsx(
|
|
231
|
+
DashboardModalDialog,
|
|
232
|
+
{
|
|
233
|
+
"aria-label": "Search entries",
|
|
234
|
+
variant: "explorer",
|
|
235
|
+
isLoading: true
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
children: /* @__PURE__ */ jsx(SearchPopup, { initialSearchScope, root })
|
|
239
|
+
}
|
|
240
|
+
) })
|
|
241
|
+
] });
|
|
242
|
+
}
|
|
207
243
|
function WorkspaceMenu({
|
|
208
244
|
canManageMembers,
|
|
209
245
|
page,
|
|
210
246
|
root,
|
|
211
247
|
workspace
|
|
212
248
|
}) {
|
|
213
|
-
const workspaces =
|
|
249
|
+
const workspaces = useAtomValueRaw(workspacesAtom);
|
|
214
250
|
const menu = workspaces.length > 1 ? /* @__PURE__ */ jsx(
|
|
215
251
|
WorkspaceSelectorMenu,
|
|
216
252
|
{
|
|
@@ -225,39 +261,24 @@ function WorkspaceMenu({
|
|
|
225
261
|
) : /* @__PURE__ */ jsx("div", { className: styles.WorkspaceMenu.trigger(), children: /* @__PURE__ */ jsx("span", { className: styles.WorkspaceMenu.trigger.text(), children: workspace.label }) });
|
|
226
262
|
return /* @__PURE__ */ jsxs("div", { className: styles.WorkspaceMenu.parent(), children: [
|
|
227
263
|
menu,
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ jsx(DashboardModal, { size: "explorer", children: /* @__PURE__ */ jsx(
|
|
240
|
-
Suspense,
|
|
241
|
-
{
|
|
242
|
-
fallback: /* @__PURE__ */ jsx(
|
|
243
|
-
DashboardModalDialog,
|
|
244
|
-
{
|
|
245
|
-
"aria-label": "Search entries",
|
|
246
|
-
variant: "explorer",
|
|
247
|
-
isLoading: true
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
children: /* @__PURE__ */ jsx(SearchPopup, { root })
|
|
251
|
-
}
|
|
252
|
-
) })
|
|
253
|
-
] })
|
|
264
|
+
/* @__PURE__ */ jsx(GlobalSearch, { root, children: /* @__PURE__ */ jsx(
|
|
265
|
+
Button,
|
|
266
|
+
{
|
|
267
|
+
size: "icon",
|
|
268
|
+
appearance: "plain",
|
|
269
|
+
className: styles.WorkspaceMenu.search(),
|
|
270
|
+
"aria-label": "Search entries",
|
|
271
|
+
children: /* @__PURE__ */ jsx(IconComp, { icon: IcRoundSearch, "data-slot": "icon" })
|
|
272
|
+
}
|
|
273
|
+
) })
|
|
254
274
|
] });
|
|
255
275
|
}
|
|
256
276
|
function WorkspaceItem({ workspace }) {
|
|
257
|
-
const data =
|
|
277
|
+
const data = useAtomValueRaw(workspaceAtom(workspace));
|
|
258
278
|
return /* @__PURE__ */ jsx(MenuItem, { id: workspace, textValue: data.label, children: data.label }, workspace);
|
|
259
279
|
}
|
|
260
280
|
export {
|
|
281
|
+
GlobalSearch,
|
|
261
282
|
WorkspaceAvatar,
|
|
262
283
|
WorkspaceAvatarMenu,
|
|
263
284
|
WorkspaceMenu
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare function GlobalSearchStory(): import("react").JSX.Element;
|
|
2
|
+
export declare function SingleWorkspaceAvatarStory(): import("react").JSX.Element;
|
|
3
|
+
export declare function LocalizedGlobalSearchStory(): import("react").JSX.Element;
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
4
6
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Page } from 'alinea/dashboard/atoms/nav';
|
|
2
|
+
import { type RootAtoms } from 'alinea/dashboard/atoms/root';
|
|
2
3
|
export interface WorkspaceRootsProps {
|
|
3
4
|
canManageMembers: boolean;
|
|
4
5
|
page: Page;
|
|
6
|
+
root: RootAtoms;
|
|
5
7
|
}
|
|
6
|
-
export declare function WorkspaceRoots({ canManageMembers, page }: WorkspaceRootsProps): import("react").JSX.Element;
|
|
8
|
+
export declare function WorkspaceRoots({ canManageMembers, page, root: currentRoot }: WorkspaceRootsProps): import("react").JSX.Element;
|