@dxos/plugin-simple-layout 0.9.0 → 0.9.1-staging.ee54ba693a
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/lib/neutral/capabilities/index.mjs +3 -3
- package/dist/lib/neutral/{chunk-7UDV3JDT.mjs → chunk-5DF656PN.mjs} +2 -2
- package/dist/lib/neutral/{chunk-FD2CAY4Q.mjs → chunk-LLTNQSEB.mjs} +2 -2
- package/dist/lib/neutral/chunk-LLTNQSEB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NTI42Y3O.mjs +8 -0
- package/dist/lib/neutral/chunk-T2JFEPBT.mjs +31 -0
- package/dist/lib/neutral/chunk-T2JFEPBT.mjs.map +7 -0
- package/dist/lib/neutral/{close-WKMURGUB.mjs → close-5ZAMG3N7.mjs} +3 -3
- package/dist/lib/neutral/components/index.mjs +19 -20
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/hooks/index.mjs +8 -8
- package/dist/lib/neutral/hooks/index.mjs.map +3 -3
- package/dist/lib/neutral/index.mjs +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{open-Y4KNROHW.mjs → open-TI35QPEC.mjs} +6 -6
- package/dist/lib/neutral/open-TI35QPEC.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/{react-root-VE265VX4.mjs → react-root-JX7QKKR2.mjs} +2 -2
- package/dist/lib/neutral/{react-root-VE265VX4.mjs.map → react-root-JX7QKKR2.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-N3PGKIYV.mjs → react-surface-UBGUUGUS.mjs} +8 -13
- package/dist/lib/neutral/react-surface-UBGUUGUS.mjs.map +7 -0
- package/dist/lib/neutral/{revert-workspace-ST6NZUNG.mjs → revert-workspace-KI6QHPTX.mjs} +3 -3
- package/dist/lib/neutral/{set-6ZRLWPJS.mjs → set-C4HII3NF.mjs} +3 -3
- package/dist/lib/neutral/{switch-workspace-PYWPTMFO.mjs → switch-workspace-E664GRHY.mjs} +5 -5
- package/dist/lib/neutral/switch-workspace-E664GRHY.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +1 -2
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/lib/neutral/{update-complementary-HKWF5OXT.mjs → update-complementary-BCWHK4SM.mjs} +3 -3
- package/dist/lib/neutral/{update-dialog-P4ASXCE7.mjs → update-dialog-TCKGS26T.mjs} +3 -3
- package/dist/lib/neutral/{update-popover-REAKC2GN.mjs → update-popover-NRI2OATE.mjs} +3 -3
- package/dist/lib/neutral/{url-handler-DGZ4WISE.mjs → url-handler-BJX33VLR.mjs} +5 -5
- package/dist/lib/neutral/url-handler-BJX33VLR.mjs.map +7 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -18
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +1 -5
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -11
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +1 -1
- package/dist/types/src/components/ContentError.stories.d.ts +0 -1
- package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +3 -4
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +0 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +0 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/SimpleLayoutCapabilities.d.ts +1 -1
- package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +20 -0
- package/package.json +36 -35
- package/src/capabilities/react-root.tsx +1 -1
- package/src/capabilities/react-surface.tsx +10 -17
- package/src/capabilities/url-handler.ts +4 -4
- package/src/components/Home/Home.tsx +5 -5
- package/src/components/MobileLayout/MobileLayout.stories.tsx +12 -12
- package/src/components/MobileLayout/MobileLayout.tsx +1 -1
- package/src/components/NavBranch/NavBranch.tsx +2 -2
- package/src/components/Popover/Popover.tsx +7 -5
- package/src/components/SimpleLayout/AppBar.stories.tsx +3 -3
- package/src/components/SimpleLayout/AppBar.tsx +2 -2
- package/src/components/SimpleLayout/SimpleLayout.tsx +6 -6
- package/src/hooks/actions.ts +2 -2
- package/src/hooks/useAppBarProps.ts +3 -2
- package/src/hooks/useCompanions.ts +2 -2
- package/src/hooks/useDrawerActions.ts +1 -1
- package/src/hooks/useNavbarActions.ts +1 -1
- package/src/meta.ts +3 -13
- package/src/operations/open.ts +5 -8
- package/src/operations/switch-workspace.ts +2 -2
- package/src/translations.ts +1 -2
- package/src/types/SimpleLayoutCapabilities.ts +2 -2
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NKAPURKM.mjs +0 -8
- package/dist/lib/neutral/chunk-OK5336TS.mjs +0 -22
- package/dist/lib/neutral/chunk-OK5336TS.mjs.map +0 -7
- package/dist/lib/neutral/open-Y4KNROHW.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-N3PGKIYV.mjs.map +0 -7
- package/dist/lib/neutral/switch-workspace-PYWPTMFO.mjs.map +0 -7
- package/dist/lib/neutral/url-handler-DGZ4WISE.mjs.map +0 -7
- /package/dist/lib/neutral/{chunk-7UDV3JDT.mjs.map → chunk-5DF656PN.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-NKAPURKM.mjs.map → chunk-NTI42Y3O.mjs.map} +0 -0
- /package/dist/lib/neutral/{close-WKMURGUB.mjs.map → close-5ZAMG3N7.mjs.map} +0 -0
- /package/dist/lib/neutral/{revert-workspace-ST6NZUNG.mjs.map → revert-workspace-KI6QHPTX.mjs.map} +0 -0
- /package/dist/lib/neutral/{set-6ZRLWPJS.mjs.map → set-C4HII3NF.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-complementary-HKWF5OXT.mjs.map → update-complementary-BCWHK4SM.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-dialog-P4ASXCE7.mjs.map → update-dialog-TCKGS26T.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-popover-REAKC2GN.mjs.map → update-popover-NRI2OATE.mjs.map} +0 -0
|
@@ -4,11 +4,11 @@ import "../chunk-J5LGTIGS.mjs";
|
|
|
4
4
|
import { Capability } from "@dxos/app-framework";
|
|
5
5
|
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-MSPO34DT.mjs"));
|
|
6
6
|
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-EAIE7KPR.mjs"));
|
|
7
|
-
var ReactRoot = Capability.lazy("ReactRoot", () => import("../react-root-
|
|
8
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-
|
|
7
|
+
var ReactRoot = Capability.lazy("ReactRoot", () => import("../react-root-JX7QKKR2.mjs"));
|
|
8
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-UBGUUGUS.mjs"));
|
|
9
9
|
var SpotlightDismiss = Capability.lazy("SpotlightDismiss", () => import("../spotlight-dismiss-EIYW5E7M.mjs"));
|
|
10
10
|
var State = Capability.lazy("State", () => import("../state-7NXKBLPY.mjs"));
|
|
11
|
-
var UrlHandler = Capability.lazy("UrlHandler", () => import("../url-handler-
|
|
11
|
+
var UrlHandler = Capability.lazy("UrlHandler", () => import("../url-handler-BJX33VLR.mjs"));
|
|
12
12
|
export {
|
|
13
13
|
AppGraphBuilder,
|
|
14
14
|
OperationHandler,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SimpleLayoutCapabilities_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLTNQSEB.mjs";
|
|
4
4
|
|
|
5
5
|
// src/operations/state-access.ts
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
@@ -19,4 +19,4 @@ var layoutStateAccess = Effect.gen(function* () {
|
|
|
19
19
|
export {
|
|
20
20
|
layoutStateAccess
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-5DF656PN.mjs.map
|
|
@@ -9,7 +9,7 @@ __export(SimpleLayoutCapabilities_exports, {
|
|
|
9
9
|
});
|
|
10
10
|
import { Capability } from "@dxos/app-framework";
|
|
11
11
|
import { meta } from "#meta";
|
|
12
|
-
var State = Capability.make(`${meta.
|
|
12
|
+
var State = Capability.make(`${meta.profile.key}.state`);
|
|
13
13
|
|
|
14
14
|
// src/types/SimpleLayoutEvents.ts
|
|
15
15
|
var SimpleLayoutEvents_exports = {};
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
SimpleLayoutCapabilities_exports,
|
|
24
24
|
SimpleLayoutEvents_exports
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-LLTNQSEB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/SimpleLayoutCapabilities.ts", "../../../src/types/SimpleLayoutEvents.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Label } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport type DrawerState = 'closed' | 'open' | 'expanded';\n\nexport type SimpleLayoutState = {\n content?: any;\n previousWorkspace: string;\n workspace: string;\n active?: string;\n dialogOpen: boolean;\n dialogType?: 'default' | 'alert';\n dialogBlockAlign?: 'start' | 'center' | 'end';\n dialogOverlayClasses?: string;\n dialogOverlayStyle?: Record<string, any>;\n dialogContent?: { component: string; props?: any } | null;\n popoverOpen?: boolean;\n popoverSide?: 'top' | 'right' | 'bottom' | 'left';\n popoverVariant?: 'virtual' | 'react';\n popoverAnchor?: HTMLButtonElement;\n popoverAnchorId?: string;\n popoverKind?: 'base' | 'card' | 'rename';\n popoverTitle?: Label;\n popoverContent?: { component: string; props?: any } | { subject: any } | null;\n drawerState: DrawerState;\n history: string[];\n isPopover?: boolean;\n companionVariant?: string;\n};\n\nexport const State = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.profile.key}.state`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport * as SimpleLayoutCapabilities from './SimpleLayoutCapabilities';\n\n/** Fired when State capability is ready. */\nexport const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(\n SimpleLayoutCapabilities.State.identifier,\n);\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;;;;AAQA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;AA6Bd,IAAMC,QAAQF,WAAWG,KAAuC,GAAGF,KAAKG,QAAQC,GAAG,QAAQ;;;ACxClG;;;;AAOA,SAASC,2BAA2B;AAK7B,IAAMC,aAA8CC,oBAAoBC,iBACpDC,MAAMC,UAAU;",
|
|
6
|
+
"names": ["Capability", "meta", "State", "make", "profile", "key", "AppActivationEvents", "StateReady", "AppActivationEvents", "createStateEvent", "State", "identifier"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/operations/index.ts
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var SimpleLayoutOperationHandlerSet = OperationHandlerSet.lazy(() => import("./close-5ZAMG3N7.mjs"), () => import("./open-TI35QPEC.mjs"), () => import("./revert-workspace-KI6QHPTX.mjs"), () => import("./set-C4HII3NF.mjs"), () => import("./set-layout-mode-L22HRCKS.mjs"), () => import("./switch-workspace-E664GRHY.mjs"), () => import("./update-complementary-BCWHK4SM.mjs"), () => import("./update-dialog-TCKGS26T.mjs"), () => import("./update-popover-NRI2OATE.mjs"), () => import("./update-sidebar-O5SQPR6Q.mjs"));
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
SimpleLayoutOperationHandlerSet
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-NTI42Y3O.mjs.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
|
|
4
|
+
// dx.config.ts
|
|
5
|
+
import { Config2 } from "@dxos/app-framework/config";
|
|
6
|
+
import { trim } from "@dxos/util";
|
|
7
|
+
var dx_config_default = Config2.make({
|
|
8
|
+
plugin: {
|
|
9
|
+
key: "org.dxos.plugin.simpleLayout",
|
|
10
|
+
name: "Simple Layout",
|
|
11
|
+
author: "DXOS",
|
|
12
|
+
description: trim`
|
|
13
|
+
Minimal layout plugin for simplified UI contexts like popover windows.
|
|
14
|
+
Provides basic content rendering without sidebars or complex navigation.
|
|
15
|
+
`,
|
|
16
|
+
icon: {
|
|
17
|
+
key: "ph--layout--regular"
|
|
18
|
+
},
|
|
19
|
+
tags: [
|
|
20
|
+
"system"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// src/meta.ts
|
|
26
|
+
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
meta
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-T2JFEPBT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.simpleLayout',\n name: 'Simple Layout',\n author: 'DXOS',\n description: trim`\n Minimal layout plugin for simplified UI contexts like popover windows.\n Provides basic content rendering without sidebars or complex navigation.\n `,\n icon: { key: 'ph--layout--regular' },\n tags: ['system'],\n },\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;IAIbO,MAAM;MAAEJ,KAAK;IAAsB;IACnCK,MAAM;MAAC;;EACT;AACF,CAAA;;;ADXO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
|
|
6
|
+
"names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "icon", "tags", "meta", "Plugin", "getMetaFromConfig", "config"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutStateAccess
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5DF656PN.mjs";
|
|
4
|
+
import "./chunk-LLTNQSEB.mjs";
|
|
5
5
|
import "./chunk-J5LGTIGS.mjs";
|
|
6
6
|
|
|
7
7
|
// src/operations/close.ts
|
|
@@ -32,4 +32,4 @@ var close_default = handler;
|
|
|
32
32
|
export {
|
|
33
33
|
close_default as default
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=close-
|
|
35
|
+
//# sourceMappingURL=close-5ZAMG3N7.mjs.map
|
|
@@ -56,7 +56,7 @@ import { Card } from "@dxos/react-ui";
|
|
|
56
56
|
import { Mosaic } from "@dxos/react-ui-mosaic";
|
|
57
57
|
import { SearchPanel, useSearchListItem, useSearchListResults } from "@dxos/react-ui-search";
|
|
58
58
|
import { mx } from "@dxos/ui-theme";
|
|
59
|
-
import {
|
|
59
|
+
import { Position, getHostPlatform, isTauri } from "@dxos/util";
|
|
60
60
|
import { meta } from "#meta";
|
|
61
61
|
|
|
62
62
|
// src/components/hooks.ts
|
|
@@ -80,7 +80,7 @@ var useExpandPath = (nodeId) => {
|
|
|
80
80
|
|
|
81
81
|
// src/components/Home/Home.tsx
|
|
82
82
|
var Home = (_) => {
|
|
83
|
-
const { t } = useTranslation(meta.
|
|
83
|
+
const { t } = useTranslation(meta.profile.key);
|
|
84
84
|
const userAccountItem = useItemsByDisposition("user-account")[0];
|
|
85
85
|
const pinnedItems = useItemsByDisposition("pin-end", true);
|
|
86
86
|
const workspaceItems = useItemsByDisposition("workspace");
|
|
@@ -119,7 +119,7 @@ var Home = (_) => {
|
|
|
119
119
|
};
|
|
120
120
|
var WorkspaceTile = (props) => {
|
|
121
121
|
const data = props.data;
|
|
122
|
-
const { t } = useTranslation(meta.
|
|
122
|
+
const { t } = useTranslation(meta.profile.key);
|
|
123
123
|
const { invokePromise } = useOperationInvoker();
|
|
124
124
|
const { selectedValue, registerItem, unregisterItem } = useSearchListItem();
|
|
125
125
|
const name = toLocalizedString(data.properties.label, t);
|
|
@@ -161,9 +161,7 @@ var WorkspaceTile = (props) => {
|
|
|
161
161
|
classNames: mx("dx-focus-ring", isSelected && "bg-selected-surface"),
|
|
162
162
|
onClick: handleSelect,
|
|
163
163
|
ref: cardRef
|
|
164
|
-
}, /* @__PURE__ */ React2.createElement(Card.Header, {
|
|
165
|
-
density: "md"
|
|
166
|
-
}, /* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement(Avatar.Content, {
|
|
164
|
+
}, /* @__PURE__ */ React2.createElement(Card.Header, null, /* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement(Avatar.Content, {
|
|
167
165
|
icon: data.properties.icon,
|
|
168
166
|
hue: data.properties.hue,
|
|
169
167
|
hueVariant: "transparent",
|
|
@@ -184,7 +182,7 @@ var useItemsByDisposition = (disposition, sort = false) => {
|
|
|
184
182
|
const connections = useConnections(graph, Node.RootId, "child");
|
|
185
183
|
return useMemo(() => {
|
|
186
184
|
const filtered = connections.filter((node) => filterItems(node, disposition));
|
|
187
|
-
return sort ? filtered.toSorted((a, b) =>
|
|
185
|
+
return sort ? filtered.toSorted((a, b) => Position.compare(a.properties, b.properties)) : filtered;
|
|
188
186
|
}, [
|
|
189
187
|
connections,
|
|
190
188
|
disposition,
|
|
@@ -468,7 +466,7 @@ var PopoverRoot = ({ children }) => {
|
|
|
468
466
|
}), children));
|
|
469
467
|
};
|
|
470
468
|
var PopoverContent = () => {
|
|
471
|
-
const { t } = useTranslation2(meta2.
|
|
469
|
+
const { t } = useTranslation2(meta2.profile.key);
|
|
472
470
|
const { state, updateState } = useSimpleLayoutState();
|
|
473
471
|
const { setOpen } = useLayoutPopoverContext("PopoverContent");
|
|
474
472
|
const handleClose = useCallback3(() => {
|
|
@@ -512,7 +510,7 @@ var PopoverContent = () => {
|
|
|
512
510
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
513
511
|
onInteractOutside: handleInteractOutside,
|
|
514
512
|
onEscapeKeyDown: handleInteractOutside
|
|
515
|
-
}, /* @__PURE__ */ React5.createElement(Popover.Viewport, null, state.popoverKind === "base" && state.popoverContent && "component" in state.popoverContent && /* @__PURE__ */ React5.createElement(Surface.Surface, {
|
|
513
|
+
}, /* @__PURE__ */ React5.createElement(Popover.Viewport, null, (state.popoverKind === "base" || state.popoverKind === "rename") && state.popoverContent && "component" in state.popoverContent && /* @__PURE__ */ React5.createElement(Surface.Surface, {
|
|
516
514
|
type: AppSurface.Popover,
|
|
517
515
|
data: state.popoverContent,
|
|
518
516
|
limit: 1
|
|
@@ -523,7 +521,7 @@ var PopoverContent = () => {
|
|
|
523
521
|
action: "close",
|
|
524
522
|
onClick: handleClose
|
|
525
523
|
})), state.popoverContent && "subject" in state.popoverContent && /* @__PURE__ */ React5.createElement(Surface.Surface, {
|
|
526
|
-
type: AppSurface.
|
|
524
|
+
type: AppSurface.CardContent,
|
|
527
525
|
data: state.popoverContent,
|
|
528
526
|
limit: 1
|
|
529
527
|
}))), /* @__PURE__ */ React5.createElement(Popover.Arrow, null)));
|
|
@@ -539,7 +537,7 @@ import { osTranslations } from "@dxos/ui-theme";
|
|
|
539
537
|
import { meta as meta3 } from "#meta";
|
|
540
538
|
var APP_BAR_NAME = "SimpleLayout.AppBar";
|
|
541
539
|
var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAnchorId, onAction, onBack, ...props }, forwardedRef) => {
|
|
542
|
-
const { t } = useTranslation3(meta3.
|
|
540
|
+
const { t } = useTranslation3(meta3.profile.key);
|
|
543
541
|
const menuActions = useMenuActions(actions);
|
|
544
542
|
const actionsValue = useAtomValue(actions);
|
|
545
543
|
const hasActions = actionsValue.nodes.length > 0;
|
|
@@ -571,7 +569,7 @@ var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAn
|
|
|
571
569
|
className: "text-center truncate font-thin uppercase"
|
|
572
570
|
}, displayTitle), hasActions ? /* @__PURE__ */ React6.createElement(AnchorRoot, null, /* @__PURE__ */ React6.createElement(Menu.Root, {
|
|
573
571
|
...menuActions,
|
|
574
|
-
caller: meta3.
|
|
572
|
+
caller: meta3.profile.key,
|
|
575
573
|
onAction
|
|
576
574
|
}, /* @__PURE__ */ React6.createElement(Menu.Trigger, {
|
|
577
575
|
asChild: true
|
|
@@ -784,11 +782,11 @@ var useSelectedCompanion = (companions, preferredVariant) => {
|
|
|
784
782
|
var SimpleLayout = () => {
|
|
785
783
|
const { state } = useSimpleLayoutState5();
|
|
786
784
|
const [keyboardOpen, setKeyboardOpen] = useState3(false);
|
|
787
|
-
const [splitterMode, setSplitterMode] = useState3("
|
|
785
|
+
const [splitterMode, setSplitterMode] = useState3("start");
|
|
788
786
|
const drawerRef = useRef4(null);
|
|
789
787
|
useLayoutEffect2(() => {
|
|
790
788
|
if (!keyboardOpen) {
|
|
791
|
-
setSplitterMode(state.drawerState === "closed" ? "
|
|
789
|
+
setSplitterMode(state.drawerState === "closed" ? "start" : state.drawerState === "open" ? "split" : "end");
|
|
792
790
|
}
|
|
793
791
|
}, [
|
|
794
792
|
state.drawerState,
|
|
@@ -802,15 +800,16 @@ var SimpleLayout = () => {
|
|
|
802
800
|
}, /* @__PURE__ */ React11.createElement(MobileLayout.Panel, {
|
|
803
801
|
safe: {
|
|
804
802
|
top: true,
|
|
805
|
-
bottom: splitterMode === "
|
|
803
|
+
bottom: splitterMode === "start"
|
|
806
804
|
}
|
|
807
805
|
}, /* @__PURE__ */ React11.createElement(Splitter.Root, {
|
|
806
|
+
orientation: "vertical",
|
|
808
807
|
mode: splitterMode,
|
|
809
|
-
|
|
808
|
+
size: 24
|
|
810
809
|
}, /* @__PURE__ */ React11.createElement(Splitter.Panel, {
|
|
811
|
-
position: "
|
|
810
|
+
position: "start"
|
|
812
811
|
}, /* @__PURE__ */ React11.createElement(Main, null)), /* @__PURE__ */ React11.createElement(Splitter.Panel, {
|
|
813
|
-
position: "
|
|
812
|
+
position: "end",
|
|
814
813
|
ref: drawerRef
|
|
815
814
|
}, /* @__PURE__ */ React11.createElement(Drawer, null))), /* @__PURE__ */ React11.createElement(Dialog, null), /* @__PURE__ */ React11.createElement(PopoverContent, null))))));
|
|
816
815
|
};
|
|
@@ -828,7 +827,7 @@ import { SearchPanel as SearchPanel2, useSearchListItem as useSearchListItem2, u
|
|
|
828
827
|
import { mx as mx3 } from "@dxos/ui-theme";
|
|
829
828
|
import { meta as meta4 } from "#meta";
|
|
830
829
|
var NavBranch = ({ id }) => {
|
|
831
|
-
const { t } = useTranslation4(meta4.
|
|
830
|
+
const { t } = useTranslation4(meta4.profile.key);
|
|
832
831
|
const { graph } = useAppGraph5();
|
|
833
832
|
useExpandPath(id);
|
|
834
833
|
const children = useConnections2(graph, id, "child");
|
|
@@ -857,7 +856,7 @@ var NavBranch = ({ id }) => {
|
|
|
857
856
|
};
|
|
858
857
|
var NavBranchTile = (props) => {
|
|
859
858
|
const data = props.data;
|
|
860
|
-
const { t } = useTranslation4(meta4.
|
|
859
|
+
const { t } = useTranslation4(meta4.profile.key);
|
|
861
860
|
const { invokePromise } = useOperationInvoker2();
|
|
862
861
|
const ref = useRef5(null);
|
|
863
862
|
const { selectedValue, registerItem, unregisterItem } = useSearchListItem2();
|