@plasmicpkgs/commerce 0.0.2 → 0.0.3
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 +96 -21
- 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.d.ts +5 -1
- package/dist/commerce.esm.js +95 -22
- package/dist/commerce.esm.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/registerAddToCartButton.d.ts +0 -1
- package/dist/registerProductCollection.d.ts +7 -2
- package/dist/registerProductMedia.d.ts +0 -2
- package/dist/site/use-brands.d.ts +5 -0
- package/dist/site/use-categories.d.ts +5 -0
- package/dist/types/site.d.ts +25 -1
- package/package.json +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { CSSProperties } from "@plasmicapp/host/dist/element-types";
|
|
2
1
|
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
3
2
|
import { Registerable } from "./registerable";
|
|
4
3
|
interface ProductMediaProps {
|
|
5
4
|
className: string;
|
|
6
|
-
style?: CSSProperties;
|
|
7
5
|
mediaIndex?: number;
|
|
8
6
|
}
|
|
9
7
|
export declare const productMediaMeta: ComponentMeta<ProductMediaProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SWRHook } from '../utils/types';
|
|
2
|
+
import { GetBrandsHook } from '../types/site';
|
|
3
|
+
export declare type UseBrands<H extends SWRHook<GetBrandsHook<any>> = SWRHook<GetBrandsHook>> = ReturnType<H['useHook']>;
|
|
4
|
+
declare const useBrands: UseBrands;
|
|
5
|
+
export default useBrands;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SWRHook } from '../utils/types';
|
|
2
|
+
import { GetCategoriesHook } from '../types/site';
|
|
3
|
+
export declare type UseCategories<H extends SWRHook<GetCategoriesHook<any>> = SWRHook<GetCategoriesHook>> = ReturnType<H['useHook']>;
|
|
4
|
+
declare const useCategories: UseCategories;
|
|
5
|
+
export default useCategories;
|
package/dist/types/site.d.ts
CHANGED
|
@@ -4,10 +4,18 @@ export declare type Category = {
|
|
|
4
4
|
slug: string;
|
|
5
5
|
path: string;
|
|
6
6
|
};
|
|
7
|
-
export declare type Brand =
|
|
7
|
+
export declare type Brand = {
|
|
8
|
+
name: string;
|
|
9
|
+
entityId: string;
|
|
10
|
+
path: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type SearchSiteInfoBody = {
|
|
13
|
+
locale?: string;
|
|
14
|
+
};
|
|
8
15
|
export declare type SiteTypes = {
|
|
9
16
|
category: Category;
|
|
10
17
|
brand: Brand;
|
|
18
|
+
searchBody: SearchSiteInfoBody;
|
|
11
19
|
};
|
|
12
20
|
export declare type GetSiteInfoOperation<T extends SiteTypes = SiteTypes> = {
|
|
13
21
|
data: {
|
|
@@ -15,3 +23,19 @@ export declare type GetSiteInfoOperation<T extends SiteTypes = SiteTypes> = {
|
|
|
15
23
|
brands: T['brand'][];
|
|
16
24
|
};
|
|
17
25
|
};
|
|
26
|
+
export declare type GetCategoriesHook<T extends SiteTypes = SiteTypes> = {
|
|
27
|
+
data: T['category'][] | null;
|
|
28
|
+
input: {};
|
|
29
|
+
fetcherInput: {};
|
|
30
|
+
swrState: {
|
|
31
|
+
isEmpty: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare type GetBrandsHook<T extends SiteTypes = SiteTypes> = {
|
|
35
|
+
data: T['brand'][] | null;
|
|
36
|
+
input: {};
|
|
37
|
+
fetcherInput: {};
|
|
38
|
+
swrState: {
|
|
39
|
+
isEmpty: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|