@dxos/plugin-navtree 0.8.3 → 0.8.4-main.f9ba587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{app-graph-builder-P7AY3K72.mjs → app-graph-builder-5J4LRWDX.mjs} +3 -3
- package/dist/lib/browser/{chunk-IEW3JD5C.mjs → chunk-ERDGQTH5.mjs} +2 -2
- package/dist/lib/browser/{chunk-ZJPL4XJD.mjs → chunk-TZA65AKW.mjs} +29 -30
- package/dist/lib/browser/{chunk-ZJPL4XJD.mjs.map → chunk-TZA65AKW.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-33VLL4IJ.mjs → chunk-WCARAZ7J.mjs} +3 -3
- package/dist/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-NAYKKAOP.mjs → intent-resolver-3XYN2CBU.mjs} +5 -5
- package/dist/lib/browser/{keyboard-DDFATRUG.mjs → keyboard-QRS6WOQH.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-H3JRTVNU.mjs → react-surface-N2HPMYCU.mjs} +5 -5
- package/dist/lib/browser/{state-J6AKZRB4.mjs → state-54DY3DOY.mjs} +4 -4
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs +46 -0
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs +1429 -0
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs +18 -0
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs +16 -0
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +150 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs +48 -0
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map +7 -0
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs +52 -0
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs +52 -0
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map +7 -0
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs +118 -0
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs.map +7 -0
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +13 -13
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +40 -40
- package/src/NavTreePlugin.tsx +1 -1
- package/src/components/NavTree/NavTree.stories.tsx +2 -2
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +1 -1
- package/src/components/Sidebar/L1Panel.tsx +1 -2
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +1 -1
- package/src/experimental/Tree.stories.tsx +1 -1
- package/src/translations.ts +6 -4
- /package/dist/lib/browser/{app-graph-builder-P7AY3K72.mjs.map → app-graph-builder-5J4LRWDX.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-IEW3JD5C.mjs.map → chunk-ERDGQTH5.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-33VLL4IJ.mjs.map → chunk-WCARAZ7J.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-NAYKKAOP.mjs.map → intent-resolver-3XYN2CBU.mjs.map} +0 -0
- /package/dist/lib/browser/{keyboard-DDFATRUG.mjs.map → keyboard-QRS6WOQH.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-H3JRTVNU.mjs.map → react-surface-N2HPMYCU.mjs.map} +0 -0
- /package/dist/lib/browser/{state-J6AKZRB4.mjs.map → state-54DY3DOY.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1521,"imports":[],"format":"esm"},"src/capabilities/capabilities.ts":{"bytes":2100,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":6324,"imports":[{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/intent-resolver.ts":{"bytes":5180,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/capabilities/keyboard.ts":{"bytes":7660,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/CommandsDialog/CommandsDialog.tsx":{"bytes":17728,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/components/CommandsDialog/CommandsTrigger.tsx":{"bytes":4421,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/components/CommandsDialog/index.ts":{"bytes":609,"imports":[{"path":"src/components/CommandsDialog/CommandsDialog.tsx","kind":"import-statement","original":"./CommandsDialog"},{"path":"src/components/CommandsDialog/CommandsTrigger.tsx","kind":"import-statement","original":"./CommandsTrigger"}],"format":"esm"},"src/hooks.ts":{"bytes":1931,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"},"src/components/NavTreeContext.tsx":{"bytes":1463,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/util.ts":{"bytes":11907,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/UserAccountAvatar/UserAccountAvatar.tsx":{"bytes":3374,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/UserAccountAvatar/index.ts":{"bytes":512,"imports":[{"path":"src/components/UserAccountAvatar/UserAccountAvatar.tsx","kind":"import-statement","original":"./UserAccountAvatar"}],"format":"esm"},"src/components/Sidebar/L0Menu.tsx":{"bytes":50652,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/hooks.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/util.ts","kind":"import-statement","original":"../../util"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"../NavTreeContext"},{"path":"src/components/UserAccountAvatar/index.ts","kind":"import-statement","original":"../UserAccountAvatar"}],"format":"esm"},"src/components/NavTreeItem/NavTreeItemAction.tsx":{"bytes":11925,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/components/NavTreeItem/NavTreeItemColumns.tsx":{"bytes":10879,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/NavTreeItem/NavTreeItemAction.tsx","kind":"import-statement","original":"./NavTreeItemAction"},{"path":"src/hooks.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/components/NavTree/index.ts","kind":"import-statement","original":"../NavTree"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"../NavTreeContext"}],"format":"esm"},"src/components/NavTreeItem/index.ts":{"bytes":620,"imports":[{"path":"src/components/NavTreeItem/NavTreeItemAction.tsx","kind":"import-statement","original":"./NavTreeItemAction"},{"path":"src/components/NavTreeItem/NavTreeItemColumns.tsx","kind":"import-statement","original":"./NavTreeItemColumns"}],"format":"esm"},"src/components/Sidebar/L1Panel.tsx":{"bytes":21919,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/hooks.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/util.ts","kind":"import-statement","original":"../../util"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"../NavTreeContext"},{"path":"src/components/NavTreeItem/index.ts","kind":"import-statement","original":"../NavTreeItem"}],"format":"esm"},"src/components/Sidebar/index.ts":{"bytes":558,"imports":[{"path":"src/components/Sidebar/L0Menu.tsx","kind":"import-statement","original":"./L0Menu"},{"path":"src/components/Sidebar/L1Panel.tsx","kind":"import-statement","original":"./L1Panel"}],"format":"esm"},"src/components/NavTree/NavTree.tsx":{"bytes":8113,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"src/hooks.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"../NavTreeContext"},{"path":"src/components/Sidebar/index.ts","kind":"import-statement","original":"../Sidebar"}],"format":"esm"},"src/components/NavTree/index.ts":{"bytes":476,"imports":[{"path":"src/components/NavTree/NavTree.tsx","kind":"import-statement","original":"./NavTree"}],"format":"esm"},"src/components/NavTreeContainer.tsx":{"bytes":41404,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/NavTree/index.ts","kind":"import-statement","original":"./NavTree"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"./NavTreeContext"},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/util.ts","kind":"import-statement","original":"../util"}],"format":"esm"},"src/components/NavTreeDocumentTitle.tsx":{"bytes":2226,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/types.ts":{"bytes":1985,"imports":[],"format":"esm"},"src/components/index.ts":{"bytes":985,"imports":[{"path":"src/components/CommandsDialog/index.ts","kind":"import-statement","original":"./CommandsDialog"},{"path":"src/components/NavTree/index.ts","kind":"import-statement","original":"./NavTree"},{"path":"src/components/NavTreeContainer.tsx","kind":"import-statement","original":"./NavTreeContainer"},{"path":"src/components/NavTreeContext.tsx","kind":"import-statement","original":"./NavTreeContext"},{"path":"src/components/NavTreeDocumentTitle.tsx","kind":"import-statement","original":"./NavTreeDocumentTitle"},{"path":"src/components/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":5747,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/state.ts":{"bytes":13346,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1815,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"src/capabilities/keyboard.ts","kind":"dynamic-import","original":"./keyboard"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"src/capabilities/state.ts","kind":"dynamic-import","original":"./state"}],"format":"esm"},"src/events.ts":{"bytes":1146,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/translations.ts":{"bytes":2156,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/NavTreePlugin.tsx":{"bytes":12099,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/events.ts","kind":"import-statement","original":"./events"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":983,"imports":[{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/events.ts","kind":"import-statement","original":"./events"},{"path":"src/NavTreePlugin.tsx","kind":"import-statement","original":"./NavTreePlugin"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7204},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-CY7QWR4R.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-V3QXFDDP.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["COMMANDS_DIALOG","KEY_BINDING","NAVTREE_PLUGIN","NavTreeCapabilities","NavTreeEvents","NavTreePlugin","getActions","getChildren","getParent","getPersistenceParent","l0ItemType","meta","resolveMigrationOperation","sortActions"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/events.ts":{"bytesInOutput":207},"src/NavTreePlugin.tsx":{"bytesInOutput":2457},"src/translations.ts":{"bytesInOutput":476}},"bytes":4024},"dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3196},"dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder.ts":{"bytesInOutput":1220}},"bytes":1537},"dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2664},"dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-V3QXFDDP.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/intent-resolver.ts","inputs":{"src/capabilities/intent-resolver.ts":{"bytesInOutput":1220}},"bytes":1548},"dist/lib/node-esm/keyboard-MOZWHFUM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3967},"dist/lib/node-esm/keyboard-MOZWHFUM.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/keyboard.ts","inputs":{"src/capabilities/keyboard.ts":{"bytesInOutput":1588}},"bytes":1856},"dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2883},"dist/lib/node-esm/react-surface-EW5FDMW4.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-CY7QWR4R.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-V3QXFDDP.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":1246}},"bytes":1710},"dist/lib/node-esm/chunk-CY7QWR4R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":95439},"dist/lib/node-esm/chunk-CY7QWR4R.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-V3QXFDDP.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-searchlist","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/keyboard-MOZWHFUM.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/react-surface-EW5FDMW4.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/state-Z3OTRC2I.mjs","kind":"dynamic-import"}],"exports":["AppGraphBuilder","CommandsDialogContent","CommandsTrigger","IntentResolver","Keyboard","NODE_TYPE","NavTreeContainer","NavTreeDocumentTitle","ReactSurface","State","getActions","getChildren","getParent","getPersistenceParent","l0ItemType","resolveMigrationOperation","sortActions"],"inputs":{"src/components/CommandsDialog/CommandsDialog.tsx":{"bytesInOutput":4596},"src/components/CommandsDialog/CommandsTrigger.tsx":{"bytesInOutput":1228},"src/util.ts":{"bytesInOutput":2599},"src/components/NavTreeContainer.tsx":{"bytesInOutput":10473},"src/components/NavTree/NavTree.tsx":{"bytesInOutput":2081},"src/hooks.ts":{"bytesInOutput":349},"src/components/CommandsDialog/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/NavTreeContext.tsx":{"bytesInOutput":250},"src/components/NavTreeDocumentTitle.tsx":{"bytesInOutput":441},"src/components/Sidebar/L0Menu.tsx":{"bytesInOutput":14382},"src/components/UserAccountAvatar/UserAccountAvatar.tsx":{"bytesInOutput":876},"src/components/UserAccountAvatar/index.ts":{"bytesInOutput":0},"src/components/Sidebar/index.ts":{"bytesInOutput":0},"src/components/Sidebar/L1Panel.tsx":{"bytesInOutput":6320},"src/components/NavTreeItem/NavTreeItemAction.tsx":{"bytesInOutput":3294},"src/components/NavTreeItem/index.ts":{"bytesInOutput":0},"src/components/NavTreeItem/NavTreeItemColumns.tsx":{"bytesInOutput":2854},"src/components/NavTree/index.ts":{"bytesInOutput":0},"src/capabilities/index.ts":{"bytesInOutput":387}},"bytes":51490},"dist/lib/node-esm/state-Z3OTRC2I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6903},"dist/lib/node-esm/state-Z3OTRC2I.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-V3QXFDDP.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/state.ts","inputs":{"src/capabilities/state.ts":{"bytesInOutput":2786}},"bytes":3110},"dist/lib/node-esm/chunk-V3QXFDDP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1234},"dist/lib/node-esm/chunk-V3QXFDDP.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P2JGW3WR.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["NavTreeCapabilities"],"inputs":{"src/capabilities/capabilities.ts":{"bytesInOutput":257}},"bytes":522},"dist/lib/node-esm/chunk-P2JGW3WR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":723},"dist/lib/node-esm/chunk-P2JGW3WR.mjs":{"imports":[],"exports":["COMMANDS_DIALOG","KEY_BINDING","NAVTREE_PLUGIN","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":194}},"bytes":418}}}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CommandsDialogContent,
|
|
4
|
+
CommandsTrigger,
|
|
5
|
+
NavTreeContainer,
|
|
6
|
+
NavTreeDocumentTitle
|
|
7
|
+
} from "./chunk-CY7QWR4R.mjs";
|
|
8
|
+
import "./chunk-V3QXFDDP.mjs";
|
|
9
|
+
import {
|
|
10
|
+
COMMANDS_DIALOG,
|
|
11
|
+
NAVTREE_PLUGIN
|
|
12
|
+
} from "./chunk-P2JGW3WR.mjs";
|
|
13
|
+
|
|
14
|
+
// src/capabilities/react-surface.tsx
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
17
|
+
import { isGraphNode } from "@dxos/plugin-graph";
|
|
18
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
19
|
+
createSurface({
|
|
20
|
+
id: COMMANDS_DIALOG,
|
|
21
|
+
role: "dialog",
|
|
22
|
+
filter: (data) => data.component === COMMANDS_DIALOG,
|
|
23
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(CommandsDialogContent, data.props)
|
|
24
|
+
}),
|
|
25
|
+
createSurface({
|
|
26
|
+
id: `${NAVTREE_PLUGIN}/navigation`,
|
|
27
|
+
role: "navigation",
|
|
28
|
+
filter: (data) => typeof data.current === "string",
|
|
29
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(NavTreeContainer, {
|
|
30
|
+
tab: data.current,
|
|
31
|
+
popoverAnchorId: data.popoverAnchorId,
|
|
32
|
+
topbar: data.topbar
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
createSurface({
|
|
36
|
+
id: `${NAVTREE_PLUGIN}/document-title`,
|
|
37
|
+
role: "document-title",
|
|
38
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(NavTreeDocumentTitle, {
|
|
39
|
+
node: isGraphNode(data.subject) ? data.subject : void 0
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
createSurface({
|
|
43
|
+
id: `${NAVTREE_PLUGIN}/search-input`,
|
|
44
|
+
role: "search-input",
|
|
45
|
+
position: "fallback",
|
|
46
|
+
component: () => /* @__PURE__ */ React.createElement(CommandsTrigger, null)
|
|
47
|
+
})
|
|
48
|
+
]);
|
|
49
|
+
export {
|
|
50
|
+
react_surface_default as default
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=react-surface-EW5FDMW4.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isGraphNode } from '@dxos/plugin-graph';\n\nimport { CommandsDialogContent, CommandsTrigger, NavTreeDocumentTitle, NavTreeContainer } from '../components';\nimport { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: COMMANDS_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: { selected?: string } } => data.component === COMMANDS_DIALOG,\n component: ({ data }) => <CommandsDialogContent {...data.props} />,\n }),\n createSurface({\n id: `${NAVTREE_PLUGIN}/navigation`,\n role: 'navigation',\n filter: (data): data is { popoverAnchorId?: string; topbar: boolean; current: string } =>\n typeof data.current === 'string',\n component: ({ data }) => (\n <NavTreeContainer\n tab={data.current}\n popoverAnchorId={data.popoverAnchorId as string | undefined}\n topbar={data.topbar as boolean}\n />\n ),\n }),\n createSurface({\n id: `${NAVTREE_PLUGIN}/document-title`,\n role: 'document-title',\n component: ({ data }) => <NavTreeDocumentTitle node={isGraphNode(data.subject) ? data.subject : undefined} />,\n }),\n createSurface({\n id: `${NAVTREE_PLUGIN}/search-input`,\n role: 'search-input',\n position: 'fallback',\n component: () => <CommandsTrigger />,\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,mBAAmB;AAK5B,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC;IACJC,MAAM;IACNC,QAAQ,CAACC,SAAmDA,KAAKC,cAAcJ;IAC/EI,WAAW,CAAC,EAAED,KAAI,MAAO,sBAAA,cAACE,uBAA0BF,KAAKG,KAAK;EAChE,CAAA;EACAR,cAAc;IACZC,IAAI,GAAGQ,cAAAA;IACPN,MAAM;IACNC,QAAQ,CAACC,SACP,OAAOA,KAAKK,YAAY;IAC1BJ,WAAW,CAAC,EAAED,KAAI,MAChB,sBAAA,cAACM,kBAAAA;MACCC,KAAKP,KAAKK;MACVG,iBAAiBR,KAAKQ;MACtBC,QAAQT,KAAKS;;EAGnB,CAAA;EACAd,cAAc;IACZC,IAAI,GAAGQ,cAAAA;IACPN,MAAM;IACNG,WAAW,CAAC,EAAED,KAAI,MAAO,sBAAA,cAACU,sBAAAA;MAAqBC,MAAMC,YAAYZ,KAAKa,OAAO,IAAIb,KAAKa,UAAUC;;EAClG,CAAA;EACAnB,cAAc;IACZC,IAAI,GAAGQ,cAAAA;IACPN,MAAM;IACNiB,UAAU;IACVd,WAAW,MAAM,sBAAA,cAACe,iBAAAA,IAAAA;EACpB,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "isGraphNode", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "COMMANDS_DIALOG", "role", "filter", "data", "component", "CommandsDialogContent", "props", "NAVTREE_PLUGIN", "current", "NavTreeContainer", "tab", "popoverAnchorId", "topbar", "NavTreeDocumentTitle", "node", "isGraphNode", "subject", "undefined", "position", "CommandsTrigger"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
NavTreeCapabilities
|
|
4
|
+
} from "./chunk-V3QXFDDP.mjs";
|
|
5
|
+
import {
|
|
6
|
+
NAVTREE_PLUGIN
|
|
7
|
+
} from "./chunk-P2JGW3WR.mjs";
|
|
8
|
+
|
|
9
|
+
// src/capabilities/state.ts
|
|
10
|
+
import { effect, untracked } from "@preact/signals-core";
|
|
11
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
12
|
+
import { live } from "@dxos/live-object";
|
|
13
|
+
import { Path } from "@dxos/react-ui-list";
|
|
14
|
+
var KEY = `${NAVTREE_PLUGIN}/state/v1`;
|
|
15
|
+
var getInitialState = () => {
|
|
16
|
+
const stringified = localStorage.getItem(KEY);
|
|
17
|
+
if (!stringified) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const cached = JSON.parse(stringified);
|
|
22
|
+
return cached.map(([key, value]) => [
|
|
23
|
+
key,
|
|
24
|
+
live({
|
|
25
|
+
open: value.open,
|
|
26
|
+
current: false
|
|
27
|
+
})
|
|
28
|
+
]);
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var state_default = (context) => {
|
|
33
|
+
const layout = context.getCapability(Capabilities.Layout);
|
|
34
|
+
const state = new Map(getInitialState() ?? [
|
|
35
|
+
// TODO(thure): Initialize these dynamically.
|
|
36
|
+
[
|
|
37
|
+
"root",
|
|
38
|
+
live({
|
|
39
|
+
open: true,
|
|
40
|
+
current: false
|
|
41
|
+
})
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
"root~dxos.org/plugin/space-spaces",
|
|
45
|
+
live({
|
|
46
|
+
open: true,
|
|
47
|
+
current: false
|
|
48
|
+
})
|
|
49
|
+
],
|
|
50
|
+
[
|
|
51
|
+
"root~dxos.org/plugin/files",
|
|
52
|
+
live({
|
|
53
|
+
open: true,
|
|
54
|
+
current: false
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
]);
|
|
58
|
+
const getItem = (_path) => {
|
|
59
|
+
const path = Path.create(..._path);
|
|
60
|
+
const value = state.get(path) ?? live({
|
|
61
|
+
open: false,
|
|
62
|
+
current: false,
|
|
63
|
+
alternateTree: false
|
|
64
|
+
});
|
|
65
|
+
if (!state.has(path)) {
|
|
66
|
+
state.set(path, value);
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
};
|
|
70
|
+
const setItem = (path, key, next) => {
|
|
71
|
+
const value = getItem(path);
|
|
72
|
+
value[key] = next;
|
|
73
|
+
localStorage.setItem(KEY, JSON.stringify(Array.from(state.entries())));
|
|
74
|
+
};
|
|
75
|
+
const isOpen = (path) => getItem(path).open;
|
|
76
|
+
const isCurrent = (path) => getItem(path).current;
|
|
77
|
+
const isAlternateTree = (path) => {
|
|
78
|
+
const item = getItem(path);
|
|
79
|
+
return item.alternateTree ?? false;
|
|
80
|
+
};
|
|
81
|
+
let previous = [];
|
|
82
|
+
const unsubscribe = effect(() => {
|
|
83
|
+
const removed = previous.filter((id) => !layout.active.includes(id));
|
|
84
|
+
previous = layout.active;
|
|
85
|
+
const handleUpdate = () => {
|
|
86
|
+
removed.forEach((id) => {
|
|
87
|
+
const keys = Array.from(state.keys()).filter((key) => Path.last(key) === id);
|
|
88
|
+
keys.forEach((key) => {
|
|
89
|
+
setItem(Path.parts(key), "current", false);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
layout.active.forEach((id) => {
|
|
93
|
+
const keys = Array.from(/* @__PURE__ */ new Set([
|
|
94
|
+
...state.keys(),
|
|
95
|
+
id
|
|
96
|
+
])).filter((key) => Path.last(key) === id);
|
|
97
|
+
keys.forEach((key) => {
|
|
98
|
+
setItem(Path.parts(key), "current", true);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const timeout = setTimeout(handleUpdate, 500);
|
|
103
|
+
untracked(() => handleUpdate());
|
|
104
|
+
return () => clearTimeout(timeout);
|
|
105
|
+
});
|
|
106
|
+
return contributes(NavTreeCapabilities.State, {
|
|
107
|
+
state,
|
|
108
|
+
getItem,
|
|
109
|
+
setItem,
|
|
110
|
+
isOpen,
|
|
111
|
+
isCurrent,
|
|
112
|
+
isAlternateTree
|
|
113
|
+
}, () => unsubscribe());
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
state_default as default
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=state-Z3OTRC2I.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/state.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { effect, untracked } from '@preact/signals-core';\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { type Live } from '@dxos/echo';\nimport { live } from '@dxos/live-object';\nimport { Path } from '@dxos/react-ui-list';\n\nimport { NavTreeCapabilities } from './capabilities';\nimport { NAVTREE_PLUGIN } from '../meta';\n\nconst KEY = `${NAVTREE_PLUGIN}/state/v1`;\n\nconst getInitialState = () => {\n const stringified = localStorage.getItem(KEY);\n if (!stringified) {\n return;\n }\n\n try {\n const cached: [string, { open: boolean; current: boolean }][] = JSON.parse(stringified);\n return cached.map(([key, value]): [string, Live<{ open: boolean; current: boolean }>] => [\n key,\n live({ open: value.open, current: false }),\n ]);\n } catch {}\n};\n\nexport default (context: PluginContext) => {\n const layout = context.getCapability(Capabilities.Layout);\n\n // TODO(wittjosiah): This currently needs to be not a Live at the root.\n // If it is a Live then React errors when initializing new paths because of state change during render.\n // Ideally this could be a Live but be able to access and update the root level without breaking render.\n // Wrapping accesses and updates in `untracked` didn't seem to work in all cases.\n const state = new Map<string, Live<{ open: boolean; current: boolean; alternateTree?: boolean }>>(\n getInitialState() ?? [\n // TODO(thure): Initialize these dynamically.\n ['root', live({ open: true, current: false })],\n ['root~dxos.org/plugin/space-spaces', live({ open: true, current: false })],\n ['root~dxos.org/plugin/files', live({ open: true, current: false })],\n ],\n );\n\n const getItem = (_path: string[]) => {\n const path = Path.create(..._path);\n const value = state.get(path) ?? live({ open: false, current: false, alternateTree: false });\n if (!state.has(path)) {\n state.set(path, value);\n }\n\n return value;\n };\n\n const setItem = (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => {\n const value = getItem(path);\n value[key] = next;\n\n localStorage.setItem(KEY, JSON.stringify(Array.from(state.entries())));\n };\n\n const isOpen = (path: string[]) => getItem(path).open;\n const isCurrent = (path: string[]) => getItem(path).current;\n const isAlternateTree = (path: string[]) => {\n const item = getItem(path);\n return item.alternateTree ?? false;\n };\n\n let previous: string[] = [];\n const unsubscribe = effect(() => {\n const removed = previous.filter((id) => !layout.active.includes(id));\n previous = layout.active;\n\n const handleUpdate = () => {\n removed.forEach((id) => {\n const keys = Array.from(state.keys()).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', false);\n });\n });\n\n layout.active.forEach((id) => {\n const keys = Array.from(new Set([...state.keys(), id])).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', true);\n });\n });\n };\n\n // TODO(wittjosiah): This is setTimeout because there's a race between the keys be initialized.\n // Keys are initialized on the first render of an item in the navtree.\n // This could be avoided if the location was a path as well and not just an id.\n const timeout = setTimeout(handleUpdate, 500);\n untracked(() => handleUpdate());\n return () => clearTimeout(timeout);\n });\n\n return contributes(NavTreeCapabilities.State, { state, getItem, setItem, isOpen, isCurrent, isAlternateTree }, () =>\n unsubscribe(),\n );\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["effect", "untracked", "Capabilities", "contributes", "live", "Path", "KEY", "NAVTREE_PLUGIN", "getInitialState", "stringified", "localStorage", "getItem", "cached", "JSON", "parse", "map", "key", "value", "live", "open", "current", "context", "layout", "getCapability", "Capabilities", "Layout", "state", "Map", "_path", "path", "Path", "create", "get", "alternateTree", "has", "set", "setItem", "next", "stringify", "Array", "from", "entries", "isOpen", "isCurrent", "isAlternateTree", "item", "previous", "unsubscribe", "effect", "removed", "filter", "id", "active", "includes", "handleUpdate", "forEach", "keys", "last", "parts", "Set", "timeout", "setTimeout", "untracked", "clearTimeout", "contributes", "NavTreeCapabilities", "State"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
2
|
+
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
3
3
|
import { NavTreeContainer } from '../NavTreeContainer';
|
|
4
4
|
declare const meta: Meta<typeof NavTreeContainer>;
|
|
5
5
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAgCjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAgFvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAoCvC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAGjC,eAAO,MAAM,UAAU,EAAE,KAoCxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
3
3
|
import { NavTreeItemAction } from './NavTreeItemAction';
|
|
4
4
|
declare const meta: Meta<typeof NavTreeItemAction>;
|
|
5
5
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,EAAE,iBAAiB,EAAmC,MAAM,qBAAqB,CAAC;AA6BzF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAaxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AA2B5C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"L1Panel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Sidebar/L1Panel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AA2B5C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAiHF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,GAAG,QAAQ,CAAC,GAAG;IACpF,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,qCAAqC,aAAa,sBAgB1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAccountAvatar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"UserAccountAvatar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAIxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../src/experimental/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../src/experimental/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAc,EAAE,KAAK,GAAG,EAA+C,MAAM,OAAO,CAAC;AAmGrF,eAAO,MAAM,OAAO,mBAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,mBAenB,CAAC;AAmGF,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'
|
|
6
|
-
'open
|
|
7
|
-
'commands
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
1
|
+
import { meta } from './meta';
|
|
2
|
+
export declare const translations: [{
|
|
3
|
+
readonly 'en-US': {
|
|
4
|
+
readonly [meta.id]: {
|
|
5
|
+
readonly 'app menu label': "App menu";
|
|
6
|
+
readonly 'open settings label': "Settings";
|
|
7
|
+
readonly 'open commands label': "Search commands";
|
|
8
|
+
readonly 'commands dialog title': "Commands";
|
|
9
|
+
readonly 'command list input placeholder': "Search for commands…";
|
|
10
|
+
readonly 'node actions menu invoker label': "More options";
|
|
11
|
+
readonly 'tree item actions label': "More actions";
|
|
12
|
+
readonly 'empty branch message': " ";
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
|
-
}
|
|
15
|
-
export default _default;
|
|
15
|
+
}];
|
|
16
16
|
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;UASR;;EAGwB,CAAC"}
|