@dxos/plugin-search 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.
Files changed (196) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +0 -1
  3. package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs +51 -0
  4. package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs.map +7 -0
  5. package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs +76 -0
  6. package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs.map +7 -0
  7. package/dist/lib/neutral/SearchPlugin.mjs +10 -0
  8. package/dist/lib/neutral/SearchPlugin.mjs.map +7 -0
  9. package/dist/lib/neutral/app-graph-builder-B3W3UWHV.mjs +71 -0
  10. package/dist/lib/neutral/app-graph-builder-B3W3UWHV.mjs.map +7 -0
  11. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  12. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-7ASS5WTT.mjs +8 -0
  14. package/dist/lib/neutral/chunk-7ASS5WTT.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-7VNJDD75.mjs +22 -0
  16. package/dist/lib/neutral/chunk-7VNJDD75.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-FIZRI3JV.mjs +27 -0
  18. package/dist/lib/neutral/chunk-FIZRI3JV.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  20. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-NAKPT2JM.mjs +8 -0
  22. package/dist/lib/neutral/chunk-NAKPT2JM.mjs.map +7 -0
  23. package/dist/lib/{browser/chunk-ZEP4O5SU.mjs → neutral/chunk-NBE5GQ5J.mjs} +66 -75
  24. package/dist/lib/neutral/chunk-NBE5GQ5J.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-QWFRJRPV.mjs +38 -0
  26. package/dist/lib/neutral/chunk-QWFRJRPV.mjs.map +7 -0
  27. package/dist/lib/neutral/components/index.mjs +97 -0
  28. package/dist/lib/neutral/components/index.mjs.map +7 -0
  29. package/dist/lib/neutral/containers/index.mjs +11 -0
  30. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  31. package/dist/lib/neutral/hooks/index.mjs +30 -0
  32. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  33. package/dist/lib/neutral/index.mjs +40 -0
  34. package/dist/lib/neutral/index.mjs.map +7 -0
  35. package/dist/lib/neutral/meta.json +1 -0
  36. package/dist/lib/neutral/meta.mjs +10 -0
  37. package/dist/lib/neutral/meta.mjs.map +7 -0
  38. package/dist/lib/neutral/open-search-ABE2Y6ZG.mjs +23 -0
  39. package/dist/lib/neutral/open-search-ABE2Y6ZG.mjs.map +7 -0
  40. package/dist/lib/neutral/operation-handler-DY624P2R.mjs +13 -0
  41. package/dist/lib/neutral/operation-handler-DY624P2R.mjs.map +7 -0
  42. package/dist/lib/neutral/operations/index.mjs +8 -0
  43. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  44. package/dist/lib/neutral/plugin.mjs +16 -0
  45. package/dist/lib/neutral/plugin.mjs.map +7 -0
  46. package/dist/lib/neutral/react-surface-ER7Q4W6Y.mjs +61 -0
  47. package/dist/lib/neutral/react-surface-ER7Q4W6Y.mjs.map +7 -0
  48. package/dist/lib/neutral/testing.mjs +8 -0
  49. package/dist/lib/neutral/testing.mjs.map +7 -0
  50. package/dist/lib/neutral/translations.mjs +25 -0
  51. package/dist/lib/neutral/translations.mjs.map +7 -0
  52. package/dist/lib/neutral/types/index.mjs +8 -0
  53. package/dist/lib/neutral/types/index.mjs.map +7 -0
  54. package/dist/types/src/SearchPlugin.d.ts +3 -1
  55. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  56. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  57. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  58. package/dist/types/src/capabilities/index.d.ts +5 -3
  59. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  60. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  61. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  62. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  63. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  64. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts +9 -0
  65. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts.map +1 -0
  66. package/dist/types/src/components/SearchResultStack/index.d.ts +2 -0
  67. package/dist/types/src/components/SearchResultStack/index.d.ts.map +1 -0
  68. package/dist/types/src/components/index.d.ts +1 -3
  69. package/dist/types/src/components/index.d.ts.map +1 -1
  70. package/dist/types/src/constants.d.ts +2 -0
  71. package/dist/types/src/constants.d.ts.map +1 -0
  72. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts +4 -0
  73. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts.map +1 -0
  74. package/dist/types/src/{components/Searchbar/Searchbar.stories.d.ts → containers/SearchArticle/SearchArticle.stories.d.ts} +3 -2
  75. package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts.map +1 -0
  76. package/dist/types/src/containers/SearchArticle/index.d.ts +2 -0
  77. package/dist/types/src/containers/SearchArticle/index.d.ts.map +1 -0
  78. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts +7 -0
  79. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -0
  80. package/dist/types/src/{components/SearchResults/SearchResults.stories.d.ts → containers/SearchDialog/SearchDialog.stories.d.ts} +4 -4
  81. package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts.map +1 -0
  82. package/dist/types/src/containers/SearchDialog/index.d.ts +2 -0
  83. package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -0
  84. package/dist/types/src/containers/index.d.ts +4 -0
  85. package/dist/types/src/containers/index.d.ts.map +1 -0
  86. package/dist/types/src/hooks/sync.d.ts +4 -3
  87. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  88. package/dist/types/src/hooks/useGlobalSearch.d.ts +8 -4
  89. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  90. package/dist/types/src/hooks/useSearchResults.d.ts +3 -2
  91. package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
  92. package/dist/types/src/hooks/useWebSearch.d.ts +7 -4
  93. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  94. package/dist/types/src/index.d.ts +0 -1
  95. package/dist/types/src/index.d.ts.map +1 -1
  96. package/dist/types/src/meta.d.ts +2 -2
  97. package/dist/types/src/meta.d.ts.map +1 -1
  98. package/dist/types/src/operations/index.d.ts +3 -0
  99. package/dist/types/src/operations/index.d.ts.map +1 -0
  100. package/dist/types/src/operations/open-search.d.ts +5 -0
  101. package/dist/types/src/operations/open-search.d.ts.map +1 -0
  102. package/dist/types/src/plugin.d.ts +4 -0
  103. package/dist/types/src/plugin.d.ts.map +1 -0
  104. package/dist/types/src/search/exa.d.ts +5 -4
  105. package/dist/types/src/search/exa.d.ts.map +1 -1
  106. package/dist/types/src/testing.d.ts +2 -0
  107. package/dist/types/src/testing.d.ts.map +1 -0
  108. package/dist/types/src/translations.d.ts +15 -10
  109. package/dist/types/src/translations.d.ts.map +1 -1
  110. package/dist/types/src/types/SearchOperation.d.ts +3 -0
  111. package/dist/types/src/types/SearchOperation.d.ts.map +1 -0
  112. package/dist/types/src/types/index.d.ts +1 -1
  113. package/dist/types/src/types/index.d.ts.map +1 -1
  114. package/dist/types/src/types/search.d.ts +1 -20
  115. package/dist/types/src/types/search.d.ts.map +1 -1
  116. package/dist/types/tsconfig.tsbuildinfo +1 -1
  117. package/package.json +119 -48
  118. package/src/SearchPlugin.tsx +14 -47
  119. package/src/capabilities/app-graph-builder.ts +55 -69
  120. package/src/capabilities/index.ts +8 -4
  121. package/src/capabilities/operation-handler.ts +16 -0
  122. package/src/capabilities/react-surface.tsx +65 -49
  123. package/src/components/SearchResultStack/SearchResultStack.tsx +118 -0
  124. package/src/components/SearchResultStack/index.ts +5 -0
  125. package/src/components/index.ts +1 -3
  126. package/src/constants.ts +7 -0
  127. package/src/containers/SearchArticle/SearchArticle.stories.tsx +79 -0
  128. package/src/containers/SearchArticle/SearchArticle.tsx +60 -0
  129. package/src/containers/SearchArticle/index.ts +5 -0
  130. package/src/containers/SearchDialog/SearchDialog.stories.tsx +108 -0
  131. package/src/containers/SearchDialog/SearchDialog.tsx +93 -0
  132. package/src/containers/SearchDialog/index.ts +5 -0
  133. package/src/containers/index.ts +8 -0
  134. package/src/hooks/sync.test.ts +9 -7
  135. package/src/hooks/sync.ts +31 -33
  136. package/src/hooks/useGlobalSearch.tsx +32 -13
  137. package/src/hooks/useSearchResults.ts +6 -3
  138. package/src/hooks/useWebSearch.ts +25 -14
  139. package/src/index.ts +2 -2
  140. package/src/meta.ts +22 -6
  141. package/src/operations/index.ts +7 -0
  142. package/src/operations/open-search.ts +24 -0
  143. package/src/plugin.ts +11 -0
  144. package/src/search/exa.test.ts +7 -7
  145. package/src/search/exa.ts +9 -8
  146. package/src/testing.ts +7 -0
  147. package/src/translations.ts +10 -9
  148. package/src/types/SearchOperation.ts +19 -0
  149. package/src/types/command-score.d.ts +16 -0
  150. package/src/types/index.ts +2 -1
  151. package/src/types/search.ts +1 -25
  152. package/dist/lib/browser/app-graph-builder-HQR6P4C7.mjs +0 -78
  153. package/dist/lib/browser/app-graph-builder-HQR6P4C7.mjs.map +0 -7
  154. package/dist/lib/browser/chunk-GN2FSWTM.mjs +0 -22
  155. package/dist/lib/browser/chunk-GN2FSWTM.mjs.map +0 -7
  156. package/dist/lib/browser/chunk-TCVYYI44.mjs +0 -21
  157. package/dist/lib/browser/chunk-TCVYYI44.mjs.map +0 -7
  158. package/dist/lib/browser/chunk-ZEP4O5SU.mjs.map +0 -7
  159. package/dist/lib/browser/index.mjs +0 -112
  160. package/dist/lib/browser/index.mjs.map +0 -7
  161. package/dist/lib/browser/intent-resolver-UYQA6UUQ.mjs +0 -22
  162. package/dist/lib/browser/intent-resolver-UYQA6UUQ.mjs.map +0 -7
  163. package/dist/lib/browser/meta.json +0 -1
  164. package/dist/lib/browser/react-surface-H5CKQVII.mjs +0 -307
  165. package/dist/lib/browser/react-surface-H5CKQVII.mjs.map +0 -7
  166. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  167. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  168. package/dist/types/src/components/Search.stories.d.ts +0 -16
  169. package/dist/types/src/components/Search.stories.d.ts.map +0 -1
  170. package/dist/types/src/components/SearchDialog.d.ts +0 -7
  171. package/dist/types/src/components/SearchDialog.d.ts.map +0 -1
  172. package/dist/types/src/components/SearchMain.d.ts +0 -6
  173. package/dist/types/src/components/SearchMain.d.ts.map +0 -1
  174. package/dist/types/src/components/SearchResults/SearchResults.d.ts +0 -20
  175. package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +0 -1
  176. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +0 -1
  177. package/dist/types/src/components/SearchResults/index.d.ts +0 -2
  178. package/dist/types/src/components/SearchResults/index.d.ts.map +0 -1
  179. package/dist/types/src/components/Searchbar/Searchbar.d.ts +0 -10
  180. package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +0 -1
  181. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +0 -1
  182. package/dist/types/src/components/Searchbar/index.d.ts +0 -2
  183. package/dist/types/src/components/Searchbar/index.d.ts.map +0 -1
  184. package/dist/types/src/types/action.d.ts +0 -13
  185. package/dist/types/src/types/action.d.ts.map +0 -1
  186. package/src/capabilities/intent-resolver.ts +0 -18
  187. package/src/components/Search.stories.tsx +0 -64
  188. package/src/components/SearchDialog.tsx +0 -136
  189. package/src/components/SearchMain.tsx +0 -62
  190. package/src/components/SearchResults/SearchResults.stories.tsx +0 -59
  191. package/src/components/SearchResults/SearchResults.tsx +0 -83
  192. package/src/components/SearchResults/index.ts +0 -5
  193. package/src/components/Searchbar/Searchbar.stories.tsx +0 -28
  194. package/src/components/Searchbar/Searchbar.tsx +0 -48
  195. package/src/components/Searchbar/index.ts +0 -5
  196. package/src/types/action.tsx +0 -16
package/package.json CHANGED
@@ -1,76 +1,147 @@
1
1
  {
2
2
  "name": "@dxos/plugin-search",
3
- "version": "0.8.4-main.e8ec1fe",
4
- "description": "Braneframe sketch plugin",
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
- "license": "MIT",
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
- "browser": "./dist/lib/browser/index.mjs"
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.e8ec1fe",
31
- "@dxos/app-framework": "0.8.4-main.e8ec1fe",
32
- "@dxos/assistant": "0.8.4-main.e8ec1fe",
33
- "@dxos/blueprints": "0.8.4-main.e8ec1fe",
34
- "@dxos/debug": "0.8.4-main.e8ec1fe",
35
- "@dxos/echo": "0.8.4-main.e8ec1fe",
36
- "@dxos/echo-protocol": "0.8.4-main.e8ec1fe",
37
- "@dxos/effect": "0.8.4-main.e8ec1fe",
38
- "@dxos/invariant": "0.8.4-main.e8ec1fe",
39
- "@dxos/live-object": "0.8.4-main.e8ec1fe",
40
- "@dxos/log": "0.8.4-main.e8ec1fe",
41
- "@dxos/plugin-client": "0.8.4-main.e8ec1fe",
42
- "@dxos/plugin-deck": "0.8.4-main.e8ec1fe",
43
- "@dxos/plugin-graph": "0.8.4-main.e8ec1fe",
44
- "@dxos/plugin-space": "0.8.4-main.e8ec1fe",
45
- "@dxos/react-client": "0.8.4-main.e8ec1fe",
46
- "@dxos/react-ui-searchlist": "0.8.4-main.e8ec1fe",
47
- "@dxos/react-ui-stack": "0.8.4-main.e8ec1fe",
48
- "@dxos/schema": "0.8.4-main.e8ec1fe",
49
- "@dxos/types": "0.8.4-main.e8ec1fe",
50
- "@dxos/util": "0.8.4-main.e8ec1fe"
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"
51
120
  },
52
121
  "devDependencies": {
53
- "@effect-atom/atom-react": "^0.3.4",
54
- "@effect/platform": "0.92.1",
55
- "@types/react": "~19.2.2",
56
- "@types/react-dom": "~19.2.2",
57
- "effect": "3.18.3",
58
- "react": "~19.2.0",
59
- "react-dom": "~19.2.0",
60
- "vite": "7.1.9",
61
- "@dxos/random": "0.8.4-main.e8ec1fe",
62
- "@dxos/react-ui": "0.8.4-main.e8ec1fe",
63
- "@dxos/react-ui-theme": "0.8.4-main.e8ec1fe",
64
- "@dxos/storybook-utils": "0.8.4-main.e8ec1fe"
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"
65
136
  },
66
137
  "peerDependencies": {
67
- "@effect-atom/atom-react": "^0.3.4",
68
- "@effect/platform": "^0.80.12",
69
- "effect": "^3.13.3",
70
- "react": "^19.0.0",
71
- "react-dom": "^19.0.0",
72
- "@dxos/react-ui": "0.8.4-main.e8ec1fe",
73
- "@dxos/react-ui-theme": "0.8.4-main.e8ec1fe"
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"
74
145
  },
75
146
  "publishConfig": {
76
147
  "access": "public"
@@ -2,52 +2,19 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
- import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
8
- import { SEARCH_RESULT, meta } from './meta';
9
- import { translations } from './translations';
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 = definePlugin(meta, () => [
13
- defineModule({
14
- id: `${meta.id}/module/translations`,
15
- activatesOn: Events.SetupTranslations,
16
- activate: () => contributes(Capabilities.Translations, translations),
17
- }),
18
- defineModule({
19
- id: `${meta.id}/module/metadata`,
20
- activatesOn: Events.SetupMetadata,
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 { Atom } from '@effect-atom/atom-react';
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 { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
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 { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
12
- import { ROOT_ID, atomFromSignal, createExtension } from '@dxos/plugin-graph';
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 '../meta';
16
- import { SearchAction } from '../types';
14
+ import { meta } from '#meta';
15
+ import { SearchOperation } from '#types';
17
16
 
18
- export default (context: PluginContext) =>
19
- contributes(Capabilities.AppGraphBuilder, [
20
- createExtension({
21
- id: `${meta.id}/space-search`,
22
- connector: (node) =>
23
- Atom.make((get) =>
24
- Function.pipe(
25
- get(node),
26
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
27
- Option.map((node) => {
28
- const workspace = get(atomFromSignal(() => context.getCapability(Capabilities.Layout).workspace));
29
- const client = context.getCapability(ClientCapabilities.Client);
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
- return [
34
- {
35
- id: [node.id, 'search'].join(ATTENDABLE_PATH_SEPARATOR),
36
- type: DECK_COMPANION_TYPE,
37
- data: space,
38
- properties: {
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
- Option.getOrElse(() => []),
47
- ),
48
- ),
49
- }),
50
- createExtension({
51
- id: meta.id,
52
- actions: (node) =>
53
- Atom.make((get) =>
54
- Function.pipe(
55
- get(node),
56
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
57
- Option.map(() => {
58
- return [
59
- {
60
- id: SearchAction.OpenSearch._tag,
61
- data: async () => {
62
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
63
- await dispatch(createIntent(SearchAction.OpenSearch));
64
- },
65
- properties: {
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
- Option.getOrElse(() => []),
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 { lazy } from '@dxos/app-framework';
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 IntentResolver = lazy(() => import('./intent-resolver'));
9
- export const ReactSurface = lazy(() => import('./react-surface'));
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,55 +2,71 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React from 'react';
5
+ import * as Effect from 'effect/Effect';
6
+ import React, { type ComponentProps } from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { useActiveSpace } from '@dxos/plugin-space';
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 { SEARCH_DIALOG, SearchDialog, type SearchDialogProps, SearchMain } from '../components';
12
- import { SearchContextProvider } from '../hooks';
13
-
14
- export default () =>
15
- contributes(Capabilities.ReactSurface, [
16
- createSurface({
17
- id: SEARCH_DIALOG,
18
- role: 'dialog',
19
- filter: (data): data is { props: SearchDialogProps } => data.component === SEARCH_DIALOG,
20
- component: ({ data }) => (
21
- <SearchContextProvider>
22
- <SearchDialog {...data.props} />
23
- </SearchContextProvider>
24
- ),
25
- }),
26
- createSurface({
27
- id: `${SEARCH_DIALOG}/search-input`,
28
- role: 'search-input',
29
- component: () => {
30
- const space = useActiveSpace();
31
-
32
- return (
33
- <SearchContextProvider>
34
- <SearchMain space={space} />
35
- </SearchContextProvider>
36
- );
37
- },
38
- }),
39
- createSurface({
40
- id: `${SEARCH_DIALOG}/search`,
41
- role: 'deck-companion--search',
42
- filter: (data): data is { subject: Space } => isSpace(data.subject),
43
- component: ({ data }) => {
44
- const space = data.subject;
45
- if (!space) {
46
- return null;
47
- }
48
-
49
- return (
50
- <SearchContextProvider>
51
- <SearchMain space={space} />
52
- </SearchContextProvider>
53
- );
54
- },
55
- }),
56
- ]);
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
+ );