747 lines
12 KiB
CSS
747 lines
12 KiB
CSS
:root {
|
|
color-scheme: light dark;
|
|
--page: #f2f5f2;
|
|
--surface: #ffffff;
|
|
--surface-soft: #f7f9f7;
|
|
--surface-strong: #e8eeea;
|
|
--ink: #18201c;
|
|
--muted: #68736c;
|
|
--line: #d8dfda;
|
|
--accent: #176b4a;
|
|
--accent-soft: #dceee5;
|
|
--accent-ink: #0f5137;
|
|
--warning: #9a640b;
|
|
--warning-soft: #fff3d7;
|
|
--danger: #a33a3a;
|
|
--danger-soft: #fde9e7;
|
|
--shadow: 0 18px 55px rgba(32, 50, 40, 0.08);
|
|
font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-width: 320px;
|
|
background:
|
|
radial-gradient(circle at 8% 3%, rgba(23, 107, 74, 0.1), transparent 25rem),
|
|
var(--page);
|
|
color: var(--ink);
|
|
}
|
|
|
|
button,
|
|
input,
|
|
select,
|
|
textarea {
|
|
font: inherit;
|
|
}
|
|
|
|
button {
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.48;
|
|
}
|
|
|
|
.demo-shell {
|
|
width: min(1440px, calc(100% - 40px));
|
|
margin: 0 auto;
|
|
padding: 38px 0 60px;
|
|
}
|
|
|
|
.page-header {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: space-between;
|
|
gap: 24px;
|
|
margin-bottom: 22px;
|
|
}
|
|
|
|
.eyebrow {
|
|
margin: 0 0 8px;
|
|
color: var(--accent);
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.12em;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
p {
|
|
margin-top: 0;
|
|
}
|
|
|
|
h1 {
|
|
margin-bottom: 10px;
|
|
font-size: clamp(30px, 4vw, 48px);
|
|
line-height: 1.05;
|
|
letter-spacing: -0.045em;
|
|
}
|
|
|
|
.page-intro {
|
|
max-width: 720px;
|
|
margin-bottom: 0;
|
|
color: var(--muted);
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.secondary-button,
|
|
.primary-button {
|
|
min-height: 42px;
|
|
border-radius: 11px;
|
|
padding: 0 17px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.secondary-button {
|
|
border: 1px solid var(--line);
|
|
background: var(--surface);
|
|
color: var(--ink);
|
|
}
|
|
|
|
.primary-button {
|
|
border: 1px solid var(--accent);
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.safety-note {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 20px;
|
|
border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
|
|
border-radius: 14px;
|
|
padding: 12px 16px;
|
|
background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
|
|
color: var(--accent-ink);
|
|
}
|
|
|
|
.safety-note > span {
|
|
display: grid;
|
|
width: 28px;
|
|
height: 28px;
|
|
place-items: center;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.safety-note p {
|
|
margin: 0;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.workspace-grid {
|
|
display: grid;
|
|
grid-template-columns: minmax(320px, 0.75fr) minmax(560px, 1.55fr);
|
|
gap: 20px;
|
|
align-items: start;
|
|
}
|
|
|
|
.configuration-panel,
|
|
.preview-section,
|
|
.parser-section {
|
|
border: 1px solid var(--line);
|
|
border-radius: 20px;
|
|
background: var(--surface);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.configuration-panel {
|
|
padding: 22px;
|
|
}
|
|
|
|
.experiment-panel {
|
|
display: grid;
|
|
gap: 20px;
|
|
}
|
|
|
|
.preview-section,
|
|
.parser-section {
|
|
padding: 22px;
|
|
}
|
|
|
|
.section-heading {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.section-heading > span {
|
|
display: grid;
|
|
width: 30px;
|
|
height: 30px;
|
|
place-items: center;
|
|
border-radius: 9px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent-ink);
|
|
font-size: 12px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.section-heading h2 {
|
|
margin: 0;
|
|
font-size: 19px;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.compact-heading {
|
|
margin-top: 28px;
|
|
}
|
|
|
|
.field-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 14px;
|
|
}
|
|
|
|
.field {
|
|
display: grid;
|
|
gap: 7px;
|
|
}
|
|
|
|
.field-wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.field > span,
|
|
.intent-alias-field > span {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.field small {
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
input,
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
border: 1px solid var(--line);
|
|
border-radius: 10px;
|
|
background: var(--surface-soft);
|
|
color: var(--ink);
|
|
outline: none;
|
|
transition: border-color 150ms ease, box-shadow 150ms ease;
|
|
}
|
|
|
|
input,
|
|
select {
|
|
min-height: 40px;
|
|
padding: 0 11px;
|
|
}
|
|
|
|
textarea {
|
|
resize: vertical;
|
|
padding: 12px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
|
|
}
|
|
|
|
.capability-editor {
|
|
display: grid;
|
|
gap: 12px;
|
|
}
|
|
|
|
.capability-definition {
|
|
border-top: 1px solid var(--line);
|
|
padding-top: 14px;
|
|
}
|
|
|
|
.capability-definition:first-child {
|
|
border-top: 0;
|
|
padding-top: 0;
|
|
}
|
|
|
|
.capability-title {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.capability-title strong {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.capability-title code {
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.toggle-label {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.toggle-label input {
|
|
width: 16px;
|
|
min-height: 16px;
|
|
accent-color: var(--accent);
|
|
}
|
|
|
|
.intent-list {
|
|
display: grid;
|
|
gap: 9px;
|
|
}
|
|
|
|
.intent-alias-field {
|
|
display: grid;
|
|
grid-template-columns: 72px 1fr;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.intent-alias-field input {
|
|
min-height: 36px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.schema-details {
|
|
margin-top: 20px;
|
|
border-top: 1px solid var(--line);
|
|
padding-top: 16px;
|
|
}
|
|
|
|
.schema-details summary {
|
|
color: var(--accent);
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
}
|
|
|
|
pre {
|
|
overflow: auto;
|
|
margin: 12px 0 0;
|
|
border-radius: 12px;
|
|
padding: 15px;
|
|
background: #17231d;
|
|
color: #d8e6dd;
|
|
font: 12px/1.65 "SFMono-Regular", Consolas, monospace;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.pipeline {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 9px;
|
|
min-height: 54px;
|
|
padding: 10px 16px;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.pipeline span {
|
|
border: 1px solid var(--line);
|
|
border-radius: 999px;
|
|
padding: 7px 11px;
|
|
background: var(--surface);
|
|
color: var(--ink);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.pipeline i {
|
|
color: var(--accent);
|
|
font-style: normal;
|
|
}
|
|
|
|
.device-card {
|
|
position: relative;
|
|
overflow: hidden;
|
|
border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
|
|
border-radius: 18px;
|
|
padding: 20px;
|
|
background:
|
|
linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 70%, var(--surface)), var(--surface) 52%);
|
|
}
|
|
|
|
.device-card::after {
|
|
position: absolute;
|
|
right: -50px;
|
|
top: -70px;
|
|
width: 180px;
|
|
height: 180px;
|
|
border-radius: 50%;
|
|
background: color-mix(in srgb, var(--accent) 9%, transparent);
|
|
content: "";
|
|
}
|
|
|
|
.device-card-header {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 14px;
|
|
}
|
|
|
|
.device-identity {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.device-icon {
|
|
display: grid;
|
|
width: 48px;
|
|
height: 48px;
|
|
place-items: center;
|
|
border-radius: 15px;
|
|
background: var(--accent);
|
|
color: #fff;
|
|
font-size: 22px;
|
|
}
|
|
|
|
.device-identity h3 {
|
|
margin: 0 0 4px;
|
|
font-size: 21px;
|
|
}
|
|
|
|
.device-identity p {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.connection-state {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
color: var(--accent-ink);
|
|
}
|
|
|
|
.connection-state i,
|
|
.result-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
}
|
|
|
|
.readout-grid {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 10px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.readout-grid div {
|
|
border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
|
|
border-radius: 12px;
|
|
padding: 12px;
|
|
background: color-mix(in srgb, var(--surface) 84%, transparent);
|
|
}
|
|
|
|
.readout-grid span,
|
|
.card-control span {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.readout-grid strong {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.card-controls {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 12px;
|
|
}
|
|
|
|
.card-control input,
|
|
.card-control select {
|
|
background: color-mix(in srgb, var(--surface) 88%, transparent);
|
|
}
|
|
|
|
.card-control output {
|
|
float: right;
|
|
color: var(--accent);
|
|
font-size: 12px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.card-control input[type="range"] {
|
|
min-height: auto;
|
|
padding: 0;
|
|
accent-color: var(--accent);
|
|
}
|
|
|
|
.card-footnote {
|
|
position: relative;
|
|
z-index: 1;
|
|
margin: 15px 0 0;
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.example-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.example-row button,
|
|
.text-button {
|
|
border: 0;
|
|
background: transparent;
|
|
color: var(--accent);
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.example-row button {
|
|
border-radius: 999px;
|
|
padding: 7px 10px;
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
.command-composer {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
gap: 10px;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.command-composer textarea {
|
|
min-height: 64px;
|
|
}
|
|
|
|
.result-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin: 14px 0;
|
|
border-radius: 13px;
|
|
padding: 13px 15px;
|
|
background: var(--surface-soft);
|
|
}
|
|
|
|
.result-banner[data-status="success"] {
|
|
background: var(--accent-soft);
|
|
color: var(--accent-ink);
|
|
}
|
|
|
|
.result-banner[data-status="warning"] {
|
|
background: var(--warning-soft);
|
|
color: var(--warning);
|
|
}
|
|
|
|
.result-banner[data-status="error"] {
|
|
background: var(--danger-soft);
|
|
color: var(--danger);
|
|
}
|
|
|
|
.result-banner[data-status="warning"] .result-dot {
|
|
background: var(--warning);
|
|
}
|
|
|
|
.result-banner[data-status="error"] .result-dot {
|
|
background: var(--danger);
|
|
}
|
|
|
|
.result-banner strong {
|
|
display: block;
|
|
margin-bottom: 3px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.result-banner p {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.result-grid {
|
|
display: grid;
|
|
grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.15fr);
|
|
gap: 14px;
|
|
}
|
|
|
|
.trace-panel,
|
|
.payload-panel {
|
|
min-width: 0;
|
|
border: 1px solid var(--line);
|
|
border-radius: 14px;
|
|
padding: 15px;
|
|
}
|
|
|
|
.trace-panel h3,
|
|
.payload-heading h3 {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.trace-panel ol {
|
|
display: grid;
|
|
gap: 12px;
|
|
margin: 15px 0 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
counter-reset: trace;
|
|
}
|
|
|
|
.trace-panel li {
|
|
position: relative;
|
|
min-height: 30px;
|
|
padding-left: 34px;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
counter-increment: trace;
|
|
}
|
|
|
|
.trace-panel li::before {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
display: grid;
|
|
width: 24px;
|
|
height: 24px;
|
|
place-items: center;
|
|
border-radius: 8px;
|
|
background: var(--surface-strong);
|
|
color: var(--ink);
|
|
content: counter(trace);
|
|
font-size: 11px;
|
|
font-weight: 800;
|
|
}
|
|
|
|
.trace-panel li[data-state="success"]::before {
|
|
background: var(--accent-soft);
|
|
color: var(--accent-ink);
|
|
}
|
|
|
|
.trace-panel li[data-state="error"]::before {
|
|
background: var(--danger-soft);
|
|
color: var(--danger);
|
|
}
|
|
|
|
.trace-panel li strong {
|
|
display: block;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.payload-heading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.payload-panel pre {
|
|
min-height: 216px;
|
|
max-height: 360px;
|
|
}
|
|
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--page: #111713;
|
|
--surface: #19211c;
|
|
--surface-soft: #202923;
|
|
--surface-strong: #29342d;
|
|
--ink: #edf4ef;
|
|
--muted: #a4b1a8;
|
|
--line: #354139;
|
|
--accent: #58b98a;
|
|
--accent-soft: #243f32;
|
|
--accent-ink: #bdebd3;
|
|
--warning: #f2c873;
|
|
--warning-soft: #463b23;
|
|
--danger: #f0a09a;
|
|
--danger-soft: #4b2928;
|
|
--shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
|
|
}
|
|
|
|
.primary-button,
|
|
.device-icon,
|
|
.safety-note > span {
|
|
color: #102019;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 980px) {
|
|
.workspace-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.demo-shell {
|
|
width: min(100% - 24px, 1440px);
|
|
padding-top: 24px;
|
|
}
|
|
|
|
.page-header {
|
|
align-items: flex-start;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.pipeline {
|
|
justify-content: flex-start;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.pipeline span {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.field-grid,
|
|
.card-controls,
|
|
.result-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.field-wide {
|
|
grid-column: auto;
|
|
}
|
|
|
|
.readout-grid {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
|
|
.command-composer {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|