.diagram-shell { position: relative; height: 100%; } .diagram-canvas { width: 100%; height: 100%; } .diagram-toolbar { display: flex; gap: 8px; } /* * Кнопка справки в правом верхнем углу холста. Раньше это место занимал * переключатель режимов — он переехал в панель управления слева внизу, * к остальным кнопкам работы с холстом. */ .diagram-help { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } /* * Выпадающая справка под кнопкой «?». Не модалка и не портал в body: * приложение работает внутри iframe, и оверлей во весь экран перекрыл бы * только сам iframe — панель должна оставаться в границах приложения. */ .help-panel { width: min(420px, 60vw); max-height: min(460px, 70vh); overflow: auto; box-sizing: border-box; padding: 4px 14px 14px; border-radius: 6px; background: canvas; border: 1px solid color-mix(in srgb, canvastext 15%, transparent); box-shadow: 0 8px 24px rgb(0 0 0 / 12%); cursor: default; } .help-panel__section-title { display: block; margin: 12px 0 6px; } .help-panel__list { margin: 0; display: flex; flex-direction: column; gap: 8px; } .help-panel__row { display: grid; grid-template-columns: minmax(90px, 130px) 1fr; gap: 2px 12px; align-items: start; } .help-panel__row dd { margin: 0; } /* * opacity/pointer-events, not display:none — hiding via display collapses the * handle to 0x0, and xyflow computes edge paths from the handle's actual * layout position, so every edge that references a handle id would snap to * a degenerate point the moment view mode hid it. */ .diagram-flow--view-mode .react-flow__handle { opacity: 0; pointer-events: none; } /* * React Flow's built-in disabled styling only dims children (for the * zoom/fit/lock icon buttons) — our undo/redo controls use plain text glyphs, * so they need their own dimming or they'd look clickable while inert. */ .react-flow__controls-button:disabled { opacity: 0.4; } .diagram-alignment-guide { position: absolute; background: #ff0072; pointer-events: none; z-index: 1000; } .diagram-node { position: relative; width: 100%; height: 100%; padding: 6px 10px; background: canvas; color: canvastext; font-size: 12px; text-align: center; box-sizing: border-box; display: flex; align-items: center; justify-content: center; } .diagram-node__label { white-space: pre-wrap; overflow-wrap: break-word; font-weight: 600; } .diagram-node__badge { position: absolute; top: -8px; right: -8px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #555; background: canvas; font-size: 11px; line-height: 14px; display: flex; align-items: center; justify-content: center; z-index: 1; } .diagram-node__caption { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; max-width: 120px; text-align: center; white-space: pre-wrap; font-weight: 600; } .diagram-node--circle { padding: 0; border-radius: 50%; } .diagram-node--gateway-outer { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } /* Diamond via clip-path on an unrotated box — see the comment in nodes.tsx for why. */ .diagram-node--diamond-bg { position: absolute; inset: 0; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); } .diagram-node__icon { position: relative; display: inline-block; color: white; font-size: 18px; font-weight: 700; line-height: 1; } .diagram-node__subtype-badge { position: absolute; top: 4px; left: 4px; display: inline-flex; line-height: 0; opacity: 0.9; } .diagram-node__event-icon { position: relative; display: inline-flex; line-height: 0; } .diagram-node--data-object-outer { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 6px 8px; box-sizing: border-box; } /* * Folded top-right corner — the classic BPMN Data Object glyph. `clip-path` * establishes its own stacking context, so a later, non-`z-index`d sibling * (the label) doesn't reliably paint on top by DOM order alone — z-index * makes the stacking explicit instead of relying on that. */ .diagram-node--data-object-bg { position: absolute; inset: 0; z-index: 0; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); } /* * Плавающая карточка поверх холста, а не колонка рядом с ним. Так холст не * меняет ширину при открытии панели: фигуры остаются на своих экранных * местах, и камеру подстраивать не нужно. * * Отступ сверху уводит карточку из-под кнопки справки в правом верхнем углу — * иначе оверлей перекрывал бы её и справку нельзя было бы открыть, пока * выбрана фигура. */ .diagram-aside { position: absolute; top: 52px; right: 8px; bottom: 8px; width: 340px; z-index: 5; box-sizing: border-box; background: canvas; border: 1px solid color-mix(in srgb, canvastext 15%, transparent); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 12%); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 16px; } .diagram-aside__hint { opacity: 0.7; font-size: 13px; } /* * Кнопка «скрыть панель» — только в режиме просмотра. Прижата вправо, к * внешнему краю: стрелка указывает наружу, в сторону, куда панель уезжает. */ .diagram-aside__close { display: flex; justify-content: flex-end; margin-bottom: -8px; } .diagram-aside__json summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; } .diagram-aside__json pre { font-size: 12px; white-space: pre-wrap; word-break: break-word; } .node-inspector { display: flex; flex-direction: column; gap: 10px; } .node-inspector__header { display: flex; align-items: center; justify-content: space-between; } .node-inspector__toolbar { display: flex; gap: 8px; } .node-inspector__field { display: flex; flex-direction: column; gap: 4px; } .node-inspector__presets { display: flex; flex-wrap: wrap; gap: 6px; } .node-inspector__preset { width: 22px; height: 22px; padding: 0; border: 1px solid color-mix(in srgb, canvastext 25%, transparent); border-radius: 50%; cursor: pointer; } .node-inspector__preset--active { outline: 2px solid canvastext; outline-offset: 2px; } .node-inspector__subtype { width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, canvastext 25%, transparent); border-radius: 4px; background: canvas; color: canvastext; cursor: pointer; } .node-inspector__subtype--active { border-color: canvastext; background: color-mix(in srgb, canvastext 12%, canvas); } .node-inspector__color-trigger { align-self: flex-start; } .node-inspector__label, .node-inspector__description { white-space: pre-wrap; } .node-inspector__meta { margin: 0; font-size: 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; } .node-inspector__meta dt { opacity: 0.7; } .node-inspector__meta dd { margin: 0; }