@dxos/plugin-navtree 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/CommandsDialogContent-UBGIQ5FI.mjs +112 -0
- package/dist/lib/neutral/CommandsDialogContent-UBGIQ5FI.mjs.map +7 -0
- package/dist/lib/neutral/CommandsTrigger-BH5WLMHK.mjs +27 -0
- package/dist/lib/neutral/CommandsTrigger-BH5WLMHK.mjs.map +7 -0
- package/dist/lib/neutral/NavTreeContainer-6AR4BFDD.mjs +12 -0
- package/dist/lib/neutral/NavTreeContainer-6AR4BFDD.mjs.map +7 -0
- package/dist/lib/neutral/NavTreeDocumentTitle-H3E6ZLYE.mjs +22 -0
- package/dist/lib/neutral/NavTreeDocumentTitle-H3E6ZLYE.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.mjs +56 -0
- package/dist/lib/neutral/NavTreePlugin.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.node.mjs +18 -0
- package/dist/lib/neutral/NavTreePlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-Z347LKSF.mjs +42 -0
- package/dist/lib/neutral/app-graph-builder-Z347LKSF.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5OPDKH6B.mjs +273 -0
- package/dist/lib/neutral/chunk-5OPDKH6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs +79 -0
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-RWLAJYUL.mjs +35 -0
- package/dist/lib/neutral/chunk-RWLAJYUL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-T7QS2EFI.mjs +8 -0
- package/dist/lib/neutral/chunk-T7QS2EFI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZSWYB7JW.mjs +27 -0
- package/dist/lib/neutral/chunk-ZSWYB7JW.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +879 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +20 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/expose-26FV4W5D.mjs +38 -0
- package/dist/lib/neutral/expose-26FV4W5D.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +169 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/{browser/keyboard-YYTYJW4M.mjs → neutral/keyboard-EJ65BVTC.mjs} +25 -20
- package/dist/lib/neutral/keyboard-EJ65BVTC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs +13 -0
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-EWCZMKVX.mjs +50 -0
- package/dist/lib/neutral/react-surface-EWCZMKVX.mjs.map +7 -0
- package/dist/lib/neutral/state-VVITVXWM.mjs +127 -0
- package/dist/lib/neutral/state-VVITVXWM.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +433 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +23 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/NavTreePlugin.d.ts +3 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/NavTreePlugin.node.d.ts +4 -0
- package/dist/types/src/NavTreePlugin.node.d.ts.map +1 -0
- package/dist/types/src/NavTreePlugin.test.d.ts +2 -0
- package/dist/types/src/NavTreePlugin.test.d.ts.map +1 -0
- package/dist/types/src/NavTreePlugin.workerd.d.ts +4 -0
- package/dist/types/src/NavTreePlugin.workerd.d.ts.map +1 -0
- 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 -12
- 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 +13 -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.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 -17
- 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 +28 -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.d.ts +2 -2
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- 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 +18 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -3
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.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 +8 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts +13 -0
- package/dist/types/src/types/NavTreeCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/NavTreeEvents.d.ts +3 -0
- package/dist/types/src/types/NavTreeEvents.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 +126 -59
- package/src/NavTreePlugin.node.ts +17 -0
- package/src/NavTreePlugin.test.ts +27 -0
- package/src/NavTreePlugin.tsx +41 -77
- package/src/NavTreePlugin.workerd.ts +16 -0
- package/src/capabilities/app-graph-builder.ts +34 -45
- package/src/capabilities/index.ts +10 -8
- package/src/capabilities/keyboard.ts +58 -51
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +46 -38
- package/src/capabilities/state.ts +132 -84
- package/src/components/NavTree/NavTree.stories.tsx +51 -57
- 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 +75 -52
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +46 -20
- package/src/components/Sidebar/L0Menu.tsx +155 -184
- package/src/components/Sidebar/L1Panel.tsx +203 -100
- 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 +13 -19
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +127 -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 +271 -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 +5 -5
- 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 +35 -0
- package/src/index.ts +1 -3
- package/src/meta.ts +20 -6
- package/src/operations/expose.ts +42 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/testing/app-graph-builder.ts +166 -238
- package/src/testing/generator.ts +35 -38
- package/src/testing/update-state.ts +6 -6
- package/src/translations.ts +8 -10
- package/src/types/NavTreeCapabilities.ts +21 -0
- package/src/types/NavTreeEvents.ts +12 -0
- package/src/types/index.ts +8 -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-7D2MPHXV.mjs +0 -1483
- package/dist/lib/browser/chunk-7D2MPHXV.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/index.mjs +0 -146
- package/dist/lib/browser/index.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-YYTYJW4M.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-J7MWWAGD.mjs +0 -51
- package/dist/lib/browser/react-surface-J7MWWAGD.mjs.map +0 -7
- package/dist/lib/browser/state-EUSVT6BI.mjs +0 -117
- package/dist/lib/browser/state-EUSVT6BI.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 -369
- 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
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ DXOS Surface plugin for a tree view visualization of the graph.
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/CommandsDialogContent/CommandsDialogContent.tsx
|
|
4
|
+
import React, { forwardRef, useMemo, useState } from "react";
|
|
5
|
+
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
6
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
7
|
+
import { useAppGraph } from "@dxos/app-toolkit/ui";
|
|
8
|
+
import { Keyboard, keySymbols } from "@dxos/keyboard";
|
|
9
|
+
import { Graph, Node, useActionRunner } from "@dxos/plugin-graph";
|
|
10
|
+
import { useActions } from "@dxos/plugin-graph";
|
|
11
|
+
import { Button, Dialog, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
12
|
+
import { SearchList, useSearchListResults } from "@dxos/react-ui-search";
|
|
13
|
+
import { osTranslations } from "@dxos/ui-theme";
|
|
14
|
+
import { getHostPlatform } from "@dxos/util";
|
|
15
|
+
import { KEY_BINDING, meta } from "#meta";
|
|
16
|
+
var CommandsDialogContent = /* @__PURE__ */ forwardRef(({ selected: initial }, forwardedRef) => {
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
18
|
+
const { invokePromise } = useOperationInvoker();
|
|
19
|
+
const runAction = useActionRunner();
|
|
20
|
+
const { graph } = useAppGraph();
|
|
21
|
+
const [selected, setSelected] = useState(initial);
|
|
22
|
+
const allActions = useMemo(() => {
|
|
23
|
+
const current = Keyboard.singleton.getCurrentContext();
|
|
24
|
+
const actionMap = /* @__PURE__ */ new Set();
|
|
25
|
+
const actions2 = [];
|
|
26
|
+
Graph.traverse(graph, {
|
|
27
|
+
relation: [
|
|
28
|
+
"child",
|
|
29
|
+
"action"
|
|
30
|
+
],
|
|
31
|
+
visitor: (node, path) => {
|
|
32
|
+
const isActionLike = Node.isAction(node) || Node.isActionGroup(node);
|
|
33
|
+
const parentId = path.at(-2) ?? "";
|
|
34
|
+
const matches = current === parentId || current.startsWith(parentId + "/");
|
|
35
|
+
if (isActionLike && !actionMap.has(node.id) && matches) {
|
|
36
|
+
actionMap.add(node.id);
|
|
37
|
+
actions2.push(node);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
actions2.sort((a, b) => {
|
|
42
|
+
return toLocalizedString(a.properties.label, t)?.toLowerCase().localeCompare(toLocalizedString(b.properties.label, t)?.toLowerCase());
|
|
43
|
+
});
|
|
44
|
+
return actions2;
|
|
45
|
+
}, [
|
|
46
|
+
graph
|
|
47
|
+
]);
|
|
48
|
+
const group = allActions.find(({ id }) => id === selected);
|
|
49
|
+
const groupActions = useActions(graph, group?.id);
|
|
50
|
+
const actions = Node.isActionGroup(group) ? groupActions : allActions;
|
|
51
|
+
const { results, handleSearch } = useSearchListResults({
|
|
52
|
+
items: actions,
|
|
53
|
+
extract: (action) => toLocalizedString(action.properties.label, t)
|
|
54
|
+
});
|
|
55
|
+
return /* @__PURE__ */ React.createElement(Dialog.Content, {
|
|
56
|
+
ref: forwardedRef
|
|
57
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Title, {
|
|
58
|
+
srOnly: true
|
|
59
|
+
}, t("commands-dialog.title", {
|
|
60
|
+
ns: meta.id
|
|
61
|
+
})), /* @__PURE__ */ React.createElement(SearchList.Root, {
|
|
62
|
+
onSearch: handleSearch
|
|
63
|
+
}, /* @__PURE__ */ React.createElement(SearchList.Input, {
|
|
64
|
+
placeholder: t("command-list-input.placeholder")
|
|
65
|
+
}), /* @__PURE__ */ React.createElement(SearchList.Viewport, null, results.map((action) => {
|
|
66
|
+
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[getHostPlatform()];
|
|
67
|
+
return /* @__PURE__ */ React.createElement(SearchList.Item, {
|
|
68
|
+
value: action.id,
|
|
69
|
+
key: action.id,
|
|
70
|
+
label: toLocalizedString(action.properties.label, t),
|
|
71
|
+
icon: action.properties.icon,
|
|
72
|
+
suffix: shortcut ? keySymbols(shortcut).join("") : void 0,
|
|
73
|
+
onSelect: () => {
|
|
74
|
+
if (action.properties.disabled) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (Node.isActionGroup(action)) {
|
|
78
|
+
setSelected(action.id);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
void invokePromise(LayoutOperation.UpdateDialog, {
|
|
82
|
+
state: false
|
|
83
|
+
});
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
const lookupId = group?.id ?? action.id;
|
|
86
|
+
const node = Graph.getConnections(graph, lookupId, Node.actionRelation("inbound"))[0];
|
|
87
|
+
if (node && Node.isAction(action)) {
|
|
88
|
+
void runAction(action, {
|
|
89
|
+
parent: node,
|
|
90
|
+
caller: KEY_BINDING
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
classNames: "flex items-center gap-2",
|
|
96
|
+
disabled: action.properties.disabled,
|
|
97
|
+
...action.properties?.testId && {
|
|
98
|
+
"data-testid": action.properties.testId
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}))), /* @__PURE__ */ React.createElement(Dialog.ActionBar, null, /* @__PURE__ */ React.createElement(Dialog.Close, {
|
|
102
|
+
asChild: true
|
|
103
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
104
|
+
classNames: "w-full"
|
|
105
|
+
}, t("close.label", {
|
|
106
|
+
ns: osTranslations
|
|
107
|
+
})))));
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
CommandsDialogContent as default
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=CommandsDialogContent-UBGIQ5FI.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.id);\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.id })}</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": "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",
|
|
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", "id", "invokePromise", "runAction", "graph", "setSelected", "allActions", "current", "singleton", "getCurrentContext", "actionMap", "Set", "actions", "traverse", "relation", "visitor", "node", "path", "isActionLike", "isAction", "isActionGroup", "parentId", "at", "matches", "startsWith", "has", "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", "key", "icon", "suffix", "join", "undefined", "onSelect", "disabled", "UpdateDialog", "state", "setTimeout", "lookupId", "getConnections", "actionRelation", "parent", "caller", "classNames", "testId", "ActionBar", "Close", "asChild"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/CommandsTrigger/CommandsTrigger.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
6
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
7
|
+
import { Button, Icon, useTranslation } from "@dxos/react-ui";
|
|
8
|
+
import { COMMANDS_DIALOG, meta } from "#meta";
|
|
9
|
+
var CommandsTrigger = () => {
|
|
10
|
+
const { invokePromise } = useOperationInvoker();
|
|
11
|
+
const { t } = useTranslation(meta.id);
|
|
12
|
+
return /* @__PURE__ */ React.createElement(Button, {
|
|
13
|
+
classNames: "m-1 px-1 lg:px-2",
|
|
14
|
+
onClick: () => void invokePromise(LayoutOperation.UpdateDialog, {
|
|
15
|
+
subject: COMMANDS_DIALOG,
|
|
16
|
+
blockAlign: "start"
|
|
17
|
+
})
|
|
18
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
19
|
+
className: "text-description font-normal grow text-start"
|
|
20
|
+
}, t("command-list-input.placeholder")), /* @__PURE__ */ React.createElement(Icon, {
|
|
21
|
+
icon: "ph--magnifying-glass--regular"
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
CommandsTrigger as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=CommandsTrigger-BH5WLMHK.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NODE_TYPE,
|
|
3
|
+
NavTreeContainer
|
|
4
|
+
} from "./chunk-5OPDKH6B.mjs";
|
|
5
|
+
import "./chunk-JOSNCOV4.mjs";
|
|
6
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
7
|
+
export {
|
|
8
|
+
NODE_TYPE,
|
|
9
|
+
NavTreeContainer,
|
|
10
|
+
NavTreeContainer as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=NavTreeContainer-6AR4BFDD.mjs.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
6
|
+
import { osTranslations } from "@dxos/ui-theme";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
var NavTreeDocumentTitle = ({ node }) => {
|
|
9
|
+
const { t } = useTranslation(meta.id);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
document.title = node ? toLocalizedString(node.properties.label, t) : t("current-app.name", {
|
|
12
|
+
ns: osTranslations
|
|
13
|
+
});
|
|
14
|
+
}, [
|
|
15
|
+
node?.properties?.label
|
|
16
|
+
]);
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
NavTreeDocumentTitle as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=NavTreeDocumentTitle-H3E6ZLYE.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/NavTreePlugin.tsx
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
6
|
+
import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from "@dxos/app-toolkit";
|
|
7
|
+
import { Graph } from "@dxos/plugin-graph";
|
|
8
|
+
import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from "#capabilities";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
import { translations } from "#translations";
|
|
11
|
+
import { NavTreeEvents } from "#types";
|
|
12
|
+
var NavTreePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
13
|
+
activate: AppGraphBuilder
|
|
14
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
15
|
+
activate: OperationHandler
|
|
16
|
+
}), AppPlugin.addSurfaceModule({
|
|
17
|
+
activate: ReactSurface
|
|
18
|
+
}), AppPlugin.addTranslationsModule({
|
|
19
|
+
translations
|
|
20
|
+
}), Plugin.addModule({
|
|
21
|
+
id: "state",
|
|
22
|
+
activatesOn: AppActivationEvents.LayoutReady,
|
|
23
|
+
firesAfterActivation: [
|
|
24
|
+
NavTreeEvents.StateReady
|
|
25
|
+
],
|
|
26
|
+
activate: State
|
|
27
|
+
}), Plugin.addModule({
|
|
28
|
+
id: "expose",
|
|
29
|
+
activatesOn: ActivationEvent.allOf(ActivationEvents.ProcessManagerReady, AppActivationEvents.AppGraphReady, AppActivationEvents.LayoutReady, NavTreeEvents.StateReady),
|
|
30
|
+
activate: Effect.fnUntraced(function* () {
|
|
31
|
+
const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);
|
|
32
|
+
const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
33
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
34
|
+
if (invokePromise && layout.active.length === 1) {
|
|
35
|
+
void Graph.waitForPath(graph, {
|
|
36
|
+
target: layout.active[0]
|
|
37
|
+
}, {
|
|
38
|
+
timeout: 3e4
|
|
39
|
+
}).then(() => invokePromise(LayoutOperation.Expose, {
|
|
40
|
+
subject: layout.active[0]
|
|
41
|
+
})).catch(() => {
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return [];
|
|
45
|
+
})
|
|
46
|
+
}), Plugin.addModule({
|
|
47
|
+
id: "keyboard",
|
|
48
|
+
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.ProcessManagerReady),
|
|
49
|
+
activate: Keyboard
|
|
50
|
+
}), Plugin.make);
|
|
51
|
+
var NavTreePlugin_default = NavTreePlugin;
|
|
52
|
+
export {
|
|
53
|
+
NavTreePlugin,
|
|
54
|
+
NavTreePlugin_default as default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=NavTreePlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/NavTreePlugin.tsx"],
|
|
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\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 Plugin.make,\n);\n\nexport default NavTreePlugin;\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;AAEvB,IAAMC,gBAAgBd,OAAOe,OAAOJ,IAAAA,EAAMK,KAC/Cb,UAAUc,kBAAkB;EAAEC,UAAUZ;AAAgB,CAAA,GACxDH,UAAUgB,0BAA0B;EAAED,UAAUV;AAAiB,CAAA,GACjEL,UAAUiB,iBAAiB;EAAEF,UAAUT;AAAa,CAAA,GACpDN,UAAUkB,sBAAsB;EAAET;AAAa,CAAA,GAC/CZ,OAAOsB,UAAU;EACfC,IAAI;EACJC,aAAavB,oBAAoBwB;EACjCC,sBAAsB;IAACb,cAAcc;;EACrCT,UAAUR;AACZ,CAAA,GACAV,OAAOsB,UAAU;EACfC,IAAI;EACJC,aAAa5B,gBAAgBgC,MAC3B/B,iBAAiBgC,qBACjB5B,oBAAoB6B,eACpB7B,oBAAoBwB,aACpBZ,cAAcc,UAAU;EAE1BT,UAAiBa,kBAAW,aAAA;AAC1B,UAAMC,SAAS,OAAOlC,aAAamC,aAAa/B,gBAAgBgC,MAAM;AACtE,UAAM,EAAEC,cAAa,IAAK,OAAOpC,WAAWqC,IAAItC,aAAauC,gBAAgB;AAC7E,UAAM,EAAEC,MAAK,IAAK,OAAOvC,WAAWqC,IAAIlC,gBAAgBqC,QAAQ;AAChE,QAAIJ,iBAAiBH,OAAOQ,OAAOC,WAAW,GAAG;AAG/C,WAAKpC,MAAMqC,YAAYJ,OAAO;QAAEK,QAAQX,OAAOQ,OAAO,CAAA;MAAG,GAAG;QAAEI,SAAS;MAAO,CAAA,EAC3EC,KAAK,MAAMV,cAAc/B,gBAAgB0C,QAAQ;QAAEC,SAASf,OAAOQ,OAAO,CAAA;MAAG,CAAA,CAAA,EAC7EQ,MAAM,MAAA;MAAO,CAAA;IAClB;AAEA,WAAO,CAAA;EACT,CAAA;AACF,CAAA,GACAhD,OAAOsB,UAAU;EACfC,IAAI;EACJC,aAAa5B,gBAAgBgC,MAAM3B,oBAAoB6B,eAAejC,iBAAiBgC,mBAAmB;EAC1GX,UAAUX;AACZ,CAAA,GACAP,OAAOiD,IAAI;AAGb,IAAA,wBAAenC;",
|
|
6
|
+
"names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppCapabilities", "AppPlugin", "LayoutOperation", "Graph", "AppGraphBuilder", "Keyboard", "OperationHandler", "ReactSurface", "State", "meta", "translations", "NavTreeEvents", "NavTreePlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addSurfaceModule", "addTranslationsModule", "addModule", "id", "activatesOn", "LayoutReady", "firesAfterActivation", "StateReady", "allOf", "ProcessManagerReady", "AppGraphReady", "fnUntraced", "layout", "getAtomValue", "Layout", "invokePromise", "get", "OperationInvoker", "graph", "AppGraph", "active", "length", "waitForPath", "target", "timeout", "then", "Expose", "subject", "catch", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/NavTreePlugin.node.ts
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { AppGraphBuilder, OperationHandler } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
var NavTreePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
9
|
+
activate: AppGraphBuilder
|
|
10
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
11
|
+
activate: OperationHandler
|
|
12
|
+
}), Plugin.make);
|
|
13
|
+
var NavTreePlugin_node_default = NavTreePlugin;
|
|
14
|
+
export {
|
|
15
|
+
NavTreePlugin,
|
|
16
|
+
NavTreePlugin_node_default as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=NavTreePlugin.node.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/NavTreePlugin.node.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, OperationHandler } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.make,\n);\n\nexport default NavTreePlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,iBAAiBC,wBAAwB;AAClD,SAASC,YAAY;AAEd,IAAMC,gBAAgBL,OAAOM,OAAOF,IAAAA,EAAMG,KAC/CN,UAAUO,kBAAkB;EAAEC,UAAUP;AAAgB,CAAA,GACxDD,UAAUS,0BAA0B;EAAED,UAAUN;AAAiB,CAAA,GACjEH,OAAOW,IAAI;AAGb,IAAA,6BAAeN;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "AppGraphBuilder", "OperationHandler", "meta", "NavTreePlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/NavTreePlugin.workerd.ts
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { OperationHandler } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
var NavTreePlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
|
|
9
|
+
activate: OperationHandler
|
|
10
|
+
}), Plugin.make);
|
|
11
|
+
var NavTreePlugin_workerd_default = NavTreePlugin;
|
|
12
|
+
export {
|
|
13
|
+
NavTreePlugin,
|
|
14
|
+
NavTreePlugin_workerd_default as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=NavTreePlugin.workerd.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/NavTreePlugin.workerd.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const NavTreePlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.make,\n);\n\nexport default NavTreePlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,wBAAwB;AACjC,SAASC,YAAY;AAEd,IAAMC,gBAAgBJ,OAAOK,OAAOF,IAAAA,EAAMG,KAC/CL,UAAUM,0BAA0B;EAAEC,UAAUN;AAAiB,CAAA,GACjEF,OAAOS,IAAI;AAGb,IAAA,gCAAeL;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "OperationHandler", "meta", "NavTreePlugin", "define", "pipe", "addOperationHandlerModule", "activate", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/app-graph-builder.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { Capability } from "@dxos/app-framework";
|
|
6
|
+
import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
|
|
7
|
+
import { Operation } from "@dxos/compute";
|
|
8
|
+
import { GraphBuilder, Node, NodeMatcher } from "@dxos/plugin-graph";
|
|
9
|
+
import { COMMANDS_DIALOG, meta } from "#meta";
|
|
10
|
+
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
11
|
+
const extensions = yield* GraphBuilder.createExtension({
|
|
12
|
+
id: "root",
|
|
13
|
+
match: NodeMatcher.whenRoot,
|
|
14
|
+
actions: () => Effect.succeed([
|
|
15
|
+
Node.makeAction({
|
|
16
|
+
id: COMMANDS_DIALOG,
|
|
17
|
+
data: () => Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
18
|
+
subject: COMMANDS_DIALOG,
|
|
19
|
+
blockAlign: "start"
|
|
20
|
+
}),
|
|
21
|
+
properties: {
|
|
22
|
+
label: [
|
|
23
|
+
"open-commands.label",
|
|
24
|
+
{
|
|
25
|
+
ns: meta.id
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
icon: "ph--magnifying-glass--regular",
|
|
29
|
+
keyBinding: {
|
|
30
|
+
macos: "meta+k",
|
|
31
|
+
windows: "ctrl+k"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
])
|
|
36
|
+
});
|
|
37
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
38
|
+
}));
|
|
39
|
+
export {
|
|
40
|
+
app_graph_builder_default as default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=app-graph-builder-Z347LKSF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/index.ts
|
|
4
|
+
import { Capability } from "@dxos/app-framework";
|
|
5
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-Z347LKSF.mjs"));
|
|
6
|
+
var Keyboard = Capability.lazy("Keyboard", () => import("../keyboard-EJ65BVTC.mjs"));
|
|
7
|
+
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-ORDOJUL2.mjs"));
|
|
8
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-EWCZMKVX.mjs"));
|
|
9
|
+
var State = Capability.lazy("State", () => import("../state-VVITVXWM.mjs"));
|
|
10
|
+
export {
|
|
11
|
+
AppGraphBuilder,
|
|
12
|
+
Keyboard,
|
|
13
|
+
OperationHandler,
|
|
14
|
+
ReactSurface,
|
|
15
|
+
State
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const Keyboard = Capability.lazy('Keyboard', () => import('./keyboard'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const State = Capability.lazy('State', () => import('./state'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,WAAWH,WAAWE,KAAK,YAAY,MAAM,OAAO,0BAAA,CAAA;AAC1D,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,QAAQN,WAAWE,KAAK,SAAS,MAAM,OAAO,uBAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "AppGraphBuilder", "lazy", "Keyboard", "OperationHandler", "ReactSurface", "State"]
|
|
7
|
+
}
|