webs-sdk 0.15.0 → 0.15.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/README.md +398 -398
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/components/ARFilters/ARFilters.js +52 -52
- package/dist/components/AvatarAI.js +4 -4
- package/dist/components/CookieConsent/constants.js +31 -31
- package/dist/components/CreativeFaceSwap.js +12 -12
- package/dist/components/MemeGenerator.js +12 -12
- package/dist/components/SpinningWheel/SpinningWheel.js +7 -7
- package/dist/components/esports/news/EsportsNews.d.ts.map +1 -1
- package/dist/components/esports/news/EsportsNews.js +13 -6
- package/dist/components/esports/news/EsportsNews.js.map +1 -1
- package/dist/components/esports/news/EsportsNewsDetail.d.ts +12 -0
- package/dist/components/esports/news/EsportsNewsDetail.d.ts.map +1 -0
- package/dist/components/esports/news/EsportsNewsDetail.js +97 -0
- package/dist/components/esports/news/EsportsNewsDetail.js.map +1 -0
- package/dist/components/esports/news/index.d.ts +2 -0
- package/dist/components/esports/news/index.d.ts.map +1 -1
- package/dist/components/esports/news/index.js +3 -1
- package/dist/components/esports/news/index.js.map +1 -1
- package/dist/components/esports/news/types.d.ts +4 -1
- package/dist/components/esports/news/types.d.ts.map +1 -1
- package/dist/components/esports/utils.d.ts +1 -0
- package/dist/components/esports/utils.d.ts.map +1 -1
- package/dist/components/esports/utils.js +23 -0
- package/dist/components/esports/utils.js.map +1 -1
- package/dist/components/esports/videos/EsportsVideos.d.ts.map +1 -1
- package/dist/components/esports/videos/EsportsVideos.js +13 -6
- package/dist/components/esports/videos/EsportsVideos.js.map +1 -1
- package/dist/components/esports/videos/types.d.ts +4 -1
- package/dist/components/esports/videos/types.d.ts.map +1 -1
- package/dist/components/ui/VideoPlayer.d.ts +11 -0
- package/dist/components/ui/VideoPlayer.d.ts.map +1 -0
- package/dist/components/ui/VideoPlayer.js +171 -0
- package/dist/components/ui/VideoPlayer.js.map +1 -0
- package/dist/context/TranslationContext.d.ts +12 -0
- package/dist/context/TranslationContext.d.ts.map +1 -0
- package/dist/context/TranslationContext.js +60 -0
- package/dist/context/TranslationContext.js.map +1 -0
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/index.js +83 -0
- package/package.json +42 -43
- package/public/spin2win/assets/border-afristream.svg +26 -26
- package/public/spin2win/assets/border-efc.svg +23 -23
- package/public/spin2win/assets/border-totalgym.svg +27 -27
- package/public/spin2win/assets/border-womantoday.svg +26 -26
- package/public/spin2win/assets/indicator-afristream.svg +28 -28
- package/public/spin2win/assets/indicator-efc.svg +29 -29
- package/public/spin2win/assets/indicator-totalgym.svg +29 -29
- package/public/spin2win/fonts/switzer/README.md +22 -22
- package/types/index.d.ts +415 -0
- package/dist/components/Quiz.d.ts +0 -91
- package/dist/components/Quiz.d.ts.map +0 -1
- package/dist/components/Quiz.js +0 -748
- package/dist/components/Quiz.js.map +0 -1
- package/dist/components/Stickers.d.ts +0 -68
- package/dist/components/Stickers.d.ts.map +0 -1
- package/dist/components/Stickers.js +0 -303
- package/dist/components/Stickers.js.map +0 -1
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useWebsSDKTranslation = exports.WebsSDKTranslationProvider = void 0;
|
|
4
|
+
var TranslationContext_1 = require("./context/TranslationContext");
|
|
5
|
+
Object.defineProperty(exports, "WebsSDKTranslationProvider", { enumerable: true, get: function () { return TranslationContext_1.WebsSDKTranslationProvider; } });
|
|
6
|
+
Object.defineProperty(exports, "useWebsSDKTranslation", { enumerable: true, get: function () { return TranslationContext_1.useWebsSDKTranslation; } });
|
|
7
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAGA,mEAGsC;AAFpC,gIAAA,0BAA0B,OAAA;AAC1B,2HAAA,qBAAqB,OAAA"}
|
|
@@ -39,58 +39,58 @@ const useDeepAR_1 = require("./useDeepAR");
|
|
|
39
39
|
const FilterCarousel_1 = require("./FilterCarousel");
|
|
40
40
|
const Popups_1 = require("./Popups");
|
|
41
41
|
const constants_1 = require("./constants");
|
|
42
|
-
const DEEPAR_CSS = `
|
|
43
|
-
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
44
|
-
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
45
|
-
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
46
|
-
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
47
|
-
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
48
|
-
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
49
|
-
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
50
|
-
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
51
|
-
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:24px;z-index:5}
|
|
52
|
-
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:42px;height:42px;background:rgba(0,0,0,.5);border:none;border-radius:8px;cursor:pointer;transition:all .2s}
|
|
53
|
-
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.7)}
|
|
54
|
-
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
55
|
-
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
56
|
-
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
57
|
-
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
58
|
-
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
59
|
-
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
60
|
-
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
61
|
-
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
62
|
-
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
63
|
-
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
64
|
-
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
65
|
-
.deepar-carousel-slides{display:flex;gap:16px}
|
|
66
|
-
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
67
|
-
.deepar-carousel-slide:hover{opacity:.8}
|
|
68
|
-
.deepar-carousel-slide.active{opacity:1}
|
|
69
|
-
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
70
|
-
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
71
|
-
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
72
|
-
.deepar-carousel-arrow.prev{left:16px}
|
|
73
|
-
.deepar-carousel-arrow.next{right:16px}
|
|
74
|
-
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
75
|
-
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
76
|
-
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
77
|
-
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
78
|
-
.deepar-selection-ring-camera{color:#fff}
|
|
79
|
-
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
80
|
-
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
81
|
-
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
82
|
-
.deepar-creation-buttons>*{pointer-events:all}
|
|
83
|
-
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
84
|
-
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
85
|
-
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
86
|
-
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
87
|
-
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
88
|
-
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
89
|
-
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
90
|
-
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
91
|
-
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
92
|
-
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
93
|
-
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
42
|
+
const DEEPAR_CSS = `
|
|
43
|
+
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
44
|
+
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
45
|
+
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
46
|
+
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
47
|
+
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
48
|
+
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
49
|
+
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
50
|
+
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
51
|
+
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:24px;z-index:5}
|
|
52
|
+
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:42px;height:42px;background:rgba(0,0,0,.5);border:none;border-radius:8px;cursor:pointer;transition:all .2s}
|
|
53
|
+
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.7)}
|
|
54
|
+
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
55
|
+
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
56
|
+
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
57
|
+
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
58
|
+
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
59
|
+
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
60
|
+
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
61
|
+
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
62
|
+
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
63
|
+
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
64
|
+
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
65
|
+
.deepar-carousel-slides{display:flex;gap:16px}
|
|
66
|
+
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
67
|
+
.deepar-carousel-slide:hover{opacity:.8}
|
|
68
|
+
.deepar-carousel-slide.active{opacity:1}
|
|
69
|
+
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
70
|
+
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
71
|
+
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
72
|
+
.deepar-carousel-arrow.prev{left:16px}
|
|
73
|
+
.deepar-carousel-arrow.next{right:16px}
|
|
74
|
+
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
75
|
+
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
76
|
+
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
77
|
+
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
78
|
+
.deepar-selection-ring-camera{color:#fff}
|
|
79
|
+
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
80
|
+
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
81
|
+
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
82
|
+
.deepar-creation-buttons>*{pointer-events:all}
|
|
83
|
+
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
84
|
+
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
85
|
+
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
86
|
+
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
87
|
+
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
88
|
+
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
89
|
+
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
90
|
+
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
91
|
+
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
92
|
+
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
93
|
+
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
94
94
|
`;
|
|
95
95
|
function ARFilters(props) {
|
|
96
96
|
(0, react_1.useEffect)(() => {
|
|
@@ -37,10 +37,10 @@ exports.AvatarAI = AvatarAI;
|
|
|
37
37
|
exports.AvatarAIForYouCard = AvatarAIForYouCard;
|
|
38
38
|
exports.AvatarAIPage = AvatarAIPage;
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
-
const AVATAR_AI_CSS = `
|
|
41
|
-
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
42
|
-
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
43
|
-
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
40
|
+
const AVATAR_AI_CSS = `
|
|
41
|
+
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
42
|
+
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
43
|
+
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
44
44
|
`;
|
|
45
45
|
const defaultStyles = [
|
|
46
46
|
{ id: 1, name: 'Pirate', image: 'https://cdn.smarthubtech.net/upload/20240426_135427_99796_1_cuadrada.png' },
|
|
@@ -5,36 +5,36 @@ exports.COOKIE_CONSENT_COOKIE_NAME = 'cookieConsent';
|
|
|
5
5
|
exports.COOKIE_CONSENT_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
6
6
|
exports.TRACKING_PERMISSION_KEY = 'TRACKING_PERMISSION';
|
|
7
7
|
exports.FUNCTIONAL_PERMISSION_KEY = 'FUNCTIONAL_PERMISSION';
|
|
8
|
-
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
-
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
-
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
-
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
-
.cc-content{flex:1;min-width:0}
|
|
13
|
-
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
-
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
-
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
-
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
-
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
-
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
-
.cc-btn:hover{opacity:.88}
|
|
20
|
-
.cc-btn-essential{background:transparent}
|
|
21
|
-
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
-
.cc-config-link:hover{opacity:1}
|
|
23
|
-
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
-
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
-
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
-
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
-
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
-
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
-
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
-
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
-
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
-
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
-
.cc-checkbox:disabled{cursor:default}
|
|
34
|
-
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
-
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
-
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
-
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
-
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
8
|
+
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
+
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
+
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
+
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
+
.cc-content{flex:1;min-width:0}
|
|
13
|
+
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
+
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
+
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
+
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
+
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
+
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
+
.cc-btn:hover{opacity:.88}
|
|
20
|
+
.cc-btn-essential{background:transparent}
|
|
21
|
+
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
+
.cc-config-link:hover{opacity:1}
|
|
23
|
+
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
+
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
+
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
+
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
+
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
+
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
+
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
+
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
+
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
+
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
+
.cc-checkbox:disabled{cursor:default}
|
|
34
|
+
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
+
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
+
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
+
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
+
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
39
39
|
`;
|
|
40
40
|
//# sourceMappingURL=constants.js.map
|
|
@@ -41,18 +41,18 @@ exports.CreativeFaceSwapPage = CreativeFaceSwapPage;
|
|
|
41
41
|
exports.CreativeFaceSwap = CreativeFaceSwap;
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const link_1 = __importDefault(require("next/link"));
|
|
44
|
-
const FACESWAP_CSS = `
|
|
45
|
-
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
46
|
-
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
47
|
-
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
48
|
-
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
49
|
-
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
50
|
-
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
51
|
-
@media (max-width: 768px) {
|
|
52
|
-
.faceswap-layout { flex-direction: column; }
|
|
53
|
-
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
54
|
-
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
55
|
-
}
|
|
44
|
+
const FACESWAP_CSS = `
|
|
45
|
+
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
46
|
+
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
47
|
+
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
48
|
+
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
49
|
+
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
50
|
+
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
51
|
+
@media (max-width: 768px) {
|
|
52
|
+
.faceswap-layout { flex-direction: column; }
|
|
53
|
+
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
54
|
+
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
55
|
+
}
|
|
56
56
|
`;
|
|
57
57
|
function CreativeFaceSwapForYouCard({ title, description, ctaText, ctaHref, desktopImage, mobileImage, imageAlt = '', imageOnRight = true, titleColor = '#001B5E', descriptionColor = '#001B5E', ctaColor = '#FF5500', ctaHoverColor = '#ff1600', backgroundColor = '#F9F9F9', paddingClass = 'py-12 md:py-16 lg:py-20', }) {
|
|
58
58
|
const effectiveMobileImage = mobileImage || desktopImage;
|
|
@@ -63,18 +63,18 @@ const defaultTexts = {
|
|
|
63
63
|
noMemes: 'No memes available',
|
|
64
64
|
};
|
|
65
65
|
const TEXT_SHADOW = '2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000';
|
|
66
|
-
const MEME_CSS = `
|
|
67
|
-
.memegen-grid {
|
|
68
|
-
display: grid;
|
|
69
|
-
grid-template-columns: 1fr;
|
|
70
|
-
gap: 24px;
|
|
71
|
-
align-items: stretch;
|
|
72
|
-
}
|
|
73
|
-
@media (min-width: 1024px) {
|
|
74
|
-
.memegen-grid {
|
|
75
|
-
grid-template-columns: 1fr 1fr;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
66
|
+
const MEME_CSS = `
|
|
67
|
+
.memegen-grid {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: 1fr;
|
|
70
|
+
gap: 24px;
|
|
71
|
+
align-items: stretch;
|
|
72
|
+
}
|
|
73
|
+
@media (min-width: 1024px) {
|
|
74
|
+
.memegen-grid {
|
|
75
|
+
grid-template-columns: 1fr 1fr;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
78
|
`;
|
|
79
79
|
function MemeGenerator({ memes: memesProp, config, fonts = defaultFonts, defaultMemeIndex = 0, theme = {}, texts = {}, onDownload, }) {
|
|
80
80
|
const mergedTheme = Object.assign(Object.assign({}, defaultTheme), theme);
|
|
@@ -269,13 +269,13 @@ function SpinningWheel({ config: configProp, onResult, onError, canSpin = true,
|
|
|
269
269
|
const backgroundAsset = currentTheme.backgroundAsset;
|
|
270
270
|
return (react_1.default.createElement("div", { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '32px', padding: '32px', minHeight: '100vh', overflow: 'hidden' } },
|
|
271
271
|
backgroundAsset && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
272
|
-
react_1.default.createElement("style", null, `
|
|
273
|
-
.sw-bg-desktop { display: block; }
|
|
274
|
-
.sw-bg-mobile { display: none; }
|
|
275
|
-
@media (max-width: 767px) {
|
|
276
|
-
.sw-bg-desktop { display: none; }
|
|
277
|
-
.sw-bg-mobile { display: block; }
|
|
278
|
-
}
|
|
272
|
+
react_1.default.createElement("style", null, `
|
|
273
|
+
.sw-bg-desktop { display: block; }
|
|
274
|
+
.sw-bg-mobile { display: none; }
|
|
275
|
+
@media (max-width: 767px) {
|
|
276
|
+
.sw-bg-desktop { display: none; }
|
|
277
|
+
.sw-bg-mobile { display: block; }
|
|
278
|
+
}
|
|
279
279
|
`),
|
|
280
280
|
react_1.default.createElement("img", { src: backgroundAsset.desktop, alt: "", className: "sw-bg-desktop", style: {
|
|
281
281
|
position: 'absolute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsportsNews.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"EsportsNews.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,SAAS,CAAC;AAG1D,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAmNlD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -38,8 +38,15 @@ const react_1 = __importStar(require("react"));
|
|
|
38
38
|
const api_1 = require("./api");
|
|
39
39
|
const utils_1 = require("../utils");
|
|
40
40
|
const timeUtils_1 = require("../../../utils/timeUtils");
|
|
41
|
+
const EsportsNewsDetail_1 = require("./EsportsNewsDetail");
|
|
41
42
|
function EsportsNews(props) {
|
|
42
|
-
const { config, language, onNewsClick, translateFn, theme = {}, categoryStyles = {}, defaultCategoryStyle = {}, } = props;
|
|
43
|
+
const { config, language, onNewsClick, translateFn, theme = {}, categoryStyles = {}, defaultCategoryStyle = {}, newsId, newsData, onBack, } = props;
|
|
44
|
+
if (newsId) {
|
|
45
|
+
return (react_1.default.createElement(EsportsNewsDetail_1.EsportsNewsDetail, { newsId: newsId, newsData: newsData, onBack: onBack || (() => { }), translateFn: translateFn, language: language }));
|
|
46
|
+
}
|
|
47
|
+
if (!config) {
|
|
48
|
+
return react_1.default.createElement("div", { className: "text-center py-8 text-gray-500" }, "No configuration provided");
|
|
49
|
+
}
|
|
43
50
|
const [news, setNews] = (0, react_1.useState)([]);
|
|
44
51
|
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
45
52
|
const [error, setError] = (0, react_1.useState)(null);
|
|
@@ -129,15 +136,15 @@ function EsportsNews(props) {
|
|
|
129
136
|
react_1.default.createElement("div", { className: mergedTheme.featuredCard, onClick: () => handleNewsClick(featuredNews) },
|
|
130
137
|
react_1.default.createElement("img", { src: (0, utils_1.getBestImage)(featuredNews), alt: featuredNews.title, className: mergedTheme.featuredImage }),
|
|
131
138
|
react_1.default.createElement("div", { className: mergedTheme.featuredContent },
|
|
132
|
-
|
|
133
|
-
react_1.default.createElement("h3", { className: mergedTheme.featuredTitle }, featuredNews.title),
|
|
134
|
-
featuredNews.excerpt && (react_1.default.createElement("p", { className: mergedTheme.featuredExcerpt }, featuredNews.excerpt)),
|
|
139
|
+
react_1.default.createElement("span", { className: `${mergedTheme.featuredBadge} ${getCategoryStyle(featuredNews.category).badge} ${getCategoryStyle(featuredNews.category).badgeText}` }, t('esports.title').toUpperCase()),
|
|
140
|
+
react_1.default.createElement("h3", { className: mergedTheme.featuredTitle }, (0, utils_1.stripHtml)(featuredNews.title)),
|
|
141
|
+
featuredNews.excerpt && (react_1.default.createElement("p", { className: mergedTheme.featuredExcerpt }, (0, utils_1.stripHtml)(featuredNews.excerpt))),
|
|
135
142
|
react_1.default.createElement("p", { className: mergedTheme.featuredTime }, (0, timeUtils_1.getTimeAgo)(featuredNews.date, t)))),
|
|
136
143
|
gridNews.length > 0 && (react_1.default.createElement("div", { className: mergedTheme.gridContainer }, gridNews.map((newsItem) => (react_1.default.createElement("div", { key: newsItem.id, className: mergedTheme.gridCard, onClick: () => handleNewsClick(newsItem) },
|
|
137
144
|
react_1.default.createElement("img", { src: (0, utils_1.getBestImage)(newsItem), alt: newsItem.title, className: mergedTheme.gridImage }),
|
|
138
145
|
react_1.default.createElement("div", { className: mergedTheme.gridContent },
|
|
139
|
-
|
|
140
|
-
react_1.default.createElement("h4", { className: mergedTheme.gridTitle }, newsItem.title),
|
|
146
|
+
react_1.default.createElement("span", { className: `${mergedTheme.gridBadge} ${getCategoryStyle(newsItem.category).badge} ${getCategoryStyle(newsItem.category).badgeText}` }, t('esports.title').toUpperCase()),
|
|
147
|
+
react_1.default.createElement("h4", { className: mergedTheme.gridTitle }, (0, utils_1.stripHtml)(newsItem.title)),
|
|
141
148
|
react_1.default.createElement("p", { className: mergedTheme.gridTime }, (0, timeUtils_1.getTimeAgo)(newsItem.date, t))))))))));
|
|
142
149
|
}
|
|
143
150
|
exports.default = EsportsNews;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsportsNews.js","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNews.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"EsportsNews.js","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNews.tsx"],"names":[],"m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
import type { NewsItem, TranslationFunction } from './types';
|
|
3
|
+
export interface EsportsNewsDetailProps {
|
|
4
|
+
newsId?: string;
|
|
5
|
+
newsData?: NewsItem | any;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
translateFn?: TranslationFunction;
|
|
8
|
+
language: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function EsportsNewsDetail(props: EsportsNewsDetailProps): React.JSX.Element;
|
|
11
|
+
export default EsportsNewsDetail;
|
|
12
|
+
//# sourceMappingURL=EsportsNewsDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EsportsNewsDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNewsDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAC;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAgCD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAiI9D;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EsportsNewsDetail = EsportsNewsDetail;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const VideoPlayer_1 = require("../../ui/VideoPlayer");
|
|
9
|
+
const getBestImage = (item) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
if ((_a = item.images) === null || _a === void 0 ? void 0 : _a.xl)
|
|
12
|
+
return item.images.xl;
|
|
13
|
+
if ((_b = item.images) === null || _b === void 0 ? void 0 : _b.img1)
|
|
14
|
+
return item.images.img1;
|
|
15
|
+
if ((_c = item.images) === null || _c === void 0 ? void 0 : _c.img3)
|
|
16
|
+
return item.images.img3;
|
|
17
|
+
if (item.thumbnail)
|
|
18
|
+
return item.thumbnail;
|
|
19
|
+
return item.image || '';
|
|
20
|
+
};
|
|
21
|
+
const getVideoUrl = (item) => {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f;
|
|
23
|
+
if (((_b = (_a = item.metadata) === null || _a === void 0 ? void 0 : _a.content_data) === null || _b === void 0 ? void 0 : _b.videos) && item.metadata.content_data.videos.length > 0) {
|
|
24
|
+
return item.metadata.content_data.videos[0].url || '';
|
|
25
|
+
}
|
|
26
|
+
if (((_d = (_c = item.metadata) === null || _c === void 0 ? void 0 : _c.content_data) === null || _d === void 0 ? void 0 : _d.original_videos) && item.metadata.content_data.original_videos.length > 0) {
|
|
27
|
+
return item.metadata.content_data.original_videos[0].url || '';
|
|
28
|
+
}
|
|
29
|
+
if ((_e = item.metadata) === null || _e === void 0 ? void 0 : _e.full_hosting_mp4) {
|
|
30
|
+
return item.metadata.full_hosting_mp4;
|
|
31
|
+
}
|
|
32
|
+
if ((_f = item.metadata) === null || _f === void 0 ? void 0 : _f.hosting_mp4) {
|
|
33
|
+
return item.metadata.hosting_mp4;
|
|
34
|
+
}
|
|
35
|
+
if (item.contents && typeof item.contents === 'string' &&
|
|
36
|
+
(item.contents.endsWith('.mp4') || item.contents.endsWith('.m3u8'))) {
|
|
37
|
+
return item.contents;
|
|
38
|
+
}
|
|
39
|
+
return '';
|
|
40
|
+
};
|
|
41
|
+
function EsportsNewsDetail(props) {
|
|
42
|
+
const { newsData, onBack, translateFn } = props;
|
|
43
|
+
const t = (key) => {
|
|
44
|
+
if (translateFn) {
|
|
45
|
+
return translateFn(key);
|
|
46
|
+
}
|
|
47
|
+
return key;
|
|
48
|
+
};
|
|
49
|
+
if (!newsData) {
|
|
50
|
+
return (react_1.default.createElement("div", { className: "min-h-screen bg-white flex items-center justify-center" },
|
|
51
|
+
react_1.default.createElement("div", { className: "text-center" },
|
|
52
|
+
react_1.default.createElement("p", { className: "text-gray-500 mb-4" }, t('newsDetail.notFound')),
|
|
53
|
+
react_1.default.createElement("button", { onClick: onBack, className: "px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors" },
|
|
54
|
+
"\u2190 ",
|
|
55
|
+
t('common.back')))));
|
|
56
|
+
}
|
|
57
|
+
const image = getBestImage(newsData);
|
|
58
|
+
const videoUrl = getVideoUrl(newsData);
|
|
59
|
+
const content = newsData.contents || newsData.description || newsData.excerpt || '';
|
|
60
|
+
const formatDate = (dateString) => {
|
|
61
|
+
try {
|
|
62
|
+
const date = new Date(dateString);
|
|
63
|
+
return date.toLocaleDateString();
|
|
64
|
+
}
|
|
65
|
+
catch (_a) {
|
|
66
|
+
return dateString;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return (react_1.default.createElement("div", { className: "min-h-screen bg-white" },
|
|
70
|
+
react_1.default.createElement("div", { className: "mx-auto max-w-4xl px-4 py-6" },
|
|
71
|
+
react_1.default.createElement("div", { className: "mb-6" },
|
|
72
|
+
react_1.default.createElement("button", { onClick: onBack, className: "flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors" },
|
|
73
|
+
react_1.default.createElement("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
|
|
74
|
+
react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 19l-7-7m0 0l7-7m-7 7h18" })),
|
|
75
|
+
t('esports.back'))),
|
|
76
|
+
react_1.default.createElement("article", null,
|
|
77
|
+
react_1.default.createElement("div", { className: "mb-4" },
|
|
78
|
+
react_1.default.createElement("span", { className: "inline-block px-3 py-1 bg-gradient-to-r from-purple-600 to-pink-600 text-white text-sm font-semibold rounded-full uppercase" }, t('esports.title').toUpperCase())),
|
|
79
|
+
react_1.default.createElement("h1", { className: "text-3xl md:text-4xl font-bold text-gray-900 mb-4 leading-tight", dangerouslySetInnerHTML: { __html: newsData.title } }),
|
|
80
|
+
newsData.date && (react_1.default.createElement("div", { className: "flex items-center text-gray-500 text-sm mb-6" },
|
|
81
|
+
react_1.default.createElement("svg", { className: "w-4 h-4 mr-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
|
|
82
|
+
react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" })),
|
|
83
|
+
formatDate(newsData.date))),
|
|
84
|
+
videoUrl ? (react_1.default.createElement("div", { className: "mb-6" },
|
|
85
|
+
react_1.default.createElement(VideoPlayer_1.VideoPlayer, { videoUrl: videoUrl, posterImage: image, title: newsData.title }))) : image ? (react_1.default.createElement("div", { className: "mb-6" },
|
|
86
|
+
react_1.default.createElement("img", { src: image, alt: newsData.title, className: "w-full h-auto rounded-lg shadow-lg object-cover max-h-[500px]", onError: (e) => {
|
|
87
|
+
e.currentTarget.style.display = 'none';
|
|
88
|
+
} }))) : null,
|
|
89
|
+
react_1.default.createElement("div", { className: "prose prose-lg max-w-none mt-6" }, newsData.content ? (react_1.default.createElement("div", { className: "text-gray-800 leading-relaxed", dangerouslySetInnerHTML: { __html: newsData.content } })) : (react_1.default.createElement("p", { className: "text-gray-800 leading-relaxed text-lg", dangerouslySetInnerHTML: { __html: newsData.excerpt } }))),
|
|
90
|
+
newsData.source_domain && (react_1.default.createElement("div", { className: "mt-8 pt-6 border-t border-gray-200" },
|
|
91
|
+
react_1.default.createElement("p", { className: "text-sm text-gray-500" },
|
|
92
|
+
t('esports.news.source'),
|
|
93
|
+
": ",
|
|
94
|
+
newsData.source_domain)))))));
|
|
95
|
+
}
|
|
96
|
+
exports.default = EsportsNewsDetail;
|
|
97
|
+
//# sourceMappingURL=EsportsNewsDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EsportsNewsDetail.js","sourceRoot":"","sources":["../../../../src/components/esports/news/EsportsNewsDetail.tsx"],"names":[],"mappings":";;;;;AA0CA,8CAiIC;AA3KD,kDAA0B;AAC1B,sDAAmD;AAYnD,MAAM,YAAY,GAAG,CAAC,IAAS,EAAU,EAAE;;IACzC,IAAI,MAAA,IAAI,CAAC,MAAM,0CAAE,EAAE;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3C,IAAI,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/C,IAAI,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/C,IAAI,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1C,OAAO,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC;AAGF,MAAM,WAAW,GAAG,CAAC,IAAS,EAAU,EAAE;;IACxC,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,YAAY,0CAAE,MAAM,KAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC;IACxD,CAAC;IACD,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,YAAY,0CAAE,eAAe,KAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,eAA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oC;oBACjD,qCAAG,SAAS,EAAC,uBAAuB;wBACjC,CAAC,CAAC,qBAAqB,CAAC;;wBAAI,QAAQ,CAAC,aAAa,CACjD,CACA,CACP,CACO,CACN,CACF,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { EsportsNews, EsportsNews as default } from './EsportsNews';
|
|
2
|
+
export { EsportsNewsDetail } from './EsportsNewsDetail';
|
|
2
3
|
export { createEsportsNewsAPI, EsportsNewsAPI } from './api';
|
|
3
4
|
export type { NewsItem, ContentConfig, EsportsNewsConfig, EsportsNewsProps, EsportsNewsTheme, CategoryStyle, } from './types';
|
|
4
5
|
export type { EsportsNewsAPIConfig } from './api';
|
|
6
|
+
export type { EsportsNewsDetailProps } from './EsportsNewsDetail';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,YAAY,EACV,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,YAAY,EACV,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAClD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EsportsNewsAPI = exports.createEsportsNewsAPI = exports.default = exports.EsportsNews = void 0;
|
|
3
|
+
exports.EsportsNewsAPI = exports.createEsportsNewsAPI = exports.EsportsNewsDetail = exports.default = exports.EsportsNews = void 0;
|
|
4
4
|
var EsportsNews_1 = require("./EsportsNews");
|
|
5
5
|
Object.defineProperty(exports, "EsportsNews", { enumerable: true, get: function () { return EsportsNews_1.EsportsNews; } });
|
|
6
6
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return EsportsNews_1.EsportsNews; } });
|
|
7
|
+
var EsportsNewsDetail_1 = require("./EsportsNewsDetail");
|
|
8
|
+
Object.defineProperty(exports, "EsportsNewsDetail", { enumerable: true, get: function () { return EsportsNewsDetail_1.EsportsNewsDetail; } });
|
|
7
9
|
var api_1 = require("./api");
|
|
8
10
|
Object.defineProperty(exports, "createEsportsNewsAPI", { enumerable: true, get: function () { return api_1.createEsportsNewsAPI; } });
|
|
9
11
|
Object.defineProperty(exports, "EsportsNewsAPI", { enumerable: true, get: function () { return api_1.EsportsNewsAPI; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/esports/news/index.ts"],"names":[],"mappings":";;;AAIA,6CAAoE;AAA3D,0GAAA,WAAW,OAAA;AAAE,sGAAA,WAAW,OAAW;AAC5C,6BAA6D;AAApD,2GAAA,oBAAoB,OAAA;AAAE,qGAAA,cAAc,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/esports/news/index.ts"],"names":[],"mappings":";;;AAIA,6CAAoE;AAA3D,0GAAA,WAAW,OAAA;AAAE,sGAAA,WAAW,OAAW;AAC5C,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,6BAA6D;AAApD,2GAAA,oBAAoB,OAAA;AAAE,qGAAA,cAAc,OAAA"}
|
|
@@ -73,7 +73,7 @@ export interface CategoryStyle {
|
|
|
73
73
|
}
|
|
74
74
|
export type TranslationFunction = (key: string, params?: Record<string, any>) => string;
|
|
75
75
|
export interface EsportsNewsProps {
|
|
76
|
-
config
|
|
76
|
+
config?: EsportsNewsConfig;
|
|
77
77
|
language: string;
|
|
78
78
|
onNewsClick?: (news: NewsItem) => void;
|
|
79
79
|
translateFn?: TranslationFunction;
|
|
@@ -82,5 +82,8 @@ export interface EsportsNewsProps {
|
|
|
82
82
|
[key: string]: CategoryStyle;
|
|
83
83
|
};
|
|
84
84
|
defaultCategoryStyle?: CategoryStyle;
|
|
85
|
+
newsId?: string;
|
|
86
|
+
newsData?: NewsItem | any;
|
|
87
|
+
onBack?: () => void;
|
|
85
88
|
}
|
|
86
89
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/esports/news/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd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C/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,cAAc,CAAC,EAAE;QACf,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;KAC9B,CAAC;IACF,oBAAoB,CAAC,EAAE,aAAa,CAAC;IAErC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -8,4 +8,5 @@ export declare function formatTimeAgo(dateString: string, translations?: {
|
|
|
8
8
|
}): string;
|
|
9
9
|
export declare function addImageSuffix(url: string, suffix: string): string;
|
|
10
10
|
export declare function getBestImage(item: any, size?: 'xl' | 'sm' | 'thumbnail'): string;
|
|
11
|
+
export declare function stripHtml(html: string): string;
|
|
11
12
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/esports/utils.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACA,MAAM,CAgCR;AAKD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOlE;AAKD,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAE,IAAI,GAAG,IAAI,GAAG,WAAkB,GAAG,MAAM,CAUtF"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/esports/utils.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACA,MAAM,CAgCR;AAKD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOlE;AAKD,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAE,IAAI,GAAG,IAAI,GAAG,WAAkB,GAAG,MAAM,CAUtF;AAKD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA2B9C"}
|