@searchcraft/react-sdk 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,289 +1,3465 @@
1
- import { Components } from '@searchcraft/javascript-sdk';
2
- import { FC } from 'react';
3
- import { SearchcraftConfig } from '@searchcraft/core';
4
- import { SearchcraftCore } from '@searchcraft/core';
5
-
6
- /**
7
- * The consumer-facing Searchcraft class.
8
- */
9
- export declare class Searchcraft extends SearchcraftCore {
10
- constructor(config: SearchcraftConfig);
11
- }
12
-
13
- /**
14
- * A component that renders a list of search results with customizable styles, layout, and link behavior.
15
- *
16
- * @example
17
- * ```tsx
18
- * import React from 'react';
19
- * import { SearchcraftBaseSearchResults } from '@searchcraft/react-sdk';
20
- * import searchResultMappings from './searchResultMappings';
21
- *
22
- * const MySearchComponent = () => {
23
- * return (
24
- * <SearchcraftBaseSearchResults
25
- * searchResultMappings={searchResultMappings}
26
- * resultImagePlacement="left"
27
- * buttonLabel="View More"
28
- * buttonTarget="_blank"
29
- * buttonRel="noopener"
30
- * containerTarget="_self"
31
- * containerRel="nofollow"
32
- * onNoResults={() => console.log("No search results found")}
33
- * />
34
- * );
35
- * };
36
- *
37
- * export default MySearchComponent;
38
- * ```
39
- */
40
- export declare const SearchcraftBaseSearchResults: FC<SearchcraftBaseSearchResultsProps>;
41
-
42
- /**
43
- * The props for the SearchcraftBaseSearchResults component.
44
- */
45
- export declare interface SearchcraftBaseSearchResultsProps extends Components.SearchcraftBaseSearchResults {
46
- }
47
-
48
- /**
49
- * A component that represents a filter panel UI view, allowing users to refine and control their search queries by applying various filter criteria.
50
- *
51
- * @example
52
- * ```tsx
53
- * import React from 'react';
54
- * import { SearchcraftFilterPanel } from '@searchcraft/react-sdk';
55
- * import filterItems from './filterItems';
56
- *
57
- * const MyFilterComponent = () => {
58
- * return (
59
- * <SearchcraftFilterPanel items={filterItems} />
60
- * );
61
- * };
62
- *
63
- * export default MyFilterComponent;
64
- * ```
65
- */
66
- export declare const SearchcraftFilterPanel: FC<SearchcraftFilterPanelProps>;
67
-
68
- /**
69
- * The props for the SearchcraftFilterPanel.
70
- */
71
- export declare interface SearchcraftFilterPanelProps extends Components.SearchcraftFilterPanel {
72
- }
73
-
74
- /**
75
- * A component that provides a user-friendly interface for querying an indexed dataset,
76
- * enabling users to easily search large collections of data. It abstracts the complexities
77
- * of index-based searching, making it accessible to users of all technical levels.
78
- *
79
- * @example
80
- * ```tsx
81
- * import React from 'react';
82
- * import { SearchcraftInputForm } from '@searchcraft/react-sdk';
83
- * import searchcraftConfig from './searchcraftConfig';
84
- *
85
- * const MySearchComponent = () => {
86
- * const handleQuerySubmit = (event: CustomEvent<string>) => {
87
- * console.log("Query submitted", event.detail);
88
- * };
89
- *
90
- * return (
91
- * <SearchcraftInputForm
92
- * config={searchcraftConfig}
93
- * autoSearch={true}
94
- * buttonPlacement="right"
95
- * buttonLabel="Search"
96
- * inputLabel="Search Database"
97
- * customStyles={{ border: "1px solid gray", padding: "5px" }}
98
- * placeholderValue="Search here..."
99
- * searchTerm=""
100
- * onQuerySubmit={handleQuerySubmit}
101
- * onInputCleared={() => console.log("Input cleared")}
102
- * onNoResultsReceived={() => console.log("No results found")}
103
- * onInputFocus={() => console.log("Input focused")}
104
- * onInputBlur={() => console.log("Input blurred")}
105
- * onInputInit={() => console.log("Input initialized")}
106
- * />
107
- * );
108
- * };
109
- *
110
- * export default MySearchComponent;
111
- * ```
112
- */
113
- export declare const SearchcraftInputForm: FC<SearchcraftInputFormProps>;
114
-
115
- /**
116
- * The props for the SearchcraftInputForm.
117
- */
118
- export declare interface SearchcraftInputFormProps extends Components.SearchcraftInputForm {
119
- }
120
-
121
- /**
122
- * This React component is designed to facilitate pagination of search results.
123
- * Once a query is submitted, calculates the number for pages.
124
- *
125
- * @example
126
- * ```tsx
127
- * import React from 'react';
128
- * import { SearchcraftPagination } from '@searchcraft/react-sdk';
129
- *
130
- * const MyPaginationComponent = () => {
131
- * return (
132
- * // other searchcraft components
133
- * <SearchcraftPagination />
134
- * );
135
- * };
136
- *
137
- * export default MyPaginationComponent;
138
- * ```
139
- */
140
- export declare const SearchcraftPagination: FC<SearchcraftPaginationProps>;
141
-
142
- /**
143
- * The props for the SearchcraftPagination component.
144
- */
145
- export declare interface SearchcraftPaginationProps extends Components.SearchcraftPagination {
146
- }
147
-
148
- /**
149
- * A button component that, when clicked, toggles the visibility of a popover.
150
- *
151
- * @example
152
- * ```tsx
153
- * import React from 'react';
154
- * import { SearchcraftPopoverButton } from '@searchcraft/react-sdk';
155
- *
156
- * const MyPopoverTrigger = () => {
157
- * return (
158
- * <SearchcraftPopoverButton>
159
- * Open Popover
160
- * </SearchcraftPopoverButton>
161
- * );
162
- * };
163
- *
164
- * export default MyPopoverTrigger;
165
- * ```
166
- */
167
- export declare const SearchcraftPopoverButton: FC<SearchcraftPopoverButtonProps>;
168
-
169
- /**
170
- * The props for the SearchcraftPopoverButton.
171
- */
172
- export declare interface SearchcraftPopoverButtonProps extends Components.SearchcraftPopoverButton {
173
- }
174
-
175
- /**
176
- * A component that displays search results in a popover container that dynamically appears
177
- * when the user interacts with a search input field, or when a popover button is clicked.
178
- *
179
- * @example
180
- * ```tsx
181
- * import React from 'react';
182
- * import { SearchcraftPopoverForm } from '@searchcraft/react-sdk';
183
- * import searchcraftConfig from './searchcraftConfig';
184
- * import popoverResultMappings from './popoverResultMappings';
185
- *
186
- * const MyPopoverSearch = () => {
187
- * return (
188
- * <SearchcraftPopoverForm
189
- * config={searchcraftConfig}
190
- * type="fullscreen"
191
- * popoverResultMappings={popoverResultMappings}
192
- * hotkey="k"
193
- * hotkeyModifier="meta"
194
- * />
195
- * );
196
- * };
197
- *
198
- * export default MyPopoverSearch;
199
- * ```
200
- */
201
- export declare const SearchcraftPopoverForm: FC<SearchcraftPopoverFormProps>;
202
-
203
- /**
204
- * The props for the SearchcraftPopoverForm component.
205
- */
206
- export declare interface SearchcraftPopoverFormProps extends Components.SearchcraftPopoverForm {
207
- }
208
-
209
- /**
210
- * This React component is designed to display the number of results returned from a search query.
211
- *
212
- * @example
213
- * ```tsx
214
- * import React, { useEffect, useRef } from 'react';
215
- * import { SearchcraftResultsInfo } from '@searchcraft/react-sdk';
216
- *
217
- * const MyResultsInfo = () => {
218
- * const ref = useRef();
219
- *
220
- * useEffect(() => {
221
- * ref.current.customFormatter = (range, count, responseTime) =>
222
- * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
223
- * });
224
- *
225
- * return <SearchcraftResultsInfo ref={ref} />;
226
- * };
227
- *
228
- * export default MyResultsInfo;
229
- * ```
230
- */
231
- export declare const SearchcraftResultsInfo: FC<SearchcraftResultsInfoProps>;
232
-
233
- /**
234
- * The Props for the SearchcraftResultsInfo component.
235
- */
236
- export declare interface SearchcraftResultsInfoProps extends Components.SearchcraftResultsInfo {
237
- }
238
-
239
- /**
240
- * This React component is designed to choose the number of search results displayed.
241
- *
242
- * @example
243
- * ```tsx
244
- * import React from 'react';
245
- * import { SearchcraftSearchResultsPerPage } from '@searchcraft/react-sdk';
246
- *
247
- * const MyResultsPerPage = () => {
248
- * return <SearchcraftSearchResultsPerPage increment={20} />;
249
- * };
250
- *
251
- * export default MyResultsPerPage;
252
- * ```
253
- */
254
- export declare const SearchcraftSearchResultsPerPage: FC<SearchcraftSearchResultsPerPageProps>;
255
-
256
- /**
257
- * The Props for the SearchcraftSearchResultsPerPage component.
258
- */
259
- export declare interface SearchcraftSearchResultsPerPageProps extends Components.SearchcraftSearchResultsPerPage {
260
- }
261
-
262
- /**
263
- * A component that applies Searchcraft's built-in CSS theme to your page.
264
- * It does not render anything visible—its only function is to manage the CSS styles on the page.
265
- *
266
- * @example
267
- * ```tsx
268
- * import React from 'react';
269
- * import { SearchcraftTheme } from '@searchcraft/react-sdk';
270
- *
271
- * const MyThemeProvider = () => {
272
- * return <SearchcraftTheme theme="light" customTheme={'[]'} />;
273
- * };
274
- *
275
- * export default MyThemeProvider;
276
- * ```
277
- */
278
- export declare const SearchcraftTheme: FC<SearchcraftThemeProps>;
279
-
280
- /**
281
- * The Props for the SearchcraftTheme component.
282
- */
283
- export declare interface SearchcraftThemeProps extends Components.SearchcraftTheme {
284
- }
285
-
286
-
287
- export * from "@searchcraft/core/dist/types/sdk-types";
288
-
289
- export { }
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { FC } from 'react';
4
+
5
+ /**
6
+ * The SearchcraftConfig object is used to initialize Searchcraft in your application.
7
+ */
8
+ export interface SearchcraftConfig {
9
+ /**
10
+ * Host IP Address and port number configured and created using Vektron
11
+ */
12
+ endpointURL: string;
13
+ /**
14
+ * Name or names of search indices configured using Vektron. Given as an array of strings
15
+ */
16
+ index: string[];
17
+ /**
18
+ * A unique user identifier for the end user.
19
+ */
20
+ userId?: string;
21
+ /**
22
+ * The Index read key provided by Vektron.
23
+ */
24
+ readKey: string;
25
+ /**
26
+ * The amount of delay, in milliseconds, to debounce search requests. Defaults to `0`.
27
+ */
28
+ searchDebounceDelay?: number;
29
+ /**
30
+ * The maximum number of results to return per page.
31
+ */
32
+ searchResultsPerPage?: number;
33
+ /**
34
+ * Name of the ad source to use.
35
+ */
36
+ adSource?: "adMarketplace" | "Nativo" | "Custom" | "None";
37
+ /**
38
+ * The maximum number of product ads to show for a single search term.
39
+ */
40
+ admProductAdQuantity?: number;
41
+ /**
42
+ * The maximum number of text ads to show for a single search term.
43
+ */
44
+ admTextAdQuantity?: number;
45
+ /**
46
+ * The adm sub value.
47
+ */
48
+ admSub?: string;
49
+ /**
50
+ * The number of custom ads to render at the start of the search results page.
51
+ */
52
+ customAdStartQuantity?: number;
53
+ /**
54
+ * The number of custom ads to render at the end of the search results page.
55
+ */
56
+ customAdEndQuantity?: number;
57
+ /**
58
+ * Renders a custom ad in between search results, at the specified interval.
59
+ */
60
+ customAdInterstitialInterval?: number;
61
+ /**
62
+ * Specifies the number of ads to be rendered in each interstitial in between search results.
63
+ */
64
+ customAdInterstitialQuantity?: number;
65
+ /**
66
+ * A callback function responsible for rendering the custom ad containers.
67
+ */
68
+ customAdTemplate?: CustomAdTemplateRenderFunction;
69
+ }
70
+ export type SearchcraftAdSource = "adMarketplace" | "Nativo" | "Custom" | "None";
71
+ /**
72
+ * Used internally by consuming packages as part of the core sdk constructor.
73
+ */
74
+ export interface SearchcraftSDKInfo {
75
+ sdkName: string;
76
+ sdkVersion: string;
77
+ }
78
+ export interface CustomAdTemplateRenderData {
79
+ adContainerId: string;
80
+ searchTerm: string;
81
+ }
82
+ export type CustomAdTemplateRenderFunction = (data: CustomAdTemplateRenderData) => string;
83
+ export interface AdClientResponseItem {
84
+ id: string;
85
+ adSource: SearchcraftAdSource;
86
+ }
87
+ /**
88
+ * A Facet object returned in a search response.
89
+ */
90
+ export type FacetRoot = {
91
+ [key: string]: FacetChild[];
92
+ };
93
+ export type FacetPrime = FacetRoot[];
94
+ /**
95
+ * Represents the structure of facets, which group search results into categories.
96
+ */
97
+ export interface FacetChild {
98
+ count: number;
99
+ path: string;
100
+ children?: FacetChild[];
101
+ }
102
+ /**
103
+ * Types of measure requests that can be sent to the /measure/event endpoint.
104
+ */
105
+ export type MeasureEventName = "sdk_initialized" | "search_requested" | "search_response_received" | "document_clicked";
106
+ /**
107
+ * Properties attached to a measure request.
108
+ */
109
+ export interface MeasureRequestProperties {
110
+ searchcraft_organization_id?: string;
111
+ searchcraft_application_id?: string;
112
+ searchcraft_index_names: string[];
113
+ search_term?: string;
114
+ number_of_documents?: number;
115
+ external_document_id?: string;
116
+ document_position?: number;
117
+ session_id?: string;
118
+ }
119
+ /**
120
+ * User properties attached to a measure request.
121
+ */
122
+ export interface MeasureRequestUser {
123
+ user_id: string;
124
+ country?: string;
125
+ city?: string;
126
+ device_id?: string;
127
+ client_ip?: string;
128
+ locale?: string;
129
+ os?: string;
130
+ platform?: string;
131
+ region?: string;
132
+ sdk_name?: string;
133
+ sdk_version?: string;
134
+ user_agent?: string;
135
+ latitude?: number;
136
+ longitude?: number;
137
+ }
138
+ /**
139
+ * The structure of a response returned from a Searchcraft operation.
140
+ */
141
+ export interface SearchcraftResponse {
142
+ status: number;
143
+ data: SearchcraftResponseData | SearchcraftResponseError;
144
+ }
145
+ /**
146
+ * Error returned when a search is unsuccessful.
147
+ */
148
+ export type SearchcraftResponseError = {
149
+ status: number;
150
+ message?: string;
151
+ code?: number;
152
+ hits?: [
153
+ ];
154
+ facets?: null;
155
+ count?: number;
156
+ time_taken?: number;
157
+ };
158
+ /**
159
+ * Top-level result returned when a search is successful.
160
+ */
161
+ export interface SearchcraftResponseData {
162
+ count?: number;
163
+ facets?: FacetPrime;
164
+ hits?: SearchIndexEntry[];
165
+ time_taken?: number;
166
+ }
167
+ /**
168
+ * Represents an entry in the search index returned as part of a search result.
169
+ */
170
+ export interface SearchIndexEntry {
171
+ doc?: SearchDocument;
172
+ document_id?: string;
173
+ score?: number;
174
+ }
175
+ /**
176
+ * Data document returned within a SearchResult.
177
+ */
178
+ export interface SearchDocument extends Record<string, string | number> {
179
+ id: number;
180
+ [key: string]: string | number;
181
+ }
182
+ export interface SearchClientResponseItem {
183
+ id: string;
184
+ document: SearchDocument;
185
+ }
186
+ export type FacetPathsForIndexField = {
187
+ fieldName: string;
188
+ value: string;
189
+ };
190
+ export type RangeValueForIndexField = {
191
+ fieldName: string;
192
+ value: string;
193
+ };
194
+ /**
195
+ * Parameters required to make a successful Search request.
196
+ */
197
+ export type SearchParams = {
198
+ /**
199
+ * The search mode, which can be either 'fuzzy' or 'exact'.
200
+ */
201
+ mode: "fuzzy" | "exact";
202
+ /**
203
+ * The starting point for the results, used for pagination.
204
+ * Optional parameter.
205
+ */
206
+ offset?: number;
207
+ /**
208
+ * The number of results returned.
209
+ * Optional parameter.
210
+ */
211
+ limit?: number;
212
+ /**
213
+ * The field to order the results by (e.g., 'date_published', 'title', etc.).
214
+ * Optional parameter.
215
+ */
216
+ order_by?: string;
217
+ /**
218
+ * The search term provided by the user.
219
+ */
220
+ searchTerm: string;
221
+ /**
222
+ * The sort order, which can be either 'asc' or 'desc'.
223
+ * Optional parameter.
224
+ */
225
+ sort?: "asc" | "desc";
226
+ facetPathsForIndexFields?: Record<string, FacetPathsForIndexField>;
227
+ rangeValueForIndexFields?: Record<string, RangeValueForIndexField>;
228
+ };
229
+ export interface SubscriptionEventMap {
230
+ ad_container_rendered: AdContainerSubscriptionEvent;
231
+ query_submitted: QuerySubmittedEvent;
232
+ input_cleared: InputClearedEvent;
233
+ no_results_returned: NoResultsReturnedEvent;
234
+ }
235
+ export interface AdContainerSubscriptionEvent extends SubscriptionEvent {
236
+ name: "ad_container_rendered";
237
+ data: {
238
+ adContainerId: string;
239
+ adSource: SearchcraftAdSource;
240
+ searchTerm: string;
241
+ };
242
+ }
243
+ export interface QuerySubmittedEvent extends SubscriptionEvent {
244
+ name: "query_submitted";
245
+ data: {
246
+ searchTerm: string;
247
+ };
248
+ }
249
+ export interface InputClearedEvent extends SubscriptionEvent {
250
+ name: "input_cleared";
251
+ }
252
+ export interface NoResultsReturnedEvent extends SubscriptionEvent {
253
+ name: "no_results_returned";
254
+ }
255
+ export type SubscriptionEventName = keyof SubscriptionEventMap;
256
+ export type SubscriptionEventCallback<T extends SubscriptionEventName> = (event: SubscriptionEventMap[T]) => void;
257
+ export type UnsubscribeFunction = () => void;
258
+ export interface SubscriptionEvent {
259
+ name: SubscriptionEventName;
260
+ }
261
+ /**
262
+ * A data type representing an index field value, along with properties
263
+ * describing how to format and display the index field value.
264
+ */
265
+ export type SearchResultFieldName = {
266
+ /**
267
+ * The index field name.
268
+ */
269
+ fieldName: string;
270
+ /**
271
+ * The data type to treat this index field as.
272
+ */
273
+ dataType: "text" | "date" | "number";
274
+ /**
275
+ * The locale to use when formatting dataType: `number`
276
+ */
277
+ numberFormatLocale?: string;
278
+ /**
279
+ * If it's a number, the number format to apply.
280
+ * reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
281
+ */
282
+ numberFormatOptions?: Intl.NumberFormatOptions;
283
+ /**
284
+ * A scale factor to apply to a `number` value.
285
+ */
286
+ numberScale?: number;
287
+ /**
288
+ * TODO: Implement DateFormatOptions, for date formatting
289
+ */
290
+ dateFormatOptions?: unknown;
291
+ };
292
+ /**
293
+ * A data type representing the mapping of index fields, for the purpose of rendering them
294
+ * in search result item.
295
+ */
296
+ export type SearchResultMapping = {
297
+ /**
298
+ * The fields to map to.
299
+ */
300
+ fieldNames: SearchResultFieldName[];
301
+ /**
302
+ * The delimiter used to join them.
303
+ */
304
+ delimiter?: string;
305
+ };
306
+ export type SearchResultMappings = {
307
+ body?: SearchResultMapping;
308
+ buttonHref?: SearchResultMapping;
309
+ containerHref?: SearchResultMapping;
310
+ footer?: SearchResultMapping;
311
+ imageSource?: SearchResultMapping;
312
+ subtitle?: SearchResultMapping;
313
+ title?: SearchResultMapping;
314
+ };
315
+ export type PopoverResultMappings = {
316
+ title?: SearchResultMapping;
317
+ subtitle?: SearchResultMapping;
318
+ imageSource?: SearchResultMapping;
319
+ imageAlt?: SearchResultMapping;
320
+ href?: SearchResultMapping;
321
+ };
322
+ export interface FilterItem {
323
+ type: "facets" | "dateRange" | "numericRange" | "exactMatchToggle" | "mostRecentToggle";
324
+ label: string;
325
+ options: object | null;
326
+ }
327
+ export interface FacetsFilterItem extends FilterItem {
328
+ fieldName: string;
329
+ type: "facets";
330
+ options: {
331
+ showSublevel: boolean;
332
+ };
333
+ }
334
+ export interface NumericFilterItem extends FilterItem {
335
+ fieldName: string;
336
+ type: "numericRange";
337
+ options: {
338
+ min: number;
339
+ max: number;
340
+ granularity: number;
341
+ };
342
+ }
343
+ export interface DateRangeFilterItem extends FilterItem {
344
+ fieldName: string;
345
+ type: "dateRange";
346
+ options: {
347
+ minDate: Date;
348
+ maxDate: Date;
349
+ granularity: "year" | "month" | "day" | "hour";
350
+ };
351
+ }
352
+ export interface ExactMatchToggleFilterItem extends FilterItem {
353
+ type: "exactMatchToggle";
354
+ options: {
355
+ subLabel?: string;
356
+ };
357
+ }
358
+ export interface MostRecentToggleFilterItem extends FilterItem {
359
+ type: "mostRecentToggle";
360
+ options: {
361
+ subLabel?: string;
362
+ };
363
+ }
364
+ declare class AdClient {
365
+ config: SearchcraftConfig;
366
+ constructor(config: SearchcraftConfig);
367
+ getAdsForSearchParams(_params: SearchParams): Promise<AdClientResponseItem[]>;
368
+ }
369
+ declare class MeasureClient {
370
+ private measureRequestTimeout;
371
+ private measureRequestsBatched;
372
+ private config;
373
+ private sdkInfo;
374
+ private userId;
375
+ private sessionId;
376
+ constructor(config: SearchcraftConfig, sdkInfo: SearchcraftSDKInfo, userId: string);
377
+ /**
378
+ * Getter for the base url used by the /measure endpoints.
379
+ */
380
+ private get baseMeasureUrl();
381
+ /**
382
+ * Getter for the measure request user. Uses config values + navigator values.
383
+ */
384
+ private get measureRequestUser();
385
+ /**
386
+ * Sends a measure event to the `/measure/event` endpoint for analytics purposes.
387
+ *
388
+ * @param {MeasureEventName} eventName - Name of the event.
389
+ * @param {Partial<MeasureRequestProperties>} properties - Additional properties to send with the event.
390
+ * @param {Partial<MeasureRequestUser>} user - Additional user properites to send with the event.
391
+ */
392
+ sendMeasureEvent: (eventName: MeasureEventName, properties?: Partial<MeasureRequestProperties>, user?: Partial<MeasureRequestUser>) => void;
393
+ }
394
+ declare class SearchClient {
395
+ private config;
396
+ private userId;
397
+ private parent;
398
+ constructor(parent: SearchcraftCore, config: SearchcraftConfig, userId: string);
399
+ /**
400
+ * Getter for the base url used by the /search endpoint.
401
+ */
402
+ private get baseSearchUrl();
403
+ /**
404
+ * Performs a search operation.
405
+ * @param {SearchParams} searchParams - The parameters for the search.
406
+ */
407
+ getSearchResponse: (searchParams: SearchParams) => Promise<SearchcraftResponse>;
408
+ }
409
+ declare class SearchcraftCore {
410
+ config: SearchcraftConfig;
411
+ measureClient: MeasureClient | undefined;
412
+ searchClient: SearchClient | undefined;
413
+ adClient: AdClient | undefined;
414
+ userId: string;
415
+ private requestTimeout;
416
+ private subscriptionEvents;
417
+ constructor(config: SearchcraftConfig, sdkInfo: SearchcraftSDKInfo);
418
+ private initInputForms;
419
+ /**
420
+ * When changes happen in the DOM, we want to link any input forms found to the instance of the core.
421
+ */
422
+ private startObservingMutations;
423
+ private initClients;
424
+ emitEvent<T extends SubscriptionEventName>(eventName: T, event: SubscriptionEventMap[T]): void;
425
+ subscribe<T extends SubscriptionEventName>(eventName: T, callback: SubscriptionEventCallback<T>): UnsubscribeFunction;
426
+ /**
427
+ * Gets items from the SearchClient and the AdClient.
428
+ */
429
+ getItems: (searchParams: SearchParams, itemsCallback: (response: SearchcraftResponse, items: SearchClientResponseItem[]) => void, adCallback: (adClientResponseItems: AdClientResponseItem[]) => void) => void;
430
+ }
431
+ export interface HTMLStencilElement extends HTMLElement {
432
+ componentOnReady(): Promise<this>;
433
+ }
434
+ declare namespace JSXBase {
435
+ interface IntrinsicElements {
436
+ slot: JSXBase.SlotAttributes;
437
+ a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
438
+ abbr: JSXBase.HTMLAttributes;
439
+ address: JSXBase.HTMLAttributes;
440
+ area: JSXBase.AreaHTMLAttributes<HTMLAreaElement>;
441
+ article: JSXBase.HTMLAttributes;
442
+ aside: JSXBase.HTMLAttributes;
443
+ audio: JSXBase.AudioHTMLAttributes<HTMLAudioElement>;
444
+ b: JSXBase.HTMLAttributes;
445
+ base: JSXBase.BaseHTMLAttributes<HTMLBaseElement>;
446
+ bdi: JSXBase.HTMLAttributes;
447
+ bdo: JSXBase.HTMLAttributes;
448
+ big: JSXBase.HTMLAttributes;
449
+ blockquote: JSXBase.BlockquoteHTMLAttributes<HTMLQuoteElement>;
450
+ body: JSXBase.HTMLAttributes<HTMLBodyElement>;
451
+ br: JSXBase.HTMLAttributes<HTMLBRElement>;
452
+ button: JSXBase.ButtonHTMLAttributes<HTMLButtonElement>;
453
+ canvas: JSXBase.CanvasHTMLAttributes<HTMLCanvasElement>;
454
+ caption: JSXBase.HTMLAttributes<HTMLTableCaptionElement>;
455
+ cite: JSXBase.HTMLAttributes;
456
+ code: JSXBase.HTMLAttributes;
457
+ col: JSXBase.ColHTMLAttributes<HTMLTableColElement>;
458
+ colgroup: JSXBase.ColgroupHTMLAttributes<HTMLTableColElement>;
459
+ data: JSXBase.HTMLAttributes<HTMLDataElement>;
460
+ datalist: JSXBase.HTMLAttributes<HTMLDataListElement>;
461
+ dd: JSXBase.HTMLAttributes;
462
+ del: JSXBase.DelHTMLAttributes<HTMLModElement>;
463
+ details: JSXBase.DetailsHTMLAttributes<HTMLElement>;
464
+ dfn: JSXBase.HTMLAttributes;
465
+ dialog: JSXBase.DialogHTMLAttributes<HTMLDialogElement>;
466
+ div: JSXBase.HTMLAttributes<HTMLDivElement>;
467
+ dl: JSXBase.HTMLAttributes<HTMLDListElement>;
468
+ dt: JSXBase.HTMLAttributes;
469
+ em: JSXBase.HTMLAttributes;
470
+ embed: JSXBase.EmbedHTMLAttributes<HTMLEmbedElement>;
471
+ fieldset: JSXBase.FieldsetHTMLAttributes<HTMLFieldSetElement>;
472
+ figcaption: JSXBase.HTMLAttributes;
473
+ figure: JSXBase.HTMLAttributes;
474
+ footer: JSXBase.HTMLAttributes;
475
+ form: JSXBase.FormHTMLAttributes<HTMLFormElement>;
476
+ h1: JSXBase.HTMLAttributes<HTMLHeadingElement>;
477
+ h2: JSXBase.HTMLAttributes<HTMLHeadingElement>;
478
+ h3: JSXBase.HTMLAttributes<HTMLHeadingElement>;
479
+ h4: JSXBase.HTMLAttributes<HTMLHeadingElement>;
480
+ h5: JSXBase.HTMLAttributes<HTMLHeadingElement>;
481
+ h6: JSXBase.HTMLAttributes<HTMLHeadingElement>;
482
+ head: JSXBase.HTMLAttributes<HTMLHeadElement>;
483
+ header: JSXBase.HTMLAttributes;
484
+ hgroup: JSXBase.HTMLAttributes;
485
+ hr: JSXBase.HTMLAttributes<HTMLHRElement>;
486
+ html: JSXBase.HTMLAttributes<HTMLHtmlElement>;
487
+ i: JSXBase.HTMLAttributes;
488
+ iframe: JSXBase.IframeHTMLAttributes<HTMLIFrameElement>;
489
+ img: JSXBase.ImgHTMLAttributes<HTMLImageElement>;
490
+ input: JSXBase.InputHTMLAttributes<HTMLInputElement>;
491
+ ins: JSXBase.InsHTMLAttributes<HTMLModElement>;
492
+ kbd: JSXBase.HTMLAttributes;
493
+ keygen: JSXBase.KeygenHTMLAttributes<HTMLElement>;
494
+ label: JSXBase.LabelHTMLAttributes<HTMLLabelElement>;
495
+ legend: JSXBase.HTMLAttributes<HTMLLegendElement>;
496
+ li: JSXBase.LiHTMLAttributes<HTMLLIElement>;
497
+ link: JSXBase.LinkHTMLAttributes<HTMLLinkElement>;
498
+ main: JSXBase.HTMLAttributes;
499
+ map: JSXBase.MapHTMLAttributes<HTMLMapElement>;
500
+ mark: JSXBase.HTMLAttributes;
501
+ menu: JSXBase.MenuHTMLAttributes<HTMLMenuElement>;
502
+ menuitem: JSXBase.HTMLAttributes;
503
+ meta: JSXBase.MetaHTMLAttributes<HTMLMetaElement>;
504
+ meter: JSXBase.MeterHTMLAttributes<HTMLMeterElement>;
505
+ nav: JSXBase.HTMLAttributes;
506
+ noscript: JSXBase.HTMLAttributes;
507
+ object: JSXBase.ObjectHTMLAttributes<HTMLObjectElement>;
508
+ ol: JSXBase.OlHTMLAttributes<HTMLOListElement>;
509
+ optgroup: JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>;
510
+ option: JSXBase.OptionHTMLAttributes<HTMLOptionElement>;
511
+ output: JSXBase.OutputHTMLAttributes<HTMLOutputElement>;
512
+ p: JSXBase.HTMLAttributes<HTMLParagraphElement>;
513
+ param: JSXBase.ParamHTMLAttributes<HTMLParamElement>;
514
+ picture: JSXBase.HTMLAttributes<HTMLPictureElement>;
515
+ pre: JSXBase.HTMLAttributes<HTMLPreElement>;
516
+ progress: JSXBase.ProgressHTMLAttributes<HTMLProgressElement>;
517
+ q: JSXBase.QuoteHTMLAttributes<HTMLQuoteElement>;
518
+ rp: JSXBase.HTMLAttributes;
519
+ rt: JSXBase.HTMLAttributes;
520
+ ruby: JSXBase.HTMLAttributes;
521
+ s: JSXBase.HTMLAttributes;
522
+ samp: JSXBase.HTMLAttributes;
523
+ script: JSXBase.ScriptHTMLAttributes<HTMLScriptElement>;
524
+ section: JSXBase.HTMLAttributes;
525
+ select: JSXBase.SelectHTMLAttributes<HTMLSelectElement>;
526
+ small: JSXBase.HTMLAttributes;
527
+ source: JSXBase.SourceHTMLAttributes<HTMLSourceElement>;
528
+ span: JSXBase.HTMLAttributes<HTMLSpanElement>;
529
+ strong: JSXBase.HTMLAttributes;
530
+ style: JSXBase.StyleHTMLAttributes<HTMLStyleElement>;
531
+ sub: JSXBase.HTMLAttributes;
532
+ summary: JSXBase.HTMLAttributes;
533
+ sup: JSXBase.HTMLAttributes;
534
+ table: JSXBase.TableHTMLAttributes<HTMLTableElement>;
535
+ tbody: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
536
+ td: JSXBase.TdHTMLAttributes<HTMLTableDataCellElement>;
537
+ textarea: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>;
538
+ tfoot: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
539
+ th: JSXBase.ThHTMLAttributes<HTMLTableHeaderCellElement>;
540
+ thead: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
541
+ time: JSXBase.TimeHTMLAttributes<HTMLTimeElement>;
542
+ title: JSXBase.HTMLAttributes<HTMLTitleElement>;
543
+ tr: JSXBase.HTMLAttributes<HTMLTableRowElement>;
544
+ track: JSXBase.TrackHTMLAttributes<HTMLTrackElement>;
545
+ u: JSXBase.HTMLAttributes;
546
+ ul: JSXBase.HTMLAttributes<HTMLUListElement>;
547
+ var: JSXBase.HTMLAttributes;
548
+ video: JSXBase.VideoHTMLAttributes<HTMLVideoElement>;
549
+ wbr: JSXBase.HTMLAttributes;
550
+ animate: JSXBase.SVGAttributes;
551
+ circle: JSXBase.SVGAttributes;
552
+ clipPath: JSXBase.SVGAttributes;
553
+ defs: JSXBase.SVGAttributes;
554
+ desc: JSXBase.SVGAttributes;
555
+ ellipse: JSXBase.SVGAttributes;
556
+ feBlend: JSXBase.SVGAttributes;
557
+ feColorMatrix: JSXBase.SVGAttributes;
558
+ feComponentTransfer: JSXBase.SVGAttributes;
559
+ feComposite: JSXBase.SVGAttributes;
560
+ feConvolveMatrix: JSXBase.SVGAttributes;
561
+ feDiffuseLighting: JSXBase.SVGAttributes;
562
+ feDisplacementMap: JSXBase.SVGAttributes;
563
+ feDistantLight: JSXBase.SVGAttributes;
564
+ feDropShadow: JSXBase.SVGAttributes;
565
+ feFlood: JSXBase.SVGAttributes;
566
+ feFuncA: JSXBase.SVGAttributes;
567
+ feFuncB: JSXBase.SVGAttributes;
568
+ feFuncG: JSXBase.SVGAttributes;
569
+ feFuncR: JSXBase.SVGAttributes;
570
+ feGaussianBlur: JSXBase.SVGAttributes;
571
+ feImage: JSXBase.SVGAttributes;
572
+ feMerge: JSXBase.SVGAttributes;
573
+ feMergeNode: JSXBase.SVGAttributes;
574
+ feMorphology: JSXBase.SVGAttributes;
575
+ feOffset: JSXBase.SVGAttributes;
576
+ fePointLight: JSXBase.SVGAttributes;
577
+ feSpecularLighting: JSXBase.SVGAttributes;
578
+ feSpotLight: JSXBase.SVGAttributes;
579
+ feTile: JSXBase.SVGAttributes;
580
+ feTurbulence: JSXBase.SVGAttributes;
581
+ filter: JSXBase.SVGAttributes;
582
+ foreignObject: JSXBase.SVGAttributes;
583
+ g: JSXBase.SVGAttributes;
584
+ image: JSXBase.SVGAttributes;
585
+ line: JSXBase.SVGAttributes;
586
+ linearGradient: JSXBase.SVGAttributes;
587
+ marker: JSXBase.SVGAttributes;
588
+ mask: JSXBase.SVGAttributes;
589
+ metadata: JSXBase.SVGAttributes;
590
+ path: JSXBase.SVGAttributes;
591
+ pattern: JSXBase.SVGAttributes;
592
+ polygon: JSXBase.SVGAttributes;
593
+ polyline: JSXBase.SVGAttributes;
594
+ radialGradient: JSXBase.SVGAttributes;
595
+ rect: JSXBase.SVGAttributes;
596
+ stop: JSXBase.SVGAttributes;
597
+ svg: JSXBase.SVGAttributes;
598
+ switch: JSXBase.SVGAttributes;
599
+ symbol: JSXBase.SVGAttributes;
600
+ text: JSXBase.SVGAttributes;
601
+ textPath: JSXBase.SVGAttributes;
602
+ tspan: JSXBase.SVGAttributes;
603
+ use: JSXBase.SVGAttributes;
604
+ view: JSXBase.SVGAttributes;
605
+ }
606
+ interface SlotAttributes extends JSXAttributes {
607
+ name?: string;
608
+ slot?: string;
609
+ onSlotchange?: (event: Event) => void;
610
+ }
611
+ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
612
+ download?: any;
613
+ href?: string;
614
+ hrefLang?: string;
615
+ hreflang?: string;
616
+ media?: string;
617
+ ping?: string;
618
+ rel?: string;
619
+ target?: string;
620
+ referrerPolicy?: ReferrerPolicy;
621
+ }
622
+ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {
623
+ }
624
+ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
625
+ alt?: string;
626
+ coords?: string;
627
+ download?: any;
628
+ href?: string;
629
+ hrefLang?: string;
630
+ hreflang?: string;
631
+ media?: string;
632
+ rel?: string;
633
+ shape?: string;
634
+ target?: string;
635
+ }
636
+ interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
637
+ href?: string;
638
+ target?: string;
639
+ }
640
+ interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
641
+ cite?: string;
642
+ }
643
+ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
644
+ disabled?: boolean;
645
+ form?: string;
646
+ formAction?: string;
647
+ formaction?: string;
648
+ formEncType?: string;
649
+ formenctype?: string;
650
+ formMethod?: string;
651
+ formmethod?: string;
652
+ formNoValidate?: boolean;
653
+ formnovalidate?: boolean;
654
+ formTarget?: string;
655
+ formtarget?: string;
656
+ name?: string;
657
+ type?: string;
658
+ value?: string | string[] | number;
659
+ popoverTargetAction?: string;
660
+ popoverTargetElement?: Element | null;
661
+ popoverTarget?: string;
662
+ }
663
+ interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
664
+ height?: number | string;
665
+ width?: number | string;
666
+ }
667
+ interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
668
+ span?: number;
669
+ }
670
+ interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
671
+ span?: number;
672
+ }
673
+ interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
674
+ open?: boolean;
675
+ onToggle?: (event: Event) => void;
676
+ }
677
+ interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
678
+ cite?: string;
679
+ dateTime?: string;
680
+ datetime?: string;
681
+ }
682
+ interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
683
+ onCancel?: (event: Event) => void;
684
+ onClose?: (event: Event) => void;
685
+ open?: boolean;
686
+ returnValue?: string;
687
+ }
688
+ interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
689
+ height?: number | string;
690
+ src?: string;
691
+ type?: string;
692
+ width?: number | string;
693
+ }
694
+ interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
695
+ disabled?: boolean;
696
+ form?: string;
697
+ name?: string;
698
+ }
699
+ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
700
+ acceptCharset?: string;
701
+ acceptcharset?: string;
702
+ action?: string;
703
+ autoComplete?: string;
704
+ autocomplete?: string;
705
+ encType?: string;
706
+ enctype?: string;
707
+ method?: string;
708
+ name?: string;
709
+ noValidate?: boolean;
710
+ novalidate?: boolean | string;
711
+ target?: string;
712
+ }
713
+ interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
714
+ manifest?: string;
715
+ }
716
+ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
717
+ allow?: string;
718
+ allowFullScreen?: boolean;
719
+ allowfullScreen?: string | boolean;
720
+ allowTransparency?: boolean;
721
+ allowtransparency?: string | boolean;
722
+ frameBorder?: number | string;
723
+ frameborder?: number | string;
724
+ importance?: "low" | "auto" | "high";
725
+ height?: number | string;
726
+ loading?: "lazy" | "auto" | "eager";
727
+ marginHeight?: number;
728
+ marginheight?: string | number;
729
+ marginWidth?: number;
730
+ marginwidth?: string | number;
731
+ name?: string;
732
+ referrerPolicy?: ReferrerPolicy;
733
+ sandbox?: string;
734
+ scrolling?: string;
735
+ seamless?: boolean;
736
+ src?: string;
737
+ srcDoc?: string;
738
+ srcdoc?: string;
739
+ width?: number | string;
740
+ }
741
+ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
742
+ alt?: string;
743
+ crossOrigin?: string;
744
+ crossorigin?: string;
745
+ decoding?: "async" | "auto" | "sync";
746
+ importance?: "low" | "auto" | "high";
747
+ height?: number | string;
748
+ loading?: "lazy" | "auto" | "eager";
749
+ sizes?: string;
750
+ src?: string;
751
+ srcSet?: string;
752
+ srcset?: string;
753
+ useMap?: string;
754
+ usemap?: string;
755
+ width?: number | string;
756
+ }
757
+ interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
758
+ cite?: string;
759
+ dateTime?: string;
760
+ datetime?: string;
761
+ }
762
+ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
763
+ accept?: string;
764
+ allowdirs?: boolean;
765
+ alt?: string;
766
+ autoCapitalize?: string;
767
+ autocapitalize?: string;
768
+ autoComplete?: string;
769
+ autocomplete?: string;
770
+ capture?: string;
771
+ checked?: boolean;
772
+ crossOrigin?: string;
773
+ crossorigin?: string;
774
+ defaultChecked?: boolean;
775
+ defaultValue?: string;
776
+ dirName?: string;
777
+ disabled?: boolean;
778
+ files?: any;
779
+ form?: string;
780
+ formAction?: string;
781
+ formaction?: string;
782
+ formEncType?: string;
783
+ formenctype?: string;
784
+ formMethod?: string;
785
+ formmethod?: string;
786
+ formNoValidate?: boolean;
787
+ formnovalidate?: boolean;
788
+ formTarget?: string;
789
+ formtarget?: string;
790
+ height?: number | string;
791
+ indeterminate?: boolean;
792
+ list?: string;
793
+ max?: number | string;
794
+ maxLength?: number;
795
+ maxlength?: number | string;
796
+ min?: number | string;
797
+ minLength?: number;
798
+ minlength?: number | string;
799
+ multiple?: boolean;
800
+ name?: string;
801
+ onSelect?: (event: Event) => void;
802
+ onselect?: (event: Event) => void;
803
+ pattern?: string;
804
+ placeholder?: string;
805
+ readOnly?: boolean;
806
+ readonly?: boolean | string;
807
+ required?: boolean;
808
+ selectionStart?: number | string;
809
+ selectionEnd?: number | string;
810
+ selectionDirection?: string;
811
+ size?: number;
812
+ src?: string;
813
+ step?: number | string;
814
+ type?: string;
815
+ value?: string | string[] | number;
816
+ valueAsDate?: any;
817
+ valueAsNumber?: any;
818
+ webkitdirectory?: boolean;
819
+ webkitEntries?: any;
820
+ width?: number | string;
821
+ popoverTargetAction?: string;
822
+ popoverTargetElement?: Element | null;
823
+ popoverTarget?: string;
824
+ }
825
+ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
826
+ challenge?: string;
827
+ disabled?: boolean;
828
+ form?: string;
829
+ keyType?: string;
830
+ keytype?: string;
831
+ keyParams?: string;
832
+ keyparams?: string;
833
+ name?: string;
834
+ }
835
+ interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
836
+ form?: string;
837
+ htmlFor?: string;
838
+ }
839
+ interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
840
+ value?: string | string[] | number;
841
+ }
842
+ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
843
+ as?: string;
844
+ href?: string;
845
+ hrefLang?: string;
846
+ hreflang?: string;
847
+ importance?: "low" | "auto" | "high";
848
+ integrity?: string;
849
+ media?: string;
850
+ rel?: string;
851
+ sizes?: string;
852
+ type?: string;
853
+ }
854
+ interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
855
+ name?: string;
856
+ }
857
+ interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
858
+ type?: string;
859
+ }
860
+ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
861
+ autoPlay?: boolean;
862
+ autoplay?: boolean | string;
863
+ controls?: boolean;
864
+ controlslist?: "nodownload" | "nofullscreen" | "noremoteplayback";
865
+ controlsList?: "nodownload" | "nofullscreen" | "noremoteplayback";
866
+ crossOrigin?: string;
867
+ crossorigin?: string;
868
+ loop?: boolean;
869
+ mediaGroup?: string;
870
+ mediagroup?: string;
871
+ muted?: boolean;
872
+ preload?: string;
873
+ src?: string;
874
+ onAbort?: (event: Event) => void;
875
+ onCanPlay?: (event: Event) => void;
876
+ onCanPlayThrough?: (event: Event) => void;
877
+ onDurationChange?: (event: Event) => void;
878
+ onEmptied?: (event: Event) => void;
879
+ onEnded?: (event: Event) => void;
880
+ onError?: (event: Event) => void;
881
+ onInterruptBegin?: (event: Event) => void;
882
+ onInterruptEnd?: (event: Event) => void;
883
+ onLoadedData?: (event: Event) => void;
884
+ onLoadedMetaData?: (event: Event) => void;
885
+ onLoadStart?: (event: Event) => void;
886
+ onMozAudioAvailable?: (event: Event) => void;
887
+ onPause?: (event: Event) => void;
888
+ onPlay?: (event: Event) => void;
889
+ onPlaying?: (event: Event) => void;
890
+ onProgress?: (event: Event) => void;
891
+ onRateChange?: (event: Event) => void;
892
+ onSeeked?: (event: Event) => void;
893
+ onSeeking?: (event: Event) => void;
894
+ onStalled?: (event: Event) => void;
895
+ onSuspend?: (event: Event) => void;
896
+ onTimeUpdate?: (event: Event) => void;
897
+ onVolumeChange?: (event: Event) => void;
898
+ onWaiting?: (event: Event) => void;
899
+ }
900
+ interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
901
+ charSet?: string;
902
+ charset?: string;
903
+ content?: string;
904
+ httpEquiv?: string;
905
+ httpequiv?: string;
906
+ name?: string;
907
+ }
908
+ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
909
+ form?: string;
910
+ high?: number;
911
+ low?: number;
912
+ max?: number | string;
913
+ min?: number | string;
914
+ optimum?: number;
915
+ value?: string | string[] | number;
916
+ }
917
+ interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
918
+ cite?: string;
919
+ }
920
+ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
921
+ classID?: string;
922
+ classid?: string;
923
+ data?: string;
924
+ form?: string;
925
+ height?: number | string;
926
+ name?: string;
927
+ type?: string;
928
+ useMap?: string;
929
+ usemap?: string;
930
+ width?: number | string;
931
+ wmode?: string;
932
+ }
933
+ interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
934
+ reversed?: boolean;
935
+ start?: number;
936
+ }
937
+ interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
938
+ disabled?: boolean;
939
+ label?: string;
940
+ }
941
+ interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
942
+ disabled?: boolean;
943
+ label?: string;
944
+ selected?: boolean;
945
+ value?: string | string[] | number;
946
+ }
947
+ interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
948
+ form?: string;
949
+ htmlFor?: string;
950
+ name?: string;
951
+ }
952
+ interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
953
+ name?: string;
954
+ value?: string | string[] | number;
955
+ }
956
+ interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
957
+ max?: number | string;
958
+ value?: string | string[] | number;
959
+ }
960
+ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
961
+ async?: boolean;
962
+ charSet?: string;
963
+ charset?: string;
964
+ crossOrigin?: string;
965
+ crossorigin?: string;
966
+ defer?: boolean;
967
+ importance?: "low" | "auto" | "high";
968
+ integrity?: string;
969
+ nonce?: string;
970
+ src?: string;
971
+ type?: string;
972
+ }
973
+ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
974
+ disabled?: boolean;
975
+ form?: string;
976
+ multiple?: boolean;
977
+ name?: string;
978
+ required?: boolean;
979
+ size?: number;
980
+ autoComplete?: string;
981
+ autocomplete?: string;
982
+ }
983
+ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
984
+ height?: number;
985
+ media?: string;
986
+ sizes?: string;
987
+ src?: string;
988
+ srcSet?: string;
989
+ type?: string;
990
+ width?: number;
991
+ }
992
+ interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
993
+ media?: string;
994
+ nonce?: string;
995
+ scoped?: boolean;
996
+ type?: string;
997
+ }
998
+ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
999
+ cellPadding?: number | string;
1000
+ cellpadding?: number | string;
1001
+ cellSpacing?: number | string;
1002
+ cellspacing?: number | string;
1003
+ summary?: string;
1004
+ }
1005
+ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
1006
+ autoComplete?: string;
1007
+ autocomplete?: string;
1008
+ cols?: number;
1009
+ disabled?: boolean;
1010
+ form?: string;
1011
+ maxLength?: number;
1012
+ maxlength?: number | string;
1013
+ minLength?: number;
1014
+ minlength?: number | string;
1015
+ name?: string;
1016
+ onSelect?: (event: Event) => void;
1017
+ onselect?: (event: Event) => void;
1018
+ placeholder?: string;
1019
+ readOnly?: boolean;
1020
+ readonly?: boolean | string;
1021
+ required?: boolean;
1022
+ rows?: number;
1023
+ value?: string | string[] | number;
1024
+ wrap?: string;
1025
+ }
1026
+ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
1027
+ colSpan?: number;
1028
+ headers?: string;
1029
+ rowSpan?: number;
1030
+ }
1031
+ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
1032
+ abbr?: string;
1033
+ colSpan?: number;
1034
+ headers?: string;
1035
+ rowSpan?: number;
1036
+ rowspan?: number | string;
1037
+ scope?: string;
1038
+ }
1039
+ interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
1040
+ dateTime?: string;
1041
+ }
1042
+ interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
1043
+ default?: boolean;
1044
+ kind?: string;
1045
+ label?: string;
1046
+ src?: string;
1047
+ srcLang?: string;
1048
+ srclang?: string;
1049
+ }
1050
+ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
1051
+ height?: number | string;
1052
+ playsInline?: boolean;
1053
+ playsinline?: boolean | string;
1054
+ poster?: string;
1055
+ width?: number | string;
1056
+ }
1057
+ interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
1058
+ innerHTML?: string;
1059
+ accessKey?: string;
1060
+ autoFocus?: boolean;
1061
+ autofocus?: boolean | string;
1062
+ class?: string | {
1063
+ [className: string]: boolean;
1064
+ };
1065
+ contentEditable?: boolean | string;
1066
+ contenteditable?: boolean | string;
1067
+ contextMenu?: string;
1068
+ contextmenu?: string;
1069
+ dir?: string;
1070
+ draggable?: boolean;
1071
+ hidden?: boolean;
1072
+ id?: string;
1073
+ inert?: boolean;
1074
+ lang?: string;
1075
+ spellcheck?: "true" | "false" | any;
1076
+ style?: {
1077
+ [key: string]: string | undefined;
1078
+ };
1079
+ tabIndex?: number;
1080
+ tabindex?: number | string;
1081
+ title?: string;
1082
+ popover?: string | null;
1083
+ inputMode?: string;
1084
+ inputmode?: string;
1085
+ enterKeyHint?: string;
1086
+ enterkeyhint?: string;
1087
+ is?: string;
1088
+ radioGroup?: string;
1089
+ radiogroup?: string;
1090
+ role?: string;
1091
+ about?: string;
1092
+ datatype?: string;
1093
+ inlist?: any;
1094
+ prefix?: string;
1095
+ property?: string;
1096
+ resource?: string;
1097
+ typeof?: string;
1098
+ vocab?: string;
1099
+ autoCapitalize?: string;
1100
+ autocapitalize?: string;
1101
+ autoCorrect?: string;
1102
+ autocorrect?: string;
1103
+ autoSave?: string;
1104
+ autosave?: string;
1105
+ color?: string;
1106
+ itemProp?: string;
1107
+ itemprop?: string;
1108
+ itemScope?: boolean;
1109
+ itemscope?: boolean;
1110
+ itemType?: string;
1111
+ itemtype?: string;
1112
+ itemID?: string;
1113
+ itemid?: string;
1114
+ itemRef?: string;
1115
+ itemref?: string;
1116
+ results?: number;
1117
+ security?: string;
1118
+ unselectable?: boolean;
1119
+ }
1120
+ interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
1121
+ class?: string | {
1122
+ [className: string]: boolean;
1123
+ };
1124
+ color?: string;
1125
+ height?: number | string;
1126
+ id?: string;
1127
+ lang?: string;
1128
+ max?: number | string;
1129
+ media?: string;
1130
+ method?: string;
1131
+ min?: number | string;
1132
+ name?: string;
1133
+ style?: {
1134
+ [key: string]: string | undefined;
1135
+ };
1136
+ target?: string;
1137
+ type?: string;
1138
+ width?: number | string;
1139
+ role?: string;
1140
+ tabindex?: number;
1141
+ "accent-height"?: number | string;
1142
+ accumulate?: "none" | "sum";
1143
+ additive?: "replace" | "sum";
1144
+ "alignment-baseline"?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit";
1145
+ allowReorder?: "no" | "yes";
1146
+ alphabetic?: number | string;
1147
+ amplitude?: number | string;
1148
+ "arabic-form"?: "initial" | "medial" | "terminal" | "isolated";
1149
+ ascent?: number | string;
1150
+ attributeName?: string;
1151
+ attributeType?: string;
1152
+ autoReverse?: number | string;
1153
+ azimuth?: number | string;
1154
+ baseFrequency?: number | string;
1155
+ "baseline-shift"?: number | string;
1156
+ baseProfile?: number | string;
1157
+ bbox?: number | string;
1158
+ begin?: number | string;
1159
+ bias?: number | string;
1160
+ by?: number | string;
1161
+ calcMode?: number | string;
1162
+ "cap-height"?: number | string;
1163
+ clip?: number | string;
1164
+ "clip-path"?: string;
1165
+ clipPathUnits?: number | string;
1166
+ "clip-rule"?: number | string;
1167
+ "color-interpolation"?: number | string;
1168
+ "color-interpolation-filters"?: "auto" | "sRGB" | "linearRGB";
1169
+ "color-profile"?: number | string;
1170
+ "color-rendering"?: number | string;
1171
+ contentScriptType?: number | string;
1172
+ contentStyleType?: number | string;
1173
+ cursor?: number | string;
1174
+ cx?: number | string;
1175
+ cy?: number | string;
1176
+ d?: string;
1177
+ decelerate?: number | string;
1178
+ descent?: number | string;
1179
+ diffuseConstant?: number | string;
1180
+ direction?: number | string;
1181
+ display?: number | string;
1182
+ divisor?: number | string;
1183
+ "dominant-baseline"?: number | string;
1184
+ dur?: number | string;
1185
+ dx?: number | string;
1186
+ dy?: number | string;
1187
+ "edge-mode"?: number | string;
1188
+ elevation?: number | string;
1189
+ "enable-background"?: number | string;
1190
+ end?: number | string;
1191
+ exponent?: number | string;
1192
+ externalResourcesRequired?: number | string;
1193
+ fill?: string;
1194
+ "fill-opacity"?: number | string;
1195
+ "fill-rule"?: "nonzero" | "evenodd" | "inherit";
1196
+ filter?: string;
1197
+ filterRes?: number | string;
1198
+ filterUnits?: number | string;
1199
+ "flood-color"?: number | string;
1200
+ "flood-opacity"?: number | string;
1201
+ focusable?: number | string;
1202
+ "font-family"?: string;
1203
+ "font-size"?: number | string;
1204
+ "font-size-adjust"?: number | string;
1205
+ "font-stretch"?: number | string;
1206
+ "font-style"?: number | string;
1207
+ "font-variant"?: number | string;
1208
+ "font-weight"?: number | string;
1209
+ format?: number | string;
1210
+ from?: number | string;
1211
+ fx?: number | string;
1212
+ fy?: number | string;
1213
+ g1?: number | string;
1214
+ g2?: number | string;
1215
+ "glyph-name"?: number | string;
1216
+ "glyph-orientation-horizontal"?: number | string;
1217
+ "glyph-orientation-vertical"?: number | string;
1218
+ glyphRef?: number | string;
1219
+ gradientTransform?: string;
1220
+ gradientUnits?: string;
1221
+ hanging?: number | string;
1222
+ "horiz-adv-x"?: number | string;
1223
+ "horiz-origin-x"?: number | string;
1224
+ href?: string;
1225
+ ideographic?: number | string;
1226
+ "image-rendering"?: number | string;
1227
+ in2?: number | string;
1228
+ in?: string;
1229
+ intercept?: number | string;
1230
+ k1?: number | string;
1231
+ k2?: number | string;
1232
+ k3?: number | string;
1233
+ k4?: number | string;
1234
+ k?: number | string;
1235
+ kernelMatrix?: number | string;
1236
+ kernelUnitLength?: number | string;
1237
+ kerning?: number | string;
1238
+ keyPoints?: number | string;
1239
+ keySplines?: number | string;
1240
+ keyTimes?: number | string;
1241
+ lengthAdjust?: number | string;
1242
+ "letter-spacing"?: number | string;
1243
+ "lighting-color"?: number | string;
1244
+ limitingConeAngle?: number | string;
1245
+ local?: number | string;
1246
+ "marker-end"?: string;
1247
+ markerHeight?: number | string;
1248
+ "marker-mid"?: string;
1249
+ "marker-start"?: string;
1250
+ markerUnits?: number | string;
1251
+ markerWidth?: number | string;
1252
+ mask?: string;
1253
+ maskContentUnits?: number | string;
1254
+ maskUnits?: number | string;
1255
+ mathematical?: number | string;
1256
+ mode?: number | string;
1257
+ numOctaves?: number | string;
1258
+ offset?: number | string;
1259
+ opacity?: number | string;
1260
+ operator?: number | string;
1261
+ order?: number | string;
1262
+ orient?: number | string;
1263
+ orientation?: number | string;
1264
+ origin?: number | string;
1265
+ overflow?: number | string;
1266
+ "overline-position"?: number | string;
1267
+ "overline-thickness"?: number | string;
1268
+ "paint-order"?: number | string;
1269
+ panose1?: number | string;
1270
+ pathLength?: number | string;
1271
+ patternContentUnits?: string;
1272
+ patternTransform?: number | string;
1273
+ patternUnits?: string;
1274
+ "pointer-events"?: number | string;
1275
+ points?: string;
1276
+ pointsAtX?: number | string;
1277
+ pointsAtY?: number | string;
1278
+ pointsAtZ?: number | string;
1279
+ preserveAlpha?: number | string;
1280
+ preserveAspectRatio?: string;
1281
+ primitiveUnits?: number | string;
1282
+ r?: number | string;
1283
+ radius?: number | string;
1284
+ refX?: number | string;
1285
+ refY?: number | string;
1286
+ "rendering-intent"?: number | string;
1287
+ repeatCount?: number | string;
1288
+ repeatDur?: number | string;
1289
+ requiredextensions?: number | string;
1290
+ requiredFeatures?: number | string;
1291
+ restart?: number | string;
1292
+ result?: string;
1293
+ rotate?: number | string;
1294
+ rx?: number | string;
1295
+ ry?: number | string;
1296
+ scale?: number | string;
1297
+ seed?: number | string;
1298
+ "shape-rendering"?: number | string;
1299
+ slope?: number | string;
1300
+ spacing?: number | string;
1301
+ specularConstant?: number | string;
1302
+ specularExponent?: number | string;
1303
+ speed?: number | string;
1304
+ spreadMethod?: string;
1305
+ startOffset?: number | string;
1306
+ stdDeviation?: number | string;
1307
+ stemh?: number | string;
1308
+ stemv?: number | string;
1309
+ stitchTiles?: number | string;
1310
+ "stop-color"?: string;
1311
+ "stop-opacity"?: number | string;
1312
+ "strikethrough-position"?: number | string;
1313
+ "strikethrough-thickness"?: number | string;
1314
+ string?: number | string;
1315
+ stroke?: string;
1316
+ "stroke-dasharray"?: string | number;
1317
+ "stroke-dashoffset"?: string | number;
1318
+ "stroke-linecap"?: "butt" | "round" | "square" | "inherit";
1319
+ "stroke-linejoin"?: "miter" | "round" | "bevel" | "inherit";
1320
+ "stroke-miterlimit"?: string;
1321
+ "stroke-opacity"?: number | string;
1322
+ "stroke-width"?: number | string;
1323
+ surfaceScale?: number | string;
1324
+ systemLanguage?: number | string;
1325
+ tableValues?: number | string;
1326
+ targetX?: number | string;
1327
+ targetY?: number | string;
1328
+ "text-anchor"?: string;
1329
+ "text-decoration"?: number | string;
1330
+ textLength?: number | string;
1331
+ "text-rendering"?: number | string;
1332
+ to?: number | string;
1333
+ transform?: string;
1334
+ u1?: number | string;
1335
+ u2?: number | string;
1336
+ "underline-position"?: number | string;
1337
+ "underline-thickness"?: number | string;
1338
+ unicode?: number | string;
1339
+ "unicode-bidi"?: number | string;
1340
+ "unicode-range"?: number | string;
1341
+ "units-per-em"?: number | string;
1342
+ "v-alphabetic"?: number | string;
1343
+ values?: string;
1344
+ "vector-effect"?: number | string;
1345
+ version?: string;
1346
+ "vert-adv-y"?: number | string;
1347
+ "vert-origin-x"?: number | string;
1348
+ "vert-origin-y"?: number | string;
1349
+ "v-hanging"?: number | string;
1350
+ "v-ideographic"?: number | string;
1351
+ viewBox?: string;
1352
+ viewTarget?: number | string;
1353
+ visibility?: number | string;
1354
+ "v-mathematical"?: number | string;
1355
+ widths?: number | string;
1356
+ "word-spacing"?: number | string;
1357
+ "writing-mode"?: number | string;
1358
+ x1?: number | string;
1359
+ x2?: number | string;
1360
+ x?: number | string;
1361
+ "x-channel-selector"?: string;
1362
+ "x-height"?: number | string;
1363
+ xlinkActuate?: string;
1364
+ xlinkArcrole?: string;
1365
+ xlinkHref?: string;
1366
+ xlinkRole?: string;
1367
+ xlinkShow?: string;
1368
+ xlinkTitle?: string;
1369
+ xlinkType?: string;
1370
+ xmlBase?: string;
1371
+ xmlLang?: string;
1372
+ xmlns?: string;
1373
+ xmlSpace?: string;
1374
+ y1?: number | string;
1375
+ y2?: number | string;
1376
+ y?: number | string;
1377
+ yChannelSelector?: string;
1378
+ z?: number | string;
1379
+ zoomAndPan?: string;
1380
+ }
1381
+ interface DOMAttributes<T> extends JSXAttributes<T> {
1382
+ slot?: string;
1383
+ part?: string;
1384
+ exportparts?: string;
1385
+ onCopy?: (event: ClipboardEvent) => void;
1386
+ onCopyCapture?: (event: ClipboardEvent) => void;
1387
+ onCut?: (event: ClipboardEvent) => void;
1388
+ onCutCapture?: (event: ClipboardEvent) => void;
1389
+ onPaste?: (event: ClipboardEvent) => void;
1390
+ onPasteCapture?: (event: ClipboardEvent) => void;
1391
+ onCompositionend?: (event: CompositionEvent) => void;
1392
+ onCompositionendCapture?: (event: CompositionEvent) => void;
1393
+ onCompositionstart?: (event: CompositionEvent) => void;
1394
+ onCompositionstartCapture?: (event: CompositionEvent) => void;
1395
+ onCompositionupdate?: (event: CompositionEvent) => void;
1396
+ onCompositionupdateCapture?: (event: CompositionEvent) => void;
1397
+ onFocus?: (event: FocusEvent) => void;
1398
+ onFocusCapture?: (event: FocusEvent) => void;
1399
+ onFocusin?: (event: FocusEvent) => void;
1400
+ onFocusinCapture?: (event: FocusEvent) => void;
1401
+ onFocusout?: (event: FocusEvent) => void;
1402
+ onFocusoutCapture?: (event: FocusEvent) => void;
1403
+ onBlur?: (event: FocusEvent) => void;
1404
+ onBlurCapture?: (event: FocusEvent) => void;
1405
+ onChange?: (event: Event) => void;
1406
+ onChangeCapture?: (event: Event) => void;
1407
+ onInput?: (event: InputEvent) => void;
1408
+ onInputCapture?: (event: InputEvent) => void;
1409
+ onReset?: (event: Event) => void;
1410
+ onResetCapture?: (event: Event) => void;
1411
+ onSubmit?: (event: Event) => void;
1412
+ onSubmitCapture?: (event: Event) => void;
1413
+ onInvalid?: (event: Event) => void;
1414
+ onInvalidCapture?: (event: Event) => void;
1415
+ onBeforeToggle?: (event: Event) => void;
1416
+ onBeforeToggleCapture?: (event: Event) => void;
1417
+ onToggle?: (event: Event) => void;
1418
+ onToggleCapture?: (event: Event) => void;
1419
+ onLoad?: (event: Event) => void;
1420
+ onLoadCapture?: (event: Event) => void;
1421
+ onError?: (event: Event) => void;
1422
+ onErrorCapture?: (event: Event) => void;
1423
+ onKeyDown?: (event: KeyboardEvent) => void;
1424
+ onKeyDownCapture?: (event: KeyboardEvent) => void;
1425
+ onKeyPress?: (event: KeyboardEvent) => void;
1426
+ onKeyPressCapture?: (event: KeyboardEvent) => void;
1427
+ onKeyUp?: (event: KeyboardEvent) => void;
1428
+ onKeyUpCapture?: (event: KeyboardEvent) => void;
1429
+ onAuxClick?: (event: MouseEvent) => void;
1430
+ onClick?: (event: MouseEvent) => void;
1431
+ onClickCapture?: (event: MouseEvent) => void;
1432
+ onContextMenu?: (event: MouseEvent) => void;
1433
+ onContextMenuCapture?: (event: MouseEvent) => void;
1434
+ onDblClick?: (event: MouseEvent) => void;
1435
+ onDblClickCapture?: (event: MouseEvent) => void;
1436
+ onDrag?: (event: DragEvent) => void;
1437
+ onDragCapture?: (event: DragEvent) => void;
1438
+ onDragEnd?: (event: DragEvent) => void;
1439
+ onDragEndCapture?: (event: DragEvent) => void;
1440
+ onDragEnter?: (event: DragEvent) => void;
1441
+ onDragEnterCapture?: (event: DragEvent) => void;
1442
+ onDragExit?: (event: DragEvent) => void;
1443
+ onDragExitCapture?: (event: DragEvent) => void;
1444
+ onDragLeave?: (event: DragEvent) => void;
1445
+ onDragLeaveCapture?: (event: DragEvent) => void;
1446
+ onDragOver?: (event: DragEvent) => void;
1447
+ onDragOverCapture?: (event: DragEvent) => void;
1448
+ onDragStart?: (event: DragEvent) => void;
1449
+ onDragStartCapture?: (event: DragEvent) => void;
1450
+ onDrop?: (event: DragEvent) => void;
1451
+ onDropCapture?: (event: DragEvent) => void;
1452
+ onMouseDown?: (event: MouseEvent) => void;
1453
+ onMouseDownCapture?: (event: MouseEvent) => void;
1454
+ onMouseEnter?: (event: MouseEvent) => void;
1455
+ onMouseLeave?: (event: MouseEvent) => void;
1456
+ onMouseMove?: (event: MouseEvent) => void;
1457
+ onMouseMoveCapture?: (event: MouseEvent) => void;
1458
+ onMouseOut?: (event: MouseEvent) => void;
1459
+ onMouseOutCapture?: (event: MouseEvent) => void;
1460
+ onMouseOver?: (event: MouseEvent) => void;
1461
+ onMouseOverCapture?: (event: MouseEvent) => void;
1462
+ onMouseUp?: (event: MouseEvent) => void;
1463
+ onMouseUpCapture?: (event: MouseEvent) => void;
1464
+ onTouchCancel?: (event: TouchEvent) => void;
1465
+ onTouchCancelCapture?: (event: TouchEvent) => void;
1466
+ onTouchEnd?: (event: TouchEvent) => void;
1467
+ onTouchEndCapture?: (event: TouchEvent) => void;
1468
+ onTouchMove?: (event: TouchEvent) => void;
1469
+ onTouchMoveCapture?: (event: TouchEvent) => void;
1470
+ onTouchStart?: (event: TouchEvent) => void;
1471
+ onTouchStartCapture?: (event: TouchEvent) => void;
1472
+ onPointerDown?: (event: PointerEvent) => void;
1473
+ onPointerDownCapture?: (event: PointerEvent) => void;
1474
+ onPointerMove?: (event: PointerEvent) => void;
1475
+ onPointerMoveCapture?: (event: PointerEvent) => void;
1476
+ onPointerUp?: (event: PointerEvent) => void;
1477
+ onPointerUpCapture?: (event: PointerEvent) => void;
1478
+ onPointerCancel?: (event: PointerEvent) => void;
1479
+ onPointerCancelCapture?: (event: PointerEvent) => void;
1480
+ onPointerEnter?: (event: PointerEvent) => void;
1481
+ onPointerEnterCapture?: (event: PointerEvent) => void;
1482
+ onPointerLeave?: (event: PointerEvent) => void;
1483
+ onPointerLeaveCapture?: (event: PointerEvent) => void;
1484
+ onPointerOver?: (event: PointerEvent) => void;
1485
+ onPointerOverCapture?: (event: PointerEvent) => void;
1486
+ onPointerOut?: (event: PointerEvent) => void;
1487
+ onPointerOutCapture?: (event: PointerEvent) => void;
1488
+ onGotPointerCapture?: (event: PointerEvent) => void;
1489
+ onGotPointerCaptureCapture?: (event: PointerEvent) => void;
1490
+ onLostPointerCapture?: (event: PointerEvent) => void;
1491
+ onLostPointerCaptureCapture?: (event: PointerEvent) => void;
1492
+ onScroll?: (event: UIEvent) => void;
1493
+ onScrollCapture?: (event: UIEvent) => void;
1494
+ onWheel?: (event: WheelEvent) => void;
1495
+ onWheelCapture?: (event: WheelEvent) => void;
1496
+ onAnimationStart?: (event: AnimationEvent) => void;
1497
+ onAnimationStartCapture?: (event: AnimationEvent) => void;
1498
+ onAnimationEnd?: (event: AnimationEvent) => void;
1499
+ onAnimationEndCapture?: (event: AnimationEvent) => void;
1500
+ onAnimationIteration?: (event: AnimationEvent) => void;
1501
+ onAnimationIterationCapture?: (event: AnimationEvent) => void;
1502
+ onTransitionCancel?: (event: TransitionEvent) => void;
1503
+ onTransitionCancelCapture?: (event: TransitionEvent) => void;
1504
+ onTransitionEnd?: (event: TransitionEvent) => void;
1505
+ onTransitionEndCapture?: (event: TransitionEvent) => void;
1506
+ onTransitionRun?: (event: TransitionEvent) => void;
1507
+ onTransitionRunCapture?: (event: TransitionEvent) => void;
1508
+ onTransitionStart?: (event: TransitionEvent) => void;
1509
+ onTransitionStartCapture?: (event: TransitionEvent) => void;
1510
+ }
1511
+ }
1512
+ export interface JSXAttributes<T = Element> {
1513
+ key?: string | number;
1514
+ ref?: (elm?: T) => void;
1515
+ }
1516
+ export type SearchcraftSelectOption = {
1517
+ label: string;
1518
+ value: string | number;
1519
+ selected?: boolean;
1520
+ };
1521
+ declare namespace Components {
1522
+ /**
1523
+ * An inline ad meant to be rendered in a list of search results.
1524
+ */
1525
+ interface SearchcraftAd {
1526
+ "adClientResponseItem"?: AdClientResponseItem;
1527
+ "adSource": SearchcraftAdSource;
1528
+ }
1529
+ /**
1530
+ * This web component is designed to display detailed information for a single search result.
1531
+ * Once a query is submitted, the component formats and presents the result.
1532
+ * It is consumed within the `searchcraft-base-search-results` component.
1533
+ */
1534
+ interface SearchcraftBaseSearchResult {
1535
+ /**
1536
+ * The relationship between the current document and the link for the button rendered when containerHref is not present.
1537
+ */
1538
+ "buttonRel"?: "noreferrer" | "noopener" | "nofollow";
1539
+ /**
1540
+ * Where to open the link for the button rendered when containerHref is not present.
1541
+ */
1542
+ "buttonTarget": "_blank" | "_self" | "_top" | "_parent";
1543
+ /**
1544
+ * The relationship between the current document and the link for the containing element.
1545
+ */
1546
+ "containerRel"?: "noreferrer" | "noopener" | "nofollow";
1547
+ /**
1548
+ * Where to open the link for the containing element.
1549
+ */
1550
+ "containerTarget": "_blank" | "_self" | "_top" | "_parent";
1551
+ /**
1552
+ * A custom styles object.
1553
+ */
1554
+ "customStyles"?: string;
1555
+ /**
1556
+ * The position in the document. Used with the "document_clicked" measure event.
1557
+ */
1558
+ "documentPosition": number;
1559
+ /**
1560
+ * The placement of the image.
1561
+ */
1562
+ "imagePlacement": "left" | "right";
1563
+ "item"?: SearchClientResponseItem;
1564
+ "searchResultMappings"?: SearchResultMappings;
1565
+ }
1566
+ /**
1567
+ * This web component is responsible for displaying the results of a search query.
1568
+ * Once a query is submitted, the component formats and presents an ordered list of the results.
1569
+ * ## Usage
1570
+ * ```html
1571
+ * <!-- index.html -->
1572
+ * <searchcraft-base-search-results
1573
+ * ad-interval="4"
1574
+ * place-ad-at-start="false"
1575
+ * result-image-placement="right"
1576
+ * />
1577
+ * ```
1578
+ * ```js
1579
+ * // index.js
1580
+ * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
1581
+ * baseSearchResults.searchResultMappings = containerHref: {
1582
+ * fieldNames: [
1583
+ * {
1584
+ * fieldName: 'canonical_link',
1585
+ * dataType: 'text',
1586
+ * },
1587
+ * ],
1588
+ * };
1589
+ * baseSearchResults.addEventListener('noResults', () => {
1590
+ * console.log('No search results found');
1591
+ * });
1592
+ * ```
1593
+ */
1594
+ interface SearchcraftBaseSearchResults {
1595
+ /**
1596
+ * The label for the button rendered when containerHref is not present for each result.
1597
+ */
1598
+ "buttonLabel"?: string;
1599
+ /**
1600
+ * The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
1601
+ */
1602
+ "buttonRel"?: "noreferrer" | "noopener" | "nofollow";
1603
+ /**
1604
+ * Where to open the link for the button rendered when containerHref is not present for each result.
1605
+ */
1606
+ "buttonTarget": "_blank" | "_self" | "_top" | "_parent";
1607
+ /**
1608
+ * The relationship between the current document and the link for the containing element for each result.
1609
+ */
1610
+ "containerRel"?: "noreferrer" | "noopener" | "nofollow";
1611
+ /**
1612
+ * Where to open the link for the containing element for each result.
1613
+ */
1614
+ "containerTarget": "_blank" | "_self" | "_top" | "_parent";
1615
+ /**
1616
+ * A custom styles object.
1617
+ */
1618
+ "customStylesForResults"?: string | Record<string, Record<string, string>>;
1619
+ /**
1620
+ * The placement of the image for each result.
1621
+ */
1622
+ "resultImagePlacement": "left" | "right";
1623
+ /**
1624
+ * Formats the content rendered for each result.
1625
+ */
1626
+ "searchResultMappings"?: SearchResultMappings;
1627
+ }
1628
+ /**
1629
+ * This web component represents a button to be consumed within the `search-input-form` component.
1630
+ * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
1631
+ * It is consumed within the `searchcraft-input-form` component.
1632
+ */
1633
+ interface SearchcraftButton {
1634
+ /**
1635
+ * Whether the button is disabled.
1636
+ */
1637
+ "disabled"?: boolean;
1638
+ /**
1639
+ * Controls the visual representation of the button.
1640
+ */
1641
+ "hierarchy"?: "primary" | "tertiary";
1642
+ /**
1643
+ * The icon element.
1644
+ */
1645
+ "icon"?: Element;
1646
+ /**
1647
+ * Should the button only display an icon.
1648
+ */
1649
+ "iconOnly"?: boolean;
1650
+ /**
1651
+ * The position of the icon.
1652
+ */
1653
+ "iconPosition"?: "left" | "right";
1654
+ /**
1655
+ * The label for the button.
1656
+ */
1657
+ "label": string;
1658
+ /**
1659
+ * The type of the button.
1660
+ */
1661
+ "type"?: "submit" | "reset" | "button";
1662
+ }
1663
+ /**
1664
+ * 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.
1665
+ * ## Usage
1666
+ * ```html
1667
+ * <!-- index.html -->
1668
+ * <searchcraft-error-message error-message="No search results found for query" />
1669
+ * ```
1670
+ */
1671
+ interface SearchcraftErrorMessage {
1672
+ /**
1673
+ * The error message.
1674
+ */
1675
+ "errorMessage"?: string;
1676
+ }
1677
+ /**
1678
+ * 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.
1679
+ * It is consumed within the `searchcraft-filter-panel`.
1680
+ * ## Usage
1681
+ * ```html
1682
+ * <!-- index.html -->
1683
+ * <searchcraft-facet-list field-name="title" />
1684
+ * ```
1685
+ * ```js
1686
+ * // index.js
1687
+ * const facetList = document.querySelector('searchcraft-facet-list');
1688
+ * facetList.addEventListener('facetSelectionUpdated', () => {
1689
+ * console.log('Facet selection updated');
1690
+ * });
1691
+ * ```
1692
+ */
1693
+ interface SearchcraftFacetList {
1694
+ /**
1695
+ * The name of the field where facets are applied.
1696
+ */
1697
+ "fieldName": string;
1698
+ }
1699
+ /**
1700
+ * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
1701
+ * ## Usage
1702
+ * ```html
1703
+ * <!-- index.html -->
1704
+ * <searchcraft-filter-panel />
1705
+ * ```
1706
+ */
1707
+ interface SearchcraftFilterPanel {
1708
+ /**
1709
+ * The items to filter.
1710
+ */
1711
+ "items": FilterItem[];
1712
+ }
1713
+ /**
1714
+ * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
1715
+ * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
1716
+ * ## Usage
1717
+ * ```html
1718
+ * <!-- index.html -->
1719
+ * <searchcraft-input-form placeholder-value="Search here" />
1720
+ * ```
1721
+ * ```js
1722
+ * // index.js
1723
+ * const searchInputForm = document.querySelector('searchcraft-input-form');
1724
+ * ```
1725
+ */
1726
+ interface SearchcraftInputForm {
1727
+ /**
1728
+ * Whether or not to automatically submit the search term when the input changes.
1729
+ */
1730
+ "autoSearch": boolean;
1731
+ /**
1732
+ * The label for the submit button.
1733
+ */
1734
+ "buttonLabel"?: string;
1735
+ /**
1736
+ * Where to place the search button.
1737
+ */
1738
+ "buttonPlacement": "left" | "right" | "none";
1739
+ "core"?: SearchcraftCore;
1740
+ /**
1741
+ * A custom styles object to be applied to the input element.
1742
+ */
1743
+ "customStyles": string | Record<string, string>;
1744
+ /**
1745
+ * The label rendered above the input.
1746
+ */
1747
+ "inputLabel"?: string;
1748
+ /**
1749
+ * The input element's placeholder value.
1750
+ */
1751
+ "placeholderValue": string;
1752
+ /**
1753
+ * The starting value of the input element.
1754
+ */
1755
+ "searchTerm": string;
1756
+ }
1757
+ /**
1758
+ * This web component serves as the input label for the searchcraft-input-form component.
1759
+ * ## Usage
1760
+ * ```html
1761
+ * <!-- index.html -->
1762
+ * <searchcraft-input-label label="Search" />
1763
+ * ```
1764
+ */
1765
+ interface SearchcraftInputLabel {
1766
+ /**
1767
+ * The classname applied to the label element.
1768
+ */
1769
+ "inputLabelClassName"?: string | undefined;
1770
+ "label": string;
1771
+ }
1772
+ /**
1773
+ * This web component is designed to facilitate pagination of search results.
1774
+ * Once a query is submitted, calculates the number for pages.
1775
+ * ## Usage
1776
+ * ```html
1777
+ * <!-- index.html -->
1778
+ * <searchcraft-pagination />
1779
+ * ```
1780
+ */
1781
+ interface SearchcraftPagination {
1782
+ /**
1783
+ * The custom styles object.
1784
+ */
1785
+ "customStyles"?: string;
1786
+ }
1787
+ /**
1788
+ * Renders a button which, when clicked, turns on popover visibility.
1789
+ */
1790
+ interface SearchcraftPopoverButton {
1791
+ }
1792
+ /**
1793
+ * 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.
1794
+ * ## Usage
1795
+ * ```html
1796
+ * <!-- index.html -->
1797
+ * <searchcraft-popover-form type="fullscreen" />
1798
+ * ```
1799
+ * ```js
1800
+ * // index.js
1801
+ * const popoverForm = document.querySelector('searchcraft-popover-form');
1802
+ * popoverForm.popoverResultMappings = {
1803
+ * containerHref: {
1804
+ * fieldNames: [
1805
+ * {
1806
+ * fieldName: 'canonical_link',
1807
+ * dataType: 'text',
1808
+ * },
1809
+ * ],
1810
+ * };
1811
+ * ```
1812
+ */
1813
+ interface SearchcraftPopoverForm {
1814
+ /**
1815
+ * The hotkey that activates the popover.
1816
+ */
1817
+ "hotkey": string;
1818
+ /**
1819
+ * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
1820
+ */
1821
+ "hotkeyModifier": "ctrl" | "meta" | "alt" | "option";
1822
+ /**
1823
+ * Formats the content rendered for each result.
1824
+ */
1825
+ "popoverResultMappings"?: PopoverResultMappings;
1826
+ /**
1827
+ * 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.
1828
+ */
1829
+ "type": "inline" | "fullscreen" | "modal";
1830
+ }
1831
+ /**
1832
+ * A single list item rendered in a searchcraft-popover-list-view.
1833
+ */
1834
+ interface SearchcraftPopoverListItem {
1835
+ /**
1836
+ * The document position relative to the search results (For Measure)
1837
+ */
1838
+ "documentPosition": number;
1839
+ "item": SearchClientResponseItem | undefined;
1840
+ "popoverResultMappings": PopoverResultMappings | undefined;
1841
+ }
1842
+ /**
1843
+ * This web component is designed to display a list of results within a popover interface.
1844
+ * It is consumed within the `searchcraft-popover-form` component.
1845
+ * ## Usage
1846
+ * ```html
1847
+ * <!-- index.html -->
1848
+ * <searchcraft-popover-list-view />
1849
+ * ```
1850
+ */
1851
+ interface SearchcraftPopoverListView {
1852
+ "adClientResponseItems": AdClientResponseItem[] | undefined;
1853
+ /**
1854
+ * The mappings that define how the data in the documents are mapped to the list-view-item elements.
1855
+ */
1856
+ "popoverResultMappings": PopoverResultMappings | undefined;
1857
+ /**
1858
+ * The items to render in the list view.
1859
+ */
1860
+ "searchClientResponseItems": SearchClientResponseItem[] | undefined;
1861
+ "searchResultsPage": number;
1862
+ "searchResultsPerPage": number;
1863
+ }
1864
+ /**
1865
+ * This web component is designed to display the number of results returned from a search query.
1866
+ * ## Usage
1867
+ * ```html
1868
+ * <!-- index.html -->
1869
+ * <script>
1870
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
1871
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
1872
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
1873
+ * </script>
1874
+ * <searchcraft-results-info />
1875
+ * ```
1876
+ */
1877
+ interface SearchcraftResultsInfo {
1878
+ /**
1879
+ * The custom formatter for the resulting string.
1880
+ * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
1881
+ */
1882
+ "customFormatter"?: (range: [
1883
+ string,
1884
+ string
1885
+ ], count: string, responseTime: string) => void;
1886
+ /**
1887
+ * The custom styles object.
1888
+ */
1889
+ "customStyles"?: string;
1890
+ }
1891
+ /**
1892
+ * This web component is designed to choose the number of search results displayed.
1893
+ * ## Usage
1894
+ * ```html
1895
+ * <!-- index.html -->
1896
+ * <searchcraft-search-results-per-page increment="20" />
1897
+ * ```
1898
+ */
1899
+ interface SearchcraftSearchResultsPerPage {
1900
+ /**
1901
+ * The custom styles object.
1902
+ */
1903
+ "customStyles"?: string;
1904
+ /**
1905
+ * 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.
1906
+ */
1907
+ "increment": string | number;
1908
+ }
1909
+ /**
1910
+ * This web component is designed to allow users to select between a group of options.
1911
+ * ## Usage
1912
+ * ```html
1913
+ * <!-- index.html -->
1914
+ * <searchcraft-select
1915
+ * inputId="searchcraft-select"
1916
+ * name="searchcraft-select"
1917
+ * options="[{ label: 'label', value: 'value' }]"
1918
+ * />
1919
+ * ```
1920
+ */
1921
+ interface SearchcraftSelect {
1922
+ /**
1923
+ * The caption displayed below the select input.
1924
+ */
1925
+ "caption"?: string;
1926
+ /**
1927
+ * A custom styles object.
1928
+ */
1929
+ "customStyles"?: string;
1930
+ /**
1931
+ * Whether the select input is disabled.
1932
+ */
1933
+ "disabled"?: boolean;
1934
+ /**
1935
+ * The ID for the select input.
1936
+ */
1937
+ "inputId": string;
1938
+ /**
1939
+ * The label of the select input.
1940
+ */
1941
+ "label"?: string;
1942
+ /**
1943
+ * The ID for the label of the select input.
1944
+ */
1945
+ "labelId"?: string;
1946
+ /**
1947
+ * The name of the select input.
1948
+ */
1949
+ "name": string;
1950
+ /**
1951
+ * The options for the select input.
1952
+ */
1953
+ "options": SearchcraftSelectOption[] | string;
1954
+ }
1955
+ /**
1956
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
1957
+ * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
1958
+ * It is consumed by the `searchcraft-filter-panel` component.
1959
+ */
1960
+ interface SearchcraftSlider {
1961
+ /**
1962
+ * The type of data allowed.
1963
+ */
1964
+ "dataType": "number" | "date";
1965
+ /**
1966
+ * The granularity that the value must adhere to.
1967
+ */
1968
+ "granularity": number;
1969
+ /**
1970
+ * The maximum value allowed.
1971
+ */
1972
+ "max": number;
1973
+ /**
1974
+ * The minimum value allowed.
1975
+ */
1976
+ "min": number;
1977
+ }
1978
+ /**
1979
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
1980
+ * It does not render anything visible, its only function is to manage the css styles on the page.
1981
+ * ## Usage
1982
+ * ```html
1983
+ * <!-- index.html -->
1984
+ * <searchcraft-theme theme="light" custom-theme="{}" />
1985
+ * ```
1986
+ */
1987
+ interface SearchcraftTheme {
1988
+ /**
1989
+ * The custom theme configuration object.
1990
+ */
1991
+ "customTheme"?: string;
1992
+ /**
1993
+ * The name of the theme.
1994
+ */
1995
+ "theme"?: string;
1996
+ }
1997
+ /**
1998
+ * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
1999
+ * It is consumed within the `searchcraft-filter-panel` component.
2000
+ */
2001
+ interface SearchcraftToggleButton {
2002
+ /**
2003
+ * The label.
2004
+ */
2005
+ "label": string;
2006
+ /**
2007
+ * The secondary label displayed below the main label.
2008
+ */
2009
+ "subLabel": string | undefined;
2010
+ }
2011
+ }
2012
+ export interface SearchcraftButtonCustomEvent<T> extends CustomEvent<T> {
2013
+ detail: T;
2014
+ target: HTMLSearchcraftButtonElement;
2015
+ }
2016
+ export interface SearchcraftFacetListCustomEvent<T> extends CustomEvent<T> {
2017
+ detail: T;
2018
+ target: HTMLSearchcraftFacetListElement;
2019
+ }
2020
+ export interface SearchcraftInputFormCustomEvent<T> extends CustomEvent<T> {
2021
+ detail: T;
2022
+ target: HTMLSearchcraftInputFormElement;
2023
+ }
2024
+ export interface SearchcraftSelectCustomEvent<T> extends CustomEvent<T> {
2025
+ detail: T;
2026
+ target: HTMLSearchcraftSelectElement;
2027
+ }
2028
+ export interface SearchcraftSliderCustomEvent<T> extends CustomEvent<T> {
2029
+ detail: T;
2030
+ target: HTMLSearchcraftSliderElement;
2031
+ }
2032
+ export interface SearchcraftToggleButtonCustomEvent<T> extends CustomEvent<T> {
2033
+ detail: T;
2034
+ target: HTMLSearchcraftToggleButtonElement;
2035
+ }
2036
+ declare global {
2037
+ /**
2038
+ * An inline ad meant to be rendered in a list of search results.
2039
+ */
2040
+ interface HTMLSearchcraftAdElement extends Components.SearchcraftAd, HTMLStencilElement {
2041
+ }
2042
+ var HTMLSearchcraftAdElement: {
2043
+ prototype: HTMLSearchcraftAdElement;
2044
+ new (): HTMLSearchcraftAdElement;
2045
+ };
2046
+ /**
2047
+ * This web component is designed to display detailed information for a single search result.
2048
+ * Once a query is submitted, the component formats and presents the result.
2049
+ * It is consumed within the `searchcraft-base-search-results` component.
2050
+ */
2051
+ interface HTMLSearchcraftBaseSearchResultElement extends Components.SearchcraftBaseSearchResult, HTMLStencilElement {
2052
+ }
2053
+ var HTMLSearchcraftBaseSearchResultElement: {
2054
+ prototype: HTMLSearchcraftBaseSearchResultElement;
2055
+ new (): HTMLSearchcraftBaseSearchResultElement;
2056
+ };
2057
+ /**
2058
+ * This web component is responsible for displaying the results of a search query.
2059
+ * Once a query is submitted, the component formats and presents an ordered list of the results.
2060
+ * ## Usage
2061
+ * ```html
2062
+ * <!-- index.html -->
2063
+ * <searchcraft-base-search-results
2064
+ * ad-interval="4"
2065
+ * place-ad-at-start="false"
2066
+ * result-image-placement="right"
2067
+ * />
2068
+ * ```
2069
+ * ```js
2070
+ * // index.js
2071
+ * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
2072
+ * baseSearchResults.searchResultMappings = containerHref: {
2073
+ * fieldNames: [
2074
+ * {
2075
+ * fieldName: 'canonical_link',
2076
+ * dataType: 'text',
2077
+ * },
2078
+ * ],
2079
+ * };
2080
+ * baseSearchResults.addEventListener('noResults', () => {
2081
+ * console.log('No search results found');
2082
+ * });
2083
+ * ```
2084
+ */
2085
+ interface HTMLSearchcraftBaseSearchResultsElement extends Components.SearchcraftBaseSearchResults, HTMLStencilElement {
2086
+ }
2087
+ var HTMLSearchcraftBaseSearchResultsElement: {
2088
+ prototype: HTMLSearchcraftBaseSearchResultsElement;
2089
+ new (): HTMLSearchcraftBaseSearchResultsElement;
2090
+ };
2091
+ interface HTMLSearchcraftButtonElementEventMap {
2092
+ "buttonClick": void;
2093
+ }
2094
+ /**
2095
+ * This web component represents a button to be consumed within the `search-input-form` component.
2096
+ * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
2097
+ * It is consumed within the `searchcraft-input-form` component.
2098
+ */
2099
+ interface HTMLSearchcraftButtonElement extends Components.SearchcraftButton, HTMLStencilElement {
2100
+ addEventListener<K extends keyof HTMLSearchcraftButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftButtonElement, ev: SearchcraftButtonCustomEvent<HTMLSearchcraftButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2101
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2102
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2103
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2104
+ removeEventListener<K extends keyof HTMLSearchcraftButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftButtonElement, ev: SearchcraftButtonCustomEvent<HTMLSearchcraftButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2105
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2106
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2107
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2108
+ }
2109
+ var HTMLSearchcraftButtonElement: {
2110
+ prototype: HTMLSearchcraftButtonElement;
2111
+ new (): HTMLSearchcraftButtonElement;
2112
+ };
2113
+ /**
2114
+ * 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.
2115
+ * ## Usage
2116
+ * ```html
2117
+ * <!-- index.html -->
2118
+ * <searchcraft-error-message error-message="No search results found for query" />
2119
+ * ```
2120
+ */
2121
+ interface HTMLSearchcraftErrorMessageElement extends Components.SearchcraftErrorMessage, HTMLStencilElement {
2122
+ }
2123
+ var HTMLSearchcraftErrorMessageElement: {
2124
+ prototype: HTMLSearchcraftErrorMessageElement;
2125
+ new (): HTMLSearchcraftErrorMessageElement;
2126
+ };
2127
+ interface HTMLSearchcraftFacetListElementEventMap {
2128
+ "facetSelectionUpdated": {
2129
+ paths: string[];
2130
+ };
2131
+ }
2132
+ /**
2133
+ * 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.
2134
+ * It is consumed within the `searchcraft-filter-panel`.
2135
+ * ## Usage
2136
+ * ```html
2137
+ * <!-- index.html -->
2138
+ * <searchcraft-facet-list field-name="title" />
2139
+ * ```
2140
+ * ```js
2141
+ * // index.js
2142
+ * const facetList = document.querySelector('searchcraft-facet-list');
2143
+ * facetList.addEventListener('facetSelectionUpdated', () => {
2144
+ * console.log('Facet selection updated');
2145
+ * });
2146
+ * ```
2147
+ */
2148
+ interface HTMLSearchcraftFacetListElement extends Components.SearchcraftFacetList, HTMLStencilElement {
2149
+ addEventListener<K extends keyof HTMLSearchcraftFacetListElementEventMap>(type: K, listener: (this: HTMLSearchcraftFacetListElement, ev: SearchcraftFacetListCustomEvent<HTMLSearchcraftFacetListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2150
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2151
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2152
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2153
+ removeEventListener<K extends keyof HTMLSearchcraftFacetListElementEventMap>(type: K, listener: (this: HTMLSearchcraftFacetListElement, ev: SearchcraftFacetListCustomEvent<HTMLSearchcraftFacetListElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2154
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2155
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2156
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2157
+ }
2158
+ var HTMLSearchcraftFacetListElement: {
2159
+ prototype: HTMLSearchcraftFacetListElement;
2160
+ new (): HTMLSearchcraftFacetListElement;
2161
+ };
2162
+ /**
2163
+ * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
2164
+ * ## Usage
2165
+ * ```html
2166
+ * <!-- index.html -->
2167
+ * <searchcraft-filter-panel />
2168
+ * ```
2169
+ */
2170
+ interface HTMLSearchcraftFilterPanelElement extends Components.SearchcraftFilterPanel, HTMLStencilElement {
2171
+ }
2172
+ var HTMLSearchcraftFilterPanelElement: {
2173
+ prototype: HTMLSearchcraftFilterPanelElement;
2174
+ new (): HTMLSearchcraftFilterPanelElement;
2175
+ };
2176
+ interface HTMLSearchcraftInputFormElementEventMap {
2177
+ "inputFocus": void;
2178
+ "inputBlur": void;
2179
+ "inputInit": void;
2180
+ }
2181
+ /**
2182
+ * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
2183
+ * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
2184
+ * ## Usage
2185
+ * ```html
2186
+ * <!-- index.html -->
2187
+ * <searchcraft-input-form placeholder-value="Search here" />
2188
+ * ```
2189
+ * ```js
2190
+ * // index.js
2191
+ * const searchInputForm = document.querySelector('searchcraft-input-form');
2192
+ * ```
2193
+ */
2194
+ interface HTMLSearchcraftInputFormElement extends Components.SearchcraftInputForm, HTMLStencilElement {
2195
+ addEventListener<K extends keyof HTMLSearchcraftInputFormElementEventMap>(type: K, listener: (this: HTMLSearchcraftInputFormElement, ev: SearchcraftInputFormCustomEvent<HTMLSearchcraftInputFormElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2196
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2197
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2198
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2199
+ removeEventListener<K extends keyof HTMLSearchcraftInputFormElementEventMap>(type: K, listener: (this: HTMLSearchcraftInputFormElement, ev: SearchcraftInputFormCustomEvent<HTMLSearchcraftInputFormElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2200
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2201
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2202
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2203
+ }
2204
+ var HTMLSearchcraftInputFormElement: {
2205
+ prototype: HTMLSearchcraftInputFormElement;
2206
+ new (): HTMLSearchcraftInputFormElement;
2207
+ };
2208
+ /**
2209
+ * This web component serves as the input label for the searchcraft-input-form component.
2210
+ * ## Usage
2211
+ * ```html
2212
+ * <!-- index.html -->
2213
+ * <searchcraft-input-label label="Search" />
2214
+ * ```
2215
+ */
2216
+ interface HTMLSearchcraftInputLabelElement extends Components.SearchcraftInputLabel, HTMLStencilElement {
2217
+ }
2218
+ var HTMLSearchcraftInputLabelElement: {
2219
+ prototype: HTMLSearchcraftInputLabelElement;
2220
+ new (): HTMLSearchcraftInputLabelElement;
2221
+ };
2222
+ /**
2223
+ * This web component is designed to facilitate pagination of search results.
2224
+ * Once a query is submitted, calculates the number for pages.
2225
+ * ## Usage
2226
+ * ```html
2227
+ * <!-- index.html -->
2228
+ * <searchcraft-pagination />
2229
+ * ```
2230
+ */
2231
+ interface HTMLSearchcraftPaginationElement extends Components.SearchcraftPagination, HTMLStencilElement {
2232
+ }
2233
+ var HTMLSearchcraftPaginationElement: {
2234
+ prototype: HTMLSearchcraftPaginationElement;
2235
+ new (): HTMLSearchcraftPaginationElement;
2236
+ };
2237
+ /**
2238
+ * Renders a button which, when clicked, turns on popover visibility.
2239
+ */
2240
+ interface HTMLSearchcraftPopoverButtonElement extends Components.SearchcraftPopoverButton, HTMLStencilElement {
2241
+ }
2242
+ var HTMLSearchcraftPopoverButtonElement: {
2243
+ prototype: HTMLSearchcraftPopoverButtonElement;
2244
+ new (): HTMLSearchcraftPopoverButtonElement;
2245
+ };
2246
+ /**
2247
+ * 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.
2248
+ * ## Usage
2249
+ * ```html
2250
+ * <!-- index.html -->
2251
+ * <searchcraft-popover-form type="fullscreen" />
2252
+ * ```
2253
+ * ```js
2254
+ * // index.js
2255
+ * const popoverForm = document.querySelector('searchcraft-popover-form');
2256
+ * popoverForm.popoverResultMappings = {
2257
+ * containerHref: {
2258
+ * fieldNames: [
2259
+ * {
2260
+ * fieldName: 'canonical_link',
2261
+ * dataType: 'text',
2262
+ * },
2263
+ * ],
2264
+ * };
2265
+ * ```
2266
+ */
2267
+ interface HTMLSearchcraftPopoverFormElement extends Components.SearchcraftPopoverForm, HTMLStencilElement {
2268
+ }
2269
+ var HTMLSearchcraftPopoverFormElement: {
2270
+ prototype: HTMLSearchcraftPopoverFormElement;
2271
+ new (): HTMLSearchcraftPopoverFormElement;
2272
+ };
2273
+ /**
2274
+ * A single list item rendered in a searchcraft-popover-list-view.
2275
+ */
2276
+ interface HTMLSearchcraftPopoverListItemElement extends Components.SearchcraftPopoverListItem, HTMLStencilElement {
2277
+ }
2278
+ var HTMLSearchcraftPopoverListItemElement: {
2279
+ prototype: HTMLSearchcraftPopoverListItemElement;
2280
+ new (): HTMLSearchcraftPopoverListItemElement;
2281
+ };
2282
+ /**
2283
+ * This web component is designed to display a list of results within a popover interface.
2284
+ * It is consumed within the `searchcraft-popover-form` component.
2285
+ * ## Usage
2286
+ * ```html
2287
+ * <!-- index.html -->
2288
+ * <searchcraft-popover-list-view />
2289
+ * ```
2290
+ */
2291
+ interface HTMLSearchcraftPopoverListViewElement extends Components.SearchcraftPopoverListView, HTMLStencilElement {
2292
+ }
2293
+ var HTMLSearchcraftPopoverListViewElement: {
2294
+ prototype: HTMLSearchcraftPopoverListViewElement;
2295
+ new (): HTMLSearchcraftPopoverListViewElement;
2296
+ };
2297
+ /**
2298
+ * This web component is designed to display the number of results returned from a search query.
2299
+ * ## Usage
2300
+ * ```html
2301
+ * <!-- index.html -->
2302
+ * <script>
2303
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
2304
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
2305
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
2306
+ * </script>
2307
+ * <searchcraft-results-info />
2308
+ * ```
2309
+ */
2310
+ interface HTMLSearchcraftResultsInfoElement extends Components.SearchcraftResultsInfo, HTMLStencilElement {
2311
+ }
2312
+ var HTMLSearchcraftResultsInfoElement: {
2313
+ prototype: HTMLSearchcraftResultsInfoElement;
2314
+ new (): HTMLSearchcraftResultsInfoElement;
2315
+ };
2316
+ /**
2317
+ * This web component is designed to choose the number of search results displayed.
2318
+ * ## Usage
2319
+ * ```html
2320
+ * <!-- index.html -->
2321
+ * <searchcraft-search-results-per-page increment="20" />
2322
+ * ```
2323
+ */
2324
+ interface HTMLSearchcraftSearchResultsPerPageElement extends Components.SearchcraftSearchResultsPerPage, HTMLStencilElement {
2325
+ }
2326
+ var HTMLSearchcraftSearchResultsPerPageElement: {
2327
+ prototype: HTMLSearchcraftSearchResultsPerPageElement;
2328
+ new (): HTMLSearchcraftSearchResultsPerPageElement;
2329
+ };
2330
+ interface HTMLSearchcraftSelectElementEventMap {
2331
+ "selectChange": string;
2332
+ }
2333
+ /**
2334
+ * This web component is designed to allow users to select between a group of options.
2335
+ * ## Usage
2336
+ * ```html
2337
+ * <!-- index.html -->
2338
+ * <searchcraft-select
2339
+ * inputId="searchcraft-select"
2340
+ * name="searchcraft-select"
2341
+ * options="[{ label: 'label', value: 'value' }]"
2342
+ * />
2343
+ * ```
2344
+ */
2345
+ interface HTMLSearchcraftSelectElement extends Components.SearchcraftSelect, HTMLStencilElement {
2346
+ addEventListener<K extends keyof HTMLSearchcraftSelectElementEventMap>(type: K, listener: (this: HTMLSearchcraftSelectElement, ev: SearchcraftSelectCustomEvent<HTMLSearchcraftSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2347
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2348
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2349
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2350
+ removeEventListener<K extends keyof HTMLSearchcraftSelectElementEventMap>(type: K, listener: (this: HTMLSearchcraftSelectElement, ev: SearchcraftSelectCustomEvent<HTMLSearchcraftSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2351
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2352
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2353
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2354
+ }
2355
+ var HTMLSearchcraftSelectElement: {
2356
+ prototype: HTMLSearchcraftSelectElement;
2357
+ new (): HTMLSearchcraftSelectElement;
2358
+ };
2359
+ interface HTMLSearchcraftSliderElementEventMap {
2360
+ "rangeChanged": any;
2361
+ }
2362
+ /**
2363
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
2364
+ * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
2365
+ * It is consumed by the `searchcraft-filter-panel` component.
2366
+ */
2367
+ interface HTMLSearchcraftSliderElement extends Components.SearchcraftSlider, HTMLStencilElement {
2368
+ addEventListener<K extends keyof HTMLSearchcraftSliderElementEventMap>(type: K, listener: (this: HTMLSearchcraftSliderElement, ev: SearchcraftSliderCustomEvent<HTMLSearchcraftSliderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2369
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2370
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2371
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2372
+ removeEventListener<K extends keyof HTMLSearchcraftSliderElementEventMap>(type: K, listener: (this: HTMLSearchcraftSliderElement, ev: SearchcraftSliderCustomEvent<HTMLSearchcraftSliderElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2373
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2374
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2375
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2376
+ }
2377
+ var HTMLSearchcraftSliderElement: {
2378
+ prototype: HTMLSearchcraftSliderElement;
2379
+ new (): HTMLSearchcraftSliderElement;
2380
+ };
2381
+ /**
2382
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
2383
+ * It does not render anything visible, its only function is to manage the css styles on the page.
2384
+ * ## Usage
2385
+ * ```html
2386
+ * <!-- index.html -->
2387
+ * <searchcraft-theme theme="light" custom-theme="{}" />
2388
+ * ```
2389
+ */
2390
+ interface HTMLSearchcraftThemeElement extends Components.SearchcraftTheme, HTMLStencilElement {
2391
+ }
2392
+ var HTMLSearchcraftThemeElement: {
2393
+ prototype: HTMLSearchcraftThemeElement;
2394
+ new (): HTMLSearchcraftThemeElement;
2395
+ };
2396
+ interface HTMLSearchcraftToggleButtonElementEventMap {
2397
+ "toggleUpdated": boolean;
2398
+ }
2399
+ /**
2400
+ * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
2401
+ * It is consumed within the `searchcraft-filter-panel` component.
2402
+ */
2403
+ interface HTMLSearchcraftToggleButtonElement extends Components.SearchcraftToggleButton, HTMLStencilElement {
2404
+ addEventListener<K extends keyof HTMLSearchcraftToggleButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftToggleButtonElement, ev: SearchcraftToggleButtonCustomEvent<HTMLSearchcraftToggleButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2405
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2406
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2407
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2408
+ removeEventListener<K extends keyof HTMLSearchcraftToggleButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftToggleButtonElement, ev: SearchcraftToggleButtonCustomEvent<HTMLSearchcraftToggleButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2409
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2410
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2411
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2412
+ }
2413
+ var HTMLSearchcraftToggleButtonElement: {
2414
+ prototype: HTMLSearchcraftToggleButtonElement;
2415
+ new (): HTMLSearchcraftToggleButtonElement;
2416
+ };
2417
+ interface HTMLElementTagNameMap {
2418
+ "searchcraft-ad": HTMLSearchcraftAdElement;
2419
+ "searchcraft-base-search-result": HTMLSearchcraftBaseSearchResultElement;
2420
+ "searchcraft-base-search-results": HTMLSearchcraftBaseSearchResultsElement;
2421
+ "searchcraft-button": HTMLSearchcraftButtonElement;
2422
+ "searchcraft-error-message": HTMLSearchcraftErrorMessageElement;
2423
+ "searchcraft-facet-list": HTMLSearchcraftFacetListElement;
2424
+ "searchcraft-filter-panel": HTMLSearchcraftFilterPanelElement;
2425
+ "searchcraft-input-form": HTMLSearchcraftInputFormElement;
2426
+ "searchcraft-input-label": HTMLSearchcraftInputLabelElement;
2427
+ "searchcraft-pagination": HTMLSearchcraftPaginationElement;
2428
+ "searchcraft-popover-button": HTMLSearchcraftPopoverButtonElement;
2429
+ "searchcraft-popover-form": HTMLSearchcraftPopoverFormElement;
2430
+ "searchcraft-popover-list-item": HTMLSearchcraftPopoverListItemElement;
2431
+ "searchcraft-popover-list-view": HTMLSearchcraftPopoverListViewElement;
2432
+ "searchcraft-results-info": HTMLSearchcraftResultsInfoElement;
2433
+ "searchcraft-search-results-per-page": HTMLSearchcraftSearchResultsPerPageElement;
2434
+ "searchcraft-select": HTMLSearchcraftSelectElement;
2435
+ "searchcraft-slider": HTMLSearchcraftSliderElement;
2436
+ "searchcraft-theme": HTMLSearchcraftThemeElement;
2437
+ "searchcraft-toggle-button": HTMLSearchcraftToggleButtonElement;
2438
+ }
2439
+ }
2440
+ declare namespace LocalJSX {
2441
+ /**
2442
+ * An inline ad meant to be rendered in a list of search results.
2443
+ */
2444
+ interface SearchcraftAd {
2445
+ "adClientResponseItem"?: AdClientResponseItem;
2446
+ "adSource"?: SearchcraftAdSource;
2447
+ }
2448
+ /**
2449
+ * This web component is designed to display detailed information for a single search result.
2450
+ * Once a query is submitted, the component formats and presents the result.
2451
+ * It is consumed within the `searchcraft-base-search-results` component.
2452
+ */
2453
+ interface SearchcraftBaseSearchResult {
2454
+ /**
2455
+ * The relationship between the current document and the link for the button rendered when containerHref is not present.
2456
+ */
2457
+ "buttonRel"?: "noreferrer" | "noopener" | "nofollow";
2458
+ /**
2459
+ * Where to open the link for the button rendered when containerHref is not present.
2460
+ */
2461
+ "buttonTarget"?: "_blank" | "_self" | "_top" | "_parent";
2462
+ /**
2463
+ * The relationship between the current document and the link for the containing element.
2464
+ */
2465
+ "containerRel"?: "noreferrer" | "noopener" | "nofollow";
2466
+ /**
2467
+ * Where to open the link for the containing element.
2468
+ */
2469
+ "containerTarget"?: "_blank" | "_self" | "_top" | "_parent";
2470
+ /**
2471
+ * A custom styles object.
2472
+ */
2473
+ "customStyles"?: string;
2474
+ /**
2475
+ * The position in the document. Used with the "document_clicked" measure event.
2476
+ */
2477
+ "documentPosition"?: number;
2478
+ /**
2479
+ * The placement of the image.
2480
+ */
2481
+ "imagePlacement"?: "left" | "right";
2482
+ "item"?: SearchClientResponseItem;
2483
+ "searchResultMappings"?: SearchResultMappings;
2484
+ }
2485
+ /**
2486
+ * This web component is responsible for displaying the results of a search query.
2487
+ * Once a query is submitted, the component formats and presents an ordered list of the results.
2488
+ * ## Usage
2489
+ * ```html
2490
+ * <!-- index.html -->
2491
+ * <searchcraft-base-search-results
2492
+ * ad-interval="4"
2493
+ * place-ad-at-start="false"
2494
+ * result-image-placement="right"
2495
+ * />
2496
+ * ```
2497
+ * ```js
2498
+ * // index.js
2499
+ * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
2500
+ * baseSearchResults.searchResultMappings = containerHref: {
2501
+ * fieldNames: [
2502
+ * {
2503
+ * fieldName: 'canonical_link',
2504
+ * dataType: 'text',
2505
+ * },
2506
+ * ],
2507
+ * };
2508
+ * baseSearchResults.addEventListener('noResults', () => {
2509
+ * console.log('No search results found');
2510
+ * });
2511
+ * ```
2512
+ */
2513
+ interface SearchcraftBaseSearchResults {
2514
+ /**
2515
+ * The label for the button rendered when containerHref is not present for each result.
2516
+ */
2517
+ "buttonLabel"?: string;
2518
+ /**
2519
+ * The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
2520
+ */
2521
+ "buttonRel"?: "noreferrer" | "noopener" | "nofollow";
2522
+ /**
2523
+ * Where to open the link for the button rendered when containerHref is not present for each result.
2524
+ */
2525
+ "buttonTarget"?: "_blank" | "_self" | "_top" | "_parent";
2526
+ /**
2527
+ * The relationship between the current document and the link for the containing element for each result.
2528
+ */
2529
+ "containerRel"?: "noreferrer" | "noopener" | "nofollow";
2530
+ /**
2531
+ * Where to open the link for the containing element for each result.
2532
+ */
2533
+ "containerTarget"?: "_blank" | "_self" | "_top" | "_parent";
2534
+ /**
2535
+ * A custom styles object.
2536
+ */
2537
+ "customStylesForResults"?: string | Record<string, Record<string, string>>;
2538
+ /**
2539
+ * The placement of the image for each result.
2540
+ */
2541
+ "resultImagePlacement"?: "left" | "right";
2542
+ /**
2543
+ * Formats the content rendered for each result.
2544
+ */
2545
+ "searchResultMappings"?: SearchResultMappings;
2546
+ }
2547
+ /**
2548
+ * This web component represents a button to be consumed within the `search-input-form` component.
2549
+ * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
2550
+ * It is consumed within the `searchcraft-input-form` component.
2551
+ */
2552
+ interface SearchcraftButton {
2553
+ /**
2554
+ * Whether the button is disabled.
2555
+ */
2556
+ "disabled"?: boolean;
2557
+ /**
2558
+ * Controls the visual representation of the button.
2559
+ */
2560
+ "hierarchy"?: "primary" | "tertiary";
2561
+ /**
2562
+ * The icon element.
2563
+ */
2564
+ "icon"?: Element;
2565
+ /**
2566
+ * Should the button only display an icon.
2567
+ */
2568
+ "iconOnly"?: boolean;
2569
+ /**
2570
+ * The position of the icon.
2571
+ */
2572
+ "iconPosition"?: "left" | "right";
2573
+ /**
2574
+ * The label for the button.
2575
+ */
2576
+ "label"?: string;
2577
+ /**
2578
+ * The event fired when the button is clicked.
2579
+ */
2580
+ "onButtonClick"?: (event: SearchcraftButtonCustomEvent<void>) => void;
2581
+ /**
2582
+ * The type of the button.
2583
+ */
2584
+ "type"?: "submit" | "reset" | "button";
2585
+ }
2586
+ /**
2587
+ * 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.
2588
+ * ## Usage
2589
+ * ```html
2590
+ * <!-- index.html -->
2591
+ * <searchcraft-error-message error-message="No search results found for query" />
2592
+ * ```
2593
+ */
2594
+ interface SearchcraftErrorMessage {
2595
+ /**
2596
+ * The error message.
2597
+ */
2598
+ "errorMessage"?: string;
2599
+ }
2600
+ /**
2601
+ * 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.
2602
+ * It is consumed within the `searchcraft-filter-panel`.
2603
+ * ## Usage
2604
+ * ```html
2605
+ * <!-- index.html -->
2606
+ * <searchcraft-facet-list field-name="title" />
2607
+ * ```
2608
+ * ```js
2609
+ * // index.js
2610
+ * const facetList = document.querySelector('searchcraft-facet-list');
2611
+ * facetList.addEventListener('facetSelectionUpdated', () => {
2612
+ * console.log('Facet selection updated');
2613
+ * });
2614
+ * ```
2615
+ */
2616
+ interface SearchcraftFacetList {
2617
+ /**
2618
+ * The name of the field where facets are applied.
2619
+ */
2620
+ "fieldName"?: string;
2621
+ /**
2622
+ * When the facets are updated.
2623
+ */
2624
+ "onFacetSelectionUpdated"?: (event: SearchcraftFacetListCustomEvent<{
2625
+ paths: string[];
2626
+ }>) => void;
2627
+ }
2628
+ /**
2629
+ * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
2630
+ * ## Usage
2631
+ * ```html
2632
+ * <!-- index.html -->
2633
+ * <searchcraft-filter-panel />
2634
+ * ```
2635
+ */
2636
+ interface SearchcraftFilterPanel {
2637
+ /**
2638
+ * The items to filter.
2639
+ */
2640
+ "items"?: FilterItem[];
2641
+ }
2642
+ /**
2643
+ * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
2644
+ * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
2645
+ * ## Usage
2646
+ * ```html
2647
+ * <!-- index.html -->
2648
+ * <searchcraft-input-form placeholder-value="Search here" />
2649
+ * ```
2650
+ * ```js
2651
+ * // index.js
2652
+ * const searchInputForm = document.querySelector('searchcraft-input-form');
2653
+ * ```
2654
+ */
2655
+ interface SearchcraftInputForm {
2656
+ /**
2657
+ * Whether or not to automatically submit the search term when the input changes.
2658
+ */
2659
+ "autoSearch"?: boolean;
2660
+ /**
2661
+ * The label for the submit button.
2662
+ */
2663
+ "buttonLabel"?: string;
2664
+ /**
2665
+ * Where to place the search button.
2666
+ */
2667
+ "buttonPlacement"?: "left" | "right" | "none";
2668
+ "core"?: SearchcraftCore;
2669
+ /**
2670
+ * A custom styles object to be applied to the input element.
2671
+ */
2672
+ "customStyles"?: string | Record<string, string>;
2673
+ /**
2674
+ * The label rendered above the input.
2675
+ */
2676
+ "inputLabel"?: string;
2677
+ /**
2678
+ * When the input becomes unfocused.
2679
+ */
2680
+ "onInputBlur"?: (event: SearchcraftInputFormCustomEvent<void>) => void;
2681
+ /**
2682
+ * When the input becomes focused.
2683
+ */
2684
+ "onInputFocus"?: (event: SearchcraftInputFormCustomEvent<void>) => void;
2685
+ /**
2686
+ * Event emitted when input initializes.
2687
+ */
2688
+ "onInputInit"?: (event: SearchcraftInputFormCustomEvent<void>) => void;
2689
+ /**
2690
+ * The input element's placeholder value.
2691
+ */
2692
+ "placeholderValue"?: string;
2693
+ /**
2694
+ * The starting value of the input element.
2695
+ */
2696
+ "searchTerm"?: string;
2697
+ }
2698
+ /**
2699
+ * This web component serves as the input label for the searchcraft-input-form component.
2700
+ * ## Usage
2701
+ * ```html
2702
+ * <!-- index.html -->
2703
+ * <searchcraft-input-label label="Search" />
2704
+ * ```
2705
+ */
2706
+ interface SearchcraftInputLabel {
2707
+ /**
2708
+ * The classname applied to the label element.
2709
+ */
2710
+ "inputLabelClassName"?: string | undefined;
2711
+ "label"?: string;
2712
+ }
2713
+ /**
2714
+ * This web component is designed to facilitate pagination of search results.
2715
+ * Once a query is submitted, calculates the number for pages.
2716
+ * ## Usage
2717
+ * ```html
2718
+ * <!-- index.html -->
2719
+ * <searchcraft-pagination />
2720
+ * ```
2721
+ */
2722
+ interface SearchcraftPagination {
2723
+ /**
2724
+ * The custom styles object.
2725
+ */
2726
+ "customStyles"?: string;
2727
+ }
2728
+ /**
2729
+ * Renders a button which, when clicked, turns on popover visibility.
2730
+ */
2731
+ interface SearchcraftPopoverButton {
2732
+ }
2733
+ /**
2734
+ * 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.
2735
+ * ## Usage
2736
+ * ```html
2737
+ * <!-- index.html -->
2738
+ * <searchcraft-popover-form type="fullscreen" />
2739
+ * ```
2740
+ * ```js
2741
+ * // index.js
2742
+ * const popoverForm = document.querySelector('searchcraft-popover-form');
2743
+ * popoverForm.popoverResultMappings = {
2744
+ * containerHref: {
2745
+ * fieldNames: [
2746
+ * {
2747
+ * fieldName: 'canonical_link',
2748
+ * dataType: 'text',
2749
+ * },
2750
+ * ],
2751
+ * };
2752
+ * ```
2753
+ */
2754
+ interface SearchcraftPopoverForm {
2755
+ /**
2756
+ * The hotkey that activates the popover.
2757
+ */
2758
+ "hotkey"?: string;
2759
+ /**
2760
+ * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
2761
+ */
2762
+ "hotkeyModifier"?: "ctrl" | "meta" | "alt" | "option";
2763
+ /**
2764
+ * Formats the content rendered for each result.
2765
+ */
2766
+ "popoverResultMappings"?: PopoverResultMappings;
2767
+ /**
2768
+ * 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.
2769
+ */
2770
+ "type"?: "inline" | "fullscreen" | "modal";
2771
+ }
2772
+ /**
2773
+ * A single list item rendered in a searchcraft-popover-list-view.
2774
+ */
2775
+ interface SearchcraftPopoverListItem {
2776
+ /**
2777
+ * The document position relative to the search results (For Measure)
2778
+ */
2779
+ "documentPosition"?: number;
2780
+ "item"?: SearchClientResponseItem | undefined;
2781
+ "popoverResultMappings"?: PopoverResultMappings | undefined;
2782
+ }
2783
+ /**
2784
+ * This web component is designed to display a list of results within a popover interface.
2785
+ * It is consumed within the `searchcraft-popover-form` component.
2786
+ * ## Usage
2787
+ * ```html
2788
+ * <!-- index.html -->
2789
+ * <searchcraft-popover-list-view />
2790
+ * ```
2791
+ */
2792
+ interface SearchcraftPopoverListView {
2793
+ "adClientResponseItems"?: AdClientResponseItem[] | undefined;
2794
+ /**
2795
+ * The mappings that define how the data in the documents are mapped to the list-view-item elements.
2796
+ */
2797
+ "popoverResultMappings"?: PopoverResultMappings | undefined;
2798
+ /**
2799
+ * The items to render in the list view.
2800
+ */
2801
+ "searchClientResponseItems"?: SearchClientResponseItem[] | undefined;
2802
+ "searchResultsPage": number;
2803
+ "searchResultsPerPage": number;
2804
+ }
2805
+ /**
2806
+ * This web component is designed to display the number of results returned from a search query.
2807
+ * ## Usage
2808
+ * ```html
2809
+ * <!-- index.html -->
2810
+ * <script>
2811
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
2812
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
2813
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
2814
+ * </script>
2815
+ * <searchcraft-results-info />
2816
+ * ```
2817
+ */
2818
+ interface SearchcraftResultsInfo {
2819
+ /**
2820
+ * The custom formatter for the resulting string.
2821
+ * @example ```ts resultsInfo.customFormatter = (range, count, responseTime) => `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`; ```
2822
+ */
2823
+ "customFormatter"?: (range: [
2824
+ string,
2825
+ string
2826
+ ], count: string, responseTime: string) => void;
2827
+ /**
2828
+ * The custom styles object.
2829
+ */
2830
+ "customStyles"?: string;
2831
+ }
2832
+ /**
2833
+ * This web component is designed to choose the number of search results displayed.
2834
+ * ## Usage
2835
+ * ```html
2836
+ * <!-- index.html -->
2837
+ * <searchcraft-search-results-per-page increment="20" />
2838
+ * ```
2839
+ */
2840
+ interface SearchcraftSearchResultsPerPage {
2841
+ /**
2842
+ * The custom styles object.
2843
+ */
2844
+ "customStyles"?: string;
2845
+ /**
2846
+ * 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.
2847
+ */
2848
+ "increment"?: string | number;
2849
+ }
2850
+ /**
2851
+ * This web component is designed to allow users to select between a group of options.
2852
+ * ## Usage
2853
+ * ```html
2854
+ * <!-- index.html -->
2855
+ * <searchcraft-select
2856
+ * inputId="searchcraft-select"
2857
+ * name="searchcraft-select"
2858
+ * options="[{ label: 'label', value: 'value' }]"
2859
+ * />
2860
+ * ```
2861
+ */
2862
+ interface SearchcraftSelect {
2863
+ /**
2864
+ * The caption displayed below the select input.
2865
+ */
2866
+ "caption"?: string;
2867
+ /**
2868
+ * A custom styles object.
2869
+ */
2870
+ "customStyles"?: string;
2871
+ /**
2872
+ * Whether the select input is disabled.
2873
+ */
2874
+ "disabled"?: boolean;
2875
+ /**
2876
+ * The ID for the select input.
2877
+ */
2878
+ "inputId": string;
2879
+ /**
2880
+ * The label of the select input.
2881
+ */
2882
+ "label"?: string;
2883
+ /**
2884
+ * The ID for the label of the select input.
2885
+ */
2886
+ "labelId"?: string;
2887
+ /**
2888
+ * The name of the select input.
2889
+ */
2890
+ "name": string;
2891
+ /**
2892
+ * The event fired when the select is changed.
2893
+ */
2894
+ "onSelectChange"?: (event: SearchcraftSelectCustomEvent<string>) => void;
2895
+ /**
2896
+ * The options for the select input.
2897
+ */
2898
+ "options"?: SearchcraftSelectOption[] | string;
2899
+ }
2900
+ /**
2901
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
2902
+ * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
2903
+ * It is consumed by the `searchcraft-filter-panel` component.
2904
+ */
2905
+ interface SearchcraftSlider {
2906
+ /**
2907
+ * The type of data allowed.
2908
+ */
2909
+ "dataType"?: "number" | "date";
2910
+ /**
2911
+ * The granularity that the value must adhere to.
2912
+ */
2913
+ "granularity"?: number;
2914
+ /**
2915
+ * The maximum value allowed.
2916
+ */
2917
+ "max"?: number;
2918
+ /**
2919
+ * The minimum value allowed.
2920
+ */
2921
+ "min"?: number;
2922
+ /**
2923
+ * When the range has changed.
2924
+ */
2925
+ "onRangeChanged"?: (event: SearchcraftSliderCustomEvent<any>) => void;
2926
+ }
2927
+ /**
2928
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
2929
+ * It does not render anything visible, its only function is to manage the css styles on the page.
2930
+ * ## Usage
2931
+ * ```html
2932
+ * <!-- index.html -->
2933
+ * <searchcraft-theme theme="light" custom-theme="{}" />
2934
+ * ```
2935
+ */
2936
+ interface SearchcraftTheme {
2937
+ /**
2938
+ * The custom theme configuration object.
2939
+ */
2940
+ "customTheme"?: string;
2941
+ /**
2942
+ * The name of the theme.
2943
+ */
2944
+ "theme"?: string;
2945
+ }
2946
+ /**
2947
+ * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
2948
+ * It is consumed within the `searchcraft-filter-panel` component.
2949
+ */
2950
+ interface SearchcraftToggleButton {
2951
+ /**
2952
+ * The label.
2953
+ */
2954
+ "label"?: string;
2955
+ /**
2956
+ * When the toggle element is changed.
2957
+ */
2958
+ "onToggleUpdated"?: (event: SearchcraftToggleButtonCustomEvent<boolean>) => void;
2959
+ /**
2960
+ * The secondary label displayed below the main label.
2961
+ */
2962
+ "subLabel"?: string | undefined;
2963
+ }
2964
+ interface IntrinsicElements {
2965
+ "searchcraft-ad": SearchcraftAd;
2966
+ "searchcraft-base-search-result": SearchcraftBaseSearchResult;
2967
+ "searchcraft-base-search-results": SearchcraftBaseSearchResults;
2968
+ "searchcraft-button": SearchcraftButton;
2969
+ "searchcraft-error-message": SearchcraftErrorMessage;
2970
+ "searchcraft-facet-list": SearchcraftFacetList;
2971
+ "searchcraft-filter-panel": SearchcraftFilterPanel;
2972
+ "searchcraft-input-form": SearchcraftInputForm;
2973
+ "searchcraft-input-label": SearchcraftInputLabel;
2974
+ "searchcraft-pagination": SearchcraftPagination;
2975
+ "searchcraft-popover-button": SearchcraftPopoverButton;
2976
+ "searchcraft-popover-form": SearchcraftPopoverForm;
2977
+ "searchcraft-popover-list-item": SearchcraftPopoverListItem;
2978
+ "searchcraft-popover-list-view": SearchcraftPopoverListView;
2979
+ "searchcraft-results-info": SearchcraftResultsInfo;
2980
+ "searchcraft-search-results-per-page": SearchcraftSearchResultsPerPage;
2981
+ "searchcraft-select": SearchcraftSelect;
2982
+ "searchcraft-slider": SearchcraftSlider;
2983
+ "searchcraft-theme": SearchcraftTheme;
2984
+ "searchcraft-toggle-button": SearchcraftToggleButton;
2985
+ }
2986
+ }
2987
+ declare module "@stencil/core" {
2988
+ export namespace JSX {
2989
+ interface IntrinsicElements {
2990
+ /**
2991
+ * An inline ad meant to be rendered in a list of search results.
2992
+ */
2993
+ "searchcraft-ad": LocalJSX.SearchcraftAd & JSXBase.HTMLAttributes<HTMLSearchcraftAdElement>;
2994
+ /**
2995
+ * This web component is designed to display detailed information for a single search result.
2996
+ * Once a query is submitted, the component formats and presents the result.
2997
+ * It is consumed within the `searchcraft-base-search-results` component.
2998
+ */
2999
+ "searchcraft-base-search-result": LocalJSX.SearchcraftBaseSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultElement>;
3000
+ /**
3001
+ * This web component is responsible for displaying the results of a search query.
3002
+ * Once a query is submitted, the component formats and presents an ordered list of the results.
3003
+ * ## Usage
3004
+ * ```html
3005
+ * <!-- index.html -->
3006
+ * <searchcraft-base-search-results
3007
+ * ad-interval="4"
3008
+ * place-ad-at-start="false"
3009
+ * result-image-placement="right"
3010
+ * />
3011
+ * ```
3012
+ * ```js
3013
+ * // index.js
3014
+ * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
3015
+ * baseSearchResults.searchResultMappings = containerHref: {
3016
+ * fieldNames: [
3017
+ * {
3018
+ * fieldName: 'canonical_link',
3019
+ * dataType: 'text',
3020
+ * },
3021
+ * ],
3022
+ * };
3023
+ * baseSearchResults.addEventListener('noResults', () => {
3024
+ * console.log('No search results found');
3025
+ * });
3026
+ * ```
3027
+ */
3028
+ "searchcraft-base-search-results": LocalJSX.SearchcraftBaseSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultsElement>;
3029
+ /**
3030
+ * This web component represents a button to be consumed within the `search-input-form` component.
3031
+ * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
3032
+ * It is consumed within the `searchcraft-input-form` component.
3033
+ */
3034
+ "searchcraft-button": LocalJSX.SearchcraftButton & JSXBase.HTMLAttributes<HTMLSearchcraftButtonElement>;
3035
+ /**
3036
+ * 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.
3037
+ * ## Usage
3038
+ * ```html
3039
+ * <!-- index.html -->
3040
+ * <searchcraft-error-message error-message="No search results found for query" />
3041
+ * ```
3042
+ */
3043
+ "searchcraft-error-message": LocalJSX.SearchcraftErrorMessage & JSXBase.HTMLAttributes<HTMLSearchcraftErrorMessageElement>;
3044
+ /**
3045
+ * 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.
3046
+ * It is consumed within the `searchcraft-filter-panel`.
3047
+ * ## Usage
3048
+ * ```html
3049
+ * <!-- index.html -->
3050
+ * <searchcraft-facet-list field-name="title" />
3051
+ * ```
3052
+ * ```js
3053
+ * // index.js
3054
+ * const facetList = document.querySelector('searchcraft-facet-list');
3055
+ * facetList.addEventListener('facetSelectionUpdated', () => {
3056
+ * console.log('Facet selection updated');
3057
+ * });
3058
+ * ```
3059
+ */
3060
+ "searchcraft-facet-list": LocalJSX.SearchcraftFacetList & JSXBase.HTMLAttributes<HTMLSearchcraftFacetListElement>;
3061
+ /**
3062
+ * This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
3063
+ * ## Usage
3064
+ * ```html
3065
+ * <!-- index.html -->
3066
+ * <searchcraft-filter-panel />
3067
+ * ```
3068
+ */
3069
+ "searchcraft-filter-panel": LocalJSX.SearchcraftFilterPanel & JSXBase.HTMLAttributes<HTMLSearchcraftFilterPanelElement>;
3070
+ /**
3071
+ * This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
3072
+ * It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
3073
+ * ## Usage
3074
+ * ```html
3075
+ * <!-- index.html -->
3076
+ * <searchcraft-input-form placeholder-value="Search here" />
3077
+ * ```
3078
+ * ```js
3079
+ * // index.js
3080
+ * const searchInputForm = document.querySelector('searchcraft-input-form');
3081
+ * ```
3082
+ */
3083
+ "searchcraft-input-form": LocalJSX.SearchcraftInputForm & JSXBase.HTMLAttributes<HTMLSearchcraftInputFormElement>;
3084
+ /**
3085
+ * This web component serves as the input label for the searchcraft-input-form component.
3086
+ * ## Usage
3087
+ * ```html
3088
+ * <!-- index.html -->
3089
+ * <searchcraft-input-label label="Search" />
3090
+ * ```
3091
+ */
3092
+ "searchcraft-input-label": LocalJSX.SearchcraftInputLabel & JSXBase.HTMLAttributes<HTMLSearchcraftInputLabelElement>;
3093
+ /**
3094
+ * This web component is designed to facilitate pagination of search results.
3095
+ * Once a query is submitted, calculates the number for pages.
3096
+ * ## Usage
3097
+ * ```html
3098
+ * <!-- index.html -->
3099
+ * <searchcraft-pagination />
3100
+ * ```
3101
+ */
3102
+ "searchcraft-pagination": LocalJSX.SearchcraftPagination & JSXBase.HTMLAttributes<HTMLSearchcraftPaginationElement>;
3103
+ /**
3104
+ * Renders a button which, when clicked, turns on popover visibility.
3105
+ */
3106
+ "searchcraft-popover-button": LocalJSX.SearchcraftPopoverButton & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverButtonElement>;
3107
+ /**
3108
+ * 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.
3109
+ * ## Usage
3110
+ * ```html
3111
+ * <!-- index.html -->
3112
+ * <searchcraft-popover-form type="fullscreen" />
3113
+ * ```
3114
+ * ```js
3115
+ * // index.js
3116
+ * const popoverForm = document.querySelector('searchcraft-popover-form');
3117
+ * popoverForm.popoverResultMappings = {
3118
+ * containerHref: {
3119
+ * fieldNames: [
3120
+ * {
3121
+ * fieldName: 'canonical_link',
3122
+ * dataType: 'text',
3123
+ * },
3124
+ * ],
3125
+ * };
3126
+ * ```
3127
+ */
3128
+ "searchcraft-popover-form": LocalJSX.SearchcraftPopoverForm & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverFormElement>;
3129
+ /**
3130
+ * A single list item rendered in a searchcraft-popover-list-view.
3131
+ */
3132
+ "searchcraft-popover-list-item": LocalJSX.SearchcraftPopoverListItem & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListItemElement>;
3133
+ /**
3134
+ * This web component is designed to display a list of results within a popover interface.
3135
+ * It is consumed within the `searchcraft-popover-form` component.
3136
+ * ## Usage
3137
+ * ```html
3138
+ * <!-- index.html -->
3139
+ * <searchcraft-popover-list-view />
3140
+ * ```
3141
+ */
3142
+ "searchcraft-popover-list-view": LocalJSX.SearchcraftPopoverListView & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListViewElement>;
3143
+ /**
3144
+ * This web component is designed to display the number of results returned from a search query.
3145
+ * ## Usage
3146
+ * ```html
3147
+ * <!-- index.html -->
3148
+ * <script>
3149
+ * const resultsInfo = document.querySelector('searchcraft-results-info');
3150
+ * resultsInfo.customFormatter = (range, count, responseTime) =>
3151
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
3152
+ * </script>
3153
+ * <searchcraft-results-info />
3154
+ * ```
3155
+ */
3156
+ "searchcraft-results-info": LocalJSX.SearchcraftResultsInfo & JSXBase.HTMLAttributes<HTMLSearchcraftResultsInfoElement>;
3157
+ /**
3158
+ * This web component is designed to choose the number of search results displayed.
3159
+ * ## Usage
3160
+ * ```html
3161
+ * <!-- index.html -->
3162
+ * <searchcraft-search-results-per-page increment="20" />
3163
+ * ```
3164
+ */
3165
+ "searchcraft-search-results-per-page": LocalJSX.SearchcraftSearchResultsPerPage & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsPerPageElement>;
3166
+ /**
3167
+ * This web component is designed to allow users to select between a group of options.
3168
+ * ## Usage
3169
+ * ```html
3170
+ * <!-- index.html -->
3171
+ * <searchcraft-select
3172
+ * inputId="searchcraft-select"
3173
+ * name="searchcraft-select"
3174
+ * options="[{ label: 'label', value: 'value' }]"
3175
+ * />
3176
+ * ```
3177
+ */
3178
+ "searchcraft-select": LocalJSX.SearchcraftSelect & JSXBase.HTMLAttributes<HTMLSearchcraftSelectElement>;
3179
+ /**
3180
+ * This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
3181
+ * The component renders a slider interface, which can be used to visually choose a value between two boundaries.
3182
+ * It is consumed by the `searchcraft-filter-panel` component.
3183
+ */
3184
+ "searchcraft-slider": LocalJSX.SearchcraftSlider & JSXBase.HTMLAttributes<HTMLSearchcraftSliderElement>;
3185
+ /**
3186
+ * This web component adds Searchcraft's built-in css theme to your page's <head> tag.
3187
+ * It does not render anything visible, its only function is to manage the css styles on the page.
3188
+ * ## Usage
3189
+ * ```html
3190
+ * <!-- index.html -->
3191
+ * <searchcraft-theme theme="light" custom-theme="{}" />
3192
+ * ```
3193
+ */
3194
+ "searchcraft-theme": LocalJSX.SearchcraftTheme & JSXBase.HTMLAttributes<HTMLSearchcraftThemeElement>;
3195
+ /**
3196
+ * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
3197
+ * It is consumed within the `searchcraft-filter-panel` component.
3198
+ */
3199
+ "searchcraft-toggle-button": LocalJSX.SearchcraftToggleButton & JSXBase.HTMLAttributes<HTMLSearchcraftToggleButtonElement>;
3200
+ }
3201
+ }
3202
+ }
3203
+ /**
3204
+ * The props for the SearchcraftBaseSearchResults component.
3205
+ */
3206
+ export interface SearchcraftBaseSearchResultsProps extends Components.SearchcraftBaseSearchResults {
3207
+ }
3208
+ /**
3209
+ * A component that renders a list of search results with customizable styles, layout, and link behavior.
3210
+ *
3211
+ * @example
3212
+ * ```tsx
3213
+ * import React from 'react';
3214
+ * import { SearchcraftBaseSearchResults } from '@searchcraft/react-sdk';
3215
+ * import searchResultMappings from './searchResultMappings';
3216
+ *
3217
+ * const MySearchComponent = () => {
3218
+ * return (
3219
+ * <SearchcraftBaseSearchResults
3220
+ * searchResultMappings={searchResultMappings}
3221
+ * resultImagePlacement="left"
3222
+ * buttonLabel="View More"
3223
+ * buttonTarget="_blank"
3224
+ * buttonRel="noopener"
3225
+ * containerTarget="_self"
3226
+ * containerRel="nofollow"
3227
+ * onNoResults={() => console.log("No search results found")}
3228
+ * />
3229
+ * );
3230
+ * };
3231
+ *
3232
+ * export default MySearchComponent;
3233
+ * ```
3234
+ */
3235
+ export declare const SearchcraftBaseSearchResults: FC<SearchcraftBaseSearchResultsProps>;
3236
+ /**
3237
+ * The props for the SearchcraftFilterPanel.
3238
+ */
3239
+ export interface SearchcraftFilterPanelProps extends Components.SearchcraftFilterPanel {
3240
+ }
3241
+ /**
3242
+ * A component that represents a filter panel UI view, allowing users to refine and control their search queries by applying various filter criteria.
3243
+ *
3244
+ * @example
3245
+ * ```tsx
3246
+ * import React from 'react';
3247
+ * import { SearchcraftFilterPanel } from '@searchcraft/react-sdk';
3248
+ * import filterItems from './filterItems';
3249
+ *
3250
+ * const MyFilterComponent = () => {
3251
+ * return (
3252
+ * <SearchcraftFilterPanel items={filterItems} />
3253
+ * );
3254
+ * };
3255
+ *
3256
+ * export default MyFilterComponent;
3257
+ * ```
3258
+ */
3259
+ export declare const SearchcraftFilterPanel: FC<SearchcraftFilterPanelProps>;
3260
+ /**
3261
+ * The props for the SearchcraftInputForm.
3262
+ */
3263
+ export interface SearchcraftInputFormProps extends Components.SearchcraftInputForm {
3264
+ }
3265
+ /**
3266
+ * A component that provides a user-friendly interface for querying an indexed dataset,
3267
+ * enabling users to easily search large collections of data. It abstracts the complexities
3268
+ * of index-based searching, making it accessible to users of all technical levels.
3269
+ *
3270
+ * @example
3271
+ * ```tsx
3272
+ * import React from 'react';
3273
+ * import { SearchcraftInputForm } from '@searchcraft/react-sdk';
3274
+ * import searchcraftConfig from './searchcraftConfig';
3275
+ *
3276
+ * const MySearchComponent = () => {
3277
+ * const handleQuerySubmit = (event: CustomEvent<string>) => {
3278
+ * console.log("Query submitted", event.detail);
3279
+ * };
3280
+ *
3281
+ * return (
3282
+ * <SearchcraftInputForm
3283
+ * config={searchcraftConfig}
3284
+ * autoSearch={true}
3285
+ * buttonPlacement="right"
3286
+ * buttonLabel="Search"
3287
+ * inputLabel="Search Database"
3288
+ * customStyles={{ border: "1px solid gray", padding: "5px" }}
3289
+ * placeholderValue="Search here..."
3290
+ * searchTerm=""
3291
+ * onQuerySubmit={handleQuerySubmit}
3292
+ * onInputCleared={() => console.log("Input cleared")}
3293
+ * onNoResultsReceived={() => console.log("No results found")}
3294
+ * onInputFocus={() => console.log("Input focused")}
3295
+ * onInputBlur={() => console.log("Input blurred")}
3296
+ * onInputInit={() => console.log("Input initialized")}
3297
+ * />
3298
+ * );
3299
+ * };
3300
+ *
3301
+ * export default MySearchComponent;
3302
+ * ```
3303
+ */
3304
+ export declare const SearchcraftInputForm: FC<SearchcraftInputFormProps>;
3305
+ /**
3306
+ * The props for the SearchcraftPopoverButton.
3307
+ */
3308
+ export interface SearchcraftPopoverButtonProps extends Components.SearchcraftPopoverButton {
3309
+ }
3310
+ /**
3311
+ * A button component that, when clicked, toggles the visibility of a popover.
3312
+ *
3313
+ * @example
3314
+ * ```tsx
3315
+ * import React from 'react';
3316
+ * import { SearchcraftPopoverButton } from '@searchcraft/react-sdk';
3317
+ *
3318
+ * const MyPopoverTrigger = () => {
3319
+ * return (
3320
+ * <SearchcraftPopoverButton>
3321
+ * Open Popover
3322
+ * </SearchcraftPopoverButton>
3323
+ * );
3324
+ * };
3325
+ *
3326
+ * export default MyPopoverTrigger;
3327
+ * ```
3328
+ */
3329
+ export declare const SearchcraftPopoverButton: FC<SearchcraftPopoverButtonProps>;
3330
+ /**
3331
+ * The props for the SearchcraftPopoverForm component.
3332
+ */
3333
+ export interface SearchcraftPopoverFormProps extends Components.SearchcraftPopoverForm {
3334
+ }
3335
+ /**
3336
+ * A component that displays search results in a popover container that dynamically appears
3337
+ * when the user interacts with a search input field, or when a popover button is clicked.
3338
+ *
3339
+ * @example
3340
+ * ```tsx
3341
+ * import React from 'react';
3342
+ * import { SearchcraftPopoverForm } from '@searchcraft/react-sdk';
3343
+ * import searchcraftConfig from './searchcraftConfig';
3344
+ * import popoverResultMappings from './popoverResultMappings';
3345
+ *
3346
+ * const MyPopoverSearch = () => {
3347
+ * return (
3348
+ * <SearchcraftPopoverForm
3349
+ * config={searchcraftConfig}
3350
+ * type="fullscreen"
3351
+ * popoverResultMappings={popoverResultMappings}
3352
+ * hotkey="k"
3353
+ * hotkeyModifier="meta"
3354
+ * />
3355
+ * );
3356
+ * };
3357
+ *
3358
+ * export default MyPopoverSearch;
3359
+ * ```
3360
+ */
3361
+ export declare const SearchcraftPopoverForm: FC<SearchcraftPopoverFormProps>;
3362
+ /**
3363
+ * The Props for the SearchcraftResultsInfo component.
3364
+ */
3365
+ export interface SearchcraftResultsInfoProps extends Components.SearchcraftResultsInfo {
3366
+ }
3367
+ /**
3368
+ * This React component is designed to display the number of results returned from a search query.
3369
+ *
3370
+ * @example
3371
+ * ```tsx
3372
+ * import React, { useEffect, useRef } from 'react';
3373
+ * import { SearchcraftResultsInfo } from '@searchcraft/react-sdk';
3374
+ *
3375
+ * const MyResultsInfo = () => {
3376
+ * const ref = useRef();
3377
+ *
3378
+ * useEffect(() => {
3379
+ * ref.current.customFormatter = (range, count, responseTime) =>
3380
+ * `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
3381
+ * });
3382
+ *
3383
+ * return <SearchcraftResultsInfo ref={ref} />;
3384
+ * };
3385
+ *
3386
+ * export default MyResultsInfo;
3387
+ * ```
3388
+ */
3389
+ export declare const SearchcraftResultsInfo: FC<SearchcraftResultsInfoProps>;
3390
+ /**
3391
+ * The Props for the SearchcraftTheme component.
3392
+ */
3393
+ export interface SearchcraftThemeProps extends Components.SearchcraftTheme {
3394
+ }
3395
+ /**
3396
+ * A component that applies Searchcraft's built-in CSS theme to your page.
3397
+ * It does not render anything visible—its only function is to manage the CSS styles on the page.
3398
+ *
3399
+ * @example
3400
+ * ```tsx
3401
+ * import React from 'react';
3402
+ * import { SearchcraftTheme } from '@searchcraft/react-sdk';
3403
+ *
3404
+ * const MyThemeProvider = () => {
3405
+ * return <SearchcraftTheme theme="light" customTheme={'[]'} />;
3406
+ * };
3407
+ *
3408
+ * export default MyThemeProvider;
3409
+ * ```
3410
+ */
3411
+ export declare const SearchcraftTheme: FC<SearchcraftThemeProps>;
3412
+ /**
3413
+ * The props for the SearchcraftPagination component.
3414
+ */
3415
+ export interface SearchcraftPaginationProps extends Components.SearchcraftPagination {
3416
+ }
3417
+ /**
3418
+ * This React component is designed to facilitate pagination of search results.
3419
+ * Once a query is submitted, calculates the number for pages.
3420
+ *
3421
+ * @example
3422
+ * ```tsx
3423
+ * import React from 'react';
3424
+ * import { SearchcraftPagination } from '@searchcraft/react-sdk';
3425
+ *
3426
+ * const MyPaginationComponent = () => {
3427
+ * return (
3428
+ * // other searchcraft components
3429
+ * <SearchcraftPagination />
3430
+ * );
3431
+ * };
3432
+ *
3433
+ * export default MyPaginationComponent;
3434
+ * ```
3435
+ */
3436
+ export declare const SearchcraftPagination: FC<SearchcraftPaginationProps>;
3437
+ /**
3438
+ * The Props for the SearchcraftSearchResultsPerPage component.
3439
+ */
3440
+ export interface SearchcraftSearchResultsPerPageProps extends Components.SearchcraftSearchResultsPerPage {
3441
+ }
3442
+ /**
3443
+ * This React component is designed to choose the number of search results displayed.
3444
+ *
3445
+ * @example
3446
+ * ```tsx
3447
+ * import React from 'react';
3448
+ * import { SearchcraftSearchResultsPerPage } from '@searchcraft/react-sdk';
3449
+ *
3450
+ * const MyResultsPerPage = () => {
3451
+ * return <SearchcraftSearchResultsPerPage increment={20} />;
3452
+ * };
3453
+ *
3454
+ * export default MyResultsPerPage;
3455
+ * ```
3456
+ */
3457
+ export declare const SearchcraftSearchResultsPerPage: FC<SearchcraftSearchResultsPerPageProps>;
3458
+ /**
3459
+ * The consumer-facing Searchcraft class.
3460
+ */
3461
+ export declare class Searchcraft extends SearchcraftCore {
3462
+ constructor(config: SearchcraftConfig);
3463
+ }
3464
+
3465
+ export {};