@dxos/plugin-navtree 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/lib/neutral/{CommandsDialogContent-UBGIQ5FI.mjs → CommandsDialogContent-TEKBCQ3U.mjs} +3 -3
  2. package/dist/lib/neutral/CommandsDialogContent-TEKBCQ3U.mjs.map +7 -0
  3. package/dist/lib/neutral/{CommandsTrigger-BH5WLMHK.mjs → CommandsTrigger-HGCI22SP.mjs} +2 -2
  4. package/dist/lib/neutral/{CommandsTrigger-BH5WLMHK.mjs.map → CommandsTrigger-HGCI22SP.mjs.map} +3 -3
  5. package/dist/lib/neutral/{NavTreeContainer-6AR4BFDD.mjs → NavTreeContainer-QIWROTCL.mjs} +2 -2
  6. package/dist/lib/neutral/{NavTreeDocumentTitle-H3E6ZLYE.mjs → NavTreeDocumentTitle-RMERXZGK.mjs} +2 -2
  7. package/dist/lib/neutral/{NavTreeDocumentTitle-H3E6ZLYE.mjs.map → NavTreeDocumentTitle-RMERXZGK.mjs.map} +3 -3
  8. package/dist/lib/neutral/NavTreePlugin.mjs +2 -2
  9. package/dist/lib/neutral/NavTreePlugin.mjs.map +4 -4
  10. package/dist/lib/neutral/{app-graph-builder-Z347LKSF.mjs → app-graph-builder-2DYAIROU.mjs} +2 -2
  11. package/dist/lib/neutral/{app-graph-builder-Z347LKSF.mjs.map → app-graph-builder-2DYAIROU.mjs.map} +3 -3
  12. package/dist/lib/neutral/capabilities/index.mjs +3 -3
  13. package/dist/lib/neutral/{chunk-ZSWYB7JW.mjs → chunk-BAVI2K7A.mjs} +3 -3
  14. package/dist/lib/neutral/{chunk-ZSWYB7JW.mjs.map → chunk-BAVI2K7A.mjs.map} +3 -3
  15. package/dist/lib/neutral/{chunk-T7QS2EFI.mjs → chunk-EAN4K6OL.mjs} +2 -2
  16. package/dist/lib/neutral/chunk-IRQMJLRY.mjs +45 -0
  17. package/dist/lib/neutral/chunk-IRQMJLRY.mjs.map +7 -0
  18. package/dist/lib/neutral/{chunk-5OPDKH6B.mjs → chunk-UBVNITFG.mjs} +4 -4
  19. package/dist/lib/neutral/chunk-UBVNITFG.mjs.map +7 -0
  20. package/dist/lib/neutral/components/index.mjs +44 -37
  21. package/dist/lib/neutral/components/index.mjs.map +3 -3
  22. package/dist/lib/neutral/containers/index.mjs +5 -5
  23. package/dist/lib/neutral/{expose-26FV4W5D.mjs → expose-HIBA2NQG.mjs} +2 -2
  24. package/dist/lib/neutral/index.mjs +2 -2
  25. package/dist/lib/neutral/meta.json +1 -1
  26. package/dist/lib/neutral/meta.mjs +1 -1
  27. package/dist/lib/neutral/operations/index.mjs +1 -1
  28. package/dist/lib/neutral/plugin.mjs +2 -2
  29. package/dist/lib/neutral/{react-surface-Q5XMAG7Z.mjs → react-surface-N4EESW3L.mjs} +9 -12
  30. package/dist/lib/neutral/{react-surface-Q5XMAG7Z.mjs.map → react-surface-N4EESW3L.mjs.map} +3 -3
  31. package/dist/lib/neutral/{state-VVJEWUHM.mjs → state-PDZU4PIP.mjs} +2 -2
  32. package/dist/lib/neutral/state-PDZU4PIP.mjs.map +7 -0
  33. package/dist/lib/neutral/translations.mjs +1 -1
  34. package/dist/lib/neutral/translations.mjs.map +3 -3
  35. package/dist/lib/neutral/types/index.mjs +1 -1
  36. package/dist/types/dx.config.d.ts +28 -0
  37. package/dist/types/dx.config.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/index.d.ts +4 -4
  39. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  41. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  42. package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
  43. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
  44. package/dist/types/src/meta.d.ts +28 -2
  45. package/dist/types/src/meta.d.ts.map +1 -1
  46. package/dist/types/src/types/NavTreeCapabilities.d.ts.map +1 -1
  47. package/dist/types/src/types/NavTreeEvents.d.ts.map +1 -1
  48. package/dist/types/tsconfig.tsbuildinfo +1 -1
  49. package/dx.config.ts +31 -0
  50. package/package.json +33 -32
  51. package/src/NavTreePlugin.test.ts +1 -1
  52. package/src/NavTreePlugin.tsx +1 -1
  53. package/src/capabilities/app-graph-builder.ts +1 -1
  54. package/src/capabilities/react-surface.tsx +6 -13
  55. package/src/capabilities/state.ts +1 -1
  56. package/src/components/NavTree/NavTree.tsx +2 -1
  57. package/src/components/NavTreeItem/NavTreeItemAction.tsx +2 -2
  58. package/src/components/NavTreeItem/NavTreeItemColumns.tsx +5 -3
  59. package/src/components/Sidebar/L0Menu.tsx +4 -4
  60. package/src/components/Sidebar/L1Panel.tsx +5 -5
  61. package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +2 -2
  62. package/src/containers/CommandsTrigger/CommandsTrigger.tsx +1 -1
  63. package/src/containers/NavTreeContainer/NavTreeContainer.tsx +3 -3
  64. package/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx +1 -1
  65. package/src/meta.ts +3 -23
  66. package/src/translations.ts +1 -1
  67. package/src/types/NavTreeCapabilities.ts +1 -1
  68. package/src/types/NavTreeEvents.ts +1 -1
  69. package/dist/lib/neutral/CommandsDialogContent-UBGIQ5FI.mjs.map +0 -7
  70. package/dist/lib/neutral/chunk-5OPDKH6B.mjs.map +0 -7
  71. package/dist/lib/neutral/chunk-MDGKDQMZ.mjs +0 -37
  72. package/dist/lib/neutral/chunk-MDGKDQMZ.mjs.map +0 -7
  73. package/dist/lib/neutral/state-VVJEWUHM.mjs.map +0 -7
  74. /package/dist/lib/neutral/{NavTreeContainer-6AR4BFDD.mjs.map → NavTreeContainer-QIWROTCL.mjs.map} +0 -0
  75. /package/dist/lib/neutral/{chunk-T7QS2EFI.mjs.map → chunk-EAN4K6OL.mjs.map} +0 -0
  76. /package/dist/lib/neutral/{expose-26FV4W5D.mjs.map → expose-HIBA2NQG.mjs.map} +0 -0
@@ -14,7 +14,7 @@ import { osTranslations } from "@dxos/ui-theme";
14
14
  import { getHostPlatform } from "@dxos/util";
15
15
  import { KEY_BINDING, meta } from "#meta";
16
16
  var CommandsDialogContent = /* @__PURE__ */ forwardRef(({ selected: initial }, forwardedRef) => {
17
- const { t } = useTranslation(meta.id);
17
+ const { t } = useTranslation(meta.profile.key);
18
18
  const { invokePromise } = useOperationInvoker();
19
19
  const runAction = useActionRunner();
20
20
  const { graph } = useAppGraph();
@@ -57,7 +57,7 @@ var CommandsDialogContent = /* @__PURE__ */ forwardRef(({ selected: initial }, f
57
57
  }, /* @__PURE__ */ React.createElement(Dialog.Title, {
58
58
  srOnly: true
59
59
  }, t("commands-dialog.title", {
60
- ns: meta.id
60
+ ns: meta.profile.key
61
61
  })), /* @__PURE__ */ React.createElement(SearchList.Root, {
62
62
  onSearch: handleSearch
63
63
  }, /* @__PURE__ */ React.createElement(SearchList.Input, {
@@ -109,4 +109,4 @@ var CommandsDialogContent = /* @__PURE__ */ forwardRef(({ selected: initial }, f
109
109
  export {
110
110
  CommandsDialogContent as default
111
111
  };
112
- //# sourceMappingURL=CommandsDialogContent-UBGIQ5FI.mjs.map
112
+ //# sourceMappingURL=CommandsDialogContent-TEKBCQ3U.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/CommandsDialogContent/CommandsDialogContent.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { forwardRef, useMemo, useState } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { useAppGraph } from '@dxos/app-toolkit/ui';\nimport { Keyboard, keySymbols } from '@dxos/keyboard';\nimport { Graph, Node, useActionRunner } from '@dxos/plugin-graph';\nimport { useActions } from '@dxos/plugin-graph';\nimport { Button, Dialog, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { SearchList, useSearchListResults } from '@dxos/react-ui-search';\nimport { osTranslations } from '@dxos/ui-theme';\nimport { getHostPlatform } from '@dxos/util';\n\nimport { KEY_BINDING, meta } from '#meta';\n\nexport type CommandsDialogContentProps = {\n selected?: string;\n};\n\n// TODO(wittjosiah): This probably deserves its own plugin but for now it lives here w/ other navigation UI.\nexport const CommandsDialogContent = forwardRef<HTMLDivElement, CommandsDialogContentProps>(\n ({ selected: initial }, forwardedRef) => {\n const { t } = useTranslation(meta.profile.key);\n const { invokePromise } = useOperationInvoker();\n const runAction = useActionRunner();\n const { graph } = useAppGraph();\n const [selected, setSelected] = useState<string | undefined>(initial);\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: Node.ActionLike[] = [];\n Graph.traverse(graph, {\n relation: ['child', 'action'],\n visitor: (node, path) => {\n const isActionLike = Node.isAction(node) || Node.isActionGroup(node);\n const parentId = path.at(-2) ?? '';\n const matches = current === parentId || current.startsWith(parentId + '/');\n if (isActionLike && !actionMap.has(node.id) && matches) {\n actionMap.add(node.id);\n actions.push(node);\n }\n },\n });\n\n actions.sort((a, b) => {\n return toLocalizedString(a.properties.label, t)\n ?.toLowerCase()\n .localeCompare(toLocalizedString(b.properties.label, t)?.toLowerCase());\n });\n\n return actions;\n }, [graph]);\n\n const group = allActions.find(({ id }) => id === selected);\n const groupActions = useActions(graph, group?.id);\n const actions = Node.isActionGroup(group) ? groupActions : allActions;\n\n const { results, handleSearch } = useSearchListResults({\n items: actions,\n extract: (action) => toLocalizedString(action.properties.label, t),\n });\n\n return (\n <Dialog.Content ref={forwardedRef}>\n <Dialog.Title srOnly>{t('commands-dialog.title', { ns: meta.profile.key })}</Dialog.Title>\n <SearchList.Root onSearch={handleSearch}>\n <SearchList.Input placeholder={t('command-list-input.placeholder')} />\n <SearchList.Viewport>\n {results.map((action) => {\n const shortcut =\n typeof action.properties.keyBinding === 'string'\n ? action.properties.keyBinding\n : action.properties.keyBinding?.[getHostPlatform()];\n\n return (\n <SearchList.Item\n value={action.id}\n key={action.id}\n label={toLocalizedString(action.properties.label, t)}\n icon={action.properties.icon}\n suffix={shortcut ? keySymbols(shortcut).join('') : undefined}\n onSelect={() => {\n if (action.properties.disabled) {\n return;\n }\n\n if (Node.isActionGroup(action)) {\n setSelected(action.id);\n return;\n }\n\n void invokePromise(LayoutOperation.UpdateDialog, { state: false });\n setTimeout(() => {\n const lookupId = group?.id ?? action.id;\n const node = Graph.getConnections(graph, lookupId, Node.actionRelation('inbound'))[0];\n if (node && Node.isAction(action)) {\n void runAction(action, { parent: node, caller: KEY_BINDING });\n }\n });\n }}\n classNames='flex items-center gap-2'\n disabled={action.properties.disabled}\n {...(action.properties?.testId && {\n 'data-testid': action.properties.testId,\n })}\n />\n );\n })}\n </SearchList.Viewport>\n </SearchList.Root>\n <Dialog.ActionBar>\n <Dialog.Close asChild>\n <Button classNames='w-full'>{t('close.label', { ns: osTranslations })}</Button>\n </Dialog.Close>\n </Dialog.ActionBar>\n </Dialog.Content>\n );\n },\n);\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,YAAYC,SAASC,gBAAgB;AAErD,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,SAASC,UAAUC,kBAAkB;AACrC,SAASC,OAAOC,MAAMC,uBAAuB;AAC7C,SAASC,kBAAkB;AAC3B,SAASC,QAAQC,QAAQC,mBAAmBC,sBAAsB;AAClE,SAASC,YAAYC,4BAA4B;AACjD,SAASC,sBAAsB;AAC/B,SAASC,uBAAuB;AAEhC,SAASC,aAAaC,YAAY;AAO3B,IAAMC,wBAAwBtB,2BACnC,CAAC,EAAEuB,UAAUC,QAAO,GAAIC,iBAAAA;AACtB,QAAM,EAAEC,EAAC,IAAKX,eAAeM,KAAKM,QAAQC,GAAG;AAC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,MAAAA,GAAS;AACjC,iBAAKxC,UAAUwC,QAAQ;cAAE4B,QAAQvD;cAAMwD,QAAQ/E;YAAY,CAAA;UAC7D;QACF,CAAA;MACF;MACAgF,YAAW;MACXT,UAAUrB,OAAOX,WAAWgC;MAC3B,GAAIrB,OAAOX,YAAY0C,UAAU;QAChC,eAAe/B,OAAOX,WAAW0C;MACnC;;EAGN,CAAA,CAAA,CAAA,GAGJ,sBAAA,cAACxF,OAAOyF,WAAS,MACf,sBAAA,cAACzF,OAAO0F,OAAK;IAACC,SAAAA;KACZ,sBAAA,cAAC5F,QAAAA;IAAOwF,YAAW;KAAU1E,EAAE,eAAe;IAAEiD,IAAIzD;EAAe,CAAA,CAAA,CAAA,CAAA,CAAA;AAK7E,CAAA;",
6
+ "names": ["React", "forwardRef", "useMemo", "useState", "useOperationInvoker", "LayoutOperation", "useAppGraph", "Keyboard", "keySymbols", "Graph", "Node", "useActionRunner", "useActions", "Button", "Dialog", "toLocalizedString", "useTranslation", "SearchList", "useSearchListResults", "osTranslations", "getHostPlatform", "KEY_BINDING", "meta", "CommandsDialogContent", "selected", "initial", "forwardedRef", "t", "profile", "key", "invokePromise", "runAction", "graph", "setSelected", "allActions", "current", "singleton", "getCurrentContext", "actionMap", "Set", "actions", "traverse", "relation", "visitor", "node", "path", "isActionLike", "isAction", "isActionGroup", "parentId", "at", "matches", "startsWith", "has", "id", "add", "push", "sort", "a", "b", "properties", "label", "toLowerCase", "localeCompare", "group", "find", "groupActions", "results", "handleSearch", "items", "extract", "action", "Content", "ref", "Title", "srOnly", "ns", "Root", "onSearch", "Input", "placeholder", "Viewport", "map", "shortcut", "keyBinding", "Item", "value", "icon", "suffix", "join", "undefined", "onSelect", "disabled", "UpdateDialog", "state", "setTimeout", "lookupId", "getConnections", "actionRelation", "parent", "caller", "classNames", "testId", "ActionBar", "Close", "asChild"]
7
+ }
@@ -8,7 +8,7 @@ import { Button, Icon, useTranslation } from "@dxos/react-ui";
8
8
  import { COMMANDS_DIALOG, meta } from "#meta";
9
9
  var CommandsTrigger = () => {
10
10
  const { invokePromise } = useOperationInvoker();
11
- const { t } = useTranslation(meta.id);
11
+ const { t } = useTranslation(meta.profile.key);
12
12
  return /* @__PURE__ */ React.createElement(Button, {
13
13
  classNames: "m-1 px-1 lg:px-2",
14
14
  onClick: () => void invokePromise(LayoutOperation.UpdateDialog, {
@@ -24,4 +24,4 @@ var CommandsTrigger = () => {
24
24
  export {
25
25
  CommandsTrigger as default
26
26
  };
27
- //# sourceMappingURL=CommandsTrigger-BH5WLMHK.mjs.map
27
+ //# sourceMappingURL=CommandsTrigger-HGCI22SP.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/containers/CommandsTrigger/CommandsTrigger.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Button, Icon, useTranslation } from '@dxos/react-ui';\n\nimport { COMMANDS_DIALOG, meta } from '#meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { invokePromise } = useOperationInvoker();\n const { t } = useTranslation(meta.id);\n return (\n <Button\n classNames='m-1 px-1 lg:px-2'\n onClick={() =>\n void invokePromise(LayoutOperation.UpdateDialog, { subject: COMMANDS_DIALOG, blockAlign: 'start' })\n }\n >\n <span className='text-description font-normal grow text-start'>{t('command-list-input.placeholder')}</span>\n <Icon icon='ph--magnifying-glass--regular' />\n </Button>\n );\n};\n"],
5
- "mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,QAAQC,MAAMC,sBAAsB;AAE7C,SAASC,iBAAiBC,YAAY;AAG/B,IAAMC,kBAAkB,MAAA;AAC7B,QAAM,EAAEC,cAAa,IAAKR,oBAAAA;AAC1B,QAAM,EAAES,EAAC,IAAKL,eAAeE,KAAKI,EAAE;AACpC,SACE,sBAAA,cAACR,QAAAA;IACCS,YAAW;IACXC,SAAS,MACP,KAAKJ,cAAcP,gBAAgBY,cAAc;MAAEC,SAAST;MAAiBU,YAAY;IAAQ,CAAA;KAGnG,sBAAA,cAACC,QAAAA;IAAKC,WAAU;KAAgDR,EAAE,gCAAA,CAAA,GAClE,sBAAA,cAACN,MAAAA;IAAKe,MAAK;;AAGjB;",
6
- "names": ["React", "useOperationInvoker", "LayoutOperation", "Button", "Icon", "useTranslation", "COMMANDS_DIALOG", "meta", "CommandsTrigger", "invokePromise", "t", "id", "classNames", "onClick", "UpdateDialog", "subject", "blockAlign", "span", "className", "icon"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Button, Icon, useTranslation } from '@dxos/react-ui';\n\nimport { COMMANDS_DIALOG, meta } from '#meta';\n\n// TODO(thure): Refactor to be handled by a more appropriate plugin.\nexport const CommandsTrigger = () => {\n const { invokePromise } = useOperationInvoker();\n const { t } = useTranslation(meta.profile.key);\n return (\n <Button\n classNames='m-1 px-1 lg:px-2'\n onClick={() =>\n void invokePromise(LayoutOperation.UpdateDialog, { subject: COMMANDS_DIALOG, blockAlign: 'start' })\n }\n >\n <span className='text-description font-normal grow text-start'>{t('command-list-input.placeholder')}</span>\n <Icon icon='ph--magnifying-glass--regular' />\n </Button>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,QAAQC,MAAMC,sBAAsB;AAE7C,SAASC,iBAAiBC,YAAY;AAG/B,IAAMC,kBAAkB,MAAA;AAC7B,QAAM,EAAEC,cAAa,IAAKR,oBAAAA;AAC1B,QAAM,EAAES,EAAC,IAAKL,eAAeE,KAAKI,QAAQC,GAAG;AAC7C,SACE,sBAAA,cAACT,QAAAA;IACCU,YAAW;IACXC,SAAS,MACP,KAAKL,cAAcP,gBAAgBa,cAAc;MAAEC,SAASV;MAAiBW,YAAY;IAAQ,CAAA;KAGnG,sBAAA,cAACC,QAAAA;IAAKC,WAAU;KAAgDT,EAAE,gCAAA,CAAA,GAClE,sBAAA,cAACN,MAAAA;IAAKgB,MAAK;;AAGjB;",
6
+ "names": ["React", "useOperationInvoker", "LayoutOperation", "Button", "Icon", "useTranslation", "COMMANDS_DIALOG", "meta", "CommandsTrigger", "invokePromise", "t", "profile", "key", "classNames", "onClick", "UpdateDialog", "subject", "blockAlign", "span", "className", "icon"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NODE_TYPE,
3
3
  NavTreeContainer
4
- } from "./chunk-5OPDKH6B.mjs";
4
+ } from "./chunk-UBVNITFG.mjs";
5
5
  import "./chunk-JOSNCOV4.mjs";
6
6
  import "./chunk-J5LGTIGS.mjs";
7
7
  export {
@@ -9,4 +9,4 @@ export {
9
9
  NavTreeContainer,
10
10
  NavTreeContainer as default
11
11
  };
12
- //# sourceMappingURL=NavTreeContainer-6AR4BFDD.mjs.map
12
+ //# sourceMappingURL=NavTreeContainer-QIWROTCL.mjs.map
@@ -6,7 +6,7 @@ import { toLocalizedString, useTranslation } from "@dxos/react-ui";
6
6
  import { osTranslations } from "@dxos/ui-theme";
7
7
  import { meta } from "#meta";
8
8
  var NavTreeDocumentTitle = ({ node }) => {
9
- const { t } = useTranslation(meta.id);
9
+ const { t } = useTranslation(meta.profile.key);
10
10
  useEffect(() => {
11
11
  document.title = node ? toLocalizedString(node.properties.label, t) : t("current-app.name", {
12
12
  ns: osTranslations
@@ -19,4 +19,4 @@ var NavTreeDocumentTitle = ({ node }) => {
19
19
  export {
20
20
  NavTreeDocumentTitle as default
21
21
  };
22
- //# sourceMappingURL=NavTreeDocumentTitle-H3E6ZLYE.mjs.map
22
+ //# sourceMappingURL=NavTreeDocumentTitle-RMERXZGK.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx"],
4
- "sourcesContent": ["//\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';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\n\nexport const NavTreeDocumentTitle = ({ node }: { node?: Node.Node }) => {\n const { t } = useTranslation(meta.id);\n useEffect(() => {\n document.title = node ? toLocalizedString(node.properties.label, t) : t('current-app.name', { ns: osTranslations });\n }, [node?.properties?.label]);\n return null;\n};\n"],
5
- "mappings": ";;;AAGA,SAASA,iBAAiB;AAG1B,SAASC,mBAAmBC,sBAAsB;AAClD,SAASC,sBAAsB;AAE/B,SAASC,YAAY;AAEd,IAAMC,uBAAuB,CAAC,EAAEC,KAAI,MAAwB;AACjE,QAAM,EAAEC,EAAC,IAAKL,eAAeE,KAAKI,EAAE;AACpCR,YAAU,MAAA;AACRS,aAASC,QAAQJ,OAAOL,kBAAkBK,KAAKK,WAAWC,OAAOL,CAAAA,IAAKA,EAAE,oBAAoB;MAAEM,IAAIV;IAAe,CAAA;EACnH,GAAG;IAACG,MAAMK,YAAYC;GAAM;AAC5B,SAAO;AACT;",
6
- "names": ["useEffect", "toLocalizedString", "useTranslation", "osTranslations", "meta", "NavTreeDocumentTitle", "node", "t", "id", "document", "title", "properties", "label", "ns"]
4
+ "sourcesContent": ["//\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';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { meta } from '#meta';\n\nexport const NavTreeDocumentTitle = ({ node }: { node?: Node.Node }) => {\n const { t } = useTranslation(meta.profile.key);\n useEffect(() => {\n document.title = node ? toLocalizedString(node.properties.label, t) : t('current-app.name', { ns: osTranslations });\n }, [node?.properties?.label]);\n return null;\n};\n"],
5
+ "mappings": ";;;AAGA,SAASA,iBAAiB;AAG1B,SAASC,mBAAmBC,sBAAsB;AAClD,SAASC,sBAAsB;AAE/B,SAASC,YAAY;AAEd,IAAMC,uBAAuB,CAAC,EAAEC,KAAI,MAAwB;AACjE,QAAM,EAAEC,EAAC,IAAKL,eAAeE,KAAKI,QAAQC,GAAG;AAC7CT,YAAU,MAAA;AACRU,aAASC,QAAQL,OAAOL,kBAAkBK,KAAKM,WAAWC,OAAON,CAAAA,IAAKA,EAAE,oBAAoB;MAAEO,IAAIX;IAAe,CAAA;EACnH,GAAG;IAACG,MAAMM,YAAYC;GAAM;AAC5B,SAAO;AACT;",
6
+ "names": ["useEffect", "toLocalizedString", "useTranslation", "osTranslations", "meta", "NavTreeDocumentTitle", "node", "t", "profile", "key", "document", "title", "properties", "label", "ns"]
7
7
  }
@@ -10,7 +10,7 @@ import { meta } from "#meta";
10
10
  import { translations } from "#translations";
11
11
  import { NavTreeEvents } from "#types";
12
12
 
13
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-navtree/PLUGIN.mdl?raw
13
+ // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-navtree/PLUGIN.mdl
14
14
  var PLUGIN_default = "---\nid: org.dxos.plugin.navtree\nname: NavTreePlugin\nversion: 0.1.0\n---\n\nHierarchical navigation sidebar for `DXOS` Composer \u2014 renders the application graph as a collapsible tree, manages workspace tabs, exposes keyboard-driven command search, and handles drag-and-drop rearrangement of spaces, folders, and objects.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype NavTreeItemState\n fields:\n open: boolean # whether the tree node is expanded\n current: boolean # whether the node is in the active layout\n```\n\n```mdl\ntype KeyBinding\n fields:\n macos?: string\n windows?: string\n linux?: string\n ios?: string\n unknown?: string\n```\n\n```mdl\ntype NodeProperties\n fields:\n label: Label\n icon?: string\n iconHue?: string\n role?: string\n error?: string\n modified?: boolean\n palette?: string\n disabled?: boolean\n testId?: string\n position?: Position\n className?: string\n keyBinding?: string | KeyBinding\n persistenceClass?: string\n persistenceKey?: string\n```\n\n## Components\n\n```mdl\ncomponent NavTree\n desc: Root navigation tree that renders workspace tabs at the top level and a collapsible subtree for the active workspace.\n props:\n id: string # root node id (Node.RootId)\n root: Node # root of the application graph\n tab: string # currently active workspace tab id\n open: boolean # whether the navigation sidebar is open\n state:\n model: NavTreeModel # live tree model built from graph connections\n slots:\n itemEnd?: ReactNode # per-item trailing content (e.g. action badges)\n actions:\n openChange(item: Node, path: string[], open: boolean)\n tabChange(node: Node)\n select(item: Node, path: string[], option: boolean)\n back()\n itemHover(item: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 workspace tabs \u2502\n \u2502 [tab] [tab] [tab] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 collapsible tree \u2502\n \u2502 \u25BE Space \u2502\n \u2502 \u25BE Folder \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent NavTreeContainer\n desc: Smart container that wires the NavTree to the app graph, layout state, and drag-and-drop monitor.\n props:\n tab: string\n popoverAnchorId?: string\n state:\n layout: LayoutState # active items, sidebar open/closed, mode\n model: NavTreeModel\n actions:\n handleSelect(item: Node, path: string[], option: boolean)\n handleOpenChange(item: Node, path: string[], open: boolean)\n handleTabChange(node: Node)\n handleBack()\n handleDrop(source: TreeData, target: TreeData, instruction: Instruction)\n emits:\n onNavigate(subject: string | string[])\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 NavTreeContext.Provider \u2502\n \u2502 \u2514\u2500 NavTree \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsDialogContent\n desc: Full-screen command palette dialog \u2014 surfaces all graph actions, searchable by label.\n props:\n onClose?: () => void\n state:\n query: string\n results: Node[]\n actions:\n search(query: string) \u2192 Node[]\n execute(node: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [search input] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 result list \u2502\n \u2502 icon label shortcut \u2502\n \u2502 icon label \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsTrigger\n desc: Search-input surface slot component \u2014 opens the commands dialog on click or \u2318K / Ctrl+K.\n slots:\n (none)\n actions:\n openCommandsDialog()\n```\n\n## Operations\n\n```mdl\nop expose\n desc: Expands tree nodes along the path to a subject and marks each as open so the item becomes visible in the NavTree.\n input:\n subject: string # attendable DXN or node id\n output: void\n effects: [echo:read]\n note: |\n Resolves the full ancestor path via expandAttendableId, calls Graph.expand per node,\n then sets each path segment open in NavTreeCapabilities.State.\n```\n\n## Features\n\n```mdl\nfeat F-1: Sidebar Navigation\n\n req F-1.1: NavTree renders all root-level graph connections as workspace tabs.\n req F-1.2:\n when: user selects a workspace tab\n then: LayoutOperation.SwitchWorkspace is invoked; subtree for that workspace is expanded\n req F-1.3:\n when: sidebar is closed and user selects a workspace tab\n then: sidebar opens (state transitions to expanded)\n req F-1.4:\n when: same active tab is clicked while sidebar is expanded\n then: sidebar collapses (state transitions to collapsed or closed on mobile)\n```\n\n```mdl\nfeat F-2: Tree Expand / Collapse\n\n req F-2.1: Tree items with children show an expand/collapse toggle.\n req F-2.2:\n when: user expands a node\n then: open state persisted to localStorage keyed by path; Graph.expand called for the node\n req F-2.3:\n when: plugin initialises after layout is ready\n then: all paths previously marked open are re-expanded from localStorage\n req F-2.4:\n when: op:expose is called\n then: all ancestors of the subject are expanded and marked open\n```\n\n```mdl\nfeat F-3: Item Selection\n\n req F-3.1:\n when: user selects a non-current item\n then: LayoutOperation.Open (single mode) or LayoutOperation.Set (multi mode) is invoked\n req F-3.2:\n when: user option-clicks a currently active item\n then: LayoutOperation.Close is invoked for that item\n req F-3.3:\n when: user clicks a currently active item without option key\n then: LayoutOperation.ScrollIntoView is invoked\n req F-3.4:\n when: item has a default disposition action\n then: that action is run after navigation\n req F-3.5:\n when: navigation succeeds on mobile\n then: sidebar is closed automatically\n```\n\n```mdl\nfeat F-4: Drag and Drop\n\n req F-4.1: NavTree items can be dragged to rearrange within the same parent.\n req F-4.2: NavTree items can be dragged to copy or transfer to a different parent.\n req F-4.3:\n when: drop instruction is rearrange\n then: onRearrange callback on the parent node is called with the new order\n req F-4.4:\n when: drop instruction is copy\n then: onCopy callback on the target node is called\n req F-4.5:\n when: drop instruction is transfer\n then: onTransferStart and onTransferEnd callbacks are called on source and target parents\n req F-4.6:\n when: target node reports blockInstruction for an instruction type\n then: that instruction is blocked and the drop is not applied\n```\n\n```mdl\nfeat F-5: Keyboard Shortcuts\n\n req F-5.1: NavTree plugin registers keyboard shortcuts for all graph actions that declare a keyBinding property.\n req F-5.2: Graph is traversed on change (debounced 500 ms) to bind newly added shortcuts.\n req F-5.3: The commands dialog is opened via \u2318K (macOS) / Ctrl+K (Windows/Linux).\n req F-5.4:\n when: plugin deactivates\n then: Keyboard.singleton is destroyed and all shortcuts are unregistered\n```\n\n```mdl\nfeat F-6: State Persistence\n\n req F-6.1: Per-path open/current state is stored in an atom family keyed by path string.\n req F-6.2: Open state (not current) is persisted to localStorage on every change.\n req F-6.3: Current state reflects active layout items and is never persisted.\n req F-6.4:\n when: layout.active changes\n then: removed items are marked not-current; newly active items are marked current\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Workspace tab switch\n given: two workspace tabs exist in the graph\n when: user clicks the second workspace tab\n then:\n - LayoutOperation.SwitchWorkspace is invoked with the tab's node id\n - sidebar transitions to expanded\n - subtree for the selected workspace is expanded\n```\n\n```mdl\ntest T-2: Tree node expand persists\n given: NavTree is rendered with a collapsed folder node\n when: user expands the folder\n then:\n - folder node state.open === true\n - localStorage entry updated for the folder's path\n - Graph.expand called for the folder node id\n```\n\n```mdl\ntest T-3: Expose navigates to nested item\n given: a deeply nested object id is active in the layout\n when: op:expose is called with that object id\n then:\n - all ancestor paths are marked open\n - Graph.expand is called for each ancestor\n```\n\n```mdl\ntest T-4: Select item in single mode\n given: layout.mode === single, item not currently active\n when: user selects a tree item\n then: LayoutOperation.Open is invoked with the item id\n```\n\n```mdl\ntest T-5: Command palette opens on keyboard shortcut\n given: NavTree is active\n when: user presses \u2318K (macOS) or Ctrl+K (Windows)\n then:\n - CommandsDialogContent is shown in the layout dialog slot\n - search input is focused\n```\n\n```mdl\ntest T-6: Drag-and-drop rearrange\n given: two sibling items in the same folder\n when: user drags the first item below the second\n then:\n - onRearrange callback is called with the reordered array\n - tree re-renders with the new order\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n";
15
15
 
16
16
  // src/NavTreePlugin.tsx
@@ -54,7 +54,7 @@ var NavTreePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
54
54
  activate: Keyboard
55
55
  }), AppPlugin.addPluginAssetModule({
56
56
  asset: {
57
- pluginId: meta.id,
57
+ pluginId: meta.profile.key,
58
58
  path: "PLUGIN.mdl",
59
59
  content: PLUGIN_default,
60
60
  mimeType: "application/x-mdl"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/NavTreePlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-navtree/PLUGIN.mdl?raw"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';\nimport { Graph } from '@dxos/plugin-graph';\n\nimport { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { NavTreeEvents } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'state',\n activatesOn: AppActivationEvents.LayoutReady,\n firesAfterActivation: [NavTreeEvents.StateReady],\n activate: State,\n }),\n Plugin.addModule({\n id: 'expose',\n activatesOn: ActivationEvent.allOf(\n ActivationEvents.ProcessManagerReady,\n AppActivationEvents.AppGraphReady,\n AppActivationEvents.LayoutReady,\n NavTreeEvents.StateReady,\n ),\n activate: Effect.fnUntraced(function* () {\n const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n if (invokePromise && layout.active.length === 1) {\n // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.\n // That is the point at which the graph is expanded and the path should be available.\n void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })\n .then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))\n .catch(() => {});\n }\n\n return [];\n }),\n }),\n Plugin.addModule({\n id: 'keyboard',\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.ProcessManagerReady),\n activate: Keyboard,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default NavTreePlugin;\n", "---\nid: org.dxos.plugin.navtree\nname: NavTreePlugin\nversion: 0.1.0\n---\n\nHierarchical navigation sidebar for `DXOS` Composer \u2014 renders the application graph as a collapsible tree, manages workspace tabs, exposes keyboard-driven command search, and handles drag-and-drop rearrangement of spaces, folders, and objects.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype NavTreeItemState\n fields:\n open: boolean # whether the tree node is expanded\n current: boolean # whether the node is in the active layout\n```\n\n```mdl\ntype KeyBinding\n fields:\n macos?: string\n windows?: string\n linux?: string\n ios?: string\n unknown?: string\n```\n\n```mdl\ntype NodeProperties\n fields:\n label: Label\n icon?: string\n iconHue?: string\n role?: string\n error?: string\n modified?: boolean\n palette?: string\n disabled?: boolean\n testId?: string\n position?: Position\n className?: string\n keyBinding?: string | KeyBinding\n persistenceClass?: string\n persistenceKey?: string\n```\n\n## Components\n\n```mdl\ncomponent NavTree\n desc: Root navigation tree that renders workspace tabs at the top level and a collapsible subtree for the active workspace.\n props:\n id: string # root node id (Node.RootId)\n root: Node # root of the application graph\n tab: string # currently active workspace tab id\n open: boolean # whether the navigation sidebar is open\n state:\n model: NavTreeModel # live tree model built from graph connections\n slots:\n itemEnd?: ReactNode # per-item trailing content (e.g. action badges)\n actions:\n openChange(item: Node, path: string[], open: boolean)\n tabChange(node: Node)\n select(item: Node, path: string[], option: boolean)\n back()\n itemHover(item: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 workspace tabs \u2502\n \u2502 [tab] [tab] [tab] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 collapsible tree \u2502\n \u2502 \u25BE Space \u2502\n \u2502 \u25BE Folder \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent NavTreeContainer\n desc: Smart container that wires the NavTree to the app graph, layout state, and drag-and-drop monitor.\n props:\n tab: string\n popoverAnchorId?: string\n state:\n layout: LayoutState # active items, sidebar open/closed, mode\n model: NavTreeModel\n actions:\n handleSelect(item: Node, path: string[], option: boolean)\n handleOpenChange(item: Node, path: string[], open: boolean)\n handleTabChange(node: Node)\n handleBack()\n handleDrop(source: TreeData, target: TreeData, instruction: Instruction)\n emits:\n onNavigate(subject: string | string[])\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 NavTreeContext.Provider \u2502\n \u2502 \u2514\u2500 NavTree \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsDialogContent\n desc: Full-screen command palette dialog \u2014 surfaces all graph actions, searchable by label.\n props:\n onClose?: () => void\n state:\n query: string\n results: Node[]\n actions:\n search(query: string) \u2192 Node[]\n execute(node: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [search input] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 result list \u2502\n \u2502 icon label shortcut \u2502\n \u2502 icon label \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsTrigger\n desc: Search-input surface slot component \u2014 opens the commands dialog on click or \u2318K / Ctrl+K.\n slots:\n (none)\n actions:\n openCommandsDialog()\n```\n\n## Operations\n\n```mdl\nop expose\n desc: Expands tree nodes along the path to a subject and marks each as open so the item becomes visible in the NavTree.\n input:\n subject: string # attendable DXN or node id\n output: void\n effects: [echo:read]\n note: |\n Resolves the full ancestor path via expandAttendableId, calls Graph.expand per node,\n then sets each path segment open in NavTreeCapabilities.State.\n```\n\n## Features\n\n```mdl\nfeat F-1: Sidebar Navigation\n\n req F-1.1: NavTree renders all root-level graph connections as workspace tabs.\n req F-1.2:\n when: user selects a workspace tab\n then: LayoutOperation.SwitchWorkspace is invoked; subtree for that workspace is expanded\n req F-1.3:\n when: sidebar is closed and user selects a workspace tab\n then: sidebar opens (state transitions to expanded)\n req F-1.4:\n when: same active tab is clicked while sidebar is expanded\n then: sidebar collapses (state transitions to collapsed or closed on mobile)\n```\n\n```mdl\nfeat F-2: Tree Expand / Collapse\n\n req F-2.1: Tree items with children show an expand/collapse toggle.\n req F-2.2:\n when: user expands a node\n then: open state persisted to localStorage keyed by path; Graph.expand called for the node\n req F-2.3:\n when: plugin initialises after layout is ready\n then: all paths previously marked open are re-expanded from localStorage\n req F-2.4:\n when: op:expose is called\n then: all ancestors of the subject are expanded and marked open\n```\n\n```mdl\nfeat F-3: Item Selection\n\n req F-3.1:\n when: user selects a non-current item\n then: LayoutOperation.Open (single mode) or LayoutOperation.Set (multi mode) is invoked\n req F-3.2:\n when: user option-clicks a currently active item\n then: LayoutOperation.Close is invoked for that item\n req F-3.3:\n when: user clicks a currently active item without option key\n then: LayoutOperation.ScrollIntoView is invoked\n req F-3.4:\n when: item has a default disposition action\n then: that action is run after navigation\n req F-3.5:\n when: navigation succeeds on mobile\n then: sidebar is closed automatically\n```\n\n```mdl\nfeat F-4: Drag and Drop\n\n req F-4.1: NavTree items can be dragged to rearrange within the same parent.\n req F-4.2: NavTree items can be dragged to copy or transfer to a different parent.\n req F-4.3:\n when: drop instruction is rearrange\n then: onRearrange callback on the parent node is called with the new order\n req F-4.4:\n when: drop instruction is copy\n then: onCopy callback on the target node is called\n req F-4.5:\n when: drop instruction is transfer\n then: onTransferStart and onTransferEnd callbacks are called on source and target parents\n req F-4.6:\n when: target node reports blockInstruction for an instruction type\n then: that instruction is blocked and the drop is not applied\n```\n\n```mdl\nfeat F-5: Keyboard Shortcuts\n\n req F-5.1: NavTree plugin registers keyboard shortcuts for all graph actions that declare a keyBinding property.\n req F-5.2: Graph is traversed on change (debounced 500 ms) to bind newly added shortcuts.\n req F-5.3: The commands dialog is opened via \u2318K (macOS) / Ctrl+K (Windows/Linux).\n req F-5.4:\n when: plugin deactivates\n then: Keyboard.singleton is destroyed and all shortcuts are unregistered\n```\n\n```mdl\nfeat F-6: State Persistence\n\n req F-6.1: Per-path open/current state is stored in an atom family keyed by path string.\n req F-6.2: Open state (not current) is persisted to localStorage on every change.\n req F-6.3: Current state reflects active layout items and is never persisted.\n req F-6.4:\n when: layout.active changes\n then: removed items are marked not-current; newly active items are marked current\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Workspace tab switch\n given: two workspace tabs exist in the graph\n when: user clicks the second workspace tab\n then:\n - LayoutOperation.SwitchWorkspace is invoked with the tab's node id\n - sidebar transitions to expanded\n - subtree for the selected workspace is expanded\n```\n\n```mdl\ntest T-2: Tree node expand persists\n given: NavTree is rendered with a collapsed folder node\n when: user expands the folder\n then:\n - folder node state.open === true\n - localStorage entry updated for the folder's path\n - Graph.expand called for the folder node id\n```\n\n```mdl\ntest T-3: Expose navigates to nested item\n given: a deeply nested object id is active in the layout\n when: op:expose is called with that object id\n then:\n - all ancestor paths are marked open\n - Graph.expand is called for each ancestor\n```\n\n```mdl\ntest T-4: Select item in single mode\n given: layout.mode === single, item not currently active\n when: user selects a tree item\n then: LayoutOperation.Open is invoked with the item id\n```\n\n```mdl\ntest T-5: Command palette opens on keyboard shortcut\n given: NavTree is active\n when: user presses \u2318K (macOS) or Ctrl+K (Windows)\n then:\n - CommandsDialogContent is shown in the layout dialog slot\n - search input is focused\n```\n\n```mdl\ntest T-6: Drag-and-drop rearrange\n given: two sibling items in the same folder\n when: user drags the first item below the second\n then:\n - onRearrange callback is called with the reordered array\n - tree re-renders with the new order\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,YAAYC,cAAc;AACpF,SAASC,qBAAqBC,iBAAiBC,WAAWC,uBAAuB;AACjF,SAASC,aAAa;AAEtB,SAASC,iBAAiBC,UAAUC,kBAAkBC,cAAcC,aAAa;AACjF,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;;;ACb9B;;;ADkBO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,0BAA0B;EAAEF,UAAUG;AAAiB,CAAA,GACjEL,UAAUM,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDP,UAAUQ,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cb,OAAOc,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBC;EACjCC,sBAAsB;IAACC,cAAcC;;EACrCf,UAAUgB;AACZ,CAAA,GACAtB,OAAOc,UAAU;EACfC,IAAI;EACJC,aAAaO,gBAAgBC,MAC3BC,iBAAiBC,qBACjBT,oBAAoBU,eACpBV,oBAAoBC,aACpBE,cAAcC,UAAU;EAE1Bf,UAAiBsB,kBAAW,aAAA;AAC1B,UAAMC,SAAS,OAAOC,aAAaC,aAAaC,gBAAgBC,MAAM;AACtE,UAAM,EAAEC,cAAa,IAAK,OAAOC,WAAWC,IAAIN,aAAaO,gBAAgB;AAC7E,UAAM,EAAEC,MAAK,IAAK,OAAOH,WAAWC,IAAIJ,gBAAgBO,QAAQ;AAChE,QAAIL,iBAAiBL,OAAOW,OAAOC,WAAW,GAAG;AAG/C,WAAKC,MAAMC,YAAYL,OAAO;QAAEM,QAAQf,OAAOW,OAAO,CAAA;MAAG,GAAG;QAAEK,SAAS;MAAO,CAAA,EAC3EC,KAAK,MAAMZ,cAAca,gBAAgBC,QAAQ;QAAEC,SAASpB,OAAOW,OAAO,CAAA;MAAG,CAAA,CAAA,EAC7EU,MAAM,MAAA;MAAO,CAAA;IAClB;AAEA,WAAO,CAAA;EACT,CAAA;AACF,CAAA,GACAlD,OAAOc,UAAU;EACfC,IAAI;EACJC,aAAaO,gBAAgBC,MAAMP,oBAAoBU,eAAeF,iBAAiBC,mBAAmB;EAC1GpB,UAAU6C;AACZ,CAAA,GACA/C,UAAUgD,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUpD,KAAKa;IAAIwC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACA1D,OAAO2D,IAAI;AAGb,IAAA,wBAAe5D;",
6
- "names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppCapabilities", "AppPlugin", "LayoutOperation", "Graph", "AppGraphBuilder", "Keyboard", "OperationHandler", "ReactSurface", "State", "meta", "translations", "NavTreeEvents", "NavTreePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationHandlerModule", "OperationHandler", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "id", "activatesOn", "AppActivationEvents", "LayoutReady", "firesAfterActivation", "NavTreeEvents", "StateReady", "State", "ActivationEvent", "allOf", "ActivationEvents", "ProcessManagerReady", "AppGraphReady", "fnUntraced", "layout", "Capabilities", "getAtomValue", "AppCapabilities", "Layout", "invokePromise", "Capability", "get", "OperationInvoker", "graph", "AppGraph", "active", "length", "Graph", "waitForPath", "target", "timeout", "then", "LayoutOperation", "Expose", "subject", "catch", "Keyboard", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make"]
3
+ "sources": ["../../../src/NavTreePlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-navtree/PLUGIN.mdl"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';\nimport { Graph } from '@dxos/plugin-graph';\n\nimport { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { NavTreeEvents } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'state',\n activatesOn: AppActivationEvents.LayoutReady,\n firesAfterActivation: [NavTreeEvents.StateReady],\n activate: State,\n }),\n Plugin.addModule({\n id: 'expose',\n activatesOn: ActivationEvent.allOf(\n ActivationEvents.ProcessManagerReady,\n AppActivationEvents.AppGraphReady,\n AppActivationEvents.LayoutReady,\n NavTreeEvents.StateReady,\n ),\n activate: Effect.fnUntraced(function* () {\n const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n if (invokePromise && layout.active.length === 1) {\n // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.\n // That is the point at which the graph is expanded and the path should be available.\n void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })\n .then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))\n .catch(() => {});\n }\n\n return [];\n }),\n }),\n Plugin.addModule({\n id: 'keyboard',\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.ProcessManagerReady),\n activate: Keyboard,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default NavTreePlugin;\n", "---\nid: org.dxos.plugin.navtree\nname: NavTreePlugin\nversion: 0.1.0\n---\n\nHierarchical navigation sidebar for `DXOS` Composer \u2014 renders the application graph as a collapsible tree, manages workspace tabs, exposes keyboard-driven command search, and handles drag-and-drop rearrangement of spaces, folders, and objects.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype NavTreeItemState\n fields:\n open: boolean # whether the tree node is expanded\n current: boolean # whether the node is in the active layout\n```\n\n```mdl\ntype KeyBinding\n fields:\n macos?: string\n windows?: string\n linux?: string\n ios?: string\n unknown?: string\n```\n\n```mdl\ntype NodeProperties\n fields:\n label: Label\n icon?: string\n iconHue?: string\n role?: string\n error?: string\n modified?: boolean\n palette?: string\n disabled?: boolean\n testId?: string\n position?: Position\n className?: string\n keyBinding?: string | KeyBinding\n persistenceClass?: string\n persistenceKey?: string\n```\n\n## Components\n\n```mdl\ncomponent NavTree\n desc: Root navigation tree that renders workspace tabs at the top level and a collapsible subtree for the active workspace.\n props:\n id: string # root node id (Node.RootId)\n root: Node # root of the application graph\n tab: string # currently active workspace tab id\n open: boolean # whether the navigation sidebar is open\n state:\n model: NavTreeModel # live tree model built from graph connections\n slots:\n itemEnd?: ReactNode # per-item trailing content (e.g. action badges)\n actions:\n openChange(item: Node, path: string[], open: boolean)\n tabChange(node: Node)\n select(item: Node, path: string[], option: boolean)\n back()\n itemHover(item: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 workspace tabs \u2502\n \u2502 [tab] [tab] [tab] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 collapsible tree \u2502\n \u2502 \u25BE Space \u2502\n \u2502 \u25BE Folder \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2502 \u2022 Object \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent NavTreeContainer\n desc: Smart container that wires the NavTree to the app graph, layout state, and drag-and-drop monitor.\n props:\n tab: string\n popoverAnchorId?: string\n state:\n layout: LayoutState # active items, sidebar open/closed, mode\n model: NavTreeModel\n actions:\n handleSelect(item: Node, path: string[], option: boolean)\n handleOpenChange(item: Node, path: string[], open: boolean)\n handleTabChange(node: Node)\n handleBack()\n handleDrop(source: TreeData, target: TreeData, instruction: Instruction)\n emits:\n onNavigate(subject: string | string[])\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 NavTreeContext.Provider \u2502\n \u2502 \u2514\u2500 NavTree \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsDialogContent\n desc: Full-screen command palette dialog \u2014 surfaces all graph actions, searchable by label.\n props:\n onClose?: () => void\n state:\n query: string\n results: Node[]\n actions:\n search(query: string) \u2192 Node[]\n execute(node: Node)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [search input] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 result list \u2502\n \u2502 icon label shortcut \u2502\n \u2502 icon label \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent CommandsTrigger\n desc: Search-input surface slot component \u2014 opens the commands dialog on click or \u2318K / Ctrl+K.\n slots:\n (none)\n actions:\n openCommandsDialog()\n```\n\n## Operations\n\n```mdl\nop expose\n desc: Expands tree nodes along the path to a subject and marks each as open so the item becomes visible in the NavTree.\n input:\n subject: string # attendable DXN or node id\n output: void\n effects: [echo:read]\n note: |\n Resolves the full ancestor path via expandAttendableId, calls Graph.expand per node,\n then sets each path segment open in NavTreeCapabilities.State.\n```\n\n## Features\n\n```mdl\nfeat F-1: Sidebar Navigation\n\n req F-1.1: NavTree renders all root-level graph connections as workspace tabs.\n req F-1.2:\n when: user selects a workspace tab\n then: LayoutOperation.SwitchWorkspace is invoked; subtree for that workspace is expanded\n req F-1.3:\n when: sidebar is closed and user selects a workspace tab\n then: sidebar opens (state transitions to expanded)\n req F-1.4:\n when: same active tab is clicked while sidebar is expanded\n then: sidebar collapses (state transitions to collapsed or closed on mobile)\n```\n\n```mdl\nfeat F-2: Tree Expand / Collapse\n\n req F-2.1: Tree items with children show an expand/collapse toggle.\n req F-2.2:\n when: user expands a node\n then: open state persisted to localStorage keyed by path; Graph.expand called for the node\n req F-2.3:\n when: plugin initialises after layout is ready\n then: all paths previously marked open are re-expanded from localStorage\n req F-2.4:\n when: op:expose is called\n then: all ancestors of the subject are expanded and marked open\n```\n\n```mdl\nfeat F-3: Item Selection\n\n req F-3.1:\n when: user selects a non-current item\n then: LayoutOperation.Open (single mode) or LayoutOperation.Set (multi mode) is invoked\n req F-3.2:\n when: user option-clicks a currently active item\n then: LayoutOperation.Close is invoked for that item\n req F-3.3:\n when: user clicks a currently active item without option key\n then: LayoutOperation.ScrollIntoView is invoked\n req F-3.4:\n when: item has a default disposition action\n then: that action is run after navigation\n req F-3.5:\n when: navigation succeeds on mobile\n then: sidebar is closed automatically\n```\n\n```mdl\nfeat F-4: Drag and Drop\n\n req F-4.1: NavTree items can be dragged to rearrange within the same parent.\n req F-4.2: NavTree items can be dragged to copy or transfer to a different parent.\n req F-4.3:\n when: drop instruction is rearrange\n then: onRearrange callback on the parent node is called with the new order\n req F-4.4:\n when: drop instruction is copy\n then: onCopy callback on the target node is called\n req F-4.5:\n when: drop instruction is transfer\n then: onTransferStart and onTransferEnd callbacks are called on source and target parents\n req F-4.6:\n when: target node reports blockInstruction for an instruction type\n then: that instruction is blocked and the drop is not applied\n```\n\n```mdl\nfeat F-5: Keyboard Shortcuts\n\n req F-5.1: NavTree plugin registers keyboard shortcuts for all graph actions that declare a keyBinding property.\n req F-5.2: Graph is traversed on change (debounced 500 ms) to bind newly added shortcuts.\n req F-5.3: The commands dialog is opened via \u2318K (macOS) / Ctrl+K (Windows/Linux).\n req F-5.4:\n when: plugin deactivates\n then: Keyboard.singleton is destroyed and all shortcuts are unregistered\n```\n\n```mdl\nfeat F-6: State Persistence\n\n req F-6.1: Per-path open/current state is stored in an atom family keyed by path string.\n req F-6.2: Open state (not current) is persisted to localStorage on every change.\n req F-6.3: Current state reflects active layout items and is never persisted.\n req F-6.4:\n when: layout.active changes\n then: removed items are marked not-current; newly active items are marked current\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Workspace tab switch\n given: two workspace tabs exist in the graph\n when: user clicks the second workspace tab\n then:\n - LayoutOperation.SwitchWorkspace is invoked with the tab's node id\n - sidebar transitions to expanded\n - subtree for the selected workspace is expanded\n```\n\n```mdl\ntest T-2: Tree node expand persists\n given: NavTree is rendered with a collapsed folder node\n when: user expands the folder\n then:\n - folder node state.open === true\n - localStorage entry updated for the folder's path\n - Graph.expand called for the folder node id\n```\n\n```mdl\ntest T-3: Expose navigates to nested item\n given: a deeply nested object id is active in the layout\n when: op:expose is called with that object id\n then:\n - all ancestor paths are marked open\n - Graph.expand is called for each ancestor\n```\n\n```mdl\ntest T-4: Select item in single mode\n given: layout.mode === single, item not currently active\n when: user selects a tree item\n then: LayoutOperation.Open is invoked with the item id\n```\n\n```mdl\ntest T-5: Command palette opens on keyboard shortcut\n given: NavTree is active\n when: user presses \u2318K (macOS) or Ctrl+K (Windows)\n then:\n - CommandsDialogContent is shown in the layout dialog slot\n - search input is focused\n```\n\n```mdl\ntest T-6: Drag-and-drop rearrange\n given: two sibling items in the same folder\n when: user drags the first item below the second\n then:\n - onRearrange callback is called with the reordered array\n - tree re-renders with the new order\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,YAAYC,cAAc;AACpF,SAASC,qBAAqBC,iBAAiBC,WAAWC,uBAAuB;AACjF,SAASC,aAAa;AAEtB,SAASC,iBAAiBC,UAAUC,kBAAkBC,cAAcC,aAAa;AACjF,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;;;ACb9B;;;ADkBO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAg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IAAI;AAGb,IAAA,wBAAe9D;",
6
+ "names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppCapabilities", "AppPlugin", "LayoutOperation", "Graph", "AppGraphBuilder", "Keyboard", "OperationHandler", "ReactSurface", "State", "meta", "translations", "NavTreeEvents", "NavTreePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationHandlerModule", "OperationHandler", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "id", "activatesOn", "AppActivationEvents", "LayoutReady", "firesAfterActivation", "NavTreeEvents", "StateReady", "State", "ActivationEvent", "allOf", "ActivationEvents", "ProcessManagerReady", "AppGraphReady", "fnUntraced", "layout", "Capabilities", "getAtomValue", "AppCapabilities", "Layout", "invokePromise", "Capability", "get", "OperationInvoker", "graph", "AppGraph", "active", "length", "Graph", "waitForPath", "target", "timeout", "then", "LayoutOperation", "Expose", "subject", "catch", "Keyboard", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
7
7
  }
@@ -22,7 +22,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
22
22
  label: [
23
23
  "open-commands.label",
24
24
  {
25
- ns: meta.id
25
+ ns: meta.profile.key
26
26
  }
27
27
  ],
28
28
  icon: "ph--magnifying-glass--regular",
@@ -39,4 +39,4 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
39
39
  export {
40
40
  app_graph_builder_default as default
41
41
  };
42
- //# sourceMappingURL=app-graph-builder-Z347LKSF.mjs.map
42
+ //# sourceMappingURL=app-graph-builder-2DYAIROU.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { COMMANDS_DIALOG, meta } from '#meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n Node.makeAction({\n id: COMMANDS_DIALOG,\n data: () =>\n Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: COMMANDS_DIALOG,\n blockAlign: 'start',\n }),\n properties: {\n label: ['open-commands.label', { ns: meta.id }],\n icon: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'meta+k',\n windows: 'ctrl+k',\n },\n },\n }),\n ]),\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAC1B,SAASC,cAAcC,MAAMC,mBAAmB;AAEhD,SAASC,iBAAiBC,YAAY;AAEtC,IAAA,4BAAeR,WAAWS,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOP,aAAaQ,gBAAgB;IACrDC,IAAI;IACJC,OAAOR,YAAYS;IACnBC,SAAS,MACAC,eAAQ;MACbZ,KAAKa,WAAW;QACdL,IAAIN;QACJY,MAAM,MACJhB,UAAUiB,OAAOlB,gBAAgBmB,cAAc;UAC7CC,SAASf;UACTgB,YAAY;QACd,CAAA;QACFC,YAAY;UACVC,OAAO;YAAC;YAAuB;cAAEC,IAAIlB,KAAKK;YAAG;;UAC7Cc,MAAM;UACNC,YAAY;YACVC,OAAO;YACPC,SAAS;UACX;QACF;MACF,CAAA;KACD;EACL,CAAA;AAEA,SAAO9B,WAAW+B,YAAY9B,gBAAgB+B,iBAAiBrB,UAAAA;AACjE,CAAA,CAAA;",
6
- "names": ["Effect", "Capability", "AppCapabilities", "LayoutOperation", "Operation", "GraphBuilder", "Node", "NodeMatcher", "COMMANDS_DIALOG", "meta", "makeModule", "fnUntraced", "extensions", "createExtension", "id", "match", "whenRoot", "actions", "succeed", "makeAction", "data", "invoke", "UpdateDialog", "subject", "blockAlign", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { COMMANDS_DIALOG, meta } from '#meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n Node.makeAction({\n id: COMMANDS_DIALOG,\n data: () =>\n Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: COMMANDS_DIALOG,\n blockAlign: 'start',\n }),\n properties: {\n label: ['open-commands.label', { ns: meta.profile.key }],\n icon: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'meta+k',\n windows: 'ctrl+k',\n },\n },\n }),\n ]),\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAC1B,SAASC,cAAcC,MAAMC,mBAAmB;AAEhD,SAASC,iBAAiBC,YAAY;AAEtC,IAAA,4BAAeR,WAAWS,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOP,aAAaQ,gBAAgB;IACrDC,IAAI;IACJC,OAAOR,YAAYS;IACnBC,SAAS,MACAC,eAAQ;MACbZ,KAAKa,WAAW;QACdL,IAAIN;QACJY,MAAM,MACJhB,UAAUiB,OAAOlB,gBAAgBmB,cAAc;UAC7CC,SAASf;UACTgB,YAAY;QACd,CAAA;QACFC,YAAY;UACVC,OAAO;YAAC;YAAuB;cAAEC,IAAIlB,KAAKmB,QAAQC;YAAI;;UACtDC,MAAM;UACNC,YAAY;YACVC,OAAO;YACPC,SAAS;UACX;QACF;MACF,CAAA;KACD;EACL,CAAA;AAEA,SAAOhC,WAAWiC,YAAYhC,gBAAgBiC,iBAAiBvB,UAAAA;AACjE,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "AppCapabilities", "LayoutOperation", "Operation", "GraphBuilder", "Node", "NodeMatcher", "COMMANDS_DIALOG", "meta", "makeModule", "fnUntraced", "extensions", "createExtension", "id", "match", "whenRoot", "actions", "succeed", "makeAction", "data", "invoke", "UpdateDialog", "subject", "blockAlign", "properties", "label", "ns", "profile", "key", "icon", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
7
7
  }
@@ -2,11 +2,11 @@ import "../chunk-J5LGTIGS.mjs";
2
2
 
3
3
  // src/capabilities/index.ts
4
4
  import { Capability } from "@dxos/app-framework";
5
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-Z347LKSF.mjs"));
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-2DYAIROU.mjs"));
6
6
  var Keyboard = Capability.lazy("Keyboard", () => import("../keyboard-EJ65BVTC.mjs"));
7
7
  var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-ORDOJUL2.mjs"));
8
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-Q5XMAG7Z.mjs"));
9
- var State = Capability.lazy("State", () => import("../state-VVJEWUHM.mjs"));
8
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-N4EESW3L.mjs"));
9
+ var State = Capability.lazy("State", () => import("../state-PDZU4PIP.mjs"));
10
10
  export {
11
11
  AppGraphBuilder,
12
12
  Keyboard,
@@ -9,7 +9,7 @@ __export(NavTreeCapabilities_exports, {
9
9
  });
10
10
  import { Capability } from "@dxos/app-framework";
11
11
  import { meta } from "#meta";
12
- var State = Capability.make(`${meta.id}.capability.state`);
12
+ var State = Capability.make(`${meta.profile.key}.capability.state`);
13
13
 
14
14
  // src/types/NavTreeEvents.ts
15
15
  var NavTreeEvents_exports = {};
@@ -18,10 +18,10 @@ __export(NavTreeEvents_exports, {
18
18
  });
19
19
  import { AppActivationEvents } from "@dxos/app-toolkit";
20
20
  import { meta as meta2 } from "#meta";
21
- var StateReady = AppActivationEvents.createStateEvent(meta2.id);
21
+ var StateReady = AppActivationEvents.createStateEvent(meta2.profile.key);
22
22
 
23
23
  export {
24
24
  NavTreeCapabilities_exports,
25
25
  NavTreeEvents_exports
26
26
  };
27
- //# sourceMappingURL=chunk-ZSWYB7JW.mjs.map
27
+ //# sourceMappingURL=chunk-BAVI2K7A.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/NavTreeCapabilities.ts", "../../../src/types/NavTreeEvents.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport type NavTreeItemState = { open: boolean; current: boolean };\n\nexport type NavTreeStateStore = {\n getItem: (path: string[]) => NavTreeItemState;\n getItemAtom: (path: string[]) => Atom.Atom<NavTreeItemState>;\n setItem: (path: string[], key: 'open' | 'current', next: boolean) => void;\n};\n\nexport const State = Capability.make<NavTreeStateStore>(`${meta.id}.capability.state`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);\n"],
5
- "mappings": ";;;;;AAAA;;;;AAQA,SAASA,kBAAkB;AAE3B,SAASC,YAAY;AAUd,IAAMC,QAAQF,WAAWG,KAAwB,GAAGF,KAAKG,EAAE,mBAAmB;;;ACpBrF;;;;AAOA,SAASC,2BAA2B;AAEpC,SAASC,QAAAA,aAAY;AAEd,IAAMC,aAA8CF,oBAAoBG,iBAAiBF,MAAKG,EAAE;",
6
- "names": ["Capability", "meta", "State", "make", "id", "AppActivationEvents", "meta", "StateReady", "createStateEvent", "id"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport type NavTreeItemState = { open: boolean; current: boolean };\n\nexport type NavTreeStateStore = {\n getItem: (path: string[]) => NavTreeItemState;\n getItemAtom: (path: string[]) => Atom.Atom<NavTreeItemState>;\n setItem: (path: string[], key: 'open' | 'current', next: boolean) => void;\n};\n\nexport const State = Capability.make<NavTreeStateStore>(`${meta.profile.key}.capability.state`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.profile.key);\n"],
5
+ "mappings": ";;;;;AAAA;;;;AAQA,SAASA,kBAAkB;AAE3B,SAASC,YAAY;AAUd,IAAMC,QAAQF,WAAWG,KAAwB,GAAGF,KAAKG,QAAQC,GAAG,mBAAmB;;;ACpB9F;;;;AAOA,SAASC,2BAA2B;AAEpC,SAASC,QAAAA,aAAY;AAEd,IAAMC,aAA8CF,oBAAoBG,iBAAiBF,MAAKG,QAAQC,GAAG;",
6
+ "names": ["Capability", "meta", "State", "make", "profile", "key", "AppActivationEvents", "meta", "StateReady", "createStateEvent", "profile", "key"]
7
7
  }
@@ -1,8 +1,8 @@
1
1
  // src/operations/index.ts
2
2
  import { OperationHandlerSet } from "@dxos/compute";
3
- var NavTreeOperationHandlerSet = OperationHandlerSet.lazy(() => import("./expose-26FV4W5D.mjs"));
3
+ var NavTreeOperationHandlerSet = OperationHandlerSet.lazy(() => import("./expose-HIBA2NQG.mjs"));
4
4
 
5
5
  export {
6
6
  NavTreeOperationHandlerSet
7
7
  };
8
- //# sourceMappingURL=chunk-T7QS2EFI.mjs.map
8
+ //# sourceMappingURL=chunk-EAN4K6OL.mjs.map
@@ -0,0 +1,45 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { DXN } from "@dxos/keys";
4
+
5
+ // dx.config.ts
6
+ import { Config2 } from "@dxos/app-framework/config";
7
+ import { trim } from "@dxos/util";
8
+ var dx_config_default = Config2.make({
9
+ plugin: {
10
+ key: "org.dxos.plugin.navtree",
11
+ name: "Navtree",
12
+ author: "DXOS",
13
+ description: trim`
14
+ NavTreePlugin renders the application graph as a collapsible hierarchical tree in the Composer sidebar.
15
+ It manages workspace tabs at the root level and provides expand/collapse navigation for spaces, folders,
16
+ and objects, with open/current state persisted to localStorage across sessions.
17
+
18
+ The plugin wires drag-and-drop rearrangement and cross-parent transfer of tree items via Pragmatic DnD,
19
+ and registers graph-action keyboard shortcuts (including the ⌘K / Ctrl+K command palette) through a
20
+ global Keyboard singleton that tracks context as the user navigates.
21
+
22
+ An operation handler for LayoutOperation.Expose expands ancestor paths on demand so that any
23
+ programmatically activated item is scrolled into view in the tree.
24
+
25
+ A commands dialog surfaces all discoverable graph actions as a searchable palette, making it the primary
26
+ keyboard-first entry point for power users.
27
+ `,
28
+ spec: "PLUGIN.mdl",
29
+ tags: [
30
+ "system"
31
+ ]
32
+ }
33
+ });
34
+
35
+ // src/meta.ts
36
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
37
+ var KEY_BINDING = "KeyBinding";
38
+ var COMMANDS_DIALOG = DXN.make(`${meta.profile.key}.commandsDialog`);
39
+
40
+ export {
41
+ meta,
42
+ KEY_BINDING,
43
+ COMMANDS_DIALOG
44
+ };
45
+ //# sourceMappingURL=chunk-IRQMJLRY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n\n// TODO(wittjosiah): Factor out.\nexport const KEY_BINDING = 'KeyBinding';\n// TODO(wittjosiah): Factor out.\nexport const COMMANDS_DIALOG = DXN.make(`${meta.profile.key}.commandsDialog`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.navtree',\n name: 'Navtree',\n author: 'DXOS',\n description: trim`\n NavTreePlugin renders the application graph as a collapsible hierarchical tree in the Composer sidebar.\n It manages workspace tabs at the root level and provides expand/collapse navigation for spaces, folders,\n and objects, with open/current state persisted to localStorage across sessions.\n\n The plugin wires drag-and-drop rearrangement and cross-parent transfer of tree items via Pragmatic DnD,\n and registers graph-action keyboard shortcuts (including the ⌘K / Ctrl+K command palette) through a\n global Keyboard singleton that tracks context as the user navigates.\n\n An operation handler for LayoutOperation.Expose expands ancestor paths on demand so that any\n programmatically activated item is scrolled into view in the tree.\n\n A commands dialog surfaces all discoverable graph actions as a searchable palette, making it the primary\n keyboard-first entry point for power users.\n `,\n spec: 'PLUGIN.mdl',\n tags: ['system'],\n },\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;;;ACDpB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;IAebO,MAAM;IACNC,MAAM;MAAC;;EACT;AACF,CAAA;;;ADrBO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;AAGtC,IAAMC,cAAc;AAEpB,IAAMC,kBAAkBC,IAAIC,KAAK,GAAGP,KAAKQ,QAAQC,GAAG,iBAAiB;",
6
+ "names": ["Plugin", "DXN", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "spec", "tags", "meta", "Plugin", "getMetaFromConfig", "config", "KEY_BINDING", "COMMANDS_DIALOG", "DXN", "make", "profile", "key"]
7
+ }
@@ -10,7 +10,7 @@ import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/ad
10
10
  import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef } from "react";
11
11
  import { Surface, useOperationInvoker } from "@dxos/app-framework/ui";
12
12
  import { LayoutOperation } from "@dxos/app-toolkit";
13
- import { useAppGraph, useLayout } from "@dxos/app-toolkit/ui";
13
+ import { AppSurface, useAppGraph, useLayout } from "@dxos/app-toolkit/ui";
14
14
  import { Graph, Node, useActionRunner } from "@dxos/plugin-graph";
15
15
  import { useMediaQuery, useSidebars } from "@dxos/react-ui";
16
16
  import { isTreeData } from "@dxos/react-ui-list";
@@ -30,7 +30,7 @@ var NavTreeItemEnd = ({ node, open }) => {
30
30
  open
31
31
  ]);
32
32
  return /* @__PURE__ */ React.createElement(Surface.Surface, {
33
- role: "navtree-item-end",
33
+ type: AppSurface.NavtreeItemEnd,
34
34
  data,
35
35
  limit: 1
36
36
  });
@@ -46,7 +46,7 @@ var NavTreeContainer$ = /* @__PURE__ */ forwardRef(({ tab, popoverAnchorId }, fo
46
46
  const { getItem, setItem } = useNavTreeState();
47
47
  const layout = useLayout();
48
48
  const model = useNavTreeModel(Node.RootId);
49
- const { navigationSidebarState } = useSidebars(meta.id);
49
+ const { navigationSidebarState } = useSidebars(meta.profile.key);
50
50
  const latestRef = useRef({
51
51
  tab,
52
52
  activeItems: layout.active,
@@ -270,4 +270,4 @@ export {
270
270
  NODE_TYPE,
271
271
  NavTreeContainer
272
272
  };
273
- //# sourceMappingURL=chunk-5OPDKH6B.mjs.map
273
+ //# sourceMappingURL=chunk-UBVNITFG.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/NavTreeContainer/NavTreeContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Instruction, extractInstruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { Surface, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { AppSurface, useAppGraph, useLayout } from '@dxos/app-toolkit/ui';\nimport { Graph, Node, useActionRunner } from '@dxos/plugin-graph';\nimport { useMediaQuery, useSidebars } from '@dxos/react-ui';\nimport { type TreeData, isTreeData } from '@dxos/react-ui-list';\nimport { arrayMove } from '@dxos/util';\n\nimport { NAV_TREE_ITEM, NavTree, NavTreeContext } from '#components';\nimport { useNavTreeModel, useNavTreeState } from '#hooks';\nimport { meta } from '#meta';\nimport { type NavTreeItemGraphNode } from '#types';\n\nimport { filterItems, getParent, resolveMigrationOperation } from '../../util';\n\n// TODO(thure): Is NavTree truly authoritative in this regard?\nexport const NODE_TYPE = 'dxos/app-graph/node';\n\n// TODO(wittjosiah): Avoid using Surface within the navtree, prefer declarative data flow.\nconst NavTreeItemEnd = ({ node, open }: { node: Node.Node; open: boolean }) => {\n const data = useMemo(() => ({ id: node.id, subject: node.data, open }), [node.id, node.data, open]);\n return <Surface.Surface type={AppSurface.NavtreeItemEnd} data={data} limit={1} />;\n};\n\nconst getItems = (graph: Graph.ReadableGraph, node?: Node.Node, disposition?: string) => {\n return Graph.getConnections(graph, node?.id ?? Node.RootId, 'child').filter((node) => filterItems(node, disposition));\n};\n\nexport type NavTreeContainerProps = {\n popoverAnchorId?: string;\n tab: string;\n};\n\nexport const NavTreeContainer$ = forwardRef<HTMLDivElement, NavTreeContainerProps>(\n ({ tab, popoverAnchorId }, forwardedRef) => {\n const [isLg] = useMediaQuery('lg');\n const { invokePromise } = useOperationInvoker();\n const runAction = useActionRunner();\n const { graph } = useAppGraph();\n const { getItem, setItem } = useNavTreeState();\n const layout = useLayout();\n const model = useNavTreeModel(Node.RootId);\n const { navigationSidebarState } = useSidebars(meta.profile.key);\n const latestRef = useRef({\n tab,\n activeItems: layout.active,\n navigationSidebarState,\n isLg,\n });\n\n useEffect(() => {\n latestRef.current = {\n tab,\n activeItems: layout.active,\n navigationSidebarState,\n isLg,\n };\n }, [tab, layout.active, navigationSidebarState, isLg]);\n\n const handleOpenChange = useCallback(\n ({ item: { id }, path, open }: { item: Node.Node; path: string[]; open: boolean }) => {\n // TODO(thure): This might become a localstorage leak; openItemIds that no longer exist should be removed from this map.\n setItem(path, 'open', open);\n Graph.expand(graph, id, 'child');\n },\n [graph, setItem],\n );\n\n const handleTabChange = useCallback(\n (node: NavTreeItemGraphNode) => {\n Graph.expand(graph, node.id, 'child');\n\n const {\n tab: activeTab,\n activeItems,\n navigationSidebarState: currentSidebarState,\n isLg: latestIsLg,\n } = latestRef.current;\n void invokePromise(LayoutOperation.UpdateSidebar, {\n state:\n node.id === activeTab\n ? currentSidebarState === 'expanded'\n ? latestIsLg\n ? 'collapsed'\n : 'closed'\n : 'expanded'\n : 'expanded',\n });\n\n void invokePromise(LayoutOperation.SwitchWorkspace, { subject: node.id });\n\n // Open the first item if the workspace is empty.\n if (activeItems.length === 0) {\n const [item] = getItems(graph, node).filter((node) => !Node.isActionLike(node));\n if (item && item.data) {\n if (layout.mode === 'multi') {\n void invokePromise(LayoutOperation.Set, { subject: [item.id] });\n } else {\n void invokePromise(LayoutOperation.Open, { subject: [item.id] });\n }\n }\n }\n },\n [invokePromise, graph, layout.mode],\n );\n\n const blockInstruction = useCallback(\n ({ instruction, source, target }: { instruction: Instruction; source: TreeData; target: TreeData }) => {\n return target.item.properties.blockInstruction?.(source, instruction) ?? false;\n },\n [],\n );\n\n const canDrop = useCallback(({ source, target }: { source: TreeData; target: TreeData }) => {\n return target.item.properties.canDrop?.(source) ?? false;\n }, []);\n\n const canSelect = useCallback(({ item }: { item: Node.Node }) => {\n return item.properties.selectable ?? true;\n }, []);\n\n const handleSelect = useCallback(\n ({ item: node, path, option }: { item: Node.Node; path: string[]; option: boolean }) => {\n if (!node.data) {\n return;\n }\n\n if (Node.isAction(node)) {\n const [parent] = Graph.getConnections(graph, node.id, Node.childRelation('inbound'));\n if (parent) {\n void runAction(node, { parent, path, caller: NAV_TREE_ITEM });\n }\n return;\n }\n\n const current = getItem(path).current;\n if (!current) {\n if (layout.mode === 'multi') {\n void invokePromise(LayoutOperation.Set, { subject: [node.id] });\n } else {\n void invokePromise(LayoutOperation.Open, { subject: [node.id], key: node.properties.key });\n }\n } else if (option) {\n void invokePromise(LayoutOperation.Close, { subject: [node.id] });\n } else {\n void invokePromise(LayoutOperation.ScrollIntoView, { subject: node.id });\n }\n\n const defaultAction = Graph.getActions(graph, node.id).find(\n (action) => action.properties?.disposition === 'default',\n );\n if (Node.isAction(defaultAction)) {\n void runAction(defaultAction);\n }\n\n if (!isLg) {\n void invokePromise(LayoutOperation.UpdateSidebar, { state: 'closed' });\n }\n },\n [graph, invokePromise, getItem, runAction, isLg, layout.mode],\n );\n\n const handleBack = useCallback(() => void invokePromise(LayoutOperation.RevertWorkspace), [invokePromise]);\n\n // TODO(wittjosiah): Factor out hook.\n useEffect(() => {\n return monitorForElements({\n canMonitor: ({ source }) => isTreeData(source.data),\n onDrop: ({ location, source }) => {\n // Didn't drop on anything.\n if (!location.current.dropTargets.length) {\n return;\n }\n const target = location.current.dropTargets[0];\n const instruction: Instruction | null = extractInstruction(target.data);\n if (instruction !== null && instruction.type !== 'instruction-blocked') {\n const sourceNode = source.data.item as NavTreeItemGraphNode;\n const targetNode = target.data.item as NavTreeItemGraphNode;\n const sourcePath = source.data.path as string[];\n const targetPath = target.data.path as string[];\n const sameParent = sourcePath.slice(0, -1).join() === targetPath.slice(0, -1).join();\n const operation =\n sameParent && instruction.type !== 'make-child'\n ? 'rearrange'\n : resolveMigrationOperation(graph, sourceNode, targetPath, targetNode);\n const sourceParent = getParent(graph, sourceNode, sourcePath);\n const targetParent = getParent(graph, targetNode, targetPath);\n const sourceItems = getItems(graph, sourceParent);\n const targetItems = getItems(graph, targetParent);\n const sourceIndex = sourceItems.findIndex(({ id }) => id === sourceNode.id);\n const targetIndex = targetItems.findIndex(({ id }) => id === targetNode.id);\n const migrationIndex =\n instruction.type === 'make-child'\n ? undefined\n : instruction.type === 'reorder-below'\n ? targetIndex + 1\n : targetIndex;\n switch (operation) {\n case 'rearrange': {\n const nextItems = sourceItems.map(({ data }) => data);\n arrayMove(nextItems, sourceIndex, targetIndex);\n void sourceNode.properties.onRearrange?.(nextItems);\n break;\n }\n case 'copy': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n void target?.properties.onCopy?.(sourceNode, migrationIndex);\n break;\n }\n case 'transfer': {\n const target = instruction.type === 'make-child' ? targetNode : targetParent;\n if (!target?.properties.onTransferStart || target?.id === sourceParent?.id) {\n break;\n }\n void target?.properties.onTransferStart(sourceNode, migrationIndex);\n void sourceParent?.properties.onTransferEnd?.(sourceNode, target);\n break;\n }\n }\n }\n },\n });\n }, [graph]);\n\n const onItemHover = useCallback(({ item }: { item: Node.Node }) => Graph.expand(graph, item.id, 'child'), [graph]);\n\n const navTreeContextValue = useMemo(\n () => ({\n model,\n popoverAnchorId,\n renderItemEnd: NavTreeItemEnd,\n blockInstruction,\n canDrop,\n canSelect,\n onBack: handleBack,\n onOpenChange: handleOpenChange,\n onSelect: handleSelect,\n onTabChange: handleTabChange,\n onItemHover,\n }),\n [\n model,\n popoverAnchorId,\n blockInstruction,\n canDrop,\n canSelect,\n handleBack,\n handleOpenChange,\n handleSelect,\n handleTabChange,\n onItemHover,\n ],\n );\n\n return (\n <NavTreeContext.Provider value={navTreeContextValue}>\n <NavTree id={Node.RootId} root={Graph.getRoot(graph)} tab={tab} open={layout.sidebarOpen} ref={forwardedRef} />\n </NavTreeContext.Provider>\n );\n },\n);\n\nexport const NavTreeContainer = memo(NavTreeContainer$);\n"],
5
+ "mappings": ";;;;;;;AAIA,SAA2BA,0BAA0B;AACrD,SAASC,0BAA0B;AACnC,OAAOC,SAASC,YAAYC,MAAMC,aAAaC,WAAWC,SAASC,cAAc;AAEjF,SAASC,SAASC,2BAA2B;AAC7C,SAASC,uBAAuB;AAChC,SAASC,YAAYC,aAAaC,iBAAiB;AACnD,SAASC,OAAOC,MAAMC,uBAAuB;AAC7C,SAASC,eAAeC,mBAAmB;AAC3C,SAAwBC,kBAAkB;AAC1C,SAASC,iBAAiB;AAE1B,SAASC,eAAeC,SAASC,sBAAsB;AACvD,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,YAAY;AAMd,IAAMC,YAAY;AAGzB,IAAMC,iBAAiB,CAAC,EAAEC,MAAMC,KAAI,MAAsC;AACxE,QAAMC,OAAOC,QAAQ,OAAO;IAAEC,IAAIJ,KAAKI;IAAIC,SAASL,KAAKE;IAAMD;EAAK,IAAI;IAACD,KAAKI;IAAIJ,KAAKE;IAAMD;GAAK;AAClG,SAAO,sBAAA,cAACK,QAAQA,SAAO;IAACC,MAAMC,WAAWC;IAAgBP;IAAYQ,OAAO;;AAC9E;AAEA,IAAMC,WAAW,CAACC,OAA4BZ,MAAkBa,gBAAAA;AAC9D,SAAOC,MAAMC,eAAeH,OAAOZ,MAAMI,MAAMY,KAAKC,QAAQ,OAAA,EAASC,OAAO,CAAClB,UAASmB,YAAYnB,OAAMa,WAAAA,CAAAA;AAC1G;AAOO,IAAMO,oBAAoBC,2BAC/B,CAAC,EAAEC,KAAK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WiD,SAASvB,YAAYiB,cAAAA;AAC7C;YACF;YACA,KAAK,YAAY;AACf,oBAAM5C,UAASF,YAAY9D,SAAS,eAAe4F,aAAaU;AAChE,kBAAI,CAACtC,SAAQC,WAAWkD,mBAAmBnD,SAAQnE,OAAOuG,cAAcvG,IAAI;AAC1E;cACF;AACA,mBAAKmE,SAAQC,WAAWkD,gBAAgBxB,YAAYiB,cAAAA;AACpD,mBAAKR,cAAcnC,WAAWmD,gBAAgBzB,YAAY3B,OAAAA;AAC1D;YACF;UACF;QACF;MACF;IACF,CAAA;EACF,GAAG;IAAC3D;GAAM;AAEV,QAAMgH,cAAczE,YAAY,CAAC,EAAEC,KAAI,MAA4BtC,MAAMwC,OAAO1C,OAAOwC,KAAKhD,IAAI,OAAA,GAAU;IAACQ;GAAM;AAEjH,QAAMiH,sBAAsB1H,QAC1B,OAAO;IACLkC;IACAd;IACAuG,eAAe/H;IACfqE;IACAK;IACAC;IACAqD,QAAQtC;IACRuC,cAAc9E;IACd+E,UAAUrD;IACVsD,aAAa3E;IACbqE;EACF,IACA;IACEvF;IACAd;IACA6C;IACAK;IACAC;IACAe;IACAvC;IACA0B;IACArB;IACAqE;GACD;AAGH,SACE,sBAAA,cAACO,eAAeC,UAAQ;IAACC,OAAOR;KAC9B,sBAAA,cAACS,SAAAA;IAAQlI,IAAIY,KAAKC;IAAQsH,MAAMzH,MAAM0H,QAAQ5H,KAAAA;IAAQU;IAAUrB,MAAMkC,OAAOsG;IAAaC,KAAKlH;;AAGrG,CAAA;AAGK,IAAMmH,mBAAmBC,qBAAKxH,iBAAAA;",
6
+ "names": ["extractInstruction", "monitorForElements", "React", "forwardRef", "memo", "useCallback", "useEffect", "useMemo", "useRef", "Surface", "useOperationInvoker", "LayoutOperation", "AppSurface", "useAppGraph", "useLayout", "Graph", "Node", "useActionRunner", "useMediaQuery", "useSidebars", "isTreeData", "arrayMove", "NAV_TREE_ITEM", "NavTree", "NavTreeContext", "useNavTreeModel", "useNavTreeState", "meta", "NODE_TYPE", "NavTreeItemEnd", "node", "open", "data", "useMemo", "id", "subject", "Surface", "type", "AppSurface", "NavtreeItemEnd", "limit", "getItems", "graph", "disposition", "Graph", "getConnections", "Node", "RootId", "filter", "filterItems", "NavTreeContainer$", "forwardRef", "tab", "popoverAnchorId", "forwardedRef", "isLg", "useMediaQuery", "invokePromise", "useOperationInvoker", "runAction", "useActionRunner", "useAppGraph", "getItem", "setItem", "useNavTreeState", "layout", "useLayout", "model", "useNavTreeModel", "navigationSidebarState", "useSidebars", "meta", "profile", "key", "latestRef", "useRef", "activeItems", "active", "useEffect", "current", "handleOpenChange", "useCallback", "item", "path", "expand", "handleTabChange", "activeTab", "currentSidebarState", "latestIsLg", "LayoutOperation", "UpdateSidebar", "state", "SwitchWorkspace", "length", "isActionLike", "mode", "Set", "Open", "blockInstruction", "instruction", "source", "target", "properties", "canDrop", "canSelect", "selectable", "handleSelect", "option", "isAction", "parent", "childRelation", "caller", "NAV_TREE_ITEM", "Close", "ScrollIntoView", "defaultAction", "getActions", "find", "action", "handleBack", "RevertWorkspace", "monitorForElements", "canMonitor", "isTreeData", "onDrop", "location", "dropTargets", "extractInstruction", "sourceNode", "targetNode", "sourcePath", "targetPath", "sameParent", "slice", "join", "operation", "resolveMigrationOperation", "sourceParent", "getParent", "targetParent", "sourceItems", "targetItems", "sourceIndex", "findIndex", "targetIndex", "migrationIndex", "undefined", "nextItems", "map", "arrayMove", "onRearrange", "onCopy", "onTransferStart", "onTransferEnd", "onItemHover", "navTreeContextValue", "renderItemEnd", "onBack", "onOpenChange", "onSelect", "onTabChange", "NavTreeContext", "Provider", "value", "NavTree", "root", "getRoot", "sidebarOpen", "ref", "NavTreeContainer", "memo"]
7
+ }