@surfside/ads-react 0.1.14 → 0.1.15
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/lib/cjs/BuildInfo.js +5 -0
- package/lib/cjs/BuildInfo.js.map +1 -0
- package/lib/cjs/components/SurfsideBanner.js +3 -3
- package/lib/cjs/components/SurfsideBanner.js.map +1 -1
- package/lib/cjs/components/SurfsideCarousel.js +15 -3
- package/lib/cjs/components/SurfsideCarousel.js.map +1 -1
- package/lib/cjs/components/SurfsideDynamicZone.js +6 -4
- package/lib/cjs/components/SurfsideDynamicZone.js.map +1 -1
- package/lib/cjs/components/SurfsideProduct.js +9 -7
- package/lib/cjs/components/SurfsideProduct.js.map +1 -1
- package/lib/cjs/components/SurfsideVideo.js +6 -4
- package/lib/cjs/components/SurfsideVideo.js.map +1 -1
- package/lib/cjs/hooks/useSurfsideBanner.js +7 -4
- package/lib/cjs/hooks/useSurfsideBanner.js.map +1 -1
- package/lib/cjs/hooks/useSurfsideDynamicZone.js +47 -8
- package/lib/cjs/hooks/useSurfsideDynamicZone.js.map +1 -1
- package/lib/cjs/hooks/useSurfsideProducts.js +55 -18
- package/lib/cjs/hooks/useSurfsideProducts.js.map +1 -1
- package/lib/cjs/hooks/useSurfsideVideo.js +8 -4
- package/lib/cjs/hooks/useSurfsideVideo.js.map +1 -1
- package/lib/cjs/index.js +15 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/BuildInfo.js +2 -0
- package/lib/esm/BuildInfo.js.map +1 -0
- package/lib/esm/components/SurfsideBanner.js +4 -3
- package/lib/esm/components/SurfsideBanner.js.map +1 -1
- package/lib/esm/components/SurfsideCarousel.js +16 -4
- package/lib/esm/components/SurfsideCarousel.js.map +1 -1
- package/lib/esm/components/SurfsideDynamicZone.js +6 -4
- package/lib/esm/components/SurfsideDynamicZone.js.map +1 -1
- package/lib/esm/components/SurfsideProduct.js +9 -6
- package/lib/esm/components/SurfsideProduct.js.map +1 -1
- package/lib/esm/components/SurfsideVideo.js +7 -4
- package/lib/esm/components/SurfsideVideo.js.map +1 -1
- package/lib/esm/hooks/useSurfsideBanner.js +7 -4
- package/lib/esm/hooks/useSurfsideBanner.js.map +1 -1
- package/lib/esm/hooks/useSurfsideDynamicZone.js +48 -9
- package/lib/esm/hooks/useSurfsideDynamicZone.js.map +1 -1
- package/lib/esm/hooks/useSurfsideProducts.js +55 -18
- package/lib/esm/hooks/useSurfsideProducts.js.map +1 -1
- package/lib/esm/hooks/useSurfsideVideo.js +8 -4
- package/lib/esm/hooks/useSurfsideVideo.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/BuildInfo.d.ts +5 -0
- package/lib/types/components/SurfsideBanner.d.ts +4 -0
- package/lib/types/components/SurfsideCarousel.d.ts +2 -1
- package/lib/types/components/SurfsideDynamicZone.d.ts +2 -1
- package/lib/types/components/SurfsideProduct.d.ts +2 -1
- package/lib/types/components/SurfsideVideo.d.ts +6 -1
- package/lib/types/hooks/useSurfsideBanner.d.ts +5 -1
- package/lib/types/hooks/useSurfsideDynamicZone.d.ts +1 -0
- package/lib/types/hooks/useSurfsideProducts.d.ts +4 -0
- package/lib/types/hooks/useSurfsideVideo.d.ts +5 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +8 -4
|
@@ -32,6 +32,10 @@ export interface IUseSurfsideProductsPropsBase {
|
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
34
|
withProductInfo?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The categories to request the products for
|
|
37
|
+
*/
|
|
38
|
+
category?: string[];
|
|
35
39
|
}
|
|
36
40
|
/** The product props state for returning a set of full product data
|
|
37
41
|
* @expandType IUseSurfsideProductsPropsBase
|
|
@@ -49,6 +49,10 @@ export interface IUseSurfsideVideoOptions {
|
|
|
49
49
|
* @default true
|
|
50
50
|
*/
|
|
51
51
|
enabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The categories to request the video for
|
|
54
|
+
*/
|
|
55
|
+
category?: string[];
|
|
52
56
|
}
|
|
53
57
|
export type ISurfsideVideoEventHandler = () => void;
|
|
54
58
|
/**
|
|
@@ -249,7 +253,7 @@ export type UseSurfsideVideoReturn = IUseSurfsideVideoReturnSuccess | IUseSurfsi
|
|
|
249
253
|
* @expandType IUseSurfsideVideoOptions
|
|
250
254
|
* @expandType UseSurfsideVideoReturn
|
|
251
255
|
*/
|
|
252
|
-
export declare const useSurfsideVideo: ({ zoneId, size, minDuration, maxDuration, mimes, enabled }: IUseSurfsideVideoOptions) => UseSurfsideVideoReturn;
|
|
256
|
+
export declare const useSurfsideVideo: ({ zoneId, size, minDuration, maxDuration, mimes, enabled, category }: IUseSurfsideVideoOptions) => UseSurfsideVideoReturn;
|
|
253
257
|
export type UseSurfsideVideoResponseProps = IUseSurfsideVideoOptions & {
|
|
254
258
|
video: Result<IBuiltVideo> | undefined;
|
|
255
259
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export { IBanner, IUseSurfsideBannerOptions, IBannerAnalyticsCallbacks, IUseSurf
|
|
|
12
12
|
export { IUseSurfsideDynamicZoneOptionsConfigProductOptions, IUseSurfsideDynamicZoneOptionsConfigWithProductInfo, IUseSurfsideDynamicZoneOptionsConfigWithProductIDs, UseSurfsideDynamicZoneOptionsConfigProductInfo, UseSurfDynamicZoneOptionsBase, UseSurfDynamicZoneOptionsWithProductInfo, UseSurfDynamicZoneOptionsWithProductIDs, UseSurfDynamicZoneOptions, IUseDynamicZoneReturnBase, IUseDynamicZoneReturnSuccess, IUseDynamicZoneReturnError, IUseDynamicZoneReturnLoading, IUseDynamicZoneReturnBanner, IUseDynamicZoneReturnVideo, IUseDynamicZoneReturnProducts, IUseDynamicZoneReturnProductsIndeterminate, UseSurfDynamicZoneReturnGeneric, UseSurfDynamicZoneReturn, useSurfsideDynamicZone, InvalidDynamicZoneState, } from './hooks';
|
|
13
13
|
export { IUseSurfsideProductsPropsBase, UseSurfsideProductsPropsWithProductData, UseSurfsideProductsPropsWithProductIDs, UseSurfsideProductsProps, IUseSurfsideProductsResponsePropsBase, UseSurfsideProductsResponsePropsWithProductIDs, UseSurfsideProductsResponsePropsWithProductData, UseSurfsideProductsResponseProps, IProductDataBase, IProductInfoData, IProductIDData, IProductAnalyticsCallbacks, IUseSurfsideProductsReturnGeneric, IUseSurfsideProductsReturnGenericSuccess, IUseSurfsideProductsReturnGenericError, IUseSurfsideProductsReturnGenericLoading, UseSurfsideProductsReturnGeneric, UseSurfsideProductsReturn, useSurfsideProducts, useSurfsideProductsResponse, InvalidStrategyError, InvalidProductsStateError, } from './hooks';
|
|
14
14
|
export { IVideo, IUseSurfsideVideoOptions, ISurfsideVideoEventHandler, ISurfsideVideoAnalytics, IUseSurfsideVideoReturnBase, IUseSurfsideVideoReturnSuccess, IUseSurfsideVideoReturnError, IUseSurfsideVideoReturnLoading, UseSurfsideVideoReturn, useSurfsideVideo, UseSurfsideVideoResponseProps, useSurfsideVideoResponse, InvalidVideoStateError, } from './hooks';
|
|
15
|
+
export * from './BuildInfo';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surfside/ads-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "React components for Surfside Ads",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"clean": "rm -rf ./lib",
|
|
23
|
-
"
|
|
23
|
+
"prebuild": "echo \"export const SurfsideAdReactVersionInfo = { buildBranch: '$(git rev-parse --abbrev-ref HEAD)', buildHash: '$(git rev-parse --short HEAD)', buildVer: '$(bun -e 'console.log(require(\"./package.json\").version)')'};\" > src/BuildInfo.ts",
|
|
24
|
+
"build": "bunx npm-run-all --parallel \"types\" \"esm\" \"cjs\"",
|
|
25
|
+
"types": "tsc -p ./tsconfig.types.json",
|
|
26
|
+
"esm": "tsc -p ./tsconfig.esm.json",
|
|
27
|
+
"cjs": "tsc -p tsconfig.cjs.json",
|
|
24
28
|
"lint": "npx eslint"
|
|
25
29
|
},
|
|
26
30
|
"peerDependencies": {
|
|
@@ -28,8 +32,8 @@
|
|
|
28
32
|
"typescript": "^5.8.3"
|
|
29
33
|
},
|
|
30
34
|
"dependencies": {
|
|
31
|
-
"@surfside/ads-core-web": "^0.1.
|
|
32
|
-
"@surfside/ads-core-mock": "^0.1.
|
|
35
|
+
"@surfside/ads-core-web": "^0.1.15",
|
|
36
|
+
"@surfside/ads-core-mock": "^0.1.15"
|
|
33
37
|
},
|
|
34
38
|
"devDependencies": {
|
|
35
39
|
"@types/bun": "latest",
|