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