Ai slop
Some checks failed
Build and Deploy Nuxt / build (push) Failing after 41s

This commit is contained in:
2026-10-03 14:13:08 +02:00
parent 68b74eb60b
commit 6df7950161
45 changed files with 4594 additions and 125 deletions

View File

@@ -273,12 +273,12 @@
// The link map and the graphing calculator are pages too: the search popup
// lays one of them on the book beside the articles (ToolPane.vue). It fills
// the page edge to edge — no column of prose scrolls here, the surface keeps
// its own docks and toolbars — and it takes the whole share of the desk, a
// plane being no narrower read than a page of text. Each stage's own sheet
// answers for the rest (_graph.scss, _calculator.scss).
// its own docks and toolbars — and it is held to the very width an article
// page is (the .book-pane rules: --pane-max-w, and the whole desk when it is
// the only page open). Each stage's own sheet answers for the rest
// (_graph.scss, _calculator.scss).
.book-pane.pane-tools {
max-width: none;
overflow: hidden;
}

View File

@@ -115,8 +115,9 @@
font: italic 0.95rem/1 'Computer Modern', Georgia, serif;
}
// a relation or point carries no lone "y =", so it sheds the gutter and the
// input takes back the room it stood in
// only a field that reads as a function wears the "y =" gutter; everything
// else — a relation, point, slider, or unfinished text — is bare, and the
// input takes back the room the gutter stood in
.calc-input-box.bare .calc-input {
padding-left: 10px;
}
@@ -134,6 +135,77 @@
&.input-error { color: var(--danger); }
}
// The typeset echo of the field's text (Desmos' way): while the reader
// types, the formula sets on its own line under the text; once the field
// rests, it takes the text's place beside the "y =" gutter, so the dock
// reads as mathematics. A click wakes the text again (the box is a label);
// the input only steps out of sight, never out of the tab order — and
// Tab waking it draws the text back. An expression that does not read
// carries no echo, so it stays plain text and red, as ever.
.calc-typeset {
display: none;
color: var(--text);
.katex { font-size: 1rem; }
}
.calc-input-box.typeset {
flex-wrap: wrap;
.calc-typeset { display: block; }
// typing: the echo takes a line of its own, under the field
&:focus-within .calc-typeset {
flex: 0 0 100%;
padding: 0 10px 8px;
}
// at rest: the field folds away and the formula stands in its place
&:not(:focus-within) {
.calc-input {
flex: none;
width: 0;
min-width: 0;
padding: 0;
opacity: 0;
}
.calc-typeset {
flex: 1;
min-width: 0;
padding: 8px 10px;
overflow-x: auto;
}
}
}
// A row that declared a variable ("k", "k = 3"). Once the reader stops
// editing it, the field folds away to nothing — the name and value now live
// in the slider laid in its place (see .calc-vars.is-inline). The input stays
// mounted and focusable (never display:none), so the slider's name can be a
// label that wakes it back to edit the declaration; a focused field stands
// open as any other. This is how a made variable reads as just a slider, not
// a "k = 3" box above a slider.
.calc-input-box.var-decl:not(:focus-within) {
flex: 0 0 0;
min-width: 0;
overflow: hidden;
border-color: transparent;
background: transparent;
.calc-input {
width: 0;
min-width: 0;
padding: 0;
}
}
// while the declaration's text is awake, its inline slider steps aside — the
// field is the whole row again
.calc-input-box.var-decl:focus-within ~ .calc-vars.is-inline {
display: none;
}
.calc-remove:hover {
color: var(--danger);
background: color-mix(in srgb, var(--danger) 10%, transparent);
@@ -148,6 +220,86 @@
.calc-add { margin-top: 12px; }
// free variables ("k", "a", "radius") — each slider hangs just under the
// row that claims it. The name sets like the maths it names; the drag does
// the rough work, the field the fine
.calc-vars {
display: flex;
flex-direction: column;
gap: 4px;
margin: 5px 0 2px;
padding: 0;
list-style: none;
}
.calc-var {
display: flex;
align-items: center;
gap: 8px;
}
.calc-var-name {
flex: none;
min-width: 1.5ch;
color: var(--text);
font: italic 0.98rem/1 'Computer Modern', Georgia, serif;
}
// the name of a made variable is the door back to its declaration: it is a
// label for the folded field, so clicking it wakes "k = 3" to be edited
.calc-var-name.editable {
padding: 1px 2px;
border-radius: 4px;
cursor: text;
&:hover { background: var(--surface-2); }
}
// a made variable's slider laid in the row in place of its field: no hanging
// margin, the drag takes the room the field used to hold
.calc-vars.is-inline {
flex: 1;
min-width: 0;
margin: 0;
gap: 0;
}
.calc-var-range {
flex: 1;
min-width: 0;
accent-color: var(--accent);
}
.calc-var-number {
flex: none;
width: 58px;
min-width: 0;
padding: 3px 6px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--bg-elev);
color: var(--text);
font: 0.8rem/1.3 'Computer Modern', Georgia, serif;
font-variant-numeric: tabular-nums;
// no spinners on the slider's little twin — the drag is the spinner
-moz-appearance: textfield;
appearance: textfield;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
appearance: none;
margin: 0;
}
&:focus {
outline: none;
border-color: var(--accent);
box-shadow: var(--ring);
}
}
// the fold: the dock slides out to the left, under the app sidebar, and a
// quiet card takes its place at the plane's top-left corner
.calc-dock-enter-active,
@@ -195,6 +347,131 @@
box-shadow: var(--shadow-sm);
}
// the 3D scene hangs its toolbar from a wrapper so the configuration
// card can fold out under it: the wrapper takes the corner, the row
// keeps its look on the hinge
.plot-tools {
position: absolute;
top: 10px;
right: 12px;
z-index: 2;
.plot-toolbar { position: static; }
// the configuration button while its card is open, the graph menu's way
.panel-icon-btn.open { color: var(--text); background: var(--surface-2); }
}
// the configuration card: the space the surfaces stand in — each edge
// editable, the height by default the surfaces' own, the mesh's fineness
.plot-config {
@include dropdown-panel($z: 20, $overflow: visible);
right: 0;
min-width: 250px;
padding: 10px 12px;
}
.plot-config-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 18px;
padding: 3px 0;
}
.plot-config-axis {
color: var(--muted);
font: italic 13px 'Computer Modern', Georgia, serif;
}
.plot-config-label {
color: var(--muted);
font-size: 0.8rem;
font-weight: 600;
}
.plot-config-value {
color: var(--text);
font: 0.82rem/1.3 'Computer Modern', Georgia, serif;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.plot-config-bounds {
display: flex;
align-items: center;
gap: 6px;
}
.plot-config-dots {
color: var(--faint);
}
.plot-config-input {
width: 68px;
min-width: 0;
padding: 4px 7px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--surface);
color: var(--text);
font: 0.82rem/1.2 'Computer Modern', Georgia, serif;
font-variant-numeric: tabular-nums;
&:focus {
outline: none;
border-color: var(--accent);
box-shadow: var(--ring);
}
}
// the switch that decides whose height z answers to: the surfaces' or
// the reader's own two bounds
.plot-config-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
margin-top: 7px;
padding: 7px 0 5px;
border-top: 1px solid var(--border);
color: var(--muted);
font-size: 0.74rem;
line-height: 1.35;
text-align: left;
&:hover { color: var(--text); }
}
.plot-config-switch {
position: relative;
flex: none;
width: 32px;
height: 18px;
border-radius: 999px;
background: var(--border-strong);
transition: background-color 0.15s;
.knob {
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--bg-elev);
box-shadow: var(--shadow-sm);
transition: transform 0.15s ease;
}
&.on {
background: var(--accent);
.knob { transform: translateX(14px); }
}
}
// where the cursor stands, bottom-right so the dock never covers it
.plot-readout {
position: absolute;
@@ -246,6 +523,8 @@
.plot-toolbar { top: 8px; right: 8px; }
.plot-tools { top: 8px; right: 8px; }
// during the fold the dock lifts out of the flow, so the plane takes the
// width back at once rather than after the slide
.calc-dock-leave-active { position: absolute; left: 0; right: 0; }

View File

@@ -0,0 +1,271 @@
@use 'mixins' as *;
// ---------- Lean editor (/lean) ----------
// The wiki's own Lean workbench. On the /lean address it owns the space
// beside the sidebar the way the map and the plane do — fixed, edge to
// edge. In a book pane it becomes the pane's own box instead.
// (The page transition only fades, so no transform steals the
// fixed positioning.)
.lean-stage {
position: fixed;
inset: 0 0 0 var(--sidebar-w);
transition: left 0.22s ease;
z-index: 1;
background: var(--bg);
}
.pane-stage .lean-stage {
position: absolute;
inset: 0;
}
// editor left, infoview right — the workbench of every Lean editor, in
// the wiki's own materials. The fold closes the panel's track and the
// editor takes the whole width.
.lean-work {
position: absolute;
inset: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) 340px;
transition: grid-template-columns 0.22s ease;
}
.lean-work[data-panel='collapsed'] {
grid-template-columns: minmax(0, 1fr) 0;
}
.lean-work-editor {
position: relative;
min-width: 0;
background: var(--surface);
}
.lean-work-panel {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
border-left: 1px solid var(--border);
background: var(--bg-elev);
overflow: hidden;
visibility: visible;
transition: opacity 0.18s ease, visibility 0s;
}
.lean-work[data-panel='collapsed'] .lean-work-panel {
opacity: 0;
visibility: hidden;
// out of sight and out of the reader's way — only after the track closes
transition: opacity 0.18s ease, visibility 0s 0.22s;
}
// status row: whose Lean, doing what, and the door to the classic client
.lean-work-status {
display: flex;
align-items: center;
gap: 8px;
padding: 9px 12px;
border-bottom: 1px solid var(--border);
font-size: 0.74rem;
color: var(--muted);
.lean-work-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--faint);
flex-shrink: 0;
}
&[data-phase='ready'] .lean-work-dot { background: var(--success); }
&[data-phase='lost'] .lean-work-dot { background: var(--danger); }
&[data-phase='connecting'] .lean-work-dot,
&[data-phase='initializing'] .lean-work-dot { background: var(--accent); }
// elaborating: the amber pulse every Lean editor wears while working
&[data-busy='true'] .lean-work-dot {
background: #d97706;
animation: lean-pulse 1s ease-in-out infinite;
}
[data-theme='dark'] &[data-busy='true'] .lean-work-dot { background: #f5a83c; }
}
@keyframes lean-pulse {
50% { opacity: 0.35; }
}
.lean-work-phase {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// the status row's two quiet doors: the classic client outside, and the fold
.lean-work-classic,
.lean-work-collapse {
display: grid;
place-items: center;
width: 24px;
height: 24px;
border-radius: 7px;
color: var(--faint);
transition: color 0.15s ease, background 0.15s ease;
&:hover {
color: var(--text);
background: var(--surface-2);
}
}
.lean-work-classic {
margin-left: auto;
}
// the panes below: Goals and Messages, the wiki's own infoview
.lean-work-goals,
.lean-work-messages {
padding: 10px 12px 14px;
overflow-y: auto;
min-height: 0;
h3 {
margin: 0 0 8px;
font-size: 0.66rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--faint);
}
pre {
margin: 0 0 8px;
padding: 9px 11px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
color: var(--text);
font-family: ui-monospace, 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Menlo, Consolas, monospace;
font-size: 0.78rem;
line-height: 1.55;
white-space: pre-wrap;
word-break: break-word;
}
}
.lean-work-goals { flex: 1 1 55%; }
.lean-work-messages {
flex: 1 1 45%;
border-top: 1px solid var(--border);
}
.lean-work-messages ul {
list-style: none;
margin: 0;
padding: 0;
li { position: relative; }
}
.lean-work-msg-line {
font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
font-size: 0.66rem;
color: var(--faint);
}
.lean-work-none {
margin: 0;
font-size: 0.8rem;
color: var(--faint);
}
// the fold's other half: while the panel lies collapsed, this quiet card
// waits at the editor's top-right corner to pull the infoview back
.lean-panel-open {
position: absolute;
top: 10px;
right: 12px;
z-index: 2;
display: flex;
align-items: center;
gap: 6px;
padding: 7px 12px;
border: 1px solid var(--border);
border-radius: 11px;
background: color-mix(in srgb, var(--bg-elev) 84%, transparent);
backdrop-filter: blur(10px);
box-shadow: var(--shadow-sm);
color: var(--muted);
font-size: 0.84rem;
font-weight: 650;
white-space: nowrap;
transition: color 0.15s, background-color 0.15s;
&:hover { color: var(--text); background: var(--surface-2); }
}
// until Lean answers — and when the server is not there at all — the
// wiki speaks for the editor
.lean-state {
position: absolute;
inset: 0;
z-index: 1;
display: grid;
place-items: center;
align-content: center;
gap: 14px;
padding: 24px;
background: var(--bg);
.banner { width: min(520px, 100%); }
}
.lean-spinner {
width: 22px;
height: 22px;
border-radius: 50%;
border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
border-top-color: var(--accent);
animation: lean-spin 0.7s linear infinite;
}
@keyframes lean-spin {
to { transform: rotate(1turn); }
}
.lean-loading-text {
margin: 0;
font-size: 0.86rem;
color: var(--muted);
}
// small screens: the panel lies under the editor instead of beside it —
// and collapses into the bottom edge the same way
@media (max-width: 900px) {
.lean-work {
grid-template-columns: none;
grid-template-rows: minmax(0, 1fr) minmax(0, 40%);
transition: grid-template-rows 0.22s ease;
}
.lean-work[data-panel='collapsed'] {
grid-template-columns: none;
grid-template-rows: minmax(0, 1fr) minmax(0, 0%);
}
.lean-work-panel {
border-left: 0;
border-top: 1px solid var(--border);
}
}
@media (prefers-reduced-motion: reduce) {
.lean-stage { transition: none; }
.lean-work { transition: none; }
.lean-work-panel { transition: opacity 0.01s ease, visibility 0s; }
.lean-work[data-panel='collapsed'] .lean-work-panel { transition: opacity 0.01s ease, visibility 0s; }
.lean-spinner { animation-duration: 1.4s; }
.lean-work-status[data-busy='true'] .lean-work-dot { animation: none; }
}

View File

@@ -27,4 +27,5 @@
@use 'book'; // the reader: an open book of article pages
@use 'graph'; // the link map
@use 'calculator'; // the graphing calculator: function rows + the plane
@use 'lean'; // the Lean editor: a frame over the lean4web server (lean/)
@use 'transitions'; // route fades, scrollbars