@dxos/plugin-navtree 0.8.4-main.67995b8 → 0.8.4-main.69d29f4

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 (178) hide show
  1. package/dist/lib/browser/app-graph-builder-RSMA6I22.mjs +43 -0
  2. package/dist/lib/browser/app-graph-builder-RSMA6I22.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-6YPQ625I.mjs +1293 -0
  4. package/dist/lib/browser/chunk-6YPQ625I.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-AGQDZBPL.mjs +23 -0
  6. package/dist/lib/browser/chunk-AGQDZBPL.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-YKTYPINZ.mjs +19 -0
  8. package/dist/lib/browser/chunk-YKTYPINZ.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +82 -95
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/{keyboard-QRS6WOQH.mjs → keyboard-32EH3N4K.mjs} +20 -19
  12. package/dist/lib/browser/keyboard-32EH3N4K.mjs.map +7 -0
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/operation-resolver-IB75DC5O.mjs +52 -0
  15. package/dist/lib/browser/operation-resolver-IB75DC5O.mjs.map +7 -0
  16. package/dist/lib/browser/react-surface-F6CVMS3Y.mjs +58 -0
  17. package/dist/lib/browser/react-surface-F6CVMS3Y.mjs.map +7 -0
  18. package/dist/lib/browser/state-EVYQOUI3.mjs +120 -0
  19. package/dist/lib/browser/state-EVYQOUI3.mjs.map +7 -0
  20. package/dist/types/src/NavTreePlugin.d.ts +2 -1
  21. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  23. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  24. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  25. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/index.d.ts +5 -105
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/keyboard/index.d.ts +3 -0
  29. package/dist/types/src/capabilities/keyboard/index.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/keyboard/keyboard.d.ts +5 -0
  31. package/dist/types/src/capabilities/keyboard/keyboard.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  33. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  34. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  35. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  36. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  37. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  39. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/state/index.d.ts +3 -0
  41. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  42. package/dist/types/src/capabilities/state/state.d.ts +6 -0
  43. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  44. package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +3 -2
  45. package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +1 -1
  46. package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +1 -1
  47. package/dist/types/src/components/NavTree/NavTree.d.ts +30 -1
  48. package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
  49. package/dist/types/src/components/NavTree/NavTree.stories.d.ts +29 -4
  50. package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/NavTreeContainer.d.ts +8 -1
  52. package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
  53. package/dist/types/src/components/NavTreeDocumentTitle.d.ts +1 -1
  54. package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +1 -1
  55. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +6 -6
  56. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
  57. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +33 -4
  58. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
  60. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
  61. package/dist/types/src/components/Sidebar/L0Menu.d.ts +6 -4
  62. package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
  63. package/dist/types/src/components/Sidebar/L1Panel.d.ts +1 -1
  64. package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
  65. package/dist/types/src/components/Sidebar/L1Tabs.d.ts +2 -2
  66. package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
  67. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
  68. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
  69. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
  70. package/dist/types/src/components/index.d.ts.map +1 -1
  71. package/dist/types/src/components/types.d.ts +8 -8
  72. package/dist/types/src/components/types.d.ts.map +1 -1
  73. package/dist/types/src/experimental/Tree.d.ts +1 -2
  74. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  75. package/dist/types/src/experimental/Tree.stories.d.ts +7 -4
  76. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  77. package/dist/types/src/hooks.d.ts +32 -1
  78. package/dist/types/src/hooks.d.ts.map +1 -1
  79. package/dist/types/src/index.d.ts +1 -2
  80. package/dist/types/src/index.d.ts.map +1 -1
  81. package/dist/types/src/meta.d.ts +3 -4
  82. package/dist/types/src/meta.d.ts.map +1 -1
  83. package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
  84. package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
  85. package/dist/types/src/testing/generator.d.ts +5 -6
  86. package/dist/types/src/testing/generator.d.ts.map +1 -1
  87. package/dist/types/src/testing/update-state.d.ts +2 -2
  88. package/dist/types/src/testing/update-state.d.ts.map +1 -1
  89. package/dist/types/src/types/capabilities.d.ts +16 -0
  90. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  91. package/dist/types/src/types/events.d.ts +5 -0
  92. package/dist/types/src/types/events.d.ts.map +1 -0
  93. package/dist/types/src/types/index.d.ts +4 -0
  94. package/dist/types/src/types/index.d.ts.map +1 -0
  95. package/dist/types/src/{types.d.ts → types/schema.d.ts} +10 -9
  96. package/dist/types/src/types/schema.d.ts.map +1 -0
  97. package/dist/types/src/util.d.ts +8 -9
  98. package/dist/types/src/util.d.ts.map +1 -1
  99. package/dist/types/tsconfig.tsbuildinfo +1 -1
  100. package/package.json +56 -55
  101. package/src/NavTreePlugin.tsx +65 -83
  102. package/src/capabilities/app-graph-builder/app-graph-builder.ts +41 -0
  103. package/src/capabilities/app-graph-builder/index.ts +7 -0
  104. package/src/capabilities/index.ts +5 -9
  105. package/src/capabilities/keyboard/index.ts +7 -0
  106. package/src/capabilities/keyboard/keyboard.ts +65 -0
  107. package/src/capabilities/operation-resolver/index.ts +7 -0
  108. package/src/capabilities/operation-resolver/operation-resolver.ts +41 -0
  109. package/src/capabilities/react-surface/index.ts +7 -0
  110. package/src/capabilities/react-surface/react-surface.tsx +54 -0
  111. package/src/capabilities/state/index.ts +7 -0
  112. package/src/capabilities/state/state.ts +121 -0
  113. package/src/components/CommandsDialog/CommandsDialog.tsx +109 -98
  114. package/src/components/CommandsDialog/CommandsTrigger.tsx +6 -15
  115. package/src/components/NavTree/NavTree.stories.tsx +97 -92
  116. package/src/components/NavTree/NavTree.tsx +9 -15
  117. package/src/components/NavTreeContainer.tsx +280 -256
  118. package/src/components/NavTreeDocumentTitle.tsx +5 -4
  119. package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +20 -12
  120. package/src/components/NavTreeItem/NavTreeItemAction.tsx +25 -18
  121. package/src/components/NavTreeItem/NavTreeItemColumns.tsx +36 -29
  122. package/src/components/Sidebar/L0Menu.tsx +114 -139
  123. package/src/components/Sidebar/L1Panel.tsx +32 -35
  124. package/src/components/Sidebar/L1Tabs.tsx +7 -31
  125. package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -8
  126. package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
  127. package/src/components/index.ts +1 -0
  128. package/src/components/types.ts +9 -8
  129. package/src/experimental/Tree.stories.tsx +28 -30
  130. package/src/experimental/Tree.tsx +7 -24
  131. package/src/hooks.ts +54 -2
  132. package/src/index.ts +1 -2
  133. package/src/meta.ts +11 -8
  134. package/src/testing/app-graph-builder.ts +159 -234
  135. package/src/testing/generator.ts +20 -18
  136. package/src/testing/update-state.ts +6 -6
  137. package/src/types/capabilities.ts +21 -0
  138. package/src/types/events.ts +11 -0
  139. package/src/types/index.ts +7 -0
  140. package/src/{types.ts → types/schema.ts} +9 -8
  141. package/src/util.ts +14 -35
  142. package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs +0 -45
  143. package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
  144. package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
  145. package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
  146. package/dist/lib/browser/chunk-WCARAZ7J.mjs +0 -15
  147. package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
  148. package/dist/lib/browser/chunk-WEMCSQI7.mjs +0 -1469
  149. package/dist/lib/browser/chunk-WEMCSQI7.mjs.map +0 -7
  150. package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs +0 -47
  151. package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
  152. package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
  153. package/dist/lib/browser/react-surface-JSJ5SQX5.mjs +0 -51
  154. package/dist/lib/browser/react-surface-JSJ5SQX5.mjs.map +0 -7
  155. package/dist/lib/browser/state-54DY3DOY.mjs +0 -117
  156. package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
  157. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  158. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  159. package/dist/types/src/capabilities/capabilities.d.ts +0 -21
  160. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  161. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  162. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  163. package/dist/types/src/capabilities/keyboard.d.ts +0 -4
  164. package/dist/types/src/capabilities/keyboard.d.ts.map +0 -1
  165. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  166. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  167. package/dist/types/src/capabilities/state.d.ts +0 -20
  168. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  169. package/dist/types/src/events.d.ts +0 -4
  170. package/dist/types/src/events.d.ts.map +0 -1
  171. package/dist/types/src/types.d.ts.map +0 -1
  172. package/src/capabilities/app-graph-builder.ts +0 -52
  173. package/src/capabilities/capabilities.ts +0 -20
  174. package/src/capabilities/intent-resolver.ts +0 -37
  175. package/src/capabilities/keyboard.ts +0 -59
  176. package/src/capabilities/react-surface.tsx +0 -45
  177. package/src/capabilities/state.ts +0 -104
  178. package/src/events.ts +0 -11
package/src/util.ts CHANGED
@@ -2,22 +2,24 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Action, type Node, type ReadableGraph, isAction, isActionLike } from '@dxos/app-graph';
5
+ import { Graph, Node } from '@dxos/plugin-graph';
6
6
  import { isNonNullable } from '@dxos/util';
7
7
 
8
- import { type FlattenedActions, type NavTreeItemGraphNode } from './types';
8
+ import { type NavTreeItemGraphNode } from './types';
9
9
 
10
10
  export const getParent = (
11
- graph: ReadableGraph,
11
+ graph: Graph.ReadableGraph,
12
12
  node: NavTreeItemGraphNode,
13
13
  path: string[],
14
14
  ): NavTreeItemGraphNode | undefined => {
15
15
  const parentId = path[path.length - 2];
16
- return graph.getConnections(node.id, 'inbound').find((n) => n.id === parentId) as NavTreeItemGraphNode | undefined;
16
+ return Graph.getConnections(graph, node.id, 'inbound').find((n: Node.Node) => n.id === parentId) as
17
+ | NavTreeItemGraphNode
18
+ | undefined;
17
19
  };
18
20
 
19
21
  export const getPersistenceParent = (
20
- graph: ReadableGraph,
22
+ graph: Graph.ReadableGraph,
21
23
  node: NavTreeItemGraphNode,
22
24
  path: string[],
23
25
  persistenceClass: string,
@@ -31,7 +33,7 @@ export const getPersistenceParent = (
31
33
  };
32
34
 
33
35
  export const resolveMigrationOperation = (
34
- graph: ReadableGraph,
36
+ graph: Graph.ReadableGraph,
35
37
  activeNode: NavTreeItemGraphNode,
36
38
  destinationPath: string[],
37
39
  destinationRelatedNode?: NavTreeItemGraphNode,
@@ -60,7 +62,7 @@ export const resolveMigrationOperation = (
60
62
  };
61
63
 
62
64
  // TODO(wittjosiah): Move into node implementation?
63
- export const sortActions = (actions: Action[]): Action[] =>
65
+ export const sortActions = (actions: Node.Action[]): Node.Action[] =>
64
66
  actions.sort((a, b) => {
65
67
  if (a.properties.disposition === b.properties.disposition) {
66
68
  return 0;
@@ -74,13 +76,12 @@ export const sortActions = (actions: Action[]): Action[] =>
74
76
  });
75
77
 
76
78
  export const getChildren = (
77
- graph: ReadableGraph,
79
+ graph: Graph.ReadableGraph,
78
80
  node: NavTreeItemGraphNode,
79
81
  path: readonly string[] = [],
80
82
  ): NavTreeItemGraphNode[] => {
81
- return graph
82
- .getConnections(node.id, 'outbound')
83
- .map((n) => {
83
+ return Graph.getConnections(graph, node.id, 'outbound')
84
+ .map((n: Node.Node) => {
84
85
  // Break cycles.
85
86
  const nextPath = [...path, node.id];
86
87
  return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);
@@ -88,31 +89,9 @@ export const getChildren = (
88
89
  .filter(isNonNullable) as NavTreeItemGraphNode[];
89
90
  };
90
91
 
91
- export const getActions = (graph: ReadableGraph, node: Node): FlattenedActions => {
92
- return graph.getActions(node.id).reduce(
93
- (acc: FlattenedActions, arg) => {
94
- if (arg.properties.disposition === 'item') {
95
- return acc;
96
- }
97
-
98
- acc.actions.push(arg);
99
- if (!isAction(arg)) {
100
- const actionGroup = graph.getActions(arg.id);
101
- acc.groupedActions[arg.id] = actionGroup;
102
- }
103
- return acc;
104
- },
105
- { actions: [], groupedActions: {} },
106
- );
107
- };
108
-
109
- export const l0ItemType = (item: Node<any>) => {
110
- if (item.properties.disposition === 'collection') {
111
- return 'collection';
112
- } else if (isActionLike(item)) {
92
+ export const l0ItemType = (item: Node.Node) => {
93
+ if (Node.isActionLike(item)) {
113
94
  return 'action';
114
- } else if (item.properties.disposition === 'navigation') {
115
- return 'link';
116
95
  } else {
117
96
  return 'tab';
118
97
  }
@@ -1,45 +0,0 @@
1
- import {
2
- COMMANDS_DIALOG,
3
- NAVTREE_PLUGIN
4
- } from "./chunk-ERDGQTH5.mjs";
5
-
6
- // src/capabilities/app-graph-builder.ts
7
- import { Rx } from "@effect-rx/rx-react";
8
- import { Option, pipe } from "effect";
9
- import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
10
- import { createExtension, ROOT_ID } from "@dxos/plugin-graph";
11
- var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
12
- id: NAVTREE_PLUGIN,
13
- actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map(() => [
14
- {
15
- id: COMMANDS_DIALOG,
16
- data: async () => {
17
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
18
- await dispatch(createIntent(LayoutAction.UpdateDialog, {
19
- part: "dialog",
20
- subject: COMMANDS_DIALOG,
21
- options: {
22
- blockAlign: "start"
23
- }
24
- }));
25
- },
26
- properties: {
27
- label: [
28
- "open commands label",
29
- {
30
- ns: NAVTREE_PLUGIN
31
- }
32
- ],
33
- icon: "ph--magnifying-glass--regular",
34
- keyBinding: {
35
- macos: "meta+k",
36
- windows: "ctrl+k"
37
- }
38
- }
39
- }
40
- ]), Option.getOrElse(() => [])))
41
- }));
42
- export {
43
- app_graph_builder_default as default
44
- };
45
- //# sourceMappingURL=app-graph-builder-5J4LRWDX.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, type PluginContext, createIntent, LayoutAction } from '@dxos/app-framework';\nimport { createExtension, ROOT_ID } from '@dxos/plugin-graph';\n\nimport { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: NAVTREE_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),\n Option.map(() => [\n {\n id: COMMANDS_DIALOG,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: COMMANDS_DIALOG,\n options: {\n blockAlign: 'start',\n },\n }),\n );\n },\n properties: {\n label: ['open commands label', { ns: NAVTREE_PLUGIN }],\n icon: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'meta+k',\n windows: 'ctrl+k',\n },\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,aAAiCC,cAAcC,oBAAoB;AAC1F,SAASC,iBAAiBC,eAAe;AAIzC,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,SAAS,CAACC,SACRC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAOU,UAAUF,OAAOG,KAAKR,KAAAA,IAAQK,OAAOI,KAAI,CAAA,GAC/EJ,OAAOK,IAAI,MAAM;IACf;MACEb,IAAIc;MACJC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKtB,QAAQuB,cAAcrB,aAAasB,gBAAgB;AACzF,cAAMF,SACJG,aAAaC,aAAaC,cAAc;UACtCC,MAAM;UACNC,SAASV;UACTW,SAAS;YACPC,YAAY;UACd;QACF,CAAA,CAAA;MAEJ;MACAC,YAAY;QACVC,OAAO;UAAC;UAAuB;YAAEC,IAAI5B;UAAe;;QACpD6B,MAAM;QACNC,YAAY;UACVC,OAAO;UACPC,SAAS;QACX;MACF;IACF;GACD,GACDzB,OAAO0B,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
6
- "names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "createIntent", "LayoutAction", "createExtension", "ROOT_ID", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "NAVTREE_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "ROOT_ID", "some", "none", "map", "COMMANDS_DIALOG", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "createIntent", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "getOrElse"]
7
- }
@@ -1,16 +0,0 @@
1
- // src/meta.ts
2
- var NAVTREE_PLUGIN = "dxos.org/plugin/navtree";
3
- var KEY_BINDING = "KeyBinding";
4
- var COMMANDS_DIALOG = `${NAVTREE_PLUGIN}/CommandsDialog`;
5
- var meta = {
6
- id: NAVTREE_PLUGIN,
7
- name: "Navtree"
8
- };
9
-
10
- export {
11
- NAVTREE_PLUGIN,
12
- KEY_BINDING,
13
- COMMANDS_DIALOG,
14
- meta
15
- };
16
- //# sourceMappingURL=chunk-ERDGQTH5.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const NAVTREE_PLUGIN = 'dxos.org/plugin/navtree';\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n// TODO(wittjosiah): Factor out.\nexport const COMMANDS_DIALOG = `${NAVTREE_PLUGIN}/CommandsDialog`;\n\nexport const meta: PluginMeta = {\n id: NAVTREE_PLUGIN,\n name: 'Navtree',\n};\n"],
5
- "mappings": ";AAMO,IAAMA,iBAAiB;AAGvB,IAAMC,cAAc;AAEpB,IAAMC,kBAAkB,GAAGF,cAAAA;AAE3B,IAAMG,OAAmB;EAC9BC,IAAIJ;EACJK,MAAM;AACR;",
6
- "names": ["NAVTREE_PLUGIN", "KEY_BINDING", "COMMANDS_DIALOG", "meta", "id", "name"]
7
- }
@@ -1,15 +0,0 @@
1
- import {
2
- NAVTREE_PLUGIN
3
- } from "./chunk-ERDGQTH5.mjs";
4
-
5
- // src/capabilities/capabilities.ts
6
- import { defineCapability } from "@dxos/app-framework";
7
- (function(NavTreeCapabilities2) {
8
- NavTreeCapabilities2.State = defineCapability(`${NAVTREE_PLUGIN}/capability/state`);
9
- })(NavTreeCapabilities || (NavTreeCapabilities = {}));
10
- var NavTreeCapabilities;
11
-
12
- export {
13
- NavTreeCapabilities
14
- };
15
- //# sourceMappingURL=chunk-WCARAZ7J.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/capabilities.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Live } from '@dxos/live-object';\n\nimport { NAVTREE_PLUGIN } from '../meta';\nimport { type NavTreeItemGraphNode } from '../types';\n\nexport namespace NavTreeCapabilities {\n export const State = defineCapability<{\n state: Map<string, Live<{ open: boolean; current: boolean; alternateTree?: boolean }>>;\n getItem: (path: string[]) => Live<{ open: boolean; current: boolean; alternateTree?: boolean }>;\n setItem: (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => void;\n isOpen: (path: string[], item: NavTreeItemGraphNode) => boolean;\n isCurrent: (path: string[], item: NavTreeItemGraphNode) => boolean;\n isAlternateTree: (path: string[], item: NavTreeItemGraphNode) => boolean;\n }>(`${NAVTREE_PLUGIN}/capability/state`);\n}\n"],
5
- "mappings": ";;;;;AAIA,SAASA,wBAAwB;UAMhBC,sBAAAA;uBACFC,QAAQC,iBAOlB,GAAGC,cAAAA,mBAAiC;AACzC,GATiBH,wBAAAA,sBAAAA,CAAAA,EAAAA;;",
6
- "names": ["defineCapability", "NavTreeCapabilities", "State", "defineCapability", "NAVTREE_PLUGIN"]
7
- }