@magicx-eng/ai-autocomplete-vanilla 0.41.0 → 0.42.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.mts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -170,10 +170,12 @@ interface MatchedItem {
|
|
|
170
170
|
origin_id?: string;
|
|
171
171
|
title: string;
|
|
172
172
|
/**
|
|
173
|
-
* The item's
|
|
174
|
-
*
|
|
173
|
+
* The item's price as the catalog's number ("131.00").
|
|
174
|
+
* The strip formats it with `currency` when the item has one.
|
|
175
175
|
*/
|
|
176
176
|
price?: string;
|
|
177
|
+
/** ISO 4217 currency code. Absent when unknown. */
|
|
178
|
+
currency?: string;
|
|
177
179
|
vendor?: string;
|
|
178
180
|
/**
|
|
179
181
|
* The platform's URL slug for the item, not a URL. The SDK builds a relative
|
|
@@ -403,7 +405,10 @@ interface Product {
|
|
|
403
405
|
url?: string;
|
|
404
406
|
/** Absent/null renders the placeholder tile — plenty of catalogues have no images. */
|
|
405
407
|
imageUrl?: string | null;
|
|
406
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* Display text. The built-in strip formats it with the item's currency when the server sends one.
|
|
410
|
+
* A custom integration (`opts.products`) supplies its own text.
|
|
411
|
+
*/
|
|
407
412
|
price?: string;
|
|
408
413
|
vendor?: string;
|
|
409
414
|
/**
|
|
@@ -2348,14 +2353,14 @@ declare const PRODUCT_PATH_PREFIX = "/products/";
|
|
|
2348
2353
|
* `url`: still activatable, still emitting `onProductSelect`, just nothing for
|
|
2349
2354
|
* cmd-click to open.
|
|
2350
2355
|
*/
|
|
2351
|
-
declare function productFromMatchedItem(item: MatchedItem): Product;
|
|
2356
|
+
declare function productFromMatchedItem(item: MatchedItem, language?: string): Product;
|
|
2352
2357
|
/**
|
|
2353
2358
|
* The strip's contents for a response's catalog report. `null` — no block on
|
|
2354
2359
|
* the response — is an empty strip rather than "keep the previous one": the
|
|
2355
2360
|
* previous items answered a previous query, and a strip must never show
|
|
2356
2361
|
* results belonging to an older one.
|
|
2357
2362
|
*/
|
|
2358
|
-
declare function productsFromCustomFields(report: CustomFieldsReport | null | undefined): Product[];
|
|
2363
|
+
declare function productsFromCustomFields(report: CustomFieldsReport | null | undefined, language?: string): Product[];
|
|
2359
2364
|
|
|
2360
2365
|
declare class ModeController {
|
|
2361
2366
|
private container;
|
package/dist/index.d.ts
CHANGED
|
@@ -170,10 +170,12 @@ interface MatchedItem {
|
|
|
170
170
|
origin_id?: string;
|
|
171
171
|
title: string;
|
|
172
172
|
/**
|
|
173
|
-
* The item's
|
|
174
|
-
*
|
|
173
|
+
* The item's price as the catalog's number ("131.00").
|
|
174
|
+
* The strip formats it with `currency` when the item has one.
|
|
175
175
|
*/
|
|
176
176
|
price?: string;
|
|
177
|
+
/** ISO 4217 currency code. Absent when unknown. */
|
|
178
|
+
currency?: string;
|
|
177
179
|
vendor?: string;
|
|
178
180
|
/**
|
|
179
181
|
* The platform's URL slug for the item, not a URL. The SDK builds a relative
|
|
@@ -403,7 +405,10 @@ interface Product {
|
|
|
403
405
|
url?: string;
|
|
404
406
|
/** Absent/null renders the placeholder tile — plenty of catalogues have no images. */
|
|
405
407
|
imageUrl?: string | null;
|
|
406
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* Display text. The built-in strip formats it with the item's currency when the server sends one.
|
|
410
|
+
* A custom integration (`opts.products`) supplies its own text.
|
|
411
|
+
*/
|
|
407
412
|
price?: string;
|
|
408
413
|
vendor?: string;
|
|
409
414
|
/**
|
|
@@ -2348,14 +2353,14 @@ declare const PRODUCT_PATH_PREFIX = "/products/";
|
|
|
2348
2353
|
* `url`: still activatable, still emitting `onProductSelect`, just nothing for
|
|
2349
2354
|
* cmd-click to open.
|
|
2350
2355
|
*/
|
|
2351
|
-
declare function productFromMatchedItem(item: MatchedItem): Product;
|
|
2356
|
+
declare function productFromMatchedItem(item: MatchedItem, language?: string): Product;
|
|
2352
2357
|
/**
|
|
2353
2358
|
* The strip's contents for a response's catalog report. `null` — no block on
|
|
2354
2359
|
* the response — is an empty strip rather than "keep the previous one": the
|
|
2355
2360
|
* previous items answered a previous query, and a strip must never show
|
|
2356
2361
|
* results belonging to an older one.
|
|
2357
2362
|
*/
|
|
2358
|
-
declare function productsFromCustomFields(report: CustomFieldsReport | null | undefined): Product[];
|
|
2363
|
+
declare function productsFromCustomFields(report: CustomFieldsReport | null | undefined, language?: string): Product[];
|
|
2359
2364
|
|
|
2360
2365
|
declare class ModeController {
|
|
2361
2366
|
private container;
|