@thestatic-tv/dcl-sdk 2.1.0 → 2.2.1

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
@@ -429,6 +429,7 @@ declare class GuideUIModule {
429
429
  private handleChannelClick;
430
430
  /**
431
431
  * Get the guide UI component for rendering
432
+ * Returns toggle button when hidden, full panel when visible
432
433
  */
433
434
  getComponent: () => any;
434
435
  private renderLeftPanel;
@@ -437,6 +438,7 @@ declare class GuideUIModule {
437
438
  private renderCardGrid;
438
439
  private renderGuideCard;
439
440
  private renderCloseButton;
441
+ private renderToggleButton;
440
442
  }
441
443
 
442
444
  /**
@@ -517,6 +519,7 @@ declare class ChatUIModule {
517
519
  private formatTime;
518
520
  /**
519
521
  * Get the chat UI component for rendering
522
+ * Returns toggle button when hidden, full panel when visible
520
523
  */
521
524
  getComponent: () => any;
522
525
  private getPositionStyle;
@@ -528,6 +531,7 @@ declare class ChatUIModule {
528
531
  private renderUserInfoBar;
529
532
  private renderInputArea;
530
533
  private renderChannelDropdown;
534
+ private renderToggleButton;
531
535
  }
532
536
 
533
537
  /**
package/dist/index.d.ts CHANGED
@@ -429,6 +429,7 @@ declare class GuideUIModule {
429
429
  private handleChannelClick;
430
430
  /**
431
431
  * Get the guide UI component for rendering
432
+ * Returns toggle button when hidden, full panel when visible
432
433
  */
433
434
  getComponent: () => any;
434
435
  private renderLeftPanel;
@@ -437,6 +438,7 @@ declare class GuideUIModule {
437
438
  private renderCardGrid;
438
439
  private renderGuideCard;
439
440
  private renderCloseButton;
441
+ private renderToggleButton;
440
442
  }
441
443
 
442
444
  /**
@@ -517,6 +519,7 @@ declare class ChatUIModule {
517
519
  private formatTime;
518
520
  /**
519
521
  * Get the chat UI component for rendering
522
+ * Returns toggle button when hidden, full panel when visible
520
523
  */
521
524
  getComponent: () => any;
522
525
  private getPositionStyle;
@@ -528,6 +531,7 @@ declare class ChatUIModule {
528
531
  private renderUserInfoBar;
529
532
  private renderInputArea;
530
533
  private renderChannelDropdown;
534
+ private renderToggleButton;
531
535
  }
532
536
 
533
537
  /**
package/dist/index.js CHANGED
@@ -778,9 +778,12 @@ var GuideUIModule = class {
778
778
  // =============================================================================
779
779
  /**
780
780
  * Get the guide UI component for rendering
781
+ * Returns toggle button when hidden, full panel when visible
781
782
  */
782
783
  this.getComponent = () => {
783
- if (!this._isVisible) return null;
784
+ if (!this._isVisible) {
785
+ return this.renderToggleButton();
786
+ }
784
787
  const windowW = this.s(UI_DIMENSIONS.guide.width);
785
788
  return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
786
789
  uiTransform: {
@@ -1336,6 +1339,30 @@ var GuideUIModule = class {
1336
1339
  ]
1337
1340
  });
1338
1341
  }
1342
+ renderToggleButton() {
1343
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1344
+ uiTransform: {
1345
+ positionType: "absolute",
1346
+ position: { right: 20, bottom: 10 },
1347
+ width: this.s(100),
1348
+ height: this.s(45),
1349
+ justifyContent: "center",
1350
+ alignItems: "center"
1351
+ },
1352
+ uiBackground: { color: import_math3.Color4.create(0, 0.5, 0.5, 0.9) },
1353
+ onMouseDown: () => this.show(),
1354
+ children: [
1355
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1356
+ uiText: {
1357
+ value: "GUIDE",
1358
+ fontSize: this.s(16),
1359
+ color: THEME.colors.white,
1360
+ textAlign: "middle-center"
1361
+ }
1362
+ })
1363
+ ]
1364
+ });
1365
+ }
1339
1366
  };
1340
1367
 
1341
1368
  // src/ui/chat-ui.tsx
@@ -1380,9 +1407,12 @@ var ChatUIModule = class {
1380
1407
  // =============================================================================
1381
1408
  /**
1382
1409
  * Get the chat UI component for rendering
1410
+ * Returns toggle button when hidden, full panel when visible
1383
1411
  */
1384
1412
  this.getComponent = () => {
1385
- if (!this._isVisible) return null;
1413
+ if (!this._isVisible) {
1414
+ return this.renderToggleButton();
1415
+ }
1386
1416
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.fontScale);
1387
1417
  const positionStyle = this.getPositionStyle();
1388
1418
  return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
@@ -1715,7 +1745,7 @@ var ChatUIModule = class {
1715
1745
  // Approximate center
1716
1746
  case "right":
1717
1747
  default:
1718
- return { ...base, right: UI_DIMENSIONS.chat.right };
1748
+ return { ...base, right: 940 };
1719
1749
  }
1720
1750
  }
1721
1751
  renderHeader() {
@@ -2107,6 +2137,32 @@ var ChatUIModule = class {
2107
2137
  ]
2108
2138
  });
2109
2139
  }
2140
+ renderToggleButton() {
2141
+ const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
2142
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2143
+ uiTransform: {
2144
+ positionType: "absolute",
2145
+ position: { right: 130, bottom: 10 },
2146
+ // To the left of GUIDE button
2147
+ width: 100,
2148
+ height: 45,
2149
+ justifyContent: "center",
2150
+ alignItems: "center"
2151
+ },
2152
+ uiBackground: { color: import_math4.Color4.create(0.6, 0, 0.5, 0.9) },
2153
+ onMouseDown: () => this.show(),
2154
+ children: [
2155
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2156
+ uiText: {
2157
+ value: `CHAT${unreadBadge}`,
2158
+ fontSize: 16,
2159
+ color: THEME.colors.white,
2160
+ textAlign: "middle-center"
2161
+ }
2162
+ })
2163
+ ]
2164
+ });
2165
+ }
2110
2166
  };
2111
2167
 
2112
2168
  // src/StaticTVClient.ts
package/dist/index.mjs CHANGED
@@ -738,9 +738,12 @@ var GuideUIModule = class {
738
738
  // =============================================================================
739
739
  /**
740
740
  * Get the guide UI component for rendering
741
+ * Returns toggle button when hidden, full panel when visible
741
742
  */
742
743
  this.getComponent = () => {
743
- if (!this._isVisible) return null;
744
+ if (!this._isVisible) {
745
+ return this.renderToggleButton();
746
+ }
744
747
  const windowW = this.s(UI_DIMENSIONS.guide.width);
745
748
  return ReactEcs2.createElement(UiEntity2, {
746
749
  uiTransform: {
@@ -1296,6 +1299,30 @@ var GuideUIModule = class {
1296
1299
  ]
1297
1300
  });
1298
1301
  }
1302
+ renderToggleButton() {
1303
+ return ReactEcs2.createElement(UiEntity2, {
1304
+ uiTransform: {
1305
+ positionType: "absolute",
1306
+ position: { right: 20, bottom: 10 },
1307
+ width: this.s(100),
1308
+ height: this.s(45),
1309
+ justifyContent: "center",
1310
+ alignItems: "center"
1311
+ },
1312
+ uiBackground: { color: Color43.create(0, 0.5, 0.5, 0.9) },
1313
+ onMouseDown: () => this.show(),
1314
+ children: [
1315
+ ReactEcs2.createElement(UiEntity2, {
1316
+ uiText: {
1317
+ value: "GUIDE",
1318
+ fontSize: this.s(16),
1319
+ color: THEME.colors.white,
1320
+ textAlign: "middle-center"
1321
+ }
1322
+ })
1323
+ ]
1324
+ });
1325
+ }
1299
1326
  };
1300
1327
 
1301
1328
  // src/ui/chat-ui.tsx
@@ -1340,9 +1367,12 @@ var ChatUIModule = class {
1340
1367
  // =============================================================================
1341
1368
  /**
1342
1369
  * Get the chat UI component for rendering
1370
+ * Returns toggle button when hidden, full panel when visible
1343
1371
  */
1344
1372
  this.getComponent = () => {
1345
- if (!this._isVisible) return null;
1373
+ if (!this._isVisible) {
1374
+ return this.renderToggleButton();
1375
+ }
1346
1376
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.fontScale);
1347
1377
  const positionStyle = this.getPositionStyle();
1348
1378
  return ReactEcs3.createElement(UiEntity3, {
@@ -1675,7 +1705,7 @@ var ChatUIModule = class {
1675
1705
  // Approximate center
1676
1706
  case "right":
1677
1707
  default:
1678
- return { ...base, right: UI_DIMENSIONS.chat.right };
1708
+ return { ...base, right: 940 };
1679
1709
  }
1680
1710
  }
1681
1711
  renderHeader() {
@@ -2067,6 +2097,32 @@ var ChatUIModule = class {
2067
2097
  ]
2068
2098
  });
2069
2099
  }
2100
+ renderToggleButton() {
2101
+ const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
2102
+ return ReactEcs3.createElement(UiEntity3, {
2103
+ uiTransform: {
2104
+ positionType: "absolute",
2105
+ position: { right: 130, bottom: 10 },
2106
+ // To the left of GUIDE button
2107
+ width: 100,
2108
+ height: 45,
2109
+ justifyContent: "center",
2110
+ alignItems: "center"
2111
+ },
2112
+ uiBackground: { color: Color44.create(0.6, 0, 0.5, 0.9) },
2113
+ onMouseDown: () => this.show(),
2114
+ children: [
2115
+ ReactEcs3.createElement(UiEntity3, {
2116
+ uiText: {
2117
+ value: `CHAT${unreadBadge}`,
2118
+ fontSize: 16,
2119
+ color: THEME.colors.white,
2120
+ textAlign: "middle-center"
2121
+ }
2122
+ })
2123
+ ]
2124
+ });
2125
+ }
2070
2126
  };
2071
2127
 
2072
2128
  // src/StaticTVClient.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thestatic-tv/dcl-sdk",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
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",