@dxos/plugin-navtree 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (86) hide show
  1. package/dist/lib/browser/NavTreePlugin-53I3ONRE.mjs +74 -0
  2. package/dist/lib/browser/NavTreePlugin-53I3ONRE.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +28 -111
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +21 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/types/src/NavTreePlugin.d.ts +1 -0
  9. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  10. package/dist/types/src/NavTreePlugin.node.d.ts +4 -0
  11. package/dist/types/src/NavTreePlugin.node.d.ts.map +1 -0
  12. package/dist/types/src/NavTreePlugin.test.d.ts +2 -0
  13. package/dist/types/src/NavTreePlugin.test.d.ts.map +1 -0
  14. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  15. package/dist/types/src/capabilities/index.d.ts +1 -1
  16. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  19. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  22. package/dist/types/src/components/NavTree/NavTree.stories.d.ts +8 -9
  23. package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
  24. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +2 -2
  25. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
  26. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +1 -1
  27. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
  29. package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
  30. package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
  31. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
  32. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
  33. package/dist/types/src/components/types.d.ts +0 -1
  34. package/dist/types/src/components/types.d.ts.map +1 -1
  35. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -1
  36. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +8 -9
  37. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -1
  38. package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -1
  39. package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -1
  40. package/dist/types/src/experimental/Tree.d.ts +2 -2
  41. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  42. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  43. package/dist/types/src/hooks/useActions.d.ts.map +1 -1
  44. package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -1
  45. package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -1
  46. package/dist/types/src/hooks/useNavTreeState.d.ts +1 -5
  47. package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -1
  48. package/dist/types/src/index.d.ts +3 -2
  49. package/dist/types/src/index.d.ts.map +1 -1
  50. package/dist/types/src/operations/expose.d.ts +1 -1
  51. package/dist/types/src/operations/expose.d.ts.map +1 -1
  52. package/dist/types/src/operations/index.d.ts +1 -1
  53. package/dist/types/src/operations/index.d.ts.map +1 -1
  54. package/dist/types/src/testing/generator.d.ts.map +1 -1
  55. package/dist/types/src/testing/update-state.d.ts.map +1 -1
  56. package/dist/types/src/translations.d.ts +8 -10
  57. package/dist/types/src/translations.d.ts.map +1 -1
  58. package/dist/types/src/types/capabilities.d.ts +1 -2
  59. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  60. package/dist/types/src/types/events.d.ts.map +1 -1
  61. package/dist/types/src/util.d.ts +1 -1
  62. package/dist/types/src/util.d.ts.map +1 -1
  63. package/dist/types/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +49 -40
  65. package/src/NavTreePlugin.node.ts +37 -0
  66. package/src/NavTreePlugin.test.ts +29 -0
  67. package/src/NavTreePlugin.tsx +4 -3
  68. package/src/capabilities/app-graph-builder.ts +1 -1
  69. package/src/capabilities/index.ts +1 -1
  70. package/src/capabilities/operation-handler.ts +1 -1
  71. package/src/capabilities/react-surface.tsx +2 -3
  72. package/src/capabilities/state.ts +2 -2
  73. package/src/components/NavTree/NavTree.stories.tsx +2 -2
  74. package/src/components/NavTreeItem/NavTreeItemAction.tsx +3 -4
  75. package/src/components/Sidebar/L1Panel.tsx +82 -141
  76. package/src/components/types.ts +0 -1
  77. package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +2 -1
  78. package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +42 -46
  79. package/src/containers/NavTreeContainer/NavTreeContainer.tsx +0 -9
  80. package/src/hooks/useNavTreeState.ts +1 -8
  81. package/src/index.ts +8 -2
  82. package/src/operations/expose.ts +1 -1
  83. package/src/operations/index.ts +1 -1
  84. package/src/translations.ts +0 -1
  85. package/src/types/capabilities.ts +2 -2
  86. package/src/util.ts +1 -1
@@ -0,0 +1,74 @@
1
+ // src/NavTreePlugin.tsx
2
+ import * as Effect from "effect/Effect";
3
+ import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
4
+ import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from "@dxos/app-toolkit";
5
+ import { Graph } from "@dxos/plugin-graph";
6
+ import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from "#capabilities";
7
+ import { NODE_TYPE } from "#containers";
8
+ import { meta } from "#meta";
9
+ import { translations } from "#translations";
10
+ import { NavTreeEvents } from "#types";
11
+ var NavTreePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
12
+ activate: AppGraphBuilder
13
+ }), AppPlugin.addMetadataModule({
14
+ metadata: {
15
+ id: NODE_TYPE,
16
+ metadata: {
17
+ parse: ({ item }, type) => {
18
+ switch (type) {
19
+ case "node":
20
+ return item;
21
+ case "object":
22
+ return item.data;
23
+ case "view-object":
24
+ return {
25
+ id: `${item.id}-view`,
26
+ object: item.data
27
+ };
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }), AppPlugin.addOperationHandlerModule({
33
+ activate: OperationHandler
34
+ }), AppPlugin.addSurfaceModule({
35
+ activate: ReactSurface
36
+ }), AppPlugin.addTranslationsModule({
37
+ translations
38
+ }), Plugin.addModule({
39
+ id: "state",
40
+ activatesOn: AppActivationEvents.LayoutReady,
41
+ firesAfterActivation: [
42
+ NavTreeEvents.StateReady
43
+ ],
44
+ activate: State
45
+ }), Plugin.addModule({
46
+ id: "expose",
47
+ activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, AppActivationEvents.AppGraphReady, AppActivationEvents.LayoutReady, NavTreeEvents.StateReady),
48
+ activate: Effect.fnUntraced(function* () {
49
+ const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);
50
+ const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
51
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
52
+ if (invokePromise && layout.active.length === 1) {
53
+ void Graph.waitForPath(graph, {
54
+ target: layout.active[0]
55
+ }, {
56
+ timeout: 3e4
57
+ }).then(() => invokePromise(LayoutOperation.Expose, {
58
+ subject: layout.active[0]
59
+ })).catch(() => {
60
+ });
61
+ }
62
+ return [];
63
+ })
64
+ }), Plugin.addModule({
65
+ id: "keyboard",
66
+ activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.OperationInvokerReady),
67
+ activate: Keyboard
68
+ }), Plugin.make);
69
+ var NavTreePlugin_default = NavTreePlugin;
70
+ export {
71
+ NavTreePlugin,
72
+ NavTreePlugin_default as default
73
+ };
74
+ //# sourceMappingURL=NavTreePlugin-53I3ONRE.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/NavTreePlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';\nimport { Graph } from '@dxos/plugin-graph';\nimport { type TreeData } from '@dxos/react-ui-list';\n\nimport { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';\nimport { NODE_TYPE } from '#containers';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { NavTreeEvents } from '#types';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addMetadataModule({\n metadata: {\n id: NODE_TYPE,\n metadata: {\n parse: ({ item }: TreeData, type: string) => {\n switch (type) {\n case 'node':\n return item;\n case 'object':\n return item.data;\n case 'view-object':\n return { id: `${item.id}-view`, object: item.data };\n }\n },\n },\n },\n }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'state',\n activatesOn: AppActivationEvents.LayoutReady,\n firesAfterActivation: [NavTreeEvents.StateReady],\n activate: State,\n }),\n Plugin.addModule({\n id: 'expose',\n activatesOn: ActivationEvent.allOf(\n ActivationEvents.OperationInvokerReady,\n AppActivationEvents.AppGraphReady,\n AppActivationEvents.LayoutReady,\n NavTreeEvents.StateReady,\n ),\n activate: Effect.fnUntraced(function* () {\n const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n if (invokePromise && layout.active.length === 1) {\n // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.\n // That is the point at which the graph is expanded and the path should be available.\n void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })\n .then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))\n .catch(() => {});\n }\n\n return [];\n }),\n }),\n Plugin.addModule({\n id: 'keyboard',\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.OperationInvokerReady),\n activate: Keyboard,\n }),\n Plugin.make,\n);\n\nexport default NavTreePlugin;\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,YAAYC,cAAc;AACpF,SAASC,qBAAqBC,iBAAiBC,WAAWC,uBAAuB;AACjF,SAASC,aAAa;AAGtB,SAASC,iBAAiBC,UAAUC,kBAAkBC,cAAcC,aAAa;AACjF,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAEvB,IAAMC,gBAAgBf,OAAOgB,OAAOJ,IAAAA,EAAMK,KAC/Cd,UAAUe,kBAAkB;EAAEC,UAAUb;AAAgB,CAAA,GACxDH,UAAUiB,kBAAkB;EAC1BC,UAAU;IACRC,IAAIX;IACJU,UAAU;MACRE,OAAO,CAAC,EAAEC,KAAI,GAAcC,SAAAA;AAC1B,gBAAQA,MAAAA;UACN,KAAK;AACH,mBAAOD;UACT,KAAK;AACH,mBAAOA,KAAKE;UACd,KAAK;AACH,mBAAO;cAAEJ,IAAI,GAAGE,KAAKF,EAAE;cAASK,QAAQH,KAAKE;YAAK;QACtD;MACF;IACF;EAC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", "Plugin", "AppActivationEvents", "AppCapabilities", "AppPlugin", "LayoutOperation", "Graph", "AppGraphBuilder", "Keyboard", "OperationHandler", "ReactSurface", "State", "NODE_TYPE", "meta", "translations", "NavTreeEvents", "NavTreePlugin", "define", "pipe", "addAppGraphModule", "activate", "addMetadataModule", "metadata", "id", "parse", "item", "type", "data", "object", "addOperationHandlerModule", "addSurfaceModule", "addTranslationsModule", "addModule", "activatesOn", "LayoutReady", "firesAfterActivation", "StateReady", "allOf", "OperationInvokerReady", "AppGraphReady", "fnUntraced", "layout", "getAtomValue", "Layout", "invokePromise", "get", "OperationInvoker", "graph", "AppGraph", "active", "length", "waitForPath", "target", "timeout", "then", "Expose", "subject", "catch", "make"]
7
+ }
@@ -1,111 +1,9 @@
1
- // src/types/capabilities.ts
2
- import { Capability } from "@dxos/app-framework";
3
- import { meta } from "#meta";
4
- (function(NavTreeCapabilities2) {
5
- NavTreeCapabilities2.State = Capability.make(`${meta.id}.capability.state`);
6
- })(NavTreeCapabilities || (NavTreeCapabilities = {}));
7
- var NavTreeCapabilities;
8
-
9
- // src/types/events.ts
10
- import { AppActivationEvents } from "@dxos/app-toolkit";
11
- import { meta as meta2 } from "#meta";
12
- (function(NavTreeEvents3) {
13
- NavTreeEvents3.StateReady = AppActivationEvents.createStateEvent(meta2.id);
14
- })(NavTreeEvents || (NavTreeEvents = {}));
15
- var NavTreeEvents;
16
-
17
- // src/NavTreePlugin.tsx
18
- import * as Effect from "effect/Effect";
19
- import { ActivationEvent, ActivationEvents, Capabilities, Capability as Capability2, Plugin } from "@dxos/app-framework";
20
- import { AppActivationEvents as AppActivationEvents2, AppCapabilities, AppPlugin, LayoutOperation } from "@dxos/app-toolkit";
21
- import { Graph } from "@dxos/plugin-graph";
22
- import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from "#capabilities";
23
- import { NODE_TYPE } from "#containers";
24
- import { meta as meta4 } from "#meta";
25
- import { NavTreeEvents as NavTreeEvents2 } from "#types";
26
-
27
- // src/translations.ts
28
- import { meta as meta3 } from "#meta";
29
- var translations = [
30
- {
31
- "en-US": {
32
- [meta3.id]: {
33
- "app-menu.label": "App menu",
34
- "open-settings.label": "Settings",
35
- "open-commands.label": "Search commands",
36
- "commands-dialog.title": "Commands",
37
- "command-list-input.placeholder": "Search for commands\u2026",
38
- "node-actions-menu-invoker.label": "More options",
39
- "tree-item-actions.label": "More actions",
40
- "button-back.button": "Back to Space"
41
- }
42
- }
43
- }
44
- ];
45
-
46
- // src/NavTreePlugin.tsx
47
- var NavTreePlugin = Plugin.define(meta4).pipe(AppPlugin.addAppGraphModule({
48
- activate: AppGraphBuilder
49
- }), AppPlugin.addMetadataModule({
50
- metadata: {
51
- id: NODE_TYPE,
52
- metadata: {
53
- parse: ({ item }, type) => {
54
- switch (type) {
55
- case "node":
56
- return item;
57
- case "object":
58
- return item.data;
59
- case "view-object":
60
- return {
61
- id: `${item.id}-view`,
62
- object: item.data
63
- };
64
- }
65
- }
66
- }
67
- }
68
- }), AppPlugin.addOperationHandlerModule({
69
- activate: OperationHandler
70
- }), AppPlugin.addSurfaceModule({
71
- activate: ReactSurface
72
- }), AppPlugin.addTranslationsModule({
73
- translations
74
- }), Plugin.addModule({
75
- id: "state",
76
- activatesOn: AppActivationEvents2.LayoutReady,
77
- activatesAfter: [
78
- NavTreeEvents2.StateReady
79
- ],
80
- activate: State
81
- }), Plugin.addModule({
82
- id: "expose",
83
- activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, AppActivationEvents2.AppGraphReady, AppActivationEvents2.LayoutReady, NavTreeEvents2.StateReady),
84
- activate: Effect.fnUntraced(function* () {
85
- const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);
86
- const { invokePromise } = yield* Capability2.get(Capabilities.OperationInvoker);
87
- const { graph } = yield* Capability2.get(AppCapabilities.AppGraph);
88
- if (invokePromise && layout.active.length === 1) {
89
- void Graph.waitForPath(graph, {
90
- target: layout.active[0]
91
- }, {
92
- timeout: 3e4
93
- }).then(() => invokePromise(LayoutOperation.Expose, {
94
- subject: layout.active[0]
95
- })).catch(() => {
96
- });
97
- }
98
- return [];
99
- })
100
- }), Plugin.addModule({
101
- id: "keyboard",
102
- activatesOn: ActivationEvent.allOf(AppActivationEvents2.AppGraphReady, ActivationEvents.OperationInvokerReady),
103
- activate: Keyboard
104
- }), Plugin.make);
1
+ // src/index.ts
2
+ import { Plugin } from "@dxos/app-framework";
105
3
 
106
4
  // src/meta.ts
107
5
  import { trim } from "@dxos/util";
108
- var meta5 = {
6
+ var meta = {
109
7
  id: "org.dxos.plugin.navtree",
110
8
  name: "Navtree",
111
9
  description: trim`
@@ -114,14 +12,30 @@ var meta5 = {
114
12
  `
115
13
  };
116
14
  var KEY_BINDING = "KeyBinding";
117
- var COMMANDS_DIALOG = `${meta5.id}.commands-dialog`;
15
+ var COMMANDS_DIALOG = `${meta.id}.commands-dialog`;
16
+
17
+ // src/types/capabilities.ts
18
+ import { Capability } from "@dxos/app-framework";
19
+ import { meta as meta2 } from "#meta";
20
+ (function(NavTreeCapabilities2) {
21
+ NavTreeCapabilities2.State = Capability.make(`${meta2.id}.capability.state`);
22
+ })(NavTreeCapabilities || (NavTreeCapabilities = {}));
23
+ var NavTreeCapabilities;
24
+
25
+ // src/types/events.ts
26
+ import { AppActivationEvents } from "@dxos/app-toolkit";
27
+ import { meta as meta3 } from "#meta";
28
+ (function(NavTreeEvents2) {
29
+ NavTreeEvents2.StateReady = AppActivationEvents.createStateEvent(meta3.id);
30
+ })(NavTreeEvents || (NavTreeEvents = {}));
31
+ var NavTreeEvents;
118
32
 
119
33
  // src/util.ts
120
- import { Graph as Graph2, Node } from "@dxos/plugin-graph";
34
+ import { Graph, Node } from "@dxos/plugin-graph";
121
35
  import { isNonNullable } from "@dxos/util";
122
36
  var getParent = (graph, node, path) => {
123
37
  const parentId = path[path.length - 2];
124
- return Graph2.getConnections(graph, node.id, Node.childRelation("inbound")).find((n) => n.id === parentId);
38
+ return Graph.getConnections(graph, node.id, Node.childRelation("inbound")).find((n) => n.id === parentId);
125
39
  };
126
40
  var getPersistenceParent = (graph, node, path, persistenceClass) => {
127
41
  if (node.properties.acceptPersistenceClass?.has(persistenceClass)) {
@@ -159,7 +73,7 @@ var sortActions = (actions) => actions.sort((a, b) => {
159
73
  return 1;
160
74
  });
161
75
  var getChildren = (graph, node, path = []) => {
162
- return Graph2.getConnections(graph, node.id, "child").map((n) => {
76
+ return Graph.getConnections(graph, node.id, "child").map((n) => {
163
77
  const nextPath = [
164
78
  ...path,
165
79
  node.id
@@ -168,7 +82,7 @@ var getChildren = (graph, node, path = []) => {
168
82
  }).filter(isNonNullable);
169
83
  };
170
84
  var filterItems = (node, disposition) => {
171
- if (!disposition && (node.properties.disposition === "hidden" || node.properties.disposition === "alternate-tree")) {
85
+ if (!disposition && node.properties.disposition === "hidden") {
172
86
  return false;
173
87
  } else if (!disposition) {
174
88
  const action = Node.isAction(node);
@@ -184,6 +98,9 @@ var l0ItemType = (item) => {
184
98
  return "tab";
185
99
  }
186
100
  };
101
+
102
+ // src/index.ts
103
+ var NavTreePlugin = Plugin.lazy(meta, () => import("./NavTreePlugin-53I3ONRE.mjs"));
187
104
  export {
188
105
  COMMANDS_DIALOG,
189
106
  KEY_BINDING,
@@ -195,7 +112,7 @@ export {
195
112
  getParent,
196
113
  getPersistenceParent,
197
114
  l0ItemType,
198
- meta5 as meta,
115
+ meta,
199
116
  resolveMigrationOperation,
200
117
  sortActions
201
118
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/NavTreePlugin.tsx", "../../../src/translations.ts", "../../../src/meta.ts", "../../../src/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace NavTreeCapabilities {\n export type NavTreeItemState = { open: boolean; current: boolean; alternateTree?: boolean };\n\n export type NavTreeStateStore = {\n getItem: (path: string[]) => NavTreeItemState;\n getItemAtom: (path: string[]) => Atom.Atom<NavTreeItemState>;\n setItem: (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => void;\n };\n\n export const State = Capability.make<NavTreeStateStore>(`${meta.id}.capability.state`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport namespace NavTreeEvents {\n export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';\nimport { Graph } from '@dxos/plugin-graph';\nimport { type TreeData } from '@dxos/react-ui-list';\n\nimport { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';\nimport { NODE_TYPE } from '#containers';\nimport { meta } from '#meta';\nimport { NavTreeEvents } from '#types';\n\nimport { translations } from './translations';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addMetadataModule({\n metadata: {\n id: NODE_TYPE,\n metadata: {\n parse: ({ item }: TreeData, type: string) => {\n switch (type) {\n case 'node':\n return item;\n case 'object':\n return item.data;\n case 'view-object':\n return { id: `${item.id}-view`, object: item.data };\n }\n },\n },\n },\n }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'state',\n activatesOn: AppActivationEvents.LayoutReady,\n activatesAfter: [NavTreeEvents.StateReady],\n activate: State,\n }),\n Plugin.addModule({\n id: 'expose',\n activatesOn: ActivationEvent.allOf(\n ActivationEvents.OperationInvokerReady,\n AppActivationEvents.AppGraphReady,\n AppActivationEvents.LayoutReady,\n NavTreeEvents.StateReady,\n ),\n activate: Effect.fnUntraced(function* () {\n const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n if (invokePromise && layout.active.length === 1) {\n // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.\n // That is the point at which the graph is expanded and the path should be available.\n void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })\n .then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))\n .catch(() => {});\n }\n\n return [];\n }),\n }),\n Plugin.addModule({\n id: 'keyboard',\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.OperationInvokerReady),\n activate: Keyboard,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'app-menu.label': 'App menu',\n 'open-settings.label': 'Settings',\n 'open-commands.label': 'Search commands',\n 'commands-dialog.title': 'Commands',\n 'command-list-input.placeholder': 'Search for commands…',\n 'node-actions-menu-invoker.label': 'More options',\n 'tree-item-actions.label': 'More actions',\n 'button-back.button': 'Back to Space',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.navtree',\n name: 'Navtree',\n description: trim`\n Hierarchical navigation tree for browsing spaces, folders, and objects.\n Provides sidebar navigation with collapsible sections and quick access to workspace content.\n `,\n};\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n// TODO(wittjosiah): Factor out.\nexport const COMMANDS_DIALOG = `${meta.id}.commands-dialog`;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Graph, Node } from '@dxos/plugin-graph';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type NavTreeItemGraphNode } from '#types';\n\nexport const getParent = (\n graph: Graph.ReadableGraph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return Graph.getConnections(graph, node.id, Node.childRelation('inbound')).find(\n (n: Node.Node) => n.id === parentId,\n ) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n graph: Graph.ReadableGraph,\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.ReadableGraph,\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: Node.Action[]): Node.Action[] =>\n actions.sort((a, b) => {\n if (a.properties.disposition === b.properties.disposition) {\n return 0;\n }\n\n if (a.properties.disposition === 'list-item-primary') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getChildren = (\n graph: Graph.ReadableGraph,\n node: NavTreeItemGraphNode,\n path: readonly string[] = [],\n): NavTreeItemGraphNode[] => {\n return Graph.getConnections(graph, node.id, 'child')\n .map((n: Node.Node) => {\n // Break cycles.\n const nextPath = [...path, node.id];\n return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);\n })\n .filter(isNonNullable) as NavTreeItemGraphNode[];\n};\n\n/**\n * Determines whether a node should be visible based on its disposition.\n */\nexport const filterItems = (node: Node.Node, disposition?: string) => {\n if (!disposition && (node.properties.disposition === 'hidden' || node.properties.disposition === 'alternate-tree')) {\n return false;\n } else if (!disposition) {\n const action = Node.isAction(node);\n return !action || node.properties.disposition === 'item';\n } else {\n return node.properties.disposition === disposition;\n }\n};\n\nexport const l0ItemType = (item: Node.Node) => {\n if (Node.isActionLike(item)) {\n return 'action';\n } else {\n return 'tab';\n }\n};\n"],
5
- "mappings": ";AAMA,SAASA,kBAAkB;AAE3B,SAASC,YAAY;UAEJC,sBAAAA;uBASFC,QAAQC,WAAWC,KAAwB,GAAGC,KAAKC,EAAE,mBAAmB;AACvF,GAViBL,wBAAAA,sBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASM,2BAA2B;AAEpC,SAASC,QAAAA,aAAY;UAEJC,gBAAAA;iBACFC,aAA8CC,oBAAoBC,iBAAiBC,MAAKC,EAAE;AACzG,GAFiBL,kBAAAA,gBAAAA,CAAAA,EAAAA;;;;ACLjB,YAAYM,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,cAAAA,aAAYC,cAAc;AACpF,SAASC,uBAAAA,sBAAqBC,iBAAiBC,WAAWC,uBAAuB;AACjF,SAASC,aAAa;AAGtB,SAASC,iBAAiBC,UAAUC,kBAAkBC,cAAcC,aAAa;AACjF,SAASC,iBAAiB;AAC1B,SAASC,QAAAA,aAAY;AACrB,SA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WAAW,CAACA,aAAa;AACvB,UAAMS,SAASpC,KAAKqC,SAAS5C,IAAAA;AAC7B,WAAO,CAAC2C,UAAU3C,KAAKa,WAAWqB,gBAAgB;EACpD,OAAO;AACL,WAAOlC,KAAKa,WAAWqB,gBAAgBA;EACzC;AACF;AAEO,IAAMW,aAAa,CAACC,SAAAA;AACzB,MAAIvC,KAAKwC,aAAaD,IAAAA,GAAO;AAC3B,WAAO;EACT,OAAO;AACL,WAAO;EACT;AACF;",
6
- "names": ["Capability", "meta", "NavTreeCapabilities", "State", "Capability", "make", "meta", "id", "AppActivationEvents", "meta", "NavTreeEvents", "StateReady", "AppActivationEvents", "createStateEvent", "meta", "id", "Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppCapabilities", "AppPlugin", "LayoutOperation", "Graph", "AppGraphBuilder", "Keyboard", "OperationHandler", "ReactSurface", "State", "NODE_TYPE", "meta", "NavTreeEvents", "meta", "translations", "meta", "id", "NavTreePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addMetadataModule", "metadata", "id", "NODE_TYPE", "parse", "item", "type", "data", "object", "addOperationHandlerModule", "OperationHandler", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "activatesOn", "AppActivationEvents", "LayoutReady", "activatesAfter", "NavTreeEvents", "StateReady", "State", "ActivationEvent", "allOf", "ActivationEvents", "OperationInvokerReady", "AppGraphReady", "fnUntraced", "layout", "Capabilities", "getAtomValue", "AppCapabilities", "Layout", "invokePromise", "Capability", "get", "OperationInvoker", "graph", "AppGraph", "active", "length", "Graph", "waitForPath", "target", "timeout", "then", "LayoutOperation", "Expose", "subject", "catch", "Keyboard", "make", "trim", "meta", "id", "name", "description", "trim", "KEY_BINDING", "COMMANDS_DIALOG", "Graph", "Node", "isNonNullable", "getParent", "graph", "node", "path", "parentId", "length", "Graph", "getConnections", "id", "Node", "childRelation", "find", "n", "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", "map", "nextPath", "includes", "undefined", "filter", "isNonNullable", "filterItems", "action", "isAction", "l0ItemType", "item", "isActionLike"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/util.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const NavTreePlugin = Plugin.lazy(meta, () => import('./NavTreePlugin'));\n\nexport * from './meta';\n\nexport { NavTreeCapabilities, NavTreeEvents } from './types';\nexport * from './util';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.navtree',\n name: 'Navtree',\n description: trim`\n Hierarchical navigation tree for browsing spaces, folders, and objects.\n Provides sidebar navigation with collapsible sections and quick access to workspace content.\n `,\n};\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n// TODO(wittjosiah): Factor out.\nexport const COMMANDS_DIALOG = `${meta.id}.commands-dialog`;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace NavTreeCapabilities {\n export type NavTreeItemState = { open: boolean; current: boolean };\n\n export type NavTreeStateStore = {\n getItem: (path: string[]) => NavTreeItemState;\n getItemAtom: (path: string[]) => Atom.Atom<NavTreeItemState>;\n setItem: (path: string[], key: 'open' | 'current', next: boolean) => void;\n };\n\n export const State = Capability.make<NavTreeStateStore>(`${meta.id}.capability.state`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport namespace NavTreeEvents {\n export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Graph, Node } from '@dxos/plugin-graph';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type NavTreeItemGraphNode } from '#types';\n\nexport const getParent = (\n graph: Graph.ReadableGraph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return Graph.getConnections(graph, node.id, Node.childRelation('inbound')).find(\n (n: Node.Node) => n.id === parentId,\n ) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n graph: Graph.ReadableGraph,\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.ReadableGraph,\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: Node.Action[]): Node.Action[] =>\n actions.sort((a, b) => {\n if (a.properties.disposition === b.properties.disposition) {\n return 0;\n }\n\n if (a.properties.disposition === 'list-item-primary') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getChildren = (\n graph: Graph.ReadableGraph,\n node: NavTreeItemGraphNode,\n path: readonly string[] = [],\n): NavTreeItemGraphNode[] => {\n return Graph.getConnections(graph, node.id, 'child')\n .map((n: Node.Node) => {\n // Break cycles.\n const nextPath = [...path, node.id];\n return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);\n })\n .filter(isNonNullable) as NavTreeItemGraphNode[];\n};\n\n/**\n * Determines whether a node should be visible based on its disposition.\n */\nexport const filterItems = (node: Node.Node, disposition?: string) => {\n if (!disposition && node.properties.disposition === 'hidden') {\n return false;\n } else if (!disposition) {\n const action = Node.isAction(node);\n return !action || node.properties.disposition === 'item';\n } else {\n return node.properties.disposition === disposition;\n }\n};\n\nexport const l0ItemType = (item: Node.Node) => {\n if (Node.isActionLike(item)) {\n return 'action';\n } else {\n return 'tab';\n }\n};\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;AAGO,IAAMK,cAAc;AAEpB,IAAMC,kBAAkB,GAAGL,KAAKC,EAAE;;;ACbzC,SAASK,kBAAkB;AAE3B,SAASC,QAAAA,aAAY;UAEJC,sBAAAA;uBASFC,QAAQH,WAAWI,KAAwB,GAAGH,MAAKI,EAAE,mBAAmB;AACvF,GAViBH,wBAAAA,sBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASI,2BAA2B;AAEpC,SAASC,QAAAA,aAAY;UAEJC,gBAAAA;iBACFC,aAA8CH,oBAAoBI,iBAAiBH,MAAKI,EAAE;AAC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,EAAEpB,WAAWqB,aAAa;AACzD,WAAO;EACT;AAEA,MAAIF,EAAEnB,WAAWqB,gBAAgB,qBAAqB;AACpD,WAAO;EACT;AAEA,SAAO;AACT,CAAA;AAEK,IAAMC,cAAc,CACzBlC,OACAC,MACAC,OAA0B,CAAA,MAAE;AAE5B,SAAON,MAAMS,eAAeL,OAAOC,KAAKK,IAAI,OAAA,EACzC6B,IAAI,CAAC1B,MAAAA;AAEJ,UAAM2B,WAAW;SAAIlC;MAAMD,KAAKK;;AAChC,WAAO8B,SAASC,SAAS5B,EAAEH,EAAE,IAAIgC,SAAa7B;EAChD,CAAA,EACC8B,OAAOzC,aAAAA;AACZ;AAKO,IAAM0C,cAAc,CAACvC,MAAiBgC,gBAAAA;AAC3C,MAAI,CAACA,eAAehC,KAAKW,WAAWqB,gBAAgB,UAAU;AAC5D,WAAO;EACT,WAAW,CAACA,aAAa;AACvB,UAAMQ,SAAS5C,KAAK6C,SAASzC,IAAAA;AAC7B,WAAO,CAACwC,UAAUxC,KAAKW,WAAWqB,gBAAgB;EACpD,OAAO;AACL,WAAOhC,KAAKW,WAAWqB,gBAAgBA;EACzC;AACF;AAEO,IAAMU,aAAa,CAACC,SAAAA;AACzB,MAAI/C,KAAKgD,aAAaD,IAAAA,GAAO;AAC3B,WAAO;EACT,OAAO;AACL,WAAO;EACT;AACF;;;AJvGO,IAAME,gBAAgBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,8BAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "KEY_BINDING", "COMMANDS_DIALOG", "Capability", "meta", "NavTreeCapabilities", "State", "make", "id", "AppActivationEvents", "meta", "NavTreeEvents", "StateReady", "createStateEvent", "id", "Graph", "Node", "isNonNullable", "getParent", "graph", "node", "path", "parentId", "length", "getConnections", "id", "childRelation", "find", "n", "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", "map", "nextPath", "includes", "undefined", "filter", "filterItems", "action", "isAction", "l0ItemType", "item", "isActionLike", "NavTreePlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/types/capabilities.ts":{"bytes":1799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/events.ts":{"bytes":1322,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/schema.ts":{"bytes":2787,"imports":[],"format":"esm"},"src/types/index.ts":{"bytes":644,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/types/events.ts","kind":"import-statement","original":"./events"},{"path":"src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/translations.ts":{"bytes":2172,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/NavTreePlugin.tsx":{"bytes":10541,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/meta.ts":{"bytes":2005,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/util.ts":{"bytes":11388,"imports":[{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":881,"imports":[{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15057},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["COMMANDS_DIALOG","KEY_BINDING","NavTreeCapabilities","NavTreeEvents","NavTreePlugin","filterItems","getChildren","getParent","getPersistenceParent","l0ItemType","meta","resolveMigrationOperation","sortActions"],"entryPoint":"src/index.ts","inputs":{"src/types/capabilities.ts":{"bytesInOutput":273},"src/types/index.ts":{"bytesInOutput":0},"src/types/events.ts":{"bytesInOutput":264},"src/index.ts":{"bytesInOutput":0},"src/NavTreePlugin.tsx":{"bytesInOutput":2422},"src/translations.ts":{"bytesInOutput":523},"src/meta.ts":{"bytesInOutput":387},"src/util.ts":{"bytesInOutput":2447}},"bytes":6756}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1924,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/capabilities.ts":{"bytes":1644,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/events.ts":{"bytes":1233,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/schema.ts":{"bytes":2698,"imports":[],"format":"esm"},"src/types/index.ts":{"bytes":556,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/types/events.ts","kind":"import-statement","original":"./events"},{"path":"src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/util.ts":{"bytes":11113,"imports":[{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/NavTreePlugin.tsx":{"bytes":10561,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1294,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"src/util.ts","kind":"import-statement","original":"./util"},{"path":"src/NavTreePlugin.tsx","kind":"dynamic-import","original":"./NavTreePlugin"}],"format":"esm"},"src/translations.ts":{"bytes":1956,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8812},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/browser/NavTreePlugin-53I3ONRE.mjs","kind":"dynamic-import"}],"exports":["COMMANDS_DIALOG","KEY_BINDING","NavTreeCapabilities","NavTreeEvents","NavTreePlugin","filterItems","getChildren","getParent","getPersistenceParent","l0ItemType","meta","resolveMigrationOperation","sortActions"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":131},"src/meta.ts":{"bytesInOutput":385},"src/types/capabilities.ts":{"bytesInOutput":283},"src/types/index.ts":{"bytesInOutput":0},"src/types/events.ts":{"bytesInOutput":264},"src/util.ts":{"bytesInOutput":2381}},"bytes":3833},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":953},"dist/lib/browser/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":470}},"bytes":562},"dist/lib/browser/NavTreePlugin-53I3ONRE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5458},"dist/lib/browser/NavTreePlugin-53I3ONRE.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["NavTreePlugin","default"],"entryPoint":"src/NavTreePlugin.tsx","inputs":{"src/NavTreePlugin.tsx":{"bytesInOutput":2442}},"bytes":2583}}}
@@ -0,0 +1,21 @@
1
+ // src/translations.ts
2
+ import { meta } from "#meta";
3
+ var translations = [
4
+ {
5
+ "en-US": {
6
+ [meta.id]: {
7
+ "app-menu.label": "App menu",
8
+ "open-commands.label": "Search commands",
9
+ "commands-dialog.title": "Commands",
10
+ "command-list-input.placeholder": "Search for commands\u2026",
11
+ "node-actions-menu-invoker.label": "More options",
12
+ "tree-item-actions.label": "More actions",
13
+ "button-back.button": "Back to Space"
14
+ }
15
+ }
16
+ }
17
+ ];
18
+ export {
19
+ translations
20
+ };
21
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'app-menu.label': 'App menu',\n 'open-commands.label': 'Search commands',\n 'commands-dialog.title': 'Commands',\n 'command-list-input.placeholder': 'Search for commands…',\n 'node-actions-menu-invoker.label': 'More options',\n 'tree-item-actions.label': 'More actions',\n 'button-back.button': 'Back to Space',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,kBAAkB;QAClB,uBAAuB;QACvB,yBAAyB;QACzB,kCAAkC;QAClC,mCAAmC;QACnC,2BAA2B;QAC3B,sBAAsB;MACxB;IACF;EACF;;",
6
+ "names": ["meta", "translations", "id"]
7
+ }
@@ -1,3 +1,4 @@
1
1
  import { Plugin } from '@dxos/app-framework';
2
2
  export declare const NavTreePlugin: Plugin.PluginFactory<void>;
3
+ export default NavTreePlugin;
3
4
  //# sourceMappingURL=NavTreePlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA+D,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAY1G,eAAO,MAAM,aAAa,4BAyDzB,CAAC"}
1
+ {"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA+D,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAW1G,eAAO,MAAM,aAAa,4BAyDzB,CAAC;eAEa,aAAa"}
@@ -0,0 +1,4 @@
1
+ import { Plugin } from '@dxos/app-framework';
2
+ export declare const NavTreePlugin: Plugin.PluginFactory<void>;
3
+ export default NavTreePlugin;
4
+ //# sourceMappingURL=NavTreePlugin.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTreePlugin.node.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAS7C,eAAO,MAAM,aAAa,4BAqBzB,CAAC;eAEa,aAAa"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=NavTreePlugin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavTreePlugin.test.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC;;AAIrE,wBA4BE"}
1
+ {"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Capability } from '@dxos/app-framework';
2
- import { OperationHandlerSet } from '@dxos/operation';
2
+ import { OperationHandlerSet } from '@dxos/compute';
3
3
  export declare const AppGraphBuilder: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-graph").BuilderExtensions>>, Error>;
4
4
  export declare const Keyboard: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<null>>, Error>;
5
5
  export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,eAAe,qIAA0E,CAAC;AACvG,eAAO,MAAM,QAAQ,8FAA0D,CAAC;AAChF,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY,iJAAmE,CAAC;AAC7F,eAAO,MAAM,KAAK,4IAAoD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,eAAe,qIAA0E,CAAC;AACvG,eAAO,MAAM,QAAQ,8FAA0D,CAAC;AAChF,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY,iJAAmE,CAAC;AAC7F,eAAO,MAAM,KAAK,4IAAoD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAS/D,wBAkDE"}
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import * as Effect from 'effect/Effect';
2
2
  import { Capability } from '@dxos/app-framework';
3
- import type { OperationHandlerSet } from '@dxos/operation';
3
+ import type { OperationHandlerSet } from '@dxos/compute';
4
4
  declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service>;
5
5
  export default _default;
6
6
  //# sourceMappingURL=operation-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;;AAI3D,wBAIE"}
1
+ {"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAQ/D,wBAsCE"}
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAM/D,OAAO,EAAE,KAAK,mBAAmB,IAAI,EAAE,EAAuB,MAAM,QAAQ,CAAC;;AA4B7E,wBA2GE"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAM/D,OAAO,EAAE,KAAK,mBAAmB,IAAI,EAAE,EAAuB,MAAM,QAAQ,CAAC"}
@@ -10,15 +10,14 @@ declare const meta: {
10
10
  layout: string;
11
11
  translations: [{
12
12
  readonly 'en-US': {
13
- readonly [meta.id]: {
14
- readonly 'app-menu.label': "App menu";
15
- readonly 'open-settings.label': "Settings";
16
- readonly 'open-commands.label': "Search commands";
17
- readonly 'commands-dialog.title': "Commands";
18
- readonly 'command-list-input.placeholder': "Search for commands…";
19
- readonly 'node-actions-menu-invoker.label': "More options";
20
- readonly 'tree-item-actions.label': "More actions";
21
- readonly 'button-back.button': "Back to Space";
13
+ readonly [x: string]: {
14
+ readonly 'app-menu.label': 'App menu';
15
+ readonly 'open-commands.label': 'Search commands';
16
+ readonly 'commands-dialog.title': 'Commands';
17
+ readonly 'command-list-input.placeholder': 'Search for commands\u2026';
18
+ readonly 'node-actions-menu-invoker.label': 'More options';
19
+ readonly 'tree-item-actions.label': 'More actions';
20
+ readonly 'button-back.button': 'Back to Space';
22
21
  };
23
22
  };
24
23
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA+F/C,QAAA,MAAM,IAAI;;;;;;;;;yBAhHV,CAAO,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;CAuJ0B,CAAC;AAE1C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KA4CrB,CAAC"}
1
+ {"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA+F/C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAuC+B,CAAC;eAE3B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KA4CrB,CAAC"}
@@ -10,12 +10,12 @@ export type NavTreeItemActionMenuProps = ActionProperties & {
10
10
  };
11
11
  export declare const NavTreeItemActionDropdownMenu: React.ForwardRefExoticComponent<Omit<NavTreeItemActionMenuProps, "className"> & {
12
12
  classNames?: import("@dxos/ui-types").ClassNameValue;
13
- } & Pick<React.HTMLAttributes<Element>, "className" | "role" | "children" | "style"> & React.RefAttributes<HTMLButtonElement>>;
13
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLButtonElement>>;
14
14
  export declare const NavTreeItemMonolithicAction: (props: Node.Action & {
15
15
  parent: Node.Node;
16
16
  path?: string[];
17
17
  onAction?: (action: Node.Action) => void;
18
18
  baseLabel: string;
19
19
  }) => React.JSX.Element;
20
- export declare const NavTreeItemAction: ({ monolithic, menuActions, menuType, parent: node, path, ...props }: NavTreeItemActionMenuProps) => React.JSX.Element;
20
+ export declare const NavTreeItemAction: ({ monolithic, menuActions, menuType, parent, path, ...props }: NavTreeItemActionMenuProps) => React.JSX.Element;
21
21
  //# sourceMappingURL=NavTreeItemAction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAc/C,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GAAG;IAC1D,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,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BAAiB,kEAO3B,0BAA0B,sBAU5B,CAAC"}
@@ -3,7 +3,7 @@ import * as Effect from 'effect/Effect';
3
3
  import { type NavTreeItemActionMenuProps } from './NavTreeItemAction';
4
4
  declare const meta: {
5
5
  title: string;
6
- component: ({ monolithic, menuActions, menuType, parent: node, path, ...props }: NavTreeItemActionMenuProps) => import("react").JSX.Element;
6
+ component: ({ monolithic, menuActions, menuType, parent, path, ...props }: NavTreeItemActionMenuProps) => import("react").JSX.Element;
7
7
  args: {
8
8
  icon: string;
9
9
  parent: {
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,OAAO,EAAqB,KAAK,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AA8BzF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,OAAO,EAAqB,KAAK,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AA8BzF,QAAA,MAAM,IAAI;;;;;;;;;;gBAvBN,KAAK;gBACL,IAAI;;;;;;;;gBAeA,KAAK;gBACL,IAAI;;;;;;;QAqBR,MAAM;;CAEgC,CAAC;eAE5B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAcA,OAAO,KAUN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAKL,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAsG1D,eAAO,MAAM,wBAAwB,GAAI,gBAAgB,eAAe,CAAC,EAAE,CAAC,sBAQ3E,CAAC;AAmHF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,0FAQpB,WAAW,sBA4Fb,CAAC"}
1
+ {"version":3,"file":"L0Menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L0Menu.tsx"],"names":[],"mappings":"AAcA,OAAO,KAUN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAKL,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAsG1D,eAAO,MAAM,wBAAwB,mBAAoB,eAAe,CAAC,EAAE,CAAC,sBAQ3E,CAAC;AAmHF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,MAAM,6FAQhB,WAAW,sBA4Fb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAkBvC,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAqRF,eAAO,MAAM,OAAO,sEAhRuC,YAAY,uBAgRlC,CAAC"}
1
+ {"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAiBvC,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA4NF,eAAO,MAAM,OAAO,sEAvNuC,YAAY,uBAuNlC,CAAC"}