meshai/work/dashboard-frontend/node_modules/react-smooth/README.md
malice 2c46c9104d
feat(region-routing): unified per-family routing cards + region-scoped family→channel routing (#87)
* feat(region-routing): P1 tagging + region_routes primitive + read/write API + preview launcher

- config.py: add Coverage.region_tagging (bool=False); add RegionRouteMatrix
  dataclass (enabled, cells) above NotificationsConfig; add region_routes field
  to NotificationsConfig; add explicit hydration branch for region_routes in
  _dict_to_dataclass mirroring destinations pattern.

- coverage_area.py: add MonitoringArea.name (str|None=None, frozen); update
  areas_from_config to preserve name; refactor inline geom extraction from
  classify_event_areas into shared _event_geom_json helper; add
  matching_area_names(geom_json, areas)->list[str] (additive, all named
  matches, config-order, deduped; gate unchanged); add event_region_names
  convenience wrapper.

- coverage_filter.py: add region_tagging ctor kwarg; stamp event.region/
  regions before the gate when region_tagging=True and areas non-empty and
  not event.regions (never clobbers satpass preset).

- pipeline/__init__.py: wire region_tagging into CoverageFilter construction.

- notification_routes.py: add GET /notifications/regions (named coverage area
  names, config-order, deduped); GET /notifications/region-routing (matrix as
  JSON); POST /notifications/region-routing (explicit RMW — only region_routes
  changes, toggles/rules/destinations survive).

- scripts/preview_dashboard.py: mesh-free launcher — dashboard API only, no
  mesh connector, no broadcast loop; vite runs separately.

All 87 coverage tests pass; 300 total pass; 6 pre-existing failures unchanged
(adapter config count mismatch + MeshCore EventType.NEW_CONTACT).

* feat(region-routing): manual region x family matrix editor page

Adds RegionRoutingMatrix.tsx — a plain editor over the region_routes
config primitive. Rows = families (via useFamilies()), cols = regions
(from GET /api/notifications/regions). Each cell exposes MT channel
(ChannelPicker single + includeDisabled), MC channel name (text input),
min_severity select (routine/priority/critical/immediate), and an enabled
checkbox. Only cells where MT or MC is set are included in the sparse
POST payload. Master enable toggle maps to top-level enabled. MT budget
guard warns when more than 7 distinct MT indices are in use. Sticky
family column; horizontal scroll for wide region sets.

Registers route /region-routing in App.tsx and adds "Region Routing"
nav entry (Map icon) under the Meshtastic section in Layout.tsx,
immediately after Routing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(region-routing): regions endpoint reads saved (disk) coverage so routing columns are dynamic without a bot restart; preview reloads config after writes

* feat(routing): unify MT/MC routing into per-family cards; region routing as an in-card expand; remove rules/destinations UI + standalone page

* refactor(routing): move Meshtastic Routing from /notifications to /meshtastic/routing (mirror /meshcore/routing); redirect legacy path

* feat(region-routing): dispatcher honors region_routes matrix (authoritative-on-match, per-region cooldown, per-channel dedup); non-matrix path unchanged

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(region-routing): matrix dedup key must match boot-restore 2-tuple form (prevents restart re-broadcast flood); regression test

---------

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 16:52:03 -06:00

239 lines
5 KiB
Markdown

# react-smooth
react-smooth is a animation library work on React.
[![npm version](https://badge.fury.io/js/react-smooth.png)](https://badge.fury.io/js/react-smooth)
[![build status](https://travis-ci.org/recharts/react-smooth.svg)](https://travis-ci.org/recharts/react-smooth)
[![npm downloads](https://img.shields.io/npm/dt/react-smooth.svg?style=flat-square)](https://www.npmjs.com/package/react-smooth)
[![Gitter](https://badges.gitter.im/recharts/react-smooth.svg)](https://gitter.im/recharts/react-smooth?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
## install
```
npm install --save react-smooth
```
## Usage
simple animation
```jsx
<Animate to="0" from="1" attributeName="opacity">
<div />
</Animate>
```
steps animation
```jsx
const steps = [{
style: {
opacity: 0,
},
duration: 400,
}, {
style: {
opacity: 1,
transform: 'translate(0, 0)',
},
duration: 1000,
}, {
style: {
transform: 'translate(100px, 100px)',
},
duration: 1200,
}];
<Animate steps={steps}>
<div />
</Animate>
```
children can be a function
```jsx
<Animate from={{ opacity: 0 }}
to={{ opacity: 1 }}
easing="ease-in"
>
{
({ opacity }) => <div style={{ opacity }}></div>
}
</Animate>
```
you can configure js timing function
```js
const easing = configureBezier(0.1, 0.1, 0.5, 0.8);
const easing = configureSpring({ stiff: 170, damping: 20 });
```
group animation
```jsx
const appear = {
from: 0,
to: 1,
attributeName: 'opacity',
};
const leave = {
steps: [{
style: {
transform: 'translateX(0)',
},
}, {
duration: 1000,
style: {
transform: 'translateX(300)',
height: 50,
},
}, {
duration: 2000,
style: {
height: 0,
},
}]
}
<AnimateGroup appear={appear} leave={leave}>
{ list }
</AnimateGroup>
/*
* @description: add compatible prefix in style
*
* style = { transform: xxx, ...others };
*
* translatedStyle = {
* WebkitTransform: xxx,
* MozTransform: xxx,
* OTransform: xxx,
* msTransform: xxx,
* ...others,
* };
*/
const translatedStyle = translateStyle(style);
```
## API
### Animate
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 50px">name</th>
<th style="width: 100px">type</th>
<th style="width: 50px">default</th>
<th style="width: 50px">description</th>
</tr>
</thead>
<tbody>
<tr>
<td>from</td>
<td>string or object</td>
<td>''</td>
<td>set the initial style of the children</td>
</tr>
<tr>
<td>to</td>
<td>string or object</td>
<td>''</td>
<td>set the final style of the children</td>
</tr>
<tr>
<td>canBegin</td>
<td>boolean</td>
<td>true</td>
<td>whether the animation is start</td>
</tr>
<tr>
<td>begin</td>
<td>number</td>
<td>0</td>
<td>animation delay time</td>
</tr>
<tr>
<td>duration</td>
<td>number</td>
<td>1000</td>
<td>animation duration</td>
</tr>
<tr>
<td>steps</td>
<td>array</td>
<td>[]</td>
<td>animation keyframes</td>
</tr>
<tr>
<td>onAnimationEnd</td>
<td>function</td>
<td>() => null</td>
<td>called when animation finished</td>
</tr>
<tr>
<td>attributeName</td>
<td>string</td>
<td>''</td>
<td>style property</td>
</tr>
<tr>
<td>easing</td>
<td>string</td>
<td>'ease'</td>
<td>the animation timing function, support css timing function temporary</td>
</tr>
<tr>
<td>isActive</td>
<td>boolean</td>
<td>true</td>
<td>whether the animation is active</td>
</tr>
<tr>
<td>children</td>
<td>element</td>
<td></td>
<td>support only child temporary</td>
</tr>
</tbody>
</table>
### AnimateGroup
<table class="table table-bordered table-striped animate-group">
<thead>
<tr>
<th style="width: 40px">name</th>
<th style="width: 40px">type</th>
<th style="width: 40px">default</th>
<th style="width: 100px">description</th>
</tr>
</thead>
<tbody>
<tr>
<td>appear</td>
<td>object</td>
<td>undefined</td>
<td>configure element appear animation</td>
</tr>
<tr>
<td>enter</td>
<td>object</td>
<td>undefined</td>
<td>configure element appear animation</td>
</tr>
<tr>
<td>leave</td>
<td>object</td>
<td>undefined</td>
<td>configure element appear animation</td>
</tr>
</tbody>
</table>
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2015-2021 Recharts Group