Files
bruno/packages/bruno-app/src/components/OpenAPISyncTab/StyledWrapper.js
Sundram 05ab2661fa feat(openapi-sync): preserve user-configured request values on sync (#8204)
Reconcile request structure against the spec on sync while preserving the
user's values (JSON body, params, headers, auth) and {{var}} references for
fields that still exist. A "Preserve values" toggle (default on) on the Spec
Updates review controls it; turning it off lets spec values overwrite. The diff
preview's EXPECTED column shows the post-merge result so unchanged values do not
render as changes.

- field-level merge for JSON body (by key path), form fields and params/headers
  (by name, duplicate names paired positionally), preserving value + enabled
- {{var}} masking so interpolated bodies parse, merge and restore safely,
  using a private-use sentinel that never collides with body text
- auth merged by mode: same mode keeps the user's values and adds spec-introduced
  fields; a mode change takes the spec. compareRequestFields compares auth by
  mode only, so preserved auth values no longer mark the collection out of sync
- preserveValues threaded through apply and diff-preview IPC handlers
- reset path left unchanged; scripts/tests/assertions preserved in sync and reset
- 67 unit tests covering the merge helpers and masking edge cases
2026-06-16 20:01:52 +05:30

2457 lines
62 KiB
JavaScript

import styled from 'styled-components';
import { rgba, darken } from 'polished';
const StyledWrapper = styled.div`
.setup-header {
margin-bottom: 1.5rem;
}
.setup-title {
font-size: ${(props) => props.theme.font.size.base};
font-weight: 600;
color: ${(props) => props.theme.text};
margin: 0 0 0.375rem 0;
}
.setup-description {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
line-height: 1.5;
margin: 0;
}
.setup-form {
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.md};
padding: 1rem;
margin-bottom: 1.25rem;
.url-label {
display: block;
font-size: ${(props) => props.theme.font.size.sm};
font-weight: 500;
color: ${(props) => props.theme.text};
margin-bottom: 0.5rem;
}
.url-row {
display: flex;
gap: 0.5rem;
align-items: center;
margin-top: 0.25rem;
}
.url-input {
flex: 1;
padding: 0.25rem 0.75rem;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.text};
background: ${(props) => props.theme.input.bg};
border: 1px solid ${(props) => props.theme.input.border};
border-radius: ${(props) => props.theme.border.radius.md};
outline: none;
&:focus {
border-color: ${(props) => props.theme.input.focusBorder};
}
&::placeholder {
color: ${(props) => props.theme.colors.text.muted};
}
}
}
.setup-hint {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
margin: 0.5rem 0 0 0;
}
.setup-error {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.danger};
margin: 0.5rem 0 0 0;
}
.setup-features {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.setup-feature {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
svg {
color: ${(props) => props.theme.colors.text.green};
flex-shrink: 0;
}
}
/* Spec Info Card — borderless header */
.spec-info-card {
margin-bottom: 14px;
.spec-info-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.spec-title-section {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.spec-title-row {
display: flex;
align-items: center;
gap: 8px;
}
.spec-title {
font-weight: 600;
font-size: 13px;
color: ${(props) => props.theme.text};
}
.spec-version {
font-family: monospace;
}
.spec-header-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.spec-url-label {
color: ${(props) => props.theme.colors.text.muted};
flex-shrink: 0;
}
.spec-url-row {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
margin-top: 0.35rem;
.spec-url-value {
font-family: monospace;
color: ${(props) => props.theme.colors.text.subtext0};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
text-decoration: none;
&:hover {
text-decoration: underline;
color: ${(props) => props.theme.status.info.text};
}
}
.spec-file-reveal {
background: none;
border: none;
padding: 0;
text-align: left;
cursor: pointer;
&:hover {
text-decoration: underline;
color: ${(props) => props.theme.status.info.text};
}
}
}
.linked-collection-row {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
.linked-collection-name {
color: ${(props) => props.theme.colors.text.subtext0};
}
.sync-status-icon {
&.in-sync {
color: ${(props) => props.theme.colors.text.green};
}
&.not-in-sync {
color: ${(props) => props.theme.colors.text.warning};
}
}
}
.copy-btn {
flex-shrink: 0;
padding: 0 4px;
background: none;
border: none;
color: ${(props) => props.theme.colors.text.muted};
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
&:hover {
color: ${(props) => props.theme.text};
}
}
}
/* Overview Status Banner */
.overview-status-banner {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 10px 16px;
border-radius: 10px;
border: 1px solid transparent;
margin-top: 20px;
&.success {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.green, 0.22)};
.banner-title { color: ${(props) => props.theme.colors.text.green}; }
}
&.warning {
background: ${(props) => rgba(props.theme.colors.text.warning, 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.warning, 0.22)};
.banner-title { color: ${(props) => props.theme.colors.text.warning}; }
}
&.muted {
background: ${(props) => rgba(props.theme.colors.text.muted, 0.07)};
border-color: ${(props) => props.theme.border.border1};
.banner-title { color: ${(props) => props.theme.text}; }
}
&.danger {
background: ${(props) => rgba(props.theme.colors.text.danger || '#c0392b', 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.danger || '#c0392b', 0.22)};
.banner-title { color: ${(props) => props.theme.colors.text.danger}; }
}
&.info {
background: ${(props) => rgba(props.theme.status.info.text, 0.07)};
border-color: ${(props) => rgba(props.theme.status.info.text, 0.22)};
.banner-title { color: ${(props) => props.theme.status.info.text}; }
}
.banner-text {
flex: 1 1 0%;
min-width: 60%;
}
.banner-title-row {
display: flex;
align-items: center;
gap: 8px;
}
.status-dot.success::before {
animation: none;
}
.banner-subtitle {
font-size: 12px;
color: ${(props) => props.theme.colors.text.muted};
margin: 6px 0 0 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.banner-button-row {
display: flex;
gap: 10px;
flex-shrink: 0;
margin-left: 16px;
}
}
/* Overview Section */
.overview-section {
margin-top: 0;
.overview-section-title {
font-size: 12px;
font-weight: 600;
color: ${(props) => props.theme.text};
margin-bottom: 6px;
}
.spec-details-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: 8px;
}
.spec-detail-item {
padding: 12px 16px;
border-right: 1px solid ${(props) => props.theme.border.border1};
border-bottom: 1px solid ${(props) => props.theme.border.border1};
&:nth-child(3n) {
border-right: none;
}
&:nth-child(n+4) {
border-bottom: none;
}
&:first-child { border-top-left-radius: 8px; }
&:nth-child(3) { border-top-right-radius: 8px; }
&:nth-child(4) { border-bottom-left-radius: 8px; }
&:last-child { border-bottom-right-radius: 8px; }
}
.spec-detail-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: ${(props) => props.theme.colors.text.muted};
margin-bottom: 6px;
font-weight: 600;
}
.spec-detail-value {
display: inline-flex;
align-items: center;
gap: 0px;
font-size: 13px;
font-weight: 500;
color: ${(props) => props.theme.text};
svg {
opacity: 0.3;
}
&:hover svg {
opacity: 0.6;
}
}
}
/* Update Banner */
.spec-update-banner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 10px 16px;
margin-top: 20px;
border-radius: 8px;
background: ${(props) => rgba(props.theme.dropdown.selectedColor, 0.08)};
border: 1px solid transparent;
overflow: hidden;
&.danger {
background: ${(props) => rgba(props.theme.colors.text.danger || '#c0392b', 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.danger || '#c0392b', 0.22)};
}
&.info {
background: ${(props) => rgba(props.theme.status.info.text, 0.07)};
border-color: ${(props) => rgba(props.theme.status.info.text, 0.22)};
}
&.warning {
background: ${(props) => rgba(props.theme.colors.text.warning, 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.warning, 0.22)};
}
&.success {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
border-color: ${(props) => rgba(props.theme.colors.text.green, 0.22)};
.status-dot::before {
animation: none;
}
}
&.muted {
background: ${(props) => rgba(props.theme.colors.text.muted, 0.07)};
border: 1px solid ${(props) => props.theme.border.border1};
}
.banner-left {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.banner-title {
color: ${(props) => props.theme.text};
.version-code {
font-family: monospace;
font-size: 11px;
padding: 1px 5px;
border-radius: 3px;
background: ${(props) => props.theme.background.surface1};
border: 1px solid ${(props) => props.theme.border.border1};
}
.checked-text {
font-weight: 400;
font-size: 11px;
font-style: italic;
color: ${(props) => props.theme.colors.text.muted};
}
}
.banner-details {
display: inline-flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.banner-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
}
@keyframes radiate {
0% { transform: scale(1); opacity: 0.6; }
100% { transform: scale(2.8); opacity: 0; }
}
.status-dot {
position: relative;
width: 12px;
height: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&::before {
content: '';
position: absolute;
width: 7px;
height: 7px;
border-radius: 50%;
opacity: 0.35;
animation: radiate 1.6s ease-out infinite;
}
&::after {
content: '';
position: relative;
width: 7px;
height: 7px;
border-radius: 50%;
}
&.success {
&::before, &::after { background: ${(props) => props.theme.colors.text.green}; }
}
&.warning {
&::before, &::after { background: ${(props) => props.theme.colors.text.warning}; }
}
&.muted {
&::before, &::after { background: ${(props) => props.theme.colors.text.muted}; }
}
&.danger {
&::before, &::after { background: ${(props) => props.theme.colors.text.danger}; }
}
&.info {
&::before, &::after { background: ${(props) => props.theme.status.info.text}; }
}
}
.status-check-icon {
flex-shrink: 0;
color: ${(props) => props.theme.colors.text.green};
}
.banner-title {
font-size: 12px;
font-weight: 500;
}
/* Summary Cards */
.sync-summary-title-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
.sync-summary-title {
margin-bottom: 0;
}
.last-synced-pill {
strong {
color: ${(props) => props.theme.text};
font-weight: 600;
}
}
}
.sync-summary-title {
font-size: 13px;
font-weight: 600;
color: ${(props) => props.theme.text};
margin-bottom: 10px;
}
.sync-summary-subtitle {
font-size: 11px;
color: ${(props) => props.theme.colors.text.muted};
font-weight: 400;
margin-top: 2px;
}
.sync-summary-cards {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.summary-card {
width: 180px;
flex-shrink: 0;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: 8px;
padding: 14px 16px;
background: ${(props) => props.theme.background.default};
position: relative;
&.clickable {
cursor: pointer;
}
}
.summary-count-row {
display: flex;
align-items: baseline;
gap: 4px;
margin-bottom: 8px;
}
.summary-count {
font-size: 28px;
font-weight: 700;
font-variant-numeric: tabular-nums;
line-height: 1;
&.green { color: ${(props) => props.theme.colors.text.green}; }
&.amber { color: ${(props) => props.theme.colors.text.warning}; }
&.blue { color: ${(props) => props.theme.status.info.text}; }
&.red { color: ${(props) => props.theme.colors.text.danger || '#c0392b'}; }
&.purple { color: #7c3aed; }
&.default { color: ${(props) => props.theme.text}; }
&.muted { color: ${(props) => props.theme.colors.text.muted}; }
}
.summary-count-unit {
font-size: 10px;
color: ${(props) => props.theme.colors.text.muted};
}
.summary-label {
font-size: 12px;
font-weight: 500;
color: ${(props) => props.theme.colors.text.muted};
}
.conflict-annotation {
font-size: 11px;
font-weight: 600;
color: ${(props) => props.theme.colors.text.danger || '#c0392b'};
}
.card-info-icon {
position: absolute;
top: 8px;
right: 8px;
svg {
margin: 0;
width: 12px;
height: 12px;
opacity: 0.3;
}
&:hover svg {
opacity: 0.6;
}
}
/* Connection Settings Modal */
.settings-modal {
.settings-field {
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
}
.settings-label {
font-size: 11px;
font-weight: 600;
color: ${(props) => props.theme.text};
display: block;
margin-bottom: 5px;
}
.settings-input {
width: 100%;
padding: 7px 10px;
font-size: 12px;
font-family: monospace;
color: ${(props) => props.theme.text};
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: 5px;
background: ${(props) => props.theme.input.bg};
outline: none;
box-sizing: border-box;
text-align: left;
&:focus {
border-color: ${(props) => props.theme.input.focusBorder};
}
&.file-pick-btn {
cursor: pointer;
color: ${(props) => props.theme.colors.text.muted};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.settings-toggle-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.toggle-info {
flex: 1;
min-width: 0;
}
.toggle-description {
font-size: 11px;
color: ${(props) => props.theme.text};
margin-top: 2px;
}
.toggle-switch {
width: 34px;
height: 20px;
border-radius: 10px;
border: none;
cursor: pointer;
padding: 0;
flex-shrink: 0;
position: relative;
transition: background 0.2s;
background: ${(props) => props.theme.colors.text.muted};
&.active {
background: ${(props) => props.theme.button2.color.primary.bg};
}
.toggle-knob {
width: 14px;
height: 14px;
border-radius: 50%;
background: #fff;
position: absolute;
top: 3px;
left: 3px;
transition: left 0.2s;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
&.active .toggle-knob {
left: 17px;
}
}
.interval-buttons {
display: flex;
gap: 6px;
margin-top: 8px;
button {
padding: 5px 12px;
font-size: 12px;
border-radius: 5px;
cursor: pointer;
font-weight: 500;
border: 1px solid ${(props) => props.theme.border.border1};
background: ${(props) => props.theme.background.default};
color: ${(props) => props.theme.colors.text.subtext0};
transition: all 0.15s;
&.active {
border-color: ${(props) => props.theme.accents.primary};
background: ${(props) => rgba(props.theme.accents.primary, 0.07)};
color: ${(props) => props.theme.accents.primary};
}
}
}
.settings-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 14px;
}
.disconnect-link {
font-size: 12px;
color: ${(props) => props.theme.colors.text.danger};
background: none;
border: none;
cursor: pointer;
padding: 0;
&:hover {
text-decoration: underline;
}
}
.settings-actions {
display: flex;
gap: 8px;
}
}
/* State Messages */
.state-message {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1.5rem;
gap: 0.5rem;
color: ${(props) => props.theme.colors.text.muted};
&.success {
color: ${(props) => props.theme.colors.text.green};
}
.spinning {
animation: spin 1s linear infinite;
}
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.spec-status-section {
margin-top: 20px;
.spec-update-banner {
margin-top: 0;
}
}
.sync-info-notice {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 8px 12px;
border-radius: 8px;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.subtext0};
background: ${(props) => props.theme.background.mantle};
.sync-info-icon {
flex-shrink: 0;
margin-top: 1px;
color: ${(props) => props.theme.colors.text.muted};
}
.whats-updated-title {
color: ${(props) => props.theme.text};
font-weight: 500;
}
}
.sync-review-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
text-align: center;
.empty-state-icon {
color: var(--color-text-muted, #9ca3af);
margin-bottom: 1rem;
}
h4 {
font-size: ${(props) => props.theme.font.size.base};
font-weight: 500;
color: ${(props) => props.theme.text};
margin: 0 0 0.375rem 0;
}
p {
font-size: ${(props) => props.theme.font.size.xs};
line-height: 1.5;
max-width: 400px;
margin: 0;
color: ${(props) => props.theme.colors.text.muted};
}
}
.collection-status-section {
margin-top: 20px;
.change-section {
margin-top: 0.75rem;
.section-body.expandable-mode {
border-radius: 0 0 8px 8px;
max-height: none; /* Override default max-height so all items remain visible */
}
}
}
/* Expandable endpoint rows — shared base styles */
.endpoint-review-row {
border-bottom: 1px solid ${(props) => props.theme.border.border1};
&:last-child {
border-bottom: none;
}
.review-row-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
cursor: pointer;
&:hover {
background: ${(props) => props.theme.background.mantle};
}
.expand-toggle {
color: ${(props) => props.theme.colors.text.muted};
}
.endpoint-path {
font-family: monospace;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.text};
}
.endpoint-name {
color: ${(props) => props.theme.colors.text.muted};
font-size: ${(props) => props.theme.font.size.xs};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.changes-tag {
font-size: ${(props) => props.theme.font.size.xs};
padding: 0.125rem 0.375rem;
background: ${(props) => props.theme.background.surface1};
color: ${(props) => props.theme.colors.text.muted};
border-radius: ${(props) => props.theme.border.radius.sm};
}
.endpoint-actions {
display: flex;
gap: 0.25rem;
margin-left: auto;
opacity: 0;
transition: opacity 0.15s;
}
&:hover .endpoint-actions {
opacity: 1;
}
}
.review-row-diff {
border-top: 1px solid ${(props) => props.theme.border.border1};
background: ${(props) => props.theme.background.mantle};
}
.diff-loading {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 2rem;
color: ${(props) => props.theme.colors.text.muted};
font-size: ${(props) => props.theme.font.size.sm};
.spinning {
animation: spin 1s linear infinite;
}
}
.diff-error {
padding: 1rem;
color: ${(props) => props.theme.colors.text.danger};
font-size: ${(props) => props.theme.font.size.sm};
}
}
.change-section {
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: 8px;
.section-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
background: transparent;
border-radius: 8px;
cursor: pointer;
user-select: none;
&:hover {
background: ${(props) => props.theme.background.mantle};
}
.section-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
background: ${(props) => props.theme.colors.text.muted};
&.type-added { background: ${(props) => props.theme.colors.text.green}; }
&.type-modified { background: ${(props) => props.theme.colors.text.warning}; }
&.type-removed { background: ${(props) => props.theme.colors.text.danger}; }
&.type-missing { background: ${(props) => props.theme.colors.text.danger}; }
&.type-local-only { background: ${(props) => props.theme.colors.text.muted}; }
&.type-in-sync { background: ${(props) => props.theme.colors.text.green}; }
&.type-conflict { background: ${(props) => props.theme.colors.text.danger}; }
&.type-spec-modified { background: ${(props) => props.theme.colors.text.warning}; }
&.type-collection-drift { background: ${(props) => props.theme.colors.text.warning}; }
}
.section-title {
font-size: ${(props) => props.theme.font.size.xs};
font-weight: 600;
color: ${(props) => props.theme.text};
}
.section-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 1.25rem;
height: 1.25rem;
padding: 0 0.3rem;
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.subtext1};
background: ${(props) => props.theme.background.surface1};
border-radius: 999px;
}
.section-subtitle {
font-size: 10px;
color: ${(props) => props.theme.colors.text.muted};
}
.section-actions {
margin-left: auto;
}
}
/* When section body is visible, show background and flatten header's bottom radius */
&.expanded .section-header {
background: ${(props) => props.theme.background.mantle};
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.section-body {
border-top: 1px solid ${(props) => props.theme.border.border1};
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
max-height: 300px;
overflow-y: auto;
&.expandable-mode {
max-height: none;
overflow-y: visible;
}
}
}
/* Chevron */
.chevron {
color: ${(props) => props.theme.colors.text.muted};
transition: transform 0.15s ease;
flex-shrink: 0;
&.expanded {
transform: rotate(90deg);
}
}
/* Endpoint Items */
.endpoint-item {
border-bottom: 1px solid ${(props) => props.theme.border.border1};
&:last-child {
border-bottom: none;
}
.endpoint-row {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
font-size: ${(props) => props.theme.font.size.sm};
&.clickable {
cursor: pointer;
&:hover {
background: ${(props) => props.theme.sidebar.collection.item.hoverBg};
}
}
.endpoint-path {
font-family: monospace;
color: ${(props) => props.theme.text};
}
.endpoint-summary {
flex: 1;
color: ${(props) => props.theme.colors.text.muted};
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.deprecated-tag {
font-size: ${(props) => props.theme.font.size.xs};
padding: 0.125rem 0.375rem;
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
border-radius: ${(props) => props.theme.border.radius.sm};
}
.changes-tag {
font-size: ${(props) => props.theme.font.size.xs};
padding: 0.125rem 0.5rem;
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
border-radius: ${(props) => props.theme.border.radius.sm};
font-weight: 500;
}
.endpoint-actions {
display: flex;
gap: 0.25rem;
margin-left: auto;
opacity: 0;
transition: opacity 0.15s;
}
&:hover .endpoint-actions {
opacity: 1;
}
}
}
/* Endpoint Details */
.endpoint-details {
padding: 0.75rem;
background: ${(props) => props.theme.background.surface0};
border-top: 1px solid ${(props) => props.theme.border.border1};
.detail-group {
margin-bottom: 0.75rem;
&:last-child {
margin-bottom: 0;
}
.detail-title {
font-size: ${(props) => props.theme.font.size.xs};
font-weight: 600;
text-transform: uppercase;
color: ${(props) => props.theme.colors.text.muted};
margin-bottom: 0.375rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.description-text {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.text};
line-height: 1.5;
margin: 0;
}
}
.params-table {
width: 100%;
font-size: ${(props) => props.theme.font.size.xs};
border-collapse: collapse;
td {
padding: 0.25rem 0.5rem;
border-bottom: 1px solid ${(props) => props.theme.border.border1};
vertical-align: top;
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
}
tr:last-child td {
border-bottom: none;
}
.param-name {
font-family: monospace;
font-weight: 500;
color: ${(props) => props.theme.text};
white-space: nowrap;
}
.param-type {
color: ${(props) => props.theme.colors.text.subtext0};
white-space: nowrap;
}
.param-desc {
color: ${(props) => props.theme.colors.text.muted};
}
}
.required-badge {
font-size: 10px;
padding: 0.125rem 0.25rem;
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.status.danger.text};
border-radius: ${(props) => props.theme.border.radius.sm};
}
.content-type-badge {
display: inline-block;
font-size: ${(props) => props.theme.font.size.xs};
padding: 0.125rem 0.375rem;
background: ${(props) => props.theme.background.surface1};
color: ${(props) => props.theme.colors.text.muted};
border-radius: ${(props) => props.theme.border.radius.sm};
margin-bottom: 0.5rem;
}
.schema-block {
font-family: monospace;
font-size: 11px;
background: ${(props) => props.theme.background.surface1};
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
padding: 0.5rem;
margin: 0;
overflow-x: auto;
max-height: 120px;
color: ${(props) => props.theme.text};
}
.responses-list {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.response-row {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
.status-code {
font-family: monospace;
font-weight: 500;
padding: 0.125rem 0.375rem;
border-radius: ${(props) => props.theme.border.radius.sm};
&.status-2xx {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
color: ${(props) => props.theme.status.success.text};
}
&.status-3xx {
background: ${(props) => props.theme.status.info.background};
color: ${(props) => props.theme.status.info.text};
}
&.status-4xx {
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
}
&.status-5xx {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.status.danger.text};
}
}
.response-desc {
color: ${(props) => props.theme.colors.text.muted};
}
}
}
/* Disconnect Modal */
.disconnect-modal {
.disconnect-message {
font-size: ${(props) => props.theme.font.size.sm};
line-height: 1.5;
margin-bottom: 1.5rem;
}
.disconnect-checkbox {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
cursor: pointer;
margin-bottom: 1.5rem;
input[type="checkbox"] {
cursor: pointer;
}
}
.disconnect-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
}
/* Action Confirm Modal */
.action-confirm-modal {
.confirm-message {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.text};
line-height: 1.5;
margin-bottom: 1.5rem;
}
.confirm-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
}
/* Endpoints Modal List */
.endpoints-list {
max-height: 12rem;
overflow-y: auto;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.base};
background: ${(props) => props.theme.background.default};
.endpoint-row {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-bottom: 1px solid ${(props) => props.theme.border.border1};
&:last-child {
border-bottom: none;
}
&.selectable {
cursor: pointer;
&:hover {
background: ${(props) => props.theme.background.surface1};
}
}
}
.endpoint-path {
font-family: monospace;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.endpoint-summary {
color: ${(props) => props.theme.colors.text.muted};
font-size: ${(props) => props.theme.font.size.xs};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 40%;
}
input[type="checkbox"] {
accent-color: ${(props) => props.theme.colors.primary};
cursor: pointer;
}
}
.removal-controls {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.25rem;
padding: 0 0.25rem;
}
.removal-count {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
margin-left: 1.25rem;
}
.removal-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.removal-separator {
color: ${(props) => props.theme.colors.text.muted};
}
.text-link {
color: ${(props) => props.theme.colors.primary};
background: none;
border: none;
padding: 0;
cursor: pointer;
font-size: ${(props) => props.theme.font.size.xs};
&:hover {
text-decoration: underline;
}
}
/* Sync Review Modal */
.sync-review-page {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
.sync-review-header {
flex-shrink: 0;
padding-bottom: 0.75rem;
.back-link-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.75rem;
}
.back-link {
display: inline-flex;
align-items: center;
gap: 0.25rem;
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
cursor: pointer;
background: none;
border: none;
padding: 0;
font-family: inherit;
&:hover {
color: ${(props) => props.theme.text};
}
}
.title-row {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 0.25rem;
}
.title-left {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.description-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 0.25rem;
}
.review-title {
font-size: ${(props) => props.theme.font.size.base};
font-weight: 600;
color: ${(props) => props.theme.text};
margin: 0;
}
.review-badges {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 0.375rem;
.badge-row {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
}
.review-subtitle {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
}
}
.context-pill {
font-size: ${(props) => props.theme.font.size.xs};
padding: 0.125rem 0.5rem;
border-radius: ${(props) => props.theme.border.radius.sm};
background: ${(props) => props.theme.background.surface1};
color: ${(props) => props.theme.colors.text.muted};
white-space: nowrap;
font-weight: 500;
&.spec {
background: ${(props) => props.theme.status.info.background};
color: ${(props) => props.theme.status.info.text};
}
&.drift {
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
}
&.conflict {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.status.danger.text};
}
&.added {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
color: ${(props) => props.theme.colors.text.green};
}
&.removed {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.colors.text.danger};
}
}
.text-diff-container {
border-radius: ${(props) => props.theme.border.radius.sm};
border: 1px solid ${(props) => props.theme.border.border1};
overflow: hidden;
display: flex;
flex-direction: column;
background: ${(props) => props.theme.bg};
.diff-column-headers {
display: grid;
grid-template-columns: 9ch 1fr 9ch 1fr;
border-bottom: 1px solid ${(props) => props.theme.border.border1};
background: ${(props) => props.theme.bg};
flex-shrink: 0;
.diff-column-label {
padding: 6px 12px;
font-size: 12px;
font-weight: 600;
color: ${(props) => props.theme.colors.text.muted};
grid-column: span 2;
&:last-child {
border-left: 1px solid ${(props) => props.theme.border.border1};
}
}
}
/* The Virtuoso scroll container fills the rest of the modal body. */
> div[data-testid='virtuoso-scroller'],
> div:last-child {
flex: 1 1 auto;
min-height: 0;
}
/* Active block gets a persistent 3px yellow bar down the left edge. */
.diff-row {
display: grid;
grid-template-columns: 9ch 1fr 9ch 1fr;
font-family: 'Fira Code', monospace;
font-size: 12px;
line-height: 1.5;
/* Must match Virtuoso's fixedItemHeight in SpecDiffModal/index.js */
min-height: 18px;
color: ${(props) => props.theme.text};
font-variant-ligatures: none;
font-feature-settings: 'liga' 0, 'calt' 0;
}
/* Vertical divider between the two side-by-side panels. Applied to the
third grid cell (right-side line number), aligned with the header's
existing border-right on the "Current Spec" label. */
.diff-row > *:nth-child(3) {
border-left: 1px solid ${(props) => props.theme.border.border1};
}
.diff-row.diff-row-focused > .diff-cell-num:first-child {
box-shadow: inset 3px 0 0 ${(props) => props.theme.colors.text.yellow};
}
.diff-row.diff-row-focused > .diff-cell-num {
color: ${(props) => props.theme.text};
font-weight: 600;
}
.diff-cell-num {
padding: 0 0.5em;
text-align: right;
color: ${(props) => props.theme.colors.text.muted};
user-select: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.diff-kind-del {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.danger} 22%, transparent);
}
&.diff-kind-ins {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.green} 15%, transparent);
}
&.diff-kind-empty {
background-color: ${(props) => rgba(props.theme.colors.text.muted, 0.05)};
}
}
.diff-cell-code {
display: flex;
min-width: 0;
padding: 0 0.5em;
white-space: pre;
overflow: hidden;
&.diff-kind-del {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.danger} 22%, transparent);
}
&.diff-kind-ins {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.green} 15%, transparent);
}
&.diff-kind-empty {
background-color: ${(props) => rgba(props.theme.colors.text.muted, 0.05)};
}
}
.diff-prefix {
width: 1em;
flex-shrink: 0;
color: ${(props) => props.theme.colors.text.muted};
user-select: none;
}
.diff-content {
flex: 1 1 auto;
min-width: 0;
overflow-x: auto;
scrollbar-width: thin;
del {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.danger} 40%, transparent);
text-decoration: none;
}
ins {
background-color: color-mix(in srgb, ${(props) => props.theme.colors.text.green} 40%, transparent);
text-decoration: none;
}
}
/* Hunk row must be exactly 18px so Virtuoso's fixedItemHeight is
accurate. Borders would add 2px; we use inset box-shadow to get the
visual top/bottom rule without consuming layout space. Vertical
padding removed for the same reason. */
.diff-row-hunk {
grid-template-columns: 1fr;
background-color: ${(props) => rgba(props.theme.colors.text.muted, 0.08)};
color: ${(props) => props.theme.colors.text.muted};
box-shadow:
inset 0 1px 0 ${(props) => props.theme.border.border1},
inset 0 -1px 0 ${(props) => props.theme.border.border1};
.diff-cell-hunk {
padding: 0 0.75em;
font-family: 'Fira Code', monospace;
font-size: 11px;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.text-diff-loading {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 2rem;
color: ${(props) => props.theme.colors.text.muted};
font-size: ${(props) => props.theme.font.size.sm};
}
.text-diff-empty {
padding: 2rem;
text-align: center;
color: ${(props) => props.theme.colors.text.muted};
font-size: ${(props) => props.theme.font.size.sm};
}
.spec-diff-modal {
.spec-diff-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 0.5rem;
margin-bottom: 1rem;
}
.spec-diff-badges {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
margin-bottom: 0.5rem;
}
.spec-diff-subtitle {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
}
.spec-diff-nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
.spec-diff-nav-counter {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
}
.spec-diff-nav-buttons {
display: flex;
gap: 0.5rem;
}
.spec-diff-nav-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
background: none;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
color: ${(props) => props.theme.text};
cursor: pointer;
&:hover:not(:disabled) {
background: ${(props) => props.theme.background.surface1};
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
}
.spec-diff-body {
.text-diff-container {
height: calc(80vh - 140px);
}
}
}
.review-actions-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem;
background: ${(props) => props.theme.background.surface0};
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.md};
margin-bottom: 0.75rem;
}
.review-stats {
display: flex;
gap: 1rem;
font-size: ${(props) => props.theme.font.size.sm};
.stat {
display: inline-flex;
align-items: center;
gap: 0.25rem;
&.add { color: ${(props) => props.theme.colors.text.green}; }
&.update { color: ${(props) => props.theme.status.info.text}; }
&.remove { color: ${(props) => props.theme.colors.text.danger}; }
&.keep { color: ${(props) => props.theme.colors.text.muted}; }
}
}
.bulk-actions {
display: flex;
gap: 0.5rem;
user-select: none; /* these are controls, not selectable text (e.g. double-click on the info icon) */
}
.bulk-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
background: none;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
color: ${(props) => props.theme.text};
cursor: pointer;
&:hover {
background: ${(props) => props.theme.background.surface1};
}
&.active {
border-color: ${(props) => props.theme.status.info.text};
color: ${(props) => props.theme.status.info.text};
background: ${(props) => props.theme.status.info.background};
}
&:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.spinner-icon {
animation: spin 1s linear infinite;
}
}
/* the three Preserve elements read as one control: label + info + toggle */
.preserve-values-control {
display: inline-flex;
align-items: center;
margin-right: 0.25rem;
padding: 0.25rem 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.text};
.preserve-values-label {
white-space: nowrap;
}
/* the shared InfoCircle icon ships a hardcoded ml-2 (8px); override it
so the info icon sits tight to the label. It is a hover-only tooltip
affordance, not a button — use a help cursor and never show a
click/focus box around it. */
svg {
margin-left: 4px;
cursor: help;
}
svg:focus,
svg:focus-visible,
span:focus,
span:focus-visible {
outline: none;
box-shadow: none;
background: transparent;
}
/* compact themed track + knob toggle, sized to the button row height */
.preserve-toggle {
margin-right: 4px; /* space between the toggle and the label */
width: 26px;
height: 14px;
border-radius: 7px;
border: none;
padding: 0;
flex-shrink: 0;
position: relative;
cursor: pointer;
transition: background 0.2s;
background: ${(props) => props.theme.colors.text.muted};
&.active {
background: ${(props) => props.theme.button2.color.primary.bg};
}
&:focus-visible {
outline: 2px solid ${(props) => props.theme.button2.color.primary.bg};
outline-offset: 2px;
}
.preserve-toggle-knob {
width: 10px;
height: 10px;
border-radius: 50%;
background: #fff;
position: absolute;
top: 2px;
left: 2px;
transition: left 0.2s;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
&.active .preserve-toggle-knob {
left: 14px;
}
}
}
.sync-review-body {
flex: 1;
overflow-y: auto;
}
&.sync-mode .sync-review-body {
margin-top: 0;
}
.endpoints-review-sections {
display: flex;
flex-direction: column;
gap: 1.25rem;
.review-group {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.review-group-header {
display: flex;
align-items: center;
justify-content: flex-end;
}
.review-group-title {
font-size: ${(props) => props.theme.font.size.sm};
font-weight: 600;
color: ${(props) => props.theme.colors.text.muted};
text-transform: uppercase;
letter-spacing: 0.05em;
margin: 0;
}
.change-section {
.section-subtitle {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
margin-left: 0.25rem;
}
.section-body {
max-height: none;
&.expandable-mode {
border-top: none;
border-radius: 0 0 ${(props) => props.theme.border.radius.sm} ${(props) => props.theme.border.radius.sm};
}
}
}
}
.endpoint-review-row {
.review-row-header {
.source-tag {
font-size: 10px;
padding: 0.125rem 0.375rem;
border-radius: ${(props) => props.theme.border.radius.sm};
font-weight: 500;
&.spec {
background: ${(props) => props.theme.status.info.background};
color: ${(props) => props.theme.status.info.text};
}
&.drift {
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
}
&.conflict {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.status.danger.text};
}
&.local-modified, &.local-deleted, &.local-added {
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.status.warning.text};
}
&.spec-modified, &.spec-added {
background: ${(props) => props.theme.status.info.background};
color: ${(props) => props.theme.status.info.text};
}
&.spec-removed {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.status.danger.text};
}
}
}
.decision-buttons {
display: flex;
gap: 0.25rem;
margin-left: auto;
}
.decision-btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
background: none;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
color: ${(props) => props.theme.colors.text.muted};
cursor: pointer;
&:hover {
background: ${(props) => props.theme.background.surface1};
}
&.keep.selected {
background: ${(props) => props.theme.background.surface1};
border-color: ${(props) => props.theme.colors.text.muted};
color: ${(props) => props.theme.text};
}
&.accept.selected {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
border-color: ${(props) => props.theme.colors.text.green};
color: ${(props) => props.theme.colors.text.green};
}
}
.endpoint-diff-view {
.diff-section {
margin-bottom: 0.5rem;
&:last-child {
margin-bottom: 0;
}
}
.url-bar {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.375rem;
background: ${(props) => props.theme.background.surface0};
border-radius: ${(props) => props.theme.border.radius.sm};
.url {
font-family: monospace;
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.text};
word-break: break-all;
}
}
.diff-section-title {
font-size: ${(props) => props.theme.font.size.xs};
font-weight: 600;
color: ${(props) => props.theme.colors.text.muted};
margin-bottom: 0.25rem;
}
.diff-table {
width: 100%;
font-size: ${(props) => props.theme.font.size.xs};
border-collapse: collapse;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
th, td {
padding: 0.25rem 0.5rem;
text-align: left;
border-bottom: 1px solid ${(props) => props.theme.border.border1};
}
th {
background: ${(props) => props.theme.background.surface1};
color: ${(props) => props.theme.colors.text.muted};
font-weight: 500;
}
tr:last-child td {
border-bottom: none;
}
.row-added {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
}
.row-deleted {
background: ${(props) => props.theme.status.danger.background};
}
.row-modified {
background: ${(props) => props.theme.status.warning.background};
}
.status-badge {
display: inline-block;
width: 14px;
height: 14px;
text-align: center;
line-height: 14px;
font-size: 10px;
font-weight: 700;
border-radius: 2px;
&.added {
background: ${(props) => rgba(props.theme.colors.text.green, 0.07)};
color: ${(props) => props.theme.colors.text.green};
}
&.deleted {
background: ${(props) => props.theme.status.danger.background};
color: ${(props) => props.theme.colors.text.danger};
}
&.modified {
background: ${(props) => props.theme.status.warning.background};
color: ${(props) => props.theme.colors.text.warning};
}
}
.key-cell {
font-family: monospace;
font-weight: 500;
}
.value-cell {
font-family: monospace;
color: ${(props) => props.theme.colors.text.muted};
}
}
.body-mode-badge {
display: inline-block;
padding: 0.25rem 0.5rem;
font-size: ${(props) => props.theme.font.size.xs};
background: ${(props) => props.theme.background.surface1};
color: ${(props) => props.theme.colors.text.muted};
border-radius: ${(props) => props.theme.border.radius.sm};
font-family: monospace;
}
.empty-diff {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
font-style: italic;
}
}
}
.sync-review-bottom-bar {
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
bottom: 0rem;
background: ${(props) => props.theme.background.base};
margin-top: 1rem;
z-index: 10;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
.bar-stats {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: ${(props) => props.theme.font.size.sm};
.stats-prefix {
color: ${(props) => props.theme.colors.text.muted};
}
.stat {
display: inline-flex;
align-items: center;
gap: 0.25rem;
position: relative;
cursor: default;
&.add { color: ${(props) => props.theme.colors.text.green}; }
&.update { color: ${(props) => props.theme.status.info.text}; }
&.remove { color: ${(props) => props.theme.colors.text.danger}; }
&.keep { color: ${(props) => props.theme.colors.text.muted}; }
.stat-hover-card {
transform: translateX(-50%);
background: ${(props) => props.theme.background.base};
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.md};
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 0.5rem;
min-width: 200px;
max-width: 320px;
max-height: 200px;
overflow-y: auto;
z-index: 100;
}
.stat-hover-list {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.stat-hover-item {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.2rem 0.25rem;
border-radius: ${(props) => props.theme.border.radius.sm};
&:hover {
background: ${(props) => props.theme.background.hover};
}
}
.stat-hover-path {
font-size: ${(props) => props.theme.font.size.xs};
font-family: monospace;
color: ${(props) => props.theme.text};
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.bar-actions {
display: flex;
gap: 0.5rem;
}
}
}
.sync-confirm-modal {
display: flex;
flex-direction: column;
max-height: 60vh;
.sync-confirm-description {
font-size: ${(props) => props.theme.font.size.sm};
color: ${(props) => props.theme.colors.text.muted};
margin: 0 0 0.75rem 0;
flex-shrink: 0;
}
.sync-confirm-groups {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
flex: 1;
min-height: 0;
overflow-y: auto;
}
.confirm-group {
.confirm-group-header {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.25rem 0;
cursor: pointer;
user-select: none;
}
.confirm-group-label {
font-size: ${(props) => props.theme.font.size.sm};
font-weight: 500;
}
.confirm-group-count {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
}
.confirm-group-subtitle {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
font-weight: 400;
}
&.type-add .confirm-group-label { color: ${(props) => props.theme.colors.text.green}; }
&.type-update .confirm-group-label { color: ${(props) => props.theme.status.info.text}; }
&.type-remove .confirm-group-label { color: ${(props) => props.theme.colors.text.danger}; }
&.type-keep .confirm-group-label { color: ${(props) => props.theme.colors.text.muted}; }
.endpoints-list {
margin-top: 0.5rem;
margin-left: 1.25rem;
}
.confirm-group-body {
margin-top: 0.5rem;
}
.confirm-group-endpoints {
display: flex;
flex-direction: column;
gap: 0.125rem;
padding-left: 1.25rem;
}
.confirm-endpoint {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.125rem 0.25rem;
}
.confirm-endpoint-path {
font-family: monospace;
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.text};
}
}
.sync-confirm-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
flex-shrink: 0;
}
}
/* Visual Diff Content Overrides */
.visual-diff-content {
margin: 0.75rem;
border: 1px solid ${(props) => props.theme.border.border1};
border-radius: ${(props) => props.theme.border.radius.sm};
.diff-header-row {
border-top: none;
border-left: none;
border-right: none;
border-radius: 0;
margin-bottom: 0;
background: ${(props) => props.theme.background.surface0};
}
.diff-sections {
gap: 0;
}
.diff-row {
border-top: none;
border-left: none;
border-right: none;
border-radius: 0;
margin-bottom: 0;
&:last-child {
border-bottom: none;
}
}
}
/* URL/File mode toggle in setup form and settings modal */
.setup-mode-toggle {
display: inline-flex;
flex-shrink: 0;
align-items: stretch;
align-self: stretch;
gap: 2px;
padding: 2px;
background: ${(props) => props.theme.background.surface1};
border-radius: ${(props) => props.theme.border.radius.md};
}
.setup-mode-btn {
padding: 0 0.65rem;
font-size: ${(props) => props.theme.font.size.sm};
font-weight: 500;
color: ${(props) => props.theme.text};
background: transparent;
border: none;
border-radius: calc(${(props) => props.theme.border.radius.md} - 3px);
cursor: pointer;
transition: background 0.12s, color 0.12s;
white-space: nowrap;
&.active {
background: ${(props) => darken(0.03, props.theme.background.base)};
color: ${(props) => props.theme.button2.color.secondary.text};
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
&:hover:not(.active) {
color: ${(props) => props.theme.text};
}
}
.file-pick-btn {
text-align: left;
cursor: pointer;
font-family: monospace;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: ${(props) => props.theme.colors.text.muted};
}
/* File not found banner */
.file-not-found-banner {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1rem;
margin-bottom: 0.75rem;
background: ${(props) => rgba(props.theme.colors.text.yellow || '#f59e0b', 0.08)};
border: 1px solid ${(props) => rgba(props.theme.colors.text.yellow || '#f59e0b', 0.3)};
border-radius: ${(props) => props.theme.border.radius.md};
}
.file-not-found-content {
display: flex;
align-items: flex-start;
gap: 0.625rem;
flex: 1;
min-width: 0;
}
.file-not-found-icon {
flex-shrink: 0;
margin-top: 1px;
color: ${(props) => props.theme.colors.text.yellow || '#f59e0b'};
}
.file-not-found-title {
font-size: ${(props) => props.theme.font.size.sm};
font-weight: 600;
color: ${(props) => props.theme.text};
margin-bottom: 0.125rem;
}
.file-not-found-desc {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
word-break: break-all;
code {
font-family: monospace;
font-size: ${(props) => props.theme.font.size.xs};
}
}
.file-not-found-actions {
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.beta-feedback-inline {
margin-top: 2rem;
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
.beta-feedback-link {
background: none;
border: none;
padding: 0;
color: ${(props) => props.theme.status.info.text};
cursor: pointer;
font-size: inherit;
text-decoration: underline;
&:hover {
opacity: 0.8;
}
}
}
`;
export default StyledWrapper;