Skip to content

feat: 可视化扩展 & 插件编辑器 - 节点图编辑、节点⇄JS双向转换、一键导入/下载 - #6

Open
PYC5635 wants to merge 4 commits into
Bilup:developfrom
PineWarp:feature/visual-editors
Open

PYC5635 wants to merge 4 commits into
Bilup:developfrom
PineWarp:feature/visual-editors

Conversation

@PYC5635

@PYC5635 PYC5635 commented Nov 22, 2026

Copy link
Copy Markdown

功能说明

「工具」菜单新增两个可视化编辑器,UnrealEngine 蓝图风格的节点图编辑:

  • 可视化扩展编辑器(Visual Extension Editor):节点搭建自定义扩展 → 导入作品成为自定义扩展 / 下载 .js / 节点⇄JS 双向转换
  • 可视化插件编辑器(Visual Addon Editor):编辑对象为插件(addon),导入走仓库现有 custom-plugins.js 注册表(导入即用、持久化)

核心能力

1. 节点图编辑(参考 UE 蓝图)

  • 画布:拖空白平移、Ctrl+滚轮缩放、节点拖动、端口拖拽连线(exec 控制流=方形白点 / data 数据流=圆形蓝点,贝塞尔曲线)、点连线删除、右键节点删除
  • 左侧节点面板(分类+搜索)、右侧属性面板(参数即时编辑)、顶部面包屑(子图栈导航)
  • 函数体 / 积木回调 / 定时器回调为子图:双击节点进入,面包屑返回
  • 撤销(30 步快照)

2. 节点目录(56 类,9 大分类)

事件(启动/绿旗/停止/广播/按键/角色点击/每帧/DOM/插件设置/作品改变)、流程控制(if/else/循环/遍历/break/continue/return/await 等待/try-catch/注释)、变量、运算(算术/比较/逻辑/三元/Math 函数/字符串操作/模板字符串/JSON/展开)、函数(定义/调用/表达式调用/箭头函数回调)、Scratch 交互(说/广播/变量读写/角色对象/舞台尺寸/计时器/克隆/回答)、DOM/UI(console/alert/prompt/query/样式修改/创建元素)、网络/存储/高级(fetch 异步/localStorage/定时器/随机/UUID/Promise/await)、扩展积木定义(opcode/文本/参数/子图逻辑)、插件 API(addon.tab/scratch/设置读写/等待元素/注入 CSS/msg 翻译)

  • 万能逃生舱:★ 任意 JS 表达式 / ★ 任意 JS 语句 节点——JS 能写的节点都能做

3. 节点 ⇄ JS 双向转换

  • 节点→代码:编译器沿 exec 链生成语句、表达式节点递归内联;生成产物头部注释 /* VE-GRAPH v1 ... */ 内嵌完整节点图存档
  • 代码→节点:粘贴回读 → 无损还原全部节点/连线/参数/坐标;外部任意 JS 也能导入(逐语句扫描 → 「任意 JS 语句」节点链,识别绿旗/广播/按键/DOM 事件特征自动建事件节点,提取回调函数体语句)
  • 已通过往返自动化测试(3 节点 2 连线含跨类型数据流:编译→解析→完全还原)

4. 导入与下载

  • 扩展:data:application/javascript: URL → markExtensionAsCustom + manuallyTrustExtension → vm.extensionManager.loadExtensionURL(与「自定义扩展」加载入口同链路)
  • 插件:customPlugins.add(manifest, code, true)(走仓库现有自定义插件注册表,localStorage 持久化、设置页可管理)
  • 下载:Blob → 文件名.js

变更文件

文件 说明
src/lib/visual-node-engine/(5 新文件) 图模型 / 节点目录(56 类) / 编译器 / 解析器 / 模板
src/components/visual-editor/(5 新文件) 主模态 / 画布 / 面板 / 属性 / 样式
src/containers/visual-*-editor-modal.jsx(2 新) redux 容器
src/reducers/modals.js +2 modal 常量与 action
src/components/menu-bar/menu-bar.jsx 工具菜单两个入口
src/components/gui/gui.jsx 懒加载渲染
src/lib/tw-translations/local-messages.js zh-cn 翻译

对现有代码零行为改动(纯新增 + 4 个既有文件的注册点)。

鸣谢

  • PYC5635(勇敢的菠萝🍍)

@DLGrass DLGrass left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有报错:

    ERROR in ./src/containers/visual-extension-editor-modal.jsx
    Module not found: Error: Can't resolve '../../reducers/modals' in 'E:\Bilup\scratch-gui\src\containers'
     @ ./src/containers/visual-extension-editor-modal.jsx 7:0-67 14:26-52
     @ ./src/components/gui/gui.jsx
     @ ./src/containers/gui.jsx
     @ ./src/playground/render-gui.jsx
     @ ./src/playground/embed.jsx

    ERROR in ./src/containers/visual-addon-editor-modal.jsx
    Module not found: Error: Can't resolve '../../reducers/modals' in 'E:\Bilup\scratch-gui\src\containers'
     @ ./src/containers/visual-addon-editor-modal.jsx 7:0-63 14:26-48
     @ ./src/components/gui/gui.jsx
     @ ./src/containers/gui.jsx
     @ ./src/playground/render-gui.jsx
     @ ./src/playground/embed.jsx

@DLGrass DLGrass left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

仍然有报错(控制台):

The above error occurred in one of your React components:
    in Unknown (created by GUIComponent)
    in MediaQuery (created by GUIComponent)
    in GUIComponent (created by Connect(GUIComponent))
    in Connect(GUIComponent) (created by InjectIntl(Connect(GUIComponent)))
    in InjectIntl(Connect(GUIComponent)) (created by GUI)
    in GUI (created by Connect(GUI))
    in Connect(GUI) (created by InjectIntl(Connect(GUI)))
    in InjectIntl(Connect(GUI)) (created by CloudManager)
    in CloudManager (created by Connect(CloudManager))
    in Connect(CloudManager) (created by SBFileUploaderComponent)
    in SBFileUploaderComponent (created by Connect(SBFileUploaderComponent))
    in Connect(SBFileUploaderComponent) (created by InjectIntl(Connect(SBFileUploaderComponent)))
    in InjectIntl(Connect(SBFileUploaderComponent)) (created by VMManager)
    in VMManager (created by Connect(VMManager))
    in Connect(VMManager) (created by VMListener)
    in VMListener (created by Connect(VMListener))
    in Connect(VMListener) (created by ProjectSaverComponent)
    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))
    in Connect(ProjectSaverComponent) (created by TitledComponent)
    in TitledComponent (created by Connect(TitledComponent))
    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))
    in InjectIntl(Connect(TitledComponent)) (created by SB3PostMessageComponent)
    in SB3PostMessageComponent (created by Connect(SB3PostMessageComponent))
    in Connect(SB3PostMessageComponent) (created by ProjectFetcherComponent)
    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))
    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))
    in InjectIntl(Connect(ProjectFetcherComponent)) (created by FontLoaderComponent)
    in FontLoaderComponent (created by Connect(FontLoaderComponent))
    in Connect(FontLoaderComponent) (created by FullScreenResizer)
    in FullScreenResizer (created by Connect(FullScreenResizer))
    in Connect(FullScreenResizer) (created by TWThemeManagerComponent)
    in TWThemeManagerComponent (created by Connect(TWThemeManagerComponent))
    in Connect(TWThemeManagerComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by RenderGUI)
    in RenderGUI (created by Interface)
    in div (created by Interface)
    in div (created by Interface)
    in Interface (created by Connect(Interface))
    in Connect(Interface) (created by InjectIntl(Connect(Interface)))
    in InjectIntl(Connect(Interface)) (created by PackagerIntegrationComponent)
    in PackagerIntegrationComponent (created by InjectIntl(PackagerIntegrationComponent))
    in InjectIntl(PackagerIntegrationComponent) (created by Connect(InjectIntl(PackagerIntegrationComponent)))
    in Connect(InjectIntl(PackagerIntegrationComponent)) (created by StateManagerComponent)
    in StateManagerComponent (created by Connect(StateManagerComponent))
    in Connect(StateManagerComponent) (created by InjectIntl(Connect(StateManagerComponent)))
    in InjectIntl(Connect(StateManagerComponent)) (created by ProjectMetaFetcherComponent)
    in ProjectMetaFetcherComponent (created by Connect(ProjectMetaFetcherComponent))
    in Connect(ProjectMetaFetcherComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by AppStateWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by AppStateWrapper)
    in Provider (created by AppStateWrapper)
    in AppStateWrapper

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary. [react-dom.development.js:19527:1](webpack://GUI/node_modules/.pnpm/react-dom@16.14.0_react@16.14.0/node_modules/react-dom/cjs/react-dom.development.js)
gui error Unhandled Error with action='Top Level App': throwException@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:32520:13
handleError@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33592:21
performSyncWorkOnRoot@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33341:20
scheduleUpdateOnFiber@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:32770:28
updateContainer@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:35955:15
./node_modules/.pnpm/react-dom@16.14.0_react@16.14.0/node_modules/react-dom/cjs/react-dom.development.js/legacyRenderSubtreeIntoContainer/<@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36340:22
unbatchedUpdates@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33485:12
legacyRenderSubtreeIntoContainer@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36339:21
render@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36422:10
render@http://localhost:8601/js/addon-settings~community~editor~embed~fullscreen~player.js:6654:54
./src/playground/editor.jsx@http://localhost:8601/js/editor.js:262:60
__webpack_require__@http://localhost:8601/js/editor.js:86:30
5@http://localhost:8601/js/editor.js:274:18
__webpack_require__@http://localhost:8601/js/editor.js:86:30
checkDeferredModules@http://localhost:8601/js/editor.js:47:23
GUI<@http://localhost:8601/js/editor.js:223:18
@http://localhost:8601/js/editor.js:226:10

Component stack: 
    in Unknown (created by GUIComponent)
    in MediaQuery (created by GUIComponent)
    in GUIComponent (created by Connect(GUIComponent))
    in Connect(GUIComponent) (created by InjectIntl(Connect(GUIComponent)))
    in InjectIntl(Connect(GUIComponent)) (created by GUI)
    in GUI (created by Connect(GUI))
    in Connect(GUI) (created by InjectIntl(Connect(GUI)))
    in InjectIntl(Connect(GUI)) (created by CloudManager)
    in CloudManager (created by Connect(CloudManager))
    in Connect(CloudManager) (created by SBFileUploaderComponent)
    in SBFileUploaderComponent (created by Connect(SBFileUploaderComponent))
    in Connect(SBFileUploaderComponent) (created by InjectIntl(Connect(SBFileUploaderComponent)))
    in InjectIntl(Connect(SBFileUploaderComponent)) (created by VMManager)
    in VMManager (created by Connect(VMManager))
    in Connect(VMManager) (created by VMListener)
    in VMListener (created by Connect(VMListener))
    in Connect(VMListener) (created by ProjectSaverComponent)
    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))
    in Connect(ProjectSaverComponent) (created by TitledComponent)
    in TitledComponent (created by Connect(TitledComponent))
    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))
    in InjectIntl(Connect(TitledComponent)) (created by SB3PostMessageComponent)
    in SB3PostMessageComponent (created by Connect(SB3PostMessageComponent))
    in Connect(SB3PostMessageComponent) (created by ProjectFetcherComponent)
    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))
    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))
    in InjectIntl(Connect(ProjectFetcherComponent)) (created by FontLoaderComponent)
    in FontLoaderComponent (created by Connect(FontLoaderComponent))
    in Connect(FontLoaderComponent) (created by FullScreenResizer)
    in FullScreenResizer (created by Connect(FullScreenResizer))
    in Connect(FullScreenResizer) (created by TWThemeManagerComponent)
    in TWThemeManagerComponent (created by Connect(TWThemeManagerComponent))
    in Connect(TWThemeManagerComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by RenderGUI)
    in RenderGUI (created by Interface)
    in div (created by Interface)
    in div (created by Interface)
    in Interface (created by Connect(Interface))
    in Connect(Interface) (created by InjectIntl(Connect(Interface)))
    in InjectIntl(Connect(Interface)) (created by PackagerIntegrationComponent)
    in PackagerIntegrationComponent (created by InjectIntl(PackagerIntegrationComponent))
    in InjectIntl(PackagerIntegrationComponent) (created by Connect(InjectIntl(PackagerIntegrationComponent)))
    in Connect(InjectIntl(PackagerIntegrationComponent)) (created by StateManagerComponent)
    in StateManagerComponent (created by Connect(StateManagerComponent))
    in Connect(StateManagerComponent) (created by InjectIntl(Connect(StateManagerComponent)))
    in InjectIntl(Connect(StateManagerComponent)) (created by ProjectMetaFetcherComponent)
    in ProjectMetaFetcherComponent (created by Connect(ProjectMetaFetcherComponent))
    in Connect(ProjectMetaFetcherComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by AppStateWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by AppStateWrapper)
    in Provider (created by AppStateWrapper)
    in AppStateWrapper [error-boundary.jsx:51:1](webpack://GUI/src/containers/error-boundary.jsx)
The above error occurred in one of your React components:
    in Unknown (created by GUIComponent)
    in MediaQuery (created by GUIComponent)
    in GUIComponent (created by Connect(GUIComponent))
    in Connect(GUIComponent) (created by InjectIntl(Connect(GUIComponent)))
    in InjectIntl(Connect(GUIComponent)) (created by GUI)
    in GUI (created by Connect(GUI))
    in Connect(GUI) (created by InjectIntl(Connect(GUI)))
    in InjectIntl(Connect(GUI)) (created by CloudManager)
    in CloudManager (created by Connect(CloudManager))
    in Connect(CloudManager) (created by SBFileUploaderComponent)
    in SBFileUploaderComponent (created by Connect(SBFileUploaderComponent))
    in Connect(SBFileUploaderComponent) (created by InjectIntl(Connect(SBFileUploaderComponent)))
    in InjectIntl(Connect(SBFileUploaderComponent)) (created by VMManager)
    in VMManager (created by Connect(VMManager))
    in Connect(VMManager) (created by VMListener)
    in VMListener (created by Connect(VMListener))
    in Connect(VMListener) (created by ProjectSaverComponent)
    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))
    in Connect(ProjectSaverComponent) (created by TitledComponent)
    in TitledComponent (created by Connect(TitledComponent))
    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))
    in InjectIntl(Connect(TitledComponent)) (created by SB3PostMessageComponent)
    in SB3PostMessageComponent (created by Connect(SB3PostMessageComponent))
    in Connect(SB3PostMessageComponent) (created by ProjectFetcherComponent)
    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))
    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))
    in InjectIntl(Connect(ProjectFetcherComponent)) (created by FontLoaderComponent)
    in FontLoaderComponent (created by Connect(FontLoaderComponent))
    in Connect(FontLoaderComponent) (created by FullScreenResizer)
    in FullScreenResizer (created by Connect(FullScreenResizer))
    in Connect(FullScreenResizer) (created by TWThemeManagerComponent)
    in TWThemeManagerComponent (created by Connect(TWThemeManagerComponent))
    in Connect(TWThemeManagerComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by RenderGUI)
    in RenderGUI (created by Interface)
    in div (created by Interface)
    in div (created by Interface)
    in Interface (created by Connect(Interface))
    in Connect(Interface) (created by InjectIntl(Connect(Interface)))
    in InjectIntl(Connect(Interface)) (created by PackagerIntegrationComponent)
    in PackagerIntegrationComponent (created by InjectIntl(PackagerIntegrationComponent))
    in InjectIntl(PackagerIntegrationComponent) (created by Connect(InjectIntl(PackagerIntegrationComponent)))
    in Connect(InjectIntl(PackagerIntegrationComponent)) (created by StateManagerComponent)
    in StateManagerComponent (created by Connect(StateManagerComponent))
    in Connect(StateManagerComponent) (created by InjectIntl(Connect(StateManagerComponent)))
    in InjectIntl(Connect(StateManagerComponent)) (created by ProjectMetaFetcherComponent)
    in ProjectMetaFetcherComponent (created by Connect(ProjectMetaFetcherComponent))
    in Connect(ProjectMetaFetcherComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by AppStateWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by AppStateWrapper)
    in Provider (created by AppStateWrapper)
    in AppStateWrapper

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary. [react-dom.development.js:19527:1](webpack://GUI/node_modules/.pnpm/react-dom@16.14.0_react@16.14.0/node_modules/react-dom/cjs/react-dom.development.js)
gui error Unhandled Error with action='Top Level App': throwException@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:32520:13
handleError@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33592:21
performSyncWorkOnRoot@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33341:20
scheduleUpdateOnFiber@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:32770:28
updateContainer@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:35955:15
./node_modules/.pnpm/react-dom@16.14.0_react@16.14.0/node_modules/react-dom/cjs/react-dom.development.js/legacyRenderSubtreeIntoContainer/<@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36340:22
unbatchedUpdates@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:33485:12
legacyRenderSubtreeIntoContainer@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36339:21
render@http://localhost:8601/js/vendors~addon-settings~community~editor~embed~fullscreen~player.js:36422:10
render@http://localhost:8601/js/addon-settings~community~editor~embed~fullscreen~player.js:6654:54
./src/playground/editor.jsx@http://localhost:8601/js/editor.js:262:60
__webpack_require__@http://localhost:8601/js/editor.js:86:30
5@http://localhost:8601/js/editor.js:274:18
__webpack_require__@http://localhost:8601/js/editor.js:86:30
checkDeferredModules@http://localhost:8601/js/editor.js:47:23
GUI<@http://localhost:8601/js/editor.js:223:18
@http://localhost:8601/js/editor.js:226:10

Component stack: 
    in Unknown (created by GUIComponent)
    in MediaQuery (created by GUIComponent)
    in GUIComponent (created by Connect(GUIComponent))
    in Connect(GUIComponent) (created by InjectIntl(Connect(GUIComponent)))
    in InjectIntl(Connect(GUIComponent)) (created by GUI)
    in GUI (created by Connect(GUI))
    in Connect(GUI) (created by InjectIntl(Connect(GUI)))
    in InjectIntl(Connect(GUI)) (created by CloudManager)
    in CloudManager (created by Connect(CloudManager))
    in Connect(CloudManager) (created by SBFileUploaderComponent)
    in SBFileUploaderComponent (created by Connect(SBFileUploaderComponent))
    in Connect(SBFileUploaderComponent) (created by InjectIntl(Connect(SBFileUploaderComponent)))
    in InjectIntl(Connect(SBFileUploaderComponent)) (created by VMManager)
    in VMManager (created by Connect(VMManager))
    in Connect(VMManager) (created by VMListener)
    in VMListener (created by Connect(VMListener))
    in Connect(VMListener) (created by ProjectSaverComponent)
    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))
    in Connect(ProjectSaverComponent) (created by TitledComponent)
    in TitledComponent (created by Connect(TitledComponent))
    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))
    in InjectIntl(Connect(TitledComponent)) (created by SB3PostMessageComponent)
    in SB3PostMessageComponent (created by Connect(SB3PostMessageComponent))
    in Connect(SB3PostMessageComponent) (created by ProjectFetcherComponent)
    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))
    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))
    in InjectIntl(Connect(ProjectFetcherComponent)) (created by FontLoaderComponent)
    in FontLoaderComponent (created by Connect(FontLoaderComponent))
    in Connect(FontLoaderComponent) (created by FullScreenResizer)
    in FullScreenResizer (created by Connect(FullScreenResizer))
    in Connect(FullScreenResizer) (created by TWThemeManagerComponent)
    in TWThemeManagerComponent (created by Connect(TWThemeManagerComponent))
    in Connect(TWThemeManagerComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by RenderGUI)
    in RenderGUI (created by Interface)
    in div (created by Interface)
    in div (created by Interface)
    in Interface (created by Connect(Interface))
    in Connect(Interface) (created by InjectIntl(Connect(Interface)))
    in InjectIntl(Connect(Interface)) (created by PackagerIntegrationComponent)
    in PackagerIntegrationComponent (created by InjectIntl(PackagerIntegrationComponent))
    in InjectIntl(PackagerIntegrationComponent) (created by Connect(InjectIntl(PackagerIntegrationComponent)))
    in Connect(InjectIntl(PackagerIntegrationComponent)) (created by StateManagerComponent)
    in StateManagerComponent (created by Connect(StateManagerComponent))
    in Connect(StateManagerComponent) (created by InjectIntl(Connect(StateManagerComponent)))
    in InjectIntl(Connect(StateManagerComponent)) (created by ProjectMetaFetcherComponent)
    in ProjectMetaFetcherComponent (created by Connect(ProjectMetaFetcherComponent))
    in Connect(ProjectMetaFetcherComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlBridgeInner (created by InjectIntl(IntlBridgeInner))
    in InjectIntl(IntlBridgeInner) (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by AppStateWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by AppStateWrapper)
    in Provider (created by AppStateWrapper)
    in AppStateWrapper

…d), category-color titlebars, typed ports; fix palette filtering
@PYC5635

PYC5635 commented Nov 22, 2026

Copy link
Copy Markdown
Author

UI 重做 + 节点面板修复(15445ff)

样式失效根因:CSS 是 CSS Modules(类名编译期哈希),而画布/面板 JSX 里写的是裸类名字符串——整张样式表从未匹配上,节点全部退化成纯文字堆叠。

UE 蓝图风格重做:

  • 节点:圆角实体 + 分类色渐变标题栏(事件蓝/流程绿/变量紫/运算橙/函数靛/Scratch 黄/DOM 砖红/网络青/积木紫红/插件青)+ 阴影与内高光
  • 端口:exec = ▶ 三角(clip-path)、data = 圆点按类型着色(number 绿 / string 品红 / bool 红 / any 青),hover 放大变白
  • 连线:exec 直角折线(UE 风格)、data 贝塞尔曲线,按端口类型着色 + 投影
  • 画布:双层网格(细+粗)暗色底
  • 全部按钮/输入/面板统一精修(渐变、边框、hover、active 位移)

「节点放不出来」修复:

  • 「积木参数值」节点此前被永久过滤(onlyInBlockBody 判断的 prop 从未传入)——现在进入积木/函数子图后会正常出现在面板
  • 扩展积木分类在插件模式正确隐藏、插件 API 分类在扩展模式正确隐藏(原有逻辑保留)
  • 修复「随机数」节点编译引用未定义变量的问题(现支持 min/max 端口+参数)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants