{"_id":"@alilc/lowcode-plugin-multiple-editor","_rev":"4-c31b30b74181387a179e89be5609065e","name":"@alilc/lowcode-plugin-multiple-editor","dist-tags":{"beta":"0.2.0-beta.0","latest":"0.2.0"},"versions":{"0.1.0":{"name":"@alilc/lowcode-plugin-multiple-editor","version":"0.1.0","author":{"name":"wsh","email":"913003120@qq.com"},"license":"MIT","_id":"@alilc/lowcode-plugin-multiple-editor@0.1.0","maintainers":[{"name":"leoyuan","email":"yuanlihao1988@163.com"},{"name":"whatever_lll","email":"whatever6g@gmail.com"},{"name":"yang1996","email":"89915256@qq.com"},{"name":"jun.li","email":"jun.lukesmail@gmail.com"},{"name":"qingniaotonghua","email":"1021281778@qq.com"},{"name":"woshilaoge","email":"woshilaoge@hotmail.com"},{"name":"jack.lianjie","email":"jack.lianjie@gmail.com"},{"name":"otakuxv","email":"monkey362531@gmail.com"},{"name":"zyy7259","email":"zyy7259@gmail.com"},{"name":"sun2ama","email":"339341037@qq.com"},{"name":"hujiulong","email":"me@hujiulong.com"},{"name":"liujuping123","email":"1052228950@qq.com"},{"name":"akirakai","email":"akirakai@163.com"},{"name":"xingmolu","email":"591745264@qq.com"},{"name":"eternalsky","email":"wsj7552715@hotmail.com"},{"name":"mark-ck","email":"muscle.mark.cheng@gmail.com"},{"name":"hzd822","email":"hzd822@qq.com"},{"name":"clarencep","email":"clarence.pchy@gmail.com"},{"name":"alvarto","email":"humphry.huang9@gmail.com"},{"name":"leoyuan88","email":"yuanlihao1988@gmail.com"}],"dist":{"shasum":"6a6de5d56ba98f58a9b41d59e91a2602401009c8","tarball":"https://registry.npmjs.org/@alilc/lowcode-plugin-multiple-editor/-/lowcode-plugin-multiple-editor-0.1.0.tgz","fileCount":142,"integrity":"sha512-zxpFMQx0Ul2bl6lm0/opjzZEliazHIjoLZMlyyR6d0mmR5NAV/fNI7PE00gWwEAYEgE4BfIG9fJOzgOMVSVTNA==","signatures":[{"sig":"MEUCIQCj+tavggNn/NtC6d/v2gj2BRGDfUsrR1TDiyyANFxCQgIgPLVBUqujZynRqXF81DyyeDYm++k6KI+W5IPZrstl0Uk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17123966},"main":"es/index.js","babel":{"plugins":[["module-resolver",{"root":["./src"],"alias":{"@":"./src","types":"./src/types","utils":"./src/utils"}}],["import",{"style":true,"libraryName":"antd","libraryDirectory":"es"},"antd"]],"presets":[["react-app",{"useESModules":true,"absoluteRuntime":false}]]},"types":"./es/index.d.ts","gitHead":"30e8a3de7e8d4805a30ea625417e86cee1b5af66","private":false,"scripts":{"lib":"npx rimraf es && npm run transpile && tsc --emitDeclarationOnly","test":"echo 'success'","build":"NODE_ENV=production node scripts/build.js","start":"node scripts/start.js","watch":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts' -w","release":"fast-publish","runTest":"ts-node -P tsconfig-test.json","transpile":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts'","prepublishOnly":"npm run build && npm run lib"},"_npmUser":{"name":"jack.lianjie","email":"jack.lianjie@gmail.com"},"_npmVersion":"8.19.2","directories":{},"fastPublish":{"npmClient":"npm"},"_nodeVersion":"16.18.0","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{"@alilc/lowcode-types":"^1.0.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"bfj":"^7.0.2","antd":"^4.19.3","jest":"^27.4.3","less":"^4.1.2","react":"*","buffer":"^6.0.3","dotenv":"^10.0.0","lodash":"^4.17.21","rimraf":"^3.0.2","semver":"^7.3.5","postcss":"^8.4.4","prompts":"^2.4.2","resolve":"^1.20.0","ts-node":"^10.7.0","webpack":"^5.64.4","fs-extra":"^10.0.0","camelcase":"^6.2.1","react-dom":"*","@babel/cli":"^7.17.6","babel-jest":"^27.4.2","classnames":"^2.3.1","css-loader":"^6.5.1","typescript":"^4.4.2","url-loader":"^4.1.1","web-vitals":"^2.1.0","webpackbar":"^5.0.2","@alifd/next":"^1.25.29","@babel/core":"^7.16.0","@types/jest":"^27.0.1","@types/node":"^16.7.13","@types/uuid":"^8.3.4","file-loader":"^6.2.0","less-loader":"^10.2.0","sass-loader":"^12.3.0","tailwindcss":"^3.0.2","@types/react":"^17.0.20","babel-loader":"^8.2.3","browserslist":"^4.18.1","fast-publish":"^0.1.3","jest-resolve":"^27.4.2","style-loader":"^3.3.1","@svgr/webpack":"^5.5.0","@types/lodash":"^4.14.181","dotenv-expand":"^5.1.0","monaco-editor":"0.33.0","react-refresh":"^0.11.0","postcss-loader":"^6.2.1","react-dev-utils":"^12.0.0","@types/react-dom":"^17.0.9","@ant-design/icons":"^4.7.0","@babel/standalone":"^7.17.8","@types/classnames":"^2.3.1","postcss-normalize":"^10.0.1","source-map-loader":"^3.0.0","identity-obj-proxy":"^3.0.0","postcss-preset-env":"^7.0.1","react-app-polyfill":"^3.0.0","resolve-url-loader":"^4.0.0","webpack-dev-server":"^4.6.0","babel-plugin-import":"^1.13.3","html-webpack-plugin":"^5.5.0","jest-watch-typeahead":"^1.0.0","@alilc/lowcode-engine":"^1.0.0","@monaco-editor/loader":"^1.3.0","eslint-webpack-plugin":"^3.1.1","terser-webpack-plugin":"^5.2.5","@testing-library/react":"^12.0.0","babel-preset-react-app":"^10.0.1","postcss-flexbugs-fixes":"^5.0.2","workbox-webpack-plugin":"^6.4.1","mini-css-extract-plugin":"^2.4.5","webpack-manifest-plugin":"^4.0.2","@types/babel__standalone":"^7.1.4","@alilc/lowcode-engine-ext":"^1.0.3","@testing-library/jest-dom":"^5.14.1","@alilc/lowcode-editor-core":"^1.0.6","@alilc/lowcode-plugin-zh-en":"^1.0.0","@alilc/lowcode-setter-title":"^1.0.2","@testing-library/user-event":"^13.2.1","@alilc/lowcode-plugin-inject":"^1.0.0","@alilc/lowcode-plugin-manual":"^1.0.3","@alilc/lowcode-plugin-schema":"^1.0.1","babel-plugin-module-resolver":"^4.1.0","css-minimizer-webpack-plugin":"^3.2.0","monaco-editor-webpack-plugin":"^7.0.1","@alilc/lowcode-react-renderer":"^1.0.0","@alilc/lowcode-setter-behavior":"^1.0.0","babel-plugin-named-asset-import":"^0.3.8","case-sensitive-paths-webpack-plugin":"^2.4.0","@pmmmwh/react-refresh-webpack-plugin":"^0.5.3","@alilc/lowcode-plugin-components-pane":"^1.0.2","@alilc/lowcode-plugin-simulator-select":"^1.0.0","@alilc/lowcode-datasource-fetch-handler":"^1.0.1","@alilc/lowcode-plugin-base-monaco-editor":"1.1.0-beta.1"},"_npmOperationalInternal":{"tmp":"tmp/lowcode-plugin-multiple-editor_0.1.0_1684236565195_0.5625935063533776","host":"s3://npm-registry-packages"}},"0.2.0-beta.0":{"name":"@alilc/lowcode-plugin-multiple-editor","version":"0.2.0-beta.0","author":{"name":"wsh","email":"913003120@qq.com"},"license":"MIT","_id":"@alilc/lowcode-plugin-multiple-editor@0.2.0-beta.0","maintainers":[{"name":"leoyuan","email":"yuanlihao1988@163.com"},{"name":"whatever_lll","email":"whatever6g@gmail.com"},{"name":"yang1996","email":"89915256@qq.com"},{"name":"jun.li","email":"jun.lukesmail@gmail.com"},{"name":"qingniaotonghua","email":"1021281778@qq.com"},{"name":"woshilaoge","email":"woshilaoge@hotmail.com"},{"name":"jack.lianjie","email":"jack.lianjie@gmail.com"},{"name":"otakuxv","email":"monkey362531@gmail.com"},{"name":"zyy7259","email":"zyy7259@gmail.com"},{"name":"sun2ama","email":"339341037@qq.com"},{"name":"hujiulong","email":"me@hujiulong.com"},{"name":"liujuping123","email":"1052228950@qq.com"},{"name":"akirakai","email":"akirakai@163.com"},{"name":"xingmolu","email":"591745264@qq.com"},{"name":"eternalsky","email":"wsj7552715@hotmail.com"},{"name":"mark-ck","email":"muscle.mark.cheng@gmail.com"},{"name":"hzd822","email":"hzd822@qq.com"},{"name":"clarencep","email":"clarence.pchy@gmail.com"},{"name":"alvarto","email":"humphry.huang9@gmail.com"},{"name":"leoyuan88","email":"yuanlihao1988@gmail.com"}],"homepage":"https://github.com/alibaba/lowcode-plugins#readme","bugs":{"url":"https://github.com/alibaba/lowcode-plugins/issues"},"dist":{"shasum":"5edf1396ea48564b21890c6a59f68a96e01706f0","tarball":"https://registry.npmjs.org/@alilc/lowcode-plugin-multiple-editor/-/lowcode-plugin-multiple-editor-0.2.0-beta.0.tgz","fileCount":161,"integrity":"sha512-9rvaC2q4uk4tLneQ5lK1VXGiAKMNlL8OOJPYk9TAJZUSRVAieo9wOLa6B1axBJUj55jo+XhAItjUqGuOTHElbA==","signatures":[{"sig":"MEYCIQDVZOoFKDAd0Y2kHSLlT3zSG7DxIh4RcLDRJ+xn62cNMAIhAINlTpynRFSxnDTMpX7YPyPCsNZ67i4S1M8OLqOss5KZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16817032},"main":"es/index.js","babel":{"plugins":[["module-resolver",{"root":["./src"],"alias":{"@":"./src","types":"./src/types","utils":"./src/utils"}}],["import",{"style":true,"libraryName":"antd","libraryDirectory":"es"},"antd"]],"presets":[["react-app",{"useESModules":true,"absoluteRuntime":false}]]},"types":"./es/index.d.ts","readme":"# 多文件编辑器\n\n借助此插件可在低码引擎上使用任意层级的文件树进行代码的组织\n\n## Demo\n\n```ts\nimport multipleFileCodeEditorFactory from '@alilc/lowcode-plugin-multiple-editor';\n\nimport { PrettierPlugin } from '@alilc/lowcode-plugin-multiple-editor/es/plugins/prettier-plugin';\n\n\nconst PLUGIN_NAME = 'multiple-file-code-editor';\n// 详细参数可见 ts 类型声明\nconst plugin: any = multipleFileCodeEditorFactory({\n  softSave: true, // true 保存代码时将代码保存在插件类上，并不会调用引擎的 importSchema\n  es6: true, // 编译选项，true 时仅做 es module 的编译\n  // 可选择使用插进进行代码编辑器功能的拓展\n  plugins: [searchPlugin as any, lintPlugin, new PrettierPlugin()],\n  // 内置钩子，在插件初始化时进行一些操作，例如添加类型声明\n  onInstall(controller: EditorController) {\n    for (const [path, content] of extraLibList) {\n      controller.addExtraLib(content, path);\n    }\n    controller.addComponentDeclarations(declarations);\n    controller.onImportSchema(async (schema) => {\n      // Todo sth.\n    });\n    window.codeEditorController = controller;\n  },\n  defaultFiles: {\n    utils: `\nexport function helloWorld() {\n  console.log('hello world');\n}\n    `\n  }\n});\n\nplugin.pluginName = PLUGIN_NAME;\n\nawait plugins.register(plugin);\n```\n\n## 工作原理\n\n使用该插件时，每次保存时：\n\n1. 编译代码，生成 __initExtra 函数方法，该方法用于初始化各个方法、生命周期的真实定义\n1. 修改 constructor 函数体，函数体内执行 __initExtra，constructor 将会在渲染引擎内执行，执行完成后即可得到所有方法和生命周期的真实定义\n1. 在 schema 上保存一个文件 Map，保存位置为 `schema.componentsTree[0]._sourceCodeMap`\n\n## 使用注意事项\n\n1. 建议所有 project.importSchema 和 project.exportSchema 替换为 codeEditorController.importSchema 和 codeEditorController.exportSchema。原因是插件内部需要对文件内容进行处理\n2. 不能在 index.js 的 Class 之外进行函数、变量定义，如需定义则在其他文件内定义\n3. 不能在 index.js Class 的 state 定义中使用表达式\n4. 如需在 setter 内适用类型定义，请开启 base-editor 的单例模式，仅需在应用入口处调用如下方法即可：\n5. 如果低码项目有使用出码，则需对出码进行定制，将 _sourceCodeMap 中的文件生成到项目中，并对文件的引用进行处理，具体处理方式可自行组织\n\n__使用单例模式__\n```ts\nimport { configure } from '@alilc/lowcode-plugin-base-monaco-editor';\nconfigure({ singleton: true });\n```\n","gitHead":"5e06f48227d067702ce94c6d5fcb4ef3f4a5c54f","private":false,"scripts":{"lib":"npx rimraf es && npm run transpile && tsc --emitDeclarationOnly","test":"echo 'success'","build":"NODE_ENV=production node scripts/build.js","start":"node scripts/start.js","watch":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts' -w","release":"fast-publish","runTest":"ts-node -P tsconfig-test.json","transpile":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts'","prepublishOnly":"npm run build && npm run lib"},"_npmUser":{"name":"liujuping123","email":"1052228950@qq.com"},"repository":{"url":"git+https://github.com/alibaba/lowcode-plugins.git","type":"git"},"_npmVersion":"8.19.4","description":"借助此插件可在低码引擎上使用任意层级的文件树进行代码的组织","directories":{},"fastPublish":{"npmClient":"npm"},"resolutions":{"@types/react":"^17.0.2"},"_nodeVersion":"16.20.2","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{"@babel/types":"^7.16.0","@alilc/lowcode-types":"^1.0.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"bfj":"^7.0.2","antd":"^4.19.3","jest":"^27.4.3","less":"^4.1.2","react":"^16.8.1","buffer":"^6.0.3","dotenv":"^10.0.0","lodash":"^4.17.21","rimraf":"^3.0.2","semver":"^7.3.5","postcss":"^8.4.4","prompts":"^2.4.2","resolve":"^1.20.0","ts-node":"^10.7.0","webpack":"^5.64.4","fs-extra":"^10.0.0","camelcase":"^6.2.1","react-dom":"*","@babel/cli":"^7.17.6","babel-jest":"^27.4.2","classnames":"^2.3.1","css-loader":"^6.5.1","typescript":"^4.4.2","url-loader":"^4.1.1","web-vitals":"^2.1.0","webpackbar":"^5.0.2","@alifd/next":"^1.25.29","@babel/core":"^7.16.0","@types/jest":"^27.0.1","@types/node":"^16.7.13","@types/uuid":"^8.3.4","file-loader":"^6.2.0","less-loader":"^10.2.0","sass-loader":"^12.3.0","tailwindcss":"^3.0.2","@types/react":"^17.0.20","babel-loader":"^8.2.3","browserslist":"^4.18.1","fast-publish":"^0.1.3","jest-resolve":"^27.4.2","style-loader":"^3.3.1","@svgr/webpack":"^5.5.0","@types/lodash":"^4.14.181","dotenv-expand":"^5.1.0","monaco-editor":"0.33.0","react-refresh":"^0.11.0","postcss-loader":"^6.2.1","react-dev-utils":"^12.0.0","@types/react-dom":"^17.0.9","@ant-design/icons":"^4.7.0","@babel/standalone":"^7.17.8","@types/classnames":"^2.3.1","postcss-normalize":"^10.0.1","source-map-loader":"^3.0.0","identity-obj-proxy":"^3.0.0","postcss-preset-env":"^7.0.1","react-app-polyfill":"^3.0.0","resolve-url-loader":"^4.0.0","webpack-dev-server":"^4.6.0","babel-plugin-import":"^1.13.3","html-webpack-plugin":"^5.5.0","jest-watch-typeahead":"^1.0.0","@alilc/lowcode-engine":"^1.0.0","@monaco-editor/loader":"^1.3.0","eslint-webpack-plugin":"^3.1.1","terser-webpack-plugin":"^5.2.5","@testing-library/react":"^12.0.0","babel-preset-react-app":"^10.0.1","postcss-flexbugs-fixes":"^5.0.2","workbox-webpack-plugin":"^6.4.1","mini-css-extract-plugin":"^2.4.5","webpack-manifest-plugin":"^4.0.2","@types/babel__standalone":"^7.1.4","@alilc/lowcode-engine-ext":"^1.0.3","@testing-library/jest-dom":"^5.14.1","@alilc/lowcode-editor-core":"^1.0.6","@alilc/lowcode-plugin-zh-en":"^1.0.0","@alilc/lowcode-setter-title":"^1.0.2","@testing-library/user-event":"^13.2.1","@alilc/lowcode-plugin-inject":"^1.0.0","@alilc/lowcode-plugin-manual":"^1.0.3","@alilc/lowcode-plugin-schema":"^1.0.1","babel-plugin-module-resolver":"^4.1.0","css-minimizer-webpack-plugin":"^3.2.0","monaco-editor-webpack-plugin":"^7.0.1","@alilc/lowcode-react-renderer":"^1.0.0","@alilc/lowcode-setter-behavior":"^1.0.0","babel-plugin-named-asset-import":"^0.3.8","case-sensitive-paths-webpack-plugin":"^2.4.0","@pmmmwh/react-refresh-webpack-plugin":"^0.5.3","@alilc/lowcode-plugin-components-pane":"^1.0.2","@alilc/lowcode-plugin-simulator-select":"^1.0.0","@alilc/lowcode-datasource-fetch-handler":"^1.0.1","@alilc/lowcode-plugin-base-monaco-editor":"1.1.0-beta.1"},"_npmOperationalInternal":{"tmp":"tmp/lowcode-plugin-multiple-editor_0.2.0-beta.0_1708913151433_0.587264405811172","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@alilc/lowcode-plugin-multiple-editor","version":"0.2.0","author":{"name":"wsh","email":"913003120@qq.com"},"license":"MIT","_id":"@alilc/lowcode-plugin-multiple-editor@0.2.0","maintainers":[{"name":"leoyuan","email":"yuanlihao1988@163.com"},{"name":"whatever_lll","email":"whatever6g@gmail.com"},{"name":"yang1996","email":"89915256@qq.com"},{"name":"jun.li","email":"jun.lukesmail@gmail.com"},{"name":"qingniaotonghua","email":"1021281778@qq.com"},{"name":"woshilaoge","email":"woshilaoge@hotmail.com"},{"name":"jack.lianjie","email":"jack.lianjie@gmail.com"},{"name":"otakuxv","email":"monkey362531@gmail.com"},{"name":"zyy7259","email":"zyy7259@gmail.com"},{"name":"sun2ama","email":"339341037@qq.com"},{"name":"hujiulong","email":"me@hujiulong.com"},{"name":"liujuping123","email":"1052228950@qq.com"},{"name":"akirakai","email":"akirakai@163.com"},{"name":"xingmolu","email":"591745264@qq.com"},{"name":"eternalsky","email":"wsj7552715@hotmail.com"},{"name":"mark-ck","email":"muscle.mark.cheng@gmail.com"},{"name":"hzd822","email":"hzd822@qq.com"},{"name":"clarencep","email":"clarence.pchy@gmail.com"},{"name":"alvarto","email":"humphry.huang9@gmail.com"},{"name":"leoyuan88","email":"yuanlihao1988@gmail.com"}],"homepage":"https://github.com/alibaba/lowcode-plugins#readme","bugs":{"url":"https://github.com/alibaba/lowcode-plugins/issues"},"dist":{"shasum":"9dbd840ddc61cef45fb098c7a7fd222e9b6cb7b2","tarball":"https://registry.npmjs.org/@alilc/lowcode-plugin-multiple-editor/-/lowcode-plugin-multiple-editor-0.2.0.tgz","fileCount":161,"integrity":"sha512-Iz36yS+cAHaU8acfUNHykEBnemKRPv/nX7D2VYUT49uqffCsE9OMmf9xIEh2D2qLPUXqdq9WWs9hHiRfgf6RtA==","signatures":[{"sig":"MEUCIQCM9mAC+ECES7nrpGTvjJFc1XF0s7se+2CkTuJTwdyPwAIgLlFAjMjQWK0TSLgvQnDRN23/DNCuXWQW/FalyjqdiVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16817025},"main":"es/index.js","babel":{"plugins":[["module-resolver",{"root":["./src"],"alias":{"@":"./src","types":"./src/types","utils":"./src/utils"}}],["import",{"style":true,"libraryName":"antd","libraryDirectory":"es"},"antd"]],"presets":[["react-app",{"useESModules":true,"absoluteRuntime":false}]]},"types":"./es/index.d.ts","gitHead":"5e06f48227d067702ce94c6d5fcb4ef3f4a5c54f","private":false,"scripts":{"lib":"npx rimraf es && npm run transpile && tsc --emitDeclarationOnly","test":"echo 'success'","build":"NODE_ENV=production node scripts/build.js","start":"node scripts/start.js","watch":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts' -w","release":"fast-publish","runTest":"ts-node -P tsconfig-test.json","transpile":"NODE_ENV=production babel src -d es --copy-files --extensions '.js,.tsx,.ts'","prepublishOnly":"npm run build && npm run lib"},"_npmUser":{"name":"liujuping123","email":"1052228950@qq.com"},"repository":{"url":"git+https://github.com/alibaba/lowcode-plugins.git","type":"git"},"_npmVersion":"8.19.4","description":"借助此插件可在低码引擎上使用任意层级的文件树进行代码的组织","directories":{},"fastPublish":{"npmClient":"npm"},"resolutions":{"@types/react":"^17.0.2"},"_nodeVersion":"16.20.2","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"dependencies":{"@babel/types":"^7.16.0","@alilc/lowcode-types":"^1.0.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"bfj":"^7.0.2","antd":"^4.19.3","jest":"^27.4.3","less":"^4.1.2","react":"^16.8.1","buffer":"^6.0.3","dotenv":"^10.0.0","lodash":"^4.17.21","rimraf":"^3.0.2","semver":"^7.3.5","postcss":"^8.4.4","prompts":"^2.4.2","resolve":"^1.20.0","ts-node":"^10.7.0","webpack":"^5.64.4","fs-extra":"^10.0.0","camelcase":"^6.2.1","react-dom":"*","@babel/cli":"^7.17.6","babel-jest":"^27.4.2","classnames":"^2.3.1","css-loader":"^6.5.1","typescript":"^4.4.2","url-loader":"^4.1.1","web-vitals":"^2.1.0","webpackbar":"^5.0.2","@alifd/next":"^1.25.29","@babel/core":"^7.16.0","@types/jest":"^27.0.1","@types/node":"^16.7.13","@types/uuid":"^8.3.4","file-loader":"^6.2.0","less-loader":"^10.2.0","sass-loader":"^12.3.0","tailwindcss":"^3.0.2","@types/react":"^17.0.20","babel-loader":"^8.2.3","browserslist":"^4.18.1","fast-publish":"^0.1.3","jest-resolve":"^27.4.2","style-loader":"^3.3.1","@svgr/webpack":"^5.5.0","@types/lodash":"^4.14.181","dotenv-expand":"^5.1.0","monaco-editor":"0.33.0","react-refresh":"^0.11.0","postcss-loader":"^6.2.1","react-dev-utils":"^12.0.0","@types/react-dom":"^17.0.9","@ant-design/icons":"^4.7.0","@babel/standalone":"^7.17.8","@types/classnames":"^2.3.1","postcss-normalize":"^10.0.1","source-map-loader":"^3.0.0","identity-obj-proxy":"^3.0.0","postcss-preset-env":"^7.0.1","react-app-polyfill":"^3.0.0","resolve-url-loader":"^4.0.0","webpack-dev-server":"^4.6.0","babel-plugin-import":"^1.13.3","html-webpack-plugin":"^5.5.0","jest-watch-typeahead":"^1.0.0","@alilc/lowcode-engine":"^1.0.0","@monaco-editor/loader":"^1.3.0","eslint-webpack-plugin":"^3.1.1","terser-webpack-plugin":"^5.2.5","@testing-library/react":"^12.0.0","babel-preset-react-app":"^10.0.1","postcss-flexbugs-fixes":"^5.0.2","workbox-webpack-plugin":"^6.4.1","mini-css-extract-plugin":"^2.4.5","webpack-manifest-plugin":"^4.0.2","@types/babel__standalone":"^7.1.4","@alilc/lowcode-engine-ext":"^1.0.3","@testing-library/jest-dom":"^5.14.1","@alilc/lowcode-editor-core":"^1.0.6","@alilc/lowcode-plugin-zh-en":"^1.0.0","@alilc/lowcode-setter-title":"^1.0.2","@testing-library/user-event":"^13.2.1","@alilc/lowcode-plugin-inject":"^1.0.0","@alilc/lowcode-plugin-manual":"^1.0.3","@alilc/lowcode-plugin-schema":"^1.0.1","babel-plugin-module-resolver":"^4.1.0","css-minimizer-webpack-plugin":"^3.2.0","monaco-editor-webpack-plugin":"^7.0.1","@alilc/lowcode-react-renderer":"^1.0.0","@alilc/lowcode-setter-behavior":"^1.0.0","babel-plugin-named-asset-import":"^0.3.8","case-sensitive-paths-webpack-plugin":"^2.4.0","@pmmmwh/react-refresh-webpack-plugin":"^0.5.3","@alilc/lowcode-plugin-components-pane":"^1.0.2","@alilc/lowcode-plugin-simulator-select":"^1.0.0","@alilc/lowcode-datasource-fetch-handler":"^1.0.1","@alilc/lowcode-plugin-base-monaco-editor":"1.1.0-beta.1"},"_npmOperationalInternal":{"tmp":"tmp/lowcode-plugin-multiple-editor_0.2.0_1708915983351_0.13859110571801758","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-05-16T11:29:25.128Z","modified":"2025-03-04T07:43:08.841Z","0.1.0":"2023-05-16T11:29:25.454Z","0.2.0-beta.0":"2024-02-26T02:05:51.703Z","0.2.0":"2024-02-26T02:53:03.643Z"},"bugs":{"url":"https://github.com/alibaba/lowcode-plugins/issues"},"author":{"name":"wsh","email":"913003120@qq.com"},"license":"MIT","homepage":"https://github.com/alibaba/lowcode-plugins#readme","repository":{"url":"git+https://github.com/alibaba/lowcode-plugins.git","type":"git"},"description":"借助此插件可在低码引擎上使用任意层级的文件树进行代码的组织","maintainers":[{"email":"me@hujiulong.com","name":"hujiulong"},{"email":"clarence.pchy@gmail.com","name":"clarencep"},{"email":"humphry.huang9@gmail.com","name":"alvarto"},{"email":"akirakai@163.com","name":"akirakai"},{"email":"591745264@qq.com","name":"xingmolu"},{"email":"yuanlihao1988@163.com","name":"leoyuan"},{"email":"yuanlihao1988@gmail.com","name":"leoyuan88"},{"email":"1052228950@qq.com","name":"liujuping123"},{"email":"hzd822@qq.com","name":"hzd822"},{"email":"muscle.mark.cheng@gmail.com","name":"mark-ck"},{"email":"wsj7552715@hotmail.com","name":"eternalsky"},{"email":"jun.lukesmail@gmail.com","name":"jun.li"},{"email":"89915256@qq.com","name":"yang1996"},{"email":"339341037@qq.com","name":"sun2ama"},{"email":"zyy7259@gmail.com","name":"zyy7259"},{"email":"monkey362531@gmail.com","name":"otakuxv"},{"email":"jack.lianjie@gmail.com","name":"jack.lianjie"},{"email":"woshilaoge@hotmail.com","name":"woshilaoge"},{"email":"1021281778@qq.com","name":"qingniaotonghua"},{"email":"whatever6g@gmail.com","name":"whatever_lll"},{"email":"1ncounter.100@gmail.com","name":"1ncounter"},{"email":"710411486@qq.com","name":"soberz"}],"readme":"# 多文件编辑器\n\n借助此插件可在低码引擎上使用任意层级的文件树进行代码的组织\n\n## Demo\n\n```ts\nimport multipleFileCodeEditorFactory from '@alilc/lowcode-plugin-multiple-editor';\n\nimport { PrettierPlugin } from '@alilc/lowcode-plugin-multiple-editor/es/plugins/prettier-plugin';\n\n\nconst PLUGIN_NAME = 'multiple-file-code-editor';\n// 详细参数可见 ts 类型声明\nconst plugin: any = multipleFileCodeEditorFactory({\n  softSave: true, // true 保存代码时将代码保存在插件类上，并不会调用引擎的 importSchema\n  es6: true, // 编译选项，true 时仅做 es module 的编译\n  // 可选择使用插进进行代码编辑器功能的拓展\n  plugins: [searchPlugin as any, lintPlugin, new PrettierPlugin()],\n  // 内置钩子，在插件初始化时进行一些操作，例如添加类型声明\n  onInstall(controller: EditorController) {\n    for (const [path, content] of extraLibList) {\n      controller.addExtraLib(content, path);\n    }\n    controller.addComponentDeclarations(declarations);\n    controller.onImportSchema(async (schema) => {\n      // Todo sth.\n    });\n    window.codeEditorController = controller;\n  },\n  defaultFiles: {\n    utils: `\nexport function helloWorld() {\n  console.log('hello world');\n}\n    `\n  }\n});\n\nplugin.pluginName = PLUGIN_NAME;\n\nawait plugins.register(plugin);\n```\n\n## 工作原理\n\n使用该插件时，每次保存时：\n\n1. 编译代码，生成 __initExtra 函数方法，该方法用于初始化各个方法、生命周期的真实定义\n1. 修改 constructor 函数体，函数体内执行 __initExtra，constructor 将会在渲染引擎内执行，执行完成后即可得到所有方法和生命周期的真实定义\n1. 在 schema 上保存一个文件 Map，保存位置为 `schema.componentsTree[0]._sourceCodeMap`\n\n## 使用注意事项\n\n1. 建议所有 project.importSchema 和 project.exportSchema 替换为 codeEditorController.importSchema 和 codeEditorController.exportSchema。原因是插件内部需要对文件内容进行处理\n2. 不能在 index.js 的 Class 之外进行函数、变量定义，如需定义则在其他文件内定义\n3. 不能在 index.js Class 的 state 定义中使用表达式\n4. 如需在 setter 内适用类型定义，请开启 base-editor 的单例模式，仅需在应用入口处调用如下方法即可：\n5. 如果低码项目有使用出码，则需对出码进行定制，将 _sourceCodeMap 中的文件生成到项目中，并对文件的引用进行处理，具体处理方式可自行组织\n\n__使用单例模式__\n```ts\nimport { configure } from '@alilc/lowcode-plugin-base-monaco-editor';\nconfigure({ singleton: true });\n```\n","readmeFilename":"README.md"}