@thestatic-tv/dcl-sdk 2.5.11 → 2.5.14

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/index.d.mts CHANGED
@@ -846,11 +846,16 @@ declare class AdminPanelUIModule {
846
846
  private TabBtn;
847
847
  private VideoTab;
848
848
  private ModTab;
849
+ /**
850
+ * Render a scaled notification banner
851
+ * Uses same layout as NotificationBanner but with scaled font size
852
+ */
853
+ private renderScaledNotification;
849
854
  /**
850
855
  * Get the React-ECS component for the admin panel
851
- * Always renders NotificationBanner (for broadcasts), admin panel only for admins
856
+ * Always renders notification (scaled), admin panel only for admins
852
857
  */
853
- getComponent: () => ReactEcs.JSX.Element;
858
+ getComponent: () => ReactEcs.JSX.Element | null;
854
859
  }
855
860
 
856
861
  /**
package/dist/index.d.ts CHANGED
@@ -846,11 +846,16 @@ declare class AdminPanelUIModule {
846
846
  private TabBtn;
847
847
  private VideoTab;
848
848
  private ModTab;
849
+ /**
850
+ * Render a scaled notification banner
851
+ * Uses same layout as NotificationBanner but with scaled font size
852
+ */
853
+ private renderScaledNotification;
849
854
  /**
850
855
  * Get the React-ECS component for the admin panel
851
- * Always renders NotificationBanner (for broadcasts), admin panel only for admins
856
+ * Always renders notification (scaled), admin panel only for admins
852
857
  */
853
- getComponent: () => ReactEcs.JSX.Element;
858
+ getComponent: () => ReactEcs.JSX.Element | null;
854
859
  }
855
860
 
856
861
  /**
package/dist/index.js CHANGED
@@ -670,16 +670,16 @@ var UI_DIMENSIONS = {
670
670
  buttonHeightSmall: 30,
671
671
  inputHeight: 36
672
672
  },
673
- // Notification banner - next to DCL native chat panel
673
+ // Notification banner - centered, aligned with toggle buttons
674
674
  notification: {
675
675
  width: 340,
676
- height: 44,
677
- bottom: 55,
678
- // Above the chat input area
679
- left: 400,
680
- // Right of DCL native chat (chat is ~380px wide)
676
+ height: 36,
677
+ // Same as toggle buttons
678
+ bottom: 10,
679
+ // Same as toggle buttons
681
680
  borderWidth: 2,
682
681
  fontSize: 14
682
+ // Same as toggle buttons (14)
683
683
  },
684
684
  // Shared
685
685
  closeButton: {
@@ -2330,6 +2330,9 @@ function showNotification(message, durationMs = 5e3) {
2330
2330
  function hideNotification() {
2331
2331
  notificationVisible = false;
2332
2332
  }
2333
+ function getNotificationState() {
2334
+ return { text: notificationText, visible: notificationVisible };
2335
+ }
2333
2336
  function initNotificationSystem() {
2334
2337
  if (notificationInitialized) return;
2335
2338
  notificationInitialized = true;
@@ -2342,60 +2345,73 @@ function initNotificationSystem() {
2342
2345
  function NotificationBanner() {
2343
2346
  initNotificationSystem();
2344
2347
  if (!notificationVisible) return null;
2345
- return /* @__PURE__ */ import_react_ecs4.default.createElement(
2346
- import_react_ecs4.UiEntity,
2347
- {
2348
- uiTransform: {
2349
- positionType: "absolute",
2350
- position: { bottom: N.bottom, left: N.left },
2351
- width: N.width,
2352
- height: N.height,
2353
- flexDirection: "row",
2354
- alignItems: "center"
2355
- },
2356
- uiBackground: { color: C.panel }
2357
- },
2358
- /* @__PURE__ */ import_react_ecs4.default.createElement(
2359
- import_react_ecs4.UiEntity,
2360
- {
2361
- uiTransform: {
2362
- width: N.borderWidth,
2363
- height: "100%"
2364
- },
2365
- uiBackground: { color: C.cyan }
2366
- }
2367
- ),
2348
+ return (
2349
+ // Full-width container to center the notification
2368
2350
  /* @__PURE__ */ import_react_ecs4.default.createElement(
2369
2351
  import_react_ecs4.UiEntity,
2370
2352
  {
2371
2353
  uiTransform: {
2372
- flexGrow: 1,
2373
- height: "100%",
2374
- padding: { left: 12, right: 12 },
2354
+ positionType: "absolute",
2355
+ position: { bottom: N.bottom, left: 0, right: 0 },
2356
+ height: N.height,
2375
2357
  justifyContent: "center",
2376
- alignItems: "flex-start"
2358
+ alignItems: "center"
2377
2359
  }
2378
2360
  },
2379
2361
  /* @__PURE__ */ import_react_ecs4.default.createElement(
2380
- import_react_ecs4.Label,
2362
+ import_react_ecs4.UiEntity,
2381
2363
  {
2382
- value: notificationText,
2383
- fontSize: N.fontSize,
2384
- color: C.white,
2385
- textAlign: "middle-left"
2386
- }
2387
- )
2388
- ),
2389
- /* @__PURE__ */ import_react_ecs4.default.createElement(
2390
- import_react_ecs4.UiEntity,
2391
- {
2392
- uiTransform: {
2393
- width: 6,
2394
- height: 6,
2395
- margin: { right: 12 }
2364
+ uiTransform: {
2365
+ width: N.width,
2366
+ height: N.height,
2367
+ flexDirection: "row",
2368
+ alignItems: "center"
2369
+ },
2370
+ uiBackground: { color: C.panel }
2396
2371
  },
2397
- uiBackground: { color: C.cyan }
2398
- }
2372
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
2373
+ import_react_ecs4.UiEntity,
2374
+ {
2375
+ uiTransform: {
2376
+ width: N.borderWidth,
2377
+ height: "100%"
2378
+ },
2379
+ uiBackground: { color: C.cyan }
2380
+ }
2381
+ ),
2382
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
2383
+ import_react_ecs4.UiEntity,
2384
+ {
2385
+ uiTransform: {
2386
+ flexGrow: 1,
2387
+ height: "100%",
2388
+ padding: { left: 10, right: 10 },
2389
+ justifyContent: "center",
2390
+ alignItems: "flex-start"
2391
+ }
2392
+ },
2393
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
2394
+ import_react_ecs4.Label,
2395
+ {
2396
+ value: notificationText,
2397
+ fontSize: N.fontSize,
2398
+ color: C.white,
2399
+ textAlign: "middle-left"
2400
+ }
2401
+ )
2402
+ ),
2403
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
2404
+ import_react_ecs4.UiEntity,
2405
+ {
2406
+ uiTransform: {
2407
+ width: 5,
2408
+ height: 5,
2409
+ margin: { right: 10 }
2410
+ },
2411
+ uiBackground: { color: C.cyan }
2412
+ }
2413
+ )
2414
+ )
2399
2415
  )
2400
2416
  );
2401
2417
  }
@@ -2867,11 +2883,11 @@ var AdminPanelUIModule = class {
2867
2883
  };
2868
2884
  /**
2869
2885
  * Get the React-ECS component for the admin panel
2870
- * Always renders NotificationBanner (for broadcasts), admin panel only for admins
2886
+ * Always renders notification (scaled), admin panel only for admins
2871
2887
  */
2872
2888
  this.getComponent = () => {
2873
2889
  if (!this.isAdmin) {
2874
- return /* @__PURE__ */ import_react_ecs5.default.createElement(NotificationBanner, null);
2890
+ return this.renderScaledNotification();
2875
2891
  }
2876
2892
  const t = this.theme;
2877
2893
  const tabs = [];
@@ -2896,7 +2912,7 @@ var AdminPanelUIModule = class {
2896
2912
  positionType: "absolute"
2897
2913
  }
2898
2914
  },
2899
- /* @__PURE__ */ import_react_ecs5.default.createElement(NotificationBanner, null),
2915
+ this.renderScaledNotification(),
2900
2916
  /* @__PURE__ */ import_react_ecs5.default.createElement(
2901
2917
  import_react_ecs5.UiEntity,
2902
2918
  {
@@ -3631,6 +3647,76 @@ var AdminPanelUIModule = class {
3631
3647
  this.stopStreamPolling();
3632
3648
  }
3633
3649
  }
3650
+ /**
3651
+ * Render a scaled notification banner
3652
+ * Uses same layout as NotificationBanner but with scaled font size
3653
+ */
3654
+ renderScaledNotification() {
3655
+ initNotificationSystem();
3656
+ const state = getNotificationState();
3657
+ if (!state.visible) return null;
3658
+ const N2 = UI_DIMENSIONS.notification;
3659
+ const colors = THEME.colors;
3660
+ return /* @__PURE__ */ import_react_ecs5.default.createElement(
3661
+ import_react_ecs5.UiEntity,
3662
+ {
3663
+ uiTransform: {
3664
+ positionType: "absolute",
3665
+ position: { bottom: N2.bottom, left: 0, right: 0 },
3666
+ height: this.s(N2.height),
3667
+ justifyContent: "center",
3668
+ alignItems: "center"
3669
+ }
3670
+ },
3671
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3672
+ import_react_ecs5.UiEntity,
3673
+ {
3674
+ uiTransform: {
3675
+ width: this.s(N2.width),
3676
+ height: this.s(N2.height),
3677
+ flexDirection: "row",
3678
+ alignItems: "center"
3679
+ },
3680
+ uiBackground: { color: colors.panel }
3681
+ },
3682
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3683
+ import_react_ecs5.UiEntity,
3684
+ {
3685
+ uiTransform: { width: N2.borderWidth, height: "100%" },
3686
+ uiBackground: { color: colors.cyan }
3687
+ }
3688
+ ),
3689
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3690
+ import_react_ecs5.UiEntity,
3691
+ {
3692
+ uiTransform: {
3693
+ flexGrow: 1,
3694
+ height: "100%",
3695
+ padding: { left: 10, right: 10 },
3696
+ justifyContent: "center",
3697
+ alignItems: "flex-start"
3698
+ }
3699
+ },
3700
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3701
+ import_react_ecs5.Label,
3702
+ {
3703
+ value: state.text,
3704
+ fontSize: this.s(N2.fontSize),
3705
+ color: colors.white,
3706
+ textAlign: "middle-left"
3707
+ }
3708
+ )
3709
+ ),
3710
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3711
+ import_react_ecs5.UiEntity,
3712
+ {
3713
+ uiTransform: { width: 5, height: 5, margin: { right: 10 } },
3714
+ uiBackground: { color: colors.cyan }
3715
+ }
3716
+ )
3717
+ )
3718
+ );
3719
+ }
3634
3720
  };
3635
3721
 
3636
3722
  // src/StaticTVClient.ts
package/dist/index.mjs CHANGED
@@ -625,16 +625,16 @@ var UI_DIMENSIONS = {
625
625
  buttonHeightSmall: 30,
626
626
  inputHeight: 36
627
627
  },
628
- // Notification banner - next to DCL native chat panel
628
+ // Notification banner - centered, aligned with toggle buttons
629
629
  notification: {
630
630
  width: 340,
631
- height: 44,
632
- bottom: 55,
633
- // Above the chat input area
634
- left: 400,
635
- // Right of DCL native chat (chat is ~380px wide)
631
+ height: 36,
632
+ // Same as toggle buttons
633
+ bottom: 10,
634
+ // Same as toggle buttons
636
635
  borderWidth: 2,
637
636
  fontSize: 14
637
+ // Same as toggle buttons (14)
638
638
  },
639
639
  // Shared
640
640
  closeButton: {
@@ -2285,6 +2285,9 @@ function showNotification(message, durationMs = 5e3) {
2285
2285
  function hideNotification() {
2286
2286
  notificationVisible = false;
2287
2287
  }
2288
+ function getNotificationState() {
2289
+ return { text: notificationText, visible: notificationVisible };
2290
+ }
2288
2291
  function initNotificationSystem() {
2289
2292
  if (notificationInitialized) return;
2290
2293
  notificationInitialized = true;
@@ -2297,60 +2300,73 @@ function initNotificationSystem() {
2297
2300
  function NotificationBanner() {
2298
2301
  initNotificationSystem();
2299
2302
  if (!notificationVisible) return null;
2300
- return /* @__PURE__ */ ReactEcs4.createElement(
2301
- UiEntity4,
2302
- {
2303
- uiTransform: {
2304
- positionType: "absolute",
2305
- position: { bottom: N.bottom, left: N.left },
2306
- width: N.width,
2307
- height: N.height,
2308
- flexDirection: "row",
2309
- alignItems: "center"
2310
- },
2311
- uiBackground: { color: C.panel }
2312
- },
2313
- /* @__PURE__ */ ReactEcs4.createElement(
2314
- UiEntity4,
2315
- {
2316
- uiTransform: {
2317
- width: N.borderWidth,
2318
- height: "100%"
2319
- },
2320
- uiBackground: { color: C.cyan }
2321
- }
2322
- ),
2303
+ return (
2304
+ // Full-width container to center the notification
2323
2305
  /* @__PURE__ */ ReactEcs4.createElement(
2324
2306
  UiEntity4,
2325
2307
  {
2326
2308
  uiTransform: {
2327
- flexGrow: 1,
2328
- height: "100%",
2329
- padding: { left: 12, right: 12 },
2309
+ positionType: "absolute",
2310
+ position: { bottom: N.bottom, left: 0, right: 0 },
2311
+ height: N.height,
2330
2312
  justifyContent: "center",
2331
- alignItems: "flex-start"
2313
+ alignItems: "center"
2332
2314
  }
2333
2315
  },
2334
2316
  /* @__PURE__ */ ReactEcs4.createElement(
2335
- Label4,
2317
+ UiEntity4,
2336
2318
  {
2337
- value: notificationText,
2338
- fontSize: N.fontSize,
2339
- color: C.white,
2340
- textAlign: "middle-left"
2341
- }
2342
- )
2343
- ),
2344
- /* @__PURE__ */ ReactEcs4.createElement(
2345
- UiEntity4,
2346
- {
2347
- uiTransform: {
2348
- width: 6,
2349
- height: 6,
2350
- margin: { right: 12 }
2319
+ uiTransform: {
2320
+ width: N.width,
2321
+ height: N.height,
2322
+ flexDirection: "row",
2323
+ alignItems: "center"
2324
+ },
2325
+ uiBackground: { color: C.panel }
2351
2326
  },
2352
- uiBackground: { color: C.cyan }
2353
- }
2327
+ /* @__PURE__ */ ReactEcs4.createElement(
2328
+ UiEntity4,
2329
+ {
2330
+ uiTransform: {
2331
+ width: N.borderWidth,
2332
+ height: "100%"
2333
+ },
2334
+ uiBackground: { color: C.cyan }
2335
+ }
2336
+ ),
2337
+ /* @__PURE__ */ ReactEcs4.createElement(
2338
+ UiEntity4,
2339
+ {
2340
+ uiTransform: {
2341
+ flexGrow: 1,
2342
+ height: "100%",
2343
+ padding: { left: 10, right: 10 },
2344
+ justifyContent: "center",
2345
+ alignItems: "flex-start"
2346
+ }
2347
+ },
2348
+ /* @__PURE__ */ ReactEcs4.createElement(
2349
+ Label4,
2350
+ {
2351
+ value: notificationText,
2352
+ fontSize: N.fontSize,
2353
+ color: C.white,
2354
+ textAlign: "middle-left"
2355
+ }
2356
+ )
2357
+ ),
2358
+ /* @__PURE__ */ ReactEcs4.createElement(
2359
+ UiEntity4,
2360
+ {
2361
+ uiTransform: {
2362
+ width: 5,
2363
+ height: 5,
2364
+ margin: { right: 10 }
2365
+ },
2366
+ uiBackground: { color: C.cyan }
2367
+ }
2368
+ )
2369
+ )
2354
2370
  )
2355
2371
  );
2356
2372
  }
@@ -2822,11 +2838,11 @@ var AdminPanelUIModule = class {
2822
2838
  };
2823
2839
  /**
2824
2840
  * Get the React-ECS component for the admin panel
2825
- * Always renders NotificationBanner (for broadcasts), admin panel only for admins
2841
+ * Always renders notification (scaled), admin panel only for admins
2826
2842
  */
2827
2843
  this.getComponent = () => {
2828
2844
  if (!this.isAdmin) {
2829
- return /* @__PURE__ */ ReactEcs5.createElement(NotificationBanner, null);
2845
+ return this.renderScaledNotification();
2830
2846
  }
2831
2847
  const t = this.theme;
2832
2848
  const tabs = [];
@@ -2851,7 +2867,7 @@ var AdminPanelUIModule = class {
2851
2867
  positionType: "absolute"
2852
2868
  }
2853
2869
  },
2854
- /* @__PURE__ */ ReactEcs5.createElement(NotificationBanner, null),
2870
+ this.renderScaledNotification(),
2855
2871
  /* @__PURE__ */ ReactEcs5.createElement(
2856
2872
  UiEntity5,
2857
2873
  {
@@ -3586,6 +3602,76 @@ var AdminPanelUIModule = class {
3586
3602
  this.stopStreamPolling();
3587
3603
  }
3588
3604
  }
3605
+ /**
3606
+ * Render a scaled notification banner
3607
+ * Uses same layout as NotificationBanner but with scaled font size
3608
+ */
3609
+ renderScaledNotification() {
3610
+ initNotificationSystem();
3611
+ const state = getNotificationState();
3612
+ if (!state.visible) return null;
3613
+ const N2 = UI_DIMENSIONS.notification;
3614
+ const colors = THEME.colors;
3615
+ return /* @__PURE__ */ ReactEcs5.createElement(
3616
+ UiEntity5,
3617
+ {
3618
+ uiTransform: {
3619
+ positionType: "absolute",
3620
+ position: { bottom: N2.bottom, left: 0, right: 0 },
3621
+ height: this.s(N2.height),
3622
+ justifyContent: "center",
3623
+ alignItems: "center"
3624
+ }
3625
+ },
3626
+ /* @__PURE__ */ ReactEcs5.createElement(
3627
+ UiEntity5,
3628
+ {
3629
+ uiTransform: {
3630
+ width: this.s(N2.width),
3631
+ height: this.s(N2.height),
3632
+ flexDirection: "row",
3633
+ alignItems: "center"
3634
+ },
3635
+ uiBackground: { color: colors.panel }
3636
+ },
3637
+ /* @__PURE__ */ ReactEcs5.createElement(
3638
+ UiEntity5,
3639
+ {
3640
+ uiTransform: { width: N2.borderWidth, height: "100%" },
3641
+ uiBackground: { color: colors.cyan }
3642
+ }
3643
+ ),
3644
+ /* @__PURE__ */ ReactEcs5.createElement(
3645
+ UiEntity5,
3646
+ {
3647
+ uiTransform: {
3648
+ flexGrow: 1,
3649
+ height: "100%",
3650
+ padding: { left: 10, right: 10 },
3651
+ justifyContent: "center",
3652
+ alignItems: "flex-start"
3653
+ }
3654
+ },
3655
+ /* @__PURE__ */ ReactEcs5.createElement(
3656
+ Label5,
3657
+ {
3658
+ value: state.text,
3659
+ fontSize: this.s(N2.fontSize),
3660
+ color: colors.white,
3661
+ textAlign: "middle-left"
3662
+ }
3663
+ )
3664
+ ),
3665
+ /* @__PURE__ */ ReactEcs5.createElement(
3666
+ UiEntity5,
3667
+ {
3668
+ uiTransform: { width: 5, height: 5, margin: { right: 10 } },
3669
+ uiBackground: { color: colors.cyan }
3670
+ }
3671
+ )
3672
+ )
3673
+ );
3674
+ }
3589
3675
  };
3590
3676
 
3591
3677
  // src/StaticTVClient.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thestatic-tv/dcl-sdk",
3
- "version": "2.5.11",
3
+ "version": "2.5.14",
4
4
  "description": "Connect your Decentraland scene to thestatic.tv - full channel lineup, metrics tracking, and interactions",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",