feat: 模组全维度独立,消除全局 DOM/Portal/存储污染

- jieya-ibp/welltrust-qap ThemeContext 改为作用域容器承载 CSS 变量与背景色,不再写 document
- 删除 order-cost CostCockpit 对 documentElement 的死变量写入
- bomx Drawer createPortal 挂载点内移到 .bomx-app,移除 document.body 兜底
- knowledge-graph 拖拽 cursor 改为根容器 ref
- 新增 check-module-independence 门禁并接入 build
- SOP 与融合技能文档补充「模组完全独立互不影响」章节

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com>
This commit is contained in:
dongsk
2026-10-19 09:10:30 +08:00
co-authored by Claude Sonnet 4.6 noreply@anthropic.com>
parent 9c45aedbe8
commit 8699798ea5
14 changed files with 683 additions and 74 deletions
@@ -1,4 +1,4 @@
import { useEffect, useState, useCallback } from 'react';
import { useEffect, useState, useCallback, useRef } from 'react';
import { useNavigate } from 'react-router-dom';
import { initStore } from '../core/store';
import BomBrowser from '../components/BomBrowser';
@@ -47,6 +47,9 @@ export default function BomxReuseHome() {
const [loadError, setLoadError] = useState<any>(null);
const [fadingOut, setFadingOut] = useState(false);
// Drawer Portal 挂载点:位于 .bomx-app 根容器内部,使 Drawer DOM 节点留在模块作用域内
const portalMountRef = useRef<HTMLDivElement>(null);
const loadData = useCallback(async (sourceKey: string) => {
setLoading(true);
setFadingOut(false);
@@ -164,6 +167,9 @@ export default function BomxReuseHome() {
</div>
<ToastContainer />
{/* Drawer Portal 挂载点:Drawer 通过 createPortal 将内容渲染到此节点内 */}
<div ref={portalMountRef} />
{data && (
<div className="data-source-switch">
<select