@dxos/plugin-search 0.8.4-main.b97322e → 0.8.4-main.bc674ce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/lib/browser/app-graph-builder-KZ3V2E5U.mjs +81 -0
  2. package/dist/lib/browser/app-graph-builder-KZ3V2E5U.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-HRIWTRJV.mjs +22 -0
  4. package/dist/lib/browser/chunk-HRIWTRJV.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-I7YWQSUZ.mjs +26 -0
  6. package/dist/lib/browser/chunk-I7YWQSUZ.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-ZRJJXRGF.mjs +282 -0
  8. package/dist/lib/browser/chunk-ZRJJXRGF.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +51 -59
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/operation-resolver-6MBOKZQH.mjs +25 -0
  13. package/dist/lib/browser/operation-resolver-6MBOKZQH.mjs.map +7 -0
  14. package/dist/lib/browser/react-surface-RVLK6KJ5.mjs +368 -0
  15. package/dist/lib/browser/react-surface-RVLK6KJ5.mjs.map +7 -0
  16. package/dist/types/src/SearchPlugin.d.ts +2 -1
  17. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  19. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  20. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  21. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  22. package/dist/types/src/capabilities/index.d.ts +3 -3
  23. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  25. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  27. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  28. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  29. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  31. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  32. package/dist/types/src/components/SearchDialog.d.ts +1 -1
  33. package/dist/types/src/components/SearchDialog.d.ts.map +1 -1
  34. package/dist/types/src/components/SearchMain.d.ts +4 -5
  35. package/dist/types/src/components/SearchMain.d.ts.map +1 -1
  36. package/dist/types/src/components/SearchMain.stories.d.ts +31 -0
  37. package/dist/types/src/components/SearchMain.stories.d.ts.map +1 -0
  38. package/dist/types/src/components/SpaceMain.d.ts +9 -0
  39. package/dist/types/src/components/SpaceMain.d.ts.map +1 -0
  40. package/dist/types/src/components/index.d.ts +1 -1
  41. package/dist/types/src/components/index.d.ts.map +1 -1
  42. package/dist/types/src/hooks/index.d.ts +1 -0
  43. package/dist/types/src/hooks/index.d.ts.map +1 -1
  44. package/dist/types/src/hooks/sync.d.ts +3 -2
  45. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  46. package/dist/types/src/hooks/useGlobalSearch.d.ts +7 -3
  47. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  48. package/dist/types/src/hooks/useSearchResults.d.ts +3 -2
  49. package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
  50. package/dist/types/src/hooks/useWebSearch.d.ts +6 -3
  51. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  52. package/dist/types/src/meta.d.ts +3 -4
  53. package/dist/types/src/meta.d.ts.map +1 -1
  54. package/dist/types/src/search/exa.d.ts +4 -4
  55. package/dist/types/src/search/exa.d.ts.map +1 -1
  56. package/dist/types/src/translations.d.ts +1 -1
  57. package/dist/types/src/types/action.d.ts +14 -11
  58. package/dist/types/src/types/action.d.ts.map +1 -1
  59. package/dist/types/src/types/search.d.ts +3 -7
  60. package/dist/types/src/types/search.d.ts.map +1 -1
  61. package/dist/types/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +55 -47
  63. package/src/SearchPlugin.tsx +27 -46
  64. package/src/capabilities/app-graph-builder/app-graph-builder.ts +70 -0
  65. package/src/capabilities/app-graph-builder/index.ts +7 -0
  66. package/src/capabilities/index.ts +3 -5
  67. package/src/capabilities/operation-resolver/index.ts +7 -0
  68. package/src/capabilities/operation-resolver/operation-resolver.ts +23 -0
  69. package/src/capabilities/react-surface/index.ts +7 -0
  70. package/src/capabilities/react-surface/react-surface.tsx +70 -0
  71. package/src/components/SearchDialog.tsx +72 -66
  72. package/src/components/SearchMain.stories.tsx +90 -0
  73. package/src/components/SearchMain.tsx +66 -50
  74. package/src/components/SpaceMain.tsx +169 -0
  75. package/src/components/index.ts +1 -1
  76. package/src/hooks/index.ts +2 -0
  77. package/src/hooks/sync.test.ts +6 -4
  78. package/src/hooks/sync.ts +27 -31
  79. package/src/hooks/useGlobalSearch.tsx +33 -13
  80. package/src/hooks/useSearchResults.ts +9 -6
  81. package/src/hooks/useWebSearch.ts +22 -16
  82. package/src/meta.ts +10 -7
  83. package/src/search/exa.test.ts +8 -19
  84. package/src/search/exa.ts +135 -154
  85. package/src/translations.ts +1 -1
  86. package/src/types/action.tsx +10 -8
  87. package/src/types/command-score.d.ts +16 -0
  88. package/src/types/search.ts +3 -9
  89. package/dist/lib/browser/app-graph-builder-FLW7KDC5.mjs +0 -77
  90. package/dist/lib/browser/app-graph-builder-FLW7KDC5.mjs.map +0 -7
  91. package/dist/lib/browser/chunk-BXSF7IAU.mjs +0 -190
  92. package/dist/lib/browser/chunk-BXSF7IAU.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-JVMYGOKS.mjs +0 -21
  94. package/dist/lib/browser/chunk-JVMYGOKS.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-KNS62YL2.mjs +0 -20
  96. package/dist/lib/browser/chunk-KNS62YL2.mjs.map +0 -7
  97. package/dist/lib/browser/intent-resolver-JPBGEKFT.mjs +0 -22
  98. package/dist/lib/browser/intent-resolver-JPBGEKFT.mjs.map +0 -7
  99. package/dist/lib/browser/react-surface-MPPIWDBF.mjs +0 -651
  100. package/dist/lib/browser/react-surface-MPPIWDBF.mjs.map +0 -7
  101. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  102. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  103. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  104. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  105. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  106. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  107. package/dist/types/src/components/Search.stories.d.ts +0 -15
  108. package/dist/types/src/components/Search.stories.d.ts.map +0 -1
  109. package/dist/types/src/components/SearchResults/SearchResults.d.ts +0 -20
  110. package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +0 -1
  111. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts +0 -12
  112. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +0 -1
  113. package/dist/types/src/components/SearchResults/index.d.ts +0 -2
  114. package/dist/types/src/components/SearchResults/index.d.ts.map +0 -1
  115. package/dist/types/src/components/Searchbar/Searchbar.d.ts +0 -14
  116. package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +0 -1
  117. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts +0 -11
  118. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +0 -1
  119. package/dist/types/src/components/Searchbar/index.d.ts +0 -2
  120. package/dist/types/src/components/Searchbar/index.d.ts.map +0 -1
  121. package/src/capabilities/app-graph-builder.ts +0 -79
  122. package/src/capabilities/intent-resolver.ts +0 -18
  123. package/src/capabilities/react-surface.tsx +0 -59
  124. package/src/components/Search.stories.tsx +0 -66
  125. package/src/components/SearchResults/SearchResults.stories.tsx +0 -57
  126. package/src/components/SearchResults/SearchResults.tsx +0 -86
  127. package/src/components/SearchResults/index.ts +0 -5
  128. package/src/components/Searchbar/Searchbar.stories.tsx +0 -28
  129. package/src/components/Searchbar/Searchbar.tsx +0 -67
  130. package/src/components/Searchbar/index.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './sync';
2
2
  export * from './useGlobalSearch';
3
3
  export * from './useSearchResults';
4
+ export * from './useWebSearch';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,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,7 +1,8 @@
1
+ import { type Entity } from '@dxos/echo';
1
2
  import { type SearchResult } from '../types';
2
3
  export declare const queryStringToMatch: (queryString?: string) => RegExp | undefined;
3
4
  export type TextFields = Record<string, string>;
4
- export declare const filterObjectsSync: <T extends Record<string, any>>(objects: T[], match?: RegExp) => SearchResult[];
5
+ export declare const filterObjectsSync: <T extends Entity.Unknown>(objects: T[], match?: RegExp) => SearchResult<T>[];
5
6
  export declare const getStringProperty: (object: any, keys: string[]) => string | undefined;
6
- export declare const mapObjectToTextFields: <T extends Record<string, unknown>>(object: T) => TextFields;
7
+ export declare const mapObjectToTextFields: <T extends Entity.Unknown>(object: T) => TextFields;
7
8
  //# sourceMappingURL=sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/hooks/sync.ts"],"names":[],"mappings":"AASA,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"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/hooks/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,MAAM,EAAO,MAAM,YAAY,CAAC;AAG9C,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,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,MAAM,KAAG,YAAY,CAAC,CAAC,CAAC,EAgCzG,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,OAAO,EAAE,QAAQ,CAAC,KAAG,UAa3E,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
+ import { type Entity } from '@dxos/echo';
2
3
  import { type SearchResult } from '../types';
4
+ export { useGlobalFilteredObjects, GlobalFilterProvider } from '@dxos/react-ui-searchlist';
3
5
  type SearchContextType = {
4
6
  match?: RegExp;
5
7
  setMatch?: (text?: string) => void;
6
8
  };
9
+ /**
10
+ * Provider for global search context.
11
+ * Also provides the GlobalFilterProvider for useGlobalFilteredObjects to work.
12
+ */
7
13
  export declare const SearchContextProvider: ({ children }: PropsWithChildren) => React.JSX.Element;
8
14
  export declare const useGlobalSearch: () => SearchContextType;
9
- export declare const useGlobalSearchResults: <T extends Record<string, any>>(objects?: T[]) => SearchResult[];
10
- export declare const useGlobalFilteredObjects: <T extends Record<string, any>>(objects?: T[]) => T[];
11
- export {};
15
+ export declare const useGlobalSearchResults: <T extends Entity.Unknown>(objects?: T[]) => SearchResult<T>[];
12
16
  //# sourceMappingURL=useGlobalSearch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobalSearch.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAiB,KAAK,iBAAiB,EAAiC,MAAM,OAAO,CAAC;AAKpG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF,eAAO,MAAM,qBAAqB,GAAI,cAAc,iBAAiB,sBAIpE,CAAC;AAEF,eAAO,MAAM,eAAe,yBAE3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,EAAE,KAAG,YAAY,EAGjG,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,EAAE,KAAG,CAAC,EAOxF,CAAC"}
1
+ {"version":3,"file":"useGlobalSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobalSearch.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoD,MAAM,OAAO,CAAC;AAGxG,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,cAAc,iBAAiB,sBAuBpE,CAAC;AAEF,eAAO,MAAM,eAAe,yBAE3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,KAAG,YAAY,CAAC,CAAC,CAAC,EAG/F,CAAC"}
@@ -1,3 +1,4 @@
1
- export declare const filterObjects: <T extends Record<string, any>>(objects: T[], match?: RegExp) => Promise<Map<T, string[][]>>;
2
- export declare const useSearchResults: <T extends Record<string, any>>(queryString?: string, objects?: T[], delay?: number) => [boolean, Map<T, string[][]>];
1
+ import { type Entity } from '@dxos/echo';
2
+ export declare const filterObjects: <T extends Entity.Unknown>(objects: T[], match?: RegExp) => Promise<Map<T, string[][]>>;
3
+ export declare const useSearchResults: <T extends Entity.Unknown>(queryString?: string, objects?: T[], delay?: number) => [boolean, Map<T, string[][]>];
3
4
  //# sourceMappingURL=useSearchResults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchResults.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSearchResults.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/D,SAAS,CAAC,EAAE,EACZ,QAAQ,MAAM,KACb,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAsB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,cAAc,MAAM,EACpB,UAAU,CAAC,EAAE,EACb,QAAO,MAAY,KAClB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAiB9B,CAAC"}
1
+ {"version":3,"file":"useSearchResults.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSearchResults.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAMzC,eAAO,MAAM,aAAa,GAAU,CAAC,SAAS,MAAM,CAAC,OAAO,EAC1D,SAAS,CAAC,EAAE,EACZ,QAAQ,MAAM,KACb,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAwB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,OAAO,EACvD,cAAc,MAAM,EACpB,UAAU,CAAC,EAAE,EACb,QAAO,MAAY,KAClB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAiB9B,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import { type SearchResult } from '../types';
2
- export declare const useWebSearch: ({ query, context }: {
2
+ export type UseWebSearchProps = {
3
3
  query?: string;
4
4
  context?: string;
5
- }) => {
6
- runSearch: () => Promise<void>;
5
+ };
6
+ export type UseWebSearch = {
7
+ update: () => Promise<void>;
7
8
  results: SearchResult[];
8
9
  isLoading: boolean;
9
10
  };
11
+ /** @deprecated */
12
+ export declare const useWebSearch: ({ query, context }: UseWebSearchProps) => UseWebSearch;
10
13
  //# sourceMappingURL=useWebSearch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWebSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useWebSearch.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,YAAY,GAAI,oBAAoB;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE;;;;CAuCpF,CAAC"}
1
+ {"version":3,"file":"useWebSearch.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useWebSearch.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,kBAAkB;AAElB,eAAO,MAAM,YAAY,GAAI,oBAAoB,iBAAiB,KAAG,YAiCpE,CAAC"}
@@ -1,5 +1,4 @@
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
- export declare const meta: PluginMeta;
1
+ import { type Plugin } from '@dxos/app-framework';
2
+ export declare const meta: Plugin.Meta;
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;AAEtD,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD,eAAO,MAAM,IAAI,EAAE,UAOlB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAUzB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAsB,CAAC"}
@@ -1,10 +1,9 @@
1
- import { Schema } from 'effect';
2
- import { type AiServiceClient } from '@dxos/ai';
1
+ import * as Schema from 'effect/Schema';
2
+ import { type Entity } from '@dxos/echo';
3
3
  export type SearchOptions<Schema extends Schema.Schema.AnyNoContext> = {
4
4
  query?: string;
5
5
  context?: string;
6
6
  schema: Schema[];
7
- AiService: AiServiceClient;
8
7
  exaApiKey: string;
9
8
  liveCrawl?: boolean;
10
9
  };
@@ -15,5 +14,6 @@ export type SearchResult<T = unknown> = {
15
14
  dataExtractionTime: number;
16
15
  };
17
16
  };
18
- export declare const search: <Schema extends Schema.Schema.AnyNoContext>(options: SearchOptions<Schema>) => Promise<SearchResult<Schema.Schema.Type<Schema>>>;
17
+ /** @deprecated Use MixedStreamParser */
18
+ export declare const search: <Schema extends Schema.Schema.AnyNoContext>(options: SearchOptions<Schema>) => Promise<SearchResult<Entity.Unknown>>;
19
19
  //# sourceMappingURL=exa.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exa.d.ts","sourceRoot":"","sources":["../../../../src/search/exa.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,MAAM,EAAa,MAAM,QAAQ,CAAC;AAGnD,OAAO,EAAE,KAAK,eAAe,EAAuD,MAAM,UAAU,CAAC;AAUrG,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAElB,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,CAsFlD,CAAC"}
1
+ {"version":3,"file":"exa.d.ts","sourceRoot":"","sources":["../../../../src/search/exa.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,KAAK,MAAM,EAAuB,MAAM,YAAY,CAAC;AAM9D,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,wCAAwC;AACxC,eAAO,MAAM,MAAM,GAAU,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EACpE,SAAS,aAAa,CAAC,MAAM,CAAC,KAC7B,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAwEtC,CAAC"}
@@ -8,7 +8,7 @@ export declare const translations: [{
8
8
  readonly 'search dialog title': "Open";
9
9
  readonly 'recently closed heading': "Recently closed";
10
10
  readonly 'pending results message': "Searching…";
11
- readonly 'empty results message': "No matching items in your spaces";
11
+ readonly 'empty results message': "No matching objects";
12
12
  readonly 'search label': "Search";
13
13
  };
14
14
  };
@@ -1,13 +1,16 @@
1
- import { Schema } from 'effect';
2
- export declare namespace SearchAction {
3
- const OpenSearch_base: Schema.TaggedClass<OpenSearch, "dxos.org/plugin/search/action/open-search", {
4
- readonly _tag: Schema.tag<"dxos.org/plugin/search/action/open-search">;
5
- } & {
6
- input: typeof Schema.Void;
7
- output: typeof Schema.Void;
8
- }>;
9
- export class OpenSearch extends OpenSearch_base {
10
- }
11
- export {};
1
+ import * as Schema from 'effect/Schema';
2
+ export declare namespace SearchOperation {
3
+ const OpenSearch: Omit<{
4
+ readonly meta: {
5
+ readonly key: `${string}/open-search`;
6
+ readonly name: "Open Search";
7
+ };
8
+ readonly schema: {
9
+ readonly input: typeof Schema.Void;
10
+ readonly output: typeof Schema.Void;
11
+ };
12
+ }, "executionMode"> & import("effect/Pipeable").Pipeable & {
13
+ readonly executionMode: "sync" | "async";
14
+ };
12
15
  }
13
16
  //# sourceMappingURL=action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/types/action.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,yBAAiB,YAAY,CAAC;;;;;;;IAG5B,MAAM,OAAO,UAAW,SAAQ,eAG9B;KAAG;;CACN"}
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/types/action.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,yBAAiB,eAAe,CAAC;IACxB,MAAM,UAAU;;;;;;;;;;;KAGrB,CAAC;CACJ"}
@@ -1,5 +1,5 @@
1
- import type { DXN } from '@dxos/keys';
2
- export type SearchResult = {
1
+ import type { Entity } from '@dxos/echo';
2
+ export type SearchResult<T extends Entity.Unknown = Entity.Unknown> = {
3
3
  id: string;
4
4
  /**
5
5
  * Type kind: "contact", "project", "org", etc.
@@ -12,10 +12,6 @@ export type SearchResult = {
12
12
  * Icon id.
13
13
  */
14
14
  icon?: string;
15
- /**
16
- * DXN of the object type.
17
- */
18
- objectType?: DXN.String;
19
- object?: any;
15
+ object?: T;
20
16
  };
21
17
  //# sourceMappingURL=search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/types/search.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/types/search.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI;IACpE,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,CAAC;CACZ,CAAC"}