@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 CHANGED
@@ -1,11 +1,17 @@
1
1
  # @x12i/diagrams
2
2
 
3
- Diagram document schema for the Unified UI Kit, plus a text outline for screen
4
- readers.
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
- > **Status: foundation.** This package ships the versioned JSON schema and the
7
- > outline generator. The node canvas, Mermaid and Excalidraw wrappers are not
8
- > built yet.
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 will generate this outline, so a diagram has a form screen readers
31
- can read (spec section 10).
36
+ Every canvas generates this outline, so a diagram has a form screen readers can
37
+ read (spec section 10).
32
38
 
33
- ## Planned engines
39
+ ## Engines
34
40
 
35
- | Tier | Engine |
36
- | --- | --- |
37
- | Text to diagram | Mermaid (MIT) |
38
- | Node canvas | `@xyflow/react` (MIT) |
39
- | Freeform whiteboard | Excalidraw (MIT) |
40
- | Specialized layouts | D3 hierarchy (ISC) |
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.