@banou/ftube 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +44 -2
- package/__yt_engine__/engine.html +9 -0
- package/app.webmanifest +31 -0
- package/assets/account-BL8Hv7lS.js +157 -0
- package/assets/account-By94iboj.js +1 -0
- package/assets/account-DfiXzypA-YE6OyKjK.js +1 -0
- package/assets/account-generation-BP_-Qyck-BOth6YQ_.js +1 -0
- package/assets/agent-source-E4g0cDzU.js +1 -0
- package/assets/api-1NDCtwel-CAaxX8P1.js +3 -0
- package/assets/binary-encoding-By5K7InN.js +1 -0
- package/assets/build-CNn3bm6X.js +1 -0
- package/assets/busy-C1JPjoZ_-CJ0641jK.js +1 -0
- package/assets/cards-Csel8naI.js +2334 -0
- package/assets/channel-B5f9YTIf.js +1160 -0
- package/assets/client-version-D9kIz6Gz.js +1 -0
- package/assets/comments-CJp9O808.js +612 -0
- package/assets/dislikes-DH5jCVEY.js +1 -0
- package/assets/dist-7VpLCl1k.js +1 -0
- package/assets/dist-BOrL1gYg.js +2 -0
- package/assets/downloads-CMXDjA_E.js +191 -0
- package/assets/egress.worker-DopXr5uP.js +104 -0
- package/assets/engine-B_kFyW7L.js +2 -0
- package/assets/feed-channels-Dg2mvF5x.js +251 -0
- package/assets/feed-groups-CnyR4sOO.js +160 -0
- package/assets/feed-history-BDAGG9N5.js +368 -0
- package/assets/feed-playlists-DcGR2AL6.js +167 -0
- package/assets/feed-subscriptions-Sm3tKz4P.js +165 -0
- package/assets/feed-you-lxbqknXX.js +110 -0
- package/assets/formats-CDwXfKnr.js +1 -0
- package/assets/frame-BrGNSf3s.js +2 -0
- package/assets/fs-CjRTQ7Nu.js +1 -0
- package/assets/fs-CwRtKje1-CBsYhX2-.js +1 -0
- package/assets/fullscreen-view-BLgosU84.js +269 -0
- package/assets/group-C00s0aT7.js +183 -0
- package/assets/groups-button-CvVnqwlu.js +25 -0
- package/assets/hashtag-CCIhITaL.js +115 -0
- package/assets/icons-DKsqNLSs.js +1 -0
- package/assets/index-A5dHbptn.css +1 -0
- package/assets/index-DwsYJ-bu.js +1328 -0
- package/assets/lib-h0P14ZFl.js +70 -0
- package/assets/linkify-B6hdFhsL.js +1 -0
- package/assets/packages-C3w3tSjj-BCtDk0vj.js +1 -0
- package/assets/party-CUcxsJDF.js +180 -0
- package/assets/playlist-DF7wsidw.js +521 -0
- package/assets/playlist-card-Btoc7D8f.js +91 -0
- package/assets/playlist-panel-D97BwT1f.js +199 -0
- package/assets/post-CQ9mfVos.js +39 -0
- package/assets/post-card-ZUQixO1G.js +76 -0
- package/assets/privacy-hkbqXFeB.js +46 -0
- package/assets/protobuf-BXZ2dCCc.js +1 -0
- package/assets/read-more-BhddUSlS.js +20 -0
- package/assets/rich-text-07paR5O3.js +25 -0
- package/assets/roboto-cyrillic-ext-BCp_3N7R.woff2 +0 -0
- package/assets/roboto-cyrillic-fOt7epNf.woff2 +0 -0
- package/assets/roboto-greek-DlT9XTxE.woff2 +0 -0
- package/assets/roboto-greek-ext-Bgw4czJT.woff2 +0 -0
- package/assets/roboto-latin-ccAYIvAh.woff2 +0 -0
- package/assets/roboto-latin-ext-DYIxWhlt.woff2 +0 -0
- package/assets/roboto-math-4a3xuzGk.woff2 +0 -0
- package/assets/roboto-symbols-B7iHSfaG.woff2 +0 -0
- package/assets/roboto-vietnamese-_f1XEJpo.woff2 +0 -0
- package/assets/rooms-B-AvBY-c-FNDqRDHE.js +1 -0
- package/assets/rooms-B91zuirR.js +1 -0
- package/assets/save-menu-DF1WKqSE.js +462 -0
- package/assets/search-Cx5IpDtZ.js +1026 -0
- package/assets/settings-kESE_uBm.js +99 -0
- package/assets/shaka-BwT9pJcV.js +36 -0
- package/assets/share-dialog-Cp0BJ6bg.js +156 -0
- package/assets/shorts-BxDB7m0c.js +686 -0
- package/assets/shorts-grid-Bgbkl5dP.js +11 -0
- package/assets/sign-in-Bx3zmj-m.js +97 -0
- package/assets/signed-out-prompt-CEAx65kq.js +79 -0
- package/assets/signin-DkI8Ogzz.js +18 -0
- package/assets/social-bXt3vmd4.js +1 -0
- package/assets/video-card-compact-r-K4XyDb.js +190 -0
- package/assets/watch-CkxSP1IA.js +1802 -0
- package/assets/web-BNanCsH5.js +43 -0
- package/favicon.ico +0 -0
- package/favicon.svg +5 -0
- package/icons/icon-192.png +0 -0
- package/icons/icon-512.png +0 -0
- package/index-Bj-Q3X8Q.js +4120 -0
- package/index.html +32 -0
- package/package.json +45 -4
- package/store/background.webp +0 -0
- package/store/channel.webp +0 -0
- package/store/cover.webp +0 -0
- package/store/phone.webp +0 -0
- package/store/search.webp +0 -0
- package/store/watch.webp +0 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import{G as e,et as t,in as n,jt as r,kt as i,mt as a,n as o,on as s,sn as c,tn as l}from"./icons-DKsqNLSs.js";import{c as u,ot as d,s as f}from"./sign-in-Bx3zmj-m.js";import{Mt as p,Sn as m,_ as h,g,i as _,in as v,pt as y,xn as b}from"./cards-Csel8naI.js";import{t as x}from"./comments-CJp9O808.js";import{n as S,t as C}from"./save-menu-DF1WKqSE.js";import{n as w,r as T,t as E}from"./share-dialog-Cp0BJ6bg.js";c();var D=12,O=100,k=d`
|
|
2
|
+
display: grid;
|
|
3
|
+
place-items: center;
|
|
4
|
+
width: 4rem;
|
|
5
|
+
height: 4rem;
|
|
6
|
+
padding: 0;
|
|
7
|
+
border: none;
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
background: rgba(0, 0, 0, 0.3);
|
|
10
|
+
color: inherit;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
background: rgba(40, 40, 40, 0.6);
|
|
15
|
+
}
|
|
16
|
+
`,A=d`
|
|
17
|
+
display: contents;
|
|
18
|
+
color: #ffffff;
|
|
19
|
+
font-family: Roboto, Arial, sans-serif;
|
|
20
|
+
|
|
21
|
+
.fs-top,
|
|
22
|
+
.fs-actions,
|
|
23
|
+
.fs-more {
|
|
24
|
+
transition: opacity 0.2s ease;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:not(.fs-shown) .fs-top,
|
|
28
|
+
&:not(.fs-shown) .fs-actions,
|
|
29
|
+
&:not(.fs-shown) .fs-more {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* youtube.com's settings menu opens where the action pill is, and the pill goes while it is open */
|
|
35
|
+
&.fs-settings .fs-actions {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.fs-top {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
padding: 2rem 2.4rem 4.8rem;
|
|
45
|
+
background: linear-gradient(rgba(0, 0, 0, 0.5), transparent);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.fs-heading {
|
|
50
|
+
max-width: 60%;
|
|
51
|
+
margin: 0;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
font-size: 2rem;
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
line-height: 2.8rem;
|
|
56
|
+
text-overflow: ellipsis;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.fs-actions {
|
|
61
|
+
position: absolute;
|
|
62
|
+
right: 1.2rem;
|
|
63
|
+
bottom: 8rem;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
padding: 0.4rem;
|
|
67
|
+
border-radius: 2.8rem;
|
|
68
|
+
background: rgba(0, 0, 0, 0.3);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.fs-action {
|
|
72
|
+
display: grid;
|
|
73
|
+
place-items: center;
|
|
74
|
+
width: 4.8rem;
|
|
75
|
+
height: 3.2rem;
|
|
76
|
+
padding: 0;
|
|
77
|
+
border: none;
|
|
78
|
+
border-radius: 1.6rem;
|
|
79
|
+
background: transparent;
|
|
80
|
+
color: inherit;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.fs-action.fs-like {
|
|
85
|
+
width: 3.2rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.fs-action:hover {
|
|
89
|
+
background: rgba(255, 255, 255, 0.1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fs-action:disabled {
|
|
93
|
+
cursor: default;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.fs-more {
|
|
97
|
+
position: absolute;
|
|
98
|
+
left: 50%;
|
|
99
|
+
bottom: 0.8rem;
|
|
100
|
+
margin-left: -2rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.fs-sheet {
|
|
104
|
+
position: absolute;
|
|
105
|
+
inset: 0;
|
|
106
|
+
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.75) 31.5%, rgba(0, 0, 0, 0.85));
|
|
107
|
+
animation: grid-in 0.2s ease;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@keyframes grid-in {
|
|
111
|
+
from {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
transform: translateY(4rem);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.fs-hide {
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: calc(31.5% - 6rem);
|
|
120
|
+
left: 50%;
|
|
121
|
+
margin-left: -2rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.fs-scroll {
|
|
125
|
+
position: absolute;
|
|
126
|
+
top: 31.5%;
|
|
127
|
+
left: 0;
|
|
128
|
+
right: 0;
|
|
129
|
+
bottom: 0;
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
overscroll-behavior: contain;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.fs-list {
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
137
|
+
gap: 1.6rem;
|
|
138
|
+
margin: 0;
|
|
139
|
+
padding: 0 2.4rem 2.4rem;
|
|
140
|
+
list-style: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.fs-card {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
color: inherit;
|
|
147
|
+
text-decoration: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.fs-thumb {
|
|
151
|
+
position: relative;
|
|
152
|
+
aspect-ratio: 16 / 9;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
border-radius: 0.8rem;
|
|
155
|
+
background: rgba(255, 255, 255, 0.1);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.fs-thumb img {
|
|
159
|
+
display: block;
|
|
160
|
+
width: 100%;
|
|
161
|
+
height: 100%;
|
|
162
|
+
object-fit: cover;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.fs-duration {
|
|
166
|
+
position: absolute;
|
|
167
|
+
right: 0.4rem;
|
|
168
|
+
bottom: 0.4rem;
|
|
169
|
+
padding: 0 0.4rem;
|
|
170
|
+
border-radius: 0.4rem;
|
|
171
|
+
background: var(--bg-badge);
|
|
172
|
+
font-size: 1.2rem;
|
|
173
|
+
font-weight: 500;
|
|
174
|
+
line-height: 1.8rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.fs-title {
|
|
178
|
+
display: -webkit-box;
|
|
179
|
+
margin: 1.2rem 0 0.4rem;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
font-size: 1.6rem;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
line-height: 2rem;
|
|
184
|
+
-webkit-line-clamp: 2;
|
|
185
|
+
-webkit-box-orient: vertical;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.fs-byline {
|
|
189
|
+
font-size: 1.4rem;
|
|
190
|
+
line-height: 2rem;
|
|
191
|
+
color: rgba(255, 255, 255, 0.7);
|
|
192
|
+
}
|
|
193
|
+
`,j=({shown:o,settings:c})=>{let{details:d,grid:y,setGrid:x,aside:S,setAside:j}=_(),M=l(null),N=l(null),[P,F]=s(!1),{rate:I,rating:L,presses:R,burst:z}=T(d.videoId,d.likeStatus),B=l({grid:y,setGrid:x,sharing:P});B.current={grid:y,setGrid:x,sharing:P},n(()=>{let e=M.current?.parentElement;if(!e)return;let t=0,n=e=>{if(e.target.closest(`[role="dialog"], [role="menu"]`))return;let{grid:n,setGrid:r}=B.current,i=e.deltaY>0;n&&(i||(N.current?.scrollTop??0)>0)||(e.preventDefault(),i!==n&&(t=Math.sign(t)===Math.sign(e.deltaY)?t+e.deltaY:e.deltaY,!(Math.abs(t)<O)&&(t=0,r(!n))))};return e.addEventListener(`wheel`,n,{passive:!1}),()=>e.removeEventListener(`wheel`,n)},[]),n(()=>{let e=e=>{e.key!==`v`||e.defaultPrevented||e.ctrlKey||e.metaKey||e.altKey||p(e.target)||B.current.sharing||document.fullscreenElement?.querySelector(`[role="dialog"]`)||(e.preventDefault(),B.current.setGrid(!B.current.grid))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let V=d.likeStatus===`LIKE`,H=d.likeStatus===`DISLIKE`;return u(`div`,{css:A,ref:M,className:[o&&!y&&`fs-shown`,c&&`fs-settings`].filter(Boolean).join(` `)||void 0,children:[f(`div`,{className:`fs-top`,children:d.title?f(`h2`,{className:`fs-heading`,children:d.title}):void 0}),u(`div`,{className:`fs-actions`,children:[f(`button`,{type:`button`,className:`fs-action fs-like`,"aria-label":`Like`,"aria-pressed":V,disabled:L,onClick:()=>I(`LIKE`),children:f(w,{status:`LIKE`,size:20,on:V,presses:R(`LIKE`),burst:z(`LIKE`)})}),f(`button`,{type:`button`,className:`fs-action`,"aria-label":`Dislike`,"aria-pressed":H,disabled:L,onClick:()=>I(`DISLIKE`),children:f(w,{status:`DISLIKE`,size:20,on:H,presses:R(`DISLIKE`),burst:z(`DISLIKE`)})}),d.commentsHidden?void 0:f(`button`,{type:`button`,className:`fs-action`,"aria-label":`Comments`,"aria-pressed":S===`comments`,onClick:()=>j(S===`comments`?void 0:`comments`),children:f(e,{size:20,strokeWidth:1.5})}),f(`button`,{type:`button`,className:`fs-action`,"aria-label":`Share`,onClick:()=>F(!0),children:f(a,{size:20,strokeWidth:1.5})}),f(C,{videoId:d.videoId,trigger:f(`button`,{type:`button`,className:`fs-action`,"aria-label":`Save`,children:f(t,{size:20,strokeWidth:1.5})})})]}),f(`button`,{type:`button`,css:k,className:`fs-more`,"aria-label":`More videos`,onClick:()=>x(!0),children:f(i,{size:24,strokeWidth:2})}),y?u(`div`,{className:`fs-sheet`,children:[f(`button`,{type:`button`,css:k,className:`fs-hide`,"aria-label":`Hide videos`,onClick:()=>x(!1),children:f(r,{size:24,strokeWidth:2})}),f(`div`,{className:`fs-scroll`,ref:N,children:f(`ul`,{className:`fs-list`,"aria-label":`More videos`,children:d.videos.slice(0,D).map(e=>{let t=e.isLive?`LIVE`:b(e.durationSeconds),n=m(e.viewCount,e.publishedText);return f(`li`,{children:u(`a`,{className:`fs-card`,href:h(e),onClick:g(e,d.onOpen),children:[u(`span`,{className:`fs-thumb`,children:[e.thumbnail?f(v,{src:e.thumbnail,srcSet:e.thumbnailSrcset,sizes:`33vw`}):void 0,t?f(`span`,{className:`fs-duration`,children:t}):void 0]}),f(`span`,{className:`fs-title`,children:e.title}),e.channel?f(`span`,{className:`fs-byline`,children:e.channel.name}):void 0,n?f(`span`,{className:`fs-byline`,children:n}):void 0]})},e.id)})})})]}):void 0,P?f(E,{videoId:d.videoId,title:d.title,list:d.list,onClose:()=>F(!1)}):void 0]})},M=d`
|
|
194
|
+
position: relative;
|
|
195
|
+
height: 100%;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
border-radius: 1.2rem;
|
|
198
|
+
background: var(--bg-menu);
|
|
199
|
+
color: var(--text-primary);
|
|
200
|
+
|
|
201
|
+
.fs-close {
|
|
202
|
+
position: absolute;
|
|
203
|
+
top: 1.2rem;
|
|
204
|
+
right: 0.8rem;
|
|
205
|
+
z-index: 1;
|
|
206
|
+
display: grid;
|
|
207
|
+
place-items: center;
|
|
208
|
+
width: 4rem;
|
|
209
|
+
height: 4rem;
|
|
210
|
+
padding: 0;
|
|
211
|
+
border: none;
|
|
212
|
+
border-radius: 50%;
|
|
213
|
+
background: transparent;
|
|
214
|
+
color: inherit;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.fs-close:hover {
|
|
219
|
+
background: var(--bg-hover);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.fs-body {
|
|
223
|
+
height: 100%;
|
|
224
|
+
overflow-y: auto;
|
|
225
|
+
overscroll-behavior: contain;
|
|
226
|
+
padding: 1.2rem 1.6rem 1.6rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.fs-body > section {
|
|
230
|
+
margin-top: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* youtube.com heads its description panel with the video's title, beside the close button */
|
|
234
|
+
.fs-description-title {
|
|
235
|
+
margin: 0;
|
|
236
|
+
padding: 0.4rem 4rem 0 0;
|
|
237
|
+
font-size: 2rem;
|
|
238
|
+
font-weight: 700;
|
|
239
|
+
line-height: 2.8rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* youtube.com's 320 px panel heads the list with the title, then a sort icon beside the close button */
|
|
243
|
+
.heading-row {
|
|
244
|
+
gap: 0.8rem;
|
|
245
|
+
margin-bottom: 1.6rem;
|
|
246
|
+
padding-right: 4rem;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.sort {
|
|
250
|
+
justify-content: center;
|
|
251
|
+
width: 4rem;
|
|
252
|
+
height: 4rem;
|
|
253
|
+
margin-left: auto;
|
|
254
|
+
border-radius: 50%;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.sort:hover {
|
|
258
|
+
background: var(--bg-hover);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.sort-label {
|
|
262
|
+
position: absolute;
|
|
263
|
+
width: 1px;
|
|
264
|
+
height: 1px;
|
|
265
|
+
overflow: hidden;
|
|
266
|
+
clip-path: inset(50%);
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
}
|
|
269
|
+
`,N=({videoId:e,commentCountText:t,onClose:n})=>u(`aside`,{css:M,"aria-label":`Comments`,children:[f(`button`,{type:`button`,className:`fs-close`,"aria-label":`Close comments`,onClick:n,children:f(o,{size:24,strokeWidth:1.5})}),f(`div`,{className:`fs-body`,children:f(x,{videoId:e,commentCountText:t})})]}),P=({details:e,onClose:t})=>u(`aside`,{css:M,"aria-label":`Description`,children:[f(`button`,{type:`button`,className:`fs-close`,"aria-label":`Close description`,onClick:t,children:f(o,{size:24,strokeWidth:1.5})}),u(`div`,{className:`fs-body`,children:[e.title?f(`h2`,{className:`fs-description-title`,children:e.title}):void 0,f(S,{...e.description,videoId:e.videoId,chapters:e.chapters,currentChapter:e.chapter,onViewChapters:()=>y(`chapters`),onShowTranscript:e.transcript?()=>y(`transcript`):void 0,open:!0})]})]});export{N as CommentsPanel,P as DescriptionPanel,j as FullscreenView};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import{At as e,I as t,ht as n,in as r,on as i,sn as a}from"./icons-DKsqNLSs.js";import{D as o,c as s,g as c,ot as l,s as u,y as d}from"./sign-in-Bx3zmj-m.js";import{A as f,En as p,bn as m,vn as h}from"./cards-Csel8naI.js";import{F as g,M as _,N as v,P as y,R as b,i as x,j as S,n as C}from"../index-Bj-Q3X8Q.js";a();var w=e=>(e.publishedAt?Date.parse(e.publishedAt):NaN)||0,T=e=>Number(e.viewCount)||0,E=(e,t)=>{let n=new Map;for(let t of e)for(let e of t)n.has(e.id)||n.set(e.id,e);let r=(e,t)=>w(t)-w(e);return[...n.values()].sort(t===`popular`?(e,t)=>T(t)-T(e)||r(e,t):r)},D=c(`
|
|
2
|
+
query ChannelUploads($channelId: ID!) {
|
|
3
|
+
channelUploads(channelId: $channelId) {
|
|
4
|
+
id
|
|
5
|
+
title
|
|
6
|
+
thumbnail
|
|
7
|
+
durationSeconds
|
|
8
|
+
viewCount
|
|
9
|
+
publishedAt
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`),O=60,k=3,A=[{value:`latest`,label:`Latest`},{value:`popular`,label:`Popular`}],j=l`
|
|
13
|
+
padding: 2.4rem 1.6rem;
|
|
14
|
+
|
|
15
|
+
.crumbs {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 0.4rem;
|
|
20
|
+
margin-bottom: 1.2rem;
|
|
21
|
+
font-size: 1.3rem;
|
|
22
|
+
color: var(--text-secondary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.crumb-segment {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.4rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crumb {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 0.4rem;
|
|
35
|
+
padding: 0.2rem 0.6rem;
|
|
36
|
+
border-radius: 0.6rem;
|
|
37
|
+
color: var(--text-secondary);
|
|
38
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.crumb:hover {
|
|
42
|
+
background: var(--bg-hover);
|
|
43
|
+
color: var(--text-primary);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.top {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 1.6rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.actions {
|
|
53
|
+
flex: none;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 0.8rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.subgroups {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 0.8rem;
|
|
64
|
+
margin-top: 1.6rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.subgroup {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.6rem;
|
|
71
|
+
height: 3.4rem;
|
|
72
|
+
padding: 0 1.2rem;
|
|
73
|
+
border-radius: 1.7rem;
|
|
74
|
+
background: var(--bg-chip);
|
|
75
|
+
color: var(--text-primary);
|
|
76
|
+
font-size: 1.4rem;
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
transition: background 0.15s ease;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.subgroup:hover {
|
|
82
|
+
background: var(--bg-chip-hover);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.subgroup-count {
|
|
86
|
+
font-size: 1.2rem;
|
|
87
|
+
font-weight: 400;
|
|
88
|
+
color: var(--text-secondary);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.icon {
|
|
92
|
+
flex: none;
|
|
93
|
+
width: 6.4rem;
|
|
94
|
+
height: 6.4rem;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
background: var(--bg-chip);
|
|
100
|
+
font-size: 3.2rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.info {
|
|
104
|
+
flex: 1;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.name {
|
|
109
|
+
margin: 0;
|
|
110
|
+
font-size: 2.8rem;
|
|
111
|
+
font-weight: 700;
|
|
112
|
+
line-height: 3.6rem;
|
|
113
|
+
color: var(--text-primary);
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
text-overflow: ellipsis;
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.meta {
|
|
120
|
+
margin-top: 0.4rem;
|
|
121
|
+
font-size: 1.4rem;
|
|
122
|
+
color: var(--text-secondary);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.edit {
|
|
126
|
+
flex: none;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: 0.6rem;
|
|
130
|
+
height: 3.6rem;
|
|
131
|
+
padding: 0 1.6rem;
|
|
132
|
+
border: none;
|
|
133
|
+
border-radius: 1.8rem;
|
|
134
|
+
background: var(--bg-chip);
|
|
135
|
+
color: var(--text-primary);
|
|
136
|
+
font-size: 1.4rem;
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
transition: background 0.15s ease;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.edit:hover {
|
|
143
|
+
background: var(--bg-chip-hover);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sorts {
|
|
147
|
+
display: flex;
|
|
148
|
+
gap: 0.8rem;
|
|
149
|
+
margin: 2.4rem 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.sort {
|
|
153
|
+
height: 3.2rem;
|
|
154
|
+
padding: 0 1.2rem;
|
|
155
|
+
border: none;
|
|
156
|
+
border-radius: 0.8rem;
|
|
157
|
+
background: var(--bg-chip);
|
|
158
|
+
color: var(--text-primary);
|
|
159
|
+
font-size: 1.4rem;
|
|
160
|
+
font-weight: 500;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
transition: background 0.15s ease;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.sort:hover {
|
|
166
|
+
background: var(--bg-chip-hover);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.sort.active {
|
|
170
|
+
background: var(--bg-inverse);
|
|
171
|
+
color: var(--text-inverse);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.notice {
|
|
175
|
+
margin: 0 0 2.4rem;
|
|
176
|
+
font-size: 1.4rem;
|
|
177
|
+
color: var(--text-secondary);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.not-found {
|
|
181
|
+
color: var(--text-secondary);
|
|
182
|
+
}
|
|
183
|
+
`,M=e=>{let t=o(),[n,a]=i({}),s=e.join(`,`);return r(()=>{let n=e.map(e=>t.query(D,{channelId:e},{requestPolicy:`cache-and-network`}).subscribe(t=>{let n=t.data?.channelUploads;(n||t.error)&&a(t=>({...t,[e]:n?{uploads:n}:{failed:!0}}))}));return()=>{for(let e of n)e.unsubscribe()}},[t,s]),n},N=e=>{let t=e.slice(0,k).join(`, `),n=e.length-k;return`Could not load ${t}${n>0?` and ${n} more`:``}`},P=({params:r})=>{let a=b(),o=a.find(e=>e.id===p(r.id));C(o?.name??`Group`);let[c,l]=i(`latest`),[w,T]=i(O),[D,k]=i(!1),[P,F]=i(!1),I=o?v(a,o.id):[],L=o?_(a,o.id):[],R=o?y(a,o.id):[],z=M(R.map(e=>e.id));if(!o)return u(`main`,{css:j,children:u(`p`,{className:`not-found`,children:`Group not found`})});let B=E(R.map(e=>{let t=z[e.id];return!t||`failed`in t?[]:t.uploads.map(t=>({...t,publishedText:h(t.publishedAt),channel:e}))}),c),V=R.filter(e=>!z[e.id]).length,H=R.filter(e=>{let t=z[e.id];return t!==void 0&&`failed`in t}),U=L.length>0?`${m(R.length,`channel`)} • ${m(L.length,`subfolder`)}`:m(R.length,`channel`);return s(`main`,{css:j,children:[I.length>0?s(`nav`,{className:`crumbs`,"aria-label":`Parent folders`,children:[u(d,{href:`/feed/groups`,className:`crumb`,children:`Groups`}),I.map(t=>s(`span`,{className:`crumb-segment`,children:[u(e,{size:14,strokeWidth:1.5,"aria-hidden":`true`}),s(d,{href:g(t.id),className:`crumb`,children:[u(`span`,{"aria-hidden":`true`,children:t.emoji}),t.name]})]},t.id))]}):void 0,s(`div`,{className:`top`,children:[u(`span`,{className:`icon`,"aria-hidden":`true`,children:o.emoji}),s(`div`,{className:`info`,children:[u(`h1`,{className:`name`,children:o.name}),u(`div`,{className:`meta`,children:U})]}),s(`div`,{className:`actions`,children:[s(`button`,{type:`button`,className:`edit`,onClick:()=>F(!0),children:[u(n,{size:18,strokeWidth:1.5}),`New subfolder`]}),s(`button`,{type:`button`,className:`edit`,onClick:()=>k(!0),children:[u(t,{size:18,strokeWidth:1.5}),`Edit`]})]})]}),L.length>0?u(`div`,{className:`subgroups`,"aria-label":`Subfolders`,children:L.map(e=>{let t=y(a,e.id).length;return s(d,{href:g(e.id),className:`subgroup`,children:[u(`span`,{"aria-hidden":`true`,children:e.emoji}),u(`span`,{children:e.name}),u(`span`,{className:`subgroup-count`,children:t})]},e.id)})}):void 0,u(`div`,{className:`sorts`,role:`group`,"aria-label":`Sort by`,children:A.map(e=>u(`button`,{type:`button`,className:e.value===c?`sort active`:`sort`,"aria-pressed":e.value===c,onClick:()=>l(e.value),children:e.label},e.value))}),H.length>0?u(`p`,{className:`notice`,children:N(H.map(e=>e.name))}):void 0,R.length===0?u(`p`,{className:`notice`,children:L.length>0?`No channels in this group or its subfolders`:`No channels in this group`}):void 0,u(x,{videos:B.slice(0,w),fetching:V>0&&B.length<=w}),u(f,{onVisible:()=>T(e=>e+O),disabled:B.length<=w}),D?u(S,{group:o,onClose:()=>k(!1)}):void 0,P?u(S,{parentId:o.id,onClose:()=>F(!1)}):void 0]})};export{P as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{gt as e,ht as t,j as n,on as r,sn as i}from"./icons-DKsqNLSs.js";import{a,c as o,o as s,ot as c,s as l}from"./sign-in-Bx3zmj-m.js";import{$ as u,et as d,nt as f}from"./cards-Csel8naI.js";import{I as p,L as m,R as h,j as g}from"../index-Bj-Q3X8Q.js";i();var _=c`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 0.6rem;
|
|
5
|
+
height: 3.6rem;
|
|
6
|
+
padding: 0 1.6rem;
|
|
7
|
+
border: none;
|
|
8
|
+
border-radius: 1.8rem;
|
|
9
|
+
background: var(--bg-chip);
|
|
10
|
+
color: var(--text-primary);
|
|
11
|
+
font-size: 1.4rem;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: background 0.15s ease;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
background: var(--bg-chip-hover);
|
|
18
|
+
}
|
|
19
|
+
`,v=c`
|
|
20
|
+
min-width: 24rem;
|
|
21
|
+
|
|
22
|
+
.emoji {
|
|
23
|
+
margin-right: 0.8rem;
|
|
24
|
+
}
|
|
25
|
+
`,y=(e,t)=>e.channels.some(e=>e.id===t),b=({channel:i})=>{let c=h(),[b,x]=r(!1),S=c.some(e=>y(e,i.id))?e:t,C=e=>{let t=!y(e,i.id);p.setChannel(e.id,i,t),a(t?`Added to ${e.name}`:`Removed from ${e.name}`)};return o(s,{children:[l(u,{label:`Groups`,align:`start`,trigger:o(`button`,{type:`button`,css:_,children:[l(S,{size:18,strokeWidth:1.5}),`Groups`]}),children:o(`div`,{css:v,role:`presentation`,children:[m(c).map(({group:e,depth:t})=>l(d,{label:o(`span`,{style:t>0?{paddingLeft:`${Math.min(t,4)*1.4}rem`}:void 0,children:[l(`span`,{className:`emoji`,"aria-hidden":`true`,children:e.emoji}),e.name]}),ariaLabel:e.name,checked:y(e,i.id),onSelect:()=>C(e)},e.id)),c.length>0?l(f,{}):void 0,l(d,{icon:n,label:`New group`,onSelect:()=>x(!0)})]})}),b?l(g,{channels:[i],onClose:()=>x(!1),onSaved:e=>a(`Added to ${e.name}`)}):void 0]})};export{b as t};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import{on as e,sn as t,tn as n}from"./icons-DKsqNLSs.js";import{c as r,g as i,k as a,ot as o,s,y as c}from"./sign-in-Bx3zmj-m.js";import{A as l,Y as u,j as d,ln as f}from"./cards-Csel8naI.js";import{i as p,n as m}from"../index-Bj-Q3X8Q.js";import{t as h}from"./shorts-grid-Bgbkl5dP.js";t();var g=i(`
|
|
2
|
+
query HashtagPage($tag: String!, $tab: HashtagTab, $cursor: String) {
|
|
3
|
+
hashtag(tag: $tag, tab: $tab, cursor: $cursor) {
|
|
4
|
+
tag
|
|
5
|
+
title
|
|
6
|
+
stats
|
|
7
|
+
tab
|
|
8
|
+
availableTabs
|
|
9
|
+
items {
|
|
10
|
+
id
|
|
11
|
+
title
|
|
12
|
+
inlinePlayerParams
|
|
13
|
+
thumbnail
|
|
14
|
+
thumbnailSrcset
|
|
15
|
+
animatedThumbnail
|
|
16
|
+
thumbnailBadge
|
|
17
|
+
durationSeconds
|
|
18
|
+
isMusic
|
|
19
|
+
viewCount
|
|
20
|
+
viewCountIcon
|
|
21
|
+
publishedText
|
|
22
|
+
metaDelimiter
|
|
23
|
+
isLive
|
|
24
|
+
isShort
|
|
25
|
+
shortsSequence
|
|
26
|
+
isUpcoming
|
|
27
|
+
isMembersOnly
|
|
28
|
+
badges
|
|
29
|
+
channel { id name avatar isVerified isVerifiedArtist }
|
|
30
|
+
byline { text isVerified isVerifiedArtist }
|
|
31
|
+
collaborators { id name avatar handle subscriberCountText isVerified isVerifiedArtist }
|
|
32
|
+
}
|
|
33
|
+
cursor
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`),_=o`
|
|
37
|
+
width: max(min(100% - 3.2rem, 64.2rem), min(128.4rem, round(down, 100% - 4.8rem, 21.4rem)));
|
|
38
|
+
margin: 0 auto;
|
|
39
|
+
padding: 2.4rem 0;
|
|
40
|
+
|
|
41
|
+
.header {
|
|
42
|
+
margin-bottom: 1.6rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.name {
|
|
46
|
+
margin: 0;
|
|
47
|
+
font-size: 3.6rem;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
line-height: 5rem;
|
|
50
|
+
color: var(--text-primary);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.stats {
|
|
54
|
+
margin: 0.4rem 0 0;
|
|
55
|
+
font-size: 1.4rem;
|
|
56
|
+
line-height: 2rem;
|
|
57
|
+
color: var(--text-secondary);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tabs {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 2.4rem;
|
|
64
|
+
min-height: 4.8rem;
|
|
65
|
+
margin-top: 1.6rem;
|
|
66
|
+
overflow-x: auto;
|
|
67
|
+
scrollbar-width: none;
|
|
68
|
+
box-shadow: inset 0 -1px var(--border-subtle);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tabs::-webkit-scrollbar {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tab {
|
|
76
|
+
flex: none;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
height: 4.8rem;
|
|
80
|
+
padding: 0;
|
|
81
|
+
border: none;
|
|
82
|
+
border-bottom: 0.25rem solid transparent;
|
|
83
|
+
background: transparent;
|
|
84
|
+
color: var(--text-secondary);
|
|
85
|
+
font-size: 1.5rem;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
transition: color 0.15s ease;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.tab:hover {
|
|
92
|
+
color: var(--text-primary);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.tab.active {
|
|
96
|
+
color: var(--text-primary);
|
|
97
|
+
border-bottom-color: var(--text-primary);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.videos {
|
|
101
|
+
margin-top: 2.4rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.status {
|
|
105
|
+
margin-top: 2.4rem;
|
|
106
|
+
color: var(--text-secondary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 768px) {
|
|
110
|
+
.name {
|
|
111
|
+
font-size: 2.4rem;
|
|
112
|
+
line-height: 3.2rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`,v=({tag:t,tab:i=`ALL`})=>{let o=`${t.toLowerCase()}|${i}`,[v,y]=e({key:o,pages:[]}),b=v.key===o?v.pages:[],[{data:x,error:S,fetching:C},w]=a({query:g,variables:{tag:t,tab:i,cursor:b[b.length-1]?.cursor}}),T=n(void 0);x&&(T.current={key:o,data:x});let E=x??(b.length>0&&T.current?.key===o?T.current.data:void 0),D=E?.hashtag,{items:O,cursor:k}=d({pages:D?[...b,D]:b,key:e=>e.id}),A=f(`hideShorts`),j=i===`ALL`&&A?O.filter(e=>!e.isShort):O,M=D?.title??`#${t.toLowerCase()}`;m(M);let N=D?.availableTabs??(i===`SHORTS`?[`ALL`,`SHORTS`]:[`ALL`]),P=!A&&N.includes(`SHORTS`),F=`/hashtag/${encodeURIComponent(D?.tag||t.toLowerCase())}`;return r(`main`,{css:_,children:[r(`header`,{className:`header`,children:[s(`h1`,{className:`name`,children:M}),D?.stats?s(`p`,{className:`stats`,children:D.stats}):void 0]}),P?r(`nav`,{className:`tabs`,"aria-label":`Hashtag sections`,children:[s(c,{href:F,className:i===`ALL`?`tab active`:`tab`,"aria-current":i===`ALL`?`page`:void 0,children:`All`}),s(c,{href:`${F}/shorts`,className:i===`SHORTS`?`tab active`:`tab`,"aria-current":i===`SHORTS`?`page`:void 0,children:`Shorts`})]}):void 0,S&&!C&&b.length===0?s(u,{error:S,reexecute:w}):void 0,r(`div`,{className:`videos`,children:[i===`SHORTS`?s(h,{shorts:j,fetching:C&&!S}):j.length>0||C&&!S?s(p,{videos:j,fetching:C&&!S&&j.length===0,variant:`channel`}):void 0,E&&!C&&!S&&j.length===0?s(`p`,{className:`status`,children:i===`SHORTS`?`No Shorts for this hashtag.`:`No videos for this hashtag.`}):void 0]}),C&&j.length>0?s(`p`,{className:`status`,children:`Loading more…`}):void 0,S&&!C&&b.length>0?s(u,{error:S,reexecute:w}):void 0,s(l,{onVisible:()=>{!D?.cursor||C||S||y({key:o,pages:b[b.length-1]===D?b:[...b,D]})},disabled:C||!!S||!k})]})};export{v as HashtagPage,v as default};
|