@magicx-eng/ai-autocomplete-vanilla 0.54.0 → 0.55.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/README.md +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +35 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -300,8 +300,10 @@ new AIAutocomplete(container, {
|
|
|
300
300
|
|
|
301
301
|
Return a promise to have the button show progress. It carries
|
|
302
302
|
`data-aia-cart-state="adding"` while the promise is pending, then `"added"`
|
|
303
|
-
(the cart glyph turns into a check)
|
|
304
|
-
|
|
303
|
+
(the cart glyph turns into a check) once it resolves. The check stays until the
|
|
304
|
+
card's product changes (a price-only change keeps it); pressing it again adds
|
|
305
|
+
another unit, going back through `"adding"` to `"added"`. A rejection returns
|
|
306
|
+
it to rest. Style it with
|
|
305
307
|
`--aia-product-cart-size` (28px), `--aia-product-cart-bg` and
|
|
306
308
|
`--aia-product-cart-color`, or `[data-aia-product-cart]`. In the list layout
|
|
307
309
|
the button sits at the row's right end. Headless consumers rendering
|
package/dist/index.d.mts
CHANGED
|
@@ -1196,8 +1196,10 @@ interface CoreOptions {
|
|
|
1196
1196
|
* touches a cart itself; the integration does the adding.
|
|
1197
1197
|
*
|
|
1198
1198
|
* Return a promise to have the button show progress. It carries
|
|
1199
|
-
* `data-aia-cart-state="adding"` until the promise settles, then `"added"`
|
|
1200
|
-
*
|
|
1199
|
+
* `data-aia-cart-state="adding"` until the promise settles, then `"added"` if
|
|
1200
|
+
* it resolved. `"added"` stays until the card's product changes; pressing
|
|
1201
|
+
* again adds another unit (adding → added again). A rejection puts the button
|
|
1202
|
+
* back at rest.
|
|
1201
1203
|
*/
|
|
1202
1204
|
onProductAddToCart?: (product: Product) => void | PromiseLike<unknown>;
|
|
1203
1205
|
value?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1196,8 +1196,10 @@ interface CoreOptions {
|
|
|
1196
1196
|
* touches a cart itself; the integration does the adding.
|
|
1197
1197
|
*
|
|
1198
1198
|
* Return a promise to have the button show progress. It carries
|
|
1199
|
-
* `data-aia-cart-state="adding"` until the promise settles, then `"added"`
|
|
1200
|
-
*
|
|
1199
|
+
* `data-aia-cart-state="adding"` until the promise settles, then `"added"` if
|
|
1200
|
+
* it resolved. `"added"` stays until the card's product changes; pressing
|
|
1201
|
+
* again adds another unit (adding → added again). A rejection puts the button
|
|
1202
|
+
* back at rest.
|
|
1201
1203
|
*/
|
|
1202
1204
|
onProductAddToCart?: (product: Product) => void | PromiseLike<unknown>;
|
|
1203
1205
|
value?: string;
|