@searchcraft/javascript-sdk 0.9.6 → 0.10.0

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 (120) hide show
  1. package/README.md +2 -2
  2. package/dist/components/defineCustomElements.js +6 -6
  3. package/dist/components/index.d.ts +2514 -68
  4. package/dist/components/index.js +47 -16
  5. package/dist/components/index.js.map +1 -1
  6. package/dist/components/{p-e55a7970.js → p-1adf78b9.js} +2 -2
  7. package/dist/components/p-1adf78b9.js.map +1 -0
  8. package/dist/components/{p-94837dcb.js → p-34a32648.js} +11 -11
  9. package/dist/components/p-34a32648.js.map +1 -0
  10. package/dist/components/p-39e70a00.js +67 -0
  11. package/dist/components/p-39e70a00.js.map +1 -0
  12. package/dist/components/{p-c1c14447.js → p-3f63fa14.js} +14 -21
  13. package/dist/components/p-3f63fa14.js.map +1 -0
  14. package/dist/components/{p-bf6a086a.js → p-73db9122.js} +3 -10
  15. package/dist/components/p-73db9122.js.map +1 -0
  16. package/dist/components/p-810a7850.js +17 -0
  17. package/dist/components/p-810a7850.js.map +1 -0
  18. package/dist/components/{p-44e6ed36.js → p-8aa0fff5.js} +4 -3
  19. package/dist/components/p-8aa0fff5.js.map +1 -0
  20. package/dist/components/{p-10b0d0dc.js → p-a64b4cba.js} +2 -136
  21. package/dist/components/p-a64b4cba.js.map +1 -0
  22. package/dist/components/{p-71cc28c1.js → p-acf23bab.js} +2 -2
  23. package/dist/components/p-acf23bab.js.map +1 -0
  24. package/dist/components/{p-bb12ab5a.js → p-bc9e0e40.js} +4 -3
  25. package/dist/components/p-bc9e0e40.js.map +1 -0
  26. package/dist/components/{p-0bbc3aff.js → p-c317a36a.js} +7 -7
  27. package/dist/components/p-c317a36a.js.map +1 -0
  28. package/dist/components/{p-bb9e9d7d.js → p-d361b781.js} +5 -7
  29. package/dist/components/p-d361b781.js.map +1 -0
  30. package/dist/components/p-e72d0167.js +147 -0
  31. package/dist/components/p-e72d0167.js.map +1 -0
  32. package/dist/components/{p-0e393fe1.js → p-f2585cdf.js} +3 -9
  33. package/dist/components/p-f2585cdf.js.map +1 -0
  34. package/dist/components/{p-2e293015.js → p-f8df3d49.js} +157 -160
  35. package/dist/components/p-f8df3d49.js.map +1 -0
  36. package/dist/components/searchcraft-ad.js +1 -1
  37. package/dist/components/searchcraft-button.js +1 -1
  38. package/dist/components/searchcraft-error-message.js +1 -1
  39. package/dist/components/searchcraft-facet-list.js +1 -1
  40. package/dist/components/searchcraft-filter-panel.js +6 -5
  41. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  42. package/dist/components/searchcraft-input-form.js +2 -2
  43. package/dist/components/searchcraft-input-label.js +1 -1
  44. package/dist/components/searchcraft-pagination.js +4 -10
  45. package/dist/components/searchcraft-pagination.js.map +1 -1
  46. package/dist/components/searchcraft-popover-button.js +2 -2
  47. package/dist/components/searchcraft-popover-button.js.map +1 -1
  48. package/dist/components/searchcraft-popover-form.js +14 -15
  49. package/dist/components/searchcraft-popover-form.js.map +1 -1
  50. package/dist/components/searchcraft-popover-list-item.js +1 -1
  51. package/dist/components/searchcraft-popover-list-view.js +1 -1
  52. package/dist/components/searchcraft-results-info.js +15 -19
  53. package/dist/components/searchcraft-results-info.js.map +1 -1
  54. package/dist/components/searchcraft-search-result.d.ts +11 -0
  55. package/dist/components/searchcraft-search-result.js +8 -0
  56. package/dist/components/searchcraft-search-result.js.map +1 -0
  57. package/dist/components/searchcraft-search-results-per-page.js +3 -10
  58. package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
  59. package/dist/components/searchcraft-search-results.d.ts +11 -0
  60. package/dist/components/searchcraft-search-results.js +179 -0
  61. package/dist/components/searchcraft-search-results.js.map +1 -0
  62. package/dist/components/searchcraft-select.js +1 -1
  63. package/dist/components/searchcraft-slider.js +1 -1
  64. package/dist/components/searchcraft-theme.js +4 -42
  65. package/dist/components/searchcraft-theme.js.map +1 -1
  66. package/dist/components/searchcraft-toggle-button.js +1 -1
  67. package/dist/hydrate/index.d.ts +242 -0
  68. package/dist/hydrate/index.js +23290 -0
  69. package/dist/hydrate/index.mjs +23282 -0
  70. package/dist/hydrate/package.json +12 -0
  71. package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +5 -1
  72. package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +3 -2
  73. package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +6 -7
  74. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +3 -1
  75. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +29 -1
  76. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +22 -14
  77. package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +3 -2
  78. package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +21 -8
  79. package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +30 -0
  80. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +26 -15
  81. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +2 -0
  82. package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +3 -2
  83. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +41 -15
  84. package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +25 -0
  85. package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +80 -0
  86. package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +20 -5
  87. package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +3 -5
  88. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +3 -3
  89. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +23 -16
  90. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
  91. package/dist/types/components.d.ts +838 -612
  92. package/dist/types/index.d.ts +5 -4
  93. package/dist/types/utils/html.d.ts +6 -0
  94. package/dist/types/utils/index.d.ts +1 -0
  95. package/package.json +10 -8
  96. package/dist/components/bundled.types.d.ts +0 -2269
  97. package/dist/components/p-0bbc3aff.js.map +0 -1
  98. package/dist/components/p-0e393fe1.js.map +0 -1
  99. package/dist/components/p-10b0d0dc.js.map +0 -1
  100. package/dist/components/p-2e293015.js.map +0 -1
  101. package/dist/components/p-44e6ed36.js.map +0 -1
  102. package/dist/components/p-71cc28c1.js.map +0 -1
  103. package/dist/components/p-94837dcb.js.map +0 -1
  104. package/dist/components/p-9bdcb929.js +0 -136
  105. package/dist/components/p-9bdcb929.js.map +0 -1
  106. package/dist/components/p-bb12ab5a.js.map +0 -1
  107. package/dist/components/p-bb9e9d7d.js.map +0 -1
  108. package/dist/components/p-bf6a086a.js.map +0 -1
  109. package/dist/components/p-c1c14447.js.map +0 -1
  110. package/dist/components/p-d9551738.js +0 -25
  111. package/dist/components/p-d9551738.js.map +0 -1
  112. package/dist/components/p-e55a7970.js.map +0 -1
  113. package/dist/components/searchcraft-base-search-result.d.ts +0 -11
  114. package/dist/components/searchcraft-base-search-result.js +0 -8
  115. package/dist/components/searchcraft-base-search-result.js.map +0 -1
  116. package/dist/components/searchcraft-base-search-results.d.ts +0 -11
  117. package/dist/components/searchcraft-base-search-results.js +0 -225
  118. package/dist/components/searchcraft-base-search-results.js.map +0 -1
  119. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +0 -55
  120. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +0 -89
@@ -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, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultMappings } from "@searchcraft/core";
8
+ import { AdClientResponseItem, FilterItem, 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, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultMappings } from "@searchcraft/core";
10
+ export { AdClientResponseItem, FilterItem, 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
  /**
@@ -15,112 +15,12 @@ export namespace Components {
15
15
  */
16
16
  interface SearchcraftAd {
17
17
  "adClientResponseItem"?: AdClientResponseItem;
18
+ "adContainerId": string;
18
19
  "adSource": SearchcraftAdSource;
19
20
  }
20
21
  /**
21
- * This web component is designed to display detailed information for a single search result.
22
- * Once a query is submitted, the component formats and presents the result.
23
- * It is consumed within the `searchcraft-base-search-results` component.
24
- */
25
- interface SearchcraftBaseSearchResult {
26
- /**
27
- * The relationship between the current document and the link for the button rendered when containerHref is not present.
28
- */
29
- "buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
30
- /**
31
- * Where to open the link for the button rendered when containerHref is not present.
32
- */
33
- "buttonTarget": '_blank' | '_self' | '_top' | '_parent';
34
- /**
35
- * The relationship between the current document and the link for the containing element.
36
- */
37
- "containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
38
- /**
39
- * Where to open the link for the containing element.
40
- */
41
- "containerTarget": '_blank' | '_self' | '_top' | '_parent';
42
- /**
43
- * A custom styles object.
44
- */
45
- "customStyles"?: string;
46
- /**
47
- * The position in the document. Used with the "document_clicked" measure event.
48
- */
49
- "documentPosition": number;
50
- /**
51
- * The placement of the image.
52
- */
53
- "imagePlacement": 'left' | 'right';
54
- "item"?: SearchClientResponseItem;
55
- "searchResultMappings"?: SearchResultMappings;
56
- }
57
- /**
58
- * This web component is responsible for displaying the results of a search query.
59
- * Once a query is submitted, the component formats and presents an ordered list of the results.
60
- * ## Usage
61
- * ```html
62
- * <!-- index.html -->
63
- * <searchcraft-base-search-results
64
- * ad-interval="4"
65
- * place-ad-at-start="false"
66
- * result-image-placement="right"
67
- * />
68
- * ```
69
- * ```js
70
- * // index.js
71
- * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
72
- * baseSearchResults.searchResultMappings = containerHref: {
73
- * fieldNames: [
74
- * {
75
- * fieldName: 'canonical_link',
76
- * dataType: 'text',
77
- * },
78
- * ],
79
- * };
80
- * baseSearchResults.addEventListener('noResults', () => {
81
- * console.log('No search results found');
82
- * });
83
- * ```
84
- */
85
- interface SearchcraftBaseSearchResults {
86
- /**
87
- * The label for the button rendered when containerHref is not present for each result.
88
- */
89
- "buttonLabel"?: string;
90
- /**
91
- * The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
92
- */
93
- "buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
94
- /**
95
- * Where to open the link for the button rendered when containerHref is not present for each result.
96
- */
97
- "buttonTarget": '_blank' | '_self' | '_top' | '_parent';
98
- /**
99
- * The relationship between the current document and the link for the containing element for each result.
100
- */
101
- "containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
102
- /**
103
- * Where to open the link for the containing element for each result.
104
- */
105
- "containerTarget": '_blank' | '_self' | '_top' | '_parent';
106
- /**
107
- * A custom styles object.
108
- */
109
- "customStylesForResults"?: | string
110
- | Record<string, Record<string, string>>;
111
- /**
112
- * The placement of the image for each result.
113
- */
114
- "resultImagePlacement": 'left' | 'right';
115
- /**
116
- * Formats the content rendered for each result.
117
- */
118
- "searchResultMappings"?: SearchResultMappings;
119
- }
120
- /**
121
- * This web component represents a button to be consumed within the `search-input-form` component.
22
+ * This web component represents a button.
122
23
  * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
123
- * It is consumed within the `searchcraft-input-form` component.
124
24
  */
125
25
  interface SearchcraftButton {
126
26
  /**
@@ -154,23 +54,18 @@ export namespace Components {
154
54
  }
155
55
  /**
156
56
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
157
- * ## Usage
158
- * ```html
159
- * <!-- index.html -->
160
- * <searchcraft-error-message error-message="No search results found for query" />
57
+ * @js-example ```html
58
+ * <searchcraft-error-message>
59
+ * No search results found for query
60
+ * </searchcraft-error-message>
161
61
  * ```
162
62
  */
163
63
  interface SearchcraftErrorMessage {
164
- /**
165
- * The error message.
166
- */
167
- "errorMessage"?: string;
168
64
  }
169
65
  /**
170
66
  * This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
171
67
  * It is consumed within the `searchcraft-filter-panel`.
172
- * ## Usage
173
- * ```html
68
+ * @js-example ```html
174
69
  * <!-- index.html -->
175
70
  * <searchcraft-facet-list field-name="title" />
176
71
  * ```
@@ -190,11 +85,29 @@ export namespace Components {
190
85
  }
191
86
  /**
192
87
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
193
- * ## Usage
194
- * ```html
88
+ * @import ```jsx
89
+ * // react
90
+ * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
91
+ * // vue
92
+ * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
93
+ * ```
94
+ * @js-example ```html
195
95
  * <!-- index.html -->
196
96
  * <searchcraft-filter-panel />
197
97
  * ```
98
+ * ```js
99
+ * // index.js
100
+ * const filterPanel = document.querySelector('searchcraft-filter-panel');
101
+ * if (filterPanel) {
102
+ * filterPanel.items = [];
103
+ * }
104
+ * ```
105
+ * @react-example ```jsx
106
+ * <SearchcraftFilterPanel items={[]} />
107
+ * ```
108
+ * @vue-example ```jsx
109
+ * <SearchcraftFilterPanel :items="[]" />
110
+ * ```
198
111
  */
199
112
  interface SearchcraftFilterPanel {
200
113
  /**
@@ -205,21 +118,27 @@ export namespace Components {
205
118
  /**
206
119
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
207
120
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
208
- * ## Usage
209
- * ```html
210
- * <!-- index.html -->
211
- * <searchcraft-input-form placeholder-value="Search here" />
121
+ * @import ```jsx
122
+ * // react
123
+ * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
124
+ * // vue
125
+ * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
212
126
  * ```
213
- * ```js
214
- * // index.js
215
- * const searchInputForm = document.querySelector('searchcraft-input-form');
127
+ * @js-example ```html
128
+ * <searchcraft-input-form auto-search />
129
+ * ```
130
+ * @react-example ```jsx
131
+ * <SearchcraftInputForm autoSearch />
132
+ * ```
133
+ * @vue-example ```jsx
134
+ * <SearchcraftInputForm autoSearch />
216
135
  * ```
217
136
  */
218
137
  interface SearchcraftInputForm {
219
138
  /**
220
139
  * Whether or not to automatically submit the search term when the input changes.
221
140
  */
222
- "autoSearch": boolean;
141
+ "autoSearch"?: boolean;
223
142
  /**
224
143
  * The label for the submit button.
225
144
  */
@@ -227,12 +146,8 @@ export namespace Components {
227
146
  /**
228
147
  * Where to place the search button.
229
148
  */
230
- "buttonPlacement": 'left' | 'right' | 'none';
149
+ "buttonPlacement"?: 'left' | 'right' | 'none';
231
150
  "core"?: SearchcraftCore;
232
- /**
233
- * A custom styles object to be applied to the input element.
234
- */
235
- "customStyles": string | Record<string, string>;
236
151
  /**
237
152
  * The label rendered above the input.
238
153
  */
@@ -240,13 +155,11 @@ export namespace Components {
240
155
  /**
241
156
  * The input element's placeholder value.
242
157
  */
243
- "placeholderValue": string;
158
+ "placeholderValue"?: string;
244
159
  }
245
160
  /**
246
161
  * This web component serves as the input label for the searchcraft-input-form component.
247
- * ## Usage
248
- * ```html
249
- * <!-- index.html -->
162
+ * @js-example ```html
250
163
  * <searchcraft-input-label label="Search" />
251
164
  * ```
252
165
  */
@@ -258,63 +171,92 @@ export namespace Components {
258
171
  "label": string;
259
172
  }
260
173
  /**
261
- * This web component is designed to facilitate pagination of search results.
262
- * Once a query is submitted, calculates the number for pages.
263
- * ## Usage
264
- * ```html
265
- * <!-- index.html -->
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
177
+ * import { SearchcraftPagination } from "@searchcraft/react-sdk";
178
+ * // vue
179
+ * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
180
+ * ```
181
+ * @js-example ```html
266
182
  * <searchcraft-pagination />
267
183
  * ```
184
+ * @react-example ```jsx
185
+ * <SearchcraftPagination />
186
+ * ```
187
+ * @vue-example ```jsx
188
+ * <SearchcraftPagination />
189
+ * ```
268
190
  */
269
191
  interface SearchcraftPagination {
270
- /**
271
- * The custom styles object.
272
- */
273
- "customStyles"?: string;
274
192
  }
275
193
  /**
276
194
  * Renders a button which, when clicked, turns on popover visibility.
195
+ * @import ```jsx
196
+ * // react
197
+ * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
198
+ * // vue
199
+ * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
200
+ * ```
201
+ * @js-example ```html
202
+ * <searchcraft-popover-button>
203
+ * Open popover
204
+ * </searchcraft-popover-button>
205
+ * ```
206
+ * @react-example ```jsx
207
+ * <SearchcraftPopoverButton>
208
+ * Open popover
209
+ * </SearchcraftPopoverButton>
210
+ * ```
211
+ * @vue-example ```jsx
212
+ * <SearchcraftPopoverButton>
213
+ * Open popover
214
+ * </SearchcraftPopoverButton>
215
+ * ```
277
216
  */
278
217
  interface SearchcraftPopoverButton {
279
218
  }
280
219
  /**
281
220
  * 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.
282
- * ## Usage
283
- * ```html
221
+ * @import ```jsx
222
+ * // react
223
+ * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
224
+ * // vue
225
+ * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
226
+ * ```
227
+ * @js-example ```html
284
228
  * <!-- index.html -->
285
- * <searchcraft-popover-form type="fullscreen" />
229
+ * <searchcraft-popover-form type="inline" />
286
230
  * ```
287
231
  * ```js
288
232
  * // index.js
289
233
  * const popoverForm = document.querySelector('searchcraft-popover-form');
290
- * popoverForm.popoverResultMappings = {
291
- * containerHref: {
292
- * fieldNames: [
293
- * {
294
- * fieldName: 'canonical_link',
295
- * dataType: 'text',
296
- * },
297
- * ],
298
- * };
234
+ * popoverForm.popoverResultMappings = {};
235
+ * ```
236
+ * @react-example ```jsx
237
+ * <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
238
+ * ```
239
+ * @vue-example ```jsx
240
+ * <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
299
241
  * ```
300
242
  */
301
243
  interface SearchcraftPopoverForm {
302
244
  /**
303
245
  * The hotkey that activates the popover.
304
246
  */
305
- "hotkey": string;
247
+ "hotkey"?: string;
306
248
  /**
307
249
  * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
308
250
  */
309
- "hotkeyModifier": 'ctrl' | 'meta' | 'alt' | 'option';
251
+ "hotkeyModifier"?: 'ctrl' | 'meta' | 'alt' | 'option';
310
252
  /**
311
253
  * Formats the content rendered for each result.
312
254
  */
313
255
  "popoverResultMappings"?: PopoverResultMappings;
314
256
  /**
315
- * The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
257
+ * The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
316
258
  */
317
- "type": 'inline' | 'fullscreen' | 'modal';
259
+ "type"?: 'inline' | 'fullscreen' | 'modal';
318
260
  }
319
261
  /**
320
262
  * A single list item rendered in a searchcraft-popover-list-view.
@@ -330,9 +272,7 @@ export namespace Components {
330
272
  /**
331
273
  * This web component is designed to display a list of results within a popover interface.
332
274
  * It is consumed within the `searchcraft-popover-form` component.
333
- * ## Usage
334
- * ```html
335
- * <!-- index.html -->
275
+ * @js-example ```html
336
276
  * <searchcraft-popover-list-view />
337
277
  * ```
338
278
  */
@@ -351,45 +291,128 @@ export namespace Components {
351
291
  }
352
292
  /**
353
293
  * This web component is designed to display the number of results returned from a search query.
354
- * ## Usage
355
- * ```html
294
+ * @import ```jsx
295
+ * // react
296
+ * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
297
+ * // vue
298
+ * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
299
+ * ```
300
+ * @js-example ```html
356
301
  * <!-- index.html -->
357
- * <script>
358
- * const resultsInfo = document.querySelector('searchcraft-results-info');
359
- * resultsInfo.customFormatter = (range, count, responseTime) =>
360
- * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
361
- * </script>
362
302
  * <searchcraft-results-info />
363
303
  * ```
304
+ * ```js
305
+ * // index.js
306
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
307
+ * resultsInfo.template = (info, { html }) => html`
308
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
309
+ * `;
310
+ * ```
311
+ * @react-example ```jsx
312
+ * <SearchcraftResultsInfo
313
+ * template={(info, { html }) => html`
314
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
315
+ * `}
316
+ * />
317
+ * @vue-example ```jsx
318
+ * <SearchcraftResultsInfo
319
+ * :template={(info, { html }) => html`
320
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
321
+ * `}
322
+ * />
364
323
  */
365
324
  interface SearchcraftResultsInfo {
366
325
  /**
367
- * The custom formatter for the resulting string.
368
- * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
326
+ * 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
+ */
329
+ "template"?: ResultsInfoTemplate;
330
+ }
331
+ /**
332
+ * This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
333
+ */
334
+ interface SearchcraftSearchResult {
335
+ /**
336
+ * The position in the document. Used with the "document_clicked" measure event.
369
337
  */
370
- "customFormatter"?: (
371
- range: [string, string],
372
- count: string,
373
- responseTime: string,
374
- ) => void;
338
+ "documentPosition": number;
375
339
  /**
376
- * The custom styles object.
340
+ * The index.
377
341
  */
378
- "customStyles"?: string;
342
+ "index": number;
343
+ "item"?: SearchClientResponseItem;
344
+ /**
345
+ * A callback function responsible for rendering a result.
346
+ */
347
+ "template"?: SearchResultTemplate<SearchResultTemplateData>;
348
+ }
349
+ /**
350
+ * 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
353
+ * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
354
+ * // vue
355
+ * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
356
+ * ```
357
+ * @js-example ```html
358
+ * <!-- index.html -->
359
+ * <searchcraft-search-results
360
+ * ad-interval="4"
361
+ * place-ad-at-start="true"
362
+ * />
363
+ * ```
364
+ * ```js
365
+ * // index.js
366
+ * const searchResults = document.querySelector('searchcraft-search-results');
367
+ * searchResults.template = (item, index, { html }) => html`
368
+ * <h2>${item.title}</h2>
369
+ * `;
370
+ * ```
371
+ * @react-example ```jsx
372
+ * <SearchcraftSearchResults
373
+ * adInterval={4}
374
+ * placeAdAtState={true}
375
+ * template={(item, index, { html }) => html`
376
+ * <h2>${item.title}</h2>
377
+ * `}
378
+ * />
379
+ * ```
380
+ * @vue-example ```jsx
381
+ * <SearchcraftSearchResults
382
+ * adInterval={4}
383
+ * placeAdAtState={true}
384
+ * :template={(item, index, { html }) => html`
385
+ * <h2>${item.title}</h2>
386
+ * `}
387
+ * />
388
+ * ```
389
+ */
390
+ interface SearchcraftSearchResults {
391
+ /**
392
+ * A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
393
+ */
394
+ "template"?: SearchResultTemplate<SearchResultTemplateData>;
379
395
  }
380
396
  /**
381
397
  * This web component is designed to choose the number of search results displayed.
382
- * ## Usage
383
- * ```html
398
+ * @import ```jsx
399
+ * // react
400
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
401
+ * // vue
402
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
403
+ * ```
404
+ * @js-example ```html
384
405
  * <!-- index.html -->
385
406
  * <searchcraft-search-results-per-page increment="20" />
386
407
  * ```
408
+ * @react-example ```jsx
409
+ * <SearchcraftSearchResultsPerPage increment={20} />
410
+ * ```
411
+ * @vue-example ```jsx
412
+ * <SearchcraftSearchResultsPerPage increment="20" />
413
+ * ```
387
414
  */
388
415
  interface SearchcraftSearchResultsPerPage {
389
- /**
390
- * The custom styles object.
391
- */
392
- "customStyles"?: string;
393
416
  /**
394
417
  * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
395
418
  */
@@ -397,8 +420,7 @@ export namespace Components {
397
420
  }
398
421
  /**
399
422
  * This web component is designed to allow users to select between a group of options.
400
- * ## Usage
401
- * ```html
423
+ * @js-example ```html
402
424
  * <!-- index.html -->
403
425
  * <searchcraft-select
404
426
  * inputId="searchcraft-select"
@@ -412,10 +434,6 @@ export namespace Components {
412
434
  * The caption displayed below the select input.
413
435
  */
414
436
  "caption"?: string;
415
- /**
416
- * A custom styles object.
417
- */
418
- "customStyles"?: string;
419
437
  /**
420
438
  * Whether the select input is disabled.
421
439
  */
@@ -442,9 +460,7 @@ export namespace Components {
442
460
  "options": SearchcraftSelectOption[] | string;
443
461
  }
444
462
  /**
445
- * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
446
- * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
447
- * It is consumed by the `searchcraft-filter-panel` component.
463
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
448
464
  */
449
465
  interface SearchcraftSlider {
450
466
  /**
@@ -465,27 +481,27 @@ export namespace Components {
465
481
  "min": number;
466
482
  }
467
483
  /**
468
- * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
469
- * It does not render anything visible, its only function is to manage the css styles on the page.
470
- * ## Usage
471
- * ```html
472
- * <!-- index.html -->
473
- * <searchcraft-theme theme="light" custom-theme="{}" />
484
+ * 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
487
+ * import { SearchcraftTheme } from "@searchcraft/react-sdk";
488
+ * // vue
489
+ * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
490
+ * ```
491
+ * @js-example ```html
492
+ * <searchcraft-theme />
493
+ * ```
494
+ * @react-example ```jsx
495
+ * <SearchcraftTheme />
496
+ * ```
497
+ * @vue-example ```jsx
498
+ * <SearchcraftTheme />
474
499
  * ```
475
500
  */
476
501
  interface SearchcraftTheme {
477
- /**
478
- * The custom theme configuration object.
479
- */
480
- "customTheme"?: string;
481
- /**
482
- * The name of the theme.
483
- */
484
- "theme"?: string;
485
502
  }
486
503
  /**
487
504
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
488
- * It is consumed within the `searchcraft-filter-panel` component.
489
505
  */
490
506
  interface SearchcraftToggleButton {
491
507
  /**
@@ -532,58 +548,12 @@ declare global {
532
548
  prototype: HTMLSearchcraftAdElement;
533
549
  new (): HTMLSearchcraftAdElement;
534
550
  };
535
- /**
536
- * This web component is designed to display detailed information for a single search result.
537
- * Once a query is submitted, the component formats and presents the result.
538
- * It is consumed within the `searchcraft-base-search-results` component.
539
- */
540
- interface HTMLSearchcraftBaseSearchResultElement extends Components.SearchcraftBaseSearchResult, HTMLStencilElement {
541
- }
542
- var HTMLSearchcraftBaseSearchResultElement: {
543
- prototype: HTMLSearchcraftBaseSearchResultElement;
544
- new (): HTMLSearchcraftBaseSearchResultElement;
545
- };
546
- /**
547
- * This web component is responsible for displaying the results of a search query.
548
- * Once a query is submitted, the component formats and presents an ordered list of the results.
549
- * ## Usage
550
- * ```html
551
- * <!-- index.html -->
552
- * <searchcraft-base-search-results
553
- * ad-interval="4"
554
- * place-ad-at-start="false"
555
- * result-image-placement="right"
556
- * />
557
- * ```
558
- * ```js
559
- * // index.js
560
- * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
561
- * baseSearchResults.searchResultMappings = containerHref: {
562
- * fieldNames: [
563
- * {
564
- * fieldName: 'canonical_link',
565
- * dataType: 'text',
566
- * },
567
- * ],
568
- * };
569
- * baseSearchResults.addEventListener('noResults', () => {
570
- * console.log('No search results found');
571
- * });
572
- * ```
573
- */
574
- interface HTMLSearchcraftBaseSearchResultsElement extends Components.SearchcraftBaseSearchResults, HTMLStencilElement {
575
- }
576
- var HTMLSearchcraftBaseSearchResultsElement: {
577
- prototype: HTMLSearchcraftBaseSearchResultsElement;
578
- new (): HTMLSearchcraftBaseSearchResultsElement;
579
- };
580
551
  interface HTMLSearchcraftButtonElementEventMap {
581
552
  "buttonClick": void;
582
553
  }
583
554
  /**
584
- * This web component represents a button to be consumed within the `search-input-form` component.
555
+ * This web component represents a button.
585
556
  * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
586
- * It is consumed within the `searchcraft-input-form` component.
587
557
  */
588
558
  interface HTMLSearchcraftButtonElement extends Components.SearchcraftButton, HTMLStencilElement {
589
559
  addEventListener<K extends keyof HTMLSearchcraftButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftButtonElement, ev: SearchcraftButtonCustomEvent<HTMLSearchcraftButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -601,10 +571,10 @@ declare global {
601
571
  };
602
572
  /**
603
573
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
604
- * ## Usage
605
- * ```html
606
- * <!-- index.html -->
607
- * <searchcraft-error-message error-message="No search results found for query" />
574
+ * @js-example ```html
575
+ * <searchcraft-error-message>
576
+ * No search results found for query
577
+ * </searchcraft-error-message>
608
578
  * ```
609
579
  */
610
580
  interface HTMLSearchcraftErrorMessageElement extends Components.SearchcraftErrorMessage, HTMLStencilElement {
@@ -619,8 +589,7 @@ declare global {
619
589
  /**
620
590
  * This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
621
591
  * It is consumed within the `searchcraft-filter-panel`.
622
- * ## Usage
623
- * ```html
592
+ * @js-example ```html
624
593
  * <!-- index.html -->
625
594
  * <searchcraft-facet-list field-name="title" />
626
595
  * ```
@@ -648,11 +617,29 @@ declare global {
648
617
  };
649
618
  /**
650
619
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
651
- * ## Usage
652
- * ```html
620
+ * @import ```jsx
621
+ * // react
622
+ * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
623
+ * // vue
624
+ * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
625
+ * ```
626
+ * @js-example ```html
653
627
  * <!-- index.html -->
654
628
  * <searchcraft-filter-panel />
655
629
  * ```
630
+ * ```js
631
+ * // index.js
632
+ * const filterPanel = document.querySelector('searchcraft-filter-panel');
633
+ * if (filterPanel) {
634
+ * filterPanel.items = [];
635
+ * }
636
+ * ```
637
+ * @react-example ```jsx
638
+ * <SearchcraftFilterPanel items={[]} />
639
+ * ```
640
+ * @vue-example ```jsx
641
+ * <SearchcraftFilterPanel :items="[]" />
642
+ * ```
656
643
  */
657
644
  interface HTMLSearchcraftFilterPanelElement extends Components.SearchcraftFilterPanel, HTMLStencilElement {
658
645
  }
@@ -668,14 +655,20 @@ declare global {
668
655
  /**
669
656
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
670
657
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
671
- * ## Usage
672
- * ```html
673
- * <!-- index.html -->
674
- * <searchcraft-input-form placeholder-value="Search here" />
658
+ * @import ```jsx
659
+ * // react
660
+ * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
661
+ * // vue
662
+ * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
675
663
  * ```
676
- * ```js
677
- * // index.js
678
- * const searchInputForm = document.querySelector('searchcraft-input-form');
664
+ * @js-example ```html
665
+ * <searchcraft-input-form auto-search />
666
+ * ```
667
+ * @react-example ```jsx
668
+ * <SearchcraftInputForm autoSearch />
669
+ * ```
670
+ * @vue-example ```jsx
671
+ * <SearchcraftInputForm autoSearch />
679
672
  * ```
680
673
  */
681
674
  interface HTMLSearchcraftInputFormElement extends Components.SearchcraftInputForm, HTMLStencilElement {
@@ -694,9 +687,7 @@ declare global {
694
687
  };
695
688
  /**
696
689
  * This web component serves as the input label for the searchcraft-input-form component.
697
- * ## Usage
698
- * ```html
699
- * <!-- index.html -->
690
+ * @js-example ```html
700
691
  * <searchcraft-input-label label="Search" />
701
692
  * ```
702
693
  */
@@ -707,13 +698,22 @@ declare global {
707
698
  new (): HTMLSearchcraftInputLabelElement;
708
699
  };
709
700
  /**
710
- * This web component is designed to facilitate pagination of search results.
711
- * Once a query is submitted, calculates the number for pages.
712
- * ## Usage
713
- * ```html
714
- * <!-- index.html -->
701
+ * 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
704
+ * import { SearchcraftPagination } from "@searchcraft/react-sdk";
705
+ * // vue
706
+ * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
707
+ * ```
708
+ * @js-example ```html
715
709
  * <searchcraft-pagination />
716
710
  * ```
711
+ * @react-example ```jsx
712
+ * <SearchcraftPagination />
713
+ * ```
714
+ * @vue-example ```jsx
715
+ * <SearchcraftPagination />
716
+ * ```
717
717
  */
718
718
  interface HTMLSearchcraftPaginationElement extends Components.SearchcraftPagination, HTMLStencilElement {
719
719
  }
@@ -723,6 +723,27 @@ declare global {
723
723
  };
724
724
  /**
725
725
  * Renders a button which, when clicked, turns on popover visibility.
726
+ * @import ```jsx
727
+ * // react
728
+ * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
729
+ * // vue
730
+ * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
731
+ * ```
732
+ * @js-example ```html
733
+ * <searchcraft-popover-button>
734
+ * Open popover
735
+ * </searchcraft-popover-button>
736
+ * ```
737
+ * @react-example ```jsx
738
+ * <SearchcraftPopoverButton>
739
+ * Open popover
740
+ * </SearchcraftPopoverButton>
741
+ * ```
742
+ * @vue-example ```jsx
743
+ * <SearchcraftPopoverButton>
744
+ * Open popover
745
+ * </SearchcraftPopoverButton>
746
+ * ```
726
747
  */
727
748
  interface HTMLSearchcraftPopoverButtonElement extends Components.SearchcraftPopoverButton, HTMLStencilElement {
728
749
  }
@@ -732,23 +753,26 @@ declare global {
732
753
  };
733
754
  /**
734
755
  * 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.
735
- * ## Usage
736
- * ```html
756
+ * @import ```jsx
757
+ * // react
758
+ * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
759
+ * // vue
760
+ * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
761
+ * ```
762
+ * @js-example ```html
737
763
  * <!-- index.html -->
738
- * <searchcraft-popover-form type="fullscreen" />
764
+ * <searchcraft-popover-form type="inline" />
739
765
  * ```
740
766
  * ```js
741
767
  * // index.js
742
768
  * const popoverForm = document.querySelector('searchcraft-popover-form');
743
- * popoverForm.popoverResultMappings = {
744
- * containerHref: {
745
- * fieldNames: [
746
- * {
747
- * fieldName: 'canonical_link',
748
- * dataType: 'text',
749
- * },
750
- * ],
751
- * };
769
+ * popoverForm.popoverResultMappings = {};
770
+ * ```
771
+ * @react-example ```jsx
772
+ * <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
773
+ * ```
774
+ * @vue-example ```jsx
775
+ * <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
752
776
  * ```
753
777
  */
754
778
  interface HTMLSearchcraftPopoverFormElement extends Components.SearchcraftPopoverForm, HTMLStencilElement {
@@ -769,9 +793,7 @@ declare global {
769
793
  /**
770
794
  * This web component is designed to display a list of results within a popover interface.
771
795
  * It is consumed within the `searchcraft-popover-form` component.
772
- * ## Usage
773
- * ```html
774
- * <!-- index.html -->
796
+ * @js-example ```html
775
797
  * <searchcraft-popover-list-view />
776
798
  * ```
777
799
  */
@@ -783,16 +805,35 @@ declare global {
783
805
  };
784
806
  /**
785
807
  * This web component is designed to display the number of results returned from a search query.
786
- * ## Usage
787
- * ```html
808
+ * @import ```jsx
809
+ * // react
810
+ * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
811
+ * // vue
812
+ * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
813
+ * ```
814
+ * @js-example ```html
788
815
  * <!-- index.html -->
789
- * <script>
790
- * const resultsInfo = document.querySelector('searchcraft-results-info');
791
- * resultsInfo.customFormatter = (range, count, responseTime) =>
792
- * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
793
- * </script>
794
816
  * <searchcraft-results-info />
795
817
  * ```
818
+ * ```js
819
+ * // index.js
820
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
821
+ * resultsInfo.template = (info, { html }) => html`
822
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
823
+ * `;
824
+ * ```
825
+ * @react-example ```jsx
826
+ * <SearchcraftResultsInfo
827
+ * template={(info, { html }) => html`
828
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
829
+ * `}
830
+ * />
831
+ * @vue-example ```jsx
832
+ * <SearchcraftResultsInfo
833
+ * :template={(info, { html }) => html`
834
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
835
+ * `}
836
+ * />
796
837
  */
797
838
  interface HTMLSearchcraftResultsInfoElement extends Components.SearchcraftResultsInfo, HTMLStencilElement {
798
839
  }
@@ -800,13 +841,80 @@ declare global {
800
841
  prototype: HTMLSearchcraftResultsInfoElement;
801
842
  new (): HTMLSearchcraftResultsInfoElement;
802
843
  };
844
+ /**
845
+ * This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
846
+ */
847
+ interface HTMLSearchcraftSearchResultElement extends Components.SearchcraftSearchResult, HTMLStencilElement {
848
+ }
849
+ var HTMLSearchcraftSearchResultElement: {
850
+ prototype: HTMLSearchcraftSearchResultElement;
851
+ new (): HTMLSearchcraftSearchResultElement;
852
+ };
853
+ /**
854
+ * 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
857
+ * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
858
+ * // vue
859
+ * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
860
+ * ```
861
+ * @js-example ```html
862
+ * <!-- index.html -->
863
+ * <searchcraft-search-results
864
+ * ad-interval="4"
865
+ * place-ad-at-start="true"
866
+ * />
867
+ * ```
868
+ * ```js
869
+ * // index.js
870
+ * const searchResults = document.querySelector('searchcraft-search-results');
871
+ * searchResults.template = (item, index, { html }) => html`
872
+ * <h2>${item.title}</h2>
873
+ * `;
874
+ * ```
875
+ * @react-example ```jsx
876
+ * <SearchcraftSearchResults
877
+ * adInterval={4}
878
+ * placeAdAtState={true}
879
+ * template={(item, index, { html }) => html`
880
+ * <h2>${item.title}</h2>
881
+ * `}
882
+ * />
883
+ * ```
884
+ * @vue-example ```jsx
885
+ * <SearchcraftSearchResults
886
+ * adInterval={4}
887
+ * placeAdAtState={true}
888
+ * :template={(item, index, { html }) => html`
889
+ * <h2>${item.title}</h2>
890
+ * `}
891
+ * />
892
+ * ```
893
+ */
894
+ interface HTMLSearchcraftSearchResultsElement extends Components.SearchcraftSearchResults, HTMLStencilElement {
895
+ }
896
+ var HTMLSearchcraftSearchResultsElement: {
897
+ prototype: HTMLSearchcraftSearchResultsElement;
898
+ new (): HTMLSearchcraftSearchResultsElement;
899
+ };
803
900
  /**
804
901
  * This web component is designed to choose the number of search results displayed.
805
- * ## Usage
806
- * ```html
902
+ * @import ```jsx
903
+ * // react
904
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
905
+ * // vue
906
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
907
+ * ```
908
+ * @js-example ```html
807
909
  * <!-- index.html -->
808
910
  * <searchcraft-search-results-per-page increment="20" />
809
911
  * ```
912
+ * @react-example ```jsx
913
+ * <SearchcraftSearchResultsPerPage increment={20} />
914
+ * ```
915
+ * @vue-example ```jsx
916
+ * <SearchcraftSearchResultsPerPage increment="20" />
917
+ * ```
810
918
  */
811
919
  interface HTMLSearchcraftSearchResultsPerPageElement extends Components.SearchcraftSearchResultsPerPage, HTMLStencilElement {
812
920
  }
@@ -819,8 +927,7 @@ declare global {
819
927
  }
820
928
  /**
821
929
  * This web component is designed to allow users to select between a group of options.
822
- * ## Usage
823
- * ```html
930
+ * @js-example ```html
824
931
  * <!-- index.html -->
825
932
  * <searchcraft-select
826
933
  * inputId="searchcraft-select"
@@ -847,9 +954,7 @@ declare global {
847
954
  "rangeChanged": any;
848
955
  }
849
956
  /**
850
- * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
851
- * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
852
- * It is consumed by the `searchcraft-filter-panel` component.
957
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
853
958
  */
854
959
  interface HTMLSearchcraftSliderElement extends Components.SearchcraftSlider, HTMLStencilElement {
855
960
  addEventListener<K extends keyof HTMLSearchcraftSliderElementEventMap>(type: K, listener: (this: HTMLSearchcraftSliderElement, ev: SearchcraftSliderCustomEvent<HTMLSearchcraftSliderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -866,12 +971,21 @@ declare global {
866
971
  new (): HTMLSearchcraftSliderElement;
867
972
  };
868
973
  /**
869
- * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
870
- * It does not render anything visible, its only function is to manage the css styles on the page.
871
- * ## Usage
872
- * ```html
873
- * <!-- index.html -->
874
- * <searchcraft-theme theme="light" custom-theme="{}" />
974
+ * 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
977
+ * import { SearchcraftTheme } from "@searchcraft/react-sdk";
978
+ * // vue
979
+ * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
980
+ * ```
981
+ * @js-example ```html
982
+ * <searchcraft-theme />
983
+ * ```
984
+ * @react-example ```jsx
985
+ * <SearchcraftTheme />
986
+ * ```
987
+ * @vue-example ```jsx
988
+ * <SearchcraftTheme />
875
989
  * ```
876
990
  */
877
991
  interface HTMLSearchcraftThemeElement extends Components.SearchcraftTheme, HTMLStencilElement {
@@ -885,7 +999,6 @@ declare global {
885
999
  }
886
1000
  /**
887
1001
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
888
- * It is consumed within the `searchcraft-filter-panel` component.
889
1002
  */
890
1003
  interface HTMLSearchcraftToggleButtonElement extends Components.SearchcraftToggleButton, HTMLStencilElement {
891
1004
  addEventListener<K extends keyof HTMLSearchcraftToggleButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftToggleButtonElement, ev: SearchcraftToggleButtonCustomEvent<HTMLSearchcraftToggleButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -903,8 +1016,6 @@ declare global {
903
1016
  };
904
1017
  interface HTMLElementTagNameMap {
905
1018
  "searchcraft-ad": HTMLSearchcraftAdElement;
906
- "searchcraft-base-search-result": HTMLSearchcraftBaseSearchResultElement;
907
- "searchcraft-base-search-results": HTMLSearchcraftBaseSearchResultsElement;
908
1019
  "searchcraft-button": HTMLSearchcraftButtonElement;
909
1020
  "searchcraft-error-message": HTMLSearchcraftErrorMessageElement;
910
1021
  "searchcraft-facet-list": HTMLSearchcraftFacetListElement;
@@ -917,6 +1028,8 @@ declare global {
917
1028
  "searchcraft-popover-list-item": HTMLSearchcraftPopoverListItemElement;
918
1029
  "searchcraft-popover-list-view": HTMLSearchcraftPopoverListViewElement;
919
1030
  "searchcraft-results-info": HTMLSearchcraftResultsInfoElement;
1031
+ "searchcraft-search-result": HTMLSearchcraftSearchResultElement;
1032
+ "searchcraft-search-results": HTMLSearchcraftSearchResultsElement;
920
1033
  "searchcraft-search-results-per-page": HTMLSearchcraftSearchResultsPerPageElement;
921
1034
  "searchcraft-select": HTMLSearchcraftSelectElement;
922
1035
  "searchcraft-slider": HTMLSearchcraftSliderElement;
@@ -930,112 +1043,12 @@ declare namespace LocalJSX {
930
1043
  */
931
1044
  interface SearchcraftAd {
932
1045
  "adClientResponseItem"?: AdClientResponseItem;
1046
+ "adContainerId"?: string;
933
1047
  "adSource"?: SearchcraftAdSource;
934
1048
  }
935
1049
  /**
936
- * This web component is designed to display detailed information for a single search result.
937
- * Once a query is submitted, the component formats and presents the result.
938
- * It is consumed within the `searchcraft-base-search-results` component.
939
- */
940
- interface SearchcraftBaseSearchResult {
941
- /**
942
- * The relationship between the current document and the link for the button rendered when containerHref is not present.
943
- */
944
- "buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
945
- /**
946
- * Where to open the link for the button rendered when containerHref is not present.
947
- */
948
- "buttonTarget"?: '_blank' | '_self' | '_top' | '_parent';
949
- /**
950
- * The relationship between the current document and the link for the containing element.
951
- */
952
- "containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
953
- /**
954
- * Where to open the link for the containing element.
955
- */
956
- "containerTarget"?: '_blank' | '_self' | '_top' | '_parent';
957
- /**
958
- * A custom styles object.
959
- */
960
- "customStyles"?: string;
961
- /**
962
- * The position in the document. Used with the "document_clicked" measure event.
963
- */
964
- "documentPosition"?: number;
965
- /**
966
- * The placement of the image.
967
- */
968
- "imagePlacement"?: 'left' | 'right';
969
- "item"?: SearchClientResponseItem;
970
- "searchResultMappings"?: SearchResultMappings;
971
- }
972
- /**
973
- * This web component is responsible for displaying the results of a search query.
974
- * Once a query is submitted, the component formats and presents an ordered list of the results.
975
- * ## Usage
976
- * ```html
977
- * <!-- index.html -->
978
- * <searchcraft-base-search-results
979
- * ad-interval="4"
980
- * place-ad-at-start="false"
981
- * result-image-placement="right"
982
- * />
983
- * ```
984
- * ```js
985
- * // index.js
986
- * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
987
- * baseSearchResults.searchResultMappings = containerHref: {
988
- * fieldNames: [
989
- * {
990
- * fieldName: 'canonical_link',
991
- * dataType: 'text',
992
- * },
993
- * ],
994
- * };
995
- * baseSearchResults.addEventListener('noResults', () => {
996
- * console.log('No search results found');
997
- * });
998
- * ```
999
- */
1000
- interface SearchcraftBaseSearchResults {
1001
- /**
1002
- * The label for the button rendered when containerHref is not present for each result.
1003
- */
1004
- "buttonLabel"?: string;
1005
- /**
1006
- * The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
1007
- */
1008
- "buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
1009
- /**
1010
- * Where to open the link for the button rendered when containerHref is not present for each result.
1011
- */
1012
- "buttonTarget"?: '_blank' | '_self' | '_top' | '_parent';
1013
- /**
1014
- * The relationship between the current document and the link for the containing element for each result.
1015
- */
1016
- "containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
1017
- /**
1018
- * Where to open the link for the containing element for each result.
1019
- */
1020
- "containerTarget"?: '_blank' | '_self' | '_top' | '_parent';
1021
- /**
1022
- * A custom styles object.
1023
- */
1024
- "customStylesForResults"?: | string
1025
- | Record<string, Record<string, string>>;
1026
- /**
1027
- * The placement of the image for each result.
1028
- */
1029
- "resultImagePlacement"?: 'left' | 'right';
1030
- /**
1031
- * Formats the content rendered for each result.
1032
- */
1033
- "searchResultMappings"?: SearchResultMappings;
1034
- }
1035
- /**
1036
- * This web component represents a button to be consumed within the `search-input-form` component.
1050
+ * This web component represents a button.
1037
1051
  * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
1038
- * It is consumed within the `searchcraft-input-form` component.
1039
1052
  */
1040
1053
  interface SearchcraftButton {
1041
1054
  /**
@@ -1073,23 +1086,18 @@ declare namespace LocalJSX {
1073
1086
  }
1074
1087
  /**
1075
1088
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
1076
- * ## Usage
1077
- * ```html
1078
- * <!-- index.html -->
1079
- * <searchcraft-error-message error-message="No search results found for query" />
1089
+ * @js-example ```html
1090
+ * <searchcraft-error-message>
1091
+ * No search results found for query
1092
+ * </searchcraft-error-message>
1080
1093
  * ```
1081
1094
  */
1082
1095
  interface SearchcraftErrorMessage {
1083
- /**
1084
- * The error message.
1085
- */
1086
- "errorMessage"?: string;
1087
1096
  }
1088
1097
  /**
1089
1098
  * This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
1090
1099
  * It is consumed within the `searchcraft-filter-panel`.
1091
- * ## Usage
1092
- * ```html
1100
+ * @js-example ```html
1093
1101
  * <!-- index.html -->
1094
1102
  * <searchcraft-facet-list field-name="title" />
1095
1103
  * ```
@@ -1113,11 +1121,29 @@ declare namespace LocalJSX {
1113
1121
  }
1114
1122
  /**
1115
1123
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
1116
- * ## Usage
1117
- * ```html
1124
+ * @import ```jsx
1125
+ * // react
1126
+ * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
1127
+ * // vue
1128
+ * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
1129
+ * ```
1130
+ * @js-example ```html
1118
1131
  * <!-- index.html -->
1119
1132
  * <searchcraft-filter-panel />
1120
1133
  * ```
1134
+ * ```js
1135
+ * // index.js
1136
+ * const filterPanel = document.querySelector('searchcraft-filter-panel');
1137
+ * if (filterPanel) {
1138
+ * filterPanel.items = [];
1139
+ * }
1140
+ * ```
1141
+ * @react-example ```jsx
1142
+ * <SearchcraftFilterPanel items={[]} />
1143
+ * ```
1144
+ * @vue-example ```jsx
1145
+ * <SearchcraftFilterPanel :items="[]" />
1146
+ * ```
1121
1147
  */
1122
1148
  interface SearchcraftFilterPanel {
1123
1149
  /**
@@ -1128,14 +1154,20 @@ declare namespace LocalJSX {
1128
1154
  /**
1129
1155
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
1130
1156
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
1131
- * ## Usage
1132
- * ```html
1133
- * <!-- index.html -->
1134
- * <searchcraft-input-form placeholder-value="Search here" />
1157
+ * @import ```jsx
1158
+ * // react
1159
+ * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
1160
+ * // vue
1161
+ * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
1135
1162
  * ```
1136
- * ```js
1137
- * // index.js
1138
- * const searchInputForm = document.querySelector('searchcraft-input-form');
1163
+ * @js-example ```html
1164
+ * <searchcraft-input-form auto-search />
1165
+ * ```
1166
+ * @react-example ```jsx
1167
+ * <SearchcraftInputForm autoSearch />
1168
+ * ```
1169
+ * @vue-example ```jsx
1170
+ * <SearchcraftInputForm autoSearch />
1139
1171
  * ```
1140
1172
  */
1141
1173
  interface SearchcraftInputForm {
@@ -1152,10 +1184,6 @@ declare namespace LocalJSX {
1152
1184
  */
1153
1185
  "buttonPlacement"?: 'left' | 'right' | 'none';
1154
1186
  "core"?: SearchcraftCore;
1155
- /**
1156
- * A custom styles object to be applied to the input element.
1157
- */
1158
- "customStyles"?: string | Record<string, string>;
1159
1187
  /**
1160
1188
  * The label rendered above the input.
1161
1189
  */
@@ -1179,9 +1207,7 @@ declare namespace LocalJSX {
1179
1207
  }
1180
1208
  /**
1181
1209
  * This web component serves as the input label for the searchcraft-input-form component.
1182
- * ## Usage
1183
- * ```html
1184
- * <!-- index.html -->
1210
+ * @js-example ```html
1185
1211
  * <searchcraft-input-label label="Search" />
1186
1212
  * ```
1187
1213
  */
@@ -1193,44 +1219,73 @@ declare namespace LocalJSX {
1193
1219
  "label"?: string;
1194
1220
  }
1195
1221
  /**
1196
- * This web component is designed to facilitate pagination of search results.
1197
- * Once a query is submitted, calculates the number for pages.
1198
- * ## Usage
1199
- * ```html
1200
- * <!-- index.html -->
1222
+ * 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
1225
+ * import { SearchcraftPagination } from "@searchcraft/react-sdk";
1226
+ * // vue
1227
+ * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
1228
+ * ```
1229
+ * @js-example ```html
1201
1230
  * <searchcraft-pagination />
1202
1231
  * ```
1232
+ * @react-example ```jsx
1233
+ * <SearchcraftPagination />
1234
+ * ```
1235
+ * @vue-example ```jsx
1236
+ * <SearchcraftPagination />
1237
+ * ```
1203
1238
  */
1204
1239
  interface SearchcraftPagination {
1205
- /**
1206
- * The custom styles object.
1207
- */
1208
- "customStyles"?: string;
1209
1240
  }
1210
1241
  /**
1211
1242
  * Renders a button which, when clicked, turns on popover visibility.
1243
+ * @import ```jsx
1244
+ * // react
1245
+ * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
1246
+ * // vue
1247
+ * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
1248
+ * ```
1249
+ * @js-example ```html
1250
+ * <searchcraft-popover-button>
1251
+ * Open popover
1252
+ * </searchcraft-popover-button>
1253
+ * ```
1254
+ * @react-example ```jsx
1255
+ * <SearchcraftPopoverButton>
1256
+ * Open popover
1257
+ * </SearchcraftPopoverButton>
1258
+ * ```
1259
+ * @vue-example ```jsx
1260
+ * <SearchcraftPopoverButton>
1261
+ * Open popover
1262
+ * </SearchcraftPopoverButton>
1263
+ * ```
1212
1264
  */
1213
1265
  interface SearchcraftPopoverButton {
1214
1266
  }
1215
1267
  /**
1216
1268
  * 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.
1217
- * ## Usage
1218
- * ```html
1269
+ * @import ```jsx
1270
+ * // react
1271
+ * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
1272
+ * // vue
1273
+ * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
1274
+ * ```
1275
+ * @js-example ```html
1219
1276
  * <!-- index.html -->
1220
- * <searchcraft-popover-form type="fullscreen" />
1277
+ * <searchcraft-popover-form type="inline" />
1221
1278
  * ```
1222
1279
  * ```js
1223
1280
  * // index.js
1224
1281
  * const popoverForm = document.querySelector('searchcraft-popover-form');
1225
- * popoverForm.popoverResultMappings = {
1226
- * containerHref: {
1227
- * fieldNames: [
1228
- * {
1229
- * fieldName: 'canonical_link',
1230
- * dataType: 'text',
1231
- * },
1232
- * ],
1233
- * };
1282
+ * popoverForm.popoverResultMappings = {};
1283
+ * ```
1284
+ * @react-example ```jsx
1285
+ * <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
1286
+ * ```
1287
+ * @vue-example ```jsx
1288
+ * <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
1234
1289
  * ```
1235
1290
  */
1236
1291
  interface SearchcraftPopoverForm {
@@ -1247,7 +1302,7 @@ declare namespace LocalJSX {
1247
1302
  */
1248
1303
  "popoverResultMappings"?: PopoverResultMappings;
1249
1304
  /**
1250
- * The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
1305
+ * The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
1251
1306
  */
1252
1307
  "type"?: 'inline' | 'fullscreen' | 'modal';
1253
1308
  }
@@ -1265,9 +1320,7 @@ declare namespace LocalJSX {
1265
1320
  /**
1266
1321
  * This web component is designed to display a list of results within a popover interface.
1267
1322
  * It is consumed within the `searchcraft-popover-form` component.
1268
- * ## Usage
1269
- * ```html
1270
- * <!-- index.html -->
1323
+ * @js-example ```html
1271
1324
  * <searchcraft-popover-list-view />
1272
1325
  * ```
1273
1326
  */
@@ -1286,45 +1339,128 @@ declare namespace LocalJSX {
1286
1339
  }
1287
1340
  /**
1288
1341
  * This web component is designed to display the number of results returned from a search query.
1289
- * ## Usage
1290
- * ```html
1342
+ * @import ```jsx
1343
+ * // react
1344
+ * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
1345
+ * // vue
1346
+ * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
1347
+ * ```
1348
+ * @js-example ```html
1291
1349
  * <!-- index.html -->
1292
- * <script>
1293
- * const resultsInfo = document.querySelector('searchcraft-results-info');
1294
- * resultsInfo.customFormatter = (range, count, responseTime) =>
1295
- * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
1296
- * </script>
1297
1350
  * <searchcraft-results-info />
1298
1351
  * ```
1352
+ * ```js
1353
+ * // index.js
1354
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
1355
+ * resultsInfo.template = (info, { html }) => html`
1356
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1357
+ * `;
1358
+ * ```
1359
+ * @react-example ```jsx
1360
+ * <SearchcraftResultsInfo
1361
+ * template={(info, { html }) => html`
1362
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1363
+ * `}
1364
+ * />
1365
+ * @vue-example ```jsx
1366
+ * <SearchcraftResultsInfo
1367
+ * :template={(info, { html }) => html`
1368
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1369
+ * `}
1370
+ * />
1299
1371
  */
1300
1372
  interface SearchcraftResultsInfo {
1301
1373
  /**
1302
- * The custom formatter for the resulting string.
1303
- * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
1374
+ * 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
+ */
1377
+ "template"?: ResultsInfoTemplate;
1378
+ }
1379
+ /**
1380
+ * This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
1381
+ */
1382
+ interface SearchcraftSearchResult {
1383
+ /**
1384
+ * The position in the document. Used with the "document_clicked" measure event.
1304
1385
  */
1305
- "customFormatter"?: (
1306
- range: [string, string],
1307
- count: string,
1308
- responseTime: string,
1309
- ) => void;
1386
+ "documentPosition"?: number;
1310
1387
  /**
1311
- * The custom styles object.
1388
+ * The index.
1312
1389
  */
1313
- "customStyles"?: string;
1390
+ "index": number;
1391
+ "item"?: SearchClientResponseItem;
1392
+ /**
1393
+ * A callback function responsible for rendering a result.
1394
+ */
1395
+ "template"?: SearchResultTemplate<SearchResultTemplateData>;
1396
+ }
1397
+ /**
1398
+ * 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
1401
+ * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
1402
+ * // vue
1403
+ * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
1404
+ * ```
1405
+ * @js-example ```html
1406
+ * <!-- index.html -->
1407
+ * <searchcraft-search-results
1408
+ * ad-interval="4"
1409
+ * place-ad-at-start="true"
1410
+ * />
1411
+ * ```
1412
+ * ```js
1413
+ * // index.js
1414
+ * const searchResults = document.querySelector('searchcraft-search-results');
1415
+ * searchResults.template = (item, index, { html }) => html`
1416
+ * <h2>${item.title}</h2>
1417
+ * `;
1418
+ * ```
1419
+ * @react-example ```jsx
1420
+ * <SearchcraftSearchResults
1421
+ * adInterval={4}
1422
+ * placeAdAtState={true}
1423
+ * template={(item, index, { html }) => html`
1424
+ * <h2>${item.title}</h2>
1425
+ * `}
1426
+ * />
1427
+ * ```
1428
+ * @vue-example ```jsx
1429
+ * <SearchcraftSearchResults
1430
+ * adInterval={4}
1431
+ * placeAdAtState={true}
1432
+ * :template={(item, index, { html }) => html`
1433
+ * <h2>${item.title}</h2>
1434
+ * `}
1435
+ * />
1436
+ * ```
1437
+ */
1438
+ interface SearchcraftSearchResults {
1439
+ /**
1440
+ * A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
1441
+ */
1442
+ "template"?: SearchResultTemplate<SearchResultTemplateData>;
1314
1443
  }
1315
1444
  /**
1316
1445
  * This web component is designed to choose the number of search results displayed.
1317
- * ## Usage
1318
- * ```html
1446
+ * @import ```jsx
1447
+ * // react
1448
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
1449
+ * // vue
1450
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
1451
+ * ```
1452
+ * @js-example ```html
1319
1453
  * <!-- index.html -->
1320
1454
  * <searchcraft-search-results-per-page increment="20" />
1321
1455
  * ```
1456
+ * @react-example ```jsx
1457
+ * <SearchcraftSearchResultsPerPage increment={20} />
1458
+ * ```
1459
+ * @vue-example ```jsx
1460
+ * <SearchcraftSearchResultsPerPage increment="20" />
1461
+ * ```
1322
1462
  */
1323
1463
  interface SearchcraftSearchResultsPerPage {
1324
- /**
1325
- * The custom styles object.
1326
- */
1327
- "customStyles"?: string;
1328
1464
  /**
1329
1465
  * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
1330
1466
  */
@@ -1332,8 +1468,7 @@ declare namespace LocalJSX {
1332
1468
  }
1333
1469
  /**
1334
1470
  * This web component is designed to allow users to select between a group of options.
1335
- * ## Usage
1336
- * ```html
1471
+ * @js-example ```html
1337
1472
  * <!-- index.html -->
1338
1473
  * <searchcraft-select
1339
1474
  * inputId="searchcraft-select"
@@ -1347,10 +1482,6 @@ declare namespace LocalJSX {
1347
1482
  * The caption displayed below the select input.
1348
1483
  */
1349
1484
  "caption"?: string;
1350
- /**
1351
- * A custom styles object.
1352
- */
1353
- "customStyles"?: string;
1354
1485
  /**
1355
1486
  * Whether the select input is disabled.
1356
1487
  */
@@ -1381,9 +1512,7 @@ declare namespace LocalJSX {
1381
1512
  "options"?: SearchcraftSelectOption[] | string;
1382
1513
  }
1383
1514
  /**
1384
- * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
1385
- * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1386
- * It is consumed by the `searchcraft-filter-panel` component.
1515
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1387
1516
  */
1388
1517
  interface SearchcraftSlider {
1389
1518
  /**
@@ -1408,27 +1537,27 @@ declare namespace LocalJSX {
1408
1537
  "onRangeChanged"?: (event: SearchcraftSliderCustomEvent<any>) => void;
1409
1538
  }
1410
1539
  /**
1411
- * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
1412
- * It does not render anything visible, its only function is to manage the css styles on the page.
1413
- * ## Usage
1414
- * ```html
1415
- * <!-- index.html -->
1416
- * <searchcraft-theme theme="light" custom-theme="{}" />
1540
+ * 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
1543
+ * import { SearchcraftTheme } from "@searchcraft/react-sdk";
1544
+ * // vue
1545
+ * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
1546
+ * ```
1547
+ * @js-example ```html
1548
+ * <searchcraft-theme />
1549
+ * ```
1550
+ * @react-example ```jsx
1551
+ * <SearchcraftTheme />
1552
+ * ```
1553
+ * @vue-example ```jsx
1554
+ * <SearchcraftTheme />
1417
1555
  * ```
1418
1556
  */
1419
1557
  interface SearchcraftTheme {
1420
- /**
1421
- * The custom theme configuration object.
1422
- */
1423
- "customTheme"?: string;
1424
- /**
1425
- * The name of the theme.
1426
- */
1427
- "theme"?: string;
1428
1558
  }
1429
1559
  /**
1430
1560
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
1431
- * It is consumed within the `searchcraft-filter-panel` component.
1432
1561
  */
1433
1562
  interface SearchcraftToggleButton {
1434
1563
  /**
@@ -1446,8 +1575,6 @@ declare namespace LocalJSX {
1446
1575
  }
1447
1576
  interface IntrinsicElements {
1448
1577
  "searchcraft-ad": SearchcraftAd;
1449
- "searchcraft-base-search-result": SearchcraftBaseSearchResult;
1450
- "searchcraft-base-search-results": SearchcraftBaseSearchResults;
1451
1578
  "searchcraft-button": SearchcraftButton;
1452
1579
  "searchcraft-error-message": SearchcraftErrorMessage;
1453
1580
  "searchcraft-facet-list": SearchcraftFacetList;
@@ -1460,6 +1587,8 @@ declare namespace LocalJSX {
1460
1587
  "searchcraft-popover-list-item": SearchcraftPopoverListItem;
1461
1588
  "searchcraft-popover-list-view": SearchcraftPopoverListView;
1462
1589
  "searchcraft-results-info": SearchcraftResultsInfo;
1590
+ "searchcraft-search-result": SearchcraftSearchResult;
1591
+ "searchcraft-search-results": SearchcraftSearchResults;
1463
1592
  "searchcraft-search-results-per-page": SearchcraftSearchResultsPerPage;
1464
1593
  "searchcraft-select": SearchcraftSelect;
1465
1594
  "searchcraft-slider": SearchcraftSlider;
@@ -1476,60 +1605,23 @@ declare module "@stencil/core" {
1476
1605
  */
1477
1606
  "searchcraft-ad": LocalJSX.SearchcraftAd & JSXBase.HTMLAttributes<HTMLSearchcraftAdElement>;
1478
1607
  /**
1479
- * This web component is designed to display detailed information for a single search result.
1480
- * Once a query is submitted, the component formats and presents the result.
1481
- * It is consumed within the `searchcraft-base-search-results` component.
1482
- */
1483
- "searchcraft-base-search-result": LocalJSX.SearchcraftBaseSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultElement>;
1484
- /**
1485
- * This web component is responsible for displaying the results of a search query.
1486
- * Once a query is submitted, the component formats and presents an ordered list of the results.
1487
- * ## Usage
1488
- * ```html
1489
- * <!-- index.html -->
1490
- * <searchcraft-base-search-results
1491
- * ad-interval="4"
1492
- * place-ad-at-start="false"
1493
- * result-image-placement="right"
1494
- * />
1495
- * ```
1496
- * ```js
1497
- * // index.js
1498
- * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
1499
- * baseSearchResults.searchResultMappings = containerHref: {
1500
- * fieldNames: [
1501
- * {
1502
- * fieldName: 'canonical_link',
1503
- * dataType: 'text',
1504
- * },
1505
- * ],
1506
- * };
1507
- * baseSearchResults.addEventListener('noResults', () => {
1508
- * console.log('No search results found');
1509
- * });
1510
- * ```
1511
- */
1512
- "searchcraft-base-search-results": LocalJSX.SearchcraftBaseSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultsElement>;
1513
- /**
1514
- * This web component represents a button to be consumed within the `search-input-form` component.
1608
+ * This web component represents a button.
1515
1609
  * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
1516
- * It is consumed within the `searchcraft-input-form` component.
1517
1610
  */
1518
1611
  "searchcraft-button": LocalJSX.SearchcraftButton & JSXBase.HTMLAttributes<HTMLSearchcraftButtonElement>;
1519
1612
  /**
1520
1613
  * This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
1521
- * ## Usage
1522
- * ```html
1523
- * <!-- index.html -->
1524
- * <searchcraft-error-message error-message="No search results found for query" />
1614
+ * @js-example ```html
1615
+ * <searchcraft-error-message>
1616
+ * No search results found for query
1617
+ * </searchcraft-error-message>
1525
1618
  * ```
1526
1619
  */
1527
1620
  "searchcraft-error-message": LocalJSX.SearchcraftErrorMessage & JSXBase.HTMLAttributes<HTMLSearchcraftErrorMessageElement>;
1528
1621
  /**
1529
1622
  * This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
1530
1623
  * It is consumed within the `searchcraft-filter-panel`.
1531
- * ## Usage
1532
- * ```html
1624
+ * @js-example ```html
1533
1625
  * <!-- index.html -->
1534
1626
  * <searchcraft-facet-list field-name="title" />
1535
1627
  * ```
@@ -1544,69 +1636,124 @@ declare module "@stencil/core" {
1544
1636
  "searchcraft-facet-list": LocalJSX.SearchcraftFacetList & JSXBase.HTMLAttributes<HTMLSearchcraftFacetListElement>;
1545
1637
  /**
1546
1638
  * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
1547
- * ## Usage
1548
- * ```html
1639
+ * @import ```jsx
1640
+ * // react
1641
+ * import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
1642
+ * // vue
1643
+ * import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
1644
+ * ```
1645
+ * @js-example ```html
1549
1646
  * <!-- index.html -->
1550
1647
  * <searchcraft-filter-panel />
1551
1648
  * ```
1649
+ * ```js
1650
+ * // index.js
1651
+ * const filterPanel = document.querySelector('searchcraft-filter-panel');
1652
+ * if (filterPanel) {
1653
+ * filterPanel.items = [];
1654
+ * }
1655
+ * ```
1656
+ * @react-example ```jsx
1657
+ * <SearchcraftFilterPanel items={[]} />
1658
+ * ```
1659
+ * @vue-example ```jsx
1660
+ * <SearchcraftFilterPanel :items="[]" />
1661
+ * ```
1552
1662
  */
1553
1663
  "searchcraft-filter-panel": LocalJSX.SearchcraftFilterPanel & JSXBase.HTMLAttributes<HTMLSearchcraftFilterPanelElement>;
1554
1664
  /**
1555
1665
  * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
1556
1666
  * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
1557
- * ## Usage
1558
- * ```html
1559
- * <!-- index.html -->
1560
- * <searchcraft-input-form placeholder-value="Search here" />
1667
+ * @import ```jsx
1668
+ * // react
1669
+ * import { SearchcraftInputForm } from "@searchcraft/react-sdk";
1670
+ * // vue
1671
+ * import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
1561
1672
  * ```
1562
- * ```js
1563
- * // index.js
1564
- * const searchInputForm = document.querySelector('searchcraft-input-form');
1673
+ * @js-example ```html
1674
+ * <searchcraft-input-form auto-search />
1675
+ * ```
1676
+ * @react-example ```jsx
1677
+ * <SearchcraftInputForm autoSearch />
1678
+ * ```
1679
+ * @vue-example ```jsx
1680
+ * <SearchcraftInputForm autoSearch />
1565
1681
  * ```
1566
1682
  */
1567
1683
  "searchcraft-input-form": LocalJSX.SearchcraftInputForm & JSXBase.HTMLAttributes<HTMLSearchcraftInputFormElement>;
1568
1684
  /**
1569
1685
  * This web component serves as the input label for the searchcraft-input-form component.
1570
- * ## Usage
1571
- * ```html
1572
- * <!-- index.html -->
1686
+ * @js-example ```html
1573
1687
  * <searchcraft-input-label label="Search" />
1574
1688
  * ```
1575
1689
  */
1576
1690
  "searchcraft-input-label": LocalJSX.SearchcraftInputLabel & JSXBase.HTMLAttributes<HTMLSearchcraftInputLabelElement>;
1577
1691
  /**
1578
- * This web component is designed to facilitate pagination of search results.
1579
- * Once a query is submitted, calculates the number for pages.
1580
- * ## Usage
1581
- * ```html
1582
- * <!-- index.html -->
1692
+ * 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
1695
+ * import { SearchcraftPagination } from "@searchcraft/react-sdk";
1696
+ * // vue
1697
+ * import { SearchcraftPagination } from "@searchcraft/vue-sdk";
1698
+ * ```
1699
+ * @js-example ```html
1583
1700
  * <searchcraft-pagination />
1584
1701
  * ```
1702
+ * @react-example ```jsx
1703
+ * <SearchcraftPagination />
1704
+ * ```
1705
+ * @vue-example ```jsx
1706
+ * <SearchcraftPagination />
1707
+ * ```
1585
1708
  */
1586
1709
  "searchcraft-pagination": LocalJSX.SearchcraftPagination & JSXBase.HTMLAttributes<HTMLSearchcraftPaginationElement>;
1587
1710
  /**
1588
1711
  * Renders a button which, when clicked, turns on popover visibility.
1712
+ * @import ```jsx
1713
+ * // react
1714
+ * import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
1715
+ * // vue
1716
+ * import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
1717
+ * ```
1718
+ * @js-example ```html
1719
+ * <searchcraft-popover-button>
1720
+ * Open popover
1721
+ * </searchcraft-popover-button>
1722
+ * ```
1723
+ * @react-example ```jsx
1724
+ * <SearchcraftPopoverButton>
1725
+ * Open popover
1726
+ * </SearchcraftPopoverButton>
1727
+ * ```
1728
+ * @vue-example ```jsx
1729
+ * <SearchcraftPopoverButton>
1730
+ * Open popover
1731
+ * </SearchcraftPopoverButton>
1732
+ * ```
1589
1733
  */
1590
1734
  "searchcraft-popover-button": LocalJSX.SearchcraftPopoverButton & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverButtonElement>;
1591
1735
  /**
1592
1736
  * 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.
1593
- * ## Usage
1594
- * ```html
1737
+ * @import ```jsx
1738
+ * // react
1739
+ * import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
1740
+ * // vue
1741
+ * import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
1742
+ * ```
1743
+ * @js-example ```html
1595
1744
  * <!-- index.html -->
1596
- * <searchcraft-popover-form type="fullscreen" />
1745
+ * <searchcraft-popover-form type="inline" />
1597
1746
  * ```
1598
1747
  * ```js
1599
1748
  * // index.js
1600
1749
  * const popoverForm = document.querySelector('searchcraft-popover-form');
1601
- * popoverForm.popoverResultMappings = {
1602
- * containerHref: {
1603
- * fieldNames: [
1604
- * {
1605
- * fieldName: 'canonical_link',
1606
- * dataType: 'text',
1607
- * },
1608
- * ],
1609
- * };
1750
+ * popoverForm.popoverResultMappings = {};
1751
+ * ```
1752
+ * @react-example ```jsx
1753
+ * <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
1754
+ * ```
1755
+ * @vue-example ```jsx
1756
+ * <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
1610
1757
  * ```
1611
1758
  */
1612
1759
  "searchcraft-popover-form": LocalJSX.SearchcraftPopoverForm & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverFormElement>;
@@ -1617,40 +1764,113 @@ declare module "@stencil/core" {
1617
1764
  /**
1618
1765
  * This web component is designed to display a list of results within a popover interface.
1619
1766
  * It is consumed within the `searchcraft-popover-form` component.
1620
- * ## Usage
1621
- * ```html
1622
- * <!-- index.html -->
1767
+ * @js-example ```html
1623
1768
  * <searchcraft-popover-list-view />
1624
1769
  * ```
1625
1770
  */
1626
1771
  "searchcraft-popover-list-view": LocalJSX.SearchcraftPopoverListView & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListViewElement>;
1627
1772
  /**
1628
1773
  * This web component is designed to display the number of results returned from a search query.
1629
- * ## Usage
1630
- * ```html
1774
+ * @import ```jsx
1775
+ * // react
1776
+ * import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
1777
+ * // vue
1778
+ * import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
1779
+ * ```
1780
+ * @js-example ```html
1631
1781
  * <!-- index.html -->
1632
- * <script>
1633
- * const resultsInfo = document.querySelector('searchcraft-results-info');
1634
- * resultsInfo.customFormatter = (range, count, responseTime) =>
1635
- * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
1636
- * </script>
1637
1782
  * <searchcraft-results-info />
1638
1783
  * ```
1784
+ * ```js
1785
+ * // index.js
1786
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
1787
+ * resultsInfo.template = (info, { html }) => html`
1788
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1789
+ * `;
1790
+ * ```
1791
+ * @react-example ```jsx
1792
+ * <SearchcraftResultsInfo
1793
+ * template={(info, { html }) => html`
1794
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1795
+ * `}
1796
+ * />
1797
+ * @vue-example ```jsx
1798
+ * <SearchcraftResultsInfo
1799
+ * :template={(info, { html }) => html`
1800
+ * ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
1801
+ * `}
1802
+ * />
1639
1803
  */
1640
1804
  "searchcraft-results-info": LocalJSX.SearchcraftResultsInfo & JSXBase.HTMLAttributes<HTMLSearchcraftResultsInfoElement>;
1805
+ /**
1806
+ * This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
1807
+ */
1808
+ "searchcraft-search-result": LocalJSX.SearchcraftSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultElement>;
1809
+ /**
1810
+ * 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
1813
+ * import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
1814
+ * // vue
1815
+ * import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
1816
+ * ```
1817
+ * @js-example ```html
1818
+ * <!-- index.html -->
1819
+ * <searchcraft-search-results
1820
+ * ad-interval="4"
1821
+ * place-ad-at-start="true"
1822
+ * />
1823
+ * ```
1824
+ * ```js
1825
+ * // index.js
1826
+ * const searchResults = document.querySelector('searchcraft-search-results');
1827
+ * searchResults.template = (item, index, { html }) => html`
1828
+ * <h2>${item.title}</h2>
1829
+ * `;
1830
+ * ```
1831
+ * @react-example ```jsx
1832
+ * <SearchcraftSearchResults
1833
+ * adInterval={4}
1834
+ * placeAdAtState={true}
1835
+ * template={(item, index, { html }) => html`
1836
+ * <h2>${item.title}</h2>
1837
+ * `}
1838
+ * />
1839
+ * ```
1840
+ * @vue-example ```jsx
1841
+ * <SearchcraftSearchResults
1842
+ * adInterval={4}
1843
+ * placeAdAtState={true}
1844
+ * :template={(item, index, { html }) => html`
1845
+ * <h2>${item.title}</h2>
1846
+ * `}
1847
+ * />
1848
+ * ```
1849
+ */
1850
+ "searchcraft-search-results": LocalJSX.SearchcraftSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsElement>;
1641
1851
  /**
1642
1852
  * This web component is designed to choose the number of search results displayed.
1643
- * ## Usage
1644
- * ```html
1853
+ * @import ```jsx
1854
+ * // react
1855
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
1856
+ * // vue
1857
+ * import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
1858
+ * ```
1859
+ * @js-example ```html
1645
1860
  * <!-- index.html -->
1646
1861
  * <searchcraft-search-results-per-page increment="20" />
1647
1862
  * ```
1863
+ * @react-example ```jsx
1864
+ * <SearchcraftSearchResultsPerPage increment={20} />
1865
+ * ```
1866
+ * @vue-example ```jsx
1867
+ * <SearchcraftSearchResultsPerPage increment="20" />
1868
+ * ```
1648
1869
  */
1649
1870
  "searchcraft-search-results-per-page": LocalJSX.SearchcraftSearchResultsPerPage & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsPerPageElement>;
1650
1871
  /**
1651
1872
  * This web component is designed to allow users to select between a group of options.
1652
- * ## Usage
1653
- * ```html
1873
+ * @js-example ```html
1654
1874
  * <!-- index.html -->
1655
1875
  * <searchcraft-select
1656
1876
  * inputId="searchcraft-select"
@@ -1661,24 +1881,30 @@ declare module "@stencil/core" {
1661
1881
  */
1662
1882
  "searchcraft-select": LocalJSX.SearchcraftSelect & JSXBase.HTMLAttributes<HTMLSearchcraftSelectElement>;
1663
1883
  /**
1664
- * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
1665
- * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1666
- * It is consumed by the `searchcraft-filter-panel` component.
1884
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1667
1885
  */
1668
1886
  "searchcraft-slider": LocalJSX.SearchcraftSlider & JSXBase.HTMLAttributes<HTMLSearchcraftSliderElement>;
1669
1887
  /**
1670
- * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
1671
- * It does not render anything visible, its only function is to manage the css styles on the page.
1672
- * ## Usage
1673
- * ```html
1674
- * <!-- index.html -->
1675
- * <searchcraft-theme theme="light" custom-theme="{}" />
1888
+ * 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
1891
+ * import { SearchcraftTheme } from "@searchcraft/react-sdk";
1892
+ * // vue
1893
+ * import { SearchcraftTheme } from "@searchcraft/vue-sdk";
1894
+ * ```
1895
+ * @js-example ```html
1896
+ * <searchcraft-theme />
1897
+ * ```
1898
+ * @react-example ```jsx
1899
+ * <SearchcraftTheme />
1900
+ * ```
1901
+ * @vue-example ```jsx
1902
+ * <SearchcraftTheme />
1676
1903
  * ```
1677
1904
  */
1678
1905
  "searchcraft-theme": LocalJSX.SearchcraftTheme & JSXBase.HTMLAttributes<HTMLSearchcraftThemeElement>;
1679
1906
  /**
1680
1907
  * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
1681
- * It is consumed within the `searchcraft-filter-panel` component.
1682
1908
  */
1683
1909
  "searchcraft-toggle-button": LocalJSX.SearchcraftToggleButton & JSXBase.HTMLAttributes<HTMLSearchcraftToggleButtonElement>;
1684
1910
  }