@dxos/plugin-search 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8

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 (204) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +291 -0
  3. package/README.md +0 -1
  4. package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs +51 -0
  5. package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs.map +7 -0
  6. package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs +76 -0
  7. package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs.map +7 -0
  8. package/dist/lib/neutral/SearchPlugin.mjs +10 -0
  9. package/dist/lib/neutral/SearchPlugin.mjs.map +7 -0
  10. package/dist/lib/neutral/app-graph-builder-ADB5LBS5.mjs +71 -0
  11. package/dist/lib/neutral/app-graph-builder-ADB5LBS5.mjs.map +7 -0
  12. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  13. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-2XHA22US.mjs +9 -0
  15. package/dist/lib/neutral/chunk-2XHA22US.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-BST37VRI.mjs +34 -0
  17. package/dist/lib/neutral/chunk-BST37VRI.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-GT3AGVU6.mjs +28 -0
  19. package/dist/lib/neutral/chunk-GT3AGVU6.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  21. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-M7FWWQKQ.mjs +282 -0
  23. package/dist/lib/neutral/chunk-M7FWWQKQ.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-Q2F6YOOZ.mjs +41 -0
  25. package/dist/lib/neutral/chunk-Q2F6YOOZ.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-TN4G3MZZ.mjs +8 -0
  27. package/dist/lib/neutral/chunk-TN4G3MZZ.mjs.map +7 -0
  28. package/dist/lib/neutral/components/index.mjs +97 -0
  29. package/dist/lib/neutral/components/index.mjs.map +7 -0
  30. package/dist/lib/neutral/containers/index.mjs +11 -0
  31. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  32. package/dist/lib/neutral/hooks/index.mjs +30 -0
  33. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  34. package/dist/lib/neutral/index.mjs +40 -0
  35. package/dist/lib/neutral/index.mjs.map +7 -0
  36. package/dist/lib/neutral/meta.json +1 -0
  37. package/dist/lib/neutral/meta.mjs +10 -0
  38. package/dist/lib/neutral/meta.mjs.map +7 -0
  39. package/dist/lib/neutral/open-search-Y6OUELN3.mjs +23 -0
  40. package/dist/lib/neutral/open-search-Y6OUELN3.mjs.map +7 -0
  41. package/dist/lib/neutral/operation-handler-DY624P2R.mjs +13 -0
  42. package/dist/lib/neutral/operation-handler-DY624P2R.mjs.map +7 -0
  43. package/dist/lib/neutral/operations/index.mjs +8 -0
  44. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  45. package/dist/lib/neutral/plugin.mjs +16 -0
  46. package/dist/lib/neutral/plugin.mjs.map +7 -0
  47. package/dist/lib/neutral/react-surface-3IXL3EOJ.mjs +61 -0
  48. package/dist/lib/neutral/react-surface-3IXL3EOJ.mjs.map +7 -0
  49. package/dist/lib/neutral/testing.mjs +8 -0
  50. package/dist/lib/neutral/testing.mjs.map +7 -0
  51. package/dist/lib/neutral/translations.mjs +25 -0
  52. package/dist/lib/neutral/translations.mjs.map +7 -0
  53. package/dist/lib/neutral/types/index.mjs +8 -0
  54. package/dist/lib/neutral/types/index.mjs.map +7 -0
  55. package/dist/types/src/SearchPlugin.d.ts +3 -1
  56. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  58. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  59. package/dist/types/src/capabilities/index.d.ts +5 -3
  60. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  62. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  63. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  64. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  65. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts +9 -0
  66. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts.map +1 -0
  67. package/dist/types/src/components/SearchResultStack/index.d.ts +2 -0
  68. package/dist/types/src/components/SearchResultStack/index.d.ts.map +1 -0
  69. package/dist/types/src/components/index.d.ts +1 -3
  70. package/dist/types/src/components/index.d.ts.map +1 -1
  71. package/dist/types/src/constants.d.ts +3 -0
  72. package/dist/types/src/constants.d.ts.map +1 -0
  73. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts +4 -0
  74. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts.map +1 -0
  75. package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts +14 -0
  76. package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts.map +1 -0
  77. package/dist/types/src/containers/SearchArticle/index.d.ts +2 -0
  78. package/dist/types/src/containers/SearchArticle/index.d.ts.map +1 -0
  79. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts +7 -0
  80. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -0
  81. package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts +16 -0
  82. package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts.map +1 -0
  83. package/dist/types/src/containers/SearchDialog/index.d.ts +2 -0
  84. package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -0
  85. package/dist/types/src/containers/index.d.ts +4 -0
  86. package/dist/types/src/containers/index.d.ts.map +1 -0
  87. package/dist/types/src/hooks/index.d.ts +1 -0
  88. package/dist/types/src/hooks/index.d.ts.map +1 -1
  89. package/dist/types/src/hooks/sync.d.ts +4 -3
  90. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  91. package/dist/types/src/hooks/useGlobalSearch.d.ts +8 -4
  92. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  93. package/dist/types/src/hooks/useSearchResults.d.ts +3 -2
  94. package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
  95. package/dist/types/src/hooks/useWebSearch.d.ts +7 -4
  96. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  97. package/dist/types/src/index.d.ts +0 -1
  98. package/dist/types/src/index.d.ts.map +1 -1
  99. package/dist/types/src/meta.d.ts +3 -4
  100. package/dist/types/src/meta.d.ts.map +1 -1
  101. package/dist/types/src/operations/index.d.ts +3 -0
  102. package/dist/types/src/operations/index.d.ts.map +1 -0
  103. package/dist/types/src/operations/open-search.d.ts +5 -0
  104. package/dist/types/src/operations/open-search.d.ts.map +1 -0
  105. package/dist/types/src/plugin.d.ts +4 -0
  106. package/dist/types/src/plugin.d.ts.map +1 -0
  107. package/dist/types/src/search/exa.d.ts +5 -4
  108. package/dist/types/src/search/exa.d.ts.map +1 -1
  109. package/dist/types/src/testing.d.ts +2 -0
  110. package/dist/types/src/testing.d.ts.map +1 -0
  111. package/dist/types/src/translations.d.ts +15 -10
  112. package/dist/types/src/translations.d.ts.map +1 -1
  113. package/dist/types/src/types/SearchOperation.d.ts +3 -0
  114. package/dist/types/src/types/SearchOperation.d.ts.map +1 -0
  115. package/dist/types/src/types/index.d.ts +1 -1
  116. package/dist/types/src/types/index.d.ts.map +1 -1
  117. package/dist/types/src/types/search.d.ts +1 -20
  118. package/dist/types/src/types/search.d.ts.map +1 -1
  119. package/dist/types/tsconfig.tsbuildinfo +1 -1
  120. package/package.json +115 -50
  121. package/src/SearchPlugin.tsx +20 -48
  122. package/src/capabilities/app-graph-builder.ts +55 -68
  123. package/src/capabilities/index.ts +8 -4
  124. package/src/capabilities/operation-handler.ts +16 -0
  125. package/src/capabilities/react-surface.tsx +65 -52
  126. package/src/components/SearchResultStack/SearchResultStack.tsx +118 -0
  127. package/src/components/SearchResultStack/index.ts +5 -0
  128. package/src/components/index.ts +1 -3
  129. package/src/constants.ts +9 -0
  130. package/src/containers/SearchArticle/SearchArticle.stories.tsx +79 -0
  131. package/src/containers/SearchArticle/SearchArticle.tsx +60 -0
  132. package/src/containers/SearchArticle/index.ts +5 -0
  133. package/src/containers/SearchDialog/SearchDialog.stories.tsx +108 -0
  134. package/src/containers/SearchDialog/SearchDialog.tsx +93 -0
  135. package/src/containers/SearchDialog/index.ts +5 -0
  136. package/src/containers/index.ts +8 -0
  137. package/src/hooks/index.ts +2 -0
  138. package/src/hooks/sync.test.ts +9 -7
  139. package/src/hooks/sync.ts +33 -34
  140. package/src/hooks/useGlobalSearch.tsx +32 -13
  141. package/src/hooks/useSearchResults.ts +9 -6
  142. package/src/hooks/useWebSearch.ts +25 -14
  143. package/src/index.ts +2 -2
  144. package/src/meta.ts +29 -8
  145. package/src/operations/index.ts +7 -0
  146. package/src/operations/open-search.ts +24 -0
  147. package/src/plugin.ts +11 -0
  148. package/src/search/exa.test.ts +9 -11
  149. package/src/search/exa.ts +22 -19
  150. package/src/testing.ts +7 -0
  151. package/src/translations.ts +10 -9
  152. package/src/types/SearchOperation.ts +20 -0
  153. package/src/types/command-score.d.ts +16 -0
  154. package/src/types/index.ts +2 -1
  155. package/src/types/search.ts +1 -25
  156. package/src/vite-env.d.ts +10 -0
  157. package/dist/lib/browser/app-graph-builder-D2QQTIIR.mjs +0 -77
  158. package/dist/lib/browser/app-graph-builder-D2QQTIIR.mjs.map +0 -7
  159. package/dist/lib/browser/chunk-JVMYGOKS.mjs +0 -21
  160. package/dist/lib/browser/chunk-JVMYGOKS.mjs.map +0 -7
  161. package/dist/lib/browser/chunk-KNS62YL2.mjs +0 -20
  162. package/dist/lib/browser/chunk-KNS62YL2.mjs.map +0 -7
  163. package/dist/lib/browser/chunk-VKV5ZDB4.mjs +0 -190
  164. package/dist/lib/browser/chunk-VKV5ZDB4.mjs.map +0 -7
  165. package/dist/lib/browser/index.mjs +0 -112
  166. package/dist/lib/browser/index.mjs.map +0 -7
  167. package/dist/lib/browser/intent-resolver-NXFDPFHC.mjs +0 -22
  168. package/dist/lib/browser/intent-resolver-NXFDPFHC.mjs.map +0 -7
  169. package/dist/lib/browser/meta.json +0 -1
  170. package/dist/lib/browser/react-surface-B2XYD6JN.mjs +0 -468
  171. package/dist/lib/browser/react-surface-B2XYD6JN.mjs.map +0 -7
  172. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  173. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  174. package/dist/types/src/components/Search.stories.d.ts +0 -15
  175. package/dist/types/src/components/Search.stories.d.ts.map +0 -1
  176. package/dist/types/src/components/SearchDialog.d.ts +0 -7
  177. package/dist/types/src/components/SearchDialog.d.ts.map +0 -1
  178. package/dist/types/src/components/SearchMain.d.ts +0 -7
  179. package/dist/types/src/components/SearchMain.d.ts.map +0 -1
  180. package/dist/types/src/components/SearchResults/SearchResults.d.ts +0 -20
  181. package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +0 -1
  182. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts +0 -12
  183. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +0 -1
  184. package/dist/types/src/components/SearchResults/index.d.ts +0 -2
  185. package/dist/types/src/components/SearchResults/index.d.ts.map +0 -1
  186. package/dist/types/src/components/Searchbar/Searchbar.d.ts +0 -14
  187. package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +0 -1
  188. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts +0 -11
  189. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +0 -1
  190. package/dist/types/src/components/Searchbar/index.d.ts +0 -2
  191. package/dist/types/src/components/Searchbar/index.d.ts.map +0 -1
  192. package/dist/types/src/types/action.d.ts +0 -13
  193. package/dist/types/src/types/action.d.ts.map +0 -1
  194. package/src/capabilities/intent-resolver.ts +0 -18
  195. package/src/components/Search.stories.tsx +0 -67
  196. package/src/components/SearchDialog.tsx +0 -124
  197. package/src/components/SearchMain.tsx +0 -68
  198. package/src/components/SearchResults/SearchResults.stories.tsx +0 -58
  199. package/src/components/SearchResults/SearchResults.tsx +0 -86
  200. package/src/components/SearchResults/index.ts +0 -5
  201. package/src/components/Searchbar/Searchbar.stories.tsx +0 -28
  202. package/src/components/Searchbar/Searchbar.tsx +0 -67
  203. package/src/components/Searchbar/index.ts +0 -5
  204. package/src/types/action.tsx +0 -16
package/package.json CHANGED
@@ -1,76 +1,141 @@
1
1
  {
2
2
  "name": "@dxos/plugin-search",
3
- "version": "0.8.4-main.fd6878d",
4
- "description": "Braneframe sketch plugin",
3
+ "version": "0.8.4-staging.60fe92afc8",
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
+ "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
69
+ "./plugin": {
70
+ "source": "./src/plugin.ts",
71
+ "types": "./dist/types/src/plugin.d.ts",
72
+ "default": "./dist/lib/neutral/plugin.mjs"
73
+ },
74
+ "./testing": {
75
+ "source": "./src/testing.ts",
76
+ "types": "./dist/types/src/testing.d.ts",
77
+ "default": "./dist/lib/neutral/testing.mjs"
78
+ },
79
+ "./translations": {
80
+ "source": "./src/translations.ts",
81
+ "types": "./dist/types/src/translations.d.ts",
82
+ "default": "./dist/lib/neutral/translations.mjs"
16
83
  }
17
84
  },
18
85
  "types": "dist/types/src/index.d.ts",
19
- "typesVersions": {
20
- "*": {}
21
- },
22
86
  "files": [
23
87
  "dist",
24
- "src"
88
+ "src",
89
+ "PLUGIN.mdl"
25
90
  ],
26
91
  "dependencies": {
27
- "@preact-signals/safe-react": "^0.9.0",
28
- "exa-js": "^1.5.12",
29
92
  "main-thread-scheduling": "^14.1.1",
30
- "@dxos/ai": "0.8.4-main.fd6878d",
31
- "@dxos/app-framework": "0.8.4-main.fd6878d",
32
- "@dxos/assistant": "0.8.4-main.fd6878d",
33
- "@dxos/blueprints": "0.8.4-main.fd6878d",
34
- "@dxos/debug": "0.8.4-main.fd6878d",
35
- "@dxos/echo": "0.8.4-main.fd6878d",
36
- "@dxos/echo-protocol": "0.8.4-main.fd6878d",
37
- "@dxos/echo-schema": "0.8.4-main.fd6878d",
38
- "@dxos/effect": "0.8.4-main.fd6878d",
39
- "@dxos/invariant": "0.8.4-main.fd6878d",
40
- "@dxos/log": "0.8.4-main.fd6878d",
41
- "@dxos/plugin-client": "0.8.4-main.fd6878d",
42
- "@dxos/live-object": "0.8.4-main.fd6878d",
43
- "@dxos/plugin-deck": "0.8.4-main.fd6878d",
44
- "@dxos/plugin-graph": "0.8.4-main.fd6878d",
45
- "@dxos/react-client": "0.8.4-main.fd6878d",
46
- "@dxos/plugin-space": "0.8.4-main.fd6878d",
47
- "@dxos/react-ui-stack": "0.8.4-main.fd6878d",
48
- "@dxos/schema": "0.8.4-main.fd6878d",
49
- "@dxos/react-ui-searchlist": "0.8.4-main.fd6878d",
50
- "@dxos/util": "0.8.4-main.fd6878d"
93
+ "@dxos/app-framework": "0.8.4-staging.60fe92afc8",
94
+ "@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
95
+ "@dxos/ai": "0.8.4-staging.60fe92afc8",
96
+ "@dxos/compute": "0.8.4-staging.60fe92afc8",
97
+ "@dxos/echo-protocol": "0.8.4-staging.60fe92afc8",
98
+ "@dxos/effect": "0.8.4-staging.60fe92afc8",
99
+ "@dxos/invariant": "0.8.4-staging.60fe92afc8",
100
+ "@dxos/echo": "0.8.4-staging.60fe92afc8",
101
+ "@dxos/keys": "0.8.4-staging.60fe92afc8",
102
+ "@dxos/log": "0.8.4-staging.60fe92afc8",
103
+ "@dxos/debug": "0.8.4-staging.60fe92afc8",
104
+ "@dxos/react-client": "0.8.4-staging.60fe92afc8",
105
+ "@dxos/react-ui-attention": "0.8.4-staging.60fe92afc8",
106
+ "@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
107
+ "@dxos/react-ui-menu": "0.8.4-staging.60fe92afc8",
108
+ "@dxos/react-ui-search": "0.8.4-staging.60fe92afc8",
109
+ "@dxos/react-ui-mosaic": "0.8.4-staging.60fe92afc8",
110
+ "@dxos/schema": "0.8.4-staging.60fe92afc8",
111
+ "@dxos/types": "0.8.4-staging.60fe92afc8",
112
+ "@dxos/util": "0.8.4-staging.60fe92afc8",
113
+ "@dxos/plugin-graph": "0.8.4-staging.60fe92afc8"
51
114
  },
52
115
  "devDependencies": {
53
- "@effect-rx/rx-react": "0.38.0",
54
- "@effect/platform": "0.90.2",
55
- "@types/react": "~18.2.0",
56
- "@types/react-dom": "~18.2.0",
57
- "effect": "3.17.7",
58
- "react": "~18.2.0",
59
- "react-dom": "~18.2.0",
60
- "vite": "5.4.7",
61
- "@dxos/react-ui": "0.8.4-main.fd6878d",
62
- "@dxos/random": "0.8.4-main.fd6878d",
63
- "@dxos/react-ui-theme": "0.8.4-main.fd6878d",
64
- "@dxos/storybook-utils": "0.8.4-main.fd6878d"
116
+ "@effect-atom/atom-react": "^0.5.0",
117
+ "@effect/platform": "0.96.1",
118
+ "@types/react": "~19.2.7",
119
+ "@types/react-dom": "~19.2.3",
120
+ "effect": "3.21.3",
121
+ "react": "~19.2.3",
122
+ "react-dom": "~19.2.3",
123
+ "vite": "^8.0.16",
124
+ "@dxos/plugin-preview": "0.8.4-staging.60fe92afc8",
125
+ "@dxos/plugin-testing": "0.8.4-staging.60fe92afc8",
126
+ "@dxos/random": "0.8.4-staging.60fe92afc8",
127
+ "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
128
+ "@dxos/storybook-utils": "0.8.4-staging.60fe92afc8",
129
+ "@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
65
130
  },
66
131
  "peerDependencies": {
67
- "@effect-rx/rx-react": "^0.34.1",
68
- "@effect/platform": "^0.80.12",
69
- "effect": "^3.13.3",
70
- "react": "~18.2.0",
71
- "react-dom": "~18.2.0",
72
- "@dxos/react-ui": "0.8.4-main.fd6878d",
73
- "@dxos/react-ui-theme": "0.8.4-main.fd6878d"
132
+ "@effect-atom/atom-react": "^0.5.0",
133
+ "@effect/platform": "0.96.1",
134
+ "effect": "3.21.3",
135
+ "react": "~19.2.3",
136
+ "react-dom": "~19.2.3",
137
+ "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
138
+ "@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
74
139
  },
75
140
  "publishConfig": {
76
141
  "access": "public"
@@ -2,53 +2,25 @@
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 = () =>
13
- definePlugin(meta, [
14
- defineModule({
15
- id: `${meta.id}/module/translations`,
16
- activatesOn: Events.SetupTranslations,
17
- activate: () => contributes(Capabilities.Translations, translations),
18
- }),
19
- defineModule({
20
- id: `${meta.id}/module/metadata`,
21
- activatesOn: Events.SetupMetadata,
22
- activate: () =>
23
- contributes(Capabilities.Metadata, {
24
- id: SEARCH_RESULT,
25
- metadata: {
26
- parse: (item: SearchResult, type: string) => {
27
- switch (type) {
28
- case 'node':
29
- return { id: item.id, label: item.label, data: item.object };
30
- case 'object':
31
- return item.object;
32
- case 'view-object':
33
- return item;
34
- }
35
- },
36
- },
37
- }),
38
- }),
39
- defineModule({
40
- id: `${meta.id}/module/app-graph-builder`,
41
- activatesOn: Events.SetupAppGraph,
42
- activate: AppGraphBuilder,
43
- }),
44
- defineModule({
45
- id: `${meta.id}/module/intent-resolver`,
46
- activatesOn: Events.SetupIntentResolver,
47
- activate: IntentResolver,
48
- }),
49
- defineModule({
50
- id: `${meta.id}/module/react-surface`,
51
- activatesOn: Events.SetupReactSurface,
52
- activate: ReactSurface,
53
- }),
54
- ]);
12
+ // eslint-disable-next-line import/no-relative-packages
13
+ import pluginSpec from '../PLUGIN.mdl?raw';
14
+
15
+ export const SearchPlugin = Plugin.define(meta).pipe(
16
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
17
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
18
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
19
+ AppPlugin.addTranslationsModule({ translations }),
20
+ AppPlugin.addPluginAssetModule({
21
+ asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
22
+ }),
23
+ Plugin.make,
24
+ );
25
+
26
+ export default SearchPlugin;
@@ -2,78 +2,65 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import * as Effect from 'effect/Effect';
7
6
 
8
- 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';
9
10
  import { ClientCapabilities } from '@dxos/plugin-client';
10
- import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
11
- import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
12
- import { parseId } from '@dxos/react-client/echo';
11
+ import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
12
+ import { linkedSegment } from '@dxos/react-ui-attention';
13
13
 
14
- import { SEARCH_PLUGIN } from '../meta';
15
- import { SearchAction } from '../types';
14
+ import { meta } from '#meta';
15
+ import { SearchOperation } from '#types';
16
16
 
17
- export default (context: PluginContext) =>
18
- contributes(Capabilities.AppGraphBuilder, [
19
- createExtension({
20
- id: `${SEARCH_PLUGIN}/space-search`,
21
- connector: (node) =>
22
- Rx.make((get) =>
23
- pipe(
24
- get(node),
25
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
26
- Option.map((node) => {
27
- const workspace = get(rxFromSignal(() => context.getCapability(Capabilities.Layout).workspace));
28
- const client = context.getCapability(ClientCapabilities.Client);
29
- const { spaceId } = parseId(workspace);
30
- 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: 'spaceSearch',
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;
31
29
 
32
- return [
33
- {
34
- id: [node.id, 'search'].join(ATTENDABLE_PATH_SEPARATOR),
35
- type: DECK_COMPANION_TYPE,
36
- data: space,
37
- properties: {
38
- label: ['search label', { ns: SEARCH_PLUGIN }],
39
- icon: 'ph--magnifying-glass--regular',
40
- disposition: 'hidden',
41
- },
42
- },
43
- ];
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,
44
36
  }),
45
- Option.getOrElse(() => []),
46
- ),
47
- ),
48
- }),
49
- createExtension({
50
- id: SEARCH_PLUGIN,
51
- actions: (node) =>
52
- Rx.make((get) =>
53
- pipe(
54
- get(node),
55
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
56
- Option.map(() => {
57
- return [
58
- {
59
- id: SearchAction.OpenSearch._tag,
60
- data: async () => {
61
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
62
- await dispatch(createIntent(SearchAction.OpenSearch));
63
- },
64
- properties: {
65
- label: ['search action label', { ns: SEARCH_PLUGIN }],
66
- icon: 'ph--magnifying-glass--regular',
67
- keyBinding: {
68
- macos: 'shift+meta+f',
69
- windows: 'shift+alt+f',
70
- },
71
- },
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',
72
57
  },
73
- ];
74
- }),
75
- Option.getOrElse(() => []),
76
- ),
77
- ),
78
- }),
79
- ]);
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,58 +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
- if (!space) {
32
- return null;
33
- }
34
-
35
- return (
36
- <SearchContextProvider>
37
- <SearchMain space={space} />
38
- </SearchContextProvider>
39
- );
40
- },
41
- }),
42
- createSurface({
43
- id: `${SEARCH_DIALOG}/search`,
44
- role: 'deck-companion--search',
45
- filter: (data): data is { subject: Space } => isSpace(data.subject),
46
- component: ({ data }) => {
47
- const space = data.subject;
48
- if (!space) {
49
- return null;
50
- }
51
-
52
- return (
53
- <SearchContextProvider>
54
- <SearchMain space={space} />
55
- </SearchContextProvider>
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}.searchInput`,
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
+ );