@dxos/plugin-search 0.8.4-main.d05673bc65 → 0.8.4-main.dfabb4ec29

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 (169) hide show
  1. package/dist/lib/neutral/SearchArticle-DBLOFRIL.mjs +51 -0
  2. package/dist/lib/neutral/SearchArticle-DBLOFRIL.mjs.map +7 -0
  3. package/dist/lib/neutral/SearchDialog-55XQUL6R.mjs +74 -0
  4. package/dist/lib/neutral/SearchDialog-55XQUL6R.mjs.map +7 -0
  5. package/dist/lib/neutral/SearchPlugin.mjs +23 -0
  6. package/dist/lib/neutral/SearchPlugin.mjs.map +7 -0
  7. package/dist/lib/{browser/app-graph-builder-FHVM5QV7.mjs → neutral/app-graph-builder-B3W3UWHV.mjs} +22 -29
  8. package/dist/lib/neutral/app-graph-builder-B3W3UWHV.mjs.map +7 -0
  9. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  10. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-EBXWOGAD.mjs +26 -0
  12. package/dist/lib/neutral/chunk-EBXWOGAD.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-IXRPYAX5.mjs +8 -0
  14. package/dist/lib/neutral/chunk-IXRPYAX5.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  16. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  17. package/dist/lib/{browser/chunk-NB4JZIOE.mjs → neutral/chunk-LUDADYMK.mjs} +9 -14
  18. package/dist/lib/neutral/chunk-LUDADYMK.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-NAKPT2JM.mjs +8 -0
  20. package/dist/lib/neutral/chunk-NAKPT2JM.mjs.map +7 -0
  21. package/dist/lib/{browser/chunk-PZ67KFRU.mjs → neutral/chunk-NC3YYBHS.mjs} +1 -1
  22. package/dist/lib/{browser/chunk-PZ67KFRU.mjs.map → neutral/chunk-NC3YYBHS.mjs.map} +2 -2
  23. package/dist/lib/neutral/components/index.mjs +97 -0
  24. package/dist/lib/neutral/components/index.mjs.map +7 -0
  25. package/dist/lib/neutral/containers/index.mjs +11 -0
  26. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  27. package/dist/lib/neutral/hooks/index.mjs +30 -0
  28. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  29. package/dist/lib/neutral/index.mjs +40 -0
  30. package/dist/lib/neutral/index.mjs.map +7 -0
  31. package/dist/lib/neutral/meta.json +1 -0
  32. package/dist/lib/neutral/meta.mjs +10 -0
  33. package/dist/lib/neutral/meta.mjs.map +7 -0
  34. package/dist/lib/neutral/open-search-DY6ZGVKR.mjs +23 -0
  35. package/dist/lib/neutral/open-search-DY6ZGVKR.mjs.map +7 -0
  36. package/dist/lib/neutral/operation-handler-DY624P2R.mjs +13 -0
  37. package/dist/lib/neutral/operation-handler-DY624P2R.mjs.map +7 -0
  38. package/dist/lib/neutral/operations/index.mjs +8 -0
  39. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  40. package/dist/lib/neutral/plugin.mjs +16 -0
  41. package/dist/lib/neutral/plugin.mjs.map +7 -0
  42. package/dist/lib/{browser/react-surface-IPH2UPKO.mjs → neutral/react-surface-ER7Q4W6Y.mjs} +24 -23
  43. package/dist/lib/neutral/react-surface-ER7Q4W6Y.mjs.map +7 -0
  44. package/dist/lib/neutral/translations.mjs +25 -0
  45. package/dist/lib/neutral/translations.mjs.map +7 -0
  46. package/dist/lib/neutral/types/index.mjs +8 -0
  47. package/dist/lib/neutral/types/index.mjs.map +7 -0
  48. package/dist/types/src/SearchPlugin.d.ts +1 -0
  49. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  50. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/index.d.ts +5 -3
  52. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  54. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  55. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  56. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts +9 -0
  57. package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts.map +1 -0
  58. package/dist/types/src/components/SearchResultStack/index.d.ts +2 -0
  59. package/dist/types/src/components/SearchResultStack/index.d.ts.map +1 -0
  60. package/dist/types/src/components/index.d.ts +1 -0
  61. package/dist/types/src/components/index.d.ts.map +1 -1
  62. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts +4 -0
  63. package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts.map +1 -0
  64. package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts +14 -0
  65. package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts.map +1 -0
  66. package/dist/types/src/containers/SearchArticle/index.d.ts +2 -0
  67. package/dist/types/src/containers/SearchArticle/index.d.ts.map +1 -0
  68. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts +5 -4
  69. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -1
  70. package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts +16 -0
  71. package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts.map +1 -0
  72. package/dist/types/src/containers/SearchDialog/index.d.ts +0 -1
  73. package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -1
  74. package/dist/types/src/containers/index.d.ts +1 -2
  75. package/dist/types/src/containers/index.d.ts.map +1 -1
  76. package/dist/types/src/hooks/sync.d.ts +2 -2
  77. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  78. package/dist/types/src/hooks/useGlobalSearch.d.ts +2 -2
  79. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  80. package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
  81. package/dist/types/src/hooks/useWebSearch.d.ts +1 -1
  82. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  83. package/dist/types/src/index.d.ts +0 -1
  84. package/dist/types/src/index.d.ts.map +1 -1
  85. package/dist/types/src/operations/index.d.ts +3 -0
  86. package/dist/types/src/operations/index.d.ts.map +1 -0
  87. package/dist/types/src/operations/open-search.d.ts +5 -0
  88. package/dist/types/src/operations/open-search.d.ts.map +1 -0
  89. package/dist/types/src/plugin.d.ts +4 -0
  90. package/dist/types/src/plugin.d.ts.map +1 -0
  91. package/dist/types/src/search/exa.d.ts.map +1 -1
  92. package/dist/types/src/translations.d.ts +15 -10
  93. package/dist/types/src/translations.d.ts.map +1 -1
  94. package/dist/types/src/types/SearchOperation.d.ts +3 -0
  95. package/dist/types/src/types/SearchOperation.d.ts.map +1 -0
  96. package/dist/types/src/types/index.d.ts +1 -1
  97. package/dist/types/src/types/index.d.ts.map +1 -1
  98. package/dist/types/src/types/search.d.ts +1 -16
  99. package/dist/types/src/types/search.d.ts.map +1 -1
  100. package/dist/types/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +98 -41
  102. package/src/SearchPlugin.tsx +6 -22
  103. package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +13 -17
  104. package/src/capabilities/index.ts +9 -3
  105. package/src/capabilities/operation-handler.ts +16 -0
  106. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +24 -14
  107. package/src/components/SearchResultStack/SearchResultStack.tsx +118 -0
  108. package/src/components/SearchResultStack/index.ts +5 -0
  109. package/src/components/index.ts +2 -0
  110. package/src/constants.ts +1 -1
  111. package/src/containers/SearchArticle/SearchArticle.stories.tsx +79 -0
  112. package/src/containers/SearchArticle/SearchArticle.tsx +60 -0
  113. package/src/containers/SearchArticle/index.ts +5 -0
  114. package/src/containers/SearchDialog/SearchDialog.stories.tsx +108 -0
  115. package/src/containers/SearchDialog/SearchDialog.tsx +66 -93
  116. package/src/containers/SearchDialog/index.ts +0 -1
  117. package/src/containers/index.ts +1 -3
  118. package/src/hooks/sync.test.ts +4 -4
  119. package/src/hooks/sync.ts +3 -3
  120. package/src/hooks/useGlobalSearch.tsx +3 -3
  121. package/src/hooks/useWebSearch.ts +4 -4
  122. package/src/index.ts +2 -2
  123. package/src/operations/index.ts +7 -0
  124. package/src/operations/open-search.ts +24 -0
  125. package/src/plugin.ts +11 -0
  126. package/src/search/exa.ts +1 -1
  127. package/src/translations.ts +10 -9
  128. package/src/types/SearchOperation.ts +19 -0
  129. package/src/types/index.ts +2 -1
  130. package/src/types/search.ts +1 -19
  131. package/dist/lib/browser/SearchDialog-KJL6C2OF.mjs +0 -108
  132. package/dist/lib/browser/SearchDialog-KJL6C2OF.mjs.map +0 -7
  133. package/dist/lib/browser/SearchMain-JCNONOF3.mjs +0 -100
  134. package/dist/lib/browser/SearchMain-JCNONOF3.mjs.map +0 -7
  135. package/dist/lib/browser/app-graph-builder-FHVM5QV7.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-I3633KKK.mjs +0 -26
  137. package/dist/lib/browser/chunk-I3633KKK.mjs.map +0 -7
  138. package/dist/lib/browser/chunk-NB4JZIOE.mjs.map +0 -7
  139. package/dist/lib/browser/index.mjs +0 -105
  140. package/dist/lib/browser/index.mjs.map +0 -7
  141. package/dist/lib/browser/meta.json +0 -1
  142. package/dist/lib/browser/operation-resolver-H4X6BNWR.mjs +0 -26
  143. package/dist/lib/browser/operation-resolver-H4X6BNWR.mjs.map +0 -7
  144. package/dist/lib/browser/react-surface-IPH2UPKO.mjs.map +0 -7
  145. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  146. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  147. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  148. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  149. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  150. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  151. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  152. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  153. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  154. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  155. package/dist/types/src/containers/SearchMain/SearchMain.d.ts +0 -6
  156. package/dist/types/src/containers/SearchMain/SearchMain.d.ts.map +0 -1
  157. package/dist/types/src/containers/SearchMain/index.d.ts +0 -3
  158. package/dist/types/src/containers/SearchMain/index.d.ts.map +0 -1
  159. package/dist/types/src/types/action.d.ts +0 -16
  160. package/dist/types/src/types/action.d.ts.map +0 -1
  161. package/src/capabilities/app-graph-builder/index.ts +0 -7
  162. package/src/capabilities/operation-resolver/index.ts +0 -7
  163. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -24
  164. package/src/capabilities/react-surface/index.ts +0 -7
  165. package/src/containers/SearchMain/SearchMain.tsx +0 -103
  166. package/src/containers/SearchMain/index.ts +0 -7
  167. package/src/types/action.tsx +0 -18
  168. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  169. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-search",
3
- "version": "0.8.4-main.d05673bc65",
3
+ "version": "0.8.4-main.dfabb4ec29",
4
4
  "description": "Search plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -12,12 +12,68 @@
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
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
+ },
15
62
  "exports": {
16
63
  ".": {
17
64
  "source": "./src/index.ts",
18
65
  "types": "./dist/types/src/index.d.ts",
19
- "browser": "./dist/lib/browser/index.mjs",
20
- "node": "./dist/lib/node-esm/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
+ "./translations": {
74
+ "source": "./src/translations.ts",
75
+ "types": "./dist/types/src/translations.d.ts",
76
+ "default": "./dist/lib/neutral/translations.mjs"
21
77
  }
22
78
  },
23
79
  "types": "dist/types/src/index.d.ts",
@@ -28,58 +84,59 @@
28
84
  "dependencies": {
29
85
  "exa-js": "^1.5.12",
30
86
  "main-thread-scheduling": "^14.1.1",
31
- "@dxos/app-framework": "0.8.4-main.d05673bc65",
32
- "@dxos/app-toolkit": "0.8.4-main.d05673bc65",
33
- "@dxos/assistant": "0.8.4-main.d05673bc65",
34
- "@dxos/ai": "0.8.4-main.d05673bc65",
35
- "@dxos/async": "0.8.4-main.d05673bc65",
36
- "@dxos/debug": "0.8.4-main.d05673bc65",
37
- "@dxos/echo-protocol": "0.8.4-main.d05673bc65",
38
- "@dxos/blueprints": "0.8.4-main.d05673bc65",
39
- "@dxos/echo-query": "0.8.4-main.d05673bc65",
40
- "@dxos/echo": "0.8.4-main.d05673bc65",
41
- "@dxos/effect": "0.8.4-main.d05673bc65",
42
- "@dxos/invariant": "0.8.4-main.d05673bc65",
43
- "@dxos/log": "0.8.4-main.d05673bc65",
44
- "@dxos/operation": "0.8.4-main.d05673bc65",
45
- "@dxos/plugin-client": "0.8.4-main.d05673bc65",
46
- "@dxos/plugin-deck": "0.8.4-main.d05673bc65",
47
- "@dxos/plugin-graph": "0.8.4-main.d05673bc65",
48
- "@dxos/react-client": "0.8.4-main.d05673bc65",
49
- "@dxos/plugin-space": "0.8.4-main.d05673bc65",
50
- "@dxos/react-ui-mosaic": "0.8.4-main.d05673bc65",
51
- "@dxos/react-ui-components": "0.8.4-main.d05673bc65",
52
- "@dxos/react-ui-searchlist": "0.8.4-main.d05673bc65",
53
- "@dxos/react-ui-menu": "0.8.4-main.d05673bc65",
54
- "@dxos/schema": "0.8.4-main.d05673bc65",
55
- "@dxos/react-ui-stack": "0.8.4-main.d05673bc65",
56
- "@dxos/util": "0.8.4-main.d05673bc65",
57
- "@dxos/types": "0.8.4-main.d05673bc65"
87
+ "@dxos/ai": "0.8.4-main.dfabb4ec29",
88
+ "@dxos/app-framework": "0.8.4-main.dfabb4ec29",
89
+ "@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
90
+ "@dxos/assistant": "0.8.4-main.dfabb4ec29",
91
+ "@dxos/compute": "0.8.4-main.dfabb4ec29",
92
+ "@dxos/async": "0.8.4-main.dfabb4ec29",
93
+ "@dxos/debug": "0.8.4-main.dfabb4ec29",
94
+ "@dxos/echo": "0.8.4-main.dfabb4ec29",
95
+ "@dxos/echo-query": "0.8.4-main.dfabb4ec29",
96
+ "@dxos/echo-protocol": "0.8.4-main.dfabb4ec29",
97
+ "@dxos/effect": "0.8.4-main.dfabb4ec29",
98
+ "@dxos/invariant": "0.8.4-main.dfabb4ec29",
99
+ "@dxos/log": "0.8.4-main.dfabb4ec29",
100
+ "@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
101
+ "@dxos/plugin-deck": "0.8.4-main.dfabb4ec29",
102
+ "@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
103
+ "@dxos/react-client": "0.8.4-main.dfabb4ec29",
104
+ "@dxos/react-ui-components": "0.8.4-main.dfabb4ec29",
105
+ "@dxos/react-ui-menu": "0.8.4-main.dfabb4ec29",
106
+ "@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
107
+ "@dxos/react-ui-search": "0.8.4-main.dfabb4ec29",
108
+ "@dxos/plugin-space": "0.8.4-main.dfabb4ec29",
109
+ "@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29",
110
+ "@dxos/schema": "0.8.4-main.dfabb4ec29",
111
+ "@dxos/types": "0.8.4-main.dfabb4ec29",
112
+ "@dxos/util": "0.8.4-main.dfabb4ec29",
113
+ "@dxos/react-ui-attention": "0.8.4-main.dfabb4ec29",
114
+ "@dxos/react-ui-list": "0.8.4-main.dfabb4ec29"
58
115
  },
59
116
  "devDependencies": {
60
117
  "@effect-atom/atom-react": "^0.5.0",
61
118
  "@effect/platform": "0.94.4",
62
119
  "@types/react": "~19.2.7",
63
120
  "@types/react-dom": "~19.2.3",
64
- "effect": "3.19.16",
121
+ "effect": "3.20.0",
65
122
  "react": "~19.2.3",
66
123
  "react-dom": "~19.2.3",
67
- "vite": "^7.1.11",
68
- "@dxos/plugin-preview": "0.8.4-main.d05673bc65",
69
- "@dxos/random": "0.8.4-main.d05673bc65",
70
- "@dxos/plugin-testing": "0.8.4-main.d05673bc65",
71
- "@dxos/storybook-utils": "0.8.4-main.d05673bc65",
72
- "@dxos/react-ui": "0.8.4-main.d05673bc65",
73
- "@dxos/ui-theme": "0.8.4-main.d05673bc65"
124
+ "vite": "^8.0.10",
125
+ "@dxos/plugin-preview": "0.8.4-main.dfabb4ec29",
126
+ "@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
127
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
128
+ "@dxos/random": "0.8.4-main.dfabb4ec29",
129
+ "@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
130
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
74
131
  },
75
132
  "peerDependencies": {
76
133
  "@effect-atom/atom-react": "^0.5.0",
77
134
  "@effect/platform": "0.94.4",
78
- "effect": "3.19.16",
135
+ "effect": "3.20.0",
79
136
  "react": "~19.2.3",
80
137
  "react-dom": "~19.2.3",
81
- "@dxos/react-ui": "0.8.4-main.d05673bc65",
82
- "@dxos/ui-theme": "0.8.4-main.d05673bc65"
138
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
139
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29"
83
140
  },
84
141
  "publishConfig": {
85
142
  "access": "public"
@@ -5,32 +5,16 @@
5
5
  import { Plugin } from '@dxos/app-framework';
6
6
  import { AppPlugin } from '@dxos/app-toolkit';
7
7
 
8
- import { AppGraphBuilder, OperationResolver, ReactSurface } from './capabilities';
9
- import { SEARCH_RESULT, meta } from './meta';
10
- import { translations } from './translations';
11
- import { type SearchResult } from './types';
8
+ import { AppGraphBuilder, OperationHandler, ReactSurface } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
12
11
 
13
12
  export const SearchPlugin = Plugin.define(meta).pipe(
14
13
  AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
15
- AppPlugin.addMetadataModule({
16
- metadata: {
17
- id: SEARCH_RESULT,
18
- metadata: {
19
- parse: (item: SearchResult, type: string) => {
20
- switch (type) {
21
- case 'node':
22
- return { id: item.id, label: item.label, data: item.object };
23
- case 'object':
24
- return item.object;
25
- case 'view-object':
26
- return item;
27
- }
28
- },
29
- },
30
- },
31
- }),
32
- AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
14
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
33
15
  AppPlugin.addSurfaceModule({ activate: ReactSurface }),
34
16
  AppPlugin.addTranslationsModule({ translations }),
35
17
  Plugin.make,
36
18
  );
19
+
20
+ export default SearchPlugin;
@@ -5,20 +5,20 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capability } from '@dxos/app-framework';
8
- import { AppCapabilities, COMPANION_PREFIX, getSpaceIdFromPath } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
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 { DECK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
12
11
  import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
12
+ import { linkedSegment } from '@dxos/react-ui-attention';
13
13
 
14
- import { meta } from '../../meta';
15
- import { SearchOperation } from '../../types';
14
+ import { meta } from '#meta';
15
+ import { SearchOperation } from '#types';
16
16
 
17
17
  export default Capability.makeModule(
18
18
  Effect.fnUntraced(function* () {
19
19
  const extensions = yield* Effect.all([
20
20
  GraphBuilder.createExtension({
21
- id: `${meta.id}.space-search`,
21
+ id: 'space-search',
22
22
  match: NodeMatcher.whenRoot,
23
23
  connector: Effect.fnUntraced(function* (node, get) {
24
24
  const client = yield* Capability.get(ClientCapabilities.Client);
@@ -28,21 +28,17 @@ export default Capability.makeModule(
28
28
  const space = spaceId ? client.spaces.get(spaceId) : null;
29
29
 
30
30
  return [
31
- {
32
- id: `${COMPANION_PREFIX}search`,
33
- type: DECK_COMPANION_TYPE,
31
+ AppNode.makeDeckCompanion({
32
+ id: linkedSegment('search'),
33
+ label: ['search.label', { ns: meta.id }],
34
+ icon: 'ph--magnifying-glass--regular',
34
35
  data: space,
35
- properties: {
36
- label: ['search label', { ns: meta.id }],
37
- icon: 'ph--magnifying-glass--regular',
38
- disposition: 'hidden',
39
- },
40
- },
36
+ }),
41
37
  ];
42
38
  }),
43
39
  }),
44
40
  GraphBuilder.createExtension({
45
- id: meta.id,
41
+ id: 'root',
46
42
  match: NodeMatcher.whenRoot,
47
43
  actions: () =>
48
44
  Effect.succeed([
@@ -53,7 +49,7 @@ export default Capability.makeModule(
53
49
  return false;
54
50
  }),
55
51
  properties: {
56
- label: ['search action label', { ns: meta.id }],
52
+ label: ['search-action.label', { ns: meta.id }],
57
53
  icon: 'ph--magnifying-glass--regular',
58
54
  keyBinding: {
59
55
  macos: 'shift+meta+f',
@@ -2,6 +2,12 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './app-graph-builder';
6
- export * from './operation-resolver';
7
- export * from './react-surface';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/compute';
7
+
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
+ );
@@ -3,39 +3,49 @@
3
3
  //
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
- import React from 'react';
6
+ import React, { type ComponentProps } from 'react';
7
7
 
8
8
  import { Capabilities, Capability } from '@dxos/app-framework';
9
9
  import { Surface } from '@dxos/app-framework/ui';
10
- import { useActiveSpace } from '@dxos/plugin-space';
10
+ import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
11
11
  import { type Space, isSpace } from '@dxos/react-client/echo';
12
12
 
13
- import { SEARCH_DIALOG } from '../../constants';
14
- import { SearchDialog, type SearchDialogProps, SearchMain } from '../../containers';
15
- import { SearchContextProvider } from '../../hooks';
13
+ import { SearchArticle, SearchDialog } from '#containers';
14
+ import { SearchContextProvider } from '#hooks';
15
+
16
+ import { SEARCH_DIALOG } from '../constants';
16
17
 
17
18
  export default Capability.makeModule(() =>
18
19
  Effect.succeed(
19
20
  Capability.contributes(Capabilities.ReactSurface, [
20
21
  Surface.create({
21
22
  id: SEARCH_DIALOG,
22
- role: 'dialog',
23
- filter: (data): data is { props: SearchDialogProps } => data.component === SEARCH_DIALOG,
24
- component: ({ data }) => (
25
- <SearchContextProvider>
26
- <SearchDialog {...data.props} />
27
- </SearchContextProvider>
28
- ),
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
+ },
29
36
  }),
30
37
  Surface.create({
31
38
  id: `${SEARCH_DIALOG}.search-input`,
32
39
  role: 'search-input',
33
40
  component: () => {
34
41
  const space = useActiveSpace();
42
+ if (!space) {
43
+ return null;
44
+ }
35
45
 
36
46
  return (
37
47
  <SearchContextProvider>
38
- <SearchMain space={space} />
48
+ <SearchArticle space={space} />
39
49
  </SearchContextProvider>
40
50
  );
41
51
  },
@@ -52,7 +62,7 @@ export default Capability.makeModule(() =>
52
62
 
53
63
  return (
54
64
  <SearchContextProvider>
55
- <SearchMain space={space} />
65
+ <SearchArticle space={space} />
56
66
  </SearchContextProvider>
57
67
  );
58
68
  },
@@ -0,0 +1,118 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React, { type KeyboardEvent, forwardRef, useCallback, useMemo, useState } from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework/ui';
8
+ import { AppSurface, useObjectMenuItems } from '@dxos/app-toolkit/ui';
9
+ import { Entity } from '@dxos/echo';
10
+ import { Card, Toolbar } from '@dxos/react-ui';
11
+ import { ScrollArea } from '@dxos/react-ui';
12
+ import { Menu } from '@dxos/react-ui-menu';
13
+ import { type MosaicTileProps, Mosaic, useMosaicContainer, Focus } from '@dxos/react-ui-mosaic';
14
+ import { type SearchResult } from '@dxos/react-ui-search';
15
+ import { composable, composableProps } from '@dxos/ui-theme';
16
+
17
+ //
18
+ // SearchResultStack
19
+ //
20
+
21
+ export type SearchResultStackProps = {
22
+ results: SearchResult[];
23
+ };
24
+
25
+ export const SearchResultStack = composable<HTMLDivElement, SearchResultStackProps>(
26
+ ({ results, ...props }, forwardedRef) => {
27
+ const [viewport, setViewport] = useState<HTMLElement | null>(null);
28
+ const items = useMemo(() => results.map((result) => ({ result })), [results]);
29
+
30
+ const handleKeyDown = useCallback((event: KeyboardEvent<HTMLDivElement>) => {
31
+ if (event.key === 'Enter') {
32
+ event.preventDefault();
33
+ (document.activeElement as HTMLElement | null)?.click();
34
+ }
35
+ }, []);
36
+
37
+ return (
38
+ <Focus.Group asChild {...composableProps(props)} onKeyDown={handleKeyDown} ref={forwardedRef}>
39
+ <Mosaic.Container asChild>
40
+ <ScrollArea.Root orientation='vertical' padding centered>
41
+ <ScrollArea.Viewport ref={setViewport}>
42
+ <Mosaic.VirtualStack
43
+ Tile={SearchResultTile}
44
+ classNames='my-2'
45
+ gap={8}
46
+ items={items}
47
+ draggable={false}
48
+ getId={(item) => item.result.id}
49
+ getScrollElement={() => viewport}
50
+ estimateSize={() => 150}
51
+ />
52
+ </ScrollArea.Viewport>
53
+ </ScrollArea.Root>
54
+ </Mosaic.Container>
55
+ </Focus.Group>
56
+ );
57
+ },
58
+ );
59
+
60
+ SearchResultStack.displayName = 'SearchResultStack';
61
+
62
+ //
63
+ // SearchResultTile
64
+ //
65
+
66
+ type SearchResultTileData = {
67
+ result: SearchResult;
68
+ };
69
+
70
+ type SearchResultTileProps = Pick<MosaicTileProps<SearchResultTileData>, 'location' | 'data' | 'current'>;
71
+
72
+ /**
73
+ * Search result tile that uses Surface to render object content.
74
+ */
75
+ const SearchResultTile = forwardRef<HTMLDivElement, SearchResultTileProps>(
76
+ ({ data, location, current }, forwardedRef) => {
77
+ const { result } = data;
78
+ const menuItems = useObjectMenuItems(result.object);
79
+ const { setCurrentId } = useMosaicContainer('SearchResultTile');
80
+
81
+ const handleCurrentChange = useCallback(() => {
82
+ setCurrentId(result.id);
83
+ }, [result.id, setCurrentId]);
84
+
85
+ return (
86
+ <Menu.Root>
87
+ <Mosaic.Tile
88
+ asChild
89
+ classNames='dx-hover dx-current dx-selected'
90
+ id={result.id}
91
+ data={data}
92
+ location={location}
93
+ >
94
+ <Focus.Item asChild current={current} onCurrentChange={handleCurrentChange}>
95
+ <Card.Root ref={forwardedRef} role='button' classNames='cursor-pointer'>
96
+ <Card.Toolbar>
97
+ <Card.IconBlock />
98
+ <Card.Title>{result.label ?? (result.object && Entity.getLabel(result.object))}</Card.Title>
99
+ <Menu.Trigger asChild disabled={!menuItems?.length}>
100
+ <Toolbar.IconButton
101
+ iconOnly
102
+ variant='ghost'
103
+ icon='ph--dots-three-vertical--regular'
104
+ label='Actions'
105
+ />
106
+ </Menu.Trigger>
107
+ <Menu.Content items={menuItems} />
108
+ </Card.Toolbar>
109
+ <Surface.Surface type={AppSurface.Card} data={{ subject: result.object }} limit={1} />
110
+ </Card.Root>
111
+ </Focus.Item>
112
+ </Mosaic.Tile>
113
+ </Menu.Root>
114
+ );
115
+ },
116
+ );
117
+
118
+ SearchResultTile.displayName = 'SearchResultTile';
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ export * from './SearchResultStack';
@@ -1,3 +1,5 @@
1
1
  //
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
+
5
+ export * from './SearchResultStack';
package/src/constants.ts CHANGED
@@ -2,6 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { meta } from './meta';
5
+ import { meta } from '#meta';
6
6
 
7
7
  export const SEARCH_DIALOG = `${meta.id}.SearchDialog`;
@@ -0,0 +1,79 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
7
+ import React from 'react';
8
+
9
+ import { Capability } from '@dxos/app-framework';
10
+ import { withPluginManager } from '@dxos/app-framework/testing';
11
+ import { AppCapabilities } from '@dxos/app-toolkit';
12
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
13
+ import { initializeIdentity } from '@dxos/plugin-client/testing';
14
+ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
15
+ import { random } from '@dxos/random';
16
+ import { useSpaces } from '@dxos/react-client/echo';
17
+ import { Loading, withLayout } from '@dxos/react-ui/testing';
18
+ import { createObjectFactory } from '@dxos/schema/testing';
19
+ import { Organization, Person } from '@dxos/types';
20
+
21
+ import { SearchContextProvider } from '#hooks';
22
+ import { translations } from '#translations';
23
+
24
+ import { SearchArticle } from './SearchArticle';
25
+
26
+ random.seed(0);
27
+
28
+ const DefaultStory = () => {
29
+ const spaces = useSpaces();
30
+ const space = spaces[spaces.length - 1];
31
+ if (!space) {
32
+ return <Loading />;
33
+ }
34
+
35
+ return (
36
+ <SearchContextProvider>
37
+ <SearchArticle role='article' space={space} attendableId={space.id} />
38
+ </SearchContextProvider>
39
+ );
40
+ };
41
+
42
+ const meta = {
43
+ title: 'plugins/plugin-search/containers/SearchArticle',
44
+ render: DefaultStory,
45
+ decorators: [
46
+ withLayout({ layout: 'column' }),
47
+ withPluginManager({
48
+ capabilities: [Capability.contributes(AppCapabilities.Translations, translations)],
49
+ plugins: [
50
+ ...corePlugins(),
51
+ StorybookPlugin({}),
52
+ ClientPlugin({
53
+ types: [Organization.Organization, Person.Person],
54
+ onClientInitialized: ({ client }) =>
55
+ Effect.gen(function* () {
56
+ const { personalSpace } = yield* initializeIdentity(client);
57
+
58
+ const factory = createObjectFactory(personalSpace.db, random as any);
59
+ yield* Effect.promise(() =>
60
+ factory([
61
+ { type: Organization.Organization, count: 10 },
62
+ { type: Person.Person, count: 50 },
63
+ ]),
64
+ );
65
+ }),
66
+ }),
67
+ ],
68
+ }),
69
+ ],
70
+ parameters: {
71
+ layout: 'fullscreen',
72
+ },
73
+ } satisfies Meta<typeof DefaultStory>;
74
+
75
+ export default meta;
76
+
77
+ type Story = StoryObj<typeof meta>;
78
+
79
+ export const Default: Story = {};