feat(tgu-ops-ui): add spacecraft work editor tab

Port the TGU editor prototype into pcp-tgu-ops-ui as a new editor tab, add draft/conflict/pass logic with tests, extend the 2D map picking API, and include editor styles/theme aliases and task/prototype docs.

Validation: npm run test; npm run build in services/pcp-tgu-ops-ui.
This commit is contained in:
Дмитрий Соловьев
2026-05-30 15:28:34 +03:00
parent c3a1a8b4a1
commit f084775cbb
58 changed files with 6609 additions and 7 deletions
@@ -0,0 +1,20 @@
:root {
--bg-0: var(--bg-base);
--bg-1: var(--bg-panel);
--bg-2: var(--bg-panel-2);
--bg-3: var(--bg-elevated);
--ink: var(--text);
--ink-1: var(--text);
--ink-2: var(--text-muted);
--ink-3: var(--text-dim);
--grid: var(--line-soft);
--now: var(--warning);
--warn: var(--warning);
--mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
--t-optical: var(--accent);
--t-optical-dim: rgba(104, 195, 189, 0.18);
--t-radar: var(--warning);
--t-radar-dim: rgba(240, 173, 46, 0.16);
--t-combo: var(--danger);
--t-combo-dim: rgba(214, 69, 69, 0.16);
}
@@ -0,0 +1,746 @@
.tgu-editor-workspace {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
min-width: 0;
min-height: 0;
background: #121516;
}
.tgu-editor-toolbar {
display: flex;
align-items: center;
gap: 0.65rem;
min-width: 0;
min-height: 3.55rem;
overflow-x: auto;
border-bottom: 1px solid var(--line);
padding: 0.65rem 0.8rem;
background: var(--bg-panel);
}
.tgu-editor-toolbar__identity {
display: flex;
align-items: center;
gap: 0.55rem;
min-width: 12rem;
}
.tgu-editor-toolbar__title {
overflow: hidden;
max-width: 14rem;
color: var(--text);
font-size: 0.88rem;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.tgu-editor-toolbar__meta,
.tgu-editor-rail__meta,
.tgu-editor-panel__hint,
.tgu-editor-panel__id {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.68rem;
}
.tgu-editor-toolbar__group {
display: flex;
gap: 0.35rem;
}
.tgu-editor-toolbar__spacer {
flex: 1;
min-width: 1rem;
}
.tgu-editor-type-dot {
width: 0.62rem;
height: 0.62rem;
border-radius: 3px;
background: var(--t-optical);
box-shadow: 0 0 12px rgba(104, 195, 189, 0.4);
}
.tgu-editor-window-control {
display: inline-flex;
align-items: center;
gap: 0.12rem;
border: 1px solid var(--line);
border-radius: 7px;
padding: 0.12rem;
background: #101214;
}
.tgu-editor-window-control button {
display: grid;
place-items: center;
width: 1.7rem;
height: 1.7rem;
border: 0;
border-radius: 5px;
background: transparent;
color: var(--text-muted);
}
.tgu-editor-window-control span {
min-width: 4.2rem;
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.64rem;
text-align: center;
}
.tgu-editor-button--warning {
color: #ffe7b5;
}
.tgu-editor-notice {
margin: 0.55rem 0.8rem 0;
}
.tgu-editor-layout {
display: grid;
min-width: 0;
min-height: 0;
}
.tgu-editor-rail {
min-width: 0;
min-height: 0;
overflow: auto;
border-right: 1px solid var(--line);
background: var(--bg-panel);
}
.tgu-editor-rail__section {
display: grid;
gap: 0.65rem;
padding: 0.8rem;
border-bottom: 1px solid var(--line-soft);
}
.tgu-editor-eyebrow {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.62rem;
font-weight: 700;
text-transform: uppercase;
}
.tgu-editor-rail__title {
overflow-wrap: anywhere;
color: var(--text);
font-size: 0.9rem;
font-weight: 700;
}
.tgu-editor-stats {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.55rem;
}
.tgu-editor-stat {
display: grid;
gap: 0.1rem;
}
.tgu-editor-stat span {
color: var(--text);
font-family: var(--mono);
font-size: 1rem;
font-weight: 700;
}
.tgu-editor-stat small {
color: var(--text-dim);
font-size: 0.62rem;
text-transform: uppercase;
}
.tgu-editor-context-list {
display: grid;
gap: 0.28rem;
max-height: 21rem;
overflow: auto;
}
.tgu-editor-context-item {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
gap: 0.45rem;
align-items: center;
width: 100%;
border: 0;
border-radius: 6px;
padding: 0.42rem 0.45rem;
background: transparent;
color: var(--text-muted);
text-align: left;
}
.tgu-editor-context-item.is-enabled {
background: var(--bg-panel-2);
color: var(--text);
}
.tgu-editor-context-item__check {
display: grid;
place-items: center;
width: 0.95rem;
height: 0.95rem;
border: 1px solid var(--line);
border-radius: 4px;
color: var(--accent);
font-size: 0.68rem;
}
.tgu-editor-context-item span:nth-child(2) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tgu-editor-context-item small {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.65rem;
}
.tgu-editor-center {
display: grid;
grid-template-rows: 42% minmax(0, 1fr);
min-width: 0;
min-height: 0;
border-right: 1px solid var(--line);
}
.tgu-editor-map-stage {
position: relative;
min-height: 13rem;
overflow: hidden;
border-bottom: 1px solid var(--line);
background: #0b0d0e;
}
.tgu-editor-map-stage .tgu-2d-map {
min-height: 13rem;
}
.tgu-2d-map.is-picking {
cursor: crosshair;
}
.tgu-2d-map__target circle {
fill: rgba(240, 173, 46, 0.18);
stroke: var(--now);
stroke-width: 2;
}
.tgu-2d-map__target line {
stroke: var(--now);
stroke-width: 1.4;
}
.tgu-2d-map__target text {
fill: var(--text);
font-family: var(--mono);
font-size: 11px;
paint-order: stroke;
stroke: rgba(8, 16, 15, 0.85);
stroke-width: 3px;
}
.tgu-editor-timeline {
min-width: 0;
min-height: 0;
overflow: auto;
background: var(--bg-base);
}
.tgu-editor-timeline__surface {
position: relative;
min-width: 46rem;
}
.tgu-editor-timeline__axis-label,
.tgu-editor-timeline__axis,
.tgu-editor-timeline__lane-label {
position: absolute;
border-bottom: 1px solid var(--line);
background: var(--bg-panel);
}
.tgu-editor-timeline__axis-label {
left: 0;
top: 0;
height: 40px;
border-right: 1px solid var(--line);
padding: 1.05rem 0.65rem 0;
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.62rem;
text-transform: uppercase;
}
.tgu-editor-timeline__axis {
top: 0;
height: 40px;
}
.tgu-editor-timeline__day,
.tgu-editor-timeline__tick-label {
position: absolute;
border-left: 1px solid var(--line);
padding-left: 0.28rem;
}
.tgu-editor-timeline__day {
top: 0.18rem;
display: flex;
gap: 0.25rem;
align-items: center;
height: 1rem;
}
.tgu-editor-timeline__day strong {
color: var(--text);
font-size: 0.68rem;
}
.tgu-editor-timeline__day span,
.tgu-editor-timeline__tick-label {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.58rem;
}
.tgu-editor-timeline__tick-label {
top: 1.2rem;
height: 1.15rem;
}
.tgu-editor-timeline__grid {
position: absolute;
bottom: 0;
pointer-events: none;
}
.tgu-editor-timeline__grid > div {
position: absolute;
top: 0;
bottom: 0;
border-left: 1px solid var(--grid);
}
.tgu-editor-timeline__now {
position: absolute;
bottom: 0;
z-index: 8;
border-left: 1.5px dashed var(--now);
pointer-events: none;
}
.tgu-editor-timeline__now span {
position: absolute;
left: 0.18rem;
top: 0;
border-radius: 3px;
padding: 0 0.24rem;
background: var(--now);
color: var(--bg-base);
font-family: var(--mono);
font-size: 0.55rem;
font-weight: 700;
text-transform: uppercase;
}
.tgu-editor-timeline__lane {
position: absolute;
left: 0;
right: 0;
}
.tgu-editor-timeline__lane-label {
left: 0;
top: 0;
bottom: 0;
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.12rem;
border-right: 1px solid var(--line);
padding: 0 0.65rem;
}
.tgu-editor-timeline__lane-label span {
overflow: hidden;
color: var(--text);
font-size: 0.76rem;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.tgu-editor-timeline__lane-label small {
color: var(--accent);
font-size: 0.62rem;
}
.tgu-editor-timeline__lane-body {
position: absolute;
top: 0;
bottom: 0;
border-bottom: 1px solid var(--line-soft);
}
.tgu-editor-work {
position: absolute;
top: 0.75rem;
display: flex;
align-items: start;
gap: 0.28rem;
height: calc(100% - 1.5rem);
overflow: hidden;
border: 1px solid var(--line);
border-left: 3px solid var(--accent);
border-radius: 5px;
padding: 0.25rem 0.45rem;
cursor: grab;
user-select: none;
}
.tgu-editor-work.is-selected {
outline: 1.5px solid var(--accent);
box-shadow: 0 0 0 3px rgba(104, 195, 189, 0.18);
}
.tgu-editor-work.has-conflict {
border-color: var(--now);
}
.tgu-editor-work--context {
top: 0.45rem;
height: calc(100% - 0.9rem);
border-top: 0;
border-right: 0;
border-bottom: 0;
opacity: 0.62;
pointer-events: none;
}
.tgu-editor-work__resize {
position: absolute;
top: 0;
bottom: 0;
width: 0.45rem;
cursor: ew-resize;
}
.tgu-editor-work__resize--left {
left: 0;
}
.tgu-editor-work__resize--right {
right: 0;
}
.tgu-editor-work__dot {
flex: none;
width: 0.42rem;
height: 0.42rem;
margin-top: 0.2rem;
border-radius: 2px;
}
.tgu-editor-work__label {
overflow: hidden;
color: var(--text);
font-family: var(--mono);
font-size: 0.62rem;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.tgu-editor-work small {
position: absolute;
left: 0.5rem;
bottom: 0.2rem;
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.56rem;
}
.tgu-editor-work__new {
flex: none;
border: 1px solid var(--now);
border-radius: 3px;
padding: 0 0.12rem;
color: var(--now);
font-family: var(--mono);
font-size: 0.48rem;
}
.tgu-editor-visibility-label {
display: flex;
align-items: center;
gap: 0.35rem;
}
.tgu-editor-visibility-label i {
flex: none;
width: 0.5rem;
height: 0.5rem;
border-radius: 2px;
}
.tgu-editor-visibility-window {
position: absolute;
top: 0.32rem;
height: calc(100% - 0.64rem);
border: 1px solid var(--accent);
border-radius: 4px;
}
.tgu-editor-context-divider {
position: absolute;
left: 0;
height: 22px;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
padding: 0.34rem 0.65rem 0;
background: var(--bg-base);
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.56rem;
text-transform: uppercase;
}
.tgu-editor-side-panel {
min-width: 0;
min-height: 0;
overflow: auto;
background: var(--bg-panel);
padding: 0.9rem;
}
.tgu-editor-panel {
position: relative;
display: grid;
gap: 0.9rem;
}
.tgu-editor-panel__head,
.tgu-editor-panel__section-head,
.tgu-editor-panel__actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.6rem;
}
.tgu-editor-panel__head h2 {
margin: 0;
font-size: 0.95rem;
}
.tgu-editor-panel__section {
display: grid;
gap: 0.55rem;
}
.tgu-editor-panel__placeholder,
.tgu-editor-target {
border: 1px dashed var(--line);
border-radius: 7px;
padding: 0.65rem;
background: var(--bg-panel-2);
color: var(--text-muted);
font-size: 0.78rem;
line-height: 1.45;
}
.tgu-editor-target {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
gap: 0.5rem;
align-items: center;
border-style: solid;
}
.tgu-editor-target i {
width: 0.6rem;
height: 0.6rem;
border: 2px solid var(--now);
border-radius: 50%;
}
.tgu-editor-target span {
overflow: hidden;
color: var(--text);
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
.tgu-editor-target small {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.64rem;
}
.tgu-editor-chip-row {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
}
.tgu-editor-chip-row button,
.tgu-editor-pass-list button,
.tgu-editor-station button {
border: 1px solid var(--line);
border-radius: 6px;
background: var(--bg-panel-2);
color: var(--text-muted);
}
.tgu-editor-chip-row button {
padding: 0.38rem 0.55rem;
font-size: 0.72rem;
font-weight: 700;
}
.tgu-editor-chip-row button.is-selected,
.tgu-editor-pass-list button.is-selected,
.tgu-editor-station button.is-selected {
border-color: rgba(104, 195, 189, 0.58);
background: rgba(104, 195, 189, 0.14);
color: var(--text);
}
.tgu-editor-pass-list,
.tgu-editor-station-list {
display: grid;
gap: 0.35rem;
max-height: 14rem;
overflow: auto;
}
.tgu-editor-pass-list button,
.tgu-editor-station button {
display: flex;
justify-content: space-between;
gap: 0.5rem;
padding: 0.45rem 0.55rem;
text-align: left;
}
.tgu-editor-pass-list span,
.tgu-editor-station span {
color: var(--text);
font-family: var(--mono);
font-size: 0.68rem;
}
.tgu-editor-pass-list small,
.tgu-editor-station small {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.62rem;
}
.tgu-editor-station {
overflow: hidden;
border: 1px solid var(--line-soft);
border-radius: 7px;
}
.tgu-editor-station__head {
display: flex;
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 0.6rem;
background: var(--bg-panel-2);
}
.tgu-editor-panel select {
width: 100%;
border: 1px solid var(--line);
border-radius: 6px;
padding: 0.45rem 0.5rem;
background: #101214;
color: var(--text);
}
.tgu-editor-time-stepper {
display: grid;
gap: 0.25rem;
}
.tgu-editor-time-stepper > span {
color: var(--text-dim);
font-family: var(--mono);
font-size: 0.6rem;
}
.tgu-editor-time-stepper div {
display: flex;
align-items: center;
gap: 0.25rem;
}
.tgu-editor-time-stepper button {
flex: none;
border: 1px solid var(--line);
border-radius: 5px;
padding: 0.32rem 0.38rem;
background: var(--bg-panel-2);
color: var(--text-muted);
font-family: var(--mono);
font-size: 0.62rem;
}
.tgu-editor-time-stepper output {
flex: 1;
min-width: 0;
border: 1px solid var(--line);
border-radius: 5px;
padding: 0.34rem 0.4rem;
background: #101214;
color: var(--text);
font-family: var(--mono);
font-size: 0.66rem;
text-align: center;
}
.tgu-editor-panel__color {
position: absolute;
top: 0.2rem;
left: -0.9rem;
width: 0.18rem;
height: 1.4rem;
border-radius: 999px;
}
@media (max-width: 1180px) {
.tgu-editor-layout {
grid-template-columns: 1fr !important;
}
.tgu-editor-rail,
.tgu-editor-center,
.tgu-editor-side-panel {
border-right: 0;
border-bottom: 1px solid var(--line);
}
.tgu-editor-rail {
max-height: 16rem;
}
.tgu-editor-side-panel {
max-height: 24rem;
}
}