@dxos/plugin-search 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/neutral/{SearchArticle-CQMZ46ZS.mjs → SearchArticle-XEP4DYSI.mjs} +2 -2
- package/dist/lib/neutral/{SearchArticle-CQMZ46ZS.mjs.map → SearchArticle-XEP4DYSI.mjs.map} +3 -3
- package/dist/lib/neutral/{SearchDialog-Z3TXJ55M.mjs → SearchDialog-37ZDKFPS.mjs} +5 -5
- package/dist/lib/neutral/{SearchDialog-Z3TXJ55M.mjs.map → SearchDialog-37ZDKFPS.mjs.map} +3 -3
- package/dist/lib/neutral/{app-graph-builder-26EBAR52.mjs → app-graph-builder-43LAJI5B.mjs} +3 -3
- package/dist/lib/neutral/app-graph-builder-43LAJI5B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +1 -1
- package/dist/lib/neutral/{chunk-M7FWWQKQ.mjs → chunk-KY3X3WAN.mjs} +3 -3
- package/dist/lib/neutral/{chunk-M7FWWQKQ.mjs.map → chunk-KY3X3WAN.mjs.map} +3 -3
- package/dist/lib/neutral/components/index.mjs +1 -1
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/containers/index.mjs +2 -2
- package/dist/lib/neutral/hooks/index.mjs +1 -1
- package/dist/lib/neutral/index.mjs +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -1
- package/dist/types/src/hooks/useGlobalSearch.d.ts +1 -1
- package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/capabilities/app-graph-builder.ts +16 -15
- package/src/components/SearchResultStack/SearchResultStack.tsx +1 -1
- package/src/containers/SearchArticle/SearchArticle.tsx +1 -1
- package/src/containers/SearchDialog/SearchDialog.tsx +20 -16
- package/src/hooks/useGlobalSearch.tsx +1 -1
- package/dist/lib/neutral/app-graph-builder-26EBAR52.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-search",
|
|
3
|
-
"version": "0.9.1-
|
|
3
|
+
"version": "0.9.1-staging.ee54ba693a",
|
|
4
4
|
"description": "Search plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -91,52 +91,52 @@
|
|
|
91
91
|
],
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"main-thread-scheduling": "^14.1.1",
|
|
94
|
-
"@dxos/ai": "0.9.1-
|
|
95
|
-
"@dxos/app-
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/invariant": "0.9.1-
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/log": "0.9.1-
|
|
105
|
-
"@dxos/plugin-
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/react-
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/react-ui-
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/react-ui-mosaic": "0.9.1-
|
|
112
|
-
"@dxos/types": "0.9.1-
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
94
|
+
"@dxos/ai": "0.9.1-staging.ee54ba693a",
|
|
95
|
+
"@dxos/app-framework": "0.9.1-staging.ee54ba693a",
|
|
96
|
+
"@dxos/app-toolkit": "0.9.1-staging.ee54ba693a",
|
|
97
|
+
"@dxos/debug": "0.9.1-staging.ee54ba693a",
|
|
98
|
+
"@dxos/compute": "0.9.1-staging.ee54ba693a",
|
|
99
|
+
"@dxos/effect": "0.9.1-staging.ee54ba693a",
|
|
100
|
+
"@dxos/echo-protocol": "0.9.1-staging.ee54ba693a",
|
|
101
|
+
"@dxos/keys": "0.9.1-staging.ee54ba693a",
|
|
102
|
+
"@dxos/invariant": "0.9.1-staging.ee54ba693a",
|
|
103
|
+
"@dxos/echo": "0.9.1-staging.ee54ba693a",
|
|
104
|
+
"@dxos/log": "0.9.1-staging.ee54ba693a",
|
|
105
|
+
"@dxos/plugin-client": "0.9.1-staging.ee54ba693a",
|
|
106
|
+
"@dxos/plugin-graph": "0.9.1-staging.ee54ba693a",
|
|
107
|
+
"@dxos/react-client": "0.9.1-staging.ee54ba693a",
|
|
108
|
+
"@dxos/react-ui-attention": "0.9.1-staging.ee54ba693a",
|
|
109
|
+
"@dxos/react-ui-menu": "0.9.1-staging.ee54ba693a",
|
|
110
|
+
"@dxos/react-ui-search": "0.9.1-staging.ee54ba693a",
|
|
111
|
+
"@dxos/react-ui-mosaic": "0.9.1-staging.ee54ba693a",
|
|
112
|
+
"@dxos/types": "0.9.1-staging.ee54ba693a",
|
|
113
|
+
"@dxos/schema": "0.9.1-staging.ee54ba693a",
|
|
114
|
+
"@dxos/util": "0.9.1-staging.ee54ba693a"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@effect-atom/atom-react": "^0.5.0",
|
|
118
|
-
"@effect/platform": "0.96.
|
|
119
|
-
"@types/react": "~19.2.
|
|
118
|
+
"@effect/platform": "0.96.2",
|
|
119
|
+
"@types/react": "~19.2.17",
|
|
120
120
|
"@types/react-dom": "~19.2.3",
|
|
121
|
-
"effect": "3.21.
|
|
122
|
-
"react": "~19.2.
|
|
123
|
-
"react-dom": "~19.2.
|
|
121
|
+
"effect": "3.21.4",
|
|
122
|
+
"react": "~19.2.7",
|
|
123
|
+
"react-dom": "~19.2.7",
|
|
124
124
|
"vite": "^8.0.16",
|
|
125
|
-
"@dxos/plugin-
|
|
126
|
-
"@dxos/plugin-
|
|
127
|
-
"@dxos/
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/
|
|
130
|
-
"@dxos/
|
|
125
|
+
"@dxos/plugin-testing": "0.9.1-staging.ee54ba693a",
|
|
126
|
+
"@dxos/plugin-preview": "0.9.1-staging.ee54ba693a",
|
|
127
|
+
"@dxos/random": "0.9.1-staging.ee54ba693a",
|
|
128
|
+
"@dxos/storybook-utils": "0.9.1-staging.ee54ba693a",
|
|
129
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
130
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"@effect-atom/atom-react": "^0.5.0",
|
|
134
|
-
"@effect/platform": "0.96.
|
|
135
|
-
"effect": "3.21.
|
|
136
|
-
"react": "~19.2.
|
|
137
|
-
"react-dom": "~19.2.
|
|
138
|
-
"@dxos/react-ui": "0.9.1-
|
|
139
|
-
"@dxos/ui-theme": "0.9.1-
|
|
134
|
+
"@effect/platform": "0.96.2",
|
|
135
|
+
"effect": "3.21.4",
|
|
136
|
+
"react": "~19.2.7",
|
|
137
|
+
"react-dom": "~19.2.7",
|
|
138
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
139
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
140
140
|
},
|
|
141
141
|
"publishConfig": {
|
|
142
142
|
"access": "public"
|
|
@@ -20,22 +20,23 @@ export default Capability.makeModule(
|
|
|
20
20
|
GraphBuilder.createExtension({
|
|
21
21
|
id: 'spaceSearch',
|
|
22
22
|
match: NodeMatcher.whenRoot,
|
|
23
|
-
connector:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
connector: (node, get) =>
|
|
24
|
+
Effect.gen(function* () {
|
|
25
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
26
|
+
const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];
|
|
27
|
+
const layout = layoutAtom ? get(layoutAtom) : undefined;
|
|
28
|
+
const spaceId = layout?.workspace ? Paths.getSpaceIdFromPath(layout.workspace) : undefined;
|
|
29
|
+
const space = spaceId ? client.spaces.get(spaceId) : null;
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
return [
|
|
32
|
+
AppNode.makeDeckCompanion({
|
|
33
|
+
id: linkedSegment('search'),
|
|
34
|
+
label: ['search.label', { ns: meta.profile.key }],
|
|
35
|
+
icon: 'ph--magnifying-glass--regular',
|
|
36
|
+
data: space,
|
|
37
|
+
}),
|
|
38
|
+
];
|
|
39
|
+
}).pipe(Effect.orDie),
|
|
39
40
|
}),
|
|
40
41
|
GraphBuilder.createExtension({
|
|
41
42
|
id: 'root',
|
|
@@ -11,7 +11,7 @@ import { Card, IconButton } from '@dxos/react-ui';
|
|
|
11
11
|
import { ScrollArea } from '@dxos/react-ui';
|
|
12
12
|
import { composable, composableProps } from '@dxos/react-ui';
|
|
13
13
|
import { Menu } from '@dxos/react-ui-menu';
|
|
14
|
-
import {
|
|
14
|
+
import { Focus, Mosaic, type MosaicTileProps, useMosaicContainer } from '@dxos/react-ui-mosaic';
|
|
15
15
|
import { type SearchResult } from '@dxos/react-ui-search';
|
|
16
16
|
|
|
17
17
|
//
|
|
@@ -10,7 +10,7 @@ import { useQuery } from '@dxos/react-client/echo';
|
|
|
10
10
|
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
11
11
|
import { SearchList } from '@dxos/react-ui-search';
|
|
12
12
|
import { Text } from '@dxos/schema';
|
|
13
|
-
import {
|
|
13
|
+
import { getHostPlatform, isTauri } from '@dxos/util';
|
|
14
14
|
|
|
15
15
|
import { SearchResultStack } from '#components';
|
|
16
16
|
import { useGlobalSearch, useGlobalSearchResults, useWebSearch } from '#hooks';
|
|
@@ -72,22 +72,26 @@ export const SearchDialog = ({ space, pivotId: pivotIdProp }: SearchDialogProps)
|
|
|
72
72
|
<Dialog.ActionIconButton action='close' />
|
|
73
73
|
</Dialog.Close>
|
|
74
74
|
</Dialog.Header>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
{/* Dialog.Body is the column propagator; without it the SearchList input/viewport are direct
|
|
76
|
+
children of Dialog.Content's Column grid and land in the gutter (misplaced searchbox). */}
|
|
77
|
+
<Dialog.Body>
|
|
78
|
+
<SearchList.Root onSearch={handleSearch}>
|
|
79
|
+
<SearchList.Input classNames='px-0' autoFocus placeholder={t('search.placeholder')} />
|
|
80
|
+
<SearchList.Viewport classNames='max-h-[24rem]'>
|
|
81
|
+
{query && allResults.length === 0 && <SearchList.Empty />}
|
|
82
|
+
{allResults.map((result) => (
|
|
83
|
+
<SearchList.Item
|
|
84
|
+
key={result.id}
|
|
85
|
+
classNames='flex gap-2 items-center'
|
|
86
|
+
icon={result.icon}
|
|
87
|
+
value={result.id}
|
|
88
|
+
label={result.label ?? (result.object ? Entity.getLabel(result.object) : undefined) ?? result.id}
|
|
89
|
+
onSelect={() => void handleSelect(result)}
|
|
90
|
+
/>
|
|
91
|
+
))}
|
|
92
|
+
</SearchList.Viewport>
|
|
93
|
+
</SearchList.Root>
|
|
94
|
+
</Dialog.Body>
|
|
91
95
|
</Dialog.Content>
|
|
92
96
|
);
|
|
93
97
|
};
|
|
@@ -13,7 +13,7 @@ import { type SearchResult } from '#types';
|
|
|
13
13
|
import { filterObjectsSync, queryStringToMatch } from './sync';
|
|
14
14
|
|
|
15
15
|
// Re-export for backward compatibility.
|
|
16
|
-
export {
|
|
16
|
+
export { GlobalFilterProvider, useGlobalFilteredObjects } from '@dxos/react-ui-search';
|
|
17
17
|
|
|
18
18
|
type SearchContextType = {
|
|
19
19
|
match?: RegExp;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, Paths } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { linkedSegment } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\nimport { SearchOperation } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: 'spaceSearch',\n match: NodeMatcher.whenRoot,\n connector: Effect.fnUntraced(function* (node, get) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];\n const layout = layoutAtom ? get(layoutAtom) : undefined;\n const spaceId = layout?.workspace ? Paths.getSpaceIdFromPath(layout.workspace) : undefined;\n const space = spaceId ? client.spaces.get(spaceId) : null;\n\n return [\n AppNode.makeDeckCompanion({\n id: linkedSegment('search'),\n label: ['search.label', { ns: meta.profile.key }],\n icon: 'ph--magnifying-glass--regular',\n data: space,\n }),\n ];\n }),\n }),\n GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n {\n id: SearchOperation.OpenSearch.meta.key,\n data: Effect.fnUntraced(function* () {\n yield* Operation.invoke(SearchOperation.OpenSearch);\n return false;\n }),\n properties: {\n label: ['search-action.label', { ns: meta.profile.key }],\n icon: 'ph--magnifying-glass--regular',\n keyBinding: {\n macos: 'shift+meta+f',\n windows: 'shift+alt+f',\n },\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,SAASC,aAAa;AAChD,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AACrB,SAASC,uBAAuB;AAEhC,IAAA,4BAAeV,WAAWW,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCR,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW;MACnBC,WAAkBP,kBAAW,WAAWQ,MAAMC,KAAG;AAC/C,cAAMC,SAAS,OAAOtB,WAAWqB,IAAIhB,mBAAmBkB,MAAM;AAC9D,cAAMC,aAAaH,IAAI,OAAOrB,WAAWyB,KAAKxB,gBAAgByB,MAAM,CAAA,EAAG,CAAA;AACvE,cAAMC,SAASH,aAAaH,IAAIG,UAAAA,IAAcI;AAC9C,cAAMC,UAAUF,QAAQG,YAAY3B,MAAM4B,mBAAmBJ,OAAOG,SAAS,IAAIF;AACjF,cAAMI,QAAQH,UAAUP,OAAOW,OAAOZ,IAAIQ,OAAAA,IAAW;AAErD,eAAO;UACL3B,QAAQgC,kBAAkB;YACxBlB,IAAIR,cAAc,QAAA;YAClB2B,OAAO;cAAC;cAAgB;gBAAEC,IAAI3B,KAAK4B,QAAQC;cAAI;;YAC/CC,MAAM;YACNC,MAAMR;UACR,CAAA;;MAEJ,CAAA;IACF,CAAA;IACA1B,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW;MACnBuB,SAAS,MACAC,eAAQ;QACb;UACE1B,IAAIN,gBAAgBiC,WAAWlC,KAAK6B;UACpCE,MAAa5B,kBAAW,aAAA;AACtB,mBAAOR,UAAUwC,OAAOlC,gBAAgBiC,UAAU;AAClD,mBAAO;UACT,CAAA;UACAE,YAAY;YACVV,OAAO;cAAC;cAAuB;gBAAEC,IAAI3B,KAAK4B,QAAQC;cAAI;;YACtDC,MAAM;YACNO,YAAY;cACVC,OAAO;cACPC,SAAS;YACX;UACF;QACF;OACD;IACL,CAAA;GACD;AAED,SAAOhD,WAAWiD,YAAYhD,gBAAgBiD,iBAAiBrC,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "AppNode", "Paths", "Operation", "ClientCapabilities", "GraphBuilder", "NodeMatcher", "linkedSegment", "meta", "SearchOperation", "makeModule", "fnUntraced", "extensions", "all", "createExtension", "id", "match", "whenRoot", "connector", "node", "get", "client", "Client", "layoutAtom", "atom", "Layout", "layout", "undefined", "spaceId", "workspace", "getSpaceIdFromPath", "space", "spaces", "makeDeckCompanion", "label", "ns", "profile", "key", "icon", "data", "actions", "succeed", "OpenSearch", "invoke", "properties", "keyBinding", "macos", "windows", "contributes", "AppGraphBuilder"]
|
|
7
|
-
}
|