@dxos/plugin-search 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b
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/dist/lib/browser/app-graph-builder-4C2ZPCED.mjs +41 -0
- package/dist/lib/browser/app-graph-builder-4C2ZPCED.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4L4PWJYC.mjs → chunk-B532NWHM.mjs} +3 -3
- package/dist/lib/browser/chunk-B532NWHM.mjs.map +7 -0
- package/dist/lib/browser/chunk-GGOOQO2C.mjs +133 -0
- package/dist/lib/browser/chunk-GGOOQO2C.mjs.map +7 -0
- package/dist/lib/browser/chunk-Z745WIBH.mjs +21 -0
- package/dist/lib/browser/chunk-Z745WIBH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +67 -557
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-XUWUYVFT.mjs +19 -0
- package/dist/lib/browser/intent-resolver-XUWUYVFT.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-context-IIHWUFU6.mjs +18 -0
- package/dist/lib/browser/react-context-IIHWUFU6.mjs.map +7 -0
- package/dist/lib/browser/react-surface-242JU6MW.mjs +360 -0
- package/dist/lib/browser/react-surface-242JU6MW.mjs.map +7 -0
- package/dist/types/src/SearchPlugin.d.ts +1 -3
- package/dist/types/src/SearchPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +185 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +8 -0
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/SearchDialog.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +0 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -27
- package/src/SearchPlugin.tsx +40 -91
- package/src/capabilities/app-graph-builder.ts +36 -0
- package/src/capabilities/index.ts +10 -0
- package/src/capabilities/intent-resolver.ts +15 -0
- package/src/capabilities/react-context.tsx +16 -0
- package/src/capabilities/react-surface.tsx +30 -0
- package/src/components/SearchDialog.tsx +6 -8
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -1
- package/src/search-sync.ts +1 -1
- package/src/search.ts +1 -1
- package/src/types.tsx +0 -13
- package/dist/lib/browser/chunk-4L4PWJYC.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -11
- package/dist/lib/browser/meta.mjs.map +0 -7
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<Readonly<{
|
|
2
|
+
id: string;
|
|
3
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
4
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
5
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
6
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
7
|
+
type?: string;
|
|
8
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
id: string;
|
|
11
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
12
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
13
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
14
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
15
|
+
type?: string;
|
|
16
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
17
|
+
}>[] | (Readonly<{
|
|
18
|
+
id: string;
|
|
19
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
20
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
21
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
22
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
23
|
+
type?: string;
|
|
24
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
id: string;
|
|
27
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
28
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
29
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
30
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
31
|
+
type?: string;
|
|
32
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
33
|
+
}>[] | (Readonly<{
|
|
34
|
+
id: string;
|
|
35
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
36
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
37
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
38
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
39
|
+
type?: string;
|
|
40
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
id: string;
|
|
43
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
44
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
45
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
46
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
47
|
+
type?: string;
|
|
48
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
49
|
+
}>[] | (Readonly<{
|
|
50
|
+
id: string;
|
|
51
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
52
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
53
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
54
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
55
|
+
type?: string;
|
|
56
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
57
|
+
}> | Readonly<{
|
|
58
|
+
id: string;
|
|
59
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
60
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
61
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
62
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
63
|
+
type?: string;
|
|
64
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
65
|
+
}>[] | (Readonly<{
|
|
66
|
+
id: string;
|
|
67
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
68
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
69
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
70
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
71
|
+
type?: string;
|
|
72
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
73
|
+
}> | Readonly<{
|
|
74
|
+
id: string;
|
|
75
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
76
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
77
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
78
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
79
|
+
type?: string;
|
|
80
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
81
|
+
}>[] | (Readonly<{
|
|
82
|
+
id: string;
|
|
83
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
84
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
85
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
86
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
87
|
+
type?: string;
|
|
88
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
89
|
+
}> | Readonly<{
|
|
90
|
+
id: string;
|
|
91
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
92
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
93
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
94
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
95
|
+
type?: string;
|
|
96
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
97
|
+
}>[] | (Readonly<{
|
|
98
|
+
id: string;
|
|
99
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
100
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
101
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
102
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
103
|
+
type?: string;
|
|
104
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
105
|
+
}> | Readonly<{
|
|
106
|
+
id: string;
|
|
107
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
108
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
109
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
110
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
111
|
+
type?: string;
|
|
112
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
113
|
+
}>[] | (Readonly<{
|
|
114
|
+
id: string;
|
|
115
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
116
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
117
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
118
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
119
|
+
type?: string;
|
|
120
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
121
|
+
}> | Readonly<{
|
|
122
|
+
id: string;
|
|
123
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
124
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
125
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
126
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
127
|
+
type?: string;
|
|
128
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
129
|
+
}>[] | (Readonly<{
|
|
130
|
+
id: string;
|
|
131
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
132
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
133
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
134
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
135
|
+
type?: string;
|
|
136
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
137
|
+
}> | Readonly<{
|
|
138
|
+
id: string;
|
|
139
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
140
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
141
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
142
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
143
|
+
type?: string;
|
|
144
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
145
|
+
}>[] | (Readonly<{
|
|
146
|
+
id: string;
|
|
147
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
148
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
149
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
150
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
151
|
+
type?: string;
|
|
152
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
153
|
+
}> | Readonly<{
|
|
154
|
+
id: string;
|
|
155
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
156
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
157
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
158
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
159
|
+
type?: string;
|
|
160
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
161
|
+
}>[] | (any[] | Readonly<{
|
|
162
|
+
id: string;
|
|
163
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
164
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
165
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
166
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
167
|
+
type?: string;
|
|
168
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
169
|
+
}> | Readonly<{
|
|
170
|
+
id: string;
|
|
171
|
+
disposition: import("packages/common/util/dist/types/src").Disposition;
|
|
172
|
+
resolver?: import("packages/sdk/app-graph/dist/types/src").ResolverExtension;
|
|
173
|
+
connector?: import("packages/sdk/app-graph/dist/types/src").ConnectorExtension;
|
|
174
|
+
relation?: import("packages/sdk/app-graph/dist/types/src").Relation;
|
|
175
|
+
type?: string;
|
|
176
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
177
|
+
}>[])[])[])[])[])[])[])[])[])[])[]>>;
|
|
178
|
+
export declare const IntentResolver: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
|
|
179
|
+
export declare const ReactContext: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<Readonly<{
|
|
180
|
+
id: string;
|
|
181
|
+
dependsOn?: string[];
|
|
182
|
+
context: import("react").FC<import("react").PropsWithChildren>;
|
|
183
|
+
}>>>;
|
|
184
|
+
export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
|
|
185
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;wBAIy4J,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAA2F,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;;;wBAAwF,qCAAY;sBAAyC,uCAAiB;uBAAgD,uCAAiB;sBAAgD,uCAAiB;;2BAAkE,uCAAiB;oCAJrwZ,CAAC;AACzE,eAAO,MAAM,cAAc,mIAA0C,CAAC;AACtE,eAAO,MAAM,YAAY;;;;IAAwC,CAAC;AAClE,eAAO,MAAM,YAAY,iIAAwC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAA8C,MAAM,qBAAqB,CAAC;;AAI5G,wBAMI"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: () => import("@dxos/app-framework").Capability<Readonly<{
|
|
3
|
+
id: string;
|
|
4
|
+
dependsOn?: string[];
|
|
5
|
+
context: React.FC<React.PropsWithChildren>;
|
|
6
|
+
}>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=react-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-context.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAO1B,wBAIK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA4D,MAAM,qBAAqB,CAAC;;AAK7G,wBAkBK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAEjE,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAEjE,OAAO,EAGL,KAAK,gBAAgB,EAMtB,MAAM,qBAAqB,CAAC;AAW7B,eAAO,MAAM,aAAa,wCAAkC,CAAC;AAuB7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,YAAY,yBAA0B,iBAAiB,sBAkFnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const SEARCH_PLUGIN = "dxos.org/plugin/search";
|
|
2
2
|
export declare const SEARCH_RESULT = "dxos.org/plugin/search/result";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const meta: {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
@@ -8,5 +8,4 @@ declare const _default: {
|
|
|
8
8
|
source: string;
|
|
9
9
|
tags: string[];
|
|
10
10
|
};
|
|
11
|
-
export default _default;
|
|
12
11
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD,eAAO,MAAM,IAAI;;;;;;;CAOK,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { GraphBuilderProvides, IntentResolverProvides, MetadataRecordsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
|
|
2
1
|
import { S } from '@dxos/echo-schema';
|
|
3
2
|
export declare namespace SearchAction {
|
|
4
3
|
const OpenSearch_base: S.TaggedClass<OpenSearch, "dxos.org/plugin/search/action/open-search", {
|
|
@@ -11,5 +10,4 @@ export declare namespace SearchAction {
|
|
|
11
10
|
}
|
|
12
11
|
export {};
|
|
13
12
|
}
|
|
14
|
-
export type SearchPluginProvides = SurfaceProvides & IntentResolverProvides & GraphBuilderProvides & MetadataRecordsProvides & TranslationsProvides;
|
|
15
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAItC,yBAAiB,YAAY,CAAC;;;;;;;IAG5B,MAAM,OAAO,UAAW,SAAQ,eAG9B;KAAG;;CACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.7.
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-search",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.9d2a38b",
|
|
4
4
|
"description": "Braneframe sketch plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -11,19 +11,11 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/types/src/index.d.ts",
|
|
13
13
|
"browser": "./dist/lib/browser/index.mjs"
|
|
14
|
-
},
|
|
15
|
-
"./meta": {
|
|
16
|
-
"types": "./dist/types/src/meta.d.ts",
|
|
17
|
-
"browser": "./dist/lib/browser/meta.mjs"
|
|
18
14
|
}
|
|
19
15
|
},
|
|
20
16
|
"types": "dist/types/src/index.d.ts",
|
|
21
17
|
"typesVersions": {
|
|
22
|
-
"*": {
|
|
23
|
-
"meta": [
|
|
24
|
-
"dist/types/src/meta.d.ts"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
18
|
+
"*": {}
|
|
27
19
|
},
|
|
28
20
|
"files": [
|
|
29
21
|
"dist",
|
|
@@ -32,17 +24,18 @@
|
|
|
32
24
|
"dependencies": {
|
|
33
25
|
"@effect/schema": "^0.75.5",
|
|
34
26
|
"main-thread-scheduling": "^14.1.1",
|
|
35
|
-
"@dxos/app-framework": "0.7.5-main.
|
|
36
|
-
"@dxos/echo-schema": "0.7.5-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/plugin-graph": "0.7.5-main.
|
|
40
|
-
"@dxos/plugin-
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/react-
|
|
43
|
-
"@dxos/react-ui-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/react-ui-
|
|
27
|
+
"@dxos/app-framework": "0.7.5-main.9d2a38b",
|
|
28
|
+
"@dxos/echo-schema": "0.7.5-main.9d2a38b",
|
|
29
|
+
"@dxos/debug": "0.7.5-main.9d2a38b",
|
|
30
|
+
"@dxos/live-object": "0.7.5-main.9d2a38b",
|
|
31
|
+
"@dxos/plugin-graph": "0.7.5-main.9d2a38b",
|
|
32
|
+
"@dxos/plugin-space": "0.7.5-main.9d2a38b",
|
|
33
|
+
"@dxos/plugin-markdown": "0.7.5-main.9d2a38b",
|
|
34
|
+
"@dxos/react-client": "0.7.5-main.9d2a38b",
|
|
35
|
+
"@dxos/react-ui-card": "0.7.5-main.9d2a38b",
|
|
36
|
+
"@dxos/react-ui-searchlist": "0.7.5-main.9d2a38b",
|
|
37
|
+
"@dxos/react-ui-mosaic": "0.7.5-main.9d2a38b",
|
|
38
|
+
"@dxos/schema": "0.7.5-main.9d2a38b"
|
|
46
39
|
},
|
|
47
40
|
"devDependencies": {
|
|
48
41
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -51,17 +44,17 @@
|
|
|
51
44
|
"react": "~18.2.0",
|
|
52
45
|
"react-dom": "~18.2.0",
|
|
53
46
|
"vite": "5.4.7",
|
|
54
|
-
"@dxos/random": "0.7.5-main.
|
|
55
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
47
|
+
"@dxos/random": "0.7.5-main.9d2a38b",
|
|
48
|
+
"@dxos/react-ui": "0.7.5-main.9d2a38b",
|
|
49
|
+
"@dxos/storybook-utils": "0.7.5-main.9d2a38b",
|
|
50
|
+
"@dxos/react-ui-theme": "0.7.5-main.9d2a38b"
|
|
58
51
|
},
|
|
59
52
|
"peerDependencies": {
|
|
60
53
|
"@phosphor-icons/react": "^2.1.5",
|
|
61
54
|
"react": "~18.2.0",
|
|
62
55
|
"react-dom": "~18.2.0",
|
|
63
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
64
|
-
"@dxos/react-ui-theme": "0.7.5-main.
|
|
56
|
+
"@dxos/react-ui": "0.7.5-main.9d2a38b",
|
|
57
|
+
"@dxos/react-ui-theme": "0.7.5-main.9d2a38b"
|
|
65
58
|
},
|
|
66
59
|
"publishConfig": {
|
|
67
60
|
"access": "public"
|
package/src/SearchPlugin.tsx
CHANGED
|
@@ -2,38 +2,27 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { contributes, Events, defineModule, definePlugin, Capabilities, oneOf } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
resolvePlugin,
|
|
10
|
-
parseIntentPlugin,
|
|
11
|
-
parseGraphPlugin,
|
|
12
|
-
parseNavigationPlugin,
|
|
13
|
-
LayoutAction,
|
|
14
|
-
firstIdInPart,
|
|
15
|
-
createSurface,
|
|
16
|
-
createResolver,
|
|
17
|
-
createIntent,
|
|
18
|
-
} from '@dxos/app-framework';
|
|
19
|
-
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
20
|
-
import { getActiveSpace } from '@dxos/plugin-space';
|
|
21
|
-
|
|
22
|
-
import { SEARCH_DIALOG, SearchDialog, type SearchDialogProps, SearchMain } from './components';
|
|
23
|
-
import { SearchContextProvider } from './context';
|
|
24
|
-
import meta, { SEARCH_PLUGIN, SEARCH_RESULT } from './meta';
|
|
7
|
+
import { AppGraphBuilder, IntentResolver, ReactSurface, ReactContext } from './capabilities';
|
|
8
|
+
import { meta, SEARCH_RESULT } from './meta';
|
|
25
9
|
import type { SearchResult } from './search-sync';
|
|
26
10
|
import translations from './translations';
|
|
27
|
-
import { SearchAction, type SearchPluginProvides } from './types';
|
|
28
11
|
|
|
29
|
-
export const SearchPlugin = ()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
22
|
+
activate: () =>
|
|
23
|
+
contributes(Capabilities.Metadata, {
|
|
24
|
+
id: SEARCH_RESULT,
|
|
25
|
+
metadata: {
|
|
37
26
|
parse: (item: SearchResult, type: string) => {
|
|
38
27
|
switch (type) {
|
|
39
28
|
case 'node':
|
|
@@ -45,66 +34,26 @@ export const SearchPlugin = (): PluginDefinition<SearchPluginProvides> => {
|
|
|
45
34
|
}
|
|
46
35
|
},
|
|
47
36
|
},
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
context: ({ children }) => <SearchContextProvider>{children}</SearchContextProvider>,
|
|
78
|
-
surface: {
|
|
79
|
-
definitions: ({ plugins }) => {
|
|
80
|
-
const location = resolvePlugin(plugins, parseNavigationPlugin)?.provides.location;
|
|
81
|
-
const graph = resolvePlugin(plugins, parseGraphPlugin)?.provides.graph;
|
|
82
|
-
|
|
83
|
-
return [
|
|
84
|
-
createSurface({
|
|
85
|
-
id: SEARCH_DIALOG,
|
|
86
|
-
role: 'dialog',
|
|
87
|
-
filter: (data): data is { subject: SearchDialogProps } => data.component === SEARCH_DIALOG,
|
|
88
|
-
component: ({ data }) => <SearchDialog {...data.subject} />,
|
|
89
|
-
}),
|
|
90
|
-
createSurface({
|
|
91
|
-
id: 'search-input',
|
|
92
|
-
role: 'search-input',
|
|
93
|
-
component: () => {
|
|
94
|
-
const space =
|
|
95
|
-
graph && location ? getActiveSpace(graph, firstIdInPart(location.active, 'main')) : undefined;
|
|
96
|
-
return space ? <SearchMain space={space} /> : null;
|
|
97
|
-
},
|
|
98
|
-
}),
|
|
99
|
-
];
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
intent: {
|
|
103
|
-
resolvers: () =>
|
|
104
|
-
createResolver(SearchAction.OpenSearch, () => ({
|
|
105
|
-
intents: [createIntent(LayoutAction.SetLayout, { element: 'complementary', state: true })],
|
|
106
|
-
})),
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
};
|
|
37
|
+
}),
|
|
38
|
+
}),
|
|
39
|
+
defineModule({
|
|
40
|
+
id: `${meta.id}/module/react-context`,
|
|
41
|
+
activatesOn: Events.Startup,
|
|
42
|
+
activate: ReactContext,
|
|
43
|
+
}),
|
|
44
|
+
defineModule({
|
|
45
|
+
id: `${meta.id}/module/react-surface`,
|
|
46
|
+
activatesOn: Events.Startup,
|
|
47
|
+
activate: ReactSurface,
|
|
48
|
+
}),
|
|
49
|
+
defineModule({
|
|
50
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
51
|
+
activatesOn: Events.SetupIntents,
|
|
52
|
+
activate: IntentResolver,
|
|
53
|
+
}),
|
|
54
|
+
defineModule({
|
|
55
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
56
|
+
activatesOn: Events.SetupAppGraph,
|
|
57
|
+
activate: AppGraphBuilder,
|
|
58
|
+
}),
|
|
59
|
+
]);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes, createIntent, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
+
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
7
|
+
|
|
8
|
+
import { SEARCH_PLUGIN } from '../meta';
|
|
9
|
+
import { SearchAction } from '../types';
|
|
10
|
+
|
|
11
|
+
export default (context: PluginsContext) =>
|
|
12
|
+
contributes(
|
|
13
|
+
Capabilities.AppGraphBuilder,
|
|
14
|
+
createExtension({
|
|
15
|
+
id: SEARCH_PLUGIN,
|
|
16
|
+
filter: (node): node is Node<null> => node.id === 'root',
|
|
17
|
+
actions: () => [
|
|
18
|
+
{
|
|
19
|
+
id: SearchAction.OpenSearch._tag,
|
|
20
|
+
data: async () => {
|
|
21
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
22
|
+
await dispatch(createIntent(SearchAction.OpenSearch));
|
|
23
|
+
},
|
|
24
|
+
properties: {
|
|
25
|
+
label: ['search action label', { ns: SEARCH_PLUGIN }],
|
|
26
|
+
icon: 'ph--magnifying-glass--regular',
|
|
27
|
+
keyBinding: {
|
|
28
|
+
macos: 'shift+meta+f',
|
|
29
|
+
windows: 'shift+alt+f',
|
|
30
|
+
},
|
|
31
|
+
testId: 'searchPlugin.search',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { lazy } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
+
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
9
|
+
export const ReactContext = lazy(() => import('./react-context'));
|
|
10
|
+
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { contributes, Capabilities, createResolver, LayoutAction, createIntent } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { SearchAction } from '../types';
|
|
8
|
+
|
|
9
|
+
export default () =>
|
|
10
|
+
contributes(
|
|
11
|
+
Capabilities.IntentResolver,
|
|
12
|
+
createResolver(SearchAction.OpenSearch, () => ({
|
|
13
|
+
intents: [createIntent(LayoutAction.SetLayout, { element: 'complementary', state: true })],
|
|
14
|
+
})),
|
|
15
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { contributes, Capabilities } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { SearchContextProvider } from '../context';
|
|
10
|
+
import { SEARCH_PLUGIN } from '../meta';
|
|
11
|
+
|
|
12
|
+
export default () =>
|
|
13
|
+
contributes(Capabilities.ReactContext, {
|
|
14
|
+
id: SEARCH_PLUGIN,
|
|
15
|
+
context: ({ children }) => <SearchContextProvider>{children}</SearchContextProvider>,
|
|
16
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, contributes, createSurface, firstIdInPart, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { getActiveSpace } from '@dxos/plugin-space';
|
|
9
|
+
|
|
10
|
+
import { SEARCH_DIALOG, SearchDialog, type SearchDialogProps, SearchMain } from '../components';
|
|
11
|
+
|
|
12
|
+
export default () =>
|
|
13
|
+
contributes(Capabilities.ReactSurface, [
|
|
14
|
+
createSurface({
|
|
15
|
+
id: SEARCH_DIALOG,
|
|
16
|
+
role: 'dialog',
|
|
17
|
+
filter: (data): data is { subject: SearchDialogProps } => data.component === SEARCH_DIALOG,
|
|
18
|
+
component: ({ data }) => <SearchDialog {...data.subject} />,
|
|
19
|
+
}),
|
|
20
|
+
createSurface({
|
|
21
|
+
id: 'search-input',
|
|
22
|
+
role: 'search-input',
|
|
23
|
+
component: () => {
|
|
24
|
+
const location = useCapability(Capabilities.Location);
|
|
25
|
+
const { graph } = useCapability(Capabilities.AppGraph);
|
|
26
|
+
const space = graph && location ? getActiveSpace(graph, firstIdInPart(location.active, 'main')) : undefined;
|
|
27
|
+
return space ? <SearchMain space={space} /> : null;
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
]);
|