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.
@@ -5817,18 +5817,17 @@ function scrollerLooksLikeMarketsStock(o) {
5817
5817
  return /\b(MARKETS?|NYSE|NASDAQ|DJIA|\bS&P\b|STOCK|AAPL|TSLA|NVDA|EQUITIES)\b/i.test(blob);
5818
5818
  }
5819
5819
  function createDemoStockTickerOverlay(projectId, opts) {
5820
- var stack = (opts === null || opts === void 0 ? void 0 : opts.stackAboveNews) === true;
5821
5820
  var cw = (opts === null || opts === void 0 ? void 0 : opts.coordinateWidth) && opts.coordinateWidth > 0 ? opts.coordinateWidth : SWIRL_HD_AUTHORING_WIDTH;
5822
5821
  var ch = (opts === null || opts === void 0 ? void 0 : opts.coordinateHeight) && opts.coordinateHeight > 0 ? opts.coordinateHeight : SWIRL_HD_AUTHORING_HEIGHT;
5823
5822
  var sx = cw / SWIRL_HD_AUTHORING_WIDTH;
5824
5823
  var sy = ch / SWIRL_HD_AUTHORING_HEIGHT;
5825
5824
  var x = 36 * sx;
5826
- var y = (stack ? 788 : 992) * sy;
5825
+ var y = 1002 * sy;
5827
5826
  var width = 1848 * sx;
5828
- var height = (stack ? 72 : 78) * sy;
5829
- var fontSize = Math.max(8, Math.round(14 * sy));
5830
- var scrollSpeed = Math.max(8, Math.round(38 * sx));
5831
- var borderRadius = Math.max(1, Math.round(6 * sy));
5827
+ var height = 66 * sy;
5828
+ var fontSize = Math.max(8, Math.round(13 * sy));
5829
+ var scrollSpeed = Math.max(8, Math.round(36 * sx));
5830
+ var borderRadius = Math.max(1, Math.round(4 * sy));
5832
5831
  return {
5833
5832
  id: -9001,
5834
5833
  project_id: projectId,
@@ -5842,27 +5841,28 @@ function createDemoStockTickerOverlay(projectId, opts) {
5842
5841
  opacity: 100,
5843
5842
  start_time: "00:00:00.000",
5844
5843
  duration: "24:00:00.000",
5845
- z_index: stack ? 125 : 120,
5844
+ z_index: 120,
5846
5845
  scroller_config: {
5846
+ preset: "equities_strip",
5847
5847
  use_custom_text: true,
5848
- custom_text: "AAPL +1.24% \u2022 MSFT +0.42% \u2022 GOOGL \u22120.11% \u2022 TSLA +2.31% \u2022 NVDA +1.87% \u2022 AMZN +0.65% \u2022 META +0.38% \u2022 DJIA +0.52% \u2022 S&P 500 +0.33% \u2022 NDAQ +0.41%",
5848
+ 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%",
5849
5849
  direction: "left",
5850
5850
  scroll_speed: scrollSpeed,
5851
5851
  font_size: fontSize,
5852
5852
  font_weight: "600",
5853
5853
  text_color: "#e2e8f0",
5854
- background_color: "#070b14",
5855
- background_opacity: 94,
5854
+ background_color: "#0a0f18",
5855
+ background_opacity: 92,
5856
5856
  border_radius: borderRadius,
5857
- padding: Math.max(4, Math.round(8 * sy)),
5858
- label: "MARKETS",
5859
- label_line2: "LIVE",
5860
- label_color: "#0e7490",
5861
- label_text_color: "#ecfeff",
5862
- accent_color: "#22d3ee",
5857
+ padding: Math.max(3, Math.round(6 * sy)),
5858
+ label: "U.S. equities",
5859
+ label_line2: "",
5860
+ label_color: "#1e3a5f",
5861
+ label_text_color: "#f8fafc",
5862
+ accent_color: "#38bdf8",
5863
5863
  show_accent_line: true,
5864
5864
  separator_char: "\u2022",
5865
- item_spacing: Math.max(32, Math.round(56 * sx))
5865
+ item_spacing: Math.max(28, Math.round(48 * sx))
5866
5866
  }
5867
5867
  };
5868
5868
  }
@@ -6312,6 +6312,7 @@ function ScrollerOverlay(param) {
6312
6312
  var labelTextColor = (_ref11 = cfg === null || cfg === void 0 ? void 0 : cfg.label_text_color) !== null && _ref11 !== void 0 ? _ref11 : "#ffffff";
6313
6313
  var accentColor = (_ref12 = cfg === null || cfg === void 0 ? void 0 : cfg.accent_color) !== null && _ref12 !== void 0 ? _ref12 : labelColor;
6314
6314
  var showAccentLine = (cfg === null || cfg === void 0 ? void 0 : cfg.show_accent_line) !== false;
6315
+ var isEquitiesStrip = (cfg === null || cfg === void 0 ? void 0 : cfg.preset) === "equities_strip";
6315
6316
  var isHorizontal = direction === "left" || direction === "right";
6316
6317
  var isReverse = direction === "right" || direction === "down";
6317
6318
  var fullText = segments.join(" ".concat(sep, " "));
@@ -6342,7 +6343,7 @@ function ScrollerOverlay(param) {
6342
6343
  children: [
6343
6344
  showAccentLine && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6344
6345
  style: {
6345
- height: 3,
6346
+ height: isEquitiesStrip ? 2 : 3,
6346
6347
  background: accentColor,
6347
6348
  flexShrink: 0,
6348
6349
  width: "100%"
@@ -6355,8 +6356,8 @@ function ScrollerOverlay(param) {
6355
6356
  overflow: "hidden",
6356
6357
  minHeight: 0,
6357
6358
  alignItems: "center",
6358
- padding: "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
6359
- gap: Math.max(6, pad),
6359
+ padding: isEquitiesStrip ? "".concat(Math.max(2, pad * 0.5), "px ").concat(pad, "px") : "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
6360
+ gap: isEquitiesStrip ? Math.max(4, Math.round(pad * 0.75)) : Math.max(6, pad),
6360
6361
  boxSizing: "border-box"
6361
6362
  },
6362
6363
  children: [
@@ -6364,30 +6365,33 @@ function ScrollerOverlay(param) {
6364
6365
  style: {
6365
6366
  background: labelColor,
6366
6367
  color: labelTextColor,
6367
- padding: "10px 14px",
6368
+ padding: isEquitiesStrip ? "6px 12px" : "10px 14px",
6368
6369
  display: "flex",
6369
- flexDirection: "column",
6370
+ flexDirection: isEquitiesStrip ? "row" : "column",
6370
6371
  alignItems: "center",
6371
6372
  justifyContent: "center",
6372
6373
  flexShrink: 0,
6373
6374
  textAlign: "center",
6374
- gap: 2,
6375
- borderRadius: Math.max(4, borderRadius > 0 ? borderRadius : 6),
6376
- boxShadow: "0 2px 8px rgba(0,0,0,0.35)"
6375
+ gap: isEquitiesStrip ? 0 : 2,
6376
+ borderRadius: Math.max(2, borderRadius > 0 ? borderRadius : 6),
6377
+ boxShadow: isEquitiesStrip ? "inset 0 1px 0 rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.35)",
6378
+ alignSelf: "stretch",
6379
+ maxWidth: isEquitiesStrip ? "min(200px, 28%)" : void 0
6377
6380
  },
6378
6381
  children: [
6379
6382
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6380
6383
  style: {
6381
- fontWeight: 800,
6382
- fontSize: "0.78em",
6383
- letterSpacing: "0.08em",
6384
- lineHeight: 1.15,
6385
- textTransform: "uppercase",
6386
- whiteSpace: "nowrap"
6384
+ fontWeight: isEquitiesStrip ? 700 : 800,
6385
+ fontSize: isEquitiesStrip ? "0.82em" : "0.78em",
6386
+ letterSpacing: isEquitiesStrip ? "0.04em" : "0.08em",
6387
+ lineHeight: 1.2,
6388
+ textTransform: isEquitiesStrip ? "none" : "uppercase",
6389
+ whiteSpace: isEquitiesStrip ? "normal" : "nowrap",
6390
+ textAlign: isEquitiesStrip ? "left" : "center"
6387
6391
  },
6388
6392
  children: label
6389
6393
  }),
6390
- labelLine2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6394
+ labelLine2 && !isEquitiesStrip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6391
6395
  style: {
6392
6396
  fontWeight: 600,
6393
6397
  fontSize: "0.58em",
@@ -6402,13 +6406,13 @@ function ScrollerOverlay(param) {
6402
6406
  }),
6403
6407
  label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6404
6408
  style: {
6405
- width: 2,
6409
+ width: isEquitiesStrip ? 1 : 2,
6406
6410
  alignSelf: "stretch",
6407
- minHeight: 24,
6411
+ minHeight: isEquitiesStrip ? 20 : 24,
6408
6412
  background: accentColor,
6409
6413
  flexShrink: 0,
6410
6414
  borderRadius: 1,
6411
- opacity: 0.9
6415
+ opacity: 0.85
6412
6416
  }
6413
6417
  }),
6414
6418
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
@@ -7885,18 +7889,15 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
7885
7889
  var displayOverlays = import_react2.default.useMemo(function() {
7886
7890
  if (!swirlProjectId || !swirlShowcaseDemo) return overlays;
7887
7891
  if (overlays.some(scrollerLooksLikeMarketsStock)) return overlays;
7888
- var hasOtherScroller = overlays.some(function(o) {
7889
- return o.type === "scroller";
7890
- });
7892
+ if (overlays.some(function(o) {
7893
+ return o.visible && o.type === "scroller";
7894
+ })) return overlays;
7891
7895
  var cw = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.width;
7892
7896
  var ch = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.height;
7893
7897
  var tickerOpts = cw && cw > 0 && ch && ch > 0 ? {
7894
- stackAboveNews: hasOtherScroller,
7895
7898
  coordinateWidth: cw,
7896
7899
  coordinateHeight: ch
7897
- } : {
7898
- stackAboveNews: hasOtherScroller
7899
- };
7900
+ } : {};
7900
7901
  return _to_consumable_array(overlays).concat([
7901
7902
  createDemoStockTickerOverlay(swirlProjectId, tickerOpts)
7902
7903
  ]);