@zlooks.cn/password-auth-server 1.0.1 → 1.0.3
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/.hile-rsc/{build-mtimy4oq-2ea9fd56/client-browser/chunks/chunk-Q3WJINFG.js → build-mtsn68qv-a841a566/client-browser/chunks/chunk-CZF5VGOJ.js} +40056 -45866
- package/.hile-rsc/build-mtsn68qv-a841a566/client-browser/src-plugin-page-frame-07c4de56a6-C2WHPDGD.js +2312 -0
- package/.hile-rsc/build-mtsn68qv-a841a566/client-browser/src-plugin-password-form-3bd63d69e5-G5UQAB5W.js +4494 -0
- package/.hile-rsc/build-mtsn68qv-a841a566/client-ssr/chunks/chunk-RMKQVF3F.js +36281 -0
- package/.hile-rsc/build-mtsn68qv-a841a566/client-ssr/src-plugin-page-frame-07c4de56a6-ICZZGKBP.js +15609 -0
- package/.hile-rsc/{build-mtimy4oq-2ea9fd56/client-ssr/chunks/chunk-36DACA7C.js → build-mtsn68qv-a841a566/client-ssr/src-plugin-password-form-3bd63d69e5-UV3K6EC6.js} +104665 -140085
- package/.hile-rsc/{build-mtimy4oq-2ea9fd56 → build-mtsn68qv-a841a566}/plugin.json +18 -18
- package/.hile-rsc/{build-mtimy4oq-2ea9fd56 → build-mtsn68qv-a841a566}/server-rsc/index.js +2 -2
- package/package.json +12 -12
- package/.hile-rsc/build-mtimy4oq-2ea9fd56/client-browser/src-plugin-page-frame-07c4de56a6-OCDODDFY.js +0 -440
- package/.hile-rsc/build-mtimy4oq-2ea9fd56/client-browser/src-plugin-password-form-3bd63d69e5-CCNUYY62.js +0 -706
- package/.hile-rsc/build-mtimy4oq-2ea9fd56/client-ssr/src-plugin-page-frame-07c4de56a6-SYE4RRNX.js +0 -441
- package/.hile-rsc/build-mtimy4oq-2ea9fd56/client-ssr/src-plugin-password-form-3bd63d69e5-YVCPJXLL.js +0 -708
- /package/.hile-rsc/{build-mtimy4oq-2ea9fd56 → build-mtsn68qv-a841a566}/client-browser/src-plugin-page-frame-07c4de56a6-3F24AYCH.css +0 -0
- /package/.hile-rsc/{build-mtimy4oq-2ea9fd56 → build-mtsn68qv-a841a566}/client-browser/src-plugin-password-form-3bd63d69e5-TRYMJX4F.css +0 -0
- /package/.hile-rsc/{build-mtimy4oq-2ea9fd56 → build-mtsn68qv-a841a566}/styles/4b3193c4f2b317ffed425ccf401342a4bdd6ccfd5f9c42def3315e776f166975.css +0 -0
|
@@ -0,0 +1,2312 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AntdIconLight_default,
|
|
4
|
+
App_default,
|
|
5
|
+
Button_default,
|
|
6
|
+
Fragment,
|
|
7
|
+
KeyCode_default,
|
|
8
|
+
LoadingOutlined_default,
|
|
9
|
+
Modal_default,
|
|
10
|
+
RscLink,
|
|
11
|
+
TextArea_default,
|
|
12
|
+
__commonJS,
|
|
13
|
+
__toESM,
|
|
14
|
+
_toConsumableArray,
|
|
15
|
+
cloneElement,
|
|
16
|
+
clsx,
|
|
17
|
+
composeRef,
|
|
18
|
+
config_provider_default,
|
|
19
|
+
createContext,
|
|
20
|
+
createElement,
|
|
21
|
+
deepFreeze,
|
|
22
|
+
devUseWarning,
|
|
23
|
+
divider_default,
|
|
24
|
+
empty_default,
|
|
25
|
+
es_default2 as es_default,
|
|
26
|
+
flex_default,
|
|
27
|
+
forwardRef,
|
|
28
|
+
genStyleHooks,
|
|
29
|
+
gold,
|
|
30
|
+
isFunction,
|
|
31
|
+
isNonNullable,
|
|
32
|
+
isNumber,
|
|
33
|
+
isPlainObject,
|
|
34
|
+
isReactRenderable,
|
|
35
|
+
isRequestError,
|
|
36
|
+
isStyleSupport,
|
|
37
|
+
isValidElement,
|
|
38
|
+
jsx,
|
|
39
|
+
jsxs,
|
|
40
|
+
merge,
|
|
41
|
+
omit,
|
|
42
|
+
operationUnit,
|
|
43
|
+
popover_default,
|
|
44
|
+
resetComponent,
|
|
45
|
+
responsiveArray,
|
|
46
|
+
space_default,
|
|
47
|
+
textEllipsis,
|
|
48
|
+
theme_default,
|
|
49
|
+
toArray,
|
|
50
|
+
tooltip_default,
|
|
51
|
+
unit,
|
|
52
|
+
useBreakpoint_default,
|
|
53
|
+
useCSSVarCls_default,
|
|
54
|
+
useCallback,
|
|
55
|
+
useComponentConfig,
|
|
56
|
+
useContext,
|
|
57
|
+
useControlledState,
|
|
58
|
+
useDelayState,
|
|
59
|
+
useEffect,
|
|
60
|
+
useEvent_default,
|
|
61
|
+
useImperativeHandle,
|
|
62
|
+
useLayoutEffect_default,
|
|
63
|
+
useLocale_default,
|
|
64
|
+
useMemo,
|
|
65
|
+
useMergeSemantic,
|
|
66
|
+
useRef,
|
|
67
|
+
useRequest,
|
|
68
|
+
useRscNavigation,
|
|
69
|
+
useSemanticRootStyle,
|
|
70
|
+
useSize_default,
|
|
71
|
+
useState,
|
|
72
|
+
useSyncExternalStore,
|
|
73
|
+
useZlooksApp,
|
|
74
|
+
warning_default
|
|
75
|
+
} from "./chunks/chunk-CZF5VGOJ.js";
|
|
76
|
+
|
|
77
|
+
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EditOutlined.js
|
|
78
|
+
var require_EditOutlined = __commonJS({
|
|
79
|
+
"../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EditOutlined.js"(exports) {
|
|
80
|
+
"use strict";
|
|
81
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
82
|
+
var EditOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, "name": "edit", "theme": "outlined" };
|
|
83
|
+
exports.default = EditOutlined2;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EnterOutlined.js
|
|
88
|
+
var require_EnterOutlined = __commonJS({
|
|
89
|
+
"../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EnterOutlined.js"(exports) {
|
|
90
|
+
"use strict";
|
|
91
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
92
|
+
var EnterOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, "name": "enter", "theme": "outlined" };
|
|
93
|
+
exports.default = EnterOutlined2;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/CheckOutlined.js
|
|
98
|
+
var require_CheckOutlined = __commonJS({
|
|
99
|
+
"../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/CheckOutlined.js"(exports) {
|
|
100
|
+
"use strict";
|
|
101
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
102
|
+
var CheckOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
|
|
103
|
+
exports.default = CheckOutlined2;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/CopyOutlined.js
|
|
108
|
+
var require_CopyOutlined = __commonJS({
|
|
109
|
+
"../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/CopyOutlined.js"(exports) {
|
|
110
|
+
"use strict";
|
|
111
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
112
|
+
var CopyOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, "name": "copy", "theme": "outlined" };
|
|
113
|
+
exports.default = CopyOutlined2;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// ../ui/dist/theme.js
|
|
118
|
+
var theme = {
|
|
119
|
+
token: {
|
|
120
|
+
colorPrimary: "#1677ff",
|
|
121
|
+
borderRadius: 10,
|
|
122
|
+
motion: true,
|
|
123
|
+
fontFamily: [
|
|
124
|
+
"-apple-system",
|
|
125
|
+
"BlinkMacSystemFont",
|
|
126
|
+
"'Segoe UI'",
|
|
127
|
+
"Roboto",
|
|
128
|
+
"'Helvetica Neue'",
|
|
129
|
+
"Arial",
|
|
130
|
+
"'Noto Sans'",
|
|
131
|
+
"sans-serif"
|
|
132
|
+
].join(", ")
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var zlooksTheme = deepFreeze(theme);
|
|
136
|
+
|
|
137
|
+
// ../ui/dist/theme-preference.js
|
|
138
|
+
var THEME_STORAGE_KEY = "zlooks.theme";
|
|
139
|
+
var THEME_CHANGE_EVENT = "zlooks:theme-change";
|
|
140
|
+
var memoryMode = "default";
|
|
141
|
+
function useZlooksTheme() {
|
|
142
|
+
const mode = useSyncExternalStore(subscribeThemePreference, readClientThemeMode, readServerThemeMode);
|
|
143
|
+
return { mode, setMode: setThemeMode };
|
|
144
|
+
}
|
|
145
|
+
function parseStoredZlooksThemeMode(value) {
|
|
146
|
+
return value === "dark" || value === "light" || value === "default" ? value : "default";
|
|
147
|
+
}
|
|
148
|
+
function readClientThemeMode() {
|
|
149
|
+
if (typeof window === "undefined")
|
|
150
|
+
return memoryMode;
|
|
151
|
+
try {
|
|
152
|
+
const stored = window.localStorage.getItem(THEME_STORAGE_KEY);
|
|
153
|
+
if (stored !== null)
|
|
154
|
+
memoryMode = parseStoredZlooksThemeMode(stored);
|
|
155
|
+
} catch {
|
|
156
|
+
}
|
|
157
|
+
return memoryMode;
|
|
158
|
+
}
|
|
159
|
+
function readServerThemeMode() {
|
|
160
|
+
return "default";
|
|
161
|
+
}
|
|
162
|
+
function setThemeMode(mode) {
|
|
163
|
+
if (parseStoredZlooksThemeMode(mode) !== mode) {
|
|
164
|
+
throw new TypeError(`Unsupported Zlooks theme mode: ${String(mode)}`);
|
|
165
|
+
}
|
|
166
|
+
memoryMode = mode;
|
|
167
|
+
if (typeof window === "undefined")
|
|
168
|
+
return;
|
|
169
|
+
try {
|
|
170
|
+
window.localStorage.setItem(THEME_STORAGE_KEY, mode);
|
|
171
|
+
} catch {
|
|
172
|
+
}
|
|
173
|
+
window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: mode }));
|
|
174
|
+
}
|
|
175
|
+
function subscribeThemePreference(notify) {
|
|
176
|
+
if (typeof window === "undefined")
|
|
177
|
+
return () => void 0;
|
|
178
|
+
const handleThemeChange = (event) => {
|
|
179
|
+
memoryMode = parseStoredZlooksThemeMode(event.detail);
|
|
180
|
+
notify();
|
|
181
|
+
};
|
|
182
|
+
const handleStorage = (event) => {
|
|
183
|
+
if (event.key !== THEME_STORAGE_KEY)
|
|
184
|
+
return;
|
|
185
|
+
memoryMode = parseStoredZlooksThemeMode(event.newValue);
|
|
186
|
+
notify();
|
|
187
|
+
};
|
|
188
|
+
window.addEventListener(THEME_CHANGE_EVENT, handleThemeChange);
|
|
189
|
+
window.addEventListener("storage", handleStorage);
|
|
190
|
+
return () => {
|
|
191
|
+
window.removeEventListener(THEME_CHANGE_EVENT, handleThemeChange);
|
|
192
|
+
window.removeEventListener("storage", handleStorage);
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// ../ui/dist/provider.js
|
|
197
|
+
var App = moduleDefault(App_default);
|
|
198
|
+
var ConfigProvider = moduleDefault(config_provider_default);
|
|
199
|
+
var antdTheme = moduleDefault(theme_default);
|
|
200
|
+
function ZlooksUiProvider({ children, theme: theme2 }) {
|
|
201
|
+
const preference = useZlooksTheme();
|
|
202
|
+
const { resolvedMode, resolvedTheme } = useZlooksThemeRuntime(theme2 ?? preference.mode);
|
|
203
|
+
return jsx(ConfigProvider, { button: { autoInsertSpace: false }, theme: resolvedTheme, children: jsx(App, { children: jsx("div", { className: "zlooks-ui-theme", "data-zlooks-theme": resolvedMode, children }) }) });
|
|
204
|
+
}
|
|
205
|
+
function useZlooksThemeRuntime(theme2) {
|
|
206
|
+
const systemDark = useSystemDarkTheme(theme2 === "default");
|
|
207
|
+
const resolvedMode = theme2 === "default" ? systemDark ? "dark" : "light" : theme2;
|
|
208
|
+
const resolvedTheme = useMemo(() => ({
|
|
209
|
+
...zlooksTheme,
|
|
210
|
+
algorithm: resolvedMode === "dark" ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm,
|
|
211
|
+
cssVar: { key: `zlooks-${resolvedMode}` },
|
|
212
|
+
hashed: false,
|
|
213
|
+
zeroRuntime: true
|
|
214
|
+
}), [resolvedMode]);
|
|
215
|
+
return { resolvedMode, resolvedTheme };
|
|
216
|
+
}
|
|
217
|
+
function useSystemDarkTheme(enabled) {
|
|
218
|
+
const [dark, setDark] = useState(false);
|
|
219
|
+
useEffect(() => {
|
|
220
|
+
if (!enabled)
|
|
221
|
+
return;
|
|
222
|
+
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
223
|
+
const update = () => setDark(media.matches);
|
|
224
|
+
update();
|
|
225
|
+
media.addEventListener("change", update);
|
|
226
|
+
return () => media.removeEventListener("change", update);
|
|
227
|
+
}, [enabled]);
|
|
228
|
+
return dark;
|
|
229
|
+
}
|
|
230
|
+
function moduleDefault(value) {
|
|
231
|
+
return value && typeof value === "object" && "default" in value ? value.default : value;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/avatar/AvatarContext.js
|
|
235
|
+
var AvatarContext = /* @__PURE__ */ createContext({});
|
|
236
|
+
var AvatarContext_default = AvatarContext;
|
|
237
|
+
|
|
238
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/avatar/style/index.js
|
|
239
|
+
var genBaseStyle = (token) => {
|
|
240
|
+
const {
|
|
241
|
+
antCls,
|
|
242
|
+
componentCls,
|
|
243
|
+
iconCls,
|
|
244
|
+
avatarBg,
|
|
245
|
+
avatarColor,
|
|
246
|
+
containerSize,
|
|
247
|
+
containerSizeLG,
|
|
248
|
+
containerSizeSM,
|
|
249
|
+
textFontSize,
|
|
250
|
+
textFontSizeLG,
|
|
251
|
+
textFontSizeSM,
|
|
252
|
+
iconFontSize,
|
|
253
|
+
iconFontSizeLG,
|
|
254
|
+
iconFontSizeSM,
|
|
255
|
+
borderRadius,
|
|
256
|
+
borderRadiusLG,
|
|
257
|
+
borderRadiusSM,
|
|
258
|
+
lineWidth,
|
|
259
|
+
lineType
|
|
260
|
+
} = token;
|
|
261
|
+
const avatarSizeStyle = (size, fontSize, iconFontSize2, radius) => ({
|
|
262
|
+
width: size,
|
|
263
|
+
height: size,
|
|
264
|
+
borderRadius: "50%",
|
|
265
|
+
fontSize,
|
|
266
|
+
[`&${componentCls}-square`]: {
|
|
267
|
+
borderRadius: radius
|
|
268
|
+
},
|
|
269
|
+
[`&${componentCls}-icon`]: {
|
|
270
|
+
fontSize: iconFontSize2,
|
|
271
|
+
[`> ${iconCls}`]: {
|
|
272
|
+
margin: 0
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
return {
|
|
277
|
+
[componentCls]: {
|
|
278
|
+
...resetComponent(token),
|
|
279
|
+
position: "relative",
|
|
280
|
+
display: "inline-flex",
|
|
281
|
+
justifyContent: "center",
|
|
282
|
+
alignItems: "center",
|
|
283
|
+
overflow: "hidden",
|
|
284
|
+
color: avatarColor,
|
|
285
|
+
whiteSpace: "nowrap",
|
|
286
|
+
textAlign: "center",
|
|
287
|
+
verticalAlign: "middle",
|
|
288
|
+
background: avatarBg,
|
|
289
|
+
border: `${unit(lineWidth)} ${lineType} transparent`,
|
|
290
|
+
"&-image": {
|
|
291
|
+
background: "transparent"
|
|
292
|
+
},
|
|
293
|
+
[`${antCls}-image-img`]: {
|
|
294
|
+
display: "block"
|
|
295
|
+
},
|
|
296
|
+
...avatarSizeStyle(containerSize, textFontSize, iconFontSize, borderRadius),
|
|
297
|
+
"&-lg": {
|
|
298
|
+
...avatarSizeStyle(containerSizeLG, textFontSizeLG, iconFontSizeLG, borderRadiusLG)
|
|
299
|
+
},
|
|
300
|
+
"&-sm": {
|
|
301
|
+
...avatarSizeStyle(containerSizeSM, textFontSizeSM, iconFontSizeSM, borderRadiusSM)
|
|
302
|
+
},
|
|
303
|
+
"> img": {
|
|
304
|
+
display: "block",
|
|
305
|
+
width: "100%",
|
|
306
|
+
height: "100%",
|
|
307
|
+
objectFit: "cover"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
var genGroupStyle = (token) => {
|
|
313
|
+
const {
|
|
314
|
+
componentCls,
|
|
315
|
+
groupBorderColor,
|
|
316
|
+
groupOverlapping,
|
|
317
|
+
groupSpace
|
|
318
|
+
} = token;
|
|
319
|
+
return {
|
|
320
|
+
[`${componentCls}-group`]: {
|
|
321
|
+
display: "inline-flex",
|
|
322
|
+
[componentCls]: {
|
|
323
|
+
borderColor: groupBorderColor
|
|
324
|
+
},
|
|
325
|
+
"> *:not(:first-child)": {
|
|
326
|
+
marginInlineStart: groupOverlapping
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
[`${componentCls}-group-popover`]: {
|
|
330
|
+
[`${componentCls} + ${componentCls}`]: {
|
|
331
|
+
marginInlineStart: groupSpace
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
var prepareComponentToken = (token) => {
|
|
337
|
+
const {
|
|
338
|
+
controlHeight,
|
|
339
|
+
controlHeightLG,
|
|
340
|
+
controlHeightSM,
|
|
341
|
+
fontSize,
|
|
342
|
+
fontSizeLG,
|
|
343
|
+
fontSizeXL,
|
|
344
|
+
fontSizeHeading3,
|
|
345
|
+
marginXS,
|
|
346
|
+
marginXXS,
|
|
347
|
+
colorBorderBg
|
|
348
|
+
} = token;
|
|
349
|
+
return {
|
|
350
|
+
containerSize: controlHeight,
|
|
351
|
+
containerSizeLG: controlHeightLG,
|
|
352
|
+
containerSizeSM: controlHeightSM,
|
|
353
|
+
textFontSize: fontSize,
|
|
354
|
+
textFontSizeLG: fontSize,
|
|
355
|
+
textFontSizeSM: fontSize,
|
|
356
|
+
iconFontSize: Math.round((fontSizeLG + fontSizeXL) / 2),
|
|
357
|
+
iconFontSizeLG: fontSizeHeading3,
|
|
358
|
+
iconFontSizeSM: fontSize,
|
|
359
|
+
groupSpace: marginXXS,
|
|
360
|
+
groupOverlapping: -marginXS,
|
|
361
|
+
groupBorderColor: colorBorderBg
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
var style_default = genStyleHooks("Avatar", (token) => {
|
|
365
|
+
const {
|
|
366
|
+
colorTextLightSolid,
|
|
367
|
+
colorTextPlaceholder
|
|
368
|
+
} = token;
|
|
369
|
+
const avatarToken = merge(token, {
|
|
370
|
+
avatarBg: colorTextPlaceholder,
|
|
371
|
+
avatarColor: colorTextLightSolid
|
|
372
|
+
});
|
|
373
|
+
return [genBaseStyle(avatarToken), genGroupStyle(avatarToken)];
|
|
374
|
+
}, prepareComponentToken);
|
|
375
|
+
|
|
376
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/avatar/Avatar.js
|
|
377
|
+
var Avatar = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
378
|
+
const {
|
|
379
|
+
prefixCls: customizePrefixCls,
|
|
380
|
+
shape,
|
|
381
|
+
size: customSize,
|
|
382
|
+
src,
|
|
383
|
+
srcSet,
|
|
384
|
+
icon,
|
|
385
|
+
className,
|
|
386
|
+
rootClassName,
|
|
387
|
+
style,
|
|
388
|
+
alt,
|
|
389
|
+
draggable,
|
|
390
|
+
children,
|
|
391
|
+
crossOrigin,
|
|
392
|
+
gap = 4,
|
|
393
|
+
onError,
|
|
394
|
+
...others
|
|
395
|
+
} = props;
|
|
396
|
+
const [scale, setScale] = useState(1);
|
|
397
|
+
const [mounted, setMounted] = useState(false);
|
|
398
|
+
const [isImgExist, setIsImgExist] = useState(true);
|
|
399
|
+
const avatarNodeRef = useRef(null);
|
|
400
|
+
const avatarChildrenRef = useRef(null);
|
|
401
|
+
const avatarNodeMergedRef = composeRef(ref, avatarNodeRef);
|
|
402
|
+
const {
|
|
403
|
+
getPrefixCls,
|
|
404
|
+
className: contextClassName,
|
|
405
|
+
style: contextStyle
|
|
406
|
+
} = useComponentConfig("avatar");
|
|
407
|
+
const avatarCtx = useContext(AvatarContext_default);
|
|
408
|
+
const setScaleParam = () => {
|
|
409
|
+
if (!avatarChildrenRef.current || !avatarNodeRef.current) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const childrenWidth = avatarChildrenRef.current.offsetWidth;
|
|
413
|
+
const nodeWidth = avatarNodeRef.current.offsetWidth;
|
|
414
|
+
if (childrenWidth !== 0 && nodeWidth !== 0) {
|
|
415
|
+
if (gap * 2 < nodeWidth) {
|
|
416
|
+
setScale(nodeWidth - gap * 2 < childrenWidth ? (nodeWidth - gap * 2) / childrenWidth : 1);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
useEffect(() => {
|
|
421
|
+
setMounted(true);
|
|
422
|
+
}, []);
|
|
423
|
+
useEffect(() => {
|
|
424
|
+
setIsImgExist(true);
|
|
425
|
+
setScale(1);
|
|
426
|
+
}, [src]);
|
|
427
|
+
useEffect(setScaleParam, [gap]);
|
|
428
|
+
const handleImgLoadError = () => {
|
|
429
|
+
const errorFlag = onError?.();
|
|
430
|
+
if (errorFlag !== false) {
|
|
431
|
+
setIsImgExist(false);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
const size = useSize_default((ctxSize) => customSize ?? avatarCtx?.size ?? ctxSize ?? "medium");
|
|
435
|
+
const needResponsive = Object.keys(isPlainObject(size) ? size || {} : {}).some((key) => responsiveArray.includes(key));
|
|
436
|
+
const screens = useBreakpoint_default(needResponsive);
|
|
437
|
+
const responsiveSizeStyle = useMemo(() => {
|
|
438
|
+
if (!isPlainObject(size)) {
|
|
439
|
+
return {};
|
|
440
|
+
}
|
|
441
|
+
const currentBreakpoint = responsiveArray.find((screen) => screens[screen]);
|
|
442
|
+
const currentSize = size[currentBreakpoint];
|
|
443
|
+
return currentSize ? {
|
|
444
|
+
width: currentSize,
|
|
445
|
+
height: currentSize,
|
|
446
|
+
fontSize: currentSize && (icon || children) ? currentSize / 2 : 18
|
|
447
|
+
} : {};
|
|
448
|
+
}, [screens, size, icon, children]);
|
|
449
|
+
if (true) {
|
|
450
|
+
const warning = devUseWarning("Avatar");
|
|
451
|
+
true ? warning(!(typeof icon === "string" && icon.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${icon}\` at https://ant.design/components/icon`) : void 0;
|
|
452
|
+
}
|
|
453
|
+
const prefixCls = getPrefixCls("avatar", customizePrefixCls);
|
|
454
|
+
const rootCls = useCSSVarCls_default(prefixCls);
|
|
455
|
+
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
456
|
+
const sizeCls = clsx({
|
|
457
|
+
[`${prefixCls}-lg`]: size === "large",
|
|
458
|
+
[`${prefixCls}-sm`]: size === "small"
|
|
459
|
+
});
|
|
460
|
+
const hasImageElement = /* @__PURE__ */ isValidElement(src);
|
|
461
|
+
const mergedShape = shape || avatarCtx?.shape || "circle";
|
|
462
|
+
const classString = clsx(prefixCls, sizeCls, contextClassName, `${prefixCls}-${mergedShape}`, {
|
|
463
|
+
[`${prefixCls}-image`]: hasImageElement || src && isImgExist,
|
|
464
|
+
[`${prefixCls}-icon`]: !!icon
|
|
465
|
+
}, cssVarCls, rootCls, className, rootClassName, hashId);
|
|
466
|
+
const sizeStyle = isNumber(size) ? {
|
|
467
|
+
width: size,
|
|
468
|
+
height: size,
|
|
469
|
+
fontSize: icon ? size / 2 : 18
|
|
470
|
+
} : {};
|
|
471
|
+
let childrenToRender;
|
|
472
|
+
if (typeof src === "string" && isImgExist) {
|
|
473
|
+
childrenToRender = /* @__PURE__ */ createElement("img", {
|
|
474
|
+
src,
|
|
475
|
+
draggable,
|
|
476
|
+
srcSet,
|
|
477
|
+
onError: handleImgLoadError,
|
|
478
|
+
alt,
|
|
479
|
+
crossOrigin
|
|
480
|
+
});
|
|
481
|
+
} else if (hasImageElement) {
|
|
482
|
+
childrenToRender = src;
|
|
483
|
+
} else if (icon) {
|
|
484
|
+
childrenToRender = icon;
|
|
485
|
+
} else if (mounted || scale !== 1) {
|
|
486
|
+
const transformString = `scale(${scale})`;
|
|
487
|
+
const childrenStyle = {
|
|
488
|
+
msTransform: transformString,
|
|
489
|
+
WebkitTransform: transformString,
|
|
490
|
+
transform: transformString
|
|
491
|
+
};
|
|
492
|
+
childrenToRender = /* @__PURE__ */ createElement(es_default, {
|
|
493
|
+
onResize: setScaleParam
|
|
494
|
+
}, /* @__PURE__ */ createElement("span", {
|
|
495
|
+
className: `${prefixCls}-string`,
|
|
496
|
+
ref: avatarChildrenRef,
|
|
497
|
+
style: childrenStyle
|
|
498
|
+
}, children));
|
|
499
|
+
} else {
|
|
500
|
+
childrenToRender = /* @__PURE__ */ createElement("span", {
|
|
501
|
+
className: `${prefixCls}-string`,
|
|
502
|
+
style: {
|
|
503
|
+
opacity: 0
|
|
504
|
+
},
|
|
505
|
+
ref: avatarChildrenRef
|
|
506
|
+
}, children);
|
|
507
|
+
}
|
|
508
|
+
return /* @__PURE__ */ createElement("span", {
|
|
509
|
+
...others,
|
|
510
|
+
style: {
|
|
511
|
+
...sizeStyle,
|
|
512
|
+
...responsiveSizeStyle,
|
|
513
|
+
...contextStyle,
|
|
514
|
+
...style
|
|
515
|
+
},
|
|
516
|
+
className: classString,
|
|
517
|
+
ref: avatarNodeMergedRef
|
|
518
|
+
}, childrenToRender);
|
|
519
|
+
});
|
|
520
|
+
if (true) {
|
|
521
|
+
Avatar.displayName = "Avatar";
|
|
522
|
+
}
|
|
523
|
+
var Avatar_default = Avatar;
|
|
524
|
+
|
|
525
|
+
// ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/EditOutlined.js
|
|
526
|
+
var import_EditOutlined = __toESM(require_EditOutlined());
|
|
527
|
+
function _extends() {
|
|
528
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
529
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
530
|
+
var source = arguments[i];
|
|
531
|
+
for (var key in source) {
|
|
532
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
533
|
+
target[key] = source[key];
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
return target;
|
|
538
|
+
};
|
|
539
|
+
return _extends.apply(this, arguments);
|
|
540
|
+
}
|
|
541
|
+
var EditOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends({}, props, {
|
|
542
|
+
ref,
|
|
543
|
+
icon: import_EditOutlined.default
|
|
544
|
+
}));
|
|
545
|
+
var RefIcon = /* @__PURE__ */ forwardRef(EditOutlined);
|
|
546
|
+
if (true) {
|
|
547
|
+
RefIcon.displayName = "EditOutlined";
|
|
548
|
+
}
|
|
549
|
+
var EditOutlined_default = RefIcon;
|
|
550
|
+
|
|
551
|
+
// ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/EnterOutlined.js
|
|
552
|
+
var import_EnterOutlined = __toESM(require_EnterOutlined());
|
|
553
|
+
function _extends2() {
|
|
554
|
+
_extends2 = Object.assign ? Object.assign.bind() : function(target) {
|
|
555
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
556
|
+
var source = arguments[i];
|
|
557
|
+
for (var key in source) {
|
|
558
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
559
|
+
target[key] = source[key];
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
return target;
|
|
564
|
+
};
|
|
565
|
+
return _extends2.apply(this, arguments);
|
|
566
|
+
}
|
|
567
|
+
var EnterOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends2({}, props, {
|
|
568
|
+
ref,
|
|
569
|
+
icon: import_EnterOutlined.default
|
|
570
|
+
}));
|
|
571
|
+
var RefIcon2 = /* @__PURE__ */ forwardRef(EnterOutlined);
|
|
572
|
+
if (true) {
|
|
573
|
+
RefIcon2.displayName = "EnterOutlined";
|
|
574
|
+
}
|
|
575
|
+
var EnterOutlined_default = RefIcon2;
|
|
576
|
+
|
|
577
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/style/mixins.js
|
|
578
|
+
var getTitleStyle = (fontSize, lineHeight, color, token) => {
|
|
579
|
+
const {
|
|
580
|
+
titleMarginBottom,
|
|
581
|
+
fontWeightStrong
|
|
582
|
+
} = token;
|
|
583
|
+
return {
|
|
584
|
+
marginBottom: titleMarginBottom,
|
|
585
|
+
color,
|
|
586
|
+
fontWeight: fontWeightStrong,
|
|
587
|
+
fontSize,
|
|
588
|
+
lineHeight
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
var getTitleStyles = (token) => {
|
|
592
|
+
const headings = [1, 2, 3, 4, 5];
|
|
593
|
+
const styles = {};
|
|
594
|
+
headings.forEach((headingLevel) => {
|
|
595
|
+
styles[`
|
|
596
|
+
h${headingLevel}&,
|
|
597
|
+
div&-h${headingLevel},
|
|
598
|
+
div&-h${headingLevel} > textarea,
|
|
599
|
+
h${headingLevel}
|
|
600
|
+
`] = getTitleStyle(token[`fontSizeHeading${headingLevel}`], token[`lineHeightHeading${headingLevel}`], token.colorTextHeading, token);
|
|
601
|
+
});
|
|
602
|
+
return styles;
|
|
603
|
+
};
|
|
604
|
+
var getLinkStyles = (token) => {
|
|
605
|
+
const {
|
|
606
|
+
componentCls
|
|
607
|
+
} = token;
|
|
608
|
+
const linkCls = `${componentCls}-link`;
|
|
609
|
+
return {
|
|
610
|
+
[`&${linkCls}`]: {
|
|
611
|
+
...operationUnit(token),
|
|
612
|
+
userSelect: "text",
|
|
613
|
+
[`&[disabled], &${componentCls}-disabled`]: {
|
|
614
|
+
color: token.colorTextDisabled,
|
|
615
|
+
cursor: "not-allowed",
|
|
616
|
+
"&:active, &:hover": {
|
|
617
|
+
color: token.colorTextDisabled
|
|
618
|
+
},
|
|
619
|
+
"&:active": {
|
|
620
|
+
pointerEvents: "none",
|
|
621
|
+
// Action buttons (copy, edit, expand) must remain interactive even when
|
|
622
|
+
// the disabled link is being clicked, otherwise their click events get
|
|
623
|
+
// swallowed by the parent's pointer-events: none during :active.
|
|
624
|
+
[`${componentCls}-actions`]: {
|
|
625
|
+
pointerEvents: "auto"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
var getResetStyles = (token) => ({
|
|
633
|
+
code: {
|
|
634
|
+
margin: "0 0.2em",
|
|
635
|
+
paddingInline: "0.4em",
|
|
636
|
+
paddingBlock: "0.2em 0.1em",
|
|
637
|
+
fontSize: "85%",
|
|
638
|
+
fontFamily: token.fontFamilyCode,
|
|
639
|
+
background: "rgba(150, 150, 150, 0.1)",
|
|
640
|
+
border: `${unit(token.lineWidth)} ${token.lineType} rgba(100, 100, 100, 0.2)`,
|
|
641
|
+
borderRadius: 3
|
|
642
|
+
},
|
|
643
|
+
kbd: {
|
|
644
|
+
margin: "0 0.2em",
|
|
645
|
+
paddingInline: "0.4em",
|
|
646
|
+
paddingBlock: "0.15em 0.1em",
|
|
647
|
+
fontSize: "90%",
|
|
648
|
+
fontFamily: token.fontFamilyCode,
|
|
649
|
+
background: "rgba(150, 150, 150, 0.06)",
|
|
650
|
+
border: `${unit(token.lineWidth)} ${token.lineType} rgba(100, 100, 100, 0.2)`,
|
|
651
|
+
borderBottomWidth: 2,
|
|
652
|
+
borderRadius: 3
|
|
653
|
+
},
|
|
654
|
+
mark: {
|
|
655
|
+
padding: 0,
|
|
656
|
+
// FIXME hardcode in v4
|
|
657
|
+
backgroundColor: gold[2]
|
|
658
|
+
},
|
|
659
|
+
"u, ins": {
|
|
660
|
+
textDecoration: "underline",
|
|
661
|
+
textDecorationSkipInk: "auto"
|
|
662
|
+
},
|
|
663
|
+
"s, del": {
|
|
664
|
+
textDecoration: "line-through"
|
|
665
|
+
},
|
|
666
|
+
strong: {
|
|
667
|
+
fontWeight: token.fontWeightStrong
|
|
668
|
+
},
|
|
669
|
+
// list
|
|
670
|
+
"ul, ol": {
|
|
671
|
+
marginInline: 0,
|
|
672
|
+
marginBlock: "0 1em",
|
|
673
|
+
padding: 0,
|
|
674
|
+
li: {
|
|
675
|
+
marginInline: "20px 0",
|
|
676
|
+
marginBlock: 0,
|
|
677
|
+
paddingInline: "4px 0",
|
|
678
|
+
paddingBlock: 0
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
ul: {
|
|
682
|
+
listStyleType: "circle",
|
|
683
|
+
ul: {
|
|
684
|
+
listStyleType: "disc"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
ol: {
|
|
688
|
+
listStyleType: "decimal"
|
|
689
|
+
},
|
|
690
|
+
// pre & block
|
|
691
|
+
"pre, blockquote": {
|
|
692
|
+
margin: "1em 0"
|
|
693
|
+
},
|
|
694
|
+
pre: {
|
|
695
|
+
padding: "0.4em 0.6em",
|
|
696
|
+
whiteSpace: "pre-wrap",
|
|
697
|
+
wordWrap: "break-word",
|
|
698
|
+
background: "rgba(150, 150, 150, 0.1)",
|
|
699
|
+
border: `${unit(token.lineWidth)} ${token.lineType} rgba(100, 100, 100, 0.2)`,
|
|
700
|
+
borderRadius: 3,
|
|
701
|
+
fontFamily: token.fontFamilyCode,
|
|
702
|
+
// Compatible for marked
|
|
703
|
+
code: {
|
|
704
|
+
display: "inline",
|
|
705
|
+
margin: 0,
|
|
706
|
+
padding: 0,
|
|
707
|
+
fontSize: "inherit",
|
|
708
|
+
fontFamily: "inherit",
|
|
709
|
+
background: "transparent",
|
|
710
|
+
border: 0
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
blockquote: {
|
|
714
|
+
paddingInline: "0.6em 0",
|
|
715
|
+
paddingBlock: 0,
|
|
716
|
+
borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)",
|
|
717
|
+
opacity: 0.85
|
|
718
|
+
},
|
|
719
|
+
// table - Follow Table component default style
|
|
720
|
+
table: {
|
|
721
|
+
width: "100%",
|
|
722
|
+
textAlign: "start",
|
|
723
|
+
borderCollapse: "separate",
|
|
724
|
+
borderSpacing: 0,
|
|
725
|
+
marginBlock: "1em",
|
|
726
|
+
"th, td": {
|
|
727
|
+
padding: unit(token.padding),
|
|
728
|
+
overflowWrap: "break-word",
|
|
729
|
+
borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
730
|
+
},
|
|
731
|
+
"thead > tr:first-child > th:first-child": {
|
|
732
|
+
borderStartStartRadius: token.borderRadiusLG
|
|
733
|
+
},
|
|
734
|
+
"thead > tr:first-child > th:last-child": {
|
|
735
|
+
borderStartEndRadius: token.borderRadiusLG
|
|
736
|
+
},
|
|
737
|
+
"thead > tr > th": {
|
|
738
|
+
textAlign: "start",
|
|
739
|
+
position: "relative",
|
|
740
|
+
color: token.colorTextHeading,
|
|
741
|
+
fontWeight: token.fontWeightStrong,
|
|
742
|
+
backgroundColor: token.colorFillAlter,
|
|
743
|
+
transition: `background-color ${token.motionDurationMid} ease`,
|
|
744
|
+
"&:not(:last-child)::before": {
|
|
745
|
+
position: "absolute",
|
|
746
|
+
top: "50%",
|
|
747
|
+
insetInlineEnd: 0,
|
|
748
|
+
width: 1,
|
|
749
|
+
height: "1.6em",
|
|
750
|
+
backgroundColor: token.colorSplit,
|
|
751
|
+
transform: "translateY(-50%)",
|
|
752
|
+
content: '""'
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"tbody > tr": {
|
|
756
|
+
"> th, > td": {
|
|
757
|
+
transition: `background-color ${token.motionDurationMid} ease`
|
|
758
|
+
},
|
|
759
|
+
"&:hover > th, &:hover > td": {
|
|
760
|
+
backgroundColor: token.colorFillAlter
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
var getEditableStyles = (token) => {
|
|
766
|
+
const {
|
|
767
|
+
componentCls,
|
|
768
|
+
paddingSM
|
|
769
|
+
} = token;
|
|
770
|
+
const inputShift = paddingSM;
|
|
771
|
+
return {
|
|
772
|
+
"&-edit-content": {
|
|
773
|
+
position: "relative",
|
|
774
|
+
"div&": {
|
|
775
|
+
insetInlineStart: token.calc(token.paddingSM).mul(-1).equal(),
|
|
776
|
+
insetBlockStart: token.calc(inputShift).div(-2).add(1).equal(),
|
|
777
|
+
marginBottom: token.calc(inputShift).div(2).sub(2).equal()
|
|
778
|
+
},
|
|
779
|
+
[`${componentCls}-edit-content-confirm`]: {
|
|
780
|
+
position: "absolute",
|
|
781
|
+
insetInlineEnd: token.calc(token.marginXS).add(2).equal(),
|
|
782
|
+
insetBlockEnd: token.marginXS,
|
|
783
|
+
color: token.colorIcon,
|
|
784
|
+
// default style
|
|
785
|
+
fontWeight: "normal",
|
|
786
|
+
fontSize: token.fontSize,
|
|
787
|
+
fontStyle: "normal",
|
|
788
|
+
pointerEvents: "none"
|
|
789
|
+
},
|
|
790
|
+
// Double the `-edit-content` class to raise this selector's specificity
|
|
791
|
+
// above Input's own `textarea.ant-input { line-height: token.lineHeight }`
|
|
792
|
+
// rule. Both otherwise share the same (0,1,1) specificity and Input is
|
|
793
|
+
// injected after Typography, so on the raw TextArea path the Input rule
|
|
794
|
+
// would win the cascade and the inherited font props below (notably
|
|
795
|
+
// `line-height`) would not apply.
|
|
796
|
+
[`&${componentCls}-edit-content textarea`]: {
|
|
797
|
+
margin: "0!important",
|
|
798
|
+
// Inherit the edited element's typography so the editing textarea
|
|
799
|
+
// matches the rendered text (including customized heading tokens such
|
|
800
|
+
// as `fontSizeHeading1` and the strong heading weight), keeping editing
|
|
801
|
+
// WYSIWYG. Browsers do not inherit font properties for form controls by
|
|
802
|
+
// default, so they are set explicitly here.
|
|
803
|
+
fontSize: "inherit",
|
|
804
|
+
lineHeight: "inherit",
|
|
805
|
+
fontFamily: "inherit",
|
|
806
|
+
fontWeight: "inherit",
|
|
807
|
+
// Fix Editable Textarea flash in Firefox
|
|
808
|
+
MozTransition: "none",
|
|
809
|
+
height: "1em"
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
var getCopyableStyles = (token) => ({
|
|
815
|
+
[`${token.componentCls}-copy-success`]: {
|
|
816
|
+
"&, &:hover, &:focus": {
|
|
817
|
+
color: token.colorSuccess
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
[`${token.componentCls}-copy-icon-only`]: {
|
|
821
|
+
marginInlineStart: 0
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
var getEllipsisStyles = () => ({
|
|
825
|
+
"a&-ellipsis, span&-ellipsis": {
|
|
826
|
+
display: "inline-block",
|
|
827
|
+
maxWidth: "100%"
|
|
828
|
+
},
|
|
829
|
+
"&-ellipsis-single-line": {
|
|
830
|
+
...textEllipsis,
|
|
831
|
+
// https://blog.csdn.net/iefreer/article/details/50421025
|
|
832
|
+
"a&, span&": {
|
|
833
|
+
verticalAlign: "bottom"
|
|
834
|
+
},
|
|
835
|
+
"> code": {
|
|
836
|
+
paddingBlock: 0,
|
|
837
|
+
maxWidth: "calc(100% - 1.2em)",
|
|
838
|
+
display: "inline-block",
|
|
839
|
+
overflow: "hidden",
|
|
840
|
+
textOverflow: "ellipsis",
|
|
841
|
+
verticalAlign: "bottom",
|
|
842
|
+
// https://github.com/ant-design/ant-design/issues/45953
|
|
843
|
+
boxSizing: "content-box"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"&-ellipsis-multiple-line": {
|
|
847
|
+
display: "-webkit-box",
|
|
848
|
+
overflow: "hidden",
|
|
849
|
+
WebkitLineClamp: 3,
|
|
850
|
+
WebkitBoxOrient: "vertical"
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
|
|
854
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/style/index.js
|
|
855
|
+
var genTypographyStyle = (token) => {
|
|
856
|
+
const {
|
|
857
|
+
componentCls,
|
|
858
|
+
titleMarginTop
|
|
859
|
+
} = token;
|
|
860
|
+
return {
|
|
861
|
+
[componentCls]: {
|
|
862
|
+
color: token.colorText,
|
|
863
|
+
wordBreak: "break-word",
|
|
864
|
+
lineHeight: token.lineHeight,
|
|
865
|
+
[`&${componentCls}-secondary, &${componentCls}-link${componentCls}-secondary`]: {
|
|
866
|
+
color: token.colorTextDescription
|
|
867
|
+
},
|
|
868
|
+
[`&${componentCls}-success, &${componentCls}-link${componentCls}-success`]: {
|
|
869
|
+
color: token.colorSuccessText
|
|
870
|
+
},
|
|
871
|
+
[`&${componentCls}-warning, &${componentCls}-link${componentCls}-warning`]: {
|
|
872
|
+
color: token.colorWarningText
|
|
873
|
+
},
|
|
874
|
+
[`&${componentCls}-danger, &${componentCls}-link${componentCls}-danger`]: {
|
|
875
|
+
color: token.colorErrorText,
|
|
876
|
+
[`&${componentCls}-link:active, &${componentCls}-link:focus`]: {
|
|
877
|
+
color: token.colorErrorTextActive
|
|
878
|
+
},
|
|
879
|
+
[`&${componentCls}-link:hover`]: {
|
|
880
|
+
color: token.colorErrorTextHover
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
[`&${componentCls}-disabled`]: {
|
|
884
|
+
color: token.colorTextDisabled,
|
|
885
|
+
cursor: "not-allowed",
|
|
886
|
+
userSelect: "none"
|
|
887
|
+
},
|
|
888
|
+
"div&, p": {
|
|
889
|
+
marginBottom: "1em"
|
|
890
|
+
},
|
|
891
|
+
...getTitleStyles(token),
|
|
892
|
+
[`& + h1${componentCls}, & + h2${componentCls}, & + h3${componentCls}, & + h4${componentCls}, & + h5${componentCls}`]: {
|
|
893
|
+
marginTop: titleMarginTop
|
|
894
|
+
},
|
|
895
|
+
"div, ul, li, p, h1, h2, h3, h4, h5": {
|
|
896
|
+
"+ h1, + h2, + h3, + h4, + h5": {
|
|
897
|
+
marginTop: titleMarginTop
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
...getResetStyles(token),
|
|
901
|
+
...getLinkStyles(token),
|
|
902
|
+
// Operation
|
|
903
|
+
[`${componentCls}-actions`]: {
|
|
904
|
+
display: "inline"
|
|
905
|
+
},
|
|
906
|
+
[`
|
|
907
|
+
${componentCls}-expand,
|
|
908
|
+
${componentCls}-collapse,
|
|
909
|
+
${componentCls}-edit,
|
|
910
|
+
${componentCls}-copy
|
|
911
|
+
`]: {
|
|
912
|
+
...operationUnit(token),
|
|
913
|
+
marginInlineStart: token.marginXXS
|
|
914
|
+
},
|
|
915
|
+
[`${componentCls}-actions-start`]: {
|
|
916
|
+
[`
|
|
917
|
+
${componentCls}-expand,
|
|
918
|
+
${componentCls}-collapse,
|
|
919
|
+
${componentCls}-edit,
|
|
920
|
+
${componentCls}-copy:not(${componentCls}-copy-icon-only)
|
|
921
|
+
`]: {
|
|
922
|
+
marginInlineStart: 0,
|
|
923
|
+
marginInlineEnd: token.marginXXS
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
...getEditableStyles(token),
|
|
927
|
+
...getCopyableStyles(token),
|
|
928
|
+
...getEllipsisStyles(),
|
|
929
|
+
"&-rtl": {
|
|
930
|
+
direction: "rtl"
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
var prepareComponentToken2 = () => ({
|
|
936
|
+
titleMarginTop: "1.2em",
|
|
937
|
+
titleMarginBottom: "0.5em"
|
|
938
|
+
});
|
|
939
|
+
var style_default2 = genStyleHooks("Typography", genTypographyStyle, prepareComponentToken2);
|
|
940
|
+
|
|
941
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Editable.js
|
|
942
|
+
var Editable = (props) => {
|
|
943
|
+
const {
|
|
944
|
+
prefixCls,
|
|
945
|
+
"aria-label": ariaLabel,
|
|
946
|
+
className,
|
|
947
|
+
style,
|
|
948
|
+
classNames,
|
|
949
|
+
styles,
|
|
950
|
+
direction,
|
|
951
|
+
maxLength,
|
|
952
|
+
autoSize = true,
|
|
953
|
+
value,
|
|
954
|
+
onSave,
|
|
955
|
+
onCancel,
|
|
956
|
+
onEnd,
|
|
957
|
+
component,
|
|
958
|
+
enterIcon = /* @__PURE__ */ createElement(EnterOutlined_default, null)
|
|
959
|
+
} = props;
|
|
960
|
+
const ref = useRef(null);
|
|
961
|
+
const inCompositionRef = useRef(false);
|
|
962
|
+
const lastKeyCodeRef = useRef(null);
|
|
963
|
+
const [current, setCurrent] = useState(value);
|
|
964
|
+
useEffect(() => {
|
|
965
|
+
setCurrent(value);
|
|
966
|
+
}, [value]);
|
|
967
|
+
useEffect(() => {
|
|
968
|
+
if (ref.current?.resizableTextArea) {
|
|
969
|
+
const {
|
|
970
|
+
textArea
|
|
971
|
+
} = ref.current.resizableTextArea;
|
|
972
|
+
textArea.focus();
|
|
973
|
+
const {
|
|
974
|
+
length
|
|
975
|
+
} = textArea.value;
|
|
976
|
+
textArea.setSelectionRange(length, length);
|
|
977
|
+
}
|
|
978
|
+
}, []);
|
|
979
|
+
const onChange = ({
|
|
980
|
+
target
|
|
981
|
+
}) => {
|
|
982
|
+
setCurrent(target.value.replace(/[\n\r]/g, ""));
|
|
983
|
+
};
|
|
984
|
+
const onCompositionStart = () => {
|
|
985
|
+
inCompositionRef.current = true;
|
|
986
|
+
};
|
|
987
|
+
const onCompositionEnd = () => {
|
|
988
|
+
inCompositionRef.current = false;
|
|
989
|
+
};
|
|
990
|
+
const onKeyDown = ({
|
|
991
|
+
keyCode
|
|
992
|
+
}) => {
|
|
993
|
+
if (inCompositionRef.current) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
lastKeyCodeRef.current = keyCode;
|
|
997
|
+
};
|
|
998
|
+
const confirmChange = () => {
|
|
999
|
+
onSave(current.trim());
|
|
1000
|
+
};
|
|
1001
|
+
const onKeyUp = ({
|
|
1002
|
+
keyCode,
|
|
1003
|
+
ctrlKey,
|
|
1004
|
+
altKey,
|
|
1005
|
+
metaKey,
|
|
1006
|
+
shiftKey
|
|
1007
|
+
}) => {
|
|
1008
|
+
if (lastKeyCodeRef.current !== keyCode || inCompositionRef.current || ctrlKey || altKey || metaKey || shiftKey) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
if (keyCode === KeyCode_default.ENTER) {
|
|
1012
|
+
confirmChange();
|
|
1013
|
+
onEnd?.();
|
|
1014
|
+
} else if (keyCode === KeyCode_default.ESC) {
|
|
1015
|
+
onCancel();
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
const onBlur = () => {
|
|
1019
|
+
confirmChange();
|
|
1020
|
+
};
|
|
1021
|
+
const [hashId, cssVarCls] = style_default2(prefixCls);
|
|
1022
|
+
const textAreaClassName = clsx(prefixCls, `${prefixCls}-edit-content`, {
|
|
1023
|
+
[`${prefixCls}-rtl`]: direction === "rtl",
|
|
1024
|
+
[`${prefixCls}-${component}`]: !!component
|
|
1025
|
+
}, className, classNames.root, hashId, cssVarCls);
|
|
1026
|
+
return /* @__PURE__ */ createElement("div", {
|
|
1027
|
+
className: textAreaClassName,
|
|
1028
|
+
style: {
|
|
1029
|
+
...styles.root,
|
|
1030
|
+
...style
|
|
1031
|
+
}
|
|
1032
|
+
}, /* @__PURE__ */ createElement(TextArea_default, {
|
|
1033
|
+
ref,
|
|
1034
|
+
maxLength,
|
|
1035
|
+
value: current,
|
|
1036
|
+
onChange,
|
|
1037
|
+
onKeyDown,
|
|
1038
|
+
onKeyUp,
|
|
1039
|
+
onCompositionStart,
|
|
1040
|
+
onCompositionEnd,
|
|
1041
|
+
onBlur,
|
|
1042
|
+
"aria-label": ariaLabel,
|
|
1043
|
+
rows: 1,
|
|
1044
|
+
autoSize,
|
|
1045
|
+
className: classNames.textarea,
|
|
1046
|
+
style: styles.textarea
|
|
1047
|
+
}), enterIcon !== null ? cloneElement(enterIcon, {
|
|
1048
|
+
className: `${prefixCls}-edit-content-confirm`
|
|
1049
|
+
}) : null);
|
|
1050
|
+
};
|
|
1051
|
+
var Editable_default = Editable;
|
|
1052
|
+
|
|
1053
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/_util/copy.js
|
|
1054
|
+
var execCopy = (text, isHtmlFormat) => {
|
|
1055
|
+
let copySuccess = false;
|
|
1056
|
+
const onCopy = (event) => {
|
|
1057
|
+
event.stopPropagation();
|
|
1058
|
+
event.preventDefault();
|
|
1059
|
+
event.clipboardData?.clearData();
|
|
1060
|
+
event.clipboardData?.setData("text/plain", text);
|
|
1061
|
+
if (isHtmlFormat) {
|
|
1062
|
+
event.clipboardData?.setData("text/html", text);
|
|
1063
|
+
}
|
|
1064
|
+
copySuccess = true;
|
|
1065
|
+
};
|
|
1066
|
+
try {
|
|
1067
|
+
document.addEventListener("copy", onCopy, {
|
|
1068
|
+
capture: true
|
|
1069
|
+
});
|
|
1070
|
+
document.execCommand("copy");
|
|
1071
|
+
return copySuccess;
|
|
1072
|
+
} catch {
|
|
1073
|
+
return false;
|
|
1074
|
+
} finally {
|
|
1075
|
+
document.removeEventListener("copy", onCopy, {
|
|
1076
|
+
capture: true
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
var asyncCopy = async (text, isHtmlFormat) => {
|
|
1081
|
+
try {
|
|
1082
|
+
if (isHtmlFormat) {
|
|
1083
|
+
await navigator.clipboard.write([new ClipboardItem({
|
|
1084
|
+
"text/html": new Blob([text], {
|
|
1085
|
+
type: "text/html"
|
|
1086
|
+
}),
|
|
1087
|
+
"text/plain": new Blob([text], {
|
|
1088
|
+
type: "text/plain"
|
|
1089
|
+
})
|
|
1090
|
+
})]);
|
|
1091
|
+
} else {
|
|
1092
|
+
await navigator.clipboard.writeText(text);
|
|
1093
|
+
}
|
|
1094
|
+
return true;
|
|
1095
|
+
} catch {
|
|
1096
|
+
return false;
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
async function copy(text, config) {
|
|
1100
|
+
if (typeof text !== "string") {
|
|
1101
|
+
true ? warning_default(false, "The clipboard content must be of string type", "") : void 0;
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
const isHtmlFormat = config?.format === "text/html";
|
|
1105
|
+
if (await asyncCopy(text, isHtmlFormat)) {
|
|
1106
|
+
return true;
|
|
1107
|
+
}
|
|
1108
|
+
if (execCopy(text, isHtmlFormat)) {
|
|
1109
|
+
return true;
|
|
1110
|
+
}
|
|
1111
|
+
return false;
|
|
1112
|
+
}
|
|
1113
|
+
var copy_default = copy;
|
|
1114
|
+
|
|
1115
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/_util/toList.js
|
|
1116
|
+
var toList = (val, config = {}) => {
|
|
1117
|
+
if (!isNonNullable(val) && config?.skipEmpty) {
|
|
1118
|
+
return [];
|
|
1119
|
+
}
|
|
1120
|
+
return Array.isArray(val) ? val : [val];
|
|
1121
|
+
};
|
|
1122
|
+
var toList_default = toList;
|
|
1123
|
+
|
|
1124
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/hooks/useCopyClick.js
|
|
1125
|
+
var useCopyClick = ({
|
|
1126
|
+
copyConfig,
|
|
1127
|
+
children
|
|
1128
|
+
}) => {
|
|
1129
|
+
const [copied, setCopied] = useDelayState(false);
|
|
1130
|
+
const [copyLoading, setCopyLoading] = useState(false);
|
|
1131
|
+
const copyOptions = {};
|
|
1132
|
+
if (copyConfig.format) {
|
|
1133
|
+
copyOptions.format = copyConfig.format;
|
|
1134
|
+
}
|
|
1135
|
+
const onClick = useEvent_default(async (e) => {
|
|
1136
|
+
e?.preventDefault();
|
|
1137
|
+
e?.stopPropagation();
|
|
1138
|
+
setCopyLoading(true);
|
|
1139
|
+
try {
|
|
1140
|
+
const text = isFunction(copyConfig.text) ? await copyConfig.text() : copyConfig.text;
|
|
1141
|
+
await copy_default(text || toList_default(children, {
|
|
1142
|
+
skipEmpty: true
|
|
1143
|
+
}).join("") || "", copyOptions);
|
|
1144
|
+
setCopyLoading(false);
|
|
1145
|
+
setCopied(true, true);
|
|
1146
|
+
setCopied(false, {
|
|
1147
|
+
ms: 3e3
|
|
1148
|
+
});
|
|
1149
|
+
copyConfig.onCopy?.(e);
|
|
1150
|
+
} catch (error) {
|
|
1151
|
+
setCopyLoading(false);
|
|
1152
|
+
throw error;
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
return {
|
|
1156
|
+
copied,
|
|
1157
|
+
copyLoading,
|
|
1158
|
+
onClick
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
var useCopyClick_default = useCopyClick;
|
|
1162
|
+
|
|
1163
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/hooks/useMergedConfig.js
|
|
1164
|
+
var useMergedConfig = (propConfig, templateConfig) => {
|
|
1165
|
+
const support = Boolean(propConfig);
|
|
1166
|
+
return useMemo(() => {
|
|
1167
|
+
const config = {
|
|
1168
|
+
...templateConfig,
|
|
1169
|
+
...support && isPlainObject(propConfig) ? propConfig : null
|
|
1170
|
+
};
|
|
1171
|
+
return [support, config];
|
|
1172
|
+
}, [support, propConfig, templateConfig]);
|
|
1173
|
+
};
|
|
1174
|
+
var useMergedConfig_default = useMergedConfig;
|
|
1175
|
+
|
|
1176
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/hooks/usePrevious.js
|
|
1177
|
+
var usePrevious = (value) => {
|
|
1178
|
+
const ref = useRef(void 0);
|
|
1179
|
+
useEffect(() => {
|
|
1180
|
+
ref.current = value;
|
|
1181
|
+
});
|
|
1182
|
+
return ref.current;
|
|
1183
|
+
};
|
|
1184
|
+
var usePrevious_default = usePrevious;
|
|
1185
|
+
|
|
1186
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/hooks/useTooltipProps.js
|
|
1187
|
+
var useTooltipProps = (tooltip, editConfigText, children) => useMemo(() => {
|
|
1188
|
+
if (tooltip === true) {
|
|
1189
|
+
return {
|
|
1190
|
+
title: editConfigText ?? children
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
if (/* @__PURE__ */ isValidElement(tooltip)) {
|
|
1194
|
+
return {
|
|
1195
|
+
title: tooltip
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
if (isPlainObject(tooltip)) {
|
|
1199
|
+
return {
|
|
1200
|
+
title: editConfigText ?? children,
|
|
1201
|
+
...tooltip
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
return {
|
|
1205
|
+
title: tooltip
|
|
1206
|
+
};
|
|
1207
|
+
}, [tooltip, editConfigText, children]);
|
|
1208
|
+
var useTooltipProps_default = useTooltipProps;
|
|
1209
|
+
|
|
1210
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/hooks/useTypographySemantic.js
|
|
1211
|
+
var useTypographySemantic = (customizePrefixCls, classNames, styles, typographyDirection, props) => {
|
|
1212
|
+
const {
|
|
1213
|
+
getPrefixCls,
|
|
1214
|
+
direction: contextDirection,
|
|
1215
|
+
className: contextClassName,
|
|
1216
|
+
style: contextStyle,
|
|
1217
|
+
classNames: contextClassNames,
|
|
1218
|
+
styles: contextStyles
|
|
1219
|
+
} = useComponentConfig("typography");
|
|
1220
|
+
const direction = typographyDirection ?? contextDirection;
|
|
1221
|
+
const prefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
1222
|
+
const mergedProps = {
|
|
1223
|
+
...props,
|
|
1224
|
+
prefixCls,
|
|
1225
|
+
direction
|
|
1226
|
+
};
|
|
1227
|
+
const contextClassNamesObject = useMemo(() => ({
|
|
1228
|
+
root: contextClassName
|
|
1229
|
+
}), [contextClassName]);
|
|
1230
|
+
const contextStyleRoot = useSemanticRootStyle(contextStyle);
|
|
1231
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNamesObject, contextClassNames, classNames], [contextStyles, contextStyleRoot, styles], {
|
|
1232
|
+
props: mergedProps
|
|
1233
|
+
});
|
|
1234
|
+
return [mergedClassNames, mergedStyles, prefixCls, direction];
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Typography.js
|
|
1238
|
+
var InternalTypography = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
1239
|
+
const {
|
|
1240
|
+
component: Component = "article",
|
|
1241
|
+
className,
|
|
1242
|
+
rootClassName,
|
|
1243
|
+
children,
|
|
1244
|
+
direction,
|
|
1245
|
+
style,
|
|
1246
|
+
classNames,
|
|
1247
|
+
styles,
|
|
1248
|
+
prefixCls,
|
|
1249
|
+
...restProps
|
|
1250
|
+
} = props;
|
|
1251
|
+
const [hashId, cssVarCls] = style_default2(prefixCls);
|
|
1252
|
+
const componentClassName = clsx(prefixCls, {
|
|
1253
|
+
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
1254
|
+
}, className, rootClassName, hashId, cssVarCls, classNames?.root);
|
|
1255
|
+
const mergedStyle = {
|
|
1256
|
+
...styles?.root,
|
|
1257
|
+
...style
|
|
1258
|
+
};
|
|
1259
|
+
return /* @__PURE__ */ createElement(Component, {
|
|
1260
|
+
...restProps,
|
|
1261
|
+
className: componentClassName,
|
|
1262
|
+
style: mergedStyle,
|
|
1263
|
+
ref
|
|
1264
|
+
}, children);
|
|
1265
|
+
});
|
|
1266
|
+
if (true) {
|
|
1267
|
+
InternalTypography.displayName = "InternalTypography";
|
|
1268
|
+
}
|
|
1269
|
+
var Typography = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
1270
|
+
const {
|
|
1271
|
+
prefixCls: customizePrefixCls,
|
|
1272
|
+
className,
|
|
1273
|
+
rootClassName,
|
|
1274
|
+
direction: typographyDirection,
|
|
1275
|
+
classNames,
|
|
1276
|
+
styles,
|
|
1277
|
+
...restProps
|
|
1278
|
+
} = props;
|
|
1279
|
+
const [mergedClassNames, mergedStyles, mergedPrefixCls, mergedDirection] = useTypographySemantic(customizePrefixCls, classNames, styles, typographyDirection, props);
|
|
1280
|
+
return /* @__PURE__ */ createElement(InternalTypography, {
|
|
1281
|
+
ref,
|
|
1282
|
+
className: clsx(className, rootClassName),
|
|
1283
|
+
direction: mergedDirection,
|
|
1284
|
+
classNames: mergedClassNames,
|
|
1285
|
+
styles: mergedStyles,
|
|
1286
|
+
prefixCls: mergedPrefixCls,
|
|
1287
|
+
...restProps
|
|
1288
|
+
});
|
|
1289
|
+
});
|
|
1290
|
+
if (true) {
|
|
1291
|
+
Typography.displayName = "Typography";
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
// ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/CheckOutlined.js
|
|
1295
|
+
var import_CheckOutlined = __toESM(require_CheckOutlined());
|
|
1296
|
+
function _extends3() {
|
|
1297
|
+
_extends3 = Object.assign ? Object.assign.bind() : function(target) {
|
|
1298
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1299
|
+
var source = arguments[i];
|
|
1300
|
+
for (var key in source) {
|
|
1301
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1302
|
+
target[key] = source[key];
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
return target;
|
|
1307
|
+
};
|
|
1308
|
+
return _extends3.apply(this, arguments);
|
|
1309
|
+
}
|
|
1310
|
+
var CheckOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends3({}, props, {
|
|
1311
|
+
ref,
|
|
1312
|
+
icon: import_CheckOutlined.default
|
|
1313
|
+
}));
|
|
1314
|
+
var RefIcon3 = /* @__PURE__ */ forwardRef(CheckOutlined);
|
|
1315
|
+
if (true) {
|
|
1316
|
+
RefIcon3.displayName = "CheckOutlined";
|
|
1317
|
+
}
|
|
1318
|
+
var CheckOutlined_default = RefIcon3;
|
|
1319
|
+
|
|
1320
|
+
// ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/CopyOutlined.js
|
|
1321
|
+
var import_CopyOutlined = __toESM(require_CopyOutlined());
|
|
1322
|
+
function _extends4() {
|
|
1323
|
+
_extends4 = Object.assign ? Object.assign.bind() : function(target) {
|
|
1324
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1325
|
+
var source = arguments[i];
|
|
1326
|
+
for (var key in source) {
|
|
1327
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1328
|
+
target[key] = source[key];
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
return target;
|
|
1333
|
+
};
|
|
1334
|
+
return _extends4.apply(this, arguments);
|
|
1335
|
+
}
|
|
1336
|
+
var CopyOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends4({}, props, {
|
|
1337
|
+
ref,
|
|
1338
|
+
icon: import_CopyOutlined.default
|
|
1339
|
+
}));
|
|
1340
|
+
var RefIcon4 = /* @__PURE__ */ forwardRef(CopyOutlined);
|
|
1341
|
+
if (true) {
|
|
1342
|
+
RefIcon4.displayName = "CopyOutlined";
|
|
1343
|
+
}
|
|
1344
|
+
var CopyOutlined_default = RefIcon4;
|
|
1345
|
+
|
|
1346
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Base/util.js
|
|
1347
|
+
var toCopyConfigList = (val) => {
|
|
1348
|
+
if (val === false) {
|
|
1349
|
+
return [false, false];
|
|
1350
|
+
}
|
|
1351
|
+
return toList_default(val);
|
|
1352
|
+
};
|
|
1353
|
+
function getNode(dom, defaultNode, needDom) {
|
|
1354
|
+
if (dom === true || dom === void 0) {
|
|
1355
|
+
return defaultNode;
|
|
1356
|
+
}
|
|
1357
|
+
return dom || needDom && defaultNode;
|
|
1358
|
+
}
|
|
1359
|
+
function isEleEllipsis(ele) {
|
|
1360
|
+
const childDiv = document.createElement("em");
|
|
1361
|
+
ele.appendChild(childDiv);
|
|
1362
|
+
if (true) {
|
|
1363
|
+
childDiv.className = "ant-typography-css-ellipsis-content-measure";
|
|
1364
|
+
}
|
|
1365
|
+
const rect = ele.getBoundingClientRect();
|
|
1366
|
+
const childRect = childDiv.getBoundingClientRect();
|
|
1367
|
+
ele.removeChild(childDiv);
|
|
1368
|
+
return (
|
|
1369
|
+
// Horizontal out of range
|
|
1370
|
+
rect.left > childRect.left || childRect.right > rect.right || // Vertical out of range
|
|
1371
|
+
rect.top > childRect.top || childRect.bottom > rect.bottom
|
|
1372
|
+
);
|
|
1373
|
+
}
|
|
1374
|
+
var isValidText = (val) => ["string", "number"].includes(typeof val);
|
|
1375
|
+
|
|
1376
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Base/CopyBtn.js
|
|
1377
|
+
var CopyBtn = (props) => {
|
|
1378
|
+
const {
|
|
1379
|
+
prefixCls,
|
|
1380
|
+
copied,
|
|
1381
|
+
locale,
|
|
1382
|
+
iconOnly,
|
|
1383
|
+
tooltips,
|
|
1384
|
+
icon,
|
|
1385
|
+
tabIndex,
|
|
1386
|
+
onCopy,
|
|
1387
|
+
loading: btnLoading,
|
|
1388
|
+
className,
|
|
1389
|
+
style
|
|
1390
|
+
} = props;
|
|
1391
|
+
const tooltipNodes = toCopyConfigList(tooltips);
|
|
1392
|
+
const iconNodes = toCopyConfigList(icon);
|
|
1393
|
+
const {
|
|
1394
|
+
copied: copiedText,
|
|
1395
|
+
copy: copyText
|
|
1396
|
+
} = locale ?? {};
|
|
1397
|
+
const systemStr = copied ? copiedText : copyText;
|
|
1398
|
+
const copyTitle = getNode(tooltipNodes[copied ? 1 : 0], systemStr);
|
|
1399
|
+
const ariaLabel = typeof copyTitle === "string" ? copyTitle : systemStr;
|
|
1400
|
+
return /* @__PURE__ */ createElement(tooltip_default, {
|
|
1401
|
+
title: copyTitle
|
|
1402
|
+
}, /* @__PURE__ */ createElement("button", {
|
|
1403
|
+
type: "button",
|
|
1404
|
+
className: clsx(`${prefixCls}-copy`, className, {
|
|
1405
|
+
[`${prefixCls}-copy-success`]: copied,
|
|
1406
|
+
[`${prefixCls}-copy-icon-only`]: iconOnly
|
|
1407
|
+
}),
|
|
1408
|
+
style,
|
|
1409
|
+
onClick: onCopy,
|
|
1410
|
+
"aria-label": ariaLabel,
|
|
1411
|
+
tabIndex
|
|
1412
|
+
}, copied ? getNode(iconNodes[1], /* @__PURE__ */ createElement(CheckOutlined_default, null), true) : getNode(iconNodes[0], btnLoading ? /* @__PURE__ */ createElement(LoadingOutlined_default, null) : /* @__PURE__ */ createElement(CopyOutlined_default, null), true)));
|
|
1413
|
+
};
|
|
1414
|
+
var CopyBtn_default = CopyBtn;
|
|
1415
|
+
|
|
1416
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Base/Ellipsis.js
|
|
1417
|
+
var MeasureText = /* @__PURE__ */ forwardRef(({
|
|
1418
|
+
style,
|
|
1419
|
+
children
|
|
1420
|
+
}, ref) => {
|
|
1421
|
+
const spanRef = useRef(null);
|
|
1422
|
+
useImperativeHandle(ref, () => ({
|
|
1423
|
+
isExceed: () => {
|
|
1424
|
+
const span = spanRef.current;
|
|
1425
|
+
return span.scrollHeight > span.clientHeight;
|
|
1426
|
+
},
|
|
1427
|
+
getHeight: () => spanRef.current.clientHeight
|
|
1428
|
+
}));
|
|
1429
|
+
return /* @__PURE__ */ createElement("span", {
|
|
1430
|
+
"aria-hidden": true,
|
|
1431
|
+
ref: spanRef,
|
|
1432
|
+
style: {
|
|
1433
|
+
position: "fixed",
|
|
1434
|
+
display: "block",
|
|
1435
|
+
left: 0,
|
|
1436
|
+
top: 0,
|
|
1437
|
+
pointerEvents: "none",
|
|
1438
|
+
backgroundColor: "rgba(255, 0, 0, 0.65)",
|
|
1439
|
+
...style
|
|
1440
|
+
}
|
|
1441
|
+
}, children);
|
|
1442
|
+
});
|
|
1443
|
+
var getNodesLen = (nodeList) => nodeList.reduce((totalLen, node) => totalLen + (isValidText(node) ? String(node).length : 1), 0);
|
|
1444
|
+
function sliceNodes(nodeList, len) {
|
|
1445
|
+
let currLen = 0;
|
|
1446
|
+
const currentNodeList = [];
|
|
1447
|
+
for (let i = 0; i < nodeList.length; i += 1) {
|
|
1448
|
+
if (currLen === len) {
|
|
1449
|
+
return currentNodeList;
|
|
1450
|
+
}
|
|
1451
|
+
const node = nodeList[i];
|
|
1452
|
+
const canCut = isValidText(node);
|
|
1453
|
+
const nodeLen = canCut ? String(node).length : 1;
|
|
1454
|
+
const nextLen = currLen + nodeLen;
|
|
1455
|
+
if (nextLen > len) {
|
|
1456
|
+
const restLen = len - currLen;
|
|
1457
|
+
currentNodeList.push(String(node).slice(0, restLen));
|
|
1458
|
+
return currentNodeList;
|
|
1459
|
+
}
|
|
1460
|
+
currentNodeList.push(node);
|
|
1461
|
+
currLen = nextLen;
|
|
1462
|
+
}
|
|
1463
|
+
return nodeList;
|
|
1464
|
+
}
|
|
1465
|
+
var STATUS_MEASURE_NONE = 0;
|
|
1466
|
+
var STATUS_MEASURE_PREPARE = 1;
|
|
1467
|
+
var STATUS_MEASURE_START = 2;
|
|
1468
|
+
var STATUS_MEASURE_NEED_ELLIPSIS = 3;
|
|
1469
|
+
var STATUS_MEASURE_NO_NEED_ELLIPSIS = 4;
|
|
1470
|
+
var lineClipStyle = {
|
|
1471
|
+
display: "-webkit-box",
|
|
1472
|
+
overflow: "hidden",
|
|
1473
|
+
WebkitBoxOrient: "vertical"
|
|
1474
|
+
};
|
|
1475
|
+
function EllipsisMeasure(props) {
|
|
1476
|
+
const {
|
|
1477
|
+
enableMeasure,
|
|
1478
|
+
width,
|
|
1479
|
+
text,
|
|
1480
|
+
children,
|
|
1481
|
+
rows,
|
|
1482
|
+
expanded,
|
|
1483
|
+
measureDeps,
|
|
1484
|
+
miscDeps,
|
|
1485
|
+
onEllipsis
|
|
1486
|
+
} = props;
|
|
1487
|
+
const nodeList = useMemo(() => toArray(text), [text]);
|
|
1488
|
+
const nodeLen = useMemo(() => getNodesLen(nodeList), [text]);
|
|
1489
|
+
const fullContent = useMemo(() => children(nodeList, false), [text].concat(_toConsumableArray(measureDeps)));
|
|
1490
|
+
const [ellipsisCutIndex, setEllipsisCutIndex] = useState(null);
|
|
1491
|
+
const cutMidRef = useRef(null);
|
|
1492
|
+
const measureWhiteSpaceRef = useRef(null);
|
|
1493
|
+
const needEllipsisRef = useRef(null);
|
|
1494
|
+
const descRowsEllipsisRef = useRef(null);
|
|
1495
|
+
const symbolRowEllipsisRef = useRef(null);
|
|
1496
|
+
const [canEllipsis, setCanEllipsis] = useState(false);
|
|
1497
|
+
const [needEllipsis, setNeedEllipsis] = useState(STATUS_MEASURE_NONE);
|
|
1498
|
+
const [ellipsisHeight, setEllipsisHeight] = useState(0);
|
|
1499
|
+
const [parentWhiteSpace, setParentWhiteSpace] = useState(null);
|
|
1500
|
+
useLayoutEffect_default(() => {
|
|
1501
|
+
if (enableMeasure && width && nodeLen) {
|
|
1502
|
+
setNeedEllipsis(STATUS_MEASURE_PREPARE);
|
|
1503
|
+
} else {
|
|
1504
|
+
setNeedEllipsis(STATUS_MEASURE_NONE);
|
|
1505
|
+
}
|
|
1506
|
+
}, [width, text, rows, enableMeasure, nodeList].concat(_toConsumableArray(measureDeps)));
|
|
1507
|
+
useLayoutEffect_default(() => {
|
|
1508
|
+
if (needEllipsis === STATUS_MEASURE_PREPARE) {
|
|
1509
|
+
setNeedEllipsis(STATUS_MEASURE_START);
|
|
1510
|
+
const nextWhiteSpace = measureWhiteSpaceRef.current && getComputedStyle(measureWhiteSpaceRef.current).whiteSpace;
|
|
1511
|
+
setParentWhiteSpace(nextWhiteSpace);
|
|
1512
|
+
} else if (needEllipsis === STATUS_MEASURE_START) {
|
|
1513
|
+
const isOverflow = !!needEllipsisRef.current?.isExceed();
|
|
1514
|
+
setNeedEllipsis(isOverflow ? STATUS_MEASURE_NEED_ELLIPSIS : STATUS_MEASURE_NO_NEED_ELLIPSIS);
|
|
1515
|
+
setEllipsisCutIndex(isOverflow ? [0, nodeLen] : null);
|
|
1516
|
+
setCanEllipsis(isOverflow);
|
|
1517
|
+
const baseRowsEllipsisHeight = needEllipsisRef.current?.getHeight() || 0;
|
|
1518
|
+
const descRowsEllipsisHeight = rows === 1 ? 0 : descRowsEllipsisRef.current?.getHeight() || 0;
|
|
1519
|
+
const symbolRowEllipsisHeight = symbolRowEllipsisRef.current?.getHeight() || 0;
|
|
1520
|
+
const maxRowsHeight = Math.max(
|
|
1521
|
+
baseRowsEllipsisHeight,
|
|
1522
|
+
// height of rows with ellipsis
|
|
1523
|
+
descRowsEllipsisHeight + symbolRowEllipsisHeight
|
|
1524
|
+
);
|
|
1525
|
+
setEllipsisHeight(maxRowsHeight + 1);
|
|
1526
|
+
onEllipsis(isOverflow);
|
|
1527
|
+
}
|
|
1528
|
+
}, [needEllipsis]);
|
|
1529
|
+
const cutMidIndex = ellipsisCutIndex ? Math.ceil((ellipsisCutIndex[0] + ellipsisCutIndex[1]) / 2) : 0;
|
|
1530
|
+
useLayoutEffect_default(() => {
|
|
1531
|
+
const [minIndex, maxIndex] = ellipsisCutIndex || [0, 0];
|
|
1532
|
+
if (minIndex !== maxIndex) {
|
|
1533
|
+
const midHeight = cutMidRef.current?.getHeight() || 0;
|
|
1534
|
+
const isOverflow = midHeight > ellipsisHeight;
|
|
1535
|
+
let targetMidIndex = cutMidIndex;
|
|
1536
|
+
if (maxIndex - minIndex === 1) {
|
|
1537
|
+
targetMidIndex = isOverflow ? minIndex : maxIndex;
|
|
1538
|
+
}
|
|
1539
|
+
setEllipsisCutIndex(isOverflow ? [minIndex, targetMidIndex] : [targetMidIndex, maxIndex]);
|
|
1540
|
+
}
|
|
1541
|
+
}, [ellipsisCutIndex, cutMidIndex]);
|
|
1542
|
+
const finalContent = useMemo(() => {
|
|
1543
|
+
if (!enableMeasure) {
|
|
1544
|
+
return children(nodeList, false);
|
|
1545
|
+
}
|
|
1546
|
+
if (needEllipsis !== STATUS_MEASURE_NEED_ELLIPSIS || !ellipsisCutIndex || ellipsisCutIndex[0] !== ellipsisCutIndex[1]) {
|
|
1547
|
+
const content = children(nodeList, false);
|
|
1548
|
+
if ([STATUS_MEASURE_NO_NEED_ELLIPSIS, STATUS_MEASURE_NONE].includes(needEllipsis)) {
|
|
1549
|
+
return content;
|
|
1550
|
+
}
|
|
1551
|
+
return /* @__PURE__ */ createElement("span", {
|
|
1552
|
+
style: {
|
|
1553
|
+
...lineClipStyle,
|
|
1554
|
+
WebkitLineClamp: rows
|
|
1555
|
+
}
|
|
1556
|
+
}, content);
|
|
1557
|
+
}
|
|
1558
|
+
return children(expanded ? nodeList : sliceNodes(nodeList, ellipsisCutIndex[0]), canEllipsis);
|
|
1559
|
+
}, [expanded, needEllipsis, ellipsisCutIndex, nodeList].concat(_toConsumableArray(miscDeps)));
|
|
1560
|
+
const measureStyle = {
|
|
1561
|
+
width,
|
|
1562
|
+
margin: 0,
|
|
1563
|
+
padding: 0,
|
|
1564
|
+
whiteSpace: parentWhiteSpace === "nowrap" ? "normal" : "inherit"
|
|
1565
|
+
};
|
|
1566
|
+
return /* @__PURE__ */ createElement(Fragment, null, finalContent, needEllipsis === STATUS_MEASURE_START && /* @__PURE__ */ createElement(Fragment, null, /* @__PURE__ */ createElement(MeasureText, {
|
|
1567
|
+
style: {
|
|
1568
|
+
...measureStyle,
|
|
1569
|
+
...lineClipStyle,
|
|
1570
|
+
WebkitLineClamp: rows
|
|
1571
|
+
},
|
|
1572
|
+
ref: needEllipsisRef
|
|
1573
|
+
}, fullContent), /* @__PURE__ */ createElement(MeasureText, {
|
|
1574
|
+
style: {
|
|
1575
|
+
...measureStyle,
|
|
1576
|
+
...lineClipStyle,
|
|
1577
|
+
WebkitLineClamp: rows - 1
|
|
1578
|
+
},
|
|
1579
|
+
ref: descRowsEllipsisRef
|
|
1580
|
+
}, fullContent), /* @__PURE__ */ createElement(MeasureText, {
|
|
1581
|
+
style: {
|
|
1582
|
+
...measureStyle,
|
|
1583
|
+
...lineClipStyle,
|
|
1584
|
+
WebkitLineClamp: 1
|
|
1585
|
+
},
|
|
1586
|
+
ref: symbolRowEllipsisRef
|
|
1587
|
+
}, children([], true))), needEllipsis === STATUS_MEASURE_NEED_ELLIPSIS && ellipsisCutIndex && ellipsisCutIndex[0] !== ellipsisCutIndex[1] && /* @__PURE__ */ createElement(MeasureText, {
|
|
1588
|
+
style: {
|
|
1589
|
+
...measureStyle,
|
|
1590
|
+
top: 400
|
|
1591
|
+
},
|
|
1592
|
+
ref: cutMidRef
|
|
1593
|
+
}, children(sliceNodes(nodeList, cutMidIndex), true)), needEllipsis === STATUS_MEASURE_PREPARE && /* @__PURE__ */ createElement("span", {
|
|
1594
|
+
style: {
|
|
1595
|
+
whiteSpace: "inherit"
|
|
1596
|
+
},
|
|
1597
|
+
ref: measureWhiteSpaceRef
|
|
1598
|
+
}));
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Base/EllipsisTooltip.js
|
|
1602
|
+
var EllipsisTooltip = ({
|
|
1603
|
+
enableEllipsis,
|
|
1604
|
+
isEllipsis,
|
|
1605
|
+
disabled,
|
|
1606
|
+
children,
|
|
1607
|
+
tooltipProps
|
|
1608
|
+
}) => {
|
|
1609
|
+
if (!tooltipProps?.title || !enableEllipsis) {
|
|
1610
|
+
return children;
|
|
1611
|
+
}
|
|
1612
|
+
return /* @__PURE__ */ createElement(tooltip_default, {
|
|
1613
|
+
...tooltipProps,
|
|
1614
|
+
disabled: !isEllipsis || disabled
|
|
1615
|
+
}, children);
|
|
1616
|
+
};
|
|
1617
|
+
if (true) {
|
|
1618
|
+
EllipsisTooltip.displayName = "EllipsisTooltip";
|
|
1619
|
+
}
|
|
1620
|
+
var EllipsisTooltip_default = EllipsisTooltip;
|
|
1621
|
+
|
|
1622
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Base/index.js
|
|
1623
|
+
function wrapperDecorations({
|
|
1624
|
+
mark,
|
|
1625
|
+
code,
|
|
1626
|
+
underline,
|
|
1627
|
+
delete: del,
|
|
1628
|
+
strong,
|
|
1629
|
+
keyboard,
|
|
1630
|
+
italic
|
|
1631
|
+
}, content) {
|
|
1632
|
+
let currentContent = content;
|
|
1633
|
+
function wrap(tag, needed) {
|
|
1634
|
+
if (!needed) {
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1637
|
+
currentContent = /* @__PURE__ */ createElement(tag, {}, currentContent);
|
|
1638
|
+
}
|
|
1639
|
+
wrap("strong", strong);
|
|
1640
|
+
wrap("u", underline);
|
|
1641
|
+
wrap("del", del);
|
|
1642
|
+
wrap("code", code);
|
|
1643
|
+
wrap("mark", mark);
|
|
1644
|
+
wrap("kbd", keyboard);
|
|
1645
|
+
wrap("i", italic);
|
|
1646
|
+
return currentContent;
|
|
1647
|
+
}
|
|
1648
|
+
var ELLIPSIS_STR = "...";
|
|
1649
|
+
var DECORATION_PROPS = ["delete", "mark", "code", "underline", "strong", "keyboard", "italic"];
|
|
1650
|
+
var Base = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
1651
|
+
const {
|
|
1652
|
+
prefixCls: customizePrefixCls,
|
|
1653
|
+
className,
|
|
1654
|
+
style,
|
|
1655
|
+
classNames,
|
|
1656
|
+
styles,
|
|
1657
|
+
direction: typographyDirection,
|
|
1658
|
+
type,
|
|
1659
|
+
disabled,
|
|
1660
|
+
children,
|
|
1661
|
+
ellipsis,
|
|
1662
|
+
editable,
|
|
1663
|
+
copyable,
|
|
1664
|
+
actions,
|
|
1665
|
+
component,
|
|
1666
|
+
title,
|
|
1667
|
+
onMouseEnter,
|
|
1668
|
+
onMouseLeave,
|
|
1669
|
+
...restProps
|
|
1670
|
+
} = props;
|
|
1671
|
+
const [textLocale] = useLocale_default("Text");
|
|
1672
|
+
const typographyRef = useRef(null);
|
|
1673
|
+
const editIconRef = useRef(null);
|
|
1674
|
+
const [mergedClassNames, mergedStyles, prefixCls, direction] = useTypographySemantic(customizePrefixCls, classNames, styles, typographyDirection, props);
|
|
1675
|
+
const textProps = omit(restProps, DECORATION_PROPS);
|
|
1676
|
+
const [enableEdit, editConfig] = useMergedConfig_default(editable);
|
|
1677
|
+
const [editing, setEditing] = useControlledState(false, editConfig.editing);
|
|
1678
|
+
const {
|
|
1679
|
+
triggerType = ["icon"]
|
|
1680
|
+
} = editConfig;
|
|
1681
|
+
const triggerEdit = (edit) => {
|
|
1682
|
+
if (edit) {
|
|
1683
|
+
editConfig.onStart?.();
|
|
1684
|
+
}
|
|
1685
|
+
setEditing(edit);
|
|
1686
|
+
};
|
|
1687
|
+
const prevEditing = usePrevious_default(editing);
|
|
1688
|
+
useLayoutEffect_default(() => {
|
|
1689
|
+
if (!editing && prevEditing) {
|
|
1690
|
+
editIconRef.current?.focus();
|
|
1691
|
+
}
|
|
1692
|
+
}, [editing]);
|
|
1693
|
+
const onEditClick = (e) => {
|
|
1694
|
+
e?.preventDefault();
|
|
1695
|
+
triggerEdit(true);
|
|
1696
|
+
};
|
|
1697
|
+
const onEditChange = (value) => {
|
|
1698
|
+
editConfig.onChange?.(value);
|
|
1699
|
+
triggerEdit(false);
|
|
1700
|
+
};
|
|
1701
|
+
const onEditCancel = () => {
|
|
1702
|
+
editConfig.onCancel?.();
|
|
1703
|
+
triggerEdit(false);
|
|
1704
|
+
};
|
|
1705
|
+
const [enableCopy, copyConfig] = useMergedConfig_default(copyable);
|
|
1706
|
+
const {
|
|
1707
|
+
placement = "end"
|
|
1708
|
+
} = actions ?? {};
|
|
1709
|
+
const {
|
|
1710
|
+
copied,
|
|
1711
|
+
copyLoading,
|
|
1712
|
+
onClick: onCopyClick
|
|
1713
|
+
} = useCopyClick_default({
|
|
1714
|
+
copyConfig,
|
|
1715
|
+
children
|
|
1716
|
+
});
|
|
1717
|
+
const [isLineClampSupport, setIsLineClampSupport] = useState(false);
|
|
1718
|
+
const [isTextOverflowSupport, setIsTextOverflowSupport] = useState(false);
|
|
1719
|
+
const [isJsEllipsis, setIsJsEllipsis] = useState(false);
|
|
1720
|
+
const [isNativeEllipsis, setIsNativeEllipsis] = useState(false);
|
|
1721
|
+
const [isNativeVisible, setIsNativeVisible] = useState(true);
|
|
1722
|
+
const [enableEllipsis, ellipsisConfig] = useMergedConfig_default(ellipsis, {
|
|
1723
|
+
expandable: false,
|
|
1724
|
+
symbol: (isExpanded) => isExpanded ? textLocale?.collapse : textLocale?.expand
|
|
1725
|
+
});
|
|
1726
|
+
const [expanded, setExpanded] = useControlledState(ellipsisConfig.defaultExpanded || false, ellipsisConfig.expanded);
|
|
1727
|
+
const mergedEnableEllipsis = enableEllipsis && (!expanded || ellipsisConfig.expandable === "collapsible");
|
|
1728
|
+
const {
|
|
1729
|
+
rows = 1
|
|
1730
|
+
} = ellipsisConfig;
|
|
1731
|
+
const needMeasureEllipsis = useMemo(() => (
|
|
1732
|
+
// Disable ellipsis
|
|
1733
|
+
mergedEnableEllipsis && // Provide suffix
|
|
1734
|
+
(ellipsisConfig.suffix !== void 0 || ellipsisConfig.onEllipsis || // Can't use css ellipsis since we need to provide the place for button
|
|
1735
|
+
ellipsisConfig.expandable || enableEdit || enableCopy)
|
|
1736
|
+
), [mergedEnableEllipsis, ellipsisConfig, enableEdit, enableCopy]);
|
|
1737
|
+
useLayoutEffect_default(() => {
|
|
1738
|
+
if (enableEllipsis && !needMeasureEllipsis) {
|
|
1739
|
+
setIsLineClampSupport(isStyleSupport("webkitLineClamp"));
|
|
1740
|
+
setIsTextOverflowSupport(isStyleSupport("textOverflow"));
|
|
1741
|
+
}
|
|
1742
|
+
}, [needMeasureEllipsis, enableEllipsis]);
|
|
1743
|
+
const [cssEllipsis, setCssEllipsis] = useState(mergedEnableEllipsis);
|
|
1744
|
+
const canUseCssEllipsis = useMemo(() => {
|
|
1745
|
+
if (needMeasureEllipsis) {
|
|
1746
|
+
return false;
|
|
1747
|
+
}
|
|
1748
|
+
if (rows === 1) {
|
|
1749
|
+
return isTextOverflowSupport;
|
|
1750
|
+
}
|
|
1751
|
+
return isLineClampSupport;
|
|
1752
|
+
}, [needMeasureEllipsis, rows, isLineClampSupport, isTextOverflowSupport]);
|
|
1753
|
+
useLayoutEffect_default(() => {
|
|
1754
|
+
setCssEllipsis(canUseCssEllipsis && mergedEnableEllipsis);
|
|
1755
|
+
}, [canUseCssEllipsis, mergedEnableEllipsis]);
|
|
1756
|
+
const tooltipProps = useTooltipProps_default(ellipsisConfig.tooltip, editConfig.text, children);
|
|
1757
|
+
const needNativeEllipsisMeasure = cssEllipsis && !!tooltipProps.title;
|
|
1758
|
+
const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? needNativeEllipsisMeasure && isNativeEllipsis : isJsEllipsis);
|
|
1759
|
+
const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;
|
|
1760
|
+
const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;
|
|
1761
|
+
const onExpandClick = (e, info) => {
|
|
1762
|
+
setExpanded(info.expanded);
|
|
1763
|
+
ellipsisConfig.onExpand?.(e, info);
|
|
1764
|
+
};
|
|
1765
|
+
const [ellipsisWidth, setEllipsisWidth] = useState(0);
|
|
1766
|
+
const [isHoveringOperations, setIsHoveringOperations] = useDelayState(false);
|
|
1767
|
+
const isHoveringTypographyRef = useRef(false);
|
|
1768
|
+
const onResize = ({
|
|
1769
|
+
offsetWidth
|
|
1770
|
+
}) => {
|
|
1771
|
+
setEllipsisWidth(offsetWidth);
|
|
1772
|
+
};
|
|
1773
|
+
const onJsEllipsis = (jsEllipsis) => {
|
|
1774
|
+
setIsJsEllipsis(jsEllipsis);
|
|
1775
|
+
if (isJsEllipsis !== jsEllipsis) {
|
|
1776
|
+
ellipsisConfig.onEllipsis?.(jsEllipsis);
|
|
1777
|
+
}
|
|
1778
|
+
};
|
|
1779
|
+
const measureNativeEllipsis = useCallback(() => {
|
|
1780
|
+
const textEle = typographyRef.current;
|
|
1781
|
+
if (enableEllipsis && needNativeEllipsisMeasure && textEle) {
|
|
1782
|
+
const currentEllipsis = isEleEllipsis(textEle);
|
|
1783
|
+
setIsNativeEllipsis((prev) => prev === currentEllipsis ? prev : currentEllipsis);
|
|
1784
|
+
}
|
|
1785
|
+
}, [enableEllipsis, needNativeEllipsisMeasure]);
|
|
1786
|
+
useEffect(() => {
|
|
1787
|
+
if (isHoveringTypographyRef.current) {
|
|
1788
|
+
measureNativeEllipsis();
|
|
1789
|
+
}
|
|
1790
|
+
}, [measureNativeEllipsis, children, cssLineClamp, isNativeVisible, ellipsisWidth]);
|
|
1791
|
+
useEffect(() => {
|
|
1792
|
+
const textEle = typographyRef.current;
|
|
1793
|
+
if (typeof IntersectionObserver === "undefined" || !textEle || !needNativeEllipsisMeasure || !mergedEnableEllipsis) {
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
const observer = new IntersectionObserver(() => {
|
|
1797
|
+
setIsNativeVisible(!!textEle.offsetParent);
|
|
1798
|
+
});
|
|
1799
|
+
observer.observe(textEle);
|
|
1800
|
+
return () => {
|
|
1801
|
+
observer.disconnect();
|
|
1802
|
+
};
|
|
1803
|
+
}, [needNativeEllipsisMeasure, mergedEnableEllipsis]);
|
|
1804
|
+
const topAriaLabel = useMemo(() => {
|
|
1805
|
+
if (!enableEllipsis || cssEllipsis) {
|
|
1806
|
+
return void 0;
|
|
1807
|
+
}
|
|
1808
|
+
return [editConfig.text, children, title, tooltipProps.title].find(isValidText);
|
|
1809
|
+
}, [enableEllipsis, cssEllipsis, title, tooltipProps.title, isMergedEllipsis, editConfig.text]);
|
|
1810
|
+
if (editing) {
|
|
1811
|
+
return /* @__PURE__ */ createElement(Editable_default, {
|
|
1812
|
+
value: editConfig.text ?? (typeof children === "string" ? children : ""),
|
|
1813
|
+
onSave: onEditChange,
|
|
1814
|
+
onCancel: onEditCancel,
|
|
1815
|
+
onEnd: editConfig.onEnd,
|
|
1816
|
+
prefixCls,
|
|
1817
|
+
className,
|
|
1818
|
+
style,
|
|
1819
|
+
direction,
|
|
1820
|
+
component,
|
|
1821
|
+
maxLength: editConfig.maxLength,
|
|
1822
|
+
autoSize: editConfig.autoSize,
|
|
1823
|
+
enterIcon: editConfig.enterIcon,
|
|
1824
|
+
classNames: mergedClassNames,
|
|
1825
|
+
styles: mergedStyles
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
const renderExpand = () => {
|
|
1829
|
+
const {
|
|
1830
|
+
expandable,
|
|
1831
|
+
symbol
|
|
1832
|
+
} = ellipsisConfig;
|
|
1833
|
+
return expandable ? /* @__PURE__ */ createElement("button", {
|
|
1834
|
+
type: "button",
|
|
1835
|
+
key: "expand",
|
|
1836
|
+
className: clsx(`${prefixCls}-${expanded ? "collapse" : "expand"}`, mergedClassNames.action),
|
|
1837
|
+
style: mergedStyles.action,
|
|
1838
|
+
onClick: (e) => onExpandClick(e, {
|
|
1839
|
+
expanded: !expanded
|
|
1840
|
+
}),
|
|
1841
|
+
"aria-label": expanded ? textLocale.collapse : textLocale?.expand
|
|
1842
|
+
}, isFunction(symbol) ? symbol(expanded) : symbol) : null;
|
|
1843
|
+
};
|
|
1844
|
+
const renderEdit = () => {
|
|
1845
|
+
if (!enableEdit) {
|
|
1846
|
+
return;
|
|
1847
|
+
}
|
|
1848
|
+
const {
|
|
1849
|
+
icon,
|
|
1850
|
+
tooltip,
|
|
1851
|
+
tabIndex
|
|
1852
|
+
} = editConfig;
|
|
1853
|
+
const editTitle = toArray(tooltip)[0] || textLocale?.edit;
|
|
1854
|
+
const ariaLabel = typeof editTitle === "string" ? editTitle : "";
|
|
1855
|
+
return triggerType.includes("icon") ? /* @__PURE__ */ createElement(tooltip_default, {
|
|
1856
|
+
key: "edit",
|
|
1857
|
+
title: tooltip === false ? "" : editTitle
|
|
1858
|
+
}, /* @__PURE__ */ createElement("button", {
|
|
1859
|
+
type: "button",
|
|
1860
|
+
ref: editIconRef,
|
|
1861
|
+
className: clsx(`${prefixCls}-edit`, mergedClassNames.action),
|
|
1862
|
+
style: mergedStyles.action,
|
|
1863
|
+
onClick: onEditClick,
|
|
1864
|
+
"aria-label": ariaLabel,
|
|
1865
|
+
tabIndex
|
|
1866
|
+
}, icon || /* @__PURE__ */ createElement(EditOutlined_default, {
|
|
1867
|
+
role: "button"
|
|
1868
|
+
}))) : null;
|
|
1869
|
+
};
|
|
1870
|
+
const renderCopy = () => {
|
|
1871
|
+
if (!enableCopy) {
|
|
1872
|
+
return null;
|
|
1873
|
+
}
|
|
1874
|
+
return /* @__PURE__ */ createElement(CopyBtn_default, {
|
|
1875
|
+
key: "copy",
|
|
1876
|
+
...copyConfig,
|
|
1877
|
+
prefixCls,
|
|
1878
|
+
copied,
|
|
1879
|
+
locale: textLocale,
|
|
1880
|
+
onCopy: onCopyClick,
|
|
1881
|
+
loading: copyLoading,
|
|
1882
|
+
iconOnly: !isReactRenderable(children),
|
|
1883
|
+
className: mergedClassNames.action,
|
|
1884
|
+
style: mergedStyles.action
|
|
1885
|
+
});
|
|
1886
|
+
};
|
|
1887
|
+
const renderOperations = (canEllipsis) => {
|
|
1888
|
+
const expandNode = canEllipsis && renderExpand();
|
|
1889
|
+
const editNode = renderEdit();
|
|
1890
|
+
const copyNode = renderCopy();
|
|
1891
|
+
if (!expandNode && !editNode && !copyNode) {
|
|
1892
|
+
return null;
|
|
1893
|
+
}
|
|
1894
|
+
return /* @__PURE__ */ createElement("span", {
|
|
1895
|
+
key: "operations",
|
|
1896
|
+
className: clsx(`${prefixCls}-actions`, mergedClassNames.actions, {
|
|
1897
|
+
[`${prefixCls}-actions-start`]: placement === "start"
|
|
1898
|
+
}),
|
|
1899
|
+
style: mergedStyles.actions,
|
|
1900
|
+
onMouseEnter: () => setIsHoveringOperations(true, true),
|
|
1901
|
+
onMouseLeave: () => setIsHoveringOperations(false, {
|
|
1902
|
+
// Delay 500ms for better user experience
|
|
1903
|
+
ms: 500
|
|
1904
|
+
})
|
|
1905
|
+
}, expandNode, editNode, copyNode);
|
|
1906
|
+
};
|
|
1907
|
+
const renderEllipsis = (canEllipsis) => [canEllipsis && !expanded && /* @__PURE__ */ createElement("span", {
|
|
1908
|
+
"aria-hidden": true,
|
|
1909
|
+
key: "ellipsis"
|
|
1910
|
+
}, ELLIPSIS_STR), ellipsisConfig.suffix];
|
|
1911
|
+
return /* @__PURE__ */ createElement(es_default, {
|
|
1912
|
+
onResize,
|
|
1913
|
+
disabled: !mergedEnableEllipsis
|
|
1914
|
+
}, (resizeRef) => /* @__PURE__ */ createElement(EllipsisTooltip_default, {
|
|
1915
|
+
tooltipProps,
|
|
1916
|
+
enableEllipsis: mergedEnableEllipsis,
|
|
1917
|
+
isEllipsis: isMergedEllipsis,
|
|
1918
|
+
disabled: isHoveringOperations
|
|
1919
|
+
}, /* @__PURE__ */ createElement(InternalTypography, {
|
|
1920
|
+
onMouseEnter: (e) => {
|
|
1921
|
+
isHoveringTypographyRef.current = true;
|
|
1922
|
+
measureNativeEllipsis();
|
|
1923
|
+
onMouseEnter?.(e);
|
|
1924
|
+
},
|
|
1925
|
+
onMouseLeave: (e) => {
|
|
1926
|
+
isHoveringTypographyRef.current = false;
|
|
1927
|
+
onMouseLeave?.(e);
|
|
1928
|
+
},
|
|
1929
|
+
className: clsx({
|
|
1930
|
+
[`${prefixCls}-${type}`]: type,
|
|
1931
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
1932
|
+
[`${prefixCls}-ellipsis`]: enableEllipsis,
|
|
1933
|
+
[`${prefixCls}-ellipsis-single-line`]: cssTextOverflow,
|
|
1934
|
+
[`${prefixCls}-ellipsis-multiple-line`]: cssLineClamp,
|
|
1935
|
+
[`${prefixCls}-link`]: component === "a"
|
|
1936
|
+
}, className),
|
|
1937
|
+
classNames: mergedClassNames,
|
|
1938
|
+
styles: mergedStyles,
|
|
1939
|
+
prefixCls,
|
|
1940
|
+
style: {
|
|
1941
|
+
...style,
|
|
1942
|
+
WebkitLineClamp: cssLineClamp ? rows : void 0
|
|
1943
|
+
},
|
|
1944
|
+
component,
|
|
1945
|
+
ref: composeRef(resizeRef, typographyRef, ref),
|
|
1946
|
+
direction,
|
|
1947
|
+
onClick: triggerType.includes("text") ? onEditClick : void 0,
|
|
1948
|
+
"aria-label": topAriaLabel?.toString(),
|
|
1949
|
+
title,
|
|
1950
|
+
...textProps
|
|
1951
|
+
}, /* @__PURE__ */ createElement(EllipsisMeasure, {
|
|
1952
|
+
enableMeasure: mergedEnableEllipsis && !cssEllipsis,
|
|
1953
|
+
text: children,
|
|
1954
|
+
rows,
|
|
1955
|
+
width: ellipsisWidth,
|
|
1956
|
+
onEllipsis: onJsEllipsis,
|
|
1957
|
+
expanded,
|
|
1958
|
+
measureDeps: [placement],
|
|
1959
|
+
miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy, placement, textLocale].concat(_toConsumableArray(DECORATION_PROPS.map((key) => props[key])))
|
|
1960
|
+
}, (node, canEllipsis) => wrapperDecorations(props, /* @__PURE__ */ createElement(Fragment, null, placement === "start" ? renderOperations(canEllipsis) : null, node.length > 0 && canEllipsis && !expanded && topAriaLabel ? /* @__PURE__ */ createElement("span", {
|
|
1961
|
+
key: "show-content",
|
|
1962
|
+
"aria-hidden": true
|
|
1963
|
+
}, node) : node, renderEllipsis(canEllipsis), placement === "start" ? null : renderOperations(canEllipsis)))))));
|
|
1964
|
+
});
|
|
1965
|
+
var Base_default = Base;
|
|
1966
|
+
|
|
1967
|
+
// ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/typography/Text.js
|
|
1968
|
+
var Text = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
1969
|
+
const {
|
|
1970
|
+
ellipsis,
|
|
1971
|
+
children,
|
|
1972
|
+
...restProps
|
|
1973
|
+
} = props;
|
|
1974
|
+
const mergedEllipsis = useMemo(() => {
|
|
1975
|
+
if (isPlainObject(ellipsis)) {
|
|
1976
|
+
return omit(ellipsis, ["expandable", "rows"]);
|
|
1977
|
+
}
|
|
1978
|
+
return ellipsis;
|
|
1979
|
+
}, [ellipsis]);
|
|
1980
|
+
if (true) {
|
|
1981
|
+
const warning = devUseWarning("Typography.Text");
|
|
1982
|
+
true ? warning(!isPlainObject(ellipsis) || !("expandable" in ellipsis) && !("rows" in ellipsis), "usage", "`ellipsis` do not support `expandable` or `rows` props.") : void 0;
|
|
1983
|
+
}
|
|
1984
|
+
return /* @__PURE__ */ createElement(Base_default, {
|
|
1985
|
+
ref,
|
|
1986
|
+
...restProps,
|
|
1987
|
+
ellipsis: mergedEllipsis,
|
|
1988
|
+
component: "span"
|
|
1989
|
+
}, children);
|
|
1990
|
+
});
|
|
1991
|
+
var Text_default = Text;
|
|
1992
|
+
|
|
1993
|
+
// ../ui/dist/client-navigation.js
|
|
1994
|
+
function shouldUseClientNavigation(event) {
|
|
1995
|
+
return !event.defaultPrevented && event.button === 0 && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
// ../ui/dist/button.js
|
|
1999
|
+
var ZlooksButton = moduleDefault2(Button_default);
|
|
2000
|
+
function moduleDefault2(value) {
|
|
2001
|
+
return value && typeof value === "object" && "default" in value ? value.default : value;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
// ../ui/dist/navigation.js
|
|
2005
|
+
function selectZlooksNavigation(input) {
|
|
2006
|
+
return [
|
|
2007
|
+
{ key: "gateway:home", label: "\u9996\u9875", href: "/", order: -1 },
|
|
2008
|
+
...input.navigation
|
|
2009
|
+
].map((item) => ({
|
|
2010
|
+
...item,
|
|
2011
|
+
active: item.href === "/" ? input.pathname === "/" : input.pathname === item.href || input.pathname.startsWith(`${item.href}/`)
|
|
2012
|
+
}));
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
// ../ui/dist/shell-provider.js
|
|
2016
|
+
var ShellContext = createContext(void 0);
|
|
2017
|
+
function ZlooksShellProvider({ children, initialContext }) {
|
|
2018
|
+
return jsx(ShellContext, { value: initialContext, children });
|
|
2019
|
+
}
|
|
2020
|
+
function useZlooksNavigation() {
|
|
2021
|
+
const context = useZlooksShellContext();
|
|
2022
|
+
return useMemo(() => selectZlooksNavigation(context), [context]);
|
|
2023
|
+
}
|
|
2024
|
+
function useZlooksShellContext() {
|
|
2025
|
+
const context = useContext(ShellContext);
|
|
2026
|
+
if (!context)
|
|
2027
|
+
throw new Error("ZlooksShellProvider is required");
|
|
2028
|
+
return context;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
// ../ui/dist/theme-internal.js
|
|
2032
|
+
var zlooksUserAccessComponents = deepFreeze({
|
|
2033
|
+
Button: {
|
|
2034
|
+
textActiveBg: "transparent",
|
|
2035
|
+
textHoverBg: "transparent"
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
// ../ui/dist/shell.js
|
|
2040
|
+
var Avatar2 = moduleDefault3(Avatar_default);
|
|
2041
|
+
var ConfigProvider2 = moduleDefault3(config_provider_default);
|
|
2042
|
+
var Divider = moduleDefault3(divider_default);
|
|
2043
|
+
var Empty = moduleDefault3(empty_default);
|
|
2044
|
+
var Flex = moduleDefault3(flex_default);
|
|
2045
|
+
var Modal = moduleDefault3(Modal_default);
|
|
2046
|
+
var Popover = moduleDefault3(popover_default);
|
|
2047
|
+
var Space = moduleDefault3(space_default);
|
|
2048
|
+
var Text2 = moduleDefault3(Text_default);
|
|
2049
|
+
function moduleDefault3(value) {
|
|
2050
|
+
return value && typeof value === "object" && "default" in value ? value.default : value;
|
|
2051
|
+
}
|
|
2052
|
+
function ZlooksUserAccess({ className, classNames = {}, style, size = "middle", shape = "round", variant = "compact", onNavigate, onLogout }) {
|
|
2053
|
+
const view = useZlooksShellContext().user;
|
|
2054
|
+
const [accountOpen, setAccountOpen] = useState(false);
|
|
2055
|
+
const [loginOpen, setLoginOpen] = useState(false);
|
|
2056
|
+
const { message, modal } = useZlooksApp();
|
|
2057
|
+
const triggerClassName = mergeClassNames("zlooks-user-access-trigger", className, classNames.trigger);
|
|
2058
|
+
const avatarClassName = mergeClassNames("zlooks-user-access-avatar", classNames.avatar);
|
|
2059
|
+
const labelClassName = mergeClassNames("zlooks-user-access-label", classNames.label);
|
|
2060
|
+
const avatarOnly = variant === "avatar";
|
|
2061
|
+
const triggerAvatarSize = resolveTriggerAvatarSize(size, avatarOnly);
|
|
2062
|
+
const triggerShape = avatarOnly ? "circle" : shape;
|
|
2063
|
+
const triggerAvatarShape = avatarOnly ? "circle" : "square";
|
|
2064
|
+
const triggerStyle = avatarOnly ? {
|
|
2065
|
+
height: triggerAvatarSize,
|
|
2066
|
+
minWidth: triggerAvatarSize,
|
|
2067
|
+
padding: 0,
|
|
2068
|
+
width: triggerAvatarSize,
|
|
2069
|
+
...style
|
|
2070
|
+
} : style;
|
|
2071
|
+
async function logout(logoutHref, close) {
|
|
2072
|
+
try {
|
|
2073
|
+
await onLogout(logoutHref);
|
|
2074
|
+
close();
|
|
2075
|
+
setAccountOpen(false);
|
|
2076
|
+
} catch (cause) {
|
|
2077
|
+
if (!isRequestError(cause))
|
|
2078
|
+
void message.error("\u9000\u51FA\u767B\u5F55\u5931\u8D25");
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
function confirmLogout(logoutHref) {
|
|
2082
|
+
modal.confirm({
|
|
2083
|
+
title: "\u786E\u8BA4\u9000\u51FA\u767B\u5F55\uFF1F",
|
|
2084
|
+
content: "\u9000\u51FA\u540E\uFF0C\u9700\u8981\u91CD\u65B0\u767B\u5F55\u624D\u80FD\u8BBF\u95EE\u4E2A\u4EBA\u8D26\u6237\u3002",
|
|
2085
|
+
okText: "\u9000\u51FA\u767B\u5F55",
|
|
2086
|
+
okButtonProps: { danger: true },
|
|
2087
|
+
cancelText: "\u53D6\u6D88",
|
|
2088
|
+
onOk(close) {
|
|
2089
|
+
void logout(logoutHref, close);
|
|
2090
|
+
}
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
function navigate(event, href, close) {
|
|
2094
|
+
if (!onNavigate || !shouldUseClientNavigation(event))
|
|
2095
|
+
return;
|
|
2096
|
+
event.preventDefault();
|
|
2097
|
+
close();
|
|
2098
|
+
onNavigate(href);
|
|
2099
|
+
}
|
|
2100
|
+
if (view.status === "unavailable") {
|
|
2101
|
+
return jsx(UserAccessTheme, { children: jsx(ZlooksButton, { "aria-label": "\u8D26\u6237\u670D\u52A1\u6682\u4E0D\u53EF\u7528", className: triggerClassName, disabled: true, shape: triggerShape, size, style: triggerStyle, type: "text", children: jsxs(Space, { align: "center", size: 6, children: [jsx(Avatar2, { className: avatarClassName, shape: triggerAvatarShape, size: triggerAvatarSize, style: {
|
|
2102
|
+
background: "var(--ant-color-fill-secondary)",
|
|
2103
|
+
border: avatarOnly ? "none" : void 0,
|
|
2104
|
+
borderRadius: avatarOnly ? "50%" : 9,
|
|
2105
|
+
boxShadow: avatarOnly ? "none" : void 0,
|
|
2106
|
+
color: "var(--ant-color-text-tertiary)",
|
|
2107
|
+
fontSize: 12,
|
|
2108
|
+
fontWeight: 750
|
|
2109
|
+
}, children: "Z" }), variant === "compact" ? jsx(Text2, { type: "secondary", children: "\u6682\u4E0D\u53EF\u7528" }) : null] }) }) });
|
|
2110
|
+
}
|
|
2111
|
+
if (view.status === "authenticated") {
|
|
2112
|
+
return jsx(UserAccessTheme, { children: jsx(Popover, { arrow: false, destroyOnHidden: true, onOpenChange: setAccountOpen, open: accountOpen, placement: "bottomRight", styles: {
|
|
2113
|
+
container: {
|
|
2114
|
+
border: "1px solid var(--ant-color-border-secondary)",
|
|
2115
|
+
borderRadius: 16,
|
|
2116
|
+
boxShadow: "0 18px 48px rgb(15 23 42 / 14%)",
|
|
2117
|
+
overflow: "hidden",
|
|
2118
|
+
padding: 0
|
|
2119
|
+
},
|
|
2120
|
+
content: {
|
|
2121
|
+
maxWidth: "calc(100vw - 32px)",
|
|
2122
|
+
width: 280
|
|
2123
|
+
}
|
|
2124
|
+
}, trigger: "click", content: jsxs(Flex, { "aria-label": "\u8D26\u6237\u4FE1\u606F", className: classNames.popup, role: "dialog", style: {
|
|
2125
|
+
background: "var(--ant-color-bg-elevated)"
|
|
2126
|
+
}, vertical: true, children: [jsxs(Flex, { align: "center", gap: 12, style: {
|
|
2127
|
+
background: [
|
|
2128
|
+
"linear-gradient(color-mix(in srgb, var(--ant-color-fill-quaternary) 48%, transparent) 1px, transparent 1px)",
|
|
2129
|
+
"linear-gradient(90deg, color-mix(in srgb, var(--ant-color-fill-quaternary) 48%, transparent) 1px, transparent 1px)",
|
|
2130
|
+
"var(--ant-color-bg-elevated)"
|
|
2131
|
+
].join(", "),
|
|
2132
|
+
backgroundSize: "28px 28px",
|
|
2133
|
+
padding: 16
|
|
2134
|
+
}, children: [jsx(Avatar2, { className: avatarClassName, shape: "square", size: 44, src: view.user.avatarUrl, style: {
|
|
2135
|
+
background: "var(--ant-color-text)",
|
|
2136
|
+
borderRadius: 12,
|
|
2137
|
+
color: "var(--ant-color-bg-container)",
|
|
2138
|
+
fontSize: 16,
|
|
2139
|
+
fontWeight: 700
|
|
2140
|
+
}, children: view.user.avatarText }), jsxs(Flex, { style: { flex: 1, minWidth: 0 }, vertical: true, children: [jsx(Text2, { strong: true, ellipsis: true, style: { fontSize: 15, lineHeight: 1.4 }, children: view.user.label }), view.user.secondary ? jsx(Text2, { ellipsis: { tooltip: view.user.secondary }, style: { display: "block" }, type: "secondary", children: view.user.secondary }) : null] }), jsx("span", { "aria-label": "\u5DF2\u767B\u5F55", role: "status", style: {
|
|
2141
|
+
background: "var(--ant-color-success)",
|
|
2142
|
+
borderRadius: 999,
|
|
2143
|
+
boxShadow: "0 0 0 3px var(--ant-color-success-bg)",
|
|
2144
|
+
flex: "0 0 auto",
|
|
2145
|
+
height: 7,
|
|
2146
|
+
width: 7
|
|
2147
|
+
} })] }), jsx(Divider, { style: { margin: 0 } }), jsxs(Flex, { gap: 2, style: { padding: 8 }, vertical: true, children: [jsx(ZlooksButton, { block: true, href: view.accountHref, size: "large", style: {
|
|
2148
|
+
fontWeight: 600,
|
|
2149
|
+
height: 44,
|
|
2150
|
+
paddingInline: 12
|
|
2151
|
+
}, type: "text", onClick: (event) => navigate(event, view.accountHref, () => setAccountOpen(false)), children: jsxs(Flex, { justify: "space-between", style: { width: "100%" }, children: [jsx("span", { children: "\u4E2A\u4EBA\u8D44\u6599" }), jsx(Text2, { "aria-hidden": "true", type: "secondary", children: "\u2192" })] }) }), jsx(ZlooksButton, { block: true, danger: true, size: "large", style: { height: 44, justifyContent: "flex-start", paddingInline: 12 }, type: "text", onClick: () => confirmLogout(view.logoutHref), children: "\u9000\u51FA\u767B\u5F55" })] })] }), children: jsx(ZlooksButton, { "aria-expanded": accountOpen, "aria-haspopup": "dialog", "aria-label": `\u6253\u5F00${view.user.label}\u7684\u8D26\u6237\u4FE1\u606F`, className: triggerClassName, shape: triggerShape, size, style: triggerStyle, type: "text", children: jsxs(Space, { align: "center", size: 6, children: [jsx(Avatar2, { className: avatarClassName, shape: triggerAvatarShape, size: triggerAvatarSize, src: view.user.avatarUrl, style: {
|
|
2152
|
+
background: avatarOnly ? "var(--ant-color-fill-secondary)" : "var(--ant-color-text)",
|
|
2153
|
+
border: avatarOnly ? "none" : void 0,
|
|
2154
|
+
borderRadius: avatarOnly ? "50%" : 9,
|
|
2155
|
+
boxShadow: avatarOnly ? "none" : void 0,
|
|
2156
|
+
color: avatarOnly ? "var(--ant-color-text)" : "var(--ant-color-bg-container)",
|
|
2157
|
+
fontSize: 12,
|
|
2158
|
+
fontWeight: 700
|
|
2159
|
+
}, children: view.user.avatarText }), variant === "compact" ? jsx(Text2, { className: labelClassName, ellipsis: true, style: { fontSize: 13, fontWeight: 650, maxWidth: 120 }, children: view.user.label }) : null] }) }) }) });
|
|
2160
|
+
}
|
|
2161
|
+
return jsxs(UserAccessTheme, { children: [jsx(ZlooksButton, { "aria-expanded": loginOpen, "aria-haspopup": "dialog", "aria-label": "\u767B\u5F55", className: triggerClassName, shape: triggerShape, size, style: triggerStyle, type: "text", onClick: () => setLoginOpen(true), children: jsxs(Space, { align: "center", size: 6, children: [jsx(Avatar2, { className: avatarClassName, shape: triggerAvatarShape, size: triggerAvatarSize, style: {
|
|
2162
|
+
background: "var(--ant-color-primary-bg)",
|
|
2163
|
+
border: avatarOnly ? "none" : "1px solid var(--ant-color-primary-border)",
|
|
2164
|
+
borderRadius: avatarOnly ? "50%" : 9,
|
|
2165
|
+
boxShadow: avatarOnly ? "none" : void 0,
|
|
2166
|
+
color: "var(--ant-color-primary)",
|
|
2167
|
+
fontSize: 12,
|
|
2168
|
+
fontWeight: 750
|
|
2169
|
+
}, children: "Z" }), variant === "compact" ? jsx(Text2, { className: labelClassName, style: { fontSize: 13, fontWeight: 650 }, children: "\u767B\u5F55" }) : null] }) }), jsx(Modal, { centered: true, destroyOnHidden: true, footer: null, open: loginOpen, rootClassName: mergeClassNames("zlooks-user-access-modal", classNames.popup), styles: {
|
|
2170
|
+
body: { paddingTop: 4 },
|
|
2171
|
+
container: {
|
|
2172
|
+
border: "1px solid var(--ant-color-border-secondary)",
|
|
2173
|
+
borderRadius: 22,
|
|
2174
|
+
boxShadow: "0 28px 80px rgb(15 23 42 / 18%)",
|
|
2175
|
+
overflow: "hidden",
|
|
2176
|
+
padding: 24
|
|
2177
|
+
},
|
|
2178
|
+
header: { marginBottom: 22 }
|
|
2179
|
+
}, title: jsxs(Space, { align: "center", size: "middle", children: [jsx(Avatar2, { shape: "square", size: 44, style: {
|
|
2180
|
+
background: "var(--ant-color-text)",
|
|
2181
|
+
borderRadius: 12,
|
|
2182
|
+
color: "var(--ant-color-bg-container)",
|
|
2183
|
+
fontWeight: 750
|
|
2184
|
+
}, children: "Z" }), jsxs(Flex, { vertical: true, children: [jsx(Text2, { strong: true, style: { fontSize: 17 }, children: "\u6B22\u8FCE\u56DE\u6765" }), jsx(Text2, { type: "secondary", children: "\u9009\u62E9\u4E00\u79CD\u65B9\u5F0F\u7EE7\u7EED" })] })] }), width: 480, onCancel: () => setLoginOpen(false), children: jsxs(Flex, { gap: 12, vertical: true, children: [view.loginMethods.length === 0 ? jsx(Empty, { description: "\u6682\u65F6\u65E0\u6CD5\u767B\u5F55\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5", image: Empty.PRESENTED_IMAGE_SIMPLE, style: { paddingBlock: 24 } }) : view.loginMethods.map((method, index) => jsx(ZlooksButton, { block: true, href: method.href, onClick: (event) => navigate(event, method.href, () => setLoginOpen(false)), style: {
|
|
2185
|
+
height: "auto",
|
|
2186
|
+
minHeight: 72,
|
|
2187
|
+
padding: "10px 14px",
|
|
2188
|
+
textAlign: "left"
|
|
2189
|
+
}, children: jsxs(Flex, { align: "center", gap: 14, justify: "space-between", style: { width: "100%" }, children: [jsxs(Flex, { align: "center", gap: 12, style: { minWidth: 0 }, children: [jsx(Avatar2, { shape: "square", size: 40, style: {
|
|
2190
|
+
background: "var(--ant-color-primary-bg)",
|
|
2191
|
+
borderRadius: 11,
|
|
2192
|
+
color: "var(--ant-color-primary)",
|
|
2193
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
2194
|
+
fontSize: 11,
|
|
2195
|
+
fontWeight: 700
|
|
2196
|
+
}, children: String(index + 1).padStart(2, "0") }), jsxs(Flex, { style: { minWidth: 0 }, vertical: true, children: [jsx(Text2, { strong: true, children: method.label }), jsx(Text2, { ellipsis: true, type: "secondary", children: "\u7EE7\u7EED\u8BBF\u95EE\u4F60\u7684\u4E2A\u4EBA\u7A7A\u95F4" })] })] }), jsx(Text2, { "aria-hidden": "true", style: { color: "var(--ant-color-primary)" }, children: "\u2192" })] }) }, method.id)), jsx(Text2, { style: { fontSize: 12, marginTop: 6, textAlign: "center" }, type: "secondary", children: "\u767B\u5F55\u4FE1\u606F\u4EC5\u7528\u4E8E\u8BC6\u522B\u4F60\u7684\u8D26\u6237" })] }) })] });
|
|
2197
|
+
}
|
|
2198
|
+
function UserAccessTheme({ children }) {
|
|
2199
|
+
const { mode } = useZlooksTheme();
|
|
2200
|
+
const { resolvedMode, resolvedTheme } = useZlooksThemeRuntime(mode);
|
|
2201
|
+
const userAccessTheme = useMemo(() => ({
|
|
2202
|
+
...resolvedTheme,
|
|
2203
|
+
cssVar: { key: `zlooks-user-access-${resolvedMode}` },
|
|
2204
|
+
components: {
|
|
2205
|
+
...resolvedTheme.components,
|
|
2206
|
+
Button: {
|
|
2207
|
+
...resolvedTheme.components?.Button,
|
|
2208
|
+
...zlooksUserAccessComponents.Button
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}), [resolvedMode, resolvedTheme]);
|
|
2212
|
+
return jsx(ConfigProvider2, { theme: userAccessTheme, children });
|
|
2213
|
+
}
|
|
2214
|
+
function mergeClassNames(...values) {
|
|
2215
|
+
return values.filter(Boolean).join(" ");
|
|
2216
|
+
}
|
|
2217
|
+
function resolveTriggerAvatarSize(size, avatarOnly) {
|
|
2218
|
+
if (avatarOnly && size === "small")
|
|
2219
|
+
return 32;
|
|
2220
|
+
if (avatarOnly && size === "large")
|
|
2221
|
+
return 48;
|
|
2222
|
+
if (avatarOnly)
|
|
2223
|
+
return 40;
|
|
2224
|
+
if (size === "small")
|
|
2225
|
+
return 20;
|
|
2226
|
+
if (size === "large")
|
|
2227
|
+
return 28;
|
|
2228
|
+
return 24;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
// ../ui/dist/site-config.js
|
|
2232
|
+
var SitePresentationContext = createContext(void 0);
|
|
2233
|
+
function ZlooksSiteConfigProvider({ children, initialConfig }) {
|
|
2234
|
+
return jsx(SitePresentationContext, { value: initialConfig, children });
|
|
2235
|
+
}
|
|
2236
|
+
function useSitePresentation() {
|
|
2237
|
+
return useSitePresentationSnapshot().value;
|
|
2238
|
+
}
|
|
2239
|
+
function useSitePresentationSnapshot() {
|
|
2240
|
+
const snapshot = useContext(SitePresentationContext);
|
|
2241
|
+
if (!snapshot)
|
|
2242
|
+
throw new Error("ZlooksSiteConfigProvider is required");
|
|
2243
|
+
return snapshot;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
// src/plugin/page-frame.module.css
|
|
2247
|
+
var page_frame_default = {
|
|
2248
|
+
page: "page_frame_page",
|
|
2249
|
+
headerWrap: "page_frame_headerWrap",
|
|
2250
|
+
header: "page_frame_header",
|
|
2251
|
+
brand: "page_frame_brand",
|
|
2252
|
+
brandMark: "page_frame_brandMark",
|
|
2253
|
+
brandLogo: "page_frame_brandLogo",
|
|
2254
|
+
navigation: "page_frame_navigation",
|
|
2255
|
+
actions: "page_frame_actions",
|
|
2256
|
+
content: "page_frame_content",
|
|
2257
|
+
footer: "page_frame_footer"
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2260
|
+
// src/plugin/page-frame.tsx
|
|
2261
|
+
function PasswordPageFrame({
|
|
2262
|
+
children,
|
|
2263
|
+
shell,
|
|
2264
|
+
site
|
|
2265
|
+
}) {
|
|
2266
|
+
return /* @__PURE__ */ jsx(ZlooksUiProvider, { children: /* @__PURE__ */ jsx(ZlooksShellProvider, { initialContext: shell, children: /* @__PURE__ */ jsx(ZlooksSiteConfigProvider, { initialConfig: site, children: /* @__PURE__ */ jsx(FrameContent, { children }) }) }) });
|
|
2267
|
+
}
|
|
2268
|
+
function FrameContent({ children }) {
|
|
2269
|
+
const navigation = useZlooksNavigation();
|
|
2270
|
+
const site = useSitePresentation();
|
|
2271
|
+
const request = useRequest();
|
|
2272
|
+
const rscNavigation = useRscNavigation();
|
|
2273
|
+
async function logout(href) {
|
|
2274
|
+
await request(href, { method: "POST", credentials: "same-origin" }, {
|
|
2275
|
+
errorMessage: "\u9000\u51FA\u767B\u5F55\u5931\u8D25"
|
|
2276
|
+
});
|
|
2277
|
+
rscNavigation.refresh();
|
|
2278
|
+
}
|
|
2279
|
+
return /* @__PURE__ */ jsxs("div", { className: page_frame_default.page, "data-shared-page-frame": true, children: [
|
|
2280
|
+
/* @__PURE__ */ jsx("div", { className: page_frame_default.headerWrap, children: /* @__PURE__ */ jsxs("header", { className: page_frame_default.header, children: [
|
|
2281
|
+
/* @__PURE__ */ jsxs(RscLink, { className: page_frame_default.brand, href: site.identity.homeHref, children: [
|
|
2282
|
+
site.identity.logoUrl ? /* @__PURE__ */ jsx("img", { alt: "", className: page_frame_default.brandLogo, src: site.identity.logoUrl }) : /* @__PURE__ */ jsx("span", { className: page_frame_default.brandMark, "aria-hidden": "true", children: "Z" }),
|
|
2283
|
+
/* @__PURE__ */ jsx("span", { children: site.identity.name })
|
|
2284
|
+
] }),
|
|
2285
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "\u4E3B\u5BFC\u822A", className: page_frame_default.navigation, children: navigation.map((item) => /* @__PURE__ */ jsx(RscLink, { "aria-current": item.active ? "page" : void 0, href: item.href, children: item.label }, item.key)) }),
|
|
2286
|
+
/* @__PURE__ */ jsx("div", { className: page_frame_default.actions, children: /* @__PURE__ */ jsx(
|
|
2287
|
+
ZlooksUserAccess,
|
|
2288
|
+
{
|
|
2289
|
+
size: "middle",
|
|
2290
|
+
shape: "round",
|
|
2291
|
+
variant: "avatar",
|
|
2292
|
+
onLogout: logout,
|
|
2293
|
+
onNavigate: rscNavigation.push
|
|
2294
|
+
}
|
|
2295
|
+
) })
|
|
2296
|
+
] }) }),
|
|
2297
|
+
/* @__PURE__ */ jsx("main", { className: page_frame_default.content, children }),
|
|
2298
|
+
/* @__PURE__ */ jsxs("footer", { className: page_frame_default.footer, children: [
|
|
2299
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2300
|
+
/* @__PURE__ */ jsx("strong", { children: site.identity.name }),
|
|
2301
|
+
/* @__PURE__ */ jsx("span", { children: "\u4FDD\u6301\u597D\u5947\uFF0C\u8BA4\u771F\u751F\u6D3B\u3002" })
|
|
2302
|
+
] }),
|
|
2303
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2304
|
+
site.legal.registrations.map((registration) => registration.verificationUrl ? /* @__PURE__ */ jsx(RscLink, { href: registration.verificationUrl, children: registration.number }, registration.id) : /* @__PURE__ */ jsx("span", { children: registration.number }, registration.id)),
|
|
2305
|
+
site.legal.copyright ? /* @__PURE__ */ jsx("small", { children: site.legal.copyright }) : null
|
|
2306
|
+
] })
|
|
2307
|
+
] })
|
|
2308
|
+
] });
|
|
2309
|
+
}
|
|
2310
|
+
export {
|
|
2311
|
+
PasswordPageFrame as default
|
|
2312
|
+
};
|