Файли
openidea/src/features/database/Database.module.css
T
Vadim LazukтаInf1mum 5567aff80a feat(database): preview the console's execution range with a border (#5694)
A console now borders the SQL an Execute would submit: the caret's statement, or the selected statements, using the same db_statements split the run makes, so what is shown and what is submitted cannot differ. While a run is in progress its submitted range stays bordered as the caret moves. The selection is never changed.

The border is one box around each statement's text, drawn on an editor layer, in the accent colour with a soft fill (light and dark themes). Typing waits for a 150 ms pause before splitting again; caret moves update at once.

Closes #5524

Co-authored-by: Inf1mum <[email protected]>
2026-11-25 06:32:30 +08:00

1699 рядки
34 KiB
CSS
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
/* ---- Grid ---------------------------------------------------------------- */
.grid {
position: relative;
height: 100%;
overflow: auto;
outline: none;
font-family: var(--font-mono);
font-size: var(--fs-small);
background: var(--bg-editor);
color: var(--fg-editor);
}
.gridInner {
position: relative;
min-width: 100%;
}
.gridRow {
display: grid;
height: 24px;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.gridHeader {
position: sticky;
z-index: 1;
background: var(--bg-island);
border-bottom: 1px solid var(--border);
}
.headerCell {
position: relative;
display: flex;
align-items: center;
gap: var(--space-1);
padding: 0 6px;
border-right: 1px solid var(--border);
overflow: hidden;
white-space: nowrap;
color: var(--fg-strong);
}
.sortable {
cursor: pointer;
}
.sortable:hover {
background: var(--bg-hover);
}
.headerName {
overflow: hidden;
text-overflow: ellipsis;
}
.headerIcon {
flex: none;
color: var(--fg-secondary);
}
.headerSort {
flex: none;
margin-left: auto;
color: var(--fg-muted);
}
.cellNumber {
justify-content: flex-end;
}
.resizer {
position: absolute;
top: 0;
right: -3px;
width: 6px;
height: 100%;
cursor: col-resize;
}
.rowNumber {
/* Frozen at the left edge: only vertical scrolling moves the numbers. */
position: sticky;
left: 0;
z-index: 1;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 var(--space-1);
color: var(--fg-line-number);
background: var(--bg-editor-gutter);
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
user-select: none;
}
.rowNumberSelected {
color: var(--fg-line-number-current);
}
.cell {
display: flex;
align-items: center;
padding: 0 6px;
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
overflow: hidden;
white-space: pre;
text-overflow: ellipsis;
user-select: none;
}
.cellSelected {
background: var(--bg-editor-selection);
}
.cellModified {
color: var(--gutter-modified);
}
.rowDeleted .cell {
text-decoration: line-through;
color: var(--fg-muted);
}
.rowInserted .cell {
color: var(--gutter-added);
}
.null {
color: var(--fg-muted);
font-style: italic;
}
/* A value the page carries only the start of: tagged before its text, which a column clips on the right. */
.cellCutMark {
flex: none;
margin-right: var(--space-1-5);
padding: 0 var(--space-1);
border: 1px solid var(--border);
border-radius: var(--radius-small);
color: var(--fg-muted);
font-size: 0.85em;
}
.cutNotice {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1-5);
color: var(--fg-muted);
}
.lineBreak {
color: var(--fg-muted);
}
.cellEditor {
min-width: 0;
height: 24px;
padding: 0 5px;
border: 1px solid var(--focus-ring);
background: var(--bg-input);
color: var(--fg);
font: inherit;
outline: none;
}
.cellCheckbox {
flex-shrink: 0;
margin: 0 6px 0 0;
}
/* ---- Tool windows ------------------------------------------------------------ */
.view {
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
}
.resultTabs {
padding-inline: var(--space-2);
}
.toolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-0-5);
min-height: 32px;
padding: var(--space-0-5) var(--space-2);
flex: none;
border-bottom: 1px solid var(--border);
}
.spacer {
flex: 1;
}
.fill {
flex: 1;
min-height: 0;
}
/* A console's request in flight; the previous result stays below it. */
.executing {
flex: none;
display: flex;
align-items: center;
gap: var(--space-2);
min-width: 0;
padding: var(--space-1) var(--space-3);
border-bottom: 1px solid var(--border);
color: var(--fg-muted);
font-size: var(--fs-small);
}
.executingText {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.executingTime {
flex: none;
font-variant-numeric: tabular-nums;
}
/* Gives way before the name does. */
.treeDetail {
color: var(--fg-muted);
margin-left: 6px;
min-width: 0;
flex-shrink: 100;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* IDEA: counts after folders, column types in a smaller grey face, key rows in grey. */
.treeCount {
color: var(--fg-muted);
font-size: var(--fs-small);
}
.treeType {
color: var(--fg-muted);
font-size: var(--fs-small);
letter-spacing: 0.02em;
}
.keyLabel {
color: var(--fg-secondary);
white-space: nowrap;
}
.treeError {
color: var(--danger);
}
.nodeIcon {
position: relative;
display: inline-flex;
flex: none;
}
/* On the data source icon's bottom-right corner, like IDEA's. */
.connectedDot {
position: absolute;
right: -2px;
bottom: -1px;
width: 4px;
height: 4px;
box-sizing: content-box;
border-radius: 50%;
background: var(--db-connected);
border: 0.5px solid var(--db-connected-ring);
}
/* The schema count of a data source (IDEA draws it in a small frame). */
.treeBadge {
padding: 0 4px;
line-height: 14px;
font-size: var(--fs-small);
color: var(--fg-muted);
border: 1px solid var(--border);
border-radius: var(--radius-small);
}
.introspectionTrigger {
display: inline-flex;
flex: none;
}
.introspectionCount {
display: inline-flex;
align-items: center;
padding: 0 var(--space-1);
background: transparent;
color: var(--fg-secondary);
border: 1px solid var(--border);
border-radius: var(--radius-small);
font: inherit;
font-size: var(--fs-small);
line-height: 16px;
}
.introspectionCount:hover,
.introspectionCount:focus-visible,
.introspectionCount[aria-expanded="true"] {
color: var(--fg-strong);
border-color: var(--accent);
}
.introspectionPopup {
display: flex;
flex-direction: column;
width: min(276px, calc(100vw - 24px));
padding: var(--space-2);
gap: var(--space-2);
}
.introspectionModes,
.introspectionNames {
display: grid;
align-content: start;
gap: var(--space-1);
}
.introspectionNames {
max-height: min(220px, 40vh);
overflow: auto;
padding: var(--space-1);
border-block: 1px solid var(--border);
}
.introspectionActions {
display: flex;
justify-content: flex-end;
gap: var(--space-2);
}
.textTool {
flex: none;
height: 20px;
padding: 0 3px;
border-radius: var(--radius-small);
font-size: var(--fs-small);
font-weight: 500;
letter-spacing: 0.02em;
color: var(--fg-strong);
}
.textTool:not(:disabled):hover {
background: var(--bg-toolbar-hover);
}
.textTool:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: -2px;
}
.textTool:disabled {
opacity: 0.4;
cursor: default;
}
.dbView {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
.dbToolbar {
min-height: 32px;
flex: none;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-0-5);
padding: var(--space-0-5) var(--space-2);
}
.dbToolbarSep {
flex: none;
width: 1px;
height: 16px;
margin: 0 4px;
background: var(--border);
}
.treeHost {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
/* Data source colours are stronger than file colours. */
--row-tint-strength: var(--tint-strength);
}
.treeHost > * {
flex: 1;
min-height: 0;
}
.nodeRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
min-width: 0;
}
.nodeLabel {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Results. */
.error {
margin: 0;
padding: 8px;
color: var(--danger);
font-family: var(--font-mono);
font-size: var(--fs-code);
white-space: pre-wrap;
-webkit-user-select: text;
user-select: text;
}
/* Console toolbar panel above SQL editors. */
.consoleBar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-0-5);
min-height: 32px;
padding: var(--space-0-5) var(--space-2);
background: var(--bg-editor);
border-bottom: 1px solid var(--border);
font-family: var(--font-ui);
font-size: var(--fs-ui);
color: var(--fg-secondary);
}
.consoleSchema {
display: inline-flex;
align-items: center;
gap: var(--space-1);
padding-inline: var(--space-2);
}
/* Inline statement errors in consoles. */
:global(.cm-openidea-db-error) {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-color: var(--danger);
text-underline-offset: 3px;
}
/* Table editor. */
/* The table editor's WHERE | ORDER BY row (IDEA). */
.filterBar {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
flex: none;
border-bottom: 1px solid var(--border);
}
.filterField {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-1-5);
padding: 0 var(--space-2);
color: var(--fg-muted);
font-family: var(--font-mono);
font-size: var(--fs-small);
white-space: nowrap;
}
.filterField + .filterField {
border-left: 1px solid var(--border);
}
.filterField:focus-within {
box-shadow: inset 0 -1px var(--focus-ring);
}
.filterField:has(input[aria-invalid="true"]) {
box-shadow: inset 0 -1px var(--danger);
}
.notice {
padding: var(--space-1) var(--space-2);
font-size: var(--fs-small);
color: var(--fg-secondary);
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
}
/* Dialogs. */
.form {
display: grid;
grid-template-columns: fit-content(40%) minmax(0, 1fr);
align-items: center;
gap: var(--space-2) var(--space-3);
min-width: 0;
padding: 14px;
overflow-wrap: anywhere;
}
.form > * {
min-width: 0;
}
.formLabel {
color: var(--fg-secondary);
text-align: right;
}
.dialogText {
padding: 14px;
max-width: 420px;
line-height: 1.5;
}
.formHint {
font-size: var(--fs-small);
color: var(--fg-muted);
}
.jdbcJars {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--space-2);
}
.jdbcJars ul {
width: 100%;
max-height: 160px;
overflow: auto;
margin: 0;
padding: 0;
list-style: none;
}
.jdbcJars li {
display: flex;
align-items: center;
gap: var(--space-2);
}
.jdbcJars li span {
flex: 1;
min-width: 0;
overflow-wrap: anywhere;
}
.jdbcDetails {
grid-column: 1 / -1;
margin: 0;
}
.jdbcDetails dt {
margin-top: var(--space-2);
color: var(--fg-secondary);
}
.jdbcDetails dd {
margin: var(--space-1) 0;
overflow-wrap: anywhere;
}
.jdbcDetails ul {
margin: 0;
padding-left: var(--space-4);
}
.formFull {
grid-column: 1 / -1;
}
.paramInput {
font-family: var(--openidea-editor-font, var(--font-mono));
font-weight: var(--fw-code);
}
.formRow {
display: flex;
gap: var(--space-2);
align-items: center;
}
.formRow[hidden],
.formLabel[hidden] {
display: none;
}
/* Data source dialog. */
.sourceLayout {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto;
height: clamp(220px, calc(100dvh - 150px), 560px);
}
.sourceLayout .form {
grid-template-columns: minmax(112px, 19%) minmax(0, 1fr);
align-content: start;
padding: var(--space-3) var(--space-4);
}
.sourceLayout .formLabel {
text-align: left;
}
.sourceLayout .formRow {
flex-wrap: wrap;
}
.sourceLayout .formRow > .fill {
flex: 1 1 160px;
}
.sourcePanel {
overflow: auto;
}
.formSection {
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: var(--space-2);
color: var(--fg-strong);
}
.formSection::after {
content: "";
flex: 1;
height: 1px;
background: var(--border);
}
.formWide {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.portInput {
width: 80px;
}
.secondsInput {
width: 72px;
}
.narrowSelect {
min-width: 140px;
}
.segmented {
display: inline-flex;
justify-self: start;
border-radius: var(--radius-control, 4px);
box-shadow: inset 0 0 0 1px var(--border-button);
}
.segmented button {
height: var(--h-field, 28px);
padding: 0 14px;
border: 0;
border-radius: inherit;
background: transparent;
color: var(--fg);
font: inherit;
}
.segmented button[aria-pressed="true"] {
background: var(--bg-tab-selected);
box-shadow: inset 0 0 0 1px var(--border-tab-selected);
color: var(--fg-strong);
}
.segmented button:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: -2px;
}
.textArea {
width: 100%;
min-height: 64px;
resize: vertical;
padding: 6px 8px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-control, 4px);
background: var(--bg-input);
color: var(--fg-editor, var(--fg-strong));
font-family: var(--font-mono);
font-size: var(--fs-code);
line-height: 1.5;
}
.textArea:focus {
outline: none;
border-color: var(--accent);
}
.linkButton {
justify-self: start;
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.linkButton:hover {
text-decoration: underline;
}
.colorValue {
display: inline-flex;
align-items: center;
gap: var(--space-1-5);
}
.colorSwatch {
width: 12px;
height: 12px;
border-radius: 3px;
}
.namePicker {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
}
.nameList {
display: flex;
flex-direction: column;
gap: var(--space-1);
max-height: 180px;
overflow: auto;
padding-left: 22px;
}
.propertyTable {
display: flex;
flex-direction: column;
gap: var(--space-1);
}
.propertyHead,
.propertyRow {
display: grid;
grid-template-columns: 1fr 1fr 24px;
align-items: center;
gap: var(--space-1-5);
}
.propertyHead {
color: var(--fg-secondary);
font-size: var(--fs-small);
}
.testResult {
font-size: var(--fs-small);
max-height: 25vh;
padding: var(--space-2) var(--space-4);
overflow: auto;
overflow-wrap: anywhere;
border-top: 1px solid var(--border);
}
.testResult:empty {
padding: 0;
border: 0;
}
.ok {
color: var(--success);
}
.bad {
color: var(--danger);
}
:global(.cm-openidea-db-doc) {
margin: 0;
font-family: var(--openidea-editor-font, var(--font-mono));
font-weight: var(--fw-code);
font-size: var(--fs-code);
color: var(--fg-editor, var(--fg-strong));
white-space: pre;
}
/* ---- Console output and results (Services › Database) ---------------------- */
.toolbarSeparator {
width: 1px;
height: 16px;
margin: 0 4px;
background: var(--border);
flex: none;
}
.output {
flex: 1;
min-height: 0;
overflow: auto;
padding: 4px 8px;
font-family: var(--openidea-editor-font, var(--font-mono));
font-weight: var(--fw-code);
font-size: var(--fs-code);
line-height: 1.5;
color: var(--fg-editor, var(--fg-strong));
background: var(--bg-editor);
-webkit-user-select: text;
user-select: text;
cursor: default;
}
.outputLine {
white-space: pre-wrap;
word-break: break-word;
cursor: text;
}
.outputTime {
color: var(--link);
}
.outputPrompt {
color: var(--fg-secondary);
}
.outputStatement {
color: var(--fg-editor, var(--fg-strong));
}
.outputError,
.outputError .outputTime {
color: var(--danger);
}
.gridHost {
position: relative;
}
.resultSource {
color: var(--fg-muted);
font-size: var(--fs-small);
padding-right: 4px;
}
/* Console run feedback: timing after a statement, gutter check / error, error banner. */
:global(.cm-openidea-db-executing) {
background: var(--accent-soft);
}
/* The range the console's next run would submit (DataGrip's current-statement border). */
:global(.cm-openidea-db-preview) {
box-sizing: border-box;
background: color-mix(in srgb, var(--accent) 8%, transparent);
border: 1px solid var(--accent);
border-radius: 3px;
}
:global(.cm-openidea-db-elapsed) {
font-variant-numeric: tabular-nums;
}
:global(.cm-openidea-db-timing) {
margin-left: 1.5em;
color: var(--fg-muted);
font-family: var(--font-ui);
font-size: var(--fs-small);
user-select: none;
}
:global(.cm-openidea-db-gutter) {
width: 16px;
}
:global(.cm-openidea-db-gutter .cm-gutterElement) {
display: flex;
align-items: center;
justify-content: center;
}
:global(.cm-openidea-db-run-ok svg) {
color: var(--success);
}
:global(.cm-openidea-db-banner) {
display: flex;
align-items: center;
gap: var(--space-2);
min-height: 28px;
padding: 0 6px 0 10px;
background: color-mix(in srgb, var(--danger) 10%, var(--bg-editor));
border-top: 1px solid var(--border);
color: var(--fg-strong);
font-family: var(--font-ui);
font-size: var(--fs-ui);
}
:global(.cm-openidea-db-banner-text) {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:global(.cm-openidea-db-banner-close) {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border: none;
border-radius: var(--radius-small);
background: transparent;
color: var(--fg-secondary);
cursor: pointer;
}
/* Parameter info in `VALUES (…)`. */
:global(.cm-openidea-db-params) {
padding: 4px 8px;
font-family: var(--font-ui);
font-size: var(--fs-ui);
color: var(--fg-secondary);
}
:global(.cm-openidea-db-param-current) {
font-weight: 700;
color: var(--fg-strong);
}
.dialogTabs {
padding: 0 10px;
border-bottom: 1px solid var(--border);
}
/* Object dialogs (Rename, Confirm Drop, Modify Table) and Quick Documentation. */
.dialogBody {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;
min-width: 440px;
}
.dialogLead {
line-height: 1.5;
}
.formLabelLeft {
color: var(--fg-secondary);
}
.previewBlock {
display: flex;
flex-direction: column;
gap: var(--space-1);
min-width: 0;
}
.previewTitle {
font-size: var(--fs-small);
color: var(--fg-secondary);
}
/* SQL types (INT, VARCHAR) read as keywords, as in the SQL editor. */
.sqlPreview :global(.tok-typeName),
.codeText :global(.tok-typeName) {
color: var(--syn-keyword);
}
.sqlPreview {
margin: 0;
padding: 8px 10px;
min-height: 48px;
max-height: 220px;
overflow: auto;
font-family: var(--openidea-editor-font, var(--font-mono));
font-weight: var(--fw-code);
font-size: var(--fs-small);
line-height: 1.5;
white-space: pre;
color: var(--fg-editor);
background: var(--bg-editor);
border: 1px solid var(--border);
border-radius: var(--radius-small);
-webkit-user-select: text;
user-select: text;
}
.modifyBody {
display: flex;
flex-direction: column;
gap: var(--space-2);
height: clamp(320px, 68vh, 560px);
padding: var(--space-4);
}
.modifyMain {
flex: 1;
display: grid;
grid-template-columns: minmax(108px, 34%) minmax(0, 1fr);
min-height: 0;
border: 1px solid var(--border);
border-radius: var(--radius-small);
overflow: hidden;
}
.modifyBody > .previewBlock {
flex: 0 0 38%;
min-height: 0;
}
.modifyBody .sqlPreview {
flex: 1;
min-height: 0;
max-height: none;
}
.modifyColumns {
display: flex;
flex-direction: column;
min-height: 0;
border-right: 1px solid var(--border);
}
.modifyToolbar {
display: flex;
gap: var(--space-0-5);
padding: 2px 4px;
border-bottom: 1px solid var(--border);
}
.modifyList {
flex: 1;
overflow: auto;
padding: 2px 0;
}
.modifyItem {
display: flex;
align-items: center;
gap: var(--space-1-5);
height: 24px;
padding: 0 8px;
cursor: default;
white-space: nowrap;
}
.modifyItem:hover {
background: var(--bg-hover);
}
.modifyItem[aria-selected="true"] {
background: var(--bg-selected);
}
.modifyItem[data-dropped] .nodeLabel {
text-decoration: line-through;
color: var(--fg-muted);
}
.modifyProps {
display: grid;
grid-template-columns: minmax(0, 27%) minmax(0, 1fr);
align-content: start;
align-items: center;
gap: var(--space-2) var(--space-3);
padding: 12px;
overflow: auto;
}
.modifyProps .formLabel {
text-align: left;
overflow-wrap: anywhere;
}
.quickDoc {
width: 460px;
max-width: calc(100vw - 32px);
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.quickDocRows {
margin: 0;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
}
.quickDocRows > div {
display: flex;
gap: var(--space-1-5);
}
.quickDocRows dt {
font-weight: 600;
color: var(--fg-strong);
}
.quickDocRows dd {
margin: 0;
-webkit-user-select: text;
user-select: text;
}
.quickDocLinks {
display: flex;
justify-content: flex-start;
}
/* Result views: grid + Record / Value / Aggregates panel. */
.dataView {
display: flex;
height: 100%;
min-height: 0;
}
.headerFilter {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
padding: 0;
border: 0;
border-radius: var(--radius-small);
background: transparent;
color: var(--fg-muted);
cursor: pointer;
}
.headerFilter:hover {
background: var(--bg-hover);
}
.headerFilterOn {
color: var(--accent);
}
.filterPill {
position: absolute;
right: 12px;
bottom: 12px;
display: flex;
gap: var(--space-2);
align-items: center;
padding: 3px 10px;
border: 1px solid var(--border);
border-radius: var(--radius-small);
background: var(--bg-popup);
color: var(--fg-secondary);
font-size: var(--fs-small);
box-shadow: var(--shadow-popup);
}
.filterPillClear {
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
/* Go to Column (ColumnsPopup.tsx). */
.columnsPopup {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
width: 320px;
padding: 8px;
}
.columnsList {
height: min(320px, 50vh);
}
.columnsRow {
display: flex;
flex: 1;
align-items: center;
gap: var(--space-1-5);
min-width: 0;
white-space: nowrap;
}
.filterPopup {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
width: 280px;
padding: 8px;
}
.filterValues {
max-height: 260px;
overflow: auto;
}
.filterValue {
display: flex;
align-items: center;
gap: var(--space-1-5);
min-height: var(--h-row);
}
.filterValue > :first-child {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.filterCount {
color: var(--fg-muted);
font-size: var(--fs-small);
}
.filterEmpty {
padding: 12px;
color: var(--fg-muted);
text-align: center;
}
.filterButtons {
display: flex;
flex-wrap: wrap;
gap: var(--space-1-5);
}
.sidePanel {
flex: none;
display: flex;
flex-direction: column;
width: clamp(160px, 38%, 300px);
max-width: 50%;
min-height: 0;
border-left: 1px solid var(--border);
}
.sidePanelHead {
display: flex;
align-items: center;
padding-right: 4px;
border-bottom: 1px solid var(--border);
}
.sidePanelBody {
flex: 1;
min-height: 0;
overflow: auto;
}
.recordFields {
display: flex;
flex-direction: column;
gap: var(--space-2);
padding: 8px;
}
.recordField {
display: flex;
flex-direction: column;
gap: var(--space-1);
}
.recordLabel {
display: flex;
align-items: center;
gap: var(--space-1);
color: var(--fg-secondary);
}
.valueView {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
height: 100%;
padding: 8px;
box-sizing: border-box;
}
.valueText {
flex: 1;
min-height: 120px;
resize: none;
padding: 6px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-input);
color: var(--fg-strong);
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
}
.valueText:focus,
.recordText:focus {
outline: none;
border-color: var(--focus-ring);
}
/* The JSON value editor's host (#2333): the CodeMirror view fills it. */
.valueEditor {
flex: 1;
min-height: 120px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-input);
color: var(--fg-strong);
overflow: hidden;
}
.valueEditor > :global(.cm-editor) {
height: 100%;
font-size: var(--fs-code);
}
.valueError {
color: var(--danger);
font-size: var(--fs-code);
overflow-wrap: anywhere;
}
.valueWindowBody {
height: 100%;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
gap: var(--space-1-5);
overflow: hidden;
}
.valueWindowBody .valueEditor {
min-height: 160px;
}
.recordText {
resize: vertical;
padding: 3px 6px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-input);
color: var(--fg-strong);
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
-webkit-user-select: text;
user-select: text;
}
.aggregates {
width: 100%;
border-collapse: collapse;
}
.aggregates th,
.aggregates td {
padding: 4px 10px;
border-bottom: 1px solid var(--border);
text-align: left;
font-weight: normal;
}
.aggregates th {
color: var(--fg-secondary);
width: 40%;
}
.aggregates td {
font-family: var(--openidea-editor-font, var(--font-mono));
word-break: break-all;
}
/* Chart. */
.chartBar {
display: flex;
align-items: center;
gap: var(--space-1-5);
height: var(--h-header);
padding: 0 8px;
flex: none;
border-bottom: 1px solid var(--border);
}
.chartHost {
position: relative;
flex: 1;
min-height: 0;
overflow: hidden;
}
.chartSettings {
position: absolute;
top: 4px;
right: 8px;
}
.chartGrid {
stroke: var(--border);
}
.chartAxis {
stroke: var(--fg-muted);
}
.chartTick {
fill: var(--fg-muted);
font-size: 10px;
}
.chartAxisName {
fill: var(--fg-secondary);
font-size: var(--fs-small);
}
.chartBarMark {
fill: var(--chart-series);
fill-opacity: 0.9;
}
.chartBarMark:hover {
fill-opacity: 1;
}
.chartLine {
fill: none;
stroke: var(--chart-series);
stroke-width: 2;
}
.chartDot {
fill: var(--chart-series);
}
/* Query plan. */
.planView {
display: flex;
min-height: 0;
}
.planTree {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.planHeader,
.planRow {
display: grid;
grid-template-columns: minmax(160px, 1fr) 1fr;
gap: var(--space-3);
width: 100%;
}
.planHeader {
padding: 4px 8px;
border-bottom: 1px solid var(--border);
color: var(--fg-secondary);
}
.planOperation {
display: flex;
align-items: center;
gap: var(--space-1);
overflow: hidden;
text-overflow: ellipsis;
}
.planParams {
overflow: hidden;
text-overflow: ellipsis;
color: var(--fg-secondary);
}
.planProperties {
flex: none;
width: 320px;
align-self: flex-start;
border-collapse: collapse;
border-left: 1px solid var(--border);
}
.planProperties th,
.planProperties td {
padding: 4px 8px;
text-align: left;
font-weight: normal;
border-bottom: 1px solid var(--border);
word-break: break-word;
}
.planProperties th {
color: var(--fg-secondary);
}
/* Export / history / import dialogs. */
.exportDialog {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
gap: var(--space-4);
height: min(440px, 65vh);
min-height: 340px;
padding: var(--space-4);
}
.exportOptions {
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.exportOptions .formRow > input {
flex: 1;
}
.exportOptions .formLabel,
.exportPreview .formLabel {
text-align: left;
}
.exportPreview {
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
}
@media (max-width: 620px) {
.exportDialog {
grid-template-columns: minmax(0, 1fr);
height: auto;
}
.exportPreviewText {
height: 200px;
flex: none;
}
}
.exportPreviewText,
.historyPreview {
flex: 1;
min-height: 0;
}
.codePreview {
display: flex;
align-items: flex-start;
overflow: auto;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-editor);
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
line-height: 1.6;
}
.codeGutter {
position: sticky;
left: 0;
flex: none;
min-width: 36px;
min-height: 100%;
padding: 8px 10px 8px 8px;
border-right: 1px solid var(--border);
background: var(--bg-editor);
color: var(--fg-muted);
text-align: right;
user-select: none;
}
.codeText {
flex: 1;
margin: 0;
padding: 8px 10px;
color: var(--fg-editor, var(--fg-strong));
font: inherit;
white-space: pre;
user-select: text;
}
.historyDialog {
display: flex;
gap: var(--space-3);
height: 440px;
padding: 14px;
}
.historyList {
display: flex;
flex-direction: column;
gap: var(--space-1-5);
width: 300px;
flex: none;
min-height: 0;
}
.historyItem {
display: flex;
gap: var(--space-2);
align-items: baseline;
width: 100%;
min-width: 0;
}
.historyText {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--openidea-editor-font, var(--font-mono));
}
.importPreview {
max-height: 200px;
margin: 0 14px 14px;
overflow: auto;
border: 1px solid var(--border);
border-radius: var(--radius-control);
}
.importPreview table {
border-collapse: collapse;
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
}
.importPreview td {
padding: 2px 8px;
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
.importHeader td {
color: var(--fg-strong);
font-weight: 600;
}
.sqlCompletion {
width: 300px;
max-height: 240px;
padding: 4px;
}
.sqlCompletionOption {
display: flex;
gap: var(--space-3);
align-items: center;
width: 100%;
padding: 4px 8px;
text-align: left;
}
.sqlCompletionOption[aria-selected="true"],
.sqlCompletionOption:hover {
background: var(--bg-toolbar-selected);
}
.sqlCompletionOption span {
flex: 1;
}
.sqlCompletionOption small {
color: var(--fg-muted);
}
.sqlInputWrap {
position: relative;
flex: 1;
min-width: 0;
overflow: hidden;
}
.sqlInputWrap > input {
width: 100%;
position: relative;
}
.sqlInputText {
color: transparent !important;
caret-color: var(--fg-strong);
}
/* The input's own glyphs are transparent so the highlight layer below paints them; without
this the selection would be an empty highlight. */
.sqlInputText::selection {
background: var(--bg-editor-selection);
color: var(--fg-strong);
}
.sqlHighlight {
position: absolute;
inset: 0;
overflow: hidden;
white-space: pre;
pointer-events: none;
display: flex;
align-items: center;
font-family: var(--font-mono);
font-size: var(--fs-ui);
color: var(--fg-strong);
}
/* The input's scroll width includes room for the caret; match it so both stop at the same scrollLeft. */
.sqlHighlight::after {
content: "";
flex: none;
width: 2px;
}
/* Wrap large values instead of laying megabytes out as one line. */
.largeCellEditor {
display: block;
box-sizing: border-box;
width: 100%;
height: min(60vh, 480px);
padding: 8px;
font: inherit;
color: inherit;
background: inherit;
white-space: pre-wrap;
overflow-wrap: anywhere;
resize: vertical;
}
/* The grid beside the Record / Value / Aggregates panel, under its search bar. */
.dataMain {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
/* IDEA's search bar above a result grid. */
.gridSearch {
flex: none;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-1);
padding: 4px 8px;
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
font-size: var(--fs-ui);
}
.gridSearchField {
flex: 0 1 320px;
min-width: min(100%, 160px);
}
.gridSearchCount {
font-family: var(--font-mono);
font-size: var(--fs-small);
color: var(--fg-subtle);
padding: 0 6px;
white-space: nowrap;
min-width: 56px;
}
.gridSearchNone {
color: var(--danger);
}
.cellMatch {
background: var(--bg-text-search-result);
}
.cellMatchCurrent {
background: var(--bg-text-search-result-current);
}
.pagerDock {
flex: none;
display: flex;
justify-content: center;
padding: var(--space-1) var(--space-2) var(--space-2);
background: var(--bg-editor);
}
.resultPager {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 100%;
gap: var(--space-0-5);
padding: 2px 4px;
border: 1px solid var(--border-popup, var(--border));
border-radius: var(--radius-popup);
background: var(--bg-popup, var(--bg-elev));
color: var(--fg-secondary);
font-size: var(--fs-small);
box-shadow: var(--shadow-popup, none);
white-space: nowrap;
}
.resultPagerRange {
padding: 0 6px;
}
.resultPagerCount {
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.resultPagerCount:disabled {
color: inherit;
cursor: default;
}
/* In-Editor Results: a result set under its statement in the console. */
:global(.cm-openidea-db-inline) {
padding: var(--space-1) 0 var(--space-2);
cursor: default;
}
.inlineResult {
position: relative;
display: flex;
flex-direction: column;
max-width: 100%;
border: 1px solid var(--border);
border-radius: var(--radius-control);
overflow: hidden;
background: var(--bg-editor);
font-family: var(--font-ui);
font-size: var(--fs-ui);
line-height: normal;
white-space: normal;
}
.inlineResult > :first-child {
flex: 1;
min-height: 0;
}
.inlineResize {
position: absolute;
inset: auto 0 0;
height: 5px;
cursor: row-resize;
}
/* Export with pg_dump / Restore with pg_restore or psql. */
.dumpChecks {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-1-5) var(--space-4);
}
.dumpPreview {
grid-column: 1 / -1;
flex: none;
height: 96px;
overflow: auto;
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-editor);
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.dumpRun {
display: flex;
flex-direction: column;
gap: var(--space-2);
padding: 14px;
}
.dumpLog {
height: 320px;
overflow: auto;
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg-editor);
font-family: var(--openidea-editor-font, var(--font-mono));
font-size: var(--fs-code);
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.dumpPath {
flex: 1;
min-width: 0;
}
.dumpStatus {
flex: 1;
display: flex;
flex-direction: column;
gap: var(--space-0-5);
min-width: 0;
}
.dumpRoute {
color: var(--fg-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dumpError {
color: var(--danger);
}
.jdbcJarPath {
overflow-wrap: anywhere;
}