feat(demo): add the CEO-stature demo and antiquity bench precision#49
Merged
Conversation
centimeter joins foot/inch/meter/statute-mile as a benchmarking anchor re-exported from kits/antiquity.
Add roundToStep and switch the shared bench off round1 so a 0.01-step unit keeps hundredths instead of being flattened to tenths.
Both gain 0.01 slider steps; foot and meter steps drop to 0.01 to match.
Two colour-driven human SVGs: a plain figure for the reference stand-ins and a tie figure for selected people. fill defaults to currentColor and preserveAspectRatio is none for height-only stretch.
34 popularly-reported figures across exec and leader kinds, plus a demo-invariants guard for unique ids, in-domain heights, and resolvable default subject/reference.
One side, used twice: a grouped roster select plus a custom-height inches slider whose readout projects to ft′in″ (primary) and cm (muted) via forge. stature-model holds the SideState contract and projections.
X axis is the height axis: stand-ins at the 5/6/7 ft marks, the two selected people dropped in at their height's X position and stretched vertically to it, colour-coded by side.
Center reading is subject-as-percent-of-reference plus signed inch delta; the ancient readout forges both heights and the delta into a chosen unit from the bench catalog.
useStatureGauge holds the two sides plus the ancient unit; CeoStature composes the ruler, the two pickers flanking the comparison reading, and the ancient readout, appended last in the kit.
Widen the glyphs so the height-stretched figures read as people, trim the inch delta and cm readout of trailing zeros, and truncate the picker trigger to the name so it stops wrapping.
- README: antiquity demo bullet lists the height comparator - llms.txt: antiquity re-export list now names centimeter, inch, and foot
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 34 34
Lines 2555 2555
=========================================
Hits 2555 2555
🚀 New features to boost your workflow:
|
- scale figures proportionally (natural at 6 ft) by cropping each glyph's whitespace and exporting its aspect; widen and center them - symmetric ruler X domain so the 5/6/7 ft marks have equal margins - per-figure name + height tags above each person - dotted level lines across the canvas at each height, plus a left delta arrow labelled in ft'in - custom mode gains a name field; a 'custom CEO' / 'custom person' button shortcuts to it; selects fill their column - top-align the inputs; fixed-width center; drop 'is', color each name to its side, reference on its own line - ancient readout values go large and side-colored; difference stays small - code sample shows three forge lines (both heights to cm, then ancient)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Antiquity forge bench
inchandcentimeterto the antiquity bench's from/to options (ordered by metric size).inch,centimeter,foot,meter); ancient units keep their integer steps. Mechanically, the sharedBenchswapsround1for a newroundToStep(value, step)inlib/math.ts, so it rounds to each unit's own granularity. Other kits keep integer steps, so their behavior is unchanged.kits/antiquitynow re-exportscentimeteralongsidefoot/inch/meter/statuteMile.New section: "how tall is your CEO?"
A flagship section appended last in the antiquity kit:
--uf-accent, reference is--uf-accent-2.forge.Two custom human glyphs
figure-glyph(plain, for stand-ins) andexec-glyph(tie, for the two selected), both withfilllifted to a color prop (defaultcurrentColor) andpreserveAspectRatio="none"for the height-only stretch.Docs
llms.txtantiquity re-export list now namescentimeter,inch, andfoot.Notes
demo/README.mdis left untouched; it is broadly stale (still describes a two-kitForgeBench/DemoSection/lib/kits.tslayout) and warrants its own cleanup rather than a one-line patch.Testing
bun run checkgreen (lib + demo build, biome, eslint, lib + demo typecheck, tests, knip, package). Newdemo-invariantscases cover the figures catalog (unique ids, in-domain heights, resolvable defaults). Section, stair-step, custom slider, color-coding, ancient readout, and the bench 100ths step verified by screenshot in a headless browser.