Vanessa hace 1 año
padre
commit
a8e882796b
Se han modificado 5 ficheros con 4973 adiciones y 881 borrados
  1. 1 4
      CHANGELOG.md
  2. 3 3
      package.json
  3. 4966 865
      pnpm-lock.yaml
  4. 0 6
      src/ts/ui/initUI.ts
  5. 3 3
      src/ts/util/addScript.ts

+ 1 - 4
CHANGELOG.md

@@ -16,14 +16,11 @@
 
 * [open issues](https://github.com/Vanessa219/vditor/issues)
 
-### v3.10.6 / 2024-08
+### v3.10.5 / 2024-08
 
 * [添加 `upload.renderLinkDest` 用于扩展粘贴时图片链接的处理](https://github.com/Vanessa219/vditor/issues/1186) `引入特性`
 * [图标配置为 `material` 时,列表反向缩进与缩进的图标错误](https://github.com/Vanessa219/vditor/issues/1656) `修复缺陷`
 * [提供非混淆版本的产物代码](https://github.com/Vanessa219/vditor/issues/1653) `开发重构`
-
-### v3.10.5 / 2024-06
-
 * [Bump ws from 6.2.2 to 6.2.3](https://github.com/Vanessa219/vditor/pull/1635) `dependencies`
 * [支持 SV 模式下列表的反向缩进](https://github.com/Vanessa219/vditor/pull/1630) `引入特性`
 * [添加 `updateToolbarConfig` 方法](https://github.com/Vanessa219/vditor/issues/1627) `引入特性`

+ 3 - 3
package.json

@@ -19,7 +19,7 @@
   },
   "types": "dist/index.d.ts",
   "devDependencies": {
-    "@babel/core": "^7.14.2",
+    "@babel/core": "^7.25.2",
     "@babel/preset-env": "^7.14.2",
     "@types/diff-match-patch": "^1.0.32",
     "@types/jest": "^26.0.23",
@@ -45,12 +45,12 @@
     "postcss": "^8.4.12",
     "postcss-loader": "^5.2.0",
     "prettier": "^2.5.1",
-    "puppeteer": "^1.20.0",
+    "puppeteer": "^23.0.2",
     "style-loader": "^1.3.0",
     "terser-webpack-plugin": "^5.3.0",
     "ts-jest": "^26.5.6",
     "ts-loader": "^6.2.2",
-    "typescript": "^3.9.9",
+    "typescript": "^4.9.5",
     "webpack": "^5.66.0",
     "webpack-bundle-analyzer": "^3.9.0",
     "webpack-cli": "^4.9.1",

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4966 - 865
pnpm-lock.yaml


+ 0 - 6
src/ts/ui/initUI.ts

@@ -5,12 +5,6 @@ import {accessLocalStorage} from "../util/compatibility";
 import {setContentTheme} from "./setContentTheme";
 import {setTheme} from "./setTheme";
 
-declare global {
-  interface Window {
-    visualViewport: HTMLElement;
-  }
-}
-
 export const initUI = (vditor: IVditor) => {
   vditor.element.innerHTML = "";
   vditor.element.classList.add("vditor");

+ 3 - 3
src/ts/util/addScript.ts

@@ -18,7 +18,7 @@ export const addScript = (path: string, id: string) => {
     return new Promise((resolve, reject) => {
         if (document.getElementById(id)) {
             // 脚本加载后再次调用直接返回
-            resolve();
+            resolve(true);
             return false;
         }
         const scriptElement = document.createElement("script");
@@ -33,11 +33,11 @@ export const addScript = (path: string, id: string) => {
             if (document.getElementById(id)) {
                 // 循环调用需清除 DOM 中的 script 标签
                 scriptElement.remove();
-                resolve();
+                resolve(true);
                 return false;
             }
             scriptElement.id = id;
-            resolve();
+            resolve(true);
         };
     });
 };

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio