yggio-market
v0.0.20
Published
React components - the globe, the lineage views, the generic registry UI and the brand's primitives - and the Arrow adapter and HTTP engine they read through, under one brand design system; the browser bundle carries no native addon
Readme
yggio-market
The brand's browser kit, with no native addon: the globe, the lineage
graph, the generic registry views, the design system's primitives, the theme,
and the Arrow adapter and HTTP engine they read through. The components
compute no answer of their own: a plan run is the core's, asked of the yggio
addon on the application's Node side over HTTP (httpEngine), and the page
renders what it answers.
The market crate this package once drew is retired; the views that read its messages, registers and desks are gone with it, and the lineage and registry views are rewired onto the core's graph next. The package keeps its name until then.
Install
npm install yggio-market react react-domThe styles are the brand tokens as CSS variables. Tailwind v4, in the stylesheet:
@import "tailwindcss";
@import "yggio-market/brand.css";Tailwind v3, the preset beside the same stylesheet import:
// tailwind.config.js
module.exports = { presets: [require('yggio-market/tailwind-preset')], content: ['./src/**/*.tsx', './node_modules/yggio-market/dist/**/*.js'] }apache-arrow is an optional peer: arrowRows reads an Arrow table
structurally, by its types alone, so nothing of it is bundled; a page that
hands the components Arrow holds its own copy.
Subpaths
| Entry |
| --- |
| yggio-market/source |
| yggio-market/source/iceberg |
| yggio-market/helpers |
| yggio-market/wire |
| yggio-market/arrow |
| yggio-market/core |
| yggio-market/theme |
| yggio-market/theme/react |
| yggio-market/react |
| yggio-market/react/registry |
| yggio-market/react/lineage |
| yggio-market/react/chart |
| yggio-market/react/shell |
| yggio-market/react/edit |
| yggio-market/react/table/io |
| yggio-market/react/page |
| yggio-market/react/globe |
| yggio-market/react/globe/cell |
| yggio-market/react/nested |
| yggio-market/react/field |
| yggio-market/react/menu |
| yggio-market/react/menu/clipboard |
| yggio-market/react/palette |
| yggio-market/react/lineage/export |
| yggio-market/react/legend |
| yggio-market/brand.css |
| yggio-market/scoped.css |
| yggio-market/tailwind-preset |
Design system
The project's style rules - each rule, its one owner in the code, the token or component that enforces it, the scheme and density switches - live beside the components they govern, in src/theme/ and src/react/ui/.
One visual language, the hero's, stated once as tokens in
brand.css(Tailwind v4's@theme) andtailwind.preset.cjs(v3) and composed inui/tokens.ts: every component spells a type step, a width, a colour, a radius, a shadow or a motion only through them, in both schemes.One sans family: headings semibold (
Headinglevel 1-4;--brand-font-serifis the sans), body and tables (font-editorial-sans), numbersfont-mono tabular-nums(--brand-font-monois the sans, its digits tabular), code alone monospace (font-code: a plan's text, its caret, an explained plan); the kicker over a title isEyebrow(the hero's chip: an accent dot, decoration only, and the word upper case).Type: twelve steps,
text-brand-<step>, each one role - its size and line height, and for the five serif heading steps the semibold weight and the tight tracking, so a heading spells neither:| Step | Size / line | Role | | --- | --- | --- | |
display| 36-60px fluid / 1.05 | the hero's title | |title| 30 / 36px |Heading1 | |headline| 24 / 32px |Heading2 (sections, dialogs), the compactPageHeadertitle | |heading| 18 / 28px |Heading3 (panels, feature cards) | |subheading| 16 / 24px |Heading4 (reference cards, legend bands) | |lede| 18px / 1.625 | the hero's subtitle, a section's lede | |figure| 20 / 28px | the hero's figures, mono semibold | |body| 14 / 20px | running text, a card title's identifier (TITLE_CODE) | |data| 13 / 20px | tables, lists, a book | |control| 13 / 18px | buttons, inputs, tabs (CONTROL) | |caption| 12 / 16px | labels, column headers, meta lines (LABEL,HEADER) | |micro| 11 / 16px, tracked wide | the eyebrow and badges, upper case |leading-noneand a box'sleading-5|6are the only overrides; a step name is never a colour token's, sotext-brand-datais a size andtext-brand-primarya colour. An arbitrary size, line height or tracking, Tailwind's owntext-xs..9xl,tracking-*and semanticleading-*are refused.Layout:
max-w-brand(80rem, the hero's column) is every page column, spelledCOLUMN(mx-auto w-full max-w-brand px-4 sm:px-6);max-w-brand-measure(56ch) a reading paragraph - the hero's subtitle, the page head's description, a section's lede, a field's description;max-w-brand-dialogthe large dialog. Spacing on the 4px grid: surfaces inset 16px (p-4), overlays 20px.Corners, shadows and motion on the brand scale alone, by role:
rounded-brand-xs(2px: badges, tags, the eyebrow),sm(3px: buttons, inputs, selects),md(4px: cards, panels, popovers, table frames),lg(6px: modals, drawers, key-figure cards),xl(8px: the hero preview alone), each times--brand-radius-factor(2.5); a status chip a pill in a comfortable table, a coloured word in a compact one; table, order book and message rows square;rounded-fullonly for dots, avatars (a key figure's icon tile), spinners and switch thumbs. a card isCARD(brand-glass: a translucent surface on its 1px hairline, an inner highlight over a soft drop, never blurred) and an overlayOVERLAY(brand-glass-overlay: the surface at 90%, blurred), a bar over contentbrand-glass-bar, each the solid surface underprefers-reduced-transparencyor withoutbackdrop-filter; an interactive card rises 1px onshadow-brand-hover(LIFT,brand-lift), a button presses 1px, nothing on data lifts;sma control's soft shadow;mdthe sticky header's 1px drop,lgthe one overlay shadow (drawn bybrand-glass-overlay),insetinputs;animate-brand-in|pop|flash|shimmer|pulse|progress|draw|marqueeandtransition-brand; the compositesbrand-skeleton,brand-skeleton-shimmer,brand-row-new,brand-heat-up|down(by--brand-heat, a change's direction) andbrand-heat-buy|sell(a book level's depth in its side's tone),brand-marquee,brand-hero-backdrop(the hero's accent glow and 40px grid under a mask; it isolates, so a popover inside it stacks within the hero) andbrand-glow(the glow alone at 10%, the page head's; any region adds it byclassName, and it opens no stacking context). Secondary text on the glow holds AAA overbg-brand-bg, AA overbg-brand-surfaceand for anchors; at the hero backdrop's unmasked peak, AA. Only opacity, transform, background and shadow move; underprefers-reduced-motionmotion becomes a fade and loops hold still.Colour only through the
brandtokens -bg,surface,primary,secondary,muted,border(a divider's hairline),border-strong(a control's outline, 3:1),scrim,ring;accent, the one brand colour, an indigo by default (the primary action, links, the focus ring and the row cursor, the active indicator;accent-hover,accent-softandfocusderive from it), so a consumer's brand is one variable,--brand-accent; and the semantic tokens, never the accent:upanddown(a price's direction alone, green and red),buy(the side's own blue) andsell(falling to down, red),dangerandrefused(falling to down),warning,info(a teal, so a working buy row never shows two blues) andneutral(falling to secondary), each set by its own--brand-<token>or left to its fallback - dark mode from the variables (data-theme="dark"or.darkforces it). A tone is drawn with its glyph or word, never by colour alone: aBadge'sdata-tonetakes its text, outline and tint frombrand.css. A side-carrying or destructive action is a solidButtonin itstone(buy,sell,danger), its sign drawn before its word, never in the accent.CONTROL,EYEBROWandHEADERarebrand.css's component classes (brand-control- the strong outline, the danger outline when invalid, the focus ring inside -brand-eyebrow,brand-header), in its components layer so a caller's utility wins.data-density="comfortable"on any ancestor takes every control to the taller step.Meaning never by colour alone: a side or state carries a glyph and a word; a coded value its name, the code on hover and in hidden text.
Density of a data screen: table rows 48px comfortable by default, 28px compact on every blotter (order books 24px), 13px data, tabular prices in right-aligned columns, column headers small, upper case, tracked wide and muted at 500; buttons 28px (
h-7), 24px compact, 36px (lg) for a page's or a dialog's primary action, the primary solid in the scheme's ink; navigation tabs underlined in the accent; a 2px accent focus outline, drawn inside an input, a tab or a row.Real tables, labelled controls, modals trapping focus;
tests/react/design.test.tsholds every component source to these rules,tests/react/styling.test.tsxevery class a component renders; every component in both schemes - all three overpreview/catalogue.tsx, the one list of every exported component with sample props.
Development
npm install # pinned development dependencies
npm test # vitest under jsdom, then tsc --noEmit
npx vitest run tests/bundle.test.ts # the size budget, its "bundle sizes" line
npm run build # tsup: one dist entry per subpath above