@dxos/plugin-navtree 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0
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/index.mjs +168 -112
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/NavTreePlugin.d.ts +2 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +7 -108
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +3 -2
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -18
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts +11 -4
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +10 -11
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/{NavTreeContext.d.ts → NavTreeContext/NavTreeContext.d.ts} +1 -1
- package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts +2 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +17 -9
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +3 -2
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +8 -5
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +4 -7
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +5 -4
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +8 -16
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts +6 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +29 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts +2 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts +2 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts +9 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts +3 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.d.ts +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +2 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/experimental/Tree.stories.d.ts +18 -4
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +5 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useActions.d.ts +5 -0
- package/dist/types/src/hooks/useActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts +6 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts +7 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts +22 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/expose.d.ts +5 -0
- package/dist/types/src/operations/expose.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +5 -6
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts +2 -2
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +16 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +6 -6
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util.d.ts +12 -8
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +66 -54
- package/src/NavTreePlugin.tsx +56 -74
- package/src/capabilities/app-graph-builder.ts +34 -45
- package/src/capabilities/index.ts +10 -8
- package/src/capabilities/keyboard.ts +58 -49
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +46 -37
- package/src/capabilities/state.ts +128 -83
- package/src/components/NavTree/NavTree.stories.tsx +48 -54
- package/src/components/NavTree/NavTree.tsx +65 -33
- package/src/components/{NavTreeContext.tsx → NavTreeContext/NavTreeContext.tsx} +1 -1
- package/src/components/NavTreeContext/index.ts +5 -0
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +23 -15
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +67 -44
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +45 -19
- package/src/components/Sidebar/L0Menu.tsx +147 -182
- package/src/components/Sidebar/L1Panel.tsx +256 -95
- package/src/components/Sidebar/L1Tabs.tsx +18 -34
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +2 -3
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +1 -1
- package/src/components/index.ts +1 -3
- package/src/components/types.ts +14 -19
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +45 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +131 -0
- package/src/containers/CommandsDialogContent/index.ts +5 -0
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +28 -0
- package/src/containers/CommandsTrigger/index.ts +5 -0
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +280 -0
- package/src/containers/NavTreeContainer/index.ts +6 -0
- package/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.tsx +4 -3
- package/src/containers/NavTreeDocumentTitle/index.ts +5 -0
- package/src/containers/index.ts +12 -0
- package/src/experimental/Tree.stories.tsx +82 -85
- package/src/experimental/Tree.tsx +4 -4
- package/src/hooks/index.ts +8 -0
- package/src/hooks/useActions.ts +34 -0
- package/src/hooks/useLoadDescendents.ts +23 -0
- package/src/hooks/useNavTreeModel.ts +118 -0
- package/src/hooks/useNavTreeState.ts +42 -0
- package/src/index.ts +1 -2
- package/src/meta.ts +4 -4
- package/src/operations/expose.ts +42 -0
- package/src/operations/index.ts +7 -0
- package/src/testing/app-graph-builder.ts +166 -238
- package/src/testing/generator.ts +34 -34
- package/src/testing/update-state.ts +6 -6
- package/src/translations.ts +9 -10
- package/src/types/capabilities.ts +21 -0
- package/src/types/events.ts +12 -0
- package/src/types/index.ts +7 -0
- package/src/{types.ts → types/schema.ts} +5 -5
- package/src/util.ts +28 -17
- package/dist/lib/browser/app-graph-builder-OHSCN3GX.mjs +0 -46
- package/dist/lib/browser/app-graph-builder-OHSCN3GX.mjs.map +0 -7
- package/dist/lib/browser/chunk-5VLWX4PK.mjs +0 -15
- package/dist/lib/browser/chunk-5VLWX4PK.mjs.map +0 -7
- package/dist/lib/browser/chunk-E6MZBCU5.mjs +0 -19
- package/dist/lib/browser/chunk-E6MZBCU5.mjs.map +0 -7
- package/dist/lib/browser/chunk-UDAINHB6.mjs +0 -1488
- package/dist/lib/browser/chunk-UDAINHB6.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-YUVXVPHG.mjs +0 -47
- package/dist/lib/browser/intent-resolver-YUVXVPHG.mjs.map +0 -7
- package/dist/lib/browser/keyboard-YJEK2HTH.mjs +0 -49
- package/dist/lib/browser/keyboard-YJEK2HTH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-V6LS3R4L.mjs +0 -51
- package/dist/lib/browser/react-surface-V6LS3R4L.mjs.map +0 -7
- package/dist/lib/browser/state-BFD5KJCV.mjs +0 -117
- package/dist/lib/browser/state-BFD5KJCV.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +0 -5
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/index.d.ts +0 -3
- package/dist/types/src/components/CommandsDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContainer.d.ts +0 -9
- package/dist/types/src/components/NavTreeContainer.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContext.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks.d.ts +0 -3
- package/dist/types/src/hooks.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -20
- package/src/capabilities/intent-resolver.ts +0 -37
- package/src/components/CommandsDialog/CommandsDialog.tsx +0 -126
- package/src/components/CommandsDialog/CommandsTrigger.tsx +0 -36
- package/src/components/CommandsDialog/index.ts +0 -6
- package/src/components/NavTreeContainer.tsx +0 -378
- package/src/events.ts +0 -11
- package/src/hooks.ts +0 -21
- /package/dist/types/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,KAAK;eACT,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;YAAE,IAAI,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,aAAa,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;iBAC7E,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;YAAE,IAAI,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,aAAa,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;iBACtF,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI;gBACnF,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,KAAK,OAAO;mBACpD,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,KAAK,OAAO;yBACjD,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,KAAK,OAAO;MACzC,CAAC;CACnC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Capabilities, type PluginContext } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Capabilities.IntentResolver>>;
|
|
3
|
-
export default _default;
|
|
4
|
-
//# sourceMappingURL=intent-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAgB,KAAK,aAAa,EAA+B,MAAM,qBAAqB,CAAC;yBAKlG,SAAS,aAAa;AAAtC,wBAyBI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAqBjD,eAAO,MAAM,qBAAqB,GAAI,uBAAuB;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,sBAoGjF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsTrigger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,eAAO,MAAM,eAAe,yBAsB3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type NavTreeContextValue } from './types';
|
|
3
|
-
export declare const NODE_TYPE = "dxos/app-graph/node";
|
|
4
|
-
export type NavTreeContainerProps = {
|
|
5
|
-
popoverAnchorId?: string;
|
|
6
|
-
topbar?: boolean;
|
|
7
|
-
} & Pick<NavTreeContextValue, 'tab'>;
|
|
8
|
-
export declare const NavTreeContainer: React.MemoExoticComponent<({ tab, popoverAnchorId, topbar }: NavTreeContainerProps) => React.JSX.Element>;
|
|
9
|
-
//# sourceMappingURL=NavTreeContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAmBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AA0D/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,gBAAgB,+DAA2C,qBAAqB,uBA6R3F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContext.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAE9E,eAAO,MAAM,iBAAiB,2BAAiF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeDocumentTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeDocumentTitle.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAK5C,eAAO,MAAM,oBAAoB,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,SAM7D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/events.ts"],"names":[],"mappings":"AAQA,yBAAiB,aAAa,CAAC;IACtB,MAAM,UAAU,+CAAmC,CAAC;CAC5D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C,eAAO,MAAM,kBAAkB,GAAI,OAAO,IAAI,SAU7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,GAAG,EACH,OAAO,CACL,cAAc,GAAG;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,oBAAoB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,mBAAmB,EAAE,CAAC,SAAS,EAAE,oBAAoB,EAAE,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/E,MAAM,EAAE,CAAC,UAAU,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IACjF,eAAe,EAAE,CAAC,UAAU,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1F,aAAa,EAAE,CAAC,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,oBAAoB,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAClH,CACF,CACF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAGvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type Live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { type NavTreeItemGraphNode } from '../types';
|
|
10
|
-
|
|
11
|
-
export namespace NavTreeCapabilities {
|
|
12
|
-
export const State = defineCapability<{
|
|
13
|
-
state: Map<string, Live<{ open: boolean; current: boolean; alternateTree?: boolean }>>;
|
|
14
|
-
getItem: (path: string[]) => Live<{ open: boolean; current: boolean; alternateTree?: boolean }>;
|
|
15
|
-
setItem: (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => void;
|
|
16
|
-
isOpen: (path: string[], item: NavTreeItemGraphNode) => boolean;
|
|
17
|
-
isCurrent: (path: string[], item: NavTreeItemGraphNode) => boolean;
|
|
18
|
-
isAlternateTree: (path: string[], item: NavTreeItemGraphNode) => boolean;
|
|
19
|
-
}>(`${meta.id}/capability/state`);
|
|
20
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, LayoutAction, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
8
|
-
import { log } from '@dxos/log';
|
|
9
|
-
|
|
10
|
-
import { NavTreeCapabilities } from './capabilities';
|
|
11
|
-
|
|
12
|
-
export default (context: PluginContext) =>
|
|
13
|
-
contributes(
|
|
14
|
-
Capabilities.IntentResolver,
|
|
15
|
-
createResolver({
|
|
16
|
-
intent: LayoutAction.UpdateLayout,
|
|
17
|
-
filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Expose.fields.input> =>
|
|
18
|
-
Schema.is(LayoutAction.Expose.fields.input)(data),
|
|
19
|
-
resolve: async ({ subject }) => {
|
|
20
|
-
const { graph } = context.getCapability(Capabilities.AppGraph);
|
|
21
|
-
const { getItem, setItem } = context.getCapability(NavTreeCapabilities.State);
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const path = await graph.waitForPath({ target: subject }, { timeout: 1_000 });
|
|
25
|
-
[...Array(path.length)].forEach((_, index) => {
|
|
26
|
-
const subpath = path.slice(0, index);
|
|
27
|
-
const value = getItem(subpath);
|
|
28
|
-
if (!value.open) {
|
|
29
|
-
setItem(subpath, 'open', true);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
} catch {
|
|
33
|
-
log('Path to node not found', { subject });
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
);
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useMemo, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
-
import { useAppGraph, useIntentDispatcher } from '@dxos/app-framework/react';
|
|
9
|
-
import { type ActionLike, isAction, isActionGroup } from '@dxos/app-graph';
|
|
10
|
-
import { Keyboard, keySymbols } from '@dxos/keyboard';
|
|
11
|
-
import { useActions } from '@dxos/plugin-graph';
|
|
12
|
-
import { Button, Dialog, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
13
|
-
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
14
|
-
import {
|
|
15
|
-
cardDialogContent,
|
|
16
|
-
cardDialogHeader,
|
|
17
|
-
cardDialogPaddedOverflow,
|
|
18
|
-
cardDialogSearchListRoot,
|
|
19
|
-
} from '@dxos/react-ui-stack';
|
|
20
|
-
import { descriptionText, mx } from '@dxos/react-ui-theme';
|
|
21
|
-
import { getHostPlatform } from '@dxos/util';
|
|
22
|
-
|
|
23
|
-
import { KEY_BINDING, meta } from '../../meta';
|
|
24
|
-
|
|
25
|
-
// TODO(wittjosiah): This probably deserves its own plugin but for now it lives here w/ other navigation UI.
|
|
26
|
-
export const CommandsDialogContent = ({ selected: initial }: { selected?: string }) => {
|
|
27
|
-
const { t } = useTranslation(meta.id);
|
|
28
|
-
const [selected, setSelected] = useState<string | undefined>(initial);
|
|
29
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
30
|
-
const { graph } = useAppGraph();
|
|
31
|
-
|
|
32
|
-
// Traverse graph.
|
|
33
|
-
// TODO(burdon): Factor out commonality with shortcut dialog.
|
|
34
|
-
const allActions = useMemo(() => {
|
|
35
|
-
// TODO(burdon): Get from navtree (not keyboard).
|
|
36
|
-
const current = Keyboard.singleton.getCurrentContext();
|
|
37
|
-
const actionMap = new Set<string>();
|
|
38
|
-
const actions: ActionLike[] = [];
|
|
39
|
-
graph.traverse({
|
|
40
|
-
visitor: (node, path) => {
|
|
41
|
-
if (
|
|
42
|
-
(isAction(node) || isActionGroup(node)) &&
|
|
43
|
-
!actionMap.has(node.id) &&
|
|
44
|
-
current.startsWith(path.slice(0, -1).join('/'))
|
|
45
|
-
) {
|
|
46
|
-
actionMap.add(node.id);
|
|
47
|
-
actions.push(node);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
actions.sort((a, b) => {
|
|
53
|
-
return toLocalizedString(a.properties.label, t)
|
|
54
|
-
?.toLowerCase()
|
|
55
|
-
.localeCompare(toLocalizedString(b.properties.label, t)?.toLowerCase());
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
return actions;
|
|
59
|
-
}, [graph]);
|
|
60
|
-
|
|
61
|
-
const group = allActions.find(({ id }) => id === selected);
|
|
62
|
-
const groupActions = useActions(graph, group?.id);
|
|
63
|
-
const actions = isActionGroup(group) ? groupActions : allActions;
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<Dialog.Content classNames={cardDialogContent}>
|
|
67
|
-
<Dialog.Title classNames={cardDialogHeader}>{t('commands dialog title', { ns: meta.id })}</Dialog.Title>
|
|
68
|
-
|
|
69
|
-
{/* TODO(burdon): BUG: Overscrolls container. */}
|
|
70
|
-
<SearchList.Root label={t('command list input placeholder')} classNames={cardDialogSearchListRoot}>
|
|
71
|
-
<SearchList.Input placeholder={t('command list input placeholder')} />
|
|
72
|
-
<SearchList.Content classNames={cardDialogPaddedOverflow}>
|
|
73
|
-
{actions?.map((action) => {
|
|
74
|
-
const label = toLocalizedString(action.properties.label, t);
|
|
75
|
-
const shortcut =
|
|
76
|
-
typeof action.properties.keyBinding === 'string'
|
|
77
|
-
? action.properties.keyBinding
|
|
78
|
-
: action.properties.keyBinding?.[getHostPlatform()];
|
|
79
|
-
return (
|
|
80
|
-
<SearchList.Item
|
|
81
|
-
value={label}
|
|
82
|
-
key={action.id}
|
|
83
|
-
onSelect={() => {
|
|
84
|
-
if (action.properties.disabled) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (isActionGroup(action)) {
|
|
89
|
-
setSelected(action.id);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
void dispatch(
|
|
94
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
95
|
-
part: 'dialog',
|
|
96
|
-
options: { state: false },
|
|
97
|
-
}),
|
|
98
|
-
);
|
|
99
|
-
setTimeout(() => {
|
|
100
|
-
const node = graph.getConnections(group?.id ?? action.id, 'inbound')[0];
|
|
101
|
-
void (node && isAction(action) && action.data({ parent: node, caller: KEY_BINDING }));
|
|
102
|
-
});
|
|
103
|
-
}}
|
|
104
|
-
classNames='flex items-center gap-2'
|
|
105
|
-
disabled={action.properties.disabled}
|
|
106
|
-
{...(action.properties?.testId && {
|
|
107
|
-
'data-testid': action.properties.testId,
|
|
108
|
-
})}
|
|
109
|
-
>
|
|
110
|
-
<Icon icon={action.properties.icon} size={4} />
|
|
111
|
-
<span className='grow truncate'>{label}</span>
|
|
112
|
-
{shortcut && <span className={mx('shrink-0', descriptionText)}>{keySymbols(shortcut).join('')}</span>}
|
|
113
|
-
</SearchList.Item>
|
|
114
|
-
);
|
|
115
|
-
})}
|
|
116
|
-
</SearchList.Content>
|
|
117
|
-
</SearchList.Root>
|
|
118
|
-
|
|
119
|
-
<div role='none' className='pli-cardSpacingInline pbe-cardSpacingBlock'>
|
|
120
|
-
<Dialog.Close asChild>
|
|
121
|
-
<Button classNames='is-full'>{t('close label', { ns: 'os' })}</Button>
|
|
122
|
-
</Dialog.Close>
|
|
123
|
-
</div>
|
|
124
|
-
</Dialog.Content>
|
|
125
|
-
);
|
|
126
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
-
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
9
|
-
import { Button, Icon, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
|
|
11
|
-
import { COMMANDS_DIALOG, meta } from '../../meta';
|
|
12
|
-
|
|
13
|
-
// TODO(thure): Refactor to be handled by a more appropriate plugin.
|
|
14
|
-
export const CommandsTrigger = () => {
|
|
15
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
16
|
-
const { t } = useTranslation(meta.id);
|
|
17
|
-
return (
|
|
18
|
-
<Button
|
|
19
|
-
classNames='m-1 pli-1 lg:pli-2'
|
|
20
|
-
onClick={() =>
|
|
21
|
-
dispatch(
|
|
22
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
23
|
-
part: 'dialog',
|
|
24
|
-
subject: COMMANDS_DIALOG,
|
|
25
|
-
options: {
|
|
26
|
-
blockAlign: 'start',
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
>
|
|
32
|
-
<span className='text-description font-normal grow text-start'>{t('command list input placeholder')}</span>
|
|
33
|
-
<Icon icon='ph--magnifying-glass--regular' size={5} />
|
|
34
|
-
</Button>
|
|
35
|
-
);
|
|
36
|
-
};
|