From 7dcae3c797c57775f65ebd0d11fdb4899d452bed Mon Sep 17 00:00:00 2001 From: ccloli <8115912+ccloli@users.noreply.github.com> Date: Tue, 30 Jan 2024 15:56:33 +0800 Subject: [PATCH] feat: sync upstream changes updated to NetEase/tango@62b39daf7e3d6cb04e7be7f002b27005ecfaebdc --- package-lock.json | 48 +++++++++++++++++++++---------------------- src/helpers/index.tsx | 4 ++-- src/pages/index.tsx | 9 +++++++- 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14ddc86..e79c6e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3277,9 +3277,9 @@ } }, "node_modules/@music163/tango-designer": { - "version": "1.0.0-alpha.9", - "resolved": "https://registry.npmjs.org/@music163/tango-designer/-/tango-designer-1.0.0-alpha.9.tgz", - "integrity": "sha512-ODbDKyjEt7An8sniV3biGt5ruhwqm9Q8y5ucRKQtGW1dn2PQTHdP6DFpb7KMONlkRv89UW4pNF4HozExte+JGQ==", + "version": "1.0.0-alpha.10", + "resolved": "https://registry.npmjs.org/@music163/tango-designer/-/tango-designer-1.0.0-alpha.10.tgz", + "integrity": "sha512-ERWsh7lRmYELBkiL94XBS0NRFC7m4Zhb4e4exMxYYg93Il+9tXMlTMJ9C+XHFRQlwWUydfeMBo6QSxRcPqVp5g==", "dependencies": { "@ant-design/icons": "^4.8.0", "@music163/request": "^0.1.2", @@ -3287,8 +3287,8 @@ "@music163/tango-core": "^1.0.0-alpha.6", "@music163/tango-helpers": "^1.0.0-alpha.2", "@music163/tango-sandbox": "^1.0.0-alpha.6", - "@music163/tango-setting-form": "^1.0.0-alpha.8", - "@music163/tango-ui": "^1.0.0-alpha.6", + "@music163/tango-setting-form": "^1.0.0-alpha.9", + "@music163/tango-ui": "^1.0.0-alpha.7", "antd": "^4.24.2", "cash-dom": "^8.1.2", "classnames": "^2.3.2", @@ -3338,14 +3338,14 @@ } }, "node_modules/@music163/tango-setting-form": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@music163/tango-setting-form/-/tango-setting-form-1.0.0-alpha.8.tgz", - "integrity": "sha512-FYNtbA9nDO2jbazsg70xI3fGOFYLE6tF+/PmrXnXF9/JSj/Ym7DjIR3Ki7htx044aFk2xmJoopCXofKwVDMjzQ==", + "version": "1.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/@music163/tango-setting-form/-/tango-setting-form-1.0.0-alpha.9.tgz", + "integrity": "sha512-V0lbrS9QHNWXSSBkgnaTHlP3nW2t+s08jzbj0wAeFxUQ7WM0iW+Vr4pLeL0LzST8BNv3IvNfaPBgIzD1s/KBxA==", "dependencies": { "@ant-design/icons": "^4.8.0", "@music163/tango-core": "^1.0.0-alpha.6", "@music163/tango-helpers": "^1.0.0-alpha.2", - "@music163/tango-ui": "^1.0.0-alpha.6", + "@music163/tango-ui": "^1.0.0-alpha.7", "antd": "^4.24.2", "coral-system": "^1.0.5", "mobx": "6.12.0", @@ -3356,9 +3356,9 @@ } }, "node_modules/@music163/tango-ui": { - "version": "1.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@music163/tango-ui/-/tango-ui-1.0.0-alpha.6.tgz", - "integrity": "sha512-34EFDRmMqEz5npEUhxE3baGEBMijbZQXrootWBRMnBP1Tk5Hy4YC9lk1hP4aRYS5GmsK5wYlLPBR2i5aLRTkhQ==", + "version": "1.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@music163/tango-ui/-/tango-ui-1.0.0-alpha.7.tgz", + "integrity": "sha512-nK2So+lgis9vA+YLAUd0BFaAAEVJ4yUhFnnJIh6WDsCxZNzXz3rlxUuLHdfufUEVM8G74JKpZ+Q/7YuwUnc73Q==", "dependencies": { "@ant-design/icons": "^4.8.0", "@codemirror/autocomplete": "^6.11.1", @@ -17216,9 +17216,9 @@ } }, "@music163/tango-designer": { - "version": "1.0.0-alpha.9", - "resolved": "https://registry.npmjs.org/@music163/tango-designer/-/tango-designer-1.0.0-alpha.9.tgz", - "integrity": "sha512-ODbDKyjEt7An8sniV3biGt5ruhwqm9Q8y5ucRKQtGW1dn2PQTHdP6DFpb7KMONlkRv89UW4pNF4HozExte+JGQ==", + "version": "1.0.0-alpha.10", + "resolved": "https://registry.npmjs.org/@music163/tango-designer/-/tango-designer-1.0.0-alpha.10.tgz", + "integrity": "sha512-ERWsh7lRmYELBkiL94XBS0NRFC7m4Zhb4e4exMxYYg93Il+9tXMlTMJ9C+XHFRQlwWUydfeMBo6QSxRcPqVp5g==", "requires": { "@ant-design/icons": "^4.8.0", "@music163/request": "^0.1.2", @@ -17226,8 +17226,8 @@ "@music163/tango-core": "^1.0.0-alpha.6", "@music163/tango-helpers": "^1.0.0-alpha.2", "@music163/tango-sandbox": "^1.0.0-alpha.6", - "@music163/tango-setting-form": "^1.0.0-alpha.8", - "@music163/tango-ui": "^1.0.0-alpha.6", + "@music163/tango-setting-form": "^1.0.0-alpha.9", + "@music163/tango-ui": "^1.0.0-alpha.7", "antd": "^4.24.2", "cash-dom": "^8.1.2", "classnames": "^2.3.2", @@ -17266,14 +17266,14 @@ } }, "@music163/tango-setting-form": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@music163/tango-setting-form/-/tango-setting-form-1.0.0-alpha.8.tgz", - "integrity": "sha512-FYNtbA9nDO2jbazsg70xI3fGOFYLE6tF+/PmrXnXF9/JSj/Ym7DjIR3Ki7htx044aFk2xmJoopCXofKwVDMjzQ==", + "version": "1.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/@music163/tango-setting-form/-/tango-setting-form-1.0.0-alpha.9.tgz", + "integrity": "sha512-V0lbrS9QHNWXSSBkgnaTHlP3nW2t+s08jzbj0wAeFxUQ7WM0iW+Vr4pLeL0LzST8BNv3IvNfaPBgIzD1s/KBxA==", "requires": { "@ant-design/icons": "^4.8.0", "@music163/tango-core": "^1.0.0-alpha.6", "@music163/tango-helpers": "^1.0.0-alpha.2", - "@music163/tango-ui": "^1.0.0-alpha.6", + "@music163/tango-ui": "^1.0.0-alpha.7", "antd": "^4.24.2", "coral-system": "^1.0.5", "mobx": "6.12.0", @@ -17281,9 +17281,9 @@ } }, "@music163/tango-ui": { - "version": "1.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@music163/tango-ui/-/tango-ui-1.0.0-alpha.6.tgz", - "integrity": "sha512-34EFDRmMqEz5npEUhxE3baGEBMijbZQXrootWBRMnBP1Tk5Hy4YC9lk1hP4aRYS5GmsK5wYlLPBR2i5aLRTkhQ==", + "version": "1.0.0-alpha.7", + "resolved": "https://registry.npmjs.org/@music163/tango-ui/-/tango-ui-1.0.0-alpha.7.tgz", + "integrity": "sha512-nK2So+lgis9vA+YLAUd0BFaAAEVJ4yUhFnnJIh6WDsCxZNzXz3rlxUuLHdfufUEVM8G74JKpZ+Q/7YuwUnc73Q==", "requires": { "@ant-design/icons": "^4.8.0", "@codemirror/autocomplete": "^6.11.1", diff --git a/src/helpers/index.tsx b/src/helpers/index.tsx index f45f45a..a49e574 100644 --- a/src/helpers/index.tsx +++ b/src/helpers/index.tsx @@ -3,12 +3,12 @@ import { Box, Group } from 'coral-system'; import { Avatar, Space, Switch } from 'antd'; import { BranchesOutlined, MenuOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import { registerSetter } from '@music163/tango-designer'; -import type { ComponentPrototypeType } from '@music163/tango-helpers'; +import type { ComponentPrototypeType, IVariableTreeNode } from '@music163/tango-helpers'; import { FooSetter } from '../components'; export * from './mock-files'; -export const bootHelperVariables = [ +export const bootHelperVariables: IVariableTreeNode[] = [ { key: '$helpers', title: '工具函数', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 463f47a..5c3dac8 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -22,6 +22,7 @@ import { BuildOutlined, ClusterOutlined, FunctionOutlined, + createFromIconfontCN, } from '@ant-design/icons'; import demo from '../demo'; @@ -42,12 +43,18 @@ const engine = createEngine({ // @ts-ignore window.__workspace__ = workspace; +// 3. 沙箱初始化 const sandboxQuery = new DndQuery({ context: 'iframe', }); +// 4. 图标库初始化(物料面板和组件树使用了 iconfont 里的图标) +createFromIconfontCN({ + scriptUrl: '//at.alicdn.com/t/c/font_2891794_lzc7rtwuzf.js', +}); + /** - * 3. 平台初始化,访问 https://local.netease.com:6006/ + * 5. 平台初始化,访问 https://local.netease.com:6006/ */ export default function App() { const [menuLoading, setMenuLoading] = useState(true);