@zero-library/common 3.0.11 → 3.1.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/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -145,7 +145,7 @@ var AudioPlayer_default = ({ fileUrl }) => {
|
|
|
145
145
|
return /* @__PURE__ */ jsxRuntime.jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
|
|
146
146
|
/* @__PURE__ */ jsxRuntime.jsx("source", { src: fileUrl, type: "audio/mpeg" }),
|
|
147
147
|
"\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002"
|
|
148
|
-
] });
|
|
148
|
+
] }, fileUrl);
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
// src/utils/is.ts
|
|
@@ -1429,7 +1429,7 @@ var VideoPlayer_default = ({ fileUrl }) => {
|
|
|
1429
1429
|
return /* @__PURE__ */ jsxRuntime.jsxs("video", { controls: true, className: styles_module_default.nsPreviewVideo, children: [
|
|
1430
1430
|
/* @__PURE__ */ jsxRuntime.jsx("source", { src: fileUrl, type: "video/mp4" }),
|
|
1431
1431
|
"\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002"
|
|
1432
|
-
] });
|
|
1432
|
+
] }, fileUrl);
|
|
1433
1433
|
};
|
|
1434
1434
|
|
|
1435
1435
|
// src/components/LazyComponent/styles.module.less
|
|
@@ -2087,13 +2087,13 @@ var WebSocketManager = class _WebSocketManager {
|
|
|
2087
2087
|
if ((!isNumber(this.maxReconnectAttempts) || this.reconnectAttempts < this.maxReconnectAttempts) && this.reconnectIntervalRef === null) {
|
|
2088
2088
|
this.reconnectIntervalRef = setTimeout(() => {
|
|
2089
2089
|
this.reconnectIntervalRef = null;
|
|
2090
|
-
console.log(`\u5C1D\u8BD5\u7B2C ${this.reconnectAttempts + 1} \u6B21\u91CD\u8FDE...`, this.url);
|
|
2090
|
+
console.log(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, `\u5C1D\u8BD5\u7B2C ${this.reconnectAttempts + 1} \u6B21\u91CD\u8FDE...`, this.url);
|
|
2091
2091
|
this.reconnectAttempts++;
|
|
2092
2092
|
this.createAndListenWebSocket();
|
|
2093
2093
|
}, this.reconnectInterval);
|
|
2094
2094
|
} else {
|
|
2095
2095
|
if (isNumber(this.maxReconnectAttempts) && this.reconnectAttempts >= this.maxReconnectAttempts) {
|
|
2096
|
-
console.log("\u8FBE\u5230\u6700\u5927\u91CD\u8FDE\u5C1D\u8BD5\u6B21\u6570\uFF0C\u505C\u6B62\u91CD\u8FDE");
|
|
2096
|
+
console.log(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, "\u8FBE\u5230\u6700\u5927\u91CD\u8FDE\u5C1D\u8BD5\u6B21\u6570\uFF0C\u505C\u6B62\u91CD\u8FDE");
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
@@ -2102,7 +2102,7 @@ var WebSocketManager = class _WebSocketManager {
|
|
|
2102
2102
|
* WebSocket onopen 事件处理
|
|
2103
2103
|
*/
|
|
2104
2104
|
handleOpen = (newSocket) => {
|
|
2105
|
-
console.log("WebSocket \u8FDE\u63A5\u5DF2\u6253\u5F00");
|
|
2105
|
+
console.log(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, "WebSocket \u8FDE\u63A5\u5DF2\u6253\u5F00");
|
|
2106
2106
|
this.stopReconnectTimer();
|
|
2107
2107
|
this.setSocketReadyState(newSocket.readyState);
|
|
2108
2108
|
this.resetHeartbeat(newSocket);
|
|
@@ -2120,7 +2120,7 @@ var WebSocketManager = class _WebSocketManager {
|
|
|
2120
2120
|
* WebSocket onclose 事件处理
|
|
2121
2121
|
*/
|
|
2122
2122
|
handleClose = (event) => {
|
|
2123
|
-
console.log("WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED", event.code, event.reason);
|
|
2123
|
+
console.log(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, "WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED", event.code, event.reason);
|
|
2124
2124
|
this.setSocketReadyState(WebSocket.CLOSED);
|
|
2125
2125
|
this.stopHeartbeat();
|
|
2126
2126
|
this.listeners.forEach((l) => l.onClose?.());
|
|
@@ -2130,7 +2130,7 @@ var WebSocketManager = class _WebSocketManager {
|
|
|
2130
2130
|
* WebSocket onerror 事件处理
|
|
2131
2131
|
*/
|
|
2132
2132
|
handleError = (error) => {
|
|
2133
|
-
console.error("WebSocket \u53D1\u751F\u9519\u8BEF:", error);
|
|
2133
|
+
console.error(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, "WebSocket \u53D1\u751F\u9519\u8BEF:", error);
|
|
2134
2134
|
this.setSocketReadyState(null);
|
|
2135
2135
|
this.stopHeartbeat();
|
|
2136
2136
|
this.tryReconnect();
|
|
@@ -2184,7 +2184,7 @@ var WebSocketManager = class _WebSocketManager {
|
|
|
2184
2184
|
this.socket.send(message3);
|
|
2185
2185
|
this.resetHeartbeat(this.socket);
|
|
2186
2186
|
} else {
|
|
2187
|
-
console.warn("WebSocket \u672A\u8FDE\u63A5\uFF0C\u65E0\u6CD5\u53D1\u9001\u6D88\u606F:", message3);
|
|
2187
|
+
console.warn(`[${(/* @__PURE__ */ new Date()).toLocaleString()}]`, "WebSocket \u672A\u8FDE\u63A5\uFF0C\u65E0\u6CD5\u53D1\u9001\u6D88\u606F:", message3);
|
|
2188
2188
|
}
|
|
2189
2189
|
};
|
|
2190
2190
|
/**
|