@vielzeug/codex 26.10.20 → 26.10.22
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/data/catalog.json +46 -45
- package/data/llms-full.txt +195 -18
- package/data/llms.txt +2 -2
- package/data/manifest.json +1 -1
- package/data/packages/prism.json +61 -56
- package/data/packages/refine.json +8 -5
- package/data/refine.json +5627 -5483
- package/data/search.json +11 -11
- package/package.json +2 -2
- package/skills/vielzeug/SKILL.md +1 -1
package/data/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vielzeug: Full Documentation
|
|
2
2
|
|
|
3
|
-
> Complete documentation for 43 packages. Version: 26.10.
|
|
3
|
+
> Complete documentation for 43 packages. Version: 26.10.21
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -19222,6 +19222,7 @@ chart.dispose();
|
|
|
19222
19222
|
- **`createScatterChart()`**: plot independent numeric `(x, y)` points
|
|
19223
19223
|
- **`createPieChart()`**: render pie, donut, or semi-circle slices
|
|
19224
19224
|
- **`createRadarChart()`**: compare series across fixed, labelled axes
|
|
19225
|
+
- **`createHeatmapChart()`**: render a row/column matrix of colored cells with a continuous or binned ramp
|
|
19225
19226
|
- **`createSparkline()`**: render compact line, area, bar, or stacked values without axes
|
|
19226
19227
|
- **`ChartHandle.update(data)`**: replace chart data without handing state ownership to Prism
|
|
19227
19228
|
- **`ChartHandle.dispose()` / `Symbol.dispose`**: release the SVG, observer, overlays, and chart-owned animation
|
|
@@ -19257,6 +19258,7 @@ All chart factories, scale utilities, theme helpers, and error classes are synch
|
|
|
19257
19258
|
| `createBarChart()` | Render categorical bars | Sync | Negative values in stacked variants are clamped to zero |
|
|
19258
19259
|
| `createPieChart()` | Render pie, donut, or semi-circle slices | Sync | `variant` is fixed at creation; `update()` replaces slices |
|
|
19259
19260
|
| `createRadarChart()` | Compare series across fixed axes | Sync | Requires at least three axes to draw |
|
|
19261
|
+
| `createHeatmapChart()` | Render a row/column matrix of colored cells | Sync | Cells whose `row`/`column` match no label are skipped; unknown labels warn in development |
|
|
19260
19262
|
| `createSparkline()` | Render a compact line, area, bar, or stack | Sync | Has no axes, legend, or keyboard navigation |
|
|
19261
19263
|
| `linearScale()` | Create a numeric scale | Sync | `nice` defaults to `true`; set `nice: false` to preserve the domain |
|
|
19262
19264
|
| `timeScale()` | Create a date scale | Sync | `nice` defaults to `true` |
|
|
@@ -19489,6 +19491,47 @@ chart.dispose();
|
|
|
19489
19491
|
|
|
19490
19492
|
Radar defaults are a solid fill, linear curves, visible points, a four-level polygon grid with bands, no grid labels, and a first-axis angle of zero degrees. Grid labels render only when all axes share a domain.
|
|
19491
19493
|
|
|
19494
|
+
### `createHeatmapChart()`
|
|
19495
|
+
|
|
19496
|
+
```ts
|
|
19497
|
+
function createHeatmapChart(
|
|
19498
|
+
container: HTMLElement,
|
|
19499
|
+
config: HeatmapChartConfig,
|
|
19500
|
+
): ChartHandle;
|
|
19501
|
+
```
|
|
19502
|
+
|
|
19503
|
+
Renders one colored cell per row/column pair: rows down the left, columns across the top. The color ramp is continuous by default; `bins` turns it into discrete steps and shows a swatch legend. Cells show their formatted value when they are large enough, choosing dark or light text against the fill. `rowSummary` adds a right-hand column of pre-formatted per-row texts (e.g. a win rate the cells alone cannot show). `update()` replaces cells and may replace `rows`, `columns`, `domain`, and `rowSummary`; other configuration is fixed at creation.
|
|
19504
|
+
|
|
19505
|
+
| Parameter | Type | Description |
|
|
19506
|
+
| --- | --- | --- |
|
|
19507
|
+
| `container` | `HTMLElement` | Host that receives the chart SVG and optional overlays |
|
|
19508
|
+
| `config` | `HeatmapChartConfig` | Rows, columns, cells, ramp, bins, appearance, and interaction settings |
|
|
19509
|
+
|
|
19510
|
+
**Returns:** `ChartHandle`.
|
|
19511
|
+
|
|
19512
|
+
```ts
|
|
19513
|
+
import { createHeatmapChart } from '@vielzeug/prism';
|
|
19514
|
+
|
|
19515
|
+
const host = document.createElement('div');
|
|
19516
|
+
host.style.cssText = 'width:400px;height:320px';
|
|
19517
|
+
document.body.append(host);
|
|
19518
|
+
|
|
19519
|
+
const chart = createHeatmapChart(host, {
|
|
19520
|
+
a11y: { ariaLabel: 'Win rate by hero and region' },
|
|
19521
|
+
cells: [
|
|
19522
|
+
{ column: 'Forest', row: 'Aria', value: 90 },
|
|
19523
|
+
{ column: 'Swamp', row: 'Aria', value: 40 },
|
|
19524
|
+
{ column: 'Forest', row: 'Brom', value: 20 },
|
|
19525
|
+
{ column: 'Swamp', row: 'Brom', value: 75 },
|
|
19526
|
+
],
|
|
19527
|
+
columns: ['Forest', 'Swamp'],
|
|
19528
|
+
rows: ['Aria', 'Brom'],
|
|
19529
|
+
});
|
|
19530
|
+
chart.dispose();
|
|
19531
|
+
```
|
|
19532
|
+
|
|
19533
|
+
Heatmap defaults are a light-to-deep blue ramp over the data's `[min, max]` domain, a 2 px cell gap, in-cell values, and no legend. Column headers rotate -45° when they do not fit their column. Keyboard: arrows move the active cell, Enter/Space fires `onCellClick`, Escape deactivates; the tooltip (or `.prism-live` without one) describes the active cell.
|
|
19534
|
+
|
|
19492
19535
|
### `createSparkline()`
|
|
19493
19536
|
|
|
19494
19537
|
```ts
|
|
@@ -19676,7 +19719,7 @@ seriesColor(1, '#2563eb'); // '#2563eb'
|
|
|
19676
19719
|
|
|
19677
19720
|
`[Symbol.dispose]()` delegates to `dispose()`, allowing explicit resource management where supported.
|
|
19678
19721
|
|
|
19679
|
-
All chart handles expose the same lifecycle members; interactive cartesian
|
|
19722
|
+
All chart handles expose the same lifecycle members; interactive cartesian, pie, radar, and heatmap charts use a `.prism-live` status region when no tooltip is enabled. A tooltip is itself a polite status region. Sparklines have neither a tooltip nor a live value announcer.
|
|
19680
19723
|
|
|
19681
19724
|
| Method or property | Contract |
|
|
19682
19725
|
| --- | --- |
|
|
@@ -19820,7 +19863,7 @@ export interface SeriesValue {
|
|
|
19820
19863
|
| Line | Applies to the segment from this datum to the next | Applies to that segment and its point marker |
|
|
19821
19864
|
| Area | Applies to the top-line segment from this datum to the next | Applies to that segment |
|
|
19822
19865
|
| Scatter | Ignored | Applies to that point |
|
|
19823
|
-
| Pie, radar, sparkline | Ignored | Ignored |
|
|
19866
|
+
| Pie, radar, heatmap, sparkline | Ignored | Ignored |
|
|
19824
19867
|
|
|
19825
19868
|
For line and area charts, the last datum has no following segment, so its `dash` value is ignored. The chart factories group adjacent segments with the same presentation values into path runs.
|
|
19826
19869
|
|
|
@@ -19977,6 +20020,10 @@ export type BarVariant = 'grouped' | 'grouped-horizontal' | 'stacked' | 'stacked
|
|
|
19977
20020
|
|
|
19978
20021
|
export interface BarChartConfig extends BaseChartConfig {
|
|
19979
20022
|
series: BarSeriesConfig[];
|
|
20023
|
+
/** Paints each bar's value at its end; stacked variants label the stack total. */
|
|
20024
|
+
showValues?: boolean;
|
|
20025
|
+
/** Formats the value labels. Defaults to `String`. */
|
|
20026
|
+
valueFormat?: (value: number) => string;
|
|
19980
20027
|
variant?: BarVariant;
|
|
19981
20028
|
}
|
|
19982
20029
|
|
|
@@ -20047,6 +20094,47 @@ export interface RadarChartConfig extends Omit {
|
|
|
20047
20094
|
startAngle?: number;
|
|
20048
20095
|
}
|
|
20049
20096
|
|
|
20097
|
+
export interface HeatmapCell {
|
|
20098
|
+
column: string;
|
|
20099
|
+
row: string;
|
|
20100
|
+
value: number | null;
|
|
20101
|
+
}
|
|
20102
|
+
|
|
20103
|
+
export interface HeatmapEvent {
|
|
20104
|
+
cell: HeatmapCell | undefined;
|
|
20105
|
+
column: string;
|
|
20106
|
+
originalEvent: Event;
|
|
20107
|
+
row: string;
|
|
20108
|
+
}
|
|
20109
|
+
|
|
20110
|
+
export interface HeatmapData {
|
|
20111
|
+
cells: HeatmapCell[];
|
|
20112
|
+
columns?: string[];
|
|
20113
|
+
domain?: [number, number];
|
|
20114
|
+
rows?: string[];
|
|
20115
|
+
rowSummary?: HeatmapChartConfig['rowSummary'];
|
|
20116
|
+
}
|
|
20117
|
+
|
|
20118
|
+
export interface HeatmapChartConfig
|
|
20119
|
+
extends Omit {
|
|
20120
|
+
binLabel?: (from: number | null, to: number | null) => string;
|
|
20121
|
+
bins?: number[];
|
|
20122
|
+
cells: HeatmapCell[];
|
|
20123
|
+
colorRange?: string[];
|
|
20124
|
+
columns: string[];
|
|
20125
|
+
domain?: [number, number];
|
|
20126
|
+
emptyColor?: string;
|
|
20127
|
+
emptyLabel?: string;
|
|
20128
|
+
gap?: number;
|
|
20129
|
+
legend?: boolean;
|
|
20130
|
+
onCellClick?: (event: HeatmapEvent) => void;
|
|
20131
|
+
onCellHover?: (event: HeatmapEvent | null) => void;
|
|
20132
|
+
rows: string[];
|
|
20133
|
+
rowSummary?: { header?: string; values: (string | null)[] };
|
|
20134
|
+
showValues?: boolean;
|
|
20135
|
+
valueFormat?: (value: number) => string;
|
|
20136
|
+
}
|
|
20137
|
+
|
|
20050
20138
|
export type SparklineVariant = 'area' | 'bar' | 'line' | 'stack';
|
|
20051
20139
|
|
|
20052
20140
|
export interface StackSegment {
|
|
@@ -20150,7 +20238,7 @@ chart.update(series);
|
|
|
20150
20238
|
chart.dispose();
|
|
20151
20239
|
```
|
|
20152
20240
|
|
|
20153
|
-
`update()` accepts the type shown by that factory's handle: a complete series array for line, area, scatter, bar, and radar charts; a slice array for pie charts; and a number or stack-segment array for sparklines. Chart options such as axes, variant, callbacks, and accessibility are set at creation. For example, radar axes and a pie chart's variant do not change through `update()`.
|
|
20241
|
+
`update()` accepts the type shown by that factory's handle: a complete series array for line, area, scatter, bar, and radar charts; a slice array for pie charts; a `HeatmapData` object for heatmap charts; and a number or stack-segment array for sparklines. Chart options such as axes, variant, callbacks, and accessibility are set at creation. For example, radar axes and a pie chart's variant do not change through `update()`.
|
|
20154
20242
|
|
|
20155
20243
|
## Line Charts
|
|
20156
20244
|
|
|
@@ -20279,6 +20367,8 @@ Choose `grouped`, `stacked`, `grouped-horizontal`, or `stacked-horizontal` in `v
|
|
|
20279
20367
|
|
|
20280
20368
|
Axes render by default, with grid lines on the value axis. For horizontal variants, `xAxis` is the value axis and `yAxis` is the category axis. Configure `grid` on the value axis.
|
|
20281
20369
|
|
|
20370
|
+
Set `showValues: true` to paint each bar's value at its end so the chart reads without hover; `valueFormat` shapes the label text. Stacked variants label the stack total at the top of the stack, and labels that would overflow the plot flip inside the bar with a contrasting fill. The labels are decorative (`aria-hidden`) — the accessible read stays with the chart's data table.
|
|
20371
|
+
|
|
20282
20372
|
## Area Charts
|
|
20283
20373
|
|
|
20284
20374
|
Area series use a gradient fill by default. Set `fill: 'solid'` for a flat fill, or set `fillOpacity` to override the theme opacity for that series.
|
|
@@ -20422,6 +20512,37 @@ chart.dispose();
|
|
|
20422
20512
|
|
|
20423
20513
|
The default shared domain starts at zero and uses a nice maximum; set `domain` to compare series on a fixed range. Per-axis `min` and `max` override the chart domain for that axis. Grid rings, bands, curves, fills, vertex dots, and values are configurable; see `RadarChartConfig` and `RadarGridConfig` in the API reference.
|
|
20424
20514
|
|
|
20515
|
+
## Heatmaps
|
|
20516
|
+
|
|
20517
|
+
Define `rows`, `columns`, and `cells`; each cell names its `row` and `column` labels. A cell with `value: null` (or no matching cell at all) renders in `emptyColor` without in-cell text. `rowSummary` adds a right-hand column of pre-formatted per-row texts (aligned with `rows`, with an optional header) — useful for a per-row rate the cells cannot show. `update()` replaces cells and may replace `rows`, `columns`, `domain`, and `rowSummary`.
|
|
20518
|
+
|
|
20519
|
+
```ts
|
|
20520
|
+
import { createHeatmapChart } from '@vielzeug/prism';
|
|
20521
|
+
|
|
20522
|
+
const container = document.createElement('div');
|
|
20523
|
+
container.style.cssText = 'width:400px;height:320px';
|
|
20524
|
+
document.body.append(container);
|
|
20525
|
+
|
|
20526
|
+
const chart = createHeatmapChart(container, {
|
|
20527
|
+
a11y: { ariaLabel: 'Win rate by hero and region' },
|
|
20528
|
+
bins: [50, 75],
|
|
20529
|
+
cells: [
|
|
20530
|
+
{ column: 'Forest', row: 'Aria', value: 90 },
|
|
20531
|
+
{ column: 'Swamp', row: 'Aria', value: 40 },
|
|
20532
|
+
{ column: 'Forest', row: 'Brom', value: 20 },
|
|
20533
|
+
{ column: 'Swamp', row: 'Brom', value: 75 },
|
|
20534
|
+
],
|
|
20535
|
+
columns: ['Forest', 'Swamp'],
|
|
20536
|
+
rows: ['Aria', 'Brom'],
|
|
20537
|
+
tooltip: true,
|
|
20538
|
+
valueFormat: (value) => `${value}%`,
|
|
20539
|
+
});
|
|
20540
|
+
|
|
20541
|
+
chart.dispose();
|
|
20542
|
+
```
|
|
20543
|
+
|
|
20544
|
+
Without `bins` the ramp is continuous over the data's `[min, max]` domain (or an explicit `domain`); with `bins` each value maps to a discrete step and a swatch legend appears. `colorRange` sets the ramp low → high, `valueFormat` shapes in-cell values, tooltip values, and bin labels, and `showValues: false` hides the in-cell text.
|
|
20545
|
+
|
|
20425
20546
|
## Sparklines
|
|
20426
20547
|
|
|
20427
20548
|
Sparklines omit axes, margins, and legends. Choose `line`, `area`, or `bar` for numeric arrays, and `stack` for an array of `StackSegment` objects.
|
|
@@ -20478,7 +20599,7 @@ chart.dispose();
|
|
|
20478
20599
|
|
|
20479
20600
|
Set `a11y: { ariaLabel }` on an informative chart. Prism gives the SVG `role="img"`, an accessible name, and keyboard focus. Arrow keys move among chart data; `Home` and `End` move to the first and last item where supported; `Enter` or `Space` activates an item when an `onClick` callback is configured; `Escape` clears the active selection. Sparklines do not support keyboard navigation.
|
|
20480
20601
|
|
|
20481
|
-
When `a11y` is omitted, or set to `{ decorative: true }`, the SVG is marked `aria-hidden="true"` and does not enter the keyboard tab order. Only mark charts decorative when their information is available elsewhere. Interactive cartesian
|
|
20602
|
+
When `a11y` is omitted, or set to `{ decorative: true }`, the SVG is marked `aria-hidden="true"` and does not enter the keyboard tab order. Only mark charts decorative when their information is available elsewhere. Interactive cartesian, pie, radar, and heatmap charts use the tooltip as a polite live region when enabled; otherwise they announce active values in `.prism-live`. Sparklines have no live value announcements, so provide an equivalent visible value or summary.
|
|
20482
20603
|
|
|
20483
20604
|
## Animation
|
|
20484
20605
|
|
|
@@ -20578,6 +20699,7 @@ The stylesheet defines defaults for the following token groups. Pie-label color
|
|
|
20578
20699
|
| Interaction | `--prism-dim-opacity`, `--prism-active-point-radius`, `--prism-point-ring`, `--prism-focus-color` |
|
|
20579
20700
|
| Sparklines | `--prism-spark-fill-opacity`, `--prism-spark-gradient-start`, `--prism-spark-gradient-end` |
|
|
20580
20701
|
| Radar | `--prism-radar-grid-color`, `--prism-radar-grid-opacity`, `--prism-radar-band-fill`, `--prism-radar-band-opacity`, `--prism-radar-spoke-color`, `--prism-radar-fill-opacity`, `--prism-radar-stroke-width`, `--prism-radar-point-radius`, `--prism-radar-point-radius-active`, `--prism-radar-label-color`, `--prism-radar-label-size`, `--prism-radar-value-color`, `--prism-radar-value-size`, `--prism-radar-dim-opacity` |
|
|
20702
|
+
| Heatmap | `--prism-heatmap-label-color`, `--prism-heatmap-label-size`, `--prism-heatmap-value-size`, `--prism-heatmap-highlight-color` |
|
|
20581
20703
|
| Motion | `--prism-duration-fast`, `--prism-duration`, `--prism-duration-slow`, `--prism-ease`, `--prism-ease-spring`, `--prism-transition`, `--prism-transition-fast` |
|
|
20582
20704
|
| Legend and pie labels | `--prism-legend-gap`, `--prism-legend-dot-size`, `--prism-legend-font-size`, `--prism-pie-label-color`, `--prism-pie-label-size` |
|
|
20583
20705
|
|
|
@@ -20642,6 +20764,7 @@ Use Refine components for dashboard controls and keep Prism in a sized host elem
|
|
|
20642
20764
|
- [Compare categories with a bar chart](./examples/bar-chart.md)
|
|
20643
20765
|
- [Render compact charts](./examples/compact-charts.md)
|
|
20644
20766
|
- [Compare hero stats with a radar chart](./examples/radar-chart.md)
|
|
20767
|
+
- [Show a win-rate matrix with a heatmap](./examples/heatmap-chart.md)
|
|
20645
20768
|
- [Update chart data](./examples/update-data.md)
|
|
20646
20769
|
- [Sync a details panel with hover](./examples/hover-details.md)
|
|
20647
20770
|
- [Render a custom tooltip](./examples/custom-tooltip.md)
|
|
@@ -21668,23 +21791,25 @@ Component registration happens through side-effect imports such as `@vielzeug/re
|
|
|
21668
21791
|
|
|
21669
21792
|
### Components
|
|
21670
21793
|
|
|
21671
|
-
|
|
21794
|
+
Each entry below is a component with its own documentation page and registration subpath. Sub-element tags (`ore-accordion-item`, `ore-tab-item`, `ore-avatar-group`, and the rest) are documented on their parent's page and registered with it.
|
|
21672
21795
|
|
|
21673
|
-
**
|
|
21796
|
+
**Content:** `ore-accordion`, `ore-avatar`, `ore-card`, `ore-carousel`, `ore-chat-message`, `ore-chat-panel`, `ore-code-window`, `ore-copy-command`, `ore-icon`, `ore-keyboard-key`, `ore-list`, `ore-marquee`, `ore-qr-code`, `ore-rank-list`, `ore-speech-player`, `ore-speed-reading`, `ore-stats`, `ore-table`, `ore-text`
|
|
21674
21797
|
|
|
21675
21798
|
**Feedback:** `ore-alert`, `ore-async`, `ore-badge`, `ore-chip`, `ore-cookie-banner`, `ore-password-strength`, `ore-progress`, `ore-skeleton`, `ore-toast`, `ore-typing-indicator`
|
|
21676
21799
|
|
|
21677
|
-
**Inputs:** `ore-button`, `ore-
|
|
21800
|
+
**Inputs:** `ore-button`, `ore-calendar`, `ore-checkbox`, `ore-combobox`, `ore-counter`, `ore-datagrid`, `ore-date-picker`, `ore-file-input`, `ore-input`, `ore-message-composer`, `ore-number-input`, `ore-otp-input`, `ore-qr-scanner`, `ore-query-bar`, `ore-radio`, `ore-rating`, `ore-select`, `ore-slider`, `ore-switch`, `ore-textarea`, `ore-time-picker`
|
|
21801
|
+
|
|
21802
|
+
**Layout:** `ore-box`, `ore-grid`, `ore-navbar`, `ore-separator`, `ore-sidebar`
|
|
21678
21803
|
|
|
21679
|
-
**
|
|
21804
|
+
**Navigation:** `ore-breadcrumb`, `ore-navigation-menu`, `ore-pagination`, `ore-stepper`, `ore-tabs`
|
|
21680
21805
|
|
|
21681
|
-
**Overlay:** `ore-command-palette`, `ore-
|
|
21806
|
+
**Overlay:** `ore-command-palette`, `ore-dialog`, `ore-drawer`, `ore-menu`, `ore-popover`, `ore-spotlight`, `ore-tooltip`, `ore-tour`
|
|
21682
21807
|
|
|
21683
21808
|
## Component portfolio
|
|
21684
21809
|
|
|
21685
21810
|
Refine keeps one public package and classifies components by composition level rather than stability. All listed components remain supported and tested.
|
|
21686
21811
|
|
|
21687
|
-
- **Foundations**: buttons, inputs, selection controls,
|
|
21812
|
+
- **Foundations**: buttons, inputs, selection controls, accordions, dialogs, menus, tooltips, layout primitives, and feedback indicators. Start here when building an application-specific interface.
|
|
21688
21813
|
- **Composed patterns**: data grids, command palettes, navigation menus, steppers, calendars, date/time pickers, file inputs, and message composers. These package recurring accessibility and interaction behavior that is costly to rebuild correctly.
|
|
21689
21814
|
- **Presentation patterns**: cards, chat messages, code windows, stats, marquees, avatars, badges, and skeletons. Use these when their product vocabulary matches the application; prefer foundations when it does not.
|
|
21690
21815
|
|
|
@@ -21694,9 +21819,10 @@ Classification guides discovery and bundle selection. It is not a reason to remo
|
|
|
21694
21819
|
|
|
21695
21820
|
- **Accessible**: keyboard navigation, ARIA wiring, and focus management across interactive components
|
|
21696
21821
|
- **Themeable**: global tokens plus component-level CSS custom properties
|
|
21822
|
+
- **Motion-safe**: every animation routes through duration tokens and honors Motion Mode (`setMotionMode`) with a reduced-motion floor
|
|
21697
21823
|
- **Framework agnostic**: works anywhere HTML can be rendered
|
|
21698
21824
|
- **Tree-shakeable**: import only the component entry points you register
|
|
21699
|
-
- **Comprehensive surface**: inputs, content,
|
|
21825
|
+
- **Comprehensive surface**: inputs, content, navigation, feedback, layout, and overlay primitives
|
|
21700
21826
|
- **Native form integration**: form-associated controls submit values, validate supported required constraints, and reset with their form
|
|
21701
21827
|
- **Typed framework declarations**: DOM, React, and Vue tags derive from the component property contracts
|
|
21702
21828
|
|
|
@@ -21710,6 +21836,7 @@ Classification guides discovery and bundle selection. It is not a reason to remo
|
|
|
21710
21836
|
|
|
21711
21837
|
- [Usage Guide](./usage.md)
|
|
21712
21838
|
- [API Reference](./api.md)
|
|
21839
|
+
- [Animation & Motion](./animation.md)
|
|
21713
21840
|
- [Migration Guide](./migration.md)
|
|
21714
21841
|
|
|
21715
21842
|
## See Also
|
|
@@ -21734,13 +21861,15 @@ Classification guides discovery and bundle selection. It is not a reason to remo
|
|
|
21734
21861
|
| `@vielzeug/refine/frameworks/vue` | Register typed Vue global components | Types only | Does not install a Vue plugin |
|
|
21735
21862
|
| `@vielzeug/refine/theme` | `createThemeController()`: light/dark/system document theme | Sync | Does not persist the preference or set an accent color |
|
|
21736
21863
|
| `eventFieldValue()` / `eventFieldChecked()` | Read a form control's value/checked from `event.currentTarget` | Sync | Exported from the package root; guards non-field targets |
|
|
21864
|
+
| `animateReflow()` | Token-driven FLIP reflow for keyed lists | Async (next frame) | Exported from the package root; elements need stable keys or it correctly does nothing |
|
|
21865
|
+
| `setMotionMode()` / `getMotionMode()` | Read/write the `data-motion` attribute on `` | Sync | Exported from the package root; an unknown mode throws `RangeError` |
|
|
21737
21866
|
| `RefineError` | Base class for package-defined public errors | Sync | Component configuration warnings do not throw this error |
|
|
21738
21867
|
|
|
21739
21868
|
## Package Entry Point
|
|
21740
21869
|
|
|
21741
21870
|
| Import | Purpose |
|
|
21742
21871
|
| --- | --- |
|
|
21743
|
-
| `@vielzeug/refine` | Export `registerIcons`, icon definition types, `RefineError`, and the field readers without registering components |
|
|
21872
|
+
| `@vielzeug/refine` | Export `registerIcons`, icon definition types, `RefineError`, `animateReflow`, the motion-mode functions, and the field readers without registering components |
|
|
21744
21873
|
| `@vielzeug/refine/` | Register one component and export its tag constant, props, events, and related types |
|
|
21745
21874
|
| `@vielzeug/refine/theme` | `createThemeController()` and its theme types |
|
|
21746
21875
|
| `@vielzeug/refine/tokens.css` | Required global design contract |
|
|
@@ -21809,12 +21938,14 @@ import type { OreButtonProps } from '@vielzeug/refine/button';
|
|
|
21809
21938
|
|
|
21810
21939
|
| Area | Components |
|
|
21811
21940
|
| --- | --- |
|
|
21812
|
-
| Content | `
|
|
21813
|
-
| Disclosure | `accordion`, `accordion-item`, `tabs`, `tab-item`, `tab-panel` |
|
|
21941
|
+
| Content | `accordion`, `avatar`, `card`, `carousel`, `chat-message`, `chat-panel`, `code-window`, `copy-command`, `icon`, `keyboard-key`, `list`, `marquee`, `qr-code`, `rank-list`, `speech-player`, `speed-reading`, `stats`, `table`, `text` |
|
|
21814
21942
|
| Feedback | `alert`, `async`, `badge`, `chip`, `cookie-banner`, `password-strength`, `progress`, `skeleton`, `toast`, `typing-indicator` |
|
|
21815
|
-
| Inputs | `button`, `
|
|
21816
|
-
| Layout | `box`, `grid`, `
|
|
21817
|
-
|
|
|
21943
|
+
| Inputs | `button`, `calendar`, `checkbox`, `combobox`, `counter`, `datagrid`, `date-picker`, `file-input`, `input`, `message-composer`, `number-input`, `otp-input`, `qr-scanner`, `query-bar`, `radio`, `rating`, `select`, `slider`, `switch`, `textarea`, `time-picker` |
|
|
21944
|
+
| Layout | `box`, `grid`, `navbar`, `separator`, `sidebar` |
|
|
21945
|
+
| Navigation | `breadcrumb`, `navigation-menu`, `pagination`, `stepper`, `tabs` |
|
|
21946
|
+
| Overlay | `command-palette`, `dialog`, `drawer`, `menu`, `popover`, `spotlight`, `tooltip`, `tour` |
|
|
21947
|
+
|
|
21948
|
+
Each row lists the entry points that own a documentation page. Sub-element entries (`accordion-item`, `tab-item`, `avatar-group`, `list-item`, `step`, and the rest) are documented on their parent's page and share its category.
|
|
21818
21949
|
|
|
21819
21950
|
Each component page lists its attributes, JavaScript properties, events, slots, parts, and CSS custom properties.
|
|
21820
21951
|
|
|
@@ -21872,12 +22003,54 @@ input.addEventListener('input', (event) => {
|
|
|
21872
22003
|
|
|
21873
22004
|
Guarded readers for the standard `input`/`change` event pattern above: they read `value`/`checked` from `event.currentTarget` only when the target actually carries it, so a handler wired to the wrong element yields `undefined`/`false` instead of a crash or a lie. Exported from the package root, which registers no components.
|
|
21874
22005
|
|
|
22006
|
+
---
|
|
22007
|
+
|
|
22008
|
+
### `animateReflow(host, signal, options)`
|
|
22009
|
+
|
|
22010
|
+
```ts
|
|
22011
|
+
import { animateReflow } from '@vielzeug/refine';
|
|
22012
|
+
|
|
22013
|
+
const reflow = animateReflow(list, abortController.signal, {
|
|
22014
|
+
elements: () => [...list.querySelectorAll('li')],
|
|
22015
|
+
getKey: (item) => item.dataset.id,
|
|
22016
|
+
});
|
|
22017
|
+
reflow.run(() => renderItems(nextItems));
|
|
22018
|
+
```
|
|
22019
|
+
|
|
22020
|
+
Token-driven FLIP reflow for keyed lists: captures the current layout, runs `mutate`, then animates the tracked elements into their new positions on the next frame. The same helper the DataGrid, command palette, and toast stack use.
|
|
22021
|
+
|
|
22022
|
+
| Parameter | Type | Description |
|
|
22023
|
+
| --- | --- | --- |
|
|
22024
|
+
| `host` | `HTMLElement` | Element whose computed style carries the timing tokens |
|
|
22025
|
+
| `signal` | `AbortSignal` | Aborting cancels in-flight animations |
|
|
22026
|
+
| `options.elements` | `() => HTMLElement[]` | Tracked elements, read live on both sides of the mutation |
|
|
22027
|
+
| `options.getKey` | `(el) => string \| undefined` | Stable identity per element; all-or-nothing |
|
|
22028
|
+
| `options.durationToken` | `string?` | Duration token, default `'--duration-200'` |
|
|
22029
|
+
| `options.easingToken` | `string?` | Easing token, default `'--ease-move'` |
|
|
22030
|
+
| `options.stagger` | `number?` | Per-element delay in ms, default `0` |
|
|
22031
|
+
|
|
22032
|
+
**Returns** a `Reflow` handle with one method: `run(mutate)` (sync; the animation is fire-and-forget). Timing is read from the tokens at animation time, so Motion Mode reduction skips the reflow instead of playing it instantly. Every path that cannot animate (no elements, missing keys, zeroed tokens, aborted signal, no Web Animations API) still runs `mutate` exactly once and never throws. See [Animation & Motion → List Reflow](./animation#list-reflow-animatereflow) for behavior details.
|
|
22033
|
+
|
|
22034
|
+
---
|
|
22035
|
+
|
|
22036
|
+
### `setMotionMode(mode)` / `getMotionMode()`
|
|
22037
|
+
|
|
22038
|
+
```ts
|
|
22039
|
+
import { getMotionMode, setMotionMode } from '@vielzeug/refine';
|
|
22040
|
+
|
|
22041
|
+
setMotionMode('reduced'); // returns the applied mode
|
|
22042
|
+
```
|
|
22043
|
+
|
|
22044
|
+
Read/write the `data-motion` attribute on `` (`'full' | 'reduced' | 'system'`; `'system'` removes the attribute). An unknown mode throws `RangeError`. The attribute drives the token layer: see [Animation & Motion → Motion Mode](./animation#motion-mode).
|
|
22045
|
+
|
|
21875
22046
|
## Types
|
|
21876
22047
|
|
|
21877
22048
|
Component props follow the `OreProps` naming pattern. Event maps follow `OreEvents`. Import both from the component subpath that owns them.
|
|
21878
22049
|
|
|
21879
22050
|
`RefineElementMap`, `RefineReactIntrinsicElements`, and `RefineVueGlobalComponents` are exported from their respective `frameworks/*` type entry points.
|
|
21880
22051
|
|
|
22052
|
+
The package root also exports `Reflow` (the `run()` handle), `ReflowOptions` (its options object), and `MotionMode` (`'full' | 'reduced' | 'system'`).
|
|
22053
|
+
|
|
21881
22054
|
## Errors
|
|
21882
22055
|
|
|
21883
22056
|
### `RefineError`
|
|
@@ -22119,6 +22292,10 @@ const loadingEffect = effect(() => {
|
|
|
22119
22292
|
loadingEffect.dispose();
|
|
22120
22293
|
```
|
|
22121
22294
|
|
|
22295
|
+
### Necromancer
|
|
22296
|
+
|
|
22297
|
+
Use Necromancer directly when you need animation handles, groups, or explicit keyframes. Refine's [`animateReflow`](./animation#list-reflow-animatereflow) is the token-driven wrapper over its FLIP primitive and is enough for keyed lists that reflow.
|
|
22298
|
+
|
|
22122
22299
|
## Best Practices
|
|
22123
22300
|
|
|
22124
22301
|
- **Import** `tokens.css` once before rendering components.
|
package/data/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vielzeug
|
|
2
2
|
|
|
3
|
-
> 43 focused TypeScript packages. Version: 26.10.
|
|
3
|
+
> 43 focused TypeScript packages. Version: 26.10.21
|
|
4
4
|
|
|
5
5
|
Install any package independently: `pnpm add @vielzeug/<name>`
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ Install any package independently: `pnpm add @vielzeug/<name>`
|
|
|
31
31
|
- [@vielzeug/orbit](/orbit/): Floating positioning with lifecycle-owned geometry and middleware.
|
|
32
32
|
- [@vielzeug/ore](/ore/): Functional custom-element authoring with typed props, reactive templates, lifecycle helpers, and testing utilities.
|
|
33
33
|
- [@vielzeug/postmaster](/postmaster/): Typed durable job outbox with leased processing, retries, and dead-letter recovery for browser applications.
|
|
34
|
-
- [@vielzeug/prism](/prism/): Responsive SVG charts with explicit updates: line, bar, area, scatter, pie, radar, sparkline
|
|
34
|
+
- [@vielzeug/prism](/prism/): Responsive SVG charts with explicit updates: line, bar, area, scatter, pie, radar, heatmap, sparkline
|
|
35
35
|
- [@vielzeug/pulse](/pulse/): Explicitly connected, typed WebSocket sessions with scoped channels, ref-counted rooms with reactive presence, reconnect restoration, and heartbeat.
|
|
36
36
|
- [@vielzeug/refine](/refine/): Accessible, themeable web components built with Ore for framework and vanilla DOM apps.
|
|
37
37
|
- [@vielzeug/ripple](/ripple/): Framework-agnostic signals, effects, async resources, scopes, and structural bridges.
|
package/data/manifest.json
CHANGED