@dxos/plugin-navtree 0.13.0 → 0.14.0
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/components.mjs +19 -13
- package/dist/lib/components.mjs.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -28
- package/src/components/Sidebar/L0Menu.tsx +14 -12
- package/src/components/Sidebar/L1Panel.tsx +5 -3
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +3 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
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",
|
|
@@ -126,25 +126,25 @@
|
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@atlaskit/pragmatic-drag-and-drop": "1.7.7",
|
|
128
128
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
129
|
-
"@dxos/app-framework": "0.
|
|
130
|
-
"@dxos/app-graph": "0.
|
|
131
|
-
"@dxos/app-toolkit": "0.
|
|
132
|
-
"@dxos/async": "0.
|
|
133
|
-
"@dxos/compute": "0.
|
|
134
|
-
"@dxos/debug": "0.
|
|
135
|
-
"@dxos/graph": "0.
|
|
136
|
-
"@dxos/keys": "0.
|
|
137
|
-
"@dxos/lit-ui": "0.
|
|
138
|
-
"@dxos/log": "0.
|
|
139
|
-
"@dxos/plugin-attention": "0.
|
|
140
|
-
"@dxos/plugin-deck": "0.
|
|
141
|
-
"@dxos/plugin-graph": "0.
|
|
142
|
-
"@dxos/react-focus": "0.
|
|
143
|
-
"@dxos/react-ui-attention": "0.
|
|
144
|
-
"@dxos/react-ui-list": "0.
|
|
145
|
-
"@dxos/react-ui-menu": "0.
|
|
146
|
-
"@dxos/react-ui-search": "0.
|
|
147
|
-
"@dxos/util": "0.
|
|
129
|
+
"@dxos/app-framework": "0.14.0",
|
|
130
|
+
"@dxos/app-graph": "0.14.0",
|
|
131
|
+
"@dxos/app-toolkit": "0.14.0",
|
|
132
|
+
"@dxos/async": "0.14.0",
|
|
133
|
+
"@dxos/compute": "0.14.0",
|
|
134
|
+
"@dxos/debug": "0.14.0",
|
|
135
|
+
"@dxos/graph": "0.14.0",
|
|
136
|
+
"@dxos/keys": "0.14.0",
|
|
137
|
+
"@dxos/lit-ui": "0.14.0",
|
|
138
|
+
"@dxos/log": "0.14.0",
|
|
139
|
+
"@dxos/plugin-attention": "0.14.0",
|
|
140
|
+
"@dxos/plugin-deck": "0.14.0",
|
|
141
|
+
"@dxos/plugin-graph": "0.14.0",
|
|
142
|
+
"@dxos/react-focus": "0.14.0",
|
|
143
|
+
"@dxos/react-ui-attention": "0.14.0",
|
|
144
|
+
"@dxos/react-ui-list": "0.14.0",
|
|
145
|
+
"@dxos/react-ui-menu": "0.14.0",
|
|
146
|
+
"@dxos/react-ui-search": "0.14.0",
|
|
147
|
+
"@dxos/util": "0.14.0"
|
|
148
148
|
},
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"@effect/atom-react": "4.0.0",
|
|
@@ -155,20 +155,20 @@
|
|
|
155
155
|
"react": "~19.2.7",
|
|
156
156
|
"react-dom": "~19.2.7",
|
|
157
157
|
"vite": "^8.2.2",
|
|
158
|
-
"@dxos/echo": "0.
|
|
159
|
-
"@dxos/plugin-testing": "0.
|
|
160
|
-
"@dxos/random": "0.
|
|
161
|
-
"@dxos/react-ui": "0.
|
|
162
|
-
"@dxos/ui-theme": "0.
|
|
163
|
-
"@dxos/ui-types": "0.
|
|
158
|
+
"@dxos/echo": "0.14.0",
|
|
159
|
+
"@dxos/plugin-testing": "0.14.0",
|
|
160
|
+
"@dxos/random": "0.14.0",
|
|
161
|
+
"@dxos/react-ui": "0.14.0",
|
|
162
|
+
"@dxos/ui-theme": "0.14.0",
|
|
163
|
+
"@dxos/ui-types": "0.14.0"
|
|
164
164
|
},
|
|
165
165
|
"peerDependencies": {
|
|
166
166
|
"@effect/atom-react": "4.0.0",
|
|
167
167
|
"effect": "4.0.0",
|
|
168
168
|
"react": "~19.2.7",
|
|
169
169
|
"react-dom": "~19.2.7",
|
|
170
|
-
"@dxos/react-ui": "^0.
|
|
171
|
-
"@dxos/ui-theme": "^0.
|
|
170
|
+
"@dxos/react-ui": "^0.14.0",
|
|
171
|
+
"@dxos/ui-theme": "^0.14.0"
|
|
172
172
|
},
|
|
173
173
|
"publishConfig": {
|
|
174
174
|
"access": "public"
|
|
@@ -32,6 +32,7 @@ import * as Button from '@dxos/react-ui/Button';
|
|
|
32
32
|
import * as DragHandle from '@dxos/react-ui/DragHandle';
|
|
33
33
|
import * as Hooks from '@dxos/react-ui/Hooks';
|
|
34
34
|
import * as Icon from '@dxos/react-ui/Icon';
|
|
35
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
35
36
|
import * as Main from '@dxos/react-ui/Main';
|
|
36
37
|
import * as ScrollArea from '@dxos/react-ui/ScrollArea';
|
|
37
38
|
import * as Tabs from '@dxos/react-ui/Tabs';
|
|
@@ -233,19 +234,20 @@ const L0Item = memo(({ item, parent, path, pinned, onRearrange, onItemHover }: L
|
|
|
233
234
|
|
|
234
235
|
return (
|
|
235
236
|
<L0ItemRoot ref={itemElement} item={item} parent={parent} path={path} onMouseEnter={handleMouseEnter}>
|
|
236
|
-
<
|
|
237
|
+
<Layout.Flex
|
|
237
238
|
data-frame={true}
|
|
238
239
|
{...(pending && { 'data-pending': true, 'aria-busy': true })}
|
|
239
240
|
{...(hue && { style: { background: `var(--color-${hue}-surface)` } })}
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
center
|
|
242
|
+
classNames={[
|
|
243
|
+
'dx-focus-ring-group-indicator transition-colors rounded-sm',
|
|
242
244
|
pinned
|
|
243
245
|
? 'p-2 group-hover/l0item:bg-current-surface'
|
|
244
246
|
: 'w-(--dx-l0-avatar-size) h-(--dx-l0-avatar-size) bg-current-surface',
|
|
245
|
-
|
|
247
|
+
]}
|
|
246
248
|
>
|
|
247
249
|
<ItemAvatar item={item} />
|
|
248
|
-
</
|
|
250
|
+
</Layout.Flex>
|
|
249
251
|
<L0ItemActiveTabIndicator />
|
|
250
252
|
<span id={`${item.id}__label`} className='sr-only'>
|
|
251
253
|
{localizedString}
|
|
@@ -341,7 +343,7 @@ export const L0Menu = ({
|
|
|
341
343
|
{...landmark}
|
|
342
344
|
data-tauri-drag-region='deep'
|
|
343
345
|
classNames={[
|
|
344
|
-
'group/l0 absolute z-[1] inset-y-0 start-0 rounded-
|
|
346
|
+
'group/l0 absolute z-[1] inset-y-0 start-0 rounded-s',
|
|
345
347
|
'grid grid-cols-[var(--dx-l0-size)] grid-rows-[var(--dx-rail-size)_1fr_min-content_var(--dx-l0-size)] dx-contain-layout',
|
|
346
348
|
'w-(--dx-l0-size) dx-l0-surface dx-app-drag pb-[env(safe-area-inset-bottom)]',
|
|
347
349
|
'[body[data-platform="macos"]_&]:pt-[30px]',
|
|
@@ -380,13 +382,13 @@ export const L0Menu = ({
|
|
|
380
382
|
</ScrollArea.Root>
|
|
381
383
|
|
|
382
384
|
{/* Actions. */}
|
|
383
|
-
<
|
|
385
|
+
<Layout.Grid cols={1} classNames='auto-rows-(--dx-rail-action) pt-2'>
|
|
384
386
|
{pinnedItems.map((item) => (
|
|
385
387
|
<L0Item key={item.id} item={item} parent={parent} path={path} pinned />
|
|
386
388
|
))}
|
|
387
|
-
</
|
|
389
|
+
</Layout.Grid>
|
|
388
390
|
|
|
389
|
-
<
|
|
391
|
+
<Layout.Grid classNames='dx-app-no-drag'>
|
|
390
392
|
{userAccountItem ? (
|
|
391
393
|
<L0ItemRoot key={userAccountItem.id} item={userAccountItem} parent={parent} path={path}>
|
|
392
394
|
<UserAccountAvatar
|
|
@@ -399,11 +401,11 @@ export const L0Menu = ({
|
|
|
399
401
|
/>
|
|
400
402
|
</L0ItemRoot>
|
|
401
403
|
) : (
|
|
402
|
-
<
|
|
404
|
+
<Layout.Flex center classNames='w-full'>
|
|
403
405
|
<UserAccountAvatar size='lg' />
|
|
404
|
-
</
|
|
406
|
+
</Layout.Flex>
|
|
405
407
|
)}
|
|
406
|
-
</
|
|
408
|
+
</Layout.Grid>
|
|
407
409
|
</Tabs.List>
|
|
408
410
|
);
|
|
409
411
|
};
|
|
@@ -15,6 +15,7 @@ import { ActionMenu, type MenuItem } from '@dxos/react-ui-menu';
|
|
|
15
15
|
import * as Button from '@dxos/react-ui/Button';
|
|
16
16
|
import * as Hooks from '@dxos/react-ui/Hooks';
|
|
17
17
|
import * as Icon from '@dxos/react-ui/Icon';
|
|
18
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
18
19
|
import * as Main from '@dxos/react-ui/Main';
|
|
19
20
|
import * as Status from '@dxos/react-ui/Status';
|
|
20
21
|
import * as Tabs from '@dxos/react-ui/Tabs';
|
|
@@ -93,14 +94,15 @@ const L1PanelInner = ({ open, path, id, item, unavailable, isCurrent, onBack }:
|
|
|
93
94
|
>
|
|
94
95
|
{shouldRenderContent &&
|
|
95
96
|
(pending ? (
|
|
96
|
-
<
|
|
97
|
+
<Layout.Flex
|
|
97
98
|
role='status'
|
|
98
99
|
aria-label={t('pending-workspace.label')}
|
|
99
|
-
|
|
100
|
+
justify='center'
|
|
101
|
+
classNames='row-start-2 self-start p-4 animate-fade-in'
|
|
100
102
|
style={{ animationDelay: RENDER_DELAY, animationFillMode: 'backwards' }}
|
|
101
103
|
>
|
|
102
104
|
<Icon.Icon icon='ph--spinner-gap--regular' size='xl' spin />
|
|
103
|
-
</
|
|
105
|
+
</Layout.Flex>
|
|
104
106
|
) : item ? (
|
|
105
107
|
<L1PanelContent open={open} path={path} item={item} onBack={onBack} />
|
|
106
108
|
) : (
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React, { type ComponentProps } from 'react';
|
|
6
6
|
|
|
7
7
|
import * as Avatar from '@dxos/react-ui/Avatar';
|
|
8
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
8
9
|
import { hexToFallback } from '@dxos/util';
|
|
9
10
|
|
|
10
11
|
import { L0ItemActiveTabIndicator } from '../Sidebar/index.ts';
|
|
@@ -26,10 +27,7 @@ export const UserAccountAvatar = ({ size, userId, hue, emoji, status, badge }: U
|
|
|
26
27
|
return (
|
|
27
28
|
<>
|
|
28
29
|
<L0ItemActiveTabIndicator classNames='inset-y-6' />
|
|
29
|
-
<
|
|
30
|
-
className='grid place-items-center dx-focus-ring-group-indicator rounded-full'
|
|
31
|
-
data-joyride='welcome/account'
|
|
32
|
-
>
|
|
30
|
+
<Layout.Grid center classNames='dx-focus-ring-group-indicator rounded-full' data-joyride='welcome/account'>
|
|
33
31
|
{/* Sized by the avatar so the badge sits on its corner, not the cell's. */}
|
|
34
32
|
<span className='relative inline-grid'>
|
|
35
33
|
<Avatar.Root
|
|
@@ -47,7 +45,7 @@ export const UserAccountAvatar = ({ size, userId, hue, emoji, status, badge }: U
|
|
|
47
45
|
/>
|
|
48
46
|
)}
|
|
49
47
|
</span>
|
|
50
|
-
</
|
|
48
|
+
</Layout.Grid>
|
|
51
49
|
</>
|
|
52
50
|
);
|
|
53
51
|
};
|