Добавление нового функционала

This commit is contained in:
NikitaKalitov
2026-07-14 17:55:53 +03:00
parent fed7df1bea
commit 8bbee2dc7e
8 changed files with 744 additions and 114 deletions
+128 -24
View File
@@ -11,7 +11,9 @@
.diagram-toolbar {
display: flex;
flex-wrap: wrap;
gap: 8px;
max-width: 280px;
}
.diagram-toolbar button {
@@ -28,6 +30,26 @@
background: color-mix(in srgb, canvastext 8%, canvas);
}
.diagram-flow--view-mode .react-flow__handle {
display: none;
}
/*
* React Flow's built-in disabled styling only dims <svg> 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-mode-toggle {
display: flex;
border: 1px solid #999;
@@ -80,14 +102,24 @@
.diagram-node {
position: relative;
min-width: 120px;
padding: 10px 16px;
width: 100%;
height: 100%;
padding: 6px 10px;
border: 1px solid #555;
border-radius: 6px;
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;
}
.diagram-node__badge {
@@ -104,35 +136,74 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
.diagram-node--gateway {
width: 64px;
height: 64px;
min-width: 0;
.diagram-node__caption {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
margin-top: 4px;
max-width: 120px;
font-size: 11px;
text-align: center;
color: canvastext;
white-space: pre-wrap;
}
.diagram-node--circle {
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transform: rotate(45deg);
border-radius: 50%;
}
.diagram-node--gateway span {
.diagram-node--startEvent {
border-width: 1px;
}
.diagram-node--endEvent {
border-width: 3px;
}
.diagram-node--intermediateEvent {
border-width: 1px;
}
.diagram-node--intermediateEvent::after {
content: '';
position: absolute;
inset: 3px;
border: 1px solid #555;
border-radius: 50%;
}
.diagram-node--gateway-outer {
position: relative;
width: 100%;
height: 100%;
}
/*
* Inset to 1/sqrt(2) of the outer box and rotated 45deg: the diamond's tips
* exactly reach the outer box's edges without the corners clipping outside it.
*/
.diagram-node--diamond {
position: absolute;
top: 50%;
left: 50%;
width: 70.71%;
height: 70.71%;
padding: 0;
border-radius: 4px;
transform: translate(-50%, -50%) rotate(45deg);
}
.diagram-node__icon {
display: inline-block;
transform: rotate(-45deg);
font-size: 11px;
}
.diagram-node--event {
width: 64px;
height: 64px;
min-width: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 18px;
font-weight: 700;
line-height: 1;
}
.diagram-aside {
@@ -177,6 +248,25 @@
justify-content: space-between;
}
.node-inspector__toolbar {
display: flex;
gap: 8px;
}
.node-inspector__toolbar button {
font: inherit;
padding: 6px 10px;
border: 1px solid #999;
border-radius: 4px;
background: canvas;
color: canvastext;
cursor: pointer;
}
.node-inspector__toolbar button:hover {
background: color-mix(in srgb, canvastext 8%, canvas);
}
.node-inspector__type {
font-weight: 600;
}
@@ -204,6 +294,19 @@
color: canvastext;
}
.node-inspector__field--color {
flex-direction: row;
align-items: center;
gap: 8px;
}
.node-inspector__field--color input[type='color'] {
width: 36px;
height: 28px;
padding: 2px;
cursor: pointer;
}
.node-inspector__action {
font: inherit;
padding: 8px 10px;
@@ -227,6 +330,7 @@
.node-inspector__label {
margin: 0;
font-size: 15px;
white-space: pre-wrap;
}
.node-inspector__description {