346 lines
6.2 KiB
CSS
346 lines
6.2 KiB
CSS
.root {
|
|
--json-tree-property: #881391;
|
|
--json-tree-string: #c41a16;
|
|
--json-tree-number: #1c00cf;
|
|
--json-tree-keyword: #1c00cf;
|
|
--json-tree-punctuation: #202124;
|
|
--json-tree-icon: #5f6368;
|
|
--json-tree-hover: rgb(60 64 67 / 4%);
|
|
|
|
min-width: 0;
|
|
overflow: auto;
|
|
position: relative;
|
|
color: var(--dsw-alias-label-primary);
|
|
background: var(--dsw-alias-bg-layer-1);
|
|
font: 12px/16px var(--ds-font-family-code);
|
|
overscroll-behavior-x: contain;
|
|
overscroll-behavior-y: auto;
|
|
}
|
|
|
|
:global(body[data-ds-dark-theme]) .root {
|
|
--json-tree-property: #5db0d7;
|
|
--json-tree-string: #f28b82;
|
|
--json-tree-number: #99c8ff;
|
|
--json-tree-keyword: #99c8ff;
|
|
--json-tree-punctuation: #e8eaed;
|
|
--json-tree-icon: #9aa0a6;
|
|
--json-tree-hover: rgb(232 234 237 / 5%);
|
|
}
|
|
|
|
.container {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
min-width: 0;
|
|
margin: 0;
|
|
padding: 6px 8px 8px 8px;
|
|
white-space: pre;
|
|
}
|
|
|
|
.expandedTopLevel {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
min-width: 0;
|
|
padding: 6px 8px 8px 14px;
|
|
}
|
|
|
|
.expandedTopLevel:has(> .topLevelBracket[data-json-root-row]:hover),
|
|
.expandedTopLevel:has(> .topLevelBracket[data-json-root-row][data-json-copy-active]) {
|
|
background: var(--json-tree-hover);
|
|
}
|
|
|
|
.expandedTopLevelContainer {
|
|
padding: 0;
|
|
}
|
|
|
|
.row.topLevelBracket {
|
|
margin-left: 0;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.children {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.row {
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
min-width: 0;
|
|
min-height: 16px;
|
|
margin: 0;
|
|
padding: 0 0 0 10px;
|
|
list-style: none;
|
|
overflow-wrap: anywhere;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.row:not(.topLevelBracket):hover:not(:has(.row:hover))::after,
|
|
.row:not(.topLevelBracket)[data-json-copy-active]::after,
|
|
.row:has(> .expander:focus-visible)::after {
|
|
position: absolute;
|
|
z-index: 0;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
height: var(--json-tree-row-height, 16px);
|
|
background: var(--json-tree-hover);
|
|
content: '';
|
|
pointer-events: none;
|
|
}
|
|
|
|
.row > span:not(.expander, .copySlot) {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.label {
|
|
margin-right: 3px;
|
|
color: var(--json-tree-property);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.clickableLabel {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.stringValue {
|
|
color: var(--json-tree-string);
|
|
}
|
|
|
|
.stringField {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flow-root;
|
|
}
|
|
|
|
.stringText {
|
|
display: block;
|
|
max-height: calc(var(--json-tree-collapsed-lines) * 16px);
|
|
padding-left: 12px;
|
|
overflow: hidden;
|
|
text-indent: -12px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.stringRaw {
|
|
margin: 4px 0 0 12px;
|
|
overflow: auto;
|
|
color: var(--dsw-alias-label-primary);
|
|
font: inherit;
|
|
overflow-wrap: normal;
|
|
white-space: pre;
|
|
word-break: normal;
|
|
}
|
|
|
|
.stringActions {
|
|
position: absolute;
|
|
top: 1px;
|
|
right: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 4px;
|
|
width: fit-content;
|
|
height: 16px;
|
|
}
|
|
|
|
.stringRaw[data-wrap='true'] {
|
|
overflow-wrap: anywhere;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.stringActions > .copySlot {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.stringToggleSlot {
|
|
display: flex;
|
|
float: right;
|
|
align-items: flex-end;
|
|
height: calc(var(--json-tree-collapsed-lines) * 16px);
|
|
margin-left: 2px;
|
|
shape-outside: inset(calc((var(--json-tree-collapsed-lines) - 1) * 16px) 0 0);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.stringToggle {
|
|
display: inline-flex;
|
|
align-items: baseline;
|
|
gap: 2px;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
color: var(--dsw-alias-label-secondary);
|
|
background: transparent;
|
|
font: inherit;
|
|
text-indent: 0;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.stringToggle:hover {
|
|
color: var(--dsw-alias-label-primary);
|
|
}
|
|
|
|
.stringToggle:focus-visible {
|
|
outline: 1px solid var(--dsw-alias-state-business-primary);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
.row:has(> .stringField) {
|
|
--json-tree-row-height: 100%;
|
|
}
|
|
|
|
.summary {
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.numberValue {
|
|
color: var(--json-tree-number);
|
|
}
|
|
|
|
.keywordValue {
|
|
color: var(--json-tree-keyword);
|
|
}
|
|
|
|
.otherValue {
|
|
color: var(--dsw-alias-label-secondary);
|
|
}
|
|
|
|
.punctuation {
|
|
color: var(--json-tree-punctuation);
|
|
}
|
|
|
|
.preview {
|
|
color: var(--json-tree-punctuation);
|
|
}
|
|
|
|
.previewProperty {
|
|
color: var(--json-tree-punctuation);
|
|
}
|
|
|
|
.previewEllipsis {
|
|
color: var(--dsw-alias-label-tertiary);
|
|
}
|
|
|
|
.copySlot {
|
|
display: inline-flex;
|
|
width: 20px;
|
|
height: 16px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.row > .copySlot {
|
|
position: absolute;
|
|
z-index: 2;
|
|
top: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.row:has(> .stringField) > .copySlot {
|
|
top: auto;
|
|
bottom: 0;
|
|
}
|
|
|
|
.row:has(> .copySlot) > .stringField .stringToggleSlot {
|
|
padding-right: 24px;
|
|
}
|
|
|
|
.row:hover:not(:has(.row:hover)) > .copySlot,
|
|
.row[data-json-copy-active] > .copySlot,
|
|
.copySlot:focus-within {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.actionButton {
|
|
box-sizing: border-box;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 20px;
|
|
height: 16px;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 3px;
|
|
color: var(--dsw-alias-label-secondary);
|
|
background: transparent;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.actionButton:hover {
|
|
color: var(--dsw-alias-label-primary);
|
|
}
|
|
|
|
.actionButton[aria-pressed='true'] {
|
|
color: var(--dsw-alias-state-business-primary);
|
|
}
|
|
|
|
.actionButton:focus-visible {
|
|
outline: 1px solid var(--dsw-alias-state-business-primary);
|
|
outline-offset: -1px;
|
|
}
|
|
|
|
.actionButton[data-state='failed'] {
|
|
color: var(--dsw-alias-state-error-primary);
|
|
}
|
|
|
|
.expander {
|
|
position: absolute;
|
|
z-index: 2;
|
|
top: 0;
|
|
left: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
box-sizing: border-box;
|
|
width: 8px;
|
|
height: 16px;
|
|
margin: 0;
|
|
color: var(--json-tree-icon);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.expander::before {
|
|
width: 0;
|
|
height: 0;
|
|
border-top: 4px solid transparent;
|
|
border-bottom: 4px solid transparent;
|
|
border-left: 6px solid currentColor;
|
|
content: '';
|
|
transform: scale(0.75);
|
|
transform-origin: 33.333% center;
|
|
}
|
|
|
|
.collapseIcon::before {
|
|
transform: rotate(90deg) scale(0.75);
|
|
}
|
|
|
|
.expander:hover {
|
|
color: var(--dsw-alias-label-primary);
|
|
}
|
|
|
|
.expander:focus-visible {
|
|
outline: none;
|
|
}
|
|
|
|
.collapsedContent {
|
|
margin: 0 1px;
|
|
color: var(--json-tree-punctuation);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.collapsedContent::after {
|
|
content: '…';
|
|
}
|