@searchcraft/javascript-sdk 0.10.0 → 0.10.2

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 (84) hide show
  1. package/dist/components/defineCustomElements.js +2 -0
  2. package/dist/components/index.d.ts +348 -187
  3. package/dist/components/index.js +8 -29
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/components/p-01589c0b.js +46 -0
  6. package/dist/components/p-01589c0b.js.map +1 -0
  7. package/dist/components/{p-8aa0fff5.js → p-0f5b47be.js} +17 -17
  8. package/dist/components/p-0f5b47be.js.map +1 -0
  9. package/dist/components/{p-3f63fa14.js → p-2999498a.js} +34 -22
  10. package/dist/components/p-2999498a.js.map +1 -0
  11. package/dist/components/{p-f8df3d49.js → p-3465cbc7.js} +578 -468
  12. package/dist/components/p-3465cbc7.js.map +1 -0
  13. package/dist/components/{p-e72d0167.js → p-435bec83.js} +3 -3
  14. package/dist/components/p-435bec83.js.map +1 -0
  15. package/dist/components/{p-39e70a00.js → p-48fa555e.js} +30 -4
  16. package/dist/components/p-48fa555e.js.map +1 -0
  17. package/dist/components/p-4d37616e.js +105 -0
  18. package/dist/components/p-4d37616e.js.map +1 -0
  19. package/dist/components/{p-c317a36a.js → p-66109c31.js} +7 -12
  20. package/dist/components/p-66109c31.js.map +1 -0
  21. package/dist/components/{p-d361b781.js → p-760c6845.js} +4 -4
  22. package/dist/components/{p-d361b781.js.map → p-760c6845.js.map} +1 -1
  23. package/dist/components/{p-bc9e0e40.js → p-7c650118.js} +4 -4
  24. package/dist/components/{p-bc9e0e40.js.map → p-7c650118.js.map} +1 -1
  25. package/dist/components/{p-34a32648.js → p-c1f43fe1.js} +4 -4
  26. package/dist/components/{p-34a32648.js.map → p-c1f43fe1.js.map} +1 -1
  27. package/dist/components/searchcraft-ad.js +1 -1
  28. package/dist/components/searchcraft-facet-list.js +1 -1
  29. package/dist/components/searchcraft-filter-panel.js +6 -6
  30. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  31. package/dist/components/searchcraft-input-form.js +1 -1
  32. package/dist/components/searchcraft-pagination.js +1 -1
  33. package/dist/components/searchcraft-pagination.js.map +1 -1
  34. package/dist/components/searchcraft-popover-button.js +97 -3
  35. package/dist/components/searchcraft-popover-button.js.map +1 -1
  36. package/dist/components/searchcraft-popover-footer.d.ts +11 -0
  37. package/dist/components/searchcraft-popover-footer.js +8 -0
  38. package/dist/components/searchcraft-popover-footer.js.map +1 -0
  39. package/dist/components/searchcraft-popover-form.js +34 -24
  40. package/dist/components/searchcraft-popover-form.js.map +1 -1
  41. package/dist/components/searchcraft-popover-list-item.js +1 -1
  42. package/dist/components/searchcraft-popover-list-view.js +1 -1
  43. package/dist/components/searchcraft-results-info.js +2 -9
  44. package/dist/components/searchcraft-results-info.js.map +1 -1
  45. package/dist/components/searchcraft-search-result.js +1 -1
  46. package/dist/components/searchcraft-search-results-per-page.js +1 -1
  47. package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
  48. package/dist/components/searchcraft-search-results.js +69 -32
  49. package/dist/components/searchcraft-search-results.js.map +1 -1
  50. package/dist/components/searchcraft-slider.js +1 -1
  51. package/dist/components/searchcraft-theme.js +2 -2
  52. package/dist/components/searchcraft-theme.js.map +1 -1
  53. package/dist/components/searchcraft-toggle-button.js +1 -1
  54. package/dist/hydrate/index.js +730 -445
  55. package/dist/hydrate/index.mjs +730 -445
  56. package/dist/themes/hologram.css +1 -0
  57. package/dist/themes/hologram.css.map +1 -0
  58. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +4 -3
  59. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +11 -6
  60. package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +4 -3
  61. package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +49 -5
  62. package/dist/types/components/searchcraft-popover-footer/searchcraft-popover-footer.d.ts +13 -0
  63. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +4 -3
  64. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +3 -3
  65. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +6 -10
  66. package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +3 -0
  67. package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +15 -9
  68. package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +4 -3
  69. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +4 -3
  70. package/dist/types/components.d.ts +239 -120
  71. package/dist/types/index.d.ts +0 -1
  72. package/dist/types/store/SearchcraftStore.types.d.ts +18 -6
  73. package/dist/types/utils/index.d.ts +0 -1
  74. package/dist/types/utils/units.d.ts +19 -6
  75. package/package.json +5 -4
  76. package/dist/components/p-39e70a00.js.map +0 -1
  77. package/dist/components/p-3f63fa14.js.map +0 -1
  78. package/dist/components/p-6104fe5d.js +0 -84
  79. package/dist/components/p-6104fe5d.js.map +0 -1
  80. package/dist/components/p-8aa0fff5.js.map +0 -1
  81. package/dist/components/p-c317a36a.js.map +0 -1
  82. package/dist/components/p-e72d0167.js.map +0 -1
  83. package/dist/components/p-f8df3d49.js.map +0 -1
  84. package/dist/types/utils/styles.d.ts +0 -3
@@ -5,9 +5,9 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { AdClientResponseItem, FilterItem, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
8
+ import { AdClientResponseItem, FilterItem, PopoverButtonTemplate, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
9
9
  import { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
10
- export { AdClientResponseItem, FilterItem, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
10
+ export { AdClientResponseItem, FilterItem, PopoverButtonTemplate, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
11
11
  export { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
12
12
  export namespace Components {
13
13
  /**
@@ -85,10 +85,10 @@ export namespace Components {
85
85
  }
86
86
  /**
87
87
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
88
- * @import ```jsx
89
- * // react
88
+ * @react-import ```jsx
90
89
  * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
91
- * // vue
90
+ * ```
91
+ * @vue-import ```jsx
92
92
  * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
93
93
  * ```
94
94
  * @js-example ```html
@@ -118,10 +118,10 @@ export namespace Components {
118
118
  /**
119
119
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
120
120
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
121
- * @import ```jsx
122
- * // react
121
+ * @react-import ```jsx
123
122
  * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
124
- * // vue
123
+ * ```
124
+ * @vue-import ```jsx
125
125
  * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
126
126
  * ```
127
127
  * @js-example ```html
@@ -172,10 +172,10 @@ export namespace Components {
172
172
  }
173
173
  /**
174
174
  * This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
175
- * @import ```jsx
176
- * // react
175
+ * @react-import ```jsx
177
176
  * import { SearchcraftPagination } from "@searchcraft/react-sdk";
178
- * // vue
177
+ * ```
178
+ * @vue-import ```jsx
179
179
  * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
180
180
  * ```
181
181
  * @js-example ```html
@@ -192,36 +192,65 @@ export namespace Components {
192
192
  }
193
193
  /**
194
194
  * Renders a button which, when clicked, turns on popover visibility.
195
- * @import ```jsx
196
- * // react
195
+ * @react-import ```jsx
197
196
  * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
198
- * // vue
197
+ * ````
198
+ * @vue-import ```jsx
199
199
  * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
200
200
  * ```
201
201
  * @js-example ```html
202
+ * <!-- index.html -->
202
203
  * <searchcraft-popover-button>
203
204
  * Open popover
204
205
  * </searchcraft-popover-button>
205
206
  * ```
207
+ * ```js
208
+ * // index.js
209
+ * const popoverButton = document.querySelector('searchcraft-popover-button');
210
+ * popoverButton.template = ({ isPopoverVisible }, { html }) => html`
211
+ * <span>Click me</span>
212
+ * `;
213
+ * ```
206
214
  * @react-example ```jsx
207
- * <SearchcraftPopoverButton>
215
+ * <SearchcraftPopoverButton
216
+ * template={({ isPopoverVisible }, { html }) => html`
217
+ * <span>Click me</span>
218
+ * `}
219
+ * >
208
220
  * Open popover
209
221
  * </SearchcraftPopoverButton>
210
222
  * ```
211
223
  * @vue-example ```jsx
212
- * <SearchcraftPopoverButton>
224
+ * <SearchcraftPopoverButton
225
+ * :template={({ isPopoverVisible }, { html }) => html`
226
+ * <span>Click me</span>
227
+ * `}
228
+ * >
213
229
  * Open popover
214
230
  * </SearchcraftPopoverButton>
215
231
  * ```
216
232
  */
217
233
  interface SearchcraftPopoverButton {
234
+ /**
235
+ * A callback function responsible for rendering the button contents.
236
+ */
237
+ "template"?: PopoverButtonTemplate;
238
+ /**
239
+ * The type of popover button to render.
240
+ */
241
+ "type"?: 'skeuomorphic';
242
+ }
243
+ /**
244
+ * Renders the footer for the searchcraft-popover-form.
245
+ */
246
+ interface SearchcraftPopoverFooter {
218
247
  }
219
248
  /**
220
249
  * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
221
- * @import ```jsx
222
- * // react
250
+ * @react-import ```jsx
223
251
  * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
224
- * // vue
252
+ * ```
253
+ * @vue-import ```jsx
225
254
  * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
226
255
  * ```
227
256
  * @js-example ```html
@@ -291,10 +320,10 @@ export namespace Components {
291
320
  }
292
321
  /**
293
322
  * This web component is designed to display the number of results returned from a search query.
294
- * @import ```jsx
295
- * // react
323
+ * @react-import ```jsx
296
324
  * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
297
- * // vue
325
+ * ```
326
+ * @vue-import ```jsx
298
327
  * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
299
328
  * ```
300
329
  * @js-example ```html
@@ -314,17 +343,18 @@ export namespace Components {
314
343
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
315
344
  * `}
316
345
  * />
346
+ * ```
317
347
  * @vue-example ```jsx
318
348
  * <SearchcraftResultsInfo
319
349
  * :template={(info, { html }) => html`
320
350
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
321
351
  * `}
322
352
  * />
353
+ * ```
323
354
  */
324
355
  interface SearchcraftResultsInfo {
325
356
  /**
326
357
  * A callback function responsible for rendering the results info.
327
- * @example ```ts resultsInfo.template = html` ${range[0]}-${range[1]} of ${count} results in ${responseTime}ms `; ```
328
358
  */
329
359
  "template"?: ResultsInfoTemplate;
330
360
  }
@@ -348,10 +378,10 @@ export namespace Components {
348
378
  }
349
379
  /**
350
380
  * This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
351
- * @import ```jsx
352
- * // react
381
+ * @react-import ```jsx
353
382
  * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
354
- * // vue
383
+ * ```
384
+ * @vue-import ```jsx
355
385
  * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
356
386
  * ```
357
387
  * @js-example ```html
@@ -388,6 +418,10 @@ export namespace Components {
388
418
  * ```
389
419
  */
390
420
  interface SearchcraftSearchResults {
421
+ /**
422
+ * A query that will appears when the component initializes or the search term is ''..
423
+ */
424
+ "initialQuery"?: string;
391
425
  /**
392
426
  * A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
393
427
  */
@@ -395,10 +429,10 @@ export namespace Components {
395
429
  }
396
430
  /**
397
431
  * This web component is designed to choose the number of search results displayed.
398
- * @import ```jsx
399
- * // react
432
+ * @react-import ```jsx
400
433
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
401
- * // vue
434
+ * ```
435
+ * @vue-import ```jsx
402
436
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
403
437
  * ```
404
438
  * @js-example ```html
@@ -482,10 +516,10 @@ export namespace Components {
482
516
  }
483
517
  /**
484
518
  * This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
485
- * @import ```jsx
486
- * // react
519
+ * @react-import ```jsx
487
520
  * import { SearchcraftTheme } from "@searchcraft/react-sdk";
488
- * // vue
521
+ * ```
522
+ * @vue-import ```jsx
489
523
  * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
490
524
  * ```
491
525
  * @js-example ```html
@@ -617,10 +651,10 @@ declare global {
617
651
  };
618
652
  /**
619
653
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
620
- * @import ```jsx
621
- * // react
654
+ * @react-import ```jsx
622
655
  * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
623
- * // vue
656
+ * ```
657
+ * @vue-import ```jsx
624
658
  * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
625
659
  * ```
626
660
  * @js-example ```html
@@ -655,10 +689,10 @@ declare global {
655
689
  /**
656
690
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
657
691
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
658
- * @import ```jsx
659
- * // react
692
+ * @react-import ```jsx
660
693
  * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
661
- * // vue
694
+ * ```
695
+ * @vue-import ```jsx
662
696
  * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
663
697
  * ```
664
698
  * @js-example ```html
@@ -699,10 +733,10 @@ declare global {
699
733
  };
700
734
  /**
701
735
  * This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
702
- * @import ```jsx
703
- * // react
736
+ * @react-import ```jsx
704
737
  * import { SearchcraftPagination } from "@searchcraft/react-sdk";
705
- * // vue
738
+ * ```
739
+ * @vue-import ```jsx
706
740
  * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
707
741
  * ```
708
742
  * @js-example ```html
@@ -723,24 +757,40 @@ declare global {
723
757
  };
724
758
  /**
725
759
  * Renders a button which, when clicked, turns on popover visibility.
726
- * @import ```jsx
727
- * // react
760
+ * @react-import ```jsx
728
761
  * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
729
- * // vue
762
+ * ````
763
+ * @vue-import ```jsx
730
764
  * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
731
765
  * ```
732
766
  * @js-example ```html
767
+ * <!-- index.html -->
733
768
  * <searchcraft-popover-button>
734
769
  * Open popover
735
770
  * </searchcraft-popover-button>
736
771
  * ```
772
+ * ```js
773
+ * // index.js
774
+ * const popoverButton = document.querySelector('searchcraft-popover-button');
775
+ * popoverButton.template = ({ isPopoverVisible }, { html }) => html`
776
+ * <span>Click me</span>
777
+ * `;
778
+ * ```
737
779
  * @react-example ```jsx
738
- * <SearchcraftPopoverButton>
780
+ * <SearchcraftPopoverButton
781
+ * template={({ isPopoverVisible }, { html }) => html`
782
+ * <span>Click me</span>
783
+ * `}
784
+ * >
739
785
  * Open popover
740
786
  * </SearchcraftPopoverButton>
741
787
  * ```
742
788
  * @vue-example ```jsx
743
- * <SearchcraftPopoverButton>
789
+ * <SearchcraftPopoverButton
790
+ * :template={({ isPopoverVisible }, { html }) => html`
791
+ * <span>Click me</span>
792
+ * `}
793
+ * >
744
794
  * Open popover
745
795
  * </SearchcraftPopoverButton>
746
796
  * ```
@@ -751,12 +801,21 @@ declare global {
751
801
  prototype: HTMLSearchcraftPopoverButtonElement;
752
802
  new (): HTMLSearchcraftPopoverButtonElement;
753
803
  };
804
+ /**
805
+ * Renders the footer for the searchcraft-popover-form.
806
+ */
807
+ interface HTMLSearchcraftPopoverFooterElement extends Components.SearchcraftPopoverFooter, HTMLStencilElement {
808
+ }
809
+ var HTMLSearchcraftPopoverFooterElement: {
810
+ prototype: HTMLSearchcraftPopoverFooterElement;
811
+ new (): HTMLSearchcraftPopoverFooterElement;
812
+ };
754
813
  /**
755
814
  * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
756
- * @import ```jsx
757
- * // react
815
+ * @react-import ```jsx
758
816
  * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
759
- * // vue
817
+ * ```
818
+ * @vue-import ```jsx
760
819
  * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
761
820
  * ```
762
821
  * @js-example ```html
@@ -805,10 +864,10 @@ declare global {
805
864
  };
806
865
  /**
807
866
  * This web component is designed to display the number of results returned from a search query.
808
- * @import ```jsx
809
- * // react
867
+ * @react-import ```jsx
810
868
  * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
811
- * // vue
869
+ * ```
870
+ * @vue-import ```jsx
812
871
  * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
813
872
  * ```
814
873
  * @js-example ```html
@@ -828,12 +887,14 @@ declare global {
828
887
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
829
888
  * `}
830
889
  * />
890
+ * ```
831
891
  * @vue-example ```jsx
832
892
  * <SearchcraftResultsInfo
833
893
  * :template={(info, { html }) => html`
834
894
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
835
895
  * `}
836
896
  * />
897
+ * ```
837
898
  */
838
899
  interface HTMLSearchcraftResultsInfoElement extends Components.SearchcraftResultsInfo, HTMLStencilElement {
839
900
  }
@@ -852,10 +913,10 @@ declare global {
852
913
  };
853
914
  /**
854
915
  * This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
855
- * @import ```jsx
856
- * // react
916
+ * @react-import ```jsx
857
917
  * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
858
- * // vue
918
+ * ```
919
+ * @vue-import ```jsx
859
920
  * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
860
921
  * ```
861
922
  * @js-example ```html
@@ -899,10 +960,10 @@ declare global {
899
960
  };
900
961
  /**
901
962
  * This web component is designed to choose the number of search results displayed.
902
- * @import ```jsx
903
- * // react
963
+ * @react-import ```jsx
904
964
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
905
- * // vue
965
+ * ```
966
+ * @vue-import ```jsx
906
967
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
907
968
  * ```
908
969
  * @js-example ```html
@@ -972,10 +1033,10 @@ declare global {
972
1033
  };
973
1034
  /**
974
1035
  * This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
975
- * @import ```jsx
976
- * // react
1036
+ * @react-import ```jsx
977
1037
  * import { SearchcraftTheme } from "@searchcraft/react-sdk";
978
- * // vue
1038
+ * ```
1039
+ * @vue-import ```jsx
979
1040
  * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
980
1041
  * ```
981
1042
  * @js-example ```html
@@ -1024,6 +1085,7 @@ declare global {
1024
1085
  "searchcraft-input-label": HTMLSearchcraftInputLabelElement;
1025
1086
  "searchcraft-pagination": HTMLSearchcraftPaginationElement;
1026
1087
  "searchcraft-popover-button": HTMLSearchcraftPopoverButtonElement;
1088
+ "searchcraft-popover-footer": HTMLSearchcraftPopoverFooterElement;
1027
1089
  "searchcraft-popover-form": HTMLSearchcraftPopoverFormElement;
1028
1090
  "searchcraft-popover-list-item": HTMLSearchcraftPopoverListItemElement;
1029
1091
  "searchcraft-popover-list-view": HTMLSearchcraftPopoverListViewElement;
@@ -1121,10 +1183,10 @@ declare namespace LocalJSX {
1121
1183
  }
1122
1184
  /**
1123
1185
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
1124
- * @import ```jsx
1125
- * // react
1186
+ * @react-import ```jsx
1126
1187
  * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
1127
- * // vue
1188
+ * ```
1189
+ * @vue-import ```jsx
1128
1190
  * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
1129
1191
  * ```
1130
1192
  * @js-example ```html
@@ -1154,10 +1216,10 @@ declare namespace LocalJSX {
1154
1216
  /**
1155
1217
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
1156
1218
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
1157
- * @import ```jsx
1158
- * // react
1219
+ * @react-import ```jsx
1159
1220
  * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
1160
- * // vue
1221
+ * ```
1222
+ * @vue-import ```jsx
1161
1223
  * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
1162
1224
  * ```
1163
1225
  * @js-example ```html
@@ -1220,10 +1282,10 @@ declare namespace LocalJSX {
1220
1282
  }
1221
1283
  /**
1222
1284
  * This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
1223
- * @import ```jsx
1224
- * // react
1285
+ * @react-import ```jsx
1225
1286
  * import { SearchcraftPagination } from "@searchcraft/react-sdk";
1226
- * // vue
1287
+ * ```
1288
+ * @vue-import ```jsx
1227
1289
  * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
1228
1290
  * ```
1229
1291
  * @js-example ```html
@@ -1240,36 +1302,65 @@ declare namespace LocalJSX {
1240
1302
  }
1241
1303
  /**
1242
1304
  * Renders a button which, when clicked, turns on popover visibility.
1243
- * @import ```jsx
1244
- * // react
1305
+ * @react-import ```jsx
1245
1306
  * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
1246
- * // vue
1307
+ * ````
1308
+ * @vue-import ```jsx
1247
1309
  * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
1248
1310
  * ```
1249
1311
  * @js-example ```html
1312
+ * <!-- index.html -->
1250
1313
  * <searchcraft-popover-button>
1251
1314
  * Open popover
1252
1315
  * </searchcraft-popover-button>
1253
1316
  * ```
1317
+ * ```js
1318
+ * // index.js
1319
+ * const popoverButton = document.querySelector('searchcraft-popover-button');
1320
+ * popoverButton.template = ({ isPopoverVisible }, { html }) => html`
1321
+ * <span>Click me</span>
1322
+ * `;
1323
+ * ```
1254
1324
  * @react-example ```jsx
1255
- * <SearchcraftPopoverButton>
1325
+ * <SearchcraftPopoverButton
1326
+ * template={({ isPopoverVisible }, { html }) => html`
1327
+ * <span>Click me</span>
1328
+ * `}
1329
+ * >
1256
1330
  * Open popover
1257
1331
  * </SearchcraftPopoverButton>
1258
1332
  * ```
1259
1333
  * @vue-example ```jsx
1260
- * <SearchcraftPopoverButton>
1334
+ * <SearchcraftPopoverButton
1335
+ * :template={({ isPopoverVisible }, { html }) => html`
1336
+ * <span>Click me</span>
1337
+ * `}
1338
+ * >
1261
1339
  * Open popover
1262
1340
  * </SearchcraftPopoverButton>
1263
1341
  * ```
1264
1342
  */
1265
1343
  interface SearchcraftPopoverButton {
1344
+ /**
1345
+ * A callback function responsible for rendering the button contents.
1346
+ */
1347
+ "template"?: PopoverButtonTemplate;
1348
+ /**
1349
+ * The type of popover button to render.
1350
+ */
1351
+ "type"?: 'skeuomorphic';
1352
+ }
1353
+ /**
1354
+ * Renders the footer for the searchcraft-popover-form.
1355
+ */
1356
+ interface SearchcraftPopoverFooter {
1266
1357
  }
1267
1358
  /**
1268
1359
  * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
1269
- * @import ```jsx
1270
- * // react
1360
+ * @react-import ```jsx
1271
1361
  * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
1272
- * // vue
1362
+ * ```
1363
+ * @vue-import ```jsx
1273
1364
  * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
1274
1365
  * ```
1275
1366
  * @js-example ```html
@@ -1339,10 +1430,10 @@ declare namespace LocalJSX {
1339
1430
  }
1340
1431
  /**
1341
1432
  * This web component is designed to display the number of results returned from a search query.
1342
- * @import ```jsx
1343
- * // react
1433
+ * @react-import ```jsx
1344
1434
  * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
1345
- * // vue
1435
+ * ```
1436
+ * @vue-import ```jsx
1346
1437
  * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
1347
1438
  * ```
1348
1439
  * @js-example ```html
@@ -1362,17 +1453,18 @@ declare namespace LocalJSX {
1362
1453
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1363
1454
  * `}
1364
1455
  * />
1456
+ * ```
1365
1457
  * @vue-example ```jsx
1366
1458
  * <SearchcraftResultsInfo
1367
1459
  * :template={(info, { html }) => html`
1368
1460
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1369
1461
  * `}
1370
1462
  * />
1463
+ * ```
1371
1464
  */
1372
1465
  interface SearchcraftResultsInfo {
1373
1466
  /**
1374
1467
  * A callback function responsible for rendering the results info.
1375
- * @example ```ts resultsInfo.template = html` ${range[0]}-${range[1]} of ${count} results in ${responseTime}ms `; ```
1376
1468
  */
1377
1469
  "template"?: ResultsInfoTemplate;
1378
1470
  }
@@ -1396,10 +1488,10 @@ declare namespace LocalJSX {
1396
1488
  }
1397
1489
  /**
1398
1490
  * This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
1399
- * @import ```jsx
1400
- * // react
1491
+ * @react-import ```jsx
1401
1492
  * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
1402
- * // vue
1493
+ * ```
1494
+ * @vue-import ```jsx
1403
1495
  * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
1404
1496
  * ```
1405
1497
  * @js-example ```html
@@ -1436,6 +1528,10 @@ declare namespace LocalJSX {
1436
1528
  * ```
1437
1529
  */
1438
1530
  interface SearchcraftSearchResults {
1531
+ /**
1532
+ * A query that will appears when the component initializes or the search term is ''..
1533
+ */
1534
+ "initialQuery"?: string;
1439
1535
  /**
1440
1536
  * A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
1441
1537
  */
@@ -1443,10 +1539,10 @@ declare namespace LocalJSX {
1443
1539
  }
1444
1540
  /**
1445
1541
  * This web component is designed to choose the number of search results displayed.
1446
- * @import ```jsx
1447
- * // react
1542
+ * @react-import ```jsx
1448
1543
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
1449
- * // vue
1544
+ * ```
1545
+ * @vue-import ```jsx
1450
1546
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
1451
1547
  * ```
1452
1548
  * @js-example ```html
@@ -1538,10 +1634,10 @@ declare namespace LocalJSX {
1538
1634
  }
1539
1635
  /**
1540
1636
  * This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
1541
- * @import ```jsx
1542
- * // react
1637
+ * @react-import ```jsx
1543
1638
  * import { SearchcraftTheme } from "@searchcraft/react-sdk";
1544
- * // vue
1639
+ * ```
1640
+ * @vue-import ```jsx
1545
1641
  * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
1546
1642
  * ```
1547
1643
  * @js-example ```html
@@ -1583,6 +1679,7 @@ declare namespace LocalJSX {
1583
1679
  "searchcraft-input-label": SearchcraftInputLabel;
1584
1680
  "searchcraft-pagination": SearchcraftPagination;
1585
1681
  "searchcraft-popover-button": SearchcraftPopoverButton;
1682
+ "searchcraft-popover-footer": SearchcraftPopoverFooter;
1586
1683
  "searchcraft-popover-form": SearchcraftPopoverForm;
1587
1684
  "searchcraft-popover-list-item": SearchcraftPopoverListItem;
1588
1685
  "searchcraft-popover-list-view": SearchcraftPopoverListView;
@@ -1636,10 +1733,10 @@ declare module "@stencil/core" {
1636
1733
  "searchcraft-facet-list": LocalJSX.SearchcraftFacetList & JSXBase.HTMLAttributes<HTMLSearchcraftFacetListElement>;
1637
1734
  /**
1638
1735
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
1639
- * @import ```jsx
1640
- * // react
1736
+ * @react-import ```jsx
1641
1737
  * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
1642
- * // vue
1738
+ * ```
1739
+ * @vue-import ```jsx
1643
1740
  * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
1644
1741
  * ```
1645
1742
  * @js-example ```html
@@ -1664,10 +1761,10 @@ declare module "@stencil/core" {
1664
1761
  /**
1665
1762
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
1666
1763
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
1667
- * @import ```jsx
1668
- * // react
1764
+ * @react-import ```jsx
1669
1765
  * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
1670
- * // vue
1766
+ * ```
1767
+ * @vue-import ```jsx
1671
1768
  * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
1672
1769
  * ```
1673
1770
  * @js-example ```html
@@ -1690,10 +1787,10 @@ declare module "@stencil/core" {
1690
1787
  "searchcraft-input-label": LocalJSX.SearchcraftInputLabel & JSXBase.HTMLAttributes<HTMLSearchcraftInputLabelElement>;
1691
1788
  /**
1692
1789
  * This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
1693
- * @import ```jsx
1694
- * // react
1790
+ * @react-import ```jsx
1695
1791
  * import { SearchcraftPagination } from "@searchcraft/react-sdk";
1696
- * // vue
1792
+ * ```
1793
+ * @vue-import ```jsx
1697
1794
  * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
1698
1795
  * ```
1699
1796
  * @js-example ```html
@@ -1709,35 +1806,55 @@ declare module "@stencil/core" {
1709
1806
  "searchcraft-pagination": LocalJSX.SearchcraftPagination & JSXBase.HTMLAttributes<HTMLSearchcraftPaginationElement>;
1710
1807
  /**
1711
1808
  * Renders a button which, when clicked, turns on popover visibility.
1712
- * @import ```jsx
1713
- * // react
1809
+ * @react-import ```jsx
1714
1810
  * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
1715
- * // vue
1811
+ * ````
1812
+ * @vue-import ```jsx
1716
1813
  * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
1717
1814
  * ```
1718
1815
  * @js-example ```html
1816
+ * <!-- index.html -->
1719
1817
  * <searchcraft-popover-button>
1720
1818
  * Open popover
1721
1819
  * </searchcraft-popover-button>
1722
1820
  * ```
1821
+ * ```js
1822
+ * // index.js
1823
+ * const popoverButton = document.querySelector('searchcraft-popover-button');
1824
+ * popoverButton.template = ({ isPopoverVisible }, { html }) => html`
1825
+ * <span>Click me</span>
1826
+ * `;
1827
+ * ```
1723
1828
  * @react-example ```jsx
1724
- * <SearchcraftPopoverButton>
1829
+ * <SearchcraftPopoverButton
1830
+ * template={({ isPopoverVisible }, { html }) => html`
1831
+ * <span>Click me</span>
1832
+ * `}
1833
+ * >
1725
1834
  * Open popover
1726
1835
  * </SearchcraftPopoverButton>
1727
1836
  * ```
1728
1837
  * @vue-example ```jsx
1729
- * <SearchcraftPopoverButton>
1838
+ * <SearchcraftPopoverButton
1839
+ * :template={({ isPopoverVisible }, { html }) => html`
1840
+ * <span>Click me</span>
1841
+ * `}
1842
+ * >
1730
1843
  * Open popover
1731
1844
  * </SearchcraftPopoverButton>
1732
1845
  * ```
1733
1846
  */
1734
1847
  "searchcraft-popover-button": LocalJSX.SearchcraftPopoverButton & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverButtonElement>;
1848
+ /**
1849
+ * Renders the footer for the searchcraft-popover-form.
1850
+ */
1851
+ "searchcraft-popover-footer": LocalJSX.SearchcraftPopoverFooter & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverFooterElement>;
1735
1852
  /**
1736
1853
  * This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
1737
- * @import ```jsx
1738
- * // react
1854
+ * @react-import ```jsx
1739
1855
  * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
1740
- * // vue
1856
+ * ```
1857
+ * @vue-import ```jsx
1741
1858
  * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
1742
1859
  * ```
1743
1860
  * @js-example ```html
@@ -1771,10 +1888,10 @@ declare module "@stencil/core" {
1771
1888
  "searchcraft-popover-list-view": LocalJSX.SearchcraftPopoverListView & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListViewElement>;
1772
1889
  /**
1773
1890
  * This web component is designed to display the number of results returned from a search query.
1774
- * @import ```jsx
1775
- * // react
1891
+ * @react-import ```jsx
1776
1892
  * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
1777
- * // vue
1893
+ * ```
1894
+ * @vue-import ```jsx
1778
1895
  * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
1779
1896
  * ```
1780
1897
  * @js-example ```html
@@ -1794,12 +1911,14 @@ declare module "@stencil/core" {
1794
1911
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1795
1912
  * `}
1796
1913
  * />
1914
+ * ```
1797
1915
  * @vue-example ```jsx
1798
1916
  * <SearchcraftResultsInfo
1799
1917
  * :template={(info, { html }) => html`
1800
1918
  * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1801
1919
  * `}
1802
1920
  * />
1921
+ * ```
1803
1922
  */
1804
1923
  "searchcraft-results-info": LocalJSX.SearchcraftResultsInfo & JSXBase.HTMLAttributes<HTMLSearchcraftResultsInfoElement>;
1805
1924
  /**
@@ -1808,10 +1927,10 @@ declare module "@stencil/core" {
1808
1927
  "searchcraft-search-result": LocalJSX.SearchcraftSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultElement>;
1809
1928
  /**
1810
1929
  * This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
1811
- * @import ```jsx
1812
- * // react
1930
+ * @react-import ```jsx
1813
1931
  * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
1814
- * // vue
1932
+ * ```
1933
+ * @vue-import ```jsx
1815
1934
  * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
1816
1935
  * ```
1817
1936
  * @js-example ```html
@@ -1850,10 +1969,10 @@ declare module "@stencil/core" {
1850
1969
  "searchcraft-search-results": LocalJSX.SearchcraftSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsElement>;
1851
1970
  /**
1852
1971
  * This web component is designed to choose the number of search results displayed.
1853
- * @import ```jsx
1854
- * // react
1972
+ * @react-import ```jsx
1855
1973
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
1856
- * // vue
1974
+ * ```
1975
+ * @vue-import ```jsx
1857
1976
  * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
1858
1977
  * ```
1859
1978
  * @js-example ```html
@@ -1886,10 +2005,10 @@ declare module "@stencil/core" {
1886
2005
  "searchcraft-slider": LocalJSX.SearchcraftSlider & JSXBase.HTMLAttributes<HTMLSearchcraftSliderElement>;
1887
2006
  /**
1888
2007
  * This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
1889
- * @import ```jsx
1890
- * // react
2008
+ * @react-import ```jsx
1891
2009
  * import { SearchcraftTheme } from "@searchcraft/react-sdk";
1892
- * // vue
2010
+ * ```
2011
+ * @vue-import ```jsx
1893
2012
  * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
1894
2013
  * ```
1895
2014
  * @js-example ```html