@ponchia/ui 0.6.10 → 0.6.12

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/README.md +38 -25
  3. package/annotations/index.d.ts +15 -15
  4. package/annotations/index.d.ts.map +1 -1
  5. package/annotations/index.js +52 -34
  6. package/behaviors/carousel.d.ts +7 -3
  7. package/behaviors/carousel.d.ts.map +1 -1
  8. package/behaviors/carousel.js +157 -27
  9. package/behaviors/combobox.d.ts +1 -1
  10. package/behaviors/combobox.d.ts.map +1 -1
  11. package/behaviors/combobox.js +46 -23
  12. package/behaviors/command.d.ts +1 -1
  13. package/behaviors/command.d.ts.map +1 -1
  14. package/behaviors/command.js +63 -23
  15. package/behaviors/connectors.d.ts.map +1 -1
  16. package/behaviors/connectors.js +126 -19
  17. package/behaviors/crosshair.d.ts.map +1 -1
  18. package/behaviors/crosshair.js +71 -8
  19. package/behaviors/dialog.d.ts.map +1 -1
  20. package/behaviors/dialog.js +20 -3
  21. package/behaviors/disclosure.d.ts.map +1 -1
  22. package/behaviors/disclosure.js +35 -6
  23. package/behaviors/dismissible.js +1 -1
  24. package/behaviors/forms.d.ts +23 -2
  25. package/behaviors/forms.d.ts.map +1 -1
  26. package/behaviors/forms.js +97 -9
  27. package/behaviors/glyph.d.ts.map +1 -1
  28. package/behaviors/glyph.js +56 -5
  29. package/behaviors/internal.d.ts.map +1 -1
  30. package/behaviors/internal.js +52 -5
  31. package/behaviors/menu.d.ts.map +1 -1
  32. package/behaviors/menu.js +2 -1
  33. package/behaviors/modal.d.ts +13 -13
  34. package/behaviors/modal.d.ts.map +1 -1
  35. package/behaviors/modal.js +283 -96
  36. package/behaviors/popover.d.ts.map +1 -1
  37. package/behaviors/popover.js +58 -8
  38. package/behaviors/sources.d.ts.map +1 -1
  39. package/behaviors/sources.js +24 -3
  40. package/behaviors/splitter.d.ts.map +1 -1
  41. package/behaviors/splitter.js +27 -6
  42. package/behaviors/table.d.ts.map +1 -1
  43. package/behaviors/table.js +44 -7
  44. package/behaviors/tabs.d.ts.map +1 -1
  45. package/behaviors/tabs.js +51 -14
  46. package/behaviors/theme.d.ts.map +1 -1
  47. package/behaviors/theme.js +64 -4
  48. package/behaviors/toast.d.ts +6 -1
  49. package/behaviors/toast.d.ts.map +1 -1
  50. package/behaviors/toast.js +48 -12
  51. package/classes/classes.json +24 -0
  52. package/classes/index.d.ts +3 -2
  53. package/classes/index.js +77 -39
  54. package/classes/vscode.css-custom-data.json +1 -1
  55. package/connectors/index.d.ts +4 -4
  56. package/connectors/index.d.ts.map +1 -1
  57. package/connectors/index.js +14 -12
  58. package/css/annotations.css +1 -0
  59. package/css/app.css +7 -0
  60. package/css/base.css +3 -0
  61. package/css/bullet.css +41 -7
  62. package/css/code.css +14 -0
  63. package/css/command.css +10 -0
  64. package/css/dataviz.css +27 -0
  65. package/css/diff.css +2 -0
  66. package/css/disclosure.css +8 -0
  67. package/css/dots.css +1 -1
  68. package/css/feedback.css +9 -0
  69. package/css/interval.css +20 -2
  70. package/css/legend.css +10 -9
  71. package/css/marks.css +1 -0
  72. package/css/motion.css +2 -0
  73. package/css/overlay.css +14 -2
  74. package/css/primitives.css +1 -1
  75. package/css/report.css +3 -0
  76. package/css/sources.css +4 -4
  77. package/css/spotlight.css +6 -0
  78. package/css/table.css +19 -0
  79. package/css/term.css +4 -1
  80. package/css/tokens.css +9 -14
  81. package/dist/bronto.css +1 -1
  82. package/dist/css/analytical.css +1 -1
  83. package/dist/css/app.css +1 -1
  84. package/dist/css/bullet.css +1 -1
  85. package/dist/css/code.css +1 -1
  86. package/dist/css/command.css +1 -1
  87. package/dist/css/dataviz.css +1 -1
  88. package/dist/css/diff.css +1 -1
  89. package/dist/css/disclosure.css +1 -1
  90. package/dist/css/dots.css +1 -1
  91. package/dist/css/feedback.css +1 -1
  92. package/dist/css/interval.css +1 -1
  93. package/dist/css/legend.css +1 -1
  94. package/dist/css/marks.css +1 -1
  95. package/dist/css/overlay.css +1 -1
  96. package/dist/css/primitives.css +1 -1
  97. package/dist/css/report-kit.css +1 -1
  98. package/dist/css/sources.css +1 -1
  99. package/dist/css/spotlight.css +1 -1
  100. package/dist/css/table.css +1 -1
  101. package/dist/css/term.css +1 -1
  102. package/dist/css/tokens.css +1 -1
  103. package/docs/architecture.md +6 -4
  104. package/docs/bullet.md +6 -1
  105. package/docs/clamp.md +5 -0
  106. package/docs/command.md +3 -2
  107. package/docs/contrast.md +3 -3
  108. package/docs/crosshair.md +6 -0
  109. package/docs/dots.md +10 -3
  110. package/docs/figure.md +7 -0
  111. package/docs/glyphs.md +14 -2
  112. package/docs/highlights.md +9 -0
  113. package/docs/interval.md +6 -0
  114. package/docs/mermaid.md +5 -3
  115. package/docs/package-contract.md +24 -1
  116. package/docs/reference.md +1 -1
  117. package/docs/reporting.md +8 -8
  118. package/docs/selection.md +9 -0
  119. package/docs/sources.md +5 -0
  120. package/docs/stability.md +31 -6
  121. package/docs/state.md +6 -0
  122. package/docs/textref.md +18 -13
  123. package/docs/theming.md +18 -8
  124. package/docs/toc.md +6 -0
  125. package/docs/tree.md +9 -2
  126. package/docs/usage.md +12 -2
  127. package/docs/vega.md +5 -3
  128. package/glyphs/glyphs.js +62 -8
  129. package/index.d.ts +1 -0
  130. package/llms.txt +18 -14
  131. package/package.json +98 -6
  132. package/qwik/index.d.ts +4 -3
  133. package/qwik/index.d.ts.map +1 -1
  134. package/qwik/index.js +7 -5
  135. package/react/index.d.ts +4 -3
  136. package/react/index.d.ts.map +1 -1
  137. package/react/index.js +3 -2
  138. package/solid/index.d.ts +7 -5
  139. package/solid/index.d.ts.map +1 -1
  140. package/solid/index.js +11 -7
  141. package/tokens/figma.variables.json +2 -2
  142. package/tokens/index.js +1 -1
  143. package/tokens/index.json +2 -2
  144. package/tokens/resolved.json +1 -1
  145. package/tokens/tokens.dtcg.json +1 -1
  146. package/tokens/vega.d.ts +1 -1
  147. package/tokens/vega.js +3 -2
  148. package/vue/index.d.ts.map +1 -1
  149. package/vue/index.js +37 -3
package/CHANGELOG.md CHANGED
@@ -5,6 +5,114 @@
5
5
  |> `^0` / `*` wildcard does **not** protect you. See README → Versioning, and
6
6
  |> the deprecation policy in CONTRIBUTING.md.
7
7
 
8
+ ## 0.6.12 — 2026-07-10
9
+
10
+ A stabilization patch. It changes no public class, token name, behavior name,
11
+ or package path.
12
+
13
+ ### Changed
14
+
15
+ - **Small-text readability.** The `--text-2xs` value increases from `0.68rem`
16
+ to `0.72rem`. This raises the floor for form labels, table headings,
17
+ provenance metadata, report captions, and other dense secondary text without
18
+ changing the type scale's public names or the default CSS payload size.
19
+ - **1.0 stabilization mode.** Public catalog growth is frozen while real
20
+ consumers move onto one current minor. The stability guide now distinguishes
21
+ downstream-proven surfaces from package-only proof and unproven 1.0
22
+ candidates. New public surface needs explicit maintainer approval to reopen
23
+ the catalog.
24
+
25
+ ### Fixed
26
+
27
+ - **Controlled-modal ownership.** `initModal()` now reconciles one stack per
28
+ document instead of letting each modal own `inert` independently. Sibling
29
+ portal modals no longer inert the active top modal, nested stacks restore the
30
+ previous modal correctly, late-added background nodes join the trap, and a
31
+ popover opened from the top modal remains interactive when its panel is
32
+ portaled elsewhere. Cleanup still preserves author-owned `inert` state.
33
+ - **Maintainer documentation.** The architecture map now identifies
34
+ `css/generated.css` as authored trust-surface CSS, and the roadmap reflects
35
+ the current release and WOFF2 font payload.
36
+
37
+ ### Verified
38
+
39
+ - Focused unit coverage exercises sibling and nested modal stacks, portaled
40
+ popovers, late background nodes, focus restoration, and cleanup ownership.
41
+ The non-pixel browser suite carries the same sibling-stack, portal, and
42
+ late-node scenario.
43
+
44
+ ## 0.6.11 — 2026-07-04
45
+
46
+ A correctness, accessibility, and performance release drawn from a multi-pass
47
+ review of the behavior layer and docs. No default-bundle contract change, no
48
+ public class/token/subpath renames, and the CSS payload is unchanged — this is a
49
+ non-breaking patch. Every change landed through PR CI, including the aggregate
50
+ `check` gate and cross-engine (Chromium/Firefox/WebKit) end-to-end coverage.
51
+
52
+ ### Added
53
+
54
+ - **Localization hooks for behavior-authored text.** New opt-in attributes let
55
+ hosts localize the strings behaviors set on enhanced elements —
56
+ `data-bronto-carousel-roledescription` and
57
+ `data-bronto-carousel-slide-roledescription` for carousel/slide
58
+ `aria-roledescription`, plus localized error-summary title, toast dismiss
59
+ label, combobox, command, and table hooks. Absent an override, the existing
60
+ English defaults are preserved, and any author-provided value now wins over the
61
+ behavior's default.
62
+ - **Root type resolution for `import '@ponchia/ui'`.** The package root now
63
+ advertises a types condition (`index.d.ts`) so TypeScript consumers importing
64
+ the CSS entry resolve types without reaching for a subpath.
65
+ - **Concepts guide.** `docs/concepts.md` is a new canonical mental-model page
66
+ that consolidates the load-bearing concepts (CSS-first, the cooperative
67
+ `@layer bronto` override model, the tiered color model, primitive ownership,
68
+ identity-vs-inventory bundling, token projections, and the package-path
69
+ contract) that were previously scattered across many pages.
70
+
71
+ ### Fixed
72
+
73
+ - **Focus management.** `focusInto()` now skips hidden, `inert`, disabled, and
74
+ non-rendered candidates instead of parking focus on them; the tablist roving
75
+ set excludes hidden/disabled tabs so keyboard focus can always enter it; and a
76
+ closed controlled (non-`<dialog>`) modal is hidden while closed, so its
77
+ controls are no longer reachable by Tab.
78
+ - **Screen-reader announcements.** The assertive toast stack no longer
79
+ re-announces earlier toasts when a new one arrives; the command palette's empty
80
+ state is a polite live region; the combobox listbox now mirrors the input's
81
+ accessible name (via `aria-labelledby`/`title`); and toast/command/combobox
82
+ ARIA added at init is fully restored on cleanup.
83
+ - **Internationalization.** Combobox, command, and table filtering/sorting are
84
+ locale-aware, and a Unicode minus in `data-sort-value` (e.g. `−3,5`) now parses
85
+ correctly instead of sorting as `-35`.
86
+ - **Connector resilience and scoping.** A malformed enum on one connector no
87
+ longer aborts its siblings, and a scoped connector can no longer resolve an
88
+ endpoint to a same-id element outside its root.
89
+ - **Attribute parsing.** Splitter ARIA-range values are parsed strictly and
90
+ rewritten to a canonical numeric form; splitter/glyph enum values and the
91
+ dismissible target selector are trimmed, so trailing whitespace no longer
92
+ changes behavior.
93
+ - **Theme following the OS.** When no explicit theme is set, an OS
94
+ `prefers-color-scheme` change now updates the theme toggle's `aria-pressed`,
95
+ and the render-blocking no-flash snippets in the integration and framework
96
+ guides validate the stored value is `light` or `dark` before applying it.
97
+
98
+ ### Performance
99
+
100
+ - **Behavior hot paths.** Connector redraw caches its records and endpoint map
101
+ per init and batches scroll/resize/observer redraws through one animation
102
+ frame; source backrefs build one island-scoped id map instead of rescanning
103
+ per citation; the crosshair caches layout reads across `pointermove`; the table
104
+ text sort decorates rows once instead of parsing inside the comparator; and a
105
+ genuine user scroll during a carousel's programmatic-scroll suppression is now
106
+ replayed instead of dropped. Observable behavior is unchanged.
107
+
108
+ ### Verified
109
+
110
+ - PR CI passed for every change, including the aggregate `check` gate,
111
+ cross-engine e2e, CodeQL, and the packed examples matrix. The default bundle
112
+ and its size are unchanged; this release adds optional localization hooks, root
113
+ type resolution, and documentation, and fixes accessibility, correctness, and
114
+ performance defects without moving the public contract.
115
+
8
116
  ## 0.6.10 — 2026-06-23
9
117
 
10
118
  ### Added
package/README.md CHANGED
@@ -3,26 +3,37 @@
3
3
  [![npm](https://img.shields.io/npm/v/@ponchia/ui?logo=npm)](https://www.npmjs.com/package/@ponchia/ui)
4
4
  [![npm provenance](https://img.shields.io/badge/npm-provenance-blue?logo=npm)](https://www.npmjs.com/package/@ponchia/ui#provenance)
5
5
  [![runtime deps](https://img.shields.io/badge/runtime%20deps-0-brightgreen)](https://github.com/Ponchia/bronto-ui/blob/main/package.json)
6
- [![dist](https://img.shields.io/badge/dist-~88kB%20%2F%20~15kB%20gzip-informational)](https://github.com/Ponchia/bronto-ui/blob/main/scripts/check-dist.mjs)
6
+ [![default CSS](https://img.shields.io/badge/default%20CSS-~89kB%20%2F%20~15kB%20gzip-informational)](https://github.com/Ponchia/bronto-ui/blob/main/scripts/check-dist.mjs)
7
7
  [![CI](https://github.com/Ponchia/bronto-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/Ponchia/bronto-ui/actions/workflows/ci.yml)
8
8
  [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Ponchia/bronto-ui/badge)](https://scorecard.dev/viewer/?uri=github.com/Ponchia/bronto-ui)
9
9
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/Ponchia/bronto-ui/blob/main/LICENSE)
10
10
 
11
- **A CSS-first identity and UI layer for services, tools, sites, and reports.** It
12
- works in plain HTML, every modern framework, and print/PDF, with no component
13
- runtime to adopt and zero runtime dependencies.
14
-
15
- The look is a deliberate stance: a neutral monochrome canvas with one rationed
16
- accent (colour signals, it never decorates), dot-matrix display type, and
17
- hairline borders all re-skinnable from a single `--accent` knob (opt-in
18
- amber-CRT, phosphor-green, and e-ink colorways).
19
-
20
- The default bundle is the shared service identity: app shells, navigation,
21
- forms, tables, feedback, overlays, workflow surfaces, prose, motion and the
22
- token system that lets each app feel related without sharing a component
23
- runtime. On top of that it ships opt-in tooling/report layers workbench panes,
24
- commands, system state, provenance, figure stages, annotations, legends,
25
- evidence highlights, intervals, data-viz tokens and a static/PDF report grammar.
11
+ **A CSS-first identity layer for services, tools, and reports that need
12
+ provenance.** It works in plain HTML, modern frameworks, and print/PDF, with no
13
+ component runtime to adopt and zero runtime dependencies.
14
+
15
+ The sharpest lane is report and tooling UI: static/PDF reports, evidence,
16
+ provenance, system state, dense workbenches, and explanatory figures. The
17
+ default CSS bundle stays the shared service identity, not the whole package:
18
+ app shells, navigation, forms, tables, feedback, overlays, prose, motion, and
19
+ the token system that lets apps feel related without sharing a component runtime.
20
+
21
+ The look is deliberately restrained: a mostly neutral canvas, one core accent
22
+ for emphasis, dot-matrix display type, and hairline borders. Status colors,
23
+ display-expression tokens, and data-viz colors are separate governed tiers, not
24
+ extra brand accents. Opt-in skins re-point the root accent; Mermaid, D2, and
25
+ Vega bridges use resolved renderer theme data instead of live CSS variables.
26
+
27
+ ## Start here
28
+
29
+ - **Building an app or service shell?** Use the quick start below, then the
30
+ framework guide for your stack.
31
+ - **Building a report, audit, or provenance view?** Start with
32
+ [docs/reporting.md](docs/reporting.md) and
33
+ [docs/frontier-primitives.md](docs/frontier-primitives.md).
34
+ - **Maintaining or integrating the package?** Read
35
+ [docs/architecture.md](docs/architecture.md),
36
+ [docs/stability.md](docs/stability.md), and `llms.txt`.
26
37
 
27
38
  ### [Live demo →](https://ponchia.github.io/bronto-ui/) &nbsp;·&nbsp; [Service shell →](https://ponchia.github.io/bronto-ui/demo/service.html) &nbsp;·&nbsp; [Static report →](https://ponchia.github.io/bronto-ui/demo/report-standalone.html) &nbsp;·&nbsp; [Theme playground →](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)
28
39
 
@@ -46,9 +57,11 @@ that genuinely need JS (theme persistence, dialogs, toasts, disclosure).
46
57
 
47
58
  The guiding principle is that **colour is rationed and structure carries
48
59
  meaning** — layout, type weight, and the hairline do the work before a hue does,
49
- and the accent is a spotlight, not a paint bucket. Because everything lives in a
50
- single `@layer bronto`, your own un-layered CSS overrides the framework with no
51
- specificity fight and no `!important`.
60
+ and the accent is a spotlight, not a paint bucket. Because framework rules live
61
+ in `@layer bronto`, ordinary un-layered consumer CSS overrides them without a
62
+ specificity fight. Print and reduced-motion rules still use `!important`
63
+ deliberately where the framework must neutralize animation or layout at a media
64
+ boundary.
52
65
 
53
66
  It ships a complete, accessible **standard component set** because that is the
54
67
  identity layer every service consumes. Its sharper edge is the opt-in **tooling,
@@ -67,12 +80,12 @@ npm i @ponchia/ui
67
80
  Or drop it in with no build step, straight from a CDN:
68
81
 
69
82
  ```html
70
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/bronto.css">
83
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.12/dist/bronto.css">
71
84
  ```
72
85
 
73
86
  ## Quick start
74
87
 
75
- **1. Load the CSS.** One flattened, minified bundle — the whole standard component set, one request (~88 kB raw / ~15 kB gzip):
88
+ **1. Load the CSS.** One flattened, minified default CSS bundle — the standard component set, one request (~89 kB raw / ~15 kB gzip) — that is `dist/bronto.css`, not the whole package tarball:
76
89
 
77
90
  ```css
78
91
  @import '@ponchia/ui'; /* via a bundler */
@@ -85,7 +98,7 @@ Or drop it in with no build step, straight from a CDN:
85
98
 
86
99
  > Prefer source leaves through a bundler? Use `@import '@ponchia/ui/css'` (a thin `@import` fan-out) instead. Both resolve the Doto `@font-face` with relative URLs, so there's no `/fonts` path assumption.
87
100
 
88
- > The bundle is the standard component set. The opt-in analytical & report layers — `report.css`, `dataviz.css`, `figure.css`, `annotations.css`, `legend.css`, `interval.css`, `clamp.css`, `highlights.css`, and the rest — are **not** in `bronto.css`; link each one you need from `dist/css/`. For LLM-authored static reports see [docs/reporting.md](docs/reporting.md).
101
+ > The size above is only `dist/bronto.css`. The opt-in analytical and report layers — `report.css`, `dataviz.css`, `figure.css`, `annotations.css`, `legend.css`, `interval.css`, `clamp.css`, `highlights.css`, and the rest — are **not** in the default CSS bundle; link each one you need from `dist/css/`. For LLM-authored static reports see [docs/reporting.md](docs/reporting.md).
89
102
 
90
103
  **2. Write markup with `ui-*` classes** (primary is the default button; modifiers are opt-in):
91
104
 
@@ -151,7 +164,7 @@ Full generated catalog of every class: **[docs/reference.md](https://github.com/
151
164
 
152
165
  ## Theming: one knob
153
166
 
154
- Everything accent-colored derives from a single `--accent` variable via `color-mix()`. Re-brand the entire app — both light and dark — with root-level, per-theme overrides:
167
+ Core DOM accent surfaces derive from a single `--accent` variable via `color-mix()`. Re-brand the entire app — both light and dark — with root-level, per-theme overrides:
155
168
 
156
169
  ```css
157
170
  :root { --accent: #2f6df6; } /* whole app blue */
@@ -162,11 +175,11 @@ derived family (`--accent-text`, `--accent-soft`, focus/dot/ramp tokens) is a
162
175
  root-level skin contract. Use the full per-theme recipe in
163
176
  [`docs/theming.md`](docs/theming.md) for production rebrands.
164
177
 
165
- Buttons, focus rings, dot motifs, accent borders and soft fills all follow automatically. Light/dark is `data-theme="light"` / `"dark"` on `<html>` (defaults to `prefers-color-scheme`); `data-density` and `data-contrast` give density and contrast presets. A full re-skin (radius, display face, dot density, surfaces) is a handful more token overrides — the default monochrome look is **one skin, not the architecture**.
178
+ Buttons, focus rings, dot motifs, accent borders and soft fills follow the root accent automatically. Light/dark is `data-theme="light"` / `"dark"` on `<html>` (defaults to `prefers-color-scheme`); `data-density` and `data-contrast` give density and contrast presets. A full re-skin (radius, display face, dot density, surfaces) is a handful more token overrides, while status colours and data-viz colours remain their own governed tiers — the default monochrome look is **one skin, not the architecture**.
166
179
 
167
180
  **One system, many skins.** That the knob is real isn't a claim — it ships: drop in `@ponchia/ui/css/skins.css` and set `data-bronto-skin="amber-crt | phosphor-green | e-ink"` on `<html>` for a complete, contrast-gated recolour (the derived accent family, focus ring, dot-matrix and glyphs all follow). Colour is governed in **tiers** — neutral canvas · one accent · locked status · display expression · opt-in data-viz — so it always earns its place; the full constitution is **[ADR-0001](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0001-color-system.md)**.
168
181
 
169
- > When you change `--accent`, contrast becomes yours: verify your hue in the **[theme playground](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)** (it shows the derived family and computed WCAG ratios). Full contract: **[docs/theming.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/theming.md)**.
182
+ > When you change `--accent`, contrast becomes yours: verify your hue in the **[theme playground](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)** (it shows the derived family and computed WCAG ratios). Mermaid, D2, and Vega helpers emit resolved theme data for those renderers; they do not live-reskin from a later CSS `--accent` override. Full contract: **[docs/theming.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/theming.md)**.
170
183
 
171
184
  ## Accessibility
172
185
 
@@ -12,52 +12,52 @@ export function noteTransform({ dx, dy, x, y, align, valign, width, height, }?:
12
12
  * @param {NotePlacementOptions} options
13
13
  * @returns {NotePlacement}
14
14
  */
15
- export function notePlacement({ x, y, width, height, bounds, padding, gap, preferred, inset, }?: NotePlacementOptions): NotePlacement;
15
+ export function notePlacement(options: NotePlacementOptions): NotePlacement;
16
16
  /**
17
17
  * @param {CircleSubjectOptions} options
18
18
  * @returns {string}
19
19
  */
20
- export function circleSubjectPath({ radius }?: CircleSubjectOptions): string;
20
+ export function circleSubjectPath(options: CircleSubjectOptions): string;
21
21
  /**
22
22
  * @param {RectSubjectOptions} options
23
23
  * @returns {string}
24
24
  */
25
- export function rectSubjectPath({ width, height, x, y, padding }?: RectSubjectOptions): string;
25
+ export function rectSubjectPath(options: RectSubjectOptions): string;
26
26
  /**
27
27
  * @param {ThresholdOptions} options
28
28
  * @returns {string}
29
29
  */
30
- export function thresholdPath({ x1, y1, x2, y2 }?: ThresholdOptions): string;
30
+ export function thresholdPath(options: ThresholdOptions): string;
31
31
  /**
32
32
  * @param {AxisThresholdOptions} options
33
33
  * @returns {string}
34
34
  */
35
- export function axisThresholdPath({ orientation, value, start, end }?: AxisThresholdOptions): string;
35
+ export function axisThresholdPath(options: AxisThresholdOptions): string;
36
36
  /**
37
37
  * @param {BracketSubjectOptions} options
38
38
  * @returns {string}
39
39
  */
40
- export function bracketSubjectPath({ x1, y1, x2, y2, depth }?: BracketSubjectOptions): string;
40
+ export function bracketSubjectPath(options: BracketSubjectOptions): string;
41
41
  /**
42
42
  * @param {BandSubjectOptions} options
43
43
  * @returns {string}
44
44
  */
45
- export function bandSubjectPath({ x, y, width, height, padding }?: BandSubjectOptions): string;
45
+ export function bandSubjectPath(options: BandSubjectOptions): string;
46
46
  /**
47
47
  * @param {SlopeSubjectOptions} options
48
48
  * @returns {string}
49
49
  */
50
- export function slopeSubjectPath({ x1, y1, x2, y2 }?: SlopeSubjectOptions): string;
50
+ export function slopeSubjectPath(options: SlopeSubjectOptions): string;
51
51
  /**
52
52
  * @param {ComparisonBraceOptions} options
53
53
  * @returns {string}
54
54
  */
55
- export function comparisonBracePath({ x1, y1, x2, y2, depth }?: ComparisonBraceOptions): string;
55
+ export function comparisonBracePath(options: ComparisonBraceOptions): string;
56
56
  /**
57
57
  * @param {OutlierClusterOptions} options
58
58
  * @returns {string}
59
59
  */
60
- export function outlierClusterPath({ points, radius }?: OutlierClusterOptions): string;
60
+ export function outlierClusterPath(options: OutlierClusterOptions): string;
61
61
  /**
62
62
  * @param {TimelineEventOptions} [options]
63
63
  * @returns {string}
@@ -72,27 +72,27 @@ export function evidenceMarkerPath({ x, y, width, height, padding }?: EvidenceMa
72
72
  * @param {ConnectorEndDotOptions} options
73
73
  * @returns {string}
74
74
  */
75
- export function connectorEndDot({ x, y, radius }?: ConnectorEndDotOptions): string;
75
+ export function connectorEndDot(options: ConnectorEndDotOptions): string;
76
76
  /**
77
77
  * @param {ConnectorEndArrowOptions} options
78
78
  * @returns {string}
79
79
  */
80
- export function connectorEndArrow({ x1, y1, x2, y2, size, spread }?: ConnectorEndArrowOptions): string;
80
+ export function connectorEndArrow(options: ConnectorEndArrowOptions): string;
81
81
  /**
82
82
  * @param {ConnectorOptions} opts
83
83
  * @returns {string}
84
84
  */
85
- export function connectorLine(opts?: ConnectorOptions): string;
85
+ export function connectorLine(opts: ConnectorOptions): string;
86
86
  /**
87
87
  * @param {ConnectorOptions} opts
88
88
  * @returns {string}
89
89
  */
90
- export function connectorElbow(opts?: ConnectorOptions): string;
90
+ export function connectorElbow(opts: ConnectorOptions): string;
91
91
  /**
92
92
  * @param {ConnectorOptions} opts
93
93
  * @returns {string}
94
94
  */
95
- export function connectorCurve(opts?: ConnectorOptions): string;
95
+ export function connectorCurve(opts: ConnectorOptions): string;
96
96
  /**
97
97
  * @param {AnnotationPartsOptions} [opts]
98
98
  * @returns {AnnotationParts}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AA6SA;;;GAGG;AACH,+CAHW,OAAO,CAAC,eAAe,CAAC,GACtB,MAAM,CAIlB;AAED;;;GAGG;AACH,gFAHW,oBAAoB,GAClB,MAAM,CA0BlB;AAsC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,CAAA;CAAE,GAAG,qBAAqB,CAAC,CACjD;;;;;;;;;;eAWU,MAAM;aACN,MAAM;eACN,MAAM;UACN,MAAM;;;;;;SAGN,MAAM;;;;UACN,MAAM;;;;;;;;;;;;;;;;;;;;YAQN,eAAe;;;;UACf,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAYN,MAAM;OACN,MAAM;;;;YACN,eAAe;;;;;;;;OAEf,MAAM"}
@@ -377,17 +377,18 @@ function noteRect(x, y, width, height, placement) {
377
377
  * @param {NotePlacementOptions} options
378
378
  * @returns {NotePlacement}
379
379
  */
380
- export function notePlacement({
381
- x = 0,
382
- y = 0,
383
- width,
384
- height,
385
- bounds,
386
- padding = 8,
387
- gap = 32,
388
- preferred = 'right',
389
- inset = 0,
390
- } = {}) {
380
+ export function notePlacement(options) {
381
+ const {
382
+ x = 0,
383
+ y = 0,
384
+ width,
385
+ height,
386
+ bounds,
387
+ padding = 8,
388
+ gap = 32,
389
+ preferred = 'right',
390
+ inset = 0,
391
+ } = options ?? {};
391
392
  const anchorX = finite('x', x);
392
393
  const anchorY = finite('y', y);
393
394
  const w = dimension('width', width);
@@ -439,7 +440,8 @@ export function notePlacement({
439
440
  * @param {CircleSubjectOptions} options
440
441
  * @returns {string}
441
442
  */
442
- export function circleSubjectPath({ radius } = {}) {
443
+ export function circleSubjectPath(options) {
444
+ const { radius } = options ?? {};
443
445
  return circlePathAt(0, 0, radius);
444
446
  }
445
447
 
@@ -447,7 +449,8 @@ export function circleSubjectPath({ radius } = {}) {
447
449
  * @param {RectSubjectOptions} options
448
450
  * @returns {string}
449
451
  */
450
- export function rectSubjectPath({ width, height, x, y, padding = 0 } = {}) {
452
+ export function rectSubjectPath(options) {
453
+ const { width, height, x, y, padding = 0 } = options ?? {};
451
454
  const w = dimension('width', width);
452
455
  const h = dimension('height', height);
453
456
  const p = dimension('padding', padding);
@@ -463,7 +466,8 @@ export function rectSubjectPath({ width, height, x, y, padding = 0 } = {}) {
463
466
  * @param {ThresholdOptions} options
464
467
  * @returns {string}
465
468
  */
466
- export function thresholdPath({ x1 = 0, y1 = 0, x2, y2 } = {}) {
469
+ export function thresholdPath(options) {
470
+ const { x1 = 0, y1 = 0, x2, y2 } = options ?? {};
467
471
  const start = { x: finite('x1', x1), y: finite('y1', y1) };
468
472
  const end = { x: finite('x2', x2), y: finite('y2', y2) };
469
473
  return linePath(start, end);
@@ -473,7 +477,8 @@ export function thresholdPath({ x1 = 0, y1 = 0, x2, y2 } = {}) {
473
477
  * @param {AxisThresholdOptions} options
474
478
  * @returns {string}
475
479
  */
476
- export function axisThresholdPath({ orientation = 'horizontal', value = 0, start = 0, end } = {}) {
480
+ export function axisThresholdPath(options) {
481
+ const { orientation = 'horizontal', value = 0, start = 0, end } = options ?? {};
477
482
  const v = finite('value', value);
478
483
  const s = finite('start', start);
479
484
  const e = finite('end', end);
@@ -486,7 +491,8 @@ export function axisThresholdPath({ orientation = 'horizontal', value = 0, start
486
491
  * @param {BracketSubjectOptions} options
487
492
  * @returns {string}
488
493
  */
489
- export function bracketSubjectPath({ x1, y1, x2, y2, depth = 12 } = {}) {
494
+ export function bracketSubjectPath(options) {
495
+ const { x1, y1, x2, y2, depth = 12 } = options ?? {};
490
496
  const start = { x: finite('x1', x1), y: finite('y1', y1) };
491
497
  const end = { x: finite('x2', x2), y: finite('y2', y2) };
492
498
  const d = finite('depth', depth);
@@ -501,7 +507,8 @@ export function bracketSubjectPath({ x1, y1, x2, y2, depth = 12 } = {}) {
501
507
  * @param {BandSubjectOptions} options
502
508
  * @returns {string}
503
509
  */
504
- export function bandSubjectPath({ x = 0, y = 0, width, height, padding = 0 } = {}) {
510
+ export function bandSubjectPath(options) {
511
+ const { x = 0, y = 0, width, height, padding = 0 } = options ?? {};
505
512
  return rectSubjectPath({ x, y, width, height, padding });
506
513
  }
507
514
 
@@ -509,7 +516,8 @@ export function bandSubjectPath({ x = 0, y = 0, width, height, padding = 0 } = {
509
516
  * @param {SlopeSubjectOptions} options
510
517
  * @returns {string}
511
518
  */
512
- export function slopeSubjectPath({ x1, y1, x2, y2 } = {}) {
519
+ export function slopeSubjectPath(options) {
520
+ const { x1, y1, x2, y2 } = options ?? {};
513
521
  return thresholdPath({ x1, y1, x2, y2 });
514
522
  }
515
523
 
@@ -517,7 +525,8 @@ export function slopeSubjectPath({ x1, y1, x2, y2 } = {}) {
517
525
  * @param {ComparisonBraceOptions} options
518
526
  * @returns {string}
519
527
  */
520
- export function comparisonBracePath({ x1, y1, x2, y2, depth = 14 } = {}) {
528
+ export function comparisonBracePath(options) {
529
+ const { x1, y1, x2, y2, depth = 14 } = options ?? {};
521
530
  const start = { x: finite('x1', x1), y: finite('y1', y1) };
522
531
  const end = { x: finite('x2', x2), y: finite('y2', y2) };
523
532
  const d = finite('depth', depth);
@@ -558,7 +567,8 @@ export function comparisonBracePath({ x1, y1, x2, y2, depth = 14 } = {}) {
558
567
  * @param {OutlierClusterOptions} options
559
568
  * @returns {string}
560
569
  */
561
- export function outlierClusterPath({ points, radius = 6 } = {}) {
570
+ export function outlierClusterPath(options) {
571
+ const { points, radius = 6 } = options ?? {};
562
572
  if (!Array.isArray(points)) throw new TypeError('points must be an array');
563
573
  return points
564
574
  .map((p, i) =>
@@ -604,7 +614,8 @@ export function evidenceMarkerPath({ x = 0, y = 0, width = 36, height = 36, padd
604
614
  * @param {ConnectorEndDotOptions} options
605
615
  * @returns {string}
606
616
  */
607
- export function connectorEndDot({ x, y, radius = 3 } = {}) {
617
+ export function connectorEndDot(options) {
618
+ const { x, y, radius = 3 } = options ?? {};
608
619
  return dotMark({ x: finite('x', x), y: finite('y', y) }, radius);
609
620
  }
610
621
 
@@ -612,7 +623,8 @@ export function connectorEndDot({ x, y, radius = 3 } = {}) {
612
623
  * @param {ConnectorEndArrowOptions} options
613
624
  * @returns {string}
614
625
  */
615
- export function connectorEndArrow({ x1 = 0, y1 = 0, x2, y2, size = 8, spread = 0.32 } = {}) {
626
+ export function connectorEndArrow(options) {
627
+ const { x1 = 0, y1 = 0, x2, y2, size = 8, spread = 0.32 } = options ?? {};
616
628
  const start = { x: finite('x1', x1), y: finite('y1', y1) };
617
629
  const end = { x: finite('x2', x2), y: finite('y2', y2) };
618
630
  const s = dimension('size', size);
@@ -624,10 +636,11 @@ export function connectorEndArrow({ x1 = 0, y1 = 0, x2, y2, size = 8, spread = 0
624
636
  * @param {ConnectorOptions} opts
625
637
  * @returns {string}
626
638
  */
627
- export function connectorLine(opts = {}) {
628
- const { dx, dy } = validateOffset(opts);
639
+ export function connectorLine(opts) {
640
+ const options = opts ?? {};
641
+ const { dx, dy } = validateOffset(options);
629
642
  if (dx === 0 && dy === 0) return '';
630
- const start = connectorStart(dx, dy, opts.subject);
643
+ const start = connectorStart(dx, dy, options.subject);
631
644
  if (!start) return '';
632
645
  const end = { x: dx, y: dy };
633
646
  // Guard a trim that rounds onto the note anchor (straightPath has no guard).
@@ -639,10 +652,11 @@ export function connectorLine(opts = {}) {
639
652
  * @param {ConnectorOptions} opts
640
653
  * @returns {string}
641
654
  */
642
- export function connectorElbow(opts = {}) {
643
- const { dx, dy } = validateOffset(opts);
655
+ export function connectorElbow(opts) {
656
+ const options = opts ?? {};
657
+ const { dx, dy } = validateOffset(options);
644
658
  if (dx === 0 && dy === 0) return '';
645
- const start = connectorStart(dx, dy, opts.subject);
659
+ const start = connectorStart(dx, dy, options.subject);
646
660
  if (!start) return '';
647
661
  const end = { x: dx, y: dy };
648
662
  if (samePoint(start, end)) return '';
@@ -651,17 +665,18 @@ export function connectorElbow(opts = {}) {
651
665
  // annotation leader and a node connector draw the same elbow. (The former
652
666
  // inline form turned by min(|dx|,|dy|), i.e. a 45° chamfer that read as a
653
667
  // diagonal stub, not an elbow — which the `stroke-linejoin` bevel assumes.)
654
- return elbowPath(start, end, { mid: opts.mid });
668
+ return elbowPath(start, end, { mid: options.mid });
655
669
  }
656
670
 
657
671
  /**
658
672
  * @param {ConnectorOptions} opts
659
673
  * @returns {string}
660
674
  */
661
- export function connectorCurve(opts = {}) {
662
- const { dx, dy } = validateOffset(opts);
675
+ export function connectorCurve(opts) {
676
+ const options = opts ?? {};
677
+ const { dx, dy } = validateOffset(options);
663
678
  if (dx === 0 && dy === 0) return '';
664
- const start = connectorStart(dx, dy, opts.subject);
679
+ const start = connectorStart(dx, dy, options.subject);
665
680
  if (!start) return '';
666
681
  const end = { x: dx, y: dy };
667
682
  if (samePoint(start, end)) return '';
@@ -706,8 +721,11 @@ export function annotationParts(opts = {}) {
706
721
  let subject = '';
707
722
 
708
723
  if (opts.subject != null) {
709
- const build = SUBJECT_BUILDERS[opts.subject.type];
710
- if (!build) throw new TypeError('unsupported subject.type');
724
+ const subjectType = opts.subject.type;
725
+ if (!Object.hasOwn(SUBJECT_BUILDERS, subjectType)) {
726
+ throw new TypeError('unsupported subject.type');
727
+ }
728
+ const build = SUBJECT_BUILDERS[subjectType];
711
729
  subject = build(opts.subject);
712
730
  }
713
731
 
@@ -10,7 +10,9 @@
10
10
  * `[data-bronto-carousel-prev]` / `[data-bronto-carousel-next]` controls,
11
11
  * a `.ui-carousel__thumbs` list of `.ui-carousel__thumb` buttons, and a
12
12
  * `.ui-carousel__status` counter slot. Add `data-bronto-carousel-loop` to
13
- * wrap at the ends, `data-bronto-carousel-label` to name the region.
13
+ * wrap at the ends, `data-bronto-carousel-label` to name the region, and
14
+ * `data-bronto-carousel-roledescription` to localize the default
15
+ * `aria-roledescription` when the viewport does not already carry one.
14
16
  *
15
17
  * A full-screen **lightbox** is the same markup inside a native
16
18
  * `<dialog class="ui-lightbox">` opened by {@link initDialog}: the
@@ -21,8 +23,10 @@
21
23
  * (button, key, thumbnail, or swipe). SSR-safe, idempotent per carousel;
22
24
  * returns a cleanup function.
23
25
  *
24
- * @param {import('./internal.js').DelegateOpts} [opts]
26
+ * @param {import('./internal.js').DelegateOpts & { roleDescription?: string }} [opts]
25
27
  * @returns {import('./internal.js').Cleanup}
26
28
  */
27
- export function initCarousel({ root }?: import("./internal.js").DelegateOpts): import("./internal.js").Cleanup;
29
+ export function initCarousel({ root, roleDescription }?: import("./internal.js").DelegateOpts & {
30
+ roleDescription?: string;
31
+ }): import("./internal.js").Cleanup;
28
32
  //# sourceMappingURL=carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.js"],"names":[],"mappings":"AA6HA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,CAsJ3C"}
1
+ {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.js"],"names":[],"mappings":"AAoNA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,yDAHW,OAAO,eAAe,EAAE,YAAY,GAAG;IAAE,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,eAAe,EAAE,OAAO,CA+L3C"}