@dxos/plugin-navtree 0.8.4-main.5acf9ea → 0.8.4-main.5ad4a44

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 (105) hide show
  1. package/dist/lib/browser/{app-graph-builder-5J4LRWDX.mjs → app-graph-builder-YAPMENYT.mjs} +12 -11
  2. package/dist/lib/browser/app-graph-builder-YAPMENYT.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-WEMCSQI7.mjs → chunk-IMFXKPSB.mjs} +162 -149
  4. package/dist/lib/browser/chunk-IMFXKPSB.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-WCARAZ7J.mjs → chunk-LPAREX6J.mjs} +4 -4
  6. package/dist/lib/browser/chunk-LPAREX6J.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-ZENLR72O.mjs +14 -0
  8. package/dist/lib/browser/chunk-ZENLR72O.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +6 -10
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/{intent-resolver-3XYN2CBU.mjs → intent-resolver-TCQXGF6U.mjs} +7 -7
  12. package/dist/lib/browser/intent-resolver-TCQXGF6U.mjs.map +7 -0
  13. package/dist/lib/browser/{keyboard-QRS6WOQH.mjs → keyboard-AHSAWKXA.mjs} +4 -4
  14. package/dist/lib/browser/{keyboard-QRS6WOQH.mjs.map → keyboard-AHSAWKXA.mjs.map} +2 -2
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-surface-JSJ5SQX5.mjs → react-surface-AH2TP73M.mjs} +10 -10
  17. package/dist/lib/browser/react-surface-AH2TP73M.mjs.map +7 -0
  18. package/dist/lib/browser/{state-54DY3DOY.mjs → state-2Q623V7U.mjs} +7 -7
  19. package/dist/lib/browser/state-2Q623V7U.mjs.map +7 -0
  20. package/dist/types/src/NavTreePlugin.d.ts +1 -1
  21. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  23. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/index.d.ts +18 -15
  26. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  28. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/keyboard.d.ts +1 -1
  30. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  32. package/dist/types/src/capabilities/state.d.ts +2 -2
  33. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  34. package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
  35. package/dist/types/src/components/NavTree/NavTree.stories.d.ts +26 -4
  36. package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
  38. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
  39. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +32 -4
  40. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
  41. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
  42. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
  43. package/dist/types/src/components/Sidebar/L0Menu.d.ts +2 -0
  44. package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
  45. package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
  46. package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
  47. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
  48. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
  49. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
  50. package/dist/types/src/components/types.d.ts +2 -2
  51. package/dist/types/src/components/types.d.ts.map +1 -1
  52. package/dist/types/src/events.d.ts.map +1 -1
  53. package/dist/types/src/experimental/Tree.d.ts +1 -2
  54. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  55. package/dist/types/src/experimental/Tree.stories.d.ts +10 -4
  56. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  57. package/dist/types/src/meta.d.ts +2 -3
  58. package/dist/types/src/meta.d.ts.map +1 -1
  59. package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
  60. package/dist/types/src/testing/generator.d.ts +1 -1
  61. package/dist/types/src/testing/generator.d.ts.map +1 -1
  62. package/dist/types/src/types.d.ts +4 -3
  63. package/dist/types/src/types.d.ts.map +1 -1
  64. package/dist/types/src/util.d.ts +1 -2
  65. package/dist/types/src/util.d.ts.map +1 -1
  66. package/dist/types/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +49 -49
  68. package/src/NavTreePlugin.tsx +75 -76
  69. package/src/capabilities/app-graph-builder.ts +8 -7
  70. package/src/capabilities/capabilities.ts +2 -2
  71. package/src/capabilities/intent-resolver.ts +2 -2
  72. package/src/capabilities/keyboard.ts +2 -2
  73. package/src/capabilities/react-surface.tsx +5 -5
  74. package/src/capabilities/state.ts +4 -3
  75. package/src/components/CommandsDialog/CommandsDialog.tsx +5 -5
  76. package/src/components/CommandsDialog/CommandsTrigger.tsx +3 -3
  77. package/src/components/NavTree/NavTree.stories.tsx +65 -51
  78. package/src/components/NavTree/NavTree.tsx +4 -0
  79. package/src/components/NavTreeContainer.tsx +52 -19
  80. package/src/components/NavTreeDocumentTitle.tsx +2 -2
  81. package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +4 -6
  82. package/src/components/NavTreeItem/NavTreeItemAction.tsx +7 -6
  83. package/src/components/NavTreeItem/NavTreeItemColumns.tsx +31 -24
  84. package/src/components/Sidebar/L0Menu.tsx +52 -51
  85. package/src/components/Sidebar/L1Panel.tsx +24 -27
  86. package/src/components/Sidebar/L1Tabs.tsx +1 -0
  87. package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -8
  88. package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
  89. package/src/components/types.ts +3 -2
  90. package/src/events.ts +2 -2
  91. package/src/experimental/Tree.stories.tsx +29 -28
  92. package/src/experimental/Tree.tsx +5 -22
  93. package/src/meta.ts +5 -7
  94. package/src/testing/app-graph-builder.ts +10 -9
  95. package/src/testing/generator.ts +2 -2
  96. package/src/types.ts +4 -3
  97. package/src/util.ts +2 -20
  98. package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
  99. package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
  100. package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-WEMCSQI7.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
  104. package/dist/lib/browser/react-surface-JSJ5SQX5.mjs.map +0 -7
  105. package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
@@ -1,21 +1,20 @@
1
1
  import {
2
2
  NavTreeCapabilities
3
- } from "./chunk-WCARAZ7J.mjs";
3
+ } from "./chunk-LPAREX6J.mjs";
4
4
  import {
5
5
  COMMANDS_DIALOG,
6
6
  KEY_BINDING,
7
- NAVTREE_PLUGIN,
8
7
  meta
9
- } from "./chunk-ERDGQTH5.mjs";
8
+ } from "./chunk-ZENLR72O.mjs";
10
9
 
11
10
  // src/components/CommandsDialog/CommandsDialog.tsx
12
11
  import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
13
12
  import React, { useMemo, useState } from "react";
14
- import { createIntent, LayoutAction, useAppGraph, useIntentDispatcher } from "@dxos/app-framework";
13
+ import { LayoutAction, createIntent, useAppGraph, useIntentDispatcher } from "@dxos/app-framework";
15
14
  import { isAction, isActionGroup } from "@dxos/app-graph";
16
15
  import { Keyboard, keySymbols } from "@dxos/keyboard";
17
16
  import { useActions } from "@dxos/plugin-graph";
18
- import { Button, Dialog, Icon, useTranslation, toLocalizedString } from "@dxos/react-ui";
17
+ import { Button, Dialog, Icon, toLocalizedString, useTranslation } from "@dxos/react-ui";
19
18
  import { SearchList } from "@dxos/react-ui-searchlist";
20
19
  import { cardDialogContent, cardDialogHeader, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
21
20
  import { descriptionText, mx } from "@dxos/react-ui-theme";
@@ -23,7 +22,7 @@ import { getHostPlatform } from "@dxos/util";
23
22
  var CommandsDialogContent = ({ selected: initial }) => {
24
23
  var _effect = _useSignals();
25
24
  try {
26
- const { t } = useTranslation(NAVTREE_PLUGIN);
25
+ const { t } = useTranslation(meta.id);
27
26
  const [selected, setSelected] = useState(initial);
28
27
  const { dispatchPromise: dispatch } = useIntentDispatcher();
29
28
  const { graph } = useAppGraph();
@@ -54,7 +53,7 @@ var CommandsDialogContent = ({ selected: initial }) => {
54
53
  }, /* @__PURE__ */ React.createElement(Dialog.Title, {
55
54
  classNames: cardDialogHeader
56
55
  }, t("commands dialog title", {
57
- ns: NAVTREE_PLUGIN
56
+ ns: meta.id
58
57
  })), /* @__PURE__ */ React.createElement(SearchList.Root, {
59
58
  label: t("command list input placeholder"),
60
59
  classNames: cardDialogSearchListRoot
@@ -121,13 +120,13 @@ var CommandsDialogContent = ({ selected: initial }) => {
121
120
  // src/components/CommandsDialog/CommandsTrigger.tsx
122
121
  import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
123
122
  import React2 from "react";
124
- import { createIntent as createIntent2, LayoutAction as LayoutAction2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
123
+ import { LayoutAction as LayoutAction2, createIntent as createIntent2, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
125
124
  import { Button as Button2, Icon as Icon2, useTranslation as useTranslation2 } from "@dxos/react-ui";
126
125
  var CommandsTrigger = () => {
127
126
  var _effect = _useSignals2();
128
127
  try {
129
128
  const { dispatchPromise: dispatch } = useIntentDispatcher2();
130
- const { t } = useTranslation2(NAVTREE_PLUGIN);
129
+ const { t } = useTranslation2(meta.id);
131
130
  return /* @__PURE__ */ React2.createElement(Button2, {
132
131
  classNames: "m-1 pli-1 lg:pli-2",
133
132
  onClick: () => dispatch(createIntent2(LayoutAction2.UpdateDialog, {
@@ -149,7 +148,7 @@ var CommandsTrigger = () => {
149
148
  };
150
149
 
151
150
  // src/util.ts
152
- import { isAction as isAction2, isActionLike } from "@dxos/app-graph";
151
+ import { isActionLike } from "@dxos/app-graph";
153
152
  import { isNonNullable } from "@dxos/util";
154
153
  var getParent = (graph, node, path) => {
155
154
  const parentId = path[path.length - 2];
@@ -199,22 +198,6 @@ var getChildren = (graph, node, path = []) => {
199
198
  return nextPath.includes(n.id) ? void 0 : n;
200
199
  }).filter(isNonNullable);
201
200
  };
202
- var getActions = (graph, node) => {
203
- return graph.getActions(node.id).reduce((acc, arg) => {
204
- if (arg.properties.disposition === "item") {
205
- return acc;
206
- }
207
- acc.actions.push(arg);
208
- if (!isAction2(arg)) {
209
- const actionGroup = graph.getActions(arg.id);
210
- acc.groupedActions[arg.id] = actionGroup;
211
- }
212
- return acc;
213
- }, {
214
- actions: [],
215
- groupedActions: {}
216
- });
217
- };
218
201
  var l0ItemType = (item) => {
219
202
  if (item.properties.disposition === "collection") {
220
203
  return "collection";
@@ -233,15 +216,23 @@ import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/ad
233
216
  import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
234
217
  import { untracked } from "@preact/signals-core";
235
218
  import React10, { memo as memo2, useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo6 } from "react";
236
- import { createIntent as createIntent3, LayoutAction as LayoutAction3, Surface, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3, useLayout } from "@dxos/app-framework";
237
- import { isAction as isAction4, isActionLike as isActionLike2, ROOT_ID } from "@dxos/app-graph";
219
+ import { LayoutAction as LayoutAction3, Surface, createIntent as createIntent3, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3, useLayout } from "@dxos/app-framework";
220
+ import { ROOT_ID, isAction as isAction3, isActionLike as isActionLike2 } from "@dxos/app-graph";
238
221
  import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
239
- import { useConnections } from "@dxos/plugin-graph";
222
+ import { useConnections, useActions as useGraphActions } from "@dxos/plugin-graph";
240
223
  import { useMediaQuery as useMediaQuery2, useSidebars } from "@dxos/react-ui";
241
224
  import { isTreeData } from "@dxos/react-ui-list";
242
225
  import { mx as mx3 } from "@dxos/react-ui-theme";
243
226
  import { arrayMove as arrayMove2, byPosition } from "@dxos/util";
244
227
 
228
+ // src/capabilities/index.ts
229
+ import { lazy } from "@dxos/app-framework";
230
+ var AppGraphBuilder = lazy(() => import("./app-graph-builder-YAPMENYT.mjs"));
231
+ var IntentResolver = lazy(() => import("./intent-resolver-TCQXGF6U.mjs"));
232
+ var Keyboard2 = lazy(() => import("./keyboard-AHSAWKXA.mjs"));
233
+ var ReactSurface = lazy(() => import("./react-surface-AH2TP73M.mjs"));
234
+ var State = lazy(() => import("./state-2Q623V7U.mjs"));
235
+
245
236
  // src/components/NavTree/NavTree.tsx
246
237
  import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
247
238
  import React9, { useMemo as useMemo5 } from "react";
@@ -260,7 +251,7 @@ var useNavTreeContext = () => useContext(NavTreeContext) ?? raise(new Error("Mis
260
251
  import { useEffect } from "react";
261
252
  import { toLocalizedString as toLocalizedString2, useTranslation as useTranslation3 } from "@dxos/react-ui";
262
253
  var NavTreeDocumentTitle = ({ node }) => {
263
- const { t } = useTranslation3(NAVTREE_PLUGIN);
254
+ const { t } = useTranslation3(meta.id);
264
255
  useEffect(() => {
265
256
  document.title = node ? toLocalizedString2(node.properties.label, t) : t("current app name", {
266
257
  ns: "appkit"
@@ -295,11 +286,12 @@ import { scrollJustEnoughIntoView } from "@atlaskit/pragmatic-drag-and-drop/elem
295
286
  import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
296
287
  import React4, { forwardRef, useCallback, useLayoutEffect, useMemo as useMemo2, useRef, useState as useState2 } from "react";
297
288
  import { invariant } from "@dxos/invariant";
289
+ import { DxAvatar } from "@dxos/lit-ui/react";
298
290
  import { Icon as Icon3, ListItem, ScrollArea, Tooltip, toLocalizedString as toLocalizedString3, useMediaQuery, useTranslation as useTranslation4 } from "@dxos/react-ui";
299
- import { MenuProvider, DropdownMenu } from "@dxos/react-ui-menu";
291
+ import { DropdownMenu, MenuProvider } from "@dxos/react-ui-menu";
300
292
  import { Tabs } from "@dxos/react-ui-tabs";
301
293
  import { mx as mx2 } from "@dxos/react-ui-theme";
302
- import { arrayMove, getFirstTwoRenderableChars } from "@dxos/util";
294
+ import { arrayMove } from "@dxos/util";
303
295
 
304
296
  // src/components/UserAccountAvatar/UserAccountAvatar.tsx
305
297
  import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
@@ -310,8 +302,10 @@ var UserAccountAvatar = ({ size, userId, hue, emoji, status }) => {
310
302
  var _effect = _useSignals3();
311
303
  try {
312
304
  const fallbackValue = hexToFallback(userId ?? "0");
313
- return /* @__PURE__ */ React3.createElement("div", {
314
- className: "grid place-items-center",
305
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(L0ItemActiveTabIndicator, {
306
+ classNames: "inset-block-6"
307
+ }), /* @__PURE__ */ React3.createElement("div", {
308
+ className: "grid place-items-center dx-focus-ring-group-indicator rounded-full",
315
309
  "data-joyride": "welcome/account"
316
310
  }, /* @__PURE__ */ React3.createElement(Avatar.Root, null, /* @__PURE__ */ React3.createElement(Avatar.Content, {
317
311
  variant: "circle",
@@ -320,7 +314,7 @@ var UserAccountAvatar = ({ size, userId, hue, emoji, status }) => {
320
314
  hue: hue || fallbackValue.hue,
321
315
  fallback: emoji || fallbackValue.emoji,
322
316
  "data-testid": "treeView.userAccount"
323
- })));
317
+ }))));
324
318
  } finally {
325
319
  _effect.f();
326
320
  }
@@ -330,9 +324,7 @@ var UserAccountAvatar = ({ size, userId, hue, emoji, status }) => {
330
324
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-navtree/src/components/Sidebar/L0Menu.tsx";
331
325
  var useL0ItemClick = ({ item, parent, path }, type) => {
332
326
  const { tab, isCurrent, onSelect, onTabChange } = useNavTreeContext();
333
- const [isLg] = useMediaQuery("lg", {
334
- ssr: false
335
- });
327
+ const [isLg] = useMediaQuery("lg");
336
328
  return useCallback((event) => {
337
329
  switch (type) {
338
330
  case "action": {
@@ -383,7 +375,7 @@ var L0ItemRoot = /* @__PURE__ */ forwardRef(({ item, parent, path, children }, f
383
375
  item.id,
384
376
  path
385
377
  ]);
386
- const { t } = useTranslation4(NAVTREE_PLUGIN);
378
+ const { t } = useTranslation4(meta.id);
387
379
  const localizedString = toLocalizedString3(item.properties.label, t);
388
380
  const handleClick = useL0ItemClick({
389
381
  item,
@@ -401,15 +393,15 @@ var L0ItemRoot = /* @__PURE__ */ forwardRef(({ item, parent, path, children }, f
401
393
  "data-testid": testId,
402
394
  "data-itemid": id
403
395
  } : {
404
- onClick: handleClick
396
+ onClick: handleClick,
397
+ role: "button"
405
398
  };
406
- const Root = type === "collection" ? "h2" : type === "tab" ? Tabs.TabPrimitive : "button";
407
399
  return /* @__PURE__ */ React4.createElement(Tooltip.Trigger, {
408
400
  asChild: true,
409
401
  delayDuration: 0,
410
402
  side: "right",
411
403
  content: localizedString
412
- }, /* @__PURE__ */ React4.createElement(Root, {
404
+ }, /* @__PURE__ */ React4.createElement(Tabs.TabPrimitive, {
413
405
  ...rootProps,
414
406
  "data-type": type,
415
407
  className: mx2(l0ItemRoot, l0Breakpoints[item.properties.l0Breakpoint]),
@@ -419,28 +411,13 @@ var L0ItemRoot = /* @__PURE__ */ forwardRef(({ item, parent, path, children }, f
419
411
  _effect.f();
420
412
  }
421
413
  });
422
- var L0Avatar = ({ item }) => {
414
+ var L0ItemActiveTabIndicator = ({ classNames }) => {
423
415
  var _effect = _useSignals4();
424
416
  try {
425
- const { t } = useTranslation4(NAVTREE_PLUGIN);
426
- const type = l0ItemType(item);
427
- const hue = item.properties.hue ?? null;
428
- const hueFgStyle = hue && {
429
- style: {
430
- color: `var(--dx-${hue}SurfaceText)`
431
- }
432
- };
433
- const localizedString = toLocalizedString3(item.properties.label, t);
434
- const avatarValue = useMemo2(() => type === "tab" ? getFirstTwoRenderableChars(localizedString).join("").toUpperCase() : [], [
435
- type,
436
- item.properties.label,
437
- t
438
- ]);
439
- return /* @__PURE__ */ React4.createElement("span", {
440
- role: "img",
441
- className: "place-self-center text-xl font-light",
442
- ...hueFgStyle
443
- }, avatarValue);
417
+ return /* @__PURE__ */ React4.createElement("div", {
418
+ role: "none",
419
+ className: mx2("hidden group-aria-selected/l0item:block absolute inline-start-0 inset-block-2 is-1 bg-accentSurface rounded-ie", classNames)
420
+ });
444
421
  } finally {
445
422
  _effect.f();
446
423
  }
@@ -448,7 +425,7 @@ var L0Avatar = ({ item }) => {
448
425
  var L0Item = ({ item, parent, path, pinned, onRearrange }) => {
449
426
  var _effect = _useSignals4();
450
427
  try {
451
- const { t } = useTranslation4(NAVTREE_PLUGIN);
428
+ const { t } = useTranslation4(meta.id);
452
429
  const itemElement = useRef(null);
453
430
  const [closestEdge, setEdge] = useState2(null);
454
431
  const localizedString = toLocalizedString3(item.properties.label, t);
@@ -537,10 +514,7 @@ var L0Item = ({ item, parent, path, pinned, onRearrange }) => {
537
514
  className: mx2(l0ItemContent, pinned ? "p-2 group-hover/l0item:bg-activeSurface" : "is-[--l0-avatar-size] bs-[--l0-avatar-size] bg-activeSurface")
538
515
  }, /* @__PURE__ */ React4.createElement(ItemAvatar, {
539
516
  item
540
- })), /* @__PURE__ */ React4.createElement("div", {
541
- role: "none",
542
- className: "hidden group-aria-selected/l0item:block absolute inline-start-0 inset-block-2 is-1 bg-accentSurface rounded-ie"
543
- }), /* @__PURE__ */ React4.createElement("span", {
517
+ })), /* @__PURE__ */ React4.createElement(L0ItemActiveTabIndicator, null), /* @__PURE__ */ React4.createElement("span", {
544
518
  id: `${item.id}__label`,
545
519
  className: "sr-only"
546
520
  }, localizedString), closestEdge && /* @__PURE__ */ React4.createElement(ListItem.DropIndicator, {
@@ -553,6 +527,7 @@ var L0Item = ({ item, parent, path, pinned, onRearrange }) => {
553
527
  var ItemAvatar = ({ item }) => {
554
528
  var _effect = _useSignals4();
555
529
  try {
530
+ const { t } = useTranslation4(meta.id);
556
531
  const type = l0ItemType(item);
557
532
  if (item.properties.icon) {
558
533
  const hue = item.properties.hue ?? null;
@@ -563,13 +538,19 @@ var ItemAvatar = ({ item }) => {
563
538
  };
564
539
  return /* @__PURE__ */ React4.createElement(Icon3, {
565
540
  icon: item.properties.icon,
566
- size: 5,
541
+ size: 6,
567
542
  ...hueFgStyle
568
543
  });
569
544
  }
570
545
  if (type === "tab" && item.properties.disposition !== "pin-end") {
571
- return /* @__PURE__ */ React4.createElement(L0Avatar, {
572
- item
546
+ const hue = item.properties.hue ?? null;
547
+ const localizedString = toLocalizedString3(item.properties.label, t);
548
+ return /* @__PURE__ */ React4.createElement(DxAvatar, {
549
+ hue,
550
+ hueVariant: "surface",
551
+ variant: "square",
552
+ size: 12,
553
+ fallback: localizedString
573
554
  });
574
555
  }
575
556
  return null;
@@ -634,7 +615,7 @@ var L0Collection = ({ item, path }) => {
634
615
  var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent, path }) => {
635
616
  var _effect = _useSignals4();
636
617
  try {
637
- const { t } = useTranslation4(NAVTREE_PLUGIN);
618
+ const { t } = useTranslation4(meta.id);
638
619
  return /* @__PURE__ */ React4.createElement(Tabs.Tablist, {
639
620
  classNames: [
640
621
  "group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is",
@@ -648,16 +629,20 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
648
629
  content: t("app menu label"),
649
630
  side: "right",
650
631
  asChild: true
632
+ }, /* @__PURE__ */ React4.createElement(Tabs.TabPrimitive, {
633
+ value: "options",
634
+ asChild: true,
635
+ role: "button"
651
636
  }, /* @__PURE__ */ React4.createElement(DropdownMenu.Trigger, {
652
637
  "data-testid": "spacePlugin.addSpace",
653
- className: mx2(l0ItemRoot, "grid place-items-center")
638
+ className: mx2(l0ItemRoot, "grid place-items-center dx-focus-ring-group")
654
639
  }, /* @__PURE__ */ React4.createElement("div", {
655
640
  role: "none",
656
641
  className: mx2(l0ItemContent, "is-[--rail-action] bs-[--rail-action] group-hover/l0item:bg-hoverSurface")
657
642
  }, /* @__PURE__ */ React4.createElement(Icon3, {
658
643
  icon: "ph--list--regular",
659
644
  size: 5
660
- })))))), /* @__PURE__ */ React4.createElement(ScrollArea.Root, null, /* @__PURE__ */ React4.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React4.createElement("div", {
645
+ }))))))), /* @__PURE__ */ React4.createElement(ScrollArea.Root, null, /* @__PURE__ */ React4.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React4.createElement("div", {
661
646
  role: "none",
662
647
  className: mx2([
663
648
  "flex flex-col gap-1 pbs-1",
@@ -720,7 +705,7 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
720
705
  // src/components/Sidebar/L1Panel.tsx
721
706
  import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
722
707
  import React7, { useCallback as useCallback2, useMemo as useMemo3 } from "react";
723
- import { IconButton as IconButton2, toLocalizedString as toLocalizedString6, useTranslation as useTranslation7 } from "@dxos/react-ui";
708
+ import { DensityProvider, IconButton as IconButton2, toLocalizedString as toLocalizedString6, useTranslation as useTranslation7 } from "@dxos/react-ui";
724
709
  import { Tree } from "@dxos/react-ui-list";
725
710
  import { Tabs as Tabs2 } from "@dxos/react-ui-tabs";
726
711
  import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2 } from "@dxos/react-ui-theme";
@@ -728,7 +713,7 @@ import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem
728
713
  // src/components/NavTreeItem/NavTreeItemAction.tsx
729
714
  import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
730
715
  import React5 from "react";
731
- import { useTranslation as useTranslation5, toLocalizedString as toLocalizedString4, IconButton, useDensityContext } from "@dxos/react-ui";
716
+ import { IconButton, toLocalizedString as toLocalizedString4, useDensityContext, useTranslation as useTranslation5 } from "@dxos/react-ui";
732
717
  import { DropdownMenu as DropdownMenu2, MenuProvider as MenuProvider2 } from "@dxos/react-ui-menu";
733
718
  import { hoverableControlItem, hoverableOpenControlItem } from "@dxos/react-ui-theme";
734
719
  var fallbackIcon = "ph--placeholder--regular";
@@ -743,7 +728,7 @@ var coarseActionButtonProps = {
743
728
  var NavTreeItemActionDropdownMenu = ({ parent, label, icon, testId, menuActions, caller }) => {
744
729
  var _effect = _useSignals5();
745
730
  try {
746
- const { t } = useTranslation5(NAVTREE_PLUGIN);
731
+ const { t } = useTranslation5(meta.id);
747
732
  const density = useDensityContext();
748
733
  return /* @__PURE__ */ React5.createElement(MenuProvider2, null, /* @__PURE__ */ React5.createElement(DropdownMenu2.Root, {
749
734
  group: parent,
@@ -788,10 +773,10 @@ var NavTreeItemMonolithicAction = ({ parent, properties: { disabled, caller, tes
788
773
  label: baseLabel,
789
774
  disabled,
790
775
  onClick: (event) => {
776
+ event.stopPropagation();
791
777
  if (disabled) {
792
778
  return;
793
779
  }
794
- event.stopPropagation();
795
780
  void invoke?.(caller ? {
796
781
  parent,
797
782
  caller
@@ -808,7 +793,7 @@ var NavTreeItemMonolithicAction = ({ parent, properties: { disabled, caller, tes
808
793
  var NavTreeItemAction = ({ monolithic, menuActions, parent: node, ...props }) => {
809
794
  var _effect = _useSignals5();
810
795
  try {
811
- const { t } = useTranslation5(NAVTREE_PLUGIN);
796
+ const { t } = useTranslation5(meta.id);
812
797
  const monolithicAction = menuActions?.length === 1 && menuActions[0];
813
798
  const baseLabel = toLocalizedString4(monolithicAction ? monolithicAction.properties.label : props.label, t);
814
799
  return monolithic && menuActions?.length === 1 ? /* @__PURE__ */ React5.createElement(NavTreeItemMonolithicAction, {
@@ -829,42 +814,46 @@ var NavTreeItemAction = ({ monolithic, menuActions, parent: node, ...props }) =>
829
814
  // src/components/NavTreeItem/NavTreeItemColumns.tsx
830
815
  import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
831
816
  import React6, { Fragment, memo } from "react";
832
- import { isAction as isAction3 } from "@dxos/app-graph";
833
- import { DensityProvider, Popover, toLocalizedString as toLocalizedString5, Treegrid, useTranslation as useTranslation6 } from "@dxos/react-ui";
834
- var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fine" }) => {
817
+ import { isAction as isAction2 } from "@dxos/app-graph";
818
+ import { Popover, Treegrid, toLocalizedString as toLocalizedString5, useTranslation as useTranslation6 } from "@dxos/react-ui";
819
+ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open }) => {
835
820
  var _effect = _useSignals6();
836
821
  try {
837
- const { t } = useTranslation6(NAVTREE_PLUGIN);
838
- const { getActions: getActions2, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();
822
+ const { t } = useTranslation6(meta.id);
823
+ const { useActions: useActions3, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();
839
824
  const level = path.length - 2;
840
- const { actions: _actions, groupedActions } = getActions2(item);
825
+ const { actions: _actions, groupedActions } = useActions3(item);
841
826
  const [primaryAction, ...secondaryActions] = _actions.toSorted((a, _b) => a.properties?.disposition === "list-item-primary" ? -1 : 1);
842
- const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) => isAction3(action) ? [
827
+ const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) => isAction2(action) ? [
843
828
  action
844
829
  ] : []).filter((a) => [
845
830
  "list-item",
846
831
  "list-item-primary"
847
832
  ].includes(a.properties?.disposition));
848
- const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;
849
833
  useLoadDescendents(item);
850
- useLoadDescendents(primaryAction && !isAction3(primaryAction) ? primaryAction : void 0);
851
- return /* @__PURE__ */ React6.createElement(DensityProvider, {
852
- density
853
- }, /* @__PURE__ */ React6.createElement("div", {
834
+ useLoadDescendents(primaryAction && !isAction2(primaryAction) ? primaryAction : void 0);
835
+ const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;
836
+ return /* @__PURE__ */ React6.createElement("div", {
854
837
  role: "none",
855
838
  className: "contents app-no-drag"
856
- }, primaryAction?.properties?.disposition === "list-item-primary" && !primaryAction?.properties?.disabled ? /* @__PURE__ */ React6.createElement(NavTreeItemAction, {
839
+ }, primaryAction?.properties?.disposition === "list-item-primary" && !primaryAction?.properties?.disabled ? /* @__PURE__ */ React6.createElement(Treegrid.Cell, {
840
+ classNames: "contents"
841
+ }, /* @__PURE__ */ React6.createElement(NavTreeItemAction, {
857
842
  testId: primaryAction.properties?.testId,
858
843
  label: toLocalizedString5(primaryAction.properties?.label, t),
859
844
  icon: primaryAction.properties?.icon ?? "ph--placeholder--regular",
860
845
  parent: item,
861
- monolithic: isAction3(primaryAction),
862
- menuActions: isAction3(primaryAction) ? [
846
+ monolithic: isAction2(primaryAction),
847
+ menuActions: isAction2(primaryAction) ? [
863
848
  primaryAction
864
849
  ] : groupedActions[primaryAction.id],
865
850
  menuType: primaryAction.properties?.menuType,
866
851
  caller: NAV_TREE_ITEM
867
- }) : /* @__PURE__ */ React6.createElement(Treegrid.Cell, null), /* @__PURE__ */ React6.createElement(ActionRoot, null, actions.length > 0 ? /* @__PURE__ */ React6.createElement(NavTreeItemAction, {
852
+ })) : /* @__PURE__ */ React6.createElement(Treegrid.Cell, {
853
+ role: "none"
854
+ }), /* @__PURE__ */ React6.createElement(ActionRoot, null, actions.length > 0 ? /* @__PURE__ */ React6.createElement(Treegrid.Cell, {
855
+ classNames: "contents"
856
+ }, /* @__PURE__ */ React6.createElement(NavTreeItemAction, {
868
857
  testId: `navtree.treeItem.actionsLevel${level}`,
869
858
  label: t("tree item actions label"),
870
859
  icon: "ph--dots-three-vertical--regular",
@@ -872,7 +861,11 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
872
861
  menuActions: actions,
873
862
  menuType: "dropdown",
874
863
  caller: NAV_TREE_ITEM
875
- }) : /* @__PURE__ */ React6.createElement(Treegrid.Cell, null)), ItemEnd && /* @__PURE__ */ React6.createElement(ItemEnd, {
864
+ })) : /* @__PURE__ */ React6.createElement(Treegrid.Cell, {
865
+ role: "none"
866
+ })), ItemEnd && /* @__PURE__ */ React6.createElement(Treegrid.Cell, {
867
+ classNames: "contents"
868
+ }, /* @__PURE__ */ React6.createElement(ItemEnd, {
876
869
  node: item,
877
870
  open
878
871
  })));
@@ -887,8 +880,8 @@ var L1Panel = ({ open, path, item, currentItemId, onBack }) => {
887
880
  try {
888
881
  const { t } = useTranslation7(meta.id);
889
882
  const { isAlternateTree, ...navTreeContext } = useNavTreeContext();
890
- const { useItems: useItems2 } = navTreeContext;
891
883
  const title = toLocalizedString6(item.properties.label, t);
884
+ const { useItems: useItems2 } = navTreeContext;
892
885
  const alternateTree = useItems2(item, {
893
886
  disposition: "alternate-tree"
894
887
  })[0];
@@ -921,9 +914,11 @@ var L1Panel = ({ open, path, item, currentItemId, onBack }) => {
921
914
  tabIndex: -1,
922
915
  "aria-label": title,
923
916
  ...!open && {
924
- inert: "true"
917
+ inert: true
925
918
  }
926
- }, item.id === currentItemId && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(L1PanelHeader, {
919
+ }, item.id === currentItemId && /* @__PURE__ */ React7.createElement(DensityProvider, {
920
+ density: "fine"
921
+ }, /* @__PURE__ */ React7.createElement(L1PanelHeader, {
927
922
  path,
928
923
  item,
929
924
  currentItemId,
@@ -933,22 +928,22 @@ var L1Panel = ({ open, path, item, currentItemId, onBack }) => {
933
928
  className: "overflow-y-auto"
934
929
  }, isAlternate ? /* @__PURE__ */ React7.createElement(Tree, {
935
930
  ...navTreeContext,
936
- useItems: useAlternateItems,
937
931
  id: alternateTree.id,
938
932
  root: alternateTree,
939
933
  path: alternatePath,
940
934
  levelOffset: 5,
941
935
  gridTemplateColumns: "[tree-row-start] 1fr min-content min-content min-content [tree-row-end]",
942
- renderColumns: NavTreeItemColumns
936
+ renderColumns: NavTreeItemColumns,
937
+ useItems: useAlternateItems
943
938
  }) : /* @__PURE__ */ React7.createElement(Tree, {
944
939
  ...navTreeContext,
945
940
  id: item.id,
946
941
  root: item,
947
942
  path,
948
943
  levelOffset: 5,
949
- draggable: true,
950
944
  gridTemplateColumns: "[tree-row-start] 1fr min-content min-content min-content [tree-row-end]",
951
- renderColumns: NavTreeItemColumns
945
+ renderColumns: NavTreeItemColumns,
946
+ draggable: true
952
947
  }))));
953
948
  } finally {
954
949
  _effect.f();
@@ -996,7 +991,7 @@ var L1PanelHeader = ({ item, path, onBack }) => {
996
991
  className: "is-6"
997
992
  }), /* @__PURE__ */ React7.createElement("h2", {
998
993
  className: "flex-1 truncate min-is-0"
999
- }, title), /* @__PURE__ */ React7.createElement("div", null, backCapable && /* @__PURE__ */ React7.createElement(IconButton2, {
994
+ }, title), backCapable && /* @__PURE__ */ React7.createElement(IconButton2, {
1000
995
  variant: "ghost",
1001
996
  icon: "ph--arrow-u-down-left--regular",
1002
997
  iconOnly: true,
@@ -1021,7 +1016,7 @@ var L1PanelHeader = ({ item, path, onBack }) => {
1021
1016
  "pointer-fine:pli-1"
1022
1017
  ],
1023
1018
  onClick: handleOpen
1024
- }) || /* @__PURE__ */ React7.createElement("div", null)), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
1019
+ }), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
1025
1020
  open: true,
1026
1021
  path,
1027
1022
  item,
@@ -1140,38 +1135,36 @@ var NavTree = ({ id, root, ...props }) => {
1140
1135
  ], [
1141
1136
  id
1142
1137
  ]);
1143
- return /* @__PURE__ */ React9.createElement(Tabs3.Root, {
1144
- value: tab,
1145
- orientation: "vertical",
1146
- verticalVariant: "stateless",
1147
- classNames: "relative"
1148
- }, /* @__PURE__ */ React9.createElement(L0Menu, {
1149
- menuActions: topLevelActions,
1150
- topLevelItems: l0Items,
1151
- pinnedItems,
1152
- userAccountItem,
1153
- path,
1154
- parent: root
1155
- }), /* @__PURE__ */ React9.createElement(L1Tabs, {
1156
- topLevelItems,
1157
- path,
1158
- currentItemId: tab,
1159
- onBack,
1160
- ...props
1161
- }));
1138
+ return (
1139
+ // TODO(thure): `Tabs.Root` forces all items that should be able to receive focus to use `Tabs.Tab(Primitive)` since
1140
+ // it uses RovingFocus and doesn’t support moving focus to an item that is not a tab. Assess whether this situation
1141
+ // should change including whether it should motivate a change in the design/taxonomy, or if this means this should
1142
+ // not use `react-ui-tabs` at all.
1143
+ /* @__PURE__ */ React9.createElement(Tabs3.Root, {
1144
+ value: tab,
1145
+ orientation: "vertical",
1146
+ verticalVariant: "stateless",
1147
+ classNames: "relative"
1148
+ }, /* @__PURE__ */ React9.createElement(L0Menu, {
1149
+ menuActions: topLevelActions,
1150
+ topLevelItems: l0Items,
1151
+ pinnedItems,
1152
+ userAccountItem,
1153
+ path,
1154
+ parent: root
1155
+ }), /* @__PURE__ */ React9.createElement(L1Tabs, {
1156
+ topLevelItems,
1157
+ path,
1158
+ currentItemId: tab,
1159
+ onBack,
1160
+ ...props
1161
+ }))
1162
+ );
1162
1163
  } finally {
1163
1164
  _effect.f();
1164
1165
  }
1165
1166
  };
1166
1167
 
1167
- // src/capabilities/index.ts
1168
- import { lazy } from "@dxos/app-framework";
1169
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-5J4LRWDX.mjs"));
1170
- var IntentResolver = lazy(() => import("./intent-resolver-3XYN2CBU.mjs"));
1171
- var Keyboard2 = lazy(() => import("./keyboard-QRS6WOQH.mjs"));
1172
- var ReactSurface = lazy(() => import("./react-surface-JSJ5SQX5.mjs"));
1173
- var State = lazy(() => import("./state-54DY3DOY.mjs"));
1174
-
1175
1168
  // src/components/NavTreeContainer.tsx
1176
1169
  var NODE_TYPE = "dxos/app-graph/node";
1177
1170
  var renderItemEnd = ({ node, open }) => /* @__PURE__ */ React10.createElement(Surface, {
@@ -1183,12 +1176,12 @@ var renderItemEnd = ({ node, open }) => /* @__PURE__ */ React10.createElement(Su
1183
1176
  },
1184
1177
  limit: 1
1185
1178
  });
1186
- var getChildrenFilter = (node) => untracked(() => !isActionLike2(node) && node.type !== PLANK_COMPANION_TYPE);
1179
+ var getChildrenFilter = (node) => untracked(() => !isActionLike2(node) && node.type !== PLANK_COMPANION_TYPE && node.properties.disposition !== "hidden");
1187
1180
  var filterItems = (node, disposition) => {
1188
1181
  if (!disposition && (node.properties.disposition === "hidden" || node.properties.disposition === "alternate-tree")) {
1189
1182
  return false;
1190
1183
  } else if (!disposition) {
1191
- const action = isAction4(node);
1184
+ const action = isAction3(node);
1192
1185
  return !action || node.properties.disposition === "item";
1193
1186
  } else {
1194
1187
  return node.properties.disposition === disposition;
@@ -1203,31 +1196,47 @@ var useItems = (node, options) => {
1203
1196
  const filtered = connections.filter((node2) => filterItems(node2, options?.disposition));
1204
1197
  return options?.sort ? filtered.toSorted((a, b) => byPosition(a.properties, b.properties)) : filtered;
1205
1198
  };
1199
+ var useActions2 = (node) => {
1200
+ const { graph } = useAppGraph2();
1201
+ const actions = useGraphActions(graph, node.id);
1202
+ return useMemo6(() => actions.reduce((acc, arg) => {
1203
+ if (arg.properties.disposition === "item") {
1204
+ return acc;
1205
+ }
1206
+ acc.actions.push(arg);
1207
+ if (!isAction3(arg)) {
1208
+ const actionGroup = graph.getActions(arg.id);
1209
+ acc.groupedActions[arg.id] = actionGroup;
1210
+ }
1211
+ return acc;
1212
+ }, {
1213
+ actions: [],
1214
+ groupedActions: {}
1215
+ }), [
1216
+ actions
1217
+ ]);
1218
+ };
1206
1219
  var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar }) => {
1207
1220
  var _effect = _useSignals10();
1208
1221
  try {
1209
- const [isLg] = useMediaQuery2("lg", {
1210
- ssr: false
1211
- });
1222
+ const [isLg] = useMediaQuery2("lg");
1212
1223
  const { dispatchPromise: dispatch } = useIntentDispatcher3();
1213
1224
  const { graph } = useAppGraph2();
1214
1225
  const { isOpen, isCurrent, isAlternateTree, setItem } = useCapability(NavTreeCapabilities.State);
1215
1226
  const layout = useLayout();
1216
- const { navigationSidebarState } = useSidebars(NAVTREE_PLUGIN);
1217
- const getActions2 = useCallback3((node) => getActions(graph, node), [
1218
- graph
1219
- ]);
1227
+ const { navigationSidebarState } = useSidebars(meta.id);
1220
1228
  const getProps = useCallback3((node, path) => {
1221
1229
  const children = getChildren(graph, node, path).filter(getChildrenFilter);
1222
1230
  const parentOf = children.length > 0 ? children.map(({ id }) => id) : node.properties.role === "branch" ? [] : void 0;
1223
1231
  return {
1224
1232
  id: node.id,
1225
- label: node.properties.label ?? node.id,
1226
1233
  parentOf,
1227
- icon: node.properties.icon,
1228
1234
  disabled: node.properties.disabled,
1229
- className: mx3(node.properties.modified && "italic", node.properties.className),
1235
+ label: node.properties.label ?? node.id,
1236
+ className: mx3(node.properties.className, node.properties.modified && "italic"),
1230
1237
  headingClassName: node.properties.headingClassName,
1238
+ icon: node.properties.icon,
1239
+ iconClassName: node.properties.iconClassName,
1231
1240
  testId: node.properties.testId
1232
1241
  };
1233
1242
  }, [
@@ -1279,11 +1288,14 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1279
1288
  const canDrop = useCallback3(({ source, target }) => {
1280
1289
  return target.item.properties.canDrop?.(source) ?? false;
1281
1290
  }, []);
1291
+ const canSelect = useCallback3(({ item }) => {
1292
+ return item.properties.selectable ?? true;
1293
+ }, []);
1282
1294
  const handleSelect = useCallback3(({ item: node, path, option }) => {
1283
1295
  if (!node.data) {
1284
1296
  return;
1285
1297
  }
1286
- if (isAction4(node)) {
1298
+ if (isAction3(node)) {
1287
1299
  const [parent] = graph.getConnections(node.id, "inbound");
1288
1300
  void (parent && node.data({
1289
1301
  parent,
@@ -1319,7 +1331,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1319
1331
  }));
1320
1332
  }
1321
1333
  const defaultAction = graph.getActions(node.id).find((action) => action.properties?.disposition === "default");
1322
- if (isAction4(defaultAction)) {
1334
+ if (isAction3(defaultAction)) {
1323
1335
  void defaultAction.data();
1324
1336
  }
1325
1337
  if (!isLg) {
@@ -1402,7 +1414,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1402
1414
  const navTreeContextValue = useMemo6(() => ({
1403
1415
  useItems,
1404
1416
  tab,
1405
- getActions: getActions2,
1417
+ useActions: useActions2,
1406
1418
  loadDescendents,
1407
1419
  renderItemEnd,
1408
1420
  popoverAnchorId,
@@ -1411,6 +1423,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1411
1423
  isCurrent,
1412
1424
  isOpen,
1413
1425
  canDrop,
1426
+ canSelect,
1414
1427
  isAlternateTree,
1415
1428
  setAlternateTree,
1416
1429
  onTabChange: handleTabChange,
@@ -1419,7 +1432,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1419
1432
  onBack: handleBack
1420
1433
  }), [
1421
1434
  tab,
1422
- getActions2,
1435
+ useActions2,
1423
1436
  loadDescendents,
1424
1437
  renderItemEnd,
1425
1438
  popoverAnchorId,
@@ -1428,6 +1441,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
1428
1441
  isCurrent,
1429
1442
  isOpen,
1430
1443
  canDrop,
1444
+ canSelect,
1431
1445
  isAlternateTree,
1432
1446
  setAlternateTree,
1433
1447
  handleTabChange,
@@ -1455,7 +1469,6 @@ export {
1455
1469
  resolveMigrationOperation,
1456
1470
  sortActions,
1457
1471
  getChildren,
1458
- getActions,
1459
1472
  l0ItemType,
1460
1473
  NODE_TYPE,
1461
1474
  NavTreeContainer,
@@ -1466,4 +1479,4 @@ export {
1466
1479
  ReactSurface,
1467
1480
  State
1468
1481
  };
1469
- //# sourceMappingURL=chunk-WEMCSQI7.mjs.map
1482
+ //# sourceMappingURL=chunk-IMFXKPSB.mjs.map