@plasmicpkgs/commerce 0.0.16 → 0.0.19
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/commerce.cjs.development.js +23 -8
- package/dist/commerce.cjs.development.js.map +1 -1
- package/dist/commerce.cjs.production.min.js +1 -1
- package/dist/commerce.cjs.production.min.js.map +1 -1
- package/dist/commerce.esm.js +23 -8
- package/dist/commerce.esm.js.map +1 -1
- package/dist/contexts.d.ts +4 -2
- package/dist/registerProductCollection.d.ts +1 -1
- package/package.json +3 -3
package/dist/contexts.d.ts
CHANGED
|
@@ -3,19 +3,21 @@ import { Product } from "./types/product";
|
|
|
3
3
|
import { Category } from "./types/site";
|
|
4
4
|
export declare const ProductContext: React.Context<Product | undefined>;
|
|
5
5
|
export declare const ProductFormContext: React.Context<any>;
|
|
6
|
-
export declare const CategoryContext: React.Context<Category | undefined>;
|
|
7
|
-
export declare const SliderContext: React.Context<number | undefined>;
|
|
8
6
|
export declare function ProductProvider({ product, children, }: {
|
|
9
7
|
product: Product;
|
|
10
8
|
children: React.ReactNode;
|
|
11
9
|
}): JSX.Element;
|
|
12
10
|
export declare const useProduct: () => Product;
|
|
13
11
|
export declare const useProductForm: () => any;
|
|
12
|
+
export declare const CategoryContext: React.Context<Category | undefined>;
|
|
13
|
+
export declare const PrimaryCategoryContext: React.Context<Category | undefined>;
|
|
14
14
|
export declare function CategoryProvider({ category, children, }: {
|
|
15
15
|
category: Category;
|
|
16
16
|
children: React.ReactNode;
|
|
17
17
|
}): JSX.Element;
|
|
18
18
|
export declare const useCategoryContext: () => Category | undefined;
|
|
19
|
+
export declare const usePrimaryCategory: () => Category | undefined;
|
|
20
|
+
export declare const SliderContext: React.Context<number | undefined>;
|
|
19
21
|
export declare function ProductSliderProvider({ mediaIndex, onClick, children, }: {
|
|
20
22
|
mediaIndex: number;
|
|
21
23
|
children: React.ReactNode;
|
|
@@ -19,7 +19,7 @@ interface ProductCollectionProps {
|
|
|
19
19
|
categories: Category[];
|
|
20
20
|
brands: Brand[];
|
|
21
21
|
features?: CommerceExtraFeatures;
|
|
22
|
-
|
|
22
|
+
categoryCtx?: Category;
|
|
23
23
|
}) => void;
|
|
24
24
|
}
|
|
25
25
|
export declare const productCollectionMeta: ComponentMeta<ProductCollectionProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/commerce",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "Plasmic registration calls for commerce components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"analyze": "size-limit --why"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@plasmicapp/host": "1.0.
|
|
21
|
+
"@plasmicapp/host": "1.0.41",
|
|
22
22
|
"@size-limit/preset-small-lib": "^4.11.0",
|
|
23
23
|
"@types/js-cookie": "^3.0.1",
|
|
24
24
|
"@types/node": "^14.0.26",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"react-hook-form": "^7.28.0",
|
|
40
40
|
"swr": "^1.2.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "db8215c610667a2765f229a4cc531ed0e8b548ad"
|
|
43
43
|
}
|