@dxos/plugin-search 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +291 -0
- package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs +51 -0
- package/dist/lib/neutral/SearchArticle-CQMZ46ZS.mjs.map +7 -0
- package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs +76 -0
- package/dist/lib/neutral/SearchDialog-IFMA5UP5.mjs.map +7 -0
- package/dist/lib/neutral/SearchPlugin.mjs +10 -0
- package/dist/lib/neutral/SearchPlugin.mjs.map +7 -0
- package/dist/lib/{browser/app-graph-builder-NUJ2FOVQ.mjs → neutral/app-graph-builder-ADB5LBS5.mjs} +23 -34
- package/dist/lib/neutral/app-graph-builder-ADB5LBS5.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +13 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2XHA22US.mjs +9 -0
- package/dist/lib/neutral/chunk-2XHA22US.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BST37VRI.mjs +34 -0
- package/dist/lib/neutral/chunk-BST37VRI.mjs.map +7 -0
- package/dist/lib/{browser/chunk-NB4JZIOE.mjs → neutral/chunk-CZU523NP.mjs} +22 -22
- package/dist/lib/neutral/chunk-CZU523NP.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GT3AGVU6.mjs +28 -0
- package/dist/lib/neutral/chunk-GT3AGVU6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Q2F6YOOZ.mjs +41 -0
- package/dist/lib/neutral/chunk-Q2F6YOOZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TN4G3MZZ.mjs +8 -0
- package/dist/lib/neutral/chunk-TN4G3MZZ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +97 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +11 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +30 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +40 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/open-search-Y6OUELN3.mjs +23 -0
- package/dist/lib/neutral/open-search-Y6OUELN3.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-DY624P2R.mjs +13 -0
- package/dist/lib/neutral/operation-handler-DY624P2R.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-3IXL3EOJ.mjs +61 -0
- package/dist/lib/neutral/react-surface-3IXL3EOJ.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +25 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +8 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/SearchPlugin.d.ts +1 -0
- package/dist/types/src/SearchPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts +9 -0
- package/dist/types/src/components/SearchResultStack/SearchResultStack.d.ts.map +1 -0
- package/dist/types/src/components/SearchResultStack/index.d.ts +2 -0
- package/dist/types/src/components/SearchResultStack/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts +4 -0
- package/dist/types/src/containers/SearchArticle/SearchArticle.d.ts.map +1 -0
- package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts +14 -0
- package/dist/types/src/containers/SearchArticle/SearchArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SearchArticle/index.d.ts +2 -0
- package/dist/types/src/containers/SearchArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts +5 -4
- package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -1
- package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts +16 -0
- package/dist/types/src/containers/SearchDialog/SearchDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/SearchDialog/index.d.ts +1 -2
- package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/sync.d.ts +2 -2
- package/dist/types/src/hooks/sync.d.ts.map +1 -1
- package/dist/types/src/hooks/useGlobalSearch.d.ts +2 -2
- package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
- package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
- package/dist/types/src/hooks/useWebSearch.d.ts +1 -1
- package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open-search.d.ts +5 -0
- package/dist/types/src/operations/open-search.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/search/exa.d.ts +4 -5
- package/dist/types/src/search/exa.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +15 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/SearchOperation.d.ts +3 -0
- package/dist/types/src/types/SearchOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/search.d.ts +1 -16
- package/dist/types/src/types/search.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +102 -46
- package/src/SearchPlugin.tsx +12 -22
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +14 -19
- package/src/capabilities/index.ts +9 -3
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +72 -0
- package/src/components/SearchResultStack/SearchResultStack.tsx +118 -0
- package/src/components/SearchResultStack/index.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/constants.ts +4 -2
- package/src/containers/SearchArticle/SearchArticle.stories.tsx +79 -0
- package/src/containers/SearchArticle/SearchArticle.tsx +60 -0
- package/src/containers/SearchArticle/index.ts +5 -0
- package/src/containers/SearchDialog/SearchDialog.stories.tsx +108 -0
- package/src/containers/SearchDialog/SearchDialog.tsx +67 -94
- package/src/containers/SearchDialog/index.ts +1 -3
- package/src/containers/index.ts +1 -4
- package/src/hooks/sync.test.ts +4 -4
- package/src/hooks/sync.ts +11 -8
- package/src/hooks/useGlobalSearch.tsx +3 -3
- package/src/hooks/useSearchResults.ts +2 -2
- package/src/hooks/useWebSearch.ts +6 -6
- package/src/index.ts +2 -2
- package/src/meta.ts +25 -7
- package/src/operations/index.ts +7 -0
- package/src/operations/open-search.ts +24 -0
- package/src/plugin.ts +11 -0
- package/src/search/exa.test.ts +6 -6
- package/src/search/exa.ts +6 -6
- package/src/testing.ts +7 -0
- package/src/translations.ts +10 -9
- package/src/types/SearchOperation.ts +20 -0
- package/src/types/index.ts +2 -1
- package/src/types/search.ts +1 -19
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/SearchDialog-E6336HCX.mjs +0 -110
- package/dist/lib/browser/SearchDialog-E6336HCX.mjs.map +0 -7
- package/dist/lib/browser/SearchMain-24ZNJB24.mjs +0 -100
- package/dist/lib/browser/SearchMain-24ZNJB24.mjs.map +0 -7
- package/dist/lib/browser/SpaceMain-IGCYHL7R.mjs +0 -154
- package/dist/lib/browser/SpaceMain-IGCYHL7R.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-NUJ2FOVQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-HRIWTRJV.mjs +0 -22
- package/dist/lib/browser/chunk-HRIWTRJV.mjs.map +0 -7
- package/dist/lib/browser/chunk-I7YWQSUZ.mjs +0 -26
- package/dist/lib/browser/chunk-I7YWQSUZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NB4JZIOE.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -105
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-QEGN4ZKN.mjs +0 -26
- package/dist/lib/browser/operation-resolver-QEGN4ZKN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FLO4YTFP.mjs +0 -73
- package/dist/lib/browser/react-surface-FLO4YTFP.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/containers/SearchMain/SearchMain.d.ts +0 -6
- package/dist/types/src/containers/SearchMain/SearchMain.d.ts.map +0 -1
- package/dist/types/src/containers/SearchMain/index.d.ts +0 -3
- package/dist/types/src/containers/SearchMain/index.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceMain/SpaceMain.d.ts +0 -6
- package/dist/types/src/containers/SpaceMain/SpaceMain.d.ts.map +0 -1
- package/dist/types/src/containers/SpaceMain/index.d.ts +0 -3
- package/dist/types/src/containers/SpaceMain/index.d.ts.map +0 -1
- package/dist/types/src/types/action.d.ts +0 -16
- package/dist/types/src/types/action.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -24
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -72
- package/src/containers/SearchMain/SearchMain.tsx +0 -103
- package/src/containers/SearchMain/index.ts +0 -7
- package/src/containers/SpaceMain/SpaceMain.tsx +0 -180
- package/src/containers/SpaceMain/index.ts +0 -7
- package/src/types/action.tsx +0 -18
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /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.
|
|
3
|
+
"version": "0.8.4-main.d9fc60f731",
|
|
4
4
|
"description": "Search plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,78 +8,134 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
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
|
-
"
|
|
20
|
-
|
|
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"
|
|
21
83
|
}
|
|
22
84
|
},
|
|
23
85
|
"types": "dist/types/src/index.d.ts",
|
|
24
86
|
"files": [
|
|
25
87
|
"dist",
|
|
26
|
-
"src"
|
|
88
|
+
"src",
|
|
89
|
+
"PLUGIN.mdl"
|
|
27
90
|
],
|
|
28
91
|
"dependencies": {
|
|
29
|
-
"exa-js": "^1.5.12",
|
|
30
92
|
"main-thread-scheduling": "^14.1.1",
|
|
31
|
-
"@dxos/ai": "0.8.4-main.
|
|
32
|
-
"@dxos/app-
|
|
33
|
-
"@dxos/app-
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/plugin-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/react-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-ui-searchlist": "0.8.4-main.c85a9c8dae",
|
|
53
|
-
"@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
|
|
54
|
-
"@dxos/schema": "0.8.4-main.c85a9c8dae",
|
|
55
|
-
"@dxos/types": "0.8.4-main.c85a9c8dae",
|
|
56
|
-
"@dxos/util": "0.8.4-main.c85a9c8dae",
|
|
57
|
-
"@dxos/log": "0.8.4-main.c85a9c8dae"
|
|
93
|
+
"@dxos/ai": "0.8.4-main.d9fc60f731",
|
|
94
|
+
"@dxos/app-toolkit": "0.8.4-main.d9fc60f731",
|
|
95
|
+
"@dxos/app-framework": "0.8.4-main.d9fc60f731",
|
|
96
|
+
"@dxos/compute": "0.8.4-main.d9fc60f731",
|
|
97
|
+
"@dxos/debug": "0.8.4-main.d9fc60f731",
|
|
98
|
+
"@dxos/echo": "0.8.4-main.d9fc60f731",
|
|
99
|
+
"@dxos/echo-protocol": "0.8.4-main.d9fc60f731",
|
|
100
|
+
"@dxos/effect": "0.8.4-main.d9fc60f731",
|
|
101
|
+
"@dxos/invariant": "0.8.4-main.d9fc60f731",
|
|
102
|
+
"@dxos/keys": "0.8.4-main.d9fc60f731",
|
|
103
|
+
"@dxos/log": "0.8.4-main.d9fc60f731",
|
|
104
|
+
"@dxos/plugin-client": "0.8.4-main.d9fc60f731",
|
|
105
|
+
"@dxos/plugin-graph": "0.8.4-main.d9fc60f731",
|
|
106
|
+
"@dxos/react-client": "0.8.4-main.d9fc60f731",
|
|
107
|
+
"@dxos/react-ui-attention": "0.8.4-main.d9fc60f731",
|
|
108
|
+
"@dxos/react-ui-menu": "0.8.4-main.d9fc60f731",
|
|
109
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.d9fc60f731",
|
|
110
|
+
"@dxos/react-ui-search": "0.8.4-main.d9fc60f731",
|
|
111
|
+
"@dxos/schema": "0.8.4-main.d9fc60f731",
|
|
112
|
+
"@dxos/types": "0.8.4-main.d9fc60f731",
|
|
113
|
+
"@dxos/util": "0.8.4-main.d9fc60f731"
|
|
58
114
|
},
|
|
59
115
|
"devDependencies": {
|
|
60
116
|
"@effect-atom/atom-react": "^0.5.0",
|
|
61
|
-
"@effect/platform": "0.
|
|
117
|
+
"@effect/platform": "0.96.1",
|
|
62
118
|
"@types/react": "~19.2.7",
|
|
63
119
|
"@types/react-dom": "~19.2.3",
|
|
64
|
-
"effect": "3.
|
|
120
|
+
"effect": "3.21.2",
|
|
65
121
|
"react": "~19.2.3",
|
|
66
122
|
"react-dom": "~19.2.3",
|
|
67
|
-
"vite": "^
|
|
68
|
-
"@dxos/plugin-preview": "0.8.4-main.
|
|
69
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
123
|
+
"vite": "^8.0.14",
|
|
124
|
+
"@dxos/plugin-preview": "0.8.4-main.d9fc60f731",
|
|
125
|
+
"@dxos/plugin-testing": "0.8.4-main.d9fc60f731",
|
|
126
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
127
|
+
"@dxos/random": "0.8.4-main.d9fc60f731",
|
|
128
|
+
"@dxos/storybook-utils": "0.8.4-main.d9fc60f731",
|
|
129
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
74
130
|
},
|
|
75
131
|
"peerDependencies": {
|
|
76
132
|
"@effect-atom/atom-react": "^0.5.0",
|
|
77
|
-
"@effect/platform": "0.
|
|
78
|
-
"effect": "3.
|
|
133
|
+
"@effect/platform": "0.96.1",
|
|
134
|
+
"effect": "3.21.2",
|
|
79
135
|
"react": "~19.2.3",
|
|
80
136
|
"react-dom": "~19.2.3",
|
|
81
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
82
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
137
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
138
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
83
139
|
},
|
|
84
140
|
"publishConfig": {
|
|
85
141
|
"access": "public"
|
package/src/SearchPlugin.tsx
CHANGED
|
@@ -5,32 +5,22 @@
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
|
|
8
|
-
import { AppGraphBuilder,
|
|
9
|
-
import {
|
|
10
|
-
import { translations } from '
|
|
11
|
-
|
|
8
|
+
import { AppGraphBuilder, OperationHandler, ReactSurface } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
13
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
12
14
|
|
|
13
15
|
export const SearchPlugin = Plugin.define(meta).pipe(
|
|
14
16
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
15
|
-
AppPlugin.
|
|
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 }),
|
|
17
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
33
18
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
34
19
|
AppPlugin.addTranslationsModule({ translations }),
|
|
20
|
+
AppPlugin.addPluginAssetModule({
|
|
21
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
22
|
+
}),
|
|
35
23
|
Plugin.make,
|
|
36
24
|
);
|
|
25
|
+
|
|
26
|
+
export default SearchPlugin;
|
|
@@ -5,45 +5,40 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
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
11
|
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
13
|
-
import {
|
|
12
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
14
13
|
|
|
15
|
-
import { meta } from '
|
|
16
|
-
import { SearchOperation } from '
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { SearchOperation } from '#types';
|
|
17
16
|
|
|
18
17
|
export default Capability.makeModule(
|
|
19
18
|
Effect.fnUntraced(function* () {
|
|
20
19
|
const extensions = yield* Effect.all([
|
|
21
20
|
GraphBuilder.createExtension({
|
|
22
|
-
id:
|
|
21
|
+
id: 'spaceSearch',
|
|
23
22
|
match: NodeMatcher.whenRoot,
|
|
24
23
|
connector: Effect.fnUntraced(function* (node, get) {
|
|
25
24
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
26
25
|
const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];
|
|
27
26
|
const layout = layoutAtom ? get(layoutAtom) : undefined;
|
|
28
|
-
const
|
|
27
|
+
const spaceId = layout?.workspace ? getSpaceIdFromPath(layout.workspace) : undefined;
|
|
29
28
|
const space = spaceId ? client.spaces.get(spaceId) : null;
|
|
30
29
|
|
|
31
30
|
return [
|
|
32
|
-
{
|
|
33
|
-
id:
|
|
34
|
-
|
|
31
|
+
AppNode.makeDeckCompanion({
|
|
32
|
+
id: linkedSegment('search'),
|
|
33
|
+
label: ['search.label', { ns: meta.id }],
|
|
34
|
+
icon: 'ph--magnifying-glass--regular',
|
|
35
35
|
data: space,
|
|
36
|
-
|
|
37
|
-
label: ['search label', { ns: meta.id }],
|
|
38
|
-
icon: 'ph--magnifying-glass--regular',
|
|
39
|
-
disposition: 'hidden',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
36
|
+
}),
|
|
42
37
|
];
|
|
43
38
|
}),
|
|
44
39
|
}),
|
|
45
40
|
GraphBuilder.createExtension({
|
|
46
|
-
id:
|
|
41
|
+
id: 'root',
|
|
47
42
|
match: NodeMatcher.whenRoot,
|
|
48
43
|
actions: () =>
|
|
49
44
|
Effect.succeed([
|
|
@@ -54,7 +49,7 @@ export default Capability.makeModule(
|
|
|
54
49
|
return false;
|
|
55
50
|
}),
|
|
56
51
|
properties: {
|
|
57
|
-
label: ['search
|
|
52
|
+
label: ['search-action.label', { ns: meta.id }],
|
|
58
53
|
icon: 'ph--magnifying-glass--regular',
|
|
59
54
|
keyBinding: {
|
|
60
55
|
macos: 'shift+meta+f',
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React, { type ComponentProps } from 'react';
|
|
7
|
+
|
|
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';
|
|
11
|
+
import { type Space, isSpace } from '@dxos/react-client/echo';
|
|
12
|
+
|
|
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
|
+
);
|
|
@@ -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 { composable, composableProps } from '@dxos/react-ui';
|
|
13
|
+
import { Menu } from '@dxos/react-ui-menu';
|
|
14
|
+
import { type MosaicTileProps, Mosaic, useMosaicContainer, Focus } from '@dxos/react-ui-mosaic';
|
|
15
|
+
import { type SearchResult } from '@dxos/react-ui-search';
|
|
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.Header>
|
|
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.Header>
|
|
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';
|
package/src/components/index.ts
CHANGED
package/src/constants.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { DXN } from '@dxos/keys';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import { meta } from '#meta';
|
|
8
|
+
|
|
9
|
+
export const SEARCH_DIALOG = DXN.make(`${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/testing';
|
|
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 = {};
|