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,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": "alinea-EntryHeader",
|
|
44
45
|
"EntryHeader-actions": "alinea-EntryHeader-actions",
|
|
45
46
|
"EntryHeaderActions": "alinea-EntryHeader-actions",
|
|
46
|
-
"EntryHeader": "alinea-EntryHeader",
|
|
47
|
-
"
|
|
48
|
-
"EntryHeaderTitle": "alinea-EntryHeader-title",
|
|
47
|
+
"EntryHeader-status": "alinea-EntryHeader-status",
|
|
48
|
+
"EntryHeaderStatus": "alinea-EntryHeader-status",
|
|
49
49
|
"is-dirty": "alinea-is-dirty",
|
|
50
50
|
"isDirty": "alinea-is-dirty",
|
|
51
|
-
"EntryHeader-
|
|
52
|
-
"
|
|
53
|
-
"EntryHeader-main": "alinea-EntryHeader-main",
|
|
54
|
-
"EntryHeaderMain": "alinea-EntryHeader-main",
|
|
51
|
+
"EntryHeader-content": "alinea-EntryHeader-content",
|
|
52
|
+
"EntryHeaderContent": "alinea-EntryHeader-content",
|
|
55
53
|
"EntryHeader-sidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
56
54
|
"EntryHeaderSidebarToggle": "alinea-EntryHeader-sidebarToggle",
|
|
57
|
-
"EntryHeader-
|
|
58
|
-
"
|
|
59
|
-
"EntryHeader-
|
|
60
|
-
"
|
|
55
|
+
"EntryHeader-main": "alinea-EntryHeader-main",
|
|
56
|
+
"EntryHeaderMain": "alinea-EntryHeader-main",
|
|
57
|
+
"EntryHeader-type": "alinea-EntryHeader-type",
|
|
58
|
+
"EntryHeaderType": "alinea-EntryHeader-type",
|
|
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-trailing": "alinea-EntryReferences-trailing",
|
|
30
|
-
"EntryReferencesTrailing": "alinea-EntryReferences-trailing",
|
|
31
29
|
"EntryReferences-other": "alinea-EntryReferences-other",
|
|
32
30
|
"EntryReferencesOther": "alinea-EntryReferences-other",
|
|
33
|
-
"EntryReferences-
|
|
34
|
-
"
|
|
35
|
-
"EntryReferences-list": "alinea-EntryReferences-list",
|
|
36
|
-
"EntryReferencesList": "alinea-EntryReferences-list",
|
|
31
|
+
"EntryReferences-loadingText": "alinea-EntryReferences-loadingText",
|
|
32
|
+
"EntryReferencesLoadingText": "alinea-EntryReferences-loadingText",
|
|
37
33
|
"EntryReferences-pendingText": "alinea-EntryReferences-pendingText",
|
|
38
34
|
"EntryReferencesPendingText": "alinea-EntryReferences-pendingText",
|
|
35
|
+
"EntryReferences-list": "alinea-EntryReferences-list",
|
|
36
|
+
"EntryReferencesList": "alinea-EntryReferences-list",
|
|
37
|
+
"EntryReferences-trailing": "alinea-EntryReferences-trailing",
|
|
38
|
+
"EntryReferencesTrailing": "alinea-EntryReferences-trailing",
|
|
39
39
|
"EntryReferences-pending": "alinea-EntryReferences-pending",
|
|
40
40
|
"EntryReferencesPending": "alinea-EntryReferences-pending",
|
|
41
|
-
"EntryReferences": "alinea-EntryReferences",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
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-previewPanel": "alinea-EntrySidebar-previewPanel",
|
|
51
|
+
"EntrySidebarPreviewPanel": "alinea-EntrySidebar-previewPanel",
|
|
50
52
|
"EntrySidebar-history": "alinea-EntrySidebar-history",
|
|
51
53
|
"EntrySidebarHistory": "alinea-EntrySidebar-history",
|
|
54
|
+
"EntrySidebar-historyPanel": "alinea-EntrySidebar-historyPanel",
|
|
55
|
+
"EntrySidebarHistoryPanel": "alinea-EntrySidebar-historyPanel",
|
|
56
|
+
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
57
|
+
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
58
|
+
"EntrySidebar-header": "alinea-EntrySidebar-header",
|
|
59
|
+
"EntrySidebarHeader": "alinea-EntrySidebar-header",
|
|
52
60
|
"EntrySidebar-disclosure": "alinea-EntrySidebar-disclosure",
|
|
53
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",
|
|
54
66
|
"EntrySidebar-disclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
55
67
|
"EntrySidebarDisclosurePanel": "alinea-EntrySidebar-disclosurePanel",
|
|
56
|
-
"EntrySidebar-previewPanel": "alinea-EntrySidebar-previewPanel",
|
|
57
|
-
"EntrySidebarPreviewPanel": "alinea-EntrySidebar-previewPanel",
|
|
58
68
|
"EntrySidebar-sectionTitle": "alinea-EntrySidebar-sectionTitle",
|
|
59
69
|
"EntrySidebarSectionTitle": "alinea-EntrySidebar-sectionTitle",
|
|
60
|
-
"EntrySidebar-section": "alinea-EntrySidebar-section",
|
|
61
|
-
"EntrySidebarSection": "alinea-EntrySidebar-section",
|
|
62
|
-
"EntrySidebar-historyPanel": "alinea-EntrySidebar-historyPanel",
|
|
63
|
-
"EntrySidebarHistoryPanel": "alinea-EntrySidebar-historyPanel",
|
|
64
|
-
"EntrySidebar-header": "alinea-EntrySidebar-header",
|
|
65
|
-
"EntrySidebarHeader": "alinea-EntrySidebar-header",
|
|
66
|
-
"EntrySidebar-referencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
67
|
-
"EntrySidebarReferencesPanel": "alinea-EntrySidebar-referencesPanel",
|
|
68
70
|
"EntrySidebar-body": "alinea-EntrySidebar-body",
|
|
69
|
-
"EntrySidebarBody": "alinea-EntrySidebar-body"
|
|
70
|
-
"EntrySidebar-tabs": "alinea-EntrySidebar-tabs",
|
|
71
|
-
"EntrySidebarTabs": "alinea-EntrySidebar-tabs"
|
|
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
|
);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
useAtomValueRaw,
|
|
3
|
+
useAtomValueRawSync,
|
|
3
4
|
useSetAtom
|
|
4
|
-
} from "../../chunks/chunk-
|
|
5
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
5
6
|
import {
|
|
6
7
|
atom
|
|
7
|
-
} from "../../chunks/chunk-
|
|
8
|
+
} from "../../chunks/chunk-CFNRVI3Y.js";
|
|
8
9
|
import {
|
|
9
10
|
styler
|
|
10
11
|
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
@@ -25,23 +26,23 @@ import {
|
|
|
25
26
|
|
|
26
27
|
// src/dashboard/app/EntrySidebarPreview.module.css
|
|
27
28
|
var EntrySidebarPreview_default = {
|
|
28
|
-
"EntrySidebarPreview": "alinea-EntrySidebarPreview",
|
|
29
|
-
"EntrySidebarPreview-browserMessage": "alinea-EntrySidebarPreview-browserMessage",
|
|
30
|
-
"EntrySidebarPreviewBrowserMessage": "alinea-EntrySidebarPreview-browserMessage",
|
|
31
|
-
"EntrySidebarPreview-loading": "alinea-EntrySidebarPreview-loading",
|
|
32
|
-
"EntrySidebarPreviewLoading": "alinea-EntrySidebarPreview-loading",
|
|
33
|
-
"EntrySidebarPreview-component": "alinea-EntrySidebarPreview-component",
|
|
34
|
-
"EntrySidebarPreviewComponent": "alinea-EntrySidebarPreview-component",
|
|
35
29
|
"EntrySidebarPreview-empty": "alinea-EntrySidebarPreview-empty",
|
|
36
30
|
"EntrySidebarPreviewEmpty": "alinea-EntrySidebarPreview-empty",
|
|
37
|
-
"EntrySidebarPreview-iframe": "alinea-EntrySidebarPreview-iframe",
|
|
38
|
-
"EntrySidebarPreviewIframe": "alinea-EntrySidebarPreview-iframe",
|
|
39
|
-
"EntrySidebarPreview-subheader": "alinea-EntrySidebarPreview-subheader",
|
|
40
|
-
"EntrySidebarPreviewSubheader": "alinea-EntrySidebarPreview-subheader",
|
|
41
31
|
"EntrySidebarPreview-controls": "alinea-EntrySidebarPreview-controls",
|
|
42
32
|
"EntrySidebarPreviewControls": "alinea-EntrySidebarPreview-controls",
|
|
43
33
|
"EntrySidebarPreview-browser": "alinea-EntrySidebarPreview-browser",
|
|
44
|
-
"EntrySidebarPreviewBrowser": "alinea-EntrySidebarPreview-browser"
|
|
34
|
+
"EntrySidebarPreviewBrowser": "alinea-EntrySidebarPreview-browser",
|
|
35
|
+
"EntrySidebarPreview-subheader": "alinea-EntrySidebarPreview-subheader",
|
|
36
|
+
"EntrySidebarPreviewSubheader": "alinea-EntrySidebarPreview-subheader",
|
|
37
|
+
"EntrySidebarPreview-loading": "alinea-EntrySidebarPreview-loading",
|
|
38
|
+
"EntrySidebarPreviewLoading": "alinea-EntrySidebarPreview-loading",
|
|
39
|
+
"EntrySidebarPreview-browserMessage": "alinea-EntrySidebarPreview-browserMessage",
|
|
40
|
+
"EntrySidebarPreviewBrowserMessage": "alinea-EntrySidebarPreview-browserMessage",
|
|
41
|
+
"EntrySidebarPreview": "alinea-EntrySidebarPreview",
|
|
42
|
+
"EntrySidebarPreview-iframe": "alinea-EntrySidebarPreview-iframe",
|
|
43
|
+
"EntrySidebarPreviewIframe": "alinea-EntrySidebarPreview-iframe",
|
|
44
|
+
"EntrySidebarPreview-component": "alinea-EntrySidebarPreview-component",
|
|
45
|
+
"EntrySidebarPreviewComponent": "alinea-EntrySidebarPreview-component"
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
// src/dashboard/app/EntrySidebarPreview.tsx
|
|
@@ -52,7 +53,7 @@ function EntrySidebarPreview({
|
|
|
52
53
|
entry,
|
|
53
54
|
localeData
|
|
54
55
|
}) {
|
|
55
|
-
const preview =
|
|
56
|
+
const preview = useAtomValueRaw(entry.preview);
|
|
56
57
|
if (!preview)
|
|
57
58
|
return /* @__PURE__ */ jsx(EntrySidebarPreviewMessage, { title: "No preview", children: "This entry has no preview." });
|
|
58
59
|
if (preview === true)
|
|
@@ -63,7 +64,7 @@ function EntrySidebarComponentPreview({
|
|
|
63
64
|
localeData,
|
|
64
65
|
preview: Component
|
|
65
66
|
}) {
|
|
66
|
-
const previewEntry =
|
|
67
|
+
const previewEntry = useAtomValueRaw(localeData.previewEntry);
|
|
67
68
|
if (!previewEntry)
|
|
68
69
|
return /* @__PURE__ */ jsx(EntrySidebarPreviewMessage, { title: "Preview unavailable", children: "Preview is currently unavailable." });
|
|
69
70
|
return /* @__PURE__ */ jsx("div", { className: styles.EntrySidebarPreview(), children: /* @__PURE__ */ jsx("div", { className: styles.EntrySidebarPreview.component(), children: /* @__PURE__ */ jsx(Component, { entry: previewEntry }) }) });
|
|
@@ -134,12 +135,12 @@ function EntrySidebarBrowserPreviewHeader({
|
|
|
134
135
|
function EntrySidebarBrowserPreview({
|
|
135
136
|
localeData
|
|
136
137
|
}) {
|
|
137
|
-
const [previewUrlPending, previewUrl] =
|
|
138
|
+
const [previewUrlPending, previewUrl] = useAtomValueRawSync(
|
|
138
139
|
localeData.previewUrlState
|
|
139
140
|
);
|
|
140
141
|
const retryPreviewUrl = useSetAtom(localeData.retryPreviewUrl);
|
|
141
142
|
const payloadSignalAtom = localeData.previewPayloadSignal;
|
|
142
|
-
const payloadSignal =
|
|
143
|
+
const payloadSignal = useAtomValueRaw(
|
|
143
144
|
payloadSignalAtom ?? emptyPayloadSignalAtom
|
|
144
145
|
);
|
|
145
146
|
const updatePreviewPayload = useSetAtom(
|
|
@@ -9,15 +9,15 @@ import { memo } from "react";
|
|
|
9
9
|
|
|
10
10
|
// src/dashboard/app/EntryTranslationBanner.module.css
|
|
11
11
|
var EntryTranslationBanner_default = {
|
|
12
|
-
"EntryTranslationBanner-
|
|
13
|
-
"
|
|
12
|
+
"EntryTranslationBanner-label": "alinea-EntryTranslationBanner-label",
|
|
13
|
+
"EntryTranslationBannerLabel": "alinea-EntryTranslationBanner-label",
|
|
14
|
+
"EntryTranslationBanner": "alinea-EntryTranslationBanner",
|
|
14
15
|
"EntryTranslationBanner-message": "alinea-EntryTranslationBanner-message",
|
|
15
16
|
"EntryTranslationBannerMessage": "alinea-EntryTranslationBanner-message",
|
|
16
17
|
"EntryTranslationBanner-actions": "alinea-EntryTranslationBanner-actions",
|
|
17
18
|
"EntryTranslationBannerActions": "alinea-EntryTranslationBanner-actions",
|
|
18
|
-
"EntryTranslationBanner": "alinea-EntryTranslationBanner",
|
|
19
|
-
"
|
|
20
|
-
"EntryTranslationBannerLabel": "alinea-EntryTranslationBanner-label",
|
|
19
|
+
"EntryTranslationBanner-body": "alinea-EntryTranslationBanner-body",
|
|
20
|
+
"EntryTranslationBannerBody": "alinea-EntryTranslationBanner-body",
|
|
21
21
|
"EntryTranslationBanner-select": "alinea-EntryTranslationBanner-select",
|
|
22
22
|
"EntryTranslationBannerSelect": "alinea-EntryTranslationBanner-select",
|
|
23
23
|
"EntryTranslationBanner-title": "alinea-EntryTranslationBanner-title",
|
|
@@ -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
|
$b325d7bd7e74496a$export$6fb4a10d2c950550,
|
|
9
9
|
$f2ff30fde7b014be$export$2e1e1122cf0cba88
|
|
@@ -60,65 +60,65 @@ import { EditorBackButton } from "./EditorBackButton.js";
|
|
|
60
60
|
|
|
61
61
|
// src/dashboard/app/Explorer.module.css
|
|
62
62
|
var Explorer_default = {
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"Explorer-
|
|
66
|
-
"
|
|
63
|
+
"is-navigation": "alinea-is-navigation",
|
|
64
|
+
"isNavigation": "alinea-is-navigation",
|
|
65
|
+
"Explorer-toolbar-mediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
66
|
+
"ExplorerToolbarMediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
67
|
+
"ExplorerHeader-content": "alinea-ExplorerHeader-content",
|
|
68
|
+
"ExplorerHeaderContent": "alinea-ExplorerHeader-content",
|
|
67
69
|
"Explorer-locationBreadcrumbs": "alinea-Explorer-locationBreadcrumbs",
|
|
68
70
|
"ExplorerLocationBreadcrumbs": "alinea-Explorer-locationBreadcrumbs",
|
|
71
|
+
"Explorer-locationBreadcrumbs-separator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
72
|
+
"ExplorerLocationBreadcrumbsSeparator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
73
|
+
"Explorer-locationBreadcrumbs-root-locale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
74
|
+
"ExplorerLocationBreadcrumbsRootLocale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
75
|
+
"Explorer-toolbar-tools": "alinea-Explorer-toolbar-tools",
|
|
76
|
+
"ExplorerToolbarTools": "alinea-Explorer-toolbar-tools",
|
|
77
|
+
"Explorer-locationBreadcrumbs-root": "alinea-Explorer-locationBreadcrumbs-root",
|
|
78
|
+
"ExplorerLocationBreadcrumbsRoot": "alinea-Explorer-locationBreadcrumbs-root",
|
|
79
|
+
"Explorer-locationBreadcrumbs-value": "alinea-Explorer-locationBreadcrumbs-value",
|
|
80
|
+
"ExplorerLocationBreadcrumbsValue": "alinea-Explorer-locationBreadcrumbs-value",
|
|
81
|
+
"ExplorerHeader-main": "alinea-ExplorerHeader-main",
|
|
82
|
+
"ExplorerHeaderMain": "alinea-ExplorerHeader-main",
|
|
83
|
+
"Explorer-resultMode": "alinea-Explorer-resultMode",
|
|
84
|
+
"ExplorerResultMode": "alinea-Explorer-resultMode",
|
|
85
|
+
"Explorer-actions": "alinea-Explorer-actions",
|
|
86
|
+
"ExplorerActions": "alinea-Explorer-actions",
|
|
87
|
+
"Popover-Label": "alinea-Popover-Label",
|
|
88
|
+
"PopoverLabel": "alinea-Popover-Label",
|
|
89
|
+
"ExplorerHeader": "alinea-ExplorerHeader",
|
|
69
90
|
"ExplorerHeader-location": "alinea-ExplorerHeader-location",
|
|
70
91
|
"ExplorerHeaderLocation": "alinea-ExplorerHeader-location",
|
|
71
|
-
"Sorting-button": "alinea-Sorting-button",
|
|
72
|
-
"SortingButton": "alinea-Sorting-button",
|
|
73
92
|
"Explorer-locationBreadcrumbs-localeValue": "alinea-Explorer-locationBreadcrumbs-localeValue",
|
|
74
93
|
"ExplorerLocationBreadcrumbsLocaleValue": "alinea-Explorer-locationBreadcrumbs-localeValue",
|
|
75
94
|
"Popover": "alinea-Popover",
|
|
95
|
+
"Explorer-searchSlot": "alinea-Explorer-searchSlot",
|
|
96
|
+
"ExplorerSearchSlot": "alinea-Explorer-searchSlot",
|
|
76
97
|
"Explorer-toolbar": "alinea-Explorer-toolbar",
|
|
77
98
|
"ExplorerToolbar": "alinea-Explorer-toolbar",
|
|
78
99
|
"Explorer-locationBreadcrumbs-parentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
79
100
|
"ExplorerLocationBreadcrumbsParentValue": "alinea-Explorer-locationBreadcrumbs-parentValue",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
101
|
+
"Explorer-locationBreadcrumbs-item": "alinea-Explorer-locationBreadcrumbs-item",
|
|
102
|
+
"ExplorerLocationBreadcrumbsItem": "alinea-Explorer-locationBreadcrumbs-item",
|
|
103
|
+
"ExplorerHeader-primary": "alinea-ExplorerHeader-primary",
|
|
104
|
+
"ExplorerHeaderPrimary": "alinea-ExplorerHeader-primary",
|
|
105
|
+
"ExplorerHeader-title": "alinea-ExplorerHeader-title",
|
|
106
|
+
"ExplorerHeaderTitle": "alinea-ExplorerHeader-title",
|
|
107
|
+
"Sorting-button": "alinea-Sorting-button",
|
|
108
|
+
"SortingButton": "alinea-Sorting-button",
|
|
109
|
+
"Explorer-locationBreadcrumbs-current": "alinea-Explorer-locationBreadcrumbs-current",
|
|
110
|
+
"ExplorerLocationBreadcrumbsCurrent": "alinea-Explorer-locationBreadcrumbs-current",
|
|
111
|
+
"Explorer": "alinea-Explorer",
|
|
87
112
|
"Explorer-breadcrumbs": "alinea-Explorer-breadcrumbs",
|
|
88
113
|
"ExplorerBreadcrumbs": "alinea-Explorer-breadcrumbs",
|
|
89
|
-
"Explorer-locationBreadcrumbs-parentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
90
|
-
"ExplorerLocationBreadcrumbsParentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
91
114
|
"Explorer-search": "alinea-Explorer-search",
|
|
92
115
|
"ExplorerSearch": "alinea-Explorer-search",
|
|
93
|
-
"Popover-Label": "alinea-Popover-Label",
|
|
94
|
-
"PopoverLabel": "alinea-Popover-Label",
|
|
95
|
-
"Explorer": "alinea-Explorer",
|
|
96
|
-
"Explorer-searchSlot": "alinea-Explorer-searchSlot",
|
|
97
|
-
"ExplorerSearchSlot": "alinea-Explorer-searchSlot",
|
|
98
|
-
"ExplorerHeader-main": "alinea-ExplorerHeader-main",
|
|
99
|
-
"ExplorerHeaderMain": "alinea-ExplorerHeader-main",
|
|
100
|
-
"is-navigation": "alinea-is-navigation",
|
|
101
|
-
"isNavigation": "alinea-is-navigation",
|
|
102
116
|
"Explorer-searchScope": "alinea-Explorer-searchScope",
|
|
103
117
|
"ExplorerSearchScope": "alinea-Explorer-searchScope",
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"Explorer-actions": "alinea-Explorer-actions",
|
|
107
|
-
"ExplorerActions": "alinea-Explorer-actions",
|
|
108
|
-
"Explorer-locationBreadcrumbs-root-locale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
109
|
-
"ExplorerLocationBreadcrumbsRootLocale": "alinea-Explorer-locationBreadcrumbs-root-locale",
|
|
110
|
-
"Explorer-locationBreadcrumbs-value": "alinea-Explorer-locationBreadcrumbs-value",
|
|
111
|
-
"ExplorerLocationBreadcrumbsValue": "alinea-Explorer-locationBreadcrumbs-value",
|
|
118
|
+
"Explorer-locationBreadcrumbs-parentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
119
|
+
"ExplorerLocationBreadcrumbsParentAction": "alinea-Explorer-locationBreadcrumbs-parentAction",
|
|
112
120
|
"Explorer-viewport": "alinea-Explorer-viewport",
|
|
113
|
-
"ExplorerViewport": "alinea-Explorer-viewport"
|
|
114
|
-
"Explorer-locationBreadcrumbs-item": "alinea-Explorer-locationBreadcrumbs-item",
|
|
115
|
-
"ExplorerLocationBreadcrumbsItem": "alinea-Explorer-locationBreadcrumbs-item",
|
|
116
|
-
"Explorer-toolbar-mediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
117
|
-
"ExplorerToolbarMediaActions": "alinea-Explorer-toolbar-mediaActions",
|
|
118
|
-
"Explorer-locationBreadcrumbs-separator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
119
|
-
"ExplorerLocationBreadcrumbsSeparator": "alinea-Explorer-locationBreadcrumbs-separator",
|
|
120
|
-
"ExplorerHeader-title": "alinea-ExplorerHeader-title",
|
|
121
|
-
"ExplorerHeaderTitle": "alinea-ExplorerHeader-title"
|
|
121
|
+
"ExplorerViewport": "alinea-Explorer-viewport"
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
// src/dashboard/app/Explorer.tsx
|
|
@@ -136,7 +136,7 @@ function ExplorerSearch({
|
|
|
136
136
|
}) {
|
|
137
137
|
const items = page.items;
|
|
138
138
|
const [selection, setSelection] = useAtom(explorer.selection);
|
|
139
|
-
const search =
|
|
139
|
+
const search = useAtomValueRaw(explorer.search);
|
|
140
140
|
const setSearch = useSetAtom(explorer.search);
|
|
141
141
|
const performAction = useSetAtom(explorer.onAction);
|
|
142
142
|
const [inputValue, setInputValue] = useState(search);
|
|
@@ -205,7 +205,7 @@ function ExplorerSearch({
|
|
|
205
205
|
autoFocus,
|
|
206
206
|
className: styles.Explorer.search(),
|
|
207
207
|
hasIcon: true,
|
|
208
|
-
isPending,
|
|
208
|
+
isPending: isPending || inputValue !== page.search,
|
|
209
209
|
placeholder: "Search...",
|
|
210
210
|
value: inputValue,
|
|
211
211
|
onChange: onSearchChange,
|
|
@@ -217,7 +217,7 @@ function ExplorerSearchScope({ explorer, page }) {
|
|
|
217
217
|
const searchScope = page.searchScope;
|
|
218
218
|
const setSearchScope = useSetAtom(explorer.searchScope);
|
|
219
219
|
const resultMode = page.resultMode;
|
|
220
|
-
const canSearchEverything =
|
|
220
|
+
const canSearchEverything = useAtomValueRaw(explorer.canSearchEverything);
|
|
221
221
|
const [, startTransition] = useTransition();
|
|
222
222
|
if (!explorer.allowAllWorkspaces) return null;
|
|
223
223
|
const isDisabled = !canSearchEverything || explorer.mode !== "search" && resultMode !== "matches";
|
|
@@ -241,7 +241,7 @@ function ExplorerResultMode({
|
|
|
241
241
|
}) {
|
|
242
242
|
const resultMode = page.resultMode;
|
|
243
243
|
const setResultMode = useSetAtom(explorer.resultMode);
|
|
244
|
-
const search =
|
|
244
|
+
const search = useAtomValueRaw(explorer.search);
|
|
245
245
|
const [, startTransition] = useTransition();
|
|
246
246
|
const canShowFiltered = explorer.pickChildren || explorer.hasCondition || Boolean(search.trim());
|
|
247
247
|
const canBrowse = navigationEnabled && !explorer.pickChildren && !search.trim();
|
|
@@ -279,8 +279,8 @@ function ExplorerHeaderLoadedParentMain({
|
|
|
279
279
|
explorer,
|
|
280
280
|
titleControls
|
|
281
281
|
}) {
|
|
282
|
-
const label =
|
|
283
|
-
const parents =
|
|
282
|
+
const label = useAtomValueRaw(data.label);
|
|
283
|
+
const parents = useAtomValueRaw(data.parents);
|
|
284
284
|
const setLocation = useSetAtom(explorer.location);
|
|
285
285
|
const parent = parents.at(-1);
|
|
286
286
|
return /* @__PURE__ */ jsxs("div", { className: styles.ExplorerHeader.main(), children: [
|
|
@@ -306,7 +306,7 @@ function ExplorerHeaderMain({
|
|
|
306
306
|
page,
|
|
307
307
|
titleControls
|
|
308
308
|
}) {
|
|
309
|
-
const parent =
|
|
309
|
+
const parent = useAtomValueRaw(explorer.parent(page.location, page.locale));
|
|
310
310
|
if (headerEntry) {
|
|
311
311
|
return /* @__PURE__ */ jsxs("div", { className: styles.ExplorerHeader.main(), children: [
|
|
312
312
|
/* @__PURE__ */ jsx(
|
|
@@ -340,7 +340,7 @@ function ExplorerLocationParents({
|
|
|
340
340
|
lockNavigation,
|
|
341
341
|
parent
|
|
342
342
|
}) {
|
|
343
|
-
const { data } =
|
|
343
|
+
const { data } = useAtomValueRaw(parent.data);
|
|
344
344
|
if (!data) return null;
|
|
345
345
|
return /* @__PURE__ */ jsx(
|
|
346
346
|
ExplorerLoadedLocationParents,
|
|
@@ -358,7 +358,7 @@ function ExplorerLoadedLocationParents({
|
|
|
358
358
|
lockNavigation,
|
|
359
359
|
parent
|
|
360
360
|
}) {
|
|
361
|
-
const parents =
|
|
361
|
+
const parents = useAtomValueRaw(data.parents);
|
|
362
362
|
return [...parents, parent].map((entry, index, entries) => /* @__PURE__ */ jsx(
|
|
363
363
|
ExplorerLocationParent,
|
|
364
364
|
{
|
|
@@ -376,7 +376,7 @@ function ExplorerLocationParent({
|
|
|
376
376
|
explorer,
|
|
377
377
|
lockNavigation
|
|
378
378
|
}) {
|
|
379
|
-
const { data } =
|
|
379
|
+
const { data } = useAtomValueRaw(entry.data);
|
|
380
380
|
if (!data) return null;
|
|
381
381
|
return /* @__PURE__ */ jsx(
|
|
382
382
|
ExplorerLoadedLocationParent,
|
|
@@ -396,7 +396,7 @@ function ExplorerLoadedLocationParent({
|
|
|
396
396
|
explorer,
|
|
397
397
|
lockNavigation
|
|
398
398
|
}) {
|
|
399
|
-
const label =
|
|
399
|
+
const label = useAtomValueRaw(data.label);
|
|
400
400
|
const setLocation = useSetAtom(explorer.location);
|
|
401
401
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
402
402
|
/* @__PURE__ */ jsx(
|
|
@@ -429,13 +429,13 @@ function ExplorerLocationMenu({
|
|
|
429
429
|
lockNavigation = false,
|
|
430
430
|
page
|
|
431
431
|
}) {
|
|
432
|
-
const config =
|
|
432
|
+
const config = useAtomValueRaw(configAtom);
|
|
433
433
|
const location = page.location;
|
|
434
|
-
const policy =
|
|
434
|
+
const policy = useAtomValueRaw(policyAtom);
|
|
435
435
|
const selectedLocale = page.locale;
|
|
436
436
|
const setSelectedLocale = useSetAtom(explorer.selectedLocale);
|
|
437
437
|
const setLocation = useSetAtom(explorer.location);
|
|
438
|
-
const parent =
|
|
438
|
+
const parent = useAtomValueRaw(explorer.parent(location, selectedLocale));
|
|
439
439
|
const configuredLocations = explorer.limitLocations?.length ? explorer.limitLocations : Object.entries(config.workspaces).flatMap(
|
|
440
440
|
([workspace, value]) => Object.keys(getWorkspace(value).roots).map((root) => ({ workspace, root }))
|
|
441
441
|
);
|
|
@@ -577,7 +577,7 @@ function ExplorerHeaderParentMain({
|
|
|
577
577
|
parent,
|
|
578
578
|
titleControls
|
|
579
579
|
}) {
|
|
580
|
-
const { data } =
|
|
580
|
+
const { data } = useAtomValueRaw(parent.data);
|
|
581
581
|
if (!data) return null;
|
|
582
582
|
return /* @__PURE__ */ jsx(
|
|
583
583
|
ExplorerHeaderLoadedParentMain,
|
|
@@ -673,15 +673,15 @@ function ExplorerToolbar({ explorer, page }) {
|
|
|
673
673
|
const [, setView] = useAtom(explorer.view);
|
|
674
674
|
const [sort, setSort] = useAtom(explorer.sort);
|
|
675
675
|
const [selectedFilter, toggleFilter] = useAtom(explorer.filter);
|
|
676
|
-
const requestedLocation =
|
|
677
|
-
const selectedLocale =
|
|
676
|
+
const requestedLocation = useAtomValueRaw(explorer.location);
|
|
677
|
+
const selectedLocale = useAtomValueRaw(explorer.selectedLocale);
|
|
678
678
|
const locationIsPending = explorerPageIsPending(
|
|
679
679
|
page,
|
|
680
680
|
requestedLocation,
|
|
681
681
|
selectedLocale
|
|
682
682
|
);
|
|
683
|
-
const canUpload =
|
|
684
|
-
const uploads =
|
|
683
|
+
const canUpload = useAtomValueRaw(explorer.canUpload);
|
|
684
|
+
const uploads = useAtomValueRaw(explorer.uploadsInCurrentFolder);
|
|
685
685
|
const upload = useSetAtom(explorer.upload);
|
|
686
686
|
const uploadCount = uploads.length;
|
|
687
687
|
const uploadLabel = uploadCount === 1 ? "1 file uploading" : `${uploadCount} files uploading`;
|
|
@@ -800,7 +800,7 @@ function Explorer({
|
|
|
800
800
|
page: loadedPage,
|
|
801
801
|
titleControls
|
|
802
802
|
}) {
|
|
803
|
-
const resolvedPage =
|
|
803
|
+
const resolvedPage = useAtomValueRaw(explorer.page);
|
|
804
804
|
const page = resolvedPage ?? loadedPage;
|
|
805
805
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
806
806
|
/* @__PURE__ */ jsx(
|