stormcloud-video-player 0.7.40 → 0.7.41
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/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +43 -42
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +43 -42
- package/lib/index.js.map +1 -1
- package/lib/ui/OverlayRenderer.cjs +22 -18
- package/lib/ui/OverlayRenderer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +43 -42
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/overlays.cjs +17 -17
- package/lib/utils/overlays.cjs.map +1 -1
- package/lib/utils/overlays.d.cts +0 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -6022,18 +6022,17 @@ function scrollerLooksLikeMarketsStock(o) {
|
|
|
6022
6022
|
return /\b(MARKETS?|NYSE|NASDAQ|DJIA|\bS&P\b|STOCK|AAPL|TSLA|NVDA|EQUITIES)\b/i.test(blob);
|
|
6023
6023
|
}
|
|
6024
6024
|
function createDemoStockTickerOverlay(projectId, opts) {
|
|
6025
|
-
var stack = (opts === null || opts === void 0 ? void 0 : opts.stackAboveNews) === true;
|
|
6026
6025
|
var cw = (opts === null || opts === void 0 ? void 0 : opts.coordinateWidth) && opts.coordinateWidth > 0 ? opts.coordinateWidth : SWIRL_HD_AUTHORING_WIDTH;
|
|
6027
6026
|
var ch = (opts === null || opts === void 0 ? void 0 : opts.coordinateHeight) && opts.coordinateHeight > 0 ? opts.coordinateHeight : SWIRL_HD_AUTHORING_HEIGHT;
|
|
6028
6027
|
var sx = cw / SWIRL_HD_AUTHORING_WIDTH;
|
|
6029
6028
|
var sy = ch / SWIRL_HD_AUTHORING_HEIGHT;
|
|
6030
6029
|
var x = 36 * sx;
|
|
6031
|
-
var y =
|
|
6030
|
+
var y = 1002 * sy;
|
|
6032
6031
|
var width = 1848 * sx;
|
|
6033
|
-
var height =
|
|
6034
|
-
var fontSize = Math.max(8, Math.round(
|
|
6035
|
-
var scrollSpeed = Math.max(8, Math.round(
|
|
6036
|
-
var borderRadius = Math.max(1, Math.round(
|
|
6032
|
+
var height = 66 * sy;
|
|
6033
|
+
var fontSize = Math.max(8, Math.round(13 * sy));
|
|
6034
|
+
var scrollSpeed = Math.max(8, Math.round(36 * sx));
|
|
6035
|
+
var borderRadius = Math.max(1, Math.round(4 * sy));
|
|
6037
6036
|
return {
|
|
6038
6037
|
id: -9001,
|
|
6039
6038
|
project_id: projectId,
|
|
@@ -6047,27 +6046,28 @@ function createDemoStockTickerOverlay(projectId, opts) {
|
|
|
6047
6046
|
opacity: 100,
|
|
6048
6047
|
start_time: "00:00:00.000",
|
|
6049
6048
|
duration: "24:00:00.000",
|
|
6050
|
-
z_index:
|
|
6049
|
+
z_index: 120,
|
|
6051
6050
|
scroller_config: {
|
|
6051
|
+
preset: "equities_strip",
|
|
6052
6052
|
use_custom_text: true,
|
|
6053
|
-
custom_text: "AAPL +
|
|
6053
|
+
custom_text: "AAPL +0.84% \u2022 MSFT +0.31% \u2022 GOOGL \u22120.22% \u2022 AMZN +0.47% \u2022 NVDA +1.12% \u2022 META +0.19% \u2022 BRK.B +0.11% \u2022 JPM +0.55% \u2022 V +0.28% \u2022 UNH \u22120.17% \u2022 DJIA +0.41% \u2022 S&P 500 +0.29% \u2022 Nasdaq Composite +0.36% \u2022 Russell 2000 +0.52% \u2022 WTI crude $78.40 +0.6% \u2022 Gold $2,348/oz \u22120.2% \u2022 10Y Treasury 4.28%",
|
|
6054
6054
|
direction: "left",
|
|
6055
6055
|
scroll_speed: scrollSpeed,
|
|
6056
6056
|
font_size: fontSize,
|
|
6057
6057
|
font_weight: "600",
|
|
6058
6058
|
text_color: "#e2e8f0",
|
|
6059
|
-
background_color: "#
|
|
6060
|
-
background_opacity:
|
|
6059
|
+
background_color: "#0a0f18",
|
|
6060
|
+
background_opacity: 92,
|
|
6061
6061
|
border_radius: borderRadius,
|
|
6062
|
-
padding: Math.max(
|
|
6063
|
-
label: "
|
|
6064
|
-
label_line2: "
|
|
6065
|
-
label_color: "#
|
|
6066
|
-
label_text_color: "#
|
|
6067
|
-
accent_color: "#
|
|
6062
|
+
padding: Math.max(3, Math.round(6 * sy)),
|
|
6063
|
+
label: "U.S. equities",
|
|
6064
|
+
label_line2: "",
|
|
6065
|
+
label_color: "#1e3a5f",
|
|
6066
|
+
label_text_color: "#f8fafc",
|
|
6067
|
+
accent_color: "#38bdf8",
|
|
6068
6068
|
show_accent_line: true,
|
|
6069
6069
|
separator_char: "\u2022",
|
|
6070
|
-
item_spacing: Math.max(
|
|
6070
|
+
item_spacing: Math.max(28, Math.round(48 * sx))
|
|
6071
6071
|
}
|
|
6072
6072
|
};
|
|
6073
6073
|
}
|
|
@@ -6517,6 +6517,7 @@ function ScrollerOverlay(param) {
|
|
|
6517
6517
|
var labelTextColor = (_ref11 = cfg === null || cfg === void 0 ? void 0 : cfg.label_text_color) !== null && _ref11 !== void 0 ? _ref11 : "#ffffff";
|
|
6518
6518
|
var accentColor = (_ref12 = cfg === null || cfg === void 0 ? void 0 : cfg.accent_color) !== null && _ref12 !== void 0 ? _ref12 : labelColor;
|
|
6519
6519
|
var showAccentLine = (cfg === null || cfg === void 0 ? void 0 : cfg.show_accent_line) !== false;
|
|
6520
|
+
var isEquitiesStrip = (cfg === null || cfg === void 0 ? void 0 : cfg.preset) === "equities_strip";
|
|
6520
6521
|
var isHorizontal = direction === "left" || direction === "right";
|
|
6521
6522
|
var isReverse = direction === "right" || direction === "down";
|
|
6522
6523
|
var fullText = segments.join(" ".concat(sep, " "));
|
|
@@ -6547,7 +6548,7 @@ function ScrollerOverlay(param) {
|
|
|
6547
6548
|
children: [
|
|
6548
6549
|
showAccentLine && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6549
6550
|
style: {
|
|
6550
|
-
height: 3,
|
|
6551
|
+
height: isEquitiesStrip ? 2 : 3,
|
|
6551
6552
|
background: accentColor,
|
|
6552
6553
|
flexShrink: 0,
|
|
6553
6554
|
width: "100%"
|
|
@@ -6560,8 +6561,8 @@ function ScrollerOverlay(param) {
|
|
|
6560
6561
|
overflow: "hidden",
|
|
6561
6562
|
minHeight: 0,
|
|
6562
6563
|
alignItems: "center",
|
|
6563
|
-
padding: "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
|
|
6564
|
-
gap: Math.max(6, pad),
|
|
6564
|
+
padding: isEquitiesStrip ? "".concat(Math.max(2, pad * 0.5), "px ").concat(pad, "px") : "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
|
|
6565
|
+
gap: isEquitiesStrip ? Math.max(4, Math.round(pad * 0.75)) : Math.max(6, pad),
|
|
6565
6566
|
boxSizing: "border-box"
|
|
6566
6567
|
},
|
|
6567
6568
|
children: [
|
|
@@ -6569,30 +6570,33 @@ function ScrollerOverlay(param) {
|
|
|
6569
6570
|
style: {
|
|
6570
6571
|
background: labelColor,
|
|
6571
6572
|
color: labelTextColor,
|
|
6572
|
-
padding: "10px 14px",
|
|
6573
|
+
padding: isEquitiesStrip ? "6px 12px" : "10px 14px",
|
|
6573
6574
|
display: "flex",
|
|
6574
|
-
flexDirection: "column",
|
|
6575
|
+
flexDirection: isEquitiesStrip ? "row" : "column",
|
|
6575
6576
|
alignItems: "center",
|
|
6576
6577
|
justifyContent: "center",
|
|
6577
6578
|
flexShrink: 0,
|
|
6578
6579
|
textAlign: "center",
|
|
6579
|
-
gap: 2,
|
|
6580
|
-
borderRadius: Math.max(
|
|
6581
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.35)"
|
|
6580
|
+
gap: isEquitiesStrip ? 0 : 2,
|
|
6581
|
+
borderRadius: Math.max(2, borderRadius > 0 ? borderRadius : 6),
|
|
6582
|
+
boxShadow: isEquitiesStrip ? "inset 0 1px 0 rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.35)",
|
|
6583
|
+
alignSelf: "stretch",
|
|
6584
|
+
maxWidth: isEquitiesStrip ? "min(200px, 28%)" : void 0
|
|
6582
6585
|
},
|
|
6583
6586
|
children: [
|
|
6584
6587
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6585
6588
|
style: {
|
|
6586
|
-
fontWeight: 800,
|
|
6587
|
-
fontSize: "0.78em",
|
|
6588
|
-
letterSpacing: "0.08em",
|
|
6589
|
-
lineHeight: 1.
|
|
6590
|
-
textTransform: "uppercase",
|
|
6591
|
-
whiteSpace: "nowrap"
|
|
6589
|
+
fontWeight: isEquitiesStrip ? 700 : 800,
|
|
6590
|
+
fontSize: isEquitiesStrip ? "0.82em" : "0.78em",
|
|
6591
|
+
letterSpacing: isEquitiesStrip ? "0.04em" : "0.08em",
|
|
6592
|
+
lineHeight: 1.2,
|
|
6593
|
+
textTransform: isEquitiesStrip ? "none" : "uppercase",
|
|
6594
|
+
whiteSpace: isEquitiesStrip ? "normal" : "nowrap",
|
|
6595
|
+
textAlign: isEquitiesStrip ? "left" : "center"
|
|
6592
6596
|
},
|
|
6593
6597
|
children: label
|
|
6594
6598
|
}),
|
|
6595
|
-
labelLine2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6599
|
+
labelLine2 && !isEquitiesStrip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6596
6600
|
style: {
|
|
6597
6601
|
fontWeight: 600,
|
|
6598
6602
|
fontSize: "0.58em",
|
|
@@ -6607,13 +6611,13 @@ function ScrollerOverlay(param) {
|
|
|
6607
6611
|
}),
|
|
6608
6612
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6609
6613
|
style: {
|
|
6610
|
-
width: 2,
|
|
6614
|
+
width: isEquitiesStrip ? 1 : 2,
|
|
6611
6615
|
alignSelf: "stretch",
|
|
6612
|
-
minHeight: 24,
|
|
6616
|
+
minHeight: isEquitiesStrip ? 20 : 24,
|
|
6613
6617
|
background: accentColor,
|
|
6614
6618
|
flexShrink: 0,
|
|
6615
6619
|
borderRadius: 1,
|
|
6616
|
-
opacity: 0.
|
|
6620
|
+
opacity: 0.85
|
|
6617
6621
|
}
|
|
6618
6622
|
}),
|
|
6619
6623
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
@@ -8090,18 +8094,15 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8090
8094
|
var displayOverlays = import_react2.default.useMemo(function() {
|
|
8091
8095
|
if (!swirlProjectId || !swirlShowcaseDemo) return overlays;
|
|
8092
8096
|
if (overlays.some(scrollerLooksLikeMarketsStock)) return overlays;
|
|
8093
|
-
|
|
8094
|
-
return o.type === "scroller";
|
|
8095
|
-
});
|
|
8097
|
+
if (overlays.some(function(o) {
|
|
8098
|
+
return o.visible && o.type === "scroller";
|
|
8099
|
+
})) return overlays;
|
|
8096
8100
|
var cw = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.width;
|
|
8097
8101
|
var ch = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.height;
|
|
8098
8102
|
var tickerOpts = cw && cw > 0 && ch && ch > 0 ? {
|
|
8099
|
-
stackAboveNews: hasOtherScroller,
|
|
8100
8103
|
coordinateWidth: cw,
|
|
8101
8104
|
coordinateHeight: ch
|
|
8102
|
-
} : {
|
|
8103
|
-
stackAboveNews: hasOtherScroller
|
|
8104
|
-
};
|
|
8105
|
+
} : {};
|
|
8105
8106
|
return _to_consumable_array(overlays).concat([
|
|
8106
8107
|
createDemoStockTickerOverlay(swirlProjectId, tickerOpts)
|
|
8107
8108
|
]);
|