@x12i/diagrams 1.0.0 → 1.1.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 +20 -14
- package/dist/chunk-3DJFQRU3.js +2708 -0
- package/dist/chunk-3DJFQRU3.js.map +1 -0
- package/dist/index.d.ts +67 -54
- package/dist/index.js +204 -45
- package/dist/index.js.map +1 -1
- package/dist/messages-ZCyCfyO0.d.ts +857 -0
- package/dist/react.d.ts +348 -0
- package/dist/react.js +2525 -0
- package/dist/react.js.map +1 -0
- package/dist/styles.css +1389 -0
- package/package.json +51 -4
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# @x12i/diagrams
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Diagrams for the Unified UI Kit: one versioned JSON diagram document, a headless
|
|
4
|
+
core, and accessible React views themed by kit tokens.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
| Import | Contains |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| `@x12i/diagrams` | Schema, validation, layout, geometry, history, mutations, JSON and static SVG export, the text outline. No React, no DOM. |
|
|
9
|
+
| `@x12i/diagrams/react` | `DiagramCanvas` (node canvas on `@xyflow/react`), `StaticDiagram`, `DiagramOutline`, `MermaidDiagram`, `useDiagramHistory`. Starts with `"use client"`. |
|
|
10
|
+
| `@x12i/diagrams/styles.css` | The one stylesheet. |
|
|
11
|
+
|
|
12
|
+
`@x12i/ui` and React are peer dependencies. `MermaidDiagram` takes a loader, so
|
|
13
|
+
Mermaid is only installed by apps that use it. The Excalidraw whiteboard is not
|
|
14
|
+
built yet.
|
|
9
15
|
|
|
10
16
|
```ts
|
|
11
17
|
import { defineDiagram, diagramToOutline } from "@x12i/diagrams";
|
|
@@ -27,16 +33,16 @@ const diagram = defineDiagram({
|
|
|
27
33
|
diagramToOutline(diagram); // ["Order placed to Review to Shipped"]
|
|
28
34
|
```
|
|
29
35
|
|
|
30
|
-
Every canvas
|
|
31
|
-
|
|
36
|
+
Every canvas generates this outline, so a diagram has a form screen readers can
|
|
37
|
+
read (spec section 10).
|
|
32
38
|
|
|
33
|
-
##
|
|
39
|
+
## Engines
|
|
34
40
|
|
|
35
|
-
| Tier | Engine |
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| Text to diagram | Mermaid (MIT) |
|
|
38
|
-
| Node canvas | `@xyflow/react` (MIT) |
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
+
| Tier | Engine | Status |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Text to diagram | Mermaid (MIT) | Built, loaded by the app |
|
|
44
|
+
| Node canvas | `@xyflow/react` (MIT) | Built |
|
|
45
|
+
| Automatic layout | dagre (MIT), D3 hierarchy (ISC) | Built |
|
|
46
|
+
| Freeform whiteboard | Excalidraw (MIT) | Planned |
|
|
41
47
|
|
|
42
48
|
tldraw is excluded on license grounds.
|