278 lines
29 KiB
CSS
278 lines
29 KiB
CSS
/* 画布与节点的局部样式:React Flow 全局类通过 :global 组合,状态类由组件/手势控制器切换;CSS 只控制呈现和命中,不负责数据归属、提交或锁。 */
|
|
/* 画布铺满定位父容器;随后覆盖 React Flow 背景、选中边框和 attribution 外观。 */
|
|
.editor { position: absolute; inset: 0; width: 100%; height: 100%; background: #fffefb; }
|
|
.editor :global(.react-flow) { --xy-background-color-default: #fffefb; --xy-node-border-selected-default: 1px solid #a47764; }
|
|
.editor :global(.react-flow__attribution) { bottom: 5px; right: 5px; font-size: 9px; background: #fffefbc9; }
|
|
/* 手形模式在 pane/节点上给 grab 光标,拖动 pane 时改为 grabbing。 */
|
|
.handMode :global(.react-flow__pane), .handMode :global(.react-flow__node) { cursor: grab; }
|
|
.handMode :global(.react-flow__pane.dragging) { cursor: grabbing; }
|
|
/* 卡片基础边框/圆角/阴影,selectedNode 单独标记选择;标题绝对放在节点上方。 */
|
|
.node { position: relative; padding: 0; border: 1px solid #ded7ce; border-radius: 10px; background: white; color: #37352f; box-shadow: 0 2px 5px #40302405; }
|
|
.selectedNode { border-color: #a47764; box-shadow: 0 0 0 2px #a4776425; }
|
|
.nodeHeading { position: absolute; left: 0; top: -26px; display: flex; align-items: center; gap: 6px; height: 20px; max-width: 100%; font-size: 11px; color: #92877c; white-space: nowrap; cursor: grab; }
|
|
/* 文本填满 flex 容器,允许尺寸缩到零且关闭原生 resize;焦点时覆盖全局输入阴影,避免额外边框。 */
|
|
.cardText, .plainText { box-sizing: border-box; display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; flex: 1; padding: 14px; resize: none; border: 0; border-radius: inherit; background: transparent; outline: none; box-shadow: none; }
|
|
.cardText:focus, .plainText:focus { outline: none; box-shadow: none; border-color: transparent !important; }
|
|
.cardText::placeholder, .plainText::placeholder { color: #b2a99e; }
|
|
/* 卡片图片保持原比例装入可用空间,不以图片固有尺寸撑开节点。 */
|
|
.image { display: block; flex: 1; min-height: 0; width: 100%; height: 100%; max-width: 100%; border-radius: inherit; object-fit: contain; }
|
|
/* 工具栏按 aria-pressed 高亮当前模式;disabled 光标不表示实际业务锁逻辑。 */
|
|
.toolbar button[aria-pressed="true"] { background: #f1e6df; color: #78523f; }
|
|
.toolbar button:disabled { cursor: not-allowed; }
|
|
/* 右上工具条纵排;缩放值固定 48px 并使用等宽数字,避免百分比变化挤动旁边按钮。 */
|
|
.topRight { position: absolute; top: 12px; right: 12px; z-index: 10; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
|
|
.toolbar .zoomValue { box-sizing: border-box; flex: 0 0 48px; width: 48px; height: var(--toolbar-control-height, 32px); padding: 0; border-radius: 5px; font: inherit; font-variant-numeric: tabular-nums; }
|
|
.toolbar .zoomValue:hover { background: #e9e7e3; }
|
|
/* 底部主工具栏相对画布居中;帮助、错误等浮层各自定位和设层级。 */
|
|
.bottomToolbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 10; }
|
|
/* 帮助面板固定在视口右下方,有宽高上限和内部滚动,长内容不溢出视口。 */
|
|
.helpPopup { position: fixed; inset: auto 12px 62px auto; margin: 0; width: 330px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 110px); overflow-y: auto; padding: 18px; border: 1px solid #e2dcd3; border-radius: 12px; background: white; color: #6d6054; box-shadow: 0 8px 30px #32251a14; font-size: 12px; line-height: 1.7; }
|
|
.helpPopup strong { color: #49372e; font-size: 13px; }
|
|
.helpPopup p { margin-top: 9px; }
|
|
/* 画布错误在上方居中显示,宽度随视口收缩,不参与节点几何计算。 */
|
|
.error { position: absolute; top: 78px; left: 50%; transform: translateX(-50%); max-width: min(500px, calc(100vw - 32px)); padding: 10px 14px; border: 1px solid #e5c7b8; border-radius: 8px; color: #a25439; background: #fff9f3; font-size: 12px; z-index: 15; }
|
|
.helpToolbar { position: absolute; right: 12px; bottom: 12px; z-index: 10; }
|
|
/* 迁移控制面板处于较高层级;按钮状态、是否允许迁移由组件判断。 */
|
|
.migrationPanel { position: absolute; right: 12px; top: 64px; z-index: 220; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 360px; padding: 8px; border: 1px solid #ded7ce; border-radius: 7px; background: #fffefb; color: #78523f; font-size: 12px; }
|
|
.migrationPanel button { border: 1px solid #ded7ce; border-radius: 5px; padding: 6px 9px; background: white; cursor: pointer; }
|
|
.migrationPanel button:disabled { cursor: default; opacity: .5; }
|
|
/* 旧/迁移画布表面铺满宿主,具体渲染内容由桥接组件决定。 */
|
|
.migrationSurface { position: absolute; inset: 0; }
|
|
/* 窄屏把右上工具条下移避让标题,底部工具条改左对齐并横向滚动,预留右侧帮助空间。 */
|
|
@media (max-width: 700px) {
|
|
.topRight { top: 62px; right: 12px; }
|
|
.bottomToolbar { left: 12px; bottom: 12px; transform: none; max-width: calc(100vw - 92px); overflow-x: auto; overscroll-behavior-x: contain; }
|
|
}
|
|
|
|
/* 手形模式让文本/图片不拦截指针;右上工具条自身横向滚动以容纳窄视口。 */
|
|
.handMode .node textarea, .handMode .node img { pointer-events: none; }
|
|
|
|
.topRight .toolbar { max-width: calc(100vw - 24px); overflow-x: auto; }
|
|
|
|
/* 隐藏旧 handle 且禁用命中,新的中心点交互在后续规则控制。 */
|
|
.node :global(.react-flow__handle).legacyHandle { opacity: 0; pointer-events: none; }
|
|
|
|
/* 变换容器以中心为 transform-origin,保留溢出给标题、handle 和提示;边框/阴影变化有短过渡。 */
|
|
.transformFrame { position: relative; box-sizing: border-box; display: flex; flex-direction: column; transform-origin: center; overflow: visible; transition: border-color 160ms ease, box-shadow 160ms ease; }
|
|
/* 纯内容 frame 默认透明边框,选中才显示;plainText 后置 padding 覆盖卡片文本的 14px。 */
|
|
.plainFrame { padding: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; box-shadow: none; }
|
|
.plainFrame.selectedFrame { border-color: #a47764; }
|
|
.plainText { padding: 4px; }
|
|
/* 中心连接点默认透明且不响应指针;选中只改变可见性,connectionindicator 才开放命中。 */
|
|
.node :global(.react-flow__handle).centerHandle { width: 10px; height: 10px; display: grid; place-items: center; background: #a47764; color: #78523f; border: 0; border-radius: 50%; z-index: 7; cursor: crosshair; touch-action: none; opacity: 0; pointer-events: none; transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease; }
|
|
.selectedNode :global(.react-flow__handle).centerHandle { opacity: 1; }
|
|
.node :global(.react-flow__handle).centerHandle:global(.connectionindicator) { pointer-events: auto; }
|
|
.node :global(.react-flow__handle).centerHandle:hover { border-color: #a47764; background: #f1e6df; }
|
|
/* 右下缩放按钮单独命中、禁止触摸默认行为;旋转模式隐藏它,避免两种手势同时起动。 */
|
|
.cornerResize { position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 3px; color: #92877c; background: transparent; z-index: 8; cursor: nwse-resize; touch-action: none; opacity: 1; scale: 1; pointer-events: auto; transition: opacity 160ms ease, scale 160ms ease; }
|
|
.selectedFrame .cornerResize { opacity: 1; scale: 1; pointer-events: auto; }
|
|
.rotatingFrame .cornerResize { opacity: 0; pointer-events: none; }
|
|
/* 旋转时由 frame 接收手势,文本和中心连接点让出指针。 */
|
|
.rotatingFrame { cursor: grabbing; touch-action: none; }
|
|
.rotatingFrame textarea, .node.rotatingFrame :global(.react-flow__handle).centerHandle { pointer-events: none; }
|
|
/* 角度提示放在 frame 下方,禁止命中以免遮住正在进行的手势。 */
|
|
.rotationHint { position: absolute; left: 50%; bottom: -30px; translate: -50% 0; display: flex; align-items: center; gap: 4px; white-space: nowrap; padding: 4px 7px; border-radius: 5px; background: #fffefbe8; color: #78523f; font-size: 10px; pointer-events: none; }
|
|
/* 节点样式工具栏采用横排可滚动表面,按钮尺寸固定;数值/选择器共用高度。 */
|
|
.styleToolbar { display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid #ded7ce; border-radius: 8px; background: #fffefb; color: #49372e; box-shadow: 0 5px 20px #32251a12; max-width: calc(100vw - 24px); overflow-x: auto; }
|
|
.styleToolbar button { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border-radius: 4px; }
|
|
.styleToolbar button:hover, .styleToolbar button[aria-pressed="true"] { background: #f1e6df; color: #78523f; }
|
|
.styleToolbar select, .styleToolbar input[type="number"] { height: 28px; border: 0; border-radius: 3px; background: transparent; padding: 0 3px; font-size: 12px; }
|
|
.styleToolbar input[type="number"] { width: 48px; }
|
|
/* 可见圆点只显示颜色,透明原生 color input 覆盖整个点击区域。 */
|
|
.colorPicker { position: relative; display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; cursor: pointer; }
|
|
.colorPicker span { width: 17px; height: 17px; border: 1px solid #bfb4aa; border-radius: 50%; }
|
|
.colorPicker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
|
|
/* z-index 只在相关层叠上下文中排序;Portal、transform/zoom 或原生 top layer 可改变跨容器的叠放关系。 */
|
|
/* 分支菜单固定定位并高于普通工具条,菜单项整行点击;定位坐标由组件计算。 */
|
|
.branchMenu { position: fixed; z-index: 60; width: 210px; padding: 7px; border: 1px solid #ded7ce; border-radius: 10px; background: #fffefb; color: #49372e; box-shadow: 0 8px 30px #32251a1a; }
|
|
.branchMenu header { display: flex; align-items: center; justify-content: space-between; padding: 3px 6px 6px; color: #92877c; font-size: 11px; }
|
|
.branchMenu header button { display: grid; place-items: center; width: 24px; height: 24px; }
|
|
.branchMenu > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px; border-radius: 5px; font-size: 13px; text-align: left; }
|
|
.branchMenu button:hover { background: #f1e6df; }
|
|
/* 节点图标填满内容区域,SVG 自身不截获指针,事件交给外层节点。 */
|
|
.iconContent { width: 100%; height: 100%; padding: 6px; border-radius: inherit; }
|
|
.iconContent svg { pointer-events: none; }
|
|
/* 图标选择器固定在左侧,可用高度限定并采用纵向 flex,头/搜索/分类与列表分区。 */
|
|
.iconPicker { position: fixed; top: 70px; left: 12px; bottom: 70px; z-index: 60; display: flex; flex-direction: column; width: 272px; max-width: calc(100vw - 24px); max-height: 550px; padding: 14px; border: 1px solid #ded7ce; border-radius: 12px; background: #fffefb; color: #49372e; box-shadow: 0 8px 30px #32251a14; }
|
|
.iconPicker header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
|
|
.iconPicker header button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; }
|
|
.iconPicker input { width: 100%; padding: 7px 9px; border: 1px solid #ded7ce; border-radius: 6px; font-size: 12px; margin-bottom: 12px; }
|
|
/* 普通图标网格五列并内部滚动;后续 virtualIconGrid 是虚拟列表视口,窗口项目由 JS 定位。 */
|
|
.iconGrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; overflow-y: auto; }
|
|
.iconGrid button { display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; color: #6d6054; }
|
|
.iconGrid button:hover, .iconPicker header button:hover { background: #f1e6df; }
|
|
.iconPicker footer { padding-top: 12px; color: #92877c; font-size: 10px; }
|
|
/* 来源选择器限制宽度,分类按钮可换行并按 aria-pressed 显示当前筛选。 */
|
|
.iconSource { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 11px; }
|
|
.iconSource select { min-width: 0; max-width: 175px; padding: 4px; border: 1px solid #ded7ce; border-radius: 5px; background: transparent; }
|
|
.iconCategories { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
|
|
.iconCategories button { padding: 3px 6px; border-radius: 4px; color: #92877c; font-size: 10px; }
|
|
.iconCategories button[aria-pressed="true"] { background: #f1e6df; color: #78523f; }
|
|
/* flex:1 让列表吃剩余高度,overscroll contain 减少滚动传到外层;CSS 不负责裁剪数据窗口。 */
|
|
.virtualIconGrid { flex: 1; min-height: 96px; overflow-y: auto; overscroll-behavior: contain; }
|
|
.virtualIconGrid button { display: grid; place-items: center; border: 3px solid transparent; border-radius: 8px; background-clip: padding-box; color: #6d6054; }
|
|
.virtualIconGrid button:hover { background-color: #f1e6df; }
|
|
.virtualIconGrid button:focus-visible, .iconCategories button:focus-visible { outline: 2px solid #a47764; outline-offset: -2px; }
|
|
/* 图标资源加载提示与选择器使用相近层级/起点。 */
|
|
.iconLoading { position: absolute; left: 12px; top: 70px; z-index: 60; padding: 14px; border-radius: 10px; background: #fffefb; font-size: 12px; }
|
|
/* 归属徽标放在节点下方,限制长名称且不参与命中;旋转时隐藏以减少遮挡。 */
|
|
.membershipBadge { position: absolute; bottom: -25px; left: 0; display: flex; align-items: center; gap: 4px; max-width: 280px; padding: 3px 6px; border-radius: 4px; background: #e9f1e9; color: #3e684b; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
|
|
.rotatingFrame .membershipBadge { display: none; }
|
|
.frameMemberCount { font-size: 10px; color: #92877c; white-space: nowrap; }
|
|
/* 名称模式按钮宽度随文字,菜单固定定位且限制在视口内,勾选列保持对齐。 */
|
|
.styleToolbar .frameModeTrigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: auto; min-width: 96px; flex: 0 0 auto; padding: 0 7px; font-size: 12px; }
|
|
.frameModeMenu { position: fixed; z-index: 120; width: 220px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 5px; border: 1px solid #ded7ce; border-radius: 9px; background: #fffefb; color: #49372e; box-shadow: 0 8px 28px #32251a1f; }
|
|
.frameModeMenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 7px; border-radius: 5px; text-align: left; }
|
|
.frameModeMenu button:hover, .frameModeMenu button:focus { outline: none; background: #f1e6df; }
|
|
.frameModeMenu button[aria-checked="true"] { color: #78523f; }
|
|
.frameModeCheck { display: grid; place-items: center; width: 15px; flex: 0 0 15px; }
|
|
.frameModeMenu strong { display: block; font-size: 12px; font-weight: 500; }
|
|
.frameModeMenu small { display: block; margin-top: 2px; color: #92877c; font-size: 10px; }
|
|
/* 加入目标用绿色边框/光晕,移出预览改虚线;提示元素本身不拦截拖放。 */
|
|
.frameNode.frameDropTarget { border-color: #538366; background: #5383660c; box-shadow: 0 0 0 3px #53836638; }
|
|
.frameNode.frameDropExit { border-style: dashed; }
|
|
.frameDropHint { position: absolute; top: 12px; left: 12px; transform-origin: top left; border: 1px solid #9db8a4; border-radius: 6px; padding: 6px 9px; background: #f3f8f3; color: #3e684b; font-size: 12px; white-space: nowrap; pointer-events: none; }
|
|
/* 归属变更通知居中放在底部工具栏上方;空内容隐藏,非空也不接管指针。 */
|
|
.membershipNotice { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: min(540px, calc(100vw - 32px)); padding: 8px 12px; border: 1px solid #c8d9ca; border-radius: 8px; background: #f3f8f3; color: #3e684b; font-size: 12px; pointer-events: none; }
|
|
.membershipNotice:empty { display: none; }
|
|
/* 以下后代选择器依赖实际 DOM 祖先;移到 body Portal 的浮层不会仅因 React 上下文关系命中 .handMode。 */
|
|
/* 手形模式统一关闭文本、缩放、中心点和样式工具条的编辑入口。 */
|
|
.handMode .plainText { pointer-events: none; }
|
|
.handMode .rotationHint, .handMode .centerHandle { visibility: hidden; }
|
|
.handMode .cornerResize { pointer-events: none; opacity: 0.6; }
|
|
.handMode .styleToolbar { display: none; }
|
|
/* 第一组减少动态效果规则关闭 frame、角缩放和中心点的过渡;后面还有分段滑块/连线动画的关闭规则。 */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.transformFrame, .cornerResize, .node :global(.react-flow__handle).centerHandle { transition: none; }
|
|
}
|
|
|
|
|
|
/* 分区主体 pointer-events:none,让内部节点/画布继续接收事件;标签和四边命中条另行启用 pointer-events。 */
|
|
.frameNode { border: 1px solid #c9b7a5; border-radius: 8px; background: transparent; pointer-events: none; }
|
|
.frameNode.selectedFrame { border-color: #a47764; box-shadow: 0 0 0 2px #a477641a; }
|
|
/* 名称放在分区顶部外侧并以左下角缩放;文字截断但标签自身可拖动。 */
|
|
.frameLabel { position: absolute; bottom: calc(100% + 8px); left: 0; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 22px; color: #92806d; transform-origin: left bottom; pointer-events: auto; cursor: grab; }
|
|
/* 这里的10px属于局部 CSS 坐标,外层画布/viewScale 缩放后不保证仍为屏幕10px。 */
|
|
/* 四条 10px 命中带跨在视觉边框两侧,扩大拖动区域,不给整个分区内部铺点击层。 */
|
|
.frameBorderHit { position: absolute; pointer-events: auto; cursor: grab; }
|
|
.frameBorder_top { top: -5px; left: 0; right: 0; height: 10px; }
|
|
.frameBorder_bottom { bottom: -5px; left: 0; right: 0; height: 10px; }
|
|
.frameBorder_left { left: -5px; top: 0; bottom: 0; width: 10px; }
|
|
.frameBorder_right { right: -5px; top: 0; bottom: 0; width: 10px; }
|
|
/* 分区改名输入沿用工具栏高度;手形模式下标签和命中边框也不接管事件。 */
|
|
.styleToolbar .frameNameInput { width: 150px; height: 28px; padding: 0 6px; border: 1px solid #ded7ce; border-radius: 4px; font-size: 12px; background: transparent; }
|
|
.handMode .frameBorderHit, .handMode .frameLabel { pointer-events: none; }
|
|
/* 同步错误提示在顶部居中并允许按钮换行,说明文字独占一行。 */
|
|
.syncError { position: absolute; left: 50%; top: 70px; translate: -50% 0; z-index: 22; display: flex; flex-wrap: wrap; gap: 8px; max-width: min(580px, calc(100vw - 24px)); padding: 12px; border: 1px solid #e5c7b8; border-radius: 8px; background: #fff9f3; color: #a25439; font-size: 12px; }
|
|
.syncError span { flex-basis: 100%; }
|
|
|
|
/* 恢复对话框限制视口宽度并居中,backdrop 给遮罩色;模态焦点行为来自 dialog 而不是 CSS。 */
|
|
.recoveryDialog { max-width: min(460px, calc(100vw - 32px)); padding: 24px; margin: auto; border: 1px solid #ded7ce; border-radius: 12px; background: #fffefb; color: #49372e; box-shadow: 0 12px 50px #32251a20; }
|
|
.recoveryDialog::backdrop { background: #30251e33; }
|
|
.recoveryDialog h2 { font-size: 16px; margin-bottom: 12px; }
|
|
.recoveryDialog p { font-size: 13px; line-height: 1.8; color: #85766b; }
|
|
.recoveryDialog > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
|
|
.recoveryDialog button { padding: 8px 12px; border: 1px solid #cbb8a8; border-radius: 5px; }
|
|
|
|
/* 文本编辑容器允许 flex 收缩;readonly textarea 让出指针,由上层选择层处理选择/拖动。 */
|
|
.textEditor { position: relative; display: flex; flex: 1; min-width: 0; min-height: 0; width: 100%; height: 100%; border-radius: inherit; }
|
|
.textEditor textarea[readonly] { pointer-events: none; }
|
|
/* 透明选择层盖住内容区域,选中后给 grab 光标;手形模式取消该层命中。 */
|
|
.textSelectLayer { position: absolute; inset: 0; border-radius: inherit; cursor: default; }
|
|
.handMode .textSelectLayer { pointer-events: none; }
|
|
|
|
.selectedFrame .textSelectLayer { cursor: grab; }
|
|
.textSelectLayer:active { cursor: grabbing; }
|
|
/* 纯图片没有卡片 padding,图片仅显示不接受选择/拖动,外层控制变换。 */
|
|
.plainImageFrame { padding: 0; }
|
|
.plainImage { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; user-select: none; }
|
|
/* 标题省略与改名输入分开;输入固定目标宽度并继承字体。 */
|
|
.nodeTitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
.nodeTitleInput { width: 180px; min-width: 0; height: 22px; padding: 0 4px; border: 1px solid #cbb8a8; border-radius: 4px; background: #fffefb; font: inherit; color: #78523f; }
|
|
|
|
/* 三段图标选项用 isolation 建局部层叠,按钮在滑块上方,背景由滑块提供。 */
|
|
.frameLabelSegments { position: relative; display: flex; padding: 3px; border-radius: 6px; background: #f1eee8; isolation: isolate; }
|
|
.frameLabelSegments button { position: relative; z-index: 1; width: 28px; height: 28px; flex: 0 0 28px; background: transparent !important; color: #92877c; }
|
|
.frameLabelSegments button[aria-checked="true"] { color: #78523f; }
|
|
/* 滑块绝对定位并用 transform 做短过渡,实际位移由组件按选项设置。 */
|
|
.frameLabelSlider { position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 4px; background: #fffefb; box-shadow: 0 1px 4px #32251a16; transition: transform 160ms ease; }
|
|
/* 八向缩放 handle 按中心锚定,pointer-events:auto 覆盖外层让出命中的行为;手形模式再禁用。 */
|
|
.resizeHandle { position: absolute; width: 10px; height: 10px; transform: translate(-50%, -50%); border: 1px solid #a47764; border-radius: 2px; padding: 0; background: #fffefb; z-index: 12; touch-action: none; pointer-events: auto; }
|
|
.handMode .resizeHandle { pointer-events: none; }
|
|
/* 连线工具条可换行,数字、颜色、范围和选择器分别限宽,避免长表单撑出视口。 */
|
|
.edgeToolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 7px; max-width: min(680px, calc(100vw - 24px)); padding: 10px; border: 1px solid #ded7ce; border-radius: 9px; background: #fffefb; color: #49372e; box-shadow: 0 5px 20px #32251a14; }
|
|
.edgeToolbar label { display: flex; align-items: center; gap: 4px; font-size: 10px; }
|
|
.edgeToolbar input[type="number"] { width: 50px; }
|
|
.edgeToolbar input[type="color"] { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; }
|
|
.edgeToolbar input[type="range"] { width: 55px; }
|
|
.edgeToolbar select { max-width: 92px; height: 26px; padding: 0 4px; background: #f4f0eb; border-radius: 4px; font-size: 11px; }
|
|
.edgeToolbar button { padding: 6px; border-radius: 4px; }
|
|
.edgeToolbar button:hover { background: #f1e6df; }
|
|
.edgeToolbar button:disabled { opacity: .4; }
|
|
.edgeToolbar small { width: 100%; color: #92877c; font-size: 10px; }
|
|
/* 曲线控制点用 pointer-events:all 开放 SVG 命中,触摸默认行为关闭,拖动逻辑由事件处理器负责。 */
|
|
.curveControl { cursor: move; touch-action: none; pointer-events: all; }
|
|
/* 连线效果分别用 dashoffset 流动和 opacity 脉冲;是否附加动画类由执行状态/配置决定。 */
|
|
.edgeDashAnimation { animation: edgeDash 1.6s linear infinite; }
|
|
.edgePulseAnimation { animation: edgePulse 1.6s ease-in-out infinite; }
|
|
/* 虚线一个周期移动 40 单位;脉冲从低透明到不透明再返回。 */
|
|
@keyframes edgeDash { to { stroke-dashoffset: -40; } }
|
|
@keyframes edgePulse { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }
|
|
/* 第二组减少动态效果规则关闭滑块过渡和两种连线动画。 */
|
|
@media (prefers-reduced-motion: reduce) { .frameLabelSlider { transition: none; } .edgeDashAnimation, .edgePulseAnimation { animation: none; } }
|
|
/* 覆盖层能拦截其区域的指针,不自动使背后 DOM inert 或禁用全部键盘命令;准入仍须由事件/命令层处理。 */
|
|
/* 全画布 busy 覆盖层是独立呈现态;成员局部同步使用后部 memberSync,不应从这个类推断所有任务都会锁画布。 */
|
|
.canvasBusy { position: absolute; inset: 0; display: flex; align-items: start; justify-content: center; padding-top: 80px; z-index: 200; background: #fffefb35; cursor: progress; color: #78523f; font-size: 12px; }
|
|
/* 子图显示比例输入窄排布;折叠子图的摘要占内部 inset 区域并可点击。 */
|
|
.subgraphScale { display: flex; align-items: center; gap: 2px; font-size: 11px; }
|
|
.subgraphScale input { width: 45px; }
|
|
.collapsedSubgraph { position: absolute; inset: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #92877c; pointer-events: auto; font-size: 12px; }
|
|
.collapsedSubgraph small { font-size: 10px; }
|
|
/* 元素 AI 面板限制视口宽度;标题信息省略,提示词可纵向伸展,底部模型/传播/执行按钮横排。 */
|
|
.aiPanel { width: min(440px, calc(100vw - 28px)); border: 1px solid #ded7ce; border-radius: 13px; padding: 14px; background: #fffefb; box-shadow: 0 8px 30px #32251a16; color: #49372e; }
|
|
.aiPanel header { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 9px; }
|
|
.aiPanel header span { margin-left: auto; color: #92877c; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
|
|
.aiPanel textarea { width: 100%; height: 92px; resize: vertical; padding: 4px; border: 0; outline: none; background: transparent; font-size: 13px; }
|
|
.aiPanel footer { display: flex; align-items: center; gap: 8px; border-top: 1px solid #eee7de; padding-top: 9px; }
|
|
.aiPanel footer select { max-width: 200px; min-width: 0; flex: 1; height: 28px; background: transparent; font-size: 11px; }
|
|
.aiPanel footer label { display: flex; align-items: center; gap: 4px; font-size: 10px; white-space: nowrap; }
|
|
.aiPanel footer button { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 8px; background: #78523f; color: white; }
|
|
.aiPanel footer button:disabled { opacity: .35; }
|
|
/* 普通提示与 role=alert 错误采用不同颜色;冲突候选区域独立滚动并保留预格式文本换行。 */
|
|
.aiPanel p { margin: 7px 0 0; color: #92877c; font-size: 10px; }
|
|
.aiPanel p[role="alert"] { color: #a25439; }
|
|
.aiConflict { max-height: 180px; overflow: auto; padding: 8px; border-radius: 7px; background: #f4eee7; font-size: 11px; }
|
|
.aiConflict pre { white-space: pre-wrap; }
|
|
.aiConflict img { max-height: 100px; }
|
|
.aiConflict button { padding: 6px; color: #78523f; }
|
|
/* 对通用变换 frame 再声明中心 handle:默认不可见不可命中,选中显示、connectionindicator 开启命中。 */
|
|
.transformFrame :global(.react-flow__handle).centerHandle { width: 10px; height: 10px; border: 0; background: #a47764; opacity: 0; pointer-events: none; }
|
|
.selectedFrame :global(.react-flow__handle).centerHandle { opacity: 1; }
|
|
.transformFrame :global(.react-flow__handle).centerHandle:global(.connectionindicator) { pointer-events: auto; }
|
|
/* 端口先定义几何,再在下一条默认隐藏/禁用;选中只显示,是否可连仍由 connectionindicator 决定。 */
|
|
.framePort { width: 8px; height: 8px; border: 1px solid #fffefb; background: #a47764; pointer-events: auto; }
|
|
.framePort { opacity: 0; pointer-events: none; }
|
|
.selectedFrame .framePort { opacity: 1; }
|
|
.framePort:global(.connectionindicator) { pointer-events: auto; }
|
|
.rotatingFrame :global(.react-flow__handle).centerHandle { pointer-events: none; }
|
|
/* busy 状态中的恢复/重试按钮仍显示明确可点表面。 */
|
|
.canvasBusy button { margin: 8px 5px; padding: 6px 9px; border: 1px solid #ded7ce; border-radius: 5px; background: #fffefb; cursor: pointer; }
|
|
|
|
/* 图片上传状态浮在底部工具栏上方,宽度受容器限制,不作为节点持久数据。 */
|
|
.imageUploadStatus { position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 12px; max-width: min(600px,90%); padding: 10px 14px; background: #fffdf9; border: 1px solid #ded5cb; border-radius: 10px; color: #796e63; font-size: 12px; box-shadow: 0 4px 18px #372f2410; }
|
|
|
|
/* 成员同步只显示紧凑状态和下划线操作按钮,不使用全画布遮罩。 */
|
|
.memberSync { padding: 5px 9px; border: 1px solid #ded7ce; border-radius: 7px; background: #fffefb; color: #796e63; font-size: 11px; box-shadow: 0 2px 8px #372f2410; }
|
|
.memberSync button { margin-left: 6px; border: 0; background: transparent; color: #78523f; text-decoration: underline; cursor: pointer; }
|
|
|
|
/* 导入状态面板位于右上,有宽高上限和内部滚动;summary 切换详情,任务之间用边线分隔。 */
|
|
.importPanel { position: absolute; top: 84px; right: 12px; z-index: 12; width: max-content; max-width: min(310px, calc(100vw - 28px)); max-height: 45vh; overflow: auto; border: 1px solid #ded7ce; border-radius: 10px; padding: 6px 9px; background: #fffefb; box-shadow: 0 4px 18px #32251a10; color: #49372e; font-size: 11px; }
|
|
.importPanel summary { cursor: pointer; padding: 5px 0; }
|
|
.importPanel ul { padding-left: 16px; overflow-wrap: anywhere; }
|
|
.importPanel p { margin: 5px 0; }
|
|
.importPanel small { color: #92877c; }
|
|
.importJob { border-top: 1px solid #eee7de; padding-top: 5px; margin-top: 5px; }
|
|
/* 导入动作横排,其余任务按钮使用文字色与局部留白,任务状态由 runtime/组件决定。 */
|
|
.importActions { display: flex; align-items: center; gap: 8px; }
|
|
.importActions > button:not(:first-child), .importJob button { color: #78523f; padding: 4px 0; }
|