@nok-integration/storefront-react 0.26.0 → 0.27.0

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/index.d.ts CHANGED
@@ -2768,6 +2768,7 @@ declare function createClient(options: ClientOptions): {
2768
2768
  desktop_image?: string | undefined;
2769
2769
  target?: string | undefined;
2770
2770
  video?: string | undefined;
2771
+ desktop_video?: string | undefined;
2771
2772
  focal_y?: number | undefined;
2772
2773
  }[];
2773
2774
  }>;
package/dist/index.mjs CHANGED
@@ -4398,6 +4398,7 @@ function requireContent$1() {
4398
4398
  image: zod_1.z.string().min(1).optional(),
4399
4399
  video: zod_1.z.string().min(1).optional(),
4400
4400
  desktop_image: zod_1.z.string().min(1).optional(),
4401
+ desktop_video: zod_1.z.string().min(1).optional(),
4401
4402
  focal_y: zod_1.z.number().int().min(0).max(100).optional()
4402
4403
  });
4403
4404
  exports.HomeContent = zod_1.z.object({
@@ -13498,6 +13499,7 @@ function requireContent() {
13498
13499
  image: zod_1.z.string().min(1).optional(),
13499
13500
  video: zod_1.z.string().min(1).optional(),
13500
13501
  desktop_image: zod_1.z.string().min(1).optional(),
13502
+ desktop_video: zod_1.z.string().min(1).optional(),
13501
13503
  focal_y: zod_1.z.number().int().min(0).max(100).optional()
13502
13504
  });
13503
13505
  exports.HomeContent = zod_1.z.object({
@@ -15214,8 +15216,8 @@ function useDocumentSnap(ref, enabled = true) {
15214
15216
  };
15215
15217
  }, [ref, enabled]);
15216
15218
  }
15217
- const HERO_DESKTOP = "/figma/home/hero-desktop.jpg";
15218
- const BAND_DESKTOP = "/figma/home/band-desktop.jpg";
15219
+ const DESKTOP_POSTER = "/figma/home/desktop-poster.jpg";
15220
+ const DESKTOP_VIDEO = "/figma/home/desktop.mp4";
15219
15221
  const FALLBACK_PANELS = [{
15220
15222
  key: "hoodies",
15221
15223
  title: "Hoodies",
@@ -15225,7 +15227,8 @@ const FALLBACK_PANELS = [{
15225
15227
  target: "hoodies",
15226
15228
  video: "/figma/home/hoodies.mp4",
15227
15229
  image: "/figma/home/hoodies-poster.jpg",
15228
- desktopImage: BAND_DESKTOP
15230
+ desktopImage: DESKTOP_POSTER,
15231
+ desktopVideo: DESKTOP_VIDEO
15229
15232
  }, {
15230
15233
  key: "zip-ups",
15231
15234
  title: "Zip Ups",
@@ -15235,7 +15238,8 @@ const FALLBACK_PANELS = [{
15235
15238
  target: "zip-ups",
15236
15239
  video: "/figma/home/zip-ups.mp4",
15237
15240
  image: "/figma/home/zip-ups-poster.jpg",
15238
- desktopImage: BAND_DESKTOP
15241
+ desktopImage: DESKTOP_POSTER,
15242
+ desktopVideo: DESKTOP_VIDEO
15239
15243
  }, {
15240
15244
  key: "t-shirts",
15241
15245
  title: "T-Shirts",
@@ -15245,7 +15249,8 @@ const FALLBACK_PANELS = [{
15245
15249
  target: "t-shirts",
15246
15250
  video: "/figma/home/tshirts.mp4",
15247
15251
  image: "/figma/home/tshirts-poster.jpg",
15248
- desktopImage: BAND_DESKTOP
15252
+ desktopImage: DESKTOP_POSTER,
15253
+ desktopVideo: DESKTOP_VIDEO
15249
15254
  }];
15250
15255
  const BAND_LIMIT = 20;
15251
15256
  const WIDE_BAND = 3;
@@ -15308,6 +15313,13 @@ function CategoryPanel({ panel: panel2, wide: wide2 }) {
15308
15313
  fill: true,
15309
15314
  sizes: "(max-width: 480px) 100vw, 480px",
15310
15315
  className: [styles$3.image, panel2.desktopImage ? styles$3.desktopFocal : ""].join(" ")
15316
+ }), wide2 && panel2.desktopVideo && jsx(ShopVideo, {
15317
+ src: panel2.desktopVideo,
15318
+ ...panel2.desktopImage ? {
15319
+ poster: panel2.desktopImage
15320
+ } : {},
15321
+ fill: true,
15322
+ className: [styles$3.image, styles$3.desktopArt].join(" ")
15311
15323
  }), jsxs("div", {
15312
15324
  className: styles$3.overlay,
15313
15325
  children: [jsxs("div", {
@@ -15389,6 +15401,9 @@ function useSlides() {
15389
15401
  ...s.desktop_image === void 0 ? {} : {
15390
15402
  desktopImage: s.desktop_image
15391
15403
  },
15404
+ ...s.desktop_video === void 0 ? {} : {
15405
+ desktopVideo: s.desktop_video
15406
+ },
15392
15407
  ...s.focal_y === void 0 ? {} : {
15393
15408
  focalY: s.focal_y
15394
15409
  }
@@ -15439,11 +15454,17 @@ function HomeShowcase() {
15439
15454
  priority: true,
15440
15455
  className: [styles$3.image, styles$3.phoneArt].join(" ")
15441
15456
  }), jsx(ShopImage, {
15442
- src: HERO_DESKTOP,
15457
+ src: DESKTOP_POSTER,
15443
15458
  alt: "",
15444
15459
  fill: true,
15445
15460
  sizes: "100vw",
15446
15461
  className: [styles$3.image, styles$3.desktopArt].join(" ")
15462
+ }), wide2 && jsx(ShopVideo, {
15463
+ src: DESKTOP_VIDEO,
15464
+ poster: DESKTOP_POSTER,
15465
+ fill: true,
15466
+ priority: true,
15467
+ className: [styles$3.image, styles$3.desktopArt].join(" ")
15447
15468
  }), jsxs("div", {
15448
15469
  className: styles$3.heroContent,
15449
15470
  children: [jsxs("div", {
@@ -4398,6 +4398,7 @@ function requireContent$1() {
4398
4398
  image: zod_1.z.string().min(1).optional(),
4399
4399
  video: zod_1.z.string().min(1).optional(),
4400
4400
  desktop_image: zod_1.z.string().min(1).optional(),
4401
+ desktop_video: zod_1.z.string().min(1).optional(),
4401
4402
  focal_y: zod_1.z.number().int().min(0).max(100).optional()
4402
4403
  });
4403
4404
  exports.HomeContent = zod_1.z.object({
@@ -13498,6 +13499,7 @@ function requireContent() {
13498
13499
  image: zod_1.z.string().min(1).optional(),
13499
13500
  video: zod_1.z.string().min(1).optional(),
13500
13501
  desktop_image: zod_1.z.string().min(1).optional(),
13502
+ desktop_video: zod_1.z.string().min(1).optional(),
13501
13503
  focal_y: zod_1.z.number().int().min(0).max(100).optional()
13502
13504
  });
13503
13505
  exports.HomeContent = zod_1.z.object({
@@ -15214,8 +15216,8 @@ function useDocumentSnap(ref, enabled = true) {
15214
15216
  };
15215
15217
  }, [ref, enabled]);
15216
15218
  }
15217
- const HERO_DESKTOP = "/figma/home/hero-desktop.jpg";
15218
- const BAND_DESKTOP = "/figma/home/band-desktop.jpg";
15219
+ const DESKTOP_POSTER = "/figma/home/desktop-poster.jpg";
15220
+ const DESKTOP_VIDEO = "/figma/home/desktop.mp4";
15219
15221
  const FALLBACK_PANELS = [{
15220
15222
  key: "hoodies",
15221
15223
  title: "Hoodies",
@@ -15225,7 +15227,8 @@ const FALLBACK_PANELS = [{
15225
15227
  target: "hoodies",
15226
15228
  video: "/figma/home/hoodies.mp4",
15227
15229
  image: "/figma/home/hoodies-poster.jpg",
15228
- desktopImage: BAND_DESKTOP
15230
+ desktopImage: DESKTOP_POSTER,
15231
+ desktopVideo: DESKTOP_VIDEO
15229
15232
  }, {
15230
15233
  key: "zip-ups",
15231
15234
  title: "Zip Ups",
@@ -15235,7 +15238,8 @@ const FALLBACK_PANELS = [{
15235
15238
  target: "zip-ups",
15236
15239
  video: "/figma/home/zip-ups.mp4",
15237
15240
  image: "/figma/home/zip-ups-poster.jpg",
15238
- desktopImage: BAND_DESKTOP
15241
+ desktopImage: DESKTOP_POSTER,
15242
+ desktopVideo: DESKTOP_VIDEO
15239
15243
  }, {
15240
15244
  key: "t-shirts",
15241
15245
  title: "T-Shirts",
@@ -15245,7 +15249,8 @@ const FALLBACK_PANELS = [{
15245
15249
  target: "t-shirts",
15246
15250
  video: "/figma/home/tshirts.mp4",
15247
15251
  image: "/figma/home/tshirts-poster.jpg",
15248
- desktopImage: BAND_DESKTOP
15252
+ desktopImage: DESKTOP_POSTER,
15253
+ desktopVideo: DESKTOP_VIDEO
15249
15254
  }];
15250
15255
  const BAND_LIMIT = 20;
15251
15256
  const WIDE_BAND = 3;
@@ -15308,6 +15313,13 @@ function CategoryPanel({ panel: panel2, wide: wide2 }) {
15308
15313
  fill: true,
15309
15314
  sizes: "(max-width: 480px) 100vw, 480px",
15310
15315
  className: [styles$3.image, panel2.desktopImage ? styles$3.desktopFocal : ""].join(" ")
15316
+ }), wide2 && panel2.desktopVideo && jsx(ShopVideo, {
15317
+ src: panel2.desktopVideo,
15318
+ ...panel2.desktopImage ? {
15319
+ poster: panel2.desktopImage
15320
+ } : {},
15321
+ fill: true,
15322
+ className: [styles$3.image, styles$3.desktopArt].join(" ")
15311
15323
  }), jsxs("div", {
15312
15324
  className: styles$3.overlay,
15313
15325
  children: [jsxs("div", {
@@ -15389,6 +15401,9 @@ function useSlides() {
15389
15401
  ...s.desktop_image === void 0 ? {} : {
15390
15402
  desktopImage: s.desktop_image
15391
15403
  },
15404
+ ...s.desktop_video === void 0 ? {} : {
15405
+ desktopVideo: s.desktop_video
15406
+ },
15392
15407
  ...s.focal_y === void 0 ? {} : {
15393
15408
  focalY: s.focal_y
15394
15409
  }
@@ -15439,11 +15454,17 @@ function HomeShowcase() {
15439
15454
  priority: true,
15440
15455
  className: [styles$3.image, styles$3.phoneArt].join(" ")
15441
15456
  }), jsx(ShopImage, {
15442
- src: HERO_DESKTOP,
15457
+ src: DESKTOP_POSTER,
15443
15458
  alt: "",
15444
15459
  fill: true,
15445
15460
  sizes: "100vw",
15446
15461
  className: [styles$3.image, styles$3.desktopArt].join(" ")
15462
+ }), wide2 && jsx(ShopVideo, {
15463
+ src: DESKTOP_VIDEO,
15464
+ poster: DESKTOP_POSTER,
15465
+ fill: true,
15466
+ priority: true,
15467
+ className: [styles$3.image, styles$3.desktopArt].join(" ")
15447
15468
  }), jsxs("div", {
15448
15469
  className: styles$3.heroContent,
15449
15470
  children: [jsxs("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",