schematex 0.6.6 → 0.6.8
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 +115 -3
- package/README.zh-CN.md +783 -0
- package/dist/ai/ai-sdk.cjs +11 -11
- package/dist/ai/ai-sdk.d.cts +4 -4
- package/dist/ai/ai-sdk.d.ts +4 -4
- package/dist/ai/ai-sdk.js +6 -6
- package/dist/ai/index.cjs +17 -17
- package/dist/ai/index.d.cts +3 -3
- package/dist/ai/index.d.ts +3 -3
- package/dist/ai/index.js +6 -6
- package/dist/{api-QFMTlIi7.d.ts → api-DIJM_mqp.d.ts} +1 -1
- package/dist/{api-DA4-U-jn.d.cts → api-JaBtsUT8.d.cts} +1 -1
- package/dist/browser.cjs +12 -12
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +6 -6
- package/dist/{chunk-KJZCRHNR.js → chunk-2TUZ3QJA.js} +623 -9
- package/dist/chunk-2TUZ3QJA.js.map +1 -0
- package/dist/{chunk-EUVUO3CL.cjs → chunk-34O3C6OC.cjs} +2 -2
- package/dist/{chunk-EUVUO3CL.cjs.map → chunk-34O3C6OC.cjs.map} +1 -1
- package/dist/{chunk-MLLARXOI.cjs → chunk-AGBY7KLL.cjs} +131 -27
- package/dist/chunk-AGBY7KLL.cjs.map +1 -0
- package/dist/{chunk-EPKIJEH7.js → chunk-C7V57V6O.js} +54 -8
- package/dist/chunk-C7V57V6O.js.map +1 -0
- package/dist/{chunk-CMZKAASF.cjs → chunk-EDXDFKYO.cjs} +16 -8
- package/dist/chunk-EDXDFKYO.cjs.map +1 -0
- package/dist/{chunk-FOPOOV2P.js → chunk-J2TT7PGI.js} +127 -23
- package/dist/chunk-J2TT7PGI.js.map +1 -0
- package/dist/{chunk-DO2DDHTQ.cjs → chunk-J3EPFZPX.cjs} +623 -8
- package/dist/chunk-J3EPFZPX.cjs.map +1 -0
- package/dist/{chunk-KCHUQXS3.js → chunk-JTGTWBAD.js} +2 -2
- package/dist/{chunk-KCHUQXS3.js.map → chunk-JTGTWBAD.js.map} +1 -1
- package/dist/{chunk-7DAIEDQP.js → chunk-MPCSWRZC.js} +75 -13
- package/dist/chunk-MPCSWRZC.js.map +1 -0
- package/dist/{chunk-3HZW6K5I.js → chunk-QZ2OBNAS.js} +14 -6
- package/dist/chunk-QZ2OBNAS.js.map +1 -0
- package/dist/{chunk-SUIDD2C5.cjs → chunk-SHMG7BVF.cjs} +54 -8
- package/dist/chunk-SHMG7BVF.cjs.map +1 -0
- package/dist/{chunk-XYHCAJMI.cjs → chunk-UHPGWO77.cjs} +75 -12
- package/dist/chunk-UHPGWO77.cjs.map +1 -0
- package/dist/{diagnostics-CSznf_sl.d.cts → diagnostics-BKRow1ur.d.cts} +14 -0
- package/dist/{diagnostics-CSznf_sl.d.ts → diagnostics-BKRow1ur.d.ts} +14 -0
- package/dist/diagrams/blockdiagram/index.cjs +5 -5
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/blockdiagram/index.js +1 -1
- package/dist/diagrams/circuit/index.cjs +11 -7
- package/dist/diagrams/circuit/index.d.cts +4 -2
- package/dist/diagrams/circuit/index.d.ts +4 -2
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.cjs +10 -6
- package/dist/diagrams/orgchart/index.d.cts +27 -2
- package/dist/diagrams/orgchart/index.d.ts +27 -2
- package/dist/diagrams/orgchart/index.js +1 -1
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/sld/index.cjs +7 -7
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sld/index.js +1 -1
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/{index-CDpYuU7l.d.cts → index-DU2h1Y-a.d.cts} +1 -1
- package/dist/{index-jTwjudTW.d.ts → index-Dq3Mfxay.d.ts} +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/react.cjs +6 -6
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +5 -5
- package/dist/{tools-CbuSbW6B.d.cts → tools-A0HRZ8jj.d.ts} +11 -2
- package/dist/{tools-D344vOzR.d.ts → tools-OzOQnlnV.d.cts} +11 -2
- package/package.json +2 -2
- package/dist/chunk-3HZW6K5I.js.map +0 -1
- package/dist/chunk-7DAIEDQP.js.map +0 -1
- package/dist/chunk-CMZKAASF.cjs.map +0 -1
- package/dist/chunk-DO2DDHTQ.cjs.map +0 -1
- package/dist/chunk-EPKIJEH7.js.map +0 -1
- package/dist/chunk-FOPOOV2P.js.map +0 -1
- package/dist/chunk-KJZCRHNR.js.map +0 -1
- package/dist/chunk-MLLARXOI.cjs.map +0 -1
- package/dist/chunk-SUIDD2C5.cjs.map +0 -1
- package/dist/chunk-XYHCAJMI.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
<a href="https://www.npmjs.com/package/schematex">npm</a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
+
<p align="center">
|
|
19
|
+
<strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
18
22
|
<p align="center">
|
|
19
23
|
<a href="https://www.npmjs.com/package/schematex"><img src="https://img.shields.io/npm/v/schematex.svg?color=cb3837&label=npm" alt="npm"></a>
|
|
20
24
|
<a href="https://bundlephobia.com/package/schematex"><img src="https://img.shields.io/bundlephobia/minzip/schematex?label=gzip" alt="bundle size"></a>
|
|
@@ -29,17 +33,34 @@
|
|
|
29
33
|
|
|
30
34
|
---
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
<<<<<<< Updated upstream
|
|
37
|
+
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical. **36 diagram families** spanning medicine, engineering, law, and analysis:
|
|
38
|
+
|
|
39
|
+
- 👪 **Relationships** — genograms, ecomaps, pedigrees, sociograms, phylogenetic trees
|
|
40
|
+
- ⚡ **Electrical & Industrial** — ladder logic, single-line diagrams, circuit schematics, logic gates, timing, block diagrams, **FBD**, **SFC**, breadboard, **P&ID** (ISA-5.1)
|
|
41
|
+
- 🔄 **Behavior & process** — UML 2.5 / Harel **state diagrams** (Mermaid-compatible superset), **BPMN 2.0** (OMG), **use case diagrams** (UML 2.5.1 §18), **sequence diagrams** (UML 2.5.1 §17 — all 12 combined fragments + `ref`)
|
|
42
|
+
- 🧩 **Software & data modeling** — **UML class diagrams** (UML 2.5.1 §9–§11, namespaces + 6 relationships), **ERD** crow's-foot notation
|
|
43
|
+
- 🏢 **Corporate & Legal** — entity structures, cap tables, org charts
|
|
44
|
+
- 🐟 **Causality & Analysis** — fishbone / Ishikawa, decision trees (Howard-Raiffa EV · CART/sklearn · taxonomy), Venn / Euler
|
|
45
|
+
- 🛡️ **Risk & Reliability** — **fault trees** (NUREG-0492 / IEC 61025) that *compute* MOCUS minimal cut sets + P(top), **bowtie** barrier-based risk (CCPS / Energy Institute 2018)
|
|
46
|
+
=======
|
|
47
|
+
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical. 36 diagram families across eleven domains:
|
|
33
48
|
|
|
34
49
|
- 👪 **Relationships** — genograms, ecomaps, pedigrees, sociograms, phylogenetic trees
|
|
35
50
|
- ⚡ **Electrical & Industrial** — ladder logic, single-line diagrams, circuit schematics, logic gates, timing, block diagrams, **FBD**, **SFC**, breadboard, **P&ID** (ISA-5.1)
|
|
36
51
|
- 🏢 **Corporate & Legal** — entity structures, cap tables
|
|
37
52
|
- 🐟 **Causality & Analysis** — fishbone / Ishikawa, decision trees (Howard-Raiffa EV · CART/sklearn · taxonomy)
|
|
38
|
-
-
|
|
53
|
+
- 🧩 **Software & UML** — **UML class diagrams** (UML 2.5.1 §9–§11), **use case diagrams** (§18), **sequence diagrams** (§17 — all 12 combined fragments + `ref`), UML 2.5 / Harel **state diagrams**
|
|
54
|
+
- 🔄 **Behavior modeling** — **BPMN 2.0** (OMG)
|
|
39
55
|
- 🗄️ **Data modeling** — ERD crow's-foot notation
|
|
56
|
+
- 🛡️ **Risk & Reliability** — **Fault Tree Analysis** (NUREG-0492 / IEC 61025) with minimal cut sets + P(top), and **bowtie risk diagrams** (CCPS / Energy Institute 2018)
|
|
57
|
+
>>>>>>> Stashed changes
|
|
40
58
|
- 🗓️ **Project management** — **PERT / CPM** networks (PMBOK 7) that *compute* the schedule: ES/EF/LS/LF, slack, critical path, three-point estimation, swimlanes, time-scaled layout
|
|
41
59
|
- 🖧 **Network & Infrastructure** — **network topology** diagrams (Cisco-convention icons) with device/link/port integrity, IP-CCTV camera systems, three-tier campus, spine-leaf fabric, subnets & VLANs
|
|
60
|
+
- ◉ **Concurrency** — **Petri nets** (Murata 1989 / ISO-IEC 15909) that *compute* enablement and fire token sequences
|
|
61
|
+
- 🔬 **Research** — **PRISMA 2020** systematic-review flow diagrams
|
|
42
62
|
- 📅 **Timelines** — proportional / equidistant / log axis · swimlane · gantt · lollipop · BC dates · geological Ma scale
|
|
63
|
+
- 🧠 **Knowledge & strategy** — mindmaps, 2×2 / N×M matrices, flowcharts
|
|
43
64
|
|
|
44
65
|
Mermaid draws generic flowcharts. Schematex draws the diagrams doctors, engineers, and lawyers actually use — a genogram a genetic counselor accepts clinically, ladder logic that maps 1:1 to IEC 61131-3, a cap table that survives a Series A review.
|
|
45
66
|
|
|
@@ -74,7 +95,11 @@ import { render } from 'schematex/genogram';
|
|
|
74
95
|
|
|
75
96
|
## Gallery
|
|
76
97
|
|
|
77
|
-
|
|
98
|
+
<<<<<<< Updated upstream
|
|
99
|
+
All 36 diagram types share one unified pipeline. A selection is shown below — **try any of them live at [schematex.dev/playground](https://schematex.dev/playground).**
|
|
100
|
+
=======
|
|
101
|
+
36 diagram types, one unified pipeline. **Try any of these live at [schematex.dev/playground](https://schematex.dev/playground).**
|
|
102
|
+
>>>>>>> Stashed changes
|
|
78
103
|
|
|
79
104
|
### 👪 Genogram — *McGoldrick family-systems standard*
|
|
80
105
|
|
|
@@ -576,6 +601,93 @@ network "Acme HQ — CCTV"
|
|
|
576
601
|
|
|
577
602
|
[Network topology syntax →](https://schematex.dev/docs/network)
|
|
578
603
|
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
### 📐 UML class diagram — *UML 2.5.1 §9–§11*
|
|
607
|
+
|
|
608
|
+
Classifiers (class / interface / enum / datatype / primitive), all six relationship kinds with standard-correct adornments, and a **generalization-driven layered layout** where parents float to the top and connectors never cross a box. Namespaces render as nested containment frames. Accepts the Mermaid `classDiagram` glyphs for one-line migration.
|
|
609
|
+
|
|
610
|
+
```
|
|
611
|
+
umlclass
|
|
612
|
+
title: "Shape hierarchy"
|
|
613
|
+
|
|
614
|
+
«interface» Shape {
|
|
615
|
+
+ area() : double
|
|
616
|
+
+ perimeter() : double
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
abstract class AbstractShape {
|
|
620
|
+
# name : String
|
|
621
|
+
+ area() : double {abstract}
|
|
622
|
+
+ perimeter() : double {abstract}
|
|
623
|
+
+ describe() : String
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
class Circle {
|
|
627
|
+
+ radius : double
|
|
628
|
+
+ area() : double
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
class Square {
|
|
632
|
+
+ side : double
|
|
633
|
+
+ area() : double
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
Shape <|.. AbstractShape
|
|
637
|
+
AbstractShape <|-- Circle
|
|
638
|
+
AbstractShape <|-- Square
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+

|
|
642
|
+
|
|
643
|
+
[UML class syntax →](https://schematex.dev/docs/umlclass)
|
|
644
|
+
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
### 🛡️ Fault tree — *NUREG-0492 / IEC 61025 · MOCUS*
|
|
648
|
+
|
|
649
|
+
Reliability fault trees where the engine **computes the answer**: it runs MOCUS to enumerate the minimal cut sets (red boxes), flags single points of failure, and computes the top-event probability. AND domes, OR/XOR shields, k-of-n voting, INHIBIT, PAND.
|
|
650
|
+
|
|
651
|
+
```
|
|
652
|
+
faulttree "Both pumps fail"
|
|
653
|
+
analysis: cutsets, probability
|
|
654
|
+
top T "Both redundant pumps fail" = AND(PA, PB)
|
|
655
|
+
basic PA "Pump A fails" p: 0.01
|
|
656
|
+
basic PB "Pump B fails" p: 0.01
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+

|
|
660
|
+
|
|
661
|
+
[Fault tree syntax →](https://schematex.dev/docs/faulttree)
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
### 🎀 Bowtie — *CCPS / Energy Institute 2018 barrier model*
|
|
666
|
+
|
|
667
|
+
Barrier-based risk management for one major-accident scenario: threats fan in through preventative-barrier chains (left), consequences fan out through mitigative chains (right), around a central top-event knot. **Correct by construction** — a threat or consequence drawn with no barrier is rejected, not silently shown.
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
bowtie "LPG storage — loss of containment"
|
|
671
|
+
hazard "LPG stored under pressure"
|
|
672
|
+
topevent "Loss of containment"
|
|
673
|
+
threat "Corrosion of vessel wall"
|
|
674
|
+
prevent "Corrosion-resistant coating"
|
|
675
|
+
prevent "UT thickness inspection"
|
|
676
|
+
threat "Overpressure during filling"
|
|
677
|
+
prevent "High-pressure trip (SIL 2)"
|
|
678
|
+
prevent "Pressure relief valve"
|
|
679
|
+
consequence "Jet fire"
|
|
680
|
+
mitigate "Gas detection + ESD"
|
|
681
|
+
mitigate "Deluge / water spray"
|
|
682
|
+
consequence "Vapour cloud explosion"
|
|
683
|
+
mitigate "Ignition-source control (ATEX)"
|
|
684
|
+
mitigate "Blast-resistant control room"
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+

|
|
688
|
+
|
|
689
|
+
[Bowtie syntax →](https://schematex.dev/docs/bowtie)
|
|
690
|
+
|
|
579
691
|
## Why SchemaTex?
|
|
580
692
|
|
|
581
693
|
**Generic flowchart tools can't draw professional diagrams.** Every diagram domain has published standards — symbol conventions, layout rules, labelling grammars — and when you ignore them, domain experts reject the output:
|