@lark-apaas/client-toolkit-lite 1.1.2 → 1.1.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 +58 -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 +54 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -56,6 +56,11 @@ type QueryProviderProps = {
|
|
|
56
56
|
};
|
|
57
57
|
declare const QueryProvider: React__default.FC<QueryProviderProps>;
|
|
58
58
|
|
|
59
|
+
declare const Welcome: React__default.FC<{
|
|
60
|
+
title?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
}>;
|
|
63
|
+
|
|
59
64
|
interface ActiveLinkProps extends Omit<NavLinkProps, 'to'> {
|
|
60
65
|
to: string;
|
|
61
66
|
}
|
|
@@ -422,4 +427,4 @@ declare namespace cover {
|
|
|
422
427
|
export { cover_abstractArt3dRenderingCoverImg1 as abstractArt3dRenderingCoverImg1, cover_abstractArt3dRenderingCoverImg2 as abstractArt3dRenderingCoverImg2, cover_abstractArt3dRenderingCoverImg3 as abstractArt3dRenderingCoverImg3, cover_abstractArt3dRenderingCoverImg4 as abstractArt3dRenderingCoverImg4, cover_abstractArt3dRenderingCoverImg5 as abstractArt3dRenderingCoverImg5, cover_abstractArt3dRenderingCoverImg6 as abstractArt3dRenderingCoverImg6, cover_appealClothingCoverImg1 as appealClothingCoverImg1, cover_appealClothingCoverImg2 as appealClothingCoverImg2, cover_appealClothingCoverImg3 as appealClothingCoverImg3, cover_appealClothingCoverImg4 as appealClothingCoverImg4, cover_appealClothingCoverImg5 as appealClothingCoverImg5, cover_appealClothingCoverImg6 as appealClothingCoverImg6, cover_architectureCoverImg1 as architectureCoverImg1, cover_architectureCoverImg2 as architectureCoverImg2, cover_architectureCoverImg3 as architectureCoverImg3, cover_architectureCoverImg4 as architectureCoverImg4, cover_architectureCoverImg5 as architectureCoverImg5, cover_architectureCoverImg6 as architectureCoverImg6, cover_officeCoverImg1 as officeCoverImg1, cover_officeCoverImg2 as officeCoverImg2, cover_officeCoverImg3 as officeCoverImg3, cover_officeCoverImg4 as officeCoverImg4, cover_officeCoverImg5 as officeCoverImg5, cover_officeCoverImg6 as officeCoverImg6, cover_sceneryCoverImg1 as sceneryCoverImg1, cover_sceneryCoverImg2 as sceneryCoverImg2, cover_sceneryCoverImg3 as sceneryCoverImg3, cover_sceneryCoverImg4 as sceneryCoverImg4, cover_sceneryCoverImg5 as sceneryCoverImg5, cover_sceneryCoverImg6 as sceneryCoverImg6, cover_technologyInternetCoverImg1 as technologyInternetCoverImg1, cover_technologyInternetCoverImg2 as technologyInternetCoverImg2, cover_technologyInternetCoverImg3 as technologyInternetCoverImg3, cover_technologyInternetCoverImg4 as technologyInternetCoverImg4, cover_technologyInternetCoverImg5 as technologyInternetCoverImg5, cover_technologyInternetCoverImg6 as technologyInternetCoverImg6 };
|
|
423
428
|
}
|
|
424
429
|
|
|
425
|
-
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
|
430
|
+
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,11 @@ type QueryProviderProps = {
|
|
|
56
56
|
};
|
|
57
57
|
declare const QueryProvider: React__default.FC<QueryProviderProps>;
|
|
58
58
|
|
|
59
|
+
declare const Welcome: React__default.FC<{
|
|
60
|
+
title?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
}>;
|
|
63
|
+
|
|
59
64
|
interface ActiveLinkProps extends Omit<NavLinkProps, 'to'> {
|
|
60
65
|
to: string;
|
|
61
66
|
}
|
|
@@ -422,4 +427,4 @@ declare namespace cover {
|
|
|
422
427
|
export { cover_abstractArt3dRenderingCoverImg1 as abstractArt3dRenderingCoverImg1, cover_abstractArt3dRenderingCoverImg2 as abstractArt3dRenderingCoverImg2, cover_abstractArt3dRenderingCoverImg3 as abstractArt3dRenderingCoverImg3, cover_abstractArt3dRenderingCoverImg4 as abstractArt3dRenderingCoverImg4, cover_abstractArt3dRenderingCoverImg5 as abstractArt3dRenderingCoverImg5, cover_abstractArt3dRenderingCoverImg6 as abstractArt3dRenderingCoverImg6, cover_appealClothingCoverImg1 as appealClothingCoverImg1, cover_appealClothingCoverImg2 as appealClothingCoverImg2, cover_appealClothingCoverImg3 as appealClothingCoverImg3, cover_appealClothingCoverImg4 as appealClothingCoverImg4, cover_appealClothingCoverImg5 as appealClothingCoverImg5, cover_appealClothingCoverImg6 as appealClothingCoverImg6, cover_architectureCoverImg1 as architectureCoverImg1, cover_architectureCoverImg2 as architectureCoverImg2, cover_architectureCoverImg3 as architectureCoverImg3, cover_architectureCoverImg4 as architectureCoverImg4, cover_architectureCoverImg5 as architectureCoverImg5, cover_architectureCoverImg6 as architectureCoverImg6, cover_officeCoverImg1 as officeCoverImg1, cover_officeCoverImg2 as officeCoverImg2, cover_officeCoverImg3 as officeCoverImg3, cover_officeCoverImg4 as officeCoverImg4, cover_officeCoverImg5 as officeCoverImg5, cover_officeCoverImg6 as officeCoverImg6, cover_sceneryCoverImg1 as sceneryCoverImg1, cover_sceneryCoverImg2 as sceneryCoverImg2, cover_sceneryCoverImg3 as sceneryCoverImg3, cover_sceneryCoverImg4 as sceneryCoverImg4, cover_sceneryCoverImg5 as sceneryCoverImg5, cover_sceneryCoverImg6 as sceneryCoverImg6, cover_technologyInternetCoverImg1 as technologyInternetCoverImg1, cover_technologyInternetCoverImg2 as technologyInternetCoverImg2, cover_technologyInternetCoverImg3 as technologyInternetCoverImg3, cover_technologyInternetCoverImg4 as technologyInternetCoverImg4, cover_technologyInternetCoverImg5 as technologyInternetCoverImg5, cover_technologyInternetCoverImg6 as technologyInternetCoverImg6 };
|
|
423
428
|
}
|
|
424
429
|
|
|
425
|
-
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
|
430
|
+
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
package/dist/index.js
CHANGED
|
@@ -1172,8 +1172,50 @@ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
|
|
|
1172
1172
|
}, "AppContainer");
|
|
1173
1173
|
var AppContainer_default = AppContainer;
|
|
1174
1174
|
|
|
1175
|
+
// src/components/Welcome/index.tsx
|
|
1176
|
+
import React5 from "react";
|
|
1177
|
+
var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1178
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
1179
|
+
style: {
|
|
1180
|
+
display: "flex",
|
|
1181
|
+
flexDirection: "column",
|
|
1182
|
+
alignItems: "center",
|
|
1183
|
+
justifyContent: "center",
|
|
1184
|
+
width: "100%",
|
|
1185
|
+
height: "calc(100vh - 64px)",
|
|
1186
|
+
padding: "0 24px",
|
|
1187
|
+
textAlign: "center"
|
|
1188
|
+
}
|
|
1189
|
+
}, /* @__PURE__ */ React5.createElement("img", {
|
|
1190
|
+
style: {
|
|
1191
|
+
borderRadius: 6,
|
|
1192
|
+
marginBottom: 24
|
|
1193
|
+
},
|
|
1194
|
+
width: "320",
|
|
1195
|
+
height: "200",
|
|
1196
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1197
|
+
alt: "Welcome"
|
|
1198
|
+
}), /* @__PURE__ */ React5.createElement("div", {
|
|
1199
|
+
style: {
|
|
1200
|
+
fontSize: 16,
|
|
1201
|
+
fontWeight: 500,
|
|
1202
|
+
lineHeight: "24px",
|
|
1203
|
+
marginBottom: 4,
|
|
1204
|
+
color: "#1f2329"
|
|
1205
|
+
}
|
|
1206
|
+
}, title), /* @__PURE__ */ React5.createElement("div", {
|
|
1207
|
+
style: {
|
|
1208
|
+
fontSize: 16,
|
|
1209
|
+
lineHeight: "24px",
|
|
1210
|
+
color: "#8f959e",
|
|
1211
|
+
maxWidth: 480
|
|
1212
|
+
}
|
|
1213
|
+
}, description));
|
|
1214
|
+
}, "Welcome");
|
|
1215
|
+
var Welcome_default = Welcome;
|
|
1216
|
+
|
|
1175
1217
|
// src/route-components/ActiveLink.tsx
|
|
1176
|
-
import
|
|
1218
|
+
import React6, { forwardRef, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1177
1219
|
import { NavLink } from "react-router-dom";
|
|
1178
1220
|
var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1179
1221
|
const [currentHash, setCurrentHash] = useState5(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
@@ -1190,7 +1232,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1190
1232
|
]);
|
|
1191
1233
|
const isActive = isHashRoute && currentHash === to;
|
|
1192
1234
|
if (!isHashRoute) {
|
|
1193
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ React6.createElement(NavLink, {
|
|
1194
1236
|
ref,
|
|
1195
1237
|
to,
|
|
1196
1238
|
onClick,
|
|
@@ -1231,7 +1273,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1231
1273
|
isPending: false,
|
|
1232
1274
|
isTransitioning: false
|
|
1233
1275
|
}) : children;
|
|
1234
|
-
return /* @__PURE__ */
|
|
1276
|
+
return /* @__PURE__ */ React6.createElement("a", {
|
|
1235
1277
|
ref,
|
|
1236
1278
|
href: to,
|
|
1237
1279
|
onClick: handleHashClick,
|
|
@@ -1243,9 +1285,9 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1243
1285
|
ActiveLink.displayName = "ActiveLink";
|
|
1244
1286
|
|
|
1245
1287
|
// src/route-components/NavLink.tsx
|
|
1246
|
-
import * as
|
|
1288
|
+
import * as React7 from "react";
|
|
1247
1289
|
import { NavLink as OriginalNavLink, useLocation, useNavigate } from "react-router-dom";
|
|
1248
|
-
var NavLink2 = /* @__PURE__ */
|
|
1290
|
+
var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1249
1291
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1250
1292
|
const location = useLocation();
|
|
1251
1293
|
const navigate = useNavigate();
|
|
@@ -1269,7 +1311,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1269
1311
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1270
1312
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1271
1313
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1272
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
1273
1315
|
href: to,
|
|
1274
1316
|
onClick: handleClick,
|
|
1275
1317
|
ref,
|
|
@@ -1278,7 +1320,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1278
1320
|
...restProps
|
|
1279
1321
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1280
1322
|
}
|
|
1281
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ React7.createElement(OriginalNavLink, {
|
|
1282
1324
|
to,
|
|
1283
1325
|
ref,
|
|
1284
1326
|
className,
|
|
@@ -1293,7 +1335,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1293
1335
|
NavLink2.displayName = "NavLink";
|
|
1294
1336
|
|
|
1295
1337
|
// src/route-components/UniversalLink.tsx
|
|
1296
|
-
import
|
|
1338
|
+
import React8 from "react";
|
|
1297
1339
|
import { Link as RouterLink } from "react-router-dom";
|
|
1298
1340
|
function isInternalRoute(to) {
|
|
1299
1341
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1303,15 +1345,15 @@ function isExternalLink(to) {
|
|
|
1303
1345
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1304
1346
|
}
|
|
1305
1347
|
__name(isExternalLink, "isExternalLink");
|
|
1306
|
-
var UniversalLink = /* @__PURE__ */
|
|
1348
|
+
var UniversalLink = /* @__PURE__ */ React8.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1307
1349
|
if (isInternalRoute(to)) {
|
|
1308
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ React8.createElement(RouterLink, {
|
|
1309
1351
|
to,
|
|
1310
1352
|
ref,
|
|
1311
1353
|
...props
|
|
1312
1354
|
});
|
|
1313
1355
|
}
|
|
1314
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
1315
1357
|
href: to,
|
|
1316
1358
|
ref,
|
|
1317
1359
|
...props,
|
|
@@ -1738,6 +1780,7 @@ export {
|
|
|
1738
1780
|
QueryProvider_default as QueryProvider,
|
|
1739
1781
|
TrackKey,
|
|
1740
1782
|
UniversalLink,
|
|
1783
|
+
Welcome_default as Welcome,
|
|
1741
1784
|
avatar_exports as avatarImages,
|
|
1742
1785
|
axiosForBackend,
|
|
1743
1786
|
banner_exports as bannerImages,
|