@dxos/plugin-search 0.8.4-main.fd6878d → 0.8.4-main.fffef41
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-D2QQTIIR.mjs → app-graph-builder-HQR6P4C7.mjs} +17 -16
- package/dist/lib/browser/app-graph-builder-HQR6P4C7.mjs.map +7 -0
- package/dist/lib/browser/chunk-GN2FSWTM.mjs +22 -0
- package/dist/lib/browser/chunk-GN2FSWTM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JVMYGOKS.mjs → chunk-TCVYYI44.mjs} +5 -5
- package/dist/lib/browser/chunk-TCVYYI44.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VKV5ZDB4.mjs → chunk-ZEP4O5SU.mjs} +111 -10
- package/dist/lib/browser/chunk-ZEP4O5SU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +11 -11
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-NXFDPFHC.mjs → intent-resolver-UYQA6UUQ.mjs} +5 -5
- package/dist/lib/browser/{intent-resolver-NXFDPFHC.mjs.map → intent-resolver-UYQA6UUQ.mjs.map} +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-LV7ZVI2K.mjs +293 -0
- package/dist/lib/browser/react-surface-LV7ZVI2K.mjs.map +7 -0
- package/dist/types/src/SearchPlugin.d.ts +1 -1
- package/dist/types/src/SearchPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Search.stories.d.ts +13 -12
- package/dist/types/src/components/Search.stories.d.ts.map +1 -1
- package/dist/types/src/components/SearchDialog.d.ts +1 -1
- package/dist/types/src/components/SearchDialog.d.ts.map +1 -1
- package/dist/types/src/components/SearchMain.d.ts +4 -5
- package/dist/types/src/components/SearchMain.d.ts.map +1 -1
- package/dist/types/src/components/SearchResults/SearchResults.d.ts +9 -9
- package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts +12 -8
- package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/dist/types/src/components/Searchbar/Searchbar.d.ts +5 -9
- package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts +10 -8
- package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/sync.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/search/exa.d.ts +1 -1
- package/dist/types/src/search/exa.d.ts.map +1 -1
- package/dist/types/src/types/action.d.ts +3 -3
- package/dist/types/src/types/action.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/SearchPlugin.tsx +41 -42
- package/src/capabilities/app-graph-builder.ts +14 -13
- package/src/capabilities/react-surface.tsx +0 -3
- package/src/components/Search.stories.tsx +11 -14
- package/src/components/SearchDialog.tsx +23 -11
- package/src/components/SearchMain.tsx +17 -26
- package/src/components/SearchResults/SearchResults.stories.tsx +18 -17
- package/src/components/SearchResults/SearchResults.tsx +46 -49
- package/src/components/Searchbar/Searchbar.stories.tsx +8 -8
- package/src/components/Searchbar/Searchbar.tsx +26 -45
- package/src/hooks/index.ts +2 -0
- package/src/hooks/sync.ts +5 -4
- package/src/hooks/useSearchResults.ts +4 -4
- package/src/hooks/useWebSearch.ts +1 -1
- package/src/meta.ts +8 -5
- package/src/search/exa.test.ts +8 -10
- package/src/search/exa.ts +7 -5
- package/src/types/action.tsx +3 -3
- package/dist/lib/browser/app-graph-builder-D2QQTIIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-JVMYGOKS.mjs.map +0 -7
- package/dist/lib/browser/chunk-KNS62YL2.mjs +0 -20
- package/dist/lib/browser/chunk-KNS62YL2.mjs.map +0 -7
- package/dist/lib/browser/chunk-VKV5ZDB4.mjs.map +0 -7
- package/dist/lib/browser/react-surface-B2XYD6JN.mjs +0 -468
- package/dist/lib/browser/react-surface-B2XYD6JN.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchMain.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchMain.tsx"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"SearchMain.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchMain.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAU,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAWvE,eAAO,MAAM,UAAU,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,sBAwCtD,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React, { type FC } from 'react';
|
|
2
2
|
import { type SearchResult } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type SearchResultsProps = {
|
|
4
|
+
items: SearchResult[];
|
|
5
5
|
match?: RegExp;
|
|
6
|
-
|
|
6
|
+
selected?: string;
|
|
7
|
+
onSelect?: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const SearchResults: ({ items }: SearchResultsProps) => React.JSX.Element;
|
|
7
10
|
export type SearchItemProps = SearchResult & {
|
|
8
11
|
selected: boolean;
|
|
9
12
|
} & Pick<SearchResultsProps, 'onSelect'>;
|
|
10
13
|
export declare const SearchItem: React.ForwardRefExoticComponent<SearchResult & {
|
|
11
14
|
selected: boolean;
|
|
12
15
|
} & Pick<SearchResultsProps, "onSelect"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export
|
|
16
|
+
export declare const Snippet: FC<{
|
|
17
|
+
text: string;
|
|
14
18
|
match?: RegExp;
|
|
15
|
-
|
|
16
|
-
selected?: string;
|
|
17
|
-
onSelect?: (id: string) => void;
|
|
18
|
-
};
|
|
19
|
-
export declare const SearchResults: ({ items, selected, onSelect }: SearchResultsProps) => React.JSX.Element;
|
|
19
|
+
}>;
|
|
20
20
|
//# sourceMappingURL=SearchResults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResults.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchResults/SearchResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchResults.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchResults/SearchResults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AAOnD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAIF,eAAO,MAAM,aAAa,GAAI,WAAW,kBAAkB,sBAe1D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAE1G,eAAO,MAAM,UAAU;cAFkC,OAAO;+EAgB9D,CAAC;AAEH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAyBxD,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type SearchResultsProps } from './SearchResults';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ items }: SearchResultsProps) => React.JSX.Element;
|
|
7
|
+
render: (props: SearchResultsProps) => React.JSX.Element;
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
8
11
|
};
|
|
9
12
|
};
|
|
10
|
-
declare const meta: Meta<typeof SearchResults>;
|
|
11
13
|
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Default: Story;
|
|
12
16
|
//# sourceMappingURL=SearchResults.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResults.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchResults/SearchResults.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchResults.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchResults/SearchResults.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA0BzE,QAAA,MAAM,IAAI;;;oBAtBmB,kBAAkB;;;;;CA8BT,CAAC;AAEvC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type TextInputProps } from '@dxos/react-ui';
|
|
3
|
-
export type SearchbarProps = Pick<TextInputProps, 'variant' | 'placeholder'> & {
|
|
4
|
-
|
|
5
|
-
root?: string;
|
|
6
|
-
input?: string;
|
|
7
|
-
};
|
|
2
|
+
import { type TextInputProps, type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
export type SearchbarProps = ThemedClassName<Pick<TextInputProps, 'variant' | 'placeholder'> & {
|
|
4
|
+
delay?: number;
|
|
8
5
|
value?: string;
|
|
9
6
|
onChange?: (text?: string) => void;
|
|
10
7
|
onSubmit?: (text?: string) => void;
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export declare const Searchbar: ({ classes, variant, placeholder, value, onChange, onSubmit }: SearchbarProps) => React.JSX.Element;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Searchbar: ({ classNames, variant, placeholder, value, onChange, onSubmit }: SearchbarProps) => React.JSX.Element;
|
|
14
10
|
//# sourceMappingURL=Searchbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Searchbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Searchbar/Searchbar.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Searchbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Searchbar/Searchbar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAS,KAAK,cAAc,EAAE,KAAK,eAAe,EAA+B,MAAM,gBAAgB,CAAC;AAE/G,MAAM,MAAM,cAAc,GAAG,eAAe,CAC1C,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,CAAC,GAAG;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CACF,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,iEAAiE,cAAc,sBA8BxG,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
placeholder: string;
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ classNames, variant, placeholder, value, onChange, onSubmit }: import("./Searchbar").SearchbarProps) => import("react").JSX.Element;
|
|
5
|
+
decorators: import("@storybook/react").Decorator[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
9
8
|
};
|
|
10
9
|
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
11
13
|
//# sourceMappingURL=Searchbar.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Searchbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Searchbar/Searchbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Searchbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Searchbar/Searchbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,QAAA,MAAM,IAAI;;;;;;;CAOwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AAEvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/hooks/sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/hooks/sync.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,SAGlE,CAAC;AAuBF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGhD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,MAAM,KAAG,YAAY,EAqC3G,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,GAAG,EAAE,MAAM,MAAM,EAAE,KAAG,MAAM,GAAG,SAaxE,CAAC;AAiBF,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAG,UAapF,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
2
|
-
export declare const SEARCH_PLUGIN = "dxos.org/plugin/search";
|
|
3
|
-
export declare const SEARCH_RESULT = "dxos.org/plugin/search/result";
|
|
4
2
|
export declare const meta: PluginMeta;
|
|
3
|
+
export declare const SEARCH_RESULT: string;
|
|
5
4
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,eAAO,MAAM,IAAI,EAAE,UAUlB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exa.d.ts","sourceRoot":"","sources":["../../../../src/search/exa.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exa.d.ts","sourceRoot":"","sources":["../../../../src/search/exa.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AASxC,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACtC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE;QACP,eAAe,EAAE,MAAM,CAAC;QACxB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,MAAM,GAAU,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EACpE,SAAS,aAAa,CAAC,MAAM,CAAC,KAC7B,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAwElD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
2
|
export declare namespace SearchAction {
|
|
3
|
-
const OpenSearch_base: Schema.TaggedClass<OpenSearch,
|
|
4
|
-
readonly _tag: Schema.tag
|
|
3
|
+
const OpenSearch_base: Schema.TaggedClass<OpenSearch, `${string}/open-search`, {
|
|
4
|
+
readonly _tag: Schema.tag<`${string}/open-search`>;
|
|
5
5
|
} & {
|
|
6
6
|
input: typeof Schema.Void;
|
|
7
7
|
output: typeof Schema.Void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/types/action.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/types/action.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,yBAAiB,YAAY,CAAC;;;;;;;IAG5B,MAAM,OAAO,UAAW,SAAQ,eAG9B;KAAG;;CACN"}
|