@drawbridge/components 0.0.18 → 0.0.20

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.
@@ -23,7 +23,8 @@ __export(card_advertisement_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(card_advertisement_exports);
25
25
  var import_react = require("react");
26
- var import_cdn = require("@drawbridge/drawbridge-utils/cdn");
26
+ var import_cdn = require("@drawbridge/shopify/cdn");
27
+ var import_cdn2 = require("@drawbridge/drawbridge-utils/cdn");
27
28
  var import_jsx_runtime = require("react/jsx-runtime");
28
29
  var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
29
30
  "img",
@@ -35,13 +36,13 @@ var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ (0, import_jsx_r
35
36
  }
36
37
  }
37
38
  );
38
- var DefaultVideo = ({ className, hsl, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
40
  "video",
40
41
  {
41
42
  ...{
42
43
  className,
43
44
  poster,
44
- src: mp4 || hsl
45
+ src: mp4 || hls
45
46
  }
46
47
  }
47
48
  );
@@ -135,7 +136,7 @@ var CardAdvertisement = ({
135
136
  key: asset == null ? void 0 : asset.id,
136
137
  priority: false,
137
138
  sizes: "100%",
138
- src: (0, import_cdn.cdnSrc)(asset, "400x400", asset == null ? void 0 : asset.updatedAt)
139
+ src: (0, import_cdn2.cdnSrc)(asset, "400x400", asset == null ? void 0 : asset.updatedAt)
139
140
  }
140
141
  }
141
142
  ),
@@ -165,9 +166,9 @@ var CardAdvertisement = ({
165
166
  {
166
167
  ...{
167
168
  className: "w-full h-full",
168
- hsl: (0, import_cdn.cdnSrc)(asset, "hsl", asset == null ? void 0 : asset.updatedAt),
169
- mp4: (0, import_cdn.cdnSrc)(asset, "original", asset == null ? void 0 : asset.updatedAt),
170
- poster: (0, import_cdn.cdnSrc)((_i = asset == null ? void 0 : asset.frames) == null ? void 0 : _i[asset == null ? void 0 : asset.poster], "500x500", asset == null ? void 0 : asset.updatedAt) || (0, import_cdn.cdnSrc)((_j = asset == null ? void 0 : asset.frames) == null ? void 0 : _j[asset == null ? void 0 : asset.poster], "1080x1920", asset == null ? void 0 : asset.updatedAt)
169
+ hls: (0, import_cdn2.cdnSrc)(asset, "hls", asset == null ? void 0 : asset.updatedAt),
170
+ mp4: (0, import_cdn2.cdnSrc)(asset, "original", asset == null ? void 0 : asset.updatedAt),
171
+ poster: (0, import_cdn2.cdnSrc)((_i = asset == null ? void 0 : asset.frames) == null ? void 0 : _i[asset == null ? void 0 : asset.poster], "500x500", asset == null ? void 0 : asset.updatedAt) || (0, import_cdn2.cdnSrc)((_j = asset == null ? void 0 : asset.frames) == null ? void 0 : _j[asset == null ? void 0 : asset.poster], "1080x1920", asset == null ? void 0 : asset.updatedAt)
171
172
  }
172
173
  }
173
174
  )
@@ -1,6 +1,7 @@
1
1
  // components/card-advertisement.js
2
2
  import { useState } from "react";
3
- import { cdnShopify, cdnSrc } from "@drawbridge/drawbridge-utils/cdn";
3
+ import { cdnShopify } from "@drawbridge/shopify/cdn";
4
+ import { cdnSrc } from "@drawbridge/drawbridge-utils/cdn";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ jsx(
6
7
  "img",
@@ -12,13 +13,13 @@ var DefaultImage = ({ alt, className, src }) => /* @__PURE__ */ jsx(
12
13
  }
13
14
  }
14
15
  );
15
- var DefaultVideo = ({ className, hsl, mp4, poster }) => /* @__PURE__ */ jsx(
16
+ var DefaultVideo = ({ className, hls, mp4, poster }) => /* @__PURE__ */ jsx(
16
17
  "video",
17
18
  {
18
19
  ...{
19
20
  className,
20
21
  poster,
21
- src: mp4 || hsl
22
+ src: mp4 || hls
22
23
  }
23
24
  }
24
25
  );
@@ -142,7 +143,7 @@ var CardAdvertisement = ({
142
143
  {
143
144
  ...{
144
145
  className: "w-full h-full",
145
- hsl: cdnSrc(asset, "hsl", asset == null ? void 0 : asset.updatedAt),
146
+ hls: cdnSrc(asset, "hls", asset == null ? void 0 : asset.updatedAt),
146
147
  mp4: cdnSrc(asset, "original", asset == null ? void 0 : asset.updatedAt),
147
148
  poster: cdnSrc((_i = asset == null ? void 0 : asset.frames) == null ? void 0 : _i[asset == null ? void 0 : asset.poster], "500x500", asset == null ? void 0 : asset.updatedAt) || cdnSrc((_j = asset == null ? void 0 : asset.frames) == null ? void 0 : _j[asset == null ? void 0 : asset.poster], "1080x1920", asset == null ? void 0 : asset.updatedAt)
148
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawbridge/components",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "overrides": {
5
5
  "postcss": "8.5.15"
6
6
  },
@@ -21,16 +21,20 @@
21
21
  "access": "public"
22
22
  },
23
23
  "scripts": {
24
- "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install",
24
+ "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install && npx drawbridge-agents-sync",
25
25
  "build": "tsup && npm publish"
26
26
  },
27
27
  "peerDependencies": {
28
- "@drawbridge/drawbridge-utils": "0.0.24",
28
+ "@drawbridge/drawbridge-utils": "0.0.25",
29
+ "@drawbridge/shopify": "0.0.3",
29
30
  "next": ">=14",
30
31
  "react": ">=18"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@types/react": "18.0.0",
34
35
  "tsup": "8.5.1"
36
+ },
37
+ "dependencies": {
38
+ "@drawbridge/drawbridge-agents": "0.0.6"
35
39
  }
36
40
  }