@dxos/plugin-navtree 0.7.5-main.ff8607b → 0.7.5-staging.b81e783

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.
Files changed (57) hide show
  1. package/dist/lib/browser/{chunk-EO6JEADO.mjs → chunk-7OKF4GP3.mjs} +116 -73
  2. package/dist/lib/browser/chunk-7OKF4GP3.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +3 -3
  4. package/dist/lib/browser/index.mjs.map +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/{react-surface-6ZP5XUTS.mjs → react-surface-SIEGT4YS.mjs} +2 -2
  7. package/dist/lib/browser/{state-65TQKYX7.mjs → state-IEFQTUPG.mjs} +2 -2
  8. package/dist/lib/browser/state-IEFQTUPG.mjs.map +7 -0
  9. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  10. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  11. package/dist/types/src/components/CommandsDialog.d.ts +1 -2
  12. package/dist/types/src/components/CommandsDialog.d.ts.map +1 -1
  13. package/dist/types/src/components/CommandsTrigger.d.ts +1 -2
  14. package/dist/types/src/components/CommandsTrigger.d.ts.map +1 -1
  15. package/dist/types/src/components/HaloButton.d.ts +1 -2
  16. package/dist/types/src/components/HaloButton.d.ts.map +1 -1
  17. package/dist/types/src/components/HaloButton.stories.d.ts +1 -2
  18. package/dist/types/src/components/HaloButton.stories.d.ts.map +1 -1
  19. package/dist/types/src/components/L0Menu.d.ts +1 -2
  20. package/dist/types/src/components/L0Menu.d.ts.map +1 -1
  21. package/dist/types/src/components/L1Panels.d.ts +8 -3
  22. package/dist/types/src/components/L1Panels.d.ts.map +1 -1
  23. package/dist/types/src/components/NavTree.d.ts +1 -2
  24. package/dist/types/src/components/NavTree.d.ts.map +1 -1
  25. package/dist/types/src/components/NavTreeContainer.d.ts +1 -1
  26. package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
  27. package/dist/types/src/components/NavTreeItemAction.d.ts +4 -4
  28. package/dist/types/src/components/NavTreeItemAction.d.ts.map +1 -1
  29. package/dist/types/src/components/NavTreeItemAction.stories.d.ts +1 -1
  30. package/dist/types/src/components/NavTreeItemColumns.d.ts +1 -1
  31. package/dist/types/src/components/NavTreeItemColumns.d.ts.map +1 -1
  32. package/dist/types/src/components/NotchStart.d.ts +1 -2
  33. package/dist/types/src/components/NotchStart.d.ts.map +1 -1
  34. package/dist/types/src/components/types.d.ts +2 -1
  35. package/dist/types/src/components/types.d.ts.map +1 -1
  36. package/dist/types/src/experimental/Tree.d.ts +8 -8
  37. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  38. package/dist/types/src/experimental/Tree.stories.d.ts +2 -3
  39. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  40. package/dist/types/src/stories/StorybookNavTree.d.ts +1 -2
  41. package/dist/types/src/stories/StorybookNavTree.d.ts.map +1 -1
  42. package/dist/types/src/util.d.ts +1 -1
  43. package/package.json +31 -31
  44. package/src/NavTreePlugin.tsx +2 -2
  45. package/src/capabilities/state.ts +1 -1
  46. package/src/components/L0Menu.tsx +83 -53
  47. package/src/components/L1Panels.tsx +25 -6
  48. package/src/components/NavTree.stories.tsx +1 -1
  49. package/src/components/NavTree.tsx +3 -3
  50. package/src/components/NavTreeContainer.tsx +9 -2
  51. package/src/components/types.ts +12 -10
  52. package/src/hooks.ts +1 -1
  53. package/src/stories/Graph.stories.tsx +1 -1
  54. package/src/util.ts +2 -2
  55. package/dist/lib/browser/chunk-EO6JEADO.mjs.map +0 -7
  56. package/dist/lib/browser/state-65TQKYX7.mjs.map +0 -7
  57. /package/dist/lib/browser/{react-surface-6ZP5XUTS.mjs.map → react-surface-SIEGT4YS.mjs.map} +0 -0
@@ -6,7 +6,16 @@ import React, { type MouseEvent, useCallback, useMemo } from 'react';
6
6
 
7
7
  import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { type Node } from '@dxos/app-graph';
9
- import { Icon, toLocalizedString, Tooltip, useMediaQuery, useSidebars, useTranslation } from '@dxos/react-ui';
9
+ import {
10
+ Icon,
11
+ Popover,
12
+ ScrollArea,
13
+ toLocalizedString,
14
+ Tooltip,
15
+ useMediaQuery,
16
+ useSidebars,
17
+ useTranslation,
18
+ } from '@dxos/react-ui';
10
19
  import { Tabs } from '@dxos/react-ui-tabs';
11
20
  import { mx } from '@dxos/react-ui-theme';
12
21
 
@@ -74,7 +83,7 @@ const L0Item = ({ item, parent, path, pinned }: L0ItemProps) => {
74
83
  const { t } = useTranslation(NAVTREE_PLUGIN);
75
84
  const type = l0ItemType(item);
76
85
  const itemPath = useMemo(() => [...path, item.id], [item.id, path]);
77
- const { getProps } = useNavTreeContext();
86
+ const { getProps, popoverAnchorId } = useNavTreeContext();
78
87
  const { id, testId } = getProps?.(item, path) ?? {};
79
88
  const Root = type === 'collection' ? 'h2' : type === 'tab' ? Tabs.TabPrimitive : 'button';
80
89
  const handleClick = useL0ItemClick({ item, path: itemPath, parent }, type);
@@ -85,49 +94,62 @@ const L0Item = ({ item, parent, path, pinned }: L0ItemProps) => {
85
94
  ? { onClick: handleClick, 'data-testid': testId, 'data-itemid': id }
86
95
  : { onClick: handleClick };
87
96
  const localizedString = toLocalizedString(item.properties.label, t);
97
+ const hue = item.properties.hue ?? null;
88
98
  const avatarValue = useMemo(
89
- () => (type === 'tab' ? getFirstTwoRenderableChars(localizedString).join('') : []),
99
+ () => (type === 'tab' ? getFirstTwoRenderableChars(localizedString).join('').toUpperCase() : []),
90
100
  [type, item.properties.label, t],
91
101
  );
92
- return (
93
- <Tooltip.Root delayDuration={0}>
94
- <Tooltip.Trigger asChild>
95
- <Root
96
- {...(rootProps as any)}
97
- data-type={type}
102
+ const hueFgStyle = hue && { style: { color: `var(--dx-${hue}SurfaceText)` } };
103
+
104
+ const l0ItemTrigger = (
105
+ <Root
106
+ {...(rootProps as any)}
107
+ data-type={type}
108
+ className={mx(
109
+ 'group/l0i dx-focus-ring-group grid overflow-hidden relative data[type!="collection"]:cursor-pointer app-no-drag',
110
+ l0Breakpoints[item.properties.l0Breakpoint],
111
+ )}
112
+ >
113
+ {type !== 'collection' && (
114
+ <div
115
+ role='none'
98
116
  className={mx(
99
- 'group/l0i dx-focus-ring-group grid overflow-hidden relative data[type!="collection"]:cursor-pointer app-no-drag',
100
- l0Breakpoints[item.properties.l0Breakpoint],
101
- )}
102
- >
103
- {type !== 'collection' && (
104
- <div
105
- role='none'
106
- className={mx(
107
- 'absolute -z-[1] group-hover/l0i:bg-input dx-focus-ring-group-indicator transition-colors',
108
- type === 'tab' || pinned ? 'rounded' : 'rounded-full',
109
- pinned ? 'bg-transparent inset-inline-3 inset-block-0' : 'bg-input inset-inline-3 inset-block-2',
110
- )}
111
- />
117
+ 'absolute -z-[1] dx-focus-ring-group-indicator transition-colors',
118
+ type === 'tab' || pinned ? 'rounded' : 'rounded-full',
119
+ pinned
120
+ ? 'bg-transparent group-hover/l0i:bg-groupSurface inset-inline-3 inset-block-0.5'
121
+ : 'bg-groupSurface inset-inline-3 inset-block-2',
112
122
  )}
113
- <div
114
- role='none'
115
- className='hidden group-aria-selected/l0i:block absolute inline-start-0 inset-block-4 is-1 bg-accentSurface rounded-ie'
116
- />
117
- {type === 'tab' && item.properties.disposition !== 'pin-end' ? (
118
- <span role='img' className='place-self-center text-3xl font-light'>
119
- {avatarValue}
120
- </span>
121
- ) : (
122
- item.properties.icon && (
123
- <Icon icon={item.properties.icon} size={pinned ? 5 : 7} classNames='place-self-center' />
124
- )
125
- )}
126
- <span id={`${item.id}__label`} className='sr-only'>
127
- {localizedString}
123
+ {...(hue && { style: { background: `var(--dx-${hue}Surface)` } })}
124
+ />
125
+ )}
126
+ <div
127
+ role='none'
128
+ className='hidden group-aria-selected/l0i:block absolute inline-start-0 inset-block-4 is-1 bg-accentSurface rounded-ie'
129
+ />
130
+ {(item.properties.icon && (
131
+ <Icon icon={item.properties.icon} size={pinned ? 5 : 7} classNames='place-self-center' {...hueFgStyle} />
132
+ )) ||
133
+ (type === 'tab' && item.properties.disposition !== 'pin-end' ? (
134
+ <span role='img' className='place-self-center text-3xl font-light' {...hueFgStyle}>
135
+ {avatarValue}
128
136
  </span>
129
- </Root>
130
- </Tooltip.Trigger>
137
+ ) : (
138
+ item.properties.icon && (
139
+ <Icon icon='ph--planet--regular' size={pinned ? 5 : 7} classNames='place-self-center' {...hueFgStyle} />
140
+ )
141
+ ))}
142
+ <span id={`${item.id}__label`} className='sr-only'>
143
+ {localizedString}
144
+ </span>
145
+ </Root>
146
+ );
147
+
148
+ return popoverAnchorId === id ? (
149
+ <Popover.Anchor asChild>{l0ItemTrigger}</Popover.Anchor>
150
+ ) : (
151
+ <Tooltip.Root delayDuration={0}>
152
+ <Tooltip.Trigger asChild>{l0ItemTrigger}</Tooltip.Trigger>
131
153
  <Tooltip.Portal>
132
154
  <Tooltip.Content side='right'>
133
155
  {localizedString}
@@ -152,7 +174,8 @@ const L0Collection = ({ item, path, parent }: L0ItemProps) => {
152
174
  data-itemid={id}
153
175
  data-testid={testId}
154
176
  >
155
- <L0Item item={item} parent={parent} path={groupPath} />
177
+ {/* TODO(burdon): Option. */}
178
+ {/* <L0Item item={item} parent={parent} path={groupPath} /> */}
156
179
  {collectionItems.map((collectionItem) => (
157
180
  <L0Item key={collectionItem.id} item={collectionItem} parent={item} path={groupPath} />
158
181
  ))}
@@ -172,19 +195,26 @@ export const L0Menu = ({
172
195
  path: string[];
173
196
  }) => {
174
197
  return (
175
- <Tabs.Tablist classNames='group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is-lg grid grid-cols-[var(--l0-size)] grid-rows-[1fr_min-content_var(--l0-size)] contain-layout !is-[--l0-size] bg-baseSurface border-ie border-separator app-drag'>
176
- <div
177
- role='none'
178
- className='grid auto-rows-[calc(var(--l0-size)-.5rem)] min-bs-0 !overflow-y-auto plb-1 [body[data-platform="darwin"]_&]:pbs-[calc(30px+0.25rem)]'
179
- >
180
- {topLevelItems.map((item) => {
181
- if (l0ItemType(item) === 'collection') {
182
- return <L0Collection key={item.id} item={item} parent={parent} path={path} />;
183
- } else {
184
- return <L0Item key={item.id} item={item} parent={parent} path={path} />;
185
- }
186
- })}
187
- </div>
198
+ <Tabs.Tablist classNames='group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is-lg grid grid-cols-[var(--l0-size)] grid-rows-[1fr_min-content_var(--l0-size)] contain-layout !is-[--l0-size] bg-baseSurface border-ie border-separator app-drag pbe-[env(safe-area-inset-bottom)]'>
199
+ <ScrollArea.Root>
200
+ <ScrollArea.Viewport>
201
+ <div
202
+ role='none'
203
+ className='grid auto-rows-[calc(var(--l0-size)-.5rem)] plb-1 [body[data-platform="darwin"]_&]:pbs-[calc(30px+0.25rem)] [body[data-platform="ios"]_&]:pbs-[max(env(safe-area-inset-top),0.25rem)]'
204
+ >
205
+ {topLevelItems.map((item) => {
206
+ if (l0ItemType(item) === 'collection') {
207
+ return <L0Collection key={item.id} item={item} parent={parent} path={path} />;
208
+ } else {
209
+ return <L0Item key={item.id} item={item} parent={parent} path={path} />;
210
+ }
211
+ })}
212
+ </div>
213
+ <ScrollArea.Scrollbar orientation='vertical'>
214
+ <ScrollArea.Thumb />
215
+ </ScrollArea.Scrollbar>
216
+ </ScrollArea.Viewport>
217
+ </ScrollArea.Root>
188
218
  <div role='none' className='grid grid-cols-1 auto-rows-[--rail-action] pbs-2'>
189
219
  {pinnedItems
190
220
  .filter((item) => l0ItemType(item) !== 'collection')
@@ -6,9 +6,10 @@ import React, { useMemo } from 'react';
6
6
 
7
7
  import { useLayout } from '@dxos/app-framework';
8
8
  import { type Node } from '@dxos/app-graph';
9
- import { toLocalizedString, useTranslation } from '@dxos/react-ui';
9
+ import { IconButton, toLocalizedString, useTranslation } from '@dxos/react-ui';
10
10
  import { Tree } from '@dxos/react-ui-list';
11
11
  import { Tabs } from '@dxos/react-ui-tabs';
12
+ import { hoverableControlItem, hoverableOpenControlItem, mx } from '@dxos/react-ui-theme';
12
13
 
13
14
  import { useNavTreeContext } from './NavTreeContext';
14
15
  import { NavTreeItemColumns } from './NavTreeItemColumns';
@@ -16,9 +17,9 @@ import { useLoadDescendents } from '../hooks';
16
17
  import { NAVTREE_PLUGIN } from '../meta';
17
18
  import { l0ItemType } from '../util';
18
19
 
19
- type L1PanelProps = { item: Node<any>; path: string[]; currentItemId: string };
20
+ export type L1PanelProps = { item: Node<any>; path: string[]; currentItemId: string; onBack?: () => void };
20
21
 
21
- const L1Panel = ({ item, path, currentItemId }: L1PanelProps) => {
22
+ const L1Panel = ({ item, path, currentItemId, onBack }: L1PanelProps) => {
22
23
  const layout = useLayout();
23
24
  const navTreeContext = useNavTreeContext();
24
25
  const { t } = useTranslation(NAVTREE_PLUGIN);
@@ -27,7 +28,7 @@ const L1Panel = ({ item, path, currentItemId }: L1PanelProps) => {
27
28
  key={item.id}
28
29
  value={item.id}
29
30
  classNames={[
30
- 'absolute inset-block-0 inline-end-0 is-[calc(100%-var(--l0-size))] lg:is-[--l1-size] grid-cols-1 grid-rows-[var(--rail-size)_1fr]',
31
+ 'absolute inset-block-0 inline-end-0 is-[calc(100%-var(--l0-size))] lg:is-[--l1-size] grid-cols-1 grid-rows-[var(--rail-size)_1fr] pbs-[env(safe-area-inset-top)]',
31
32
  item.id === currentItemId && 'grid',
32
33
  ]}
33
34
  tabIndex={-1}
@@ -36,6 +37,23 @@ const L1Panel = ({ item, path, currentItemId }: L1PanelProps) => {
36
37
  {item.id === currentItemId && (
37
38
  <>
38
39
  <h2 className='flex items-center border-be border-separator pis-4 app-drag'>
40
+ {item.properties.disposition === 'pin-end' && (
41
+ <IconButton
42
+ label={t('back label')}
43
+ iconOnly
44
+ icon='ph--caret-left--regular'
45
+ size={5}
46
+ density='fine'
47
+ variant='ghost'
48
+ classNames={mx(
49
+ 'shrink-0 mie-2',
50
+ 'pli-2 pointer-fine:pli-1',
51
+ hoverableControlItem,
52
+ hoverableOpenControlItem,
53
+ )}
54
+ onClick={onBack}
55
+ />
56
+ )}
39
57
  <span className='flex-1 truncate cursor-default'>{toLocalizedString(item.properties.label, t)}</span>
40
58
  <NavTreeItemColumns path={path} item={item} open />
41
59
  </h2>
@@ -77,7 +95,8 @@ export const L1Panels = ({
77
95
  topLevelItems,
78
96
  path,
79
97
  currentItemId,
80
- }: {
98
+ onBack,
99
+ }: Pick<L1PanelProps, 'onBack'> & {
81
100
  topLevelItems: Node<any>[];
82
101
  path: string[];
83
102
  currentItemId: string;
@@ -90,7 +109,7 @@ export const L1Panels = ({
90
109
  case 'collection':
91
110
  return <L1PanelCollection key={item.id} item={item} path={path} currentItemId={currentItemId} />;
92
111
  case 'tab':
93
- return <L1Panel key={item.id} item={item} path={path} currentItemId={currentItemId} />;
112
+ return <L1Panel key={item.id} item={item} path={path} currentItemId={currentItemId} onBack={onBack} />;
94
113
  default:
95
114
  return null;
96
115
  }
@@ -13,7 +13,7 @@ import { isActionLike, type NodeArg } from '@dxos/app-graph';
13
13
  import { create, type ReactiveObject } from '@dxos/live-object';
14
14
  import { faker } from '@dxos/random';
15
15
  import { isTreeData, type TreeData } from '@dxos/react-ui-list';
16
- import { Path } from '@dxos/react-ui-mosaic';
16
+ import { Path } from '@dxos/react-ui-list';
17
17
  import { withLayout, withTheme } from '@dxos/storybook-utils';
18
18
 
19
19
  import { StorybookNavTree } from '../stories/StorybookNavTree';
@@ -16,8 +16,8 @@ import { useLoadDescendents } from '../hooks';
16
16
  export const NAV_TREE_ITEM = 'NavTreeItem';
17
17
 
18
18
  export const NavTree = ({ id, root }: NavTreeProps) => {
19
- const { getItems, tab } = useNavTreeContext();
20
- const topLevelActions = getItems(root, 'item');
19
+ const { tab, getItems, onBack } = useNavTreeContext();
20
+ const topLevelActions = getItems(root, 'item').toSorted((a, b) => byPosition(a.properties, b.properties));
21
21
  const topLevelCollections = getItems(root, 'collection');
22
22
  const topLevelWorkspaces = getItems(root, 'workspace');
23
23
  const topLevelNavigation = getItems(root, 'navigation');
@@ -35,7 +35,7 @@ export const NavTree = ({ id, root }: NavTreeProps) => {
35
35
  // NOTE(thure): 74px (rather than rem) is intentional in order to match the size of macOS windowing controls
36
36
  <Tabs.Root value={tab} orientation='vertical' verticalVariant='stateless' classNames='relative'>
37
37
  <L0Menu topLevelItems={l0Items} pinnedItems={pinnedItems} path={path} parent={root} />
38
- <L1Panels topLevelItems={topLevelItems} path={path} currentItemId={tab} />
38
+ <L1Panels topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} />
39
39
  </Tabs.Root>
40
40
  );
41
41
  };
@@ -64,7 +64,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
64
64
  return graph.nodes(node ?? graph.root, {
65
65
  filter: (node): node is Node => {
66
66
  return untracked(() => {
67
- const action = isActionLike(node);
67
+ const action = isAction(node);
68
68
  if (!disposition) {
69
69
  return !action || node.properties.disposition === 'item';
70
70
  }
@@ -130,7 +130,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
130
130
  // Open the first item if the workspace is empty.
131
131
  if (layout.active.length === 0) {
132
132
  const [item] = getItems(node).filter((node) => !isActionLike(node));
133
- if (item) {
133
+ if (item && item.data) {
134
134
  await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [item.id] }));
135
135
  }
136
136
  }
@@ -192,6 +192,11 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
192
192
  [graph, dispatch, isCurrent, isLg],
193
193
  );
194
194
 
195
+ const onBack = useCallback(
196
+ () => dispatch(createIntent(LayoutAction.RevertWorkspace, { part: 'workspace', options: { revert: true } })),
197
+ [dispatch],
198
+ );
199
+
195
200
  // TODO(wittjosiah): Factor out hook.
196
201
  useEffect(() => {
197
202
  return monitorForElements({
@@ -255,6 +260,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
255
260
  () => ({
256
261
  tab,
257
262
  onTabChange,
263
+ onBack,
258
264
  getActions,
259
265
  loadDescendents,
260
266
  renderItemEnd,
@@ -271,6 +277,7 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
271
277
  [
272
278
  tab,
273
279
  onTabChange,
280
+ onBack,
274
281
  getActions,
275
282
  loadDescendents,
276
283
  renderItemEnd,
@@ -8,6 +8,7 @@ import type { Node } from '@dxos/app-graph';
8
8
  import type { TreeProps } from '@dxos/react-ui-list';
9
9
  import type { MaybePromise } from '@dxos/util';
10
10
 
11
+ import { type L1PanelProps } from './L1Panels';
11
12
  import type { FlattenedActions, NavTreeItemGraphNode } from '../types';
12
13
 
13
14
  export type NavTreeItemColumnsProps = {
@@ -21,13 +22,14 @@ export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'>;
21
22
  export type NavTreeContextValue = Pick<
22
23
  TreeProps<NavTreeItemGraphNode>,
23
24
  'getProps' | 'isCurrent' | 'isOpen' | 'onOpenChange' | 'canDrop' | 'onSelect'
24
- > & {
25
- tab: string;
26
- onTabChange?: (node: NavTreeItemGraphNode) => void;
27
- getItems: (node?: NavTreeItemGraphNode, disposition?: string) => NavTreeItemGraphNode[];
28
- getActions: (node: Node) => FlattenedActions;
29
- loadDescendents?: (node: Node) => MaybePromise<void>;
30
- renderItemEnd?: FC<{ node: Node; open: boolean }>;
31
- popoverAnchorId?: string;
32
- topbar?: boolean;
33
- };
25
+ > &
26
+ Pick<L1PanelProps, 'onBack'> & {
27
+ tab: string;
28
+ onTabChange?: (node: NavTreeItemGraphNode) => void;
29
+ getItems: (node?: NavTreeItemGraphNode, disposition?: string) => NavTreeItemGraphNode[];
30
+ getActions: (node: Node) => FlattenedActions;
31
+ loadDescendents?: (node: Node) => MaybePromise<void>;
32
+ renderItemEnd?: FC<{ node: Node; open: boolean }>;
33
+ popoverAnchorId?: string;
34
+ topbar?: boolean;
35
+ };
package/src/hooks.ts CHANGED
@@ -6,7 +6,7 @@ import { useEffect } from 'react';
6
6
 
7
7
  import { type Node } from '@dxos/app-graph';
8
8
 
9
- import { useNavTreeContext } from './components/NavTreeContext';
9
+ import { useNavTreeContext } from './components';
10
10
 
11
11
  export const useLoadDescendents = (root?: Node) => {
12
12
  const { loadDescendents } = useNavTreeContext();
@@ -15,7 +15,7 @@ import { registerSignalsRuntime } from '@dxos/echo-signals/react';
15
15
  import { create, type ReactiveObject } from '@dxos/live-object';
16
16
  import { faker } from '@dxos/random';
17
17
  import { isTreeData, type PropsFromTreeItem } from '@dxos/react-ui-list';
18
- import { Path } from '@dxos/react-ui-mosaic';
18
+ import { Path } from '@dxos/react-ui-list';
19
19
  import { withLayout, withTheme } from '@dxos/storybook-utils';
20
20
 
21
21
  import { StorybookNavTree } from './StorybookNavTree';
package/src/util.ts CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  isAction,
13
13
  isActionLike,
14
14
  } from '@dxos/app-graph';
15
- import { nonNullable } from '@dxos/util';
15
+ import { isNonNullable } from '@dxos/util';
16
16
 
17
17
  import { type FlattenedActions, type NavTreeItemGraphNode } from './types';
18
18
 
@@ -95,7 +95,7 @@ export const getChildren = (
95
95
  const nextPath = [...path, node.id];
96
96
  return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);
97
97
  })
98
- .filter(nonNullable) as NavTreeItemGraphNode[];
98
+ .filter(isNonNullable) as NavTreeItemGraphNode[];
99
99
  };
100
100
 
101
101
  export const getActions = (graph: Graph, node: Node): FlattenedActions => {
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/CommandsDialog.tsx", "../../../src/components/CommandsTrigger.tsx", "../../../src/components/NotchStart.tsx", "../../../src/components/HaloButton.tsx", "../../../src/util.ts", "../../../src/components/NavTreeContainer.tsx", "../../../src/components/NavTree.tsx", "../../../src/components/L0Menu.tsx", "../../../src/components/NavTreeContext.tsx", "../../../src/hooks.ts", "../../../src/components/L1Panels.tsx", "../../../src/components/NavTreeItemColumns.tsx", "../../../src/components/NavTreeItemAction.tsx", "../../../src/capabilities/index.ts", "../../../src/components/NavTreeDocumentTitle.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { createIntent, LayoutAction, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';\nimport { type ActionLike, isActionGroup, isAction } from '@dxos/app-graph';\nimport { Keyboard, keySymbols } from '@dxos/keyboard';\nimport { Button, Dialog, Icon, useTranslation, toLocalizedString } from '@dxos/react-ui';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { KEY_BINDING, NAVTREE_PLUGIN } from '../meta';\n\n// TODO(wittjosiah): This probably deserves its own plugin but for now it lives here w/ other navigation UI.\nexport const CommandsDialogContent = ({ selected: initial }: { selected?: string }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const [selected, setSelected] = useState<string | undefined>(initial);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n\n // Traverse graph.\n // TODO(burdon): Factor out commonality with shortcut dialog.\n const allActions = useMemo(() => {\n // TODO(burdon): Get from navtree (not keyboard).\n const current = Keyboard.singleton.getCurrentContext();\n const actionMap = new Set<string>();\n const actions: ActionLike[] = [];\n graph?.traverse({\n visitor: (node, path) => {\n if (\n (isAction(node) || isActionGroup(node)) &&\n !actionMap.has(node.id) &&\n current.startsWith(path.slice(0, -1).join('/'))\n ) {\n actionMap.add(node.id);\n actions.push(node);\n }\n },\n });\n\n actions.sort((a, b) => {\n return toLocalizedString(a.properties.label, t)\n ?.toLowerCase()\n .localeCompare(toLocalizedString(b.properties.label, t)?.toLowerCase());\n });\n\n // console.log(JSON.stringify(actions, undefined, 2));\n return actions;\n }, [graph]);\n\n const group = allActions.find(({ id }) => id === selected);\n const actions = isActionGroup(group) ? graph.actions(group) : allActions;\n\n return (\n <Dialog.Content classNames={['md:max-is-[30rem] overflow-hidden mbs-12']}>\n <Dialog.Title>{t('commands dialog title', { ns: NAVTREE_PLUGIN })}</Dialog.Title>\n\n {/* TODO(burdon): BUG: Overscrolls container. */}\n <SearchList.Root label={t('command list input placeholder')} classNames='flex flex-col grow overflow-hidden my-2'>\n <SearchList.Input placeholder={t('command list input placeholder')} classNames='px-1 my-2' />\n <SearchList.Content classNames='max-bs-[24rem] overflow-auto'>\n {actions?.map((action) => {\n const label = toLocalizedString(action.properties.label, t);\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n return (\n <SearchList.Item\n value={label}\n key={action.id}\n onSelect={() => {\n if (action.properties.disabled) {\n return;\n }\n\n if (isActionGroup(action)) {\n setSelected(action.id);\n return;\n }\n\n void dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } }));\n setTimeout(() => {\n const node = graph.nodes(group ?? action, { relation: 'inbound' })[0];\n void (node && isAction(action) && action.data({ node, caller: KEY_BINDING }));\n });\n }}\n classNames='flex items-center gap-2'\n disabled={action.properties.disabled}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon} size={4} />\n <span className='grow truncate'>{label}</span>\n {shortcut && <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>}\n </SearchList.Item>\n );\n })}\n </SearchList.Content>\n </SearchList.Root>\n\n <Dialog.Close asChild>\n <Button variant='primary' classNames='mbs-2'>\n {t('close label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { MagnifyingGlass } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n return (\n <Button\n classNames='m-1 pli-1 lg:pli-2'\n onClick={() =>\n dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: COMMANDS_DIALOG,\n options: {\n blockAlign: 'start',\n },\n }),\n )\n }\n >\n <span className='text-description font-normal grow text-start'>{t('command list input placeholder')}</span>\n <MagnifyingGlass className={getSize(5)} />\n </Button>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createIntent, useCapabilities, useIntentDispatcher } from '@dxos/app-framework';\nimport { ClientAction } from '@dxos/plugin-client/types';\nimport { ObservabilityCapabilities } from '@dxos/plugin-observability';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { HaloButton } from './HaloButton';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin (ClientPlugin?).\nexport const NotchStart = () => {\n const identity = useIdentity();\n // TODO(wittjosiah): Can this be removed now?\n const [observability] = useCapabilities(ObservabilityCapabilities.Observability);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n return (\n <HaloButton\n size={12}\n identityKey={identity?.identityKey.toHex()}\n hue={identity?.profile?.data?.hue}\n emoji={identity?.profile?.data?.emoji}\n internal={observability?.group === 'dxos'}\n onClick={() => dispatch(createIntent(ClientAction.ShareIdentity))}\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ConnectionState, useNetworkStatus } from '@dxos/react-client/mesh';\nimport { Avatar, type Size } from '@dxos/react-ui';\nimport { focusRing, mx } from '@dxos/react-ui-theme';\nimport { hexToFallback } from '@dxos/util';\n\nconst INTERNAL = 'https://avatars.githubusercontent.com/u/57182821';\n\nexport type HaloButtonProps = {\n size?: Size;\n identityKey?: string;\n hue?: string;\n emoji?: string;\n internal?: boolean;\n onClick?: () => void;\n};\n\nexport const HaloButton = (props: HaloButtonProps) => {\n const { onClick, identityKey, internal, size = 8 } = props;\n const fallbackValue = hexToFallback(identityKey ?? '0');\n const { swarm: connectionState } = useNetworkStatus();\n return (\n <button className={mx(focusRing, 'rounded grid place-items-center')} onClick={onClick}>\n <Avatar.Root\n size={size}\n variant='circle'\n status={connectionState === ConnectionState.OFFLINE ? 'error' : internal ? 'internal' : 'active'}\n hue={props.hue || fallbackValue.hue}\n >\n <Avatar.Frame data-testid='treeView.haloButton' data-joyride='welcome/halo'>\n {internal ? <Avatar.Image href={INTERNAL} /> : <Avatar.Fallback text={props.emoji || fallbackValue.emoji} />}\n </Avatar.Frame>\n </Avatar.Root>\n </button>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n type Action,\n type Node,\n type NodeFilter,\n type Graph,\n ACTION_TYPE,\n ACTION_GROUP_TYPE,\n isAction,\n isActionLike,\n} from '@dxos/app-graph';\nimport { nonNullable } from '@dxos/util';\n\nimport { type FlattenedActions, type NavTreeItemGraphNode } from './types';\n\nexport const getParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return graph.nodes(node, { relation: 'inbound' }).find((n) => n.id === parentId) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n persistenceClass: string,\n): NavTreeItemGraphNode | null => {\n if (node.properties.acceptPersistenceClass?.has(persistenceClass)) {\n return node;\n } else {\n const parent = getParent(graph, node, path);\n return parent ? getPersistenceParent(graph, parent, path.slice(0, path.length - 1), persistenceClass) : null;\n }\n};\n\nexport const resolveMigrationOperation = (\n graph: Graph,\n activeNode: NavTreeItemGraphNode,\n destinationPath: string[],\n destinationRelatedNode?: NavTreeItemGraphNode,\n): 'transfer' | 'copy' | 'reject' => {\n const activeClass = activeNode.properties.persistenceClass;\n if (destinationRelatedNode && activeClass) {\n const persistenceParent = getPersistenceParent(graph, destinationRelatedNode, destinationPath, activeClass);\n if (persistenceParent) {\n const activeKey = activeNode.properties.persistenceKey;\n if (activeKey && persistenceParent?.properties.acceptPersistenceKey) {\n return persistenceParent.properties.acceptPersistenceKey.has(activeKey) &&\n persistenceParent.properties.onTransferStart\n ? 'transfer'\n : persistenceParent.properties.onCopy\n ? 'copy'\n : 'reject';\n } else {\n return 'reject';\n }\n } else {\n return 'reject';\n }\n } else {\n return 'reject';\n }\n};\n\n// TODO(wittjosiah): Move into node implementation?\nexport const sortActions = (actions: Action[]): Action[] =>\n actions.sort((a, b) => {\n if (a.properties.disposition === b.properties.disposition) {\n return 0;\n }\n\n if (a.properties.disposition === 'toolbar') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getChildren = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n filter?: NodeFilter,\n path: readonly string[] = [],\n): NavTreeItemGraphNode[] => {\n return graph\n .nodes(node, { relation: 'outbound', filter })\n .map((n) => {\n // Break cycles.\n const nextPath = [...path, node.id];\n return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);\n })\n .filter(nonNullable) as NavTreeItemGraphNode[];\n};\n\nexport const getActions = (graph: Graph, node: Node): FlattenedActions => {\n return graph.actions(node).reduce(\n (acc: FlattenedActions, arg) => {\n if (arg.properties.disposition === 'item') {\n return acc;\n }\n\n acc.actions.push(arg);\n if (!isAction(arg)) {\n const actionGroup = graph.actions(arg);\n acc.groupedActions[arg.id] = actionGroup;\n }\n return acc;\n },\n { actions: [], groupedActions: {} },\n );\n};\n\nexport const expandChildrenAndActions = (graph: Graph, node: Node) => {\n return Promise.all([expandChildren(graph, node), expandActions(graph, node)]);\n};\n\nexport const expandChildren = (graph: Graph, node: Node) => {\n return graph.expand(node, 'outbound');\n};\n\nexport const expandActions = (graph: Graph, node: Node) => {\n return Promise.all([graph.expand(node, 'outbound', ACTION_TYPE), graph.expand(node, 'outbound', ACTION_GROUP_TYPE)]);\n};\n\nexport const l0ItemType = (item: Node<any>) => {\n if (item.properties.disposition === 'collection') {\n return 'collection';\n } else if (isActionLike(item)) {\n return 'action';\n } else if (item.properties.disposition === 'navigation') {\n return 'link';\n } else {\n return 'tab';\n }\n};\n\n// Regular expression to match renderable characters\n// Excludes control characters, combining marks, and other non-renderable characters\nconst renderableCharRegex =\n /^(?![\\p{Control}\\p{Mark}\\p{Separator}\\p{Surrogate}\\p{Unassigned}])[\\p{L}\\p{N}\\p{P}\\p{S}\\p{Emoji}]$/u;\n\n/**\n * Returns the first two renderable characters from a string that are separated by non-word characters.\n * Handles Unicode characters correctly.\n *\n * @param {string} label - The input string to process\n * @returns {[string, string]} Array containing the two characters, or empty strings if not found\n */\nexport const getFirstTwoRenderableChars = (label: string) => {\n // Convert string to array of Unicode characters\n const characters = Array.from(label);\n\n // Keep track of found renderable characters\n const result = ['', ''];\n let foundFirst = false;\n\n for (let i = 0; i < characters.length; i++) {\n const char = characters[i];\n\n if (renderableCharRegex.test(char)) {\n if (!foundFirst) {\n result[0] = char;\n foundFirst = true;\n } else {\n // Check if there's at least one non-word character between the first and current char\n const textBetween = characters.slice(result[0].length, i).join('');\n if (/[^\\p{L}\\p{N}_]/u.test(textBetween)) {\n result[1] = char;\n break;\n }\n }\n }\n }\n\n return result;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { extractInstruction, type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { untracked } from '@preact/signals-core';\nimport React, { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport {\n createIntent,\n LayoutAction,\n Surface,\n useAppGraph,\n useCapability,\n useIntentDispatcher,\n useLayout,\n} from '@dxos/app-framework';\nimport { isAction, isActionLike, type Node } from '@dxos/app-graph';\nimport { isEchoObject, isSpace } from '@dxos/react-client/echo';\nimport { useMediaQuery } from '@dxos/react-ui';\nimport { isTreeData, type TreeData, type PropsFromTreeItem } from '@dxos/react-ui-list';\nimport { mx } from '@dxos/react-ui-theme';\nimport { arrayMove } from '@dxos/util';\n\nimport { NAV_TREE_ITEM, NavTree } from './NavTree';\nimport { NavTreeContext } from './NavTreeContext';\nimport { type NavTreeContextValue } from './types';\nimport { NavTreeCapabilities } from '../capabilities';\nimport { type NavTreeItemGraphNode } from '../types';\nimport {\n expandActions,\n expandChildren,\n getActions as naturalGetActions,\n getChildren,\n getParent,\n resolveMigrationOperation,\n expandChildrenAndActions,\n} from '../util';\n\n// TODO(thure): Is NavTree truly authoritative in this regard?\nexport const NODE_TYPE = 'dxos/app-graph/node';\n\nconst renderItemEnd = ({ node, open }: { node: Node; open: boolean }) => (\n <Surface role='navtree-item-end' data={{ id: node.id, subject: node.data, open }} limit={1} />\n);\n\nexport type NavTreeContainerProps = {\n popoverAnchorId?: string;\n topbar?: boolean;\n} & Pick<NavTreeContextValue, 'tab'>;\n\nexport const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeContainerProps) => {\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n const layout = useLayout();\n const { isOpen, isCurrent, setItem } = useCapability(NavTreeCapabilities.State);\n\n const getActions = useCallback((node: Node) => naturalGetActions(graph, node), [graph]);\n\n const getItems = useCallback(\n (node?: Node, disposition?: string) => {\n return graph.nodes(node ?? graph.root, {\n filter: (node): node is Node => {\n return untracked(() => {\n const action = isActionLike(node);\n if (!disposition) {\n return !action || node.properties.disposition === 'item';\n }\n\n return node.properties.disposition === disposition;\n });\n },\n });\n },\n [graph],\n );\n\n const getProps = useCallback(\n (node: Node, path: string[]): PropsFromTreeItem => {\n const children = getChildren(graph, node, undefined, path);\n const parentOf =\n children.length > 0 ? children.map(({ id }) => id) : node.properties.role === 'branch' ? [] : undefined;\n return {\n id: node.id,\n label: node.properties.label ?? node.id,\n parentOf,\n icon: node.properties.icon,\n disabled: node.properties.disabled,\n className: mx(node.properties.modified && 'italic', node.properties.className),\n headingClassName: node.properties.headingClassName,\n testId: node.properties.testId,\n };\n },\n [graph],\n );\n\n const loadDescendents = useCallback(\n (node: Node) => {\n void expandActions(graph, node);\n if (!isActionLike(node)) {\n void expandChildren(graph, node).then(() =>\n // Load one level deeper, which resolves some juddering observed on open/close.\n Promise.all(\n getChildren(graph, node).flatMap((child) => [expandActions(graph, child), expandChildren(graph, child)]),\n ),\n );\n }\n },\n [graph],\n );\n\n const onOpenChange = useCallback(\n ({ item: { id }, path, open }: { item: Node; path: string[]; open: boolean }) => {\n // TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.\n setItem(path, 'open', open);\n\n if (graph) {\n const node = graph.findNode(id);\n return node && expandChildrenAndActions(graph, node as NavTreeItemGraphNode);\n }\n },\n [graph],\n );\n\n const onTabChange = useCallback(\n async (node: NavTreeItemGraphNode) => {\n await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: node.id }));\n // Open the first item if the workspace is empty.\n if (layout.active.length === 0) {\n const [item] = getItems(node).filter((node) => !isActionLike(node));\n if (item) {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [item.id] }));\n }\n }\n },\n [dispatch, layout],\n );\n\n const canDrop = useCallback((source: TreeData, target: TreeData) => {\n const sourceNode = source.item as Node;\n const targetNode = target.item as Node;\n if (isSpace(targetNode.data)) {\n // TODO(wittjosiah): Find a way to only allow space as source for rearranging.\n return isEchoObject(sourceNode.data) || isSpace(sourceNode.data);\n } else if (isEchoObject(targetNode.data)) {\n return isEchoObject(sourceNode.data);\n } else {\n return false;\n }\n }, []);\n\n const handleSelect = useCallback(\n ({ item: node, path, option }: { item: Node; path: string[]; option: boolean }) => {\n if (!node.data) {\n return;\n }\n\n if (isAction(node)) {\n const [parent] = graph.nodes(node, { relation: 'inbound' });\n void (parent && node.data({ node: parent, caller: NAV_TREE_ITEM }));\n return;\n }\n\n const current = isCurrent(path, node);\n if (!current) {\n void dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [node.id],\n options: { key: node.properties.key },\n }),\n );\n } else if (option) {\n void dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: [node.id], options: { state: false } }),\n );\n } else {\n void dispatch(createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: node.id }));\n }\n\n const defaultAction = graph.actions(node).find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n\n if (!isLg) {\n void dispatch(createIntent(LayoutAction.UpdateSidebar, { part: 'sidebar', options: { state: 'closed' } }));\n }\n },\n [graph, dispatch, isCurrent, isLg],\n );\n\n // TODO(wittjosiah): Factor out hook.\n useEffect(() => {\n return monitorForElements({\n canMonitor: ({ source }) => isTreeData(source.data),\n onDrop: ({ location, source }) => {\n // Didn't drop on anything.\n if (!location.current.dropTargets.length) {\n return;\n }\n const target = location.current.dropTargets[0];\n const instruction: Instruction | null = extractInstruction(target.data);\n if (instruction !== null && instruction.type !== 'instruction-blocked') {\n const sourceNode = source.data.item as NavTreeItemGraphNode;\n const targetNode = target.data.item as NavTreeItemGraphNode;\n const sourcePath = source.data.path as string[];\n const targetPath = target.data.path as string[];\n const operation =\n sourcePath.slice(0, -1).join() === targetPath.slice(0, -1).join() && instruction.type !== 'make-child'\n ? 'rearrange'\n : resolveMigrationOperation(graph, sourceNode, targetPath, targetNode);\n const sourceParent = getParent(graph, sourceNode, sourcePath);\n const targetParent = getParent(graph, targetNode, targetPath);\n const sourceItems = getItems(sourceParent);\n const targetItems = getItems(targetParent);\n const sourceIndex = sourceItems.findIndex(({ id }) => id === sourceNode.id);\n const targetIndex = targetItems.findIndex(({ id }) => id === targetNode.id);\n const migrationIndex =\n instruction.type === 'make-child'\n ? undefined\n : instruction.type === 'reorder-below'\n ? targetIndex + 1\n : targetIndex;\n switch (operation) {\n case 'rearrange': {\n const nextItems = sourceItems.map(({ data }) => data);\n arrayMove(nextItems, sourceIndex, targetIndex);\n void sourceParent?.properties.onRearrangeChildren?.(nextItems);\n break;\n }\n case 'copy': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n void target?.properties.onCopy?.(sourceNode, migrationIndex);\n break;\n }\n case 'transfer': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n if (!target?.properties.onTransferStart || !sourceParent?.properties.onTransferEnd) {\n break;\n }\n void target?.properties.onTransferStart(sourceNode, migrationIndex);\n void sourceParent?.properties.onTransferEnd?.(sourceNode, target);\n break;\n }\n }\n }\n },\n });\n }, [graph]);\n\n const navTreeContextValue = useMemo(\n () => ({\n tab,\n onTabChange,\n getActions,\n loadDescendents,\n renderItemEnd,\n popoverAnchorId,\n topbar,\n getItems,\n getProps,\n isCurrent,\n isOpen,\n onOpenChange,\n canDrop,\n onSelect: handleSelect,\n }),\n [\n tab,\n onTabChange,\n getActions,\n loadDescendents,\n renderItemEnd,\n popoverAnchorId,\n topbar,\n getItems,\n getProps,\n isCurrent,\n isOpen,\n onOpenChange,\n canDrop,\n handleSelect,\n ],\n );\n\n return (\n <NavTreeContext.Provider value={navTreeContextValue}>\n <NavTree root={graph.root} id={graph.root.id} />\n </NavTreeContext.Provider>\n );\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { byPosition } from '@dxos/util';\n\nimport { L0Menu } from './L0Menu';\nimport { L1Panels } from './L1Panels';\nimport { useNavTreeContext } from './NavTreeContext';\nimport { type NavTreeProps } from './types';\nimport { useLoadDescendents } from '../hooks';\n\nexport const NAV_TREE_ITEM = 'NavTreeItem';\n\nexport const NavTree = ({ id, root }: NavTreeProps) => {\n const { getItems, tab } = useNavTreeContext();\n const topLevelActions = getItems(root, 'item');\n const topLevelCollections = getItems(root, 'collection');\n const topLevelWorkspaces = getItems(root, 'workspace');\n const topLevelNavigation = getItems(root, 'navigation');\n const l0Items = useMemo(\n () => [...topLevelActions, ...topLevelCollections, ...topLevelWorkspaces, ...topLevelNavigation],\n [topLevelActions, topLevelCollections, topLevelWorkspaces, topLevelNavigation],\n );\n const pinnedItems = getItems(root, 'pin-end').toSorted((a, b) => byPosition(a.properties, b.properties));\n const topLevelItems = useMemo(() => [...l0Items, ...pinnedItems], [l0Items, pinnedItems]);\n\n useLoadDescendents(root);\n const path = useMemo(() => [id], [id]);\n\n return (\n // NOTE(thure): 74px (rather than rem) is intentional in order to match the size of macOS windowing controls\n <Tabs.Root value={tab} orientation='vertical' verticalVariant='stateless' classNames='relative'>\n <L0Menu topLevelItems={l0Items} pinnedItems={pinnedItems} path={path} parent={root} />\n <L1Panels topLevelItems={topLevelItems} path={path} currentItemId={tab} />\n </Tabs.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type MouseEvent, useCallback, useMemo } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { Icon, toLocalizedString, Tooltip, useMediaQuery, useSidebars, useTranslation } from '@dxos/react-ui';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useNavTreeContext } from './NavTreeContext';\nimport { NotchStart } from './NotchStart';\nimport { useLoadDescendents } from '../hooks';\nimport { NAVTREE_PLUGIN } from '../meta';\nimport { getFirstTwoRenderableChars, l0ItemType } from '../util';\n\ntype L0ItemProps = {\n item: Node<any>;\n parent?: Node<any>;\n path: string[];\n pinned?: boolean;\n};\n\nconst useL0ItemClick = ({ item, parent, path }: L0ItemProps, type: string) => {\n const { tab, onTabChange, onSelect, isCurrent } = useNavTreeContext();\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { navigationSidebarState } = useSidebars(NAVTREE_PLUGIN);\n const [isLg] = useMediaQuery('lg', { ssr: false });\n\n return useCallback(\n (event: MouseEvent) => {\n switch (type) {\n case 'tab':\n // TODO(thure): This dispatch should rightly be in `onTabChange`, but that callback wasn’t reacting to changes\n // to its dependencies.\n void dispatch(\n createIntent(LayoutAction.UpdateSidebar, {\n part: 'sidebar',\n options: {\n state:\n item.id === tab\n ? navigationSidebarState === 'expanded'\n ? isLg\n ? 'collapsed'\n : 'closed'\n : 'expanded'\n : 'expanded',\n },\n }),\n );\n return onTabChange?.(item);\n case 'link':\n return onSelect?.({ item, path, current: !isCurrent(path, item), option: event.altKey });\n case 'action': {\n const {\n data: invoke,\n properties: { caller },\n } = item;\n return invoke?.(caller ? { node: parent, caller } : { node: parent });\n }\n }\n },\n [item, type, onSelect, isCurrent, parent, tab, navigationSidebarState, isLg, dispatch],\n );\n};\n\nconst l0Breakpoints: Record<string, string> = {\n lg: 'hidden lg:grid',\n};\n\nconst L0Item = ({ item, parent, path, pinned }: L0ItemProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const type = l0ItemType(item);\n const itemPath = useMemo(() => [...path, item.id], [item.id, path]);\n const { getProps } = useNavTreeContext();\n const { id, testId } = getProps?.(item, path) ?? {};\n const Root = type === 'collection' ? 'h2' : type === 'tab' ? Tabs.TabPrimitive : 'button';\n const handleClick = useL0ItemClick({ item, path: itemPath, parent }, type);\n const rootProps =\n type === 'tab'\n ? { value: item.id, tabIndex: 0, onClick: handleClick, 'data-testid': testId, 'data-itemid': id }\n : type !== 'collection'\n ? { onClick: handleClick, 'data-testid': testId, 'data-itemid': id }\n : { onClick: handleClick };\n const localizedString = toLocalizedString(item.properties.label, t);\n const avatarValue = useMemo(\n () => (type === 'tab' ? getFirstTwoRenderableChars(localizedString).join('') : []),\n [type, item.properties.label, t],\n );\n return (\n <Tooltip.Root delayDuration={0}>\n <Tooltip.Trigger asChild>\n <Root\n {...(rootProps as any)}\n data-type={type}\n className={mx(\n 'group/l0i dx-focus-ring-group grid overflow-hidden relative data[type!=\"collection\"]:cursor-pointer app-no-drag',\n l0Breakpoints[item.properties.l0Breakpoint],\n )}\n >\n {type !== 'collection' && (\n <div\n role='none'\n className={mx(\n 'absolute -z-[1] group-hover/l0i:bg-input dx-focus-ring-group-indicator transition-colors',\n type === 'tab' || pinned ? 'rounded' : 'rounded-full',\n pinned ? 'bg-transparent inset-inline-3 inset-block-0' : 'bg-input inset-inline-3 inset-block-2',\n )}\n />\n )}\n <div\n role='none'\n className='hidden group-aria-selected/l0i:block absolute inline-start-0 inset-block-4 is-1 bg-accentSurface rounded-ie'\n />\n {type === 'tab' && item.properties.disposition !== 'pin-end' ? (\n <span role='img' className='place-self-center text-3xl font-light'>\n {avatarValue}\n </span>\n ) : (\n item.properties.icon && (\n <Icon icon={item.properties.icon} size={pinned ? 5 : 7} classNames='place-self-center' />\n )\n )}\n <span id={`${item.id}__label`} className='sr-only'>\n {localizedString}\n </span>\n </Root>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content side='right'>\n {localizedString}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\nconst L0Collection = ({ item, path, parent }: L0ItemProps) => {\n const navTreeContext = useNavTreeContext();\n useLoadDescendents(item);\n const collectionItems = navTreeContext.getItems(item);\n const groupPath = useMemo(() => [...path, item.id], [item.id, path]);\n const { id, testId } = navTreeContext.getProps?.(item, path) ?? {};\n return (\n <div\n role='group'\n className='contents group/l0c'\n aria-labelledby={`${item.id}__label`}\n data-itemid={id}\n data-testid={testId}\n >\n <L0Item item={item} parent={parent} path={groupPath} />\n {collectionItems.map((collectionItem) => (\n <L0Item key={collectionItem.id} item={collectionItem} parent={item} path={groupPath} />\n ))}\n </div>\n );\n};\n\nexport const L0Menu = ({\n topLevelItems,\n pinnedItems,\n parent,\n path,\n}: {\n topLevelItems: Node<any>[];\n pinnedItems: Node<any>[];\n parent?: Node<any>;\n path: string[];\n}) => {\n return (\n <Tabs.Tablist classNames='group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is-lg grid grid-cols-[var(--l0-size)] grid-rows-[1fr_min-content_var(--l0-size)] contain-layout !is-[--l0-size] bg-baseSurface border-ie border-separator app-drag'>\n <div\n role='none'\n className='grid auto-rows-[calc(var(--l0-size)-.5rem)] min-bs-0 !overflow-y-auto plb-1 [body[data-platform=\"darwin\"]_&]:pbs-[calc(30px+0.25rem)]'\n >\n {topLevelItems.map((item) => {\n if (l0ItemType(item) === 'collection') {\n return <L0Collection key={item.id} item={item} parent={parent} path={path} />;\n } else {\n return <L0Item key={item.id} item={item} parent={parent} path={path} />;\n }\n })}\n </div>\n <div role='none' className='grid grid-cols-1 auto-rows-[--rail-action] pbs-2'>\n {pinnedItems\n .filter((item) => l0ItemType(item) !== 'collection')\n .map((item) => (\n <L0Item key={item.id} item={item} parent={parent} path={path} pinned />\n ))}\n </div>\n <div role='none' className='grid p-2 app-no-drag'>\n <NotchStart />\n </div>\n <div\n role='none'\n className='hidden [body[data-platform=\"darwin\"]_&]:block absolute block-start-0 is-[calc(var(--l0-size)-1px)] bs-[calc(40px+0.25rem)]'\n style={{\n background:\n 'linear-gradient(to bottom, var(--dx-baseSurface) 0%, var(--dx-baseSurface) 70%, transparent 100%)',\n }}\n />\n </Tabs.Tablist>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { type NavTreeContextValue } from './types';\n\nexport const NavTreeContext = createContext<NavTreeContextValue | null>(null);\n\nexport const useNavTreeContext = () => useContext(NavTreeContext) ?? raise(new Error('NavTreeContext not found'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\n\nimport { useNavTreeContext } from './components/NavTreeContext';\n\nexport const useLoadDescendents = (root?: Node) => {\n const { loadDescendents } = useNavTreeContext();\n useEffect(() => {\n const frame = requestAnimationFrame(() => {\n if (root) {\n void loadDescendents?.(root);\n }\n });\n return () => cancelAnimationFrame(frame);\n }, [root]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { useLayout } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Tree } from '@dxos/react-ui-list';\nimport { Tabs } from '@dxos/react-ui-tabs';\n\nimport { useNavTreeContext } from './NavTreeContext';\nimport { NavTreeItemColumns } from './NavTreeItemColumns';\nimport { useLoadDescendents } from '../hooks';\nimport { NAVTREE_PLUGIN } from '../meta';\nimport { l0ItemType } from '../util';\n\ntype L1PanelProps = { item: Node<any>; path: string[]; currentItemId: string };\n\nconst L1Panel = ({ item, path, currentItemId }: L1PanelProps) => {\n const layout = useLayout();\n const navTreeContext = useNavTreeContext();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n return (\n <Tabs.Tabpanel\n key={item.id}\n value={item.id}\n classNames={[\n 'absolute inset-block-0 inline-end-0 is-[calc(100%-var(--l0-size))] lg:is-[--l1-size] grid-cols-1 grid-rows-[var(--rail-size)_1fr]',\n item.id === currentItemId && 'grid',\n ]}\n tabIndex={-1}\n {...(!layout.sidebarOpen && { inert: 'true' })}\n >\n {item.id === currentItemId && (\n <>\n <h2 className='flex items-center border-be border-separator pis-4 app-drag'>\n <span className='flex-1 truncate cursor-default'>{toLocalizedString(item.properties.label, t)}</span>\n <NavTreeItemColumns path={path} item={item} open />\n </h2>\n <div role='none' className='overflow-y-auto'>\n <Tree\n {...navTreeContext}\n id={item.id}\n root={item}\n path={path}\n levelOffset={5}\n draggable\n gridTemplateColumns='[tree-row-start] 1fr min-content min-content min-content [tree-row-end]'\n renderColumns={NavTreeItemColumns}\n />\n </div>\n </>\n )}\n </Tabs.Tabpanel>\n );\n};\n\nconst L1PanelCollection = ({ item, path, currentItemId }: L1PanelProps) => {\n const { getItems } = useNavTreeContext();\n useLoadDescendents(item);\n const collectionItems = getItems(item);\n const groupPath = useMemo(() => [...path, item.id], [item.id, path]);\n return (\n <>\n {collectionItems\n .filter((item) => l0ItemType(item) === 'tab')\n .map((item) => (\n <L1Panel key={item.id} item={item} path={groupPath} currentItemId={currentItemId} />\n ))}\n </>\n );\n};\n\nexport const L1Panels = ({\n topLevelItems,\n path,\n currentItemId,\n}: {\n topLevelItems: Node<any>[];\n path: string[];\n currentItemId: string;\n}) => {\n return (\n <>\n {topLevelItems.map((item) => {\n const type = l0ItemType(item);\n switch (type) {\n case 'collection':\n return <L1PanelCollection key={item.id} item={item} path={path} currentItemId={currentItemId} />;\n case 'tab':\n return <L1Panel key={item.id} item={item} path={path} currentItemId={currentItemId} />;\n default:\n return null;\n }\n })}\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment, memo } from 'react';\n\nimport { isAction } from '@dxos/app-graph';\nimport { Popover, toLocalizedString, Treegrid, useTranslation } from '@dxos/react-ui';\n\nimport { NAV_TREE_ITEM } from './NavTree';\nimport { useNavTreeContext } from './NavTreeContext';\nimport { NavTreeItemAction } from './NavTreeItemAction';\nimport type { NavTreeItemColumnsProps } from './types';\nimport { useLoadDescendents } from '../hooks';\nimport { NAVTREE_PLUGIN } from '../meta';\n\nexport const NavTreeItemColumns = memo(({ path, item, open }: NavTreeItemColumnsProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const { getActions, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();\n\n const level = path.length - 2;\n\n const { actions: _actions, groupedActions } = getActions(item);\n const [primaryAction, ...secondaryActions] = _actions.toSorted((a, b) =>\n a.properties?.disposition === 'toolbar' ? -1 : 1,\n );\n\n const actions = (primaryAction?.properties?.disposition === 'toolbar' ? secondaryActions : _actions)\n .flatMap((action) => (isAction(action) ? [action] : []))\n .filter((action) => !action.properties?.hidden);\n\n const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;\n\n useLoadDescendents(item);\n useLoadDescendents(primaryAction && !isAction(primaryAction) ? primaryAction : undefined);\n\n return (\n <div role='none' className='contents app-no-drag'>\n {primaryAction?.properties?.disposition === 'toolbar' && !primaryAction?.properties?.disabled ? (\n <NavTreeItemAction\n testId={primaryAction.properties?.testId}\n label={toLocalizedString(primaryAction.properties?.label, t)}\n icon={primaryAction.properties?.icon ?? 'ph--placeholder--regular'}\n parent={item}\n monolithic={isAction(primaryAction)}\n menuActions={isAction(primaryAction) ? [primaryAction] : groupedActions[primaryAction.id]}\n menuType={primaryAction.properties?.menuType}\n caller={NAV_TREE_ITEM}\n />\n ) : (\n <Treegrid.Cell />\n )}\n <ActionRoot>\n {actions.length > 0 ? (\n <NavTreeItemAction\n testId={`navtree.treeItem.actionsLevel${level}`}\n label={t('tree item actions label')}\n icon='ph--dots-three-vertical--regular'\n parent={item}\n menuActions={actions}\n menuType='dropdown'\n caller={NAV_TREE_ITEM}\n />\n ) : (\n <Treegrid.Cell />\n )}\n </ActionRoot>\n {ItemEnd && <ItemEnd node={item} open={open} />}\n </div>\n );\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type MutableRefObject, useRef } from 'react';\n\nimport { type Action, type Node } from '@dxos/app-graph';\nimport { useTranslation, toLocalizedString, IconButton } from '@dxos/react-ui';\nimport { DropdownMenu, MenuProvider, type MenuItem } from '@dxos/react-ui-menu';\nimport { hoverableControlItem, hoverableOpenControlItem, mx } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../meta';\nimport { type ActionProperties } from '../types';\n\nexport type NavTreeItemActionMenuProps = ActionProperties & {\n parent: Node;\n caller?: string;\n monolithic?: boolean;\n menuActions?: Action[];\n suppressNextTooltip?: MutableRefObject<boolean>;\n onAction?: (action: Action) => void;\n};\n\nconst fallbackIcon = 'ph--placeholder--regular';\n\nconst actionButtonProps = {\n size: 4 as const,\n density: 'fine' as const,\n};\n\nexport const NavTreeItemActionDropdownMenu = ({\n label,\n icon,\n testId,\n menuActions,\n onAction,\n}: NavTreeItemActionMenuProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const suppressNextTooltip = useRef<boolean>(false);\n return (\n <MenuProvider onAction={onAction}>\n <DropdownMenu.Root items={menuActions as MenuItem[]} suppressNextTooltip={suppressNextTooltip}>\n <DropdownMenu.Trigger asChild>\n <IconButton\n {...actionButtonProps}\n classNames={mx('shrink-0 pli-2 pointer-fine:pli-1', hoverableControlItem, hoverableOpenControlItem)}\n variant='ghost'\n icon={icon ?? fallbackIcon}\n iconOnly\n label={toLocalizedString(label, t)}\n data-testid={testId}\n suppressNextTooltip={suppressNextTooltip}\n />\n </DropdownMenu.Trigger>\n </DropdownMenu.Root>\n </MenuProvider>\n );\n};\n\nexport const NavTreeItemMonolithicAction = ({\n parent,\n properties: { disabled, caller, testId, icon, variant = 'ghost', iconOnly = true } = { label: 'never' },\n data: invoke,\n baseLabel,\n}: Action & { parent: Node; onAction?: (action: Action) => void; baseLabel: string }) => {\n return (\n <IconButton\n {...actionButtonProps}\n variant={variant}\n classNames={mx(\n 'shrink-0',\n hoverableControlItem,\n hoverableOpenControlItem,\n iconOnly ? 'pli-2 pointer-fine:pli-1' : 'p-2 pointer-fine:p-2 mie-1',\n )}\n icon={icon ?? fallbackIcon}\n iconOnly={iconOnly}\n label={baseLabel}\n disabled={disabled}\n onClick={(event) => {\n if (disabled) {\n return;\n }\n event.stopPropagation();\n void invoke?.(caller ? { node: parent, caller } : { node: parent });\n }}\n data-testid={testId}\n />\n );\n};\n\nexport const NavTreeItemAction = ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n const monolithicAction = menuActions?.length === 1 && menuActions[0];\n const baseLabel = toLocalizedString(monolithicAction ? monolithicAction.properties!.label : props.label, t);\n\n return monolithic && menuActions?.length === 1 ? (\n <NavTreeItemMonolithicAction baseLabel={baseLabel} parent={node} {...menuActions[0]} />\n ) : (\n <NavTreeItemActionDropdownMenu\n {...props}\n label={baseLabel}\n parent={node}\n menuActions={menuActions}\n onAction={(action) => action.data?.(props.caller ? { node, caller: props.caller } : { node })}\n />\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const Keyboard = lazy(() => import('./keyboard'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const State = lazy(() => import('./state'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2023 DXOS.org\n//\nimport { useEffect } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\nexport const NavTreeDocumentTitle = ({ node }: { node?: Node }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n useEffect(() => {\n document.title = node ? toLocalizedString(node.properties.label, t) : t('current app name', { ns: 'appkit' });\n }, [node?.properties?.label]);\n return null;\n};\n"],
5
- "mappings": ";;;;;;;;;;AAIA,OAAOA,SAASC,SAASC,gBAAgB;AAEzC,SAASC,cAAcC,cAAcC,aAAaC,2BAA2B;AAC7E,SAA0BC,eAAeC,gBAAgB;AACzD,SAASC,UAAUC,kBAAkB;AACrC,SAASC,QAAQC,QAAQC,MAAMC,gBAAgBC,yBAAyB;AACxE,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,UAAU;AACpC,SAASC,uBAAuB;AAKzB,IAAMC,wBAAwB,CAAC,EAAEC,UAAUC,QAAO,MAAyB;AAChF,QAAM,EAAEC,EAAC,IAAKC,eAAeC,cAAAA;AAC7B,QAAM,CAACJ,UAAUK,WAAAA,IAAeC,SAA6BL,OAAAA;AAC7D,QAAM,EAAEM,iBAAiBC,SAAQ,IAAKC,oBAAAA;AACtC,QAAM,EAAEC,MAAK,IAAKC,YAAAA;AAIlB,QAAMC,aAAaC,QAAQ,MAAA;AAEzB,UAAMC,UAAUC,SAASC,UAAUC,kBAAiB;AACpD,UAAMC,YAAY,oBAAIC,IAAAA;AACtB,UAAMC,WAAwB,CAAA;AAC9BV,WAAOW,SAAS;MACdC,SAAS,CAACC,MAAMC,SAAAA;AACd,aACGC,SAASF,IAA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", "useMemo", "useState", "createIntent", "LayoutAction", "useAppGraph", "useIntentDispatcher", "isActionGroup", "isAction", "Keyboard", "keySymbols", "Button", "Dialog", "Icon", "useTranslation", "toLocalizedString", "SearchList", "descriptionText", "mx", "getHostPlatform", "CommandsDialogContent", "selected", "initial", "t", "useTranslation", "NAVTREE_PLUGIN", "setSelected", "useState", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allActions", "useMemo", "current", "Keyboard", "singleton", "getCurrentContext", "actionMap", "Set", "actions", "traverse", "visitor", "node", "path", "isAction", "isActionGroup", "has", "id", "startsWith", "slice", "join", "add", "push", "sort", "a", "b", "toLocalizedString", "properties", "label", "toLowerCase", "localeCompare", "group", "find", "Dialog", "Content", "classNames", "Title", "ns", "SearchList", "Root", "Input", "placeholder", "map", "action", "shortcut", "keyBinding", "getHostPlatform", "Item", "value", "key", "onSelect", "disabled", "createIntent", "LayoutAction", "UpdateDialog", "part", "options", "state", "setTimeout", "nodes", "relation", "data", "caller", "KEY_BINDING", "testId", "Icon", "icon", "size", "span", "className", "mx", "descriptionText", "keySymbols", "Close", "asChild", "Button", "variant", "MagnifyingGlass", "React", "createIntent", "LayoutAction", "useIntentDispatcher", "Button", "useTranslation", "getSize", "CommandsTrigger", "dispatchPromise", "dispatch", "useIntentDispatcher", "t", "useTranslation", "NAVTREE_PLUGIN", "React", "Button", "classNames", "onClick", "createIntent", "LayoutAction", "UpdateDialog", "part", "subject", "COMMANDS_DIALOG", "options", "blockAlign", "span", "className", "MagnifyingGlass", "getSize", "React", "createIntent", "useCapabilities", "useIntentDispatcher", "ClientAction", "ObservabilityCapabilities", "useIdentity", "React", "ConnectionState", "useNetworkStatus", "Avatar", "focusRing", "mx", "hexToFallback", "INTERNAL", "HaloButton", "props", "onClick", "identityKey", "internal", "size", "fallbackValue", "hexToFallback", "swarm", "connectionState", "useNetworkStatus", "React", "button", "className", "mx", "focusRing", "Avatar", "Root", "variant", "status", "ConnectionState", "OFFLINE", "hue", "Frame", "data-testid", "data-joyride", "Image", "href", "Fallback", "text", "emoji", "NotchStart", "identity", "useIdentity", "observability", "useCapabilities", "ObservabilityCapabilities", "Observability", "dispatchPromise", "dispatch", "useIntentDispatcher", "React", "HaloButton", "size", "identityKey", "toHex", "hue", "profile", "data", "emoji", "internal", "group", "onClick", "createIntent", "ClientAction", "ShareIdentity", "ACTION_TYPE", "ACTION_GROUP_TYPE", "isAction", "isActionLike", "nonNullable", "getParent", "graph", "node", "path", "parentId", "length", "nodes", "relation", "find", "n", "id", "getPersistenceParent", "persistenceClass", "properties", "acceptPersistenceClass", "has", "parent", "slice", "resolveMigrationOperation", "activeNode", "destinationPath", "destinationRelatedNode", "activeClass", "persistenceParent", "activeKey", "persistenceKey", "acceptPersistenceKey", "onTransferStart", "onCopy", "sortActions", "actions", "sort", "a", "b", "disposition", "getChildren", "filter", "map", "nextPath", "includes", "undefined", "nonNullable", "getActions", "reduce", "acc", "arg", "push", "isAction", "actionGroup", "groupedActions", "expandChildrenAndActions", "Promise", "all", "expandChildren", "expandActions", "expand", "ACTION_TYPE", "ACTION_GROUP_TYPE", "l0ItemType", "item", "isActionLike", "renderableCharRegex", "getFirstTwoRenderableChars", "label", "characters", "Array", "from", "result", "foundFirst", "i", "char", "test", "textBetween", "join", "monitorForElements", "extractInstruction", "untracked", "React", "memo", "useCallback", "useEffect", "useMemo", "createIntent", "LayoutAction", "Surface", "useAppGraph", "useCapability", "useIntentDispatcher", "useLayout", "isAction", "isActionLike", "isEchoObject", "isSpace", "useMediaQuery", "isTreeData", "mx", "arrayMove", "React", "useMemo", "Tabs", "byPosition", "React", "useCallback", "useMemo", "createIntent", "LayoutAction", "useIntentDispatcher", "Icon", "toLocalizedString", "Tooltip", "useMediaQuery", "useSidebars", "useTranslation", "Tabs", "mx", "createContext", "useContext", "raise", "NavTreeContext", "createContext", "useNavTreeContext", "useContext", "raise", "Error", "useEffect", "useLoadDescendents", "root", "loadDescendents", "useNavTreeContext", "useEffect", "frame", "requestAnimationFrame", "cancelAnimationFrame", "useL0ItemClick", "item", "parent", "path", "type", "tab", "onTabChange", "onSelect", "isCurrent", "useNavTreeContext", "dispatchPromise", "dispatch", "useIntentDispatcher", "navigationSidebarState", "useSidebars", "NAVTREE_PLUGIN", "isLg", "useMediaQuery", "ssr", "useCallback", "event", "createIntent", "LayoutAction", "UpdateSidebar", "part", "options", "state", "id", "current", "option", "altKey", "data", "invoke", "properties", "caller", "node", "l0Breakpoints", "lg", "L0Item", "pinned", "t", "useTranslation", "l0ItemType", "itemPath", "useMemo", "getProps", "testId", "Root", "Tabs", "TabPrimitive", "handleClick", "rootProps", "value", "tabIndex", "onClick", "localizedString", "toLocalizedString", "label", "avatarValue", "getFirstTwoRenderableChars", "join", "React", "Tooltip", "delayDuration", "Trigger", "asChild", "data-type", "className", "mx", "l0Breakpoint", "div", "role", "disposition", "span", "icon", "Icon", "size", "classNames", "Portal", "Content", "side", "Arrow", "L0Collection", "navTreeContext", "useLoadDescendents", "collectionItems", "getItems", "groupPath", "aria-labelledby", "data-itemid", "data-testid", "map", "collectionItem", "key", "L0Menu", "topLevelItems", "pinnedItems", "Tablist", "filter", "NotchStart", "style", "background", "React", "useMemo", "useLayout", "toLocalizedString", "useTranslation", "Tree", "Tabs", "React", "Fragment", "memo", "isAction", "Popover", "toLocalizedString", "Treegrid", "useTranslation", "React", "useRef", "useTranslation", "toLocalizedString", "IconButton", "DropdownMenu", "MenuProvider", "hoverableControlItem", "hoverableOpenControlItem", "mx", "fallbackIcon", "actionButtonProps", "size", "density", "NavTreeItemActionDropdownMenu", "label", "icon", "testId", "menuActions", "onAction", "t", "useTranslation", "NAVTREE_PLUGIN", "suppressNextTooltip", "useRef", "React", "MenuProvider", "DropdownMenu", "Root", "items", "Trigger", "asChild", "IconButton", "classNames", "mx", "hoverableControlItem", "hoverableOpenControlItem", "variant", "iconOnly", "toLocalizedString", "data-testid", "NavTreeItemMonolithicAction", "parent", "properties", "disabled", "caller", "data", "invoke", "baseLabel", "onClick", "event", "stopPropagation", "node", "NavTreeItemAction", "monolithic", "props", "monolithicAction", "length", "action", "NavTreeItemColumns", "memo", "path", "item", "open", "t", "useTranslation", "NAVTREE_PLUGIN", "getActions", "renderItemEnd", "ItemEnd", "popoverAnchorId", "useNavTreeContext", "level", "length", "actions", "_actions", "groupedActions", "primaryAction", "secondaryActions", "toSorted", "a", "b", "properties", "disposition", "flatMap", "action", "isAction", "filter", "hidden", "ActionRoot", "NAV_TREE_ITEM", "id", "Popover", "Anchor", "Fragment", "useLoadDescendents", "undefined", "React", "div", "role", "className", "disabled", "NavTreeItemAction", "testId", "label", "toLocalizedString", "icon", "parent", "monolithic", "menuActions", "menuType", "caller", "Treegrid", "Cell", "node", "L1Panel", "item", "path", "currentItemId", "layout", "useLayout", "navTreeContext", "useNavTreeContext", "t", "useTranslation", "NAVTREE_PLUGIN", "React", "Tabs", "Tabpanel", "key", "id", "value", "classNames", "tabIndex", "sidebarOpen", "inert", "h2", "className", "span", "toLocalizedString", "properties", "label", "NavTreeItemColumns", "open", "div", "role", "Tree", "root", "levelOffset", "draggable", "gridTemplateColumns", "renderColumns", "L1PanelCollection", "getItems", "useLoadDescendents", "collectionItems", "groupPath", "useMemo", "filter", "l0ItemType", "map", "L1Panels", "topLevelItems", "type", "NAV_TREE_ITEM", "NavTree", "id", "root", "getItems", "tab", "useNavTreeContext", "topLevelActions", "topLevelCollections", "topLevelWorkspaces", "topLevelNavigation", "l0Items", "useMemo", "pinnedItems", "toSorted", "a", "b", "byPosition", "properties", "topLevelItems", "useLoadDescendents", "path", "React", "Tabs", "Root", "value", "orientation", "verticalVariant", "classNames", "L0Menu", "parent", "L1Panels", "currentItemId", "lazy", "AppGraphBuilder", "lazy", "IntentResolver", "Keyboard", "ReactSurface", "State", "NODE_TYPE", "renderItemEnd", "node", "open", "React", "Surface", "role", "data", "id", "subject", "limit", "NavTreeContainer", "memo", "tab", "popoverAnchorId", "topbar", "isLg", "useMediaQuery", "ssr", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "layout", "useLayout", "isOpen", "isCurrent", "setItem", "useCapability", "NavTreeCapabilities", "State", "getActions", "useCallback", "naturalGetActions", "getItems", "disposition", "nodes", "root", "filter", "untracked", "action", "isActionLike", "properties", "getProps", "path", "children", "getChildren", "undefined", "parentOf", "length", "map", "label", "icon", "disabled", "className", "mx", "modified", "headingClassName", "testId", "loadDescendents", "expandActions", "expandChildren", "then", "Promise", "all", "flatMap", "child", "onOpenChange", "item", "findNode", "expandChildrenAndActions", "onTabChange", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "active", "Open", "canDrop", "source", "target", "sourceNode", "targetNode", "isSpace", "isEchoObject", "handleSelect", "option", "isAction", "parent", "relation", "caller", "NAV_TREE_ITEM", "current", "options", "key", "Close", "state", "ScrollIntoView", "defaultAction", "actions", "find", "UpdateSidebar", "useEffect", "monitorForElements", "canMonitor", "isTreeData", "onDrop", "location", "dropTargets", "instruction", "extractInstruction", "type", "sourcePath", "targetPath", "operation", "slice", "join", "resolveMigrationOperation", "sourceParent", "getParent", "targetParent", "sourceItems", "targetItems", "sourceIndex", "findIndex", "targetIndex", "migrationIndex", "nextItems", "arrayMove", "onRearrangeChildren", "onCopy", "onTransferStart", "onTransferEnd", "navTreeContextValue", "useMemo", "onSelect", "NavTreeContext", "Provider", "value", "NavTree", "useEffect", "toLocalizedString", "useTranslation", "NavTreeDocumentTitle", "node", "t", "useTranslation", "NAVTREE_PLUGIN", "useEffect", "document", "title", "toLocalizedString", "properties", "label", "ns"]
7
- }