@wistia/wistia-player-react 0.6.5 → 0.6.7

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.
@@ -2550,7 +2550,7 @@ var init_wistia_player = __esm({
2550
2550
  var l1 = foregroundColor.getRelativeLuminance();
2551
2551
  var l2 = backgroundColor.getRelativeLuminance();
2552
2552
  var contrastRatio = l1 > l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);
2553
- return Number.parseFloat(contrastRatio.toFixed(1));
2553
+ return Number.parseFloat(contrastRatio.toFixed(3));
2554
2554
  };
2555
2555
  var adjustColorForProperContrast = function adjustColorForProperContrast2(foreground, background) {
2556
2556
  var shape = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "paragraphText";
@@ -2661,10 +2661,10 @@ var init_wistia_player = __esm({
2661
2661
  if (isGradientEnabled || !hasQueryParamOverride && !shouldUseAccessibleIconColor) {
2662
2662
  return "#ffffff";
2663
2663
  }
2664
- if (new _color_js__WEBPACK_IMPORTED_MODULE_1__.Q1("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.nonText) {
2664
+ if (new _color_js__WEBPACK_IMPORTED_MODULE_1__.Q1("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.paragraphText) {
2665
2665
  return "#ffffff";
2666
2666
  }
2667
- return adjustColorForProperContrast(_playerColor, _playerColor, "nonText");
2667
+ return adjustColorForProperContrast(_playerColor, _playerColor, "paragraphText");
2668
2668
  };
2669
2669
  var getAudioPlayerIconColor = function getAudioPlayerIconColor2(_playerColor, shouldUseAccessibleIconColor, isGradientEnabled) {
2670
2670
  var _searchParams$get2;
@@ -2677,7 +2677,7 @@ var init_wistia_player = __esm({
2677
2677
  if (new Color("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.paragraphText) {
2678
2678
  return "#ffffff";
2679
2679
  }
2680
- return adjustColorForProperContrast(_playerColor, _playerColor, "nonText");
2680
+ return adjustColorForProperContrast(_playerColor, _playerColor, "paragraphText");
2681
2681
  };
2682
2682
  },
2683
2683
  /***/
@@ -7741,7 +7741,7 @@ var init_wistia_player = __esm({
7741
7741
  }, {
7742
7742
  key: "getContrastRatio",
7743
7743
  value: function getContrastRatio(backgroundColor) {
7744
- return Number.parseFloat((0, _color_utils_ts__WEBPACK_IMPORTED_MODULE_0__.bJ)(this.toHexWithHash(), new Color3(backgroundColor).toHexWithHash()).toFixed(1));
7744
+ return Number.parseFloat((0, _color_utils_ts__WEBPACK_IMPORTED_MODULE_0__.bJ)(this.toHexWithHash(), new Color3(backgroundColor).toHexWithHash()).toFixed(3));
7745
7745
  }
7746
7746
  // background color can be a string or a Color
7747
7747
  // shape will be a key of colorContrastRatiosByShape
@@ -9010,7 +9010,7 @@ var init_wistia_player = __esm({
9010
9010
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
9011
9011
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
9012
9012
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
9013
- var TAGGED_VERSION2 = "0.6.5";
9013
+ var TAGGED_VERSION2 = "0.6.7";
9014
9014
  var CURRENT_SHA2 = (
9015
9015
  /* unused pure expression or super */
9016
9016
  null
@@ -8,7 +8,7 @@ import {
8
8
  import { forwardRef, Suspense, lazy, Fragment } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  var WistiaPlayerWrapper = lazy(
11
- async () => import("./WistiaPlayerWrapper-GG3CZK5N.mjs").then((module) => ({
11
+ async () => import("./WistiaPlayerWrapper-MB7KNGJH.mjs").then((module) => ({
12
12
  default: module.WistiaPlayerWrapper
13
13
  }))
14
14
  );
@@ -37,7 +37,7 @@ var WistiaPlayerWrapper = forwardRef(
37
37
  setSwatchAspectRatio(ratio);
38
38
  });
39
39
  }
40
- void import("./wistia-player-L32JEHH6.mjs");
40
+ void import("./wistia-player-3VB6IIEW.mjs");
41
41
  void customElements.whenDefined("wistia-player").then(() => {
42
42
  setIsWistiaPlayerDefined(true);
43
43
  });
@@ -1684,7 +1684,7 @@ var __webpack_modules__ = {
1684
1684
  var l1 = foregroundColor.getRelativeLuminance();
1685
1685
  var l2 = backgroundColor.getRelativeLuminance();
1686
1686
  var contrastRatio = l1 > l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);
1687
- return Number.parseFloat(contrastRatio.toFixed(1));
1687
+ return Number.parseFloat(contrastRatio.toFixed(3));
1688
1688
  };
1689
1689
  var adjustColorForProperContrast = function adjustColorForProperContrast2(foreground, background) {
1690
1690
  var shape = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "paragraphText";
@@ -1795,10 +1795,10 @@ var __webpack_modules__ = {
1795
1795
  if (isGradientEnabled || !hasQueryParamOverride && !shouldUseAccessibleIconColor) {
1796
1796
  return "#ffffff";
1797
1797
  }
1798
- if (new _color_js__WEBPACK_IMPORTED_MODULE_1__.Q1("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.nonText) {
1798
+ if (new _color_js__WEBPACK_IMPORTED_MODULE_1__.Q1("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.paragraphText) {
1799
1799
  return "#ffffff";
1800
1800
  }
1801
- return adjustColorForProperContrast(_playerColor, _playerColor, "nonText");
1801
+ return adjustColorForProperContrast(_playerColor, _playerColor, "paragraphText");
1802
1802
  };
1803
1803
  var getAudioPlayerIconColor = function getAudioPlayerIconColor2(_playerColor, shouldUseAccessibleIconColor, isGradientEnabled) {
1804
1804
  var _searchParams$get2;
@@ -1811,7 +1811,7 @@ var __webpack_modules__ = {
1811
1811
  if (new Color("#fff").getContrastRatio(playerColor) >= colorContrastRatiosByShape.paragraphText) {
1812
1812
  return "#ffffff";
1813
1813
  }
1814
- return adjustColorForProperContrast(_playerColor, _playerColor, "nonText");
1814
+ return adjustColorForProperContrast(_playerColor, _playerColor, "paragraphText");
1815
1815
  };
1816
1816
  },
1817
1817
  /***/
@@ -6875,7 +6875,7 @@ var __webpack_modules__ = {
6875
6875
  }, {
6876
6876
  key: "getContrastRatio",
6877
6877
  value: function getContrastRatio(backgroundColor) {
6878
- return Number.parseFloat((0, _color_utils_ts__WEBPACK_IMPORTED_MODULE_0__.bJ)(this.toHexWithHash(), new Color3(backgroundColor).toHexWithHash()).toFixed(1));
6878
+ return Number.parseFloat((0, _color_utils_ts__WEBPACK_IMPORTED_MODULE_0__.bJ)(this.toHexWithHash(), new Color3(backgroundColor).toHexWithHash()).toFixed(3));
6879
6879
  }
6880
6880
  // background color can be a string or a Color
6881
6881
  // shape will be a key of colorContrastRatiosByShape
@@ -8144,7 +8144,7 @@ var __webpack_modules__ = {
8144
8144
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
8145
8145
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
8146
8146
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
8147
- var TAGGED_VERSION2 = "0.6.5";
8147
+ var TAGGED_VERSION2 = "0.6.7";
8148
8148
  var CURRENT_SHA2 = (
8149
8149
  /* unused pure expression or super */
8150
8150
  null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/wistia-player-react",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "description": "An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.",
6
6
  "keywords": [
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@wistia/type-guards": "^0.9.3",
49
- "@wistia/wistia-player": "0.6.5"
49
+ "@wistia/wistia-player": "0.6.7"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=18.0.0 <20.0.0",