@lark-apaas/client-toolkit 1.1.16-alpha.proxy.8 → 1.1.16

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.
@@ -2,21 +2,15 @@ import { Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from "react";
3
3
  import { snapdom } from "@zumer/snapdom";
4
4
  import { submitPostMessage } from "../../utils/postMessage.js";
5
- import { clearNetworkIdle, networkIdleCallback } from "network-idle";
6
- import { normalizeBasePath } from "../../utils/utils.js";
7
5
  function PageHoc(props) {
8
6
  const { children } = props;
9
7
  useEffect(()=>{
10
8
  if ('production' !== process.env.NODE_ENV) {
11
- const basePath = normalizeBasePath(process.env.CLIENT_BASE_PATH);
12
- const id = networkIdleCallback(()=>{
13
- const width = document.body.scrollWidth;
14
- const height = document.body.scrollHeight;
9
+ const timer = setTimeout(()=>{
15
10
  snapdom(document.body, {
16
11
  format: 'png',
17
- width,
18
- height,
19
- fallbackURL: ({ src })=>`${basePath}/dev/snapdom-proxy?url=${encodeURIComponent(src)}`,
12
+ width: document.body.scrollWidth,
13
+ height: document.body.scrollHeight,
20
14
  exclude: [
21
15
  '#lucide-react-svg'
22
16
  ],
@@ -28,8 +22,8 @@ function PageHoc(props) {
28
22
  data: imgEle.src
29
23
  });
30
24
  }).catch(()=>{});
31
- }, 2000);
32
- return ()=>clearNetworkIdle(id);
25
+ }, 1000);
26
+ return ()=>clearTimeout(timer);
33
27
  }
34
28
  }, []);
35
29
  return /*#__PURE__*/ jsx(Fragment, {
@@ -61,21 +61,6 @@ function processDevServerLog(log) {
61
61
  });
62
62
  }
63
63
  }
64
- function listenHmrApplyFailed() {
65
- const hot = import.meta.webpackHot || module.hot;
66
- if (hot) hot.addStatusHandler((status)=>{
67
- if ('fail' === status || 'abort' === status) {
68
- console.warn('hmr apply failed', status);
69
- submitSlardarEvent({
70
- name: 'sandbox-devServer',
71
- categories: {
72
- type: 'hmr-apply-failed',
73
- status
74
- }
75
- });
76
- }
77
- });
78
- }
79
64
  function interceptErrors() {
80
65
  window.addEventListener('error', (event)=>{
81
66
  logger.error(event.error);
@@ -83,7 +68,6 @@ function interceptErrors() {
83
68
  window.addEventListener('unhandledrejection', (event)=>{
84
69
  logger.error(event.reason);
85
70
  });
86
- listenHmrApplyFailed();
87
71
  const PROXY_CONSOLE_METHOD = [
88
72
  'log',
89
73
  'info',
package/lib/override.css CHANGED
@@ -12,5 +12,10 @@
12
12
  background-color: var(--background);
13
13
  color: var(--foreground);
14
14
  }
15
+
16
+ .container {
17
+ margin-left: auto;
18
+ margin-right: auto;
19
+ }
15
20
  }
16
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.1.16-alpha.proxy.8",
3
+ "version": "1.1.16",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -88,7 +88,6 @@
88
88
  "dayjs": "^1.11.13",
89
89
  "echarts": "^6.0.0",
90
90
  "lodash": "^4.17.21",
91
- "network-idle": "^0.2.0",
92
91
  "penpal": "^6.2.2",
93
92
  "sockjs-client": "^1.6.1",
94
93
  "sonner": "~2.0.0",
@@ -124,7 +123,7 @@
124
123
  "antd": "^5.26.6",
125
124
  "eslint": "^8.57.0",
126
125
  "jsdom": "^26.1.0",
127
- "lucide-react": "^0.554.0",
126
+ "lucide-react": "npm:@lark-apaas/lucide-react@1.0.2",
128
127
  "react": "^18.3.1",
129
128
  "react-dom": "^18.3.1",
130
129
  "react-router-dom": "^6.26.2",