@kanyun-ai-infra/band-plugin-react 0.0.0-stage → 0.1.2
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/chunk-47BPPTXZ.js +8 -0
- package/dist/chunk-6VMUZ4PQ.js +26 -0
- package/dist/chunk-HX653UQN.js +729 -0
- package/dist/chunk-IJBJEU3H.js +56 -0
- package/dist/chunk-VKASR4EL.js +46 -0
- package/dist/chunk-X32B5VUS.js +107 -0
- package/dist/components.d.ts +313 -0
- package/dist/components.js +94 -0
- package/dist/errors.d.ts +28 -0
- package/dist/errors.js +18 -0
- package/dist/first-delivery.d.ts +52 -0
- package/dist/first-delivery.js +28 -0
- package/dist/image-view.d.ts +153 -0
- package/dist/image-view.js +788 -0
- package/dist/index.d.ts +1311 -0
- package/dist/index.js +5796 -0
- package/dist/scroll.d.ts +20 -0
- package/dist/scroll.js +6 -0
- package/dist/stopped-turn.d.ts +8 -0
- package/dist/stopped-turn.js +6 -0
- package/dist/upgrade-text.d.ts +81 -0
- package/dist/upgrade-text.js +9 -0
- package/package.json +64 -4
- package/README.md +0 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/errors.ts
|
|
2
|
+
function errorText(e) {
|
|
3
|
+
return e instanceof Error ? e.message : String(e);
|
|
4
|
+
}
|
|
5
|
+
var NETWORK_LOST_CODE = "NETWORK";
|
|
6
|
+
var NETWORK_LOST = "\u7F51\u7EDC\u65AD\u4E86";
|
|
7
|
+
function isNetworkLost(e) {
|
|
8
|
+
return typeof e === "object" && e !== null && e.code === NETWORK_LOST_CODE;
|
|
9
|
+
}
|
|
10
|
+
function failedBecause(e, next) {
|
|
11
|
+
return isNetworkLost(e) ? `${NETWORK_LOST}\uFF0C${next}` : errorText(e);
|
|
12
|
+
}
|
|
13
|
+
var FORBIDDEN_CODE = "FORBIDDEN";
|
|
14
|
+
function isForbidden(e) {
|
|
15
|
+
return typeof e === "object" && e !== null && e.code === FORBIDDEN_CODE;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
errorText,
|
|
20
|
+
NETWORK_LOST_CODE,
|
|
21
|
+
NETWORK_LOST,
|
|
22
|
+
isNetworkLost,
|
|
23
|
+
failedBecause,
|
|
24
|
+
FORBIDDEN_CODE,
|
|
25
|
+
isForbidden
|
|
26
|
+
};
|