UI and a Lisp experiment
This commit is contained in:
parent
38ff06ea45
commit
f55b437037
24 changed files with 2746 additions and 89 deletions
51
src/styles/base.css
Normal file
51
src/styles/base.css
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
:root {
|
||||
color-scheme: dark;
|
||||
|
||||
--hue: 248;
|
||||
--bg: oklch(14% 0.018 var(--hue));
|
||||
--panel: oklch(18% 0.016 var(--hue));
|
||||
--panel-raised: oklch(22% 0.018 var(--hue));
|
||||
--border: oklch(33% 0.02 var(--hue));
|
||||
--border-strong: oklch(46% 0.035 var(--hue));
|
||||
--text: oklch(91% 0.012 var(--hue));
|
||||
--text-muted: oklch(68% 0.018 var(--hue));
|
||||
--text-faint: oklch(52% 0.018 var(--hue));
|
||||
--accent: oklch(76% 0.08 var(--hue));
|
||||
--accent-bg: oklch(30% 0.04 var(--hue));
|
||||
--error: oklch(73% 0.14 28);
|
||||
--error-bg: oklch(25% 0.045 28);
|
||||
--source-highlight: oklch(34% 0.06 var(--hue));
|
||||
|
||||
--font-ui: Inter, ui-sans-serif, system-ui, sans-serif;
|
||||
--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
|
||||
--font-codepoint: "SFMono-Regular", Consolas, "Liberation Mono", "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", monospace;
|
||||
--text-xs: 0.75rem;
|
||||
--text-sm: 0.875rem;
|
||||
--text-md: 1rem;
|
||||
--text-lg: 1.125rem;
|
||||
|
||||
--gap-1: 0.25rem;
|
||||
--gap-2: 0.5rem;
|
||||
--gap-3: 0.75rem;
|
||||
--gap-4: 1rem;
|
||||
--gap-5: 1.5rem;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 1200px;
|
||||
min-height: 100vh;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
font-family: var(--font-ui);
|
||||
font-size: var(--text-md);
|
||||
}
|
||||
|
||||
button,
|
||||
textarea {
|
||||
font: inherit;
|
||||
}
|
||||
99
src/styles/layout.css
Normal file
99
src/styles/layout.css
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
.app-shell {
|
||||
display: grid;
|
||||
grid-template-columns: var(--left-width) 0.45rem var(--middle-width) 0.45rem minmax(360px, 1fr);
|
||||
gap: var(--gap-2);
|
||||
height: 100vh;
|
||||
padding: var(--gap-4);
|
||||
}
|
||||
|
||||
.pane {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--panel);
|
||||
}
|
||||
|
||||
.pane-splitter {
|
||||
position: relative;
|
||||
min-width: 0.45rem;
|
||||
cursor: col-resize;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.pane-splitter::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: calc(50% - 1px);
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.pane-splitter:hover::before,
|
||||
.pane-splitter:active::before {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.is-resizing-pane {
|
||||
cursor: col-resize;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.pane-header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--gap-3);
|
||||
padding: var(--gap-3) var(--gap-4);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.pane-header h1 {
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 650;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.pane-detail,
|
||||
.item-meta,
|
||||
.section-label {
|
||||
color: var(--text-muted);
|
||||
font-size: var(--text-xs);
|
||||
}
|
||||
|
||||
.source-input {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
resize: none;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
padding: var(--gap-4);
|
||||
color: var(--text);
|
||||
background: var(--panel);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-sm);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.scroll-stack,
|
||||
.expr-list,
|
||||
.source-grid-shell {
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.scroll-stack,
|
||||
.expr-list {
|
||||
padding: var(--gap-3);
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: var(--gap-4);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
118
src/styles/source-grid.css
Normal file
118
src/styles/source-grid.css
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
.source-grid-shell {
|
||||
--cell-width: 0.78rem;
|
||||
--cell-height: 1.42rem;
|
||||
--gutter-size: 3.25rem;
|
||||
|
||||
padding: var(--gap-3);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
|
||||
.grid-status {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 4;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--gap-4);
|
||||
min-width: max-content;
|
||||
padding: 0 0 var(--gap-3);
|
||||
color: var(--text-muted);
|
||||
background: var(--panel);
|
||||
font-family: var(--font-ui);
|
||||
font-size: var(--text-xs);
|
||||
}
|
||||
|
||||
.source-grid {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.source-grid-row {
|
||||
display: grid;
|
||||
grid-template-columns: var(--gutter-size) repeat(var(--max-column), var(--cell-width));
|
||||
min-width: max-content;
|
||||
}
|
||||
|
||||
.row-header,
|
||||
.grid-cell {
|
||||
width: var(--cell-width);
|
||||
height: var(--cell-height);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: var(--cell-height);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.row-header {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
width: var(--gutter-size);
|
||||
justify-content: flex-end;
|
||||
padding-right: var(--gap-2);
|
||||
color: var(--text-faint);
|
||||
background: var(--panel);
|
||||
font-size: var(--text-xs);
|
||||
}
|
||||
|
||||
.grid-cell {
|
||||
position: relative;
|
||||
color: var(--text);
|
||||
border: 1px solid transparent;
|
||||
font-family: var(--font-codepoint);
|
||||
font-size: var(--text-sm);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.grid-cell-space,
|
||||
.grid-cell-tab,
|
||||
.grid-cell-newline,
|
||||
.grid-cell-carriage-return,
|
||||
.grid-cell-combining-mark,
|
||||
.grid-cell-format,
|
||||
.grid-cell-control {
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.grid-cell-format,
|
||||
.grid-cell-control {
|
||||
font-family: var(--font-ui);
|
||||
font-size: 0.55rem;
|
||||
}
|
||||
|
||||
.grid-cell-combining-mark {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.grid-cell.is-annotated {
|
||||
color: var(--text);
|
||||
background: var(--source-highlight);
|
||||
}
|
||||
|
||||
.grid-cell.is-hover-row,
|
||||
.grid-cell.is-hover-column {
|
||||
background: oklch(25% 0.026 var(--hue));
|
||||
}
|
||||
|
||||
.grid-cell.is-annotated.is-hover-row,
|
||||
.grid-cell.is-annotated.is-hover-column {
|
||||
background: oklch(39% 0.064 var(--hue));
|
||||
}
|
||||
|
||||
.grid-cell.is-hover-cell {
|
||||
z-index: 1;
|
||||
color: var(--bg);
|
||||
border-color: var(--accent);
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.zero-span-marker {
|
||||
z-index: 2;
|
||||
align-self: stretch;
|
||||
justify-self: start;
|
||||
width: 2px;
|
||||
margin-left: -1px;
|
||||
background: var(--accent);
|
||||
pointer-events: none;
|
||||
}
|
||||
66
src/styles/syntax-pane.css
Normal file
66
src/styles/syntax-pane.css
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
.section-label {
|
||||
margin: var(--gap-2) 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.error-list,
|
||||
.expr-list,
|
||||
.list-children {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--gap-2);
|
||||
}
|
||||
|
||||
.error-card,
|
||||
.expr-node {
|
||||
border: 1px solid var(--border);
|
||||
background: var(--panel-raised);
|
||||
}
|
||||
|
||||
.error-card {
|
||||
padding: var(--gap-3);
|
||||
border-color: oklch(42% 0.05 28);
|
||||
background: var(--error-bg);
|
||||
}
|
||||
|
||||
.expr-node {
|
||||
padding: var(--gap-2);
|
||||
}
|
||||
|
||||
.error-card:hover,
|
||||
.expr-node:hover {
|
||||
border-color: var(--border-strong);
|
||||
background: var(--accent-bg);
|
||||
}
|
||||
|
||||
.item-title,
|
||||
.node-kind {
|
||||
color: var(--text);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.node-kind {
|
||||
display: inline-flex;
|
||||
min-width: 4.5rem;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.node-value {
|
||||
color: var(--text);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
|
||||
.list-node-header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--gap-2);
|
||||
}
|
||||
|
||||
.list-children {
|
||||
margin-top: var(--gap-2);
|
||||
padding-left: var(--gap-3);
|
||||
border-left: 1px solid var(--border);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue