@windrun-huaiin/base-ui 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +203 -89
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +209 -87
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/server.d.cts +12 -1
- package/dist/components/server.d.ts +12 -1
- package/dist/components/server.js +131 -13
- package/dist/components/server.js.map +1 -1
- package/dist/components/server.mjs +140 -14
- package/dist/components/server.mjs.map +1 -1
- package/dist/ui/index.js +177 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +186 -60
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/assets/faq.tsx +22 -0
- package/src/assets/faqb.tsx +23 -0
- package/src/assets/faqs.tsx +23 -0
- package/src/assets/index.ts +6 -0
- package/src/components/index.ts +0 -1
- package/src/components/go-to-top.tsx +0 -43
package/dist/components/index.js
CHANGED
@@ -1085,6 +1085,113 @@ var SchemeIcon = import_react28.default.forwardRef(
|
|
1085
1085
|
SchemeIcon.displayName = "Scheme";
|
1086
1086
|
var scheme_default = SchemeIcon;
|
1087
1087
|
|
1088
|
+
// src/assets/faq.tsx
|
1089
|
+
var import_react29 = __toESM(require("react"), 1);
|
1090
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
1091
|
+
var FAQIcon = import_react29.default.forwardRef(
|
1092
|
+
(_a, ref) => {
|
1093
|
+
var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
1095
|
+
"svg",
|
1096
|
+
__spreadProps(__spreadValues({
|
1097
|
+
ref,
|
1098
|
+
role: "img",
|
1099
|
+
className,
|
1100
|
+
stroke: "currentColor",
|
1101
|
+
strokeWidth: "2",
|
1102
|
+
strokeLinecap: "round",
|
1103
|
+
strokeLinejoin: "round"
|
1104
|
+
}, props), {
|
1105
|
+
viewBox: "0 0 24 24",
|
1106
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1107
|
+
children: [
|
1108
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("circle", { cx: "12", cy: "12", r: "10", fill: "none", stroke: themeSvgIconColor }),
|
1109
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", fill: "none", stroke: themeSvgIconColor }),
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { d: "M12 17h.01", fill: "none", stroke: themeSvgIconColor })
|
1111
|
+
]
|
1112
|
+
})
|
1113
|
+
);
|
1114
|
+
}
|
1115
|
+
);
|
1116
|
+
FAQIcon.displayName = "FAQ";
|
1117
|
+
var faq_default = FAQIcon;
|
1118
|
+
|
1119
|
+
// src/assets/faqb.tsx
|
1120
|
+
var import_react30 = __toESM(require("react"), 1);
|
1121
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
1122
|
+
var FAQBIcon = import_react30.default.forwardRef(
|
1123
|
+
(_a, ref) => {
|
1124
|
+
var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
|
1125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
1126
|
+
"svg",
|
1127
|
+
__spreadProps(__spreadValues({
|
1128
|
+
ref,
|
1129
|
+
role: "img",
|
1130
|
+
className,
|
1131
|
+
stroke: "currentColor",
|
1132
|
+
strokeWidth: "2",
|
1133
|
+
strokeLinecap: "round",
|
1134
|
+
strokeLinejoin: "round"
|
1135
|
+
}, props), {
|
1136
|
+
viewBox: "0 0 24 24",
|
1137
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1138
|
+
children: [
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
1140
|
+
"path",
|
1141
|
+
{
|
1142
|
+
fill: "none",
|
1143
|
+
stroke: themeSvgIconColor,
|
1144
|
+
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"
|
1145
|
+
}
|
1146
|
+
),
|
1147
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { fill: "none", stroke: themeSvgIconColor, d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("line", { fill: "none", stroke: themeSvgIconColor, x1: "12", x2: "12.01", y1: "17", y2: "17" })
|
1149
|
+
]
|
1150
|
+
})
|
1151
|
+
);
|
1152
|
+
}
|
1153
|
+
);
|
1154
|
+
FAQBIcon.displayName = "FAQB";
|
1155
|
+
var faqb_default = FAQBIcon;
|
1156
|
+
|
1157
|
+
// src/assets/faqs.tsx
|
1158
|
+
var import_react31 = __toESM(require("react"), 1);
|
1159
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
1160
|
+
var FAQSIcon = import_react31.default.forwardRef(
|
1161
|
+
(_a, ref) => {
|
1162
|
+
var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
1164
|
+
"svg",
|
1165
|
+
__spreadProps(__spreadValues({
|
1166
|
+
ref,
|
1167
|
+
role: "img",
|
1168
|
+
className,
|
1169
|
+
stroke: "currentColor",
|
1170
|
+
strokeWidth: "2",
|
1171
|
+
strokeLinecap: "round",
|
1172
|
+
strokeLinejoin: "round"
|
1173
|
+
}, props), {
|
1174
|
+
viewBox: "0 0 24 24",
|
1175
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1176
|
+
children: [
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
1178
|
+
"path",
|
1179
|
+
{
|
1180
|
+
fill: "none",
|
1181
|
+
stroke: themeSvgIconColor,
|
1182
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
|
1183
|
+
}
|
1184
|
+
),
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { fill: "none", stroke: themeSvgIconColor, d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" }),
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { fill: "none", stroke: themeSvgIconColor, d: "M12 17h.01" })
|
1187
|
+
]
|
1188
|
+
})
|
1189
|
+
);
|
1190
|
+
}
|
1191
|
+
);
|
1192
|
+
FAQSIcon.displayName = "FAQS";
|
1193
|
+
var faqs_default = FAQSIcon;
|
1194
|
+
|
1088
1195
|
// src/assets/index.ts
|
1089
1196
|
var BUILTIN_ICON_COMPONENTS = {
|
1090
1197
|
GitHub: github_default,
|
@@ -1114,7 +1221,10 @@ var BUILTIN_ICON_COMPONENTS = {
|
|
1114
1221
|
SubP: subp_default,
|
1115
1222
|
T3P: t3p_default,
|
1116
1223
|
Http: http_default,
|
1117
|
-
Scheme: scheme_default
|
1224
|
+
Scheme: scheme_default,
|
1225
|
+
FAQ: faq_default,
|
1226
|
+
FAQB: faqb_default,
|
1227
|
+
FAQS: faqs_default
|
1118
1228
|
};
|
1119
1229
|
|
1120
1230
|
// ../lib/src/limited-lucide-icons.ts
|
@@ -1162,6 +1272,7 @@ __export(limited_lucide_icons_exports, {
|
|
1162
1272
|
GitPullRequestArrow: () => import_lucide_react.GitPullRequestArrow,
|
1163
1273
|
Globe: () => import_lucide_react.Globe,
|
1164
1274
|
GlobeLock: () => import_lucide_react.GlobeLock,
|
1275
|
+
Grip: () => import_lucide_react.Grip,
|
1165
1276
|
GripVertical: () => import_lucide_react.GripVertical,
|
1166
1277
|
HandHeart: () => import_lucide_react.HandHeart,
|
1167
1278
|
Handshake: () => import_lucide_react.Handshake,
|
@@ -1170,6 +1281,7 @@ __export(limited_lucide_icons_exports, {
|
|
1170
1281
|
ImageDown: () => import_lucide_react.ImageDown,
|
1171
1282
|
ImageOff: () => import_lucide_react.ImageOff,
|
1172
1283
|
ImageUp: () => import_lucide_react.ImageUp,
|
1284
|
+
Infinity: () => import_lucide_react.Infinity,
|
1173
1285
|
Info: () => import_lucide_react.Info,
|
1174
1286
|
Keyboard: () => import_lucide_react.Keyboard,
|
1175
1287
|
LandPlot: () => import_lucide_react.LandPlot,
|
@@ -1187,36 +1299,42 @@ __export(limited_lucide_icons_exports, {
|
|
1187
1299
|
Palette: () => import_lucide_react.Palette,
|
1188
1300
|
PanelLeft: () => import_lucide_react.PanelLeft,
|
1189
1301
|
PanelsTopLeft: () => import_lucide_react.PanelsTopLeft,
|
1302
|
+
PawPrint: () => import_lucide_react.PawPrint,
|
1190
1303
|
Pencil: () => import_lucide_react.Pencil,
|
1191
1304
|
Pi: () => import_lucide_react.Pi,
|
1305
|
+
QrCode: () => import_lucide_react.QrCode,
|
1192
1306
|
ReceiptText: () => import_lucide_react.ReceiptText,
|
1193
1307
|
RefreshCcw: () => import_lucide_react.RefreshCcw,
|
1194
1308
|
Regex: () => import_lucide_react.Regex,
|
1195
1309
|
Replace: () => import_lucide_react.Replace,
|
1310
|
+
Rocket: () => import_lucide_react.Rocket,
|
1196
1311
|
Rss: () => import_lucide_react.Rss,
|
1197
1312
|
Scale: () => import_lucide_react.Scale,
|
1198
1313
|
Search: () => import_lucide_react.Search,
|
1199
1314
|
SendHorizontal: () => import_lucide_react.SendHorizontal,
|
1200
1315
|
Server: () => import_lucide_react.Server,
|
1201
1316
|
Share: () => import_lucide_react.Share,
|
1317
|
+
Shield: () => import_lucide_react.Shield,
|
1202
1318
|
ShieldUser: () => import_lucide_react.ShieldUser,
|
1203
1319
|
Sigma: () => import_lucide_react.Sigma,
|
1204
1320
|
Sparkles: () => import_lucide_react.Sparkles,
|
1205
1321
|
SplinePointer: () => import_lucide_react.SplinePointer,
|
1322
|
+
Sprout: () => import_lucide_react.Sprout,
|
1206
1323
|
SquareDashedBottomCode: () => import_lucide_react.SquareDashedBottomCode,
|
1207
1324
|
SquareTerminal: () => import_lucide_react.SquareTerminal,
|
1208
1325
|
Star: () => import_lucide_react.Star,
|
1209
1326
|
Tablets: () => import_lucide_react.Tablets,
|
1210
1327
|
Terminal: () => import_lucide_react.Terminal,
|
1211
1328
|
Twitter: () => import_lucide_react.Twitter,
|
1329
|
+
Workflow: () => import_lucide_react.Workflow,
|
1212
1330
|
X: () => import_lucide_react.X,
|
1213
1331
|
Zap: () => import_lucide_react.Zap
|
1214
1332
|
});
|
1215
1333
|
var import_lucide_react = require("lucide-react");
|
1216
1334
|
|
1217
1335
|
// src/components/global-icon.tsx
|
1218
|
-
var
|
1219
|
-
var
|
1336
|
+
var import_react32 = __toESM(require("react"), 1);
|
1337
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
1220
1338
|
var tempStyledLimitedIcons = {};
|
1221
1339
|
for (const iconNameKey in limited_lucide_icons_exports) {
|
1222
1340
|
if (Object.prototype.hasOwnProperty.call(limited_lucide_icons_exports, iconNameKey)) {
|
@@ -1236,7 +1354,7 @@ for (const iconNameKey in limited_lucide_icons_exports) {
|
|
1236
1354
|
height: props.size || themeSvgIconSize
|
1237
1355
|
}, props.style)
|
1238
1356
|
});
|
1239
|
-
return /* @__PURE__ */ (0,
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComponentToRender, __spreadValues({}, finalProps));
|
1240
1358
|
};
|
1241
1359
|
StyledIcon.displayName = `Styled(${iconName})`;
|
1242
1360
|
tempStyledLimitedIcons[iconName] = StyledIcon;
|
@@ -1260,21 +1378,21 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
1260
1378
|
height: props.size || themeSvgIconSize
|
1261
1379
|
}, props.style)
|
1262
1380
|
});
|
1263
|
-
return /* @__PURE__ */ (0,
|
1381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconComponent, __spreadValues({}, finalProps));
|
1264
1382
|
};
|
1265
1383
|
WrappedIcon.displayName = `Wrapped(${iconName})`;
|
1266
1384
|
tempWrappedBuiltinIcons[iconName] = WrappedIcon;
|
1267
1385
|
}
|
1268
1386
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
1269
1387
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
1270
|
-
var NotFoundIcon = () => /* @__PURE__ */ (0,
|
1388
|
+
var NotFoundIcon = () => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(globalLucideIcons.SquareTerminal, { className: `h-8 w-8 rounded-full p-1 shadow-lg ring-0.5 border border-purple-500 ring-purple-500/20 ${themeIconColor}` });
|
1271
1389
|
|
1272
1390
|
// src/components/404-page.tsx
|
1273
|
-
var
|
1274
|
-
var
|
1391
|
+
var import_react33 = require("react");
|
1392
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
1275
1393
|
function NotFoundPage({ siteIcon }) {
|
1276
|
-
const [glitchText, setGlitchText] = (0,
|
1277
|
-
(0,
|
1394
|
+
const [glitchText, setGlitchText] = (0, import_react33.useState)("404");
|
1395
|
+
(0, import_react33.useEffect)(() => {
|
1278
1396
|
const glitchChars = ["4", "0", "4", "?", "#", "!", "*", "&", "%", "$"];
|
1279
1397
|
const interval = setInterval(() => {
|
1280
1398
|
if (Math.random() < 0.5) {
|
@@ -1289,10 +1407,10 @@ function NotFoundPage({ siteIcon }) {
|
|
1289
1407
|
}, 600);
|
1290
1408
|
return () => clearInterval(interval);
|
1291
1409
|
}, []);
|
1292
|
-
return /* @__PURE__ */ (0,
|
1293
|
-
/* @__PURE__ */ (0,
|
1294
|
-
/* @__PURE__ */ (0,
|
1295
|
-
/* @__PURE__ */ (0,
|
1410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center justify-center min-h-[75vh] w-full px-4 py-8", children: [
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-center space-y-8 max-w-2xl", children: [
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative flex justify-center", children: [
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1296
1414
|
"h1",
|
1297
1415
|
{
|
1298
1416
|
className: "text-8xl md:text-9xl font-bold bg-gradient-to-r from-purple-600 via-pink-500 to-purple-700 bg-clip-text text-transparent select-none",
|
@@ -1304,26 +1422,26 @@ function NotFoundPage({ siteIcon }) {
|
|
1304
1422
|
children: glitchText
|
1305
1423
|
}
|
1306
1424
|
),
|
1307
|
-
/* @__PURE__ */ (0,
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-full w-full bg-gradient-to-b from-transparent via-purple-500/10 to-transparent animate-pulse" }) })
|
1308
1426
|
] }),
|
1309
|
-
/* @__PURE__ */ (0,
|
1310
|
-
/* @__PURE__ */ (0,
|
1311
|
-
/* @__PURE__ */ (0,
|
1427
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-4", children: [
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: "text-2xl md:text-3xl font-semibold text-foreground", children: "Page Not Found" }),
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg text-muted-foreground max-w-md mx-auto leading-relaxed", children: "The page you're looking for doesn't exist" })
|
1312
1430
|
] }),
|
1313
|
-
/* @__PURE__ */ (0,
|
1314
|
-
/* @__PURE__ */ (0,
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-center items-center gap-8 pt-8 opacity-60", children: [
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
1315
1433
|
siteIcon,
|
1316
|
-
/* @__PURE__ */ (0,
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Woops!" })
|
1317
1435
|
] }),
|
1318
|
-
/* @__PURE__ */ (0,
|
1319
|
-
/* @__PURE__ */ (0,
|
1320
|
-
/* @__PURE__ */ (0,
|
1321
|
-
/* @__PURE__ */ (0,
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-1 h-1 bg-purple-500 rounded-full animate-ping" }),
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NotFoundIcon, {}),
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Error Code: 404" })
|
1322
1440
|
] })
|
1323
1441
|
] })
|
1324
1442
|
] }),
|
1325
|
-
/* @__PURE__ */ (0,
|
1326
|
-
/* @__PURE__ */ (0,
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fixed inset-0 pointer-events-none overflow-hidden -z-10", children: [
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1327
1445
|
"div",
|
1328
1446
|
{
|
1329
1447
|
className: "absolute inset-0 opacity-[0.02] dark:opacity-[0.05]",
|
@@ -1336,7 +1454,7 @@ function NotFoundPage({ siteIcon }) {
|
|
1336
1454
|
}
|
1337
1455
|
}
|
1338
1456
|
),
|
1339
|
-
Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0,
|
1457
|
+
Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1340
1458
|
"div",
|
1341
1459
|
{
|
1342
1460
|
className: "absolute w-2 h-2 bg-purple-500/20 rounded-full animate-bounce",
|
@@ -1353,23 +1471,19 @@ function NotFoundPage({ siteIcon }) {
|
|
1353
1471
|
] });
|
1354
1472
|
}
|
1355
1473
|
|
1356
|
-
// src/components/go-to-top.tsx
|
1357
|
-
var import_react31 = require("react");
|
1358
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
1359
|
-
|
1360
1474
|
// src/components/language-detector.tsx
|
1361
1475
|
var import_next_intl = require("next-intl");
|
1362
1476
|
var import_navigation = require("next/navigation");
|
1363
|
-
var
|
1364
|
-
var
|
1477
|
+
var import_react34 = require("react");
|
1478
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
1365
1479
|
function LanguageDetector({ i18nConfig }) {
|
1366
|
-
const [show, setShow] = (0,
|
1367
|
-
const [detectedLocale, setDetectedLocale] = (0,
|
1480
|
+
const [show, setShow] = (0, import_react34.useState)(false);
|
1481
|
+
const [detectedLocale, setDetectedLocale] = (0, import_react34.useState)(null);
|
1368
1482
|
const currentLocale = (0, import_next_intl.useLocale)();
|
1369
1483
|
const router = (0, import_navigation.useRouter)();
|
1370
1484
|
const t = (0, import_next_intl.useTranslations)("languageDetection");
|
1371
1485
|
const LANGUAGE_PREFERENCE_KEY = `${i18nConfig.detector.storagePrefix}-${i18nConfig.detector.storageKey}`;
|
1372
|
-
(0,
|
1486
|
+
(0, import_react34.useEffect)(() => {
|
1373
1487
|
const browserLang = navigator.language.split("-")[0];
|
1374
1488
|
const savedPreference = localStorage.getItem(LANGUAGE_PREFERENCE_KEY);
|
1375
1489
|
const preference = savedPreference ? JSON.parse(savedPreference) : null;
|
@@ -1417,31 +1531,31 @@ function LanguageDetector({ i18nConfig }) {
|
|
1417
1531
|
setShow(false);
|
1418
1532
|
};
|
1419
1533
|
if (!detectedLocale || !show) return null;
|
1420
|
-
return /* @__PURE__ */ (0,
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "fixed top-16 right-4 z-40 w-[420px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `shadow-lg rounded-lg transition-all duration-300 ${show ? "translate-x-0 opacity-100" : "translate-x-full opacity-0"}
|
1421
1535
|
bg-linear-to-r from-purple-100/95 via-white/95 to-purple-100/95 backdrop-blur-xs
|
1422
|
-
animate-gradient-x`, children: /* @__PURE__ */ (0,
|
1423
|
-
/* @__PURE__ */ (0,
|
1424
|
-
/* @__PURE__ */ (0,
|
1425
|
-
/* @__PURE__ */ (0,
|
1426
|
-
/* @__PURE__ */ (0,
|
1427
|
-
/* @__PURE__ */ (0,
|
1536
|
+
animate-gradient-x`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative px-6 py-4 overflow-hidden", children: [
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative z-10 flex flex-col gap-3", children: [
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-lg font-semibold text-gray-900", children: t("title") }),
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "text-base text-gray-600", children: [
|
1428
1542
|
t("description"),
|
1429
1543
|
" ",
|
1430
|
-
/* @__PURE__ */ (0,
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-purple-500 font-semibold", children: detectedLocale === "zh" ? "\u4E2D\u6587" : "English" }),
|
1431
1545
|
"?"
|
1432
1546
|
] })
|
1433
1547
|
] }),
|
1434
|
-
/* @__PURE__ */ (0,
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1435
1549
|
"button",
|
1436
1550
|
{
|
1437
1551
|
onClick: handleClose,
|
1438
1552
|
className: "text-gray-500 hover:text-gray-700",
|
1439
|
-
children: /* @__PURE__ */ (0,
|
1553
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(globalLucideIcons.X, { className: "h-5 w-5" })
|
1440
1554
|
}
|
1441
1555
|
)
|
1442
1556
|
] }),
|
1443
|
-
/* @__PURE__ */ (0,
|
1444
|
-
/* @__PURE__ */ (0,
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-3", children: [
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1445
1559
|
"button",
|
1446
1560
|
{
|
1447
1561
|
onClick: handleClose,
|
@@ -1449,7 +1563,7 @@ function LanguageDetector({ i18nConfig }) {
|
|
1449
1563
|
children: t("close")
|
1450
1564
|
}
|
1451
1565
|
),
|
1452
|
-
/* @__PURE__ */ (0,
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1453
1567
|
"button",
|
1454
1568
|
{
|
1455
1569
|
onClick: handleLanguageChange,
|
@@ -1459,7 +1573,7 @@ function LanguageDetector({ i18nConfig }) {
|
|
1459
1573
|
)
|
1460
1574
|
] })
|
1461
1575
|
] }),
|
1462
|
-
/* @__PURE__ */ (0,
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute inset-0 bg-linear-to-r from-transparent via-purple-200/30 to-transparent animate-shimmer" })
|
1463
1577
|
] }) }) });
|
1464
1578
|
}
|
1465
1579
|
|
@@ -1468,7 +1582,7 @@ var import_navigation2 = require("next/navigation");
|
|
1468
1582
|
var import_next_intl2 = require("next-intl");
|
1469
1583
|
|
1470
1584
|
// src/ui/dropdown-menu.tsx
|
1471
|
-
var
|
1585
|
+
var React33 = __toESM(require("react"), 1);
|
1472
1586
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
1473
1587
|
|
1474
1588
|
// ../lib/src/utils.ts
|
@@ -1479,12 +1593,12 @@ function cn(...inputs) {
|
|
1479
1593
|
}
|
1480
1594
|
|
1481
1595
|
// src/ui/dropdown-menu.tsx
|
1482
|
-
var
|
1596
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
1483
1597
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
1484
1598
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
1485
|
-
var DropdownMenuSubTrigger =
|
1599
|
+
var DropdownMenuSubTrigger = React33.forwardRef((_a, ref) => {
|
1486
1600
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
1487
|
-
return /* @__PURE__ */ (0,
|
1601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1488
1602
|
DropdownMenuPrimitive.SubTrigger,
|
1489
1603
|
__spreadProps(__spreadValues({
|
1490
1604
|
ref,
|
@@ -1496,15 +1610,15 @@ var DropdownMenuSubTrigger = React30.forwardRef((_a, ref) => {
|
|
1496
1610
|
}, props), {
|
1497
1611
|
children: [
|
1498
1612
|
children,
|
1499
|
-
/* @__PURE__ */ (0,
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(globalLucideIcons.ChevronRight, { className: "ml-auto" })
|
1500
1614
|
]
|
1501
1615
|
})
|
1502
1616
|
);
|
1503
1617
|
});
|
1504
1618
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
1505
|
-
var DropdownMenuSubContent =
|
1619
|
+
var DropdownMenuSubContent = React33.forwardRef((_a, ref) => {
|
1506
1620
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
1507
|
-
return /* @__PURE__ */ (0,
|
1621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1508
1622
|
DropdownMenuPrimitive.SubContent,
|
1509
1623
|
__spreadValues({
|
1510
1624
|
ref,
|
@@ -1516,9 +1630,9 @@ var DropdownMenuSubContent = React30.forwardRef((_a, ref) => {
|
|
1516
1630
|
);
|
1517
1631
|
});
|
1518
1632
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
1519
|
-
var DropdownMenuContent =
|
1633
|
+
var DropdownMenuContent = React33.forwardRef((_a, ref) => {
|
1520
1634
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
1521
|
-
return /* @__PURE__ */ (0,
|
1635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1522
1636
|
DropdownMenuPrimitive.Content,
|
1523
1637
|
__spreadValues({
|
1524
1638
|
ref,
|
@@ -1531,9 +1645,9 @@ var DropdownMenuContent = React30.forwardRef((_a, ref) => {
|
|
1531
1645
|
) });
|
1532
1646
|
});
|
1533
1647
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
1534
|
-
var DropdownMenuItem =
|
1648
|
+
var DropdownMenuItem = React33.forwardRef((_a, ref) => {
|
1535
1649
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
1536
|
-
return /* @__PURE__ */ (0,
|
1650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1537
1651
|
DropdownMenuPrimitive.Item,
|
1538
1652
|
__spreadValues({
|
1539
1653
|
ref,
|
@@ -1546,9 +1660,9 @@ var DropdownMenuItem = React30.forwardRef((_a, ref) => {
|
|
1546
1660
|
);
|
1547
1661
|
});
|
1548
1662
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
1549
|
-
var DropdownMenuCheckboxItem =
|
1663
|
+
var DropdownMenuCheckboxItem = React33.forwardRef((_a, ref) => {
|
1550
1664
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
1551
|
-
return /* @__PURE__ */ (0,
|
1665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1552
1666
|
DropdownMenuPrimitive.CheckboxItem,
|
1553
1667
|
__spreadProps(__spreadValues({
|
1554
1668
|
ref,
|
@@ -1559,16 +1673,16 @@ var DropdownMenuCheckboxItem = React30.forwardRef((_a, ref) => {
|
|
1559
1673
|
checked
|
1560
1674
|
}, props), {
|
1561
1675
|
children: [
|
1562
|
-
/* @__PURE__ */ (0,
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(globalLucideIcons.Check, { className: "h-4 w-4" }) }) }),
|
1563
1677
|
children
|
1564
1678
|
]
|
1565
1679
|
})
|
1566
1680
|
);
|
1567
1681
|
});
|
1568
1682
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
1569
|
-
var DropdownMenuRadioItem =
|
1683
|
+
var DropdownMenuRadioItem = React33.forwardRef((_a, ref) => {
|
1570
1684
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
1571
|
-
return /* @__PURE__ */ (0,
|
1685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1572
1686
|
DropdownMenuPrimitive.RadioItem,
|
1573
1687
|
__spreadProps(__spreadValues({
|
1574
1688
|
ref,
|
@@ -1578,16 +1692,16 @@ var DropdownMenuRadioItem = React30.forwardRef((_a, ref) => {
|
|
1578
1692
|
)
|
1579
1693
|
}, props), {
|
1580
1694
|
children: [
|
1581
|
-
/* @__PURE__ */ (0,
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(globalLucideIcons.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
1582
1696
|
children
|
1583
1697
|
]
|
1584
1698
|
})
|
1585
1699
|
);
|
1586
1700
|
});
|
1587
1701
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
1588
|
-
var DropdownMenuLabel =
|
1702
|
+
var DropdownMenuLabel = React33.forwardRef((_a, ref) => {
|
1589
1703
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
1590
|
-
return /* @__PURE__ */ (0,
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1591
1705
|
DropdownMenuPrimitive.Label,
|
1592
1706
|
__spreadValues({
|
1593
1707
|
ref,
|
@@ -1600,9 +1714,9 @@ var DropdownMenuLabel = React30.forwardRef((_a, ref) => {
|
|
1600
1714
|
);
|
1601
1715
|
});
|
1602
1716
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
1603
|
-
var DropdownMenuSeparator =
|
1717
|
+
var DropdownMenuSeparator = React33.forwardRef((_a, ref) => {
|
1604
1718
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
1605
|
-
return /* @__PURE__ */ (0,
|
1719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1606
1720
|
DropdownMenuPrimitive.Separator,
|
1607
1721
|
__spreadValues({
|
1608
1722
|
ref,
|
@@ -1617,7 +1731,7 @@ var DropdownMenuShortcut = (_a) => {
|
|
1617
1731
|
} = _b, props = __objRest(_b, [
|
1618
1732
|
"className"
|
1619
1733
|
]);
|
1620
|
-
return /* @__PURE__ */ (0,
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1621
1735
|
"span",
|
1622
1736
|
__spreadValues({
|
1623
1737
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className)
|
@@ -1627,12 +1741,12 @@ var DropdownMenuShortcut = (_a) => {
|
|
1627
1741
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
1628
1742
|
|
1629
1743
|
// src/ui/language-button.tsx
|
1630
|
-
var
|
1631
|
-
var
|
1632
|
-
var LanguageButton =
|
1744
|
+
var React34 = __toESM(require("react"), 1);
|
1745
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
1746
|
+
var LanguageButton = React34.forwardRef(
|
1633
1747
|
(_a, ref) => {
|
1634
1748
|
var _b = _a, { className, variant = "default", size = "default" } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
1635
|
-
return /* @__PURE__ */ (0,
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
1636
1750
|
"button",
|
1637
1751
|
__spreadValues({
|
1638
1752
|
className: cn(
|
@@ -1655,7 +1769,7 @@ var LanguageButton = React31.forwardRef(
|
|
1655
1769
|
LanguageButton.displayName = "Button";
|
1656
1770
|
|
1657
1771
|
// src/components/language-switcher.tsx
|
1658
|
-
var
|
1772
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
1659
1773
|
function LanguageSwitcher({ locales, localeLabels }) {
|
1660
1774
|
const locale = (0, import_next_intl2.useLocale)();
|
1661
1775
|
const router = (0, import_navigation2.useRouter)();
|
@@ -1664,23 +1778,23 @@ function LanguageSwitcher({ locales, localeLabels }) {
|
|
1664
1778
|
const newPathname = pathname.replace(`/${locale}`, `/${newLocale}`);
|
1665
1779
|
router.push(newPathname);
|
1666
1780
|
};
|
1667
|
-
return /* @__PURE__ */ (0,
|
1668
|
-
/* @__PURE__ */ (0,
|
1781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(DropdownMenu, { children: [
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
1669
1783
|
LanguageButton,
|
1670
1784
|
{
|
1671
1785
|
variant: "ghost",
|
1672
1786
|
size: "icon",
|
1673
1787
|
className: "bg-linear-to-r from-purple-400 to-pink-600 hover:from-purple-500 hover:to-pink-700 text-white transform hover:scale-110 transition-all duration-300",
|
1674
|
-
children: /* @__PURE__ */ (0,
|
1788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(globalLucideIcons.Globe, { className: "h-5 w-5" })
|
1675
1789
|
}
|
1676
1790
|
) }),
|
1677
|
-
/* @__PURE__ */ (0,
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
1678
1792
|
DropdownMenuContent,
|
1679
1793
|
{
|
1680
1794
|
align: "end",
|
1681
1795
|
sideOffset: 5,
|
1682
1796
|
className: "bg-white/90 dark:bg-gray-800/90 border-purple-100 dark:border-purple-800 w-[200px] p-2 backdrop-blur-xs translate-x-[50px]",
|
1683
|
-
children: /* @__PURE__ */ (0,
|
1797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-2 gap-1", children: locales.map((loc) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
1684
1798
|
DropdownMenuItem,
|
1685
1799
|
{
|
1686
1800
|
className: `
|
@@ -1702,21 +1816,21 @@ function LanguageSwitcher({ locales, localeLabels }) {
|
|
1702
1816
|
|
1703
1817
|
// src/components/script/google-analytics-script.tsx
|
1704
1818
|
var import_script = __toESM(require("next/script"), 1);
|
1705
|
-
var
|
1819
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
1706
1820
|
var googleAnalyticsId = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID;
|
1707
1821
|
function GoogleAnalyticsScript() {
|
1708
1822
|
if (process.env.NODE_ENV !== "production") {
|
1709
1823
|
return null;
|
1710
1824
|
}
|
1711
|
-
return /* @__PURE__ */ (0,
|
1712
|
-
/* @__PURE__ */ (0,
|
1825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
1713
1827
|
import_script.default,
|
1714
1828
|
{
|
1715
1829
|
strategy: "afterInteractive",
|
1716
1830
|
src: `https://www.googletagmanager.com/gtag/js?id=${googleAnalyticsId}`
|
1717
1831
|
}
|
1718
1832
|
),
|
1719
|
-
/* @__PURE__ */ (0,
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
1720
1834
|
import_script.default,
|
1721
1835
|
{
|
1722
1836
|
id: "google-analytics",
|
@@ -1747,13 +1861,13 @@ function useGoogleAnalytics() {
|
|
1747
1861
|
|
1748
1862
|
// src/components/script/microsoft-clarity-script.tsx
|
1749
1863
|
var import_script2 = __toESM(require("next/script"), 1);
|
1750
|
-
var
|
1864
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
1751
1865
|
var microsoftClarityId = process.env.NEXT_PUBLIC_MICROSOFT_CLARITY_ID;
|
1752
1866
|
function MicrosoftClarityScript() {
|
1753
1867
|
if (process.env.NODE_ENV !== "production") {
|
1754
1868
|
return null;
|
1755
1869
|
}
|
1756
|
-
return /* @__PURE__ */ (0,
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_script2.default, { id: "microsoft-clarity", strategy: "afterInteractive", children: `
|
1757
1871
|
(function(c,l,a,r,i,t,y){
|
1758
1872
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
1759
1873
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|