@ponchia/ui 0.6.8 → 0.6.10
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 +79 -4
- package/README.md +2 -2
- package/annotations/index.d.ts.map +1 -1
- package/annotations/index.js +5 -6
- package/behaviors/carousel.d.ts.map +1 -1
- package/behaviors/carousel.js +100 -60
- package/behaviors/combobox.d.ts.map +1 -1
- package/behaviors/combobox.js +167 -113
- package/behaviors/connectors.d.ts.map +1 -1
- package/behaviors/connectors.js +39 -23
- package/behaviors/forms.d.ts.map +1 -1
- package/behaviors/forms.js +211 -207
- package/behaviors/glyph.d.ts.map +1 -1
- package/behaviors/glyph.js +157 -132
- package/behaviors/inert.d.ts +1 -1
- package/behaviors/inert.d.ts.map +1 -1
- package/behaviors/inert.js +1 -1
- package/behaviors/internal.js +2 -2
- package/behaviors/modal.js +1 -1
- package/behaviors/popover.js +5 -5
- package/behaviors/table.d.ts +1 -1
- package/behaviors/table.d.ts.map +1 -1
- package/behaviors/table.js +7 -8
- package/behaviors/tabs.js +2 -2
- package/behaviors/toast.js +5 -5
- package/classes/classes.json +33 -2
- package/classes/index.d.ts +10 -0
- package/classes/index.js +59 -35
- package/connectors/index.d.ts +2 -2
- package/connectors/index.d.ts.map +1 -1
- package/connectors/index.js +7 -10
- package/css/app.css +3 -4
- package/css/base.css +1 -1
- package/css/content.css +3 -3
- package/css/disclosure.css +3 -3
- package/css/dots.css +4 -4
- package/css/feedback.css +6 -7
- package/css/forms.css +9 -12
- package/css/legend.css +1 -1
- package/css/marks.css +1 -1
- package/css/motion.css +6 -6
- package/css/overlay.css +5 -7
- package/css/primitives.css +14 -16
- package/css/sidenote.css +2 -2
- package/css/table.css +2 -2
- package/css/workbench.css +128 -0
- package/dist/css/workbench.css +1 -1
- package/docs/annotations.md +36 -0
- package/docs/architecture.md +28 -0
- package/docs/interop/react-flow.md +89 -0
- package/docs/package-contract.md +2 -0
- package/docs/reference.md +21 -1
- package/docs/reporting.md +8 -8
- package/docs/stability.md +67 -7
- package/docs/workbench.md +56 -9
- package/glyphs/glyphs.js +43 -33
- package/llms.txt +10 -4
- package/package.json +5 -2
- package/schemas/report-claims.v1.schema.json +1 -1
- package/tokens/index.js +2 -2
package/docs/stability.md
CHANGED
|
@@ -11,28 +11,75 @@ For the exhaustive package-manifest inventory — every `exports` key, every
|
|
|
11
11
|
shipped `files` entry, and the generated artifact provenance map — see
|
|
12
12
|
[package-contract.md](./package-contract.md).
|
|
13
13
|
|
|
14
|
+
## Path To 1.0
|
|
15
|
+
|
|
16
|
+
`1.0.0` is a stability declaration, not a catalog milestone. The package is
|
|
17
|
+
ready for 1.0 when the existing public contract is boring to upgrade:
|
|
18
|
+
|
|
19
|
+
- **Core boundary settled.** The default bundle contains shared app/service
|
|
20
|
+
identity only. Report, analytical, provenance, generated-content, renderer,
|
|
21
|
+
workbench, and command surfaces remain opt-in unless they solve universal
|
|
22
|
+
application chrome.
|
|
23
|
+
- **Refusal list enforced by review.** The package still refuses chart scales,
|
|
24
|
+
data fetching, persistence, routing, workflow execution, global action
|
|
25
|
+
registries, virtualized grids, framework component APIs, theme marketplaces,
|
|
26
|
+
and second-accent visual systems.
|
|
27
|
+
- **Consumer proof is routine.** Packed tarball checks, packed example builds,
|
|
28
|
+
packed TypeScript resolution, and at least one real downstream upgrade prove
|
|
29
|
+
each release candidate; source-tree checks are not treated as enough.
|
|
30
|
+
- **Generated contracts stay registry-backed.** Exports, shipped docs, CSS
|
|
31
|
+
leaves, examples, generated artifacts, visual baselines, and ownership
|
|
32
|
+
matrices derive from shared local registries wherever possible.
|
|
33
|
+
- **Bundle budget has headroom.** The default CSS bundle and tarball size have
|
|
34
|
+
deliberate margin, or any budget increase is explicit in the changelog.
|
|
35
|
+
- **Deprecation history is clean.** Every breaking change has a changelog note,
|
|
36
|
+
migration entry when machine-actionable, and the deprecate-one-minor policy
|
|
37
|
+
has been followed or explicitly exempted for provably-unreferenced surface.
|
|
38
|
+
|
|
39
|
+
### 1.0 Readiness Ledger
|
|
40
|
+
|
|
41
|
+
This ledger is the release-candidate checklist. A row is ready only when the
|
|
42
|
+
evidence column is green for the candidate commit; prose approval alone is not
|
|
43
|
+
enough.
|
|
44
|
+
|
|
45
|
+
| Criterion | Current evidence | 1.0 bar |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| Core boundary settled | `check:exports`, `check:dist`, `check:component-matrix`, `check:report`, and the `CORE_BUNDLE` registry keep default CSS, opt-in leaves, and report/analytical surfaces separate. | No unexplained growth in the default bundle; any move from opt-in to core is called out in `CHANGELOG.md`. |
|
|
48
|
+
| Refusal list enforced by review | `test/analytical-boundary.test.mjs`, `check:contract`, `check:behavior-matrix`, `check:helper-matrix`, and review against `docs/architecture.md` keep scales, routing, persistence, workflow execution, global action registries, and framework component APIs out of package-owned behavior. | No public helper, behavior, or doc implies Bronto owns application state, data, routing, workflow execution, or framework component rendering. |
|
|
49
|
+
| Consumer proof is routine | `check:pack`, `check:consumer-surface`, `check:consumer-types`, `check:examples`, `check:publint`, and `check:attw` prove the packed npm artifact before release; the release process requires a public-safe Release evidence note. | Every 1.0 candidate has packed import/type/example proof plus at least one real downstream upgrade note that names the consumer class, imported surface, and result without leaking private repo or product names. |
|
|
50
|
+
| Generated contracts stay registry-backed | `check:fresh`, `check:classes`, `check:dts-emit`, `check:doc-links`, `check:public-metadata`, `check:public-hygiene`, and the matrix gates prove generated artifacts, shipped docs, public hygiene, and ownership maps do not drift. | New public surface has one registry/source of truth before it gets a hand-authored gate row. |
|
|
51
|
+
| Bundle budget has headroom | `check:dist`, `check:public-metadata`, `check:pack`, and the README size badge keep default bundle and tarball claims visible. | Budget increases are intentional, reviewed, and named in `CHANGELOG.md`; accidental growth fails before release. |
|
|
52
|
+
| Deprecation history is clean | `check:migrations`, `check:release`, `check:versions`, `MIGRATIONS.json`, and this deprecation policy tie breaking changes to changelog and migration evidence. | No removal ships without either a deprecate-one-minor trail or an explicit BREAKING note for provably-unreferenced surface. |
|
|
53
|
+
|
|
54
|
+
After 1.0, breaking changes move to majors. Until then, the table below is the
|
|
55
|
+
current public-surface matrix and the release policy above still applies.
|
|
56
|
+
|
|
14
57
|
| Surface | Stability | Contract |
|
|
15
58
|
| --- | --- | --- |
|
|
16
59
|
| CSS package root (`@ponchia/ui`) | Stable | CSS-only entrypoint. CSS side-effect imports are supported in CSS-aware bundlers; Node/runtime JS root imports are not. |
|
|
17
60
|
| JS module format | Stable | JS subpaths are ESM-only. CommonJS consumers use dynamic `import()`. |
|
|
18
61
|
| CSS class names (`.ui-*`) | Stable | Names and documented modifier semantics are public. Internal selector structure and leaf-file boundaries may change. |
|
|
19
62
|
| Class recipes (`@ponchia/ui/classes`) | Stable | Exported `cls`, `ui`, `cx`, `attrs`, recipe names, ARIA attribute helper names, and option unions are public. |
|
|
20
|
-
| Class vocabulary as data (`@ponchia/ui/classes.json`) | Stable additive | The JSON shape (`groups`/`classes`/`states`/`customProperties`) and
|
|
63
|
+
| Class vocabulary as data (`@ponchia/ui/classes.json`, `@ponchia/ui/vscode.css-custom-data.json`) | Stable additive | The JSON shape (`groups`/`classes`/`states`/`customProperties`) and class/custom-property entries are public — for validating markup from a non-JS/non-TS host or editor integration. Generated from `cls` and CSS selectors; `classes.json`, `.d.ts`, reference docs, and VS Code custom data are drift-checked together. New classes/hooks are additive. |
|
|
21
64
|
| Design tokens | Stable names/roles | Token names and documented roles are public. Exact values and generated colour math outputs may change for visual tuning before 1.0. |
|
|
22
65
|
| `--accent-1..6` | Stable names/roles | A subtle-to-bold accent ramp derived from `--accent`. Exact resolved values are visual tuning; algorithm changes require release-note visibility and resolver/browser checks. |
|
|
23
|
-
| Tokens as data (`tokens.json`, `tokens.dtcg.json`, `tokens/resolved.json`) | Stable additive | The JSON shapes are public for non-CSS/non-JS consumers. `resolved.json` exposes `light`/`dark` (resolved colours) and `scale` (resolved non-colour scales). Token names/roles are stable; exact resolved values are visual tuning (pin `~0.x`). |
|
|
24
|
-
| Schemas (`schemas/*.schema.json`) | Stable additive | Declarative JSON Schema contracts for package-adjacent tooling data. Existing schema files and enum values are public within a compatible minor; new optional properties and new schema files are additive. No validator runtime ships. |
|
|
66
|
+
| Tokens as data (`tokens.json`, `tokens.dtcg.json`, `tokens/resolved.json`, `tokens/figma.variables.json`) | Stable additive | The JSON shapes are public for non-CSS/non-JS consumers and handoff tooling. `resolved.json` exposes `light`/`dark` (resolved colours) and `scale` (resolved non-colour scales). `tokens/figma.variables.json` mirrors the token contract for local Figma Variables import/sync. Token names/roles are stable; exact resolved values are visual tuning (pin `~0.x`). |
|
|
67
|
+
| Schemas (`schemas/*.schema.json`, `schemas/report-claims.v1.schema.json`) | Stable additive | Declarative JSON Schema contracts for package-adjacent tooling data. Existing schema files and enum values are public within a compatible minor; new optional properties and new schema files are additive. No validator runtime ships. |
|
|
25
68
|
| Theme axes | Mixed | `data-theme` (light/dark) is the **contractual** base. `data-surface="oled"`, `data-density`, and `data-contrast` are **convenience presets** — best-effort visual variants, **not** part of the stability contract; their presence and exact values may change for tuning. Computed-style smoke tests guard that the presets apply to their intended token families. |
|
|
69
|
+
| Tailwind v4 bridge (`@ponchia/ui/tailwind`, `@ponchia/ui/tailwind.css`) | Stable additive | CSS-only token/variant bridge for Tailwind v4. It maps Bronto tokens and variants into Tailwind namespaces; it must not import Bronto component CSS or change the default bundle. |
|
|
26
70
|
| Behavior attributes (`data-bronto-*`) | Stable | Attribute names and documented markup relationships are public. Behavior internals are not. |
|
|
27
71
|
| Behavior functions (`@ponchia/ui/behaviors`) | Stable | Exported function names, option names, custom events, SSR no-op behavior, idempotency, and cleanup-returning contract are public. |
|
|
28
72
|
| Glyph registry/renderers (`@ponchia/ui/glyphs`) | Stable additive | Existing glyph names stay valid. New glyphs are additive. Renderer option names and accessibility defaults are public. |
|
|
29
73
|
| `.ui-icon` mask renderer | Stable | Class name, `--icon-size`, currentColor inheritance, and `--icon-mask` contract are public. The internal data URL encoding is not. |
|
|
30
74
|
| Framework lifecycle adapters (`react`/`solid`/`qwik`/`svelte`/`vue`) | Stable thin adapters | Hook/action/directive names, optional peer behavior where applicable, root ref/signal/resolver support, and cleanup lifecycle are public. They remain wrappers over vanilla behaviors, not component APIs. |
|
|
31
|
-
| Skins (`@ponchia/ui/skins`, `css/skins.css`) | Stable additive | Existing skin names stay valid. New skins are additive. Skins are root-level choices. |
|
|
32
|
-
| Charts (`@ponchia/ui/charts`, `charts.json`, `css/dataviz.css`) | Stable additive | Token names, JSON shape, and 8 categorical slots are public. Exact palette values may tune if gates and release notes justify it. |
|
|
75
|
+
| Skins (`@ponchia/ui/skins`, `css/skins.css`) | Stable additive | Existing skin names stay valid. New skins are additive. Skins are root-level choices. Skin CSS is opt-in, not in the default bundle. |
|
|
76
|
+
| Charts (`@ponchia/ui/charts`, `charts.json`, `css/dataviz.css`) | Stable additive | Token names, JSON shape, and 8 categorical slots are public. `css/dataviz.css` is opt-in, not in the default bundle. Exact palette values may tune if gates and release notes justify it. |
|
|
77
|
+
| External renderer themes (`@ponchia/ui/mermaid`, `@ponchia/ui/mermaid.json`, `@ponchia/ui/d2`, `@ponchia/ui/d2.json`, `@ponchia/ui/vega`, `@ponchia/ui/vega.json`) | Stable additive | Theme helper names, JSON shapes, and supported renderer theme slots are public. Values are resolved colours because Mermaid, D2, and Vega cannot consume Bronto CSS variables directly. Exact colours may tune with token changes, but `check:mermaid`, `check:d2`, and `check:vega` must prove every exported theme resolves with no `var()` leaks. No renderer runtime ships. |
|
|
78
|
+
| Shiki theme data (`@ponchia/ui/shiki/nothing.json`) | Stable additive | The bundled Shiki theme JSON shape and token-derived scope roles are public for syntax-highlighting consumers. Exact colours may tune with the token model and must stay generated from the governed palette. |
|
|
33
79
|
| Reports (`css/report.css`, `.ui-report*`, print utilities) | Stable additive | Report class names, BEM part names, and print utility names are public. Report CSS is opt-in and not imported by the default bundle. The data key now lives in the standalone Legends layer (below), not `css/report.css`; charting is via the Vega theme target (`@ponchia/ui/vega`, see [vega](./vega.md)) or a token-themed inline SVG, not a shipped renderer. |
|
|
34
80
|
| Report kit roll-up (`css/report-kit.css`) | Stable additive | A convenience `@import` of the complete static-report vocabulary. The set of leaves it bundles may grow additively; each leaf also stays individually exported. Opt-in, not in the default bundle. |
|
|
35
|
-
|
|
|
81
|
+
| Figure stage (`css/figure.css`, `.ui-figure*`) | Stable additive | Figure class names, overlay/key/fallback-data slots, and report composition hooks are public. Opt-in, not in the default bundle. Bronto owns the figure frame, not chart rendering, scales, or data mapping. |
|
|
82
|
+
| Annotations (`@ponchia/ui/annotations`, `css/annotations.css`, `.ui-annotation*`) | Stable additive | SVG annotation class names, recipe option names, and helper function names are public. Helper internals and exact path-control heuristics may tune before 1.0. Opt-in, not in the default bundle. Rich placement, renderer, editing, and chart/diagram adapter APIs belong to the sibling `@ponchia/annotations` package; `@ponchia/ui` does not depend on it at runtime or through public declarations. |
|
|
36
83
|
| Legends (`css/legend.css`, `.ui-legend*`, `@ponchia/ui/behaviors` `initLegend`) | Stable additive | Legend class names, recipe option names, and the `bronto:legend:toggle` event contract (`aria-pressed="true"` ⇒ shown) are public. Opt-in, not in the default bundle; swatch colours are gated to the `--chart-*` palette. |
|
|
37
84
|
| Marks (`css/marks.css`, `.ui-mark*`, `.ui-bracket-note*`) | Stable additive | Text-mark and bracket-note class names and recipe option names are public. Opt-in, not in the default bundle. Uses semantic tones only. |
|
|
38
85
|
| Connectors (`@ponchia/ui/connectors`, `css/connectors.css`, `.ui-connector*`, `initConnectors`) | Stable additive | Connector class names, the `data-bronto-connector` attribute contract, geometry helper function names, and recipe options are public. Helper internals/heuristics may tune before 1.0. Opt-in, not in the default bundle. |
|
|
@@ -41,13 +88,26 @@ shipped `files` entry, and the generated artifact provenance map — see
|
|
|
41
88
|
| Selection states (`css/selection.css`, `.ui-sel*`) | Stable additive | The `.ui-sel`/`--on`/`--off`/`--maybe` emphasis classes and recipe options are public. Opt-in, cross-cutting. The host owns selection logic; Bronto only styles the states. |
|
|
42
89
|
| Analytical roll-up (`css/analytical.css`) | Stable additive | A convenience `@import` of the nine analytical leaves (figure, annotations, legend, marks, connectors, spotlight, crosshair, selection, highlights). The set of leaves it bundles may grow additively; each leaf also stays individually exported. Opt-in, not in the default bundle. |
|
|
43
90
|
| Sources / provenance (`css/sources.css`, `.ui-citation*`, `.ui-source-card*`, `.ui-source-list*`, `.ui-provenance*`, `.ui-src--*`, `initSources`) | Stable additive | Citation/source/provenance class names, the cross-cutting `.ui-src--*` trust-state modifiers (always paired with an author label), the optional `data-bronto-sources` / `data-bronto-source-ref` behavior contract, `bronto:source:focus`, and the `ui.citation`/`ui.source`/`ui.provenance` recipes + `cls.sourceList` are public. Opt-in, not in the default bundle. |
|
|
91
|
+
| Interval ranges (`css/interval.css`, `.ui-interval*`) | Stable additive | Interval class names and the normalised `--lo`/`--hi`/`--v` custom-property contract are public. Opt-in, not in the default bundle. The host owns domains, units, and estimate math. |
|
|
92
|
+
| Clamp blocks (`css/clamp.css`, `.ui-clamp*`) | Stable additive | Clamp class/part names, expanded/collapsed affordance slots, and print-expansion behavior are public. Opt-in, not in the default bundle. The host owns disclosure copy and state persistence. |
|
|
93
|
+
| Text highlights (`css/highlights.css`, `.ui-highlights`) | Stable additive | Highlight container classes and token-backed Custom Highlight API paint are public. Opt-in, not in the default bundle. The host owns range registration and search/current-match logic. |
|
|
44
94
|
| Lifecycle state (`css/state.css`, `.ui-state*`, `.ui-syncbar`) | Stable additive | The `.ui-state`/`__label`/`__detail`/`--busy` classes, the canonical lifecycle state modifiers, `.ui-syncbar`, and the `ui.state` recipe are public. Opt-in, not in the default bundle. |
|
|
45
95
|
| Generated / AI-trust (`css/generated.css`, `.ui-generated*`, `.ui-origin-label*`, `.ui-reasoning*`, `.ui-tool-log`, `.ui-tool-call*`) | Stable additive | The generated-content, origin-label (incl. `--ai`), reasoning-trace and tool-log/tool-call class names and the `ui.originLabel` recipe are public. Opt-in, not in the default bundle. Not a chat kit; no confidence widget. |
|
|
46
96
|
| Workbench (`css/workbench.css`, `.ui-splitter*`, `.ui-inspector*`, `.ui-property*`, `.ui-selectionbar*`, `initSplitter`) | Stable additive | Splitter, inspector, property-row and selection-bar class + BEM part names are public (no recipe). `data-bronto-splitter`, `--splitter-pos`, `bronto:splitter:resize`, and the `initSplitter` cleanup contract are public. Opt-in, not in the default bundle. The host owns pane content, persistence, collapse policy, and selection state. |
|
|
47
97
|
| Command palette (`css/command.css`, `.ui-command*`, `initCommand`, `useCommand` / `command` / `vCommand`) | Stable additive | Command class/part names, the `data-bronto-command` attribute, and the event contract — `bronto:command:select` (`detail: { value, label }`) and `bronto:command:close` — are public, plus the framework binding adapters. Bronto filters + navigates (APG combobox/listbox); the host owns the action registry/execution. Opt-in, not in the default bundle, no global hotkey. |
|
|
98
|
+
| Spark microcharts (`css/spark.css`, `.ui-spark*`) | Stable additive | Spark class names and inline sizing/label slots are public. Opt-in, not in the default bundle. The host owns data reduction and accessible surrounding text. |
|
|
99
|
+
| Bullet graphs (`css/bullet.css`, `.ui-bullet*`) | Stable additive | Bullet class names and measure/target/range custom-property slots are public. Opt-in, not in the default bundle. The host owns thresholds, units, and data mapping. |
|
|
100
|
+
| Diffs (`css/diff.css`, `.ui-diff*`) | Stable additive | Diff container/line/gutter class names and add/remove/highlight state modifiers are public. Opt-in, not in the default bundle. Bronto styles evidence; it does not compute diffs. |
|
|
101
|
+
| Code evidence (`css/code.css`, `.ui-code*`) | Stable additive | Code block/gutter/line-state class names and token-backed syntax-theme roles are public. Opt-in, not in the default bundle. Bronto styles code-as-evidence; it does not parse or highlight code at runtime. |
|
|
102
|
+
| Sidenotes (`css/sidenote.css`, `.ui-sidenote`, `.ui-marginnote`) | Stable additive | Sidenote and marginnote class names, numbering behavior, and responsive in-flow fallback are public. Opt-in, not in the default bundle. |
|
|
103
|
+
| Text references (`css/textref.css`, `.ui-textref`) | Stable additive | Text-reference class names and `::target-text` styling are public. Opt-in, not in the default bundle. The host owns URL text fragments and quote provenance. |
|
|
104
|
+
| Terms / glossary (`css/term.css`, `.ui-term`, `.ui-glossary`) | Stable additive | Term and glossary class names plus native-popover definition hooks are public. Opt-in, not in the default bundle. The host owns glossary content and terminology policy. |
|
|
105
|
+
| Contents rail (`css/toc.css`, `.ui-toc*`) | Stable additive | TOC rail class/part names and current-section state classes are public. Opt-in, not in the default bundle. The host owns section observation and active-state updates. |
|
|
106
|
+
| Tree outlines (`css/tree.css`, `.ui-tree*`) | Stable additive | Tree outline class names, depth styling, and native `<details>` composition are public. Opt-in, not in the default bundle. The host owns tree data, lazy loading, and selection state. |
|
|
48
107
|
| Controlled-modal focus trap (`initModal`, `useModal`, `data-bronto-modal`) | Stable additive | For the `.ui-modal.is-open` (non-`<dialog>`) path: the `data-bronto-modal` opt-in marker, the `inert`-based focus trap + focus-return, and the cancelable `bronto:modal:close` (`detail: { reason }`) event are public. The consumer still owns the `is-open` class; the behavior never changes visibility. The native `<dialog>` path (`initDialog`) is the default and gets the trap for free. |
|
|
49
108
|
| Keyboard-shortcut hint (`.ui-shortcut`, `.ui-shortcut__sep`) | Stable additive | Class names for the chord/sequence hint over `.ui-kbd` are public. Ships in the core layer (class-only, no recipe). |
|
|
50
|
-
|
|
|
109
|
+
| Agent and migration data (`llms.txt`, `MIGRATIONS.json`) | Stable additive | `llms.txt` stays shipped as the offline agent entrypoint. `MIGRATIONS.json` stays a machine-readable migration map for breaking renames/removals. New migration entries are additive; removal of a migration record requires the same breaking-change discipline as the surface it describes. |
|
|
110
|
+
| Generated docs shipped in npm | Stable paths | Exported docs paths stay shipped and resolvable within a compatible minor. Markdown/text assets are for reading unless your runtime has a loader. Generated content may change with the source contract. |
|
|
51
111
|
| Demo, examples, tests, scripts | Internal | Useful for learning and verification, but not shipped runtime API unless a path is explicitly exported in `package.json`. |
|
|
52
112
|
|
|
53
113
|
## Deprecation Policy
|
package/docs/workbench.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
# Workbench — split panes, inspector, properties, selection bar
|
|
1
|
+
# Workbench — split panes, toolstrips, inspector, properties, selection bar
|
|
2
2
|
|
|
3
3
|
`@ponchia/ui/css/workbench.css` is an opt-in set of primitives for **real
|
|
4
|
-
tools**: resizable split panes,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
is the low-risk core —
|
|
4
|
+
tools**: resizable split panes, compact toolstrips, button-mode segmented
|
|
5
|
+
controls, an inspector panel, property rows for a selected object, and a bar of
|
|
6
|
+
actions on the current selection. Generic kits stop at cards/tables/forms, so
|
|
7
|
+
every app builds its own half-consistent workbench. This is the low-risk core —
|
|
8
|
+
layout, dense controls, resize affordance, and ARIA value sync.
|
|
8
9
|
|
|
9
10
|
```css
|
|
10
11
|
@import '@ponchia/ui';
|
|
@@ -20,6 +21,51 @@ initSplitter();
|
|
|
20
21
|
Not in the core bundle. Import the CSS leaf where the workbench appears and run
|
|
21
22
|
`initSplitter()` only if the page includes `[data-bronto-splitter]`.
|
|
22
23
|
|
|
24
|
+
## Toolstrip — `.ui-toolstrip`
|
|
25
|
+
|
|
26
|
+
A compact row of controls for a tool surface or viewport. Use
|
|
27
|
+
`.ui-toolstrip--floating` when the strip sits over a canvas, chart, map, media
|
|
28
|
+
stage, or preview. The CSS owns density, wrapping, grouping, and raised/floating
|
|
29
|
+
treatment; the host owns commands, search behavior, active mode, responsive
|
|
30
|
+
hiding, and placement.
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<header class="ui-toolstrip ui-toolstrip--floating" aria-label="View controls">
|
|
34
|
+
<div class="ui-toolstrip__brand">
|
|
35
|
+
<strong>Repository</strong>
|
|
36
|
+
<span class="ui-toolstrip__context">main branch</span>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="ui-toolstrip__group" aria-label="Mode">
|
|
39
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="true">Map</button>
|
|
40
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="false">Flow</button>
|
|
41
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="false">Risk</button>
|
|
42
|
+
</div>
|
|
43
|
+
<label class="ui-toolstrip__search">
|
|
44
|
+
<span class="ui-visually-hidden">Filter items</span>
|
|
45
|
+
<input class="ui-input" type="search" placeholder="Filter by path, owner, or tag" />
|
|
46
|
+
</label>
|
|
47
|
+
<div class="ui-toolstrip__actions" aria-label="Viewport actions">
|
|
48
|
+
<button class="ui-button ui-button--ghost ui-button--icon ui-button--sm" type="button">
|
|
49
|
+
Fit
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
</header>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Button segmented control — `.ui-segmented-buttons`
|
|
56
|
+
|
|
57
|
+
Use `.ui-segmented-buttons` when each option is a real command button and the
|
|
58
|
+
current mode is exposed with `aria-pressed`. For form values submitted with the
|
|
59
|
+
page, keep using the core `.ui-segmented` radio-input pattern.
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<div class="ui-segmented-buttons" aria-label="Density">
|
|
63
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="true">Dense</button>
|
|
64
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="false">Comfort</button>
|
|
65
|
+
<button class="ui-segmented-buttons__button" type="button" aria-pressed="false">Wide</button>
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
23
69
|
## Splitter — `.ui-splitter`
|
|
24
70
|
|
|
25
71
|
Two panes separated by a focusable ARIA separator handle. The CSS owns the grid
|
|
@@ -113,7 +159,8 @@ A raised bar of actions on the current selection: a `__count` on one side,
|
|
|
113
159
|
## Scope
|
|
114
160
|
|
|
115
161
|
No recipes — these are structural containers and rows; apply the classes
|
|
116
|
-
directly (or read them from `cls.
|
|
117
|
-
Pair the selection bar with the cross-cutting
|
|
118
|
-
on the selected items themselves. Bronto styles
|
|
119
|
-
affordance; the host owns hit-testing,
|
|
162
|
+
directly (or read them from `cls.toolstrip`, `cls.splitter`, `cls.inspector`,
|
|
163
|
+
`cls.property`, …). Pair the selection bar with the cross-cutting
|
|
164
|
+
[`ui-sel`](./selection.md) states on the selected items themselves. Bronto styles
|
|
165
|
+
the chrome and wires the splitter affordance; the host owns hit-testing,
|
|
166
|
+
persistence, pane contents, viewport semantics, and commands.
|
package/glyphs/glyphs.js
CHANGED
|
@@ -1518,17 +1518,34 @@ export function renderGlyph(name, options = {}) {
|
|
|
1518
1518
|
if (!rows) return '';
|
|
1519
1519
|
const { grid = true, solid = false, anim, label, dot, gap, render, size } = options;
|
|
1520
1520
|
|
|
1521
|
+
if (render === 'mask') return renderMaskGlyph(rows, { label, size });
|
|
1522
|
+
|
|
1523
|
+
const cells = glyphCells(name);
|
|
1524
|
+
const style = dotmatrixStyle({ solid, dot, gap });
|
|
1525
|
+
const cls = dotmatrixClass(anim);
|
|
1526
|
+
const stagger = anim === 'reveal';
|
|
1527
|
+
const showPanel = grid && !solid;
|
|
1528
|
+
const inner = cells
|
|
1529
|
+
.map((cell, index) => renderGlyphCell(cell, index, { showPanel, stagger }))
|
|
1530
|
+
.join('');
|
|
1531
|
+
|
|
1532
|
+
// A `<span>` (not `<div>`): it's phrasing content, so the glyph is valid
|
|
1533
|
+
// inline and inside a `<button>` (its content model is phrasing-only) — the
|
|
1534
|
+
// inline-icon use. `.ui-dotmatrix`'s `display: grid` works on a span.
|
|
1535
|
+
return `<span class="${cls}" style="${style.join(';')}" ${a11yAttrs(label)}>${inner}</span>`;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
function renderMaskGlyph(rows, { label, size }) {
|
|
1521
1539
|
// One-node icon: a single `.ui-icon` span masked by the glyph's bitmap, so
|
|
1522
1540
|
// it scales to any font-size and inherits `currentColor` — for icon-at-scale
|
|
1523
1541
|
// (e.g. one in every table row) where the GLYPH_SIZE²-cell path is too heavy.
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
const cells = glyphCells(name);
|
|
1542
|
+
const iconSize = size && cssLen(size) ? `--icon-size:${cssLen(size)};` : '';
|
|
1543
|
+
return `<span class="ui-icon" style="${iconSize}--icon-mask:${maskUrl(rows)}" ${a11yAttrs(
|
|
1544
|
+
label,
|
|
1545
|
+
)}></span>`;
|
|
1546
|
+
}
|
|
1531
1547
|
|
|
1548
|
+
function dotmatrixStyle({ solid, dot, gap }) {
|
|
1532
1549
|
const style = [`--dotmatrix-cols:${GLYPH_SIZE}`];
|
|
1533
1550
|
const dotLen = dot && cssLen(dot);
|
|
1534
1551
|
const gapLen = gap && cssLen(gap);
|
|
@@ -1537,42 +1554,35 @@ export function renderGlyph(name, options = {}) {
|
|
|
1537
1554
|
// `minmax(0, 1fr)` and the 16×16 matrix balloons to fill its container
|
|
1538
1555
|
// (full-bleed, ~1250px) — the string API would then render an icon-intent call
|
|
1539
1556
|
// very differently from the DOM `initDotGlyph` path, which already defaults to
|
|
1540
|
-
// 0.08em. Mirror that default here so both paths render the same icon.
|
|
1557
|
+
// 0.08em. Mirror that default here so both paths render the same icon.
|
|
1541
1558
|
style.push(`--dotmatrix-dot:${dotLen || '0.08em'}`);
|
|
1542
1559
|
// Solid mode fuses the dots into a crisp pixel glyph: square cells, no gap.
|
|
1543
1560
|
if (solid) style.push('--dotmatrix-dot-radius:0', '--dotmatrix-gap:0');
|
|
1544
1561
|
else if (gapLen) style.push(`--dotmatrix-gap:${gapLen}`);
|
|
1562
|
+
return style;
|
|
1563
|
+
}
|
|
1545
1564
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
: 'ui-dotmatrix';
|
|
1552
|
-
// `reveal` staggers each cell by its row-major index via `--i`.
|
|
1553
|
-
const stagger = anim === 'reveal';
|
|
1554
|
-
|
|
1555
|
-
const a11y = label ? `role="img" aria-label="${esc(label)}"` : 'aria-hidden="true"';
|
|
1565
|
+
function dotmatrixClass(anim) {
|
|
1566
|
+
if (anim === 'reveal') return 'ui-dotmatrix ui-dotmatrix--reveal';
|
|
1567
|
+
if (anim === 'pulse') return 'ui-dotmatrix ui-dotmatrix--pulse';
|
|
1568
|
+
return 'ui-dotmatrix';
|
|
1569
|
+
}
|
|
1556
1570
|
|
|
1571
|
+
function renderGlyphCell(cell, index, { showPanel, stagger }) {
|
|
1572
|
+
const cl = cell.on ? cellClass(cell) : 'ui-dotmatrix__cell';
|
|
1573
|
+
const cellStyle = [];
|
|
1557
1574
|
// Off cells keep the cell class (so they hold their grid track and 1:1
|
|
1558
1575
|
// aspect-ratio); `grid: false` (implied by `solid`) only drops their lit
|
|
1559
1576
|
// background, for the glyph-only look, without collapsing all-off rows.
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
if (stagger) cellStyle.push(`--i:${i}`);
|
|
1567
|
-
const s = cellStyle.length ? ` style="${cellStyle.join(';')}"` : '';
|
|
1568
|
-
return `<span class="${cl}"${s}></span>`;
|
|
1569
|
-
})
|
|
1570
|
-
.join('');
|
|
1577
|
+
if (!cell.on && !showPanel) cellStyle.push('background:transparent');
|
|
1578
|
+
// `reveal` staggers each cell by its row-major index via `--i`.
|
|
1579
|
+
if (stagger) cellStyle.push(`--i:${index}`);
|
|
1580
|
+
const style = cellStyle.length ? ` style="${cellStyle.join(';')}"` : '';
|
|
1581
|
+
return `<span class="${cl}"${style}></span>`;
|
|
1582
|
+
}
|
|
1571
1583
|
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
// inline-icon use. `.ui-dotmatrix`'s `display: grid` works on a span.
|
|
1575
|
-
return `<span class="${cls}" style="${style.join(';')}" ${a11y}>${inner}</span>`;
|
|
1584
|
+
function a11yAttrs(label) {
|
|
1585
|
+
return label ? `role="img" aria-label="${esc(label)}"` : 'aria-hidden="true"';
|
|
1576
1586
|
}
|
|
1577
1587
|
|
|
1578
1588
|
// Character → glyph name for renderReadout. Punctuation reuses the readout face
|
package/llms.txt
CHANGED
|
@@ -44,7 +44,7 @@ the path changes from source `css/` to built `dist/css/`:
|
|
|
44
44
|
<!-- installed locally -->
|
|
45
45
|
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/<leaf>.css" />
|
|
46
46
|
<!-- or from a CDN; pin the version (pre-1.0, breaking changes ship in the minor) -->
|
|
47
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
47
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/<leaf>.css" />
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
The flattened default bundle is `dist/bronto.css` (bundler shorthand
|
|
@@ -244,7 +244,10 @@ chart rendering, overlay content, and accessibility text. Details:
|
|
|
244
244
|
|
|
245
245
|
Optional SVG annotations for charts/reports — opt-in, never in the default
|
|
246
246
|
bundle. This is Bronto's subject / connector / note grammar inspired by
|
|
247
|
-
d3-annotation, not an authoring engine
|
|
247
|
+
d3-annotation, not an authoring engine. For placement, collision handling,
|
|
248
|
+
renderers, editing, and chart/diagram adapters, use the sibling
|
|
249
|
+
`@ponchia/annotations` package; `@ponchia/ui/annotations` stays a
|
|
250
|
+
dependency-free Bronto static-helper compatibility surface:
|
|
248
251
|
|
|
249
252
|
```html
|
|
250
253
|
<link rel="stylesheet" href="@ponchia/ui/css/annotations.css" />
|
|
@@ -750,7 +753,8 @@ Read these from `node_modules/@ponchia/ui/` — no network needed:
|
|
|
750
753
|
- `schemas/report-claims.v1.schema.json` — declarative JSON Schema for
|
|
751
754
|
`claims.json` sidecars that map report claims to source IDs and relations.
|
|
752
755
|
- `docs/annotations.md` — SVG annotation recipes and helper guidance for
|
|
753
|
-
analytical figures
|
|
756
|
+
analytical figures, plus the boundary with the sibling `@ponchia/annotations`
|
|
757
|
+
engine package.
|
|
754
758
|
- `docs/mermaid.md` — theme Mermaid diagrams from bronto tokens (resolved
|
|
755
759
|
`base` themeVariables, gated) and annotate the rendered SVG.
|
|
756
760
|
- `docs/d2.md` — theme D2 diagrams from bronto tokens (theme-override slots,
|
|
@@ -775,7 +779,9 @@ Read these from `node_modules/@ponchia/ui/` — no network needed:
|
|
|
775
779
|
`glyphCells` signatures for the display glyphs. (The DOM form,
|
|
776
780
|
`initDotGlyph`, is declared in `behaviors/index.d.ts`.)
|
|
777
781
|
- `annotations/index.d.ts` — no-dependency SVG path helpers for Bronto
|
|
778
|
-
annotation geometry.
|
|
782
|
+
annotation geometry. Do not add placement/collision/renderers/adapters here;
|
|
783
|
+
that belongs in `@ponchia/annotations`; do not import or type-reference that
|
|
784
|
+
sibling package from `@ponchia/ui` code or declarations.
|
|
779
785
|
- `classes/vscode.css-custom-data.json` — editor autocomplete for tokens.
|
|
780
786
|
|
|
781
787
|
## External web references
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ponchia/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CSS-first identity and UI layer for services, tools, sites, and reports — works in HTML, every framework, and PDF, no component runtime. Shared app shell, forms, tables, workflow chrome, plus opt-in analytical/report primitives. Monochrome with one rationed accent. Zero runtime dependencies.",
|
|
6
6
|
"keywords": [
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"docs/workbench.md",
|
|
103
103
|
"docs/command.md",
|
|
104
104
|
"docs/interop/tailwind.md",
|
|
105
|
+
"docs/interop/react-flow.md",
|
|
105
106
|
"docs/migrations/0.2-to-0.3.md",
|
|
106
107
|
"docs/migrations/0.3-to-0.4.md",
|
|
107
108
|
"docs/migrations/0.4-to-0.5.md",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"check:classes": "node scripts/check-classes.mjs",
|
|
148
149
|
"check:recipe-types": "node scripts/check-recipe-types.mjs",
|
|
149
150
|
"check:dead": "knip --treat-config-hints-as-errors",
|
|
151
|
+
"check:complexity": "node scripts/check-complexity.mjs",
|
|
150
152
|
"check:chain": "node scripts/check-chain.mjs",
|
|
151
153
|
"check:dts-emit": "node scripts/check-dts-emit.mjs",
|
|
152
154
|
"check:glyphs": "node scripts/check-glyphs.mjs",
|
|
@@ -186,7 +188,7 @@
|
|
|
186
188
|
"check:publint": "publint --strict",
|
|
187
189
|
"check:attw": "attw --pack --ignore-rules no-resolution cjs-resolves-to-esm",
|
|
188
190
|
"check:workflows": "github-actionlint .github/workflows/*.yml",
|
|
189
|
-
"check": "npm run lint && npm run check:format && npm run check:exports && npm run check:fresh && npm run check:classes && npm run check:recipe-types && npm run check:dead && npm run check:types && npm run check:unit && npm run check:shiki && npm run check:dist && npm run check:pack && npm run check:consumer-surface && npm run check:consumer-types && npm run check:component-matrix && npm run check:behavior-matrix && npm run check:helper-matrix && npm run check:binding-matrix && npm run check:examples && npm run check:visual-baselines && npm run check:playwright-container && npm run check:schemas && npm run check:publint && npm run check:attw && npm run check:workflows && npm run check:release && npm run check:versions && npm run check:migrations && npm run check:public-metadata && npm run check:public-hygiene && npm run check:doc-links && npm run check:doc-recipes && npm run check:contract && npm run check:variables && npm run check:contrast && npm run check:dts-emit && npm run check:glyphs && npm run check:color-policy && npm run check:skins && npm run check:charts && npm run check:mermaid && npm run check:d2 && npm run check:vega && npm run check:report && npm run check:legend && npm run check:chain",
|
|
191
|
+
"check": "npm run lint && npm run check:format && npm run check:exports && npm run check:fresh && npm run check:classes && npm run check:recipe-types && npm run check:dead && npm run check:complexity && npm run check:types && npm run check:unit && npm run check:shiki && npm run check:dist && npm run check:pack && npm run check:consumer-surface && npm run check:consumer-types && npm run check:component-matrix && npm run check:behavior-matrix && npm run check:helper-matrix && npm run check:binding-matrix && npm run check:examples && npm run check:visual-baselines && npm run check:playwright-container && npm run check:schemas && npm run check:publint && npm run check:attw && npm run check:workflows && npm run check:release && npm run check:versions && npm run check:migrations && npm run check:public-metadata && npm run check:public-hygiene && npm run check:doc-links && npm run check:doc-recipes && npm run check:contract && npm run check:variables && npm run check:contrast && npm run check:dts-emit && npm run check:glyphs && npm run check:color-policy && npm run check:skins && npm run check:charts && npm run check:mermaid && npm run check:d2 && npm run check:vega && npm run check:report && npm run check:legend && npm run check:chain",
|
|
190
192
|
"test": "node --test \"test/*.test.mjs\"",
|
|
191
193
|
"test:e2e": "playwright test",
|
|
192
194
|
"test:e2e:chromium": "playwright test --project=chromium",
|
|
@@ -388,6 +390,7 @@
|
|
|
388
390
|
"./docs/workbench.md": "./docs/workbench.md",
|
|
389
391
|
"./docs/command.md": "./docs/command.md",
|
|
390
392
|
"./docs/interop/tailwind.md": "./docs/interop/tailwind.md",
|
|
393
|
+
"./docs/interop/react-flow.md": "./docs/interop/react-flow.md",
|
|
391
394
|
"./docs/migrations/0.2-to-0.3.md": "./docs/migrations/0.2-to-0.3.md",
|
|
392
395
|
"./docs/migrations/0.3-to-0.4.md": "./docs/migrations/0.3-to-0.4.md",
|
|
393
396
|
"./docs/migrations/0.4-to-0.5.md": "./docs/migrations/0.4-to-0.5.md",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"hash": {
|
|
58
58
|
"type": "string",
|
|
59
|
-
"pattern": "^(sha256|sha384|sha512
|
|
59
|
+
"pattern": "^(sha256:[A-Fa-f0-9]{64}|sha384:[A-Fa-f0-9]{96}|sha512:[A-Fa-f0-9]{128})$"
|
|
60
60
|
},
|
|
61
61
|
"claimStatus": {
|
|
62
62
|
"enum": ["supported", "partial", "disputed", "unsupported", "unknown"]
|
package/tokens/index.js
CHANGED
|
@@ -115,7 +115,7 @@ export const cssVars = {
|
|
|
115
115
|
// (D2/Mermaid/Vega labels on an accent fill — see tokens/*.json). In-DOM
|
|
116
116
|
// components paint their own on-accent ink from `--button-text`; overriding
|
|
117
117
|
// `--on-accent` in CSS does NOT change a button/chip. To re-ink in-DOM
|
|
118
|
-
// accent fills, set `--button-text`.
|
|
118
|
+
// accent fills, set `--button-text`.
|
|
119
119
|
'--on-accent': 'var(--button-text)',
|
|
120
120
|
'--accent-soft': 'color-mix(in srgb, var(--accent) 10%, transparent)',
|
|
121
121
|
'--success': '#2f7d4f',
|
|
@@ -156,7 +156,7 @@ export const cssVars = {
|
|
|
156
156
|
// (D2/Mermaid/Vega labels on an accent fill — see tokens/*.json). In-DOM
|
|
157
157
|
// components paint their own on-accent ink from `--button-text`; overriding
|
|
158
158
|
// `--on-accent` in CSS does NOT change a button/chip. To re-ink in-DOM
|
|
159
|
-
// accent fills, set `--button-text`.
|
|
159
|
+
// accent fills, set `--button-text`.
|
|
160
160
|
'--on-accent': 'var(--button-text)',
|
|
161
161
|
'--accent-soft': 'color-mix(in srgb, var(--accent) 14%, transparent)',
|
|
162
162
|
'--success': '#4ec27e',
|