From 08fbf75318c12d61a8beb1e0aa2d539eb9072131 Mon Sep 17 00:00:00 2001 From: cycleccc <2991205548@qq.com> Date: Mon, 18 Nov 2024 11:44:36 +0800 Subject: [PATCH] feat: add editor-for-react package (#351) * feat: add editor-for-react package * chore: add changeset md * chore: add babel/preset-react * chore: add editor depdence * perf: refactor code --- .changeset/four-mangos-search.md | 7 + .changeset/neat-crabs-flash.md | 5 + package.json | 1 + packages/editor-for-react/CHANGELOG.md | 0 packages/editor-for-react/README.md | 50 ++++ packages/editor-for-react/babel.config.json | 27 ++ packages/editor-for-react/package.json | 53 ++++ packages/editor-for-react/rollup.config.js | 37 +++ .../src/components/Editor.tsx | 112 ++++++++ .../src/components/Toolbar.tsx | 45 +++ packages/editor-for-react/src/index.ts | 9 + packages/editor-for-react/tsconfig.json | 34 +++ yarn.lock | 264 +++++++++++++++++- 13 files changed, 642 insertions(+), 2 deletions(-) create mode 100644 .changeset/four-mangos-search.md create mode 100644 .changeset/neat-crabs-flash.md create mode 100644 packages/editor-for-react/CHANGELOG.md create mode 100644 packages/editor-for-react/README.md create mode 100644 packages/editor-for-react/babel.config.json create mode 100644 packages/editor-for-react/package.json create mode 100644 packages/editor-for-react/rollup.config.js create mode 100644 packages/editor-for-react/src/components/Editor.tsx create mode 100644 packages/editor-for-react/src/components/Toolbar.tsx create mode 100644 packages/editor-for-react/src/index.ts create mode 100644 packages/editor-for-react/tsconfig.json diff --git a/.changeset/four-mangos-search.md b/.changeset/four-mangos-search.md new file mode 100644 index 000000000..ef4ba8a92 --- /dev/null +++ b/.changeset/four-mangos-search.md @@ -0,0 +1,7 @@ +--- +'@wangeditor-next/plugin-float-image': patch +'@wangeditor-next/plugin-formula': patch +'@wangeditor-next/plugin-markdown': patch +--- + +upgrade stable version diff --git a/.changeset/neat-crabs-flash.md b/.changeset/neat-crabs-flash.md new file mode 100644 index 000000000..e25e64ee2 --- /dev/null +++ b/.changeset/neat-crabs-flash.md @@ -0,0 +1,5 @@ +--- +'@wangeditor-next/editor-for-react': patch +--- + +add attr judgment diff --git a/package.json b/package.json index 1f8d2d9d9..905ebdca8 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@babel/plugin-proposal-object-rest-spread": "^7.11.0", "@babel/plugin-transform-runtime": "^7.14.5", "@babel/preset-env": "^7.14.5", + "@babel/preset-react": "^7.24.0", "@babel/preset-typescript": "^7.14.5", "@babel/runtime-corejs3": "^7.14.7", "@changesets/cli": "^2.27.7", diff --git a/packages/editor-for-react/CHANGELOG.md b/packages/editor-for-react/CHANGELOG.md new file mode 100644 index 000000000..e69de29bb diff --git a/packages/editor-for-react/README.md b/packages/editor-for-react/README.md new file mode 100644 index 000000000..861d9bd46 --- /dev/null +++ b/packages/editor-for-react/README.md @@ -0,0 +1,50 @@ +# wangEditor for React + + +![MIT License](https://img.shields.io/badge/License-MIT-blue) +![jest badge](https://img.shields.io/badge/unit%20test-jest-yellowgreen) + +## 介绍 +基于[wangEditor](https://www.wangeditor.com/) 封装的React组件。 + +## 安装 + +1. 安装组件包 + +```shell +yarn add @wangeditor-next/editor-for-react +# 或者npm install @wangeditor-next/editor-for-react --save + +``` + +2. 安装核心包 + +```shell +yarn add @wangeditor-next/editor + +# 或者 npm install @wangeditor-next/editor --save +``` +3. 导入组件 + +```ts +import { Editor, Toolbar } from '@wangeditor-next/editor-for-react' +``` + +## 使用 + +详情参考[wangEditor react使用文档](https://cycleccc.github.io/docs/guide/for-frame#react)。 + +### 在Next.js下使用 +```js +import dynamic from 'next/dynamic' +const WangEditor = dynamic( + // 引入对应的组件 设置的组件参考上面的wangEditor react使用文档 + () => import('../components/myEditor'), + {ssr: false} +) + +export default function Home() { + return +} +``` +使用案例可以参考[wangeditorV5-nextjs-demo](https://github.com/hahaaha/wangeditorV5-nextjs-demo) diff --git a/packages/editor-for-react/babel.config.json b/packages/editor-for-react/babel.config.json new file mode 100644 index 000000000..425e5a8c7 --- /dev/null +++ b/packages/editor-for-react/babel.config.json @@ -0,0 +1,27 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "modules": false, + "useBuiltIns": "usage", + "corejs": 3, + "targets": "ie 11" + } + ], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": [ + [ + "@babel/plugin-transform-runtime", + { + "absoluteRuntime": false, + "corejs": 3, + "helpers": true, + "regenerator": true, + "useESModules": false + } + ] + ] +} \ No newline at end of file diff --git a/packages/editor-for-react/package.json b/packages/editor-for-react/package.json new file mode 100644 index 000000000..c4e9bbc32 --- /dev/null +++ b/packages/editor-for-react/package.json @@ -0,0 +1,53 @@ +{ + "name": "@wangeditor-next/editor-for-react", + "version": "1.0.8", + "description": "wangEditor next editor for react", + "author": "cycleccc <2991205548@qq.com>", + "type": "module", + "homepage": "https://github.com/cycleccc/wangEditor-next#readme", + "license": "MIT", + "types": "dist/editor-for-react/src/index.d.ts", + "main": "dist/index.js", + "module": "dist/index.mjs", + "exports": { + ".": { + "types": "./dist/editor-for-react/src/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./dist/css/style.css": "./dist/css/style.css" + }, + "directories": { + "lib": "dist" + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cycleccc/wangEditor-next.git" + }, + "scripts": { + "dev": "cross-env NODE_ENV=development rollup -c rollup.config.js", + "dev-watch": "cross-env NODE_ENV=development rollup -c rollup.config.js -w", + "build": "cross-env NODE_ENV=production rollup -c rollup.config.js", + "dev-size-stats": "cross-env NODE_ENV=development:size_stats rollup -c rollup.config.js", + "size-stats": "cross-env NODE_ENV=production:size_stats rollup -c rollup.config.js" + }, + "bugs": { + "url": "https://github.com/cycleccc/wangEditor-next/issues" + }, + "devDependencies": { + "@wangeditor-next/editor": "^5.6.12", + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "peerDependencies": { + "@wangeditor-next/editor": ">=5.6.12", + "react": ">=17.0.2", + "react-dom": ">=17.0.2" + } +} diff --git a/packages/editor-for-react/rollup.config.js b/packages/editor-for-react/rollup.config.js new file mode 100644 index 000000000..8b3a03dda --- /dev/null +++ b/packages/editor-for-react/rollup.config.js @@ -0,0 +1,37 @@ +import { createRollupConfig } from '@wangeditor-next-shared/rollup-config' +import { string } from 'rollup-plugin-string' + +import pkg from './package.json' assert { type: 'json' } + +const name = 'WangEditorForReact' + +const configList = [] + +// esm +const esmConf = createRollupConfig({ + output: { + file: pkg.module, + format: 'esm', + name, + }, +}) + +configList.push(esmConf) + +// umd +const umdConf = createRollupConfig({ + output: { + file: pkg.main, + format: 'umd', + name, + }, + plugins: [ + string({ + include: '**/*.css', + }), + ], +}) + +configList.push(umdConf) + +export default configList diff --git a/packages/editor-for-react/src/components/Editor.tsx b/packages/editor-for-react/src/components/Editor.tsx new file mode 100644 index 000000000..bf19245ca --- /dev/null +++ b/packages/editor-for-react/src/components/Editor.tsx @@ -0,0 +1,112 @@ +/** + * @description editor react component + * @author wangfupeng + */ + +import { + createEditor, IDomEditor, IEditorConfig, SlateDescendant, +} from '@wangeditor-next/editor' +import React, { useEffect, useRef, useState } from 'react' + +interface IProps { + defaultContent?: SlateDescendant[] + onCreated?: (editor: IDomEditor) => void + defaultHtml?: string + value?: string + onChange: (editor: IDomEditor) => void + defaultConfig: Partial + mode?: string + style?: React.CSSProperties + className?: string +} + +interface ICustomDomEditor extends IDomEditor { + __react_on_change?: (editor: ICustomDomEditor) => void; +} + +function EditorComponent(props: Partial) { + const { + defaultContent = [], onCreated, defaultHtml = '', value = '', onChange, defaultConfig = {}, mode = 'default', style = {}, className, + } = props + const ref = useRef(null) + const [editor, setEditor] = useState(null) + const [curValue, setCurValue] = useState('') + + const handleCreated = (createdEditor: IDomEditor) => { + // 组件属性 onCreated + if (onCreated) { onCreated(createdEditor) } + + // 编辑器 配置 onCreated + const { onCreated: onCreatedFromConfig } = defaultConfig + + if (onCreatedFromConfig) { onCreatedFromConfig(createdEditor) } + } + + const handleDestroyed = (destroyedEditor: IDomEditor) => { + const { onDestroyed } = defaultConfig + + setEditor(null) + if (onDestroyed) { + onDestroyed(destroyedEditor) + } + } + + useEffect(() => { + if (editor == null) { return } + + // eslint-disable-next-line no-underscore-dangle + editor.__react_on_change = (e: IDomEditor) => { + setCurValue(e.getHtml()) // 记录当前 html 值 + + // 组件属性 onChange + if (onChange) { onChange(e) } + + // 编辑器 配置 onChange + const { onChange: onChangeFromConfig } = defaultConfig + + if (onChangeFromConfig) { onChangeFromConfig(e) } + } + }, [editor, defaultConfig]) + + // value 变化,重置 HTML + useEffect(() => { + if (editor == null) { return } + + if (value === curValue) { return } // 如果和当前 html 值相等,则忽略 + + // ------ 重新设置 HTML ------ + try { + editor.setHtml(value) + } catch (error) { + console.error(error) + } + + }, [value]) + + useEffect(() => { + if (ref.current == null) { return } + if (editor != null) { return } + // 防止重复渲染 当编辑器已经创建就不在创建了 + if (ref.current?.getAttribute('data-w-e-textarea')) { return } + + const newEditor = createEditor({ + selector: ref.current, + config: { + ...defaultConfig, + onCreated: handleCreated, + // eslint-disable-next-line no-underscore-dangle + onChange: (e: IDomEditor) => newEditor?.__react_on_change?.(e), + onDestroyed: handleDestroyed, + }, + content: defaultContent, + html: defaultHtml || value, + mode, + })as ICustomDomEditor + + setEditor(newEditor) + }, [editor]) + + return
+} + +export default EditorComponent diff --git a/packages/editor-for-react/src/components/Toolbar.tsx b/packages/editor-for-react/src/components/Toolbar.tsx new file mode 100644 index 000000000..828920ec1 --- /dev/null +++ b/packages/editor-for-react/src/components/Toolbar.tsx @@ -0,0 +1,45 @@ +/** + * @description toolbar react component + * @author wangfupeng + */ + +import * as wangEditor from '@wangeditor-next/editor' +import React, { useEffect, useRef } from 'react' + +interface IProps { + editor: wangEditor.IDomEditor | null + defaultConfig?: Partial + mode?: string + style?: object + className?: string +} + +function ToolbarComponent(props: IProps) { + const { + editor, defaultConfig = {}, mode = 'default', style = {}, className, + } = props + const ref = useRef(null) + + useEffect(() => { + if (ref.current == null) { return } + if (editor == null) { return } + if (ref.current?.getAttribute('data-w-e-toolbar')) { return } + + const toolbar = wangEditor.createToolbar({ + editor, + selector: ref.current, + config: defaultConfig, + mode, + }) + + return () => { + if (toolbar) { + toolbar.destroy() + } + } + }, [editor, defaultConfig, mode]) + + return
+} + +export default ToolbarComponent diff --git a/packages/editor-for-react/src/index.ts b/packages/editor-for-react/src/index.ts new file mode 100644 index 000000000..f455b2618 --- /dev/null +++ b/packages/editor-for-react/src/index.ts @@ -0,0 +1,9 @@ +/** + * @description editor-for-react entry + * @author wangfupeng + */ + +import Editor from './components/Editor' +import Toolbar from './components/Toolbar' + +export { Editor, Toolbar } diff --git a/packages/editor-for-react/tsconfig.json b/packages/editor-for-react/tsconfig.json new file mode 100644 index 000000000..58462327d --- /dev/null +++ b/packages/editor-for-react/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { /* react jsx */ + "target": "es5", + "jsx": "react", + "jsxFactory": "React.createElement", + "lib": [ + "es6", + "dom", + "esnext" + ], + "module": "ES2015", + "moduleResolution": "node", + "resolveJsonModule": true, + "allowJs": true, + "strict": true, + "noImplicitAny": false, + "declaration": true, + "downlevelIteration": true, + "outDir": "dist", + "sourceMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true + }, + "include": [ + "./src/**/*", + "./examples/**/*", + "../custom-types.d.ts" + ], + "exclude": [ + "node_modules", + "build", + "__tests__" + ] +} diff --git a/yarn.lock b/yarn.lock index a7e7efa11..ee90c1d53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -42,6 +42,17 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.25.9": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.20.5": version: 7.25.2 resolution: "@babel/compat-data@npm:7.25.2" @@ -115,6 +126,19 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.25.9": + version: 7.26.2 + resolution: "@babel/generator@npm:7.26.2" + dependencies: + "@babel/parser": "npm:^7.26.2" + "@babel/types": "npm:^7.26.0" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10c0/167ebce8977142f5012fad6bd91da51ac52bcd752f2261a54b7ab605d928aebe57e21636cdd2a9c7757e552652c68d9fcb5d40b06fcb66e02d9ee7526e118a5c + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.24.7, @babel/helper-annotate-as-pure@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-annotate-as-pure@npm:7.25.7" @@ -124,6 +148,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + checksum: 10c0/095b6ba50489d797733abebc4596a81918316a99e3632755c9f02508882912b00c2ae5e468532a25a5c2108d109ddbe9b7da78333ee7cc13817fc50c00cf06fe + languageName: node + linkType: hard + "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.25.7" @@ -271,6 +304,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-module-imports@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10c0/078d3c2b45d1f97ffe6bb47f61961be4785d2342a4156d8b42c92ee4e1b7b9e365655dd6cb25329e8fe1a675c91eeac7e3d04f0c518b67e417e29d6e27b6aa70 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-module-transforms@npm:7.25.7" @@ -317,6 +360,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-plugin-utils@npm:7.25.9" + checksum: 10c0/483066a1ba36ff16c0116cd24f93de05de746a603a777cd695ac7a1b034928a65a4ecb35f255761ca56626435d7abdb73219eba196f9aa83b6c3c3169325599d + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-remap-async-to-generator@npm:7.25.7" @@ -402,6 +452,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.24.7, @babel/helper-validator-identifier@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-validator-identifier@npm:7.25.7" @@ -409,6 +466,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.24.8, @babel/helper-validator-option@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-validator-option@npm:7.25.7" @@ -416,6 +480,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-option@npm:7.25.9" + checksum: 10c0/27fb195d14c7dcb07f14e58fe77c44eea19a6a40a74472ec05c441478fa0bb49fa1c32b2d64be7a38870ee48ef6601bdebe98d512f0253aea0b39756c4014f3e + languageName: node + linkType: hard + "@babel/helper-wrap-function@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-wrap-function@npm:7.25.7" @@ -494,6 +565,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.2": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" + dependencies: + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/751a743087b3a9172a7599f1421830d44c38f065ef781588d2bfb1c98f9b461719a226feb13c868d7a284783eee120c88ea522593118f2668f46ebfb1105c4d7 + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.7" @@ -699,6 +781,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/d56597aff4df39d3decda50193b6dfbe596ca53f437ff2934622ce19a743bf7f43492d3fb3308b0289f5cee2b825d99ceb56526a2b9e7b68bf04901546c5618c + languageName: node + linkType: hard + "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" @@ -1284,6 +1377,55 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-display-name@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-display-name@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/63a0f962d64e71baf87c212755419e25c637d2d95ea6fdc067df26b91e606ae186442ae815b99a577eca9bf5404d9577ecad218a3cf42d0e9e286ca7b003a992 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-development@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx-development@npm:7.25.9" + dependencies: + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/c0b92ff9eb029620abf320ff74aae182cea87524723d740fb48a4373d0d16bddf5edbe1116e7ba341332a5337e55c2ceaee8b8cad5549e78af7f4b3cfe77debb + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/5c9947e8ed141f7606f54da3e05eea1074950c5b8354c39df69cb7f43cb5a83c6c9d7973b24bc3d89341c8611f8ad50830a98ab10d117d850e6bdd8febdce221 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-pure-annotations@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/7c8eac04644ad19dcd71bb8e949b0ae22b9e548fa4a58e545d3d0342f647fb89db7f8789a7c5b8074d478ce6d3d581eaf47dd4b36027e16fd68211c383839abc + languageName: node + linkType: hard + "@babel/plugin-transform-regenerator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-regenerator@npm:7.25.7" @@ -1547,6 +1689,22 @@ __metadata: languageName: node linkType: hard +"@babel/preset-react@npm:^7.24.0": + version: 7.25.9 + resolution: "@babel/preset-react@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-transform-react-display-name": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx-development": "npm:^7.25.9" + "@babel/plugin-transform-react-pure-annotations": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/c294b475ee741f01f63ea0d828862811c453fabc6023f01814ce983bc316388e9d73290164d2b1384c2684db9c330803a3d4d2170285b105dcbacd483329eb93 + languageName: node + linkType: hard + "@babel/preset-typescript@npm:^7.14.5": version: 7.25.7 resolution: "@babel/preset-typescript@npm:7.25.7" @@ -1603,6 +1761,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/template@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10c0/ebe677273f96a36c92cc15b7aa7b11cc8bc8a3bb7a01d55b2125baca8f19cae94ff3ce15f1b1880fb8437f3a690d9f89d4e91f16fc1dc4d3eb66226d128983ab + languageName: node + linkType: hard + "@babel/traverse@npm:^7.24.7": version: 7.25.6 resolution: "@babel/traverse@npm:7.25.6" @@ -1648,6 +1817,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/traverse@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/e90be586a714da4adb80e6cb6a3c5cfcaa9b28148abdafb065e34cc109676fc3db22cf98cd2b2fff66ffb9b50c0ef882cab0f466b6844be0f6c637b82719bba1 + languageName: node + linkType: hard + "@babel/types@npm:^7.24.7, @babel/types@npm:^7.25.4, @babel/types@npm:^7.25.7, @babel/types@npm:^7.4.4": version: 7.25.7 resolution: "@babel/types@npm:7.25.7" @@ -1681,6 +1865,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/b694f41ad1597127e16024d766c33a641508aad037abd08d0d1f73af753e1119fa03b4a107d04b5f92cc19c095a594660547ae9bead1db2299212d644b0a5cb8 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -3476,7 +3670,21 @@ __metadata: languageName: unknown linkType: soft -"@wangeditor-next/editor@workspace:packages/editor": +"@wangeditor-next/editor-for-react@workspace:packages/editor-for-react": + version: 0.0.0-use.local + resolution: "@wangeditor-next/editor-for-react@workspace:packages/editor-for-react" + dependencies: + "@wangeditor-next/editor": "npm:^5.6.12" + react: "npm:^17.0.2" + react-dom: "npm:^17.0.2" + peerDependencies: + "@wangeditor-next/editor": ">=5.6.12" + react: ">=17.0.2" + react-dom: ">=17.0.2" + languageName: unknown + linkType: soft + +"@wangeditor-next/editor@npm:^5.6.12, @wangeditor-next/editor@workspace:packages/editor": version: 0.0.0-use.local resolution: "@wangeditor-next/editor@workspace:packages/editor" dependencies: @@ -3608,6 +3816,7 @@ __metadata: "@babel/plugin-proposal-object-rest-spread": "npm:^7.11.0" "@babel/plugin-transform-runtime": "npm:^7.14.5" "@babel/preset-env": "npm:^7.14.5" + "@babel/preset-react": "npm:^7.24.0" "@babel/preset-typescript": "npm:^7.14.5" "@babel/runtime": "npm:^7.14.6" "@babel/runtime-corejs3": "npm:^7.14.7" @@ -8227,7 +8436,7 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^4.0.0": +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed @@ -8824,6 +9033,17 @@ __metadata: languageName: node linkType: hard +"loose-envify@npm:^1.1.0": + version: 1.4.0 + resolution: "loose-envify@npm:1.4.0" + dependencies: + js-tokens: "npm:^3.0.0 || ^4.0.0" + bin: + loose-envify: cli.js + checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e + languageName: node + linkType: hard + "loupe@npm:^3.1.0, loupe@npm:^3.1.1": version: 3.1.1 resolution: "loupe@npm:3.1.1" @@ -9428,6 +9648,13 @@ __metadata: languageName: node linkType: hard +"object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 + languageName: node + linkType: hard + "object-inspect@npm:^1.13.1": version: 1.13.2 resolution: "object-inspect@npm:1.13.2" @@ -10911,6 +11138,19 @@ __metadata: languageName: node linkType: hard +"react-dom@npm:^17.0.2": + version: 17.0.2 + resolution: "react-dom@npm:17.0.2" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + scheduler: "npm:^0.20.2" + peerDependencies: + react: 17.0.2 + checksum: 10c0/51abbcb72450fe527ebf978c3bc989ba266630faaa53f47a2fae5392369729e8de62b2e4683598cbe651ea7873cd34ec7d5127e2f50bf4bfe6bd0c3ad9bddcb0 + languageName: node + linkType: hard + "react-is@npm:^17.0.1": version: 17.0.2 resolution: "react-is@npm:17.0.2" @@ -10918,6 +11158,16 @@ __metadata: languageName: node linkType: hard +"react@npm:^17.0.2": + version: 17.0.2 + resolution: "react@npm:17.0.2" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + checksum: 10c0/07ae8959acf1596f0550685102fd6097d461a54a4fd46a50f88a0cd7daaa97fdd6415de1dcb4bfe0da6aa43221a6746ce380410fa848acc60f8ac41f6649c148 + languageName: node + linkType: hard + "read-yaml-file@npm:^1.1.0": version: 1.1.0 resolution: "read-yaml-file@npm:1.1.0" @@ -11503,6 +11753,16 @@ __metadata: languageName: node linkType: hard +"scheduler@npm:^0.20.2": + version: 0.20.2 + resolution: "scheduler@npm:0.20.2" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + checksum: 10c0/b0982e4b0f34f4ffa4f2f486161c0fd9ce9b88680b045dccbf250eb1aa4fd27413570645455187a83535e2370f5c667a251045547765408492bd883cbe95fcdb + languageName: node + linkType: hard + "scroll-into-view-if-needed@npm:^3.0.0": version: 3.1.0 resolution: "scroll-into-view-if-needed@npm:3.1.0"