@silverpoint/core 0.2.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/catalog.ts","../src/ui/value.ts","../src/ui/progress.ts","../src/ui/items.ts","../src/ui/steps.ts","../src/ui/keyboard.ts","../src/ui/roving.ts","../src/ui/frame.ts","../src/ui/names.ts","../src/ui/tokens.ts","../src/ui/tone.ts","../src/ui/view-kit.ts","../src/ui/view.ts","../src/ui/view-b2.ts","../src/ui/view-b3.ts"],"names":["frame","i","step","root","text"],"mappings":";;;;AAkBA,IAAM,KAAA,GAA2D;AAAA,EAC/D,MAAA,EAAQ,IAAA;AAAA,EAAM,KAAA,EAAO,IAAA;AAAA,EAAM,QAAA,EAAU,IAAA;AAAA,EAAM,MAAA,EAAQ,IAAA;AAAA,EAAM,IAAA,EAAM,IAAA;AAAA,EAAM,OAAA,EAAS,IAAA;AAAA,EAC9E,UAAA,EAAY,IAAA;AAAA,EAAM,SAAA,EAAW,IAAA;AAAA,EAAM,IAAA,EAAM,IAAA;AAAA,EAAM,MAAA,EAAQ,IAAA;AAAA,EAAM,IAAA,EAAM;AACrE,CAAA;AAEA,IAAM,MAAM,CAAC,IAAA,EAAc,KAAA,EAAgB,MAAA,KACzC,OAAO,MAAA,CAAO;AAAA,EACZ,IAAA;AAAA,EACA,KAAA,EAAO,KAAA,CAAM,IAAI,CAAA,IAAK,IAAA;AAAA,EACtB,IAAA,EAAM,IAAA,CAAK,OAAA,CAAQ,QAAA,EAAU,CAAC,CAAA,EAAG,CAAA,KAAA,CAAe,CAAA,GAAI,GAAA,GAAM,EAAA,IAAM,CAAA,CAAE,WAAA,EAAa,CAAA;AAAA,EAC/E,SAAA,EAAW,KAAK,IAAI,CAAA,CAAA;AAAA,EACpB,KAAA;AAAA,EACA,QAAQ,MAAA,CAAO,MAAA,CAAO,CAAC,GAAG,M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GAAS,CAAC,GAAG,MAAA,EAAQ,EAAE,OAAO,uBAAA,EAAyB,aAAA,EAAe,QAAO,EAAG,CAAC,KAAK,GAAA,EAAK,OAAO,CAAC,CAAC,CAAC,IAAI,EAAC;AAAA,IACpH,EAAA;AAAA,MACE,MAAA;AAAA,MACA,EAAE,KAAA,EAAO,sBAAA,EAAwB,aAAA,EAAe,MAAA,EAAO;AAAA,MACvD,MAAM,IAAA,CAAK,EAAE,QAAQ,KAAA,EAAM,EAAG,MAAM,EAAA,CAAG,MAAA,EAAQ,EAAE,KAAA,EAAO,qBAAA,IAAyB,CAAC,IAAA,CAAK,KAAK,SAAS,CAAC,CAAC,CAAC;AAAA;AAC1G,GACD,CAAA;AACH","file":"ui.js","sourcesContent":["/** The catalog's groups (PRD §6.11), in the order the documentation lists them. */\nexport type UiGroup = 'actions' | 'data-entry' | 'navigation' | 'data-display' | 'feedback';\n\n/** One UI component: every gate, fixture set and example page iterates this list. */\nexport interface UiComponentRow {\n /** Catalog name, as the PRD writes it. */\n readonly name: string;\n /** Kebab-case subpath: `@silverpoint/<adapter>/ui/<slug>`. */\n readonly slug: string;\n /** The exported name, the same in the three adapters (OQ-U2). */\n readonly component: string;\n readonly group: UiGroup;\n /** The batch of step 6c that implements it (plan-and-tasks.md). */\n readonly batch: 'B1' | 'B2' | 'B3';\n /** Declared states (Data Model §5); one fixture and one demo each. */\n readonly states: readonly string[];\n}\n\nconst BATCH: Readonly<Record<string, UiComponentRow['batch']>> = {\n Button: 'B1', Input: 'B1', Checkbox: 'B1', Switch: 'B1', Card: 'B1', Divider: 'B1',\n RadioGroup: 'B2', Segmented: 'B2', Tabs: 'B2', Slider: 'B2', Rate: 'B2',\n};\n\nconst row = (name: string, group: UiGroup, states: readonly string[]): UiComponentRow =>\n Object.freeze({\n name,\n batch: BATCH[name] ?? 'B3',\n slug: name.replace(/[A-Z]/g, (m, i: number) => (i ? '-' : '') + m.toLowerCase()),\n component: `Sp${name}`,\n group,\n states: Object.freeze([...states]),\n });\n\n/** The 17 components of `0.3.0` and their 45 declared states (REQ-300, Data Model §5). */\nexport const UI_COMPONENTS: readonly UiComponentRow[] = /* @__PURE__ */ Object.freeze([\n row('Button', 'actions', ['default', 'primary', 'danger', 'disabled']),\n row('Input', 'data-entry', ['empty', 'filled', 'invalid', 'disabled']),\n row('Checkbox', 'data-entry', ['unchecked', 'checked', 'indeterminate', 'disabled']),\n row('RadioGroup', 'data-entry', ['selected', 'disabled-item']),\n row('Switch', 'data-entry', ['off', 'on', 'disabled']),\n row('Slider', 'data-entry', ['marks', 'disabled']),\n row('Rate', 'data-entry', ['three', 'read-only']),\n row('Segmented', 'data-entry', ['first', 'middle']),\n row('Tabs', 'navigation', ['first', 'disabled-tab']),\n row('Steps', 'navigation', ['current', 'error']),\n row('Card', 'data-display', ['plain', 'titled']),\n row('Tag', 'data-display', ['tone-1', 'closable']),\n row('Badge', 'data-display', ['count', 'dot', 'overflow']),\n row('Divider', 'data-display', ['plain', 'text']),\n row('Progress', 'feedback', ['line', 'circle', 'indeterminate']),\n row('Alert', 'feedback', ['info', 'success', 'warning', 'error']),\n row('Skeleton', 'feedback', ['paragraph', 'avatar']),\n]);\n","import { diagnose } from '../diagnostics/diagnose';\nimport { round2 } from '../render/round';\n\n/** A linear value's domain. Without `step` the value is only clamped (Progress). */\nexport interface UiRange {\n readonly min: number;\n readonly max: number;\n readonly step?: number;\n}\n\nexport interface UiValue {\n /** The value to render: clamped, on its step. */\n readonly value: number;\n /** Where it sits along its range, in [0, 1] with 2 decimals (DD-025, I-22). */\n readonly fraction: number;\n /** The input was not drawable as given. */\n readonly corrected: boolean;\n}\n\nconst DEFAULT_RANGE: UiRange = { min: 0, max: 100, step: 1 };\n\nfunction warn(component: string, property: string, message: string): void {\n if (process.env.NODE_ENV !== 'production') diagnose('SP017', component, { property, message });\n}\n\n/** Removes the binary noise that `min + n * step` leaves (`0.30000000000000004`). */\nconst tidy = (x: number): number => Number.parseFloat(x.toPrecision(12));\n\n/** A range as drawn: the given one if valid, else `0..100` step 1, warned `SP017` (REQ-324). */\nexport function uiRange(range: UiRange, component = 'UiValue'): UiRange {\n const { min, max, step } = range;\n const stepOk = step === undefined || (Number.isFinite(step) && step > 0);\n if (Number.isFinite(min) && Number.isFinite(max) && min < max && stepOk) return range;\n warn(component, 'min', `The range ${min}..${max} step ${step} is not valid; 0..100 step 1 is used.`);\n return DEFAULT_RANGE;\n}\n\n/**\n * A value on its range: clamped, rounded to the nearest step counted from `min` (never past `max`\n * when `max` is off the step grid), and its exact fraction. Anything corrected warns `SP017`\n * (REQ-324). Pure apart from the development warning.\n */\nexport function uiValue(value: number, range: UiRange, component = 'UiValue'): UiValue {\n const valid = uiRange(range, component);\n const { min, max, step } = valid;\n let next = Number.isFinite(value) ? Math.min(Math.max(value, min), max) : min;\n if (step !== undefined) {\n const steps = Math.min(Math.round((next - min) / step), Math.floor(tidy((max - min) / step)));\n next = tidy(min + steps * step);\n }\n const corrected = valid !== range || next !== value;\n if (next !== value) warn(component, 'value', `${value} is drawn as ${next}.`);\n return { value: next, fraction: round2((next - min) / (max - min)), corrected };\n}\n\n/** A Rate's `count`: an integer in 1..10, default 5; anything else corrected with `SP017`. */\nexport function uiRateCount(count: number | undefined, component = 'SpRate'): number {\n if (count === undefined) return 5;\n const next = Number.isFinite(count) ? Math.min(Math.max(Math.round(count), 1), 10) : 5;\n if (next !== count) warn(component, 'count', `${count} is drawn as ${next}.`);\n return next;\n}\n","import { circlePath } from '../charts/shared/format';\nimport { arcPath, type PolarFrame } from '../charts/shared/polar';\nimport { roundPathData } from '../render/round';\nimport type { Stroke } from '../types';\n\n/** The circle Progress draws in a fixed 100 × 100 view box (DD-025). */\nexport const UI_PROGRESS_VIEWBOX = 100;\n\n/**\n * The circle Progress: the exact track and the exact filled arc, from 12 o'clock clockwise, on the\n * charts' polar engine. Both are `encoding`, so no inker touches them (REQ-304). `stroke` is the\n * ring's width in view-box units; the ring is inset by half of it so nothing is clipped.\n */\nexport function uiProgressArc(fraction: number, stroke: number): { readonly track: Stroke; readonly fill: Stroke } {\n const centre = UI_PROGRESS_VIEWBOX / 2;\n const radius = centre - stroke / 2;\n const frame: PolarFrame = { cx: centre, cy: centre, radius };\n const f = Number.isFinite(fraction) ? Math.min(Math.max(fraction, 0), 1) : 0;\n return {\n track: { d: roundPathData(circlePath(centre, centre, radius)), role: 'encoding', part: 'rule' },\n fill: { d: roundPathData(arcPath(frame, radius, 0, f * 2 * Math.PI)), role: 'encoding', part: 'ink' },\n };\n}\n","import type { UiItem } from './types';\nimport { diagnose } from '../diagnostics/diagnose';\n\n/**\n * Keeps the first item of each key and skips later ones, and any item without a key, warning\n * `SP019` without throwing (REQ-325). Returns the input itself when every key is unique.\n */\nexport function uiItems<T extends { readonly key: string }>(items: readonly T[], component: string): readonly T[] {\n const seen = new Set<string>();\n const kept: T[] = [];\n for (const item of items) {\n if (item.key !== '' && !seen.has(item.key)) {\n seen.add(item.key);\n kept.push(item);\n } else if (process.env.NODE_ENV !== 'production') {\n const why = item.key === '' ? 'An item has an empty key' : `The key \"${item.key}\" repeats`;\n diagnose('SP019', component, { property: 'items', message: `${why}; that item is skipped.` });\n }\n }\n return kept.length === items.length ? items : kept;\n}\n\n/**\n * The key a composite shows as selected (Data Model §2.14): the given key if an enabled item has\n * it; otherwise `null` for a RadioGroup (`'none'`), the first enabled key for Segmented and Tabs\n * (`'first'`). Silent: a key that leaves `items` is an ordinary state of dynamic data (A-06).\n */\nexport function uiSelectedKey(items: readonly UiItem[], value: string | null | undefined, fallback: 'none' | 'first'): string | null {\n if (items.some((item) => item.key === value && item.disabled !== true)) return value!;\n return fallback === 'first' ? (items.find((item) => item.disabled !== true)?.key ?? null) : null;\n}\n","import { diagnose } from '../diagnostics/diagnose';\nimport { uiItems } from './items';\nimport type { StepItem, StepStatus } from './types';\n\nexport interface UiStep {\n readonly key: string;\n readonly status: StepStatus;\n /**\n * The connector after this step carries the status of the step it leads to, written as\n * `data-status`; a `wait` connector is dashed (C-4). `null` after the last step.\n */\n readonly connector: StepStatus | null;\n /** The step `current` points at, after clamping: it carries `aria-current` (REQ-318). */\n readonly current: boolean;\n}\n\n/**\n * Status per step, derived from `current` (finish before, process at, wait after) unless the item\n * sets one, and the connectors between them. Keys are de-duplicated (`SP019`); a `current` outside\n * the list or not an integer is clamped and rounded (`SP017`, REQ-324).\n */\nexport function uiSteps(items: readonly StepItem[], current: number, component = 'SpSteps'): readonly UiStep[] {\n const steps = uiItems(items, component);\n if (steps.length === 0) return [];\n const last = steps.length - 1;\n const at = Number.isFinite(current) ? Math.min(Math.max(Math.round(current), 0), last) : 0;\n if (at !== current && process.env.NODE_ENV !== 'production') {\n diagnose('SP017', component, { property: 'current', message: `${current} is drawn as ${at}.` });\n }\n const statuses = steps.map((item, i): StepStatus => item.status ?? (i < at ? 'finish' : i === at ? 'process' : 'wait'));\n return steps.map((item, i) => ({ key: item.key, status: statuses[i]!, connector: i < last ? statuses[i + 1]! : null, current: i === at }));\n}\n","import type { UiOrientation } from './types';\n\nexport type UiRovingKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End';\n\nexport interface UiRovingState {\n /** The focused item; `-1` when none is yet. */\n readonly index: number;\n readonly count: number;\n readonly disabled: readonly boolean[];\n}\n\n/** +1, -1, or 0 for a key that does not move along this orientation. */\nfunction direction(key: UiRovingKey, orientation: UiOrientation, dir: 'ltr' | 'rtl'): number {\n if (orientation === 'vertical') return key === 'ArrowDown' ? 1 : key === 'ArrowUp' ? -1 : 0;\n const forward = key === 'ArrowRight' ? 1 : key === 'ArrowLeft' ? -1 : 0;\n return dir === 'rtl' ? -forward : forward;\n}\n\n/**\n * The WAI-ARIA APG roving-focus transition of a tab list or radio-like group (REQ-315): arrows\n * along the orientation move to the next enabled item and wrap at the ends, `rtl` mirrors the\n * horizontal arrows (REQ-321), Home and End go to the first and last enabled item, and disabled\n * items are skipped (REQ-326). Cross-axis arrows, and any key with no enabled item to go to, keep\n * the index. Pure.\n */\nexport function uiRovingKey(state: UiRovingState, key: UiRovingKey, orientation: UiOrientation, dir: 'ltr' | 'rtl'): number {\n const { index, count, disabled } = state;\n const enabled = (i: number) => disabled[i] !== true;\n if (key === 'Home' || key === 'End') {\n const step = key === 'Home' ? 1 : -1;\n for (let n = 0, i = key === 'Home' ? 0 : count - 1; n < count; n++, i += step) if (enabled(i)) return i;\n return index;\n }\n const step = direction(key, orientation, dir);\n if (step === 0) return index;\n // From no current item, the first move lands on the first (or last) enabled item.\n let i = index < 0 || index >= count ? (step > 0 ? -1 : count) : index;\n for (let n = 0; n < count; n++) {\n i = (((i + step) % count) + count) % count;\n if (enabled(i)) return i;\n }\n return index;\n}\n\nconst ROVING: ReadonlySet<string> = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);\n\n/** Whether a `KeyboardEvent.key` moves a roving focus: the arrows, Home and End (REQ-315). */\nexport const uiIsRovingKey = (key: string): key is UiRovingKey => ROVING.has(key);\n","import { uiIsRovingKey, uiRovingKey } from './keyboard';\nimport type { UiOrientation } from './types';\n\n/** An item of a composite: a native radio or tab button. */\ninterface RovingItem {\n readonly disabled?: boolean;\n focus(): void;\n click(): void;\n}\n\n/** The composite's root element, as much of the DOM as this reads; the core has no DOM types. */\nexport interface UiRovingRoot {\n querySelectorAll(selector: string): ArrayLike<unknown>;\n closest(selector: string): { getAttribute(name: string): string | null } | null;\n readonly ownerDocument: { readonly activeElement: unknown } | null;\n}\n\n/**\n * The keyboard of a composite (REQ-315), for a `keydown` on its root: the transition is\n * `uiRovingKey`; this finds the items, reads the direction from the nearest `dir` (REQ-321), and\n * moves focus —and, when `activate`, selects by clicking the item, so the adapter's own click or\n * change handler runs. `both` takes the axis from the key, as a radio group does. A key it does\n * not use is left to the browser.\n */\nexport function uiRovingFocus(\n event: { readonly key: string; preventDefault(): void },\n root: UiRovingRoot,\n selector: string,\n orientation: UiOrientation | 'both',\n activate: boolean,\n): void {\n const { key } = event;\n if (!uiIsRovingKey(key)) return;\n const items = Array.from(root.querySelectorAll(selector)) as RovingItem[];\n const index = items.indexOf(root.ownerDocument?.activeElement as RovingItem);\n if (index < 0) return;\n const axis = orientation !== 'both' ? orientation : key === 'ArrowUp' || key === 'ArrowDown' ? 'vertical' : 'horizontal';\n const dir = root.closest('[dir]')?.getAttribute('dir') === 'rtl' ? 'rtl' : 'ltr';\n const next = uiRovingKey({ index, count: items.length, disabled: items.map((item) => item.disabled === true) }, key, axis, dir);\n if (next === index) return;\n event.preventDefault();\n items[next]!.focus();\n if (activate) items[next]!.click();\n}\n","import { roundPathData } from '../render/round';\nimport { resolveSeed } from '../render/seed';\nimport type { Geometry, Seed } from '../types';\n\nexport type UiFrameKind = 'control' | 'pill' | 'box' | 'card' | 'round';\n\n/**\n * Each frame kind is drawn once in a square box and cut into slices for the grounds build\n * (DD-022): four corners of `slice` px, and four edges between them when `size > 2 * slice`.\n * `round` and `box` have no edges; they frame fixed-size squares.\n */\nexport const UI_FRAME_KINDS: Readonly<Record<UiFrameKind, Readonly<{ size: number; slice: number; radius: number }>>> =\n /* @__PURE__ */ Object.freeze({\n control: Object.freeze({ size: 24, slice: 8, radius: 2 }),\n pill: Object.freeze({ size: 36, slice: 12, radius: 12 }),\n box: Object.freeze({ size: 16, slice: 8, radius: 2 }),\n card: Object.freeze({ size: 48, slice: 16, radius: 2 }),\n round: Object.freeze({ size: 24, slice: 12, radius: 12 }),\n });\n\n/** A ground generates at most this many frame variants per kind (Data Model §3.8). */\nconst MAX_VARIANTS = 6;\n\n/**\n * The frame variant of a component: from `seed`, else `id`, by the charts' seed rule; `0` with\n * neither (REQ-307, I-21). Never from mount order, randomness or time (Art. 4). `variants` is read\n * as an integer in 1..6.\n */\nexport function uiFrameVariant(seed: Seed | undefined, id: string | undefined, variants: number): number {\n const n = Number.isFinite(variants) ? Math.min(Math.max(Math.floor(variants), 1), MAX_VARIANTS) : 1;\n if (seed === undefined && !id) return 0;\n return resolveSeed(seed, id ?? '') % n;\n}\n\n/** Half the hairline: the outline is inset so its stroke stays inside the box. */\nconst INSET = 0.5;\n\nfunction roundedSquare(size: number, radius: number): string {\n const lo = INSET;\n const hi = size - INSET;\n const r = Math.min(radius, (hi - lo) / 2);\n const arc = (x: number, y: number) => `A${r},${r},0,0,1,${x},${y}`;\n return (\n `M${lo + r},${lo}H${hi - r}${arc(hi, lo + r)}V${hi - r}${arc(hi - r, hi)}` +\n `H${lo + r}${arc(lo, hi - r)}V${lo + r}${arc(lo + r, lo)}Z`\n );\n}\n\n/**\n * The exact outline of a frame kind: the input the grounds build inks, once per variant, into the\n * pieces of `ui.css` (DD-022). It is an `ornament` stroke —a frame carries no value (Art. 1, as\n * amended)— so the ground's inker may draw it by hand, with its vertices preserved. Build time only.\n */\nexport function uiFrameOutline(kind: UiFrameKind): Geometry {\n const { size, radius } = UI_FRAME_KINDS[kind];\n const box = { x: 0, y: 0, width: size, height: size };\n return {\n viewBox: box,\n plot: box,\n strokes: [{ d: roundPathData(roundedSquare(size, radius)), role: 'ornament', part: 'ink' }],\n labels: [],\n hitAreas: [],\n defs: [],\n };\n}\n","import { diagnose } from '../diagnostics/diagnose';\n\n/**\n * A Button or Badge needs an accessible name: its text content or a `label`. Without either it\n * still renders, and warns `SP018` in development (REQ-319).\n */\nexport function uiRequireName(component: string, text: string | undefined, label: string | undefined): void {\n if (process.env.NODE_ENV === 'production') return;\n if (text?.trim() || label?.trim()) return;\n diagnose('SP018', component, { property: 'label' });\n}\n","import type { Ground, UiTokens } from '../types';\n\n/** The `ui` tokens of a ground that declares none (Data Model §3.8). */\nexport const UI_TOKEN_DEFAULTS: UiTokens = /* @__PURE__ */ Object.freeze({\n frame: 'css',\n frameVariants: 1,\n controlHeight: Object.freeze({ sm: 24, md: 32, lg: 40 }),\n radius: 2,\n focusWidth: 2,\n tone: Object.freeze({ selected: 3, primary: 2, danger: 4, disabled: 1, alertError: 1 }),\n});\n\n/** The smallest target WCAG 2.5.8 allows, and the thinnest focus REQ-316 allows. */\nconst MIN_HEIGHT = 24;\nconst MIN_FOCUS = 2;\n\nconst within = (value: number, lo: number, hi: number, fallback: number) =>\n Number.isFinite(value) ? Math.min(Math.max(value, lo), hi) : fallback;\n\n/**\n * A ground's `ui` tokens, or the defaults, held to their domain: heights ≥ 24 px, focus ≥ 2 px,\n * 1..6 variants. A `weight` ground has no inker that draws by hand, so its frame is always the\n * exact `css` one with a single variant (DD-022). Pure.\n */\nexport function resolveUiTokens(ground: Ground): UiTokens {\n const ui = ground.ui ?? UI_TOKEN_DEFAULTS;\n const inked = ui.frame === 'inked' && ground.tonalMechanism === 'hatch';\n const { sm, md, lg } = ui.controlHeight;\n return {\n frame: inked ? 'inked' : 'css',\n frameVariants: inked ? Math.round(within(ui.frameVariants, 1, 6, 1)) : 1,\n controlHeight: {\n sm: within(sm, MIN_HEIGHT, Infinity, 24),\n md: within(md, MIN_HEIGHT, Infinity, 32),\n lg: within(lg, MIN_HEIGHT, Infinity, 40),\n },\n radius: within(ui.radius, 0, Infinity, 2),\n focusWidth: within(ui.focusWidth, MIN_FOCUS, Infinity, 2),\n tone: ui.tone,\n };\n}\n","import { round2 } from '../render/round';\nimport type { Stroke, ToneSpec } from '../types';\n\n/** One repeating layer of a control's tone: a tile the grounds build inks and lays as a CSS mask. */\nexport interface UiToneLayer {\n readonly width: number;\n readonly height: number;\n readonly strokes: readonly Stroke[];\n}\n\nconst RAD = Math.PI / 180;\nconst EPSILON = 1e-6;\n\n/** About this many px of lines per tile side: enough for hand variation, few enough to stay light. */\nconst TILE_SPAN = 24;\n\n/**\n * One family of parallel lines at `angle`, `gap` apart, clipped to the rectangle that is its own\n * period: shifting the tile by its width or its height lands every line on another line of the\n * family, so the tile repeats without a seam although the lines are not axis-aligned (a CSS mask\n * cannot rotate a repeating image, as an SVG pattern can).\n */\nfunction family(gap: number, angle: number): UiToneLayer {\n const sin = Math.sin(angle * RAD);\n const cos = Math.cos(angle * RAD);\n const lines = Math.max(2, Math.round(TILE_SPAN / gap));\n const width = Math.abs(sin) < EPSILON ? lines * gap : (lines * gap) / Math.abs(sin);\n const height = Math.abs(cos) < EPSILON ? lines * gap : (lines * gap) / Math.abs(cos);\n // A point's offset across the family: lines sit at (k + ½)·gap, so none grazes a corner.\n const offset = (x: number, y: number) => -sin * x + cos * y;\n const corners = [offset(0, 0), offset(width, 0), offset(0, height), offset(width, height)];\n const first = Math.ceil(Math.min(...corners) / gap - 0.5);\n const last = Math.floor(Math.max(...corners) / gap - 0.5);\n const strokes: Stroke[] = [];\n for (let k = first; k <= last; k++) {\n const c = (k + 0.5) * gap;\n // Points of the line: c·n + t·d, with n = (−sin, cos) and d = (cos, sin).\n const at = (t: number) => ({ x: -sin * c + cos * t, y: cos * c + sin * t, t });\n const hits = [\n Math.abs(cos) > EPSILON ? [(0 + sin * c) / cos, (width + sin * c) / cos] : [],\n Math.abs(sin) > EPSILON ? [(0 - cos * c) / sin, (height - cos * c) / sin] : [],\n ]\n .flat()\n .map(at)\n .filter((p) => p.x >= -EPSILON && p.x <= width + EPSILON && p.y >= -EPSILON && p.y <= height + EPSILON)\n .sort((a, b) => a.t - b.t);\n const from = hits[0];\n const to = hits.at(-1);\n if (!from || !to || to.t - from.t < EPSILON * 1e3) continue;\n const clamp = (v: number, hi: number) => round2(Math.min(Math.max(v, 0), hi));\n const w = round2(width);\n const h = round2(height);\n strokes.push({\n d: `M${clamp(from.x, w)},${clamp(from.y, h)}L${clamp(to.x, w)},${clamp(to.y, h)}`,\n role: 'ornament',\n part: 'ink',\n });\n }\n return { width: round2(width), height: round2(height), strokes };\n}\n\n/**\n * The tone of a control at one step of a ground's ramp (DD-026, REQ-308): one layer of hachure,\n * two for cross-hatch (each its own period, laid as two mask layers), none for a `weight` step,\n * whose tone is the frame's line weight. Its lines are `ornament`: a tone is not a value, so the\n * ground's inker may draw them by hand, vertices preserved. Build time only. Pure.\n */\nexport function uiToneTile(spec: ToneSpec): readonly UiToneLayer[] {\n if (spec.style === 'weight') return [];\n const layers = [family(spec.gap, spec.angle)];\n if (spec.style === 'cross-hatch') layers.push(family(spec.gap, spec.angle + 90));\n return layers;\n}\n","import type { CommonUiProps } from './types';\nimport type { UiAttrValue, UiBind, UiElement, UiNode, UiResolved, UiSlot } from './view';\n\nexport type Attrs = Record<string, UiAttrValue | undefined | false>;\n\n/** Drops absent attributes: `undefined` and `false` are never written. */\nfunction clean(attrs: Attrs): Record<string, UiAttrValue> {\n const out: Record<string, UiAttrValue> = {};\n for (const [name, value] of Object.entries(attrs)) if (value !== undefined && value !== false) out[name] = value;\n return out;\n}\n\nexport const el = (tag: string, attrs: Attrs, children: readonly UiNode[] = [], bind?: UiBind): UiElement => ({\n tag,\n attrs: clean(attrs),\n children,\n ...(bind ? { bind } : {}),\n});\nexport const text = (value: string): UiNode => ({ text: value });\nexport const slot = (name: UiSlot): UiNode => ({ slot: name });\n\nexport function root(slug: string, props: CommonUiProps, r: UiResolved, attrs: Attrs = {}): Attrs {\n return {\n class: ['sp-ui', `sp-${slug}`, `sp-ground-${r.ground}`, props.className].filter(Boolean).join(' '),\n 'data-ground': r.ground,\n 'data-substrate': r.substrate,\n 'data-mode': r.mode,\n 'data-size': r.size,\n 'data-frame': String(r.frame),\n ...attrs,\n };\n}\n\nexport type FrameKind = 'control' | 'pill' | 'box' | 'card' | 'round';\nexport const frame = (kind: FrameKind) => el('span', { part: 'sp-frame', 'data-kind': kind, 'aria-hidden': 'true' });\n/** A tone by state (`primary`, `selected`…) or ramp level; ui.css maps a state to its ground's level. */\nexport const tone = (value: string, kind: FrameKind) => el('span', { part: 'sp-tone', 'data-tone': value, 'data-kind': kind, 'aria-hidden': 'true' });\n\n/** Exact glyphs in a 16 × 16 box: their strokes are values, never inked (REQ-304, REQ-310). */\nexport const UI_GLYPHS = Object.freeze({\n tick: 'M3.5,8.5L6.5,11.5L12.5,4.5',\n dash: 'M4,8H12',\n cross: 'M4.5,4.5L11.5,11.5M11.5,4.5L4.5,11.5',\n warning: 'M8,2.5L14.5,13.5H1.5Z M8,6.5V9.5 M8,11.5V11.5',\n /** A radio's selection: filled by ui.css. */\n dot: 'M11,8A3,3 0 1,1 5,8A3,3 0 1,1 11,8Z',\n /** A Rate mark (C-2). */\n lozenge: 'M8,1.5L14.5,8L8,14.5L1.5,8Z',\n info: 'M14.5,8A6.5,6.5 0 1,1 1.5,8A6.5,6.5 0 1,1 14.5,8Z M8,7.5V11.5 M8,4.75V4.75',\n});\nexport type UiGlyph = keyof typeof UI_GLYPHS;\nexport const glyph = (name: UiGlyph) => el('svg', { part: 'sp-mark', 'data-glyph': name, viewBox: '0 0 16 16', 'aria-hidden': 'true' }, [el('path', { d: UI_GLYPHS[name] })]);\n\n\n/** Text for assistive technology only, hidden for sight as a native input is (REQ-314). */\nexport const sr = (value: string) => el('span', { class: 'sp-ui-sr' }, [text(value)]);\n\n/** The id relations of a control derive from its `id`, else its `name` (REQ-329). */\nexport const baseOf = (props: { readonly id?: string; readonly name?: string }) => props.id ?? props.name;\n\n/** A native radio or checkbox, hidden for sight: the control the adapter binds (REQ-314). */\nexport function nativeInput(type: 'checkbox' | 'radio', attrs: Attrs): UiElement {\n return el('input', { type, class: 'sp-ui-native', ...attrs }, [], 'native');\n}\n","import { DEFAULTS } from '../config/resolve';\nimport type { InkMode, ProviderConfig, SubstrateName } from '../types';\nimport { uiFrameVariant } from './frame';\nimport { uiRequireName } from './names';\nimport type {\n CommonUiProps,\n SpButtonProps,\n SpCardProps,\n SpCheckboxProps,\n SpDividerProps,\n SpInputProps,\n SpSwitchProps,\n UiSize,\n} from './types';\nimport { baseOf, el, frame, glyph, root, slot, text, tone } from './view-kit';\n\nexport { UI_GLYPHS, type UiGlyph } from './view-kit';\n\n/**\n * The markup contract of the UI components (API delta §4), as data: every adapter writes this tree\n * and nothing else, and the parity gate compares each adapter's server render with it (REQ-327).\n * An adapter binds behaviour —value, events, forms— to the elements marked `bind`, and puts the\n * consumer's content where a `slot` stands. It computes nothing (Art. 2).\n */\nexport type UiAttrValue = string | true;\n\nexport interface UiElement {\n readonly tag: string;\n /** HTML attribute names; `true` is a boolean attribute. */\n readonly attrs: Readonly<Record<string, UiAttrValue>>;\n readonly children: readonly UiNode[];\n /** What an adapter binds to the element: see `UiBind`. */\n readonly bind?: UiBind;\n}\n\n/**\n * `native`: a control an adapter binds value, events and forms to —one, or one per item of a\n * composite, told apart by its `value` or `data-key`. `close`: the button that emits `close`.\n */\nexport type UiBind = 'native' | 'close';\n\nexport type UiSlot = 'content' | 'prefix' | 'suffix' | 'extra' | 'footer';\nexport type UiNode = UiElement | { readonly text: string } | { readonly slot: UiSlot };\n\n/** What a component inherits around it: the provider, the dashboard cell, the environment. */\nexport interface UiEnvironment {\n readonly provider?: ProviderConfig;\n /** The configuration of the dashboard whose cell holds the component (REQ-311). */\n readonly cell?: ProviderConfig;\n /** `prefers-contrast: more` or `forced-colors: active` holds (REQ-123). */\n readonly forcedPrecision?: boolean;\n}\n\nexport interface UiResolved {\n readonly ground: string;\n readonly substrate: SubstrateName;\n readonly mode: InkMode;\n readonly size: UiSize;\n /** 0..5: `ui.css` folds it onto the variants the ground draws. */\n readonly frame: number;\n}\n\n/** The most frame variants a ground may draw (Data Model §3.8); the runtime needs no ground tokens. */\nconst FRAME_SLOTS = 6;\n\n/**\n * Ground, substrate and mode with the charts' precedence: prop, then dashboard, then provider,\n * then the library default; a forced `precision` applies after, and nothing overrides it (REQ-311).\n */\nexport function resolveUi(props: CommonUiProps, env: UiEnvironment): UiResolved {\n const { provider = {}, cell = {} } = env;\n const ground = props.ground ?? cell.ground ?? provider.ground ?? DEFAULTS.ground;\n return {\n ground: typeof ground === 'string' ? ground : ground.name,\n substrate: props.substrate ?? cell.substrate ?? provider.substrate ?? DEFAULTS.substrate,\n mode: env.forcedPrecision ? 'precision' : (props.mode ?? cell.mode ?? provider.mode ?? DEFAULTS.mode),\n size: props.size ?? 'md',\n frame: uiFrameVariant(props.seed, props.id, FRAME_SLOTS),\n };\n}\n\n/** `SpButton`: a native `<button>`, or `<a>` with `href` (REQ-314, REQ-310). */\nexport function uiButtonView(props: SpButtonProps, r: UiResolved, content: { readonly text?: string }): UiElement {\n uiRequireName('SpButton', content.text, props.label);\n const variant = props.variant ?? 'default';\n const link = props.href !== undefined;\n const toned = props.disabled ? 'disabled' : variant === 'default' ? undefined : variant;\n return el(\n link ? 'a' : 'button',\n root('button', props, r, {\n id: props.id,\n type: link ? undefined : (props.type ?? 'button'),\n href: link && !props.disabled ? props.href : undefined,\n disabled: !link && props.disabled === true,\n 'aria-disabled': link && props.disabled ? 'true' : undefined,\n 'aria-label': props.label,\n 'data-variant': variant,\n 'data-block': props.block ? 'true' : undefined,\n }),\n [\n frame('control'),\n ...(toned ? [tone(toned, 'control')] : []),\n ...(variant === 'danger' ? [glyph('cross')] : []),\n el('span', { class: toned ? 'sp-ui-label sp-ui-plate' : 'sp-ui-label' }, [slot('content')]),\n ],\n );\n}\n\n/** `SpInput`: a native `<input>` in a framed box, its message after it (REQ-314, REQ-334). */\nexport function uiInputView(\n props: SpInputProps,\n r: UiResolved,\n state: { readonly value: string; readonly prefix?: boolean; readonly suffix?: boolean },\n): UiElement {\n const base = baseOf(props);\n const message = props.message ? props.message : undefined;\n const messageId = message && base ? `${base}--message` : undefined;\n return el('span', root('input', props, r, { 'data-invalid': props.invalid ? 'true' : undefined }), [\n el('span', { class: 'sp-ui-box' }, [\n frame('control'),\n ...(state.prefix ? [el('span', { class: 'sp-ui-affix', 'data-slot': 'prefix' }, [slot('prefix')])] : []),\n el(\n 'input',\n {\n class: 'sp-ui-control',\n id: props.id,\n type: props.type ?? 'text',\n name: props.name,\n value: state.value,\n placeholder: props.placeholder,\n disabled: props.disabled === true,\n readonly: props.readOnly === true,\n 'aria-label': props.label,\n 'aria-invalid': props.invalid ? 'true' : undefined,\n 'aria-describedby': messageId,\n },\n [],\n 'native',\n ),\n ...(state.suffix ? [el('span', { class: 'sp-ui-affix', 'data-slot': 'suffix' }, [slot('suffix')])] : []),\n ...(props.invalid ? [glyph('warning')] : []),\n ]),\n ...(message ? [el('span', { class: 'sp-ui-message', id: messageId }, [text(message)])] : []),\n ]);\n}\n\n/** A native checkbox, hidden for sight, first in its `<label>` (REQ-314). */\nfunction nativeCheckbox(props: { readonly id?: string; readonly name?: string; readonly disabled?: boolean }, checked: boolean, role?: 'switch') {\n return el(\n 'input',\n { type: 'checkbox', class: 'sp-ui-native', role, id: props.id, name: props.name, checked, disabled: props.disabled === true },\n [],\n 'native',\n );\n}\n\n/** `SpCheckbox`: native state; the tick and dash are drawn and shown by it (REQ-310). */\nexport function uiCheckboxView(props: SpCheckboxProps, r: UiResolved, state: { readonly checked: boolean }): UiElement {\n return el('label', root('checkbox', props, r, { 'data-indeterminate': props.indeterminate ? 'true' : undefined }), [\n nativeCheckbox(props, state.checked),\n el('span', { class: 'sp-ui-box', 'aria-hidden': 'true' }, [frame('box'), tone('selected', 'box'), glyph('tick'), glyph('dash')]),\n el('span', { class: 'sp-ui-label' }, [text(props.label)]),\n ]);\n}\n\n/** `SpSwitch`: a native checkbox with `role=\"switch\"`, a pill track and an exact knob (REQ-314). */\nexport function uiSwitchView(props: SpSwitchProps, r: UiResolved, state: { readonly checked: boolean }): UiElement {\n return el('label', root('switch', props, r), [\n nativeCheckbox(props, state.checked, 'switch'),\n el('span', { class: 'sp-ui-track', 'aria-hidden': 'true' }, [frame('pill'), tone('selected', 'pill'), el('span', { part: 'sp-knob' })]),\n el('span', { class: 'sp-ui-label' }, [text(props.label)]),\n ]);\n}\n\n/** `SpCard`: an `<article>` named by its heading, or a `<section>` without a title (REQ-318). */\nexport function uiCardView(props: SpCardProps, r: UiResolved, slots: { readonly extra?: boolean; readonly footer?: boolean }): UiElement {\n const titled = props.title !== undefined;\n const titleId = titled && props.id ? `${props.id}--title` : undefined;\n const header = titled || slots.extra;\n return el(\n titled ? 'article' : 'section',\n root('card', props, r, { id: props.id, 'aria-labelledby': titleId, 'aria-label': titled && !titleId ? props.title : undefined }),\n [\n frame('card'),\n ...(header\n ? [\n el('div', { class: 'sp-ui-card-header' }, [\n ...(titled ? [el(`h${props.headingLevel ?? 3}`, { class: 'sp-ui-card-title', id: titleId }, [text(props.title!)])] : []),\n ...(slots.extra ? [el('div', { class: 'sp-ui-card-extra' }, [slot('extra')])] : []),\n ]),\n el('span', { part: 'sp-rule', 'aria-hidden': 'true' }),\n ]\n : []),\n el('div', { class: 'sp-ui-card-body' }, [slot('content')]),\n ...(slots.footer ? [el('div', { class: 'sp-ui-card-footer' }, [slot('footer')])] : []),\n ],\n );\n}\n\n/** `SpDivider`: a `separator`; with text, the text between two rules (REQ-318). */\nexport function uiDividerView(props: SpDividerProps, r: UiResolved): UiElement {\n const vertical = props.orientation === 'vertical';\n const rule = () => el('span', { part: 'sp-rule', 'aria-hidden': 'true' });\n return el(\n 'div',\n root('divider', props, r, {\n id: props.id,\n role: 'separator',\n 'aria-orientation': vertical ? 'vertical' : undefined,\n 'data-orientation': vertical ? 'vertical' : 'horizontal',\n 'data-align': props.text ? (props.align ?? 'center') : undefined,\n }),\n props.text ? [rule(), el('span', { class: 'sp-ui-divider-text' }, [text(props.text)]), rule()] : [rule()],\n );\n}\n","import { round2 } from '../render/round';\nimport { uiItems, uiSelectedKey } from './items';\nimport type { SpRadioGroupProps, SpRateProps, SpSegmentedProps, SpSliderProps, SpTabsProps } from './types';\nimport { uiRange, uiRateCount, uiValue } from './value';\nimport { el, frame, glyph, nativeInput, root, slot, text, tone } from './view-kit';\nimport type { UiElement, UiResolved } from './view';\n\n/*\n * Batch B2 (API delta §4): the composites and the ranges. Every composite of radios keeps one tab\n * stop natively; the adapters move focus with `uiRovingKey` (REQ-315). The one heightened element\n * of an instance (REQ-309, I-18) is an `aria-hidden` plate behind the current item's label.\n */\n\nconst heighten = () => el('span', { part: 'sp-heighten', 'aria-hidden': 'true' });\nconst legend = (label: string, forSight: boolean) => el('legend', { class: forSight ? 'sp-ui-legend' : 'sp-ui-legend sp-ui-sr' }, [text(label)]);\n/** Radios without a `name` group under `${id}--value`, so two anonymous instances never share one. */\nconst groupName = (props: { readonly id?: string; readonly name?: string }) => props.name ?? (props.id ? `${props.id}--value` : undefined);\n\n/** `SpRadioGroup`: a `<fieldset>` of native radios; the value `null` checks none (REQ-314, REQ-322). */\nexport function uiRadioGroupView(props: SpRadioGroupProps, r: UiResolved, state: { readonly value: string | null }): UiElement {\n const items = uiItems(props.items, 'SpRadioGroup');\n const value = uiSelectedKey(items, state.value, 'none');\n return el('fieldset', root('radio-group', props, r, { id: props.id, 'data-orientation': props.orientation ?? 'vertical' }), [\n legend(props.label, true),\n ...items.map((item) =>\n el('label', { class: 'sp-ui-item', 'data-key': item.key, 'data-disabled': item.disabled ? 'true' : undefined }, [\n nativeInput('radio', {\n id: props.id ? `${props.id}--${item.key}` : undefined,\n name: props.name,\n value: item.key,\n checked: item.key === value,\n disabled: item.disabled === true,\n }),\n el('span', { class: 'sp-ui-box', 'aria-hidden': 'true' }, [frame('round'), tone('selected', 'round'), glyph('dot')]),\n el('span', { class: 'sp-ui-label' }, [text(item.label)]),\n ]),\n ),\n ]);\n}\n\n/** `SpSegmented`: native radios in one frame; the selected segment toned and heightened (REQ-308, REQ-309). */\nexport function uiSegmentedView(props: SpSegmentedProps, r: UiResolved, state: { readonly value: string | null }): UiElement {\n const items = uiItems(props.items, 'SpSegmented');\n const value = uiSelectedKey(items, state.value, 'first');\n const name = groupName(props);\n return el('fieldset', root('segmented', props, r, { id: props.id, 'data-block': props.block ? 'true' : undefined }), [\n legend(props.label, false),\n el('span', { class: 'sp-ui-segments' }, [\n frame('control'),\n ...items.map((item) => {\n const selected = item.key === value;\n return el('label', { class: 'sp-ui-item', 'data-key': item.key, 'data-disabled': item.disabled ? 'true' : undefined }, [\n nativeInput('radio', { name, value: item.key, checked: selected, disabled: item.disabled === true }),\n el('span', { class: 'sp-ui-segment' }, [\n ...(selected ? [tone('selected', 'control'), heighten()] : []),\n el('span', { class: selected ? 'sp-ui-label sp-ui-plate' : 'sp-ui-label' }, [text(item.label)]),\n ]),\n ]);\n }),\n ]),\n ]);\n}\n\n/** `SpTabs`: a tablist of native buttons, one tab stop on the selected; panels are the content (REQ-314, REQ-315). */\nexport function uiTabsView(props: SpTabsProps, r: UiResolved, state: { readonly value: string | null }): UiElement {\n const items = uiItems(props.items, 'SpTabs');\n const value = uiSelectedKey(items, state.value, 'first');\n const vertical = props.orientation === 'vertical';\n const id = props.id;\n return el('div', root('tabs', props, r, { id, 'data-orientation': vertical ? 'vertical' : 'horizontal' }), [\n el('div', { class: 'sp-ui-tablist', role: 'tablist', 'aria-label': props.label, 'aria-orientation': vertical ? 'vertical' : undefined }, [\n ...items.map((item) => {\n const selected = item.key === value;\n return el(\n 'button',\n {\n type: 'button',\n class: 'sp-ui-tab',\n role: 'tab',\n id: id ? `${id}--tab-${item.key}` : undefined,\n 'aria-selected': selected ? 'true' : 'false',\n 'aria-controls': id ? `${id}--panel-${item.key}` : undefined,\n tabindex: selected ? '0' : '-1',\n disabled: item.disabled === true,\n 'data-key': item.key,\n },\n [...(selected ? [heighten()] : []), el('span', { class: 'sp-ui-label' }, [text(item.label)])],\n 'native',\n );\n }),\n el('span', { part: 'sp-rule', 'aria-hidden': 'true' }),\n ]),\n el('div', { class: 'sp-ui-tabpanels' }, [slot('content')]),\n ]);\n}\n\n/**\n * `SpTabPanel`: a `tabpanel` labelled by its tab, focusable, hidden unless its tab is selected.\n * `tabs` is what the enclosing `SpTabs` shares: its `id` and the selected key.\n */\nexport function uiTabPanelView(props: { readonly value: string }, tabs: { readonly id?: string; readonly value: string | null }): UiElement {\n const { id } = tabs;\n return el(\n 'div',\n {\n class: 'sp-ui-tabpanel',\n role: 'tabpanel',\n id: id ? `${id}--panel-${props.value}` : undefined,\n 'aria-labelledby': id ? `${id}--tab-${props.value}` : undefined,\n tabindex: '0',\n hidden: props.value !== tabs.value,\n },\n [slot('content')],\n );\n}\n\n/**\n * `SpSlider`: a native range over the drawing. Its fraction is a custom property (DD-025): fill\n * and thumb sit at it exactly; the thumb is the one heightening (REQ-309).\n */\nexport function uiSliderView(props: SpSliderProps, r: UiResolved, state: { readonly value: number }): UiElement {\n // An invalid range falls back to its defaults once, and the native input carries the same.\n const valid = uiRange({ min: props.min ?? 0, max: props.max ?? 100, step: props.step ?? 1 }, 'SpSlider');\n const { value, fraction } = uiValue(state.value, valid, 'SpSlider');\n const span = valid.max - valid.min;\n const marks = (props.marks ?? []).filter((m) => Number.isFinite(m) && m >= valid.min && m <= valid.max);\n return el('label', root('slider', props, r, { style: `--sp-ui-fraction: ${fraction}`, 'data-disabled': props.disabled ? 'true' : undefined }), [\n el('span', { class: 'sp-ui-label' }, [text(props.label)]),\n el('span', { class: 'sp-ui-rail' }, [\n el('span', { part: 'sp-track', 'aria-hidden': 'true' }),\n el('span', { part: 'sp-fill', 'aria-hidden': 'true' }, [tone('selected', 'pill')]),\n el('span', { part: 'sp-thumb sp-heighten', 'aria-hidden': 'true' }),\n el(\n 'input',\n {\n type: 'range',\n class: 'sp-ui-range',\n id: props.id,\n name: props.name,\n min: String(valid.min),\n max: String(valid.max),\n step: String(valid.step ?? 1),\n value: String(value),\n disabled: props.disabled === true,\n },\n [],\n 'native',\n ),\n ]),\n ...(marks.length\n ? [\n el(\n 'span',\n { class: 'sp-ui-scale', 'aria-hidden': 'true' },\n marks.map((m) => el('span', { class: 'sp-ui-scale-mark', style: `--sp-ui-at: ${round2((m - valid.min) / span)}` }, [text(String(m))])),\n ),\n ]\n : []),\n ]);\n}\n\n/** `SpRate`: `count` native radios valued 1..count, drawn as exact lozenges; filled up to the value (C-2). */\nexport function uiRateView(props: SpRateProps, r: UiResolved, state: { readonly value: number }): UiElement {\n const count = uiRateCount(props.count);\n const { value } = uiValue(state.value, { min: 0, max: count, step: 1 }, 'SpRate');\n const name = groupName(props);\n const readOnly = props.readOnly === true;\n return el(\n 'fieldset',\n root('rate', props, r, {\n id: props.id,\n role: readOnly ? 'radiogroup' : undefined,\n 'aria-readonly': readOnly ? 'true' : undefined,\n 'data-readonly': readOnly ? 'true' : undefined,\n }),\n [\n legend(props.label, false),\n ...Array.from({ length: count }, (_, i) => {\n const n = i + 1;\n const filled = n <= value;\n return el('label', { class: 'sp-ui-item', 'data-filled': filled ? 'true' : undefined }, [\n nativeInput('radio', { name, value: String(n), checked: n === value, disabled: props.disabled === true, 'aria-label': String(n) }),\n el('span', { class: 'sp-ui-box', 'aria-hidden': 'true' }, [...(filled ? [tone('selected', 'round')] : []), glyph('lozenge')]),\n ]);\n }),\n ],\n );\n}\n","import { uiRequireName } from './names';\nimport { uiProgressArc, UI_PROGRESS_VIEWBOX } from './progress';\nimport { uiSteps } from './steps';\nimport type { AlertKind, SpAlertProps, SpBadgeProps, SpProgressProps, SpSkeletonProps, SpStepsProps, SpTagProps } from './types';\nimport { uiValue } from './value';\nimport { el, frame, glyph, root, slot, sr, text, tone, type UiGlyph } from './view-kit';\nimport type { UiElement, UiResolved } from './view';\n\n/*\n * Batch B3 (API delta §4): display and feedback. Their roles are REQ-318's; nothing here takes\n * focus but the close buttons of Tag and Alert.\n */\n\nconst closeButton = (label: string) =>\n el('button', { type: 'button', class: 'sp-ui-close', 'aria-label': label }, [glyph('cross')], 'close');\n\n/** `SpSteps`: an ordered list; the current step has `aria-current=\"step\"` and the heightening (REQ-318, REQ-309). */\nexport function uiStepsView(props: SpStepsProps, r: UiResolved): UiElement {\n const steps = uiSteps(props.items, props.current);\n const titles = new Map(props.items.map((item) => [item.key, item] as const));\n return el(\n 'ol',\n root('steps', props, r, { id: props.id, 'aria-label': props.label, 'data-orientation': props.orientation === 'vertical' ? 'vertical' : 'horizontal' }),\n steps.map((step, i) => {\n const item = titles.get(step.key)!;\n const mark = step.status === 'finish' ? glyph('tick') : step.status === 'error' ? glyph('cross') : text(String(i + 1));\n return el('li', { class: 'sp-ui-step', 'data-status': step.status, 'aria-current': step.current ? 'step' : undefined }, [\n el('span', { class: 'sp-ui-step-mark', part: step.current ? 'sp-heighten' : undefined, 'aria-hidden': 'true' }, [mark]),\n el('span', { class: 'sp-ui-step-text' }, [\n el('span', { class: 'sp-ui-step-title' }, [text(item.title)]),\n ...(item.description ? [el('span', { class: 'sp-ui-step-description' }, [text(item.description)])] : []),\n ]),\n // Exact, dashed while it leads to a step still waiting (C-4, DD-026).\n ...(step.connector ? [el('span', { part: 'sp-connector', 'data-status': step.connector, 'aria-hidden': 'true' })] : []),\n ]);\n }),\n );\n}\n\n/** `SpTag`: framed and toned at its level (default 1); closable, a native close button (REQ-308). */\nexport function uiTagView(props: SpTagProps, r: UiResolved, content: { readonly text?: string }): UiElement {\n const level = String(props.tone ?? 1);\n const label = props.closeLabel ?? (content.text ? `Remove ${content.text}` : 'Remove');\n return el('span', root('tag', props, r, { id: props.id, 'data-tone': level }), [\n frame('control'),\n tone(level, 'control'),\n el('span', { class: 'sp-ui-label sp-ui-plate' }, [slot('content')]),\n ...(props.closable ? [closeButton(label)] : []),\n ]);\n}\n\n/** `SpBadge`: its count is text beside the content, so it is in the accessible name (REQ-318). */\nexport function uiBadgeView(props: SpBadgeProps, r: UiResolved, content: { readonly text?: string }): UiElement {\n const max = props.max ?? 99;\n const count = props.count !== undefined && Number.isFinite(props.count) ? Math.max(Math.round(props.count), 0) : undefined;\n const shown = count === undefined ? undefined : count > max ? `${max}+` : String(count);\n const dot = props.dot === true;\n uiRequireName('SpBadge', content.text ?? (dot ? undefined : shown), props.label);\n return el('span', root('badge', props, r, { id: props.id }), [\n el('span', { class: 'sp-ui-label' }, [slot('content')]),\n ...(dot\n ? [el('span', { class: 'sp-ui-badge-dot', 'aria-hidden': 'true' })]\n : shown !== undefined\n ? [el('span', { class: 'sp-ui-badge-count' }, [frame('pill'), el('span', { class: 'sp-ui-badge-text' }, [text(shown)])])]\n : []),\n ...(props.label ? [sr(props.label)] : []),\n ]);\n}\n\n/** The circle Progress's ring width, in view-box units. */\nconst RING = 8;\n\n/** `SpProgress`: a `progressbar`; without a value, indeterminate: no `aria-valuenow`, a static tone (REQ-318, REQ-320). */\nexport function uiProgressView(props: SpProgressProps, r: UiResolved): UiElement {\n const determinate = props.value !== undefined;\n const { value, fraction } = determinate ? uiValue(props.value!, { min: 0, max: 100 }, 'SpProgress') : { value: 0, fraction: 0 };\n const circle = props.shape === 'circle';\n const drawing = circle\n ? (() => {\n const arc = uiProgressArc(determinate ? fraction : 0.25, RING);\n return el('svg', { class: 'sp-ui-ring', viewBox: `0 0 ${UI_PROGRESS_VIEWBOX} ${UI_PROGRESS_VIEWBOX}`, 'aria-hidden': 'true' }, [\n el('path', { class: 'sp-ui-ring-track', d: arc.track.d }),\n el('path', { class: 'sp-ui-ring-fill', d: arc.fill.d }),\n ]);\n })()\n : el('span', { class: 'sp-ui-rail' }, [\n el('span', { part: 'sp-track', 'aria-hidden': 'true' }),\n el('span', { part: 'sp-fill', 'aria-hidden': 'true' }, [tone(determinate ? 'selected' : '1', 'pill')]),\n ]);\n return el(\n 'div',\n root('progress', props, r, {\n id: props.id,\n role: 'progressbar',\n 'aria-label': props.label,\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n 'aria-valuenow': determinate ? String(value) : undefined,\n 'data-shape': circle ? 'circle' : 'line',\n 'data-indeterminate': determinate ? undefined : 'true',\n style: determinate ? `--sp-ui-fraction: ${fraction}` : undefined,\n }),\n [drawing, ...(determinate && props.showValue !== false ? [el('span', { class: 'sp-ui-value', 'aria-hidden': 'true' }, [text(`${value}%`)])] : [])],\n );\n}\n\nconst ALERT_GLYPHS: Readonly<Record<AlertKind, UiGlyph>> = { info: 'info', success: 'tick', warning: 'warning', error: 'cross' };\n\n/**\n * `SpAlert`: `alert` for error and warning, `status` otherwise (REQ-318). Error alone takes a tone,\n * the ground's `alertError`, with its text on a plate (C-3); every kind has its exact glyph.\n */\nexport function uiAlertView(props: SpAlertProps, r: UiResolved, state: { readonly closable: boolean }): UiElement {\n const kind = props.kind ?? 'info';\n const error = kind === 'error';\n return el('div', root('alert', props, r, { id: props.id, role: error || kind === 'warning' ? 'alert' : 'status', 'data-kind': kind }), [\n frame('card'),\n ...(error ? [tone('alertError', 'card')] : []),\n glyph(ALERT_GLYPHS[kind]),\n el('div', { class: error ? 'sp-ui-alert-body sp-ui-plate' : 'sp-ui-alert-body' }, [\n ...(props.title ? [el('div', { class: 'sp-ui-alert-title' }, [text(props.title)])] : []),\n el('div', { class: 'sp-ui-alert-text' }, [slot('content')]),\n ]),\n ...(state.closable ? [closeButton(props.closeLabel ?? 'Close')] : []),\n ]);\n}\n\n/** `SpSkeleton`: `aria-busy`, a label for assistive technology, and hidden toned shapes (REQ-318). */\nexport function uiSkeletonView(props: SpSkeletonProps, r: UiResolved): UiElement {\n const lines = props.lines !== undefined && Number.isFinite(props.lines) ? Math.min(Math.max(Math.round(props.lines), 1), 8) : 3;\n return el('div', root('skeleton', props, r, { id: props.id, 'aria-busy': 'true' }), [\n sr(props.label ?? 'Loading'),\n ...(props.avatar ? [el('span', { class: 'sp-ui-skeleton-avatar', 'aria-hidden': 'true' }, [tone('1', 'round')])] : []),\n el(\n 'span',\n { class: 'sp-ui-skeleton-lines', 'aria-hidden': 'true' },\n Array.from({ length: lines }, () => el('span', { class: 'sp-ui-skeleton-line' }, [tone('1', 'control')])),\n ),\n ]);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silverpoint/core",
3
- "version": "0.2.0",
3
+ "version": "0.6.0",
4
4
  "description": "Geometry, scales, interaction and the Inker interface of silverpoint. No DOM, no framework.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,6 +21,24 @@
21
21
  "import": "./dist/dashboard-demos.js",
22
22
  "default": "./dist/dashboard-demos.js"
23
23
  },
24
+ "./ui": {
25
+ "@silverpoint/source": "./src/ui/index.ts",
26
+ "types": "./dist/ui.d.ts",
27
+ "import": "./dist/ui.js",
28
+ "default": "./dist/ui.js"
29
+ },
30
+ "./ui-demos": {
31
+ "@silverpoint/source": "./src/ui-demos.ts",
32
+ "types": "./dist/ui-demos.d.ts",
33
+ "import": "./dist/ui-demos.js",
34
+ "default": "./dist/ui-demos.js"
35
+ },
36
+ "./catalog": {
37
+ "@silverpoint/source": "./src/catalog.ts",
38
+ "types": "./dist/catalog.d.ts",
39
+ "import": "./dist/catalog.js",
40
+ "default": "./dist/catalog.js"
41
+ },
24
42
  "./package.json": "./package.json"
25
43
  },
26
44
  "files": [