@dxos/plugin-navtree 0.8.4-main.3f58842 → 0.8.4-main.67995b8
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-SICQTLXC.mjs → chunk-WEMCSQI7.mjs} +140 -113
- package/dist/lib/browser/chunk-WEMCSQI7.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3 -2
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-WURHCBQQ.mjs → react-surface-JSJ5SQX5.mjs} +2 -2
- package/dist/types/src/components/NavTree/NavTree.d.ts +2 -2
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -6
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +12 -0
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -37
- package/src/components/NavTree/NavTree.tsx +3 -3
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +2 -3
- package/src/components/Sidebar/L1Panel.tsx +72 -92
- package/src/components/Sidebar/L1Tabs.tsx +57 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/translations.ts +1 -0
- package/dist/lib/browser/chunk-SICQTLXC.mjs.map +0 -7
- /package/dist/lib/browser/{react-surface-WURHCBQQ.mjs.map → react-surface-JSJ5SQX5.mjs.map} +0 -0
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
COMMANDS_DIALOG,
|
|
6
6
|
KEY_BINDING,
|
|
7
|
-
NAVTREE_PLUGIN
|
|
7
|
+
NAVTREE_PLUGIN,
|
|
8
|
+
meta
|
|
8
9
|
} from "./chunk-ERDGQTH5.mjs";
|
|
9
10
|
|
|
10
11
|
// src/components/CommandsDialog/CommandsDialog.tsx
|
|
@@ -227,23 +228,23 @@ var l0ItemType = (item) => {
|
|
|
227
228
|
};
|
|
228
229
|
|
|
229
230
|
// src/components/NavTreeContainer.tsx
|
|
230
|
-
import { useSignals as
|
|
231
|
+
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
231
232
|
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
232
233
|
import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
|
233
234
|
import { untracked } from "@preact/signals-core";
|
|
234
|
-
import
|
|
235
|
+
import React10, { memo as memo2, useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo6 } from "react";
|
|
235
236
|
import { createIntent as createIntent3, LayoutAction as LayoutAction3, Surface, useAppGraph as useAppGraph2, useCapability, useIntentDispatcher as useIntentDispatcher3, useLayout } from "@dxos/app-framework";
|
|
236
237
|
import { isAction as isAction4, isActionLike as isActionLike2, ROOT_ID } from "@dxos/app-graph";
|
|
237
238
|
import { PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
238
239
|
import { useConnections } from "@dxos/plugin-graph";
|
|
239
240
|
import { useMediaQuery as useMediaQuery2, useSidebars } from "@dxos/react-ui";
|
|
240
241
|
import { isTreeData } from "@dxos/react-ui-list";
|
|
241
|
-
import { mx as
|
|
242
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
242
243
|
import { arrayMove as arrayMove2, byPosition } from "@dxos/util";
|
|
243
244
|
|
|
244
245
|
// src/components/NavTree/NavTree.tsx
|
|
245
|
-
import { useSignals as
|
|
246
|
-
import
|
|
246
|
+
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
247
|
+
import React9, { useMemo as useMemo5 } from "react";
|
|
247
248
|
import { Tabs as Tabs3 } from "@dxos/react-ui-tabs";
|
|
248
249
|
|
|
249
250
|
// src/hooks.ts
|
|
@@ -719,10 +720,10 @@ var L0Menu = ({ menuActions, topLevelItems, pinnedItems, userAccountItem, parent
|
|
|
719
720
|
// src/components/Sidebar/L1Panel.tsx
|
|
720
721
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
721
722
|
import React7, { useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
722
|
-
import {
|
|
723
|
+
import { IconButton as IconButton2, toLocalizedString as toLocalizedString6, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
723
724
|
import { Tree } from "@dxos/react-ui-list";
|
|
724
725
|
import { Tabs as Tabs2 } from "@dxos/react-ui-tabs";
|
|
725
|
-
import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2
|
|
726
|
+
import { hoverableControlItem as hoverableControlItem2, hoverableOpenControlItem as hoverableOpenControlItem2 } from "@dxos/react-ui-theme";
|
|
726
727
|
|
|
727
728
|
// src/components/NavTreeItem/NavTreeItemAction.tsx
|
|
728
729
|
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
@@ -837,7 +838,7 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
837
838
|
const { getActions: getActions2, renderItemEnd: ItemEnd, popoverAnchorId } = useNavTreeContext();
|
|
838
839
|
const level = path.length - 2;
|
|
839
840
|
const { actions: _actions, groupedActions } = getActions2(item);
|
|
840
|
-
const [primaryAction, ...secondaryActions] = _actions.toSorted((a,
|
|
841
|
+
const [primaryAction, ...secondaryActions] = _actions.toSorted((a, _b) => a.properties?.disposition === "list-item-primary" ? -1 : 1);
|
|
841
842
|
const actions = (primaryAction?.properties?.disposition === "list-item-primary" ? secondaryActions : _actions).flatMap((action) => isAction3(action) ? [
|
|
842
843
|
action
|
|
843
844
|
] : []).filter((a) => [
|
|
@@ -881,30 +882,14 @@ var NavTreeItemColumns = /* @__PURE__ */ memo(({ path, item, open, density = "fi
|
|
|
881
882
|
});
|
|
882
883
|
|
|
883
884
|
// src/components/Sidebar/L1Panel.tsx
|
|
884
|
-
var
|
|
885
|
-
var TitleButton = ({ title, onClick }) => {
|
|
886
|
-
var _effect = _useSignals7();
|
|
887
|
-
try {
|
|
888
|
-
return /* @__PURE__ */ React7.createElement(Button3, {
|
|
889
|
-
variant: "ghost",
|
|
890
|
-
classNames: "pli-1 flex-1 group text-start justify-start bs-[--rail-action] font-normal",
|
|
891
|
-
onClick
|
|
892
|
-
}, /* @__PURE__ */ React7.createElement(Icon4, {
|
|
893
|
-
icon: "ph--caret-left--bold",
|
|
894
|
-
size: 3
|
|
895
|
-
}), /* @__PURE__ */ React7.createElement("span", {
|
|
896
|
-
className: mx3(headingBackButtonLabel)
|
|
897
|
-
}, title));
|
|
898
|
-
} finally {
|
|
899
|
-
_effect.f();
|
|
900
|
-
}
|
|
901
|
-
};
|
|
902
|
-
var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
885
|
+
var L1Panel = ({ open, path, item, currentItemId, onBack }) => {
|
|
903
886
|
var _effect = _useSignals7();
|
|
904
887
|
try {
|
|
905
|
-
const {
|
|
906
|
-
const {
|
|
907
|
-
const
|
|
888
|
+
const { t } = useTranslation7(meta.id);
|
|
889
|
+
const { isAlternateTree, ...navTreeContext } = useNavTreeContext();
|
|
890
|
+
const { useItems: useItems2 } = navTreeContext;
|
|
891
|
+
const title = toLocalizedString6(item.properties.label, t);
|
|
892
|
+
const alternateTree = useItems2(item, {
|
|
908
893
|
disposition: "alternate-tree"
|
|
909
894
|
})[0];
|
|
910
895
|
const alternatePath = useMemo3(() => [
|
|
@@ -914,34 +899,16 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
914
899
|
item.id,
|
|
915
900
|
path
|
|
916
901
|
]);
|
|
917
|
-
const handleOpen = useCallback2(() => setAlternateTree?.(alternatePath, true), [
|
|
918
|
-
alternatePath,
|
|
919
|
-
setAlternateTree
|
|
920
|
-
]);
|
|
921
902
|
const isAlternate = isAlternateTree?.(alternatePath, item) ?? false;
|
|
922
903
|
const useAlternateItems = useCallback2((node, { disposition } = {}) => {
|
|
923
|
-
return
|
|
904
|
+
return useItems2(node, {
|
|
924
905
|
disposition,
|
|
925
906
|
sort: node?.id === alternateTree.id
|
|
926
907
|
});
|
|
927
908
|
}, [
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
]);
|
|
931
|
-
const handleBack = useCallback2(() => {
|
|
932
|
-
if (isAlternate) {
|
|
933
|
-
setAlternateTree?.(alternatePath, false);
|
|
934
|
-
} else {
|
|
935
|
-
onBack?.();
|
|
936
|
-
}
|
|
937
|
-
}, [
|
|
938
|
-
isAlternate,
|
|
939
|
-
onBack,
|
|
940
|
-
alternatePath,
|
|
941
|
-
setAlternateTree
|
|
909
|
+
alternateTree,
|
|
910
|
+
useItems2
|
|
942
911
|
]);
|
|
943
|
-
const title = toLocalizedString6(item.properties.label, t);
|
|
944
|
-
const backCapable = item.id.startsWith("!") || isAlternate;
|
|
945
912
|
return /* @__PURE__ */ React7.createElement(Tabs2.Tabpanel, {
|
|
946
913
|
key: item.id,
|
|
947
914
|
value: item.id,
|
|
@@ -956,33 +923,12 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
956
923
|
...!open && {
|
|
957
924
|
inert: "true"
|
|
958
925
|
}
|
|
959
|
-
}, item.id === currentItemId && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
960
|
-
className: "flex items-center border-be border-subduedSeparator app-drag pli-1 density-coarse"
|
|
961
|
-
}, backCapable ? /* @__PURE__ */ React7.createElement(TitleButton, {
|
|
962
|
-
title,
|
|
963
|
-
onClick: handleBack
|
|
964
|
-
}) : /* @__PURE__ */ React7.createElement("span", {
|
|
965
|
-
className: "flex-1 truncate min-is-0 pis-6"
|
|
966
|
-
}, title), alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
967
|
-
variant: "ghost",
|
|
968
|
-
classNames: [
|
|
969
|
-
"shrink-0",
|
|
970
|
-
hoverableControlItem2,
|
|
971
|
-
hoverableOpenControlItem2,
|
|
972
|
-
"pli-2 pointer-fine:pli-1"
|
|
973
|
-
],
|
|
974
|
-
iconOnly: true,
|
|
975
|
-
size: 5,
|
|
976
|
-
icon: alternateTree.properties.icon ?? "ph--placeholder--regular",
|
|
977
|
-
label: toLocalizedString6(alternateTree.properties.label ?? alternateTree.id, t),
|
|
978
|
-
"data-testid": "treeView.alternateTreeButton",
|
|
979
|
-
onClick: handleOpen
|
|
980
|
-
}), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
|
|
926
|
+
}, item.id === currentItemId && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(L1PanelHeader, {
|
|
981
927
|
path,
|
|
982
928
|
item,
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
})
|
|
929
|
+
currentItemId,
|
|
930
|
+
onBack
|
|
931
|
+
}), /* @__PURE__ */ React7.createElement("div", {
|
|
986
932
|
role: "none",
|
|
987
933
|
className: "overflow-y-auto"
|
|
988
934
|
}, isAlternate ? /* @__PURE__ */ React7.createElement(Tree, {
|
|
@@ -1008,48 +954,106 @@ var L1Panel = ({ open, item, path, currentItemId, onBack }) => {
|
|
|
1008
954
|
_effect.f();
|
|
1009
955
|
}
|
|
1010
956
|
};
|
|
1011
|
-
var
|
|
957
|
+
var L1PanelHeader = ({ item, path, onBack }) => {
|
|
1012
958
|
var _effect = _useSignals7();
|
|
1013
959
|
try {
|
|
1014
|
-
const {
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1017
|
-
const
|
|
960
|
+
const { t } = useTranslation7(meta.id);
|
|
961
|
+
const { isAlternateTree, setAlternateTree, ...navTreeContext } = useNavTreeContext();
|
|
962
|
+
const title = toLocalizedString6(item.properties.label, t);
|
|
963
|
+
const alternateTree = navTreeContext.useItems(item, {
|
|
964
|
+
disposition: "alternate-tree"
|
|
965
|
+
})[0];
|
|
966
|
+
const alternatePath = useMemo3(() => [
|
|
1018
967
|
...path,
|
|
1019
968
|
item.id
|
|
1020
969
|
], [
|
|
1021
970
|
item.id,
|
|
1022
971
|
path
|
|
1023
972
|
]);
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
973
|
+
const isAlternate = isAlternateTree?.(alternatePath, item) ?? false;
|
|
974
|
+
const backCapable = item.id.startsWith("!") || isAlternate;
|
|
975
|
+
const handleOpen = useCallback2(() => {
|
|
976
|
+
setAlternateTree?.(alternatePath, true);
|
|
977
|
+
}, [
|
|
978
|
+
alternatePath,
|
|
979
|
+
setAlternateTree
|
|
980
|
+
]);
|
|
981
|
+
const handleBack = useCallback2(() => {
|
|
982
|
+
if (isAlternate) {
|
|
983
|
+
setAlternateTree?.(alternatePath, false);
|
|
984
|
+
} else {
|
|
985
|
+
onBack?.();
|
|
986
|
+
}
|
|
987
|
+
}, [
|
|
988
|
+
isAlternate,
|
|
989
|
+
alternatePath,
|
|
990
|
+
setAlternateTree,
|
|
991
|
+
onBack
|
|
992
|
+
]);
|
|
993
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
994
|
+
className: "flex is-full items-center border-be border-subduedSeparator app-drag density-coarse"
|
|
995
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
996
|
+
className: "is-6"
|
|
997
|
+
}), /* @__PURE__ */ React7.createElement("h2", {
|
|
998
|
+
className: "flex-1 truncate min-is-0"
|
|
999
|
+
}, title), /* @__PURE__ */ React7.createElement("div", null, backCapable && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
1000
|
+
variant: "ghost",
|
|
1001
|
+
icon: "ph--arrow-u-down-left--regular",
|
|
1002
|
+
iconOnly: true,
|
|
1003
|
+
size: 5,
|
|
1004
|
+
label: t("button back"),
|
|
1005
|
+
classNames: [
|
|
1006
|
+
hoverableControlItem2,
|
|
1007
|
+
hoverableOpenControlItem2,
|
|
1008
|
+
"pointer-fine:pli-1"
|
|
1009
|
+
],
|
|
1010
|
+
onClick: handleBack
|
|
1011
|
+
}) || alternateTree && !isAlternate && /* @__PURE__ */ React7.createElement(IconButton2, {
|
|
1012
|
+
"data-testid": "treeView.alternateTreeButton",
|
|
1013
|
+
variant: "ghost",
|
|
1014
|
+
icon: alternateTree.properties.icon ?? "ph--placeholder--regular",
|
|
1015
|
+
iconOnly: true,
|
|
1016
|
+
size: 5,
|
|
1017
|
+
label: toLocalizedString6(alternateTree.properties.label ?? alternateTree.id, t),
|
|
1018
|
+
classNames: [
|
|
1019
|
+
hoverableControlItem2,
|
|
1020
|
+
hoverableOpenControlItem2,
|
|
1021
|
+
"pointer-fine:pli-1"
|
|
1022
|
+
],
|
|
1023
|
+
onClick: handleOpen
|
|
1024
|
+
}) || /* @__PURE__ */ React7.createElement("div", null)), /* @__PURE__ */ React7.createElement(NavTreeItemColumns, {
|
|
1025
|
+
open: true,
|
|
1026
|
+
path,
|
|
1027
|
+
item,
|
|
1028
|
+
density: "coarse"
|
|
1029
|
+
}));
|
|
1030
1030
|
} finally {
|
|
1031
1031
|
_effect.f();
|
|
1032
1032
|
}
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1035
|
-
|
|
1034
|
+
|
|
1035
|
+
// src/components/Sidebar/L1Tabs.tsx
|
|
1036
|
+
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
1037
|
+
import React8, { useMemo as useMemo4 } from "react";
|
|
1038
|
+
var L1Tabs = ({ topLevelItems, onBack, ...props }) => {
|
|
1039
|
+
var _effect = _useSignals8();
|
|
1036
1040
|
try {
|
|
1037
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, topLevelItems.map((item) => {
|
|
1038
1042
|
const type = l0ItemType(item);
|
|
1039
1043
|
switch (type) {
|
|
1040
|
-
case "collection":
|
|
1041
|
-
return /* @__PURE__ */ React7.createElement(L1PanelCollection, {
|
|
1042
|
-
key: item.id,
|
|
1043
|
-
item,
|
|
1044
|
-
...props
|
|
1045
|
-
});
|
|
1046
1044
|
case "tab":
|
|
1047
|
-
return /* @__PURE__ */
|
|
1045
|
+
return /* @__PURE__ */ React8.createElement(L1Panel, {
|
|
1048
1046
|
key: item.id,
|
|
1049
1047
|
item,
|
|
1050
1048
|
...props,
|
|
1051
1049
|
onBack
|
|
1052
1050
|
});
|
|
1051
|
+
case "collection":
|
|
1052
|
+
return /* @__PURE__ */ React8.createElement(L1PanelCollection, {
|
|
1053
|
+
key: item.id,
|
|
1054
|
+
item,
|
|
1055
|
+
...props
|
|
1056
|
+
});
|
|
1053
1057
|
default:
|
|
1054
1058
|
return null;
|
|
1055
1059
|
}
|
|
@@ -1058,11 +1062,34 @@ var L1Panels = ({ topLevelItems, onBack, ...props }) => {
|
|
|
1058
1062
|
_effect.f();
|
|
1059
1063
|
}
|
|
1060
1064
|
};
|
|
1065
|
+
var L1PanelCollection = ({ item, path, ...props }) => {
|
|
1066
|
+
var _effect = _useSignals8();
|
|
1067
|
+
try {
|
|
1068
|
+
const { useItems: useItems2 } = useNavTreeContext();
|
|
1069
|
+
useLoadDescendents(item);
|
|
1070
|
+
const collectionItems = useItems2(item);
|
|
1071
|
+
const groupPath = useMemo4(() => [
|
|
1072
|
+
...path,
|
|
1073
|
+
item.id
|
|
1074
|
+
], [
|
|
1075
|
+
item.id,
|
|
1076
|
+
path
|
|
1077
|
+
]);
|
|
1078
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, collectionItems.filter((item2) => l0ItemType(item2) === "tab").map((item2) => /* @__PURE__ */ React8.createElement(L1Panel, {
|
|
1079
|
+
key: item2.id,
|
|
1080
|
+
item: item2,
|
|
1081
|
+
path: groupPath,
|
|
1082
|
+
...props
|
|
1083
|
+
})));
|
|
1084
|
+
} finally {
|
|
1085
|
+
_effect.f();
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1061
1088
|
|
|
1062
1089
|
// src/components/NavTree/NavTree.tsx
|
|
1063
1090
|
var NAV_TREE_ITEM = "NavTreeItem";
|
|
1064
1091
|
var NavTree = ({ id, root, ...props }) => {
|
|
1065
|
-
var _effect =
|
|
1092
|
+
var _effect = _useSignals9();
|
|
1066
1093
|
try {
|
|
1067
1094
|
const { tab, useItems: useItems2, onBack } = useNavTreeContext();
|
|
1068
1095
|
const topLevelActions = useItems2(root, {
|
|
@@ -1078,7 +1105,7 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1078
1105
|
const topLevelNavigation = useItems2(root, {
|
|
1079
1106
|
disposition: "navigation"
|
|
1080
1107
|
});
|
|
1081
|
-
const l0Items =
|
|
1108
|
+
const l0Items = useMemo5(() => [
|
|
1082
1109
|
// prettier-ignore
|
|
1083
1110
|
...topLevelCollections,
|
|
1084
1111
|
...topLevelWorkspaces,
|
|
@@ -1095,7 +1122,7 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1095
1122
|
const userAccountItem = useItems2(root, {
|
|
1096
1123
|
disposition: "user-account"
|
|
1097
1124
|
})[0];
|
|
1098
|
-
const topLevelItems =
|
|
1125
|
+
const topLevelItems = useMemo5(() => [
|
|
1099
1126
|
// prettier-ignore
|
|
1100
1127
|
...l0Items,
|
|
1101
1128
|
...pinnedItems,
|
|
@@ -1108,24 +1135,24 @@ var NavTree = ({ id, root, ...props }) => {
|
|
|
1108
1135
|
userAccountItem
|
|
1109
1136
|
]);
|
|
1110
1137
|
useLoadDescendents(root);
|
|
1111
|
-
const path =
|
|
1138
|
+
const path = useMemo5(() => [
|
|
1112
1139
|
id
|
|
1113
1140
|
], [
|
|
1114
1141
|
id
|
|
1115
1142
|
]);
|
|
1116
|
-
return /* @__PURE__ */
|
|
1143
|
+
return /* @__PURE__ */ React9.createElement(Tabs3.Root, {
|
|
1117
1144
|
value: tab,
|
|
1118
1145
|
orientation: "vertical",
|
|
1119
1146
|
verticalVariant: "stateless",
|
|
1120
1147
|
classNames: "relative"
|
|
1121
|
-
}, /* @__PURE__ */
|
|
1148
|
+
}, /* @__PURE__ */ React9.createElement(L0Menu, {
|
|
1122
1149
|
menuActions: topLevelActions,
|
|
1123
1150
|
topLevelItems: l0Items,
|
|
1124
1151
|
pinnedItems,
|
|
1125
1152
|
userAccountItem,
|
|
1126
1153
|
path,
|
|
1127
1154
|
parent: root
|
|
1128
|
-
}), /* @__PURE__ */
|
|
1155
|
+
}), /* @__PURE__ */ React9.createElement(L1Tabs, {
|
|
1129
1156
|
topLevelItems,
|
|
1130
1157
|
path,
|
|
1131
1158
|
currentItemId: tab,
|
|
@@ -1142,12 +1169,12 @@ import { lazy } from "@dxos/app-framework";
|
|
|
1142
1169
|
var AppGraphBuilder = lazy(() => import("./app-graph-builder-5J4LRWDX.mjs"));
|
|
1143
1170
|
var IntentResolver = lazy(() => import("./intent-resolver-3XYN2CBU.mjs"));
|
|
1144
1171
|
var Keyboard2 = lazy(() => import("./keyboard-QRS6WOQH.mjs"));
|
|
1145
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
1172
|
+
var ReactSurface = lazy(() => import("./react-surface-JSJ5SQX5.mjs"));
|
|
1146
1173
|
var State = lazy(() => import("./state-54DY3DOY.mjs"));
|
|
1147
1174
|
|
|
1148
1175
|
// src/components/NavTreeContainer.tsx
|
|
1149
1176
|
var NODE_TYPE = "dxos/app-graph/node";
|
|
1150
|
-
var renderItemEnd = ({ node, open }) => /* @__PURE__ */
|
|
1177
|
+
var renderItemEnd = ({ node, open }) => /* @__PURE__ */ React10.createElement(Surface, {
|
|
1151
1178
|
role: "navtree-item-end",
|
|
1152
1179
|
data: {
|
|
1153
1180
|
id: node.id,
|
|
@@ -1177,7 +1204,7 @@ var useItems = (node, options) => {
|
|
|
1177
1204
|
return options?.sort ? filtered.toSorted((a, b) => byPosition(a.properties, b.properties)) : filtered;
|
|
1178
1205
|
};
|
|
1179
1206
|
var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar }) => {
|
|
1180
|
-
var _effect =
|
|
1207
|
+
var _effect = _useSignals10();
|
|
1181
1208
|
try {
|
|
1182
1209
|
const [isLg] = useMediaQuery2("lg", {
|
|
1183
1210
|
ssr: false
|
|
@@ -1199,7 +1226,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1199
1226
|
parentOf,
|
|
1200
1227
|
icon: node.properties.icon,
|
|
1201
1228
|
disabled: node.properties.disabled,
|
|
1202
|
-
className:
|
|
1229
|
+
className: mx3(node.properties.modified && "italic", node.properties.className),
|
|
1203
1230
|
headingClassName: node.properties.headingClassName,
|
|
1204
1231
|
testId: node.properties.testId
|
|
1205
1232
|
};
|
|
@@ -1372,7 +1399,7 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1372
1399
|
}, [
|
|
1373
1400
|
setItem
|
|
1374
1401
|
]);
|
|
1375
|
-
const navTreeContextValue =
|
|
1402
|
+
const navTreeContextValue = useMemo6(() => ({
|
|
1376
1403
|
useItems,
|
|
1377
1404
|
tab,
|
|
1378
1405
|
getActions: getActions2,
|
|
@@ -1408,9 +1435,9 @@ var NavTreeContainer = /* @__PURE__ */ memo2(({ tab, popoverAnchorId, topbar })
|
|
|
1408
1435
|
handleSelect,
|
|
1409
1436
|
handleBack
|
|
1410
1437
|
]);
|
|
1411
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ React10.createElement(NavTreeContext.Provider, {
|
|
1412
1439
|
value: navTreeContextValue
|
|
1413
|
-
}, /* @__PURE__ */
|
|
1440
|
+
}, /* @__PURE__ */ React10.createElement(NavTree, {
|
|
1414
1441
|
id: ROOT_ID,
|
|
1415
1442
|
root: graph.root,
|
|
1416
1443
|
open: layout.sidebarOpen
|
|
@@ -1439,4 +1466,4 @@ export {
|
|
|
1439
1466
|
ReactSurface,
|
|
1440
1467
|
State
|
|
1441
1468
|
};
|
|
1442
|
-
//# sourceMappingURL=chunk-
|
|
1469
|
+
//# sourceMappingURL=chunk-WEMCSQI7.mjs.map
|