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/lib/index.d.cts CHANGED
@@ -4091,7 +4091,6 @@ declare function swirlProjectHasNabDemoMixedWithOther(overlays: SwirlOverlay[]):
4091
4091
  declare function inferSwirlOverlayCoordinateSpace(overlays: SwirlOverlay[], videoWidth: number, videoHeight: number): OverlayCoordinateSpace;
4092
4092
  declare function scrollerLooksLikeMarketsStock(o: SwirlOverlay): boolean;
4093
4093
  type DemoStockTickerOptions = {
4094
- stackAboveNews?: boolean;
4095
4094
  coordinateWidth?: number;
4096
4095
  coordinateHeight?: number;
4097
4096
  };
package/lib/index.d.ts CHANGED
@@ -4091,7 +4091,6 @@ declare function swirlProjectHasNabDemoMixedWithOther(overlays: SwirlOverlay[]):
4091
4091
  declare function inferSwirlOverlayCoordinateSpace(overlays: SwirlOverlay[], videoWidth: number, videoHeight: number): OverlayCoordinateSpace;
4092
4092
  declare function scrollerLooksLikeMarketsStock(o: SwirlOverlay): boolean;
4093
4093
  type DemoStockTickerOptions = {
4094
- stackAboveNews?: boolean;
4095
4094
  coordinateWidth?: number;
4096
4095
  coordinateHeight?: number;
4097
4096
  };
package/lib/index.js CHANGED
@@ -5829,18 +5829,17 @@ function scrollerLooksLikeMarketsStock(o) {
5829
5829
  return /\b(MARKETS?|NYSE|NASDAQ|DJIA|\bS&P\b|STOCK|AAPL|TSLA|NVDA|EQUITIES)\b/i.test(blob);
5830
5830
  }
5831
5831
  function createDemoStockTickerOverlay(projectId, opts) {
5832
- var stack = (opts === null || opts === void 0 ? void 0 : opts.stackAboveNews) === true;
5833
5832
  var cw = (opts === null || opts === void 0 ? void 0 : opts.coordinateWidth) && opts.coordinateWidth > 0 ? opts.coordinateWidth : SWIRL_HD_AUTHORING_WIDTH;
5834
5833
  var ch = (opts === null || opts === void 0 ? void 0 : opts.coordinateHeight) && opts.coordinateHeight > 0 ? opts.coordinateHeight : SWIRL_HD_AUTHORING_HEIGHT;
5835
5834
  var sx = cw / SWIRL_HD_AUTHORING_WIDTH;
5836
5835
  var sy = ch / SWIRL_HD_AUTHORING_HEIGHT;
5837
5836
  var x = 36 * sx;
5838
- var y = (stack ? 788 : 992) * sy;
5837
+ var y = 1002 * sy;
5839
5838
  var width = 1848 * sx;
5840
- var height = (stack ? 72 : 78) * sy;
5841
- var fontSize = Math.max(8, Math.round(14 * sy));
5842
- var scrollSpeed = Math.max(8, Math.round(38 * sx));
5843
- var borderRadius = Math.max(1, Math.round(6 * sy));
5839
+ var height = 66 * sy;
5840
+ var fontSize = Math.max(8, Math.round(13 * sy));
5841
+ var scrollSpeed = Math.max(8, Math.round(36 * sx));
5842
+ var borderRadius = Math.max(1, Math.round(4 * sy));
5844
5843
  return {
5845
5844
  id: -9001,
5846
5845
  project_id: projectId,
@@ -5854,27 +5853,28 @@ function createDemoStockTickerOverlay(projectId, opts) {
5854
5853
  opacity: 100,
5855
5854
  start_time: "00:00:00.000",
5856
5855
  duration: "24:00:00.000",
5857
- z_index: stack ? 125 : 120,
5856
+ z_index: 120,
5858
5857
  scroller_config: {
5858
+ preset: "equities_strip",
5859
5859
  use_custom_text: true,
5860
- 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%",
5860
+ 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%",
5861
5861
  direction: "left",
5862
5862
  scroll_speed: scrollSpeed,
5863
5863
  font_size: fontSize,
5864
5864
  font_weight: "600",
5865
5865
  text_color: "#e2e8f0",
5866
- background_color: "#070b14",
5867
- background_opacity: 94,
5866
+ background_color: "#0a0f18",
5867
+ background_opacity: 92,
5868
5868
  border_radius: borderRadius,
5869
- padding: Math.max(4, Math.round(8 * sy)),
5870
- label: "MARKETS",
5871
- label_line2: "LIVE",
5872
- label_color: "#0e7490",
5873
- label_text_color: "#ecfeff",
5874
- accent_color: "#22d3ee",
5869
+ padding: Math.max(3, Math.round(6 * sy)),
5870
+ label: "U.S. equities",
5871
+ label_line2: "",
5872
+ label_color: "#1e3a5f",
5873
+ label_text_color: "#f8fafc",
5874
+ accent_color: "#38bdf8",
5875
5875
  show_accent_line: true,
5876
5876
  separator_char: "\u2022",
5877
- item_spacing: Math.max(32, Math.round(56 * sx))
5877
+ item_spacing: Math.max(28, Math.round(48 * sx))
5878
5878
  }
5879
5879
  };
5880
5880
  }
@@ -6324,6 +6324,7 @@ function ScrollerOverlay(param) {
6324
6324
  var labelTextColor = (_ref11 = cfg === null || cfg === void 0 ? void 0 : cfg.label_text_color) !== null && _ref11 !== void 0 ? _ref11 : "#ffffff";
6325
6325
  var accentColor = (_ref12 = cfg === null || cfg === void 0 ? void 0 : cfg.accent_color) !== null && _ref12 !== void 0 ? _ref12 : labelColor;
6326
6326
  var showAccentLine = (cfg === null || cfg === void 0 ? void 0 : cfg.show_accent_line) !== false;
6327
+ var isEquitiesStrip = (cfg === null || cfg === void 0 ? void 0 : cfg.preset) === "equities_strip";
6327
6328
  var isHorizontal = direction === "left" || direction === "right";
6328
6329
  var isReverse = direction === "right" || direction === "down";
6329
6330
  var fullText = segments.join(" ".concat(sep, " "));
@@ -6354,7 +6355,7 @@ function ScrollerOverlay(param) {
6354
6355
  children: [
6355
6356
  showAccentLine && /* @__PURE__ */ jsx("div", {
6356
6357
  style: {
6357
- height: 3,
6358
+ height: isEquitiesStrip ? 2 : 3,
6358
6359
  background: accentColor,
6359
6360
  flexShrink: 0,
6360
6361
  width: "100%"
@@ -6367,8 +6368,8 @@ function ScrollerOverlay(param) {
6367
6368
  overflow: "hidden",
6368
6369
  minHeight: 0,
6369
6370
  alignItems: "center",
6370
- padding: "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
6371
- gap: Math.max(6, pad),
6371
+ padding: isEquitiesStrip ? "".concat(Math.max(2, pad * 0.5), "px ").concat(pad, "px") : "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
6372
+ gap: isEquitiesStrip ? Math.max(4, Math.round(pad * 0.75)) : Math.max(6, pad),
6372
6373
  boxSizing: "border-box"
6373
6374
  },
6374
6375
  children: [
@@ -6376,30 +6377,33 @@ function ScrollerOverlay(param) {
6376
6377
  style: {
6377
6378
  background: labelColor,
6378
6379
  color: labelTextColor,
6379
- padding: "10px 14px",
6380
+ padding: isEquitiesStrip ? "6px 12px" : "10px 14px",
6380
6381
  display: "flex",
6381
- flexDirection: "column",
6382
+ flexDirection: isEquitiesStrip ? "row" : "column",
6382
6383
  alignItems: "center",
6383
6384
  justifyContent: "center",
6384
6385
  flexShrink: 0,
6385
6386
  textAlign: "center",
6386
- gap: 2,
6387
- borderRadius: Math.max(4, borderRadius > 0 ? borderRadius : 6),
6388
- boxShadow: "0 2px 8px rgba(0,0,0,0.35)"
6387
+ gap: isEquitiesStrip ? 0 : 2,
6388
+ borderRadius: Math.max(2, borderRadius > 0 ? borderRadius : 6),
6389
+ boxShadow: isEquitiesStrip ? "inset 0 1px 0 rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.35)",
6390
+ alignSelf: "stretch",
6391
+ maxWidth: isEquitiesStrip ? "min(200px, 28%)" : void 0
6389
6392
  },
6390
6393
  children: [
6391
6394
  /* @__PURE__ */ jsx("span", {
6392
6395
  style: {
6393
- fontWeight: 800,
6394
- fontSize: "0.78em",
6395
- letterSpacing: "0.08em",
6396
- lineHeight: 1.15,
6397
- textTransform: "uppercase",
6398
- whiteSpace: "nowrap"
6396
+ fontWeight: isEquitiesStrip ? 700 : 800,
6397
+ fontSize: isEquitiesStrip ? "0.82em" : "0.78em",
6398
+ letterSpacing: isEquitiesStrip ? "0.04em" : "0.08em",
6399
+ lineHeight: 1.2,
6400
+ textTransform: isEquitiesStrip ? "none" : "uppercase",
6401
+ whiteSpace: isEquitiesStrip ? "normal" : "nowrap",
6402
+ textAlign: isEquitiesStrip ? "left" : "center"
6399
6403
  },
6400
6404
  children: label
6401
6405
  }),
6402
- labelLine2 && /* @__PURE__ */ jsx("span", {
6406
+ labelLine2 && !isEquitiesStrip && /* @__PURE__ */ jsx("span", {
6403
6407
  style: {
6404
6408
  fontWeight: 600,
6405
6409
  fontSize: "0.58em",
@@ -6414,13 +6418,13 @@ function ScrollerOverlay(param) {
6414
6418
  }),
6415
6419
  label && /* @__PURE__ */ jsx("div", {
6416
6420
  style: {
6417
- width: 2,
6421
+ width: isEquitiesStrip ? 1 : 2,
6418
6422
  alignSelf: "stretch",
6419
- minHeight: 24,
6423
+ minHeight: isEquitiesStrip ? 20 : 24,
6420
6424
  background: accentColor,
6421
6425
  flexShrink: 0,
6422
6426
  borderRadius: 1,
6423
- opacity: 0.9
6427
+ opacity: 0.85
6424
6428
  }
6425
6429
  }),
6426
6430
  /* @__PURE__ */ jsx("div", {
@@ -7897,18 +7901,15 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
7897
7901
  var displayOverlays = React2.useMemo(function() {
7898
7902
  if (!swirlProjectId || !swirlShowcaseDemo) return overlays;
7899
7903
  if (overlays.some(scrollerLooksLikeMarketsStock)) return overlays;
7900
- var hasOtherScroller = overlays.some(function(o) {
7901
- return o.type === "scroller";
7902
- });
7904
+ if (overlays.some(function(o) {
7905
+ return o.visible && o.type === "scroller";
7906
+ })) return overlays;
7903
7907
  var cw = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.width;
7904
7908
  var ch = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.height;
7905
7909
  var tickerOpts = cw && cw > 0 && ch && ch > 0 ? {
7906
- stackAboveNews: hasOtherScroller,
7907
7910
  coordinateWidth: cw,
7908
7911
  coordinateHeight: ch
7909
- } : {
7910
- stackAboveNews: hasOtherScroller
7911
- };
7912
+ } : {};
7912
7913
  return _to_consumable_array(overlays).concat([
7913
7914
  createDemoStockTickerOverlay(swirlProjectId, tickerOpts)
7914
7915
  ]);