@zync/zync-screnplay-player 0.1.241 → 0.1.242

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.
@@ -85,9 +85,11 @@ export var BoxwipeNametag = function BoxwipeNametag(_ref) {
85
85
  var titleBackgroundColor = (themeSettings === null || themeSettings === void 0 ? void 0 : themeSettings.primaryColor) || primaryColor || "#000000";
86
86
  var titleTextColor = (themeSettings === null || themeSettings === void 0 ? void 0 : themeSettings.primaryContrast) || getContrastColor(titleBackgroundColor) || primaryContrast || "#FFFFFF";
87
87
  var horizontalPadding = borderWidth;
88
+ var titleHorizontalPadding = borderWidth * 2.5;
88
89
  var nameFontSize = fitSingleLineFontSize(displayName, boxWidth - horizontalPadding, boxHeight * 0.84, maxNameFontSize);
89
90
  var fittedBoxWidth = clamp(estimateTextWidth(displayName, nameFontSize) + horizontalPadding, boxWidth * 0.42, boxWidth);
90
- var titleFontSize = fitSingleLineFontSize(displayTitle, fittedBoxWidth, boxHeight * 0.45, maxTitleFontSize);
91
+ var titleFontSize = fitSingleLineFontSize(displayTitle, boxWidth - titleHorizontalPadding, boxHeight * 0.45, maxTitleFontSize);
92
+ var fittedTitleBoxWidth = clamp(estimateTextWidth(displayTitle, titleFontSize) + titleHorizontalPadding, boxWidth * 0.28, boxWidth);
91
93
  var widthGrowEnd = Math.round(fps * 0.65);
92
94
  var heightGrowStart = widthGrowEnd + Math.round(fps * 0.06);
93
95
  var heightGrowEnd = heightGrowStart + Math.round(fps * 0.45);
@@ -169,14 +171,15 @@ export var BoxwipeNametag = function BoxwipeNametag(_ref) {
169
171
  letterSpacing: "0.1em",
170
172
  lineHeight: 1.1,
171
173
  marginBottom: titleGap,
172
- maxWidth: fittedBoxWidth,
174
+ maxWidth: boxWidth,
173
175
  opacity: finishProgress,
174
176
  overflow: "hidden",
175
- padding: "0 ".concat(borderWidth * 1.25, "px"),
177
+ padding: "0 ".concat(titleHorizontalPadding / 2, "px"),
176
178
  textShadow: "0 2px 7px rgba(0, 0, 0, 0.65)",
177
179
  textOverflow: "clip",
178
180
  transform: "translateY(".concat(titleTranslateY, "px)"),
179
- whiteSpace: "nowrap"
181
+ whiteSpace: "nowrap",
182
+ width: fittedTitleBoxWidth
180
183
  }
181
184
  }, displayTitle), /*#__PURE__*/React.createElement("div", {
182
185
  style: {
@@ -37,7 +37,7 @@ export var RightslideNametag = function RightslideNametag(_ref) {
37
37
  var _useOrientationBased = useOrientationBased({
38
38
  landscape: {
39
39
  containerBottom: height * 0.11,
40
- containerLeft: width * 0.04,
40
+ containerRight: width * 0.04,
41
41
  lineWidth: clamp(width * 0.004, 5, 8),
42
42
  maxNameBoxWidth: width * 0.62,
43
43
  maxNameFontSize: width * 0.07,
@@ -59,7 +59,7 @@ export var RightslideNametag = function RightslideNametag(_ref) {
59
59
  },
60
60
  square: {
61
61
  containerBottom: height * 0.15,
62
- containerLeft: width * 0.06,
62
+ containerRight: width * 0.06,
63
63
  lineWidth: clamp(width * 0.007, 5, 8),
64
64
  maxNameBoxWidth: width * 0.78,
65
65
  maxNameFontSize: width * 0.095,
@@ -71,6 +71,7 @@ export var RightslideNametag = function RightslideNametag(_ref) {
71
71
  }),
72
72
  containerBottom = _useOrientationBased.containerBottom,
73
73
  containerLeft = _useOrientationBased.containerLeft,
74
+ containerRight = _useOrientationBased.containerRight,
74
75
  lineWidth = _useOrientationBased.lineWidth,
75
76
  maxNameBoxWidth = _useOrientationBased.maxNameBoxWidth,
76
77
  maxNameFontSize = _useOrientationBased.maxNameFontSize,
@@ -148,6 +149,7 @@ export var RightslideNametag = function RightslideNametag(_ref) {
148
149
  fontFamily: fontFamily,
149
150
  left: containerLeft,
150
151
  position: "absolute",
152
+ right: containerRight,
151
153
  width: maxNameBoxWidth + lineWidth
152
154
  }
153
155
  }, /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zync/zync-screnplay-player",
3
- "version": "0.1.241",
3
+ "version": "0.1.242",
4
4
  "files": [
5
5
  "dist"
6
6
  ],