@searchcraft/vue-sdk 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1054,6 +1054,11 @@ export namespace Components {
1054
1054
  * ```
1055
1055
  */
1056
1056
  interface SearchcraftPagination {
1057
+ /**
1058
+ * The URL query string parameter name used to track the current page. When a user navigates to a URL that contains this parameter, the pagination component will automatically navigate to that page.
1059
+ * @default "p"
1060
+ */
1061
+ "pageQueryParam": string;
1057
1062
  /**
1058
1063
  * Whether to scroll to the top of the search results when pagination buttons are clicked.
1059
1064
  * @default true
@@ -1063,6 +1068,11 @@ export namespace Components {
1063
1068
  * The id of the Searchcraft instance that this component should use.
1064
1069
  */
1065
1070
  "searchcraftId"?: string;
1071
+ /**
1072
+ * Whether to use a query string parameter to track and restore the current page. Set to `false` to disable query string synchronisation entirely.
1073
+ * @default true
1074
+ */
1075
+ "usePageQueryParam": boolean;
1066
1076
  }
1067
1077
  /**
1068
1078
  * Renders a button which, when clicked, turns on popover visibility.
@@ -1122,10 +1132,23 @@ export namespace Components {
1122
1132
  * Renders the footer for the searchcraft-popover-form.
1123
1133
  */
1124
1134
  interface SearchcraftPopoverFooter {
1135
+ /**
1136
+ * The SDK variant used to render this component. Used for UTM attribution. This isn't exposed for developer consumption, it's set automatically.
1137
+ * @default 'js'
1138
+ */
1139
+ "sdkVariant"?: "js" | "react" | "vue";
1125
1140
  /**
1126
1141
  * The id of the Searchcraft instance that this component should use.
1127
1142
  */
1128
1143
  "searchcraftId"?: string;
1144
+ /**
1145
+ * Optional href for the "View all" button.
1146
+ */
1147
+ "viewAllResultsHref"?: string;
1148
+ /**
1149
+ * Optional label for the "View all" button.
1150
+ */
1151
+ "viewAllResultsLabel"?: string;
1129
1152
  }
1130
1153
  /**
1131
1154
  * 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.
@@ -1175,15 +1198,33 @@ export namespace Components {
1175
1198
  * Formats the content rendered for each result.
1176
1199
  */
1177
1200
  "popoverResultMappings"?: PopoverResultMappings;
1201
+ /**
1202
+ * The SDK variant used to render this component. Used for UTM attribution on the footer link.
1203
+ * @default 'js'
1204
+ */
1205
+ "sdkVariant"?: "js" | "react" | "vue";
1178
1206
  /**
1179
1207
  * The id of the Searchcraft instance that this component should use.
1180
1208
  */
1181
1209
  "searchcraftId"?: string;
1210
+ /**
1211
+ * Whether to display the AI generative summary box before the search results. NOTE: This requires the usage of a read key that has "SUMMARY" permissions and either a subscription to Searchcraft Cloud with AI features enabled or a self-hosted model connected.
1212
+ * @default false
1213
+ */
1214
+ "showSummaryBox"?: boolean;
1182
1215
  /**
1183
1216
  * 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.
1184
1217
  * @default 'inline'
1185
1218
  */
1186
1219
  "type"?: "inline" | "fullscreen" | "modal";
1220
+ /**
1221
+ * Base URL for the "View all" footer link. The current search term will be appended (URL encoded). For example, in a CMS-backed site you might set this to `/?s=` so the final URL becomes `/?s=<search-term>`.
1222
+ */
1223
+ "viewAllResultsBaseUrl"?: string;
1224
+ /**
1225
+ * Optional label for the "View All" footer button. Defaults to "View All".
1226
+ */
1227
+ "viewAllResultsLabel"?: string;
1187
1228
  }
1188
1229
  /**
1189
1230
  * A single list item rendered in a searchcraft-popover-list-view.
@@ -2411,6 +2452,11 @@ declare namespace LocalJSX {
2411
2452
  * ```
2412
2453
  */
2413
2454
  interface SearchcraftPagination {
2455
+ /**
2456
+ * The URL query string parameter name used to track the current page. When a user navigates to a URL that contains this parameter, the pagination component will automatically navigate to that page.
2457
+ * @default "p"
2458
+ */
2459
+ "pageQueryParam"?: string;
2414
2460
  /**
2415
2461
  * Whether to scroll to the top of the search results when pagination buttons are clicked.
2416
2462
  * @default true
@@ -2420,6 +2466,11 @@ declare namespace LocalJSX {
2420
2466
  * The id of the Searchcraft instance that this component should use.
2421
2467
  */
2422
2468
  "searchcraftId"?: string;
2469
+ /**
2470
+ * Whether to use a query string parameter to track and restore the current page. Set to `false` to disable query string synchronisation entirely.
2471
+ * @default true
2472
+ */
2473
+ "usePageQueryParam"?: boolean;
2423
2474
  }
2424
2475
  /**
2425
2476
  * Renders a button which, when clicked, turns on popover visibility.
@@ -2479,10 +2530,23 @@ declare namespace LocalJSX {
2479
2530
  * Renders the footer for the searchcraft-popover-form.
2480
2531
  */
2481
2532
  interface SearchcraftPopoverFooter {
2533
+ /**
2534
+ * The SDK variant used to render this component. Used for UTM attribution. This isn't exposed for developer consumption, it's set automatically.
2535
+ * @default 'js'
2536
+ */
2537
+ "sdkVariant"?: "js" | "react" | "vue";
2482
2538
  /**
2483
2539
  * The id of the Searchcraft instance that this component should use.
2484
2540
  */
2485
2541
  "searchcraftId"?: string;
2542
+ /**
2543
+ * Optional href for the "View all" button.
2544
+ */
2545
+ "viewAllResultsHref"?: string;
2546
+ /**
2547
+ * Optional label for the "View all" button.
2548
+ */
2549
+ "viewAllResultsLabel"?: string;
2486
2550
  }
2487
2551
  /**
2488
2552
  * 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.
@@ -2532,15 +2596,33 @@ declare namespace LocalJSX {
2532
2596
  * Formats the content rendered for each result.
2533
2597
  */
2534
2598
  "popoverResultMappings"?: PopoverResultMappings;
2599
+ /**
2600
+ * The SDK variant used to render this component. Used for UTM attribution on the footer link.
2601
+ * @default 'js'
2602
+ */
2603
+ "sdkVariant"?: "js" | "react" | "vue";
2535
2604
  /**
2536
2605
  * The id of the Searchcraft instance that this component should use.
2537
2606
  */
2538
2607
  "searchcraftId"?: string;
2608
+ /**
2609
+ * Whether to display the AI generative summary box before the search results. NOTE: This requires the usage of a read key that has "SUMMARY" permissions and either a subscription to Searchcraft Cloud with AI features enabled or a self-hosted model connected.
2610
+ * @default false
2611
+ */
2612
+ "showSummaryBox"?: boolean;
2539
2613
  /**
2540
2614
  * 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.
2541
2615
  * @default 'inline'
2542
2616
  */
2543
2617
  "type"?: "inline" | "fullscreen" | "modal";
2618
+ /**
2619
+ * Base URL for the "View all" footer link. The current search term will be appended (URL encoded). For example, in a CMS-backed site you might set this to `/?s=` so the final URL becomes `/?s=<search-term>`.
2620
+ */
2621
+ "viewAllResultsBaseUrl"?: string;
2622
+ /**
2623
+ * Optional label for the "View All" footer button. Defaults to "View All".
2624
+ */
2625
+ "viewAllResultsLabel"?: string;
2544
2626
  }
2545
2627
  /**
2546
2628
  * A single list item rendered in a searchcraft-popover-list-view.
@@ -3432,7 +3514,9 @@ export interface SearchcraftPopoverFormProps extends Components.SearchcraftPopov
3432
3514
  * </template>
3433
3515
  * ```
3434
3516
  */
3435
- 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>;
3517
+ export declare const SearchcraftPopoverForm: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3518
+ [key: string]: any;
3519
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3436
3520
  /**
3437
3521
  * The Props for the SearchcraftResultsInfo component.
3438
3522
  */