@ponchia/ui 0.4.1 → 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/CHANGELOG.md +552 -8
- package/MIGRATIONS.json +106 -0
- package/README.md +34 -8
- package/annotations/index.d.ts +402 -0
- package/annotations/index.d.ts.map +1 -0
- package/annotations/index.js +792 -0
- package/behaviors/carousel.js +198 -0
- package/behaviors/combobox.js +226 -0
- package/behaviors/command.js +190 -0
- package/behaviors/connectors.js +95 -0
- package/behaviors/crosshair.js +57 -0
- package/behaviors/dialog.js +74 -0
- package/behaviors/disclosure.js +26 -0
- package/behaviors/dismissible.js +25 -0
- package/behaviors/forms.js +186 -0
- package/behaviors/glyph.js +108 -0
- package/behaviors/index.d.ts +79 -0
- package/behaviors/index.js +18 -1409
- package/behaviors/internal.js +97 -0
- package/behaviors/legend.js +67 -0
- package/behaviors/menu.js +47 -0
- package/behaviors/popover.js +179 -0
- package/behaviors/spotlight.js +52 -0
- package/behaviors/table.js +136 -0
- package/behaviors/tabs.js +103 -0
- package/behaviors/theme.js +84 -0
- package/behaviors/toast.js +164 -0
- package/classes/classes.json +1857 -0
- package/classes/index.d.ts +306 -13
- package/classes/index.js +339 -12
- package/classes/vscode.css-custom-data.json +12 -0
- package/connectors/index.d.ts +191 -0
- package/connectors/index.d.ts.map +1 -0
- package/connectors/index.js +275 -0
- package/css/analytical.css +21 -0
- package/css/annotations.css +292 -0
- package/css/app.css +43 -13
- package/css/base.css +15 -10
- package/css/command.css +97 -0
- package/css/connectors.css +110 -0
- package/css/content.css +7 -1
- package/css/crosshair.css +100 -0
- package/css/dataviz.css +5 -1
- package/css/disclosure.css +38 -6
- package/css/dots.css +57 -0
- package/css/feedback.css +111 -2
- package/css/fonts.css +11 -7
- package/css/forms.css +42 -1
- package/css/generated.css +117 -0
- package/css/legend.css +272 -0
- package/css/marks.css +174 -0
- package/css/motion.css +24 -44
- package/css/navigation.css +7 -0
- package/css/overlay.css +31 -1
- package/css/primitives.css +109 -5
- package/css/report.css +39 -81
- package/css/selection.css +46 -0
- package/css/site.css +16 -2
- package/css/sources.css +221 -0
- package/css/spotlight.css +104 -0
- package/css/state.css +121 -0
- package/css/tokens.css +60 -37
- package/css/workbench.css +83 -0
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -0
- package/dist/css/annotations.css +1 -0
- package/dist/css/app.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/command.css +1 -0
- package/dist/css/connectors.css +1 -0
- package/dist/css/content.css +1 -1
- package/dist/css/crosshair.css +1 -0
- package/dist/css/disclosure.css +1 -1
- package/dist/css/dots.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/fonts.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/generated.css +1 -0
- package/dist/css/legend.css +1 -0
- package/dist/css/marks.css +1 -0
- package/dist/css/motion.css +1 -1
- package/dist/css/navigation.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report.css +1 -1
- package/dist/css/selection.css +1 -0
- package/dist/css/site.css +1 -1
- package/dist/css/sources.css +1 -0
- package/dist/css/spotlight.css +1 -0
- package/dist/css/state.css +1 -0
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -0
- package/docs/adr/0003-theme-model.md +7 -4
- package/docs/annotations.md +425 -0
- package/docs/architecture.md +246 -0
- package/docs/command.md +95 -0
- package/docs/connectors.md +91 -0
- package/docs/contrast.md +116 -92
- package/docs/crosshair.md +63 -0
- package/docs/d2.md +195 -0
- package/docs/generated.md +91 -0
- package/docs/legends.md +184 -0
- package/docs/marks.md +93 -0
- package/docs/mermaid.md +152 -0
- package/docs/reference.md +385 -23
- package/docs/reporting.md +436 -63
- package/docs/selection.md +40 -0
- package/docs/sources.md +137 -0
- package/docs/spotlight.md +78 -0
- package/docs/stability.md +24 -2
- package/docs/state.md +85 -0
- package/docs/usage.md +123 -4
- package/docs/vega.md +225 -0
- package/docs/workbench.md +78 -0
- package/fonts/doto-400.woff2 +0 -0
- package/fonts/doto-500.woff2 +0 -0
- package/fonts/doto-600.woff2 +0 -0
- package/fonts/doto-700.woff2 +0 -0
- package/fonts/doto-800.woff2 +0 -0
- package/fonts/doto-900.woff2 +0 -0
- package/glyphs/glyphs.js +6 -4
- package/llms.txt +362 -14
- package/package.json +115 -12
- package/qwik/index.d.ts +42 -54
- package/qwik/index.d.ts.map +1 -0
- package/qwik/index.js +75 -3
- package/react/index.d.ts +39 -56
- package/react/index.d.ts.map +1 -0
- package/react/index.js +67 -3
- package/solid/index.d.ts +64 -56
- package/solid/index.d.ts.map +1 -0
- package/solid/index.js +70 -3
- package/tokens/d2.d.ts +38 -0
- package/tokens/d2.js +71 -0
- package/tokens/d2.json +43 -0
- package/tokens/index.d.ts +5 -5
- package/tokens/index.js +23 -5
- package/tokens/index.json +9 -0
- package/tokens/mermaid.d.ts +23 -0
- package/tokens/mermaid.js +181 -0
- package/tokens/mermaid.json +163 -0
- package/tokens/resolved.json +45 -1
- package/tokens/skins.js +3 -2
- package/tokens/tokens.dtcg.json +26 -0
- package/tokens/vega.d.ts +34 -0
- package/tokens/vega.js +155 -0
- package/tokens/vega.json +179 -0
- package/fonts/doto-400.ttf +0 -0
- package/fonts/doto-500.ttf +0 -0
- package/fonts/doto-600.ttf +0 -0
- package/fonts/doto-700.ttf +0 -0
- package/fonts/doto-800.ttf +0 -0
- package/fonts/doto-900.ttf +0 -0
package/MIGRATIONS.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Machine-readable rename/removal map for @ponchia/ui upgrades (classes, attributes, and tokens). Generated-by-hand from CHANGELOG BREAKING sections; consumed by docs/migrations/*.md and any codemod/sed recipe. 'safe' rules are mechanically rewritable (whole-token, no semantic change); 'manual' rules need human judgement (concept moved or removed, not a 1:1 rename).",
|
|
3
|
+
"migrations": [
|
|
4
|
+
{
|
|
5
|
+
"from": "0.2",
|
|
6
|
+
"to": "0.3",
|
|
7
|
+
"summary": "Entire non-ui-* legacy vocabulary removed; everything is now under the .ui-* contract and the check-classes drift gate.",
|
|
8
|
+
"safe": [
|
|
9
|
+
{ "old": "skip-link", "new": "ui-skiplink" },
|
|
10
|
+
{ "old": "site-nav", "new": "ui-sitenav" },
|
|
11
|
+
{ "old": "site-menu", "new": "ui-sitemenu" },
|
|
12
|
+
{ "old": "theme-toggle", "new": "ui-themetoggle", "prefix": true },
|
|
13
|
+
{ "old": "app-shell", "new": "ui-app-shell", "prefix": true },
|
|
14
|
+
{ "old": "app-rail", "new": "ui-app-rail", "prefix": true },
|
|
15
|
+
{ "old": "app-topbar", "new": "ui-app-topbar", "prefix": true },
|
|
16
|
+
{ "old": "app-toolbar", "new": "ui-app-toolbar", "prefix": true },
|
|
17
|
+
{ "old": "app-nav", "new": "ui-app-nav", "prefix": true },
|
|
18
|
+
{ "old": "app-panel", "new": "ui-app-panel", "prefix": true },
|
|
19
|
+
{ "old": "app-content", "new": "ui-app-content", "prefix": true },
|
|
20
|
+
{ "old": "app-main", "new": "ui-app-main", "prefix": true },
|
|
21
|
+
{ "old": "app-metrics", "new": "ui-app-metrics", "prefix": true },
|
|
22
|
+
{ "old": "app-metric", "new": "ui-app-metric", "prefix": true },
|
|
23
|
+
{ "old": "app-empty-state", "new": "ui-app-empty-state", "prefix": true }
|
|
24
|
+
],
|
|
25
|
+
"manual": [
|
|
26
|
+
{
|
|
27
|
+
"old": "hero / project-* / post-card / essay-* / page-* / home-* / signal-panel / worklog-summary",
|
|
28
|
+
"new": "the ui-* content layer",
|
|
29
|
+
"note": "Long-form content: .ui-prose / .ui-quote. Cards: .ui-card. Layout: .ui-grid / .ui-stack. Site chrome: the ui-site* shell. No 1:1 mapping — re-compose with the content primitives."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"old": "callout",
|
|
33
|
+
"new": "ui-alert",
|
|
34
|
+
"note": "Tone modifiers differ (.ui-alert--info/-success/-warning/-danger); re-pick the tone."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"old": "metric-tile",
|
|
38
|
+
"new": "ui-app-metric",
|
|
39
|
+
"note": "Now scoped to the admin shell vocabulary; standalone stat usage should wrap in .ui-app-metrics."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"old": "tag-list / tag",
|
|
43
|
+
"new": "ui-tags / ui-tag",
|
|
44
|
+
"note": "Compact variant .tag-list--compact → .ui-tags--compact; verify accent-on-accent contrast (see CHANGELOG 0.3.0 a11y fix)."
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"codemod": "See docs/migrations/0.2-to-0.3.md for a ready-to-run ripgrep+sed recipe covering the 'safe' rules."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"from": "0.3",
|
|
51
|
+
"to": "0.4",
|
|
52
|
+
"summary": "Additive colour-system release (ADR-0001); the default dist/bronto.css renders identically. No class or attribute renames. One orphan token pair removed.",
|
|
53
|
+
"safe": [],
|
|
54
|
+
"manual": [
|
|
55
|
+
{
|
|
56
|
+
"old": "--orange / --orange-soft",
|
|
57
|
+
"new": "(removed — re-declare in a consumer :root override if referenced)",
|
|
58
|
+
"note": "Orphan token pair: defined in the token mirrors but referenced by no shipped component and documented nowhere, and untiered under the new colour model. Removed under the CONTRIBUTING 'provably-unreferenced surface' exception. If you used it: :root { --orange: #a85f32; --orange-soft: rgb(168 95 50 / 0.13); }"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"codemod": "No class codemod needed (no renames). See docs/migrations/0.3-to-0.4.md; audit usage with: rg -- '--orange' ."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"from": "0.4",
|
|
65
|
+
"to": "0.5",
|
|
66
|
+
"summary": "Adds the analytical-primitives suite (annotations, legend, marks, connectors, spotlight, crosshair, selection + the analytical.css roll-up); all additive/opt-in. Three breaking changes: the chart data key moved out of the report kit into the standalone Legends layer (`.ui-chart__legend`/`.ui-chart__swatch` removed); annotation arrowheads now render via the shared connectors geometry kernel (a small visual path change, no API change); and the marks/bracket-note rationed-accent tone was renamed `evidence`→`accent` to match the annotation/connector tone vocabulary (`.ui-annotation--evidence` stays — it's a marker variant, not a tone).",
|
|
67
|
+
"safe": [
|
|
68
|
+
{ "old": "ui-chart__swatch", "new": "ui-legend__swatch" },
|
|
69
|
+
{ "old": "ui-mark--evidence", "new": "ui-mark--accent" },
|
|
70
|
+
{ "old": "ui-bracket-note--evidence", "new": "ui-bracket-note--accent" }
|
|
71
|
+
],
|
|
72
|
+
"manual": [
|
|
73
|
+
{
|
|
74
|
+
"old": "ui.mark({ tone: 'evidence' }) / ui.bracketNote({ tone: 'evidence' })",
|
|
75
|
+
"new": "tone: 'accent'",
|
|
76
|
+
"note": "The rationed-accent tone option on the mark/bracket-note recipes is now 'accent' (was 'evidence'), matching ui.connector/ui.annotation. Do NOT rewrite ui.annotation({ variant: 'evidence' }) or the 'evidence' subject marker — those are a marker shape, not a tone, and are unchanged."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"old": "ui-chart__legend",
|
|
80
|
+
"new": "ui-legend",
|
|
81
|
+
"note": "Also import '@ponchia/ui/css/legend.css' beside report.css, and wrap each entry's content as <li class=\"ui-legend__item\"> … <span class=\"ui-legend__label\">…</span>. The swatch's --chart-color/--chart-pattern inline contract is unchanged; the categorical --chart-N colour is also available via .ui-legend__swatch--N. See docs/legends.md."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"old": "connectorEndArrow (annotations)",
|
|
85
|
+
"new": "connectorEndArrow (unchanged API)",
|
|
86
|
+
"note": "No code change needed. The function signature is identical; only the rendered arrowhead path differs slightly now that it shares the connectors geometry kernel. Re-baseline any exact-path SVG snapshot tests of annotation arrowheads."
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"codemod": "rg -l 'ui-chart__legend|ui-chart__swatch' then s/ui-chart__swatch/ui-legend__swatch/g and rework the ul.ui-chart__legend wrapper into ul.ui-legend with li.ui-legend__item rows. See docs/legends.md."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"from": "0.5",
|
|
93
|
+
"to": "0.6",
|
|
94
|
+
"summary": "Charting realignment. The local static bar-chart renderer (.ui-chart*) is removed — a chart needs scales + data binding, out of scope for the analytical layer. bronto is now a themeable target for Vega-Lite (@ponchia/ui/vega), the same tokens-as-data path as Mermaid/D2. The --chart-* data-viz palette, tokens/charts.json, and the .ui-legend layer are unchanged.",
|
|
95
|
+
"safe": [],
|
|
96
|
+
"manual": [
|
|
97
|
+
{
|
|
98
|
+
"old": "ui-chart / ui-chart__plot / ui-chart__bar / ui-chart__label / ui-chart__track / ui-chart__fill / ui-chart__fallback / ui-chart__caption",
|
|
99
|
+
"new": "a Vega-Lite chart themed with @ponchia/ui/vega, or a token-themed inline <svg>",
|
|
100
|
+
"note": "No 1:1 class mapping — the renderer is removed. For a real chart: import '@ponchia/ui/vega', pass brontoVegaConfig(theme) to vega-embed, and place the result in a <figure class=\"ui-report__figure\"> with a <figcaption class=\"ui-report__caption\"> and a <ul class=\"ui-legend\"> key (see docs/vega.md). For a frozen/print chart: hand-author an inline <svg> using the --chart-N palette tokens for fills. The --chart-value inline knob is gone; --chart-color/--chart-pattern remain on .ui-legend__swatch."
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"codemod": "No codemod — the .ui-chart* renderer has no replacement class. rg -l 'ui-chart\\\\b|ui-chart__' to find call sites, then rebuild each as a Vega-Lite chart (@ponchia/ui/vega) or a token-themed inline <svg>. See docs/vega.md."
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
package/README.md
CHANGED
|
@@ -3,12 +3,24 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@ponchia/ui)
|
|
4
4
|
[](https://www.npmjs.com/package/@ponchia/ui#provenance)
|
|
5
5
|
[](https://github.com/Ponchia/bronto-ui/blob/main/package.json)
|
|
6
|
-
[](https://github.com/Ponchia/bronto-ui/blob/main/scripts/check-dist.mjs)
|
|
7
7
|
[](https://github.com/Ponchia/bronto-ui/actions/workflows/ci.yml)
|
|
8
8
|
[](https://scorecard.dev/viewer/?uri=github.com/Ponchia/bronto-ui)
|
|
9
9
|
[](https://github.com/Ponchia/bronto-ui/blob/main/LICENSE)
|
|
10
10
|
|
|
11
|
-
**A CSS-first
|
|
11
|
+
**A CSS-first design system for interfaces that explain themselves.** It works in
|
|
12
|
+
plain HTML, every modern framework, and print/PDF, with no component runtime to
|
|
13
|
+
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
|
+
Beyond the standard component set it ships an opt-in analytical & report layer —
|
|
21
|
+
SVG annotations, legends, leader-line connectors, a guided-focus spotlight, text
|
|
22
|
+
marks, a colourblind-safe data-viz palette, and a static/PDF report grammar — for
|
|
23
|
+
dashboards and LLM-authored reports.
|
|
12
24
|
|
|
13
25
|
### [Live demo →](https://ponchia.github.io/bronto-ui/) · [Theme playground →](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)
|
|
14
26
|
|
|
@@ -18,7 +30,18 @@ The demo is the kitchen sink — every component, light/dark, RTL, live theming.
|
|
|
18
30
|
|
|
19
31
|
## What it is
|
|
20
32
|
|
|
21
|
-
`@ponchia/ui` ships its design as
|
|
33
|
+
`@ponchia/ui` ships its design as CSS, not components. You drop in one stylesheet
|
|
34
|
+
and style with semantic `ui-*` classes; an optional thin layer of typed
|
|
35
|
+
class-name recipes and SSR-safe vanilla behaviors sits on top for the few things
|
|
36
|
+
that genuinely need JS (theme persistence, dialogs, toasts, disclosure).
|
|
37
|
+
|
|
38
|
+
The guiding principle is that **colour is rationed and structure carries
|
|
39
|
+
meaning** — layout, type weight, and the hairline do the work before a hue does,
|
|
40
|
+
and the accent is a spotlight, not a paint bucket. Because everything lives in a
|
|
41
|
+
single `@layer bronto`, your own un-layered CSS overrides the framework with no
|
|
42
|
+
specificity fight and no `!important`.
|
|
43
|
+
|
|
44
|
+
It ships a complete, accessible **standard component set** — but that's not where it competes. Its differentiator is an opt-in **analytical & communication layer** for interfaces that make complex work legible: annotations, legends, connectors, marks, a guided-focus spotlight, lifecycle/system-state and source-provenance vocabularies, and a static/PDF report grammar. Each owns only its visual grammar and pure geometry — no chart engine, no state, no hit-testing. See **[docs/frontier-primitives.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/frontier-primitives.md)** for the thesis.
|
|
22
45
|
|
|
23
46
|
## Install
|
|
24
47
|
|
|
@@ -34,7 +57,7 @@ Or drop it in with no build step, straight from a CDN:
|
|
|
34
57
|
|
|
35
58
|
## Quick start
|
|
36
59
|
|
|
37
|
-
**1. Load the CSS.** One flattened, minified bundle — the whole
|
|
60
|
+
**1. Load the CSS.** One flattened, minified bundle — the whole standard component set, one request (~76 kB raw / ~13 kB gzip):
|
|
38
61
|
|
|
39
62
|
```css
|
|
40
63
|
@import '@ponchia/ui'; /* via a bundler */
|
|
@@ -47,6 +70,8 @@ Or drop it in with no build step, straight from a CDN:
|
|
|
47
70
|
|
|
48
71
|
> 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.
|
|
49
72
|
|
|
73
|
+
> The bundle is the standard component set. The opt-in analytical & report layers — `report.css`, `dataviz.css`, `annotations.css`, `legend.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).
|
|
74
|
+
|
|
50
75
|
**2. Write markup with `ui-*` classes** (primary is the default button; modifiers are opt-in):
|
|
51
76
|
|
|
52
77
|
```html
|
|
@@ -100,6 +125,7 @@ Arrows, chevrons, check/close/plus/minus, search/menu/gear, info/warning/bell/lo
|
|
|
100
125
|
- **Disclosure & nav** — tabs, accordion, segmented, breadcrumb, pagination, `ui-steps`, `ui-timeline`, `ui-pagehead`, `ui-kbd`.
|
|
101
126
|
- **Shells** — an admin dashboard shell (`ui-app-*`) and a content/marketing site shell (`ui-site*`, `ui-container`).
|
|
102
127
|
- **Prose** — `.ui-prose` styles raw, unclassed semantic HTML (Markdown / CMS / LLM output) with zero classes.
|
|
128
|
+
- **Analytical & communication primitives** _(opt-in)_ — `@ponchia/ui/css/analytical.css`: SVG **annotations** (subject/connector/note), standalone **legends**/data-keys, text/evidence **marks**, leader-line **connectors** (+ a pure `@ponchia/ui/connectors` geometry kernel), a guided-focus **spotlight**, a **crosshair**/readout, and a cross-cutting **selection** vocabulary. Each owns its visual grammar + pure geometry and refuses scales/state/hit-testing — figures that explain themselves, not a chart engine. Plus standalone **`source`/provenance** (trust) and **lifecycle `state`** leaves.
|
|
103
129
|
- **Reports** _(opt-in)_ — `@ponchia/ui/css/report.css`, a static/PDF-first report grammar for LLM-authored HTML: covers, sections, findings, evidence, figures, chart wrappers and print utilities.
|
|
104
130
|
- **Motion & dots** — the dot-matrix motif kit: dot grid, status dots, dot loaders, the orbital spinner, matrix reveal — all reduced-motion aware.
|
|
105
131
|
- **Glyphs** — `@ponchia/ui/glyphs`, a 48-glyph dot-matrix icon set on the `.ui-dotmatrix` primitive (display marks + crisp `solid` inline icons + one-node `.ui-icon` mask rendering).
|
|
@@ -117,7 +143,7 @@ Everything accent-colored derives from a single `--accent` variable via `color-m
|
|
|
117
143
|
.promo { --accent: #16a34a; } /* …or just this section green */
|
|
118
144
|
```
|
|
119
145
|
|
|
120
|
-
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
|
|
146
|
+
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**.
|
|
121
147
|
|
|
122
148
|
**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)**.
|
|
123
149
|
|
|
@@ -165,7 +191,7 @@ Recent-evergreen, by design. The framework targets the modern web platform — c
|
|
|
165
191
|
|
|
166
192
|
## Versioning
|
|
167
193
|
|
|
168
|
-
Pre-1.0 and deliberately so. **Until `1.0.0`, breaking changes ship in the _minor_** (`0.x.0`); patches (`0.x.y`) are always non-breaking. Pin with the patch range — at `0.x`, `~0.
|
|
194
|
+
Pre-1.0 and deliberately so. **Until `1.0.0`, breaking changes ship in the _minor_** (`0.x.0`); patches (`0.x.y`) are always non-breaking. Pin with the patch range — at `0.x`, `~0.6.0` (and equivalently `^0.6.0`) resolves to `>=0.6.0 <0.7.0`, giving you safe patches while holding back the next breaking minor. Every breaking change is called out under a **BREAKING** heading in the **[CHANGELOG](https://github.com/Ponchia/bronto-ui/blob/main/CHANGELOG.md)** with a migration note.
|
|
169
195
|
|
|
170
196
|
Contractual (changes are breaking): token **names** and documented token roles, `.ui-*` class and recipe names, `data-bronto-*` attributes, exported behavior/glyph/binding function names and each behavior's cleanup contract. Not contractual (may change any release): exact token **values** and generated colour math outputs (visual tuning) unless a doc explicitly says the value is stable, plus internal leaf-file / `@layer` boundaries. See **[docs/stability.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/stability.md)** for the full public-surface matrix.
|
|
171
197
|
|
|
@@ -175,10 +201,10 @@ Release candidates publish to the `next` dist-tag, never to `latest` — opt in
|
|
|
175
201
|
|
|
176
202
|
- **[Live demo](https://ponchia.github.io/bronto-ui/)** · **[Theme playground](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)**
|
|
177
203
|
- **[Class reference](https://github.com/Ponchia/bronto-ui/blob/main/docs/reference.md)** · **[Usage guide](https://github.com/Ponchia/bronto-ui/blob/main/docs/usage.md)** · **[Theming](https://github.com/Ponchia/bronto-ui/blob/main/docs/theming.md)** · **[Contrast](https://github.com/Ponchia/bronto-ui/blob/main/docs/contrast.md)** · **[Color system (ADR-0001)](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0001-color-system.md)** · **[Scope & 2026 baseline (ADR-0002)](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0002-scope-and-2026-baseline.md)**
|
|
178
|
-
- **[CHANGELOG](https://github.com/Ponchia/bronto-ui/blob/main/CHANGELOG.md)** · **[Roadmap](https://github.com/Ponchia/bronto-ui/blob/main/ROADMAP.md)** · **[Contributing](https://github.com/Ponchia/bronto-ui/blob/main/CONTRIBUTING.md)**
|
|
204
|
+
- **[CHANGELOG](https://github.com/Ponchia/bronto-ui/blob/main/CHANGELOG.md)** · **[Roadmap](https://github.com/Ponchia/bronto-ui/blob/main/ROADMAP.md)** · **[Contributing](https://github.com/Ponchia/bronto-ui/blob/main/CONTRIBUTING.md)** · **[Repository layout](https://github.com/Ponchia/bronto-ui/blob/main/docs/architecture.md#repository-layout)**
|
|
179
205
|
|
|
180
206
|
## License
|
|
181
207
|
|
|
182
208
|
[MIT](https://github.com/Ponchia/bronto-ui/blob/main/LICENSE) © Ponchia.
|
|
183
209
|
|
|
184
|
-
The bundled **Doto** font (`fonts/*.
|
|
210
|
+
The bundled **Doto** font (`fonts/*.woff2`) is © 2024 The Doto Project Authors and licensed separately under the [SIL Open Font License 1.1](https://github.com/Ponchia/bronto-ui/blob/main/fonts/OFL.txt) — see `fonts/OFL.txt`.
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Partial<AnnotationPoint>} [point]
|
|
3
|
+
* @returns {string}
|
|
4
|
+
*/
|
|
5
|
+
export function annotationTransform({ x, y }?: Partial<AnnotationPoint>): string;
|
|
6
|
+
/**
|
|
7
|
+
* @param {NoteTransformOptions} [options]
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
export function noteTransform({ dx, dy, x, y, align, valign, width, height, }?: NoteTransformOptions): string;
|
|
11
|
+
/**
|
|
12
|
+
* @param {NotePlacementOptions} options
|
|
13
|
+
* @returns {NotePlacement}
|
|
14
|
+
*/
|
|
15
|
+
export function notePlacement({ x, y, width, height, bounds, padding, gap, preferred, inset, }?: NotePlacementOptions): NotePlacement;
|
|
16
|
+
/**
|
|
17
|
+
* @param {CircleSubjectOptions} options
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export function circleSubjectPath({ radius }?: CircleSubjectOptions): string;
|
|
21
|
+
/**
|
|
22
|
+
* @param {RectSubjectOptions} options
|
|
23
|
+
* @returns {string}
|
|
24
|
+
*/
|
|
25
|
+
export function rectSubjectPath({ width, height, x, y, padding }?: RectSubjectOptions): string;
|
|
26
|
+
/**
|
|
27
|
+
* @param {ThresholdOptions} options
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
export function thresholdPath({ x1, y1, x2, y2 }?: ThresholdOptions): string;
|
|
31
|
+
/**
|
|
32
|
+
* @param {AxisThresholdOptions} options
|
|
33
|
+
* @returns {string}
|
|
34
|
+
*/
|
|
35
|
+
export function axisThresholdPath({ orientation, value, start, end }?: AxisThresholdOptions): string;
|
|
36
|
+
/**
|
|
37
|
+
* @param {BracketSubjectOptions} options
|
|
38
|
+
* @returns {string}
|
|
39
|
+
*/
|
|
40
|
+
export function bracketSubjectPath({ x1, y1, x2, y2, depth }?: BracketSubjectOptions): string;
|
|
41
|
+
/**
|
|
42
|
+
* @param {BandSubjectOptions} options
|
|
43
|
+
* @returns {string}
|
|
44
|
+
*/
|
|
45
|
+
export function bandSubjectPath({ x, y, width, height, padding }?: BandSubjectOptions): string;
|
|
46
|
+
/**
|
|
47
|
+
* @param {SlopeSubjectOptions} options
|
|
48
|
+
* @returns {string}
|
|
49
|
+
*/
|
|
50
|
+
export function slopeSubjectPath({ x1, y1, x2, y2 }?: SlopeSubjectOptions): string;
|
|
51
|
+
/**
|
|
52
|
+
* @param {ComparisonBraceOptions} options
|
|
53
|
+
* @returns {string}
|
|
54
|
+
*/
|
|
55
|
+
export function comparisonBracePath({ x1, y1, x2, y2, depth }?: ComparisonBraceOptions): string;
|
|
56
|
+
/**
|
|
57
|
+
* @param {OutlierClusterOptions} options
|
|
58
|
+
* @returns {string}
|
|
59
|
+
*/
|
|
60
|
+
export function outlierClusterPath({ points, radius }?: OutlierClusterOptions): string;
|
|
61
|
+
/**
|
|
62
|
+
* @param {TimelineEventOptions} [options]
|
|
63
|
+
* @returns {string}
|
|
64
|
+
*/
|
|
65
|
+
export function timelineEventPath({ size, direction }?: TimelineEventOptions): string;
|
|
66
|
+
/**
|
|
67
|
+
* @param {EvidenceMarkerOptions} [options]
|
|
68
|
+
* @returns {string}
|
|
69
|
+
*/
|
|
70
|
+
export function evidenceMarkerPath({ x, y, width, height, padding }?: EvidenceMarkerOptions): string;
|
|
71
|
+
/**
|
|
72
|
+
* @param {ConnectorEndDotOptions} options
|
|
73
|
+
* @returns {string}
|
|
74
|
+
*/
|
|
75
|
+
export function connectorEndDot({ x, y, radius }?: ConnectorEndDotOptions): string;
|
|
76
|
+
/**
|
|
77
|
+
* @param {ConnectorEndArrowOptions} options
|
|
78
|
+
* @returns {string}
|
|
79
|
+
*/
|
|
80
|
+
export function connectorEndArrow({ x1, y1, x2, y2, size, spread }?: ConnectorEndArrowOptions): string;
|
|
81
|
+
/**
|
|
82
|
+
* @param {ConnectorOptions} opts
|
|
83
|
+
* @returns {string}
|
|
84
|
+
*/
|
|
85
|
+
export function connectorLine(opts?: ConnectorOptions): string;
|
|
86
|
+
/**
|
|
87
|
+
* @param {ConnectorOptions} opts
|
|
88
|
+
* @returns {string}
|
|
89
|
+
*/
|
|
90
|
+
export function connectorElbow(opts?: ConnectorOptions): string;
|
|
91
|
+
/**
|
|
92
|
+
* @param {ConnectorOptions} opts
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
export function connectorCurve(opts?: ConnectorOptions): string;
|
|
96
|
+
/**
|
|
97
|
+
* @param {AnnotationPartsOptions} [opts]
|
|
98
|
+
* @returns {AnnotationParts}
|
|
99
|
+
*/
|
|
100
|
+
export function annotationParts(opts?: AnnotationPartsOptions): AnnotationParts;
|
|
101
|
+
/**
|
|
102
|
+
* Declutter labels along ONE axis: nudge overlapping labels apart so each keeps
|
|
103
|
+
* `gap` from its neighbours, sweeping up from `min`; if the run overflows `max`
|
|
104
|
+
* it slides up to fit. Deterministic and order-preserving — NOT a general 2-D
|
|
105
|
+
* collision solver (with more labels than the range holds, the overflow past
|
|
106
|
+
* `min` is the caller's to resolve: fewer labels, a longer axis, or rotation).
|
|
107
|
+
*
|
|
108
|
+
* `items`: `[{ pos, size }]` — `pos` is the desired centre coordinate along the
|
|
109
|
+
* axis, `size` the label's extent along it. Returns the adjusted centre per
|
|
110
|
+
* input item, in the original order.
|
|
111
|
+
*
|
|
112
|
+
* @param {DeclutterLabelItem[]} items
|
|
113
|
+
* @param {DeclutterLabelsOptions} [opts]
|
|
114
|
+
* @returns {number[]}
|
|
115
|
+
*/
|
|
116
|
+
export function declutterLabels(items: DeclutterLabelItem[], opts?: DeclutterLabelsOptions): number[];
|
|
117
|
+
/**
|
|
118
|
+
* Direct labeling: declutter labels along one axis and draw a leader line from
|
|
119
|
+
* each true anchor to its placed label. This is the 1-D core of Labella,
|
|
120
|
+
* completed with leaders via the shared connector kernel — deterministic and
|
|
121
|
+
* pure. It owns no scales (map data → figure coords first), no DOM, no
|
|
122
|
+
* nearest-anchor matching, and no 2-D placement; those stay the host's job.
|
|
123
|
+
*
|
|
124
|
+
* Each `items[i]` is `{ anchor: {x, y}, size, key? }`: `anchor` is the true
|
|
125
|
+
* data point in figure coordinates, `size` is the label's extent along the
|
|
126
|
+
* layout `axis`. Labels declutter along `axis` ('y' = a vertical column,
|
|
127
|
+
* default) and sit at the fixed `cross` coordinate on the other axis. Returns,
|
|
128
|
+
* in input order, the placed label point `{x, y}`, the echoed `anchor` and
|
|
129
|
+
* `key`, and the leader path `d` (anchor → label; `''` if they coincide) ready
|
|
130
|
+
* for a `<path class="ui-annotation__connector">`.
|
|
131
|
+
*
|
|
132
|
+
* @param {DirectLabelItem[]} items
|
|
133
|
+
* @param {DirectLabelsOptions} [opts]
|
|
134
|
+
* @returns {DirectLabel[]}
|
|
135
|
+
*/
|
|
136
|
+
export function directLabels(items: DirectLabelItem[], opts?: DirectLabelsOptions): DirectLabel[];
|
|
137
|
+
export type AnnotationPoint = {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
export type AnnotationOffset = {
|
|
142
|
+
dx: number;
|
|
143
|
+
dy: number;
|
|
144
|
+
};
|
|
145
|
+
export type AnnotationConnectorType = "callout" | "elbow" | "curve";
|
|
146
|
+
export type AnnotationAlign = "start" | "middle" | "end";
|
|
147
|
+
export type AnnotationValign = "top" | "middle" | "bottom";
|
|
148
|
+
export type AxisOrientation = "horizontal" | "vertical";
|
|
149
|
+
export type TimelineDirection = "up" | "down" | "left" | "right";
|
|
150
|
+
export type CircleSubject = {
|
|
151
|
+
type: "circle";
|
|
152
|
+
radius: number;
|
|
153
|
+
radiusPadding?: number | undefined;
|
|
154
|
+
};
|
|
155
|
+
export type RectSubject = {
|
|
156
|
+
type: "rect";
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
x?: number | undefined;
|
|
160
|
+
y?: number | undefined;
|
|
161
|
+
padding?: number | undefined;
|
|
162
|
+
};
|
|
163
|
+
export type ConnectorSubject = CircleSubject | RectSubject;
|
|
164
|
+
export type ConnectorOptions = AnnotationOffset & {
|
|
165
|
+
subject?: ConnectorSubject;
|
|
166
|
+
mid?: number;
|
|
167
|
+
};
|
|
168
|
+
export type CircleSubjectOptions = {
|
|
169
|
+
radius: number;
|
|
170
|
+
};
|
|
171
|
+
export type RectSubjectOptions = {
|
|
172
|
+
width: number;
|
|
173
|
+
height: number;
|
|
174
|
+
x?: number | undefined;
|
|
175
|
+
y?: number | undefined;
|
|
176
|
+
padding?: number | undefined;
|
|
177
|
+
};
|
|
178
|
+
export type ThresholdOptions = {
|
|
179
|
+
x1?: number | undefined;
|
|
180
|
+
y1?: number | undefined;
|
|
181
|
+
x2: number;
|
|
182
|
+
y2: number;
|
|
183
|
+
};
|
|
184
|
+
export type AxisThresholdOptions = {
|
|
185
|
+
orientation?: AxisOrientation | undefined;
|
|
186
|
+
value?: number | undefined;
|
|
187
|
+
start?: number | undefined;
|
|
188
|
+
end: number;
|
|
189
|
+
};
|
|
190
|
+
export type BracketSubjectOptions = {
|
|
191
|
+
x1: number;
|
|
192
|
+
y1: number;
|
|
193
|
+
x2: number;
|
|
194
|
+
y2: number;
|
|
195
|
+
depth?: number | undefined;
|
|
196
|
+
};
|
|
197
|
+
export type BandSubjectOptions = {
|
|
198
|
+
x?: number | undefined;
|
|
199
|
+
y?: number | undefined;
|
|
200
|
+
width: number;
|
|
201
|
+
height: number;
|
|
202
|
+
padding?: number | undefined;
|
|
203
|
+
};
|
|
204
|
+
export type SlopeSubjectOptions = {
|
|
205
|
+
x1: number;
|
|
206
|
+
y1: number;
|
|
207
|
+
x2: number;
|
|
208
|
+
y2: number;
|
|
209
|
+
};
|
|
210
|
+
export type ComparisonBraceOptions = {
|
|
211
|
+
x1: number;
|
|
212
|
+
y1: number;
|
|
213
|
+
x2: number;
|
|
214
|
+
y2: number;
|
|
215
|
+
depth?: number | undefined;
|
|
216
|
+
};
|
|
217
|
+
export type OutlierClusterOptions = {
|
|
218
|
+
points: AnnotationPoint[];
|
|
219
|
+
radius?: number | undefined;
|
|
220
|
+
};
|
|
221
|
+
export type TimelineEventOptions = {
|
|
222
|
+
size?: number | undefined;
|
|
223
|
+
direction?: TimelineDirection | undefined;
|
|
224
|
+
};
|
|
225
|
+
export type EvidenceMarkerOptions = {
|
|
226
|
+
x?: number | undefined;
|
|
227
|
+
y?: number | undefined;
|
|
228
|
+
width?: number | undefined;
|
|
229
|
+
height?: number | undefined;
|
|
230
|
+
padding?: number | undefined;
|
|
231
|
+
};
|
|
232
|
+
export type ConnectorEndDotOptions = AnnotationPoint & {
|
|
233
|
+
radius?: number;
|
|
234
|
+
};
|
|
235
|
+
export type ConnectorEndArrowOptions = {
|
|
236
|
+
x1?: number | undefined;
|
|
237
|
+
y1?: number | undefined;
|
|
238
|
+
x2: number;
|
|
239
|
+
y2: number;
|
|
240
|
+
size?: number | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Half-angle of the arrowhead in radians (default
|
|
243
|
+
* 0.32 ≈ a crisp 37° included angle). Larger = blunter.
|
|
244
|
+
*/
|
|
245
|
+
spread?: number | undefined;
|
|
246
|
+
};
|
|
247
|
+
export type NoteTransformOptions = {
|
|
248
|
+
dx?: number | undefined;
|
|
249
|
+
dy?: number | undefined;
|
|
250
|
+
x?: number | undefined;
|
|
251
|
+
y?: number | undefined;
|
|
252
|
+
align?: AnnotationAlign | undefined;
|
|
253
|
+
valign?: AnnotationValign | undefined;
|
|
254
|
+
width?: number | undefined;
|
|
255
|
+
height?: number | undefined;
|
|
256
|
+
};
|
|
257
|
+
export type AnnotationBounds = {
|
|
258
|
+
x?: number | undefined;
|
|
259
|
+
y?: number | undefined;
|
|
260
|
+
width: number;
|
|
261
|
+
height: number;
|
|
262
|
+
};
|
|
263
|
+
export type NotePlacementOptions = {
|
|
264
|
+
x?: number | undefined;
|
|
265
|
+
y?: number | undefined;
|
|
266
|
+
width: number;
|
|
267
|
+
height: number;
|
|
268
|
+
bounds: AnnotationBounds;
|
|
269
|
+
padding?: number | undefined;
|
|
270
|
+
gap?: number | undefined;
|
|
271
|
+
preferred?: "top" | "right" | "bottom" | "left" | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* Extra margin (user units) the note must keep from
|
|
274
|
+
* the bounds edge, on top of `padding`. Reserve the note's title stroke-halo
|
|
275
|
+
* (~3) or a leader stub so a placement that "fits" doesn't clip. Default 0.
|
|
276
|
+
*/
|
|
277
|
+
inset?: number | undefined;
|
|
278
|
+
};
|
|
279
|
+
export type NotePlacement = {
|
|
280
|
+
dx: number;
|
|
281
|
+
dy: number;
|
|
282
|
+
align: AnnotationAlign;
|
|
283
|
+
valign: AnnotationValign;
|
|
284
|
+
transform: string;
|
|
285
|
+
};
|
|
286
|
+
export type AnnotationPartsSubject = (CircleSubject | RectSubject | ({
|
|
287
|
+
type: "threshold";
|
|
288
|
+
} & ThresholdOptions) | ({
|
|
289
|
+
type: "bracket";
|
|
290
|
+
} & BracketSubjectOptions) | ({
|
|
291
|
+
type: "band";
|
|
292
|
+
} & BandSubjectOptions) | ({
|
|
293
|
+
type: "slope";
|
|
294
|
+
} & SlopeSubjectOptions) | ({
|
|
295
|
+
type: "compare";
|
|
296
|
+
} & ComparisonBraceOptions) | ({
|
|
297
|
+
type: "cluster";
|
|
298
|
+
} & OutlierClusterOptions) | ({
|
|
299
|
+
type: "axis";
|
|
300
|
+
} & AxisThresholdOptions) | ({
|
|
301
|
+
type: "timeline";
|
|
302
|
+
} & TimelineEventOptions) | ({
|
|
303
|
+
type: "evidence";
|
|
304
|
+
} & EvidenceMarkerOptions));
|
|
305
|
+
export type AnnotationPartsOptions = {
|
|
306
|
+
type?: AnnotationConnectorType | undefined;
|
|
307
|
+
x?: number | undefined;
|
|
308
|
+
y?: number | undefined;
|
|
309
|
+
dx?: number | undefined;
|
|
310
|
+
dy?: number | undefined;
|
|
311
|
+
subject?: AnnotationPartsSubject | undefined;
|
|
312
|
+
};
|
|
313
|
+
export type AnnotationParts = {
|
|
314
|
+
transform: string;
|
|
315
|
+
subject: string;
|
|
316
|
+
connector: string;
|
|
317
|
+
note: string;
|
|
318
|
+
};
|
|
319
|
+
export type DeclutterLabelItem = {
|
|
320
|
+
/**
|
|
321
|
+
* Desired centre coordinate along the axis.
|
|
322
|
+
*/
|
|
323
|
+
pos: number;
|
|
324
|
+
/**
|
|
325
|
+
* The label's extent along the axis.
|
|
326
|
+
*/
|
|
327
|
+
size: number;
|
|
328
|
+
};
|
|
329
|
+
export type DeclutterLabelsOptions = {
|
|
330
|
+
/**
|
|
331
|
+
* Minimum gap kept between adjacent labels. Default 0.
|
|
332
|
+
*/
|
|
333
|
+
gap?: number | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Lower bound of the axis. Default -Infinity.
|
|
336
|
+
*/
|
|
337
|
+
min?: number | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* Upper bound of the axis. Default Infinity.
|
|
340
|
+
*/
|
|
341
|
+
max?: number | undefined;
|
|
342
|
+
};
|
|
343
|
+
export type DirectLabelItem = {
|
|
344
|
+
/**
|
|
345
|
+
* The true data point the label refers to (figure coordinates).
|
|
346
|
+
*/
|
|
347
|
+
anchor: AnnotationPoint;
|
|
348
|
+
/**
|
|
349
|
+
* The label's extent along the layout axis.
|
|
350
|
+
*/
|
|
351
|
+
size: number;
|
|
352
|
+
/**
|
|
353
|
+
* Optional identifier, echoed back on the matching output (input order).
|
|
354
|
+
*/
|
|
355
|
+
key?: string | number | undefined;
|
|
356
|
+
};
|
|
357
|
+
export type DirectLabelsOptions = {
|
|
358
|
+
/**
|
|
359
|
+
* Axis the labels declutter along. 'y' = a vertical column. Default 'y'.
|
|
360
|
+
*/
|
|
361
|
+
axis?: "x" | "y" | undefined;
|
|
362
|
+
/**
|
|
363
|
+
* Fixed coordinate on the other axis where the label column/row sits. Default 0.
|
|
364
|
+
*/
|
|
365
|
+
cross?: number | undefined;
|
|
366
|
+
/**
|
|
367
|
+
* Minimum gap kept between adjacent labels. Default 0.
|
|
368
|
+
*/
|
|
369
|
+
gap?: number | undefined;
|
|
370
|
+
/**
|
|
371
|
+
* Lower bound of the layout axis. Default -Infinity.
|
|
372
|
+
*/
|
|
373
|
+
min?: number | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* Upper bound of the layout axis. Default Infinity.
|
|
376
|
+
*/
|
|
377
|
+
max?: number | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* Leader-line shape. Default 'straight'.
|
|
380
|
+
*/
|
|
381
|
+
shape?: "straight" | "elbow" | "curve" | undefined;
|
|
382
|
+
};
|
|
383
|
+
export type DirectLabel = {
|
|
384
|
+
/**
|
|
385
|
+
* Placed label point — the leader's label-side end.
|
|
386
|
+
*/
|
|
387
|
+
x: number;
|
|
388
|
+
y: number;
|
|
389
|
+
/**
|
|
390
|
+
* The echoed input anchor.
|
|
391
|
+
*/
|
|
392
|
+
anchor: AnnotationPoint;
|
|
393
|
+
/**
|
|
394
|
+
* The echoed input key, if any.
|
|
395
|
+
*/
|
|
396
|
+
key?: string | number | undefined;
|
|
397
|
+
/**
|
|
398
|
+
* SVG path for the leader (anchor → label point); '' if they coincide.
|
|
399
|
+
*/
|
|
400
|
+
d: string;
|
|
401
|
+
};
|
|
402
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAkSA;;;GAGG;AACH,+CAHW,OAAO,CAAC,eAAe,CAAC,GACtB,MAAM,CAIlB;AAED;;;GAGG;AACH,gFAHW,oBAAoB,GAClB,MAAM,CA0BlB;AAsCD;;;GAGG;AACH,iGAHW,oBAAoB,GAClB,aAAa,CA0DzB;AAED;;;GAGG;AACH,+CAHW,oBAAoB,GAClB,MAAM,CAIlB;AAED;;;GAGG;AACH,mEAHW,kBAAkB,GAChB,MAAM,CAYlB;AAED;;;GAGG;AACH,mDAHW,gBAAgB,GACd,MAAM,CAMlB;AAED;;;GAGG;AACH,uEAHW,oBAAoB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