@dxos/plugin-navtree 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f
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/browser/{chunk-TLQLMZXU.mjs → chunk-33VLL4IJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-TLQLMZXU.mjs.map → chunk-33VLL4IJ.mjs.map} +1 -1
- package/dist/lib/browser/chunk-MFAWMFJC.mjs +1418 -0
- package/dist/lib/browser/chunk-MFAWMFJC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{intent-resolver-PW7B76HO.mjs → intent-resolver-NAYKKAOP.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-M3CAS7ZP.mjs → react-surface-HGA3TAQU.mjs} +3 -3
- package/dist/lib/browser/{state-3UBYOTQT.mjs → state-R2UMYAHN.mjs} +2 -2
- package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +1 -2
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/hooks.d.ts.map +1 -1
- package/package.json +36 -35
- package/src/components/NavTree/NavTree.stories.tsx +1 -1
- package/src/components/NavTreeContainer.tsx +13 -15
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +2 -10
- package/src/components/Sidebar/L0Menu.tsx +3 -5
- package/src/components/Sidebar/L1Panel.tsx +1 -1
- package/src/hooks.ts +11 -12
- package/dist/lib/browser/chunk-UM2C5XK3.mjs +0 -1301
- package/dist/lib/browser/chunk-UM2C5XK3.mjs.map +0 -7
- /package/dist/lib/browser/{intent-resolver-PW7B76HO.mjs.map → intent-resolver-NAYKKAOP.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-M3CAS7ZP.mjs.map → react-surface-HGA3TAQU.mjs.map} +0 -0
- /package/dist/lib/browser/{state-3UBYOTQT.mjs.map → state-R2UMYAHN.mjs.map} +0 -0
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
CommandsTrigger,
|
|
4
4
|
NavTreeContainer,
|
|
5
5
|
NavTreeDocumentTitle
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-MFAWMFJC.mjs";
|
|
7
|
+
import "./chunk-33VLL4IJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
COMMANDS_DIALOG,
|
|
10
10
|
NAVTREE_PLUGIN
|
|
@@ -48,4 +48,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
48
48
|
export {
|
|
49
49
|
react_surface_default as default
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=react-surface-
|
|
51
|
+
//# sourceMappingURL=react-surface-HGA3TAQU.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NavTreeCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-33VLL4IJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
NAVTREE_PLUGIN
|
|
6
6
|
} from "./chunk-IEW3JD5C.mjs";
|
|
@@ -111,4 +111,4 @@ var state_default = (context) => {
|
|
|
111
111
|
export {
|
|
112
112
|
state_default as default
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=state-
|
|
114
|
+
//# sourceMappingURL=state-R2UMYAHN.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAsBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAgC/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,gBAAgB,+DAA2C,qBAAqB,
|
|
1
|
+
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAsBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAgC/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,gBAAgB,+DAA2C,qBAAqB,uBA2P3F,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type Action, type Node } from '@dxos/app-graph';
|
|
3
3
|
import { type ActionProperties } from '../../types';
|
|
4
4
|
export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
@@ -6,7 +6,6 @@ export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
|
6
6
|
caller?: string;
|
|
7
7
|
monolithic?: boolean;
|
|
8
8
|
menuActions?: Action[];
|
|
9
|
-
suppressNextTooltip?: MutableRefObject<boolean>;
|
|
10
9
|
};
|
|
11
10
|
export declare const NavTreeItemActionDropdownMenu: ({ parent, label, icon, testId, menuActions, caller, }: NavTreeItemActionMenuProps) => React.JSX.Element;
|
|
12
11
|
export declare const NavTreeItemMonolithicAction: ({ parent, properties: { disabled, caller, testId, icon, variant, iconOnly }, data: invoke, baseLabel, }: Action & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAMzD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GAAG;IAC1D,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAaF,eAAO,MAAM,6BAA6B,GAAI,uDAO3C,0BAA0B,sBAoB5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,yGAKzC,MAAM,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,sBA0BnF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,qDAAqD,0BAA0B,sBAWhH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAaA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAY5C,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AA4QhF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACzB,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,4EAA4E,WAAW,
|
|
1
|
+
{"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAaA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAY5C,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AA4QhF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACzB,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,4EAA4E,WAAW,sBAuF7G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,GAAI,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,GAAI,OAAO,IAAI,SAU7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.8.2-
|
|
3
|
+
"version": "0.8.2-staging.4d6ad0f",
|
|
4
4
|
"description": "DXOS Surface plugin for a tree view visualization of the graph.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -25,34 +25,35 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
|
|
27
27
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
|
|
28
|
-
"@preact/
|
|
28
|
+
"@preact-signals/safe-react": "^0.9.0",
|
|
29
|
+
"@preact/signals-core": "^1.9.0",
|
|
29
30
|
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
30
31
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
31
32
|
"date-fns": "^3.3.1",
|
|
32
33
|
"effect": "^3.13.3",
|
|
33
|
-
"@dxos/app-framework": "0.8.2-
|
|
34
|
-
"@dxos/app-graph": "0.8.2-
|
|
35
|
-
"@dxos/async": "0.8.2-
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/live-object": "0.8.2-
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/plugin-graph": "0.8.2-
|
|
46
|
-
"@dxos/plugin-observability": "0.8.2-
|
|
47
|
-
"@dxos/protocols": "0.8.2-
|
|
48
|
-
"@dxos/react-ui-
|
|
49
|
-
"@dxos/react-
|
|
50
|
-
"@dxos/react-ui-
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-stack": "0.8.2-
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
34
|
+
"@dxos/app-framework": "0.8.2-staging.4d6ad0f",
|
|
35
|
+
"@dxos/app-graph": "0.8.2-staging.4d6ad0f",
|
|
36
|
+
"@dxos/async": "0.8.2-staging.4d6ad0f",
|
|
37
|
+
"@dxos/echo-schema": "0.8.2-staging.4d6ad0f",
|
|
38
|
+
"@dxos/keyboard": "0.8.2-staging.4d6ad0f",
|
|
39
|
+
"@dxos/echo": "0.8.2-staging.4d6ad0f",
|
|
40
|
+
"@dxos/debug": "0.8.2-staging.4d6ad0f",
|
|
41
|
+
"@dxos/live-object": "0.8.2-staging.4d6ad0f",
|
|
42
|
+
"@dxos/local-storage": "0.8.2-staging.4d6ad0f",
|
|
43
|
+
"@dxos/log": "0.8.2-staging.4d6ad0f",
|
|
44
|
+
"@dxos/plugin-deck": "0.8.2-staging.4d6ad0f",
|
|
45
|
+
"@dxos/invariant": "0.8.2-staging.4d6ad0f",
|
|
46
|
+
"@dxos/plugin-graph": "0.8.2-staging.4d6ad0f",
|
|
47
|
+
"@dxos/plugin-observability": "0.8.2-staging.4d6ad0f",
|
|
48
|
+
"@dxos/protocols": "0.8.2-staging.4d6ad0f",
|
|
49
|
+
"@dxos/react-ui-menu": "0.8.2-staging.4d6ad0f",
|
|
50
|
+
"@dxos/react-ui-list": "0.8.2-staging.4d6ad0f",
|
|
51
|
+
"@dxos/react-ui-attention": "0.8.2-staging.4d6ad0f",
|
|
52
|
+
"@dxos/react-ui-searchlist": "0.8.2-staging.4d6ad0f",
|
|
53
|
+
"@dxos/react-ui-stack": "0.8.2-staging.4d6ad0f",
|
|
54
|
+
"@dxos/react-ui-tabs": "0.8.2-staging.4d6ad0f",
|
|
55
|
+
"@dxos/util": "0.8.2-staging.4d6ad0f",
|
|
56
|
+
"@dxos/react-client": "0.8.2-staging.4d6ad0f"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -63,14 +64,14 @@
|
|
|
63
64
|
"react": "~18.2.0",
|
|
64
65
|
"react-dom": "~18.2.0",
|
|
65
66
|
"vite": "5.4.7",
|
|
66
|
-
"@dxos/plugin-attention": "0.8.2-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/plugin-theme": "0.8.2-
|
|
70
|
-
"@dxos/random": "0.8.2-
|
|
71
|
-
"@dxos/react-ui
|
|
72
|
-
"@dxos/react-ui": "0.8.2-
|
|
73
|
-
"@dxos/storybook-utils": "0.8.2-
|
|
67
|
+
"@dxos/plugin-attention": "0.8.2-staging.4d6ad0f",
|
|
68
|
+
"@dxos/echo-signals": "0.8.2-staging.4d6ad0f",
|
|
69
|
+
"@dxos/plugin-storybook-layout": "0.8.2-staging.4d6ad0f",
|
|
70
|
+
"@dxos/plugin-theme": "0.8.2-staging.4d6ad0f",
|
|
71
|
+
"@dxos/random": "0.8.2-staging.4d6ad0f",
|
|
72
|
+
"@dxos/react-ui": "0.8.2-staging.4d6ad0f",
|
|
73
|
+
"@dxos/react-ui-theme": "0.8.2-staging.4d6ad0f",
|
|
74
|
+
"@dxos/storybook-utils": "0.8.2-staging.4d6ad0f"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
77
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -79,8 +80,8 @@
|
|
|
79
80
|
"effect": "^3.13.3",
|
|
80
81
|
"react": "~18.2.0",
|
|
81
82
|
"react-dom": "~18.2.0",
|
|
82
|
-
"@dxos/react-ui": "0.8.2-
|
|
83
|
-
"@dxos/react-ui-theme": "0.8.2-
|
|
83
|
+
"@dxos/react-ui": "0.8.2-staging.4d6ad0f",
|
|
84
|
+
"@dxos/react-ui-theme": "0.8.2-staging.4d6ad0f"
|
|
84
85
|
},
|
|
85
86
|
"publishConfig": {
|
|
86
87
|
"access": "public"
|
|
@@ -80,7 +80,7 @@ const StoryPlank = ({ attendableId }: { attendableId: string }) => {
|
|
|
80
80
|
<Toolbar.Button>Test</Toolbar.Button>
|
|
81
81
|
</Toolbar.Root>
|
|
82
82
|
|
|
83
|
-
<div className={mx(container, 'm-2 bg-
|
|
83
|
+
<div className={mx(container, 'm-2 bg-activeSurface')}>
|
|
84
84
|
<Input.Root>
|
|
85
85
|
<Input.Label>Level 1 (group)</Input.Label>
|
|
86
86
|
</Input.Root>
|
|
@@ -100,24 +100,22 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
|
|
|
100
100
|
[graph],
|
|
101
101
|
);
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// );
|
|
103
|
+
const loadDescendents = useCallback(
|
|
104
|
+
(node: Node) => {
|
|
105
|
+
graph.expand(node.id, 'outbound');
|
|
106
|
+
// Load one level deeper, which resolves some juddering observed on open/close.
|
|
107
|
+
graph.getConnections(node.id, 'outbound').forEach((child) => {
|
|
108
|
+
graph.expand(child.id, 'outbound');
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
[graph],
|
|
112
|
+
);
|
|
114
113
|
|
|
115
114
|
const handleOpenChange = useCallback(
|
|
116
115
|
({ item: { id }, path, open }: { item: Node; path: string[]; open: boolean }) => {
|
|
117
116
|
// TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.
|
|
118
117
|
setItem(path, 'open', open);
|
|
119
|
-
|
|
120
|
-
// graph.expand(id, 'outbound');
|
|
118
|
+
graph.expand(id, 'outbound');
|
|
121
119
|
},
|
|
122
120
|
[graph],
|
|
123
121
|
);
|
|
@@ -284,7 +282,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
|
|
|
284
282
|
useItems,
|
|
285
283
|
tab,
|
|
286
284
|
getActions,
|
|
287
|
-
|
|
285
|
+
loadDescendents,
|
|
288
286
|
renderItemEnd,
|
|
289
287
|
popoverAnchorId,
|
|
290
288
|
topbar,
|
|
@@ -302,7 +300,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
|
|
|
302
300
|
[
|
|
303
301
|
tab,
|
|
304
302
|
getActions,
|
|
305
|
-
|
|
303
|
+
loadDescendents,
|
|
306
304
|
renderItemEnd,
|
|
307
305
|
popoverAnchorId,
|
|
308
306
|
topbar,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type Action, type Node } from '@dxos/app-graph';
|
|
8
8
|
import { useTranslation, toLocalizedString, IconButton, useDensityContext } from '@dxos/react-ui';
|
|
@@ -17,7 +17,6 @@ export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
|
17
17
|
caller?: string;
|
|
18
18
|
monolithic?: boolean;
|
|
19
19
|
menuActions?: Action[];
|
|
20
|
-
suppressNextTooltip?: MutableRefObject<boolean>;
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
const fallbackIcon = 'ph--placeholder--regular';
|
|
@@ -40,16 +39,10 @@ export const NavTreeItemActionDropdownMenu = ({
|
|
|
40
39
|
caller,
|
|
41
40
|
}: NavTreeItemActionMenuProps) => {
|
|
42
41
|
const { t } = useTranslation(NAVTREE_PLUGIN);
|
|
43
|
-
const suppressNextTooltip = useRef<boolean>(false);
|
|
44
42
|
const density = useDensityContext();
|
|
45
43
|
return (
|
|
46
44
|
<MenuProvider>
|
|
47
|
-
<DropdownMenu.Root
|
|
48
|
-
group={parent}
|
|
49
|
-
items={menuActions as MenuItem[]}
|
|
50
|
-
caller={caller}
|
|
51
|
-
suppressNextTooltip={suppressNextTooltip}
|
|
52
|
-
>
|
|
45
|
+
<DropdownMenu.Root group={parent} items={menuActions as MenuItem[]} caller={caller}>
|
|
53
46
|
<DropdownMenu.Trigger asChild>
|
|
54
47
|
<IconButton
|
|
55
48
|
{...(density === 'coarse' ? coarseActionButtonProps : fineActionButtonProps)}
|
|
@@ -59,7 +52,6 @@ export const NavTreeItemActionDropdownMenu = ({
|
|
|
59
52
|
iconOnly
|
|
60
53
|
label={toLocalizedString(label, t)}
|
|
61
54
|
data-testid={testId}
|
|
62
|
-
suppressNextTooltip={suppressNextTooltip}
|
|
63
55
|
/>
|
|
64
56
|
</DropdownMenu.Trigger>
|
|
65
57
|
</DropdownMenu.Root>
|
|
@@ -231,8 +231,8 @@ const L0Item = ({ item, parent, path, pinned, onRearrange }: L0ItemProps) => {
|
|
|
231
231
|
'flex justify-center items-center dx-focus-ring-group-indicator transition-colors rounded',
|
|
232
232
|
// TODO(burdon): Create reusable button/component and/or create var for size.
|
|
233
233
|
pinned
|
|
234
|
-
? 'bg-transparent w-[50px] p-2 group-hover/l0item:bg-
|
|
235
|
-
: 'bg-
|
|
234
|
+
? 'bg-transparent w-[50px] p-2 group-hover/l0item:bg-activeSurface'
|
|
235
|
+
: 'bg-activeSurface w-[50px] h-[50px]',
|
|
236
236
|
)}
|
|
237
237
|
{...(hue && { style: { background: `var(--dx-${hue}Surface)` } })}
|
|
238
238
|
>
|
|
@@ -313,14 +313,13 @@ export type L0MenuProps = {
|
|
|
313
313
|
|
|
314
314
|
export const L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent, path }: L0MenuProps) => {
|
|
315
315
|
const { t } = useTranslation(NAVTREE_PLUGIN);
|
|
316
|
-
const suppressNextTooltip = useRef(true);
|
|
317
316
|
|
|
318
317
|
return (
|
|
319
318
|
<Tabs.Tablist
|
|
320
319
|
classNames={[
|
|
321
320
|
'group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is-lg',
|
|
322
321
|
'grid grid-cols-[var(--l0-size)] grid-rows-[var(--rail-size)_1fr_min-content_var(--l0-size)] gap-1 contain-layout',
|
|
323
|
-
'!is-[--l0-size] bg-baseSurface border-ie border-
|
|
322
|
+
'!is-[--l0-size] bg-baseSurface border-ie border-subduedSeparator app-drag pbe-[env(safe-area-inset-bottom)]',
|
|
324
323
|
]}
|
|
325
324
|
>
|
|
326
325
|
<div role='none' className='flex justify-center p-1'>
|
|
@@ -336,7 +335,6 @@ export const L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountIte
|
|
|
336
335
|
label={t('app menu label')}
|
|
337
336
|
tooltipSide='right'
|
|
338
337
|
classNames='w-[50px] _bg-primary-500'
|
|
339
|
-
suppressNextTooltip={suppressNextTooltip}
|
|
340
338
|
data-testid='spacePlugin.addSpace'
|
|
341
339
|
/>
|
|
342
340
|
</DropdownMenu.Trigger>
|
|
@@ -83,7 +83,7 @@ const L1Panel = ({ open, item, path, currentItemId, onBack }: L1PanelProps) => {
|
|
|
83
83
|
>
|
|
84
84
|
{item.id === currentItemId && (
|
|
85
85
|
<>
|
|
86
|
-
<h2 className='flex items-center border-be border-
|
|
86
|
+
<h2 className='flex items-center border-be border-subduedSeparator app-drag pli-1'>
|
|
87
87
|
{backCapable ? (
|
|
88
88
|
<TitleButton title={title} onClick={handleBack} />
|
|
89
89
|
) : (
|
package/src/hooks.ts
CHANGED
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type Node } from '@dxos/app-graph';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import { useNavTreeContext } from './components';
|
|
10
10
|
|
|
11
11
|
export const useLoadDescendents = (root?: Node) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// }, [root]);
|
|
12
|
+
const { loadDescendents } = useNavTreeContext();
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const frame = requestAnimationFrame(() => {
|
|
15
|
+
if (root) {
|
|
16
|
+
void loadDescendents?.(root);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return () => cancelAnimationFrame(frame);
|
|
20
|
+
}, [root]);
|
|
22
21
|
};
|