@windrun-huaiin/base-ui 5.2.0 → 5.3.1
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 +204 -89
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +211 -87
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/server.d.cts +13 -1
- package/dist/components/server.d.ts +13 -1
- package/dist/components/server.js +132 -13
- package/dist/components/server.js.map +1 -1
- package/dist/components/server.mjs +142 -14
- package/dist/components/server.mjs.map +1 -1
- package/dist/ui/index.js +178 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +188 -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
|
@@ -1141,6 +1251,7 @@ __export(limited_lucide_icons_exports, {
|
|
1141
1251
|
Circle: () => import_lucide_react.Circle,
|
1142
1252
|
CircleAlert: () => import_lucide_react.CircleAlert,
|
1143
1253
|
CircleSmall: () => import_lucide_react.CircleSmall,
|
1254
|
+
CircleStop: () => import_lucide_react.CircleStop,
|
1144
1255
|
ComponentIcon: () => import_lucide_react.ComponentIcon,
|
1145
1256
|
Copy: () => import_lucide_react.Copy,
|
1146
1257
|
Cpu: () => import_lucide_react.Cpu,
|
@@ -1162,6 +1273,7 @@ __export(limited_lucide_icons_exports, {
|
|
1162
1273
|
GitPullRequestArrow: () => import_lucide_react.GitPullRequestArrow,
|
1163
1274
|
Globe: () => import_lucide_react.Globe,
|
1164
1275
|
GlobeLock: () => import_lucide_react.GlobeLock,
|
1276
|
+
Grip: () => import_lucide_react.Grip,
|
1165
1277
|
GripVertical: () => import_lucide_react.GripVertical,
|
1166
1278
|
HandHeart: () => import_lucide_react.HandHeart,
|
1167
1279
|
Handshake: () => import_lucide_react.Handshake,
|
@@ -1170,6 +1282,7 @@ __export(limited_lucide_icons_exports, {
|
|
1170
1282
|
ImageDown: () => import_lucide_react.ImageDown,
|
1171
1283
|
ImageOff: () => import_lucide_react.ImageOff,
|
1172
1284
|
ImageUp: () => import_lucide_react.ImageUp,
|
1285
|
+
Infinity: () => import_lucide_react.Infinity,
|
1173
1286
|
Info: () => import_lucide_react.Info,
|
1174
1287
|
Keyboard: () => import_lucide_react.Keyboard,
|
1175
1288
|
LandPlot: () => import_lucide_react.LandPlot,
|
@@ -1187,36 +1300,42 @@ __export(limited_lucide_icons_exports, {
|
|
1187
1300
|
Palette: () => import_lucide_react.Palette,
|
1188
1301
|
PanelLeft: () => import_lucide_react.PanelLeft,
|
1189
1302
|
PanelsTopLeft: () => import_lucide_react.PanelsTopLeft,
|
1303
|
+
PawPrint: () => import_lucide_react.PawPrint,
|
1190
1304
|
Pencil: () => import_lucide_react.Pencil,
|
1191
1305
|
Pi: () => import_lucide_react.Pi,
|
1306
|
+
QrCode: () => import_lucide_react.QrCode,
|
1192
1307
|
ReceiptText: () => import_lucide_react.ReceiptText,
|
1193
1308
|
RefreshCcw: () => import_lucide_react.RefreshCcw,
|
1194
1309
|
Regex: () => import_lucide_react.Regex,
|
1195
1310
|
Replace: () => import_lucide_react.Replace,
|
1311
|
+
Rocket: () => import_lucide_react.Rocket,
|
1196
1312
|
Rss: () => import_lucide_react.Rss,
|
1197
1313
|
Scale: () => import_lucide_react.Scale,
|
1198
1314
|
Search: () => import_lucide_react.Search,
|
1199
1315
|
SendHorizontal: () => import_lucide_react.SendHorizontal,
|
1200
1316
|
Server: () => import_lucide_react.Server,
|
1201
1317
|
Share: () => import_lucide_react.Share,
|
1318
|
+
Shield: () => import_lucide_react.Shield,
|
1202
1319
|
ShieldUser: () => import_lucide_react.ShieldUser,
|
1203
1320
|
Sigma: () => import_lucide_react.Sigma,
|
1204
1321
|
Sparkles: () => import_lucide_react.Sparkles,
|
1205
1322
|
SplinePointer: () => import_lucide_react.SplinePointer,
|
1323
|
+
Sprout: () => import_lucide_react.Sprout,
|
1206
1324
|
SquareDashedBottomCode: () => import_lucide_react.SquareDashedBottomCode,
|
1207
1325
|
SquareTerminal: () => import_lucide_react.SquareTerminal,
|
1208
1326
|
Star: () => import_lucide_react.Star,
|
1209
1327
|
Tablets: () => import_lucide_react.Tablets,
|
1210
1328
|
Terminal: () => import_lucide_react.Terminal,
|
1211
1329
|
Twitter: () => import_lucide_react.Twitter,
|
1330
|
+
Workflow: () => import_lucide_react.Workflow,
|
1212
1331
|
X: () => import_lucide_react.X,
|
1213
1332
|
Zap: () => import_lucide_react.Zap
|
1214
1333
|
});
|
1215
1334
|
var import_lucide_react = require("lucide-react");
|
1216
1335
|
|
1217
1336
|
// src/components/global-icon.tsx
|
1218
|
-
var
|
1219
|
-
var
|
1337
|
+
var import_react32 = __toESM(require("react"), 1);
|
1338
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
1220
1339
|
var tempStyledLimitedIcons = {};
|
1221
1340
|
for (const iconNameKey in limited_lucide_icons_exports) {
|
1222
1341
|
if (Object.prototype.hasOwnProperty.call(limited_lucide_icons_exports, iconNameKey)) {
|
@@ -1236,7 +1355,7 @@ for (const iconNameKey in limited_lucide_icons_exports) {
|
|
1236
1355
|
height: props.size || themeSvgIconSize
|
1237
1356
|
}, props.style)
|
1238
1357
|
});
|
1239
|
-
return /* @__PURE__ */ (0,
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComponentToRender, __spreadValues({}, finalProps));
|
1240
1359
|
};
|
1241
1360
|
StyledIcon.displayName = `Styled(${iconName})`;
|
1242
1361
|
tempStyledLimitedIcons[iconName] = StyledIcon;
|
@@ -1260,21 +1379,21 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
1260
1379
|
height: props.size || themeSvgIconSize
|
1261
1380
|
}, props.style)
|
1262
1381
|
});
|
1263
|
-
return /* @__PURE__ */ (0,
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconComponent, __spreadValues({}, finalProps));
|
1264
1383
|
};
|
1265
1384
|
WrappedIcon.displayName = `Wrapped(${iconName})`;
|
1266
1385
|
tempWrappedBuiltinIcons[iconName] = WrappedIcon;
|
1267
1386
|
}
|
1268
1387
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
1269
1388
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
1270
|
-
var NotFoundIcon = () => /* @__PURE__ */ (0,
|
1389
|
+
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
1390
|
|
1272
1391
|
// src/components/404-page.tsx
|
1273
|
-
var
|
1274
|
-
var
|
1392
|
+
var import_react33 = require("react");
|
1393
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
1275
1394
|
function NotFoundPage({ siteIcon }) {
|
1276
|
-
const [glitchText, setGlitchText] = (0,
|
1277
|
-
(0,
|
1395
|
+
const [glitchText, setGlitchText] = (0, import_react33.useState)("404");
|
1396
|
+
(0, import_react33.useEffect)(() => {
|
1278
1397
|
const glitchChars = ["4", "0", "4", "?", "#", "!", "*", "&", "%", "$"];
|
1279
1398
|
const interval = setInterval(() => {
|
1280
1399
|
if (Math.random() < 0.5) {
|
@@ -1289,10 +1408,10 @@ function NotFoundPage({ siteIcon }) {
|
|
1289
1408
|
}, 600);
|
1290
1409
|
return () => clearInterval(interval);
|
1291
1410
|
}, []);
|
1292
|
-
return /* @__PURE__ */ (0,
|
1293
|
-
/* @__PURE__ */ (0,
|
1294
|
-
/* @__PURE__ */ (0,
|
1295
|
-
/* @__PURE__ */ (0,
|
1411
|
+
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: [
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-center space-y-8 max-w-2xl", children: [
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative flex justify-center", children: [
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1296
1415
|
"h1",
|
1297
1416
|
{
|
1298
1417
|
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 +1423,26 @@ function NotFoundPage({ siteIcon }) {
|
|
1304
1423
|
children: glitchText
|
1305
1424
|
}
|
1306
1425
|
),
|
1307
|
-
/* @__PURE__ */ (0,
|
1426
|
+
/* @__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
1427
|
] }),
|
1309
|
-
/* @__PURE__ */ (0,
|
1310
|
-
/* @__PURE__ */ (0,
|
1311
|
-
/* @__PURE__ */ (0,
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-4", children: [
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: "text-2xl md:text-3xl font-semibold text-foreground", children: "Page Not Found" }),
|
1430
|
+
/* @__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
1431
|
] }),
|
1313
|
-
/* @__PURE__ */ (0,
|
1314
|
-
/* @__PURE__ */ (0,
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-center items-center gap-8 pt-8 opacity-60", children: [
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
1315
1434
|
siteIcon,
|
1316
|
-
/* @__PURE__ */ (0,
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Woops!" })
|
1317
1436
|
] }),
|
1318
|
-
/* @__PURE__ */ (0,
|
1319
|
-
/* @__PURE__ */ (0,
|
1320
|
-
/* @__PURE__ */ (0,
|
1321
|
-
/* @__PURE__ */ (0,
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-1 h-1 bg-purple-500 rounded-full animate-ping" }),
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NotFoundIcon, {}),
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Error Code: 404" })
|
1322
1441
|
] })
|
1323
1442
|
] })
|
1324
1443
|
] }),
|
1325
|
-
/* @__PURE__ */ (0,
|
1326
|
-
/* @__PURE__ */ (0,
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fixed inset-0 pointer-events-none overflow-hidden -z-10", children: [
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1327
1446
|
"div",
|
1328
1447
|
{
|
1329
1448
|
className: "absolute inset-0 opacity-[0.02] dark:opacity-[0.05]",
|
@@ -1336,7 +1455,7 @@ function NotFoundPage({ siteIcon }) {
|
|
1336
1455
|
}
|
1337
1456
|
}
|
1338
1457
|
),
|
1339
|
-
Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0,
|
1458
|
+
Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
1340
1459
|
"div",
|
1341
1460
|
{
|
1342
1461
|
className: "absolute w-2 h-2 bg-purple-500/20 rounded-full animate-bounce",
|
@@ -1353,23 +1472,19 @@ function NotFoundPage({ siteIcon }) {
|
|
1353
1472
|
] });
|
1354
1473
|
}
|
1355
1474
|
|
1356
|
-
// src/components/go-to-top.tsx
|
1357
|
-
var import_react31 = require("react");
|
1358
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
1359
|
-
|
1360
1475
|
// src/components/language-detector.tsx
|
1361
1476
|
var import_next_intl = require("next-intl");
|
1362
1477
|
var import_navigation = require("next/navigation");
|
1363
|
-
var
|
1364
|
-
var
|
1478
|
+
var import_react34 = require("react");
|
1479
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
1365
1480
|
function LanguageDetector({ i18nConfig }) {
|
1366
|
-
const [show, setShow] = (0,
|
1367
|
-
const [detectedLocale, setDetectedLocale] = (0,
|
1481
|
+
const [show, setShow] = (0, import_react34.useState)(false);
|
1482
|
+
const [detectedLocale, setDetectedLocale] = (0, import_react34.useState)(null);
|
1368
1483
|
const currentLocale = (0, import_next_intl.useLocale)();
|
1369
1484
|
const router = (0, import_navigation.useRouter)();
|
1370
1485
|
const t = (0, import_next_intl.useTranslations)("languageDetection");
|
1371
1486
|
const LANGUAGE_PREFERENCE_KEY = `${i18nConfig.detector.storagePrefix}-${i18nConfig.detector.storageKey}`;
|
1372
|
-
(0,
|
1487
|
+
(0, import_react34.useEffect)(() => {
|
1373
1488
|
const browserLang = navigator.language.split("-")[0];
|
1374
1489
|
const savedPreference = localStorage.getItem(LANGUAGE_PREFERENCE_KEY);
|
1375
1490
|
const preference = savedPreference ? JSON.parse(savedPreference) : null;
|
@@ -1417,31 +1532,31 @@ function LanguageDetector({ i18nConfig }) {
|
|
1417
1532
|
setShow(false);
|
1418
1533
|
};
|
1419
1534
|
if (!detectedLocale || !show) return null;
|
1420
|
-
return /* @__PURE__ */ (0,
|
1535
|
+
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
1536
|
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,
|
1537
|
+
animate-gradient-x`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative px-6 py-4 overflow-hidden", children: [
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative z-10 flex flex-col gap-3", children: [
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-lg font-semibold text-gray-900", children: t("title") }),
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "text-base text-gray-600", children: [
|
1428
1543
|
t("description"),
|
1429
1544
|
" ",
|
1430
|
-
/* @__PURE__ */ (0,
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-purple-500 font-semibold", children: detectedLocale === "zh" ? "\u4E2D\u6587" : "English" }),
|
1431
1546
|
"?"
|
1432
1547
|
] })
|
1433
1548
|
] }),
|
1434
|
-
/* @__PURE__ */ (0,
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1435
1550
|
"button",
|
1436
1551
|
{
|
1437
1552
|
onClick: handleClose,
|
1438
1553
|
className: "text-gray-500 hover:text-gray-700",
|
1439
|
-
children: /* @__PURE__ */ (0,
|
1554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(globalLucideIcons.X, { className: "h-5 w-5" })
|
1440
1555
|
}
|
1441
1556
|
)
|
1442
1557
|
] }),
|
1443
|
-
/* @__PURE__ */ (0,
|
1444
|
-
/* @__PURE__ */ (0,
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-3", children: [
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1445
1560
|
"button",
|
1446
1561
|
{
|
1447
1562
|
onClick: handleClose,
|
@@ -1449,7 +1564,7 @@ function LanguageDetector({ i18nConfig }) {
|
|
1449
1564
|
children: t("close")
|
1450
1565
|
}
|
1451
1566
|
),
|
1452
|
-
/* @__PURE__ */ (0,
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
1453
1568
|
"button",
|
1454
1569
|
{
|
1455
1570
|
onClick: handleLanguageChange,
|
@@ -1459,7 +1574,7 @@ function LanguageDetector({ i18nConfig }) {
|
|
1459
1574
|
)
|
1460
1575
|
] })
|
1461
1576
|
] }),
|
1462
|
-
/* @__PURE__ */ (0,
|
1577
|
+
/* @__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
1578
|
] }) }) });
|
1464
1579
|
}
|
1465
1580
|
|
@@ -1468,7 +1583,7 @@ var import_navigation2 = require("next/navigation");
|
|
1468
1583
|
var import_next_intl2 = require("next-intl");
|
1469
1584
|
|
1470
1585
|
// src/ui/dropdown-menu.tsx
|
1471
|
-
var
|
1586
|
+
var React33 = __toESM(require("react"), 1);
|
1472
1587
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
1473
1588
|
|
1474
1589
|
// ../lib/src/utils.ts
|
@@ -1479,12 +1594,12 @@ function cn(...inputs) {
|
|
1479
1594
|
}
|
1480
1595
|
|
1481
1596
|
// src/ui/dropdown-menu.tsx
|
1482
|
-
var
|
1597
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
1483
1598
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
1484
1599
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
1485
|
-
var DropdownMenuSubTrigger =
|
1600
|
+
var DropdownMenuSubTrigger = React33.forwardRef((_a, ref) => {
|
1486
1601
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
1487
|
-
return /* @__PURE__ */ (0,
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1488
1603
|
DropdownMenuPrimitive.SubTrigger,
|
1489
1604
|
__spreadProps(__spreadValues({
|
1490
1605
|
ref,
|
@@ -1496,15 +1611,15 @@ var DropdownMenuSubTrigger = React30.forwardRef((_a, ref) => {
|
|
1496
1611
|
}, props), {
|
1497
1612
|
children: [
|
1498
1613
|
children,
|
1499
|
-
/* @__PURE__ */ (0,
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(globalLucideIcons.ChevronRight, { className: "ml-auto" })
|
1500
1615
|
]
|
1501
1616
|
})
|
1502
1617
|
);
|
1503
1618
|
});
|
1504
1619
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
1505
|
-
var DropdownMenuSubContent =
|
1620
|
+
var DropdownMenuSubContent = React33.forwardRef((_a, ref) => {
|
1506
1621
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
1507
|
-
return /* @__PURE__ */ (0,
|
1622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1508
1623
|
DropdownMenuPrimitive.SubContent,
|
1509
1624
|
__spreadValues({
|
1510
1625
|
ref,
|
@@ -1516,9 +1631,9 @@ var DropdownMenuSubContent = React30.forwardRef((_a, ref) => {
|
|
1516
1631
|
);
|
1517
1632
|
});
|
1518
1633
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
1519
|
-
var DropdownMenuContent =
|
1634
|
+
var DropdownMenuContent = React33.forwardRef((_a, ref) => {
|
1520
1635
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
1521
|
-
return /* @__PURE__ */ (0,
|
1636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1522
1637
|
DropdownMenuPrimitive.Content,
|
1523
1638
|
__spreadValues({
|
1524
1639
|
ref,
|
@@ -1531,9 +1646,9 @@ var DropdownMenuContent = React30.forwardRef((_a, ref) => {
|
|
1531
1646
|
) });
|
1532
1647
|
});
|
1533
1648
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
1534
|
-
var DropdownMenuItem =
|
1649
|
+
var DropdownMenuItem = React33.forwardRef((_a, ref) => {
|
1535
1650
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
1536
|
-
return /* @__PURE__ */ (0,
|
1651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1537
1652
|
DropdownMenuPrimitive.Item,
|
1538
1653
|
__spreadValues({
|
1539
1654
|
ref,
|
@@ -1546,9 +1661,9 @@ var DropdownMenuItem = React30.forwardRef((_a, ref) => {
|
|
1546
1661
|
);
|
1547
1662
|
});
|
1548
1663
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
1549
|
-
var DropdownMenuCheckboxItem =
|
1664
|
+
var DropdownMenuCheckboxItem = React33.forwardRef((_a, ref) => {
|
1550
1665
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
1551
|
-
return /* @__PURE__ */ (0,
|
1666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1552
1667
|
DropdownMenuPrimitive.CheckboxItem,
|
1553
1668
|
__spreadProps(__spreadValues({
|
1554
1669
|
ref,
|
@@ -1559,16 +1674,16 @@ var DropdownMenuCheckboxItem = React30.forwardRef((_a, ref) => {
|
|
1559
1674
|
checked
|
1560
1675
|
}, props), {
|
1561
1676
|
children: [
|
1562
|
-
/* @__PURE__ */ (0,
|
1677
|
+
/* @__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
1678
|
children
|
1564
1679
|
]
|
1565
1680
|
})
|
1566
1681
|
);
|
1567
1682
|
});
|
1568
1683
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
1569
|
-
var DropdownMenuRadioItem =
|
1684
|
+
var DropdownMenuRadioItem = React33.forwardRef((_a, ref) => {
|
1570
1685
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
1571
|
-
return /* @__PURE__ */ (0,
|
1686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
1572
1687
|
DropdownMenuPrimitive.RadioItem,
|
1573
1688
|
__spreadProps(__spreadValues({
|
1574
1689
|
ref,
|
@@ -1578,16 +1693,16 @@ var DropdownMenuRadioItem = React30.forwardRef((_a, ref) => {
|
|
1578
1693
|
)
|
1579
1694
|
}, props), {
|
1580
1695
|
children: [
|
1581
|
-
/* @__PURE__ */ (0,
|
1696
|
+
/* @__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
1697
|
children
|
1583
1698
|
]
|
1584
1699
|
})
|
1585
1700
|
);
|
1586
1701
|
});
|
1587
1702
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
1588
|
-
var DropdownMenuLabel =
|
1703
|
+
var DropdownMenuLabel = React33.forwardRef((_a, ref) => {
|
1589
1704
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
1590
|
-
return /* @__PURE__ */ (0,
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1591
1706
|
DropdownMenuPrimitive.Label,
|
1592
1707
|
__spreadValues({
|
1593
1708
|
ref,
|
@@ -1600,9 +1715,9 @@ var DropdownMenuLabel = React30.forwardRef((_a, ref) => {
|
|
1600
1715
|
);
|
1601
1716
|
});
|
1602
1717
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
1603
|
-
var DropdownMenuSeparator =
|
1718
|
+
var DropdownMenuSeparator = React33.forwardRef((_a, ref) => {
|
1604
1719
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
1605
|
-
return /* @__PURE__ */ (0,
|
1720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1606
1721
|
DropdownMenuPrimitive.Separator,
|
1607
1722
|
__spreadValues({
|
1608
1723
|
ref,
|
@@ -1617,7 +1732,7 @@ var DropdownMenuShortcut = (_a) => {
|
|
1617
1732
|
} = _b, props = __objRest(_b, [
|
1618
1733
|
"className"
|
1619
1734
|
]);
|
1620
|
-
return /* @__PURE__ */ (0,
|
1735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
1621
1736
|
"span",
|
1622
1737
|
__spreadValues({
|
1623
1738
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className)
|
@@ -1627,12 +1742,12 @@ var DropdownMenuShortcut = (_a) => {
|
|
1627
1742
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
1628
1743
|
|
1629
1744
|
// src/ui/language-button.tsx
|
1630
|
-
var
|
1631
|
-
var
|
1632
|
-
var LanguageButton =
|
1745
|
+
var React34 = __toESM(require("react"), 1);
|
1746
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
1747
|
+
var LanguageButton = React34.forwardRef(
|
1633
1748
|
(_a, ref) => {
|
1634
1749
|
var _b = _a, { className, variant = "default", size = "default" } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
1635
|
-
return /* @__PURE__ */ (0,
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
1636
1751
|
"button",
|
1637
1752
|
__spreadValues({
|
1638
1753
|
className: cn(
|
@@ -1655,7 +1770,7 @@ var LanguageButton = React31.forwardRef(
|
|
1655
1770
|
LanguageButton.displayName = "Button";
|
1656
1771
|
|
1657
1772
|
// src/components/language-switcher.tsx
|
1658
|
-
var
|
1773
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
1659
1774
|
function LanguageSwitcher({ locales, localeLabels }) {
|
1660
1775
|
const locale = (0, import_next_intl2.useLocale)();
|
1661
1776
|
const router = (0, import_navigation2.useRouter)();
|
@@ -1664,23 +1779,23 @@ function LanguageSwitcher({ locales, localeLabels }) {
|
|
1664
1779
|
const newPathname = pathname.replace(`/${locale}`, `/${newLocale}`);
|
1665
1780
|
router.push(newPathname);
|
1666
1781
|
};
|
1667
|
-
return /* @__PURE__ */ (0,
|
1668
|
-
/* @__PURE__ */ (0,
|
1782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(DropdownMenu, { children: [
|
1783
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
1669
1784
|
LanguageButton,
|
1670
1785
|
{
|
1671
1786
|
variant: "ghost",
|
1672
1787
|
size: "icon",
|
1673
1788
|
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,
|
1789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(globalLucideIcons.Globe, { className: "h-5 w-5" })
|
1675
1790
|
}
|
1676
1791
|
) }),
|
1677
|
-
/* @__PURE__ */ (0,
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
1678
1793
|
DropdownMenuContent,
|
1679
1794
|
{
|
1680
1795
|
align: "end",
|
1681
1796
|
sideOffset: 5,
|
1682
1797
|
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,
|
1798
|
+
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
1799
|
DropdownMenuItem,
|
1685
1800
|
{
|
1686
1801
|
className: `
|
@@ -1702,21 +1817,21 @@ function LanguageSwitcher({ locales, localeLabels }) {
|
|
1702
1817
|
|
1703
1818
|
// src/components/script/google-analytics-script.tsx
|
1704
1819
|
var import_script = __toESM(require("next/script"), 1);
|
1705
|
-
var
|
1820
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
1706
1821
|
var googleAnalyticsId = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID;
|
1707
1822
|
function GoogleAnalyticsScript() {
|
1708
1823
|
if (process.env.NODE_ENV !== "production") {
|
1709
1824
|
return null;
|
1710
1825
|
}
|
1711
|
-
return /* @__PURE__ */ (0,
|
1712
|
-
/* @__PURE__ */ (0,
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
1713
1828
|
import_script.default,
|
1714
1829
|
{
|
1715
1830
|
strategy: "afterInteractive",
|
1716
1831
|
src: `https://www.googletagmanager.com/gtag/js?id=${googleAnalyticsId}`
|
1717
1832
|
}
|
1718
1833
|
),
|
1719
|
-
/* @__PURE__ */ (0,
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
1720
1835
|
import_script.default,
|
1721
1836
|
{
|
1722
1837
|
id: "google-analytics",
|
@@ -1747,13 +1862,13 @@ function useGoogleAnalytics() {
|
|
1747
1862
|
|
1748
1863
|
// src/components/script/microsoft-clarity-script.tsx
|
1749
1864
|
var import_script2 = __toESM(require("next/script"), 1);
|
1750
|
-
var
|
1865
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
1751
1866
|
var microsoftClarityId = process.env.NEXT_PUBLIC_MICROSOFT_CLARITY_ID;
|
1752
1867
|
function MicrosoftClarityScript() {
|
1753
1868
|
if (process.env.NODE_ENV !== "production") {
|
1754
1869
|
return null;
|
1755
1870
|
}
|
1756
|
-
return /* @__PURE__ */ (0,
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_script2.default, { id: "microsoft-clarity", strategy: "afterInteractive", children: `
|
1757
1872
|
(function(c,l,a,r,i,t,y){
|
1758
1873
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
1759
1874
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|