@lark-apaas/client-toolkit-lite 1.1.0 → 1.1.1-alpha.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/index.cjs +35 -14
- 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 +31 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
QueryProvider: () => QueryProvider_default,
|
|
38
38
|
TrackKey: () => TrackKey,
|
|
39
39
|
UniversalLink: () => UniversalLink,
|
|
40
|
+
Welcome: () => Welcome_default,
|
|
40
41
|
avatarImages: () => avatar_exports,
|
|
41
42
|
axiosForBackend: () => axiosForBackend,
|
|
42
43
|
bannerImages: () => banner_exports,
|
|
@@ -1172,13 +1173,32 @@ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
|
|
|
1172
1173
|
}, "AppContainer");
|
|
1173
1174
|
var AppContainer_default = AppContainer;
|
|
1174
1175
|
|
|
1175
|
-
// src/
|
|
1176
|
+
// src/components/Welcome/index.tsx
|
|
1176
1177
|
var import_react8 = __toESM(require("react"), 1);
|
|
1178
|
+
var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1179
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1180
|
+
className: "flex flex-col items-center justify-center px-6 w-full h-[calc(100vh-64px)] text-center"
|
|
1181
|
+
}, /* @__PURE__ */ import_react8.default.createElement("img", {
|
|
1182
|
+
className: "rounded-md mb-6",
|
|
1183
|
+
width: "320",
|
|
1184
|
+
height: "200",
|
|
1185
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1186
|
+
alt: "Welcome"
|
|
1187
|
+
}), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1188
|
+
className: "text-center text-foreground text-base font-medium mb-1 leading-6"
|
|
1189
|
+
}, title), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1190
|
+
className: "text-center text-muted-foreground text-base leading-6 line-clamp-2 sm:max-w-[480px]"
|
|
1191
|
+
}, description));
|
|
1192
|
+
}, "Welcome");
|
|
1193
|
+
var Welcome_default = Welcome;
|
|
1194
|
+
|
|
1195
|
+
// src/route-components/ActiveLink.tsx
|
|
1196
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1177
1197
|
var import_react_router_dom = require("react-router-dom");
|
|
1178
|
-
var ActiveLink = /* @__PURE__ */ (0,
|
|
1179
|
-
const [currentHash, setCurrentHash] = (0,
|
|
1198
|
+
var ActiveLink = /* @__PURE__ */ (0, import_react9.forwardRef)(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1199
|
+
const [currentHash, setCurrentHash] = (0, import_react9.useState)(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
1180
1200
|
const isHashRoute = typeof to === "string" && to.startsWith("#");
|
|
1181
|
-
(0,
|
|
1201
|
+
(0, import_react9.useEffect)(() => {
|
|
1182
1202
|
if (!isHashRoute) return;
|
|
1183
1203
|
const handleHashChange = /* @__PURE__ */ __name(() => {
|
|
1184
1204
|
setCurrentHash(window.location.hash);
|
|
@@ -1190,7 +1210,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1190
1210
|
]);
|
|
1191
1211
|
const isActive = isHashRoute && currentHash === to;
|
|
1192
1212
|
if (!isHashRoute) {
|
|
1193
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react_router_dom.NavLink, {
|
|
1194
1214
|
ref,
|
|
1195
1215
|
to,
|
|
1196
1216
|
onClick,
|
|
@@ -1231,7 +1251,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1231
1251
|
isPending: false,
|
|
1232
1252
|
isTransitioning: false
|
|
1233
1253
|
}) : children;
|
|
1234
|
-
return /* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ import_react9.default.createElement("a", {
|
|
1235
1255
|
ref,
|
|
1236
1256
|
href: to,
|
|
1237
1257
|
onClick: handleHashClick,
|
|
@@ -1243,9 +1263,9 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1243
1263
|
ActiveLink.displayName = "ActiveLink";
|
|
1244
1264
|
|
|
1245
1265
|
// src/route-components/NavLink.tsx
|
|
1246
|
-
var
|
|
1266
|
+
var React7 = __toESM(require("react"), 1);
|
|
1247
1267
|
var import_react_router_dom2 = require("react-router-dom");
|
|
1248
|
-
var NavLink2 = /* @__PURE__ */
|
|
1268
|
+
var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1249
1269
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1250
1270
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
1251
1271
|
const navigate = (0, import_react_router_dom2.useNavigate)();
|
|
@@ -1269,7 +1289,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1269
1289
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1270
1290
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1271
1291
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1272
|
-
return /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
1273
1293
|
href: to,
|
|
1274
1294
|
onClick: handleClick,
|
|
1275
1295
|
ref,
|
|
@@ -1278,7 +1298,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1278
1298
|
...restProps
|
|
1279
1299
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1280
1300
|
}
|
|
1281
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ React7.createElement(import_react_router_dom2.NavLink, {
|
|
1282
1302
|
to,
|
|
1283
1303
|
ref,
|
|
1284
1304
|
className,
|
|
@@ -1293,7 +1313,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1293
1313
|
NavLink2.displayName = "NavLink";
|
|
1294
1314
|
|
|
1295
1315
|
// src/route-components/UniversalLink.tsx
|
|
1296
|
-
var
|
|
1316
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
1297
1317
|
var import_react_router_dom3 = require("react-router-dom");
|
|
1298
1318
|
function isInternalRoute(to) {
|
|
1299
1319
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1303,15 +1323,15 @@ function isExternalLink(to) {
|
|
|
1303
1323
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1304
1324
|
}
|
|
1305
1325
|
__name(isExternalLink, "isExternalLink");
|
|
1306
|
-
var UniversalLink = /* @__PURE__ */
|
|
1326
|
+
var UniversalLink = /* @__PURE__ */ import_react10.default.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1307
1327
|
if (isInternalRoute(to)) {
|
|
1308
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react_router_dom3.Link, {
|
|
1309
1329
|
to,
|
|
1310
1330
|
ref,
|
|
1311
1331
|
...props
|
|
1312
1332
|
});
|
|
1313
1333
|
}
|
|
1314
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ import_react10.default.createElement("a", {
|
|
1315
1335
|
href: to,
|
|
1316
1336
|
ref,
|
|
1317
1337
|
...props,
|
|
@@ -1739,6 +1759,7 @@ var abstractArt3dRenderingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/ede
|
|
|
1739
1759
|
QueryProvider,
|
|
1740
1760
|
TrackKey,
|
|
1741
1761
|
UniversalLink,
|
|
1762
|
+
Welcome,
|
|
1742
1763
|
avatarImages,
|
|
1743
1764
|
axiosForBackend,
|
|
1744
1765
|
bannerImages,
|