@dxos/plugin-navtree 0.6.12 → 0.6.13-main.548ca8d
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-U7MTKDFQ.mjs → chunk-PSVCPL4T.mjs} +1 -1
- package/dist/lib/browser/chunk-PSVCPL4T.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -36
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/components/CommandsDialog.d.ts.map +1 -1
- package/dist/types/src/components/NavBarStart.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContainer.d.ts +1 -1
- package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/stories/Graph.stories.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/NavTreePlugin.tsx +2 -4
- package/src/components/CommandsDialog.tsx +2 -4
- package/src/components/NavBarStart.tsx +2 -4
- package/src/components/NavTreeContainer.tsx +38 -48
- package/src/components/NavTreeFooter.tsx +1 -1
- package/src/experimental/Tree.tsx +2 -2
- package/src/meta.ts +3 -1
- package/src/stories/Graph.stories.tsx +2 -2
- package/dist/lib/browser/chunk-U7MTKDFQ.mjs.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const NAVTREE_PLUGIN = 'dxos.org/plugin/navtree';\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n\nexport default {\n id: NAVTREE_PLUGIN,\n} satisfies PluginMeta;\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,iBAAiB;AAGvB,IAAMC,cAAc;AAE3B,IAAA,eAAe;EACbC,IAAIF;AACN;",
|
|
6
|
+
"names": ["NAVTREE_PLUGIN", "KEY_BINDING", "id"]
|
|
7
|
+
}
|
|
@@ -2,12 +2,11 @@ import {
|
|
|
2
2
|
KEY_BINDING,
|
|
3
3
|
NAVTREE_PLUGIN,
|
|
4
4
|
meta_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PSVCPL4T.mjs";
|
|
6
6
|
|
|
7
7
|
// packages/plugins/plugin-navtree/src/NavTreePlugin.tsx
|
|
8
|
-
import { MagnifyingGlass as MagnifyingGlass2 } from "@phosphor-icons/react";
|
|
9
8
|
import React8 from "react";
|
|
10
|
-
import { resolvePlugin, parseIntentPlugin, LayoutAction as
|
|
9
|
+
import { resolvePlugin, parseIntentPlugin, LayoutAction as LayoutAction3, parseGraphPlugin, NavigationAction as NavigationAction2 } from "@dxos/app-framework";
|
|
11
10
|
import { createExtension, isAction as isAction4, isGraphNode } from "@dxos/app-graph";
|
|
12
11
|
import { Keyboard as Keyboard2 } from "@dxos/keyboard";
|
|
13
12
|
import { LocalStorageStore } from "@dxos/local-storage";
|
|
@@ -15,13 +14,12 @@ import { Path as Path3 } from "@dxos/react-ui-mosaic";
|
|
|
15
14
|
import { getHostPlatform as getHostPlatform2 } from "@dxos/util";
|
|
16
15
|
|
|
17
16
|
// packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx
|
|
18
|
-
import { DotOutline } from "@phosphor-icons/react";
|
|
19
17
|
import React, { useMemo, useState } from "react";
|
|
20
18
|
import { useIntentDispatcher, LayoutAction } from "@dxos/app-framework";
|
|
21
19
|
import { isActionGroup, isAction } from "@dxos/app-graph";
|
|
22
20
|
import { Keyboard, keySymbols } from "@dxos/keyboard";
|
|
23
21
|
import { useGraph } from "@dxos/plugin-graph";
|
|
24
|
-
import { Button, Dialog, useTranslation, toLocalizedString } from "@dxos/react-ui";
|
|
22
|
+
import { Button, Dialog, Icon, useTranslation, toLocalizedString } from "@dxos/react-ui";
|
|
25
23
|
import { SearchList } from "@dxos/react-ui-searchlist";
|
|
26
24
|
import { descriptionText, mx } from "@dxos/react-ui-theme";
|
|
27
25
|
import { getHostPlatform } from "@dxos/util";
|
|
@@ -68,7 +66,6 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
68
66
|
}, actions?.map((action) => {
|
|
69
67
|
const label = toLocalizedString(action.properties.label, t);
|
|
70
68
|
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[getHostPlatform()];
|
|
71
|
-
const Icon = action.properties.icon ?? DotOutline;
|
|
72
69
|
return /* @__PURE__ */ React.createElement(SearchList.Item, {
|
|
73
70
|
value: label,
|
|
74
71
|
key: action.id,
|
|
@@ -103,8 +100,8 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
103
100
|
"data-testid": action.properties.testId
|
|
104
101
|
}
|
|
105
102
|
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
icon: action.properties.icon,
|
|
104
|
+
size: 4
|
|
108
105
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
109
106
|
className: "grow truncate"
|
|
110
107
|
}, label), shortcut && /* @__PURE__ */ React.createElement("span", {
|
|
@@ -121,7 +118,6 @@ var CommandsDialogContent = ({ selected: initial }) => {
|
|
|
121
118
|
};
|
|
122
119
|
|
|
123
120
|
// packages/plugins/plugin-navtree/src/components/NavBarStart.tsx
|
|
124
|
-
import { DotsThreeVertical } from "@phosphor-icons/react";
|
|
125
121
|
import React2, { Fragment } from "react";
|
|
126
122
|
import { getGraph } from "@dxos/app-graph";
|
|
127
123
|
import { Popover, toLocalizedString as toLocalizedString2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
@@ -130,16 +126,17 @@ var TREE_ITEM_MAIN_HEADING = "TreeItemMainHeading";
|
|
|
130
126
|
var NavBarStart = ({ activeNode, popoverAnchorId }) => {
|
|
131
127
|
const { t } = useTranslation2(NAVTREE_PLUGIN);
|
|
132
128
|
const ActionRoot = popoverAnchorId === `dxos.org/ui/${TREE_ITEM_MAIN_HEADING}/${activeNode.id}` || popoverAnchorId === `dxos.org/ui/${KEY_BINDING}/${activeNode.id}` ? Popover.Anchor : Fragment;
|
|
133
|
-
const Icon = activeNode.properties?.icon ?? DotsThreeVertical;
|
|
134
129
|
const graph = getGraph(activeNode);
|
|
135
130
|
const actions = graph.actions(activeNode);
|
|
136
131
|
const label = toLocalizedString2(activeNode.properties?.label, t);
|
|
137
132
|
const menuTriggerLabel = t("node actions menu invoker label");
|
|
138
133
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(ActionRoot, null, /* @__PURE__ */ React2.createElement(PlankHeading.ActionsMenu, {
|
|
139
|
-
|
|
134
|
+
icon: activeNode.properties?.icon ?? "ph--dots-three-vertical--regular",
|
|
140
135
|
attendableId: activeNode.id,
|
|
141
136
|
triggerLabel: menuTriggerLabel,
|
|
142
|
-
actions
|
|
137
|
+
actions: [
|
|
138
|
+
actions
|
|
139
|
+
],
|
|
143
140
|
onAction: (action) => typeof action.data === "function" && action.data({
|
|
144
141
|
node: action,
|
|
145
142
|
caller: TREE_ITEM_MAIN_HEADING
|
|
@@ -151,10 +148,10 @@ var NavBarStart = ({ activeNode, popoverAnchorId }) => {
|
|
|
151
148
|
|
|
152
149
|
// packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx
|
|
153
150
|
import React4, { useCallback, useMemo as useMemo2 } from "react";
|
|
154
|
-
import { NavigationAction,
|
|
151
|
+
import { NavigationAction, Surface, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
155
152
|
import { getGraph as getGraph2, isAction as isAction3, isActionLike } from "@dxos/app-graph";
|
|
156
153
|
import { ElevationProvider, useMediaQuery, useSidebars as useSidebars2 } from "@dxos/react-ui";
|
|
157
|
-
import { Path as Path2 } from "@dxos/react-ui-mosaic";
|
|
154
|
+
import { Mosaic, Path as Path2 } from "@dxos/react-ui-mosaic";
|
|
158
155
|
import { NavTree, getLevel } from "@dxos/react-ui-navtree";
|
|
159
156
|
import { arrayMove } from "@dxos/util";
|
|
160
157
|
|
|
@@ -170,7 +167,7 @@ import { getSize, mx as mx2 } from "@dxos/react-ui-theme";
|
|
|
170
167
|
var buttonStyles = "pli-1.5 text-xs font-normal";
|
|
171
168
|
var repo = "https://github.com/dxos/dxos";
|
|
172
169
|
var NavTreeFooter = (props) => {
|
|
173
|
-
const layoutPart = useDefaultValue(props.layoutPart, "sidebar");
|
|
170
|
+
const layoutPart = useDefaultValue(props.layoutPart, () => "sidebar");
|
|
174
171
|
const config = useConfig();
|
|
175
172
|
const { t } = useTranslation3(NAVTREE_PLUGIN);
|
|
176
173
|
const { navigationSidebarOpen } = useSidebars(NAVTREE_PLUGIN);
|
|
@@ -451,26 +448,13 @@ var NavTreeContainer = ({ root, activeIds, openItemIds, onOpenItemIdsChange, att
|
|
|
451
448
|
await dispatch({
|
|
452
449
|
action: NavigationAction.OPEN,
|
|
453
450
|
data: {
|
|
454
|
-
activeParts:
|
|
455
|
-
main: [
|
|
456
|
-
node.id
|
|
457
|
-
],
|
|
458
|
-
complementary: [
|
|
459
|
-
`${node.id}${SLUG_PATH_SEPARATOR}comments${SLUG_COLLECTION_INDICATOR}`
|
|
460
|
-
]
|
|
461
|
-
} : {
|
|
451
|
+
activeParts: {
|
|
462
452
|
main: [
|
|
463
453
|
node.id
|
|
464
454
|
]
|
|
465
455
|
}
|
|
466
456
|
}
|
|
467
457
|
});
|
|
468
|
-
await dispatch({
|
|
469
|
-
action: LayoutAction2.SCROLL_INTO_VIEW,
|
|
470
|
-
data: {
|
|
471
|
-
id: node.id
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
458
|
const defaultAction = actions?.find((action) => action.properties?.disposition === "default");
|
|
475
459
|
if (isAction3(defaultAction)) {
|
|
476
460
|
void defaultAction.data();
|
|
@@ -680,7 +664,7 @@ var NavTreeContainer = ({ root, activeIds, openItemIds, onOpenItemIdsChange, att
|
|
|
680
664
|
onOpenItemIdsChange,
|
|
681
665
|
openItemIds
|
|
682
666
|
]);
|
|
683
|
-
return /* @__PURE__ */ React4.createElement(ElevationProvider, {
|
|
667
|
+
return /* @__PURE__ */ React4.createElement(Mosaic.Root, null, /* @__PURE__ */ React4.createElement(Mosaic.DragOverlay, null), /* @__PURE__ */ React4.createElement(ElevationProvider, {
|
|
684
668
|
elevation: "chrome"
|
|
685
669
|
}, /* @__PURE__ */ React4.createElement("div", {
|
|
686
670
|
role: "none",
|
|
@@ -707,7 +691,7 @@ var NavTreeContainer = ({ root, activeIds, openItemIds, onOpenItemIdsChange, att
|
|
|
707
691
|
renderPresence,
|
|
708
692
|
resolveItemLevel,
|
|
709
693
|
loadDescendents
|
|
710
|
-
})), /* @__PURE__ */ React4.createElement(NavTreeFooter, null)));
|
|
694
|
+
})), /* @__PURE__ */ React4.createElement(NavTreeFooter, null))));
|
|
711
695
|
};
|
|
712
696
|
|
|
713
697
|
// packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx
|
|
@@ -781,7 +765,7 @@ var NotchStart = () => {
|
|
|
781
765
|
// packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx
|
|
782
766
|
import { MagnifyingGlass } from "@phosphor-icons/react";
|
|
783
767
|
import React7 from "react";
|
|
784
|
-
import { LayoutAction as
|
|
768
|
+
import { LayoutAction as LayoutAction2, useIntent } from "@dxos/app-framework";
|
|
785
769
|
import { Button as Button3, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
786
770
|
import { getSize as getSize2 } from "@dxos/react-ui-theme";
|
|
787
771
|
var CommandsTrigger = () => {
|
|
@@ -790,7 +774,7 @@ var CommandsTrigger = () => {
|
|
|
790
774
|
return /* @__PURE__ */ React7.createElement(Button3, {
|
|
791
775
|
classNames: "pis-3 pie-2 gap-2 mli-1 mbs-1 min-bs-0 bs-[--rail-action] justify-start",
|
|
792
776
|
onClick: () => dispatch({
|
|
793
|
-
action:
|
|
777
|
+
action: LayoutAction2.SET_LAYOUT,
|
|
794
778
|
data: {
|
|
795
779
|
element: "dialog",
|
|
796
780
|
component: `${NAVTREE_PLUGIN}/Commands`,
|
|
@@ -1004,7 +988,7 @@ var NavTreePlugin = () => {
|
|
|
1004
988
|
id: "dxos.org/plugin/navtree/open-commands",
|
|
1005
989
|
data: async () => {
|
|
1006
990
|
await intentPlugin?.provides.intent.dispatch({
|
|
1007
|
-
action:
|
|
991
|
+
action: LayoutAction3.SET_LAYOUT,
|
|
1008
992
|
data: {
|
|
1009
993
|
element: "dialog",
|
|
1010
994
|
component: `${NAVTREE_PLUGIN}/Commands`,
|
|
@@ -1019,8 +1003,7 @@ var NavTreePlugin = () => {
|
|
|
1019
1003
|
ns: NAVTREE_PLUGIN
|
|
1020
1004
|
}
|
|
1021
1005
|
],
|
|
1022
|
-
icon:
|
|
1023
|
-
iconSymbol: "ph--magnifying-glass--regular",
|
|
1006
|
+
icon: "ph--magnifying-glass--regular",
|
|
1024
1007
|
keyBinding: {
|
|
1025
1008
|
macos: "meta+k",
|
|
1026
1009
|
windows: "ctrl+k"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/NavTreePlugin.tsx", "../../../src/components/CommandsDialog.tsx", "../../../src/components/NavBarStart.tsx", "../../../src/components/NavTreeContainer.tsx", "../../../src/components/NavTreeFooter.tsx", "../../../src/util.ts", "../../../src/components/NavTreeDocumentTitle.tsx", "../../../src/components/NotchStart.tsx", "../../../src/components/HaloButton.tsx", "../../../src/components/CommandsTrigger.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { MagnifyingGlass, type IconProps } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport {\n type GraphBuilderProvides,\n resolvePlugin,\n type MetadataRecordsProvides,\n type PluginDefinition,\n type SurfaceProvides,\n type TranslationsProvides,\n type Plugin,\n type IntentResolverProvides,\n parseIntentPlugin,\n LayoutAction,\n type GraphProvides,\n parseGraphPlugin,\n NavigationAction,\n} from '@dxos/app-framework';\nimport { createExtension, type Graph, isAction, isGraphNode, type Node } from '@dxos/app-graph';\nimport { Keyboard } from '@dxos/keyboard';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { type OpenItemIds } from '@dxos/react-ui-navtree';\nimport { getHostPlatform } from '@dxos/util';\n\nimport {\n CommandsDialogContent,\n NODE_TYPE,\n NavBarStart,\n NavTreeContainer,\n NavTreeDocumentTitle,\n NotchStart,\n} from './components';\nimport { CommandsTrigger } from './components/CommandsTrigger';\nimport meta, { KEY_BINDING, NAVTREE_PLUGIN } from './meta';\nimport translations from './translations';\nimport { expandOpenGraphNodes, getActions, getChildren, type NavTreeItem, type NavTreeItemGraphNode } from './util';\n\nexport type NavTreePluginProvides = SurfaceProvides &\n MetadataRecordsProvides &\n GraphBuilderProvides &\n TranslationsProvides &\n IntentResolverProvides;\n\ntype NavTreeState = { root?: NavTreeItemGraphNode; openItemIds: OpenItemIds };\n\nexport const NavTreePlugin = (): PluginDefinition<NavTreePluginProvides> => {\n const state = new LocalStorageStore<NavTreeState>('dxos.org/settings/navtree', {\n // TODO(thure): Do this dynamically.\n openItemIds: { root: true, 'dxos.org/plugin/space-spaces': true, 'dxos.org/plugin/files': true },\n });\n\n let graphPlugin: Plugin<GraphProvides> | undefined;\n let graph: Graph | undefined;\n\n const handleOpenItemIdsChange = (nextOpenItemIds: OpenItemIds) => {\n // TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.\n state.values.openItemIds = nextOpenItemIds;\n if (graph) {\n void expandOpenGraphNodes(graph, nextOpenItemIds);\n }\n };\n\n return {\n meta,\n ready: async (plugins) => {\n graphPlugin = resolvePlugin(plugins, parseGraphPlugin);\n graph = graphPlugin?.provides.graph;\n if (!graph) {\n return;\n }\n\n state.values.root = graph.root as NavTreeItemGraphNode;\n getChildren(graph, state.values.root);\n getActions(graph, state.values.root);\n\n state.prop({ key: 'openItemIds', storageKey: 'openItemIds', type: LocalStorageStore.json<OpenItemIds>() });\n\n void expandOpenGraphNodes(graph, state.values.openItemIds);\n\n // TODO(wittjosiah): Factor out.\n // TODO(wittjosiah): Handle removal of actions.\n graph.subscribeTraverse({\n visitor: (node, path) => {\n let shortcut: string | undefined;\n if (typeof node.properties.keyBinding === 'object') {\n const availablePlatforms = Object.keys(node.properties.keyBinding);\n const platform = getHostPlatform();\n shortcut = availablePlatforms.includes(platform)\n ? node.properties.keyBinding[platform]\n : platform === 'ios'\n ? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.\n : platform === 'linux' || platform === 'unknown'\n ? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.\n : undefined;\n } else {\n shortcut = node.properties.keyBinding;\n }\n\n if (shortcut && isAction(node)) {\n Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({\n shortcut,\n handler: () => {\n void node.data({ node, caller: KEY_BINDING });\n },\n data: node.properties.label,\n });\n }\n },\n });\n\n // TODO(burdon): Create context and plugin.\n Keyboard.singleton.initialize();\n Keyboard.singleton.setCurrentContext(graphPlugin?.provides.graph.root.id);\n },\n unload: async () => {\n Keyboard.singleton.destroy();\n },\n provides: {\n metadata: {\n records: {\n [NODE_TYPE]: {\n parse: (item: NavTreeItem, type: string) => {\n switch (type) {\n case 'node':\n return item.node;\n case 'object':\n return item.node.data;\n case 'view-object':\n return { id: `${item.id}-view`, object: item.node.data };\n }\n },\n },\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${NAVTREE_PLUGIN}/Commands`: {\n const selected = typeof data.subject === 'string' ? data.subject : undefined;\n return <CommandsDialogContent selected={selected} />;\n }\n }\n\n switch (role) {\n case 'navigation':\n if (state.values.root && state.values.openItemIds) {\n return (\n <NavTreeContainer\n root={state.values.root}\n activeIds={data.activeIds as Set<string>}\n openItemIds={state.values.openItemIds}\n onOpenItemIdsChange={handleOpenItemIdsChange}\n attended={data.attended as Set<string>}\n popoverAnchorId={data.popoverAnchorId as string}\n />\n );\n }\n break;\n\n case 'document-title': {\n return <NavTreeDocumentTitle node={isGraphNode(data.activeNode) ? data.activeNode : undefined} />;\n }\n\n case 'navbar-start': {\n if (state.values.root && data.activeNode) {\n return {\n node: (\n <NavBarStart\n activeNode={data.activeNode as Node}\n popoverAnchorId={data.popoverAnchorId as string | undefined}\n />\n ),\n disposition: 'hoist',\n };\n }\n break;\n }\n\n case 'notch-start':\n return <NotchStart />;\n\n case 'search-input':\n return {\n node: <CommandsTrigger />,\n disposition: 'fallback',\n };\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case NavigationAction.EXPOSE: {\n if (graph && intent.data?.id) {\n const path = graph.getPath({ target: intent.data.id });\n if (Array.isArray(path)) {\n const additionalOpenItems = [...Array(path.length - 1)].reduce((acc: OpenItemIds, _, index) => {\n const itemId = Path.create(...path.slice(1, index + 1));\n if (itemId.length > 0) {\n acc[itemId] = true;\n }\n return acc;\n }, {});\n state.values.openItemIds = {\n ...additionalOpenItems,\n ...state.values.openItemIds,\n };\n }\n }\n break;\n }\n }\n },\n },\n graph: {\n builder: (plugins) => {\n // TODO(burdon): Move to separate plugin (for keys and command k). Move bindings from LayoutPlugin.\n const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n\n return [\n createExtension({\n id: NAVTREE_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: 'dxos.org/plugin/navtree/open-commands',\n data: async () => {\n await intentPlugin?.provides.intent.dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: `${NAVTREE_PLUGIN}/Commands`,\n dialogBlockAlign: 'start',\n },\n });\n },\n properties: {\n label: ['open commands label', { ns: NAVTREE_PLUGIN }],\n icon: (props: IconProps) => <MagnifyingGlass {...props} />,\n iconSymbol: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'meta+k',\n windows: 'ctrl+k',\n },\n },\n },\n ],\n }),\n ];\n },\n },\n translations,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { DotOutline } from '@phosphor-icons/react';\nimport React, { useMemo, useState } from 'react';\n\nimport { useIntentDispatcher, LayoutAction } from '@dxos/app-framework';\nimport { type ActionLike, isActionGroup, isAction } from '@dxos/app-graph';\nimport { Keyboard, keySymbols } from '@dxos/keyboard';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { Button, Dialog, useTranslation, toLocalizedString } from '@dxos/react-ui';\nimport { SearchList } from '@dxos/react-ui-searchlist';\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 dispatch = useIntentDispatcher();\n const { graph } = useGraph();\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 // console.log(JSON.stringify(actions, undefined, 2));\n return actions;\n }, [graph]);\n\n const group = allActions.find(({ id }) => id === selected);\n const actions = isActionGroup(group) ? graph.actions(group) : allActions;\n\n return (\n <Dialog.Content classNames={['md:max-is-[30rem] overflow-hidden mbs-12']}>\n <Dialog.Title>{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='flex flex-col grow overflow-hidden my-2'>\n <SearchList.Input placeholder={t('command list input placeholder')} classNames='px-1 my-2' />\n <SearchList.Content classNames='max-bs-[24rem] overflow-auto'>\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 const Icon = action.properties.icon ?? DotOutline;\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({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n setTimeout(() => {\n const node = graph.nodes(group ?? action, { relation: 'inbound' })[0];\n void (node && isAction(action) && action.data({ 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 size={4} className={mx(!action.properties.icon && 'invisible')} />\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 <Dialog.Close asChild>\n <Button variant='primary' classNames='mbs-2'>\n {t('close label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { DotsThreeVertical } from '@phosphor-icons/react';\nimport React, { Fragment } from 'react';\n\nimport { getGraph, type Node } from '@dxos/app-graph';\nimport { Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { PlankHeading } from '@dxos/react-ui-deck';\n\nimport { KEY_BINDING, NAVTREE_PLUGIN } from '../meta';\n\nconst TREE_ITEM_MAIN_HEADING = 'TreeItemMainHeading';\n\nexport const NavBarStart = ({ activeNode, popoverAnchorId }: { activeNode: Node; popoverAnchorId?: string }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n const ActionRoot =\n popoverAnchorId === `dxos.org/ui/${TREE_ITEM_MAIN_HEADING}/${activeNode.id}` ||\n popoverAnchorId === `dxos.org/ui/${KEY_BINDING}/${activeNode.id}`\n ? Popover.Anchor\n : Fragment;\n\n const Icon = activeNode.properties?.icon ?? DotsThreeVertical;\n const graph = getGraph(activeNode);\n const actions = graph.actions(activeNode);\n const label = toLocalizedString(activeNode.properties?.label, t);\n\n const menuTriggerLabel = t('node actions menu invoker label');\n\n return (\n <>\n <ActionRoot>\n <PlankHeading.ActionsMenu\n Icon={Icon}\n attendableId={activeNode.id}\n triggerLabel={menuTriggerLabel}\n actions={actions}\n onAction={(action) =>\n typeof action.data === 'function' && action.data({ node: action as Node, caller: TREE_ITEM_MAIN_HEADING })\n }\n />\n </ActionRoot>\n <PlankHeading.Label attendableId={activeNode.id}>{label}</PlankHeading.Label>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode, useCallback, useMemo } from 'react';\n\nimport {\n NavigationAction,\n LayoutAction,\n Surface,\n SLUG_PATH_SEPARATOR,\n SLUG_COLLECTION_INDICATOR,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { getGraph, isAction, isActionLike } from '@dxos/app-graph';\nimport { ElevationProvider, useMediaQuery, useSidebars } from '@dxos/react-ui';\nimport { type MosaicDropEvent, type MosaicMoveEvent, Path } from '@dxos/react-ui-mosaic';\nimport {\n NavTree,\n type NavTreeItemNode,\n type NavTreeNode,\n getLevel,\n type NavTreeActionsNode,\n type NavTreeProps,\n type NavTreeItemMoveDetails,\n} from '@dxos/react-ui-navtree';\nimport { arrayMove } from '@dxos/util';\n\nimport { NavTreeFooter } from './NavTreeFooter';\nimport { NAVTREE_PLUGIN } from '../meta';\nimport {\n expandActions,\n expandChildren,\n getChildren,\n getParent,\n type NavTreeItem,\n type NavTreeItemGraphNode,\n resolveMigrationOperation,\n treeItemsFromRootNode,\n} from '../util';\n\n// TODO(thure): Is NavTree truly authoritative in this regard?\nexport const NODE_TYPE = 'dxos/app-graph/node';\n\nconst renderPresence = (node: NavTreeNode): ReactNode => (\n <Surface role='presence--glyph' data={{ object: node.data }} />\n);\n\nexport const NavTreeContainer = ({\n root,\n activeIds,\n openItemIds,\n onOpenItemIdsChange,\n attended,\n popoverAnchorId,\n}: {\n root: NavTreeItemGraphNode;\n activeIds: Set<string>;\n openItemIds: Record<string, true>;\n onOpenItemIdsChange: (nextOpenItemIds: Record<string, true>) => void;\n attended: Set<string>;\n popoverAnchorId?: string;\n}) => {\n const { closeNavigationSidebar } = useSidebars(NAVTREE_PLUGIN);\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const dispatch = useIntentDispatcher();\n\n const graph = useMemo(() => getGraph(root), [root]);\n\n const items = treeItemsFromRootNode(graph, root, openItemIds);\n\n const loadDescendents = useCallback(\n (node: NavTreeNode | NavTreeActionsNode) => {\n void expandActions(graph, node as NavTreeItemGraphNode);\n if (!isActionLike(node)) {\n void expandChildren(graph, node as NavTreeItemGraphNode).then(() =>\n // Load one level deeper, which resolves some juddering observed on open/close.\n Promise.all(\n getChildren(graph, node as NavTreeItemGraphNode).flatMap((child) => [\n expandActions(graph, child),\n expandChildren(graph, child),\n ]),\n ),\n );\n }\n },\n [graph],\n );\n\n const handleNavigate = async ({ node, actions }: NavTreeItemNode) => {\n if (!node.data) {\n return;\n }\n\n // TODO(thure): Refactor opening related planks (comments in this case) to a generalized approach.\n await dispatch({\n action: NavigationAction.OPEN,\n data: {\n activeParts: node.data?.comments\n ? {\n main: [node.id],\n complementary: [`${node.id}${SLUG_PATH_SEPARATOR}comments${SLUG_COLLECTION_INDICATOR}`],\n }\n : {\n main: [node.id],\n },\n },\n });\n\n await dispatch({ action: LayoutAction.SCROLL_INTO_VIEW, data: { id: node.id } });\n\n const defaultAction = actions?.find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n if (!isLg) {\n closeNavigationSidebar();\n }\n };\n\n const handleItemOpenChange = ({ id, actions, path }: NavTreeItemNode, nextOpen: boolean) => {\n if (path) {\n if (nextOpen) {\n onOpenItemIdsChange({ ...openItemIds, [id]: true });\n } else {\n // TODO(thure): Filter vs single-remove, make setting?\n const { [id]: _, ...nextOpenItemIds } = openItemIds;\n onOpenItemIdsChange(nextOpenItemIds);\n }\n }\n\n // TODO(wittjosiah): This is a temporary solution to ensure spaces get enabled when they are expanded.\n const defaultAction = actions?.find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n };\n\n const resolveItemLevel = useCallback(\n (overPosition: number | undefined, activeId: string | undefined, levelOffset: number) => {\n if (!(typeof overPosition === 'number' && activeId)) {\n return 1;\n } else {\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === activeId),\n overPosition,\n );\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n return Math.min(\n previousItem ? getLevel(previousItem?.path) + 1 : 1,\n Math.max(nextItem ? getLevel(nextItem?.path) : 1, getLevel(nextItems[overPosition].path) + levelOffset),\n );\n }\n },\n [items],\n );\n\n const handleMove: NavTreeProps['onMove'] = useCallback(\n ({ active, over, details }: MosaicMoveEvent<number, NavTreeItemMoveDetails>) => {\n const levelOffset = Math.floor((details?.delta?.x ?? 0) / 16);\n const overPosition = over.position ?? 0;\n\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === active.item.id),\n overPosition,\n );\n\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n\n const activeNode = 'node' in active.item ? (active.item as NavTreeItem).node : undefined;\n\n if (!activeNode || !previousItem || !previousItem.path) {\n // console.log('[reject]', !activeNode, !previousItem, !previousItem.path);\n // log.warn('Top-level rearrange before the first item of the NavTree is unsupported at this time.');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n\n const overLevel = resolveItemLevel(overPosition, active.item.id, levelOffset);\n\n const previousLevel = getLevel(previousItem.path);\n\n // console.log('[over]', overLevel, previousLevel, levelOffset);\n\n if (previousLevel === overLevel - 1) {\n if (Path.hasChild(previousItem.id, active.item.id)) {\n // Previous is already parent of Active, rearrange.\n const operation = previousItem.node.properties.onRearrangeChildren\n ? ('rearrange' as const)\n : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Previous is not yet parent of Active, check transfer or copy.\n const operation = resolveMigrationOperation(graph, activeNode, previousItem.path, previousItem.node);\n // console.log('[migration result]', operation, 'Previous is not yet parent of Active, check transfer or copy.');\n return { operation, details: { levelOffset } };\n }\n } else if (previousLevel === overLevel) {\n const parent = getParent(graph, previousItem.node, previousItem.path);\n const parentPath = previousItem.path.slice(0, previousItem.path.length - 1);\n if (Path.siblings(previousItem.id, active.item.id)) {\n // Previous is already a sibling of Active, rearrange.\n const operation = parent?.properties.onRearrangeChildren ? ('rearrange' as const) : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Previous is not yet a sibling of Active, transfer/copy to Previous’s parent.\n const operation = resolveMigrationOperation(graph, activeNode, parentPath, parent);\n // console.log(\n // '[migration result]',\n // operation,\n // 'Previous is not yet a sibling of Active, transfer/copy to Previous’s parent.',\n // );\n return { operation, details: { levelOffset } };\n }\n } else if (nextItem && nextItem.path) {\n const nextLevel = getLevel(nextItem.path);\n if (nextLevel === overLevel) {\n const parent = getParent(graph, nextItem.node, nextItem.path);\n const parentPath = nextItem.path.slice(0, nextItem.path.length - 1);\n if (Path.siblings(nextItem.id, active.item.id)) {\n // Next is already a sibling of Active, rearrange.\n const operation = parent?.properties.onRearrangeChildren ? ('rearrange' as const) : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Next is not yet a sibling of Active, transfer to Next’s parent.\n const operation = resolveMigrationOperation(graph, activeNode, parentPath, parent);\n // console.log(\n // '[migration result]',\n // operation,\n // 'Next is not yet a sibling of Active, transfer to Next’s parent.',\n // );\n return { operation, details: { levelOffset } };\n }\n } else {\n // console.log('[migration result]', 'reject');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n } else {\n // console.log('[migration result]', 'reject');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n },\n [root, items],\n );\n\n const handleDrop = useCallback(\n ({ operation, active, over, details = {} }: MosaicDropEvent<number, NavTreeItemMoveDetails>) => {\n if (Path.first(over.path) !== root.id) {\n return undefined;\n }\n const { levelOffset = 0 } = details;\n const overPosition = over.position ?? 0;\n\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === active.item.id),\n overPosition,\n );\n\n const activeNode = 'node' in active.item ? (active.item as NavTreeItem).node : undefined;\n const activeParentId = Path.parent(active.item.id);\n\n if (!activeNode) {\n return undefined;\n }\n\n const activeParent = getParent(graph, activeNode, (active.item as NavTreeItem).path ?? []);\n\n if (operation === 'rearrange') {\n void activeParent?.properties.onRearrangeChildren?.(\n nextItems.filter(({ id }) => Path.hasChild(activeParentId, id)).map(({ node }) => node.data),\n );\n return null;\n } else {\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n\n const overLevel = resolveItemLevel(overPosition, active.item.id, levelOffset);\n\n const previousLevel = getLevel(previousItem.path);\n\n if (operation === 'copy') {\n if (previousLevel === overLevel - 1) {\n void previousItem.node.properties.onCopy?.(activeNode, 0);\n return null;\n } else if (previousLevel === overLevel) {\n const parent = getParent(graph, previousItem.node, previousItem.path ?? []);\n void parent?.properties.onCopy?.(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === previousItem.node.id) + 1,\n );\n return null;\n } else if (nextItem && nextItem.path) {\n const parent = getParent(graph, nextItem.node, nextItem.path ?? []);\n void parent?.properties.onCopy?.(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === nextItem.node.id),\n );\n return null;\n }\n } else if (operation === 'transfer') {\n const onTransferEnd = activeParent?.properties.onTransferEnd;\n if (!onTransferEnd) {\n return undefined;\n } else if (previousLevel === overLevel - 1) {\n const onTransferStart = previousItem.node.properties.onTransferStart;\n if (onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void onTransferStart(activeNode, 0);\n return null;\n }\n } else if (previousLevel === overLevel && previousItem.path) {\n const parent = getParent(graph, previousItem.node, previousItem.path);\n if (parent?.properties.onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void parent.properties.onTransferStart(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === previousItem.node.id) + 1,\n );\n return null;\n }\n } else if (nextItem && nextItem.path) {\n const parent = getParent(graph, nextItem.node, nextItem.path);\n if (parent?.properties.onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void parent.properties.onTransferStart(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === nextItem.node.id),\n );\n return null;\n }\n }\n }\n }\n return undefined;\n },\n [root, items],\n );\n\n const handleDragEnd = useCallback(() => {\n onOpenItemIdsChange({ ...openItemIds });\n }, [onOpenItemIdsChange, openItemIds]);\n\n return (\n <ElevationProvider elevation='chrome'>\n <div\n role='none'\n className='bs-full overflow-hidden row-span-3 grid grid-cols-1 grid-rows-[min-content_1fr_min-content]'\n >\n <Surface role='search-input' limit={1} />\n {/* TODO(thure): what gives this an inline `overflow: initial`? */}\n <div role='none' className='!overflow-y-auto'>\n <NavTree\n id={root.id}\n items={items}\n current={activeIds}\n attended={attended}\n type={NODE_TYPE}\n open={openItemIds}\n onNavigate={handleNavigate}\n onItemOpenChange={handleItemOpenChange}\n onMove={handleMove}\n onDrop={handleDrop}\n onDragEnd={handleDragEnd}\n popoverAnchorId={popoverAnchorId}\n renderPresence={renderPresence}\n resolveItemLevel={resolveItemLevel}\n loadDescendents={loadDescendents}\n />\n </div>\n <NavTreeFooter />\n </div>\n </ElevationProvider>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ArrowSquareOut, GearSix, Warning } from '@phosphor-icons/react';\nimport { formatDistance } from 'date-fns/formatDistance';\nimport React from 'react';\n\nimport {\n SettingsAction,\n useResolvePlugin,\n parseNavigationPlugin,\n useIntentDispatcher,\n type LayoutPart,\n} from '@dxos/app-framework';\nimport { useConfig } from '@dxos/react-client';\nimport {\n Button,\n Tooltip,\n Popover,\n useSidebars,\n useTranslation,\n Link,\n Message,\n Trans,\n useDefaultValue,\n} from '@dxos/react-ui';\nimport { PlankHeading } from '@dxos/react-ui-deck';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\nconst buttonStyles = 'pli-1.5 text-xs font-normal';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nexport const NavTreeFooter = (props: { layoutPart?: LayoutPart }) => {\n const layoutPart = useDefaultValue(props.layoutPart, 'sidebar');\n const config = useConfig();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const { navigationSidebarOpen } = useSidebars(NAVTREE_PLUGIN);\n const dispatch = useIntentDispatcher();\n const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};\n const navigationPlugin = useResolvePlugin(parseNavigationPlugin);\n\n const releaseUrl =\n config.values.runtime?.app?.env?.DX_ENVIRONMENT === 'production'\n ? `${repo}/releases/tag/v${version}`\n : `${repo}/commit/${commitHash}`;\n\n const previewUrl = 'https://docs.dxos.org/composer#technology-preview';\n\n return (\n <div\n role='none'\n className={mx(\n 'bs-[--rail-size] pbe-[env(safe-area-inset-bottom)] box-content border-separator border-bs pli-1 flex justify-end',\n layoutPart === 'complementary' && 'md:justify-end flex-row-reverse',\n )}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <Button variant='ghost' classNames={buttonStyles} {...(!navigationSidebarOpen && { tabIndex: -1 })}>\n v{version}\n </Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side='top'\n role='message'\n classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'\n >\n <Message.Root valence='warning' className='rounded-be-none p-5'>\n <Message.Title>\n <Warning weight='duotone' className='inline mie-2 is-6 bs-6' />\n <span>{t('warning title')}</span>\n </Message.Title>\n <Message.Body>\n {t('technology preview message')}\n <br />\n <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('learn more label')}\n <ArrowSquareOut className='inline mis-1' weight='bold' />\n </Link>\n </Message.Body>\n </Message.Root>\n <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>\n {timestamp && (\n <p>\n {t('released message', {\n released: formatDistance(new Date(timestamp), new Date(), { addSuffix: true }),\n })}\n <br />\n <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('see release label')}\n <ArrowSquareOut className='inline mis-1' weight='bold' />\n </Link>\n </p>\n )}\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'powered by dxos message',\n components: {\n dxos: <Link href='https://dxos.org' target='_blank' rel='noreferrer' variant='neutral' />,\n },\n }}\n />\n </p>\n </div>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n {/* TODO(burdon): Reconcile with action created by LayoutPlugin. */}\n <Button\n variant='ghost'\n classNames={buttonStyles}\n data-testid='treeView.openSettings'\n data-joyride='welcome/settings'\n {...(!navigationSidebarOpen && { tabIndex: -1 })}\n onClick={() => dispatch({ action: SettingsAction.OPEN })}\n >\n <span className='sr-only'>{t('open settings label')}</span>\n <GearSix className={mx(getSize(4), 'rotate-90')} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content classNames='z-[12]'>\n {t('open settings label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n\n {/* NOTE(thure): Unpinning from the NavTree’s default position in Deck is temporarily disabled. */}\n {navigationPlugin?.meta.id === 'dxos.org/plugin/deck' && (\n <PlankHeading.Controls\n variant='hide-disabled'\n capabilities={{\n incrementStart: false,\n incrementEnd: false,\n }}\n onClick={(_type) => {\n // TODO(Zan): If we inmplement pinning again, we should dispatch here.\n }}\n />\n )}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n type Action,\n type Node,\n type NodeFilter,\n type Graph,\n ACTION_TYPE,\n ACTION_GROUP_TYPE,\n isAction,\n} from '@dxos/app-graph';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport {\n type NavTreeActionNode,\n type NavTreeItemActions,\n type NavTreeItemNode,\n type NavTreeItemNodeProperties,\n type OpenItemIds,\n} from '@dxos/react-ui-navtree';\nimport { type MaybePromise, nonNullable } from '@dxos/util';\n\nexport type NavTreeItemGraphNode = Node<\n any,\n NavTreeItemNodeProperties &\n Partial<{\n persistenceClass: string;\n persistenceKey: string;\n acceptPersistenceClass: Set<string>;\n acceptPersistenceKey: Set<string>;\n onRearrangeChildren: (nextOrder: NavTreeItemGraphNode[]) => MaybePromise<void>;\n onCopy: (activeNode: NavTreeItemGraphNode, index?: number) => MaybePromise<void>;\n onTransferStart: (activeNode: NavTreeItemGraphNode, index?: number) => MaybePromise<void>;\n onTransferEnd: (activeNode: NavTreeItemGraphNode, destinationParent: NavTreeItemGraphNode) => MaybePromise<void>;\n }>\n>;\nexport type NavTreeItem = NavTreeItemNode<NavTreeItemGraphNode>;\n\nexport const getParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return graph.nodes(node, { relation: 'inbound' }).find((n) => n.id === parentId) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n persistenceClass: string,\n): NavTreeItemGraphNode | null => {\n if (node.properties.acceptPersistenceClass?.has(persistenceClass)) {\n return node;\n } else {\n const parent = getParent(graph, node, path);\n return parent ? getPersistenceParent(graph, parent, path.slice(0, path.length - 1), persistenceClass) : null;\n }\n};\n\nexport const resolveMigrationOperation = (\n graph: Graph,\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 destinationRelatedNode.properties.onTransferStart\n ? 'transfer'\n : destinationRelatedNode.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 === 'toolbar') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getTreeItemNode = (treeItems: NavTreeItemNode[], path?: string[]): NavTreeItemNode | undefined => {\n if (!path) {\n return undefined;\n }\n\n return treeItems.find((treeItem) => {\n return treeItem.path && !treeItem.path.find((id, index) => path[index] !== id);\n });\n};\n\nexport const getChildren = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n filter?: NodeFilter,\n path: string[] = [],\n): NavTreeItemGraphNode[] => {\n return graph\n .nodes(node, { relation: 'outbound', filter })\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(nonNullable) as NavTreeItemGraphNode[];\n};\n\ntype FlattenedActions = Required<Pick<NavTreeItemNode, 'actions' | 'groupedActions'>>;\n\nexport const getActions = (graph: Graph, node: NavTreeItemGraphNode): FlattenedActions => {\n return graph.actions(node).reduce(\n (acc: FlattenedActions, arg) => {\n acc.actions.push(arg as unknown as NavTreeItemActions[number]);\n if (!isAction(arg)) {\n const actionGroup = graph.actions(arg);\n acc.groupedActions[arg.id] = actionGroup as unknown as NavTreeActionNode[];\n }\n return acc;\n },\n { actions: [], groupedActions: {} },\n );\n};\n\nexport const expandChildrenAndActions = (graph: Graph, node: Node) => {\n return Promise.all([expandChildren(graph, node), expandActions(graph, node)]);\n};\n\nexport const expandChildren = (graph: Graph, node: Node) => {\n return graph.expand(node, 'outbound');\n};\n\nexport const expandActions = (graph: Graph, node: Node) => {\n return Promise.all([graph.expand(node, 'outbound', ACTION_TYPE), graph.expand(node, 'outbound', ACTION_GROUP_TYPE)]);\n};\n\nfunction* navTreeItemVisitor(\n graph: Graph,\n node: NavTreeItemGraphNode,\n openItemIds: OpenItemIds,\n path: string[] = [],\n filter?: NodeFilter,\n): Generator<NavTreeItem> {\n const l0Children = getChildren(graph, node, filter, path);\n const { actions: l0Actions, groupedActions: l0GroupedActions } = getActions(graph, node);\n\n const stack: NavTreeItem[] = [\n {\n id: node.id,\n node,\n path: [],\n parentOf: (l0Children ?? []).map(({ id }) => id),\n actions: l0Actions,\n groupedActions: l0GroupedActions,\n },\n ];\n\n while (stack.length > 0) {\n const nextItem = stack.pop()!;\n if ((nextItem.path?.length ?? 0) > 0) {\n yield nextItem;\n }\n const { id, node, path } = nextItem;\n const children = getChildren(graph, node, filter, path);\n if (path?.length === 0 || (id ?? 'never') in openItemIds) {\n for (let i = children.length - 1; i >= 0; i--) {\n const child = children[i] as NavTreeItemGraphNode;\n const childPath = path ? [...path, child.id] : [child.id];\n const childChildren = getChildren(graph, child, filter, childPath);\n const { actions: childActions, groupedActions: childGroupedActions } = getActions(graph, child);\n stack.push({\n id: Path.create(...childPath),\n node: child,\n path: childPath,\n ...((childChildren?.length ?? 0) > 0 && {\n parentOf: childChildren!.map(({ id }) => Path.create(...childPath, id)),\n }),\n actions: childActions,\n groupedActions: childGroupedActions,\n });\n }\n }\n }\n}\n\n/**\n * Get a reactive tree node from a graph node.\n */\nexport const treeItemsFromRootNode = (\n graph: Graph,\n rootNode: NavTreeItemGraphNode,\n openItemIds: OpenItemIds,\n path: string[] = [],\n filter?: NodeFilter,\n): NavTreeItem[] => {\n return Array.from(navTreeItemVisitor(graph, rootNode, openItemIds, path, filter));\n};\n\nexport const expandOpenGraphNodes = (graph: Graph, openItemIds: OpenItemIds) => {\n return Promise.all(\n Object.keys(openItemIds)\n .map((openItemId) => {\n const node = graph.findNode(Path.last(openItemId));\n return node && expandChildrenAndActions(graph, node as NavTreeItemGraphNode);\n })\n .filter(nonNullable),\n );\n};\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 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useIntentDispatcher, useResolvePlugin } from '@dxos/app-framework';\nimport { ClientAction } from '@dxos/plugin-client/meta';\nimport { parseObservabilityPlugin } from '@dxos/plugin-observability';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { HaloButton } from './HaloButton';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin (ClientPlugin?).\nexport const NotchStart = () => {\n const identity = useIdentity();\n const observabilityPlugin = useResolvePlugin(parseObservabilityPlugin);\n const dispatch = useIntentDispatcher();\n return (\n <HaloButton\n size={8}\n identityKey={identity?.identityKey.toHex()}\n hue={identity?.profile?.data?.hue}\n emoji={identity?.profile?.data?.emoji}\n internal={observabilityPlugin?.provides?.observability?.group === 'dxos'}\n onClick={() => dispatch({ action: ClientAction.SHARE_IDENTITY })}\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ConnectionState, useNetworkStatus } from '@dxos/react-client/mesh';\nimport { Avatar, type Size } from '@dxos/react-ui';\nimport { focusRing, mx } from '@dxos/react-ui-theme';\nimport { hexToFallback } from '@dxos/util';\n\nconst INTERNAL = 'https://avatars.githubusercontent.com/u/57182821';\n\nexport type HaloButtonProps = {\n size?: Size;\n identityKey?: string;\n hue?: string;\n emoji?: string;\n internal?: boolean;\n onClick?: () => void;\n};\n\nexport const HaloButton = (props: HaloButtonProps) => {\n const { onClick, identityKey, internal, size = 8 } = props;\n const fallbackValue = hexToFallback(identityKey ?? '0');\n const { swarm: connectionState } = useNetworkStatus();\n return (\n <button className={mx(focusRing, 'rounded grid place-items-center')} onClick={onClick}>\n <Avatar.Root\n size={size}\n variant='circle'\n status={connectionState === ConnectionState.OFFLINE ? 'error' : internal ? 'internal' : 'active'}\n hue={props.hue || fallbackValue.hue}\n >\n <Avatar.Frame data-testid='treeView.haloButton' data-joyride='welcome/halo'>\n {internal ? <Avatar.Image href={INTERNAL} /> : <Avatar.Fallback text={props.emoji || fallbackValue.emoji} />}\n </Avatar.Frame>\n </Avatar.Root>\n </button>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { MagnifyingGlass } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { LayoutAction, useIntent } from '@dxos/app-framework';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { dispatch } = useIntent();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n return (\n <Button\n classNames='pis-3 pie-2 gap-2 mli-1 mbs-1 min-bs-0 bs-[--rail-action] justify-start'\n onClick={() =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: `${NAVTREE_PLUGIN}/Commands`, dialogBlockAlign: 'start' },\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 { translations as navtreeTranslations } from '@dxos/react-ui-navtree';\n\nimport { NAVTREE_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [NAVTREE_PLUGIN]: {\n 'open settings label': 'Settings',\n 'open commands label': 'Search commands',\n 'commands dialog title': 'Commands',\n 'command list input placeholder': 'Search for commands…',\n 'node actions menu invoker label': 'More options',\n 'warning title': 'WARNING',\n 'technology preview message': 'Composer is still in technology preview.',\n 'learn more label': 'Learn more',\n 'released message': 'This version released {{released}}.',\n 'see release label': 'See release on GitHub',\n 'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',\n },\n },\n },\n ...navtreeTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { NavTreePlugin } from './NavTreePlugin';\n\nexport default NavTreePlugin;\n\nexport * from './NavTreePlugin';\nexport * from './util';\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,mBAAAA,wBAAuC;AAChD,OAAOC,YAAW;AAElB,SAEEC,eAOAC,mBACAC,gBAAAA,eAEAC,kBACAC,oBAAAA,yBACK;AACP,SAASC,iBAA6BC,YAAAA,WAAUC,mBAA8B;AAC9E,SAASC,YAAAA,iBAAgB;AACzB,SAASC,yBAAyB;AAClC,SAASC,QAAAA,aAAY;AAErB,SAASC,mBAAAA,wBAAuB;;;ACvBhC,SAASC,kBAAkB;AAC3B,OAAOC,SAASC,SAASC,gBAAgB;AAEzC,SA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AAK4B,OAAO;cAClDoD,SAAS,MAAM;gBACb;kBACEpD,IAAI;kBACJN,MAAM,YAAA;AACJ,0BAAMsD,cAActF,SAASmE,OAAOwB,SAAS;sBAC3CtB,QAAQuB,cAAaC;sBACrB7D,MAAM;wBACJ8D,SAAS;wBACT9C,WAAW,GAAGE,cAAAA;wBACd6C,kBAAkB;sBACpB;oBACF,CAAA;kBACF;kBACAlF,YAAY;oBACVsB,OAAO;sBAAC;sBAAuB;wBAAE6D,IAAI9C;sBAAe;;oBACpD+C,MAAM,CAACC,UAAqB,gBAAA7C,OAAA,cAAC8C,kBAAoBD,KAAAA;oBACjDE,YAAY;oBACZtF,YAAY;sBACVO,OAAO;sBACPC,SAAS;oBACX;kBACF;gBACF;;YAEJ,CAAA;;QAEJ;MACF;MACA+E;IACF;EACF;AACF;;;AW/PA,IAAA,cAAeC;",
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n type GraphBuilderProvides,\n resolvePlugin,\n type MetadataRecordsProvides,\n type PluginDefinition,\n type SurfaceProvides,\n type TranslationsProvides,\n type Plugin,\n type IntentResolverProvides,\n parseIntentPlugin,\n LayoutAction,\n type GraphProvides,\n parseGraphPlugin,\n NavigationAction,\n} from '@dxos/app-framework';\nimport { createExtension, type Graph, isAction, isGraphNode, type Node } from '@dxos/app-graph';\nimport { Keyboard } from '@dxos/keyboard';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport { type OpenItemIds } from '@dxos/react-ui-navtree';\nimport { getHostPlatform } from '@dxos/util';\n\nimport {\n CommandsDialogContent,\n NODE_TYPE,\n NavBarStart,\n NavTreeContainer,\n NavTreeDocumentTitle,\n NotchStart,\n} from './components';\nimport { CommandsTrigger } from './components/CommandsTrigger';\nimport meta, { KEY_BINDING, NAVTREE_PLUGIN } from './meta';\nimport translations from './translations';\nimport { expandOpenGraphNodes, getActions, getChildren, type NavTreeItem, type NavTreeItemGraphNode } from './util';\n\nexport type NavTreePluginProvides = SurfaceProvides &\n MetadataRecordsProvides &\n GraphBuilderProvides &\n TranslationsProvides &\n IntentResolverProvides;\n\ntype NavTreeState = { root?: NavTreeItemGraphNode; openItemIds: OpenItemIds };\n\nexport const NavTreePlugin = (): PluginDefinition<NavTreePluginProvides> => {\n const state = new LocalStorageStore<NavTreeState>('dxos.org/settings/navtree', {\n // TODO(thure): Do this dynamically.\n openItemIds: { root: true, 'dxos.org/plugin/space-spaces': true, 'dxos.org/plugin/files': true },\n });\n\n let graphPlugin: Plugin<GraphProvides> | undefined;\n let graph: Graph | undefined;\n\n const handleOpenItemIdsChange = (nextOpenItemIds: OpenItemIds) => {\n // TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.\n state.values.openItemIds = nextOpenItemIds;\n if (graph) {\n void expandOpenGraphNodes(graph, nextOpenItemIds);\n }\n };\n\n return {\n meta,\n ready: async (plugins) => {\n graphPlugin = resolvePlugin(plugins, parseGraphPlugin);\n graph = graphPlugin?.provides.graph;\n if (!graph) {\n return;\n }\n\n state.values.root = graph.root as NavTreeItemGraphNode;\n getChildren(graph, state.values.root);\n getActions(graph, state.values.root);\n\n state.prop({ key: 'openItemIds', storageKey: 'openItemIds', type: LocalStorageStore.json<OpenItemIds>() });\n\n void expandOpenGraphNodes(graph, state.values.openItemIds);\n\n // TODO(wittjosiah): Factor out.\n // TODO(wittjosiah): Handle removal of actions.\n graph.subscribeTraverse({\n visitor: (node, path) => {\n let shortcut: string | undefined;\n if (typeof node.properties.keyBinding === 'object') {\n const availablePlatforms = Object.keys(node.properties.keyBinding);\n const platform = getHostPlatform();\n shortcut = availablePlatforms.includes(platform)\n ? node.properties.keyBinding[platform]\n : platform === 'ios'\n ? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.\n : platform === 'linux' || platform === 'unknown'\n ? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.\n : undefined;\n } else {\n shortcut = node.properties.keyBinding;\n }\n\n if (shortcut && isAction(node)) {\n Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({\n shortcut,\n handler: () => {\n void node.data({ node, caller: KEY_BINDING });\n },\n data: node.properties.label,\n });\n }\n },\n });\n\n // TODO(burdon): Create context and plugin.\n Keyboard.singleton.initialize();\n Keyboard.singleton.setCurrentContext(graphPlugin?.provides.graph.root.id);\n },\n unload: async () => {\n Keyboard.singleton.destroy();\n },\n provides: {\n metadata: {\n records: {\n [NODE_TYPE]: {\n parse: (item: NavTreeItem, type: string) => {\n switch (type) {\n case 'node':\n return item.node;\n case 'object':\n return item.node.data;\n case 'view-object':\n return { id: `${item.id}-view`, object: item.node.data };\n }\n },\n },\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (data.component) {\n case `${NAVTREE_PLUGIN}/Commands`: {\n const selected = typeof data.subject === 'string' ? data.subject : undefined;\n return <CommandsDialogContent selected={selected} />;\n }\n }\n\n switch (role) {\n case 'navigation':\n if (state.values.root && state.values.openItemIds) {\n return (\n <NavTreeContainer\n root={state.values.root}\n activeIds={data.activeIds as Set<string>}\n openItemIds={state.values.openItemIds}\n onOpenItemIdsChange={handleOpenItemIdsChange}\n attended={data.attended as string[]}\n popoverAnchorId={data.popoverAnchorId as string}\n />\n );\n }\n break;\n\n case 'document-title': {\n return <NavTreeDocumentTitle node={isGraphNode(data.activeNode) ? data.activeNode : undefined} />;\n }\n\n case 'navbar-start': {\n if (state.values.root && data.activeNode) {\n return {\n node: (\n <NavBarStart\n activeNode={data.activeNode as Node}\n popoverAnchorId={data.popoverAnchorId as string | undefined}\n />\n ),\n disposition: 'hoist',\n };\n }\n break;\n }\n\n case 'notch-start':\n return <NotchStart />;\n\n case 'search-input':\n return {\n node: <CommandsTrigger />,\n disposition: 'fallback',\n };\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case NavigationAction.EXPOSE: {\n if (graph && intent.data?.id) {\n const path = graph.getPath({ target: intent.data.id });\n if (Array.isArray(path)) {\n const additionalOpenItems = [...Array(path.length - 1)].reduce((acc: OpenItemIds, _, index) => {\n const itemId = Path.create(...path.slice(1, index + 1));\n if (itemId.length > 0) {\n acc[itemId] = true;\n }\n return acc;\n }, {});\n state.values.openItemIds = {\n ...additionalOpenItems,\n ...state.values.openItemIds,\n };\n }\n }\n break;\n }\n }\n },\n },\n graph: {\n builder: (plugins) => {\n // TODO(burdon): Move to separate plugin (for keys and command k). Move bindings from LayoutPlugin.\n const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n\n return [\n createExtension({\n id: NAVTREE_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: 'dxos.org/plugin/navtree/open-commands',\n data: async () => {\n await intentPlugin?.provides.intent.dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: `${NAVTREE_PLUGIN}/Commands`,\n dialogBlockAlign: 'start',\n },\n });\n },\n properties: {\n label: ['open commands label', { ns: NAVTREE_PLUGIN }],\n icon: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'meta+k',\n windows: 'ctrl+k',\n },\n },\n },\n ],\n }),\n ];\n },\n },\n translations,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { useIntentDispatcher, LayoutAction } from '@dxos/app-framework';\nimport { type ActionLike, isActionGroup, isAction } from '@dxos/app-graph';\nimport { Keyboard, keySymbols } from '@dxos/keyboard';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { Button, Dialog, Icon, useTranslation, toLocalizedString } from '@dxos/react-ui';\nimport { SearchList } from '@dxos/react-ui-searchlist';\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 dispatch = useIntentDispatcher();\n const { graph } = useGraph();\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 // console.log(JSON.stringify(actions, undefined, 2));\n return actions;\n }, [graph]);\n\n const group = allActions.find(({ id }) => id === selected);\n const actions = isActionGroup(group) ? graph.actions(group) : allActions;\n\n return (\n <Dialog.Content classNames={['md:max-is-[30rem] overflow-hidden mbs-12']}>\n <Dialog.Title>{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='flex flex-col grow overflow-hidden my-2'>\n <SearchList.Input placeholder={t('command list input placeholder')} classNames='px-1 my-2' />\n <SearchList.Content classNames='max-bs-[24rem] overflow-auto'>\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({ action: LayoutAction.SET_LAYOUT, data: { element: 'dialog', state: false } });\n setTimeout(() => {\n const node = graph.nodes(group ?? action, { relation: 'inbound' })[0];\n void (node && isAction(action) && action.data({ 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 <Dialog.Close asChild>\n <Button variant='primary' classNames='mbs-2'>\n {t('close label', { ns: 'os' })}\n </Button>\n </Dialog.Close>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { getGraph, type Node } from '@dxos/app-graph';\nimport { Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { PlankHeading } from '@dxos/react-ui-deck';\n\nimport { KEY_BINDING, NAVTREE_PLUGIN } from '../meta';\n\nconst TREE_ITEM_MAIN_HEADING = 'TreeItemMainHeading';\n\nexport const NavBarStart = ({ activeNode, popoverAnchorId }: { activeNode: Node; popoverAnchorId?: string }) => {\n const { t } = useTranslation(NAVTREE_PLUGIN);\n\n const ActionRoot =\n popoverAnchorId === `dxos.org/ui/${TREE_ITEM_MAIN_HEADING}/${activeNode.id}` ||\n popoverAnchorId === `dxos.org/ui/${KEY_BINDING}/${activeNode.id}`\n ? Popover.Anchor\n : Fragment;\n\n const graph = getGraph(activeNode);\n const actions = graph.actions(activeNode);\n const label = toLocalizedString(activeNode.properties?.label, t);\n\n const menuTriggerLabel = t('node actions menu invoker label');\n\n return (\n <>\n <ActionRoot>\n <PlankHeading.ActionsMenu\n icon={activeNode.properties?.icon ?? 'ph--dots-three-vertical--regular'}\n attendableId={activeNode.id}\n triggerLabel={menuTriggerLabel}\n actions={[actions]}\n onAction={(action) =>\n typeof action.data === 'function' && action.data({ node: action as Node, caller: TREE_ITEM_MAIN_HEADING })\n }\n />\n </ActionRoot>\n <PlankHeading.Label attendableId={activeNode.id}>{label}</PlankHeading.Label>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode, useCallback, useMemo } from 'react';\n\nimport { NavigationAction, Surface, useIntentDispatcher } from '@dxos/app-framework';\nimport { getGraph, isAction, isActionLike } from '@dxos/app-graph';\nimport { ElevationProvider, useMediaQuery, useSidebars } from '@dxos/react-ui';\nimport { type MosaicDropEvent, type MosaicMoveEvent, Mosaic, Path } from '@dxos/react-ui-mosaic';\nimport {\n NavTree,\n type NavTreeItemNode,\n type NavTreeNode,\n getLevel,\n type NavTreeActionsNode,\n type NavTreeProps,\n type NavTreeItemMoveDetails,\n} from '@dxos/react-ui-navtree';\nimport { arrayMove } from '@dxos/util';\n\nimport { NavTreeFooter } from './NavTreeFooter';\nimport { NAVTREE_PLUGIN } from '../meta';\nimport {\n expandActions,\n expandChildren,\n getChildren,\n getParent,\n type NavTreeItem,\n type NavTreeItemGraphNode,\n resolveMigrationOperation,\n treeItemsFromRootNode,\n} from '../util';\n\n// TODO(thure): Is NavTree truly authoritative in this regard?\nexport const NODE_TYPE = 'dxos/app-graph/node';\n\nconst renderPresence = (node: NavTreeNode): ReactNode => (\n <Surface role='presence--glyph' data={{ object: node.data }} />\n);\n\nexport const NavTreeContainer = ({\n root,\n activeIds,\n openItemIds,\n onOpenItemIdsChange,\n attended,\n popoverAnchorId,\n}: {\n root: NavTreeItemGraphNode;\n activeIds: Set<string>;\n openItemIds: Record<string, true>;\n onOpenItemIdsChange: (nextOpenItemIds: Record<string, true>) => void;\n // TODO(wittjosiah): Use attention context directly?\n attended: string[];\n popoverAnchorId?: string;\n}) => {\n const { closeNavigationSidebar } = useSidebars(NAVTREE_PLUGIN);\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const dispatch = useIntentDispatcher();\n\n const graph = useMemo(() => getGraph(root), [root]);\n\n const items = treeItemsFromRootNode(graph, root, openItemIds);\n\n const loadDescendents = useCallback(\n (node: NavTreeNode | NavTreeActionsNode) => {\n void expandActions(graph, node as NavTreeItemGraphNode);\n if (!isActionLike(node)) {\n void expandChildren(graph, node as NavTreeItemGraphNode).then(() =>\n // Load one level deeper, which resolves some juddering observed on open/close.\n Promise.all(\n getChildren(graph, node as NavTreeItemGraphNode).flatMap((child) => [\n expandActions(graph, child),\n expandChildren(graph, child),\n ]),\n ),\n );\n }\n },\n [graph],\n );\n\n const handleNavigate = async ({ node, actions }: NavTreeItemNode) => {\n if (!node.data) {\n return;\n }\n\n // TODO(thure): Refactor opening related planks (comments in this case) to a generalized approach.\n await dispatch({\n action: NavigationAction.OPEN,\n data: {\n activeParts: {\n main: [node.id],\n },\n },\n });\n\n const defaultAction = actions?.find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n if (!isLg) {\n closeNavigationSidebar();\n }\n };\n\n const handleItemOpenChange = ({ id, actions, path }: NavTreeItemNode, nextOpen: boolean) => {\n if (path) {\n if (nextOpen) {\n onOpenItemIdsChange({ ...openItemIds, [id]: true });\n } else {\n // TODO(thure): Filter vs single-remove, make setting?\n const { [id]: _, ...nextOpenItemIds } = openItemIds;\n onOpenItemIdsChange(nextOpenItemIds);\n }\n }\n\n // TODO(wittjosiah): This is a temporary solution to ensure spaces get enabled when they are expanded.\n const defaultAction = actions?.find((action) => action.properties?.disposition === 'default');\n if (isAction(defaultAction)) {\n void (defaultAction.data as () => void)();\n }\n };\n\n const resolveItemLevel = useCallback(\n (overPosition: number | undefined, activeId: string | undefined, levelOffset: number) => {\n if (!(typeof overPosition === 'number' && activeId)) {\n return 1;\n } else {\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === activeId),\n overPosition,\n );\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n return Math.min(\n previousItem ? getLevel(previousItem?.path) + 1 : 1,\n Math.max(nextItem ? getLevel(nextItem?.path) : 1, getLevel(nextItems[overPosition].path) + levelOffset),\n );\n }\n },\n [items],\n );\n\n const handleMove: NavTreeProps['onMove'] = useCallback(\n ({ active, over, details }: MosaicMoveEvent<number, NavTreeItemMoveDetails>) => {\n const levelOffset = Math.floor((details?.delta?.x ?? 0) / 16);\n const overPosition = over.position ?? 0;\n\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === active.item.id),\n overPosition,\n );\n\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n\n const activeNode = 'node' in active.item ? (active.item as NavTreeItem).node : undefined;\n\n if (!activeNode || !previousItem || !previousItem.path) {\n // console.log('[reject]', !activeNode, !previousItem, !previousItem.path);\n // log.warn('Top-level rearrange before the first item of the NavTree is unsupported at this time.');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n\n const overLevel = resolveItemLevel(overPosition, active.item.id, levelOffset);\n\n const previousLevel = getLevel(previousItem.path);\n\n // console.log('[over]', overLevel, previousLevel, levelOffset);\n\n if (previousLevel === overLevel - 1) {\n if (Path.hasChild(previousItem.id, active.item.id)) {\n // Previous is already parent of Active, rearrange.\n const operation = previousItem.node.properties.onRearrangeChildren\n ? ('rearrange' as const)\n : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Previous is not yet parent of Active, check transfer or copy.\n const operation = resolveMigrationOperation(graph, activeNode, previousItem.path, previousItem.node);\n // console.log('[migration result]', operation, 'Previous is not yet parent of Active, check transfer or copy.');\n return { operation, details: { levelOffset } };\n }\n } else if (previousLevel === overLevel) {\n const parent = getParent(graph, previousItem.node, previousItem.path);\n const parentPath = previousItem.path.slice(0, previousItem.path.length - 1);\n if (Path.siblings(previousItem.id, active.item.id)) {\n // Previous is already a sibling of Active, rearrange.\n const operation = parent?.properties.onRearrangeChildren ? ('rearrange' as const) : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Previous is not yet a sibling of Active, transfer/copy to Previous’s parent.\n const operation = resolveMigrationOperation(graph, activeNode, parentPath, parent);\n // console.log(\n // '[migration result]',\n // operation,\n // 'Previous is not yet a sibling of Active, transfer/copy to Previous’s parent.',\n // );\n return { operation, details: { levelOffset } };\n }\n } else if (nextItem && nextItem.path) {\n const nextLevel = getLevel(nextItem.path);\n if (nextLevel === overLevel) {\n const parent = getParent(graph, nextItem.node, nextItem.path);\n const parentPath = nextItem.path.slice(0, nextItem.path.length - 1);\n if (Path.siblings(nextItem.id, active.item.id)) {\n // Next is already a sibling of Active, rearrange.\n const operation = parent?.properties.onRearrangeChildren ? ('rearrange' as const) : ('reject' as const);\n return { operation, details: { levelOffset } };\n } else {\n // Next is not yet a sibling of Active, transfer to Next’s parent.\n const operation = resolveMigrationOperation(graph, activeNode, parentPath, parent);\n // console.log(\n // '[migration result]',\n // operation,\n // 'Next is not yet a sibling of Active, transfer to Next’s parent.',\n // );\n return { operation, details: { levelOffset } };\n }\n } else {\n // console.log('[migration result]', 'reject');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n } else {\n // console.log('[migration result]', 'reject');\n return { operation: 'reject' as const, details: { levelOffset } };\n }\n },\n [root, items],\n );\n\n const handleDrop = useCallback(\n ({ operation, active, over, details = {} }: MosaicDropEvent<number, NavTreeItemMoveDetails>) => {\n if (Path.first(over.path) !== root.id) {\n return undefined;\n }\n const { levelOffset = 0 } = details;\n const overPosition = over.position ?? 0;\n\n const nextItems = arrayMove(\n items,\n items.findIndex(({ id }) => id === active.item.id),\n overPosition,\n );\n\n const activeNode = 'node' in active.item ? (active.item as NavTreeItem).node : undefined;\n const activeParentId = Path.parent(active.item.id);\n\n if (!activeNode) {\n return undefined;\n }\n\n const activeParent = getParent(graph, activeNode, (active.item as NavTreeItem).path ?? []);\n\n if (operation === 'rearrange') {\n void activeParent?.properties.onRearrangeChildren?.(\n nextItems.filter(({ id }) => Path.hasChild(activeParentId, id)).map(({ node }) => node.data),\n );\n return null;\n } else {\n const previousItem: NavTreeItem | undefined = nextItems[overPosition - 1];\n const nextItem: NavTreeItem | undefined = nextItems[overPosition + 1];\n\n const overLevel = resolveItemLevel(overPosition, active.item.id, levelOffset);\n\n const previousLevel = getLevel(previousItem.path);\n\n if (operation === 'copy') {\n if (previousLevel === overLevel - 1) {\n void previousItem.node.properties.onCopy?.(activeNode, 0);\n return null;\n } else if (previousLevel === overLevel) {\n const parent = getParent(graph, previousItem.node, previousItem.path ?? []);\n void parent?.properties.onCopy?.(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === previousItem.node.id) + 1,\n );\n return null;\n } else if (nextItem && nextItem.path) {\n const parent = getParent(graph, nextItem.node, nextItem.path ?? []);\n void parent?.properties.onCopy?.(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === nextItem.node.id),\n );\n return null;\n }\n } else if (operation === 'transfer') {\n const onTransferEnd = activeParent?.properties.onTransferEnd;\n if (!onTransferEnd) {\n return undefined;\n } else if (previousLevel === overLevel - 1) {\n const onTransferStart = previousItem.node.properties.onTransferStart;\n if (onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void onTransferStart(activeNode, 0);\n return null;\n }\n } else if (previousLevel === overLevel && previousItem.path) {\n const parent = getParent(graph, previousItem.node, previousItem.path);\n if (parent?.properties.onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void parent.properties.onTransferStart(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === previousItem.node.id) + 1,\n );\n return null;\n }\n } else if (nextItem && nextItem.path) {\n const parent = getParent(graph, nextItem.node, nextItem.path);\n if (parent?.properties.onTransferStart) {\n void onTransferEnd(activeNode, previousItem.node);\n void parent.properties.onTransferStart(\n activeNode,\n getChildren(graph, parent).findIndex(({ id }) => id === nextItem.node.id),\n );\n return null;\n }\n }\n }\n }\n return undefined;\n },\n [root, items],\n );\n\n const handleDragEnd = useCallback(() => {\n onOpenItemIdsChange({ ...openItemIds });\n }, [onOpenItemIdsChange, openItemIds]);\n\n return (\n <Mosaic.Root>\n <Mosaic.DragOverlay />\n <ElevationProvider elevation='chrome'>\n <div\n role='none'\n className='bs-full overflow-hidden row-span-3 grid grid-cols-1 grid-rows-[min-content_1fr_min-content]'\n >\n <Surface role='search-input' limit={1} />\n {/* TODO(thure): what gives this an inline `overflow: initial`? */}\n <div role='none' className='!overflow-y-auto'>\n <NavTree\n id={root.id}\n items={items}\n current={activeIds}\n attended={attended}\n type={NODE_TYPE}\n open={openItemIds}\n onNavigate={handleNavigate}\n onItemOpenChange={handleItemOpenChange}\n onMove={handleMove}\n onDrop={handleDrop}\n onDragEnd={handleDragEnd}\n popoverAnchorId={popoverAnchorId}\n renderPresence={renderPresence}\n resolveItemLevel={resolveItemLevel}\n loadDescendents={loadDescendents}\n />\n </div>\n <NavTreeFooter />\n </div>\n </ElevationProvider>\n </Mosaic.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ArrowSquareOut, GearSix, Warning } from '@phosphor-icons/react';\nimport { formatDistance } from 'date-fns/formatDistance';\nimport React from 'react';\n\nimport {\n SettingsAction,\n useResolvePlugin,\n parseNavigationPlugin,\n useIntentDispatcher,\n type LayoutPart,\n} from '@dxos/app-framework';\nimport { useConfig } from '@dxos/react-client';\nimport {\n Button,\n Tooltip,\n Popover,\n useSidebars,\n useTranslation,\n Link,\n Message,\n Trans,\n useDefaultValue,\n} from '@dxos/react-ui';\nimport { PlankHeading } from '@dxos/react-ui-deck';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\nconst buttonStyles = 'pli-1.5 text-xs font-normal';\n\nconst repo = 'https://github.com/dxos/dxos';\n\nexport const NavTreeFooter = (props: { layoutPart?: LayoutPart }) => {\n const layoutPart = useDefaultValue(props.layoutPart, () => 'sidebar');\n const config = useConfig();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n const { navigationSidebarOpen } = useSidebars(NAVTREE_PLUGIN);\n const dispatch = useIntentDispatcher();\n const { version, timestamp, commitHash } = config.values.runtime?.app?.build ?? {};\n const navigationPlugin = useResolvePlugin(parseNavigationPlugin);\n\n const releaseUrl =\n config.values.runtime?.app?.env?.DX_ENVIRONMENT === 'production'\n ? `${repo}/releases/tag/v${version}`\n : `${repo}/commit/${commitHash}`;\n\n const previewUrl = 'https://docs.dxos.org/composer#technology-preview';\n\n return (\n <div\n role='none'\n className={mx(\n 'bs-[--rail-size] pbe-[env(safe-area-inset-bottom)] box-content border-separator border-bs pli-1 flex justify-end',\n layoutPart === 'complementary' && 'md:justify-end flex-row-reverse',\n )}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <Button variant='ghost' classNames={buttonStyles} {...(!navigationSidebarOpen && { tabIndex: -1 })}>\n v{version}\n </Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n side='top'\n role='message'\n classNames='z-[12] bg-warning-500 max-is-[min(calc(100vw-16px),40ch)]'\n >\n <Message.Root valence='warning' className='rounded-be-none p-5'>\n <Message.Title>\n <Warning weight='duotone' className='inline mie-2 is-6 bs-6' />\n <span>{t('warning title')}</span>\n </Message.Title>\n <Message.Body>\n {t('technology preview message')}\n <br />\n <Link href={previewUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('learn more label')}\n <ArrowSquareOut className='inline mis-1' weight='bold' />\n </Link>\n </Message.Body>\n </Message.Root>\n <div role='none' className='plb-4 pli-5 space-b-2 text-baseText'>\n {timestamp && (\n <p>\n {t('released message', {\n released: formatDistance(new Date(timestamp), new Date(), { addSuffix: true }),\n })}\n <br />\n <Link href={releaseUrl} target='_blank' rel='noreferrer' variant='neutral'>\n {t('see release label')}\n <ArrowSquareOut className='inline mis-1' weight='bold' />\n </Link>\n </p>\n )}\n <p>\n <Trans\n {...{\n t,\n i18nKey: 'powered by dxos message',\n components: {\n dxos: <Link href='https://dxos.org' target='_blank' rel='noreferrer' variant='neutral' />,\n },\n }}\n />\n </p>\n </div>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n {/* TODO(burdon): Reconcile with action created by LayoutPlugin. */}\n <Button\n variant='ghost'\n classNames={buttonStyles}\n data-testid='treeView.openSettings'\n data-joyride='welcome/settings'\n {...(!navigationSidebarOpen && { tabIndex: -1 })}\n onClick={() => dispatch({ action: SettingsAction.OPEN })}\n >\n <span className='sr-only'>{t('open settings label')}</span>\n <GearSix className={mx(getSize(4), 'rotate-90')} />\n </Button>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content classNames='z-[12]'>\n {t('open settings label')}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n\n {/* NOTE(thure): Unpinning from the NavTree’s default position in Deck is temporarily disabled. */}\n {navigationPlugin?.meta.id === 'dxos.org/plugin/deck' && (\n <PlankHeading.Controls\n variant='hide-disabled'\n capabilities={{\n incrementStart: false,\n incrementEnd: false,\n }}\n onClick={(_type) => {\n // TODO(Zan): If we inmplement pinning again, we should dispatch here.\n }}\n />\n )}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n type Action,\n type Node,\n type NodeFilter,\n type Graph,\n ACTION_TYPE,\n ACTION_GROUP_TYPE,\n isAction,\n} from '@dxos/app-graph';\nimport { Path } from '@dxos/react-ui-mosaic';\nimport {\n type NavTreeActionNode,\n type NavTreeItemActions,\n type NavTreeItemNode,\n type NavTreeItemNodeProperties,\n type OpenItemIds,\n} from '@dxos/react-ui-navtree';\nimport { type MaybePromise, nonNullable } from '@dxos/util';\n\nexport type NavTreeItemGraphNode = Node<\n any,\n NavTreeItemNodeProperties &\n Partial<{\n persistenceClass: string;\n persistenceKey: string;\n acceptPersistenceClass: Set<string>;\n acceptPersistenceKey: Set<string>;\n onRearrangeChildren: (nextOrder: NavTreeItemGraphNode[]) => MaybePromise<void>;\n onCopy: (activeNode: NavTreeItemGraphNode, index?: number) => MaybePromise<void>;\n onTransferStart: (activeNode: NavTreeItemGraphNode, index?: number) => MaybePromise<void>;\n onTransferEnd: (activeNode: NavTreeItemGraphNode, destinationParent: NavTreeItemGraphNode) => MaybePromise<void>;\n }>\n>;\nexport type NavTreeItem = NavTreeItemNode<NavTreeItemGraphNode>;\n\nexport const getParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n): NavTreeItemGraphNode | undefined => {\n const parentId = path[path.length - 2];\n return graph.nodes(node, { relation: 'inbound' }).find((n) => n.id === parentId) as NavTreeItemGraphNode | undefined;\n};\n\nexport const getPersistenceParent = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n path: string[],\n persistenceClass: string,\n): NavTreeItemGraphNode | null => {\n if (node.properties.acceptPersistenceClass?.has(persistenceClass)) {\n return node;\n } else {\n const parent = getParent(graph, node, path);\n return parent ? getPersistenceParent(graph, parent, path.slice(0, path.length - 1), persistenceClass) : null;\n }\n};\n\nexport const resolveMigrationOperation = (\n graph: Graph,\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 destinationRelatedNode.properties.onTransferStart\n ? 'transfer'\n : destinationRelatedNode.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 === 'toolbar') {\n return -1;\n }\n\n return 1;\n });\n\nexport const getTreeItemNode = (treeItems: NavTreeItemNode[], path?: string[]): NavTreeItemNode | undefined => {\n if (!path) {\n return undefined;\n }\n\n return treeItems.find((treeItem) => {\n return treeItem.path && !treeItem.path.find((id, index) => path[index] !== id);\n });\n};\n\nexport const getChildren = (\n graph: Graph,\n node: NavTreeItemGraphNode,\n filter?: NodeFilter,\n path: string[] = [],\n): NavTreeItemGraphNode[] => {\n return graph\n .nodes(node, { relation: 'outbound', filter })\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(nonNullable) as NavTreeItemGraphNode[];\n};\n\ntype FlattenedActions = Required<Pick<NavTreeItemNode, 'actions' | 'groupedActions'>>;\n\nexport const getActions = (graph: Graph, node: NavTreeItemGraphNode): FlattenedActions => {\n return graph.actions(node).reduce(\n (acc: FlattenedActions, arg) => {\n acc.actions.push(arg as unknown as NavTreeItemActions[number]);\n if (!isAction(arg)) {\n const actionGroup = graph.actions(arg);\n acc.groupedActions[arg.id] = actionGroup as unknown as NavTreeActionNode[];\n }\n return acc;\n },\n { actions: [], groupedActions: {} },\n );\n};\n\nexport const expandChildrenAndActions = (graph: Graph, node: Node) => {\n return Promise.all([expandChildren(graph, node), expandActions(graph, node)]);\n};\n\nexport const expandChildren = (graph: Graph, node: Node) => {\n return graph.expand(node, 'outbound');\n};\n\nexport const expandActions = (graph: Graph, node: Node) => {\n return Promise.all([graph.expand(node, 'outbound', ACTION_TYPE), graph.expand(node, 'outbound', ACTION_GROUP_TYPE)]);\n};\n\nfunction* navTreeItemVisitor(\n graph: Graph,\n node: NavTreeItemGraphNode,\n openItemIds: OpenItemIds,\n path: string[] = [],\n filter?: NodeFilter,\n): Generator<NavTreeItem> {\n const l0Children = getChildren(graph, node, filter, path);\n const { actions: l0Actions, groupedActions: l0GroupedActions } = getActions(graph, node);\n\n const stack: NavTreeItem[] = [\n {\n id: node.id,\n node,\n path: [],\n parentOf: (l0Children ?? []).map(({ id }) => id),\n actions: l0Actions,\n groupedActions: l0GroupedActions,\n },\n ];\n\n while (stack.length > 0) {\n const nextItem = stack.pop()!;\n if ((nextItem.path?.length ?? 0) > 0) {\n yield nextItem;\n }\n const { id, node, path } = nextItem;\n const children = getChildren(graph, node, filter, path);\n if (path?.length === 0 || (id ?? 'never') in openItemIds) {\n for (let i = children.length - 1; i >= 0; i--) {\n const child = children[i] as NavTreeItemGraphNode;\n const childPath = path ? [...path, child.id] : [child.id];\n const childChildren = getChildren(graph, child, filter, childPath);\n const { actions: childActions, groupedActions: childGroupedActions } = getActions(graph, child);\n stack.push({\n id: Path.create(...childPath),\n node: child,\n path: childPath,\n ...((childChildren?.length ?? 0) > 0 && {\n parentOf: childChildren!.map(({ id }) => Path.create(...childPath, id)),\n }),\n actions: childActions,\n groupedActions: childGroupedActions,\n });\n }\n }\n }\n}\n\n/**\n * Get a reactive tree node from a graph node.\n */\nexport const treeItemsFromRootNode = (\n graph: Graph,\n rootNode: NavTreeItemGraphNode,\n openItemIds: OpenItemIds,\n path: string[] = [],\n filter?: NodeFilter,\n): NavTreeItem[] => {\n return Array.from(navTreeItemVisitor(graph, rootNode, openItemIds, path, filter));\n};\n\nexport const expandOpenGraphNodes = (graph: Graph, openItemIds: OpenItemIds) => {\n return Promise.all(\n Object.keys(openItemIds)\n .map((openItemId) => {\n const node = graph.findNode(Path.last(openItemId));\n return node && expandChildrenAndActions(graph, node as NavTreeItemGraphNode);\n })\n .filter(nonNullable),\n );\n};\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 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useIntentDispatcher, useResolvePlugin } from '@dxos/app-framework';\nimport { ClientAction } from '@dxos/plugin-client/meta';\nimport { parseObservabilityPlugin } from '@dxos/plugin-observability';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { HaloButton } from './HaloButton';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin (ClientPlugin?).\nexport const NotchStart = () => {\n const identity = useIdentity();\n const observabilityPlugin = useResolvePlugin(parseObservabilityPlugin);\n const dispatch = useIntentDispatcher();\n return (\n <HaloButton\n size={8}\n identityKey={identity?.identityKey.toHex()}\n hue={identity?.profile?.data?.hue}\n emoji={identity?.profile?.data?.emoji}\n internal={observabilityPlugin?.provides?.observability?.group === 'dxos'}\n onClick={() => dispatch({ action: ClientAction.SHARE_IDENTITY })}\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ConnectionState, useNetworkStatus } from '@dxos/react-client/mesh';\nimport { Avatar, type Size } from '@dxos/react-ui';\nimport { focusRing, mx } from '@dxos/react-ui-theme';\nimport { hexToFallback } from '@dxos/util';\n\nconst INTERNAL = 'https://avatars.githubusercontent.com/u/57182821';\n\nexport type HaloButtonProps = {\n size?: Size;\n identityKey?: string;\n hue?: string;\n emoji?: string;\n internal?: boolean;\n onClick?: () => void;\n};\n\nexport const HaloButton = (props: HaloButtonProps) => {\n const { onClick, identityKey, internal, size = 8 } = props;\n const fallbackValue = hexToFallback(identityKey ?? '0');\n const { swarm: connectionState } = useNetworkStatus();\n return (\n <button className={mx(focusRing, 'rounded grid place-items-center')} onClick={onClick}>\n <Avatar.Root\n size={size}\n variant='circle'\n status={connectionState === ConnectionState.OFFLINE ? 'error' : internal ? 'internal' : 'active'}\n hue={props.hue || fallbackValue.hue}\n >\n <Avatar.Frame data-testid='treeView.haloButton' data-joyride='welcome/halo'>\n {internal ? <Avatar.Image href={INTERNAL} /> : <Avatar.Fallback text={props.emoji || fallbackValue.emoji} />}\n </Avatar.Frame>\n </Avatar.Root>\n </button>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { MagnifyingGlass } from '@phosphor-icons/react';\nimport React from 'react';\n\nimport { LayoutAction, useIntent } from '@dxos/app-framework';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { NAVTREE_PLUGIN } from '../meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { dispatch } = useIntent();\n const { t } = useTranslation(NAVTREE_PLUGIN);\n return (\n <Button\n classNames='pis-3 pie-2 gap-2 mli-1 mbs-1 min-bs-0 bs-[--rail-action] justify-start'\n onClick={() =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: { element: 'dialog', component: `${NAVTREE_PLUGIN}/Commands`, dialogBlockAlign: 'start' },\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 { translations as navtreeTranslations } from '@dxos/react-ui-navtree';\n\nimport { NAVTREE_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [NAVTREE_PLUGIN]: {\n 'open settings label': 'Settings',\n 'open commands label': 'Search commands',\n 'commands dialog title': 'Commands',\n 'command list input placeholder': 'Search for commands…',\n 'node actions menu invoker label': 'More options',\n 'warning title': 'WARNING',\n 'technology preview message': 'Composer is still in technology preview.',\n 'learn more label': 'Learn more',\n 'released message': 'This version released {{released}}.',\n 'see release label': 'See release on GitHub',\n 'powered by dxos message': 'Powered by <dxos>DXOS</dxos>',\n },\n },\n },\n ...navtreeTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { NavTreePlugin } from './NavTreePlugin';\n\nexport default NavTreePlugin;\n\nexport * from './NavTreeP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SAAS0F,iBAAAA;AAE5C,iBAAO;YACLC,gBAAgB;cACdlD,IAAIY;cACJuC,QAAQ,CAAC/E,SAA6BA,KAAK4B,OAAO;cAClDoD,SAAS,MAAM;gBACb;kBACEpD,IAAI;kBACJN,MAAM,YAAA;AACJ,0BAAMsD,cAActF,SAASmE,OAAOwB,SAAS;sBAC3CtB,QAAQuB,cAAaC;sBACrB7D,MAAM;wBACJ8D,SAAS;wBACT9C,WAAW,GAAGE,cAAAA;wBACd6C,kBAAkB;sBACpB;oBACF,CAAA;kBACF;kBACAlF,YAAY;oBACVsB,OAAO;sBAAC;sBAAuB;wBAAE6D,IAAI9C;sBAAe;;oBACpD+C,MAAM;oBACNnF,YAAY;sBACVO,OAAO;sBACPC,SAAS;oBACX;kBACF;gBACF;;YAEJ,CAAA;;QAEJ;MACF;MACA4E;IACF;EACF;AACF;;;AW7PA,IAAA,cAAeC;",
|
|
6
|
+
"names": ["React", "resolvePlugin", "parseIntentPlugin", "LayoutAction", "parseGraphPlugin", "NavigationAction", "createExtension", "isAction", "isGraphNode", "Keyboard", "LocalStorageStore", "Path", "getHostPlatform", "React", "useMemo", "useState", "useIntentDispatcher", "LayoutAction", "isActionGroup", "isAction", "Keyboard", "keySymbols", "useGraph", "Button", "Dialog", "Icon", "useTranslation", "toLocalizedString", "SearchList", "descriptionText", "mx", "getHostPlatform", "CommandsDialogContent", "selected", "initial", "t", "useTranslation", "NAVTREE_PLUGIN", "setSelected", "useState", "dispatch", "useIntentDispatcher", "graph", "useGraph", "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", "Dialog", "Content", "classNames", "Title", "ns", "SearchList", "Root", "Input", "placeholder", "map", "action", "shortcut", "keyBinding", "getHostPlatform", "Item", "value", "key", "onSelect", "disabled", "LayoutAction", "SET_LAYOUT", "data", "element", "state", "setTimeout", "nodes", "relation", "caller", "KEY_BINDING", "testId", "Icon", "icon", "size", "span", "className", "mx", "descriptionText", "keySymbols", "Close", "asChild", "Button", "variant", "React", "Fragment", "getGraph", "Popover", "toLocalizedString", "useTranslation", "PlankHeading", "TREE_ITEM_MAIN_HEADING", "NavBarStart", "activeNode", "popoverAnchorId", "t", "useTranslation", "NAVTREE_PLUGIN", "ActionRoot", "id", "KEY_BINDING", "Popover", "Anchor", "Fragment", "graph", "getGraph", "actions", "label", "toLocalizedString", "properties", "menuTriggerLabel", "React", "PlankHeading", "ActionsMenu", "icon", "attendableId", "triggerLabel", "onAction", "action", "data", "node", "caller", "Label", "React", "useCallback", "useMemo", "NavigationAction", "Surface", "useIntentDispatcher", "getGraph", "isAction", "isActionLike", "ElevationProvider", "useMediaQuery", "useSidebars", "Mosaic", "Path", "NavTree", "getLevel", "arrayMove", "ArrowSquareOut", "GearSix", "Warning", "formatDistance", "React", "SettingsAction", "useResolvePlugin", "parseNavigationPlugin", "useIntentDispatcher", "useConfig", "Button", "Tooltip", "Popover", "useSidebars", "useTranslation", "Link", "Message", "Trans", "useDefaultValue", "PlankHeading", "getSize", "mx", "buttonStyles", "repo", "NavTreeFooter", "props", "layoutPart", "useDefaultValue", "config", "useConfig", "t", "useTranslation", "NAVTREE_PLUGIN", "navigationSidebarOpen", "useSidebars", "dispatch", "useIntentDispatcher", "version", "timestamp", "commitHash", "values", "runtime", "app", "build", "navigationPlugin", "useResolvePlugin", "parseNavigationPlugin", "releaseUrl", "env", "DX_ENVIRONMENT", "previewUrl", "React", "div", "role", "className", "mx", "Popover", "Root", "Trigger", "asChild", "Button", "variant", "classNames", "tabIndex", "Portal", "Content", "side", "Message", "valence", "Title", "Warning", "weight", "span", "Body", "br", "Link", "href", "target", "rel", "ArrowSquareOut", "p", "released", "formatDistance", "Date", "addSuffix", "Trans", "i18nKey", "components", "dxos", "Arrow", "Tooltip", "data-testid", "data-joyride", "onClick", "action", "SettingsAction", "OPEN", "GearSix", "getSize", "meta", "id", "PlankHeading", "Controls", "capabilities", "incrementStart", "incrementEnd", "_type", "ACTION_TYPE", "ACTION_GROUP_TYPE", "isAction", "Path", "nonNullable", "getParent", "graph", "node", "path", "parentId", "length", "nodes", "relation", "find", "n", "id", "getPersistenceParent", "persistenceClass", "properties", "acceptPersistenceClass", "has", "parent", "slice", "resolveMigrationOperation", "activeNode", "destinationPath", "destinationRelatedNode", "activeClass", "persistenceParent", "activeKey", "persistenceKey", "acceptPersistenceKey", "onTransferStart", "onCopy", "sortActions", "actions", "sort", "a", "b", "disposition", "getTreeItemNode", "treeItems", "undefined", "treeItem", "index", "getChildren", "filter", "map", "nextPath", "includes", "nonNullable", "getActions", "reduce", "acc", "arg", "push", "isAction", "actionGroup", "groupedActions", "expandChildrenAndActions", "Promise", "all", "expandChildren", "expandActions", "expand", "ACTION_TYPE", "ACTION_GROUP_TYPE", "navTreeItemVisitor", "openItemIds", "l0Children", "l0Actions", "l0GroupedActions", "stack", "parentOf", "nextItem", "pop", "children", "i", "child", "childPath", "childChildren", "childActions", "childGroupedActions", "Path", "create", "treeItemsFromRootNode", "rootNode", "Array", "from", "expandOpenGraphNodes", "Object", "keys", "openItemId", "findNode", "last", "NODE_TYPE", "renderPresence", "node", "React", "Surface", "role", "data", "object", "NavTreeContainer", "root", "activeIds", "openItemIds", "onOpenItemIdsChange", "attended", "popoverAnchorId", "closeNavigationSidebar", "useSidebars", "NAVTREE_PLUGIN", "isLg", "useMediaQuery", "ssr", "dispatch", "useIntentDispatcher", "graph", "useMemo", "getGraph", "items", "treeItemsFromRootNode", "loadDescendents", "useCallback", "expandActions", "isActionLike", "expandChildren", "then", "Promise", "all", "getChildren", "flatMap", "child", "handleNavigate", "actions", "action", "NavigationAction", "OPEN", "activeParts", "main", "id", "defaultAction", "find", "properties", "disposition", "isAction", "handleItemOpenChange", "path", "nextOpen", "_", "nextOpenItemIds", "resolveItemLevel", "overPosition", "activeId", "levelOffset", "nextItems", "arrayMove", "findIndex", "previousItem", "nextItem", "Math", "min", "getLevel", "max", "handleMove", "active", "over", "details", "floor", "delta", "x", "position", "item", "activeNode", "undefined", "operation", "overLevel", "previousLevel", "Path", "hasChild", "onRearrangeChildren", "resolveMigrationOperation", "parent", "getParent", "parentPath", "slice", "length", "siblings", "nextLevel", "handleDrop", "first", "activeParentId", "activeParent", "filter", "map", "onCopy", "onTransferEnd", "onTransferStart", "handleDragEnd", "Mosaic", "Root", "DragOverlay", "ElevationProvider", "elevation", "div", "className", "limit", "NavTree", "current", "type", "open", "onNavigate", "onItemOpenChange", "onMove", "onDrop", "onDragEnd", "NavTreeFooter", "useEffect", "toLocalizedString", "useTranslation", "NavTreeDocumentTitle", "node", "t", "useTranslation", "NAVTREE_PLUGIN", "useEffect", "document", "title", "toLocalizedString", "properties", "label", "ns", "React", "useIntentDispatcher", "useResolvePlugin", "ClientAction", "parseObservabilityPlugin", "useIdentity", "React", "ConnectionState", "useNetworkStatus", "Avatar", "focusRing", "mx", "hexToFallback", "INTERNAL", "HaloButton", "props", "onClick", "identityKey", "internal", "size", "fallbackValue", "hexToFallback", "swarm", "connectionState", "useNetworkStatus", "React", "button", "className", "mx", "focusRing", "Avatar", "Root", "variant", "status", "ConnectionState", "OFFLINE", "hue", "Frame", "data-testid", "data-joyride", "Image", "href", "Fallback", "text", "emoji", "NotchStart", "identity", "useIdentity", "observabilityPlugin", "useResolvePlugin", "parseObservabilityPlugin", "dispatch", "useIntentDispatcher", "React", "HaloButton", "size", "identityKey", "toHex", "hue", "profile", "data", "emoji", "internal", "provides", "observability", "group", "onClick", "action", "ClientAction", "SHARE_IDENTITY", "MagnifyingGlass", "React", "LayoutAction", "useIntent", "Button", "useTranslation", "getSize", "CommandsTrigger", "dispatch", "useIntent", "t", "useTranslation", "NAVTREE_PLUGIN", "React", "Button", "classNames", "onClick", "action", "LayoutAction", "SET_LAYOUT", "data", "element", "component", "dialogBlockAlign", "span", "className", "MagnifyingGlass", "getSize", "translations", "navtreeTranslations", "NAVTREE_PLUGIN", "navtreeTranslations", "NavTreePlugin", "state", "LocalStorageStore", "openItemIds", "root", "graphPlugin", "graph", "handleOpenItemIdsChange", "nextOpenItemIds", "values", "expandOpenGraphNodes", "meta", "ready", "plugins", "resolvePlugin", "parseGraphPlugin", "provides", "getChildren", "getActions", "prop", "key", "storageKey", "type", "json", "subscribeTraverse", "visitor", "node", "path", "shortcut", "properties", "keyBinding", "availablePlatforms", "Object", "keys", "platform", "getHostPlatform", "includes", "macos", "windows", "undefined", "isAction", "Keyboard", "singleton", "getContext", "slice", "join", "bind", "handler", "data", "caller", "KEY_BINDING", "label", "initialize", "setCurrentContext", "id", "unload", "destroy", "metadata", "records", "NODE_TYPE", "parse", "item", "object", "surface", "component", "role", "NAVTREE_PLUGIN", "selected", "subject", "React", "CommandsDialogContent", "NavTreeContainer", "activeIds", "onOpenItemIdsChange", "attended", "popoverAnchorId", "NavTreeDocumentTitle", "isGraphNode", "activeNode", "NavBarStart", "disposition", "NotchStart", "CommandsTrigger", "intent", "resolver", "action", "NavigationAction", "EXPOSE", "getPath", "target", "Array", "isArray", "additionalOpenItems", "length", "reduce", "acc", "_", "index", "itemId", "Path", "create", "builder", "intentPlugin", "parseIntentPlugin", "createExtension", "filter", "actions", "dispatch", "LayoutAction", "SET_LAYOUT", "element", "dialogBlockAlign", "ns", "icon", "translations", "NavTreePlugin"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-navtree/src/meta.ts":{"bytes":1024,"imports":[],"format":"esm"},"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx":{"bytes":16879,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx":{"bytes":6009,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx":{"bytes":18077,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/util.ts":{"bytes":23279,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx":{"bytes":48642,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx","kind":"import-statement","original":"./NavTreeFooter"},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx":{"bytes":2287,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/HaloButton.tsx":{"bytes":4991,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NotchStart.tsx":{"bytes":3865,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/meta","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/HaloButton.tsx","kind":"import-statement","original":"./HaloButton"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/index.ts":{"bytes":953,"imports":[{"path":"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx","kind":"import-statement","original":"./CommandsDialog"},{"path":"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx","kind":"import-statement","original":"./NavBarStart"},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx","kind":"import-statement","original":"./NavTreeContainer"},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx","kind":"import-statement","original":"./NavTreeDocumentTitle"},{"path":"packages/plugins/plugin-navtree/src/components/NotchStart.tsx","kind":"import-statement","original":"./NotchStart"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx":{"bytes":4096,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/translations.ts":{"bytes":3044,"imports":[{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx":{"bytes":32716,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx","kind":"import-statement","original":"./components/CommandsTrigger"},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-navtree/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-navtree/src/index.ts":{"bytes":875,"imports":[{"path":"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-navtree/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":82848},"packages/plugins/plugin-navtree/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-navtree/dist/lib/browser/chunk-U7MTKDFQ.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/meta","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true}],"exports":["NavTreePlugin","default","expandActions","expandChildren","expandChildrenAndActions","expandOpenGraphNodes","getActions","getChildren","getParent","getPersistenceParent","getTreeItemNode","resolveMigrationOperation","sortActions","treeItemsFromRootNode"],"entryPoint":"packages/plugins/plugin-navtree/src/index.ts","inputs":{"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx":{"bytesInOutput":7751},"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx":{"bytesInOutput":4128},"packages/plugins/plugin-navtree/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx":{"bytesInOutput":1488},"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx":{"bytesInOutput":11026},"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx":{"bytesInOutput":5263},"packages/plugins/plugin-navtree/src/util.ts":{"bytesInOutput":4902},"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx":{"bytesInOutput":441},"packages/plugins/plugin-navtree/src/components/NotchStart.tsx":{"bytesInOutput":879},"packages/plugins/plugin-navtree/src/components/HaloButton.tsx":{"bytesInOutput":1237},"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx":{"bytesInOutput":1034},"packages/plugins/plugin-navtree/src/translations.ts":{"bytesInOutput":814},"packages/plugins/plugin-navtree/src/index.ts":{"bytesInOutput":33}},"bytes":40378},"packages/plugins/plugin-navtree/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-navtree/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-navtree/dist/lib/browser/chunk-U7MTKDFQ.mjs","kind":"import-statement"}],"exports":["KEY_BINDING","NAVTREE_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-navtree/src/meta.ts","inputs":{},"bytes":193},"packages/plugins/plugin-navtree/dist/lib/browser/chunk-U7MTKDFQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":444},"packages/plugins/plugin-navtree/dist/lib/browser/chunk-U7MTKDFQ.mjs":{"imports":[],"exports":["KEY_BINDING","NAVTREE_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-navtree/src/meta.ts":{"bytesInOutput":125}},"bytes":277}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-navtree/src/meta.ts":{"bytes":1128,"imports":[],"format":"esm"},"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx":{"bytes":16433,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx":{"bytes":5792,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx":{"bytes":18093,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/util.ts":{"bytes":23279,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx":{"bytes":47568,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx","kind":"import-statement","original":"./NavTreeFooter"},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx":{"bytes":2287,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/HaloButton.tsx":{"bytes":4991,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/NotchStart.tsx":{"bytes":3865,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/meta","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/HaloButton.tsx","kind":"import-statement","original":"./HaloButton"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/index.ts":{"bytes":953,"imports":[{"path":"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx","kind":"import-statement","original":"./CommandsDialog"},{"path":"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx","kind":"import-statement","original":"./NavBarStart"},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx","kind":"import-statement","original":"./NavTreeContainer"},{"path":"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx","kind":"import-statement","original":"./NavTreeDocumentTitle"},{"path":"packages/plugins/plugin-navtree/src/components/NotchStart.tsx","kind":"import-statement","original":"./NotchStart"}],"format":"esm"},"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx":{"bytes":4096,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/translations.ts":{"bytes":3044,"imports":[{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx":{"bytes":32163,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-navtree/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx","kind":"import-statement","original":"./components/CommandsTrigger"},{"path":"packages/plugins/plugin-navtree/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-navtree/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-navtree/src/index.ts":{"bytes":875,"imports":[{"path":"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"packages/plugins/plugin-navtree/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-navtree/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":81701},"packages/plugins/plugin-navtree/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-navtree/dist/lib/browser/chunk-PSVCPL4T.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"date-fns/formatDistance","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-deck","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/meta","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/mesh","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-navtree","kind":"import-statement","external":true}],"exports":["NavTreePlugin","default","expandActions","expandChildren","expandChildrenAndActions","expandOpenGraphNodes","getActions","getChildren","getParent","getPersistenceParent","getTreeItemNode","resolveMigrationOperation","sortActions","treeItemsFromRootNode"],"entryPoint":"packages/plugins/plugin-navtree/src/index.ts","inputs":{"packages/plugins/plugin-navtree/src/NavTreePlugin.tsx":{"bytesInOutput":7568},"packages/plugins/plugin-navtree/src/components/CommandsDialog.tsx":{"bytesInOutput":4002},"packages/plugins/plugin-navtree/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-navtree/src/components/NavBarStart.tsx":{"bytesInOutput":1454},"packages/plugins/plugin-navtree/src/components/NavTreeContainer.tsx":{"bytesInOutput":10750},"packages/plugins/plugin-navtree/src/components/NavTreeFooter.tsx":{"bytesInOutput":5269},"packages/plugins/plugin-navtree/src/util.ts":{"bytesInOutput":4902},"packages/plugins/plugin-navtree/src/components/NavTreeDocumentTitle.tsx":{"bytesInOutput":441},"packages/plugins/plugin-navtree/src/components/NotchStart.tsx":{"bytesInOutput":879},"packages/plugins/plugin-navtree/src/components/HaloButton.tsx":{"bytesInOutput":1237},"packages/plugins/plugin-navtree/src/components/CommandsTrigger.tsx":{"bytesInOutput":1034},"packages/plugins/plugin-navtree/src/translations.ts":{"bytesInOutput":814},"packages/plugins/plugin-navtree/src/index.ts":{"bytesInOutput":33}},"bytes":39765},"packages/plugins/plugin-navtree/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-navtree/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-navtree/dist/lib/browser/chunk-PSVCPL4T.mjs","kind":"import-statement"}],"exports":["KEY_BINDING","NAVTREE_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-navtree/src/meta.ts","inputs":{},"bytes":193},"packages/plugins/plugin-navtree/dist/lib/browser/chunk-PSVCPL4T.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":523},"packages/plugins/plugin-navtree/dist/lib/browser/chunk-PSVCPL4T.mjs":{"imports":[],"exports":["KEY_BINDING","NAVTREE_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-navtree/src/meta.ts":{"bytesInOutput":125}},"bytes":277}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAEzB,KAAK,sBAAsB,EAM5B,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,MAAM,qBAAqB,GAAG,eAAe,GACjD,uBAAuB,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,CAAC;AAIzB,eAAO,MAAM,aAAa,QAAO,gBAAgB,CAAC,qBAAqB,CAkNtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/CommandsDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandsDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/CommandsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAcjD,eAAO,MAAM,qBAAqB,0BAA2B;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,sBA6FjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBarStart.d.ts","sourceRoot":"","sources":["../../../../src/components/NavBarStart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavBarStart.d.ts","sourceRoot":"","sources":["../../../../src/components/NavBarStart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAQtD,eAAO,MAAM,WAAW,oCAAqC;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,sBA+B1G,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare const NavTreeContainer: ({ root, activeIds, openItemIds, onOpenIt
|
|
|
6
6
|
activeIds: Set<string>;
|
|
7
7
|
openItemIds: Record<string, true>;
|
|
8
8
|
onOpenItemIdsChange: (nextOpenItemIds: Record<string, true>) => void;
|
|
9
|
-
attended:
|
|
9
|
+
attended: string[];
|
|
10
10
|
popoverAnchorId?: string;
|
|
11
11
|
}) => React.JSX.Element;
|
|
12
12
|
//# sourceMappingURL=NavTreeContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAmBpE,OAAO,EAML,KAAK,oBAAoB,EAG1B,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAM/C,eAAO,MAAM,gBAAgB,sFAO1B;IACD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClC,mBAAmB,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;IAErE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,sBAuTA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,4BAA4B,CAAC;AAGxD,eAAO,MAAM,WAAW,eAAe,CAAC;;;;AAExC,wBAEuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Graph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAA4B,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"Graph.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Graph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAA4B,MAAM,OAAO,CAAC;;;qRAuBK,GAAG,CAAC,OAAO;;;AAwGjE,wBAIE;AAEF,eAAO,MAAM,OAAO;wBACE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAMxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13-main.548ca8d",
|
|
4
4
|
"description": "DXOS Surface plugin for a tree view visualization of the graph.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@preact/signals-core": "^1.6.0",
|
|
33
33
|
"date-fns": "^3.3.1",
|
|
34
|
-
"@dxos/app-framework": "0.6.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/plugin-client": "0.6.
|
|
43
|
-
"@dxos/plugin-
|
|
44
|
-
"@dxos/plugin-
|
|
45
|
-
"@dxos/plugin-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/react-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-ui-mosaic": "0.6.
|
|
50
|
-
"@dxos/react-ui-navtree": "0.6.
|
|
51
|
-
"@dxos/react-ui-searchlist": "0.6.
|
|
52
|
-
"@dxos/util": "0.6.
|
|
34
|
+
"@dxos/app-framework": "0.6.13-main.548ca8d",
|
|
35
|
+
"@dxos/app-graph": "0.6.13-main.548ca8d",
|
|
36
|
+
"@dxos/async": "0.6.13-main.548ca8d",
|
|
37
|
+
"@dxos/debug": "0.6.13-main.548ca8d",
|
|
38
|
+
"@dxos/echo-schema": "0.6.13-main.548ca8d",
|
|
39
|
+
"@dxos/keyboard": "0.6.13-main.548ca8d",
|
|
40
|
+
"@dxos/local-storage": "0.6.13-main.548ca8d",
|
|
41
|
+
"@dxos/log": "0.6.13-main.548ca8d",
|
|
42
|
+
"@dxos/plugin-client": "0.6.13-main.548ca8d",
|
|
43
|
+
"@dxos/plugin-observability": "0.6.13-main.548ca8d",
|
|
44
|
+
"@dxos/plugin-graph": "0.6.13-main.548ca8d",
|
|
45
|
+
"@dxos/plugin-theme": "0.6.13-main.548ca8d",
|
|
46
|
+
"@dxos/react-client": "0.6.13-main.548ca8d",
|
|
47
|
+
"@dxos/react-ui-deck": "0.6.13-main.548ca8d",
|
|
48
|
+
"@dxos/protocols": "0.6.13-main.548ca8d",
|
|
49
|
+
"@dxos/react-ui-mosaic": "0.6.13-main.548ca8d",
|
|
50
|
+
"@dxos/react-ui-navtree": "0.6.13-main.548ca8d",
|
|
51
|
+
"@dxos/react-ui-searchlist": "0.6.13-main.548ca8d",
|
|
52
|
+
"@dxos/util": "0.6.13-main.548ca8d"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
"@types/react-dom": "~18.2.0",
|
|
58
58
|
"react": "~18.2.0",
|
|
59
59
|
"react-dom": "~18.2.0",
|
|
60
|
-
"vite": "
|
|
61
|
-
"@dxos/echo-signals": "0.6.
|
|
62
|
-
"@dxos/random": "0.6.
|
|
63
|
-
"@dxos/react-ui": "0.6.
|
|
64
|
-
"@dxos/storybook-utils": "0.6.
|
|
65
|
-
"@dxos/react-ui-theme": "0.6.
|
|
60
|
+
"vite": "5.4.7",
|
|
61
|
+
"@dxos/echo-signals": "0.6.13-main.548ca8d",
|
|
62
|
+
"@dxos/random": "0.6.13-main.548ca8d",
|
|
63
|
+
"@dxos/react-ui": "0.6.13-main.548ca8d",
|
|
64
|
+
"@dxos/storybook-utils": "0.6.13-main.548ca8d",
|
|
65
|
+
"@dxos/react-ui-theme": "0.6.13-main.548ca8d"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@phosphor-icons/react": "^2.1.5",
|
|
69
|
-
"react": "
|
|
70
|
-
"react-dom": "
|
|
71
|
-
"@dxos/react-ui": "0.6.
|
|
72
|
-
"@dxos/react-ui-theme": "0.6.
|
|
69
|
+
"react": "~18.2.0",
|
|
70
|
+
"react-dom": "~18.2.0",
|
|
71
|
+
"@dxos/react-ui": "0.6.13-main.548ca8d",
|
|
72
|
+
"@dxos/react-ui-theme": "0.6.13-main.548ca8d"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { MagnifyingGlass, type IconProps } from '@phosphor-icons/react';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
8
7
|
import {
|
|
@@ -155,7 +154,7 @@ export const NavTreePlugin = (): PluginDefinition<NavTreePluginProvides> => {
|
|
|
155
154
|
activeIds={data.activeIds as Set<string>}
|
|
156
155
|
openItemIds={state.values.openItemIds}
|
|
157
156
|
onOpenItemIdsChange={handleOpenItemIdsChange}
|
|
158
|
-
attended={data.attended as
|
|
157
|
+
attended={data.attended as string[]}
|
|
159
158
|
popoverAnchorId={data.popoverAnchorId as string}
|
|
160
159
|
/>
|
|
161
160
|
);
|
|
@@ -243,8 +242,7 @@ export const NavTreePlugin = (): PluginDefinition<NavTreePluginProvides> => {
|
|
|
243
242
|
},
|
|
244
243
|
properties: {
|
|
245
244
|
label: ['open commands label', { ns: NAVTREE_PLUGIN }],
|
|
246
|
-
icon:
|
|
247
|
-
iconSymbol: 'ph--magnifying-glass--regular',
|
|
245
|
+
icon: 'ph--magnifying-glass--regular',
|
|
248
246
|
keyBinding: {
|
|
249
247
|
macos: 'meta+k',
|
|
250
248
|
windows: 'ctrl+k',
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { DotOutline } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useMemo, useState } from 'react';
|
|
7
6
|
|
|
8
7
|
import { useIntentDispatcher, LayoutAction } from '@dxos/app-framework';
|
|
9
8
|
import { type ActionLike, isActionGroup, isAction } from '@dxos/app-graph';
|
|
10
9
|
import { Keyboard, keySymbols } from '@dxos/keyboard';
|
|
11
10
|
import { useGraph } from '@dxos/plugin-graph';
|
|
12
|
-
import { Button, Dialog, useTranslation, toLocalizedString } from '@dxos/react-ui';
|
|
11
|
+
import { Button, Dialog, Icon, useTranslation, toLocalizedString } from '@dxos/react-ui';
|
|
13
12
|
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
14
13
|
import { descriptionText, mx } from '@dxos/react-ui-theme';
|
|
15
14
|
import { getHostPlatform } from '@dxos/util';
|
|
@@ -70,7 +69,6 @@ export const CommandsDialogContent = ({ selected: initial }: { selected?: string
|
|
|
70
69
|
typeof action.properties.keyBinding === 'string'
|
|
71
70
|
? action.properties.keyBinding
|
|
72
71
|
: action.properties.keyBinding?.[getHostPlatform()];
|
|
73
|
-
const Icon = action.properties.icon ?? DotOutline;
|
|
74
72
|
return (
|
|
75
73
|
<SearchList.Item
|
|
76
74
|
value={label}
|
|
@@ -95,7 +93,7 @@ export const CommandsDialogContent = ({ selected: initial }: { selected?: string
|
|
|
95
93
|
disabled={action.properties.disabled}
|
|
96
94
|
{...(action.properties?.testId && { 'data-testid': action.properties.testId })}
|
|
97
95
|
>
|
|
98
|
-
<Icon
|
|
96
|
+
<Icon icon={action.properties.icon} size={4} />
|
|
99
97
|
<span className='grow truncate'>{label}</span>
|
|
100
98
|
{shortcut && <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>}
|
|
101
99
|
</SearchList.Item>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { DotsThreeVertical } from '@phosphor-icons/react';
|
|
6
5
|
import React, { Fragment } from 'react';
|
|
7
6
|
|
|
8
7
|
import { getGraph, type Node } from '@dxos/app-graph';
|
|
@@ -22,7 +21,6 @@ export const NavBarStart = ({ activeNode, popoverAnchorId }: { activeNode: Node;
|
|
|
22
21
|
? Popover.Anchor
|
|
23
22
|
: Fragment;
|
|
24
23
|
|
|
25
|
-
const Icon = activeNode.properties?.icon ?? DotsThreeVertical;
|
|
26
24
|
const graph = getGraph(activeNode);
|
|
27
25
|
const actions = graph.actions(activeNode);
|
|
28
26
|
const label = toLocalizedString(activeNode.properties?.label, t);
|
|
@@ -33,10 +31,10 @@ export const NavBarStart = ({ activeNode, popoverAnchorId }: { activeNode: Node;
|
|
|
33
31
|
<>
|
|
34
32
|
<ActionRoot>
|
|
35
33
|
<PlankHeading.ActionsMenu
|
|
36
|
-
|
|
34
|
+
icon={activeNode.properties?.icon ?? 'ph--dots-three-vertical--regular'}
|
|
37
35
|
attendableId={activeNode.id}
|
|
38
36
|
triggerLabel={menuTriggerLabel}
|
|
39
|
-
actions={actions}
|
|
37
|
+
actions={[actions]}
|
|
40
38
|
onAction={(action) =>
|
|
41
39
|
typeof action.data === 'function' && action.data({ node: action as Node, caller: TREE_ITEM_MAIN_HEADING })
|
|
42
40
|
}
|
|
@@ -4,17 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type ReactNode, useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
NavigationAction,
|
|
9
|
-
LayoutAction,
|
|
10
|
-
Surface,
|
|
11
|
-
SLUG_PATH_SEPARATOR,
|
|
12
|
-
SLUG_COLLECTION_INDICATOR,
|
|
13
|
-
useIntentDispatcher,
|
|
14
|
-
} from '@dxos/app-framework';
|
|
7
|
+
import { NavigationAction, Surface, useIntentDispatcher } from '@dxos/app-framework';
|
|
15
8
|
import { getGraph, isAction, isActionLike } from '@dxos/app-graph';
|
|
16
9
|
import { ElevationProvider, useMediaQuery, useSidebars } from '@dxos/react-ui';
|
|
17
|
-
import { type MosaicDropEvent, type MosaicMoveEvent, Path } from '@dxos/react-ui-mosaic';
|
|
10
|
+
import { type MosaicDropEvent, type MosaicMoveEvent, Mosaic, Path } from '@dxos/react-ui-mosaic';
|
|
18
11
|
import {
|
|
19
12
|
NavTree,
|
|
20
13
|
type NavTreeItemNode,
|
|
@@ -58,7 +51,8 @@ export const NavTreeContainer = ({
|
|
|
58
51
|
activeIds: Set<string>;
|
|
59
52
|
openItemIds: Record<string, true>;
|
|
60
53
|
onOpenItemIdsChange: (nextOpenItemIds: Record<string, true>) => void;
|
|
61
|
-
|
|
54
|
+
// TODO(wittjosiah): Use attention context directly?
|
|
55
|
+
attended: string[];
|
|
62
56
|
popoverAnchorId?: string;
|
|
63
57
|
}) => {
|
|
64
58
|
const { closeNavigationSidebar } = useSidebars(NAVTREE_PLUGIN);
|
|
@@ -96,19 +90,12 @@ export const NavTreeContainer = ({
|
|
|
96
90
|
await dispatch({
|
|
97
91
|
action: NavigationAction.OPEN,
|
|
98
92
|
data: {
|
|
99
|
-
activeParts:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
complementary: [`${node.id}${SLUG_PATH_SEPARATOR}comments${SLUG_COLLECTION_INDICATOR}`],
|
|
103
|
-
}
|
|
104
|
-
: {
|
|
105
|
-
main: [node.id],
|
|
106
|
-
},
|
|
93
|
+
activeParts: {
|
|
94
|
+
main: [node.id],
|
|
95
|
+
},
|
|
107
96
|
},
|
|
108
97
|
});
|
|
109
98
|
|
|
110
|
-
await dispatch({ action: LayoutAction.SCROLL_INTO_VIEW, data: { id: node.id } });
|
|
111
|
-
|
|
112
99
|
const defaultAction = actions?.find((action) => action.properties?.disposition === 'default');
|
|
113
100
|
if (isAction(defaultAction)) {
|
|
114
101
|
void (defaultAction.data as () => void)();
|
|
@@ -345,34 +332,37 @@ export const NavTreeContainer = ({
|
|
|
345
332
|
}, [onOpenItemIdsChange, openItemIds]);
|
|
346
333
|
|
|
347
334
|
return (
|
|
348
|
-
<
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
335
|
+
<Mosaic.Root>
|
|
336
|
+
<Mosaic.DragOverlay />
|
|
337
|
+
<ElevationProvider elevation='chrome'>
|
|
338
|
+
<div
|
|
339
|
+
role='none'
|
|
340
|
+
className='bs-full overflow-hidden row-span-3 grid grid-cols-1 grid-rows-[min-content_1fr_min-content]'
|
|
341
|
+
>
|
|
342
|
+
<Surface role='search-input' limit={1} />
|
|
343
|
+
{/* TODO(thure): what gives this an inline `overflow: initial`? */}
|
|
344
|
+
<div role='none' className='!overflow-y-auto'>
|
|
345
|
+
<NavTree
|
|
346
|
+
id={root.id}
|
|
347
|
+
items={items}
|
|
348
|
+
current={activeIds}
|
|
349
|
+
attended={attended}
|
|
350
|
+
type={NODE_TYPE}
|
|
351
|
+
open={openItemIds}
|
|
352
|
+
onNavigate={handleNavigate}
|
|
353
|
+
onItemOpenChange={handleItemOpenChange}
|
|
354
|
+
onMove={handleMove}
|
|
355
|
+
onDrop={handleDrop}
|
|
356
|
+
onDragEnd={handleDragEnd}
|
|
357
|
+
popoverAnchorId={popoverAnchorId}
|
|
358
|
+
renderPresence={renderPresence}
|
|
359
|
+
resolveItemLevel={resolveItemLevel}
|
|
360
|
+
loadDescendents={loadDescendents}
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
363
|
+
<NavTreeFooter />
|
|
373
364
|
</div>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
</ElevationProvider>
|
|
365
|
+
</ElevationProvider>
|
|
366
|
+
</Mosaic.Root>
|
|
377
367
|
);
|
|
378
368
|
};
|
|
@@ -35,7 +35,7 @@ const buttonStyles = 'pli-1.5 text-xs font-normal';
|
|
|
35
35
|
const repo = 'https://github.com/dxos/dxos';
|
|
36
36
|
|
|
37
37
|
export const NavTreeFooter = (props: { layoutPart?: LayoutPart }) => {
|
|
38
|
-
const layoutPart = useDefaultValue(props.layoutPart, 'sidebar');
|
|
38
|
+
const layoutPart = useDefaultValue(props.layoutPart, () => 'sidebar');
|
|
39
39
|
const config = useConfig();
|
|
40
40
|
const { t } = useTranslation(NAVTREE_PLUGIN);
|
|
41
41
|
const { navigationSidebarOpen } = useSidebars(NAVTREE_PLUGIN);
|
|
@@ -6,7 +6,7 @@ import { CaretRight, Circle, File, Folder, type Icon, type IconProps, Plus, User
|
|
|
6
6
|
import React, { type HTMLAttributes, type PropsWithChildren } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type ClassNameValue, type Size } from '@dxos/react-ui';
|
|
9
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
9
|
+
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
11
11
|
// TODO(burdon): Rounded border if first/last.
|
|
12
12
|
const styles = {
|
|
@@ -29,7 +29,7 @@ export const IconButton = ({
|
|
|
29
29
|
// TODO(burdon): Density aware.
|
|
30
30
|
return (
|
|
31
31
|
<div className={mx('flex w-6 h-6 items-center justify-center select-none', classNames)} onClick={onClick}>
|
|
32
|
-
<Icon
|
|
32
|
+
<Icon className={mx('cursor-pointer', getSize(size))} {...props} />
|
|
33
33
|
</div>
|
|
34
34
|
);
|
|
35
35
|
};
|
package/src/meta.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
|
+
|
|
5
7
|
export const NAVTREE_PLUGIN = 'dxos.org/plugin/navtree';
|
|
6
8
|
|
|
7
9
|
// TODO(wittjosiah): Factor out.
|
|
@@ -9,4 +11,4 @@ export const KEY_BINDING = 'KeyBinding';
|
|
|
9
11
|
|
|
10
12
|
export default {
|
|
11
13
|
id: NAVTREE_PLUGIN,
|
|
12
|
-
};
|
|
14
|
+
} satisfies PluginMeta;
|
|
@@ -8,7 +8,7 @@ import { batch } from '@preact/signals-core';
|
|
|
8
8
|
import React, { useMemo, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Graph } from '@dxos/app-graph';
|
|
11
|
-
import {
|
|
11
|
+
import { registerSignalsRuntime } from '@dxos/echo-signals/react';
|
|
12
12
|
import { faker } from '@dxos/random';
|
|
13
13
|
import { Treegrid } from '@dxos/react-ui';
|
|
14
14
|
import { Mosaic, Path, type MosaicDropEvent, type MosaicMoveEvent, type MosaicOperation } from '@dxos/react-ui-mosaic';
|
|
@@ -19,7 +19,7 @@ import { arrayMove } from '@dxos/util';
|
|
|
19
19
|
import { type NavTreeItemGraphNode, treeItemsFromRootNode } from '../util';
|
|
20
20
|
|
|
21
21
|
faker.seed(3);
|
|
22
|
-
|
|
22
|
+
registerSignalsRuntime();
|
|
23
23
|
|
|
24
24
|
const createGraph = () => {
|
|
25
25
|
const graph = new Graph();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport const NAVTREE_PLUGIN = 'dxos.org/plugin/navtree';\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n\nexport default {\n id: NAVTREE_PLUGIN,\n};\n"],
|
|
5
|
-
"mappings": ";AAIO,IAAMA,iBAAiB;AAGvB,IAAMC,cAAc;AAE3B,IAAA,eAAe;EACbC,IAAIF;AACN;",
|
|
6
|
-
"names": ["NAVTREE_PLUGIN", "KEY_BINDING", "id"]
|
|
7
|
-
}
|