@hattoriai/poney-react 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.d.ts +58 -804
- package/dist/index.js +65 -2291
- package/dist/index.js.map +1 -1
- package/package.json +8 -20
- package/dist/poney.css +0 -211
- package/dist/poney.min.css +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @hattoriai/poney-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Poney's drawings in React: every diagram type and walkthrough scene from `@hattoriai/poney-diagrams`, as React components. Your app is the host: it passes the selection and interaction through `RenderProvider`; without them a diagram is a still picture.
|
|
4
4
|
|
|
5
5
|
```tsx
|
|
6
|
-
import '@hattoriai/poney-
|
|
6
|
+
import '@hattoriai/poney-diagrams/styles.css'
|
|
7
7
|
import { RenderProvider, diagramFor } from '@hattoriai/poney-react'
|
|
8
8
|
import { indexOf } from '@hattoriai/poney-core'
|
|
9
9
|
import { layoutView } from '@hattoriai/poney-layout'
|
|
@@ -16,6 +16,6 @@ const { Renderer } = diagramFor(view)!
|
|
|
16
16
|
</RenderProvider>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The
|
|
19
|
+
The drawings are the same SVG as in every other host. Handlers that `bind` gives get React's events. `iconFor` and each diagram's `icon` are Lucide React components. React 18 or 19 is a peer dependency.
|
|
20
20
|
|
|
21
21
|
Part of [Poney](https://github.com/hattoriai/poney): the format, the renderers, and tools to explain software. MIT licensed.
|