@dxos/plugin-search 0.8.4-main.ead640a → 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 +0 -1
- package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs +51 -0
- package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs.map +7 -0
- package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs +76 -0
- package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs.map +7 -0
- package/dist/lib/neutral/SearchPlugin.mjs +10 -0
- package/dist/lib/neutral/SearchPlugin.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-B3W3UWHV.mjs +71 -0
- package/dist/lib/neutral/app-graph-builder-B3W3UWHV.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7ASS5WTT.mjs +8 -0
- package/dist/lib/neutral/chunk-7ASS5WTT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7VNJDD75.mjs +22 -0
- package/dist/lib/neutral/chunk-7VNJDD75.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIZRI3JV.mjs +27 -0
- package/dist/lib/neutral/chunk-FIZRI3JV.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-NAKPT2JM.mjs +8 -0
- package/dist/lib/neutral/chunk-NAKPT2JM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NBE5GQ5J.mjs +282 -0
- package/dist/lib/neutral/chunk-NBE5GQ5J.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QWFRJRPV.mjs +38 -0
- package/dist/lib/neutral/chunk-QWFRJRPV.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +97 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +11 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +30 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +40 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/open-search-ABE2Y6ZG.mjs +23 -0
- package/dist/lib/neutral/open-search-ABE2Y6ZG.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-DY624P2R.mjs +13 -0
- package/dist/lib/neutral/operation-handler-DY624P2R.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-ER7Q4W6Y.mjs +61 -0
- package/dist/lib/neutral/react-surface-ER7Q4W6Y.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +25 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +8 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/SearchPlugin.d.ts +3 -1
- package/dist/types/src/SearchPlugin.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 +5 -3
- package/dist/types/src/capabilities/index.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/components/SearchResultStack/SearchResultStack.d.ts +9 -0
- package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts.map +1 -0
- package/dist/types/src/components/SearchResultStack/index.d.ts +2 -0
- package/dist/types/src/components/SearchResultStack/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts +4 -0
- package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts.map +1 -0
- package/dist/types/src/{components/Searchbar/Searchbar.stories.d.ts → containers/SearchArticle/SearchArticle.stories.d.ts} +3 -2
- package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SearchArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SearchArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts +7 -0
- package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -0
- package/dist/types/src/{components/SearchResults/SearchResults.stories.d.ts → containers/SearchDialog/SearchDialog.stories.d.ts} +4 -4
- package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SearchDialog/index.d.ts +2 -0
- package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/sync.d.ts +4 -3
- package/dist/types/src/hooks/sync.d.ts.map +1 -1
- package/dist/types/src/hooks/useGlobalSearch.d.ts +8 -4
- package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
- package/dist/types/src/hooks/useSearchResults.d.ts +3 -2
- package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
- package/dist/types/src/hooks/useWebSearch.d.ts +7 -4
- package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- 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/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open-search.d.ts +5 -0
- package/dist/types/src/operations/open-search.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/search/exa.d.ts +5 -4
- package/dist/types/src/search/exa.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +15 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/SearchOperation.d.ts +3 -0
- package/dist/types/src/types/SearchOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/search.d.ts +1 -20
- package/dist/types/src/types/search.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +119 -47
- package/src/SearchPlugin.tsx +14 -47
- package/src/capabilities/app-graph-builder.ts +55 -69
- package/src/capabilities/index.ts +8 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +65 -52
- package/src/components/SearchResultStack/SearchResultStack.tsx +118 -0
- package/src/components/SearchResultStack/index.ts +5 -0
- package/src/components/index.ts +1 -3
- package/src/constants.ts +7 -0
- package/src/containers/SearchArticle/SearchArticle.stories.tsx +79 -0
- package/src/containers/SearchArticle/SearchArticle.tsx +60 -0
- package/src/containers/SearchArticle/index.ts +5 -0
- package/src/containers/SearchDialog/SearchDialog.stories.tsx +108 -0
- package/src/containers/SearchDialog/SearchDialog.tsx +93 -0
- package/src/containers/SearchDialog/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/sync.test.ts +9 -7
- package/src/hooks/sync.ts +32 -34
- package/src/hooks/useGlobalSearch.tsx +32 -13
- package/src/hooks/useSearchResults.ts +7 -4
- package/src/hooks/useWebSearch.ts +25 -14
- package/src/index.ts +2 -2
- package/src/meta.ts +25 -5
- package/src/operations/index.ts +7 -0
- package/src/operations/open-search.ts +24 -0
- package/src/plugin.ts +11 -0
- package/src/search/exa.test.ts +9 -11
- package/src/search/exa.ts +11 -10
- package/src/testing.ts +7 -0
- package/src/translations.ts +10 -9
- package/src/types/SearchOperation.ts +19 -0
- package/src/types/command-score.d.ts +16 -0
- package/src/types/index.ts +2 -1
- package/src/types/search.ts +1 -25
- package/dist/lib/browser/app-graph-builder-YME7SN7O.mjs +0 -78
- package/dist/lib/browser/app-graph-builder-YME7SN7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-5N6LDSFF.mjs +0 -18
- package/dist/lib/browser/chunk-5N6LDSFF.mjs.map +0 -7
- package/dist/lib/browser/chunk-WN3TVQLV.mjs +0 -190
- package/dist/lib/browser/chunk-WN3TVQLV.mjs.map +0 -7
- package/dist/lib/browser/chunk-YJGHPWUO.mjs +0 -21
- package/dist/lib/browser/chunk-YJGHPWUO.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -110
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-XNVR4XRX.mjs +0 -22
- package/dist/lib/browser/intent-resolver-XNVR4XRX.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-YOGLADC4.mjs +0 -470
- package/dist/lib/browser/react-surface-YOGLADC4.mjs.map +0 -7
- 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/Search.stories.d.ts +0 -16
- package/dist/types/src/components/Search.stories.d.ts.map +0 -1
- package/dist/types/src/components/SearchDialog.d.ts +0 -7
- package/dist/types/src/components/SearchDialog.d.ts.map +0 -1
- package/dist/types/src/components/SearchMain.d.ts +0 -7
- package/dist/types/src/components/SearchMain.d.ts.map +0 -1
- package/dist/types/src/components/SearchResults/SearchResults.d.ts +0 -20
- package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +0 -1
- package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +0 -1
- package/dist/types/src/components/SearchResults/index.d.ts +0 -2
- package/dist/types/src/components/SearchResults/index.d.ts.map +0 -1
- package/dist/types/src/components/Searchbar/Searchbar.d.ts +0 -14
- package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +0 -1
- package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Searchbar/index.d.ts +0 -2
- package/dist/types/src/components/Searchbar/index.d.ts.map +0 -1
- package/dist/types/src/types/action.d.ts +0 -13
- package/dist/types/src/types/action.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -18
- package/src/components/Search.stories.tsx +0 -64
- package/src/components/SearchDialog.tsx +0 -124
- package/src/components/SearchMain.tsx +0 -68
- package/src/components/SearchResults/SearchResults.stories.tsx +0 -58
- package/src/components/SearchResults/SearchResults.tsx +0 -86
- package/src/components/SearchResults/index.ts +0 -5
- package/src/components/Searchbar/Searchbar.stories.tsx +0 -28
- package/src/components/Searchbar/Searchbar.tsx +0 -67
- package/src/components/Searchbar/index.ts +0 -5
- package/src/types/action.tsx +0 -16
package/package.json
CHANGED
|
@@ -1,75 +1,147 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-search",
|
|
3
|
-
"version": "0.8.4-main.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.4-main.effb148878",
|
|
4
|
+
"description": "Search plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
-
"
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#hooks": {
|
|
32
|
+
"source": "./src/hooks/index.ts",
|
|
33
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#meta": {
|
|
37
|
+
"source": "./src/meta.ts",
|
|
38
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#operations": {
|
|
42
|
+
"source": "./src/operations/index.ts",
|
|
43
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#plugin": {
|
|
47
|
+
"source": "./src/SearchPlugin.tsx",
|
|
48
|
+
"types": "./dist/types/src/SearchPlugin.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/SearchPlugin.mjs"
|
|
50
|
+
},
|
|
51
|
+
"#translations": {
|
|
52
|
+
"source": "./src/translations.ts",
|
|
53
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
55
|
+
},
|
|
56
|
+
"#types": {
|
|
57
|
+
"source": "./src/types/index.ts",
|
|
58
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
59
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
11
62
|
"exports": {
|
|
12
63
|
".": {
|
|
13
64
|
"source": "./src/index.ts",
|
|
14
65
|
"types": "./dist/types/src/index.d.ts",
|
|
15
|
-
"
|
|
66
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./plugin": {
|
|
69
|
+
"source": "./src/plugin.ts",
|
|
70
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./testing": {
|
|
74
|
+
"source": "./src/testing.ts",
|
|
75
|
+
"types": "./dist/types/src/testing.d.ts",
|
|
76
|
+
"default": "./dist/lib/neutral/testing.mjs"
|
|
77
|
+
},
|
|
78
|
+
"./translations": {
|
|
79
|
+
"source": "./src/translations.ts",
|
|
80
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
81
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
16
82
|
}
|
|
17
83
|
},
|
|
18
84
|
"types": "dist/types/src/index.d.ts",
|
|
19
|
-
"typesVersions": {
|
|
20
|
-
"*": {}
|
|
21
|
-
},
|
|
22
85
|
"files": [
|
|
23
86
|
"dist",
|
|
24
87
|
"src"
|
|
25
88
|
],
|
|
26
89
|
"dependencies": {
|
|
27
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
28
90
|
"exa-js": "^1.5.12",
|
|
29
91
|
"main-thread-scheduling": "^14.1.1",
|
|
30
|
-
"@dxos/ai": "0.8.4-main.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/echo": "0.8.4-main.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/plugin-
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
92
|
+
"@dxos/ai": "0.8.4-main.effb148878",
|
|
93
|
+
"@dxos/app-framework": "0.8.4-main.effb148878",
|
|
94
|
+
"@dxos/assistant": "0.8.4-main.effb148878",
|
|
95
|
+
"@dxos/async": "0.8.4-main.effb148878",
|
|
96
|
+
"@dxos/app-toolkit": "0.8.4-main.effb148878",
|
|
97
|
+
"@dxos/echo": "0.8.4-main.effb148878",
|
|
98
|
+
"@dxos/compute": "0.8.4-main.effb148878",
|
|
99
|
+
"@dxos/debug": "0.8.4-main.effb148878",
|
|
100
|
+
"@dxos/echo-protocol": "0.8.4-main.effb148878",
|
|
101
|
+
"@dxos/effect": "0.8.4-main.effb148878",
|
|
102
|
+
"@dxos/log": "0.8.4-main.effb148878",
|
|
103
|
+
"@dxos/invariant": "0.8.4-main.effb148878",
|
|
104
|
+
"@dxos/plugin-deck": "0.8.4-main.effb148878",
|
|
105
|
+
"@dxos/echo-query": "0.8.4-main.effb148878",
|
|
106
|
+
"@dxos/plugin-client": "0.8.4-main.effb148878",
|
|
107
|
+
"@dxos/plugin-space": "0.8.4-main.effb148878",
|
|
108
|
+
"@dxos/plugin-graph": "0.8.4-main.effb148878",
|
|
109
|
+
"@dxos/react-client": "0.8.4-main.effb148878",
|
|
110
|
+
"@dxos/react-ui-list": "0.8.4-main.effb148878",
|
|
111
|
+
"@dxos/react-ui-components": "0.8.4-main.effb148878",
|
|
112
|
+
"@dxos/react-ui-menu": "0.8.4-main.effb148878",
|
|
113
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.effb148878",
|
|
114
|
+
"@dxos/react-ui-stack": "0.8.4-main.effb148878",
|
|
115
|
+
"@dxos/react-ui-search": "0.8.4-main.effb148878",
|
|
116
|
+
"@dxos/types": "0.8.4-main.effb148878",
|
|
117
|
+
"@dxos/util": "0.8.4-main.effb148878",
|
|
118
|
+
"@dxos/react-ui-attention": "0.8.4-main.effb148878",
|
|
119
|
+
"@dxos/schema": "0.8.4-main.effb148878"
|
|
50
120
|
},
|
|
51
121
|
"devDependencies": {
|
|
52
|
-
"@effect-
|
|
53
|
-
"@effect/platform": "0.
|
|
54
|
-
"@types/react": "~19.2.
|
|
55
|
-
"@types/react-dom": "~19.2.
|
|
56
|
-
"effect": "3.
|
|
57
|
-
"react": "~19.2.
|
|
58
|
-
"react-dom": "~19.2.
|
|
59
|
-
"vite": "
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
122
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
123
|
+
"@effect/platform": "0.94.4",
|
|
124
|
+
"@types/react": "~19.2.7",
|
|
125
|
+
"@types/react-dom": "~19.2.3",
|
|
126
|
+
"effect": "3.20.0",
|
|
127
|
+
"react": "~19.2.3",
|
|
128
|
+
"react-dom": "~19.2.3",
|
|
129
|
+
"vite": "^8.0.14",
|
|
130
|
+
"@dxos/plugin-testing": "0.8.4-main.effb148878",
|
|
131
|
+
"@dxos/plugin-preview": "0.8.4-main.effb148878",
|
|
132
|
+
"@dxos/random": "0.8.4-main.effb148878",
|
|
133
|
+
"@dxos/react-ui": "0.8.4-main.effb148878",
|
|
134
|
+
"@dxos/storybook-utils": "0.8.4-main.effb148878",
|
|
135
|
+
"@dxos/ui-theme": "0.8.4-main.effb148878"
|
|
64
136
|
},
|
|
65
137
|
"peerDependencies": {
|
|
66
|
-
"@effect-
|
|
67
|
-
"@effect/platform": "
|
|
68
|
-
"effect": "
|
|
69
|
-
"react": "
|
|
70
|
-
"react-dom": "
|
|
71
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
138
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
139
|
+
"@effect/platform": "0.94.4",
|
|
140
|
+
"effect": "3.20.0",
|
|
141
|
+
"react": "~19.2.3",
|
|
142
|
+
"react-dom": "~19.2.3",
|
|
143
|
+
"@dxos/react-ui": "0.8.4-main.effb148878",
|
|
144
|
+
"@dxos/ui-theme": "0.8.4-main.effb148878"
|
|
73
145
|
},
|
|
74
146
|
"publishConfig": {
|
|
75
147
|
"access": "public"
|
package/src/SearchPlugin.tsx
CHANGED
|
@@ -2,52 +2,19 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
|
|
7
|
-
import { AppGraphBuilder,
|
|
8
|
-
import {
|
|
9
|
-
import { translations } from '
|
|
10
|
-
import { type SearchResult } from './types';
|
|
8
|
+
import { AppGraphBuilder, OperationHandler, ReactSurface } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
11
11
|
|
|
12
|
-
export const SearchPlugin =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
activate: () =>
|
|
22
|
-
contributes(Capabilities.Metadata, {
|
|
23
|
-
id: SEARCH_RESULT,
|
|
24
|
-
metadata: {
|
|
25
|
-
parse: (item: SearchResult, type: string) => {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case 'node':
|
|
28
|
-
return { id: item.id, label: item.label, data: item.object };
|
|
29
|
-
case 'object':
|
|
30
|
-
return item.object;
|
|
31
|
-
case 'view-object':
|
|
32
|
-
return item;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
}),
|
|
38
|
-
defineModule({
|
|
39
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
40
|
-
activatesOn: Events.SetupAppGraph,
|
|
41
|
-
activate: AppGraphBuilder,
|
|
42
|
-
}),
|
|
43
|
-
defineModule({
|
|
44
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
45
|
-
activatesOn: Events.SetupIntentResolver,
|
|
46
|
-
activate: IntentResolver,
|
|
47
|
-
}),
|
|
48
|
-
defineModule({
|
|
49
|
-
id: `${meta.id}/module/react-surface`,
|
|
50
|
-
activatesOn: Events.SetupReactSurface,
|
|
51
|
-
activate: ReactSurface,
|
|
52
|
-
}),
|
|
53
|
-
]);
|
|
12
|
+
export const SearchPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
14
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
15
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
16
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
17
|
+
Plugin.make,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export default SearchPlugin;
|
|
@@ -2,79 +2,65 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
7
|
-
import * as Option from 'effect/Option';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode, getSpaceIdFromPath } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { parseId } from '@dxos/react-client/echo';
|
|
11
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
12
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
14
13
|
|
|
15
|
-
import { meta } from '
|
|
16
|
-
import {
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { SearchOperation } from '#types';
|
|
17
16
|
|
|
18
|
-
export default (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const { spaceId } = parseId(workspace);
|
|
31
|
-
const space = spaceId ? client.spaces.get(spaceId) : null;
|
|
17
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
const extensions = yield* Effect.all([
|
|
20
|
+
GraphBuilder.createExtension({
|
|
21
|
+
id: 'space-search',
|
|
22
|
+
match: NodeMatcher.whenRoot,
|
|
23
|
+
connector: Effect.fnUntraced(function* (node, get) {
|
|
24
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
25
|
+
const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];
|
|
26
|
+
const layout = layoutAtom ? get(layoutAtom) : undefined;
|
|
27
|
+
const spaceId = layout?.workspace ? getSpaceIdFromPath(layout.workspace) : undefined;
|
|
28
|
+
const space = spaceId ? client.spaces.get(spaceId) : null;
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
label: ['search label', { ns: meta.id }],
|
|
40
|
-
icon: 'ph--magnifying-glass--regular',
|
|
41
|
-
disposition: 'hidden',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
];
|
|
30
|
+
return [
|
|
31
|
+
AppNode.makeDeckCompanion({
|
|
32
|
+
id: linkedSegment('search'),
|
|
33
|
+
label: ['search.label', { ns: meta.id }],
|
|
34
|
+
icon: 'ph--magnifying-glass--regular',
|
|
35
|
+
data: space,
|
|
45
36
|
}),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
label: ['search action label', { ns: meta.id }],
|
|
67
|
-
icon: 'ph--magnifying-glass--regular',
|
|
68
|
-
keyBinding: {
|
|
69
|
-
macos: 'shift+meta+f',
|
|
70
|
-
windows: 'shift+alt+f',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
37
|
+
];
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
GraphBuilder.createExtension({
|
|
41
|
+
id: 'root',
|
|
42
|
+
match: NodeMatcher.whenRoot,
|
|
43
|
+
actions: () =>
|
|
44
|
+
Effect.succeed([
|
|
45
|
+
{
|
|
46
|
+
id: SearchOperation.OpenSearch.meta.key,
|
|
47
|
+
data: Effect.fnUntraced(function* () {
|
|
48
|
+
yield* Operation.invoke(SearchOperation.OpenSearch);
|
|
49
|
+
return false;
|
|
50
|
+
}),
|
|
51
|
+
properties: {
|
|
52
|
+
label: ['search-action.label', { ns: meta.id }],
|
|
53
|
+
icon: 'ph--magnifying-glass--regular',
|
|
54
|
+
keyBinding: {
|
|
55
|
+
macos: 'shift+meta+f',
|
|
56
|
+
windows: 'shift+alt+f',
|
|
73
57
|
},
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
]),
|
|
61
|
+
}),
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
7
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
-
export const
|
|
9
|
-
|
|
8
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
10
|
+
'OperationHandler',
|
|
11
|
+
() => import('./operation-handler'),
|
|
12
|
+
);
|
|
13
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { SearchOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, SearchOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -2,58 +2,71 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React, { type ComponentProps } from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities,
|
|
8
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
9
11
|
import { type Space, isSpace } from '@dxos/react-client/echo';
|
|
10
12
|
|
|
11
|
-
import {
|
|
12
|
-
import { SearchContextProvider } from '
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
13
|
+
import { SearchArticle, SearchDialog } from '#containers';
|
|
14
|
+
import { SearchContextProvider } from '#hooks';
|
|
15
|
+
|
|
16
|
+
import { SEARCH_DIALOG } from '../constants';
|
|
17
|
+
|
|
18
|
+
export default Capability.makeModule(() =>
|
|
19
|
+
Effect.succeed(
|
|
20
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
21
|
+
Surface.create({
|
|
22
|
+
id: SEARCH_DIALOG,
|
|
23
|
+
filter: AppSurface.component<ComponentProps<typeof SearchDialog>>(AppSurface.Dialog, SEARCH_DIALOG),
|
|
24
|
+
component: ({ data }) => {
|
|
25
|
+
const space = useActiveSpace();
|
|
26
|
+
if (!space) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<SearchContextProvider>
|
|
32
|
+
<SearchDialog {...data.props} space={space} />
|
|
33
|
+
</SearchContextProvider>
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
Surface.create({
|
|
38
|
+
id: `${SEARCH_DIALOG}.search-input`,
|
|
39
|
+
role: 'search-input',
|
|
40
|
+
component: () => {
|
|
41
|
+
const space = useActiveSpace();
|
|
42
|
+
if (!space) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<SearchContextProvider>
|
|
48
|
+
<SearchArticle space={space} />
|
|
49
|
+
</SearchContextProvider>
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
Surface.create({
|
|
54
|
+
id: `${SEARCH_DIALOG}.search`,
|
|
55
|
+
role: 'deck-companion--search',
|
|
56
|
+
filter: (data): data is { subject: Space } => isSpace(data.subject),
|
|
57
|
+
component: ({ data }) => {
|
|
58
|
+
const space = data.subject;
|
|
59
|
+
if (!space) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<SearchContextProvider>
|
|
65
|
+
<SearchArticle space={space} />
|
|
66
|
+
</SearchContextProvider>
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
]),
|
|
71
|
+
),
|
|
72
|
+
);
|