@plasmicpkgs/commerce 0.0.18 → 0.0.21
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 +79 -66
- 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 +77 -67
- package/dist/commerce.esm.js.map +1 -1
- package/dist/contexts.d.ts +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/registerCategoryMedia.d.ts +0 -1
- package/dist/registerProductMedia.d.ts +3 -1
- package/dist/registerProductMediaCollection.d.ts +11 -0
- package/package.json +3 -3
package/dist/contexts.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ export declare function CategoryProvider({ category, children, }: {
|
|
|
17
17
|
}): JSX.Element;
|
|
18
18
|
export declare const useCategoryContext: () => Category | undefined;
|
|
19
19
|
export declare const usePrimaryCategory: () => Category | undefined;
|
|
20
|
-
export declare const
|
|
21
|
-
export declare function
|
|
20
|
+
export declare const ProductMediaContext: React.Context<number | undefined>;
|
|
21
|
+
export declare function ProductMediaProvider({ mediaIndex, onClick, children, }: {
|
|
22
22
|
mediaIndex: number;
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
onClick?: () => void;
|
|
25
25
|
}): JSX.Element;
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const useProductMediaContext: () => number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./registerProductBox";
|
|
|
24
24
|
export * from "./registerProductCollection";
|
|
25
25
|
export * from "./registerProductLink";
|
|
26
26
|
export * from "./registerProductMedia";
|
|
27
|
+
export * from "./registerProductMediaCollection";
|
|
27
28
|
export * from "./registerProductPrice";
|
|
28
29
|
export * from "./registerProductQuantity";
|
|
29
30
|
export * from "./registerProductSlider";
|
|
@@ -3,7 +3,6 @@ import { Registerable } from "./registerable";
|
|
|
3
3
|
interface CategoryMediaProps {
|
|
4
4
|
className: string;
|
|
5
5
|
mediaIndex?: number;
|
|
6
|
-
mediaSize?: string;
|
|
7
6
|
}
|
|
8
7
|
export declare const categoryMediaMeta: ComponentMeta<CategoryMediaProps>;
|
|
9
8
|
export declare function CategoryMedia(props: CategoryMediaProps): JSX.Element;
|
|
@@ -3,7 +3,9 @@ import { Registerable } from "./registerable";
|
|
|
3
3
|
interface ProductMediaProps {
|
|
4
4
|
className: string;
|
|
5
5
|
mediaIndex?: number;
|
|
6
|
-
|
|
6
|
+
setControlContextData: (data: {
|
|
7
|
+
inMediaContext: boolean;
|
|
8
|
+
}) => void;
|
|
7
9
|
}
|
|
8
10
|
export declare const productMediaMeta: ComponentMeta<ProductMediaProps>;
|
|
9
11
|
export declare function ProductMedia(props: ProductMediaProps): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
interface ProductMediaCollectionProps {
|
|
5
|
+
className: string;
|
|
6
|
+
media: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const productMediaCollectionMeta: ComponentMeta<ProductMediaCollectionProps>;
|
|
9
|
+
export declare function ProductMediaCollection(props: ProductMediaCollectionProps): JSX.Element;
|
|
10
|
+
export declare function registerProductMediaCollection(loader?: Registerable, customProductMediaCollectionMeta?: ComponentMeta<ProductMediaCollectionProps>): void;
|
|
11
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/commerce",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
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": "28965729b36b4b45d86845b53eb3ccbe0ee46a0c"
|
|
43
43
|
}
|