@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
package/dist/chunk-SZXFH334.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { injectComponentCSS } from './chunk-RMLTPW5S.js';
|
|
2
|
-
import { useInsertionEffect, Component } from 'react';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
// src/components/ErrorBoundary/ErrorBoundary.css.ts
|
|
6
|
-
var ERROR_BOUNDARY_CSS = `
|
|
7
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
8
|
-
* ErrorBoundary Styles
|
|
9
|
-
* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
10
|
-
|
|
11
|
-
.sv-error-boundary {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
|
-
background: var(--sv-bg-primary, #000);
|
|
18
|
-
color: var(--sv-text-primary, #fff);
|
|
19
|
-
font-family: var(--sv-font-family, 'Urbanist', sans-serif);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
23
|
-
* Error State
|
|
24
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
25
|
-
|
|
26
|
-
.sv-error-boundary--error .sv-error-boundary__content {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
align-items: center;
|
|
30
|
-
gap: var(--sv-spacing-md, 16px);
|
|
31
|
-
padding: var(--sv-spacing-lg, 24px);
|
|
32
|
-
text-align: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.sv-error-boundary__icon {
|
|
36
|
-
font-size: 48px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.sv-error-boundary__message {
|
|
40
|
-
font-size: var(--sv-font-size-md, 14px);
|
|
41
|
-
color: var(--sv-text-secondary, #999);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.sv-error-boundary__retry {
|
|
45
|
-
padding: var(--sv-spacing-sm, 8px) var(--sv-spacing-lg, 24px);
|
|
46
|
-
border: none;
|
|
47
|
-
border-radius: var(--sv-border-radius-md, 8px);
|
|
48
|
-
background: var(--sv-color-primary, #fe2c55);
|
|
49
|
-
color: #fff;
|
|
50
|
-
font-size: var(--sv-font-size-sm, 13px);
|
|
51
|
-
font-weight: var(--sv-font-weight-medium, 500);
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
transition: opacity 0.2s ease;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.sv-error-boundary__retry:hover {
|
|
57
|
-
opacity: 0.9;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.sv-error-boundary__retry:active {
|
|
61
|
-
opacity: 0.8;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
65
|
-
* Toast State (auto-skip with notification)
|
|
66
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
67
|
-
|
|
68
|
-
.sv-error-boundary--toast {
|
|
69
|
-
position: relative;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.sv-error-boundary__toast {
|
|
73
|
-
position: absolute;
|
|
74
|
-
bottom: var(--sv-spacing-xl, 32px);
|
|
75
|
-
left: 50%;
|
|
76
|
-
transform: translateX(-50%);
|
|
77
|
-
padding: var(--sv-spacing-sm, 8px) var(--sv-spacing-md, 16px);
|
|
78
|
-
border-radius: var(--sv-border-radius-md, 8px);
|
|
79
|
-
background: rgba(0, 0, 0, 0.8);
|
|
80
|
-
color: #fff;
|
|
81
|
-
font-size: var(--sv-font-size-sm, 13px);
|
|
82
|
-
white-space: nowrap;
|
|
83
|
-
animation: sv-toast-fade-in 0.3s ease;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@keyframes sv-toast-fade-in {
|
|
87
|
-
from {
|
|
88
|
-
opacity: 0;
|
|
89
|
-
transform: translateX(-50%) translateY(10px);
|
|
90
|
-
}
|
|
91
|
-
to {
|
|
92
|
-
opacity: 1;
|
|
93
|
-
transform: translateX(-50%) translateY(0);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
98
|
-
* Loading State (silent auto-skip)
|
|
99
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
100
|
-
|
|
101
|
-
.sv-error-boundary--loading {
|
|
102
|
-
background: var(--sv-bg-primary, #000);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.sv-error-boundary__spinner {
|
|
106
|
-
width: 32px;
|
|
107
|
-
height: 32px;
|
|
108
|
-
border: 3px solid rgba(255, 255, 255, 0.2);
|
|
109
|
-
border-top-color: var(--sv-color-primary, #fe2c55);
|
|
110
|
-
border-radius: 50%;
|
|
111
|
-
animation: sv-spinner 0.8s linear infinite;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@keyframes sv-spinner {
|
|
115
|
-
to {
|
|
116
|
-
transform: rotate(360deg);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`;
|
|
120
|
-
var ErrorBoundaryInternal = class extends Component {
|
|
121
|
-
constructor(props) {
|
|
122
|
-
super(props);
|
|
123
|
-
this.skipTimeoutId = null;
|
|
124
|
-
this.reset = () => {
|
|
125
|
-
const { onReset } = this.props;
|
|
126
|
-
this.clearSkipTimeout();
|
|
127
|
-
this.setState({ hasError: false, error: null, errorInfo: null });
|
|
128
|
-
onReset?.();
|
|
129
|
-
};
|
|
130
|
-
this.state = { hasError: false, error: null, errorInfo: null };
|
|
131
|
-
}
|
|
132
|
-
static getDerivedStateFromError(error) {
|
|
133
|
-
return { hasError: true, error };
|
|
134
|
-
}
|
|
135
|
-
componentDidCatch(error, errorInfo) {
|
|
136
|
-
const { onError, mode = "show-error", skipDelay = 1e3 } = this.props;
|
|
137
|
-
this.setState({ errorInfo });
|
|
138
|
-
onError?.(error, errorInfo);
|
|
139
|
-
if (!this.skipTimeoutId && (mode === "auto-skip" || mode === "auto-skip-with-toast")) {
|
|
140
|
-
this.skipTimeoutId = setTimeout(() => {
|
|
141
|
-
this.handleSkip();
|
|
142
|
-
}, skipDelay);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
componentWillUnmount() {
|
|
146
|
-
this.clearSkipTimeout();
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Handle skip action with error safeguard
|
|
150
|
-
* Wraps onSkip in try/finally to ensure reset() is always called
|
|
151
|
-
*/
|
|
152
|
-
handleSkip() {
|
|
153
|
-
const { onSkip } = this.props;
|
|
154
|
-
try {
|
|
155
|
-
onSkip?.();
|
|
156
|
-
} finally {
|
|
157
|
-
this.reset();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
clearSkipTimeout() {
|
|
161
|
-
if (this.skipTimeoutId) {
|
|
162
|
-
clearTimeout(this.skipTimeoutId);
|
|
163
|
-
this.skipTimeoutId = null;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
render() {
|
|
167
|
-
const {
|
|
168
|
-
children,
|
|
169
|
-
fallback,
|
|
170
|
-
mode = "show-error",
|
|
171
|
-
toastMessage = "Video unavailable, skipping..."
|
|
172
|
-
} = this.props;
|
|
173
|
-
const { hasError, error, errorInfo } = this.state;
|
|
174
|
-
if (!hasError) {
|
|
175
|
-
return children;
|
|
176
|
-
}
|
|
177
|
-
if (fallback) {
|
|
178
|
-
if (typeof fallback === "function") {
|
|
179
|
-
return fallback(error ?? new Error("Unknown error"), errorInfo, this.reset);
|
|
180
|
-
}
|
|
181
|
-
return fallback;
|
|
182
|
-
}
|
|
183
|
-
if (mode === "auto-skip-with-toast") {
|
|
184
|
-
return /* @__PURE__ */ jsx("div", { className: "sv-error-boundary sv-error-boundary--toast", children: /* @__PURE__ */ jsx("div", { className: "sv-error-boundary__toast", children: toastMessage }) });
|
|
185
|
-
}
|
|
186
|
-
if (mode === "auto-skip") {
|
|
187
|
-
return /* @__PURE__ */ jsx("div", { className: "sv-error-boundary sv-error-boundary--loading" });
|
|
188
|
-
}
|
|
189
|
-
return /* @__PURE__ */ jsx("div", { className: "sv-error-boundary sv-error-boundary--error", children: /* @__PURE__ */ jsxs("div", { className: "sv-error-boundary__content", children: [
|
|
190
|
-
/* @__PURE__ */ jsx("div", { className: "sv-error-boundary__icon", children: "\u26A0\uFE0F" }),
|
|
191
|
-
/* @__PURE__ */ jsx("div", { className: "sv-error-boundary__message", children: "Something went wrong" }),
|
|
192
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "sv-error-boundary__retry", onClick: this.reset, children: "Try Again" })
|
|
193
|
-
] }) });
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
function ErrorBoundary(props) {
|
|
197
|
-
const { cssKey = "sv-error-boundary" } = props;
|
|
198
|
-
useInsertionEffect(() => {
|
|
199
|
-
return injectComponentCSS(cssKey, ERROR_BOUNDARY_CSS);
|
|
200
|
-
}, [cssKey]);
|
|
201
|
-
return /* @__PURE__ */ jsx(ErrorBoundaryInternal, { ...props });
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export { ErrorBoundary };
|
package/dist/chunk-UNV3NWN6.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { clsx2 } from './chunk-EDWS2IPH.js';
|
|
2
|
-
import { injectComponentCSS } from './chunk-RMLTPW5S.js';
|
|
3
|
-
import { useInsertionEffect } from 'react';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
// src/components/Skeleton/Skeleton.css.ts
|
|
7
|
-
var SKELETON_CSS = `
|
|
8
|
-
/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
9
|
-
* Skeleton Styles
|
|
10
|
-
* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */
|
|
11
|
-
|
|
12
|
-
.sv-skeleton {
|
|
13
|
-
display: block;
|
|
14
|
-
background: var(--sv-skeleton-bg, rgba(255, 255, 255, 0.1));
|
|
15
|
-
border-radius: var(--sv-border-radius-sm, 4px);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
19
|
-
* Pulse Animation
|
|
20
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
21
|
-
|
|
22
|
-
.sv-skeleton--pulse {
|
|
23
|
-
animation: sv-skeleton-pulse 1.5s ease-in-out infinite;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@keyframes sv-skeleton-pulse {
|
|
27
|
-
0%, 100% {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
}
|
|
30
|
-
50% {
|
|
31
|
-
opacity: 0.4;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
36
|
-
* Wave Animation
|
|
37
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
38
|
-
|
|
39
|
-
.sv-skeleton--wave {
|
|
40
|
-
position: relative;
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.sv-skeleton--wave::after {
|
|
45
|
-
content: '';
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 0;
|
|
48
|
-
left: 0;
|
|
49
|
-
right: 0;
|
|
50
|
-
bottom: 0;
|
|
51
|
-
background: linear-gradient(
|
|
52
|
-
90deg,
|
|
53
|
-
transparent,
|
|
54
|
-
rgba(255, 255, 255, 0.1),
|
|
55
|
-
transparent
|
|
56
|
-
);
|
|
57
|
-
animation: sv-skeleton-wave 1.5s ease-in-out infinite;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@keyframes sv-skeleton-wave {
|
|
61
|
-
0% {
|
|
62
|
-
transform: translateX(-100%);
|
|
63
|
-
}
|
|
64
|
-
100% {
|
|
65
|
-
transform: translateX(100%);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
70
|
-
* Preset: Video
|
|
71
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
72
|
-
|
|
73
|
-
.sv-skeleton-video {
|
|
74
|
-
width: 100%;
|
|
75
|
-
height: 100%;
|
|
76
|
-
background: var(--sv-bg-primary, #000);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
80
|
-
* Dark Mode Support
|
|
81
|
-
* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
82
|
-
|
|
83
|
-
:root[data-theme="light"] .sv-skeleton,
|
|
84
|
-
.light .sv-skeleton {
|
|
85
|
-
background: var(--sv-skeleton-bg-light, rgba(0, 0, 0, 0.1));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
:root[data-theme="light"] .sv-skeleton--wave::after,
|
|
89
|
-
.light .sv-skeleton--wave::after {
|
|
90
|
-
background: linear-gradient(
|
|
91
|
-
90deg,
|
|
92
|
-
transparent,
|
|
93
|
-
rgba(0, 0, 0, 0.05),
|
|
94
|
-
transparent
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
function Skeleton({
|
|
99
|
-
width,
|
|
100
|
-
height,
|
|
101
|
-
borderRadius,
|
|
102
|
-
animation = "pulse",
|
|
103
|
-
circle = false,
|
|
104
|
-
className
|
|
105
|
-
}) {
|
|
106
|
-
useInsertionEffect(() => {
|
|
107
|
-
return injectComponentCSS("skeleton", SKELETON_CSS);
|
|
108
|
-
}, []);
|
|
109
|
-
const style = {};
|
|
110
|
-
if (width !== void 0) {
|
|
111
|
-
style.width = typeof width === "number" ? `${width}px` : width;
|
|
112
|
-
}
|
|
113
|
-
if (height !== void 0) {
|
|
114
|
-
style.height = typeof height === "number" ? `${height}px` : height;
|
|
115
|
-
}
|
|
116
|
-
if (borderRadius !== void 0) {
|
|
117
|
-
style.borderRadius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
118
|
-
} else if (circle) {
|
|
119
|
-
style.borderRadius = "50%";
|
|
120
|
-
}
|
|
121
|
-
return /* @__PURE__ */ jsx(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
className: clsx2("sv-skeleton", animation !== "none" && `sv-skeleton--${animation}`, className),
|
|
125
|
-
style,
|
|
126
|
-
"aria-hidden": "true"
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
function SkeletonVideo({
|
|
131
|
-
className
|
|
132
|
-
}) {
|
|
133
|
-
return /* @__PURE__ */ jsx("div", { className: clsx2("sv-skeleton-video", className), children: /* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "100%", animation: "wave" }) });
|
|
134
|
-
}
|
|
135
|
-
function SkeletonAvatar({
|
|
136
|
-
size = 40,
|
|
137
|
-
className
|
|
138
|
-
}) {
|
|
139
|
-
return /* @__PURE__ */ jsx(Skeleton, { width: size, height: size, circle: true, className });
|
|
140
|
-
}
|
|
141
|
-
function SkeletonText({
|
|
142
|
-
width = "100%",
|
|
143
|
-
className
|
|
144
|
-
}) {
|
|
145
|
-
return /* @__PURE__ */ jsx(Skeleton, { width, height: 14, borderRadius: 4, className });
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { Skeleton, SkeletonAvatar, SkeletonText, SkeletonVideo };
|