alinea 2.0.0-preview.12 → 2.0.0-preview.13
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/.mcp/later/dev.json +1 -1
- package/dist/.mcp/online/dev.json +1 -1
- package/dist/adapter/next/cms.js +16 -8
- package/dist/adapter/next/dashboardUrl.d.ts +6 -0
- package/dist/adapter/next/dashboardUrl.js +13 -0
- package/dist/adapter/next/syncCheck.d.ts +15 -2
- package/dist/adapter/next/syncCheck.js +26 -9
- package/dist/backend/Handler.js +5 -1
- package/dist/backend/api/BlobStore.d.ts +21 -0
- package/dist/backend/api/BlobStore.js +63 -0
- package/dist/backend/api/CreateBackend.js +10 -8
- package/dist/backend/api/DatabaseApi.d.ts +4 -1
- package/dist/backend/api/DatabaseApi.js +88 -4
- package/dist/backend/api/GithubApi.js +47 -24
- package/dist/backend/api/database.js +6 -6
- package/dist/bundled.d.ts +676 -280
- package/dist/chunks/{bun-sqlite-5SHXN3AT.js → bun-sqlite-RI6BYU5S.js} +3 -3
- package/dist/chunks/{chunk-OHGAVV4G.js → chunk-3QFSGTGF.js} +2 -3
- package/dist/chunks/{chunk-QJGGYF6E.js → chunk-4ZA6KZHS.js} +5 -5
- package/dist/chunks/{chunk-ASYKC6IE.js → chunk-5H4D5JQL.js} +1 -1
- package/dist/chunks/{chunk-ETWOY4AL.js → chunk-A2I6MCCS.js} +1 -1
- package/dist/chunks/{chunk-W5AXN7GH.js → chunk-CYVOGRSD.js} +1 -2
- package/dist/chunks/{chunk-TIJTT5ZI.js → chunk-G43W7AME.js} +1 -0
- package/dist/chunks/{chunk-RE523BQ7.js → chunk-HOETF6HN.js} +5829 -5830
- package/dist/chunks/{chunk-AIU6CMVT.js → chunk-PTYZMV5G.js} +1 -1
- package/dist/chunks/{chunk-JOF663EG.js → chunk-QHHMKJUO.js} +1 -1
- package/dist/chunks/{chunk-66YZ47TY.js → chunk-RAR44T5O.js} +1 -1
- package/dist/chunks/{chunk-QSN6RH6X.js → chunk-VA6NC3MI.js} +1 -1
- package/dist/chunks/{node-sqlite-XVNTNMCY.js → node-sqlite-C7VJ2NSN.js} +3 -3
- package/dist/cli/Mcp.js +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/serve/mcp/DevMcp.js +1 -1
- package/dist/cli/serve/mcp/McpTools.js +29 -1
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Alert.js +2 -2
- package/dist/components/AppShell.js +2 -2
- package/dist/components/Badge.d.ts +3 -1
- package/dist/components/Badge.js +5 -3
- package/dist/components/Breadcrumbs.js +7 -7
- package/dist/components/Button.d.ts +6 -1
- package/dist/components/Button.js +16 -7
- package/dist/components/Calendar.js +20 -20
- package/dist/components/Checkbox.js +7 -7
- package/dist/components/CheckboxGroup.js +4 -4
- package/dist/components/Code.js +2 -2
- package/dist/components/Collapsible.js +3 -3
- package/dist/components/ColorSwatch.js +2 -2
- package/dist/components/ColorSwatchPicker.js +2 -2
- package/dist/components/ComboBox.js +7 -7
- package/dist/components/Command.js +14 -13
- package/dist/components/ContentCard.d.ts +3 -1
- package/dist/components/ContentCard.js +46 -24
- package/dist/components/ContentGrid.js +17 -17
- package/dist/components/DataList.js +2 -2
- package/dist/components/DateField.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DateRangePicker.js +2 -2
- package/dist/components/Dialog.js +7 -7
- package/dist/components/DropZone.js +6 -6
- package/dist/components/DropdownMenu.js +9 -9
- package/dist/components/Empty.js +5 -5
- package/dist/components/Field.js +8 -8
- package/dist/components/List.js +27 -27
- package/dist/components/MediaPreview.js +5 -5
- package/dist/components/MultipleSelect.js +22 -22
- package/dist/components/NavRail.js +4 -4
- package/dist/components/NumberField.js +4 -4
- package/dist/components/Page.js +3 -3
- package/dist/components/Popover.js +2 -2
- package/dist/components/PreviewFrame.js +9 -9
- package/dist/components/RadioGroup.js +9 -9
- package/dist/components/Resizable.js +4 -4
- package/dist/components/SearchField.d.ts +6 -1
- package/dist/components/SearchField.js +5 -3
- package/dist/components/Select.js +13 -13
- package/dist/components/Sheet.d.ts +50 -0
- package/dist/components/Sheet.js +202 -0
- package/dist/components/Sidebar.js +4 -4
- package/dist/components/SortableList.d.ts +34 -30
- package/dist/components/SortableList.js +161 -264
- package/dist/components/Spinner.js +2 -2
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +8 -8
- package/dist/components/Table.d.ts +3 -1
- package/dist/components/Table.js +57 -46
- package/dist/components/Tabs.js +5 -5
- package/dist/components/TagGroup.js +8 -8
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +6 -6
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/Tree.js +24 -24
- package/dist/components/internal/DateControl.js +12 -12
- package/dist/components/internal/ListBoxOption.js +6 -6
- package/dist/components/internal/Locale.js +2 -2
- package/dist/components/internal/PopoverSurface.js +4 -4
- package/dist/components/internal/SelectionCheckbox.js +5 -5
- package/dist/components/internal/Slot.js +1 -1
- package/dist/components/internal/ToggleButton.js +3 -3
- package/dist/components/internal/Trigger.js +2 -2
- package/dist/components/internal/sortableDrag.d.ts +19 -0
- package/dist/components/internal/sortableDrag.js +175 -0
- package/dist/components/internal/useDragDrop.js +2 -2
- package/dist/components.d.ts +1 -0
- package/dist/components.js +1 -0
- package/dist/core/Config.d.ts +6 -1
- package/dist/core/Document.d.ts +9 -1
- package/dist/core/Document.js +31 -6
- package/dist/core/Overview.d.ts +2 -4
- package/dist/core/TextDoc.d.ts +4 -0
- package/dist/core/Validation.d.ts +0 -1
- package/dist/core/Validation.js +0 -6
- package/dist/core/field/RichTextField.js +23 -4
- package/dist/core/media/MediaTypes.js +1 -1
- package/dist/core/source/GithubSource.d.ts +4 -0
- package/dist/core/source/GithubSource.js +127 -25
- package/dist/core/source/GithubUsage.d.ts +21 -0
- package/dist/core/source/GithubUsage.js +47 -0
- package/dist/dashboard/App.d.ts +2 -2
- package/dist/dashboard/App.js +5 -3
- package/dist/dashboard/ViewKeys.d.ts +1 -0
- package/dist/dashboard/ViewKeys.js +1 -0
- package/dist/dashboard/app/ActivityStatus.js +7 -7
- package/dist/dashboard/app/AuthView.js +5 -5
- package/dist/dashboard/app/BlockSheet.d.ts +50 -0
- package/dist/dashboard/app/BlockSheet.js +207 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.d.ts +6 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.js +29 -0
- package/dist/dashboard/app/CompactField.js +16 -16
- package/dist/dashboard/app/DashboardLayout.js +3 -1
- package/dist/dashboard/app/EntryFields.js +2 -2
- package/dist/dashboard/app/EntryHeader.js +33 -34
- package/dist/dashboard/app/EntryReferences.js +7 -7
- package/dist/dashboard/app/EntrySidebar.js +15 -15
- package/dist/dashboard/app/EntrySidebarPreview.js +3 -3
- package/dist/dashboard/app/EntryStatusIcon.d.ts +23 -0
- package/dist/dashboard/app/EntryStatusIcon.js +58 -0
- package/dist/dashboard/app/EntryValidationModal.d.ts +6 -5
- package/dist/dashboard/app/EntryValidationModal.js +20 -20
- package/dist/dashboard/app/Explorer.d.ts +3 -1
- package/dist/dashboard/app/Explorer.js +48 -44
- package/dist/dashboard/app/ExplorerBatchActions.d.ts +3 -1
- package/dist/dashboard/app/ExplorerBatchActions.js +68 -43
- package/dist/dashboard/app/ExplorerCards.js +7 -1
- package/dist/dashboard/app/ExplorerControls.js +6 -6
- package/dist/dashboard/app/ExplorerList.js +5 -5
- package/dist/dashboard/app/ExplorerModal.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +11 -8
- package/dist/dashboard/app/ImageEditor.js +28 -28
- package/dist/dashboard/app/ImagePicker.js +3 -13
- package/dist/dashboard/app/LinkPicker.js +28 -26
- package/dist/dashboard/app/LocaleMenu.js +4 -4
- package/dist/dashboard/app/MediaPreviewCell.js +1 -1
- package/dist/dashboard/app/MoveConfirmDialog.d.ts +5 -0
- package/dist/dashboard/app/MoveConfirmDialog.js +79 -0
- package/dist/dashboard/app/OverviewCell.js +8 -13
- package/dist/dashboard/app/PendingUploadsView.js +3 -3
- package/dist/dashboard/app/ReadOnlyBadge.d.ts +1 -1
- package/dist/dashboard/app/RemoveDialog.d.ts +17 -0
- package/dist/dashboard/app/{DeleteDialog.js → RemoveDialog.js} +67 -27
- package/dist/dashboard/app/RemoveRedirect.d.ts +7 -0
- package/dist/dashboard/app/RemoveRedirect.js +123 -0
- package/dist/dashboard/app/SearchBar.d.ts +9 -0
- package/dist/dashboard/app/SearchBar.js +31 -0
- package/dist/dashboard/app/SidebarTree.js +27 -72
- package/dist/dashboard/app/WorkspaceMenu.js +7 -7
- package/dist/dashboard/app/WorkspaceRoots.js +12 -12
- package/dist/dashboard/app/editor/FileEditor.js +14 -14
- package/dist/dashboard/app/modals/CreateEntry.js +3 -3
- package/dist/dashboard/app/pages/EntryPage.d.ts +2 -1
- package/dist/dashboard/app/pages/EntryPage.js +34 -15
- package/dist/dashboard/app/pages/SplashPage.js +37 -37
- package/dist/dashboard/app/pages/UsersPage.js +12 -12
- package/dist/dashboard/app/ui/DashboardModal.js +15 -14
- package/dist/dashboard/atoms/dashboard.js +1 -1
- package/dist/dashboard/atoms/entry.js +1 -14
- package/dist/dashboard/atoms/entryTable.js +1 -0
- package/dist/dashboard/atoms/explorer.d.ts +4 -0
- package/dist/dashboard/atoms/explorer.js +19 -7
- package/dist/dashboard/atoms/graph.js +1 -1
- package/dist/dashboard/atoms/link.js +5 -2
- package/dist/dashboard/atoms/move.d.ts +5 -0
- package/dist/dashboard/atoms/move.js +29 -3
- package/dist/dashboard/atoms/moveConfirmation.d.ts +34 -0
- package/dist/dashboard/atoms/moveConfirmation.js +95 -0
- package/dist/dashboard/atoms/nav.d.ts +9 -5
- package/dist/dashboard/atoms/nav.js +120 -45
- package/dist/dashboard/atoms/overview.d.ts +6 -5
- package/dist/dashboard/atoms/overview.js +2 -16
- package/dist/dashboard/atoms/remove.d.ts +112 -0
- package/dist/dashboard/atoms/remove.js +268 -0
- package/dist/dashboard/atoms/root.d.ts +2 -2
- package/dist/dashboard/atoms/root.js +41 -26
- package/dist/dashboard/atoms/user.js +1 -1
- package/dist/dashboard/atoms/utils.js +1 -1
- package/dist/dashboard/boot/Boot.js +25 -17
- package/dist/dashboard/boot/DashboardWorker.d.ts +1 -0
- package/dist/dashboard/boot/DashboardWorker.js +10 -46
- package/dist/dashboard/boot/LoadWorker.js +17 -10
- package/dist/dashboard/cms/EntryTable.js +8 -5
- package/dist/database/BrowserEntryStore.d.ts +12 -62
- package/dist/database/BrowserEntryStore.js +97 -196
- package/dist/database/DatabaseTables.js +2 -2
- package/dist/database/EntryDatabase.js +21 -1
- package/dist/database/EntryTransaction.js +0 -35
- package/dist/database/EntryUrlAliases.d.ts +4 -0
- package/dist/database/EntryUrlAliases.js +16 -10
- package/dist/database/driver/RuntimeDatabase.js +3 -3
- package/dist/database/driver/WasmDatabase.d.ts +5 -18
- package/dist/database/driver/WasmDatabase.js +15 -16
- package/dist/database/entry/EntryTable.js +2 -2
- package/dist/database/query/EntryQuery.js +1 -1
- package/dist/database/query/Relation.js +1 -1
- package/dist/database/query/Search.js +2 -2
- package/dist/field/code/CodeField.view.js +16 -16
- package/dist/field/link/EntryLink.d.ts +4 -4
- package/dist/field/link/FileLink.d.ts +4 -4
- package/dist/field/link/ImageLink.d.ts +4 -4
- package/dist/field/link/Link.d.ts +1 -1
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +244 -370
- package/dist/field/link/UrlLink.d.ts +4 -4
- package/dist/field/list/ListField.d.ts +2 -0
- package/dist/field/list/ListField.view.d.ts +15 -0
- package/dist/field/list/ListField.view.js +343 -301
- package/dist/field/metadata/MetadataField.d.ts +17 -7
- package/dist/field/metadata/MetadataField.js +14 -3
- package/dist/field/metadata/MetadataField.view.d.ts +1 -0
- package/dist/field/metadata/MetadataField.view.js +25 -21
- package/dist/field/richtext/RichTextBlock.d.ts +3 -1
- package/dist/field/richtext/RichTextBlock.js +177 -74
- package/dist/field/richtext/RichTextBlockHost.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +31 -31
- package/dist/field/richtext/RichTextField.view.js +14 -8
- package/dist/field/richtext/RichTextInsertMenu.js +43 -27
- package/dist/field/views.js +2 -0
- package/dist/index.css +490 -309
- package/dist/picker/url/UrlPicker.js +1 -0
- package/docs/components/badge.md +1 -0
- package/docs/components/button.md +1 -0
- package/docs/components/content-card.md +1 -0
- package/docs/components/search-field.md +1 -0
- package/docs/components/sortable-list.md +5 -20
- package/docs/components/table.md +1 -0
- package/docs/configuration.md +1 -1
- package/docs/deploy/self-host.md +1 -1
- package/docs/deploy.md +5 -4
- package/docs/fields.md +1 -1
- package/docs/index.md +1 -1
- package/docs/instant-publishing.md +7 -22
- package/docs/overviews.md +3 -4
- package/docs/upgrading.md +3 -2
- package/llms-full.txt +31 -55
- package/package.json +2 -3
- package/dist/core/db/EntryValidationError.d.ts +0 -13
- package/dist/core/db/EntryValidationError.js +0 -23
- package/dist/dashboard/app/DeleteDialog.d.ts +0 -11
- package/dist/dashboard/atoms/delete.d.ts +0 -68
- package/dist/dashboard/atoms/delete.js +0 -143
- package/dist/chunks/{chunk-MOWR65LM.js → chunk-PYDOMKJZ.js} +71 -71
|
@@ -9,30 +9,30 @@ import {
|
|
|
9
9
|
import "../../chunks/chunk-CQ52GEHY.js";
|
|
10
10
|
|
|
11
11
|
// src/dashboard/app/ExplorerBatchActions.tsx
|
|
12
|
-
import { Button,
|
|
12
|
+
import { Button, Toolbar } from "alinea/components";
|
|
13
|
+
import { loadMoveTargetsAtom } from "alinea/dashboard/atoms/move";
|
|
13
14
|
import {
|
|
14
15
|
archiveEntriesAtom,
|
|
15
16
|
deleteEntriesAtom,
|
|
16
|
-
|
|
17
|
-
} from "alinea/dashboard/atoms/
|
|
18
|
-
import { loadMoveTargetsAtom } from "alinea/dashboard/atoms/move";
|
|
17
|
+
loadRemovePlanAtom
|
|
18
|
+
} from "alinea/dashboard/atoms/remove";
|
|
19
19
|
import { useState, useTransition } from "react";
|
|
20
20
|
import { IcRoundClose, IcRoundDelete, IcRoundDriveFileMove } from "../icons.js";
|
|
21
|
-
import { DeleteDialog } from "./DeleteDialog.js";
|
|
22
21
|
|
|
23
22
|
// src/dashboard/app/ExplorerBatchActions.module.css
|
|
24
23
|
var ExplorerBatchActions_default = {
|
|
25
|
-
"ExplorerBatchActionBar-toolbar": "alinea-ExplorerBatchActionBar-toolbar",
|
|
26
|
-
"ExplorerBatchActionBarToolbar": "alinea-ExplorerBatchActionBar-toolbar",
|
|
27
24
|
"ExplorerBatchActionBar-count": "alinea-ExplorerBatchActionBar-count",
|
|
28
25
|
"ExplorerBatchActionBarCount": "alinea-ExplorerBatchActionBar-count",
|
|
29
26
|
"ExplorerBatchActionBar": "alinea-ExplorerBatchActionBar",
|
|
30
|
-
"ExplorerBatchActionBar-
|
|
31
|
-
"
|
|
27
|
+
"ExplorerBatchActionBar-divider": "alinea-ExplorerBatchActionBar-divider",
|
|
28
|
+
"ExplorerBatchActionBarDivider": "alinea-ExplorerBatchActionBar-divider",
|
|
29
|
+
"ExplorerBatchActionBar-action": "alinea-ExplorerBatchActionBar-action",
|
|
30
|
+
"ExplorerBatchActionBarAction": "alinea-ExplorerBatchActionBar-action"
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
// src/dashboard/app/ExplorerBatchActions.tsx
|
|
35
34
|
import { MoveDialog } from "./MoveDialog.js";
|
|
35
|
+
import { RemoveDialog } from "./RemoveDialog.js";
|
|
36
36
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
37
37
|
var styles = dist_default(ExplorerBatchActions_default);
|
|
38
38
|
function ExplorerBatchActions({ explorer }) {
|
|
@@ -40,7 +40,7 @@ function ExplorerBatchActions({ explorer }) {
|
|
|
40
40
|
explorer.selectionActions
|
|
41
41
|
);
|
|
42
42
|
const clearSelection = useSetAtom(explorer.clearSelection);
|
|
43
|
-
const
|
|
43
|
+
const loadRemovePlan = useSetAtom(loadRemovePlanAtom);
|
|
44
44
|
const deleteEntries = useSetAtom(deleteEntriesAtom);
|
|
45
45
|
const archiveEntries = useSetAtom(archiveEntriesAtom);
|
|
46
46
|
const loadMoveTargets = useSetAtom(loadMoveTargetsAtom);
|
|
@@ -55,7 +55,7 @@ function ExplorerBatchActions({ explorer }) {
|
|
|
55
55
|
}
|
|
56
56
|
function openDeleteDialog() {
|
|
57
57
|
startTransition(async () => {
|
|
58
|
-
setDeletePlan(await
|
|
58
|
+
setDeletePlan(await loadRemovePlan(items));
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -80,8 +80,9 @@ function ExplorerBatchActions({ explorer }) {
|
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
82
|
/* @__PURE__ */ jsx(
|
|
83
|
-
|
|
83
|
+
RemoveDialog,
|
|
84
84
|
{
|
|
85
|
+
action: "delete",
|
|
85
86
|
plan: deletePlan,
|
|
86
87
|
onClose: () => setDeletePlan(void 0),
|
|
87
88
|
onConfirm: async (plan) => {
|
|
@@ -105,12 +106,60 @@ function ExplorerBatchActionBar({
|
|
|
105
106
|
onDelete,
|
|
106
107
|
onMove
|
|
107
108
|
}) {
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ jsxs(
|
|
109
110
|
Toolbar,
|
|
110
111
|
{
|
|
111
112
|
"aria-label": "Selected entries",
|
|
112
|
-
className: styles.ExplorerBatchActionBar
|
|
113
|
+
className: styles.ExplorerBatchActionBar(),
|
|
113
114
|
children: [
|
|
115
|
+
/* @__PURE__ */ jsxs("span", { className: styles.ExplorerBatchActionBar.count(), children: [
|
|
116
|
+
count,
|
|
117
|
+
" selected"
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
ExplorerBatchAction,
|
|
121
|
+
{
|
|
122
|
+
reason: canMove ? void 0 : "Not all selected entries can be moved",
|
|
123
|
+
children: /* @__PURE__ */ jsx(
|
|
124
|
+
Button,
|
|
125
|
+
{
|
|
126
|
+
icon: IcRoundDriveFileMove,
|
|
127
|
+
size: "sm",
|
|
128
|
+
variant: "ghost",
|
|
129
|
+
disabled: isPending || !canMove,
|
|
130
|
+
loading: isPending,
|
|
131
|
+
onClick: onMove,
|
|
132
|
+
children: "Move to\u2026"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
ExplorerBatchAction,
|
|
139
|
+
{
|
|
140
|
+
reason: canDelete ? void 0 : "Not all selected entries can be deleted",
|
|
141
|
+
children: /* @__PURE__ */ jsx(
|
|
142
|
+
Button,
|
|
143
|
+
{
|
|
144
|
+
color: "destructive",
|
|
145
|
+
icon: IcRoundDelete,
|
|
146
|
+
size: "sm",
|
|
147
|
+
variant: "ghost",
|
|
148
|
+
disabled: isPending || !canDelete,
|
|
149
|
+
loading: isPending,
|
|
150
|
+
onClick: onDelete,
|
|
151
|
+
children: "Delete"
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ jsx(
|
|
157
|
+
"span",
|
|
158
|
+
{
|
|
159
|
+
"aria-hidden": "true",
|
|
160
|
+
className: styles.ExplorerBatchActionBar.divider()
|
|
161
|
+
}
|
|
162
|
+
),
|
|
114
163
|
/* @__PURE__ */ jsx(
|
|
115
164
|
Button,
|
|
116
165
|
{
|
|
@@ -120,37 +169,13 @@ function ExplorerBatchActionBar({
|
|
|
120
169
|
variant: "ghost",
|
|
121
170
|
onClick: onClear
|
|
122
171
|
}
|
|
123
|
-
)
|
|
124
|
-
/* @__PURE__ */ jsxs(Text, { className: styles.ExplorerBatchActionBar.count(), children: [
|
|
125
|
-
count,
|
|
126
|
-
" selected"
|
|
127
|
-
] }),
|
|
128
|
-
/* @__PURE__ */ jsxs("div", { className: styles.ExplorerBatchActionBar.actions(), children: [
|
|
129
|
-
canMove && /* @__PURE__ */ jsx(
|
|
130
|
-
Button,
|
|
131
|
-
{
|
|
132
|
-
icon: IcRoundDriveFileMove,
|
|
133
|
-
disabled: isPending,
|
|
134
|
-
loading: isPending,
|
|
135
|
-
onClick: onMove,
|
|
136
|
-
children: "Move to\u2026"
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
canDelete && /* @__PURE__ */ jsx(
|
|
140
|
-
Button,
|
|
141
|
-
{
|
|
142
|
-
color: "destructive",
|
|
143
|
-
icon: IcRoundDelete,
|
|
144
|
-
disabled: isPending,
|
|
145
|
-
loading: isPending,
|
|
146
|
-
onClick: onDelete,
|
|
147
|
-
children: "Delete"
|
|
148
|
-
}
|
|
149
|
-
)
|
|
150
|
-
] })
|
|
172
|
+
)
|
|
151
173
|
]
|
|
152
174
|
}
|
|
153
|
-
)
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function ExplorerBatchAction({ reason, children }) {
|
|
178
|
+
return /* @__PURE__ */ jsx("span", { className: styles.ExplorerBatchActionBar.action(), title: reason, children });
|
|
154
179
|
}
|
|
155
180
|
export {
|
|
156
181
|
ExplorerBatchActionBar,
|
|
@@ -23,6 +23,7 @@ import { hasPreviewImage } from "alinea/core/media/Pdf";
|
|
|
23
23
|
import { memo, startTransition } from "react";
|
|
24
24
|
import { configAtom } from "../atoms/core.js";
|
|
25
25
|
import { IcTwotoneDescription, IcTwotoneFolder } from "../icons.js";
|
|
26
|
+
import { EntryStatusIcon, entryStatus } from "./EntryStatusIcon.js";
|
|
26
27
|
import { fileKindVisual } from "./FileKind.js";
|
|
27
28
|
|
|
28
29
|
// src/dashboard/app/ExplorerCards.module.css
|
|
@@ -55,10 +56,13 @@ var ExplorerCardItem = memo(function ExplorerCardItem2({
|
|
|
55
56
|
}
|
|
56
57
|
const file = useAtomValueRaw(data.fileInfo);
|
|
57
58
|
const thumbnail = useAtomValueRaw(data.thumbnail);
|
|
59
|
+
const status = entryStatus(useAtomValueRaw(data.item));
|
|
60
|
+
const suffix = status && /* @__PURE__ */ jsx(EntryStatusIcon, { status });
|
|
58
61
|
const card = file ? {
|
|
59
62
|
variant: "media",
|
|
60
63
|
...file.preview && file.extension && hasPreviewImage(file.extension) ? { image: file.preview, color: file.averageColor } : fileKindVisual(file.extension),
|
|
61
64
|
title: label,
|
|
65
|
+
suffix,
|
|
62
66
|
description: formatExtension(file.extension),
|
|
63
67
|
details: formatFileDetails(file)
|
|
64
68
|
} : thumbnail ? {
|
|
@@ -66,18 +70,20 @@ var ExplorerCardItem = memo(function ExplorerCardItem2({
|
|
|
66
70
|
image: thumbnail.preview,
|
|
67
71
|
color: thumbnail.averageColor,
|
|
68
72
|
title: label,
|
|
73
|
+
suffix,
|
|
69
74
|
description: type.label
|
|
70
75
|
} : {
|
|
71
76
|
// Like the tree and table, only entries with children are folders
|
|
72
77
|
icon: icon ?? (hasChildren ? IcTwotoneFolder : IcTwotoneDescription),
|
|
73
78
|
title: label,
|
|
79
|
+
suffix,
|
|
74
80
|
description: type.label
|
|
75
81
|
};
|
|
76
82
|
return /* @__PURE__ */ jsx(
|
|
77
83
|
ContentGridItem,
|
|
78
84
|
{
|
|
79
85
|
id: entry.id,
|
|
80
|
-
textValue: label,
|
|
86
|
+
textValue: status ? `${label} ${status.label}` : label,
|
|
81
87
|
selectable: isSelectable,
|
|
82
88
|
onAction: hasAction ? onAction : void 0,
|
|
83
89
|
onClick: isSelectable && onPick ? () => onPick(entry) : void 0,
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
|
|
21
21
|
// src/dashboard/app/ExplorerControls.module.css
|
|
22
22
|
var ExplorerControls_default = {
|
|
23
|
-
"ExplorerControls
|
|
24
|
-
"ExplorerControlsReset": "alinea-ExplorerControls-reset",
|
|
23
|
+
"ExplorerControls": "alinea-ExplorerControls",
|
|
25
24
|
"ExplorerControls-sortOption": "alinea-ExplorerControls-sortOption",
|
|
26
25
|
"ExplorerControlsSortOption": "alinea-ExplorerControls-sortOption",
|
|
26
|
+
"ExplorerControls-reset": "alinea-ExplorerControls-reset",
|
|
27
|
+
"ExplorerControlsReset": "alinea-ExplorerControls-reset",
|
|
27
28
|
"ExplorerControls-label": "alinea-ExplorerControls-label",
|
|
28
29
|
"ExplorerControlsLabel": "alinea-ExplorerControls-label",
|
|
29
|
-
"ExplorerControls": "alinea-ExplorerControls",
|
|
30
|
-
"ExplorerControls-filterOptions": "alinea-ExplorerControls-filterOptions",
|
|
31
|
-
"ExplorerControlsFilterOptions": "alinea-ExplorerControls-filterOptions",
|
|
32
30
|
"ExplorerControls-section": "alinea-ExplorerControls-section",
|
|
33
|
-
"ExplorerControlsSection": "alinea-ExplorerControls-section"
|
|
31
|
+
"ExplorerControlsSection": "alinea-ExplorerControls-section",
|
|
32
|
+
"ExplorerControls-filterOptions": "alinea-ExplorerControls-filterOptions",
|
|
33
|
+
"ExplorerControlsFilterOptions": "alinea-ExplorerControls-filterOptions"
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
// src/dashboard/app/ExplorerControls.tsx
|
|
@@ -37,15 +37,15 @@ import { ExplorerCards } from "./ExplorerCards.js";
|
|
|
37
37
|
|
|
38
38
|
// src/dashboard/app/ExplorerList.module.css
|
|
39
39
|
var ExplorerList_default = {
|
|
40
|
-
"ExplorerList": "alinea-ExplorerList",
|
|
41
|
-
"ExplorerList-drag-preview-label": "alinea-ExplorerList-drag-preview-label",
|
|
42
|
-
"ExplorerListDragPreviewLabel": "alinea-ExplorerList-drag-preview-label",
|
|
43
40
|
"ExplorerList-drag-preview": "alinea-ExplorerList-drag-preview",
|
|
44
41
|
"ExplorerListDragPreview": "alinea-ExplorerList-drag-preview",
|
|
42
|
+
"ExplorerList-empty": "alinea-ExplorerList-empty",
|
|
43
|
+
"ExplorerListEmpty": "alinea-ExplorerList-empty",
|
|
45
44
|
"ExplorerList-empty-button": "alinea-ExplorerList-empty-button",
|
|
46
45
|
"ExplorerListEmptyButton": "alinea-ExplorerList-empty-button",
|
|
47
|
-
"ExplorerList-
|
|
48
|
-
"
|
|
46
|
+
"ExplorerList-drag-preview-label": "alinea-ExplorerList-drag-preview-label",
|
|
47
|
+
"ExplorerListDragPreviewLabel": "alinea-ExplorerList-drag-preview-label",
|
|
48
|
+
"ExplorerList": "alinea-ExplorerList"
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
// src/dashboard/app/ExplorerList.tsx
|
|
@@ -12,10 +12,10 @@ import { Suspense } from "react";
|
|
|
12
12
|
var ExplorerModal_default = {
|
|
13
13
|
"ExplorerModal": "alinea-ExplorerModal",
|
|
14
14
|
"ExplorerModalContent": "alinea-ExplorerModalContent",
|
|
15
|
+
"ExplorerModalFooter": "alinea-ExplorerModalFooter",
|
|
15
16
|
"ExplorerModalNavigation": "alinea-ExplorerModalNavigation",
|
|
16
|
-
"ExplorerModalActions": "alinea-ExplorerModalActions",
|
|
17
17
|
"ExplorerModalLoading": "alinea-ExplorerModalLoading",
|
|
18
|
-
"
|
|
18
|
+
"ExplorerModalActions": "alinea-ExplorerModalActions"
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
// src/dashboard/app/ExplorerModal.tsx
|
|
@@ -21,23 +21,24 @@ import { startTransition, useMemo } from "react";
|
|
|
21
21
|
import { configAtom } from "../atoms/core.js";
|
|
22
22
|
import { titleColumn as overviewTitle } from "../atoms/overview.js";
|
|
23
23
|
import { LucideFile, LucideFolder } from "../icons.js";
|
|
24
|
+
import { EntryStatusIcon, entryStatus } from "./EntryStatusIcon.js";
|
|
24
25
|
import { fileKindVisual } from "./FileKind.js";
|
|
25
26
|
|
|
26
27
|
// src/dashboard/app/ExplorerTable.module.css
|
|
27
28
|
var ExplorerTable_default = {
|
|
29
|
+
"is-compact": "alinea-is-compact",
|
|
30
|
+
"isCompact": "alinea-is-compact",
|
|
28
31
|
"ExplorerTable-breadcrumb-root": "alinea-ExplorerTable-breadcrumb-root",
|
|
29
32
|
"ExplorerTableBreadcrumbRoot": "alinea-ExplorerTable-breadcrumb-root",
|
|
33
|
+
"ExplorerTable-breadcrumb-label": "alinea-ExplorerTable-breadcrumb-label",
|
|
34
|
+
"ExplorerTableBreadcrumbLabel": "alinea-ExplorerTable-breadcrumb-label",
|
|
30
35
|
"ExplorerTable-breadcrumbs": "alinea-ExplorerTable-breadcrumbs",
|
|
31
36
|
"ExplorerTableBreadcrumbs": "alinea-ExplorerTable-breadcrumbs",
|
|
32
|
-
"ExplorerTable": "alinea-ExplorerTable",
|
|
33
37
|
"ExplorerTable-viewport": "alinea-ExplorerTable-viewport",
|
|
34
38
|
"ExplorerTableViewport": "alinea-ExplorerTable-viewport",
|
|
35
|
-
"ExplorerTable-breadcrumb-label": "alinea-ExplorerTable-breadcrumb-label",
|
|
36
|
-
"ExplorerTableBreadcrumbLabel": "alinea-ExplorerTable-breadcrumb-label",
|
|
37
|
-
"is-compact": "alinea-is-compact",
|
|
38
|
-
"isCompact": "alinea-is-compact",
|
|
39
39
|
"ExplorerTable-breadcrumb": "alinea-ExplorerTable-breadcrumb",
|
|
40
|
-
"ExplorerTableBreadcrumb": "alinea-ExplorerTable-breadcrumb"
|
|
40
|
+
"ExplorerTableBreadcrumb": "alinea-ExplorerTable-breadcrumb",
|
|
41
|
+
"ExplorerTable": "alinea-ExplorerTable"
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
// src/dashboard/app/ExplorerTable.tsx
|
|
@@ -143,7 +144,8 @@ function ExplorerTableDisplayRow(props) {
|
|
|
143
144
|
() => columns.map((column) => overviewCellText(config, column, item, links)),
|
|
144
145
|
[columns, config, item, links]
|
|
145
146
|
);
|
|
146
|
-
const
|
|
147
|
+
const status = entryStatus(item);
|
|
148
|
+
const textValue = [label, status?.label, ...cellTexts].filter(Boolean).join(" ");
|
|
147
149
|
return /* @__PURE__ */ jsxs(
|
|
148
150
|
TableRow,
|
|
149
151
|
{
|
|
@@ -162,7 +164,8 @@ function ExplorerTableDisplayRow(props) {
|
|
|
162
164
|
{
|
|
163
165
|
icon,
|
|
164
166
|
title: label,
|
|
165
|
-
label: breadcrumbs ? /* @__PURE__ */ jsx(ExplorerTableBreadcrumbs, { entries: parents, rootLabel }) : void 0
|
|
167
|
+
label: breadcrumbs ? /* @__PURE__ */ jsx(ExplorerTableBreadcrumbs, { entries: parents, rootLabel }) : void 0,
|
|
168
|
+
suffix: status && /* @__PURE__ */ jsx(EntryStatusIcon, { status })
|
|
166
169
|
}
|
|
167
170
|
),
|
|
168
171
|
!compact && columns.map((column, index) => /* @__PURE__ */ jsx(
|
|
@@ -14,45 +14,45 @@ import { CroppedImage } from "./CroppedImage.js";
|
|
|
14
14
|
|
|
15
15
|
// src/dashboard/app/ImageEditor.module.css
|
|
16
16
|
var ImageEditor_default = {
|
|
17
|
-
"ImageEditor-crop": "alinea-ImageEditor-crop",
|
|
18
|
-
"ImageEditorCrop": "alinea-ImageEditor-crop",
|
|
19
|
-
"ImageEditor-crop-grid": "alinea-ImageEditor-crop-grid",
|
|
20
|
-
"ImageEditorCropGrid": "alinea-ImageEditor-crop-grid",
|
|
21
|
-
"ImageEditor-canvas": "alinea-ImageEditor-canvas",
|
|
22
|
-
"ImageEditorCanvas": "alinea-ImageEditor-canvas",
|
|
23
|
-
"is-n": "alinea-is-n",
|
|
24
|
-
"isN": "alinea-is-n",
|
|
25
|
-
"ImageEditor-aspect": "alinea-ImageEditor-aspect",
|
|
26
|
-
"ImageEditorAspect": "alinea-ImageEditor-aspect",
|
|
27
17
|
"ImageEditor-size": "alinea-ImageEditor-size",
|
|
28
18
|
"ImageEditorSize": "alinea-ImageEditor-size",
|
|
29
|
-
"ImageEditor-
|
|
30
|
-
"
|
|
31
|
-
"is-
|
|
32
|
-
"
|
|
33
|
-
"ImageEditor-
|
|
34
|
-
"
|
|
19
|
+
"ImageEditor-shade": "alinea-ImageEditor-shade",
|
|
20
|
+
"ImageEditorShade": "alinea-ImageEditor-shade",
|
|
21
|
+
"is-n": "alinea-is-n",
|
|
22
|
+
"isN": "alinea-is-n",
|
|
23
|
+
"ImageEditor-canvas": "alinea-ImageEditor-canvas",
|
|
24
|
+
"ImageEditorCanvas": "alinea-ImageEditor-canvas",
|
|
25
|
+
"ImageEditor-image": "alinea-ImageEditor-image",
|
|
26
|
+
"ImageEditorImage": "alinea-ImageEditor-image",
|
|
27
|
+
"ImageEditor": "alinea-ImageEditor",
|
|
35
28
|
"ImageEditor-shade-hole": "alinea-ImageEditor-shade-hole",
|
|
36
29
|
"ImageEditorShadeHole": "alinea-ImageEditor-shade-hole",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
30
|
+
"ImageEditor-crop": "alinea-ImageEditor-crop",
|
|
31
|
+
"ImageEditorCrop": "alinea-ImageEditor-crop",
|
|
39
32
|
"is-s": "alinea-is-s",
|
|
40
33
|
"isS": "alinea-is-s",
|
|
41
34
|
"is-w": "alinea-is-w",
|
|
42
35
|
"isW": "alinea-is-w",
|
|
36
|
+
"is-ne": "alinea-is-ne",
|
|
37
|
+
"isNe": "alinea-is-ne",
|
|
38
|
+
"is-nw": "alinea-is-nw",
|
|
39
|
+
"isNw": "alinea-is-nw",
|
|
40
|
+
"is-sw": "alinea-is-sw",
|
|
41
|
+
"isSw": "alinea-is-sw",
|
|
42
|
+
"ImageEditor-crop-grid": "alinea-ImageEditor-crop-grid",
|
|
43
|
+
"ImageEditorCropGrid": "alinea-ImageEditor-crop-grid",
|
|
44
|
+
"is-e": "alinea-is-e",
|
|
45
|
+
"isE": "alinea-is-e",
|
|
46
|
+
"ImageEditor-toolbar": "alinea-ImageEditor-toolbar",
|
|
47
|
+
"ImageEditorToolbar": "alinea-ImageEditor-toolbar",
|
|
48
|
+
"ImageEditor-crop-handle": "alinea-ImageEditor-crop-handle",
|
|
49
|
+
"ImageEditorCropHandle": "alinea-ImageEditor-crop-handle",
|
|
50
|
+
"ImageEditor-aspect": "alinea-ImageEditor-aspect",
|
|
51
|
+
"ImageEditorAspect": "alinea-ImageEditor-aspect",
|
|
43
52
|
"ImageEditor-stage": "alinea-ImageEditor-stage",
|
|
44
53
|
"ImageEditorStage": "alinea-ImageEditor-stage",
|
|
45
|
-
"ImageEditor-image": "alinea-ImageEditor-image",
|
|
46
|
-
"ImageEditorImage": "alinea-ImageEditor-image",
|
|
47
54
|
"is-se": "alinea-is-se",
|
|
48
|
-
"isSe": "alinea-is-se"
|
|
49
|
-
"is-sw": "alinea-is-sw",
|
|
50
|
-
"isSw": "alinea-is-sw",
|
|
51
|
-
"is-nw": "alinea-is-nw",
|
|
52
|
-
"isNw": "alinea-is-nw",
|
|
53
|
-
"ImageEditor-shade": "alinea-ImageEditor-shade",
|
|
54
|
-
"ImageEditorShade": "alinea-ImageEditor-shade",
|
|
55
|
-
"ImageEditor": "alinea-ImageEditor"
|
|
55
|
+
"isSe": "alinea-is-se"
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
// src/dashboard/app/ImageEditor.tsx
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
useAtomValueRaw,
|
|
3
2
|
useAtomValueRawSync,
|
|
4
3
|
useSetAtom
|
|
5
4
|
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
@@ -8,10 +7,8 @@ import "../../chunks/chunk-CQ52GEHY.js";
|
|
|
8
7
|
|
|
9
8
|
// src/dashboard/app/ImagePicker.tsx
|
|
10
9
|
import { useDialog } from "alinea/components";
|
|
11
|
-
import { getRoot } from "alinea/core/Internal";
|
|
12
10
|
import { Permission } from "alinea/core/Role";
|
|
13
11
|
import { Suspense, startTransition } from "react";
|
|
14
|
-
import { policyAtom } from "../atoms/user.js";
|
|
15
12
|
import { useDashboardContext } from "../hooks.js";
|
|
16
13
|
import { ExplorerHeader } from "./Explorer.js";
|
|
17
14
|
import { ExplorerModal, ExplorerModalSuspense } from "./ExplorerModal.js";
|
|
@@ -38,17 +35,10 @@ function ImagePicker(options) {
|
|
|
38
35
|
}
|
|
39
36
|
function ImagePickerModalContent({ options }) {
|
|
40
37
|
const modal = useDialog();
|
|
41
|
-
const { root
|
|
42
|
-
const policy = useAtomValueRaw(policyAtom);
|
|
43
|
-
const mediaRoot = Object.entries(workspace.roots).find(
|
|
44
|
-
([key, value]) => policy.canExplore({ workspace: root.workspace, root: key }) && Boolean(getRoot(value).isMediaRoot)
|
|
45
|
-
)?.[0];
|
|
38
|
+
const { root } = useDashboardContext();
|
|
46
39
|
const { explorer, tree } = usePickerExplorer(
|
|
47
|
-
{ ...options, permission: Permission.Explore },
|
|
48
|
-
options.location ?? {
|
|
49
|
-
workspace: root.workspace,
|
|
50
|
-
root: mediaRoot ?? root.key
|
|
51
|
-
},
|
|
40
|
+
{ ...options, media: true, permission: Permission.Explore },
|
|
41
|
+
options.location ?? { workspace: root.workspace, root: root.key },
|
|
52
42
|
"card"
|
|
53
43
|
);
|
|
54
44
|
const explorerPage = useAtomValueRawSync(explorer.page);
|
|
@@ -35,16 +35,15 @@ import {
|
|
|
35
35
|
|
|
36
36
|
// src/dashboard/app/LinkPicker.module.css
|
|
37
37
|
var LinkPicker_default = {
|
|
38
|
-
"LinkPickerCompact-footer": "alinea-LinkPickerCompact-footer",
|
|
39
|
-
"LinkPickerCompactFooter": "alinea-LinkPickerCompact-footer",
|
|
40
38
|
"LinkPickerCompact": "alinea-LinkPickerCompact",
|
|
41
39
|
"LinkPicker-popover": "alinea-LinkPicker-popover",
|
|
42
40
|
"LinkPickerPopover": "alinea-LinkPicker-popover",
|
|
43
|
-
"LinkPickerCompact-
|
|
44
|
-
"
|
|
41
|
+
"LinkPickerCompact-footer": "alinea-LinkPickerCompact-footer",
|
|
42
|
+
"LinkPickerCompactFooter": "alinea-LinkPickerCompact-footer"
|
|
45
43
|
};
|
|
46
44
|
|
|
47
45
|
// src/dashboard/app/LinkPicker.tsx
|
|
46
|
+
import { SearchBar } from "./SearchBar.js";
|
|
48
47
|
import {
|
|
49
48
|
DashboardModal,
|
|
50
49
|
DashboardModalCloseButton,
|
|
@@ -221,30 +220,33 @@ function LinkPickerCompact({
|
|
|
221
220
|
popover.close();
|
|
222
221
|
}
|
|
223
222
|
return /* @__PURE__ */ jsxs("div", { className: styles.LinkPickerCompact(), children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
SearchBar,
|
|
225
|
+
{
|
|
226
|
+
controls: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
227
|
+
/* @__PURE__ */ jsx(
|
|
228
|
+
TooltipTrigger,
|
|
229
|
+
{
|
|
230
|
+
"aria-label": "Expand entry picker",
|
|
231
|
+
variant: "ghost",
|
|
232
|
+
icon: IcRoundOpenInFull,
|
|
233
|
+
size: "icon-sm",
|
|
234
|
+
onClick: openExpanded
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: "Expand entry picker" })
|
|
238
|
+
] }),
|
|
239
|
+
children: /* @__PURE__ */ jsx(
|
|
240
|
+
ExplorerSearch,
|
|
237
241
|
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
onClick: openExpanded
|
|
242
|
+
autoFocus: true,
|
|
243
|
+
explorer,
|
|
244
|
+
onEntryAction: commitEntry,
|
|
245
|
+
page
|
|
243
246
|
}
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
] }),
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
),
|
|
248
250
|
/* @__PURE__ */ jsx(
|
|
249
251
|
ExplorerBody,
|
|
250
252
|
{
|
|
@@ -21,16 +21,16 @@ import { IcRoundUnfoldMore } from "../icons.js";
|
|
|
21
21
|
|
|
22
22
|
// src/dashboard/app/LocaleMenu.module.css
|
|
23
23
|
var LocaleMenu_default = {
|
|
24
|
-
"LocaleMenu-label-fullName": "alinea-LocaleMenu-label-fullName",
|
|
25
|
-
"LocaleMenuLabelFullName": "alinea-LocaleMenu-label-fullName",
|
|
26
24
|
"LocaleMenu-trigger-icon": "alinea-LocaleMenu-trigger-icon",
|
|
27
25
|
"LocaleMenuTriggerIcon": "alinea-LocaleMenu-trigger-icon",
|
|
28
|
-
"LocaleMenu-trigger": "alinea-LocaleMenu-trigger",
|
|
29
|
-
"LocaleMenuTrigger": "alinea-LocaleMenu-trigger",
|
|
30
26
|
"is-lg": "alinea-is-lg",
|
|
31
27
|
"isLg": "alinea-is-lg",
|
|
32
28
|
"LocaleMenu-label": "alinea-LocaleMenu-label",
|
|
33
29
|
"LocaleMenuLabel": "alinea-LocaleMenu-label",
|
|
30
|
+
"LocaleMenu-label-fullName": "alinea-LocaleMenu-label-fullName",
|
|
31
|
+
"LocaleMenuLabelFullName": "alinea-LocaleMenu-label-fullName",
|
|
32
|
+
"LocaleMenu-trigger": "alinea-LocaleMenu-trigger",
|
|
33
|
+
"LocaleMenuTrigger": "alinea-LocaleMenu-trigger",
|
|
34
34
|
"LocaleMenu-label-code": "alinea-LocaleMenu-label-code",
|
|
35
35
|
"LocaleMenuLabelCode": "alinea-LocaleMenu-label-code"
|
|
36
36
|
};
|
|
@@ -11,9 +11,9 @@ import { fileKindVisual } from "./FileKind.js";
|
|
|
11
11
|
var MediaPreviewCell_default = {
|
|
12
12
|
"MediaPreviewCell-image": "alinea-MediaPreviewCell-image",
|
|
13
13
|
"MediaPreviewCellImage": "alinea-MediaPreviewCell-image",
|
|
14
|
+
"MediaPreviewCell": "alinea-MediaPreviewCell",
|
|
14
15
|
"is-file": "alinea-is-file",
|
|
15
16
|
"isFile": "alinea-is-file",
|
|
16
|
-
"MediaPreviewCell": "alinea-MediaPreviewCell",
|
|
17
17
|
"MediaPreviewCell-icon": "alinea-MediaPreviewCell-icon",
|
|
18
18
|
"MediaPreviewCellIcon": "alinea-MediaPreviewCell-icon"
|
|
19
19
|
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useAtomValueRaw,
|
|
3
|
+
useSetAtom
|
|
4
|
+
} from "../../chunks/chunk-D6UJHBJJ.js";
|
|
5
|
+
import "../../chunks/chunk-CFNRVI3Y.js";
|
|
6
|
+
import {
|
|
7
|
+
dist_default
|
|
8
|
+
} from "../../chunks/chunk-I4OYYAX5.js";
|
|
9
|
+
import "../../chunks/chunk-CQ52GEHY.js";
|
|
10
|
+
|
|
11
|
+
// src/dashboard/app/MoveConfirmDialog.tsx
|
|
12
|
+
import { Button, Text } from "alinea/components";
|
|
13
|
+
import {
|
|
14
|
+
confirmMovesAtom,
|
|
15
|
+
moveConfirmationAtom
|
|
16
|
+
} from "alinea/dashboard/atoms/moveConfirmation";
|
|
17
|
+
import { useState } from "react";
|
|
18
|
+
import { IcRoundDriveFileMove } from "../icons.js";
|
|
19
|
+
|
|
20
|
+
// src/dashboard/app/MoveConfirmDialog.module.css
|
|
21
|
+
var MoveConfirmDialog_default = {
|
|
22
|
+
"MoveConfirmDialog-actions": "alinea-MoveConfirmDialog-actions",
|
|
23
|
+
"MoveConfirmDialogActions": "alinea-MoveConfirmDialog-actions"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/dashboard/app/MoveConfirmDialog.tsx
|
|
27
|
+
import {
|
|
28
|
+
DashboardModal,
|
|
29
|
+
DashboardModalContent,
|
|
30
|
+
DashboardModalDialog,
|
|
31
|
+
DashboardModalFooter
|
|
32
|
+
} from "./ui/DashboardModal.js";
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
var styles = dist_default(MoveConfirmDialog_default);
|
|
35
|
+
function MoveConfirmDialog() {
|
|
36
|
+
const confirmation = useAtomValueRaw(moveConfirmationAtom);
|
|
37
|
+
const setConfirmMoves = useSetAtom(confirmMovesAtom);
|
|
38
|
+
const [shown, setShown] = useState(confirmation);
|
|
39
|
+
if (confirmation && confirmation !== shown) setShown(confirmation);
|
|
40
|
+
const { pages = [], refusal } = confirmation ?? shown ?? {};
|
|
41
|
+
const single = pages.length === 1;
|
|
42
|
+
const title = single && pages[0].title ? `"${pages[0].title}"` : "this page";
|
|
43
|
+
const answer = (confirmed) => confirmation?.resolve(confirmed);
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
DashboardModal,
|
|
46
|
+
{
|
|
47
|
+
open: Boolean(confirmation),
|
|
48
|
+
onOpenChange: (isOpen) => {
|
|
49
|
+
if (!isOpen) answer(false);
|
|
50
|
+
},
|
|
51
|
+
children: refusal ? /* @__PURE__ */ jsxs(DashboardModalDialog, { label: "Can't move here", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(DashboardModalContent, { children: /* @__PURE__ */ jsx(Text, { as: "p", children: refusal }) }),
|
|
53
|
+
/* @__PURE__ */ jsx(DashboardModalFooter, { children: /* @__PURE__ */ jsx("div", { className: styles.MoveConfirmDialog.actions(), children: /* @__PURE__ */ jsx(Button, { onClick: () => answer(false), children: "OK" }) }) })
|
|
54
|
+
] }) : /* @__PURE__ */ jsxs(DashboardModalDialog, { label: single ? "Move page" : "Move pages", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(DashboardModalContent, { children: /* @__PURE__ */ jsx(Text, { as: "p", children: single ? `Are you sure you want to move ${title}? This permanently changes the URL of this page and of all pages below it.` : `Are you sure you want to move these ${pages.length} pages? This permanently changes their URLs and those of all pages below them.` }) }),
|
|
56
|
+
/* @__PURE__ */ jsxs(DashboardModalFooter, { children: [
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Button,
|
|
59
|
+
{
|
|
60
|
+
variant: "outline",
|
|
61
|
+
onClick: () => {
|
|
62
|
+
setConfirmMoves(false);
|
|
63
|
+
answer(true);
|
|
64
|
+
},
|
|
65
|
+
children: "Move and don't ask again"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: styles.MoveConfirmDialog.actions(), children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: () => answer(false), children: "Cancel" }),
|
|
70
|
+
/* @__PURE__ */ jsx(Button, { icon: IcRoundDriveFileMove, onClick: () => answer(true), children: "Move" })
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
73
|
+
] })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
MoveConfirmDialog
|
|
79
|
+
};
|