@commercebuild/extension 0.0.16 → 0.0.17
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/package.json +3 -3
- package/types/global.d.ts +7 -0
- package/types/index.d.ts +0 -2
- package/types/category.d.ts +0 -7
- package/types/product.d.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercebuild/extension",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"./config/tsconfig.extension.json": "./config/tsconfig.extension.json"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@commercebuild/platform-api": "^0
|
|
14
|
-
"@commercebuild/ui": "
|
|
13
|
+
"@commercebuild/platform-api": "^0.11.33",
|
|
14
|
+
"@commercebuild/ui": "~0.0.9",
|
|
15
15
|
"@headlessui/react": "^2.2.4",
|
|
16
16
|
"@tailwindcss/postcss": "^4.1.10",
|
|
17
17
|
"@tailwindcss/vite": "^4.1.11",
|
package/types/global.d.ts
CHANGED
|
@@ -54,6 +54,12 @@ interface AddToCartProps {
|
|
|
54
54
|
className?: string;
|
|
55
55
|
/** Inline style forwarded to the button (e.g. Product Card button-scheme vars). */
|
|
56
56
|
style?: CSSProperties;
|
|
57
|
+
/**
|
|
58
|
+
* Button-scheme variant forwarded to the button, which opts it into the
|
|
59
|
+
* `data-btn-variant` colour and hover-animation rules in globals.css. Only
|
|
60
|
+
* set by callers that also apply a `button-scheme-{key}` class.
|
|
61
|
+
*/
|
|
62
|
+
btnVariant?: "primary" | "secondary" | "outline";
|
|
57
63
|
/**
|
|
58
64
|
* Width control (opt-in). Omit for the default responsive width; `true` = full
|
|
59
65
|
* width at all breakpoints; `false` = content width (auto).
|
|
@@ -66,6 +72,7 @@ declare function AddToCart({
|
|
|
66
72
|
onSuccessCallback,
|
|
67
73
|
className,
|
|
68
74
|
style,
|
|
75
|
+
btnVariant,
|
|
69
76
|
fullWidth,
|
|
70
77
|
}: AddToCartProps): React.JSX.Element;
|
|
71
78
|
|
package/types/index.d.ts
CHANGED
package/types/category.d.ts
DELETED
package/types/product.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { catalog_v1 } from "@commercebuild/platform-api";
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
interface Product extends catalog_v1.CatalogProductSearchProduct {
|
|
5
|
-
image: Required<
|
|
6
|
-
Pick<catalog_v1.CatalogProductSearchProduct["details"]["images"], "main">
|
|
7
|
-
>["main"];
|
|
8
|
-
originalPrice?: catalog_v1.CatalogPriceItemDto;
|
|
9
|
-
formattedPrice: string;
|
|
10
|
-
href: string;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {};
|