@dxos/plugin-navtree 0.7.5-main.2567c87 → 0.7.5-main.5ae2ba8

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 (110) hide show
  1. package/dist/lib/browser/{app-graph-builder-OF4MMBLH.mjs → app-graph-builder-BL7LRXCM.mjs} +7 -5
  2. package/dist/lib/browser/{app-graph-builder-OF4MMBLH.mjs.map → app-graph-builder-BL7LRXCM.mjs.map} +3 -3
  3. package/dist/lib/browser/{chunk-OI7AAA6Q.mjs → chunk-AOAGODQB.mjs} +1 -1
  4. package/dist/lib/browser/chunk-AOAGODQB.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-GXNOX2XZ.mjs +1262 -0
  6. package/dist/lib/browser/chunk-GXNOX2XZ.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +22 -27
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/intent-resolver-U25VBFH3.mjs +47 -0
  10. package/dist/lib/browser/intent-resolver-U25VBFH3.mjs.map +7 -0
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/react-surface-SG4QBA2U.mjs +57 -0
  13. package/dist/lib/browser/react-surface-SG4QBA2U.mjs.map +7 -0
  14. package/dist/lib/browser/{state-HT65TAYL.mjs → state-IEFQTUPG.mjs} +7 -10
  15. package/dist/lib/browser/state-IEFQTUPG.mjs.map +7 -0
  16. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/app-graph-builder.d.ts +110 -110
  18. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  19. package/dist/types/src/capabilities/capabilities.d.ts +3 -2
  20. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/index.d.ts +178 -122
  22. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/state.d.ts +3 -3
  26. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  27. package/dist/types/src/components/CommandsDialog.d.ts +1 -2
  28. package/dist/types/src/components/CommandsDialog.d.ts.map +1 -1
  29. package/dist/types/src/components/CommandsTrigger.d.ts +1 -2
  30. package/dist/types/src/components/CommandsTrigger.d.ts.map +1 -1
  31. package/dist/types/src/components/HaloButton.d.ts +1 -2
  32. package/dist/types/src/components/HaloButton.d.ts.map +1 -1
  33. package/dist/types/src/components/HaloButton.stories.d.ts +1 -2
  34. package/dist/types/src/components/HaloButton.stories.d.ts.map +1 -1
  35. package/dist/types/src/components/L0Menu.d.ts +8 -0
  36. package/dist/types/src/components/L0Menu.d.ts.map +1 -0
  37. package/dist/types/src/components/L1Panels.d.ts +13 -0
  38. package/dist/types/src/components/L1Panels.d.ts.map +1 -0
  39. package/dist/types/src/components/NavTree.d.ts +2 -20
  40. package/dist/types/src/components/NavTree.d.ts.map +1 -1
  41. package/dist/types/src/components/NavTree.stories.d.ts +2 -2
  42. package/dist/types/src/components/NavTree.stories.d.ts.map +1 -1
  43. package/dist/types/src/components/NavTreeContainer.d.ts +4 -3
  44. package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
  45. package/dist/types/src/components/NavTreeContext.d.ts +4 -0
  46. package/dist/types/src/components/NavTreeContext.d.ts.map +1 -0
  47. package/dist/types/src/components/NavTreeItemAction.d.ts +5 -5
  48. package/dist/types/src/components/NavTreeItemAction.d.ts.map +1 -1
  49. package/dist/types/src/components/NavTreeItemAction.stories.d.ts +2 -2
  50. package/dist/types/src/components/NavTreeItemColumns.d.ts +4 -0
  51. package/dist/types/src/components/NavTreeItemColumns.d.ts.map +1 -0
  52. package/dist/types/src/components/NotchStart.d.ts +1 -2
  53. package/dist/types/src/components/NotchStart.d.ts.map +1 -1
  54. package/dist/types/src/components/index.d.ts +2 -0
  55. package/dist/types/src/components/index.d.ts.map +1 -1
  56. package/dist/types/src/components/types.d.ts +26 -0
  57. package/dist/types/src/components/types.d.ts.map +1 -0
  58. package/dist/types/src/experimental/Tree.d.ts +8 -8
  59. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  60. package/dist/types/src/experimental/Tree.stories.d.ts +2 -3
  61. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  62. package/dist/types/src/hooks.d.ts +3 -0
  63. package/dist/types/src/hooks.d.ts.map +1 -0
  64. package/dist/types/src/stories/Graph.stories.d.ts +2 -2
  65. package/dist/types/src/stories/Graph.stories.d.ts.map +1 -1
  66. package/dist/types/src/stories/StorybookNavTree.d.ts +3 -0
  67. package/dist/types/src/stories/StorybookNavTree.d.ts.map +1 -0
  68. package/dist/types/src/translations.d.ts +0 -6
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/dist/types/src/types.d.ts +2 -1
  71. package/dist/types/src/types.d.ts.map +1 -1
  72. package/dist/types/src/util.d.ts +9 -0
  73. package/dist/types/src/util.d.ts.map +1 -1
  74. package/package.json +33 -31
  75. package/src/NavTreePlugin.tsx +9 -11
  76. package/src/capabilities/app-graph-builder.ts +6 -4
  77. package/src/capabilities/capabilities.ts +3 -2
  78. package/src/capabilities/intent-resolver.ts +22 -16
  79. package/src/capabilities/react-surface.tsx +15 -41
  80. package/src/capabilities/state.ts +6 -9
  81. package/src/components/CommandsDialog.tsx +3 -4
  82. package/src/components/CommandsTrigger.tsx +7 -5
  83. package/src/components/L0Menu.tsx +332 -0
  84. package/src/components/L1Panels.tsx +119 -0
  85. package/src/components/NavTree.stories.tsx +6 -6
  86. package/src/components/NavTree.tsx +26 -116
  87. package/src/components/NavTreeContainer.tsx +114 -33
  88. package/src/components/NavTreeContext.tsx +13 -0
  89. package/src/components/NavTreeItemAction.tsx +12 -4
  90. package/src/components/NavTreeItemColumns.tsx +71 -0
  91. package/src/components/NotchStart.tsx +2 -2
  92. package/src/components/index.ts +2 -0
  93. package/src/components/types.ts +35 -0
  94. package/src/hooks.ts +21 -0
  95. package/src/stories/Graph.stories.tsx +6 -5
  96. package/src/stories/StorybookNavTree.tsx +63 -0
  97. package/src/translations.ts +0 -6
  98. package/src/types.ts +2 -1
  99. package/src/util.ts +56 -2
  100. package/dist/lib/browser/chunk-IMGT2LAL.mjs +0 -658
  101. package/dist/lib/browser/chunk-IMGT2LAL.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-OI7AAA6Q.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-74JPWYBP.mjs +0 -42
  104. package/dist/lib/browser/intent-resolver-74JPWYBP.mjs.map +0 -7
  105. package/dist/lib/browser/react-surface-6QWXI53A.mjs +0 -189
  106. package/dist/lib/browser/react-surface-6QWXI53A.mjs.map +0 -7
  107. package/dist/lib/browser/state-HT65TAYL.mjs.map +0 -7
  108. package/dist/types/src/components/NavTreeFooter.d.ts +0 -6
  109. package/dist/types/src/components/NavTreeFooter.d.ts.map +0 -1
  110. package/src/components/NavTreeFooter.tsx +0 -161
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAatE,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAM/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,uEAAmD,qBAAqB,uBAkLnG,CAAC"}
1
+ {"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAoBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAcnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAM/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,6CAwP3F,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type NavTreeContextValue } from './types';
2
+ export declare const NavTreeContext: import("react").Context<NavTreeContextValue | null>;
3
+ export declare const useNavTreeContext: () => NavTreeContextValue;
4
+ //# sourceMappingURL=NavTreeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTreeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContext.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAE9E,eAAO,MAAM,iBAAiB,2BAAmF,CAAC"}
@@ -1,4 +1,4 @@
1
- import React, { type MutableRefObject } from 'react';
1
+ import { type MutableRefObject } 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 & {
@@ -9,11 +9,11 @@ export type NavTreeItemActionMenuProps = ActionProperties & {
9
9
  suppressNextTooltip?: MutableRefObject<boolean>;
10
10
  onAction?: (action: Action) => void;
11
11
  };
12
- export declare const NavTreeItemActionDropdownMenu: ({ label, icon, testId, menuActions, onAction, }: NavTreeItemActionMenuProps) => React.JSX.Element;
13
- export declare const NavTreeItemMonolithicAction: ({ parent, properties: { disabled, caller, testId, icon }, data: invoke, baseLabel, }: Action & {
12
+ export declare const NavTreeItemActionDropdownMenu: ({ label, icon, testId, menuActions, onAction, }: NavTreeItemActionMenuProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const NavTreeItemMonolithicAction: ({ parent, properties: { disabled, caller, testId, icon, variant, iconOnly }, data: invoke, baseLabel, }: Action & {
14
14
  parent: Node;
15
15
  onAction?: (action: Action) => void;
16
16
  baseLabel: string;
17
- }) => React.JSX.Element;
18
- export declare const NavTreeItemAction: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => React.JSX.Element;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const NavTreeItemAction: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => import("react/jsx-runtime").JSX.Element;
19
19
  //# sourceMappingURL=NavTreeItemAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,gBAAgB,EAAU,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAMzD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,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;IACvB,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAYF,eAAO,MAAM,6BAA6B,oDAMvC,0BAA0B,sBAkB5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,yFAKrC,MAAM,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,sBAiBnF,CAAC;AAEF,eAAO,MAAM,iBAAiB,wDAAyD,0BAA0B,sBAiBhH,CAAC"}
1
+ {"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,gBAAgB,EAAU,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAMzD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,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;IACvB,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AASF,eAAO,MAAM,6BAA6B,oDAMvC,0BAA0B,4CAqB5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,4GAKrC,MAAM,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,4CAyBnF,CAAC;AAEF,eAAO,MAAM,iBAAiB,wDAAyD,0BAA0B,4CAiBhH,CAAC"}
@@ -2,8 +2,8 @@ import '@dxos-theme';
2
2
  import { type NavTreeItemActionMenuProps } from './NavTreeItemAction';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => import("react").JSX.Element;
6
- decorators: import("@storybook/react/*").Decorator[];
5
+ component: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => import("react/jsx-runtime").JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
7
  args: {
8
8
  icon: string;
9
9
  parent: {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { NavTreeItemColumnsProps } from './types';
3
+ export declare const NavTreeItemColumns: React.MemoExoticComponent<({ path, item, open }: NavTreeItemColumnsProps) => import("react/jsx-runtime").JSX.Element>;
4
+ //# sourceMappingURL=NavTreeItemColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTreeItemColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeItemColumns.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAQ9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIvD,eAAO,MAAM,kBAAkB,mDAA+B,uBAAuB,6CAsDnF,CAAC"}
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- export declare const NotchStart: () => React.JSX.Element;
1
+ export declare const NotchStart: () => import("react/jsx-runtime").JSX.Element;
3
2
  //# sourceMappingURL=NotchStart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotchStart.d.ts","sourceRoot":"","sources":["../../../../src/components/NotchStart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,eAAO,MAAM,UAAU,yBAetB,CAAC"}
1
+ {"version":3,"file":"NotchStart.d.ts","sourceRoot":"","sources":["../../../../src/components/NotchStart.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,UAAU,+CAetB,CAAC"}
@@ -2,6 +2,8 @@ export * from './CommandsDialog';
2
2
  export * from './CommandsTrigger';
3
3
  export * from './NavTree';
4
4
  export * from './NavTreeContainer';
5
+ export * from './NavTreeContext';
5
6
  export * from './NavTreeDocumentTitle';
6
7
  export * from './NotchStart';
8
+ export * from './types';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { FC } from 'react';
2
+ import type { Node } from '@dxos/app-graph';
3
+ import type { TreeProps } from '@dxos/react-ui-list';
4
+ import type { MaybePromise } from '@dxos/util';
5
+ import { type L1PanelProps } from './L1Panels';
6
+ import type { FlattenedActions, NavTreeItemGraphNode } from '../types';
7
+ export type NavTreeItemColumnsProps = {
8
+ path: string[];
9
+ item: Node;
10
+ open: boolean;
11
+ };
12
+ export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'>;
13
+ export type NavTreeContextValue = Pick<TreeProps<NavTreeItemGraphNode>, 'getProps' | 'isCurrent' | 'isOpen' | 'onOpenChange' | 'canDrop' | 'onSelect'> & Pick<L1PanelProps, 'onBack'> & {
14
+ tab: string;
15
+ onTabChange?: (node: NavTreeItemGraphNode) => void;
16
+ getItems: (node?: NavTreeItemGraphNode, disposition?: string) => NavTreeItemGraphNode[];
17
+ getActions: (node: Node) => FlattenedActions;
18
+ loadDescendents?: (node: Node) => MaybePromise<void>;
19
+ renderItemEnd?: FC<{
20
+ node: Node;
21
+ open: boolean;
22
+ }>;
23
+ popoverAnchorId?: string;
24
+ topbar?: boolean;
25
+ };
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEvE,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AAEhF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,SAAS,CAAC,oBAAoB,CAAC,EAC/B,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,GAAG,SAAS,GAAG,UAAU,CAC9E,GACC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,oBAAoB,EAAE,CAAC;IACxF,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,gBAAgB,CAAC;IAC7C,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IACrD,aAAa,CAAC,EAAE,EAAE,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { type Icon, type IconProps } from '@phosphor-icons/react';
2
- import React, { type HTMLAttributes, type PropsWithChildren } from 'react';
2
+ import { type HTMLAttributes, type PropsWithChildren } from 'react';
3
3
  import { type ClassNameValue, type Size } from '@dxos/react-ui';
4
4
  export declare const IconButton: ({ Icon, classNames, size, onClick, ...props }: {
5
5
  Icon: Icon;
6
6
  classNames?: ClassNameValue;
7
7
  size?: Size;
8
- } & Pick<IconProps, "weight"> & Pick<HTMLAttributes<HTMLDivElement>, "onClick">) => React.JSX.Element;
8
+ } & Pick<IconProps, "weight"> & Pick<HTMLAttributes<HTMLDivElement>, "onClick">) => import("react/jsx-runtime").JSX.Element;
9
9
  export type TreeNodeData = {
10
10
  id: string;
11
11
  title: string;
@@ -34,23 +34,23 @@ export type TreeNodeProps = {
34
34
  onChangeSelected?: (id: string, select: boolean) => void;
35
35
  onMenuAction?: (id: string, action: string) => void;
36
36
  };
37
- export declare const Title: ({ node: { title } }: Pick<TreeNodeProps, "node">) => React.JSX.Element;
37
+ export declare const Title: ({ node: { title } }: Pick<TreeNodeProps, "node">) => import("react/jsx-runtime").JSX.Element;
38
38
  export declare const Grid: ({ className, ...props }: PropsWithChildren<{
39
39
  className?: string;
40
- }> & HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
40
+ }> & HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
41
41
  export declare const TreeNodeRow: (props: TreeNodeProps & {
42
42
  className?: string;
43
- }) => React.JSX.Element;
43
+ }) => import("react/jsx-runtime").JSX.Element;
44
44
  export declare const TreeNode: (props: TreeNodeProps & {
45
45
  ancestors?: TreeNodeData[];
46
- }) => React.JSX.Element;
46
+ }) => import("react/jsx-runtime").JSX.Element;
47
47
  export declare const TreeChildNodes: ({ className, ...props }: TreeNodeProps & {
48
48
  ancestors?: TreeNodeData[];
49
49
  className?: string;
50
- }) => React.JSX.Element;
50
+ }) => import("react/jsx-runtime").JSX.Element;
51
51
  export type TreeProps = {
52
52
  className?: string;
53
53
  showRoot?: boolean;
54
54
  } & TreeNodeProps;
55
- export declare const Tree: ({ className, showRoot, ...props }: TreeProps) => React.JSX.Element;
55
+ export declare const Tree: ({ className, showRoot, ...props }: TreeProps) => import("react/jsx-runtime").JSX.Element;
56
56
  //# sourceMappingURL=Tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../src/experimental/Tree.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoC,KAAK,IAAI,EAAE,KAAK,SAAS,EAAoB,MAAM,uBAAuB,CAAC;AACtH,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAShE,eAAO,MAAM,UAAU,kDAMpB;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,GAC3B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,sBAOhD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,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nB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD,CAAC;AAiFF,eAAO,MAAM,KAAK,wBAAyB,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,4CAIrE,CAAC;AAEF,eAAO,MAAM,IAAI,4BAGd,iBAAiB,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,4CAG5E,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,aAAa,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CA2BxE,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,aAAa,GAAG;IAAE,SAAS,CAAC,EAAE,YAAY,EAAE,CAAA;CAAE,4CAgB7E,CAAC;AAEF,eAAO,MAAM,cAAc,4BAGxB,aAAa,GAAG;IAAE,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4CAapE,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,aAAa,CAAC;AAEnF,eAAO,MAAM,IAAI,sCAAuC,SAAS,4CAchE,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import '@dxos-theme';
2
2
  import { type Meta } from '@storybook/react';
3
- import { type JSX } from 'react';
4
- export declare const Default: () => JSX.Element;
5
- export declare const Visitor: () => JSX.Element;
3
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Visitor: () => import("react/jsx-runtime").JSX.Element;
6
5
  declare const meta: Meta;
7
6
  export default meta;
8
7
  //# sourceMappingURL=Tree.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../src/experimental/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAc,EAAE,KAAK,GAAG,EAA+C,MAAM,OAAO,CAAC;AAmGrF,eAAO,MAAM,OAAO,mBAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,mBAenB,CAAC;AAmGF,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../src/experimental/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAoG7C,eAAO,MAAM,OAAO,+CAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAenB,CAAC;AAmGF,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Node } from '@dxos/app-graph';
2
+ export declare const useLoadDescendents: (root?: Node) => void;
3
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +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,UAAW,IAAI,SAU7C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import '@dxos-theme';
2
2
  import { type Meta } from '@storybook/react';
3
- import { NavTree } from '../components';
3
+ import { StorybookNavTree } from './StorybookNavTree';
4
4
  export declare const Default: {};
5
- declare const meta: Meta<typeof NavTree>;
5
+ declare const meta: Meta<typeof StorybookNavTree>;
6
6
  export default meta;
7
7
  //# sourceMappingURL=Graph.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Graph.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Graph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAKrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAW7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAiCxC,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAuE9B,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Graph.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Graph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAKrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAW7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAiCtD,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAwEvC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type NavTreeContextValue, type NavTreeProps } from '../components';
2
+ export declare const StorybookNavTree: ({ getActions, loadDescendents, renderItemEnd, popoverAnchorId, getItems, getProps, isCurrent, canDrop, onSelect, isOpen, onOpenChange, ...props }: NavTreeProps & NavTreeContextValue) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=StorybookNavTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorybookNavTree.d.ts","sourceRoot":"","sources":["../../../../src/stories/StorybookNavTree.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAGrG,eAAO,MAAM,gBAAgB,sJAa1B,YAAY,GAAG,mBAAmB,4CAwCpC,CAAC"}
@@ -6,12 +6,6 @@ declare const _default: {
6
6
  'commands dialog title': string;
7
7
  'command list input placeholder': string;
8
8
  'node actions menu invoker label': string;
9
- 'warning title': string;
10
- 'technology preview message': string;
11
- 'learn more label': string;
12
- 'released message': string;
13
- 'see release label': string;
14
- 'powered by dxos message': string;
15
9
  'tree item actions label': string;
16
10
  'empty branch message': string;
17
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,wBAoBE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAMA,wBAcE"}
@@ -1,6 +1,6 @@
1
1
  import { type Action, type ActionLike, type Node } from '@dxos/app-graph';
2
2
  import { type Label } from '@dxos/react-ui';
3
- import { type MaybePromise } from '@dxos/util';
3
+ import { type MaybePromise, type Position } from '@dxos/util';
4
4
  export type NavTreeItemGraphNode = Node<any, Partial<NodeProperties & {
5
5
  persistenceClass: string;
6
6
  persistenceKey: string;
@@ -19,6 +19,7 @@ type SharedProperties = {
19
19
  label: Label;
20
20
  icon?: string;
21
21
  disabled?: boolean;
22
+ position?: Position;
22
23
  testId?: string;
23
24
  className?: string;
24
25
  headingClassName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,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AM,MAAM,UAAU,GAAG;IAGvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -9,4 +9,13 @@ export declare const getActions: (graph: Graph, node: Node) => FlattenedActions;
9
9
  export declare const expandChildrenAndActions: (graph: Graph, node: Node) => Promise<[void, [void, void]]>;
10
10
  export declare const expandChildren: (graph: Graph, node: Node) => Promise<void>;
11
11
  export declare const expandActions: (graph: Graph, node: Node) => Promise<[void, void]>;
12
+ export declare const l0ItemType: (item: Node<any>) => "link" | "tab" | "collection" | "action";
13
+ /**
14
+ * Returns the first two renderable characters from a string that are separated by non-word characters.
15
+ * Handles Unicode characters correctly.
16
+ *
17
+ * @param {string} label - The input string to process
18
+ * @returns {[string, string]} Array containing the two characters, or empty strings if not found
19
+ */
20
+ export declare const getFirstTwoRenderableChars: (label: string) => string[];
12
21
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,KAAK,EAIX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE3E,eAAO,MAAM,SAAS,UACb,KAAK,QACN,oBAAoB,QACpB,MAAM,EAAE,KACb,oBAAoB,GAAG,SAGzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,UACxB,KAAK,QACN,oBAAoB,QACpB,MAAM,EAAE,oBACI,MAAM,KACvB,oBAAoB,GAAG,IAOzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,KAAK,cACA,oBAAoB,mBACf,MAAM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AU,SACb,SAAS,MAAM,EAAE,KACtB,oBAAoB,EAStB,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,KAAK,QAAQ,IAAI,KAAG,gBAgBrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAAW,KAAK,QAAQ,IAAI,kCAEhE,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,KAAK,QAAQ,IAAI,kBAEtD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,KAAK,QAAQ,IAAI,0BAErD,CAAC;AAEF,eAAO,MAAM,UAAU,SAAU,IAAI,CAAC,GAAG,CAAC,6CAUzC,CAAC;AAOF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,UAAW,MAAM,aA2BvD,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/plugin-navtree",
3
- "version": "0.7.5-main.2567c87",
3
+ "version": "0.7.5-main.5ae2ba8",
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",
7
7
  "license": "MIT",
8
8
  "author": "DXOS.org",
9
9
  "sideEffects": true,
10
+ "type": "module",
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./dist/types/src/index.d.ts",
@@ -25,30 +26,31 @@
25
26
  "@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
26
27
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
27
28
  "@preact/signals-core": "^1.6.0",
28
- "@radix-ui/react-use-controllable-state": "^1.0.0",
29
+ "@radix-ui/react-dismissable-layer": "1.1.5",
30
+ "@radix-ui/react-use-controllable-state": "1.1.0",
29
31
  "date-fns": "^3.3.1",
30
- "@dxos/app-framework": "0.7.5-main.2567c87",
31
- "@dxos/async": "0.7.5-main.2567c87",
32
- "@dxos/app-graph": "0.7.5-main.2567c87",
33
- "@dxos/debug": "0.7.5-main.2567c87",
34
- "@dxos/invariant": "0.7.5-main.2567c87",
35
- "@dxos/live-object": "0.7.5-main.2567c87",
36
- "@dxos/echo-schema": "0.7.5-main.2567c87",
37
- "@dxos/local-storage": "0.7.5-main.2567c87",
38
- "@dxos/keyboard": "0.7.5-main.2567c87",
39
- "@dxos/log": "0.7.5-main.2567c87",
40
- "@dxos/plugin-client": "0.7.5-main.2567c87",
41
- "@dxos/plugin-graph": "0.7.5-main.2567c87",
42
- "@dxos/plugin-observability": "0.7.5-main.2567c87",
43
- "@dxos/protocols": "0.7.5-main.2567c87",
44
- "@dxos/plugin-theme": "0.7.5-main.2567c87",
45
- "@dxos/react-client": "0.7.5-main.2567c87",
46
- "@dxos/react-ui-list": "0.7.5-main.2567c87",
47
- "@dxos/react-ui-mosaic": "0.7.5-main.2567c87",
48
- "@dxos/react-ui-searchlist": "0.7.5-main.2567c87",
49
- "@dxos/react-ui-menu": "0.7.5-main.2567c87",
50
- "@dxos/util": "0.7.5-main.2567c87",
51
- "@dxos/react-ui-stack": "0.7.5-main.2567c87"
32
+ "@dxos/app-framework": "0.7.5-main.5ae2ba8",
33
+ "@dxos/debug": "0.7.5-main.5ae2ba8",
34
+ "@dxos/app-graph": "0.7.5-main.5ae2ba8",
35
+ "@dxos/echo-schema": "0.7.5-main.5ae2ba8",
36
+ "@dxos/async": "0.7.5-main.5ae2ba8",
37
+ "@dxos/invariant": "0.7.5-main.5ae2ba8",
38
+ "@dxos/keyboard": "0.7.5-main.5ae2ba8",
39
+ "@dxos/local-storage": "0.7.5-main.5ae2ba8",
40
+ "@dxos/live-object": "0.7.5-main.5ae2ba8",
41
+ "@dxos/log": "0.7.5-main.5ae2ba8",
42
+ "@dxos/plugin-client": "0.7.5-main.5ae2ba8",
43
+ "@dxos/plugin-observability": "0.7.5-main.5ae2ba8",
44
+ "@dxos/plugin-graph": "0.7.5-main.5ae2ba8",
45
+ "@dxos/plugin-theme": "0.7.5-main.5ae2ba8",
46
+ "@dxos/protocols": "0.7.5-main.5ae2ba8",
47
+ "@dxos/react-client": "0.7.5-main.5ae2ba8",
48
+ "@dxos/react-ui-menu": "0.7.5-main.5ae2ba8",
49
+ "@dxos/react-ui-list": "0.7.5-main.5ae2ba8",
50
+ "@dxos/react-ui-searchlist": "0.7.5-main.5ae2ba8",
51
+ "@dxos/react-ui-tabs": "0.7.5-main.5ae2ba8",
52
+ "@dxos/react-ui-stack": "0.7.5-main.5ae2ba8",
53
+ "@dxos/util": "0.7.5-main.5ae2ba8"
52
54
  },
53
55
  "devDependencies": {
54
56
  "@phosphor-icons/react": "^2.1.5",
@@ -57,18 +59,18 @@
57
59
  "react": "~18.2.0",
58
60
  "react-dom": "~18.2.0",
59
61
  "vite": "5.4.7",
60
- "@dxos/random": "0.7.5-main.2567c87",
61
- "@dxos/echo-signals": "0.7.5-main.2567c87",
62
- "@dxos/react-ui": "0.7.5-main.2567c87",
63
- "@dxos/react-ui-theme": "0.7.5-main.2567c87",
64
- "@dxos/storybook-utils": "0.7.5-main.2567c87"
62
+ "@dxos/echo-signals": "0.7.5-main.5ae2ba8",
63
+ "@dxos/random": "0.7.5-main.5ae2ba8",
64
+ "@dxos/react-ui": "0.7.5-main.5ae2ba8",
65
+ "@dxos/react-ui-theme": "0.7.5-main.5ae2ba8",
66
+ "@dxos/storybook-utils": "0.7.5-main.5ae2ba8"
65
67
  },
66
68
  "peerDependencies": {
67
69
  "@phosphor-icons/react": "^2.1.5",
68
70
  "react": "~18.2.0",
69
71
  "react-dom": "~18.2.0",
70
- "@dxos/react-ui": "0.7.5-main.2567c87",
71
- "@dxos/react-ui-theme": "0.7.5-main.2567c87"
72
+ "@dxos/react-ui": "0.7.5-main.5ae2ba8",
73
+ "@dxos/react-ui-theme": "0.7.5-main.5ae2ba8"
72
74
  },
73
75
  "publishConfig": {
74
76
  "access": "public"
@@ -9,9 +9,8 @@ import {
9
9
  contributes,
10
10
  Capabilities,
11
11
  allOf,
12
- oneOf,
13
- NavigationAction,
14
12
  createIntent,
13
+ LayoutAction,
15
14
  } from '@dxos/app-framework';
16
15
  import { type TreeData } from '@dxos/react-ui-list';
17
16
 
@@ -25,7 +24,7 @@ export const NavTreePlugin = () =>
25
24
  definePlugin(meta, [
26
25
  defineModule({
27
26
  id: `${meta.id}/module/state`,
28
- activatesOn: allOf(Events.LayoutReady, Events.LocationReady),
27
+ activatesOn: Events.LayoutReady,
29
28
  activatesAfter: [NavTreeEvents.StateReady],
30
29
  activate: State,
31
30
  }),
@@ -36,7 +35,7 @@ export const NavTreePlugin = () =>
36
35
  }),
37
36
  defineModule({
38
37
  id: `${meta.id}/module/metadata`,
39
- activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
38
+ activatesOn: Events.SetupMetadata,
40
39
  activate: () =>
41
40
  contributes(Capabilities.Metadata, {
42
41
  id: NODE_TYPE,
@@ -56,14 +55,13 @@ export const NavTreePlugin = () =>
56
55
  }),
57
56
  defineModule({
58
57
  id: `${meta.id}/module/expose`,
59
- activatesOn: allOf(Events.DispatcherReady, Events.LayoutReady, Events.LocationReady, NavTreeEvents.StateReady),
58
+ activatesOn: allOf(Events.DispatcherReady, Events.LayoutReady, NavTreeEvents.StateReady),
60
59
  activate: async (context) => {
61
- const location = context.requestCapability(Capabilities.Location);
60
+ const layout = context.requestCapability(Capabilities.Layout);
62
61
  const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
63
62
 
64
- const soloPart = location.active.solo?.[0];
65
- if (dispatch && soloPart) {
66
- await dispatch(createIntent(NavigationAction.Expose, { id: soloPart.id }));
63
+ if (dispatch && layout.active.length === 1) {
64
+ await dispatch(createIntent(LayoutAction.Expose, { part: 'navigation', subject: layout.active[0] }));
67
65
  }
68
66
 
69
67
  return [];
@@ -76,12 +74,12 @@ export const NavTreePlugin = () =>
76
74
  }),
77
75
  defineModule({
78
76
  id: `${meta.id}/module/react-surface`,
79
- activatesOn: Events.Startup,
77
+ activatesOn: Events.SetupReactSurface,
80
78
  activate: ReactSurface,
81
79
  }),
82
80
  defineModule({
83
81
  id: `${meta.id}/module/intent-resolver`,
84
- activatesOn: Events.SetupIntents,
82
+ activatesOn: Events.SetupIntentResolver,
85
83
  activate: IntentResolver,
86
84
  }),
87
85
  defineModule({
@@ -19,10 +19,12 @@ export default (context: PluginsContext) =>
19
19
  data: async () => {
20
20
  const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
21
21
  await dispatch(
22
- createIntent(LayoutAction.SetLayout, {
23
- element: 'dialog',
24
- component: COMMANDS_DIALOG,
25
- dialogBlockAlign: 'start',
22
+ createIntent(LayoutAction.UpdateDialog, {
23
+ part: 'dialog',
24
+ subject: COMMANDS_DIALOG,
25
+ options: {
26
+ blockAlign: 'start',
27
+ },
26
28
  }),
27
29
  );
28
30
  },
@@ -6,13 +6,14 @@ import { defineCapability } from '@dxos/app-framework';
6
6
  import { type ReactiveObject } from '@dxos/live-object';
7
7
 
8
8
  import { NAVTREE_PLUGIN } from '../meta';
9
+ import { type NavTreeItemGraphNode } from '../types';
9
10
 
10
11
  export namespace NavTreeCapabilities {
11
12
  export const State = defineCapability<{
12
13
  state: Map<string, ReactiveObject<{ open: boolean; current: boolean }>>;
13
14
  getItem: (path: string[]) => ReactiveObject<{ open: boolean; current: boolean }>;
14
15
  setItem: (path: string[], key: 'open' | 'current', next: boolean) => void;
15
- isOpen: (path: string[]) => boolean;
16
- isCurrent: (path: string[]) => boolean;
16
+ isOpen: (path: string[], item: NavTreeItemGraphNode) => boolean;
17
+ isCurrent: (path: string[], item: NavTreeItemGraphNode) => boolean;
17
18
  }>(`${NAVTREE_PLUGIN}/capability/state`);
18
19
  }
@@ -2,7 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, type PluginsContext, Capabilities, NavigationAction, createResolver } from '@dxos/app-framework';
5
+ import { contributes, type PluginsContext, Capabilities, createResolver, LayoutAction } from '@dxos/app-framework';
6
+ import { S } from '@dxos/echo-schema';
6
7
  import { log } from '@dxos/log';
7
8
 
8
9
  import { NavTreeCapabilities } from './capabilities';
@@ -10,21 +11,26 @@ import { NavTreeCapabilities } from './capabilities';
10
11
  export default (context: PluginsContext) =>
11
12
  contributes(
12
13
  Capabilities.IntentResolver,
13
- createResolver(NavigationAction.Expose, async ({ id }) => {
14
- const { graph } = context.requestCapability(Capabilities.AppGraph);
15
- const { getItem, setItem } = context.requestCapability(NavTreeCapabilities.State);
14
+ createResolver({
15
+ intent: LayoutAction.UpdateLayout,
16
+ filter: (data): data is S.Schema.Type<typeof LayoutAction.Expose.fields.input> =>
17
+ S.is(LayoutAction.Expose.fields.input)(data),
18
+ resolve: async ({ subject }) => {
19
+ const { graph } = context.requestCapability(Capabilities.AppGraph);
20
+ const { getItem, setItem } = context.requestCapability(NavTreeCapabilities.State);
16
21
 
17
- try {
18
- const path = await graph.waitForPath({ target: id }, { timeout: 1_000 });
19
- [...Array(path.length)].forEach((_, index) => {
20
- const subpath = path.slice(0, index);
21
- const value = getItem(subpath);
22
- if (!value.open) {
23
- setItem(subpath, 'open', true);
24
- }
25
- });
26
- } catch {
27
- log.warn('Path to node not found', { id });
28
- }
22
+ try {
23
+ const path = await graph.waitForPath({ target: subject }, { timeout: 1_000 });
24
+ [...Array(path.length)].forEach((_, index) => {
25
+ const subpath = path.slice(0, index);
26
+ const value = getItem(subpath);
27
+ if (!value.open) {
28
+ setItem(subpath, 'open', true);
29
+ }
30
+ });
31
+ } catch {
32
+ log('Path to node not found', { subject });
33
+ }
34
+ },
29
35
  }),
30
36
  );