Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 18,830 Bytes
f530297 1d4419b f530297 82cdb59 f530297 82cdb59 89af3b2 82cdb59 f530297 89af3b2 f530297 82cdb59 f530297 1d4419b f530297 1d4419b f530297 1d4419b f530297 82cdb59 f530297 82cdb59 f530297 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | /* ---------------------------------------------------------------------------
styles/wave50/sheet.css β the Sheet RAIL and the Sheet LOADER (wave 50 Β· W50-T17).
Imported by `sheet/SheetPage.tsx`, beside `styles/wave49/sheet.css`, the same way
`styles/wave45/agent-operator.css` is imported by `connectors/ConnectorsPage.tsx`: from the
surface that needs it, never from a global entry.
ββ THIS FILE IS DELIBERATELY TINY, AND THAT IS THE TICKET. Owner instruction 20 says the
Sheet rail must be EXACTLY the Data rail, so `SheetRail.tsx` renders the Data rail's own
classes (`cg-views`, `cg-view-row`, `cg-view-main`, `cg-view-more`, `cg-fold`, `cg-fold-head`,
`cg-fold-toggle`, `cg-data-create`, `cg-create-new`, `cg-find-view`, `cg-segmented-path`,
`cg-path-*`), every one of which is declared at TOP LEVEL and UNSCOPED in `index.css` and
therefore already applies inside a `.sheet-page` subtree. Anything restated here would be a
SECOND definition of a shipped measure, and the two would drift apart the first time one of
them was touched. What is left is only what the shared vocabulary has no class for.
β THE LOADING CLASSES ARE NOT DEFINED HERE EITHER, ON PURPOSE. `.shell-rail-skeleton*` live
in `shell/navExtras.css`, which `shell/NavExtras.tsx` imports, which `shell/Shell.tsx` imports
statically, which `App.tsx` renders unconditionally, so those rules are in the bundle whenever
the app is; `.cg-loading` and `.lp-spin--lg` are in `index.css`. Copying any of them here
would put the same rules in two chunks and let the rail's loading state drift from the shell's.
β TOKENS ONLY: no literal `font-size` (only `--lp-fs-*`), no literal colour, no literal
z-index. `verify_ui.py::font_literals` and `css_literals` scan the whole tree.
--------------------------------------------------------------------------- */
/* ββ W51-T09 (owner instruction 2) β TWO RULES WERE DELETED HERE, AND THE MEASUREMENT IS THE
REASON. Both rails were read with `getComputedStyle` at 1440x900 on `.cg-views`, `.cg-view-row`,
`.cg-view-main`, `.cg-create-new` and `.cg-find-view`. Every width, every padding, the font size,
weight, line height, family, colour, background and border already matched. THE WHOLE DIFFERENCE
WAS THREE PROPERTIES, and two of them were declared right here:
`.cg-views` gap sheet 4px data normal <- `.sheet-rail-views`
`.cg-view-row` min-height sheet auto data 0px <- `.sheet-rail-level`
`.cg-create-new` min-height sheet 0px data auto <- the slot rule below
β `.sheet-rail-views`'s OWN COMMENT WAS THE TRAP, and it is quoted here so nobody restores the
rule from it: it claimed the Data rail "gets its rhythm from margins its HOST supplies around
`children`". It does not. `.cg-create-new` carries `margin-top: 8px` and `.cg-find-view` carries
`margin: 0 2px 6px`, both at top level in `index.css`, and both already reach this rail. The gap
was a SECOND rhythm stacked on the shipped one.
β AND THE TWO `min-height` ROWS ARE NOT A STYLE CHOICE, THEY ARE CONTAINMENT. `min-height: auto`
resolves to the keyword for a FLEX ITEM and to `0px` for anything else, so each element's number
is decided by what kind of box its PARENT is. `.sheet-rail-level` made the row container a flex
column (rows computed `auto`; the Data rail's rows sit in a block `.cg-fold-root` and compute
`0px`), and the create slot was a block (the control computed `0px`; in Data it is a flex item of
`.cg-data-database-views` and computes `auto`). Deleting one rule and adding the other below puts
every one of the seventeen measured properties on both rails in agreement. */
/* The create door's SLOT, made the same kind of box the Data rail's is. Scoped to `.sheet-page` so
it is this page's arrangement and never the Data rail's: `.cg-data-create` is a shared class and
an unscoped `display` here would change a surface this lane does not own. */
.sheet-page .cg-data-create {
display: flex;
flex-direction: column;
}
/* β THE ACTIVE ROW'S MARK, RE-AIMED AT THE SHARED ROW CLASS. `styles/wave49/sheet.css` states
the same tone under `.sheet-view-row.is-active`, which was the rail's own row class before
this ticket adopted `.cg-view-row`. The icon rule itself (size, stroke, muted tone) is still
that file's and is NOT repeated; only the selector that could no longer match is restated. */
.cg-view-row.is-active .sheet-view-icon {
color: var(--lp-ink);
}
/* A starred workbook wears its mark inside the row, after the name. Filled rather than outlined
because it is a STATE, not an object: the outlined vocabulary in this rail all names things
(a workbook, a folder), and a filled mark reads as "on" without a second colour. */
.sheet-view-star {
flex: 0 0 auto;
width: 12px;
height: 12px;
fill: var(--cg-gold);
stroke: none;
}
/* ββ the loader (DESIGN.md 5) ββββββββββββββββββββββββββββββββββββββββββββββββ
β W50-T19 EMPTIED THIS RULE'S BODY, and the reason is that `.sheet-body` itself was wrong. It
was a flex ROW that centred its one child, so the loading state had to override the alignment,
the justification and the padding to fill the space. `.sheet-body` is now a stretched COLUMN
with no padding of its own, so all three overrides said what the base rule already says, and
`justify-content: stretch` is not even a value flexbox honours. What is still needed is the
ONE line below: the spinner must GROW, and `.cg-loading` does not claim that on its own. */
.sheet-body--loading .cg-loading {
flex: 1 1 auto;
min-height: 0;
}
/* ββ W50-T19: the formatting ribbon (amendment A1) βββββββββββββββββββββββββββββ
β TOKENS ONLY, and DESIGN.md 4's button reset in full: `border: 0`, transparent background,
`font: inherit`, `color: inherit`. A ribbon of native buttons is the loudest chrome in the app
if the reset is partial, because there are eighteen of them in a row.
β NO LITERAL `font-size` ANYWHERE BELOW (`verify_ui.py::font_literals` scans the whole tree),
and no literal z-index: the popover rides `--cg-z-menu`, the same layer as the cell bar. */
.sheet-ribbon {
--sheet-icon-navy: var(--lp-blue-deep); /* interactive and structural */
--sheet-icon-gold: var(--lp-yellow-deep); /* content and attention */
--sheet-icon-danger: var(--lp-red-deep); /* destructive only */
flex: 0 0 auto;
display: flex;
border-bottom: 1px solid var(--lp-line);
background: var(--lp-surface);
}
/* The worksheet tab strip borrows the ribbon class but is not a ribbon band. Exclude it so the
five ribbon tabs share one row shape without overriding the strip's own spacing. */
.sheet-ribbon:not(.sheet-tab-strip) {
background: var(--lp-surface-2);
--sheet-ribbon-band: 52px;
--sheet-ribbon-group-gap: 8px;
align-items: stretch;
gap: 0;
padding: 4px 8px;
}
.sheet-ribbon:not(.sheet-tab-strip) .sheet-ribbon-group {
justify-content: flex-start;
gap: var(--sheet-ribbon-group-gap);
}
.sheet-ribbon:not(.sheet-tab-strip) .sheet-ribbon-group-controls {
height: var(--sheet-ribbon-band);
}
.sheet-ribbon-btn {
appearance: none;
border: 0;
background: transparent;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
display: inline-flex;
align-items: center;
justify-content: center;
gap: 2px;
min-width: 26px;
height: 26px;
padding: 0 5px;
border-radius: var(--lp-r-sm);
cursor: pointer;
transition: background-color 150ms ease-out, opacity 150ms ease-out;
}
.sheet-ribbon-btn:hover:not(:disabled) {
background: var(--lp-line);
}
/* Blue is selection and an ON toggle is a selection (DESIGN.md 3). */
.sheet-ribbon-btn.is-on {
background: var(--lp-blue-tint);
}
.sheet-ribbon-btn:disabled {
opacity: 0.45;
cursor: default;
}
.sheet-ribbon-icon {
width: 15px;
height: 15px;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
stroke-linejoin: round;
}
.sheet-ribbon .sheet-ribbon-icon {
color: var(--sheet-icon-navy);
}
.sheet-ribbon-group[aria-label="Clipboard"] .sheet-ribbon-icon,
.sheet-ribbon-group[aria-label="Editing"] .sheet-ribbon-icon,
.sheet-ribbon-group[aria-label="Styles"] .sheet-ribbon-icon,
.sheet-ribbon-group[aria-label="Charts"] .sheet-ribbon-icon,
.sheet-ribbon-group[aria-label="Sparklines"] .sheet-ribbon-icon {
color: var(--sheet-icon-gold);
}
/* Match the group accent's selector weight so destructive red wins inside Editing. */
.sheet-ribbon-group .sheet-ribbon-icon.sheet-ribbon-icon--danger {
color: var(--sheet-icon-danger);
}
.sheet-ribbon-caret {
width: 11px;
height: 11px;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
color: var(--lp-muted);
}
/* β A LETTER IN A BUTTON IS TEXT, NOT AN ICON, and it is what a ribbon has always used for these
three. The weight, slant and rule below are the control saying what it does. */
.sheet-ribbon-glyph {
display: inline-block;
min-width: 13px;
font-size: var(--lp-fs-sm);
line-height: 1;
}
.sheet-ribbon-glyph.is-bold { font-weight: 700; }
.sheet-ribbon-glyph.is-italic { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.sheet-ribbon-glyph.is-underline { text-decoration: underline; text-underline-offset: 2px; }
.sheet-ribbon-label {
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
}
.sheet-ribbon-sep {
width: 1px;
height: 16px;
margin: 0 6px;
background: var(--lp-line);
}
.sheet-ribbon-slot {
position: relative;
display: inline-flex;
}
/* The popover carries its OWN surface: a transparent overlay above a canvas is unreadable
([[a-portal-overlay-carries-its-own-surface]]). */
.sheet-ribbon-pop {
position: absolute;
left: 0;
top: calc(100% + 4px);
z-index: var(--cg-z-menu);
min-width: 168px;
display: flex;
flex-direction: column;
gap: 1px;
padding: 5px;
border: 1px solid var(--lp-line-strong);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
box-shadow: 0 6px 18px rgba(25, 34, 46, 0.16);
animation: sheet-bar-in 150ms ease-out;
}
.sheet-ribbon-item {
appearance: none;
border: 0;
background: transparent;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
text-align: left;
padding: 5px 8px;
border-radius: var(--lp-r-sm);
cursor: pointer;
transition: background-color 150ms ease-out;
}
.sheet-ribbon-item:hover { background: var(--lp-surface-2); }
.sheet-ribbon-item.is-on { background: var(--lp-blue-tint); }
.sheet-ribbon-swatches {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 3px;
padding: 2px;
}
.sheet-ribbon-swatch {
appearance: none;
border: 0;
background: transparent;
font: inherit;
color: inherit;
display: inline-flex;
padding: 3px;
border-radius: var(--lp-r-sm);
cursor: pointer;
}
.sheet-ribbon-swatch:hover { background: var(--lp-surface-2); }
/* β A SWATCH IS A TOKEN-STYLED SPAN, NEVER A COLOURED GLYPH. The hue arrives as `var(--lp-*)`
from the component, so the palette stays the single source of every colour on this surface. */
.sheet-ribbon-chip {
width: 17px;
height: 17px;
border-radius: var(--lp-r-sm);
border: 1px solid var(--lp-line-strong);
}
.sheet-ribbon-row {
display: flex;
align-items: center;
gap: 5px;
padding: 5px 8px;
border-top: 1px solid var(--lp-line);
margin-top: 2px;
}
.sheet-ribbon-row-label {
flex: 1 1 auto;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-ribbon-step {
appearance: none;
border: 1px solid var(--lp-line);
background: var(--lp-surface);
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
padding: 2px 6px;
border-radius: var(--lp-r-sm);
cursor: pointer;
}
.sheet-ribbon-step:hover { background: var(--lp-blue-tint); }
.sheet-ribbon-count {
min-width: 14px;
text-align: center;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
/* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
W50-T21 β THE FORMULA BAR, AND THE BINDING EDITOR'S COLUMN LISTBOX.
ββ ALMOST NOTHING IS DECLARED HERE, AND THAT IS THE TICKET AGAIN. Both surfaces reuse the
DATA layer's own field-list vocabulary (`cg-type-search`, `cg-type-list`, `cg-type-row`,
`cg-type-label`, `cg-type-icon`) and the shared overlay surface (`cg-pop`, `cg-pop-wrap`),
every one of which is declared at TOP LEVEL and UNSCOPED in `index.css`. What is below is only
the geometry those classes have no opinion about: where the bar sits, and how wide the two
panels are.
β TOKENS ONLY: no literal font-size (only `--lp-fs-*`), no literal colour, no literal
z-index. `verify_ui.py::font_literals` and `css_literals` scan the whole tree.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
/* ββ `flex: 0 0 auto` IS LOAD BEARING AND IS NOT DECORATION. `.sheet-body` is a flex column
whose `.sheet-grid-wrap` child is `flex: 1 1 auto`; a bar that grew into the remaining space
would leave the grid at a measured height of ZERO, and glide's infinite scroller renders no
`<canvas>` at all at zero height rather than a clipped one. That is the exact failure
`styles/wave49/sheet.css` records fixing on both axes. This row takes its content height and
nothing more. */
/* ββ W51-T08 PINS THE ROW AT 32px, AND IT IS EDITED HERE RATHER THAN OVERRIDDEN FROM wave51.
`SheetPage.tsx` imports this file from inside a LAZY chunk while `styles/wave51/sheet-chrome.css`
arrives through `index.css` in the eager one, so an equal specificity override written there
would lose the cascade to this rule and the row would silently keep its old height. New classes
have no such fight and stay in wave51; a redeclaration of an existing one belongs here.
β `flex: 0 0 auto` STAYS INSIDE THIS BLOCK, and not only for the reason above it: a live
`verify_wiring` row matches `.sheet-fx {` forward to that exact declaration. */
.sheet-fx {
flex: 0 0 auto;
height: 32px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 16px;
border-bottom: 1px solid var(--lp-line);
background: var(--lp-surface);
}
.sheet-fx-addr {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 6px;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-fx-addr-label { flex: 0 0 auto; }
.sheet-fx-addr input {
width: 72px;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
padding: 3px 6px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
/* The `fx` mark, quiet by default like every other glyph in this chrome. */
.sheet-fx-mark {
flex: 0 0 auto;
display: inline-flex;
color: var(--lp-muted);
}
/* β `.cg-pop-wrap` IS `display: inline-flex` AND `position: relative`; the second is what the
suggestion panel anchors to, the first is why the width has to be stated here. */
.sheet-fx-field {
flex: 1 1 auto;
min-width: 0;
display: flex;
}
.sheet-fx-input {
flex: 1 1 auto;
min-width: 0;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
padding: 3px 8px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
.sheet-fx-input:read-only { color: var(--lp-muted); background: var(--lp-surface-2); }
/* β ABSOLUTE, UNDER THE CARET'S FIELD. `.cg-pop` carries the surface, the shadow and
`z-index: var(--cg-z-menu)`; only the placement is this file's business. */
.sheet-fx-pop {
position: absolute;
top: calc(100% + 4px);
left: 0;
max-height: 232px;
min-width: 260px;
animation: sheet-fx-in 140ms ease-out;
}
@keyframes sheet-fx-in {
from { opacity: 0; transform: translateY(-2px); }
to { opacity: 1; transform: none; }
}
.sheet-fx-cat {
margin-left: auto;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* Signature help. It shares the row with the input, so it is allowed to shrink away first. */
.sheet-fx-sig {
flex: 0 1 auto;
min-width: 0;
display: flex;
align-items: baseline;
gap: 6px;
overflow: hidden;
white-space: nowrap;
}
.sheet-fx-sig-name {
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
.sheet-fx-sig-note {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
overflow: hidden;
text-overflow: ellipsis;
}
.sheet-fx-note {
flex: 0 1 auto;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* ββ the binding editor's column picker ββββββββββββββββββββββββββββββββββββββββββββββββββββ */
.sheet-field--pick {
min-width: 0;
}
/* β RESTATED, BECAUSE `styles/wave49/sheet.css`'s `.sheet-field input` LOADS AFTER `index.css`
AND HAS THE SAME SPECIFICITY. Its border and padding are right for a standalone text field and
wrong inside `.cg-type-search`, which draws its own frame around the glyph and the input
together; without this the search box carries two borders. `.sheet-pick-search input` is
(0,2,1) and settles it by weight rather than by import order.
ββ W52-T14 β `padding: 0` WAS TOO WIDE A HAMMER. The rule only needs to strip the border and
background `.sheet-field input` adds; the LEFT padding is not that collision, it is the
27px reserve `index.css`'s own `.cg-type-search input` sets aside for the magnifying-glass
icon (`.cg-type-search svg` sits `position: absolute; left: 8px`). Zeroing the whole padding
here erased that reserve too, at equal specificity and loading after, so the glyph sat on top
of the typed text instead of beside it. Restated at the base rule's own values instead of
zeroed, which keeps the border fix and gives the icon its room back. */
.sheet-pick-search input {
border: 0;
background: transparent;
padding: 0 8px 0 27px;
}
.sheet-pick-list {
max-height: 168px;
overflow-y: auto;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
padding: 3px;
margin-top: 4px;
}
.sheet-pick-empty {
margin: 4px 0 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
|