@ponchia/ui 0.6.5 → 0.6.7
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 +170 -0
- package/README.md +43 -23
- package/behaviors/carousel.d.ts.map +1 -1
- package/behaviors/carousel.js +3 -0
- package/behaviors/dialog.d.ts.map +1 -1
- package/behaviors/dialog.js +14 -8
- package/behaviors/forms.d.ts.map +1 -1
- package/behaviors/forms.js +11 -5
- package/behaviors/index.d.ts +2 -0
- package/behaviors/index.d.ts.map +1 -1
- package/behaviors/index.js +2 -0
- package/behaviors/internal.d.ts +2 -1
- package/behaviors/internal.d.ts.map +1 -1
- package/behaviors/internal.js +23 -3
- package/behaviors/legend.d.ts.map +1 -1
- package/behaviors/legend.js +41 -9
- package/behaviors/splitter.d.ts +26 -0
- package/behaviors/splitter.d.ts.map +1 -0
- package/behaviors/splitter.js +200 -0
- package/behaviors/table.js +3 -3
- package/behaviors/theme.js +2 -2
- package/classes/classes.json +230 -4
- package/classes/index.d.ts +49 -1
- package/classes/index.js +56 -1
- package/classes/vscode.css-custom-data.json +1 -1
- package/css/analytical.css +3 -1
- package/css/app.css +4 -4
- package/css/clamp.css +92 -0
- package/css/figure.css +102 -0
- package/css/highlights.css +50 -0
- package/css/interval.css +90 -0
- package/css/primitives.css +2 -3
- package/css/report-kit.css +38 -0
- package/css/report.css +51 -4
- package/css/sidenote.css +12 -2
- package/css/site.css +2 -1
- package/css/sources.css +5 -0
- package/css/state.css +120 -1
- package/css/table.css +4 -0
- package/css/tokens.css +9 -9
- package/css/workbench.css +101 -8
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/clamp.css +1 -0
- package/dist/css/figure.css +1 -0
- package/dist/css/highlights.css +1 -0
- package/dist/css/interval.css +1 -0
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -0
- package/dist/css/report.css +1 -1
- package/dist/css/sidenote.css +1 -1
- package/dist/css/site.css +1 -1
- package/dist/css/sources.css +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0002-scope-and-2026-baseline.md +1 -1
- package/docs/architecture.md +67 -43
- package/docs/clamp.md +49 -0
- package/docs/contrast.md +34 -24
- package/docs/d2.md +37 -0
- package/docs/figure.md +71 -0
- package/docs/frontier-primitives.md +48 -23
- package/docs/highlights.md +52 -0
- package/docs/interop/tailwind.md +148 -0
- package/docs/interval.md +55 -0
- package/docs/legends.md +3 -2
- package/docs/mermaid.md +6 -0
- package/docs/migrations/0.2-to-0.3.md +80 -0
- package/docs/migrations/0.3-to-0.4.md +48 -0
- package/docs/migrations/0.4-to-0.5.md +96 -0
- package/docs/migrations/0.5-to-0.6.md +82 -0
- package/docs/package-contract.md +40 -2
- package/docs/reference.md +79 -6
- package/docs/reporting.md +132 -56
- package/docs/sidenote.md +7 -1
- package/docs/sources.md +1 -1
- package/docs/stability.md +5 -3
- package/docs/state.md +67 -10
- package/docs/theming.md +10 -2
- package/docs/usage.md +31 -11
- package/docs/workbench.md +59 -18
- package/llms.txt +82 -14
- package/package.json +68 -6
- package/qwik/index.d.ts +1 -0
- package/qwik/index.d.ts.map +1 -1
- package/qwik/index.js +26 -21
- package/react/index.d.ts +1 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +4 -1
- package/schemas/report-claims.v1.schema.json +137 -0
- package/solid/index.d.ts +2 -0
- package/solid/index.d.ts.map +1 -1
- package/solid/index.js +3 -0
- package/svelte/index.d.ts +88 -0
- package/svelte/index.d.ts.map +1 -0
- package/svelte/index.js +166 -0
- package/tailwind.css +87 -0
- package/tokens/figma.variables.json +2241 -0
- package/tokens/index.js +1 -1
- package/tokens/index.json +2 -2
- package/tokens/resolved.json +3 -3
- package/tokens/tokens.dtcg.json +1 -1
- package/vue/index.d.ts +79 -0
- package/vue/index.d.ts.map +1 -0
- package/vue/index.js +197 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,176 @@
|
|
|
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.7 — 2026-06-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Tailwind v4 bridge.** `@ponchia/ui/tailwind` / `@ponchia/ui/tailwind.css`
|
|
13
|
+
ships a CSS-first `@theme inline` bridge, `bronto-dark` and `bronto-oled`
|
|
14
|
+
custom variants, and source-registration guidance for Tailwind v4 projects.
|
|
15
|
+
`docs/interop/tailwind.md` documents `@reference` / `@source`, and
|
|
16
|
+
`examples/tailwind-vite` builds from the packed tarball and browser-smokes
|
|
17
|
+
the emitted Bronto utilities.
|
|
18
|
+
- **Svelte and Vue lifecycle adapters.** `@ponchia/ui/svelte` exports
|
|
19
|
+
dependency-free actions over the delegated behavior layer, and
|
|
20
|
+
`@ponchia/ui/vue` exports directives, plugin helpers, and the shared
|
|
21
|
+
imperative `useToast()` helper.
|
|
22
|
+
The SvelteKit example now uses the Svelte adapter, and `examples/vue-vite`
|
|
23
|
+
covers Vue consumer install/build/runtime smoke from the packed package.
|
|
24
|
+
- **Figma Variables handoff artifact.** `tokens/figma.variables.json` is
|
|
25
|
+
generated from the token source, exported as
|
|
26
|
+
`@ponchia/ui/tokens/figma.variables.json`, drift-checked in `check:fresh`,
|
|
27
|
+
and documented as a local import/sync handoff alongside the DTCG token export.
|
|
28
|
+
- **Report-primitive batch** — four additive opt-in leaves for static reports
|
|
29
|
+
and explanation surfaces: `ui-figure` (`css/figure.css`) for reusable
|
|
30
|
+
chart/diagram/media stages with overlay, key and fallback-data slots;
|
|
31
|
+
`ui-interval` (`css/interval.css`) for host-normalised low/high evidence
|
|
32
|
+
windows; `ui-clamp` (`css/clamp.css`) for bounded excerpts with CSS-only
|
|
33
|
+
show-more / show-less; and `ui-highlights` (`css/highlights.css`) for named
|
|
34
|
+
CSS Custom Highlight API paints (`bronto-evidence`, `bronto-search`,
|
|
35
|
+
`bronto-current`). All stay out of `dist/bronto.css`; `figure.css` and
|
|
36
|
+
`highlights.css` join the analytical roll-up.
|
|
37
|
+
- **Background-job state primitive.** `state.css` now includes `ui-job` for
|
|
38
|
+
persistent asynchronous work: written status, determinate progress via
|
|
39
|
+
`--job-progress`, optional actions, compact mode, and queued/running/blocked/
|
|
40
|
+
failed/complete tones. The host still owns polling, retries, cancellation,
|
|
41
|
+
and announcements.
|
|
42
|
+
- **Workbench splitter primitive.** `workbench.css` now includes
|
|
43
|
+
`ui-splitter` / `__pane` / `__handle` plus the optional `initSplitter`
|
|
44
|
+
behavior (`data-bronto-splitter`) for focusable ARIA separator handles,
|
|
45
|
+
keyboard and pointer resizing, `--splitter-pos` / `aria-valuenow` sync, and a
|
|
46
|
+
`bronto:splitter:resize` event. React, Solid, Qwik, Svelte, and Vue adapters
|
|
47
|
+
expose the matching hook/action/directive.
|
|
48
|
+
- **Service identity demo and report kit.** The public demo set now includes
|
|
49
|
+
`demo/service.html`, a cross-service `ui-app-shell` specimen that keeps the
|
|
50
|
+
default bundle centered on shared app identity. Static reports get the new
|
|
51
|
+
opt-in `@ponchia/ui/css/report-kit.css` roll-up for the complete report
|
|
52
|
+
vocabulary, plus `@ponchia/ui/schemas/report-claims.v1.schema.json` for
|
|
53
|
+
claim/source sidecar validation.
|
|
54
|
+
- **Public-package hardening gates.** `check:public-hygiene`,
|
|
55
|
+
`check:variables`, and `check:migrations` are now part of the aggregate
|
|
56
|
+
`npm run check` chain, covering packed public text leaks, undefined CSS
|
|
57
|
+
custom-property references, and migration-map/doc alignment.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- **Silent CSS token typos.** `css/workbench.css` now uses the real
|
|
62
|
+
`--focus-ring` token for splitter focus outlines, and `css/report.css` uses
|
|
63
|
+
`--text-base` for finding/evidence value text. The new variable-reference
|
|
64
|
+
gate prevents the same class of no-op declaration from shipping again.
|
|
65
|
+
- **Print: stat tiles and table rows no longer slice across PDF page
|
|
66
|
+
boundaries** — the report-layer `@media print` break-inside guard covered
|
|
67
|
+
the report shell (`.ui-report__*`, `.ui-claim`, `.ui-evidence-item`) but
|
|
68
|
+
not `.ui-stat` tiles, generic `.ui-statgrid` children, or `tr`, so a stat
|
|
69
|
+
card landing on a page boundary printed half its value on one page and the
|
|
70
|
+
delta on the next (observed in a consumer report's PDF export). Guarded at
|
|
71
|
+
the item level — the tile / the row, not the container — so a long
|
|
72
|
+
statgrid or table can still span pages.
|
|
73
|
+
|
|
74
|
+
- **Sidenote gutter contract actually works now** — `--sidenote-width` /
|
|
75
|
+
`--sidenote-gap` are root-scoped instead of declared only on the notes.
|
|
76
|
+
The documented host wiring (container
|
|
77
|
+
`padding-inline-end: calc(var(--sidenote-width) + var(--sidenote-gap))`)
|
|
78
|
+
referenced vars an ancestor could never see, so the calc was invalid and
|
|
79
|
+
silently reserved NO gutter — the floated notes spilled past the page edge
|
|
80
|
+
(caught by a real report's visual QA). The demo now uses the documented
|
|
81
|
+
calc verbatim (it previously masked the bug with a hardcoded literal), and
|
|
82
|
+
a wide-viewport e2e asserts the contract: gutter resolves, float stays
|
|
83
|
+
on-page, no horizontal scroll. Overriding either knob on the container now
|
|
84
|
+
re-sizes the notes and the gutter together.
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
|
|
88
|
+
- `docs/d2.md` tokenize recipe covers the full embedded-style surface
|
|
89
|
+
(`.color-*` / `.background-color-*` rules, not just `fill`/`stroke`) and
|
|
90
|
+
warns that `tooltip:`/`|md` shapes embed GitHub-Primer styling that
|
|
91
|
+
survives tokenization. `docs/sidenote.md` documents the root-scoped knobs.
|
|
92
|
+
- Local verification is now reproducible through named scripts:
|
|
93
|
+
`npm run test:e2e:nonpixel` runs every non-screenshot Playwright spec across
|
|
94
|
+
Chromium, Firefox, and WebKit, while `npm run test:examples` packs the real
|
|
95
|
+
tarball, builds all examples in temp directories, and browser-smokes the
|
|
96
|
+
runtime examples. `CONTRIBUTING.md`, `docs/release.md`, and
|
|
97
|
+
`docs/architecture.md` describe when to use those local gates versus the
|
|
98
|
+
pinned-container screenshot gate.
|
|
99
|
+
- `check:examples` keeps the example inventory, CI matrix, browser-smoke list,
|
|
100
|
+
README rows, and preview ports aligned from one registry; `check:dead` now
|
|
101
|
+
runs in the aggregate `npm run check` chain.
|
|
102
|
+
- README, package metadata, usage docs, workbench examples, and the docs index
|
|
103
|
+
now frame `@ponchia/ui` as the shared UI identity layer for services, tools,
|
|
104
|
+
sites, and reports, with reports as an opt-in consumer rather than the center
|
|
105
|
+
of the package.
|
|
106
|
+
|
|
107
|
+
## 0.6.6 — 2026-06-10
|
|
108
|
+
|
|
109
|
+
Consolidation pass from the 2026-06-10 multi-agent audit: two real PDF-export
|
|
110
|
+
defects fixed and gated, the reporting hub routed to every shipped leaf, and
|
|
111
|
+
the drift-prone hand lists in the gates derived from registries. No breaking
|
|
112
|
+
changes, no `MIGRATIONS.json` entry.
|
|
113
|
+
|
|
114
|
+
### Fixed
|
|
115
|
+
|
|
116
|
+
- **Print overprint (the big one)** — Chromium-class print engines restart
|
|
117
|
+
grid tracks at each page break, printing new rows over the running content.
|
|
118
|
+
`css/report.css` `@media print` now demotes the vertical document-flow
|
|
119
|
+
wrappers (`.ui-report`, `__section`, `__figure`, `__actions`,
|
|
120
|
+
`.ui-evidence-ledger`) to block flow with margin-emulated gaps; the column
|
|
121
|
+
grids (`.ui-compare`, `.ui-meter__row`, `.ui-report__decision-item`,
|
|
122
|
+
`.ui-evidence-grid`) keep their tracks. Gated by a promoted multi-page
|
|
123
|
+
fixture (`test/e2e/_report-print.fixture.html`) whose PDF is parsed with
|
|
124
|
+
pdfjs-dist and asserted overlap-free (`test/e2e/report-print.spec.mjs`).
|
|
125
|
+
- **Silent module-figure drop in PDFs** — reports that render figures from
|
|
126
|
+
relative `<script type="module">` imports lose them over `file://` (CORS).
|
|
127
|
+
`scripts/render-pdf.mjs` gains `--serve` (loopback HTTP + the report's
|
|
128
|
+
`data-report-ready` signal), forwards page/console errors to stderr, and
|
|
129
|
+
warns when a module report is rendered over `file://`.
|
|
130
|
+
- **Demo class drift** — `demo/index.html` still used the renamed
|
|
131
|
+
`ui-inspector__header` (now `__head`), and `demo/version-history-report.html`
|
|
132
|
+
carried a never-registered cover-mark class; both were silent no-ops. The
|
|
133
|
+
generated reference's analytical-leaves note now names `ui-annotation`
|
|
134
|
+
(singular, the real class).
|
|
135
|
+
- `scripts/smoke-example.mjs` imports Chromium from `@playwright/test` (the
|
|
136
|
+
installed devDependency) instead of the hoisting-dependent bare
|
|
137
|
+
`playwright` specifier.
|
|
138
|
+
|
|
139
|
+
### Added
|
|
140
|
+
|
|
141
|
+
- **Reporting hub routing** — `docs/reporting.md`'s analytical-toolbox table
|
|
142
|
+
now routes ALL report-relevant leaves (spark, bullet, diff, code, sidenote,
|
|
143
|
+
textref, term, glossary, contents rail, tree, dot surfaces) and states
|
|
144
|
+
precisely what `analytical.css` does and does not bundle. New convention in
|
|
145
|
+
CONTRIBUTING: a new report-relevant leaf ships in the same PR as its
|
|
146
|
+
routing row.
|
|
147
|
+
- **`npm run release:prep -- X.Y.Z`** — one-shot release prep: version + lock
|
|
148
|
+
bump, CHANGELOG heading dating, and re-pinning every `@ponchia/ui@X.Y.Z`
|
|
149
|
+
literal across the gated shipped docs AND the ungated `demo/*.html` pages
|
|
150
|
+
(which had already drifted a version behind).
|
|
151
|
+
- **Cross-engine e2e on merge-to-main** — pushes to `main` that touch
|
|
152
|
+
engine-sensitive surfaces (`css/`, `dist/`, `behaviors/`, `fonts/`,
|
|
153
|
+
`tokens/`, `test/e2e/`, the Playwright config) now run the firefox/webkit
|
|
154
|
+
pass too, instead of deferring it to the release tag.
|
|
155
|
+
- **`demo/dots.html`** — the dot data surfaces (waffle, activity, level,
|
|
156
|
+
dotgauge, readout, spark--dots, halftone, dotfit) get a specimen page,
|
|
157
|
+
axe/guard coverage in `demos.spec`, and render-geometry boundingBox
|
|
158
|
+
assertions (their only possible executable gate — they ship no JS).
|
|
159
|
+
- jsdom coverage for `initDisabledGuard` (activation blocking, Tab
|
|
160
|
+
pass-through, root scoping, cleanup).
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
|
|
164
|
+
- `check:report` and `check:pack` derive their scan/entrypoint lists from
|
|
165
|
+
registries (`package.json` `files`/`exports` via `scripts/lib/css-leaves.mjs`
|
|
166
|
+
+ `lib/shipped-docs.mjs`) instead of hand lists that had drifted behind the
|
|
167
|
+
post-0.6.0 leaves. The broadened scan immediately caught the demo/reference
|
|
168
|
+
class defects above. `core.css` imports are now closed over an explicit
|
|
169
|
+
CORE_BUNDLE allowlist in both directions.
|
|
170
|
+
- `ROADMAP.md` / `docs/frontier-primitives.md` reconciled to 0.6.7: the
|
|
171
|
+
report/provenance/explanation lane is named the proven core; ui-job,
|
|
172
|
+
ui-conflict, drag/drop workbench follow-ons, the tree roving-focus kernel,
|
|
173
|
+
and command follow-ons are explicitly dormant until a real app consumer
|
|
174
|
+
exists; the 2026-06-09 scout keeps (ui-interval, ui-clamp, ui-highlights) are
|
|
175
|
+
recorded as report-lane candidates gated behind the routing hub. The adoption
|
|
176
|
+
stance is stated in ROADMAP.
|
|
177
|
+
|
|
8
178
|
## 0.6.5 — 2026-06-09
|
|
9
179
|
|
|
10
180
|
Patch release: the source-backref behavior, the report decision/evidence
|
package/README.md
CHANGED
|
@@ -8,23 +8,32 @@
|
|
|
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
|
|
12
|
-
plain HTML, every modern framework, and print/PDF, with no component
|
|
13
|
-
adopt and zero runtime dependencies.
|
|
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
14
|
|
|
15
15
|
The look is a deliberate stance: a neutral monochrome canvas with one rationed
|
|
16
16
|
accent (colour signals, it never decorates), dot-matrix display type, and
|
|
17
17
|
hairline borders — all re-skinnable from a single `--accent` knob (opt-in
|
|
18
18
|
amber-CRT, phosphor-green, and e-ink colorways).
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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.
|
|
24
26
|
|
|
25
|
-
### [Live demo →](https://ponchia.github.io/bronto-ui/) · [Theme playground →](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)
|
|
27
|
+
### [Live demo →](https://ponchia.github.io/bronto-ui/) · [Service shell →](https://ponchia.github.io/bronto-ui/demo/service.html) · [Static report →](https://ponchia.github.io/bronto-ui/demo/report-standalone.html) · [Theme playground →](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)
|
|
26
28
|
|
|
27
29
|
The demo is the kitchen sink — every component, light/dark, RTL, live theming.
|
|
30
|
+
The service shell shows the shared app identity; the static report shows the
|
|
31
|
+
same system under a no-build, no-JS, Chromium-PDF-ready constraint.
|
|
32
|
+
|
|
33
|
+
<p>
|
|
34
|
+
<img alt="A research report built with the @ponchia/ui report layer" src="https://raw.githubusercontent.com/Ponchia/bronto-ui/main/demo/_preview-report-research.png" width="49%" />
|
|
35
|
+
<img alt="The same report grammar printed to PDF" src="https://raw.githubusercontent.com/Ponchia/bronto-ui/main/demo/_preview-report-print.png" width="49%" />
|
|
36
|
+
</p>
|
|
28
37
|
|
|
29
38
|
---
|
|
30
39
|
|
|
@@ -41,7 +50,13 @@ and the accent is a spotlight, not a paint bucket. Because everything lives in a
|
|
|
41
50
|
single `@layer bronto`, your own un-layered CSS overrides the framework with no
|
|
42
51
|
specificity fight and no `!important`.
|
|
43
52
|
|
|
44
|
-
It ships a complete, accessible **standard component set
|
|
53
|
+
It ships a complete, accessible **standard component set** because that is the
|
|
54
|
+
identity layer every service consumes. Its sharper edge is the opt-in **tooling,
|
|
55
|
+
analytical, and communication layer** sketched above. The line that holds it
|
|
56
|
+
together: each primitive owns only its visual grammar and pure geometry — no
|
|
57
|
+
chart engine, no domain state, no hit-testing. See
|
|
58
|
+
**[docs/frontier-primitives.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/frontier-primitives.md)**
|
|
59
|
+
for the thesis.
|
|
45
60
|
|
|
46
61
|
## Install
|
|
47
62
|
|
|
@@ -52,7 +67,7 @@ npm i @ponchia/ui
|
|
|
52
67
|
Or drop it in with no build step, straight from a CDN:
|
|
53
68
|
|
|
54
69
|
```html
|
|
55
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui/dist/bronto.css">
|
|
70
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.7/dist/bronto.css">
|
|
56
71
|
```
|
|
57
72
|
|
|
58
73
|
## Quick start
|
|
@@ -70,7 +85,7 @@ Or drop it in with no build step, straight from a CDN:
|
|
|
70
85
|
|
|
71
86
|
> 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.
|
|
72
87
|
|
|
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).
|
|
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).
|
|
74
89
|
|
|
75
90
|
**2. Write markup with `ui-*` classes** (primary is the default button; modifiers are opt-in):
|
|
76
91
|
|
|
@@ -104,7 +119,7 @@ toast('Saved', { tone: 'success' }); // body-anchored stack, no markup needed
|
|
|
104
119
|
|
|
105
120
|
Behaviors cover theme persistence, disclosure, dropdown menus, native-`<dialog>` modals/drawers, tabs, combobox, form validation, table sort, carousel, source backrefs and toasts — wired by `data-bronto-*` attributes.
|
|
106
121
|
|
|
107
|
-
**5. (Optional) display glyphs — a
|
|
122
|
+
**5. (Optional) display glyphs — a 71-glyph dot-matrix icon set:**
|
|
108
123
|
|
|
109
124
|
```js
|
|
110
125
|
import { renderGlyph } from '@ponchia/ui/glyphs';
|
|
@@ -123,12 +138,12 @@ Arrows, chevrons, check/close/plus/minus, search/menu/gear, info/warning/bell/lo
|
|
|
123
138
|
- **Feedback** — alert/callout, toast, tooltip, `ui-progress` (task) and `ui-meter` (measured value).
|
|
124
139
|
- **Overlay** — modal + drawer on native `<dialog>`, dropdown menu, `ui-carousel` + `ui-lightbox` (gallery, user-driven — not an auto-slider).
|
|
125
140
|
- **Disclosure & nav** — tabs, accordion, segmented, breadcrumb, pagination, `ui-steps`, `ui-timeline`, `ui-pagehead`, `ui-kbd`.
|
|
126
|
-
- **Shells** —
|
|
141
|
+
- **Shells** — a service/app shell (`ui-app-*`) and a content/marketing site shell (`ui-site*`, `ui-container`).
|
|
127
142
|
- **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,
|
|
129
|
-
- **Reports** _(opt-in)_ — `@ponchia/ui/css/report.css
|
|
143
|
+
- **Analytical & communication primitives** _(opt-in)_ — `@ponchia/ui/css/analytical.css`: **figure** stages, 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, a cross-cutting **selection** vocabulary, and CSS Custom Highlight API **highlights**. 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), **interval**, **clamp**, and **lifecycle `state`** leaves.
|
|
144
|
+
- **Reports** _(opt-in)_ — `@ponchia/ui/css/report-kit.css` for a complete static/PDF report vocabulary, or `@ponchia/ui/css/report.css` plus only the leaves a narrow report uses. Covers, decisions, claims, sections, severity-labelled findings, evidence packets, evidence ledgers, action registers, source-card bindings, `ui-figure` composition, intervals, bounded excerpts, chart wrappers and print utilities.
|
|
130
145
|
- **Motion & dots** — the dot-matrix motif kit: dot grid, status dots, dot loaders, the orbital spinner, matrix reveal — all reduced-motion aware.
|
|
131
|
-
- **Glyphs** — `@ponchia/ui/glyphs`, a
|
|
146
|
+
- **Glyphs** — `@ponchia/ui/glyphs`, a 71-glyph dot-matrix icon set on the `.ui-dotmatrix` primitive (display marks + crisp `solid` inline icons + one-node `.ui-icon` mask rendering).
|
|
132
147
|
- **Colorways** _(opt-in)_ — `data-bronto-skin="amber-crt | phosphor-green | e-ink"`: a root-level recolour of the one accent (OKLCH, per-theme, contrast-gated), never in the default bundle.
|
|
133
148
|
- **Data-viz** _(opt-in)_ — a colourblind-safe chart palette (`--chart-*` + dot-matrix pattern fills, resolved hex in `charts.json`), gated under simulated protan/deutan/tritan vision. Charts only, never UI chrome.
|
|
134
149
|
|
|
@@ -136,13 +151,17 @@ Full generated catalog of every class: **[docs/reference.md](https://github.com/
|
|
|
136
151
|
|
|
137
152
|
## Theming: one knob
|
|
138
153
|
|
|
139
|
-
Everything accent-colored derives from a single `--accent` variable via `color-mix()`. Re-brand the entire app — both light and dark — with
|
|
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:
|
|
140
155
|
|
|
141
156
|
```css
|
|
142
157
|
:root { --accent: #2f6df6; } /* whole app blue */
|
|
143
|
-
.promo { --accent: #16a34a; } /* …or just this section green */
|
|
144
158
|
```
|
|
145
159
|
|
|
160
|
+
Scoped `--accent` overrides recolor direct accent uses in that subtree, but the
|
|
161
|
+
derived family (`--accent-text`, `--accent-soft`, focus/dot/ramp tokens) is a
|
|
162
|
+
root-level skin contract. Use the full per-theme recipe in
|
|
163
|
+
[`docs/theming.md`](docs/theming.md) for production rebrands.
|
|
164
|
+
|
|
146
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**.
|
|
147
166
|
|
|
148
167
|
**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)**.
|
|
@@ -155,7 +174,7 @@ Not an afterthought — a gate. Every contractual token pairing has a declared W
|
|
|
155
174
|
|
|
156
175
|
## Works with anything
|
|
157
176
|
|
|
158
|
-
The CSS is the framework, so it works with React, Svelte/SvelteKit, Astro, Vue, Solid, Qwik or plain HTML — there's no component runtime to adopt. The optional `classes` and `behaviors` entrypoints pull in **no** UI framework and are SSR-safe. For React, Solid and Qwik there are also **optional thin bindings** — `@ponchia/ui/react`, `@ponchia/ui/solid` and `@ponchia/ui/qwik` wrap the behaviors as hooks (`useDialog`, `useToast`, …); `react`/`solid-js`/`@builder.io/qwik` are optional peer deps,
|
|
177
|
+
The CSS is the framework, so it works with React, Svelte/SvelteKit, Astro, Vue, Solid, Qwik or plain HTML — there's no component runtime to adopt. The optional `classes` and `behaviors` entrypoints pull in **no** UI framework and are SSR-safe. For React, Solid and Qwik there are also **optional thin bindings** — `@ponchia/ui/react`, `@ponchia/ui/solid` and `@ponchia/ui/qwik` wrap the behaviors as hooks (`useDialog`, `useToast`, …); `react`/`solid-js`/`@builder.io/qwik` are optional peer deps. Svelte and Vue get dependency-free lifecycle adapters too: `@ponchia/ui/svelte` exports actions, and `@ponchia/ui/vue` exports directives/plugin helpers over the same behavior layer.
|
|
159
178
|
|
|
160
179
|
Per-framework getting-started guides + runnable example apps live in the repo:
|
|
161
180
|
|
|
@@ -164,16 +183,17 @@ Per-framework getting-started guides + runnable example apps live in the repo:
|
|
|
164
183
|
| Vanilla / Vite / plain HTML | [vanilla.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/vanilla.md) | [`examples/vanilla-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/vanilla-vite) |
|
|
165
184
|
| Astro | [astro.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/astro.md) | [`examples/astro`](https://github.com/Ponchia/bronto-ui/tree/main/examples/astro) |
|
|
166
185
|
| SvelteKit | [sveltekit.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/sveltekit.md) | [`examples/sveltekit`](https://github.com/Ponchia/bronto-ui/tree/main/examples/sveltekit) |
|
|
186
|
+
| Vue | [vue.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/vue.md) | [`examples/vue-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/vue-vite) |
|
|
167
187
|
| React | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/react-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/react-vite) |
|
|
168
188
|
| Solid | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/solid-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/solid-vite) |
|
|
169
189
|
| Qwik | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/qwik-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/qwik-vite) |
|
|
170
|
-
| Tailwind / cascade-layer interop | [tailwind.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/interop/tailwind.md) |
|
|
190
|
+
| Tailwind v4 bridge / cascade-layer interop | [tailwind.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/interop/tailwind.md) | [`examples/tailwind-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/tailwind-vite) |
|
|
171
191
|
|
|
172
192
|
## Extras
|
|
173
193
|
|
|
174
|
-
- **Tokens as data** — `import tokens, { themeColor, cssVars } from '@ponchia/ui/tokens'` (plus `tokens.json`, W3C DTCG `tokens.dtcg.json`,
|
|
194
|
+
- **Tokens as data** — `import tokens, { themeColor, cssVars } from '@ponchia/ui/tokens'` (plus `tokens.json`, W3C DTCG `tokens.dtcg.json`, `tokens/resolved.json` for concrete values in canvas/SVG/MapLibre, and `tokens/figma.variables.json` for local Figma Variables import/sync scripts).
|
|
175
195
|
- **Chart colours for dashboards** — `import charts from '@ponchia/ui/charts.json' with { type: 'json' }` in Node ESM, or the same path through a bundler JSON import (resolved hex per theme; series 1 = your accent) plus the opt-in `@ponchia/ui/css/dataviz.css`.
|
|
176
|
-
- **Static reports for LLMs** — add `@ponchia/ui/css/report.css` for
|
|
196
|
+
- **Static reports for LLMs** — add `@ponchia/ui/css/report-kit.css` for the complete report vocabulary, or `@ponchia/ui/css/report.css` plus the specific leaves a smaller report needs. Sidecar claim/source contracts can validate against `@ponchia/ui/schemas/report-claims.v1.schema.json`. Full cookbook: `docs/reporting.md`.
|
|
177
197
|
- **Modern-platform motion** — overlays (modal/drawer/popover), toasts and the `<details>` accordion animate **in and out** with zero JS (`@starting-style` + `allow-discrete`, `::details-content` + `interpolate-size`). Progressive-enhancement extras: `.ui-scroll-progress` / `.ui-scroll-reveal` (scroll-driven, no JS) and `.ui-vt` for View Transitions. All degrade to a static end-state and respect `prefers-reduced-motion`. For smooth **cross-document** navigations, add the document-global one-liner to your own top-level (unlayered) CSS: `@view-transition { navigation: auto; }`.
|
|
178
198
|
- **Editor IntelliSense** — point VS Code at the shipped custom-data file so every token autocompletes in `var(--…)`:
|
|
179
199
|
```json
|
|
@@ -181,7 +201,7 @@ Per-framework getting-started guides + runnable example apps live in the repo:
|
|
|
181
201
|
```
|
|
182
202
|
- **For AI coding agents** — the package ships `llms.txt` at its root plus `docs/reference.md`, `docs/usage.md`, `docs/reporting.md`, `docs/theming.md`, `docs/contrast.md`, `docs/stability.md`, `docs/package-contract.md`, the color constitution `docs/adr/0001-color-system.md` and the `CHANGELOG` inside the tarball, so an offline agent has the full API and rationale without guessing.
|
|
183
203
|
|
|
184
|
-
> The package root is **CSS-only**. Use `@import '@ponchia/ui'` in CSS, or `import '@ponchia/ui'` only as a CSS side-effect import in a CSS-aware bundler (Vite, Astro, SvelteKit, webpack). Do not import the package root from Node/runtime JS. JS entrypoints are explicit subpaths: `/tokens`, `/classes`, `/behaviors`, `/glyphs`, `/react`, `/solid`, `/qwik`, `/skins`, and `/
|
|
204
|
+
> The package root is **CSS-only**. Use `@import '@ponchia/ui'` in CSS, or `import '@ponchia/ui'` only as a CSS side-effect import in a CSS-aware bundler (Vite, Astro, SvelteKit, webpack). Do not import the package root from Node/runtime JS. CSS helper subpaths are explicit too, including `/tailwind` for the Tailwind v4 theme/variant bridge. JS entrypoints are explicit subpaths: `/tokens`, `/classes`, `/behaviors`, `/glyphs`, `/annotations`, `/connectors`, `/react`, `/solid`, `/qwik`, `/svelte`, `/vue`, `/skins`, `/charts`, `/mermaid`, `/d2`, and `/vega`.
|
|
185
205
|
> JS subpaths are **ESM-only**. CommonJS consumers should use dynamic
|
|
186
206
|
> `import('@ponchia/ui/behaviors')`.
|
|
187
207
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["carousel.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,CA0K3C"}
|
package/behaviors/carousel.js
CHANGED
|
@@ -74,6 +74,9 @@ export function initCarousel({ root } = {}) {
|
|
|
74
74
|
if (!b) continue;
|
|
75
75
|
if (b.tagName === 'BUTTON' && !b.hasAttribute('type')) b.type = 'button';
|
|
76
76
|
}
|
|
77
|
+
for (const b of thumbs) {
|
|
78
|
+
if (b.tagName === 'BUTTON' && !b.hasAttribute('type')) b.type = 'button';
|
|
79
|
+
}
|
|
77
80
|
if (prevBtn && !prevBtn.hasAttribute('aria-label'))
|
|
78
81
|
prevBtn.setAttribute('aria-label', 'Previous');
|
|
79
82
|
if (nextBtn && !nextBtn.hasAttribute('aria-label')) nextBtn.setAttribute('aria-label', 'Next');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["dialog.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["dialog.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,CAgE3C"}
|
package/behaviors/dialog.js
CHANGED
|
@@ -23,19 +23,19 @@ export function initDialog({ root } = {}) {
|
|
|
23
23
|
const host = resolveHost(root);
|
|
24
24
|
if (!host) return noop;
|
|
25
25
|
const managedDialogs = new WeakSet();
|
|
26
|
+
const focusRestorers = new Map();
|
|
26
27
|
const canManageDialog = (dlg, origin) => host.contains(origin) || managedDialogs.has(dlg);
|
|
27
28
|
|
|
28
29
|
const openFrom = (opener) => {
|
|
29
30
|
const dlg = byIdInHost(host, opener.getAttribute('data-bronto-open'));
|
|
30
31
|
if (!dlg || typeof dlg.showModal !== 'function' || dlg.open) return;
|
|
31
32
|
managedDialogs.add(dlg);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
()
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
);
|
|
33
|
+
const restoreFocus = () => {
|
|
34
|
+
focusRestorers.delete(dlg);
|
|
35
|
+
if (opener.isConnected && typeof opener.focus === 'function') opener.focus();
|
|
36
|
+
};
|
|
37
|
+
focusRestorers.set(dlg, restoreFocus);
|
|
38
|
+
dlg.addEventListener('close', restoreFocus, { once: true });
|
|
39
39
|
dlg.showModal();
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -72,6 +72,12 @@ export function initDialog({ root } = {}) {
|
|
|
72
72
|
};
|
|
73
73
|
return bindOnce(host, 'dialog', () => {
|
|
74
74
|
document.addEventListener('click', onClick);
|
|
75
|
-
return () =>
|
|
75
|
+
return () => {
|
|
76
|
+
document.removeEventListener('click', onClick);
|
|
77
|
+
for (const [dlg, restoreFocus] of focusRestorers) {
|
|
78
|
+
dlg.removeEventListener('close', restoreFocus);
|
|
79
|
+
}
|
|
80
|
+
focusRestorers.clear();
|
|
81
|
+
};
|
|
76
82
|
});
|
|
77
83
|
}
|
package/behaviors/forms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["forms.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8CAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["forms.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8CAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,CAmL3C"}
|
package/behaviors/forms.js
CHANGED
|
@@ -29,6 +29,12 @@ export function initFormValidation({ root } = {}) {
|
|
|
29
29
|
if (!hasDom()) return noop;
|
|
30
30
|
const host = resolveHost(root);
|
|
31
31
|
if (!host) return noop;
|
|
32
|
+
let priorNoValidate = new Map();
|
|
33
|
+
|
|
34
|
+
const suppressNativeValidation = (form) => {
|
|
35
|
+
if (!priorNoValidate.has(form)) priorNoValidate.set(form, form.noValidate);
|
|
36
|
+
form.noValidate = true;
|
|
37
|
+
};
|
|
32
38
|
|
|
33
39
|
const ensureId = (el, prefix) => {
|
|
34
40
|
if (!el.id) el.id = `${prefix}-${nextFieldUid()}`;
|
|
@@ -150,7 +156,7 @@ export function initFormValidation({ root } = {}) {
|
|
|
150
156
|
const onSubmit = (e) => {
|
|
151
157
|
const form = e.target.closest?.('[data-bronto-validate]');
|
|
152
158
|
if (!form) return;
|
|
153
|
-
form
|
|
159
|
+
suppressNativeValidation(form);
|
|
154
160
|
const invalid = controlsOf(form).filter((c) => !validateField(c));
|
|
155
161
|
refreshSummary(form, invalid);
|
|
156
162
|
if (invalid.length) {
|
|
@@ -165,7 +171,7 @@ export function initFormValidation({ root } = {}) {
|
|
|
165
171
|
if (!control.willValidate) return;
|
|
166
172
|
const form = control.closest?.('[data-bronto-validate]');
|
|
167
173
|
if (!form) return;
|
|
168
|
-
form
|
|
174
|
+
suppressNativeValidation(form);
|
|
169
175
|
validateField(control);
|
|
170
176
|
const summary = form.querySelector('[data-bronto-error-summary]');
|
|
171
177
|
if (summary && !summary.hidden)
|
|
@@ -183,10 +189,9 @@ export function initFormValidation({ root } = {}) {
|
|
|
183
189
|
// summary — contradicting the documented contract. (Forms added
|
|
184
190
|
// after init are still covered by the in-handler set.)
|
|
185
191
|
const forms = collectHosts(host, '[data-bronto-validate]');
|
|
186
|
-
|
|
192
|
+
priorNoValidate = new Map();
|
|
187
193
|
for (const f of forms) {
|
|
188
|
-
|
|
189
|
-
f.noValidate = true;
|
|
194
|
+
suppressNativeValidation(f);
|
|
190
195
|
}
|
|
191
196
|
host.addEventListener('submit', onSubmit, true);
|
|
192
197
|
host.addEventListener('focusout', onBlur);
|
|
@@ -194,6 +199,7 @@ export function initFormValidation({ root } = {}) {
|
|
|
194
199
|
host.removeEventListener('submit', onSubmit, true);
|
|
195
200
|
host.removeEventListener('focusout', onBlur);
|
|
196
201
|
for (const [f, v] of priorNoValidate) f.noValidate = v;
|
|
202
|
+
priorNoValidate.clear();
|
|
197
203
|
};
|
|
198
204
|
});
|
|
199
205
|
}
|
package/behaviors/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { initSpotlight } from "./spotlight.js";
|
|
|
18
18
|
export { initCrosshair } from "./crosshair.js";
|
|
19
19
|
export { initCommand } from "./command.js";
|
|
20
20
|
export { initSources } from "./sources.js";
|
|
21
|
+
export { initSplitter } from "./splitter.js";
|
|
21
22
|
export type Cleanup = import("./internal.js").Cleanup;
|
|
22
23
|
export type DelegateOpts = import("./internal.js").DelegateOpts;
|
|
23
24
|
export type ThemeStorageOpts = import("./theme.js").ThemeStorageOpts;
|
|
@@ -29,5 +30,6 @@ export type LegendToggleDetail = import("./legend.js").LegendToggleDetail;
|
|
|
29
30
|
export type CrosshairMoveDetail = import("./crosshair.js").CrosshairMoveDetail;
|
|
30
31
|
export type CommandSelectDetail = import("./command.js").CommandSelectDetail;
|
|
31
32
|
export type SourceFocusDetail = import("./sources.js").SourceFocusDetail;
|
|
33
|
+
export type SplitterResizeDetail = import("./splitter.js").SplitterResizeDetail;
|
|
32
34
|
export { applyStoredTheme, initThemeToggle } from "./theme.js";
|
|
33
35
|
//# sourceMappingURL=index.d.ts.map
|
package/behaviors/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;sBAmBa,OAAO,eAAe,EAAE,OAAO;2BAC/B,OAAO,eAAe,EAAE,YAAY;+BACpC,OAAO,YAAY,EAAE,gBAAgB;6BACrC,OAAO,YAAY,EAAE,cAAc;gCACnC,OAAO,YAAY,EAAE,iBAAiB;wBACtC,OAAO,YAAY,EAAE,SAAS;+BAC9B,OAAO,YAAY,EAAE,gBAAgB;iCACrC,OAAO,aAAa,EAAE,kBAAkB;kCACxC,OAAO,gBAAgB,EAAE,mBAAmB;kCAC5C,OAAO,cAAc,EAAE,mBAAmB;gCAC1C,OAAO,cAAc,EAAE,iBAAiB;mCACxC,OAAO,eAAe,EAAE,oBAAoB"}
|
package/behaviors/index.js
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
* @typedef {import('./crosshair.js').CrosshairMoveDetail} CrosshairMoveDetail
|
|
29
29
|
* @typedef {import('./command.js').CommandSelectDetail} CommandSelectDetail
|
|
30
30
|
* @typedef {import('./sources.js').SourceFocusDetail} SourceFocusDetail
|
|
31
|
+
* @typedef {import('./splitter.js').SplitterResizeDetail} SplitterResizeDetail
|
|
31
32
|
*/
|
|
32
33
|
export { applyStoredTheme, initThemeToggle } from './theme.js';
|
|
33
34
|
export { dismissible } from './dismissible.js';
|
|
@@ -50,3 +51,4 @@ export { initSpotlight } from './spotlight.js';
|
|
|
50
51
|
export { initCrosshair } from './crosshair.js';
|
|
51
52
|
export { initCommand } from './command.js';
|
|
52
53
|
export { initSources } from './sources.js';
|
|
54
|
+
export { initSplitter } from './splitter.js';
|
package/behaviors/internal.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export type Cleanup = () => void;
|
|
|
19
19
|
export type DelegateOpts = {
|
|
20
20
|
/**
|
|
21
21
|
* Event-delegation root; also scopes which controls are queried. Default: `document`.
|
|
22
|
+
* `null` means a scope was requested but is not ready yet, so the behavior no-ops.
|
|
22
23
|
*/
|
|
23
|
-
root?: Document | Element | undefined;
|
|
24
|
+
root?: Document | Element | null | undefined;
|
|
24
25
|
};
|
|
25
26
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["internal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["internal.js"],"names":[],"mappings":"AAiDA,iEAIC;AAeD,sEAUC;AAED,oDAQC;AAED,yDAMC;AAMD,8DAIC;AAID;;SAMC;AAUD,gDAQC;AAMD,+DAKC;AAjIM,6BAAqB;AAErB,kCAAoD;AAyCpD,uCAAqC;;;;;sBArD/B,MAAM,IAAI"}
|
package/behaviors/internal.js
CHANGED
|
@@ -9,16 +9,34 @@
|
|
|
9
9
|
* behavior's listeners/observers.
|
|
10
10
|
*
|
|
11
11
|
* @typedef {object} DelegateOpts
|
|
12
|
-
* @property {Document | Element} [root]
|
|
12
|
+
* @property {Document | Element | null} [root]
|
|
13
13
|
* Event-delegation root; also scopes which controls are queried. Default: `document`.
|
|
14
|
+
* `null` means a scope was requested but is not ready yet, so the behavior no-ops.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
export const noop = () => {};
|
|
17
18
|
|
|
18
19
|
export const hasDom = () => typeof document !== 'undefined';
|
|
19
20
|
|
|
21
|
+
function isDelegationHost(value) {
|
|
22
|
+
if (!value || typeof value !== 'object') return false;
|
|
23
|
+
if (value.nodeType === 9) {
|
|
24
|
+
return (
|
|
25
|
+
typeof value.addEventListener === 'function' && typeof value.querySelectorAll === 'function'
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
if (value.nodeType === 1) {
|
|
29
|
+
return (
|
|
30
|
+
typeof value.addEventListener === 'function' &&
|
|
31
|
+
typeof value.matches === 'function' &&
|
|
32
|
+
typeof value.querySelectorAll === 'function'
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
// Resolve the delegation host from an init call's `root` option, distinguishing
|
|
21
|
-
//
|
|
39
|
+
// cases so an unattached/null root never silently widens to whole-document
|
|
22
40
|
// delegation (the "scoped island hijacks every control" foot-gun):
|
|
23
41
|
// • root absent/undefined → no scope requested → delegate from `fallback`
|
|
24
42
|
// (default `document`). This is the intended global-wiring path.
|
|
@@ -26,11 +44,13 @@ export const hasDom = () => typeof document !== 'undefined';
|
|
|
26
44
|
// framework ref still null at mount). Return null so the caller no-ops
|
|
27
45
|
// instead of hijacking the whole document.
|
|
28
46
|
// • root is an element → use it.
|
|
47
|
+
// • root is anything else → no-op; the public contract is Document | Element.
|
|
29
48
|
// The bindings (@ponchia/ui/{react,solid,qwik}) emit `root: null` for the
|
|
30
49
|
// not-ready case precisely so this distinction survives across the boundary.
|
|
31
50
|
export function resolveHost(root, fallback = document) {
|
|
32
51
|
if (root === null) return null;
|
|
33
|
-
|
|
52
|
+
if (root === undefined) return isDelegationHost(fallback) ? fallback : null;
|
|
53
|
+
return isDelegationHost(root) ? root : null;
|
|
34
54
|
}
|
|
35
55
|
|
|
36
56
|
// Monotonic counter for auto-minted field / list ids, shared across
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["legend.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["legend.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAHW,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,eAAe,EAAE,OAAO,CAmF3C;;;;;YAvGa,MAAM,GAAG,MAAM;;;;YACf,OAAO"}
|