@thestatic-tv/dcl-sdk 2.1.0 → 2.2.0
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +57 -2
- package/dist/index.mjs +57 -2
- package/package.json +1 -1
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)
|
|
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, top: "40%" },
|
|
1347
|
+
width: this.s(80),
|
|
1348
|
+
height: this.s(40),
|
|
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)
|
|
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, {
|
|
@@ -2107,6 +2137,31 @@ 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: 20, top: "48%" },
|
|
2146
|
+
width: 80,
|
|
2147
|
+
height: 40,
|
|
2148
|
+
justifyContent: "center",
|
|
2149
|
+
alignItems: "center"
|
|
2150
|
+
},
|
|
2151
|
+
uiBackground: { color: import_math4.Color4.create(0.6, 0, 0.5, 0.9) },
|
|
2152
|
+
onMouseDown: () => this.show(),
|
|
2153
|
+
children: [
|
|
2154
|
+
import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
|
|
2155
|
+
uiText: {
|
|
2156
|
+
value: `CHAT${unreadBadge}`,
|
|
2157
|
+
fontSize: 16,
|
|
2158
|
+
color: THEME.colors.white,
|
|
2159
|
+
textAlign: "middle-center"
|
|
2160
|
+
}
|
|
2161
|
+
})
|
|
2162
|
+
]
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2110
2165
|
};
|
|
2111
2166
|
|
|
2112
2167
|
// 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)
|
|
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, top: "40%" },
|
|
1307
|
+
width: this.s(80),
|
|
1308
|
+
height: this.s(40),
|
|
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)
|
|
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, {
|
|
@@ -2067,6 +2097,31 @@ 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: 20, top: "48%" },
|
|
2106
|
+
width: 80,
|
|
2107
|
+
height: 40,
|
|
2108
|
+
justifyContent: "center",
|
|
2109
|
+
alignItems: "center"
|
|
2110
|
+
},
|
|
2111
|
+
uiBackground: { color: Color44.create(0.6, 0, 0.5, 0.9) },
|
|
2112
|
+
onMouseDown: () => this.show(),
|
|
2113
|
+
children: [
|
|
2114
|
+
ReactEcs3.createElement(UiEntity3, {
|
|
2115
|
+
uiText: {
|
|
2116
|
+
value: `CHAT${unreadBadge}`,
|
|
2117
|
+
fontSize: 16,
|
|
2118
|
+
color: THEME.colors.white,
|
|
2119
|
+
textAlign: "middle-center"
|
|
2120
|
+
}
|
|
2121
|
+
})
|
|
2122
|
+
]
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2070
2125
|
};
|
|
2071
2126
|
|
|
2072
2127
|
// src/StaticTVClient.ts
|
package/package.json
CHANGED