@xhub-short/ui 0.1.0-beta.9 → 1.0.0-beta.18
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/CommentSheet.css-DuBy01rU.d.ts +219 -0
- package/dist/VideoSlotPlayIndicator-DPs8Xt5C.d.ts +51 -0
- package/dist/chunk-3OB3OVYR.js +349 -0
- package/dist/chunk-4RIMQOBR.js +58 -0
- package/dist/chunk-5MKYDI4X.js +1 -0
- package/dist/chunk-5Y43HNRG.js +296 -0
- package/dist/chunk-7WXAQHJI.js +350 -0
- package/dist/chunk-BADA7OLG.js +564 -0
- package/dist/chunk-BEJAJFV6.js +191 -0
- package/dist/chunk-BNI7CYRI.js +334 -0
- package/dist/{chunk-RMLTPW5S.js → chunk-CAWE42LH.js} +4 -3
- package/dist/chunk-DGKMO3AE.js +717 -0
- package/dist/chunk-DR7KR7OT.js +103 -0
- package/dist/chunk-GSNIZ6DF.js +605 -0
- package/dist/chunk-HXQPEZRG.js +105 -0
- package/dist/{chunk-FNXTPQ6L.js → chunk-IC2KUU4V.js} +31 -1340
- package/dist/chunk-IWSBYOSS.js +91 -0
- package/dist/chunk-MFJS65C5.js +368 -0
- package/dist/{chunk-AC2IFAJR.js → chunk-NJXIYSDZ.js} +12 -1
- package/dist/{chunk-CL6BS7GB.js → chunk-OM4L7RE5.js} +12 -2
- package/dist/chunk-QCRRF76W.js +75 -0
- package/dist/chunk-QUEJHA24.js +508 -0
- package/dist/chunk-UYBQTE4M.js +337 -0
- package/dist/chunk-VJ744W5N.js +603 -0
- package/dist/chunk-VXW7AOGM.js +285 -0
- package/dist/{chunk-AQHD6LPS.js → chunk-YB7AXTX7.js} +1 -1
- package/dist/components/ActionBar/index.d.ts +7 -2
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/AdvanceMenu/index.d.ts +80 -0
- package/dist/components/AdvanceMenu/index.js +1 -0
- package/dist/components/ArticleSlot/index.d.ts +213 -0
- package/dist/components/ArticleSlot/index.js +1 -0
- package/dist/components/AuthorInfo/index.js +1 -1
- package/dist/components/BottomSheet/index.d.ts +87 -0
- package/dist/components/BottomSheet/index.js +1 -0
- package/dist/components/CleanModeOverlay/index.d.ts +60 -0
- package/dist/components/CleanModeOverlay/index.js +1 -0
- package/dist/components/CommentSheet/index.d.ts +1 -1
- package/dist/components/CommentSheet/index.js +1 -1
- package/dist/components/DetailView/index.d.ts +314 -0
- package/dist/components/DetailView/index.js +1 -0
- package/dist/components/ErrorBoundary/index.js +1 -1
- package/dist/components/{VideoFeed → Feed}/index.d.ts +64 -45
- package/dist/components/Feed/index.js +1 -0
- package/dist/components/ImageCarousel/index.d.ts +50 -0
- package/dist/components/ImageCarousel/index.js +1 -0
- package/dist/components/Playlist/index.d.ts +117 -0
- package/dist/components/Playlist/index.js +1 -0
- package/dist/components/ProgressBar/index.js +1 -1
- package/dist/components/QualityPicker/index.d.ts +35 -0
- package/dist/components/QualityPicker/index.js +1 -0
- package/dist/components/ReportSheet/index.d.ts +74 -0
- package/dist/components/ReportSheet/index.js +1 -0
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/SpeedPicker/index.d.ts +32 -0
- package/dist/components/SpeedPicker/index.js +1 -0
- package/dist/components/VideoInfo/index.d.ts +7 -3
- package/dist/components/VideoInfo/index.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/components/VideoSlot/index.d.ts +31 -68
- package/dist/components/VideoSlot/index.js +2 -1
- package/dist/components/VirtualSlider/index.js +1 -1
- package/dist/index.d.ts +40 -10
- package/dist/index.js +23 -13
- package/package.json +8 -4
- package/dist/CommentSheet.css-BeCrEaUG.d.ts +0 -221
- package/dist/chunk-2FSDVYER.js +0 -737
- package/dist/chunk-ECR42RKK.js +0 -571
- package/dist/chunk-KWHMZ6H5.js +0 -562
- package/dist/chunk-SZXFH334.js +0 -204
- package/dist/chunk-UNV3NWN6.js +0 -148
- package/dist/chunk-WCRDTBCZ.js +0 -357
- package/dist/chunk-XDIH66C4.js +0 -1519
- package/dist/components/VideoFeed/index.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useBottomSheetContext, BottomSheetHeadless } from './chunk-UYBQTE4M.js';
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import { createContext, memo, useState, useRef, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
3
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
// src/components/CommentSheet/CommentSheetHeadless.tsx
|
|
6
6
|
var CommentSheetContext = createContext(void 0);
|
|
7
7
|
function useCommentSheetContext() {
|
|
8
8
|
const context = useContext(CommentSheetContext);
|
|
@@ -1065,1100 +1065,7 @@ var CommentList = memo(function CommentList2({
|
|
|
1065
1065
|
CommentList.displayName = "CommentList";
|
|
1066
1066
|
|
|
1067
1067
|
// src/components/CommentSheet/CommentSheet.css.ts
|
|
1068
|
-
var COMMENT_SHEET_CSS = `
|
|
1069
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1070
|
-
CSS VARIABLES (Light Theme)
|
|
1071
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1072
|
-
|
|
1073
|
-
:root {
|
|
1074
|
-
/* Primary colors */
|
|
1075
|
-
--sv-comment-primary: #164d8e;
|
|
1076
|
-
--sv-comment-primary-light: #1354ae;
|
|
1077
|
-
--sv-comment-primary-dark: #003477;
|
|
1078
|
-
|
|
1079
|
-
/* Contrast colors */
|
|
1080
|
-
--sv-comment-bg: #ffffff;
|
|
1081
|
-
--sv-comment-text: #121212;
|
|
1082
|
-
--sv-comment-text-secondary: #6b7271;
|
|
1083
|
-
--sv-comment-border: rgba(18, 18, 18, 0.08);
|
|
1084
|
-
|
|
1085
|
-
/* Accent colors */
|
|
1086
|
-
--sv-comment-like-color: #ff434e;
|
|
1087
|
-
--sv-comment-verified-color: #1ea031;
|
|
1088
|
-
--sv-comment-mention-color: #164d8e;
|
|
1089
|
-
|
|
1090
|
-
/* Component specific */
|
|
1091
|
-
--sv-comment-avatar-bg: #e5e6e6;
|
|
1092
|
-
--sv-comment-input-border: #a3a3a3;
|
|
1093
|
-
--sv-comment-reply-line: #e5e6e6;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1097
|
-
BACKDROP & CONTAINER
|
|
1098
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1099
|
-
|
|
1100
|
-
.sv-comment-sheet-backdrop {
|
|
1101
|
-
position: fixed;
|
|
1102
|
-
inset: 0;
|
|
1103
|
-
background: var(--sv-comment-backdrop-bg, rgba(0, 0, 0, 0.5));
|
|
1104
|
-
z-index: var(--sv-comment-sheet-z-index, 1000);
|
|
1105
|
-
opacity: 0;
|
|
1106
|
-
visibility: hidden;
|
|
1107
|
-
pointer-events: none;
|
|
1108
|
-
transition: opacity var(--sv-comment-animation-duration, 400ms) ease,
|
|
1109
|
-
visibility 0s linear var(--sv-comment-animation-duration, 400ms);
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
.sv-comment-sheet-backdrop--open {
|
|
1113
|
-
opacity: 1;
|
|
1114
|
-
visibility: visible;
|
|
1115
|
-
pointer-events: auto;
|
|
1116
|
-
transition: opacity var(--sv-comment-animation-duration, 400ms) ease,
|
|
1117
|
-
visibility 0s linear 0s;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
/* Keyframes for slide animations */
|
|
1121
|
-
@keyframes sv-sheet-slide-up {
|
|
1122
|
-
from { transform: translateY(100%); }
|
|
1123
|
-
to { transform: translateY(0); }
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
@keyframes sv-sheet-slide-down {
|
|
1127
|
-
from { transform: translateY(0); }
|
|
1128
|
-
to { transform: translateY(100%); }
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
.sv-comment-sheet {
|
|
1132
|
-
position: fixed;
|
|
1133
|
-
margin: 16px;
|
|
1134
|
-
left: 0;
|
|
1135
|
-
right: 0;
|
|
1136
|
-
bottom: 0;
|
|
1137
|
-
background: var(--sv-comment-bg, #ffffff);
|
|
1138
|
-
border-radius: var(--sv-comment-sheet-radius, 24px);
|
|
1139
|
-
z-index: var(--sv-comment-sheet-z-index, 1001);
|
|
1140
|
-
display: flex;
|
|
1141
|
-
flex-direction: column;
|
|
1142
|
-
max-height: var(--sv-comment-sheet-height, 55vh);
|
|
1143
|
-
transform: translateY(100%);
|
|
1144
|
-
overflow: hidden;
|
|
1145
|
-
touch-action: pan-y;
|
|
1146
|
-
isolation: isolate;
|
|
1147
|
-
pointer-events: none;
|
|
1148
|
-
will-change: transform;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
.sv-comment-sheet--open {
|
|
1152
|
-
transform: translateY(0);
|
|
1153
|
-
pointer-events: auto;
|
|
1154
|
-
animation: sv-sheet-slide-up var(--sv-comment-animation-duration, 400ms)
|
|
1155
|
-
var(--sv-comment-animation-easing, cubic-bezier(0.32, 0.72, 0, 1)) forwards;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
.sv-comment-sheet--open.sv-comment-sheet--closing {
|
|
1159
|
-
pointer-events: none;
|
|
1160
|
-
animation: sv-sheet-slide-down var(--sv-comment-animation-duration, 400ms)
|
|
1161
|
-
var(--sv-comment-animation-easing, cubic-bezier(0.32, 0.72, 0, 1)) forwards !important;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
/* CRITICAL: Disable VirtualSlider/VideoFeed swipe when CommentSheet is open */
|
|
1165
|
-
body.sv-comment-sheet-open .sv-slider,
|
|
1166
|
-
body.sv-comment-sheet-open .sv-video-feed {
|
|
1167
|
-
pointer-events: none !important;
|
|
1168
|
-
touch-action: none !important;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
body.sv-comment-sheet-open .sv-comment-sheet,
|
|
1172
|
-
body.sv-comment-sheet-open .sv-comment-sheet-backdrop {
|
|
1173
|
-
touch-action: auto !important;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1177
|
-
HEADER
|
|
1178
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1179
|
-
|
|
1180
|
-
.sv-comment-sheet__header {
|
|
1181
|
-
display: flex;
|
|
1182
|
-
align-items: center;
|
|
1183
|
-
justify-content: space-between;
|
|
1184
|
-
padding: 16px;
|
|
1185
|
-
border-bottom: 1px solid var(--sv-comment-border);
|
|
1186
|
-
flex-shrink: 0;
|
|
1187
|
-
position: relative;
|
|
1188
|
-
cursor: grab;
|
|
1189
|
-
touch-action: none;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
.sv-comment-sheet__header:active {
|
|
1193
|
-
cursor: grabbing;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
.sv-comment-sheet__header-handle {
|
|
1197
|
-
position: absolute;
|
|
1198
|
-
top: 8px;
|
|
1199
|
-
left: 50%;
|
|
1200
|
-
transform: translateX(-50%);
|
|
1201
|
-
width: 36px;
|
|
1202
|
-
height: 4px;
|
|
1203
|
-
background: var(--sv-comment-text-secondary);
|
|
1204
|
-
border-radius: 2px;
|
|
1205
|
-
opacity: 0.3;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
.sv-comment-sheet__header-left {
|
|
1209
|
-
display: flex;
|
|
1210
|
-
align-items: center;
|
|
1211
|
-
gap: 2px;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
.sv-comment-sheet__title {
|
|
1215
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1216
|
-
font-size: 18px;
|
|
1217
|
-
font-weight: 600;
|
|
1218
|
-
line-height: 1.4;
|
|
1219
|
-
color: var(--sv-comment-text);
|
|
1220
|
-
opacity: 0.9;
|
|
1221
|
-
margin: 0;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
.sv-comment-sheet__sort-btn {
|
|
1225
|
-
display: flex;
|
|
1226
|
-
align-items: center;
|
|
1227
|
-
justify-content: center;
|
|
1228
|
-
background: none;
|
|
1229
|
-
border: none;
|
|
1230
|
-
padding: 0;
|
|
1231
|
-
cursor: pointer;
|
|
1232
|
-
color: var(--sv-comment-text);
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
.sv-comment-sheet__sort-btn svg {
|
|
1236
|
-
width: 20px;
|
|
1237
|
-
height: 20px;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
.sv-comment-sheet__close-btn {
|
|
1241
|
-
display: flex;
|
|
1242
|
-
align-items: center;
|
|
1243
|
-
justify-content: center;
|
|
1244
|
-
width: 36px;
|
|
1245
|
-
height: 36px;
|
|
1246
|
-
border: none;
|
|
1247
|
-
border-radius: 100px;
|
|
1248
|
-
background: linear-gradient(180deg, var(--sv-comment-primary-light) 0%, var(--sv-comment-primary-dark) 100%);
|
|
1249
|
-
cursor: pointer;
|
|
1250
|
-
transition: opacity 0.15s ease;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
.sv-comment-sheet__close-btn:hover {
|
|
1254
|
-
opacity: 0.9;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
.sv-comment-sheet__close-btn svg {
|
|
1258
|
-
width: 20px;
|
|
1259
|
-
height: 20px;
|
|
1260
|
-
color: #ffffff;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1264
|
-
COMMENT LIST
|
|
1265
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1266
|
-
|
|
1267
|
-
.sv-comment-sheet__list {
|
|
1268
|
-
flex: 1;
|
|
1269
|
-
overflow-y: auto;
|
|
1270
|
-
overflow-x: hidden;
|
|
1271
|
-
padding: 8px 16px 28px 16px;
|
|
1272
|
-
-webkit-overflow-scrolling: touch;
|
|
1273
|
-
overscroll-behavior: contain;
|
|
1274
|
-
touch-action: pan-y;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
.sv-comment-sheet__list::-webkit-scrollbar {
|
|
1278
|
-
width: 0px;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
.sv-comment-sheet__list::-webkit-scrollbar-thumb {
|
|
1282
|
-
background: rgba(0, 0, 0, 0.0);
|
|
1283
|
-
border-radius: 0px;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1287
|
-
COMMENT ITEM
|
|
1288
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1289
|
-
|
|
1290
|
-
.sv-comment-item {
|
|
1291
|
-
display: flex;
|
|
1292
|
-
gap: 6px;
|
|
1293
|
-
padding: 16px 0;
|
|
1294
|
-
position: relative;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
.sv-comment-item--pending {
|
|
1298
|
-
opacity: 0.6;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
.sv-comment-item--pinned {
|
|
1302
|
-
background: var(--sv-comment-bg);
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
.sv-comment-item__avatar {
|
|
1306
|
-
width: 40px;
|
|
1307
|
-
height: 40px;
|
|
1308
|
-
border-radius: 120px;
|
|
1309
|
-
flex-shrink: 0;
|
|
1310
|
-
object-fit: cover;
|
|
1311
|
-
background: var(--sv-comment-avatar-bg);
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
.sv-comment-item__content {
|
|
1315
|
-
flex: 1;
|
|
1316
|
-
min-width: 0;
|
|
1317
|
-
display: flex;
|
|
1318
|
-
flex-direction: column;
|
|
1319
|
-
gap: 6px;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
.sv-comment-item__header {
|
|
1323
|
-
display: flex;
|
|
1324
|
-
align-items: center;
|
|
1325
|
-
justify-content: space-between;
|
|
1326
|
-
gap: 4px;
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
.sv-comment-item__header-left {
|
|
1330
|
-
display: flex;
|
|
1331
|
-
align-items: center;
|
|
1332
|
-
gap: 4px;
|
|
1333
|
-
min-width: 0;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
.sv-comment-item__pin-icon {
|
|
1337
|
-
width: 16px;
|
|
1338
|
-
height: 16px;
|
|
1339
|
-
flex-shrink: 0;
|
|
1340
|
-
color: var(--sv-comment-primary);
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
.sv-comment-item__author {
|
|
1344
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1345
|
-
font-size: 14px;
|
|
1346
|
-
font-weight: 600;
|
|
1347
|
-
line-height: 1.4;
|
|
1348
|
-
color: var(--sv-comment-text);
|
|
1349
|
-
overflow: hidden;
|
|
1350
|
-
text-overflow: ellipsis;
|
|
1351
|
-
white-space: nowrap;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
.sv-comment-item__verified {
|
|
1355
|
-
width: 12px;
|
|
1356
|
-
height: 12px;
|
|
1357
|
-
flex-shrink: 0;
|
|
1358
|
-
color: var(--sv-comment-verified-color);
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
.sv-comment-item__badge {
|
|
1362
|
-
font-size: 10px;
|
|
1363
|
-
padding: 2px 6px;
|
|
1364
|
-
background: var(--sv-comment-primary);
|
|
1365
|
-
color: #ffffff;
|
|
1366
|
-
border-radius: 4px;
|
|
1367
|
-
flex-shrink: 0;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
.sv-comment-item__menu-btn {
|
|
1371
|
-
display: flex;
|
|
1372
|
-
align-items: center;
|
|
1373
|
-
justify-content: center;
|
|
1374
|
-
background: none;
|
|
1375
|
-
border: none;
|
|
1376
|
-
padding: 0;
|
|
1377
|
-
cursor: pointer;
|
|
1378
|
-
color: var(--sv-comment-text-secondary);
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
.sv-comment-item__menu-btn svg {
|
|
1382
|
-
width: 20px;
|
|
1383
|
-
height: 20px;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
.sv-comment-item__text {
|
|
1387
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1388
|
-
font-size: 12px;
|
|
1389
|
-
font-weight: 400;
|
|
1390
|
-
line-height: 1.4;
|
|
1391
|
-
color: var(--sv-comment-text);
|
|
1392
|
-
word-break: break-word;
|
|
1393
|
-
margin: 0;
|
|
1394
|
-
padding-right: 16px;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
/* Text collapse */
|
|
1398
|
-
.sv-comment-item__text--collapsed {
|
|
1399
|
-
display: -webkit-box;
|
|
1400
|
-
-webkit-line-clamp: var(--sv-comment-max-lines, 3);
|
|
1401
|
-
-webkit-box-orient: vertical;
|
|
1402
|
-
overflow: hidden;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
.sv-comment-item__expand-btn {
|
|
1406
|
-
background: none;
|
|
1407
|
-
border: none;
|
|
1408
|
-
padding: 0;
|
|
1409
|
-
font-size: 12px;
|
|
1410
|
-
color: var(--sv-comment-text-secondary);
|
|
1411
|
-
cursor: pointer;
|
|
1412
|
-
margin-top: 4px;
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
.sv-comment-item__expand-btn:hover {
|
|
1416
|
-
color: var(--sv-comment-text);
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
/* Actions row */
|
|
1420
|
-
.sv-comment-item__actions {
|
|
1421
|
-
display: flex;
|
|
1422
|
-
align-items: center;
|
|
1423
|
-
gap: 16px;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
.sv-comment-item__time {
|
|
1427
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1428
|
-
font-size: 12px;
|
|
1429
|
-
font-weight: 500;
|
|
1430
|
-
line-height: 1.2;
|
|
1431
|
-
color: var(--sv-comment-text-secondary);
|
|
1432
|
-
overflow: hidden;
|
|
1433
|
-
text-overflow: ellipsis;
|
|
1434
|
-
white-space: nowrap;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
.sv-comment-item__action-btn {
|
|
1438
|
-
display: flex;
|
|
1439
|
-
align-items: center;
|
|
1440
|
-
gap: 4px;
|
|
1441
|
-
background: none;
|
|
1442
|
-
border: none;
|
|
1443
|
-
padding: 0;
|
|
1444
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1445
|
-
font-size: 12px;
|
|
1446
|
-
font-weight: 500;
|
|
1447
|
-
line-height: 1.2;
|
|
1448
|
-
color: var(--sv-comment-text-secondary);
|
|
1449
|
-
cursor: pointer;
|
|
1450
|
-
transition: color 0.15s ease;
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
.sv-comment-item__action-btn:hover {
|
|
1454
|
-
color: var(--sv-comment-text);
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
.sv-comment-item__action-btn--active {
|
|
1458
|
-
color: var(--sv-comment-like-color);
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
.sv-comment-item__action-btn--active:hover {
|
|
1462
|
-
color: var(--sv-comment-like-color);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
.sv-comment-item__action-icon {
|
|
1466
|
-
width: 20px;
|
|
1467
|
-
height: 20px;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1471
|
-
REPLIES
|
|
1472
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1473
|
-
|
|
1474
|
-
.sv-comment-replies {
|
|
1475
|
-
margin-top: 12px;
|
|
1476
|
-
position: relative;
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
/* Vertical connecting line */
|
|
1480
|
-
.sv-comment-item--has-replies::before {
|
|
1481
|
-
content: '';
|
|
1482
|
-
position: absolute;
|
|
1483
|
-
left: 20px;
|
|
1484
|
-
top: 56px;
|
|
1485
|
-
bottom: 0;
|
|
1486
|
-
width: 1px;
|
|
1487
|
-
background: var(--sv-comment-reply-line);
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
.sv-comment-replies__toggle {
|
|
1491
|
-
display: flex;
|
|
1492
|
-
align-items: center;
|
|
1493
|
-
gap: 0;
|
|
1494
|
-
background: none;
|
|
1495
|
-
border: none;
|
|
1496
|
-
padding: 4px 0;
|
|
1497
|
-
cursor: pointer;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
.sv-comment-replies__toggle-line {
|
|
1501
|
-
width: 24px;
|
|
1502
|
-
height: 1px;
|
|
1503
|
-
background: #a3a3a3;
|
|
1504
|
-
margin-right: 0;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
.sv-comment-replies__toggle-text {
|
|
1508
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1509
|
-
font-size: 13px;
|
|
1510
|
-
font-weight: 600;
|
|
1511
|
-
line-height: 1.4;
|
|
1512
|
-
color: var(--sv-comment-text-secondary);
|
|
1513
|
-
white-space: nowrap;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
.sv-comment-replies__toggle-icon {
|
|
1517
|
-
width: 20px;
|
|
1518
|
-
height: 20px;
|
|
1519
|
-
color: var(--sv-comment-text-secondary);
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
.sv-comment-replies__list {
|
|
1523
|
-
margin-top: 12px;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
.sv-comment-reply {
|
|
1527
|
-
display: flex;
|
|
1528
|
-
gap: 6px;
|
|
1529
|
-
padding: 0 0 12px 0;
|
|
1530
|
-
position: relative;
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
.sv-comment-reply__avatar {
|
|
1534
|
-
width: 24px;
|
|
1535
|
-
height: 24px;
|
|
1536
|
-
border-radius: 100px;
|
|
1537
|
-
flex-shrink: 0;
|
|
1538
|
-
object-fit: cover;
|
|
1539
|
-
background: var(--sv-comment-avatar-bg);
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
.sv-comment-reply__mention {
|
|
1543
|
-
color: var(--sv-comment-mention-color);
|
|
1544
|
-
font-weight: 500;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1548
|
-
INPUT AREA
|
|
1549
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1550
|
-
|
|
1551
|
-
.sv-comment-sheet__input-area {
|
|
1552
|
-
padding: 0 16px 36px 16px;
|
|
1553
|
-
flex-shrink: 0;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
/* Guest mode - login prompt instead of input */
|
|
1557
|
-
.sv-comment-input-guest {
|
|
1558
|
-
padding: 16px;
|
|
1559
|
-
border-top: 1px solid var(--sv-comment-border);
|
|
1560
|
-
display: flex;
|
|
1561
|
-
align-items: center;
|
|
1562
|
-
justify-content: center;
|
|
1563
|
-
cursor: pointer;
|
|
1564
|
-
background: var(--sv-comment-bg);
|
|
1565
|
-
color: var(--sv-comment-primary);
|
|
1566
|
-
font-weight: 600;
|
|
1567
|
-
font-size: 14px;
|
|
1568
|
-
width: 100%;
|
|
1569
|
-
transition: background 0.15s ease;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
.sv-comment-input-guest:hover {
|
|
1573
|
-
background: rgba(22, 77, 142, 0.05);
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
.sv-comment-input-guest:active {
|
|
1577
|
-
background: rgba(22, 77, 142, 0.1);
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
.sv-comment-sheet__reply-to {
|
|
1581
|
-
display: flex;
|
|
1582
|
-
align-items: center;
|
|
1583
|
-
justify-content: space-between;
|
|
1584
|
-
padding: 4px 0;
|
|
1585
|
-
margin-bottom: 8px;
|
|
1586
|
-
font-size: 12px;
|
|
1587
|
-
color: var(--sv-comment-text-secondary);
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
.sv-comment-sheet__reply-to-author-name {
|
|
1591
|
-
font-size: 12px;
|
|
1592
|
-
color: var(--sv-comment-text);
|
|
1593
|
-
font-weight: 500;
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
.sv-comment-sheet__reply-to-clear {
|
|
1597
|
-
background: none;
|
|
1598
|
-
border: none;
|
|
1599
|
-
padding: 4px;
|
|
1600
|
-
color: var(--sv-comment-text-secondary);
|
|
1601
|
-
cursor: pointer;
|
|
1602
|
-
font-size: 12px;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
.sv-comment-sheet__input-wrapper {
|
|
1606
|
-
display: flex;
|
|
1607
|
-
align-items: center;
|
|
1608
|
-
gap: 8px;
|
|
1609
|
-
height: 44px;
|
|
1610
|
-
padding: 16px;
|
|
1611
|
-
background: var(--sv-comment-bg);
|
|
1612
|
-
border: 1px solid var(--sv-comment-input-border);
|
|
1613
|
-
border-radius: 12px;
|
|
1614
|
-
backdrop-filter: blur(50px);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
.sv-comment-sheet__input-left {
|
|
1618
|
-
display: flex;
|
|
1619
|
-
align-items: center;
|
|
1620
|
-
gap: 8px;
|
|
1621
|
-
flex: 1;
|
|
1622
|
-
min-width: 0;
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
.sv-comment-sheet__media-btn {
|
|
1626
|
-
display: flex;
|
|
1627
|
-
align-items: center;
|
|
1628
|
-
justify-content: center;
|
|
1629
|
-
background: none;
|
|
1630
|
-
border: none;
|
|
1631
|
-
padding: 0;
|
|
1632
|
-
cursor: pointer;
|
|
1633
|
-
flex-shrink: 0;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
.sv-comment-sheet__media-btn svg {
|
|
1637
|
-
width: 20px;
|
|
1638
|
-
height: 20px;
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
.sv-comment-sheet__input {
|
|
1642
|
-
flex: 1;
|
|
1643
|
-
background: none;
|
|
1644
|
-
border: none;
|
|
1645
|
-
outline: none;
|
|
1646
|
-
resize: none;
|
|
1647
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1648
|
-
font-size: 12px;
|
|
1649
|
-
font-style: italic;
|
|
1650
|
-
font-weight: 400;
|
|
1651
|
-
line-height: 1.4;
|
|
1652
|
-
color: var(--sv-comment-text);
|
|
1653
|
-
padding: 0;
|
|
1654
|
-
min-width: 0;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
.sv-comment-sheet__input::placeholder {
|
|
1658
|
-
color: var(--sv-comment-text-secondary);
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
.sv-comment-sheet__input:not(:placeholder-shown) {
|
|
1662
|
-
font-style: normal;
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
.sv-comment-sheet__emoji-btn {
|
|
1666
|
-
display: flex;
|
|
1667
|
-
align-items: center;
|
|
1668
|
-
justify-content: center;
|
|
1669
|
-
background: none;
|
|
1670
|
-
border: none;
|
|
1671
|
-
padding: 0;
|
|
1672
|
-
cursor: pointer;
|
|
1673
|
-
flex-shrink: 0;
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
.sv-comment-sheet__emoji-btn svg {
|
|
1677
|
-
width: 20px;
|
|
1678
|
-
height: 20px;
|
|
1679
|
-
color: var(--sv-comment-primary);
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
/* Hidden emoji bar (can be toggled) */
|
|
1683
|
-
.sv-comment-sheet__emoji-bar {
|
|
1684
|
-
display: none;
|
|
1685
|
-
gap: 8px;
|
|
1686
|
-
padding: 8px 0;
|
|
1687
|
-
overflow-x: auto;
|
|
1688
|
-
-webkit-overflow-scrolling: touch;
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
.sv-comment-sheet__emoji-bar--visible {
|
|
1692
|
-
display: flex;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
.sv-comment-sheet__emoji-bar::-webkit-scrollbar {
|
|
1696
|
-
display: none;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
.sv-comment-sheet__emoji-bar-btn {
|
|
1700
|
-
background: none;
|
|
1701
|
-
border: none;
|
|
1702
|
-
padding: 4px;
|
|
1703
|
-
font-size: 20px;
|
|
1704
|
-
cursor: pointer;
|
|
1705
|
-
border-radius: 4px;
|
|
1706
|
-
transition: background 0.15s ease;
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
.sv-comment-sheet__emoji-bar-btn:hover {
|
|
1710
|
-
background: rgba(0, 0, 0, 0.05);
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1714
|
-
STATES
|
|
1715
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1716
|
-
|
|
1717
|
-
.sv-comment-sheet__loading {
|
|
1718
|
-
display: flex;
|
|
1719
|
-
flex-direction: column;
|
|
1720
|
-
align-items: center;
|
|
1721
|
-
justify-content: center;
|
|
1722
|
-
padding: 32px;
|
|
1723
|
-
color: var(--sv-comment-text-secondary);
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
.sv-comment-sheet__loading-spinner {
|
|
1727
|
-
width: 24px;
|
|
1728
|
-
height: 24px;
|
|
1729
|
-
border: 2px solid rgba(0, 0, 0, 0.1);
|
|
1730
|
-
border-top-color: var(--sv-comment-primary);
|
|
1731
|
-
border-radius: 50%;
|
|
1732
|
-
animation: sv-comment-spin 0.8s linear infinite;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
@keyframes sv-comment-spin {
|
|
1736
|
-
to { transform: rotate(360deg); }
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
.sv-comment-sheet__empty {
|
|
1740
|
-
display: flex;
|
|
1741
|
-
flex-direction: column;
|
|
1742
|
-
align-items: center;
|
|
1743
|
-
justify-content: center;
|
|
1744
|
-
padding: 32px;
|
|
1745
|
-
text-align: center;
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
.sv-comment-sheet__empty-icon {
|
|
1749
|
-
font-size: 48px;
|
|
1750
|
-
margin-bottom: 12px;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
.sv-comment-sheet__empty-text {
|
|
1754
|
-
color: var(--sv-comment-text-secondary);
|
|
1755
|
-
font-size: 14px;
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
.sv-comment-sheet__error {
|
|
1759
|
-
display: flex;
|
|
1760
|
-
flex-direction: column;
|
|
1761
|
-
align-items: center;
|
|
1762
|
-
padding: 32px;
|
|
1763
|
-
text-align: center;
|
|
1764
|
-
color: var(--sv-comment-like-color);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
.sv-comment-sheet__error-btn {
|
|
1768
|
-
margin-top: 12px;
|
|
1769
|
-
padding: 8px 16px;
|
|
1770
|
-
background: rgba(0, 0, 0, 0.05);
|
|
1771
|
-
border: none;
|
|
1772
|
-
border-radius: 8px;
|
|
1773
|
-
color: var(--sv-comment-text);
|
|
1774
|
-
cursor: pointer;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
/* Load more */
|
|
1778
|
-
.sv-comment-sheet__load-more {
|
|
1779
|
-
display: flex;
|
|
1780
|
-
justify-content: center;
|
|
1781
|
-
padding: 12px;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
.sv-comment-sheet__load-more-btn {
|
|
1785
|
-
background: none;
|
|
1786
|
-
border: none;
|
|
1787
|
-
padding: 8px 16px;
|
|
1788
|
-
color: var(--sv-comment-text-secondary);
|
|
1789
|
-
cursor: pointer;
|
|
1790
|
-
font-size: 13px;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
.sv-comment-sheet__load-more-btn:hover {
|
|
1794
|
-
color: var(--sv-comment-text);
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1798
|
-
COMMENT MENU (Dropdown)
|
|
1799
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1800
|
-
|
|
1801
|
-
.sv-comment-menu {
|
|
1802
|
-
position: relative;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
.sv-comment-menu__trigger {
|
|
1806
|
-
display: flex;
|
|
1807
|
-
align-items: center;
|
|
1808
|
-
justify-content: center;
|
|
1809
|
-
background: none;
|
|
1810
|
-
border: none;
|
|
1811
|
-
padding: 4px;
|
|
1812
|
-
cursor: pointer;
|
|
1813
|
-
color: var(--sv-comment-text-secondary);
|
|
1814
|
-
border-radius: 4px;
|
|
1815
|
-
transition: background 0.15s ease;
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
.sv-comment-menu__trigger:hover {
|
|
1819
|
-
background: rgba(0, 0, 0, 0.05);
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
.sv-comment-menu__icon {
|
|
1823
|
-
width: 20px;
|
|
1824
|
-
height: 20px;
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
.sv-comment-menu__dropdown {
|
|
1828
|
-
position: absolute;
|
|
1829
|
-
top: 100%;
|
|
1830
|
-
right: 0;
|
|
1831
|
-
margin-top: 4px;
|
|
1832
|
-
min-width: 140px;
|
|
1833
|
-
background: var(--sv-comment-bg);
|
|
1834
|
-
border: 1px solid var(--sv-comment-border);
|
|
1835
|
-
border-radius: 8px;
|
|
1836
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1837
|
-
z-index: 10;
|
|
1838
|
-
overflow: hidden;
|
|
1839
|
-
animation: sv-menu-fade-in 0.15s ease;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
@keyframes sv-menu-fade-in {
|
|
1843
|
-
from { opacity: 0; transform: translateY(-4px); }
|
|
1844
|
-
to { opacity: 1; transform: translateY(0); }
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
.sv-comment-menu__item {
|
|
1848
|
-
display: flex;
|
|
1849
|
-
align-items: center;
|
|
1850
|
-
gap: 8px;
|
|
1851
|
-
width: 100%;
|
|
1852
|
-
padding: 10px 12px;
|
|
1853
|
-
background: none;
|
|
1854
|
-
border: none;
|
|
1855
|
-
cursor: pointer;
|
|
1856
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1857
|
-
font-size: 14px;
|
|
1858
|
-
font-weight: 500;
|
|
1859
|
-
color: var(--sv-comment-text);
|
|
1860
|
-
text-align: left;
|
|
1861
|
-
transition: background 0.15s ease;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
.sv-comment-menu__item:hover {
|
|
1865
|
-
background: rgba(0, 0, 0, 0.05);
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
.sv-comment-menu__item--danger {
|
|
1869
|
-
color: var(--sv-comment-like-color);
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
.sv-comment-menu__item--danger:hover {
|
|
1873
|
-
background: rgba(255, 67, 78, 0.08);
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
.sv-comment-menu__item-icon {
|
|
1877
|
-
width: 18px;
|
|
1878
|
-
height: 18px;
|
|
1879
|
-
flex-shrink: 0;
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
1883
|
-
DELETE CONFIRMATION DIALOG
|
|
1884
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
1885
|
-
|
|
1886
|
-
.sv-comment-dialog-overlay {
|
|
1887
|
-
position: fixed;
|
|
1888
|
-
inset: 0;
|
|
1889
|
-
display: flex;
|
|
1890
|
-
align-items: center;
|
|
1891
|
-
justify-content: center;
|
|
1892
|
-
background: rgba(0, 0, 0, 0.5);
|
|
1893
|
-
z-index: var(--sv-comment-modal-z-index, 1100);
|
|
1894
|
-
animation: sv-dialog-overlay-fade-in 0.2s ease;
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
@keyframes sv-dialog-overlay-fade-in {
|
|
1898
|
-
from { opacity: 0; }
|
|
1899
|
-
to { opacity: 1; }
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
.sv-comment-dialog {
|
|
1903
|
-
background: var(--sv-comment-bg);
|
|
1904
|
-
border-radius: 16px;
|
|
1905
|
-
padding: 24px;
|
|
1906
|
-
max-width: 300px;
|
|
1907
|
-
width: calc(100% - 48px);
|
|
1908
|
-
text-align: center;
|
|
1909
|
-
animation: sv-dialog-scale-in 0.2s ease;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
@keyframes sv-dialog-scale-in {
|
|
1913
|
-
from { opacity: 0; transform: scale(0.95); }
|
|
1914
|
-
to { opacity: 1; transform: scale(1); }
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
.sv-comment-dialog__title {
|
|
1918
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1919
|
-
font-size: 17px;
|
|
1920
|
-
font-weight: 600;
|
|
1921
|
-
color: var(--sv-comment-text);
|
|
1922
|
-
margin: 0 0 8px 0;
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
.sv-comment-dialog__message {
|
|
1926
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1927
|
-
font-size: 14px;
|
|
1928
|
-
color: var(--sv-comment-text-secondary);
|
|
1929
|
-
margin: 0 0 20px 0;
|
|
1930
|
-
line-height: 1.4;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
.sv-comment-dialog__actions {
|
|
1934
|
-
display: flex;
|
|
1935
|
-
gap: 12px;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
.sv-comment-dialog__btn {
|
|
1939
|
-
flex: 1;
|
|
1940
|
-
padding: 12px 16px;
|
|
1941
|
-
border: none;
|
|
1942
|
-
border-radius: 10px;
|
|
1943
|
-
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
1944
|
-
font-size: 15px;
|
|
1945
|
-
font-weight: 600;
|
|
1946
|
-
cursor: pointer;
|
|
1947
|
-
transition: opacity 0.15s ease;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
.sv-comment-dialog__btn:disabled {
|
|
1951
|
-
opacity: 0.6;
|
|
1952
|
-
cursor: not-allowed;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
.sv-comment-dialog__btn--cancel {
|
|
1956
|
-
background: rgba(0, 0, 0, 0.06);
|
|
1957
|
-
color: var(--sv-comment-text);
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
.sv-comment-dialog__btn--cancel:hover:not(:disabled) {
|
|
1961
|
-
background: rgba(0, 0, 0, 0.1);
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
.sv-comment-dialog__btn--danger {
|
|
1965
|
-
background: var(--sv-comment-like-color);
|
|
1966
|
-
color: #ffffff;
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
.sv-comment-dialog__btn--danger:hover:not(:disabled) {
|
|
1970
|
-
opacity: 0.9;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
/* Legacy classes (keep for backwards compatibility) */
|
|
1974
|
-
.sv-comment-delete-confirm {
|
|
1975
|
-
position: fixed;
|
|
1976
|
-
inset: 0;
|
|
1977
|
-
display: flex;
|
|
1978
|
-
align-items: center;
|
|
1979
|
-
justify-content: center;
|
|
1980
|
-
background: rgba(0, 0, 0, 0.5);
|
|
1981
|
-
z-index: var(--sv-comment-modal-z-index, 1100);
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
.sv-comment-delete-confirm__dialog {
|
|
1985
|
-
background: var(--sv-comment-bg);
|
|
1986
|
-
border-radius: 12px;
|
|
1987
|
-
padding: 16px;
|
|
1988
|
-
max-width: 280px;
|
|
1989
|
-
text-align: center;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
.sv-comment-delete-confirm__title {
|
|
1993
|
-
font-size: 16px;
|
|
1994
|
-
font-weight: 600;
|
|
1995
|
-
color: var(--sv-comment-text);
|
|
1996
|
-
margin-bottom: 8px;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
.sv-comment-delete-confirm__text {
|
|
2000
|
-
font-size: 14px;
|
|
2001
|
-
color: var(--sv-comment-text-secondary);
|
|
2002
|
-
margin-bottom: 16px;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
.sv-comment-delete-confirm__actions {
|
|
2006
|
-
display: flex;
|
|
2007
|
-
gap: 8px;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
.sv-comment-delete-confirm__btn {
|
|
2011
|
-
flex: 1;
|
|
2012
|
-
padding: 8px 12px;
|
|
2013
|
-
border: none;
|
|
2014
|
-
border-radius: 8px;
|
|
2015
|
-
font-size: 14px;
|
|
2016
|
-
font-weight: 600;
|
|
2017
|
-
cursor: pointer;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
.sv-comment-delete-confirm__btn--cancel {
|
|
2021
|
-
background: rgba(0, 0, 0, 0.05);
|
|
2022
|
-
color: var(--sv-comment-text);
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
.sv-comment-delete-confirm__btn--delete {
|
|
2026
|
-
background: var(--sv-comment-like-color);
|
|
2027
|
-
color: #ffffff;
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
2031
|
-
SKELETON LOADING
|
|
2032
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
2033
|
-
|
|
2034
|
-
@keyframes sv-skeleton-shimmer {
|
|
2035
|
-
0% { background-position: -200% 0; }
|
|
2036
|
-
100% { background-position: 200% 0; }
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
.sv-comment-skeleton-list {
|
|
2040
|
-
display: flex;
|
|
2041
|
-
flex-direction: column;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
.sv-comment-skeleton {
|
|
2045
|
-
animation: sv-skeleton-fade-in 0.3s ease;
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
@keyframes sv-skeleton-fade-in {
|
|
2049
|
-
from { opacity: 0; }
|
|
2050
|
-
to { opacity: 1; }
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
.sv-comment-skeleton__avatar {
|
|
2054
|
-
width: 40px;
|
|
2055
|
-
height: 40px;
|
|
2056
|
-
border-radius: 50%;
|
|
2057
|
-
background: linear-gradient(
|
|
2058
|
-
90deg,
|
|
2059
|
-
rgba(0, 0, 0, 0.04) 25%,
|
|
2060
|
-
rgba(0, 0, 0, 0.08) 50%,
|
|
2061
|
-
rgba(0, 0, 0, 0.04) 75%
|
|
2062
|
-
);
|
|
2063
|
-
background-size: 200% 100%;
|
|
2064
|
-
animation: sv-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
.sv-comment-skeleton__content {
|
|
2068
|
-
flex: 1;
|
|
2069
|
-
min-width: 0;
|
|
2070
|
-
display: flex;
|
|
2071
|
-
flex-direction: column;
|
|
2072
|
-
gap: 8px;
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
.sv-comment-skeleton__header {
|
|
2076
|
-
display: flex;
|
|
2077
|
-
align-items: center;
|
|
2078
|
-
gap: 12px;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
.sv-comment-skeleton__author {
|
|
2082
|
-
width: 80px;
|
|
2083
|
-
height: 14px;
|
|
2084
|
-
border-radius: 4px;
|
|
2085
|
-
background: linear-gradient(
|
|
2086
|
-
90deg,
|
|
2087
|
-
rgba(0, 0, 0, 0.04) 25%,
|
|
2088
|
-
rgba(0, 0, 0, 0.08) 50%,
|
|
2089
|
-
rgba(0, 0, 0, 0.04) 75%
|
|
2090
|
-
);
|
|
2091
|
-
background-size: 200% 100%;
|
|
2092
|
-
animation: sv-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
2093
|
-
animation-delay: 0.1s;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
.sv-comment-skeleton__time {
|
|
2097
|
-
width: 40px;
|
|
2098
|
-
height: 12px;
|
|
2099
|
-
border-radius: 4px;
|
|
2100
|
-
background: linear-gradient(
|
|
2101
|
-
90deg,
|
|
2102
|
-
rgba(0, 0, 0, 0.04) 25%,
|
|
2103
|
-
rgba(0, 0, 0, 0.08) 50%,
|
|
2104
|
-
rgba(0, 0, 0, 0.04) 75%
|
|
2105
|
-
);
|
|
2106
|
-
background-size: 200% 100%;
|
|
2107
|
-
animation: sv-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
2108
|
-
animation-delay: 0.15s;
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
.sv-comment-skeleton__text {
|
|
2112
|
-
display: flex;
|
|
2113
|
-
flex-direction: column;
|
|
2114
|
-
gap: 4px;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
.sv-comment-skeleton__line {
|
|
2118
|
-
height: 14px;
|
|
2119
|
-
border-radius: 4px;
|
|
2120
|
-
background: linear-gradient(
|
|
2121
|
-
90deg,
|
|
2122
|
-
rgba(0, 0, 0, 0.04) 25%,
|
|
2123
|
-
rgba(0, 0, 0, 0.08) 50%,
|
|
2124
|
-
rgba(0, 0, 0, 0.04) 75%
|
|
2125
|
-
);
|
|
2126
|
-
background-size: 200% 100%;
|
|
2127
|
-
animation: sv-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
.sv-comment-skeleton__line--full {
|
|
2131
|
-
width: 100%;
|
|
2132
|
-
animation-delay: 0.2s;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
.sv-comment-skeleton__line--medium {
|
|
2136
|
-
width: 65%;
|
|
2137
|
-
animation-delay: 0.25s;
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
.sv-comment-skeleton__actions {
|
|
2141
|
-
display: flex;
|
|
2142
|
-
align-items: center;
|
|
2143
|
-
gap: 16px;
|
|
2144
|
-
margin-top: 4px;
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
.sv-comment-skeleton__action {
|
|
2148
|
-
width: 50px;
|
|
2149
|
-
height: 12px;
|
|
2150
|
-
border-radius: 4px;
|
|
2151
|
-
background: linear-gradient(
|
|
2152
|
-
90deg,
|
|
2153
|
-
rgba(0, 0, 0, 0.04) 25%,
|
|
2154
|
-
rgba(0, 0, 0, 0.08) 50%,
|
|
2155
|
-
rgba(0, 0, 0, 0.04) 75%
|
|
2156
|
-
);
|
|
2157
|
-
background-size: 200% 100%;
|
|
2158
|
-
animation: sv-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
2159
|
-
animation-delay: 0.3s;
|
|
2160
|
-
}
|
|
2161
|
-
`;
|
|
1068
|
+
var COMMENT_SHEET_CSS = `:root{--sv-comment-primary:#164d8e;--sv-comment-primary-light:#1354ae;--sv-comment-primary-dark:#003477;--sv-comment-bg:#fff;--sv-comment-text:#121212;--sv-comment-text-secondary:#6b7271;--sv-comment-border:rgba(18,18,18,.08);--sv-comment-like-color:#ff434e;--sv-comment-verified-color:#1ea031;--sv-comment-mention-color:#164d8e;--sv-comment-avatar-bg:#e5e6e6;--sv-comment-input-border:#a3a3a3;--sv-comment-reply-line:#e5e6e6}.sv-comment-sheet{--sv-sheet-bg:var(--sv-comment-bg,#fff);--sv-sheet-border-radius:var(--sv-comment-sheet-radius,24px);--sv-sheet-animation-duration:var(--sv-comment-animation-duration,400ms);--sv-sheet-animation-easing:var(--sv-comment-animation-easing,cubic-bezier(.32,.72,0,1));margin:16px;border-radius:var(--sv-comment-sheet-radius,24px)}.sv-comment-sheet-backdrop{--sv-sheet-backdrop-bg:var(--sv-comment-backdrop-bg,rgba(0,0,0,.5))}.sv-comment-sheet__inner{display:flex;flex-direction:column;height:100%}.sv-comment-sheet .sv-bottom-sheet__content{overflow:visible;display:flex;flex-direction:column;flex:1}.sv-comment-sheet__header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--sv-comment-border);flex-shrink:0;position:relative;cursor:grab;touch-action:none}.sv-comment-sheet__header:active{cursor:grabbing}.sv-comment-sheet__header-handle{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:36px;height:4px;background:var(--sv-comment-text-secondary);border-radius:2px;opacity:.3}.sv-comment-sheet__header-left{display:flex;align-items:center;gap:2px}.sv-comment-sheet__title{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:18px;font-weight:600;line-height:1.4;color:var(--sv-comment-text);opacity:.9;margin:0}.sv-comment-sheet__sort-btn{display:flex;align-items:center;justify-content:center;background:0 0;border:0;padding:0;cursor:pointer;color:var(--sv-comment-text)}.sv-comment-sheet__sort-btn svg{width:20px;height:20px}.sv-comment-sheet__close-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:100px;background:linear-gradient(180deg,var(--sv-comment-primary-light)0%,var(--sv-comment-primary-dark)100%);cursor:pointer;transition:opacity .15s ease}.sv-comment-sheet__close-btn:hover{opacity:.9}.sv-comment-sheet__close-btn svg{width:20px;height:20px;color:#fff}.sv-comment-sheet__list{flex:1;overflow-y:auto;overflow-x:hidden;padding:8px 16px 28px 16px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.sv-comment-sheet__list::-webkit-scrollbar{width:0}.sv-comment-sheet__list::-webkit-scrollbar-thumb{background:rgba(0,0,0,.0);border-radius:0}.sv-comment-item{display:flex;gap:6px;padding:16px 0;position:relative}.sv-comment-item--pending{opacity:.6}.sv-comment-item--pinned{background:var(--sv-comment-bg)}.sv-comment-item__avatar{width:40px;height:40px;border-radius:120px;flex-shrink:0;object-fit:cover;background:var(--sv-comment-avatar-bg)}.sv-comment-item__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.sv-comment-item__header{display:flex;align-items:center;justify-content:space-between;gap:4px}.sv-comment-item__header-left{display:flex;align-items:center;gap:4px;min-width:0}.sv-comment-item__pin-icon{width:16px;height:16px;flex-shrink:0;color:var(--sv-comment-primary)}.sv-comment-item__author{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:600;line-height:1.4;color:var(--sv-comment-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sv-comment-item__verified{width:12px;height:12px;flex-shrink:0;color:var(--sv-comment-verified-color)}.sv-comment-item__badge{font-size:10px;padding:2px 6px;background:var(--sv-comment-primary);color:#fff;border-radius:4px;flex-shrink:0}.sv-comment-item__menu-btn{display:flex;align-items:center;justify-content:center;background:0 0;border:0;padding:0;cursor:pointer;color:var(--sv-comment-text-secondary)}.sv-comment-item__menu-btn svg{width:20px;height:20px}.sv-comment-item__text{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;font-size:12px;font-weight:normal;line-height:1.4;color:var(--sv-comment-text);word-break:break-word;margin:0;padding-right:16px}.sv-comment-item__text--collapsed{display:-webkit-box;-webkit-line-clamp:var(--sv-comment-max-lines,3);-webkit-box-orient:vertical;overflow:hidden}.sv-comment-item__expand-btn{background:0 0;border:0;padding:0;font-size:12px;color:var(--sv-comment-text-secondary);cursor:pointer;margin-top:4px}.sv-comment-item__expand-btn:hover{color:var(--sv-comment-text)}.sv-comment-item__actions{display:flex;align-items:center;gap:16px}.sv-comment-item__time{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:12px;font-weight:500;line-height:1.2;color:var(--sv-comment-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sv-comment-item__action-btn{display:flex;align-items:center;gap:4px;background:0 0;border:0;padding:0;font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:12px;font-weight:500;line-height:1.2;color:var(--sv-comment-text-secondary);cursor:pointer;transition:color .15s ease}.sv-comment-item__action-btn:hover{color:var(--sv-comment-text)}.sv-comment-item__action-btn--active{color:var(--sv-comment-like-color)}.sv-comment-item__action-btn--active:hover{color:var(--sv-comment-like-color)}.sv-comment-item__action-icon{width:20px;height:20px}.sv-comment-replies{margin-top:12px;position:relative}.sv-comment-item--has-replies::before{content:'';position:absolute;left:20px;top:56px;bottom:0;width:1px;background:var(--sv-comment-reply-line)}.sv-comment-replies__toggle{display:flex;align-items:center;gap:0;background:0 0;border:0;padding:4px 0;cursor:pointer}.sv-comment-replies__toggle-line{width:24px;height:1px;background:#a3a3a3;margin-right:0}.sv-comment-replies__toggle-text{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:var(--sv-comment-text-secondary);white-space:nowrap}.sv-comment-replies__toggle-icon{width:20px;height:20px;color:var(--sv-comment-text-secondary)}.sv-comment-replies__list{margin-top:12px}.sv-comment-reply{display:flex;gap:6px;padding:0 0 12px 0;position:relative}.sv-comment-reply__avatar{width:24px;height:24px;border-radius:100px;flex-shrink:0;object-fit:cover;background:var(--sv-comment-avatar-bg)}.sv-comment-reply__mention{color:var(--sv-comment-mention-color);font-weight:500}.sv-comment-sheet__input-area{padding:0 16px 36px 16px;flex-shrink:0}.sv-comment-input-guest{padding:16px;border-top:1px solid var(--sv-comment-border);display:flex;align-items:center;justify-content:center;cursor:pointer;background:var(--sv-comment-bg);color:var(--sv-comment-primary);font-weight:600;font-size:14px;width:100%;transition:background .15s ease}.sv-comment-input-guest:hover{background:rgba(22,77,142,.05)}.sv-comment-input-guest:active{background:rgba(22,77,142,.1)}.sv-comment-sheet__reply-to{display:flex;align-items:center;justify-content:space-between;padding:4px 0;margin-bottom:8px;font-size:12px;color:var(--sv-comment-text-secondary)}.sv-comment-sheet__reply-to-author-name{font-size:12px;color:var(--sv-comment-text);font-weight:500}.sv-comment-sheet__reply-to-clear{background:0 0;border:0;padding:4px;color:var(--sv-comment-text-secondary);cursor:pointer;font-size:12px}.sv-comment-sheet__input-wrapper{display:flex;align-items:center;gap:8px;height:44px;padding:16px;background:var(--sv-comment-bg);border:1px solid var(--sv-comment-input-border);border-radius:12px;backdrop-filter:blur(50px)}.sv-comment-sheet__input-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.sv-comment-sheet__media-btn{display:flex;align-items:center;justify-content:center;background:0 0;border:0;padding:0;cursor:pointer;flex-shrink:0}.sv-comment-sheet__media-btn svg{width:20px;height:20px}.sv-comment-sheet__input{flex:1;background:0 0;border:0;outline:none;resize:none;font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:12px;font-style:italic;font-weight:normal;line-height:1.4;color:var(--sv-comment-text);padding:0;min-width:0}.sv-comment-sheet__input::placeholder{color:var(--sv-comment-text-secondary)}.sv-comment-sheet__input:not(:placeholder-shown){font-style:normal}.sv-comment-sheet__emoji-btn{display:flex;align-items:center;justify-content:center;background:0 0;border:0;padding:0;cursor:pointer;flex-shrink:0}.sv-comment-sheet__emoji-btn svg{width:20px;height:20px;color:var(--sv-comment-primary)}.sv-comment-sheet__emoji-bar{display:none;gap:8px;padding:8px 0;overflow-x:auto;-webkit-overflow-scrolling:touch}.sv-comment-sheet__emoji-bar--visible{display:flex}.sv-comment-sheet__emoji-bar::-webkit-scrollbar{display:none}.sv-comment-sheet__emoji-bar-btn{background:0 0;border:0;padding:4px;font-size:20px;cursor:pointer;border-radius:4px;transition:background .15s ease}.sv-comment-sheet__emoji-bar-btn:hover{background:rgba(0,0,0,.05)}.sv-comment-sheet__loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;color:var(--sv-comment-text-secondary)}.sv-comment-sheet__loading-spinner{width:24px;height:24px;border:2px solid rgba(0,0,0,.1);border-top-color:var(--sv-comment-primary);border-radius:50%;animation:sv-comment-spin .8s linear infinite}@keyframes sv-comment-spin{to{transform:rotate(360deg)}}.sv-comment-sheet__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center}.sv-comment-sheet__empty-icon{font-size:48px;margin-bottom:12px}.sv-comment-sheet__empty-text{color:var(--sv-comment-text-secondary);font-size:14px}.sv-comment-sheet__error{display:flex;flex-direction:column;align-items:center;padding:32px;text-align:center;color:var(--sv-comment-like-color)}.sv-comment-sheet__error-btn{margin-top:12px;padding:8px 16px;background:rgba(0,0,0,.05);border:0;border-radius:8px;color:var(--sv-comment-text);cursor:pointer}.sv-comment-sheet__load-more{display:flex;justify-content:center;padding:12px}.sv-comment-sheet__load-more-btn{background:0 0;border:0;padding:8px 16px;color:var(--sv-comment-text-secondary);cursor:pointer;font-size:13px}.sv-comment-sheet__load-more-btn:hover{color:var(--sv-comment-text)}.sv-comment-menu{position:relative}.sv-comment-menu__trigger{display:flex;align-items:center;justify-content:center;background:0 0;border:0;padding:4px;cursor:pointer;color:var(--sv-comment-text-secondary);border-radius:4px;transition:background .15s ease}.sv-comment-menu__trigger:hover{background:rgba(0,0,0,.05)}.sv-comment-menu__icon{width:20px;height:20px}.sv-comment-menu__dropdown{position:absolute;top:100%;right:0;margin-top:4px;min-width:140px;background:var(--sv-comment-bg);border:1px solid var(--sv-comment-border);border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);z-index:10;overflow:hidden;animation:sv-menu-fade-in .15s ease}@keyframes sv-menu-fade-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.sv-comment-menu__item{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:0 0;border:0;cursor:pointer;font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:500;color:var(--sv-comment-text);text-align:left;transition:background .15s ease}.sv-comment-menu__item:hover{background:rgba(0,0,0,.05)}.sv-comment-menu__item--danger{color:var(--sv-comment-like-color)}.sv-comment-menu__item--danger:hover{background:rgba(255,67,78,.08)}.sv-comment-menu__item-icon{width:18px;height:18px;flex-shrink:0}.sv-comment-dialog-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);z-index:var(--sv-comment-modal-z-index,1100);animation:sv-dialog-overlay-fade-in .2s ease}@keyframes sv-dialog-overlay-fade-in{from{opacity:0}to{opacity:1}}.sv-comment-dialog{background:var(--sv-comment-bg);border-radius:16px;padding:24px;max-width:300px;width:calc(100% - 48px);text-align:center;animation:sv-dialog-scale-in .2s ease}@keyframes sv-dialog-scale-in{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.sv-comment-dialog__title{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:17px;font-weight:600;color:var(--sv-comment-text);margin:0 0 8px 0}.sv-comment-dialog__message{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;color:var(--sv-comment-text-secondary);margin:0 0 20px 0;line-height:1.4}.sv-comment-dialog__actions{display:flex;gap:12px}.sv-comment-dialog__btn{flex:1;padding:12px 16px;border:0;border-radius:10px;font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,sans-serif;font-size:15px;font-weight:600;cursor:pointer;transition:opacity .15s ease}.sv-comment-dialog__btn:disabled{opacity:.6;cursor:not-allowed}.sv-comment-dialog__btn--cancel{background:rgba(0,0,0,.06);color:var(--sv-comment-text)}.sv-comment-dialog__btn--cancel:hover:not(:disabled){background:rgba(0,0,0,.1)}.sv-comment-dialog__btn--danger{background:var(--sv-comment-like-color);color:#fff}.sv-comment-dialog__btn--danger:hover:not(:disabled){opacity:.9}.sv-comment-delete-confirm{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);z-index:var(--sv-comment-modal-z-index,1100)}.sv-comment-delete-confirm__dialog{background:var(--sv-comment-bg);border-radius:12px;padding:16px;max-width:280px;text-align:center}.sv-comment-delete-confirm__title{font-size:16px;font-weight:600;color:var(--sv-comment-text);margin-bottom:8px}.sv-comment-delete-confirm__text{font-size:14px;color:var(--sv-comment-text-secondary);margin-bottom:16px}.sv-comment-delete-confirm__actions{display:flex;gap:8px}.sv-comment-delete-confirm__btn{flex:1;padding:8px 12px;border:0;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer}.sv-comment-delete-confirm__btn--cancel{background:rgba(0,0,0,.05);color:var(--sv-comment-text)}.sv-comment-delete-confirm__btn--delete{background:var(--sv-comment-like-color);color:#fff}@keyframes sv-skeleton-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}.sv-comment-skeleton-list{display:flex;flex-direction:column}.sv-comment-skeleton{animation:sv-skeleton-fade-in .3s ease}@keyframes sv-skeleton-fade-in{from{opacity:0}to{opacity:1}}.sv-comment-skeleton__avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(90deg,rgba(0,0,0,.04)25%,rgba(0,0,0,.08)50%,rgba(0,0,0,.04)75%);background-size:200% 100%;animation:sv-skeleton-shimmer 1.5s ease-in-out infinite}.sv-comment-skeleton__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}.sv-comment-skeleton__header{display:flex;align-items:center;gap:12px}.sv-comment-skeleton__author{width:80px;height:14px;border-radius:4px;background:linear-gradient(90deg,rgba(0,0,0,.04)25%,rgba(0,0,0,.08)50%,rgba(0,0,0,.04)75%);background-size:200% 100%;animation:sv-skeleton-shimmer 1.5s ease-in-out infinite;animation-delay:.1s}.sv-comment-skeleton__time{width:40px;height:12px;border-radius:4px;background:linear-gradient(90deg,rgba(0,0,0,.04)25%,rgba(0,0,0,.08)50%,rgba(0,0,0,.04)75%);background-size:200% 100%;animation:sv-skeleton-shimmer 1.5s ease-in-out infinite;animation-delay:.15s}.sv-comment-skeleton__text{display:flex;flex-direction:column;gap:4px}.sv-comment-skeleton__line{height:14px;border-radius:4px;background:linear-gradient(90deg,rgba(0,0,0,.04)25%,rgba(0,0,0,.08)50%,rgba(0,0,0,.04)75%);background-size:200% 100%;animation:sv-skeleton-shimmer 1.5s ease-in-out infinite}.sv-comment-skeleton__line--full{width:100%;animation-delay:.2s}.sv-comment-skeleton__line--medium{width:65%;animation-delay:.25s}.sv-comment-skeleton__actions{display:flex;align-items:center;gap:16px;margin-top:4px}.sv-comment-skeleton__action{width:50px;height:12px;border-radius:4px;background:linear-gradient(90deg,rgba(0,0,0,.04)25%,rgba(0,0,0,.08)50%,rgba(0,0,0,.04)75%);background-size:200% 100%;animation:sv-skeleton-shimmer 1.5s ease-in-out infinite;animation-delay:.3s}`;
|
|
2162
1069
|
function AngleDownIcon({ className }) {
|
|
2163
1070
|
return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", className, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx(
|
|
2164
1071
|
"path",
|
|
@@ -2208,7 +1115,8 @@ var SheetHeader = memo(function SheetHeader2({
|
|
|
2208
1115
|
sortAriaLabel = "Sort comments",
|
|
2209
1116
|
closeAriaLabel = "Close comments"
|
|
2210
1117
|
}) {
|
|
2211
|
-
const { state,
|
|
1118
|
+
const { state, initialCount } = useCommentSheetContext();
|
|
1119
|
+
const { onClose } = useBottomSheetContext();
|
|
2212
1120
|
const totalCount = state.totalCount > 0 ? state.totalCount : initialCount ?? 0;
|
|
2213
1121
|
return /* @__PURE__ */ jsxs("div", { className: clsx("sv-comment-sheet__header", className), children: [
|
|
2214
1122
|
showHandle && /* @__PURE__ */ jsx("div", { className: "sv-comment-sheet__header-handle" }),
|
|
@@ -2258,7 +1166,6 @@ var DEFAULT_CONFIG = {
|
|
|
2258
1166
|
pageSize: 20,
|
|
2259
1167
|
replyPageSize: 10,
|
|
2260
1168
|
cacheTTL: 5 * 60 * 1e3,
|
|
2261
|
-
// 5 minutes
|
|
2262
1169
|
repliesAutoExpandThreshold: 1,
|
|
2263
1170
|
repliesCollapseLimit: 3,
|
|
2264
1171
|
textMaxLines: 3,
|
|
@@ -2266,7 +1173,6 @@ var DEFAULT_CONFIG = {
|
|
|
2266
1173
|
enableOptimisticUI: true,
|
|
2267
1174
|
requireDeleteConfirm: true
|
|
2268
1175
|
};
|
|
2269
|
-
var ANIMATION_DURATION = 400;
|
|
2270
1176
|
var DEFAULT_I18N = {
|
|
2271
1177
|
expandText: "See more",
|
|
2272
1178
|
collapseText: "See less",
|
|
@@ -2290,206 +1196,20 @@ var CommentSheetHeadless = memo(function CommentSheetHeadless2({
|
|
|
2290
1196
|
closeOnEscape = true,
|
|
2291
1197
|
enableDragToDismiss = true,
|
|
2292
1198
|
dragCloseThreshold = 150,
|
|
2293
|
-
i18n: i18nOverride
|
|
1199
|
+
i18n: i18nOverride,
|
|
1200
|
+
onGestureLock
|
|
2294
1201
|
}) {
|
|
2295
1202
|
useEffect(() => {
|
|
2296
1203
|
injectCSS();
|
|
2297
1204
|
}, []);
|
|
2298
|
-
const
|
|
2299
|
-
const dragStartY = useRef(0);
|
|
2300
|
-
const currentTranslateY = useRef(0);
|
|
2301
|
-
const isDragging = useRef(false);
|
|
2302
|
-
const [isClosing, setIsClosing] = useState(false);
|
|
2303
|
-
const isDragClosingRef = useRef(false);
|
|
2304
|
-
const closeTimeoutRef = useRef(null);
|
|
2305
|
-
const openedAtRef = useRef(0);
|
|
1205
|
+
const [replyTarget, setReplyTarget] = useState(null);
|
|
2306
1206
|
const config = useMemo(() => ({ ...DEFAULT_CONFIG, ...configOverride }), [configOverride]);
|
|
2307
1207
|
const i18n = useMemo(() => ({ ...DEFAULT_I18N, ...i18nOverride }), [i18nOverride]);
|
|
2308
|
-
const handleClose = useCallback(() => {
|
|
2309
|
-
if (isClosing) return;
|
|
2310
|
-
const timeSinceOpen = Date.now() - openedAtRef.current;
|
|
2311
|
-
if (timeSinceOpen < 100) return;
|
|
2312
|
-
setIsClosing(true);
|
|
2313
|
-
closeTimeoutRef.current = setTimeout(() => {
|
|
2314
|
-
setIsClosing(false);
|
|
2315
|
-
onClose();
|
|
2316
|
-
}, ANIMATION_DURATION);
|
|
2317
|
-
}, [isClosing, onClose]);
|
|
2318
|
-
useEffect(() => {
|
|
2319
|
-
return () => {
|
|
2320
|
-
if (closeTimeoutRef.current) {
|
|
2321
|
-
clearTimeout(closeTimeoutRef.current);
|
|
2322
|
-
}
|
|
2323
|
-
};
|
|
2324
|
-
}, []);
|
|
2325
|
-
useEffect(() => {
|
|
2326
|
-
if (isOpen) {
|
|
2327
|
-
openedAtRef.current = Date.now();
|
|
2328
|
-
setIsClosing(false);
|
|
2329
|
-
if (closeTimeoutRef.current) {
|
|
2330
|
-
clearTimeout(closeTimeoutRef.current);
|
|
2331
|
-
closeTimeoutRef.current = null;
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
}, [isOpen]);
|
|
2335
|
-
const [replyTarget, setReplyTarget] = useState(null);
|
|
2336
1208
|
useEffect(() => {
|
|
2337
1209
|
if (!isOpen) {
|
|
2338
1210
|
setReplyTarget(null);
|
|
2339
1211
|
}
|
|
2340
1212
|
}, [isOpen]);
|
|
2341
|
-
useEffect(() => {
|
|
2342
|
-
if (!closeOnEscape || !isOpen) return;
|
|
2343
|
-
const handleEscapeKey = (e) => {
|
|
2344
|
-
if (e.key === "Escape") {
|
|
2345
|
-
handleClose();
|
|
2346
|
-
}
|
|
2347
|
-
};
|
|
2348
|
-
document.addEventListener("keydown", handleEscapeKey);
|
|
2349
|
-
return () => document.removeEventListener("keydown", handleEscapeKey);
|
|
2350
|
-
}, [closeOnEscape, isOpen, handleClose]);
|
|
2351
|
-
const handleBackdropClick = useCallback(
|
|
2352
|
-
(e) => {
|
|
2353
|
-
e.stopPropagation();
|
|
2354
|
-
if (closeOnBackdropClick && e.target === e.currentTarget) {
|
|
2355
|
-
handleClose();
|
|
2356
|
-
}
|
|
2357
|
-
},
|
|
2358
|
-
[closeOnBackdropClick, handleClose]
|
|
2359
|
-
);
|
|
2360
|
-
useEffect(() => {
|
|
2361
|
-
if (!isOpen) return;
|
|
2362
|
-
const originalOverflow = document.body.style.overflow;
|
|
2363
|
-
document.body.style.overflow = "hidden";
|
|
2364
|
-
document.body.classList.add("sv-comment-sheet-open");
|
|
2365
|
-
const blockTouchMove = (e) => {
|
|
2366
|
-
const target = e.target;
|
|
2367
|
-
const isInsideSheet = target.closest(".sv-comment-sheet");
|
|
2368
|
-
if (!isInsideSheet) {
|
|
2369
|
-
e.preventDefault();
|
|
2370
|
-
e.stopPropagation();
|
|
2371
|
-
}
|
|
2372
|
-
};
|
|
2373
|
-
document.addEventListener("touchmove", blockTouchMove, { passive: false, capture: true });
|
|
2374
|
-
return () => {
|
|
2375
|
-
document.body.style.overflow = originalOverflow;
|
|
2376
|
-
document.body.classList.remove("sv-comment-sheet-open");
|
|
2377
|
-
document.removeEventListener("touchmove", blockTouchMove, { capture: true });
|
|
2378
|
-
};
|
|
2379
|
-
}, [isOpen]);
|
|
2380
|
-
const dragSourceRef = useRef(null);
|
|
2381
|
-
const isListAtTop = useCallback(() => {
|
|
2382
|
-
const list = sheetRef.current?.querySelector(".sv-comment-sheet__list");
|
|
2383
|
-
if (!list) return true;
|
|
2384
|
-
return list.scrollTop <= 0;
|
|
2385
|
-
}, []);
|
|
2386
|
-
useEffect(() => {
|
|
2387
|
-
if (!isOpen || !sheetRef.current) return;
|
|
2388
|
-
sheetRef.current.style.transform = "";
|
|
2389
|
-
sheetRef.current.style.transition = "";
|
|
2390
|
-
sheetRef.current.style.animation = "";
|
|
2391
|
-
currentTranslateY.current = 0;
|
|
2392
|
-
isDragging.current = false;
|
|
2393
|
-
dragSourceRef.current = null;
|
|
2394
|
-
isDragClosingRef.current = false;
|
|
2395
|
-
}, [isOpen]);
|
|
2396
|
-
const getDragSource = useCallback(
|
|
2397
|
-
(target) => {
|
|
2398
|
-
const isInput = target.closest(".sv-comment-sheet__input-container");
|
|
2399
|
-
if (isInput) return null;
|
|
2400
|
-
const isHeader = target.closest(".sv-comment-sheet__header");
|
|
2401
|
-
if (isHeader) return "header";
|
|
2402
|
-
const isList = target.closest(".sv-comment-sheet__list");
|
|
2403
|
-
if (isList && isListAtTop()) return "overscroll";
|
|
2404
|
-
return null;
|
|
2405
|
-
},
|
|
2406
|
-
[isListAtTop]
|
|
2407
|
-
);
|
|
2408
|
-
const animateClose = useCallback(
|
|
2409
|
-
(sheet) => {
|
|
2410
|
-
isDragClosingRef.current = true;
|
|
2411
|
-
setIsClosing(true);
|
|
2412
|
-
sheet.style.transition = `transform ${ANIMATION_DURATION}ms cubic-bezier(0.32, 0.72, 0, 1)`;
|
|
2413
|
-
sheet.style.transform = "translateY(100%)";
|
|
2414
|
-
closeTimeoutRef.current = setTimeout(() => {
|
|
2415
|
-
sheet.style.transition = "";
|
|
2416
|
-
sheet.style.transform = "";
|
|
2417
|
-
sheet.style.animation = "";
|
|
2418
|
-
isDragClosingRef.current = false;
|
|
2419
|
-
setIsClosing(false);
|
|
2420
|
-
onClose();
|
|
2421
|
-
}, ANIMATION_DURATION);
|
|
2422
|
-
},
|
|
2423
|
-
[onClose]
|
|
2424
|
-
);
|
|
2425
|
-
const animateSnapBack = useCallback((sheet) => {
|
|
2426
|
-
sheet.style.transition = `transform ${ANIMATION_DURATION}ms cubic-bezier(0.32, 0.72, 0, 1)`;
|
|
2427
|
-
sheet.style.transform = "translateY(0)";
|
|
2428
|
-
setTimeout(() => {
|
|
2429
|
-
sheet.style.transition = "";
|
|
2430
|
-
sheet.style.transform = "";
|
|
2431
|
-
}, ANIMATION_DURATION);
|
|
2432
|
-
}, []);
|
|
2433
|
-
useEffect(() => {
|
|
2434
|
-
const sheet = sheetRef.current;
|
|
2435
|
-
if (!sheet || !isOpen || !enableDragToDismiss) return;
|
|
2436
|
-
const onTouchStart = (e) => {
|
|
2437
|
-
e.stopPropagation();
|
|
2438
|
-
const source = getDragSource(e.target);
|
|
2439
|
-
if (!source) return;
|
|
2440
|
-
dragSourceRef.current = source;
|
|
2441
|
-
isDragging.current = true;
|
|
2442
|
-
dragStartY.current = e.touches[0]?.clientY ?? 0;
|
|
2443
|
-
currentTranslateY.current = 0;
|
|
2444
|
-
sheet.style.animation = "none";
|
|
2445
|
-
sheet.style.transition = "none";
|
|
2446
|
-
void sheet.offsetHeight;
|
|
2447
|
-
};
|
|
2448
|
-
const onTouchMove = (e) => {
|
|
2449
|
-
e.stopPropagation();
|
|
2450
|
-
const clientY = e.touches[0]?.clientY ?? 0;
|
|
2451
|
-
const deltaY = clientY - dragStartY.current;
|
|
2452
|
-
if (dragSourceRef.current === "overscroll" && (deltaY <= 0 || !isListAtTop())) {
|
|
2453
|
-
isDragging.current = false;
|
|
2454
|
-
return;
|
|
2455
|
-
}
|
|
2456
|
-
if (!isDragging.current) return;
|
|
2457
|
-
currentTranslateY.current = Math.max(0, deltaY);
|
|
2458
|
-
if (currentTranslateY.current > 0) {
|
|
2459
|
-
e.preventDefault();
|
|
2460
|
-
}
|
|
2461
|
-
sheet.style.transform = `translateY(${currentTranslateY.current}px)`;
|
|
2462
|
-
};
|
|
2463
|
-
const onTouchEnd = (e) => {
|
|
2464
|
-
e.stopPropagation();
|
|
2465
|
-
dragSourceRef.current = null;
|
|
2466
|
-
if (!isDragging.current) return;
|
|
2467
|
-
isDragging.current = false;
|
|
2468
|
-
const dragDistance = currentTranslateY.current;
|
|
2469
|
-
currentTranslateY.current = 0;
|
|
2470
|
-
if (dragDistance > dragCloseThreshold) {
|
|
2471
|
-
animateClose(sheet);
|
|
2472
|
-
} else if (dragDistance > 0) {
|
|
2473
|
-
animateSnapBack(sheet);
|
|
2474
|
-
}
|
|
2475
|
-
};
|
|
2476
|
-
sheet.addEventListener("touchstart", onTouchStart, { passive: false });
|
|
2477
|
-
sheet.addEventListener("touchmove", onTouchMove, { passive: false });
|
|
2478
|
-
sheet.addEventListener("touchend", onTouchEnd, { passive: false });
|
|
2479
|
-
return () => {
|
|
2480
|
-
sheet.removeEventListener("touchstart", onTouchStart);
|
|
2481
|
-
sheet.removeEventListener("touchmove", onTouchMove);
|
|
2482
|
-
sheet.removeEventListener("touchend", onTouchEnd);
|
|
2483
|
-
};
|
|
2484
|
-
}, [
|
|
2485
|
-
isOpen,
|
|
2486
|
-
enableDragToDismiss,
|
|
2487
|
-
dragCloseThreshold,
|
|
2488
|
-
isListAtTop,
|
|
2489
|
-
getDragSource,
|
|
2490
|
-
animateClose,
|
|
2491
|
-
animateSnapBack
|
|
2492
|
-
]);
|
|
2493
1213
|
const contextValue = useMemo(
|
|
2494
1214
|
() => ({
|
|
2495
1215
|
state,
|
|
@@ -2497,70 +1217,41 @@ var CommentSheetHeadless = memo(function CommentSheetHeadless2({
|
|
|
2497
1217
|
videoId,
|
|
2498
1218
|
config,
|
|
2499
1219
|
isOpen,
|
|
2500
|
-
onClose
|
|
2501
|
-
// Use animated close handler
|
|
1220
|
+
onClose,
|
|
2502
1221
|
replyTarget,
|
|
2503
1222
|
setReplyTarget,
|
|
2504
1223
|
initialCount,
|
|
2505
1224
|
i18n
|
|
2506
1225
|
}),
|
|
2507
|
-
[state, actions, videoId, config, isOpen,
|
|
1226
|
+
[state, actions, videoId, config, isOpen, onClose, replyTarget, initialCount, i18n]
|
|
2508
1227
|
);
|
|
2509
1228
|
const defaultChildren = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2510
1229
|
/* @__PURE__ */ jsx(SheetHeader, {}),
|
|
2511
1230
|
/* @__PURE__ */ jsx(CommentList, {}),
|
|
2512
1231
|
/* @__PURE__ */ jsx(CommentInput, {})
|
|
2513
1232
|
] });
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
onTouchMove: (e) => e.stopPropagation(),
|
|
2537
|
-
onTouchEnd: (e) => e.stopPropagation(),
|
|
2538
|
-
role: "presentation"
|
|
2539
|
-
}
|
|
2540
|
-
),
|
|
2541
|
-
/* @__PURE__ */ jsx(
|
|
2542
|
-
"div",
|
|
2543
|
-
{
|
|
2544
|
-
ref: sheetRef,
|
|
2545
|
-
className: clsx(
|
|
2546
|
-
"sv-comment-sheet",
|
|
2547
|
-
isOpen && "sv-comment-sheet--open",
|
|
2548
|
-
// Keep --open while closing for proper animation
|
|
2549
|
-
isClosing && !isDragClosingRef.current && "sv-comment-sheet--closing",
|
|
2550
|
-
// Skip CSS animation for drag close
|
|
2551
|
-
className
|
|
2552
|
-
),
|
|
2553
|
-
"aria-label": "Comments",
|
|
2554
|
-
"aria-hidden": !isOpen,
|
|
2555
|
-
onKeyDown: handleKeyDown,
|
|
2556
|
-
tabIndex: isOpen ? 0 : -1,
|
|
2557
|
-
onClick: (e) => e.stopPropagation(),
|
|
2558
|
-
onPointerDown: (e) => e.stopPropagation(),
|
|
2559
|
-
onPointerUp: (e) => e.stopPropagation(),
|
|
2560
|
-
children: children ?? defaultChildren
|
|
2561
|
-
}
|
|
2562
|
-
)
|
|
2563
|
-
] });
|
|
1233
|
+
return /* @__PURE__ */ jsx(CommentSheetContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
1234
|
+
BottomSheetHeadless,
|
|
1235
|
+
{
|
|
1236
|
+
isOpen,
|
|
1237
|
+
onClose,
|
|
1238
|
+
height: "var(--sv-comment-sheet-height, 55vh)",
|
|
1239
|
+
className: clsx("sv-comment-sheet", className),
|
|
1240
|
+
backdropClassName: clsx("sv-comment-sheet-backdrop", backdropClassName),
|
|
1241
|
+
contentClassName: "sv-comment-sheet__content",
|
|
1242
|
+
closeOnBackdropClick,
|
|
1243
|
+
closeOnEscape,
|
|
1244
|
+
showDragHandle: false,
|
|
1245
|
+
enableDragToDismiss,
|
|
1246
|
+
dragCloseThreshold,
|
|
1247
|
+
ariaLabel: "Comments",
|
|
1248
|
+
dragHandleSelector: ".sv-comment-sheet__header",
|
|
1249
|
+
scrollContainerSelector: ".sv-comment-sheet__list",
|
|
1250
|
+
dragExcludeSelector: ".sv-comment-sheet__input-container",
|
|
1251
|
+
onGestureLock,
|
|
1252
|
+
children: children ?? defaultChildren
|
|
1253
|
+
}
|
|
1254
|
+
) });
|
|
2564
1255
|
});
|
|
2565
1256
|
CommentSheetHeadless.displayName = "CommentSheetHeadless";
|
|
2566
1257
|
var CommentSheet = Object.assign(CommentSheetHeadless, {
|