@lark-apaas/client-toolkit-lite 1.1.1-alpha.2 → 1.1.1-alpha.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/dist/index.cjs +183 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +179 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
ActiveLink: () => ActiveLink,
|
|
35
35
|
AppContainer: () => AppContainer_default,
|
|
36
36
|
NavLink: () => NavLink2,
|
|
37
|
+
PagePlaceholder: () => PagePlaceholder_default,
|
|
37
38
|
QueryProvider: () => QueryProvider_default,
|
|
38
39
|
TrackKey: () => TrackKey,
|
|
39
40
|
UniversalLink: () => UniversalLink,
|
|
@@ -531,6 +532,108 @@ function useLogout() {
|
|
|
531
532
|
}
|
|
532
533
|
__name(useLogout, "useLogout");
|
|
533
534
|
|
|
535
|
+
// src/locales/messages.ts
|
|
536
|
+
var messages = {
|
|
537
|
+
// ── Safety 组件 ──────────────────────────────────────────────
|
|
538
|
+
"safety.badge.label": {
|
|
539
|
+
zh: "\u5999\u642D",
|
|
540
|
+
en: "Spark"
|
|
541
|
+
},
|
|
542
|
+
"safety.badge.builtWith": {
|
|
543
|
+
zh: "\u7531\u5999\u642D\u642D\u5EFA",
|
|
544
|
+
en: "Built with Spark"
|
|
545
|
+
},
|
|
546
|
+
"safety.ai.disclaimer": {
|
|
547
|
+
zh: "\u5305\u542B AI \u751F\u6210\u5185\u5BB9\uFF0C\u8BF7\u6CE8\u610F\u7504\u522B",
|
|
548
|
+
en: "AI-generated content. Use with care."
|
|
549
|
+
},
|
|
550
|
+
"safety.tenant.operated": {
|
|
551
|
+
zh: "{name}\u8FD0\u8425",
|
|
552
|
+
en: "Operated by {name}"
|
|
553
|
+
},
|
|
554
|
+
"safety.button.dontShowAgain": {
|
|
555
|
+
zh: "\u4E0D\u518D\u5C55\u793A",
|
|
556
|
+
en: "Don't show again"
|
|
557
|
+
},
|
|
558
|
+
"safety.button.learnMore": {
|
|
559
|
+
zh: "\u4E86\u89E3\u66F4\u591A",
|
|
560
|
+
en: "Learn more"
|
|
561
|
+
},
|
|
562
|
+
"safety.cover.pc": {
|
|
563
|
+
zh: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover.png",
|
|
564
|
+
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-weben.png"
|
|
565
|
+
},
|
|
566
|
+
"safety.cover.mobile": {
|
|
567
|
+
zh: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png",
|
|
568
|
+
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobileen.png"
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
var messages_default = messages;
|
|
572
|
+
|
|
573
|
+
// src/utils/locale.ts
|
|
574
|
+
var STORAGE_KEY = "miaoda:preview-locale";
|
|
575
|
+
function toLocale(value) {
|
|
576
|
+
const lang = value ?? "zh";
|
|
577
|
+
return lang.toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
578
|
+
}
|
|
579
|
+
__name(toLocale, "toLocale");
|
|
580
|
+
function readLocaleFromQuery() {
|
|
581
|
+
if (typeof window === "undefined") return null;
|
|
582
|
+
try {
|
|
583
|
+
const value = new URLSearchParams(window.location.search).get("locale");
|
|
584
|
+
return value && value.length > 0 ? value : null;
|
|
585
|
+
} catch {
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
__name(readLocaleFromQuery, "readLocaleFromQuery");
|
|
590
|
+
function readLocaleFromStorage() {
|
|
591
|
+
if (typeof window === "undefined") return null;
|
|
592
|
+
try {
|
|
593
|
+
const value = window.localStorage?.getItem(STORAGE_KEY);
|
|
594
|
+
return value && value.length > 0 ? value : null;
|
|
595
|
+
} catch {
|
|
596
|
+
return null;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
__name(readLocaleFromStorage, "readLocaleFromStorage");
|
|
600
|
+
function writeLocaleToStorage(value) {
|
|
601
|
+
if (typeof window === "undefined") return;
|
|
602
|
+
try {
|
|
603
|
+
window.localStorage?.setItem(STORAGE_KEY, value);
|
|
604
|
+
} catch {
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
__name(writeLocaleToStorage, "writeLocaleToStorage");
|
|
608
|
+
function getLocale() {
|
|
609
|
+
if (process.env.NODE_ENV === "production") {
|
|
610
|
+
return toLocale(navigator.language);
|
|
611
|
+
}
|
|
612
|
+
const fromQuery = readLocaleFromQuery();
|
|
613
|
+
if (fromQuery) {
|
|
614
|
+
writeLocaleToStorage(fromQuery);
|
|
615
|
+
return toLocale(fromQuery);
|
|
616
|
+
}
|
|
617
|
+
const fromStorage = readLocaleFromStorage();
|
|
618
|
+
if (fromStorage) return toLocale(fromStorage);
|
|
619
|
+
return toLocale(navigator.language);
|
|
620
|
+
}
|
|
621
|
+
__name(getLocale, "getLocale");
|
|
622
|
+
|
|
623
|
+
// src/locales/index.ts
|
|
624
|
+
function t(key, params) {
|
|
625
|
+
const locale = getLocale();
|
|
626
|
+
const entry = messages_default[key];
|
|
627
|
+
let text = entry?.[locale] ?? entry?.zh ?? key;
|
|
628
|
+
if (params) {
|
|
629
|
+
for (const [k, v] of Object.entries(params)) {
|
|
630
|
+
text = text.replace(`{${k}}`, v);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return text;
|
|
634
|
+
}
|
|
635
|
+
__name(t, "t");
|
|
636
|
+
|
|
534
637
|
// src/components/AppContainer/safety.tsx
|
|
535
638
|
var resetBase = {
|
|
536
639
|
boxSizing: "border-box",
|
|
@@ -553,8 +656,8 @@ var FONT_FAMILY = "'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
|
|
553
656
|
var Z_BADGE = 1e7;
|
|
554
657
|
var Z_OVERLAY = 10000001;
|
|
555
658
|
var LOGO_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg";
|
|
556
|
-
var
|
|
557
|
-
var
|
|
659
|
+
var getCoverUrl = /* @__PURE__ */ __name(() => t("safety.cover.pc"), "getCoverUrl");
|
|
660
|
+
var getCoverMobileUrl = /* @__PURE__ */ __name(() => t("safety.cover.mobile"), "getCoverMobileUrl");
|
|
558
661
|
var ICON_COMPANY_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_company_outlined.svg";
|
|
559
662
|
var ICON_AI_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg";
|
|
560
663
|
var LANDING_URL = "https://miaoda.feishu.cn/landing";
|
|
@@ -840,7 +943,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
840
943
|
const link = document.createElement("link");
|
|
841
944
|
link.rel = "preload";
|
|
842
945
|
link.as = "image";
|
|
843
|
-
link.href =
|
|
946
|
+
link.href = getCoverMobileUrl();
|
|
844
947
|
document.head.appendChild(link);
|
|
845
948
|
}
|
|
846
949
|
}, [
|
|
@@ -867,7 +970,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
867
970
|
...badgeTextStyle,
|
|
868
971
|
minWidth: 28
|
|
869
972
|
}
|
|
870
|
-
}, "
|
|
973
|
+
}, t("safety.badge.label")))), /* @__PURE__ */ import_react5.default.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ import_react5.default.createElement(DialogPrimitive.Overlay, {
|
|
871
974
|
style: overlayStyle
|
|
872
975
|
}), /* @__PURE__ */ import_react5.default.createElement(DialogPrimitive.Content, {
|
|
873
976
|
style: sheetContent,
|
|
@@ -877,13 +980,13 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
877
980
|
position: "absolute",
|
|
878
981
|
clip: "rect(0 0 0 0)"
|
|
879
982
|
}
|
|
880
|
-
}, "
|
|
983
|
+
}, t("safety.badge.builtWith")), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
881
984
|
style: sheetInner
|
|
882
985
|
}, /* @__PURE__ */ import_react5.default.createElement(XIcon, {
|
|
883
986
|
style: sheetCloseBtn,
|
|
884
987
|
onClick: /* @__PURE__ */ __name(() => setOpen(false), "onClick")
|
|
885
988
|
}), /* @__PURE__ */ import_react5.default.createElement("img", {
|
|
886
|
-
src:
|
|
989
|
+
src: getCoverMobileUrl(),
|
|
887
990
|
alt: "",
|
|
888
991
|
style: sheetCover,
|
|
889
992
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
@@ -903,14 +1006,16 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
903
1006
|
style: infoIconMobile
|
|
904
1007
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
905
1008
|
style: sheetInfoText
|
|
906
|
-
},
|
|
1009
|
+
}, t("safety.tenant.operated", {
|
|
1010
|
+
name: userinfo?.name ?? ""
|
|
1011
|
+
}))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
907
1012
|
style: infoRow
|
|
908
1013
|
}, /* @__PURE__ */ import_react5.default.createElement("img", {
|
|
909
1014
|
src: ICON_AI_URL,
|
|
910
1015
|
style: infoIconMobile
|
|
911
1016
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
912
1017
|
style: sheetInfoText
|
|
913
|
-
}, "
|
|
1018
|
+
}, t("safety.ai.disclaimer")))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
914
1019
|
style: mobileBtnRow
|
|
915
1020
|
}, /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
916
1021
|
style: mobileBtnOutline,
|
|
@@ -921,10 +1026,10 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
921
1026
|
setTimeout(() => setVisible(false), 200);
|
|
922
1027
|
window.localStorage?.setItem(HasClosedKey, "true");
|
|
923
1028
|
}, "onClick")
|
|
924
|
-
}, "
|
|
1029
|
+
}, t("safety.button.dontShowAgain")), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
925
1030
|
style: mobileBtnFilled,
|
|
926
1031
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
927
|
-
}, "
|
|
1032
|
+
}, t("safety.button.learnMore"))))))));
|
|
928
1033
|
}
|
|
929
1034
|
return /* @__PURE__ */ import_react5.default.createElement(PopoverPrimitive.Root, {
|
|
930
1035
|
open,
|
|
@@ -948,7 +1053,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
948
1053
|
...badgeTextStyle,
|
|
949
1054
|
minWidth: 60
|
|
950
1055
|
}
|
|
951
|
-
}, "
|
|
1056
|
+
}, t("safety.badge.builtWith")))), /* @__PURE__ */ import_react5.default.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ import_react5.default.createElement(PopoverPrimitive.Content, {
|
|
952
1057
|
style: popoverContent,
|
|
953
1058
|
side: "top",
|
|
954
1059
|
align: "end",
|
|
@@ -963,7 +1068,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
963
1068
|
}, /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
964
1069
|
style: popoverInner
|
|
965
1070
|
}, /* @__PURE__ */ import_react5.default.createElement("img", {
|
|
966
|
-
src:
|
|
1071
|
+
src: getCoverUrl(),
|
|
967
1072
|
alt: "",
|
|
968
1073
|
style: popoverCover,
|
|
969
1074
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
@@ -983,14 +1088,16 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
983
1088
|
style: infoIcon
|
|
984
1089
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
985
1090
|
style: infoText
|
|
986
|
-
},
|
|
1091
|
+
}, t("safety.tenant.operated", {
|
|
1092
|
+
name: userinfo?.name ?? ""
|
|
1093
|
+
}))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
987
1094
|
style: infoRow
|
|
988
1095
|
}, /* @__PURE__ */ import_react5.default.createElement("img", {
|
|
989
1096
|
src: ICON_AI_URL,
|
|
990
1097
|
style: infoIcon
|
|
991
1098
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
992
1099
|
style: infoText
|
|
993
|
-
}, "
|
|
1100
|
+
}, t("safety.ai.disclaimer")))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
994
1101
|
style: btnRow
|
|
995
1102
|
}, /* @__PURE__ */ import_react5.default.createElement(HoverButton, {
|
|
996
1103
|
style: btnBase,
|
|
@@ -1001,11 +1108,11 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1001
1108
|
setVisible(false);
|
|
1002
1109
|
window.localStorage?.setItem(HasClosedKey, "true");
|
|
1003
1110
|
}, "onClick")
|
|
1004
|
-
}, "
|
|
1111
|
+
}, t("safety.button.dontShowAgain")), /* @__PURE__ */ import_react5.default.createElement(HoverButton, {
|
|
1005
1112
|
style: btnBase,
|
|
1006
1113
|
"data-custom-element": "safety-more",
|
|
1007
1114
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
1008
|
-
}, "
|
|
1115
|
+
}, t("safety.button.learnMore"))))))));
|
|
1009
1116
|
}, "Safety");
|
|
1010
1117
|
var safety_default = Safety;
|
|
1011
1118
|
|
|
@@ -1215,13 +1322,58 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
1215
1322
|
}, "Welcome");
|
|
1216
1323
|
var Welcome_default = Welcome;
|
|
1217
1324
|
|
|
1218
|
-
// src/
|
|
1325
|
+
// src/components/PagePlaceholder/index.tsx
|
|
1219
1326
|
var import_react9 = __toESM(require("react"), 1);
|
|
1327
|
+
var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1328
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1329
|
+
style: {
|
|
1330
|
+
display: "flex",
|
|
1331
|
+
flexDirection: "column",
|
|
1332
|
+
alignItems: "center",
|
|
1333
|
+
justifyContent: "center",
|
|
1334
|
+
padding: "0 24px",
|
|
1335
|
+
width: "100%",
|
|
1336
|
+
height: "calc(100vh - 64px)",
|
|
1337
|
+
textAlign: "center"
|
|
1338
|
+
}
|
|
1339
|
+
}, /* @__PURE__ */ import_react9.default.createElement("img", {
|
|
1340
|
+
style: {
|
|
1341
|
+
borderRadius: "6px",
|
|
1342
|
+
marginBottom: "24px"
|
|
1343
|
+
},
|
|
1344
|
+
width: "320",
|
|
1345
|
+
height: "200",
|
|
1346
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1347
|
+
alt: "Welcome"
|
|
1348
|
+
}), /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1349
|
+
style: {
|
|
1350
|
+
fontSize: "16px",
|
|
1351
|
+
fontWeight: 500,
|
|
1352
|
+
marginBottom: "4px",
|
|
1353
|
+
lineHeight: "24px"
|
|
1354
|
+
}
|
|
1355
|
+
}, title), /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1356
|
+
style: {
|
|
1357
|
+
color: "#6b7280",
|
|
1358
|
+
fontSize: "16px",
|
|
1359
|
+
lineHeight: "24px",
|
|
1360
|
+
maxWidth: "480px",
|
|
1361
|
+
overflow: "hidden",
|
|
1362
|
+
display: "-webkit-box",
|
|
1363
|
+
WebkitLineClamp: 2,
|
|
1364
|
+
WebkitBoxOrient: "vertical"
|
|
1365
|
+
}
|
|
1366
|
+
}, description));
|
|
1367
|
+
}, "PagePlaceholder");
|
|
1368
|
+
var PagePlaceholder_default = PagePlaceholder;
|
|
1369
|
+
|
|
1370
|
+
// src/route-components/ActiveLink.tsx
|
|
1371
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
1220
1372
|
var import_react_router_dom = require("react-router-dom");
|
|
1221
|
-
var ActiveLink = /* @__PURE__ */ (0,
|
|
1222
|
-
const [currentHash, setCurrentHash] = (0,
|
|
1373
|
+
var ActiveLink = /* @__PURE__ */ (0, import_react10.forwardRef)(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1374
|
+
const [currentHash, setCurrentHash] = (0, import_react10.useState)(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
1223
1375
|
const isHashRoute = typeof to === "string" && to.startsWith("#");
|
|
1224
|
-
(0,
|
|
1376
|
+
(0, import_react10.useEffect)(() => {
|
|
1225
1377
|
if (!isHashRoute) return;
|
|
1226
1378
|
const handleHashChange = /* @__PURE__ */ __name(() => {
|
|
1227
1379
|
setCurrentHash(window.location.hash);
|
|
@@ -1233,7 +1385,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react9.forwardRef)(({ to, onClick, c
|
|
|
1233
1385
|
]);
|
|
1234
1386
|
const isActive = isHashRoute && currentHash === to;
|
|
1235
1387
|
if (!isHashRoute) {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react_router_dom.NavLink, {
|
|
1237
1389
|
ref,
|
|
1238
1390
|
to,
|
|
1239
1391
|
onClick,
|
|
@@ -1274,7 +1426,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react9.forwardRef)(({ to, onClick, c
|
|
|
1274
1426
|
isPending: false,
|
|
1275
1427
|
isTransitioning: false
|
|
1276
1428
|
}) : children;
|
|
1277
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ import_react10.default.createElement("a", {
|
|
1278
1430
|
ref,
|
|
1279
1431
|
href: to,
|
|
1280
1432
|
onClick: handleHashClick,
|
|
@@ -1286,9 +1438,9 @@ var ActiveLink = /* @__PURE__ */ (0, import_react9.forwardRef)(({ to, onClick, c
|
|
|
1286
1438
|
ActiveLink.displayName = "ActiveLink";
|
|
1287
1439
|
|
|
1288
1440
|
// src/route-components/NavLink.tsx
|
|
1289
|
-
var
|
|
1441
|
+
var React8 = __toESM(require("react"), 1);
|
|
1290
1442
|
var import_react_router_dom2 = require("react-router-dom");
|
|
1291
|
-
var NavLink2 = /* @__PURE__ */
|
|
1443
|
+
var NavLink2 = /* @__PURE__ */ React8.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1292
1444
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1293
1445
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
1294
1446
|
const navigate = (0, import_react_router_dom2.useNavigate)();
|
|
@@ -1312,7 +1464,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1312
1464
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1313
1465
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1314
1466
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1315
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
1316
1468
|
href: to,
|
|
1317
1469
|
onClick: handleClick,
|
|
1318
1470
|
ref,
|
|
@@ -1321,7 +1473,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1321
1473
|
...restProps
|
|
1322
1474
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1323
1475
|
}
|
|
1324
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ React8.createElement(import_react_router_dom2.NavLink, {
|
|
1325
1477
|
to,
|
|
1326
1478
|
ref,
|
|
1327
1479
|
className,
|
|
@@ -1336,7 +1488,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1336
1488
|
NavLink2.displayName = "NavLink";
|
|
1337
1489
|
|
|
1338
1490
|
// src/route-components/UniversalLink.tsx
|
|
1339
|
-
var
|
|
1491
|
+
var import_react11 = __toESM(require("react"), 1);
|
|
1340
1492
|
var import_react_router_dom3 = require("react-router-dom");
|
|
1341
1493
|
function isInternalRoute(to) {
|
|
1342
1494
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1346,15 +1498,15 @@ function isExternalLink(to) {
|
|
|
1346
1498
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1347
1499
|
}
|
|
1348
1500
|
__name(isExternalLink, "isExternalLink");
|
|
1349
|
-
var UniversalLink = /* @__PURE__ */
|
|
1501
|
+
var UniversalLink = /* @__PURE__ */ import_react11.default.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1350
1502
|
if (isInternalRoute(to)) {
|
|
1351
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react_router_dom3.Link, {
|
|
1352
1504
|
to,
|
|
1353
1505
|
ref,
|
|
1354
1506
|
...props
|
|
1355
1507
|
});
|
|
1356
1508
|
}
|
|
1357
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ import_react11.default.createElement("a", {
|
|
1358
1510
|
href: to,
|
|
1359
1511
|
ref,
|
|
1360
1512
|
...props,
|
|
@@ -1779,6 +1931,7 @@ var abstractArt3dRenderingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/ede
|
|
|
1779
1931
|
ActiveLink,
|
|
1780
1932
|
AppContainer,
|
|
1781
1933
|
NavLink,
|
|
1934
|
+
PagePlaceholder,
|
|
1782
1935
|
QueryProvider,
|
|
1783
1936
|
TrackKey,
|
|
1784
1937
|
UniversalLink,
|