@dxos/plugin-navtree 0.8.3-main.7f5a14c → 0.8.3-staging.0fa589b
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.
- package/dist/lib/browser/{chunk-T3ABOVHL.mjs → chunk-ZJPL4XJD.mjs} +83 -73
- package/dist/lib/browser/chunk-ZJPL4XJD.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -4
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-IMVZZ6MM.mjs → react-surface-H3JRTVNU.mjs} +2 -2
- package/dist/lib/browser/{state-D7KDRDBV.mjs → state-J6AKZRB4.mjs} +13 -10
- package/dist/lib/browser/state-J6AKZRB4.mjs.map +7 -0
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +1 -0
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +5 -6
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/testing/app-graph-builder.d.ts +2 -1
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -1
- package/package.json +36 -34
- package/src/NavTreePlugin.tsx +8 -2
- package/src/capabilities/state.ts +17 -11
- package/src/components/CommandsDialog/CommandsDialog.tsx +16 -10
- package/src/components/NavTree/NavTree.stories.tsx +44 -3
- package/src/components/NavTreeContainer.tsx +4 -16
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +1 -1
- package/src/components/Sidebar/L0Menu.tsx +58 -49
- package/src/components/types.ts +3 -7
- package/src/testing/app-graph-builder.ts +249 -203
- package/src/testing/generator.ts +2 -2
- package/dist/lib/browser/chunk-T3ABOVHL.mjs.map +0 -7
- package/dist/lib/browser/state-D7KDRDBV.mjs.map +0 -7
- /package/dist/lib/browser/{react-surface-IMVZZ6MM.mjs.map → react-surface-H3JRTVNU.mjs.map} +0 -0
|
@@ -16,6 +16,7 @@ import { Keyboard, keySymbols } from "@dxos/keyboard";
|
|
|
16
16
|
import { useActions } from "@dxos/plugin-graph";
|
|
17
17
|
import { Button, Dialog, Icon, useTranslation, toLocalizedString } from "@dxos/react-ui";
|
|
18
18
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
19
|
+
import { cardDialogContent, cardDialogHeader, cardDialogPaddedOverflow, cardDialogSearchListRoot } from "@dxos/react-ui-stack";
|
|
19
20
|
import { descriptionText, mx } from "@dxos/react-ui-theme";
|
|
20
21
|
import { getHostPlatform } from "@dxos/util";
|
|
21
22
|
var CommandsDialogContent = ({ selected: initial }) => {
|
|
@@ -48,19 +49,18 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
48
49
|
const groupActions = useActions(graph, group?.id);
|
|
49
50
|
const actions = isActionGroup(group) ? groupActions : allActions;
|
|
50
51
|
return /* @__PURE__ */ React.createElement(Dialog.Content, {
|
|
51
|
-
classNames:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
52
|
+
classNames: cardDialogContent
|
|
53
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Title, {
|
|
54
|
+
classNames: cardDialogHeader
|
|
55
|
+
}, t("commands dialog title", {
|
|
55
56
|
ns: NAVTREE_PLUGIN
|
|
56
57
|
})), /* @__PURE__ */ React.createElement(SearchList.Root, {
|
|
57
58
|
label: t("command list input placeholder"),
|
|
58
|
-
classNames:
|
|
59
|
+
classNames: cardDialogSearchListRoot
|
|
59
60
|
}, /* @__PURE__ */ React.createElement(SearchList.Input, {
|
|
60
|
-
placeholder: t("command list input placeholder")
|
|
61
|
-
classNames: "px-1 my-2"
|
|
61
|
+
placeholder: t("command list input placeholder")
|
|
62
62
|
}), /* @__PURE__ */ React.createElement(SearchList.Content, {
|
|
63
|
-
classNames:
|
|
63
|
+
classNames: cardDialogPaddedOverflow
|
|
64
64
|
}, actions?.map((action) => {
|
|
65
65
|
const label = toLocalizedString(action.properties.label, t);
|
|
66
66
|
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[getHostPlatform()];
|
|
@@ -102,14 +102,16 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
102
102
|
}, label), shortcut && /* @__PURE__ */ React.createElement("span", {
|
|
103
103
|
className: mx("shrink-0", descriptionText)
|
|
104
104
|
}, keySymbols(shortcut).join("")));
|
|
105
|
-
}))), /* @__PURE__ */ React.createElement(
|
|
105
|
+
}))), /* @__PURE__ */ React.createElement("div", {
|
|
106
|
+
role: "none",
|
|
107
|
+
className: "pli-cardSpacingInline pbe-cardSpacingBlock"
|
|
108
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Close, {
|
|
106
109
|
asChild: true
|
|
107
110
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
108
|
-
|
|
109
|
-
classNames: "mbs-2"
|
|
111
|
+
classNames: "is-full"
|
|
110
112
|
}, t("close label", {
|
|
111
113
|
ns: "os"
|
|
112
|
-
}))));
|
|
114
|
+
})))));
|
|
113
115
|
} finally {
|
|
114
116
|
_effect.f();
|
|
115
117
|
}
|
|
@@ -233,10 +235,8 @@ import { untracked } from "@preact/signals-core";
|
|
|
233
235
|
import React9, { memo as memo2, useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo5 } from "react";
|
|
234
236
|
import { createIntent as createIntent3, LayoutAction as LayoutAction3, Surface, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3, useLayout } from "@dxos/app-framework";
|
|
235
237
|
import { isAction as isAction4, isActionLike as isActionLike2, ROOT_ID } from "@dxos/app-graph";
|
|
236
|
-
import { Obj } from "@dxos/echo";
|
|
237
238
|
import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
238
239
|
import { useConnections } from "@dxos/plugin-graph";
|
|
239
|
-
import { isSpace } from "@dxos/react-client/echo";
|
|
240
240
|
import { useMediaQuery as useMediaQuery2, useSidebars } from "@dxos/react-ui";
|
|
241
241
|
import { isTreeData } from "@dxos/react-ui-list";
|
|
242
242
|
import { mx as mx5 } from "@dxos/react-ui-theme";
|
|
@@ -295,7 +295,7 @@ import { scrollJustEnoughIntoView } from "@atlaskit/pragmatic-drag-and-drop/elem
|
|
|
295
295
|
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
296
296
|
import React4, { forwardRef, useCallback, useLayoutEffect, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
297
297
|
import { invariant } from "@dxos/invariant";
|
|
298
|
-
import { Icon as Icon2,
|
|
298
|
+
import { Icon as Icon2, ListItem, ScrollArea, Tooltip, toLocalizedString as toLocalizedString3, useMediaQuery, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
299
299
|
import { MenuProvider, DropdownMenu } from "@dxos/react-ui-menu";
|
|
300
300
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
301
301
|
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
@@ -368,6 +368,8 @@ var useL0ItemClick = ({ item, parent, path }, type) => {
|
|
|
368
368
|
var l0Breakpoints = {
|
|
369
369
|
lg: "hidden lg:grid"
|
|
370
370
|
};
|
|
371
|
+
var l0ItemRoot = 'group/l0item flex w-full justify-center items-center relative data[type!="collection"]:cursor-pointer app-no-drag dx-focus-ring-group';
|
|
372
|
+
var l0ItemContent = "flex justify-center items-center dx-focus-ring-group-indicator transition-colors rounded-sm";
|
|
371
373
|
var L0ItemRoot = /* @__PURE__ */ forwardRef(({ item, parent, path, children }, forwardedRef) => {
|
|
372
374
|
var _effect = _useSignals4();
|
|
373
375
|
try {
|
|
@@ -410,14 +412,14 @@ var L0ItemRoot = /* @__PURE__ */ forwardRef(({ item, parent, path, children }, f
|
|
|
410
412
|
}, /* @__PURE__ */ React4.createElement(Root, {
|
|
411
413
|
...rootProps,
|
|
412
414
|
"data-type": type,
|
|
413
|
-
className: mx2(
|
|
415
|
+
className: mx2(l0ItemRoot, l0Breakpoints[item.properties.l0Breakpoint]),
|
|
414
416
|
ref: forwardedRef
|
|
415
417
|
}, children));
|
|
416
418
|
} finally {
|
|
417
419
|
_effect.f();
|
|
418
420
|
}
|
|
419
421
|
});
|
|
420
|
-
var
|
|
422
|
+
var L0Avatar = ({ item }) => {
|
|
421
423
|
var _effect = _useSignals4();
|
|
422
424
|
try {
|
|
423
425
|
const { t } = useTranslation4(NAVTREE_PLUGIN);
|
|
@@ -449,14 +451,8 @@ var L0Item = ({ item, parent, path, pinned, onRearrange }) => {
|
|
|
449
451
|
const { t } = useTranslation4(NAVTREE_PLUGIN);
|
|
450
452
|
const itemElement = useRef(null);
|
|
451
453
|
const [closestEdge, setEdge] = useState2(null);
|
|
452
|
-
const type = l0ItemType(item);
|
|
453
454
|
const localizedString = toLocalizedString3(item.properties.label, t);
|
|
454
455
|
const hue = item.properties.hue ?? null;
|
|
455
|
-
const hueFgStyle = hue && {
|
|
456
|
-
style: {
|
|
457
|
-
color: `var(--dx-${hue}SurfaceText)`
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
456
|
useLayoutEffect(() => {
|
|
461
457
|
if (!itemElement.current || !onRearrange) {
|
|
462
458
|
return;
|
|
@@ -533,35 +529,54 @@ var L0Item = ({ item, parent, path, pinned, onRearrange }) => {
|
|
|
533
529
|
}, /* @__PURE__ */ React4.createElement("div", {
|
|
534
530
|
role: "none",
|
|
535
531
|
"data-frame": true,
|
|
536
|
-
className: mx2(
|
|
537
|
-
"flex justify-center items-center dx-focus-ring-group-indicator transition-colors rounded",
|
|
538
|
-
// TODO(burdon): Create reusable button/component and/or create var for size.
|
|
539
|
-
pinned ? "bg-transparent w-[50px] p-2 group-hover/l0item:bg-activeSurface" : "bg-activeSurface w-[50px] h-[50px]"
|
|
540
|
-
),
|
|
541
532
|
...hue && {
|
|
542
533
|
style: {
|
|
543
534
|
background: `var(--dx-${hue}Surface)`
|
|
544
535
|
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
size: pinned ? 5 : 6,
|
|
549
|
-
...hueFgStyle
|
|
550
|
-
}) || type === "tab" && item.properties.disposition !== "pin-end" && /* @__PURE__ */ React4.createElement(L0Avator, {
|
|
536
|
+
},
|
|
537
|
+
className: mx2(l0ItemContent, pinned ? "p-2 group-hover/l0item:bg-activeSurface" : "is-[--l0-avatar-size] bs-[--l0-avatar-size] bg-activeSurface")
|
|
538
|
+
}, /* @__PURE__ */ React4.createElement(ItemAvatar, {
|
|
551
539
|
item
|
|
552
540
|
})), /* @__PURE__ */ React4.createElement("div", {
|
|
553
541
|
role: "none",
|
|
554
|
-
className: "hidden group-aria-selected/l0item:block absolute inline-start-0 inset-block-
|
|
542
|
+
className: "hidden group-aria-selected/l0item:block absolute inline-start-0 inset-block-2 is-1 bg-accentSurface rounded-ie"
|
|
555
543
|
}), /* @__PURE__ */ React4.createElement("span", {
|
|
556
544
|
id: `${item.id}__label`,
|
|
557
545
|
className: "sr-only"
|
|
558
|
-
}, localizedString),
|
|
546
|
+
}, localizedString), closestEdge && /* @__PURE__ */ React4.createElement(ListItem.DropIndicator, {
|
|
559
547
|
edge: closestEdge
|
|
560
548
|
}));
|
|
561
549
|
} finally {
|
|
562
550
|
_effect.f();
|
|
563
551
|
}
|
|
564
552
|
};
|
|
553
|
+
var ItemAvatar = ({ item }) => {
|
|
554
|
+
var _effect = _useSignals4();
|
|
555
|
+
try {
|
|
556
|
+
const type = l0ItemType(item);
|
|
557
|
+
if (item.properties.icon) {
|
|
558
|
+
const hue = item.properties.hue ?? null;
|
|
559
|
+
const hueFgStyle = hue && {
|
|
560
|
+
style: {
|
|
561
|
+
color: `var(--dx-${hue}SurfaceText)`
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
return /* @__PURE__ */ React4.createElement(Icon2, {
|
|
565
|
+
icon: item.properties.icon,
|
|
566
|
+
size: 5,
|
|
567
|
+
...hueFgStyle
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
if (type === "tab" && item.properties.disposition !== "pin-end") {
|
|
571
|
+
return /* @__PURE__ */ React4.createElement(L0Avatar, {
|
|
572
|
+
item
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
return null;
|
|
576
|
+
} finally {
|
|
577
|
+
_effect.f();
|
|
578
|
+
}
|
|
579
|
+
};
|
|
565
580
|
var L0Collection = ({ item, path }) => {
|
|
566
581
|
var _effect = _useSignals4();
|
|
567
582
|
try {
|
|
@@ -579,7 +594,7 @@ var L0Collection = ({ item, path }) => {
|
|
|
579
594
|
const handleRearrange = useCallback((source, target, closestEdge) => {
|
|
580
595
|
invariant(item.properties.onRearrangeChildren, void 0, {
|
|
581
596
|
F: __dxlog_file,
|
|
582
|
-
L:
|
|
597
|
+
L: 271,
|
|
583
598
|
S: void 0,
|
|
584
599
|
A: [
|
|
585
600
|
"item.properties.onRearrangeChildren",
|
|
@@ -622,30 +637,30 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
622
637
|
const { t } = useTranslation4(NAVTREE_PLUGIN);
|
|
623
638
|
return /* @__PURE__ */ React4.createElement(Tabs.Tablist, {
|
|
624
639
|
classNames: [
|
|
625
|
-
"group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is
|
|
626
|
-
"grid grid-cols-[var(--l0-size)] grid-rows-[var(--rail-size)_1fr_min-content_var(--l0-size)]
|
|
640
|
+
"group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is",
|
|
641
|
+
"grid grid-cols-[var(--l0-size)] grid-rows-[var(--rail-size)_1fr_min-content_var(--l0-size)] contain-layout",
|
|
627
642
|
"!is-[--l0-size] bg-baseSurface border-ie border-subduedSeparator app-drag pbe-[env(safe-area-inset-bottom)]"
|
|
628
643
|
]
|
|
629
|
-
}, /* @__PURE__ */ React4.createElement("div", {
|
|
630
|
-
role: "none",
|
|
631
|
-
className: "flex justify-center p-1"
|
|
632
644
|
}, /* @__PURE__ */ React4.createElement(MenuProvider, null, /* @__PURE__ */ React4.createElement(DropdownMenu.Root, {
|
|
633
645
|
group: parent,
|
|
634
646
|
items: menuActions
|
|
635
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
647
|
+
}, /* @__PURE__ */ React4.createElement(Tooltip.Trigger, {
|
|
648
|
+
content: t("app menu label"),
|
|
649
|
+
side: "right",
|
|
636
650
|
asChild: true
|
|
637
|
-
}, /* @__PURE__ */ React4.createElement(
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
651
|
+
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Trigger, {
|
|
652
|
+
"data-testid": "spacePlugin.addSpace",
|
|
653
|
+
className: mx2(l0ItemRoot, "grid place-items-center")
|
|
654
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
655
|
+
role: "none",
|
|
656
|
+
className: mx2(l0ItemContent, "is-[--rail-action] bs-[--rail-action] group-hover/l0item:bg-hoverSurface")
|
|
657
|
+
}, /* @__PURE__ */ React4.createElement(Icon2, {
|
|
658
|
+
icon: "ph--list--regular",
|
|
659
|
+
size: 5
|
|
660
|
+
})))))), /* @__PURE__ */ React4.createElement(ScrollArea.Root, null, /* @__PURE__ */ React4.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React4.createElement("div", {
|
|
646
661
|
role: "none",
|
|
647
662
|
className: mx2([
|
|
648
|
-
"flex flex-col gap-
|
|
663
|
+
"flex flex-col gap-1 pbs-1",
|
|
649
664
|
'[body[data-platform="darwin"]_&]:pbs-[calc(30px+0.25rem)]',
|
|
650
665
|
'[body[data-platform="ios"]_&]:pbs-[max(env(safe-area-inset-top),0.25rem)]'
|
|
651
666
|
])
|
|
@@ -689,7 +704,7 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
689
704
|
hue: userAccountItem.properties.hue,
|
|
690
705
|
emoji: userAccountItem.properties.emoji,
|
|
691
706
|
status: userAccountItem.properties.status,
|
|
692
|
-
size:
|
|
707
|
+
size: 10
|
|
693
708
|
}))), /* @__PURE__ */ React4.createElement("div", {
|
|
694
709
|
role: "none",
|
|
695
710
|
className: 'hidden [body[data-platform="darwin"]_&]:block absolute block-start-0 is-[calc(var(--l0-size)-1px)] bs-[calc(40px+0.25rem)]',
|
|
@@ -705,7 +720,7 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
705
720
|
// packages/plugins/plugin-navtree/src/components/Sidebar/L1Panel.tsx
|
|
706
721
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
707
722
|
import React7, { useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
708
|
-
import { Button as Button3, Icon as Icon3, IconButton as
|
|
723
|
+
import { Button as Button3, Icon as Icon3, IconButton as IconButton2, toLocalizedString as toLocalizedString6, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
709
724
|
import { Tree } from "@dxos/react-ui-list";
|
|
710
725
|
import { Tabs as Tabs2 } from "@dxos/react-ui-tabs";
|
|
711
726
|
import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2, mx as mx4 } from "@dxos/react-ui-theme";
|
|
@@ -713,7 +728,7 @@ import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem
|
|
|
713
728
|
// packages/plugins/plugin-navtree/src/components/NavTreeItem/NavTreeItemAction.tsx
|
|
714
729
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
715
730
|
import React5 from "react";
|
|
716
|
-
import { useTranslation as useTranslation5, toLocalizedString as toLocalizedString4, IconButton
|
|
731
|
+
import { useTranslation as useTranslation5, toLocalizedString as toLocalizedString4, IconButton, useDensityContext } from "@dxos/react-ui";
|
|
717
732
|
import { DropdownMenu as DropdownMenu2, MenuProvider as MenuProvider2 } from "@dxos/react-ui-menu";
|
|
718
733
|
import { hoverableControlItem, hoverableOpenControlItem, mx as mx3 } from "@dxos/react-ui-theme";
|
|
719
734
|
var fallbackIcon = "ph--placeholder--regular";
|
|
@@ -736,7 +751,7 @@ var NavTreeItemActionDropdownMenu = ({ parent, label, icon, testId, menuActions,
|
|
|
736
751
|
caller
|
|
737
752
|
}, /* @__PURE__ */ React5.createElement(DropdownMenu2.Trigger, {
|
|
738
753
|
asChild: true
|
|
739
|
-
}, /* @__PURE__ */ React5.createElement(
|
|
754
|
+
}, /* @__PURE__ */ React5.createElement(IconButton, {
|
|
740
755
|
...density === "coarse" ? coarseActionButtonProps : fineActionButtonProps,
|
|
741
756
|
classNames: mx3("shrink-0 pli-2 pointer-fine:pli-1", hoverableControlItem, hoverableOpenControlItem),
|
|
742
757
|
variant: "ghost",
|
|
@@ -755,7 +770,7 @@ var NavTreeItemMonolithicAction = ({ parent, properties: { disabled, caller, tes
|
|
|
755
770
|
var _effect = _useSignals5();
|
|
756
771
|
try {
|
|
757
772
|
const density = useDensityContext();
|
|
758
|
-
return /* @__PURE__ */ React5.createElement(
|
|
773
|
+
return /* @__PURE__ */ React5.createElement(IconButton, {
|
|
759
774
|
...density === "coarse" ? coarseActionButtonProps : fineActionButtonProps,
|
|
760
775
|
variant,
|
|
761
776
|
classNames: mx3("shrink-0", hoverableControlItem, hoverableOpenControlItem, iconOnly ? "pli-2 pointer-fine:pli-1" : "p-2 pointer-fine:p-2 mie-1"),
|
|
@@ -817,7 +832,10 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
817
832
|
const [primaryAction, ...secondaryActions] = _actions.toSorted((a, b) => a.properties?.disposition === "list-item-primary" ? -1 : 1);
|
|
818
833
|
const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) => isAction3(action) ? [
|
|
819
834
|
action
|
|
820
|
-
] : []).filter((
|
|
835
|
+
] : []).filter((a) => [
|
|
836
|
+
"list-item",
|
|
837
|
+
"list-item-primary"
|
|
838
|
+
].includes(a.properties?.disposition));
|
|
821
839
|
const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;
|
|
822
840
|
useLoadDescendents(item);
|
|
823
841
|
useLoadDescendents(primaryAction && !isAction3(primaryAction) ? primaryAction : void 0);
|
|
@@ -937,7 +955,7 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
937
955
|
onClick: handleBack
|
|
938
956
|
}) : /* @__PURE__ */ React7.createElement("span", {
|
|
939
957
|
className: "flex-1 truncate min-is-0 pis-6"
|
|
940
|
-
}, title), alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(
|
|
958
|
+
}, title), alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
941
959
|
variant: "ghost",
|
|
942
960
|
classNames: mx4("shrink-0", hoverableControlItem2, hoverableOpenControlItem2, "pli-2 pointer-fine:pli-1"),
|
|
943
961
|
iconOnly: true,
|
|
@@ -1112,8 +1130,8 @@ import { lazy } from "@dxos/app-framework";
|
|
|
1112
1130
|
var AppGraphBuilder = lazy(() => import("./app-graph-builder-P7AY3K72.mjs"));
|
|
1113
1131
|
var IntentResolver = lazy(() => import("./intent-resolver-NAYKKAOP.mjs"));
|
|
1114
1132
|
var Keyboard2 = lazy(() => import("./keyboard-DDFATRUG.mjs"));
|
|
1115
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
1116
|
-
var State = lazy(() => import("./state-
|
|
1133
|
+
var ReactSurface = lazy(() => import("./react-surface-H3JRTVNU.mjs"));
|
|
1134
|
+
var State = lazy(() => import("./state-J6AKZRB4.mjs"));
|
|
1117
1135
|
|
|
1118
1136
|
// packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx
|
|
1119
1137
|
var NODE_TYPE = "dxos/app-graph/node";
|
|
@@ -1218,16 +1236,8 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1218
1236
|
navigationSidebarState,
|
|
1219
1237
|
isLg
|
|
1220
1238
|
]);
|
|
1221
|
-
const canDrop = useCallback3((source, target) => {
|
|
1222
|
-
|
|
1223
|
-
const targetNode = target.item;
|
|
1224
|
-
if (isSpace(targetNode.data)) {
|
|
1225
|
-
return Obj.isObject(sourceNode.data) || isSpace(sourceNode.data);
|
|
1226
|
-
} else if (Obj.isObject(targetNode.data)) {
|
|
1227
|
-
return Obj.isObject(sourceNode.data);
|
|
1228
|
-
} else {
|
|
1229
|
-
return false;
|
|
1230
|
-
}
|
|
1239
|
+
const canDrop = useCallback3(({ source, target }) => {
|
|
1240
|
+
return target.item.properties.canDrop?.(source) ?? false;
|
|
1231
1241
|
}, []);
|
|
1232
1242
|
const handleSelect = useCallback3(({ item: node, path, option }) => {
|
|
1233
1243
|
if (!node.data) {
|
|
@@ -1416,4 +1426,4 @@ export {
|
|
|
1416
1426
|
ReactSurface,
|
|
1417
1427
|
State
|
|
1418
1428
|
};
|
|
1419
|
-
//# sourceMappingURL=chunk-
|
|
1429
|
+
//# sourceMappingURL=chunk-ZJPL4XJD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/CommandsDialog/CommandsDialog.tsx", "../../../src/components/CommandsDialog/CommandsTrigger.tsx", "../../../src/util.ts", "../../../src/components/NavTreeContainer.tsx", "../../../src/components/NavTree/NavTree.tsx", "../../../src/hooks.ts", "../../../src/components/NavTreeContext.tsx", "../../../src/components/NavTreeDocumentTitle.tsx", "../../../src/components/Sidebar/L0Menu.tsx", "../../../src/components/UserAccountAvatar/UserAccountAvatar.tsx", "../../../src/components/Sidebar/L1Panel.tsx", "../../../src/components/NavTreeItem/NavTreeItemAction.tsx", "../../../src/components/NavTreeItem/NavTreeItemColumns.tsx", "../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { createIntent, LayoutAction, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';\nimport { type ActionLike, isAction, isActionGroup } from '@dxos/app-graph';\nimport { Keyboard, keySymbols } from '@dxos/keyboard';\nimport { useActions } from '@dxos/plugin-graph';\nimport { Button, Dialog, Icon, useTranslation, toLocalizedString } from '@dxos/react-ui';\nimport { SearchList } from '@dxos/react-ui-searchlist';\nimport {\n cardDialogContent,\n cardDialogHeader,\n cardDialogPaddedOverflow,\n cardDialogSearchListRoot,\n} from '@dxos/react-ui-stack';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { KEY_BINDING, NAVTREE_PLUGIN } from '../../meta';\n\n// TODO(wittjosiah): This probably deserves its own plugin but for now it lives here w/ other navigation UI.\nexport const CommandsDialogContent = ({ selected: initial }: { selected?: string }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const [selected, setSelected] = useState<string | undefined>(initial);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n\n // Traverse graph.\n // TODO(burdon): Factor out commonality with shortcut dialog.\n const allActions = useMemo(() => {\n // TODO(burdon): Get from navtree (not keyboard).\n const current = Keyboard.singleton.getCurrentContext();\n const actionMap = new Set<string>();\n const actions: ActionLike[] = [];\n graph.traverse({\n visitor: (node, path) => {\n if (\n (isAction(node) || isActionGroup(node)) &&\n !actionMap.has(node.id) &&\n current.startsWith(path.slice(0, -1).join('/'))\n ) {\n actionMap.add(node.id);\n actions.push(node);\n }\n },\n });\n\n actions.sort((a, b) => {\n return toLocalizedString(a.properties.label, t)\n ?.toLowerCase()\n .localeCompare(toLocalizedString(b.properties.label, t)?.toLowerCase());\n });\n\n return actions;\n }, [graph]);\n\n const group = allActions.find(({ id }) => id === selected);\n const groupActions = useActions(graph, group?.id);\n const actions = isActionGroup(group) ? groupActions : allActions;\n\n return (\n <Dialog.Content classNames={cardDialogContent}>\n <Dialog.Title classNames={cardDialogHeader}>{t('commands dialog title', { ns: NAVTREE_PLUGIN })}</Dialog.Title>\n\n {/* TODO(burdon): BUG: Overscrolls container. */}\n <SearchList.Root label={t('command list input placeholder')} classNames={cardDialogSearchListRoot}>\n <SearchList.Input placeholder={t('command list input placeholder')} />\n <SearchList.Content classNames={cardDialogPaddedOverflow}>\n {actions?.map((action) => {\n const label = toLocalizedString(action.properties.label, t);\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n return (\n <SearchList.Item\n value={label}\n key={action.id}\n onSelect={() => {\n if (action.properties.disabled) {\n return;\n }\n\n if (isActionGroup(action)) {\n setSelected(action.id);\n return;\n }\n\n void dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } }));\n setTimeout(() => {\n const node = graph.getConnections(group?.id ?? action.id, 'inbound')[0];\n void (node && isAction(action) && action.data({ parent: node, caller: KEY_BINDING }));\n });\n }}\n classNames='flex items-center gap-2'\n disabled={action.properties.disabled}\n {...(action.properties?.testId && { 'data-testid': action.properties.testId })}\n >\n <Icon icon={action.properties.icon} size={4} />\n <span className='grow truncate'>{label}</span>\n {shortcut && <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>}\n </SearchList.Item>\n );\n })}\n </SearchList.Content>\n </SearchList.Root>\n\n <div role='none' className='pli-cardSpacingInline pbe-cardSpacingBlock'>\n <Dialog.Close asChild>\n <Button classNames='is-full'>{t('close label', { ns: 'os' })}</Button>\n </Dialog.Close>\n </div>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { MagnifyingGlass } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../../meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n return (\n <Button\n classNames='m-1 pli-1 lg:pli-2'\n onClick={() =>\n dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: COMMANDS_DIALOG,\n options: {\n blockAlign: 'start',\n },\n }),\n )\n }\n >\n <span className='text-description font-normal grow text-start'>{t('command list input placeholder')}</span>\n <MagnifyingGlass className={getSize(5)} />\n </Button>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Action, type Node, type ReadableGraph, isAction, isActionLike } from '@dxos/app-graph';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type FlattenedActions, type NavTreeItemGraphNode } from './types';\n\nexport const getParent = (\n graph: ReadableGraph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return graph.getConnections(node.id, 'inbound').find((n) => n.id === parentId) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n 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: 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: Action[]): Action[] =>\n actions.sort((a, b) => {\n if (a.properties.disposition === b.properties.disposition) {\n return 0;\n }\n\n if (a.properties.disposition === 'list-item-primary') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getChildren = (\n graph: ReadableGraph,\n node: NavTreeItemGraphNode,\n path: readonly string[] = [],\n): NavTreeItemGraphNode[] => {\n return graph\n .getConnections(node.id, 'outbound')\n .map((n) => {\n // Break cycles.\n const nextPath = [...path, node.id];\n return nextPath.includes(n.id) ? undefined : (n as NavTreeItemGraphNode);\n })\n .filter(isNonNullable) as NavTreeItemGraphNode[];\n};\n\nexport const getActions = (graph: ReadableGraph, node: Node): FlattenedActions => {\n return graph.getActions(node.id).reduce(\n (acc: FlattenedActions, arg) => {\n if (arg.properties.disposition === 'item') {\n return acc;\n }\n\n acc.actions.push(arg);\n if (!isAction(arg)) {\n const actionGroup = graph.getActions(arg.id);\n acc.groupedActions[arg.id] = actionGroup;\n }\n return acc;\n },\n { actions: [], groupedActions: {} },\n );\n};\n\nexport const l0ItemType = (item: Node<any>) => {\n if (item.properties.disposition === 'collection') {\n return 'collection';\n } else if (isActionLike(item)) {\n return 'action';\n } else if (item.properties.disposition === 'navigation') {\n return 'link';\n } else {\n return 'tab';\n }\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { extractInstruction, type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { untracked } from '@preact/signals-core';\nimport React, { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport {\n createIntent,\n LayoutAction,\n Surface,\n useAppGraph,\n useCapability,\n useIntentDispatcher,\n useLayout,\n} from '@dxos/app-framework';\nimport { isAction, isActionLike, ROOT_ID, type Node, type ReadableGraph } from '@dxos/app-graph';\nimport { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { useConnections } from '@dxos/plugin-graph';\nimport { useMediaQuery, useSidebars } from '@dxos/react-ui';\nimport { isTreeData, type TreeItemDataProps, type TreeData } from '@dxos/react-ui-list';\nimport { mx } from '@dxos/react-ui-theme';\nimport { arrayMove, byPosition } from '@dxos/util';\n\nimport { NAV_TREE_ITEM, NavTree } from './NavTree';\nimport { NavTreeContext } from './NavTreeContext';\nimport { type NavTreeContextValue } from './types';\nimport { NavTreeCapabilities } from '../capabilities';\nimport { NAVTREE_PLUGIN } from '../meta';\nimport { type NavTreeItemGraphNode } from '../types';\nimport { getChildren, getParent, getActions as naturalGetActions, resolveMigrationOperation } from '../util';\n\n// TODO(thure): Is NavTree truly authoritative in this regard?\nexport const NODE_TYPE = 'dxos/app-graph/node';\n\nconst renderItemEnd = ({ node, open }: { node: Node; open: boolean }) => (\n <Surface role='navtree-item-end' data={{ id: node.id, subject: node.data, open }} limit={1} />\n);\n\nconst getChildrenFilter = (node: Node): node is Node =>\n untracked(() => !isActionLike(node) && node.type !== PLANK_COMPANION_TYPE);\n\nconst filterItems = (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 = isAction(node);\n return !action || node.properties.disposition === 'item';\n } else {\n return node.properties.disposition === disposition;\n }\n};\n\nconst getItems = (graph: ReadableGraph, node?: Node, disposition?: string) => {\n return graph.getConnections(node?.id ?? ROOT_ID, 'outbound').filter((node) => filterItems(node, disposition));\n};\n\nconst useItems = (node?: Node, options?: { disposition?: string; sort?: boolean }) => {\n const { graph } = useAppGraph();\n const connections = useConnections(graph, node?.id ?? ROOT_ID).filter((node) =>\n filterItems(node, options?.disposition),\n );\n return options?.sort ? connections.toSorted((a, b) => byPosition(a.properties, b.properties)) : connections;\n};\n\nexport type NavTreeContainerProps = {\n popoverAnchorId?: string;\n topbar?: boolean;\n} & Pick<NavTreeContextValue, 'tab'>;\n\nexport const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeContainerProps) => {\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n const { isOpen, isCurrent, isAlternateTree, setItem } = useCapability(NavTreeCapabilities.State);\n const layout = useLayout();\n const { navigationSidebarState } = useSidebars(NAVTREE_PLUGIN);\n\n const getActions = useCallback((node: Node) => naturalGetActions(graph, node), [graph]);\n\n const getProps = useCallback(\n (node: Node, path: string[]): TreeItemDataProps => {\n const children = getChildren(graph, node, path).filter(getChildrenFilter);\n const parentOf =\n children.length > 0 ? children.map(({ id }) => id) : node.properties.role === 'branch' ? [] : undefined;\n return {\n id: node.id,\n label: node.properties.label ?? node.id,\n parentOf,\n icon: node.properties.icon,\n disabled: node.properties.disabled,\n className: mx(node.properties.modified && 'italic', node.properties.className),\n headingClassName: node.properties.headingClassName,\n testId: node.properties.testId,\n };\n },\n [graph],\n );\n\n const loadDescendents = useCallback(\n (node: Node) => {\n graph.expand(node.id, 'outbound');\n // Load one level deeper, which resolves some juddering observed on open/close.\n graph.getConnections(node.id, 'outbound').forEach((child) => {\n graph.expand(child.id, 'outbound');\n });\n },\n [graph],\n );\n\n const handleOpenChange = useCallback(\n ({ item: { id }, path, open }: { item: Node; path: string[]; open: boolean }) => {\n // TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.\n setItem(path, 'open', open);\n graph.expand(id, 'outbound');\n },\n [graph],\n );\n\n const handleTabChange = useCallback(\n async (node: NavTreeItemGraphNode) => {\n await dispatch(\n createIntent(LayoutAction.UpdateSidebar, {\n part: 'sidebar',\n options: {\n state:\n node.id === tab\n ? navigationSidebarState === 'expanded'\n ? isLg\n ? 'collapsed'\n : 'closed'\n : 'expanded'\n : 'expanded',\n },\n }),\n );\n\n await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: node.id }));\n\n // Open the first item if the workspace is empty.\n if (layout.active.length === 0) {\n const [item] = getItems(graph, node).filter((node) => !isActionLike(node));\n if (item && item.data) {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [item.id] }));\n }\n }\n },\n [dispatch, layout.active, tab, navigationSidebarState, isLg],\n );\n\n const canDrop = useCallback(({ source, target }: { source: TreeData; target: TreeData }) => {\n return target.item.properties.canDrop?.(source) ?? false;\n }, []);\n\n const handleSelect = useCallback(\n ({ item: node, path, option }: { item: Node; path: string[]; option: boolean }) => {\n if (!node.data) {\n return;\n }\n\n if (isAction(node)) {\n const [parent] = graph.getConnections(node.id, 'inbound');\n void (parent && node.data({ parent, caller: NAV_TREE_ITEM }));\n return;\n }\n\n const current = isCurrent(path, node);\n if (!current) {\n void dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [node.id],\n options: { key: node.properties.key },\n }),\n );\n } else if (option) {\n void dispatch(\n createIntent(LayoutAction.Close, { part: 'main', subject: [node.id], options: { state: false } }),\n );\n } else {\n void dispatch(createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: node.id }));\n }\n\n const defaultAction = graph.getActions(node.id).find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n\n if (!isLg) {\n void dispatch(createIntent(LayoutAction.UpdateSidebar, { part: 'sidebar', options: { state: 'closed' } }));\n }\n },\n [graph, dispatch, isCurrent, isLg],\n );\n\n const handleBack = useCallback(\n () => dispatch(createIntent(LayoutAction.RevertWorkspace, { part: 'workspace', options: { revert: true } })),\n [dispatch],\n );\n\n // TODO(wittjosiah): Factor out hook.\n useEffect(() => {\n return monitorForElements({\n canMonitor: ({ source }) => isTreeData(source.data),\n onDrop: ({ location, source }) => {\n // Didn't drop on anything.\n if (!location.current.dropTargets.length) {\n return;\n }\n const target = location.current.dropTargets[0];\n const instruction: Instruction | null = extractInstruction(target.data);\n if (instruction !== null && instruction.type !== 'instruction-blocked') {\n const sourceNode = source.data.item as NavTreeItemGraphNode;\n const targetNode = target.data.item as NavTreeItemGraphNode;\n const sourcePath = source.data.path as string[];\n const targetPath = target.data.path as string[];\n const operation =\n sourcePath.slice(0, -1).join() === targetPath.slice(0, -1).join() && instruction.type !== 'make-child'\n ? 'rearrange'\n : resolveMigrationOperation(graph, sourceNode, targetPath, targetNode);\n const sourceParent = getParent(graph, sourceNode, sourcePath);\n const targetParent = getParent(graph, targetNode, targetPath);\n const sourceItems = getItems(graph, sourceParent);\n const targetItems = getItems(graph, targetParent);\n const sourceIndex = sourceItems.findIndex(({ id }) => id === sourceNode.id);\n const targetIndex = targetItems.findIndex(({ id }) => id === targetNode.id);\n const migrationIndex =\n instruction.type === 'make-child'\n ? undefined\n : instruction.type === 'reorder-below'\n ? targetIndex + 1\n : targetIndex;\n switch (operation) {\n case 'rearrange': {\n const nextItems = sourceItems.map(({ data }) => data);\n arrayMove(nextItems, sourceIndex, targetIndex);\n void sourceParent?.properties.onRearrangeChildren?.(nextItems);\n break;\n }\n case 'copy': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n void target?.properties.onCopy?.(sourceNode, migrationIndex);\n break;\n }\n case 'transfer': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n if (!target?.properties.onTransferStart || !sourceParent?.properties.onTransferEnd) {\n break;\n }\n void target?.properties.onTransferStart(sourceNode, migrationIndex);\n void sourceParent?.properties.onTransferEnd?.(sourceNode, target);\n break;\n }\n }\n }\n },\n });\n }, [graph]);\n\n const setAlternateTree = useCallback(\n (path: string[], open: boolean) => {\n setItem(path, 'alternateTree', open);\n },\n [setItem],\n );\n\n const navTreeContextValue = useMemo(\n () => ({\n useItems,\n tab,\n getActions,\n loadDescendents,\n renderItemEnd,\n popoverAnchorId,\n topbar,\n getProps,\n isCurrent,\n isOpen,\n canDrop,\n isAlternateTree,\n setAlternateTree,\n onTabChange: handleTabChange,\n onOpenChange: handleOpenChange,\n onSelect: handleSelect,\n onBack: handleBack,\n }),\n [\n tab,\n getActions,\n loadDescendents,\n renderItemEnd,\n popoverAnchorId,\n topbar,\n getProps,\n isCurrent,\n isOpen,\n canDrop,\n isAlternateTree,\n setAlternateTree,\n handleTabChange,\n handleOpenChange,\n handleSelect,\n handleBack,\n ],\n );\n\n return (\n <NavTreeContext.Provider value={navTreeContextValue}>\n <NavTree id={ROOT_ID} root={graph.root} open={layout.sidebarOpen} />\n </NavTreeContext.Provider>\n );\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { type TreeProps } from '@dxos/react-ui-list';\nimport { Tabs } from '@dxos/react-ui-tabs';\n\nimport { useLoadDescendents } from '../../hooks';\nimport { type NavTreeItemGraphNode } from '../../types';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { L0Menu, L1Panels, type L1PanelsProps } from '../Sidebar';\n\nexport const NAV_TREE_ITEM = 'NavTreeItem';\n\nexport type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'> & Pick<L1PanelsProps, 'open'>;\n\nexport const NavTree = ({ id, root, ...props }: NavTreeProps) => {\n const { tab, useItems, onBack } = useNavTreeContext();\n const topLevelActions = useItems(root, { disposition: 'menu', sort: true });\n const topLevelCollections = useItems(root, { disposition: 'collection' });\n const topLevelWorkspaces = useItems(root, { disposition: 'workspace' });\n const topLevelNavigation = useItems(root, { disposition: 'navigation' });\n const l0Items = useMemo(\n () => [\n // prettier-ignore\n ...topLevelCollections,\n ...topLevelWorkspaces,\n ...topLevelNavigation,\n ],\n [topLevelCollections, topLevelWorkspaces, topLevelNavigation],\n );\n const pinnedItems = useItems(root, { disposition: 'pin-end', sort: true });\n const userAccountItem = useItems(root, { disposition: 'user-account' })[0];\n const topLevelItems = useMemo(\n () => [\n // prettier-ignore\n ...l0Items,\n ...pinnedItems,\n ...(userAccountItem ? [userAccountItem] : []),\n ],\n [l0Items, pinnedItems, userAccountItem],\n );\n\n useLoadDescendents(root);\n const path = useMemo(() => [id], [id]);\n\n return (\n <Tabs.Root value={tab} orientation='vertical' verticalVariant='stateless' classNames='relative'>\n <L0Menu\n menuActions={topLevelActions}\n topLevelItems={l0Items}\n pinnedItems={pinnedItems}\n userAccountItem={userAccountItem}\n path={path}\n parent={root}\n />\n <L1Panels topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} {...props} />\n </Tabs.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\n\nimport { useNavTreeContext } from './components';\n\nexport const useLoadDescendents = (root?: Node) => {\n const { loadDescendents } = useNavTreeContext();\n useEffect(() => {\n const frame = requestAnimationFrame(() => {\n if (root) {\n void loadDescendents?.(root);\n }\n });\n return () => cancelAnimationFrame(frame);\n }, [root]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { type NavTreeContextValue } from './types';\n\nexport const NavTreeContext = createContext<NavTreeContextValue | null>(null);\n\nexport const useNavTreeContext = () => useContext(NavTreeContext) ?? raise(new Error('Missing NavTreeContext'));\n", "//\n// Copyright 2023 DXOS.org\n//\nimport { useEffect } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\nexport const NavTreeDocumentTitle = ({ node }: { node?: Node }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n useEffect(() => {\n document.title = node ? toLocalizedString(node.properties.label, t) : t('current app name', { ns: 'appkit' });\n }, [node?.properties?.label]);\n return null;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source';\nimport { scrollJustEnoughIntoView } from '@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view';\nimport {\n type Edge,\n attachClosestEdge,\n extractClosestEdge,\n} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport React, {\n forwardRef,\n type MouseEvent,\n type PropsWithChildren,\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { invariant } from '@dxos/invariant';\nimport { Icon, ListItem, ScrollArea, Tooltip, toLocalizedString, useMediaQuery, useTranslation } from '@dxos/react-ui';\nimport { MenuProvider, DropdownMenu, type MenuItem } from '@dxos/react-ui-menu';\nimport type { StackItemRearrangeHandler } from '@dxos/react-ui-stack';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { mx } from '@dxos/react-ui-theme';\nimport { arrayMove, getFirstTwoRenderableChars } from '@dxos/util';\n\nimport { useLoadDescendents } from '../../hooks';\nimport { NAVTREE_PLUGIN } from '../../meta';\nimport { l0ItemType } from '../../util';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { UserAccountAvatar } from '../UserAccountAvatar';\n\n//\n// L0Item\n//\n\ntype L0ItemData = {\n id: L0ItemProps['item']['id'];\n type: 'l0Item';\n};\n\ntype L0ItemRootProps = {\n item: Node<any>;\n parent?: Node<any>;\n path: string[];\n};\n\ntype L0ItemProps = L0ItemRootProps & {\n item: Node<any>;\n parent?: Node<any>;\n path: string[];\n pinned?: boolean;\n onRearrange?: StackItemRearrangeHandler<L0ItemData>;\n};\n\nconst useL0ItemClick = ({ item, parent, path }: L0ItemProps, type: string) => {\n const { tab, isCurrent, onSelect, onTabChange } = useNavTreeContext();\n const [isLg] = useMediaQuery('lg', { ssr: false });\n\n return useCallback(\n (event: MouseEvent) => {\n switch (type) {\n case 'action': {\n const {\n data: invoke,\n properties: { caller },\n } = item;\n\n return invoke?.(caller ? { node: parent, caller } : { node: parent });\n }\n\n case 'tab':\n return onTabChange?.(item);\n\n case 'link':\n return onSelect?.({ item, path, current: !isCurrent(path, item), option: event.altKey });\n }\n },\n [item, parent, type, tab, isCurrent, onSelect, onTabChange, isLg],\n );\n};\n\nconst l0Breakpoints: Record<string, string> = {\n lg: 'hidden lg:grid',\n};\n\nconst l0ItemRoot =\n 'group/l0item flex w-full justify-center items-center relative data[type!=\"collection\"]:cursor-pointer app-no-drag dx-focus-ring-group';\n\nconst l0ItemContent = 'flex justify-center items-center dx-focus-ring-group-indicator transition-colors rounded-sm';\n\nconst L0ItemRoot = forwardRef<HTMLElement, PropsWithChildren<L0ItemRootProps>>(\n ({ item, parent, path, children }, forwardedRef) => {\n const { getProps } = useNavTreeContext();\n const { id, testId } = getProps?.(item, path) ?? {};\n const type = l0ItemType(item);\n const itemPath = useMemo(() => [...path, item.id], [item.id, path]);\n\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const localizedString = toLocalizedString(item.properties.label, t);\n\n const handleClick = useL0ItemClick({ item, parent, path: itemPath }, type);\n const rootProps =\n type === 'tab'\n ? { value: item.id, tabIndex: 0, onClick: handleClick, 'data-testid': testId, 'data-itemid': id }\n : type !== 'collection'\n ? { onClick: handleClick, 'data-testid': testId, 'data-itemid': id }\n : { onClick: handleClick };\n\n const Root = type === 'collection' ? 'h2' : type === 'tab' ? Tabs.TabPrimitive : 'button';\n\n return (\n <Tooltip.Trigger asChild delayDuration={0} side='right' content={localizedString}>\n <Root\n {...(rootProps as any)}\n data-type={type}\n className={mx(l0ItemRoot, l0Breakpoints[item.properties.l0Breakpoint])}\n ref={forwardedRef}\n >\n {children}\n </Root>\n </Tooltip.Trigger>\n );\n },\n);\n\nconst L0Avatar = ({ item }: Pick<L0ItemProps, 'item'>) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const type = l0ItemType(item);\n const hue = item.properties.hue ?? null;\n const hueFgStyle = hue && { style: { color: `var(--dx-${hue}SurfaceText)` } };\n const localizedString = toLocalizedString(item.properties.label, t);\n const avatarValue = useMemo(\n () => (type === 'tab' ? getFirstTwoRenderableChars(localizedString).join('').toUpperCase() : []),\n [type, item.properties.label, t],\n );\n\n return (\n <span role='img' className='place-self-center text-xl font-light' {...hueFgStyle}>\n {avatarValue}\n </span>\n );\n};\n\n// TODO(burdon): Factor out pinned (non-draggable) items.\nconst L0Item = ({ item, parent, path, pinned, onRearrange }: L0ItemProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const itemElement = useRef<HTMLElement | null>(null);\n const [closestEdge, setEdge] = useState<Edge | null>(null);\n const localizedString = toLocalizedString(item.properties.label, t);\n const hue = item.properties.hue ?? null;\n\n useLayoutEffect(() => {\n // NOTE(thure): This is copied from StackItem, perhaps this should be DRYed out.\n if (!itemElement.current || !onRearrange) {\n return;\n }\n\n return combine(\n draggable({\n element: itemElement.current,\n getInitialData: () => ({ id: item.id, type: 'l0Item' }) satisfies L0ItemData,\n onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {\n document.body.setAttribute('data-drag-preview', 'true');\n const element = source.element.querySelector('[data-frame]') as HTMLElement;\n scrollJustEnoughIntoView({ element });\n const { x, y } = preserveOffsetOnSource({ element, input: location.current.input })({\n container: (element.offsetParent ?? document.body) as HTMLElement,\n });\n nativeSetDragImage?.(element, x, y);\n },\n onDragStart: () => {\n document.body.removeAttribute('data-drag-preview');\n itemElement.current!.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'active');\n },\n onDrop: () => {\n itemElement.current!.closest('[data-drag-autoscroll]')?.setAttribute('data-drag-autoscroll', 'idle');\n },\n }),\n dropTargetForElements({\n element: itemElement.current,\n getData: ({ input, element }) => {\n return attachClosestEdge(\n { id: item.id, type: 'l0Item' },\n { input, element, allowedEdges: ['top', 'bottom'] },\n );\n },\n onDragEnter: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDrag: ({ self, source }) => {\n if (source.data.type === self.data.type) {\n setEdge(extractClosestEdge(self.data));\n }\n },\n onDragLeave: () => setEdge(null),\n onDrop: ({ self, source }) => {\n setEdge(null);\n if (source.data.type === self.data.type) {\n onRearrange(source.data as L0ItemData, self.data as L0ItemData, extractClosestEdge(self.data));\n }\n },\n }),\n );\n }, [item, onRearrange]);\n\n return (\n <L0ItemRoot ref={itemElement} item={item} parent={parent} path={path}>\n <div\n role='none'\n data-frame={true}\n {...(hue && { style: { background: `var(--dx-${hue}Surface)` } })}\n className={mx(\n l0ItemContent,\n pinned\n ? 'p-2 group-hover/l0item:bg-activeSurface'\n : 'is-[--l0-avatar-size] bs-[--l0-avatar-size] bg-activeSurface',\n )}\n >\n <ItemAvatar item={item} />\n </div>\n <div\n role='none'\n className='hidden group-aria-selected/l0item:block absolute inline-start-0 inset-block-2 is-1 bg-accentSurface rounded-ie'\n />\n <span id={`${item.id}__label`} className='sr-only'>\n {localizedString}\n </span>\n {closestEdge && <ListItem.DropIndicator edge={closestEdge} />}\n </L0ItemRoot>\n );\n};\n\nconst ItemAvatar = ({ item }: Pick<L0ItemProps, 'item'>) => {\n const type = l0ItemType(item);\n if (item.properties.icon) {\n const hue = item.properties.hue ?? null;\n const hueFgStyle = hue && { style: { color: `var(--dx-${hue}SurfaceText)` } };\n return <Icon icon={item.properties.icon} size={5} {...hueFgStyle} />;\n }\n\n if (type === 'tab' && item.properties.disposition !== 'pin-end') {\n return <L0Avatar item={item} />;\n }\n\n return null;\n};\n\n//\n// L0Collection\n//\n\nconst L0Collection = ({ item, path }: L0ItemProps) => {\n const navTreeContext = useNavTreeContext();\n useLoadDescendents(item);\n const collectionItems = navTreeContext.useItems(item);\n const groupPath = useMemo(() => [...path, item.id], [item.id, path]);\n const { id, testId } = navTreeContext.getProps?.(item, path) ?? {};\n\n const handleRearrange = useCallback<StackItemRearrangeHandler<L0ItemData>>(\n (source, target, closestEdge) => {\n invariant(item.properties.onRearrangeChildren);\n const sourceIndex = collectionItems.findIndex((i) => i.id === source.id);\n const targetIndex = collectionItems.findIndex((i) => i.id === target.id);\n const insertIndex =\n source.id === target.id\n ? sourceIndex\n : targetIndex +\n (sourceIndex < targetIndex ? (closestEdge === 'top' ? -1 : 0) : closestEdge === 'bottom' ? 1 : 0);\n const nextOrder = arrayMove([...collectionItems], sourceIndex, insertIndex);\n return item.properties.onRearrangeChildren(nextOrder);\n },\n [collectionItems, item.properties.onRearrangeChildren],\n );\n\n return (\n <div\n role='group'\n className='contents group/l0c'\n aria-labelledby={`${item.id}__label`}\n data-itemid={id}\n data-testid={testId}\n >\n {collectionItems.map((collectionItem) => (\n <L0Item\n key={collectionItem.id}\n item={collectionItem}\n parent={item}\n path={groupPath}\n {...(item.properties.onRearrangeChildren && { onRearrange: handleRearrange })}\n />\n ))}\n </div>\n );\n};\n\n//\n// L0Menu\n//\n\nexport type L0MenuProps = {\n menuActions: MenuItem[];\n topLevelItems: Node<any>[];\n pinnedItems: Node<any>[];\n userAccountItem?: Node<any>;\n parent?: Node<any>;\n path: string[];\n};\n\nexport const L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent, path }: L0MenuProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n return (\n <Tabs.Tablist\n classNames={[\n 'group/l0 absolute z-[1] inset-block-0 inline-start-0 rounded-is',\n 'grid grid-cols-[var(--l0-size)] grid-rows-[var(--rail-size)_1fr_min-content_var(--l0-size)] contain-layout',\n '!is-[--l0-size] bg-baseSurface border-ie border-subduedSeparator app-drag pbe-[env(safe-area-inset-bottom)]',\n ]}\n >\n {/* TODO(wittjosiah): Use L0Item trigger. */}\n <MenuProvider>\n <DropdownMenu.Root group={parent} items={menuActions}>\n <Tooltip.Trigger content={t('app menu label')} side='right' asChild>\n <DropdownMenu.Trigger\n data-testid='spacePlugin.addSpace'\n className={mx(l0ItemRoot, 'grid place-items-center')}\n >\n <div\n role='none'\n className={mx(\n l0ItemContent,\n 'is-[--rail-action] bs-[--rail-action] group-hover/l0item:bg-hoverSurface',\n )}\n >\n <Icon icon='ph--list--regular' size={5} />\n </div>\n </DropdownMenu.Trigger>\n </Tooltip.Trigger>\n </DropdownMenu.Root>\n </MenuProvider>\n\n {/* Space list. */}\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <div\n role='none'\n className={mx([\n 'flex flex-col gap-1 pbs-1',\n '[body[data-platform=\"darwin\"]_&]:pbs-[calc(30px+0.25rem)]',\n '[body[data-platform=\"ios\"]_&]:pbs-[max(env(safe-area-inset-top),0.25rem)]',\n ])}\n >\n {topLevelItems.map((item) => {\n if (l0ItemType(item) === 'collection') {\n return <L0Collection key={item.id} item={item} parent={parent} path={path} />;\n } else {\n return <L0Item key={item.id} item={item} parent={parent} path={path} />;\n }\n })}\n </div>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Actions. */}\n <div role='none' className='grid grid-cols-1 auto-rows-[--rail-action] pbs-2'>\n {pinnedItems\n .filter((item) => l0ItemType(item) !== 'collection')\n .map((item) => (\n <L0Item key={item.id} item={item} parent={parent} path={path} pinned />\n ))}\n </div>\n\n {userAccountItem && (\n <div role='none' className='grid app-no-drag'>\n <L0ItemRoot key={userAccountItem.id} item={userAccountItem} parent={parent} path={path}>\n <UserAccountAvatar\n userId={userAccountItem.properties.userId}\n hue={userAccountItem.properties.hue}\n emoji={userAccountItem.properties.emoji}\n status={userAccountItem.properties.status}\n size={10}\n />\n </L0ItemRoot>\n </div>\n )}\n\n <div\n role='none'\n className='hidden [body[data-platform=\"darwin\"]_&]:block absolute block-start-0 is-[calc(var(--l0-size)-1px)] bs-[calc(40px+0.25rem)]'\n style={{\n background:\n 'linear-gradient(to bottom, var(--dx-sidebarSurface) 0%, var(--dx-sidebarSurface) 70%, transparent 100%)',\n }}\n />\n </Tabs.Tablist>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Avatar, type AvatarStatus, type Size } from '@dxos/react-ui';\nimport { hexToFallback } from '@dxos/util';\n\nexport type UserAccountAvatarProps = {\n size?: Size;\n userId?: string;\n hue?: string;\n emoji?: string;\n status?: AvatarStatus;\n};\n\nexport const UserAccountAvatar = ({ size, userId, hue, emoji, status }: UserAccountAvatarProps) => {\n const fallbackValue = hexToFallback(userId ?? '0');\n\n return (\n <div className='grid place-items-center' data-joyride='welcome/account'>\n <Avatar.Root>\n <Avatar.Content\n variant='circle'\n size={size ?? 12}\n status={status ?? 'active'}\n hue={hue || fallbackValue.hue}\n fallback={emoji || fallbackValue.emoji}\n data-testid='treeView.userAccount'\n />\n </Avatar.Root>\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type Node } from '@dxos/app-graph';\nimport { Button, type ButtonProps, Icon, IconButton, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { Tree } from '@dxos/react-ui-list';\nimport { Tabs } from '@dxos/react-ui-tabs';\nimport { hoverableControlItem, hoverableOpenControlItem, mx } from '@dxos/react-ui-theme';\n\nimport { useLoadDescendents } from '../../hooks';\nimport { NAVTREE_PLUGIN } from '../../meta';\nimport { l0ItemType } from '../../util';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport { NavTreeItemColumns } from '../NavTreeItem';\n\nconst headingBackButtonLabel = 'inset-0 min-is-0 truncate flex items-center pis-2';\n\nconst TitleButton = ({ title, onClick }: { title: string } & Pick<ButtonProps, 'onClick'>) => {\n return (\n <Button\n variant='ghost'\n classNames='pli-1 flex-1 group text-start justify-start bs-[--rail-action] font-normal'\n onClick={onClick}\n >\n <Icon icon='ph--caret-left--bold' size={3} />\n <span className={mx(headingBackButtonLabel)}>{title}</span>\n </Button>\n );\n};\n\nexport type L1PanelProps = {\n open?: boolean;\n item: Node<any>;\n path: string[];\n currentItemId: string;\n onBack?: () => void;\n};\n\nconst L1Panel = ({ open, item, path, currentItemId, onBack }: L1PanelProps) => {\n const { isAlternateTree, setAlternateTree, ...navTreeContext } = useNavTreeContext();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n // TODO(wittjosiah): Support multiple alternate trees.\n const alternateTree = navTreeContext.useItems(item, { disposition: 'alternate-tree' })[0];\n const alternatePath = useMemo(() => [...path, item.id], [item.id, path]);\n const handleOpen = useCallback(() => setAlternateTree?.(alternatePath, true), [alternatePath, setAlternateTree]);\n const isAlternate = isAlternateTree?.(alternatePath, item) ?? false;\n const useAlternateItems = useCallback(\n (node?: Node, { disposition }: { disposition?: string } = {}) => {\n // TODO(wittjosiah): Sorting is expensive, limit to necessary items for now.\n return navTreeContext.useItems(node, { disposition, sort: node?.id === alternateTree.id });\n },\n [navTreeContext, alternateTree],\n );\n\n const handleBack = useCallback(() => {\n if (isAlternate) {\n setAlternateTree?.(alternatePath, false);\n } else {\n onBack?.();\n }\n }, [isAlternate, onBack, alternatePath, setAlternateTree]);\n\n const title = toLocalizedString(item.properties.label, t);\n const backCapable = item.id.startsWith('!') || isAlternate;\n\n return (\n <Tabs.Tabpanel\n key={item.id}\n value={item.id}\n classNames={[\n 'absolute inset-block-0 inline-end-0',\n 'is-[calc(100%-var(--l0-size))] lg:is-[--l1-size] grid-cols-1 grid-rows-[var(--rail-size)_1fr]',\n 'pbs-[env(safe-area-inset-top)]',\n item.id === currentItemId && 'grid',\n ]}\n tabIndex={-1}\n aria-label={title}\n {...(!open && { inert: 'true' })}\n >\n {item.id === currentItemId && (\n <>\n <h2 className='flex items-center border-be border-subduedSeparator app-drag pli-1'>\n {backCapable ? (\n <TitleButton title={title} onClick={handleBack} />\n ) : (\n <span className='flex-1 truncate min-is-0 pis-6'>{title}</span>\n )}\n {alternateTree && !isAlternate && (\n <IconButton\n variant='ghost'\n classNames={mx('shrink-0', hoverableControlItem, hoverableOpenControlItem, 'pli-2 pointer-fine:pli-1')}\n iconOnly\n size={5}\n density='coarse'\n icon={alternateTree.properties.icon ?? 'ph--placeholder--regular'}\n label={toLocalizedString(alternateTree.properties.label ?? alternateTree.id, t)}\n data-testid='treeView.alternateTreeButton'\n onClick={handleOpen}\n />\n )}\n <NavTreeItemColumns path={path} item={item} open density='coarse' />\n </h2>\n <div role='none' className='overflow-y-auto'>\n {isAlternate ? (\n <Tree\n {...navTreeContext}\n useItems={useAlternateItems}\n id={alternateTree.id}\n root={alternateTree}\n path={alternatePath}\n levelOffset={5}\n gridTemplateColumns='[tree-row-start] 1fr min-content min-content min-content [tree-row-end]'\n renderColumns={NavTreeItemColumns}\n />\n ) : (\n <Tree\n {...navTreeContext}\n id={item.id}\n root={item}\n path={path}\n levelOffset={5}\n draggable\n gridTemplateColumns='[tree-row-start] 1fr min-content min-content min-content [tree-row-end]'\n renderColumns={NavTreeItemColumns}\n />\n )}\n </div>\n </>\n )}\n </Tabs.Tabpanel>\n );\n};\n\nconst L1PanelCollection = ({ item, path, ...props }: L1PanelProps) => {\n const { useItems } = useNavTreeContext();\n useLoadDescendents(item);\n const collectionItems = useItems(item);\n const groupPath = useMemo(() => [...path, item.id], [item.id, path]);\n return (\n <>\n {collectionItems\n .filter((item) => l0ItemType(item) === 'tab')\n .map((item) => (\n <L1Panel key={item.id} item={item} path={groupPath} {...props} />\n ))}\n </>\n );\n};\n\nexport type L1PanelsProps = Pick<L1PanelProps, 'open' | 'currentItemId' | 'onBack'> & {\n topLevelItems: Node<any>[];\n path: string[];\n};\n\nexport const L1Panels = ({ topLevelItems, onBack, ...props }: L1PanelsProps) => {\n return (\n <>\n {topLevelItems.map((item) => {\n const type = l0ItemType(item);\n switch (type) {\n case 'collection':\n return <L1PanelCollection key={item.id} item={item} {...props} />;\n case 'tab':\n return <L1Panel key={item.id} item={item} {...props} onBack={onBack} />;\n default:\n return null;\n }\n })}\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Action, type Node } from '@dxos/app-graph';\nimport { useTranslation, toLocalizedString, IconButton, useDensityContext } from '@dxos/react-ui';\nimport { DropdownMenu, MenuProvider, type MenuItem } from '@dxos/react-ui-menu';\nimport { hoverableControlItem, hoverableOpenControlItem, mx } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../../meta';\nimport { type ActionProperties } from '../../types';\n\nexport type NavTreeItemActionMenuProps = ActionProperties & {\n parent: Node;\n caller?: string;\n monolithic?: boolean;\n menuActions?: Action[];\n};\n\nconst fallbackIcon = 'ph--placeholder--regular';\n\nconst fineActionButtonProps = {\n size: 4 as const,\n density: 'fine' as const,\n};\nconst coarseActionButtonProps = {\n size: 5 as const,\n density: 'coarse' as const,\n};\n\nexport const NavTreeItemActionDropdownMenu = ({\n parent,\n label,\n icon,\n testId,\n menuActions,\n caller,\n}: NavTreeItemActionMenuProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const density = useDensityContext();\n return (\n <MenuProvider>\n <DropdownMenu.Root group={parent} items={menuActions as MenuItem[]} caller={caller}>\n <DropdownMenu.Trigger asChild>\n <IconButton\n {...(density === 'coarse' ? coarseActionButtonProps : fineActionButtonProps)}\n classNames={mx('shrink-0 pli-2 pointer-fine:pli-1', hoverableControlItem, hoverableOpenControlItem)}\n variant='ghost'\n icon={icon ?? fallbackIcon}\n iconOnly\n label={toLocalizedString(label, t)}\n data-testid={testId}\n />\n </DropdownMenu.Trigger>\n </DropdownMenu.Root>\n </MenuProvider>\n );\n};\n\nexport const NavTreeItemMonolithicAction = ({\n parent,\n properties: { disabled, caller, testId, icon, variant = 'ghost', iconOnly = true } = { label: 'never' },\n data: invoke,\n baseLabel,\n}: Action & { parent: Node; onAction?: (action: Action) => void; baseLabel: string }) => {\n const density = useDensityContext();\n return (\n <IconButton\n {...(density === 'coarse' ? coarseActionButtonProps : fineActionButtonProps)}\n variant={variant}\n classNames={mx(\n 'shrink-0',\n hoverableControlItem,\n hoverableOpenControlItem,\n iconOnly ? 'pli-2 pointer-fine:pli-1' : 'p-2 pointer-fine:p-2 mie-1',\n )}\n icon={icon ?? fallbackIcon}\n iconOnly={iconOnly}\n label={baseLabel}\n disabled={disabled}\n onClick={(event) => {\n if (disabled) {\n return;\n }\n event.stopPropagation();\n void invoke?.(caller ? { parent, caller } : { parent });\n }}\n data-testid={testId}\n />\n );\n};\n\nexport const NavTreeItemAction = ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n const monolithicAction = menuActions?.length === 1 && menuActions[0];\n const baseLabel = toLocalizedString(monolithicAction ? monolithicAction.properties!.label : props.label, t);\n\n return monolithic && menuActions?.length === 1 ? (\n <NavTreeItemMonolithicAction baseLabel={baseLabel} parent={node} {...menuActions[0]} />\n ) : (\n <NavTreeItemActionDropdownMenu {...props} label={baseLabel} parent={node} menuActions={menuActions} />\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment, memo } from 'react';\n\nimport { isAction } from '@dxos/app-graph';\nimport { DensityProvider, Popover, toLocalizedString, Treegrid, useTranslation } from '@dxos/react-ui';\n\nimport { NavTreeItemAction } from './NavTreeItemAction';\nimport { useLoadDescendents } from '../../hooks';\nimport { NAVTREE_PLUGIN } from '../../meta';\nimport { NAV_TREE_ITEM } from '../NavTree';\nimport { useNavTreeContext } from '../NavTreeContext';\nimport type { NavTreeItemColumnsProps } from '../types';\n\nexport const NavTreeItemColumns = memo(({ path, item, open, density = 'fine' }: NavTreeItemColumnsProps) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const { getActions, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();\n\n const level = path.length - 2;\n\n const { actions: _actions, groupedActions } = getActions(item);\n const [primaryAction, ...secondaryActions] = _actions.toSorted((a, b) =>\n a.properties?.disposition === 'list-item-primary' ? -1 : 1,\n );\n\n const actions = (primaryAction?.properties?.disposition === 'list-item-primary' ? secondaryActions : _actions)\n .flatMap((action) => (isAction(action) ? [action] : []))\n .filter((a) => ['list-item', 'list-item-primary'].includes(a.properties?.disposition));\n\n const ActionRoot = popoverAnchorId === `dxos.org/ui/${NAV_TREE_ITEM}/${item.id}` ? Popover.Anchor : Fragment;\n\n useLoadDescendents(item);\n useLoadDescendents(primaryAction && !isAction(primaryAction) ? primaryAction : undefined);\n\n return (\n <DensityProvider density={density}>\n <div role='none' className='contents app-no-drag'>\n {primaryAction?.properties?.disposition === 'list-item-primary' && !primaryAction?.properties?.disabled ? (\n <NavTreeItemAction\n testId={primaryAction.properties?.testId}\n label={toLocalizedString(primaryAction.properties?.label, t)}\n icon={primaryAction.properties?.icon ?? 'ph--placeholder--regular'}\n parent={item}\n monolithic={isAction(primaryAction)}\n menuActions={isAction(primaryAction) ? [primaryAction] : groupedActions[primaryAction.id]}\n menuType={primaryAction.properties?.menuType}\n caller={NAV_TREE_ITEM}\n />\n ) : (\n <Treegrid.Cell />\n )}\n <ActionRoot>\n {actions.length > 0 ? (\n <NavTreeItemAction\n testId={`navtree.treeItem.actionsLevel${level}`}\n label={t('tree item actions label')}\n icon='ph--dots-three-vertical--regular'\n parent={item}\n menuActions={actions}\n menuType='dropdown'\n caller={NAV_TREE_ITEM}\n />\n ) : (\n <Treegrid.Cell />\n )}\n </ActionRoot>\n {ItemEnd && <ItemEnd node={item} open={open} />}\n </div>\n </DensityProvider>\n );\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const Keyboard = lazy(() => import('./keyboard'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const State = lazy(() => import('./state'));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qB;MACAmB;MACA7E;MACAsC;MACAC;MACAsB;MACAd;MACAD;MACA8C;MACA5C;MACA6F;MACA1D;MACAF;MACAc;MACAW;KACD;AAGH,WACE,gBAAAvG,OAAA,cAACiJ,eAAeC,UAAQ;MAACC,OAAOR;OAC9B,gBAAA3I,OAAA,cAACoJ,SAAAA;MAAQhJ,IAAIgB;MAASiI,MAAMnI,MAAMmI;MAAMtJ,MAAMmD,OAAOoG;;;;;AAG3D,CAAA;",
|
|
6
|
+
"names": ["React", "useMemo", "useState", "createIntent", "LayoutAction", "useAppGraph", "useIntentDispatcher", "isAction", "isActionGroup", "Keyboard", "keySymbols", "useActions", "Button", "Dialog", "Icon", "useTranslation", "toLocalizedString", "SearchList", "cardDialogContent", "cardDialogHeader", "cardDialogPaddedOverflow", "cardDialogSearchListRoot", "descriptionText", "mx", "getHostPlatform", "CommandsDialogContent", "selected", "initial", "t", "useTranslation", "NAVTREE_PLUGIN", "setSelected", "useState", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allActions", "useMemo", "current", "Keyboard", "singleton", "getCurrentContext", "actionMap", "Set", "actions", "traverse", "visitor", "node", "path", "isAction", "isActionGroup", "has", "id", "startsWith", "slice", "join", "add", "push", "sort", "a", "b", "toLocalizedString", "properties", "label", "toLowerCase", "localeCompare", "group", "find", "groupActions", "useActions", "Dialog", "Content", "classNames", "cardDialogContent", "Title", "cardDialogHeader", "ns", "SearchList", "Root", "cardDialogSearchListRoot", "Input", "placeholder", "cardDialogPaddedOverflow", "map", "action", "shortcut", "keyBinding", "getHostPlatform", "Item", "value", "key", "onSelect", "disabled", "createIntent", "LayoutAction", "UpdateDialog", "part", "options", "state", "setTimeout", "getConnections", "data", "parent", "caller", "KEY_BINDING", "testId", "Icon", "icon", "size", "span", "className", "mx", "descriptionText", "keySymbols", "div", "role", "Close", "asChild", "Button", "MagnifyingGlass", "React", "createIntent", "LayoutAction", "useIntentDispatcher", "Button", "useTranslation", "getSize", "CommandsTrigger", "dispatchPromise", "dispatch", "useIntentDispatcher", "t", "useTranslation", "NAVTREE_PLUGIN", "React", "Button", "classNames", "onClick", "createIntent", "LayoutAction", "UpdateDialog", "part", "subject", "COMMANDS_DIALOG", "options", "blockAlign", "span", "className", "MagnifyingGlass", "getSize", "isAction", "isActionLike", "isNonNullable", "getParent", "graph", "node", "path", "parentId", "length", "getConnections", "id", "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", "getActions", "reduce", "acc", "arg", "push", "isAction", "actionGroup", "groupedActions", "l0ItemType", "item", "isActionLike", "monitorForElements", "extractInstruction", "untracked", "React", "memo", "useCallback", "useEffect", "useMemo", "createIntent", "LayoutAction", "Surface", "useAppGraph", "useCapability", "useIntentDispatcher", "useLayout", "isAction", "isActionLike", "ROOT_ID", "PLANK_COMPANION_TYPE", "useConnections", "useMediaQuery", "useSidebars", "isTreeData", "mx", "arrayMove", "byPosition", "React", "useMemo", "Tabs", "useEffect", "createContext", "useContext", "raise", "NavTreeContext", "createContext", "useNavTreeContext", "useContext", "raise", "Error", "useEffect", "toLocalizedString", "useTranslation", "NavTreeDocumentTitle", "node", "t", "useTranslation", "NAVTREE_PLUGIN", "useEffect", "document", "title", "toLocalizedString", "properties", "label", "ns", "useLoadDescendents", "root", "loadDescendents", "useNavTreeContext", "useEffect", "frame", "requestAnimationFrame", "cancelAnimationFrame", "combine", "draggable", "dropTargetForElements", "preserveOffsetOnSource", "scrollJustEnoughIntoView", "attachClosestEdge", "extractClosestEdge", "React", "forwardRef", "useCallback", "useLayoutEffect", "useMemo", "useRef", "useState", "invariant", "Icon", "ListItem", "ScrollArea", "Tooltip", "toLocalizedString", "useMediaQuery", "useTranslation", "MenuProvider", "DropdownMenu", "Tabs", "mx", "arrayMove", "getFirstTwoRenderableChars", "React", "Avatar", "hexToFallback", "UserAccountAvatar", "size", "userId", "hue", "emoji", "status", "fallbackValue", "hexToFallback", "React", "div", "className", "data-joyride", "Avatar", "Root", "Content", "variant", "fallback", "data-testid", "useL0ItemClick", "item", "parent", "path", "type", "tab", "isCurrent", "onSelect", "onTabChange", "useNavTreeContext", "isLg", "useMediaQuery", "ssr", "useCallback", "event", "data", "invoke", "properties", "caller", "node", "current", "option", "altKey", "l0Breakpoints", "lg", "l0ItemRoot", "l0ItemContent", "L0ItemRoot", "forwardRef", "children", "forwardedRef", "getProps", "id", "testId", "l0ItemType", "itemPath", "useMemo", "t", "useTranslation", "NAVTREE_PLUGIN", "localizedString", "toLocalizedString", "label", "handleClick", "rootProps", "value", "tabIndex", "onClick", "Root", "Tabs", "TabPrimitive", "React", "Tooltip", "Trigger", "asChild", "delayDuration", "side", "content", "data-type", "className", "mx", "l0Breakpoint", "ref", "L0Avatar", "hue", "hueFgStyle", "style", "color", "avatarValue", "getFirstTwoRenderableChars", "join", "toUpperCase", "span", "role", "L0Item", "pinned", "onRearrange", "itemElement", "useRef", "closestEdge", "setEdge", "useState", "useLayoutEffect", "combine", "draggable", "element", "getInitialData", "onGenerateDragPreview", "nativeSetDragImage", "source", "location", "document", "body", "setAttribute", "querySelector", "scrollJustEnoughIntoView", "x", "y", "preserveOffsetOnSource", "input", "container", "offsetParent", "onDragStart", "removeAttribute", "closest", "onDrop", "dropTargetForElements", "getData", "attachClosestEdge", "allowedEdges", "onDragEnter", "self", "extractClosestEdge", "onDrag", "onDragLeave", "div", "data-frame", "background", "ItemAvatar", "ListItem", "DropIndicator", "edge", "icon", "Icon", "size", "disposition", "L0Collection", "navTreeContext", "useLoadDescendents", "collectionItems", "useItems", "groupPath", "handleRearrange", "target", "invariant", "onRearrangeChildren", "sourceIndex", "findIndex", "i", "targetIndex", "insertIndex", "nextOrder", "arrayMove", "aria-labelledby", "data-itemid", "data-testid", "map", "collectionItem", "key", "L0Menu", "menuActions", "topLevelItems", "pinnedItems", "userAccountItem", "Tablist", "classNames", "MenuProvider", "DropdownMenu", "group", "items", "ScrollArea", "Viewport", "Scrollbar", "orientation", "Thumb", "filter", "UserAccountAvatar", "userId", "emoji", "status", "React", "useCallback", "useMemo", "Button", "Icon", "IconButton", "toLocalizedString", "useTranslation", "Tree", "Tabs", "hoverableControlItem", "hoverableOpenControlItem", "mx", "React", "useTranslation", "toLocalizedString", "IconButton", "useDensityContext", "DropdownMenu", "MenuProvider", "hoverableControlItem", "hoverableOpenControlItem", "mx", "fallbackIcon", "fineActionButtonProps", "size", "density", "coarseActionButtonProps", "NavTreeItemActionDropdownMenu", "parent", "label", "icon", "testId", "menuActions", "caller", "t", "useTranslation", "NAVTREE_PLUGIN", "useDensityContext", "React", "MenuProvider", "DropdownMenu", "Root", "group", "items", "Trigger", "asChild", "IconButton", "classNames", "mx", "hoverableControlItem", "hoverableOpenControlItem", "variant", "iconOnly", "toLocalizedString", "data-testid", "NavTreeItemMonolithicAction", "properties", "disabled", "data", "invoke", "baseLabel", "onClick", "event", "stopPropagation", "NavTreeItemAction", "monolithic", "node", "props", "monolithicAction", "length", "React", "Fragment", "memo", "isAction", "DensityProvider", "Popover", "toLocalizedString", "Treegrid", "useTranslation", "NavTreeItemColumns", "memo", "path", "item", "open", "density", "t", "useTranslation", "NAVTREE_PLUGIN", "getActions", "renderItemEnd", "ItemEnd", "popoverAnchorId", "useNavTreeContext", "level", "length", "actions", "_actions", "groupedActions", "primaryAction", "secondaryActions", "toSorted", "a", "b", "properties", "disposition", "flatMap", "action", "isAction", "filter", "includes", "ActionRoot", "NAV_TREE_ITEM", "id", "Popover", "Anchor", "Fragment", "useLoadDescendents", "undefined", "React", "DensityProvider", "div", "role", "className", "disabled", "NavTreeItemAction", "testId", "label", "toLocalizedString", "icon", "parent", "monolithic", "menuActions", "menuType", "caller", "Treegrid", "Cell", "node", "headingBackButtonLabel", "TitleButton", "title", "onClick", "React", "Button", "variant", "classNames", "Icon", "icon", "size", "span", "className", "mx", "L1Panel", "open", "item", "path", "currentItemId", "onBack", "isAlternateTree", "setAlternateTree", "navTreeContext", "useNavTreeContext", "t", "useTranslation", "NAVTREE_PLUGIN", "alternateTree", "useItems", "disposition", "alternatePath", "useMemo", "id", "handleOpen", "useCallback", "isAlternate", "useAlternateItems", "node", "sort", "handleBack", "toLocalizedString", "properties", "label", "backCapable", "startsWith", "Tabs", "Tabpanel", "key", "value", "tabIndex", "aria-label", "inert", "h2", "IconButton", "hoverableControlItem", "hoverableOpenControlItem", "iconOnly", "density", "data-testid", "NavTreeItemColumns", "div", "role", "Tree", "root", "levelOffset", "gridTemplateColumns", "renderColumns", "draggable", "L1PanelCollection", "props", "useLoadDescendents", "collectionItems", "groupPath", "filter", "l0ItemType", "map", "L1Panels", "topLevelItems", "type", "NAV_TREE_ITEM", "NavTree", "id", "root", "props", "tab", "useItems", "onBack", "useNavTreeContext", "topLevelActions", "disposition", "sort", "topLevelCollections", "topLevelWorkspaces", "topLevelNavigation", "l0Items", "useMemo", "pinnedItems", "userAccountItem", "topLevelItems", "useLoadDescendents", "path", "React", "Tabs", "Root", "value", "orientation", "verticalVariant", "classNames", "L0Menu", "menuActions", "parent", "L1Panels", "currentItemId", "lazy", "AppGraphBuilder", "lazy", "IntentResolver", "Keyboard", "ReactSurface", "State", "NODE_TYPE", "renderItemEnd", "node", "open", "React", "Surface", "role", "data", "id", "subject", "limit", "getChildrenFilter", "untracked", "isActionLike", "type", "PLANK_COMPANION_TYPE", "filterItems", "disposition", "properties", "action", "isAction", "getItems", "graph", "getConnections", "ROOT_ID", "filter", "useItems", "options", "useAppGraph", "connections", "useConnections", "sort", "toSorted", "a", "b", "byPosition", "NavTreeContainer", "memo", "tab", "popoverAnchorId", "topbar", "isLg", "useMediaQuery", "ssr", "dispatchPromise", "dispatch", "useIntentDispatcher", "isOpen", "isCurrent", "isAlternateTree", "setItem", "useCapability", "NavTreeCapabilities", "State", "layout", "useLayout", "navigationSidebarState", "useSidebars", "NAVTREE_PLUGIN", "getActions", "useCallback", "naturalGetActions", "getProps", "path", "children", "getChildren", "parentOf", "length", "map", "undefined", "label", "icon", "disabled", "className", "mx", "modified", "headingClassName", "testId", "loadDescendents", "expand", "forEach", "child", "handleOpenChange", "item", "handleTabChange", "createIntent", "LayoutAction", "UpdateSidebar", "part", "state", "SwitchWorkspace", "active", "Open", "canDrop", "source", "target", "handleSelect", "option", "parent", "caller", "NAV_TREE_ITEM", "current", "key", "Close", "ScrollIntoView", "defaultAction", "find", "handleBack", "RevertWorkspace", "revert", "useEffect", "monitorForElements", "canMonitor", "isTreeData", "onDrop", "location", "dropTargets", "instruction", "extractInstruction", "sourceNode", "targetNode", "sourcePath", "targetPath", "operation", "slice", "join", "resolveMigrationOperation", "sourceParent", "getParent", "targetParent", "sourceItems", "targetItems", "sourceIndex", "findIndex", "targetIndex", "migrationIndex", "nextItems", "arrayMove", "onRearrangeChildren", "onCopy", "onTransferStart", "onTransferEnd", "setAlternateTree", "navTreeContextValue", "useMemo", "onTabChange", "onOpenChange", "onSelect", "onBack", "NavTreeContext", "Provider", "value", "NavTree", "root", "sidebarOpen"]
|
|
7
|
+
}
|