@dxos/plugin-search 0.8.4-main.72ec0f3 → 0.8.4-main.8360d9e660

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 (140) hide show
  1. package/README.md +0 -1
  2. package/dist/lib/browser/SearchDialog-KJL6C2OF.mjs +108 -0
  3. package/dist/lib/browser/SearchDialog-KJL6C2OF.mjs.map +7 -0
  4. package/dist/lib/browser/SearchMain-VOEEHUCW.mjs +97 -0
  5. package/dist/lib/browser/SearchMain-VOEEHUCW.mjs.map +7 -0
  6. package/dist/lib/browser/app-graph-builder-FHVM5QV7.mjs +78 -0
  7. package/dist/lib/browser/app-graph-builder-FHVM5QV7.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-I3633KKK.mjs +26 -0
  9. package/dist/lib/browser/chunk-I3633KKK.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-ZEP4O5SU.mjs → chunk-NB4JZIOE.mjs} +49 -58
  11. package/dist/lib/browser/chunk-NB4JZIOE.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-GN2FSWTM.mjs → chunk-PZ67KFRU.mjs} +3 -3
  13. package/dist/lib/browser/chunk-PZ67KFRU.mjs.map +7 -0
  14. package/dist/lib/browser/index.mjs +48 -55
  15. package/dist/lib/browser/index.mjs.map +4 -4
  16. package/dist/lib/browser/meta.json +1 -1
  17. package/dist/lib/browser/operation-resolver-H4X6BNWR.mjs +26 -0
  18. package/dist/lib/browser/operation-resolver-H4X6BNWR.mjs.map +7 -0
  19. package/dist/lib/browser/react-surface-EZX43GMG.mjs +60 -0
  20. package/dist/lib/browser/react-surface-EZX43GMG.mjs.map +7 -0
  21. package/dist/types/src/SearchPlugin.d.ts +2 -1
  22. package/dist/types/src/SearchPlugin.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  24. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  25. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  26. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  27. package/dist/types/src/capabilities/index.d.ts +3 -3
  28. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  30. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  32. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  34. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  36. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  37. package/dist/types/src/components/index.d.ts +0 -3
  38. package/dist/types/src/components/index.d.ts.map +1 -1
  39. package/dist/types/src/constants.d.ts +2 -0
  40. package/dist/types/src/constants.d.ts.map +1 -0
  41. package/dist/types/src/{components → containers/SearchDialog}/SearchDialog.d.ts +0 -1
  42. package/dist/types/src/containers/SearchDialog/SearchDialog.d.ts.map +1 -0
  43. package/dist/types/src/containers/SearchDialog/index.d.ts +3 -0
  44. package/dist/types/src/containers/SearchDialog/index.d.ts.map +1 -0
  45. package/dist/types/src/containers/SearchMain/SearchMain.d.ts.map +1 -0
  46. package/dist/types/src/containers/SearchMain/index.d.ts +3 -0
  47. package/dist/types/src/containers/SearchMain/index.d.ts.map +1 -0
  48. package/dist/types/src/containers/index.d.ts +5 -0
  49. package/dist/types/src/containers/index.d.ts.map +1 -0
  50. package/dist/types/src/hooks/sync.d.ts +3 -2
  51. package/dist/types/src/hooks/sync.d.ts.map +1 -1
  52. package/dist/types/src/hooks/useGlobalSearch.d.ts +7 -3
  53. package/dist/types/src/hooks/useGlobalSearch.d.ts.map +1 -1
  54. package/dist/types/src/hooks/useSearchResults.d.ts +3 -2
  55. package/dist/types/src/hooks/useSearchResults.d.ts.map +1 -1
  56. package/dist/types/src/hooks/useWebSearch.d.ts +6 -3
  57. package/dist/types/src/hooks/useWebSearch.d.ts.map +1 -1
  58. package/dist/types/src/meta.d.ts +2 -2
  59. package/dist/types/src/meta.d.ts.map +1 -1
  60. package/dist/types/src/search/exa.d.ts +3 -1
  61. package/dist/types/src/search/exa.d.ts.map +1 -1
  62. package/dist/types/src/translations.d.ts +1 -1
  63. package/dist/types/src/types/action.d.ts +13 -10
  64. package/dist/types/src/types/action.d.ts.map +1 -1
  65. package/dist/types/src/types/search.d.ts +3 -7
  66. package/dist/types/src/types/search.d.ts.map +1 -1
  67. package/dist/types/tsconfig.tsbuildinfo +1 -1
  68. package/package.json +56 -47
  69. package/src/SearchPlugin.tsx +25 -42
  70. package/src/capabilities/app-graph-builder/app-graph-builder.ts +70 -0
  71. package/src/capabilities/app-graph-builder/index.ts +7 -0
  72. package/src/capabilities/index.ts +3 -5
  73. package/src/capabilities/operation-resolver/index.ts +7 -0
  74. package/src/capabilities/operation-resolver/operation-resolver.ts +24 -0
  75. package/src/capabilities/react-surface/index.ts +7 -0
  76. package/src/capabilities/react-surface/react-surface.tsx +62 -0
  77. package/src/components/index.ts +0 -4
  78. package/src/constants.ts +7 -0
  79. package/src/containers/SearchDialog/SearchDialog.tsx +120 -0
  80. package/src/containers/SearchDialog/index.ts +6 -0
  81. package/src/containers/SearchMain/SearchMain.tsx +100 -0
  82. package/src/containers/SearchMain/index.ts +7 -0
  83. package/src/containers/index.ts +10 -0
  84. package/src/hooks/sync.test.ts +6 -4
  85. package/src/hooks/sync.ts +22 -27
  86. package/src/hooks/useGlobalSearch.tsx +31 -12
  87. package/src/hooks/useSearchResults.ts +5 -2
  88. package/src/hooks/useWebSearch.ts +20 -9
  89. package/src/meta.ts +4 -4
  90. package/src/search/exa.test.ts +7 -7
  91. package/src/search/exa.ts +4 -3
  92. package/src/translations.ts +1 -1
  93. package/src/types/action.tsx +8 -6
  94. package/src/types/command-score.d.ts +16 -0
  95. package/src/types/search.ts +3 -9
  96. package/dist/lib/browser/app-graph-builder-HQR6P4C7.mjs +0 -78
  97. package/dist/lib/browser/app-graph-builder-HQR6P4C7.mjs.map +0 -7
  98. package/dist/lib/browser/chunk-GN2FSWTM.mjs.map +0 -7
  99. package/dist/lib/browser/chunk-TCVYYI44.mjs +0 -21
  100. package/dist/lib/browser/chunk-TCVYYI44.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-ZEP4O5SU.mjs.map +0 -7
  102. package/dist/lib/browser/intent-resolver-UYQA6UUQ.mjs +0 -22
  103. package/dist/lib/browser/intent-resolver-UYQA6UUQ.mjs.map +0 -7
  104. package/dist/lib/browser/react-surface-H5CKQVII.mjs +0 -307
  105. package/dist/lib/browser/react-surface-H5CKQVII.mjs.map +0 -7
  106. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  107. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  108. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  109. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  110. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  111. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  112. package/dist/types/src/components/Search.stories.d.ts +0 -16
  113. package/dist/types/src/components/Search.stories.d.ts.map +0 -1
  114. package/dist/types/src/components/SearchDialog.d.ts.map +0 -1
  115. package/dist/types/src/components/SearchMain.d.ts.map +0 -1
  116. package/dist/types/src/components/SearchResults/SearchResults.d.ts +0 -20
  117. package/dist/types/src/components/SearchResults/SearchResults.d.ts.map +0 -1
  118. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts +0 -16
  119. package/dist/types/src/components/SearchResults/SearchResults.stories.d.ts.map +0 -1
  120. package/dist/types/src/components/SearchResults/index.d.ts +0 -2
  121. package/dist/types/src/components/SearchResults/index.d.ts.map +0 -1
  122. package/dist/types/src/components/Searchbar/Searchbar.d.ts +0 -10
  123. package/dist/types/src/components/Searchbar/Searchbar.d.ts.map +0 -1
  124. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts +0 -13
  125. package/dist/types/src/components/Searchbar/Searchbar.stories.d.ts.map +0 -1
  126. package/dist/types/src/components/Searchbar/index.d.ts +0 -2
  127. package/dist/types/src/components/Searchbar/index.d.ts.map +0 -1
  128. package/src/capabilities/app-graph-builder.ts +0 -80
  129. package/src/capabilities/intent-resolver.ts +0 -18
  130. package/src/capabilities/react-surface.tsx +0 -56
  131. package/src/components/Search.stories.tsx +0 -64
  132. package/src/components/SearchDialog.tsx +0 -136
  133. package/src/components/SearchMain.tsx +0 -62
  134. package/src/components/SearchResults/SearchResults.stories.tsx +0 -59
  135. package/src/components/SearchResults/SearchResults.tsx +0 -83
  136. package/src/components/SearchResults/index.ts +0 -5
  137. package/src/components/Searchbar/Searchbar.stories.tsx +0 -28
  138. package/src/components/Searchbar/Searchbar.tsx +0 -48
  139. package/src/components/Searchbar/index.ts +0 -5
  140. /package/dist/types/src/{components → containers/SearchMain}/SearchMain.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-graph").BuilderExtensions>> | import("@dxos/app-framework").AnyCapability[]>>;
2
- export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-framework").Capabilities.IntentResolver>> | import("@dxos/app-framework").AnyCapability[]>>;
3
- export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-framework").Capabilities.ReactSurface>> | import("@dxos/app-framework").AnyCapability[]>>;
1
+ export * from './app-graph-builder';
2
+ export * from './operation-resolver';
3
+ export * from './react-surface';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,gRAA4C,CAAC;AACzE,eAAO,MAAM,cAAc,8OAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,4OAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const OperationResolver: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").OperationResolver[]>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,wJAA6E,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capabilities, Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.OperationResolver[]>>, never, never>;
4
+ export default _default;
5
+ //# sourceMappingURL=operation-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAM/D,wBAWE"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capabilities, Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
4
+ export default _default;
5
+ //# sourceMappingURL=react-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAS/D,wBA6CE"}
@@ -1,4 +1 @@
1
- export * from './Searchbar';
2
- export * from './SearchMain';
3
- export * from './SearchDialog';
4
1
  //# sourceMappingURL=index.d.ts.map
@@ -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":""}
@@ -0,0 +1,2 @@
1
+ export declare const SEARCH_DIALOG: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,QAA4B,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- export declare const SEARCH_DIALOG: string;
3
2
  export type SearchDialogProps = {
4
3
  pivotId: string;
5
4
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchDialog.d.ts","sourceRoot":"","sources":["../../../../../src/containers/SearchDialog/SearchDialog.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAuCjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,aAAa,iBAAiB,sBAuE1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SearchDialog, type SearchDialogProps } from './SearchDialog';
2
+ export { SearchDialog as default } from './SearchDialog';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/SearchDialog/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchMain.d.ts","sourceRoot":"","sources":["../../../../../src/containers/SearchMain/SearchMain.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAK9D,OAAO,EAAU,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAWvE,eAAO,MAAM,UAAU,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,sBAwDtD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { SearchMain } from './SearchMain';
2
+ export default SearchMain;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/SearchMain/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAe,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type ComponentType } from 'react';
2
+ export type { SearchDialogProps } from './SearchDialog';
3
+ export declare const SearchDialog: ComponentType<any>;
4
+ export declare const SearchMain: ComponentType<any>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,GAAG,CAAwC,CAAC;AACrF,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,GAAG,CAAsC,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":"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"}
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,EAAE,KAAK,iBAAiB,EAAgD,MAAM,OAAO,CAAC;AAIpG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,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":"AAcA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,eAAO,MAAM,YAAY,GAAI,oBAAoB;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE;;;;CAkCpF,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,4 +1,4 @@
1
- import { type PluginMeta } from '@dxos/app-framework';
2
- export declare const meta: PluginMeta;
1
+ import { type Plugin } from '@dxos/app-framework';
2
+ export declare const meta: Plugin.Meta;
3
3
  export declare const SEARCH_RESULT: string;
4
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;AAGtD,eAAO,MAAM,IAAI,EAAE,UAUlB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAsB,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,4 +1,5 @@
1
1
  import * as Schema from 'effect/Schema';
2
+ import { type Entity } from '@dxos/echo';
2
3
  export type SearchOptions<Schema extends Schema.Schema.AnyNoContext> = {
3
4
  query?: string;
4
5
  context?: string;
@@ -13,5 +14,6 @@ export type SearchResult<T = unknown> = {
13
14
  dataExtractionTime: number;
14
15
  };
15
16
  };
16
- 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>>;
17
19
  //# sourceMappingURL=exa.d.ts.map
@@ -1 +1 @@
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
+ {"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
1
  import * as Schema from 'effect/Schema';
2
- export declare namespace SearchAction {
3
- const OpenSearch_base: Schema.TaggedClass<OpenSearch, `${string}/open-search`, {
4
- readonly _tag: Schema.tag<`${string}/open-search`>;
5
- } & {
6
- input: typeof Schema.Void;
7
- output: typeof Schema.Void;
8
- }>;
9
- export class OpenSearch extends OpenSearch_base {
10
- }
11
- export {};
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,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,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"}