schematex 0.5.2 → 0.6.1
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 +75 -1
- package/dist/ai/ai-sdk.cjs +23 -23
- package/dist/ai/ai-sdk.d.cts +4 -4
- package/dist/ai/ai-sdk.d.ts +4 -4
- package/dist/ai/ai-sdk.js +18 -18
- package/dist/ai/index.cjs +35 -27
- package/dist/ai/index.d.cts +4 -4
- package/dist/ai/index.d.ts +4 -4
- package/dist/ai/index.js +18 -18
- package/dist/{api-Cr_MxttI.d.ts → api-BEJTXyBA.d.cts} +3 -40
- package/dist/{api-C5SECOxZ.d.cts → api-DFrSR3lw.d.ts} +3 -40
- package/dist/browser.cjs +24 -24
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +18 -18
- package/dist/{chunk-N7W5KZK7.cjs → chunk-2L4YXZAZ.cjs} +4 -4
- package/dist/{chunk-N7W5KZK7.cjs.map → chunk-2L4YXZAZ.cjs.map} +1 -1
- package/dist/{chunk-ZYRCPSBU.js → chunk-3IE7KZY4.js} +4 -4
- package/dist/{chunk-ZYRCPSBU.js.map → chunk-3IE7KZY4.js.map} +1 -1
- package/dist/{chunk-ZX74KJPM.js → chunk-3VB5AT4R.js} +3 -3
- package/dist/{chunk-ZX74KJPM.js.map → chunk-3VB5AT4R.js.map} +1 -1
- package/dist/{chunk-S2KJRHDZ.cjs → chunk-4UFR2LB6.cjs} +13 -13
- package/dist/{chunk-S2KJRHDZ.cjs.map → chunk-4UFR2LB6.cjs.map} +1 -1
- package/dist/{chunk-4QPDZJAL.cjs → chunk-4XR7X7XW.cjs} +11569 -9045
- package/dist/chunk-4XR7X7XW.cjs.map +1 -0
- package/dist/{chunk-6OSUNBZY.js → chunk-522WB2EH.js} +135 -7
- package/dist/chunk-522WB2EH.js.map +1 -0
- package/dist/{chunk-QTNPMIO2.cjs → chunk-6JI6FWLZ.cjs} +341 -35
- package/dist/chunk-6JI6FWLZ.cjs.map +1 -0
- package/dist/{chunk-UFTYX73U.js → chunk-7F76AWOI.js} +339 -35
- package/dist/chunk-7F76AWOI.js.map +1 -0
- package/dist/{chunk-BW4KGTV7.cjs → chunk-C5C5EF3W.cjs} +4 -4
- package/dist/{chunk-BW4KGTV7.cjs.map → chunk-C5C5EF3W.cjs.map} +1 -1
- package/dist/{chunk-VJGMEGMR.js → chunk-DOK7LKLO.js} +125 -13
- package/dist/chunk-DOK7LKLO.js.map +1 -0
- package/dist/{chunk-L3CTXXVZ.js → chunk-FBS3PACU.js} +3 -3
- package/dist/{chunk-L3CTXXVZ.js.map → chunk-FBS3PACU.js.map} +1 -1
- package/dist/{chunk-QUKVGHN4.cjs → chunk-FKJBXGWP.cjs} +4 -4
- package/dist/{chunk-QUKVGHN4.cjs.map → chunk-FKJBXGWP.cjs.map} +1 -1
- package/dist/{chunk-SZK376QB.js → chunk-H4MT5TJP.js} +3 -3
- package/dist/{chunk-SZK376QB.js.map → chunk-H4MT5TJP.js.map} +1 -1
- package/dist/{chunk-3M6T7KB4.js → chunk-HAZALB7U.js} +3 -3
- package/dist/{chunk-3M6T7KB4.js.map → chunk-HAZALB7U.js.map} +1 -1
- package/dist/{chunk-VFZOPRQP.cjs → chunk-HWVBHU3O.cjs} +5 -5
- package/dist/{chunk-VFZOPRQP.cjs.map → chunk-HWVBHU3O.cjs.map} +1 -1
- package/dist/{chunk-OK5ZS3LU.js → chunk-I2GQYOZ5.js} +11586 -9069
- package/dist/chunk-I2GQYOZ5.js.map +1 -0
- package/dist/{chunk-D7EHZFK4.cjs → chunk-L7POWM5B.cjs} +138 -2
- package/dist/chunk-L7POWM5B.cjs.map +1 -0
- package/dist/{chunk-2VNMKOUO.js → chunk-LRI4RH2N.js} +135 -3
- package/dist/chunk-LRI4RH2N.js.map +1 -0
- package/dist/{chunk-EPKIJEH7.js → chunk-MFAMNFPA.js} +63 -6
- package/dist/chunk-MFAMNFPA.js.map +1 -0
- package/dist/{chunk-VDSYMSUY.js → chunk-MVIEIKOI.js} +3 -3
- package/dist/{chunk-VDSYMSUY.js.map → chunk-MVIEIKOI.js.map} +1 -1
- package/dist/{chunk-ZL5RB4UV.js → chunk-N5B242WY.js} +3 -3
- package/dist/{chunk-ZL5RB4UV.js.map → chunk-N5B242WY.js.map} +1 -1
- package/dist/{chunk-VKPCR7BG.js → chunk-OTSVMKII.js} +883 -12
- package/dist/chunk-OTSVMKII.js.map +1 -0
- package/dist/{chunk-YLEVMOK2.cjs → chunk-R66QG3XT.cjs} +5 -4
- package/dist/{chunk-YLEVMOK2.cjs.map → chunk-R66QG3XT.cjs.map} +1 -1
- package/dist/{chunk-3M6WB62Y.cjs → chunk-R6VX5YTJ.cjs} +139 -7
- package/dist/chunk-R6VX5YTJ.cjs.map +1 -0
- package/dist/{chunk-I55HO32M.js → chunk-RJMCWT7Z.js} +3 -3
- package/dist/{chunk-I55HO32M.js.map → chunk-RJMCWT7Z.js.map} +1 -1
- package/dist/{chunk-TZTCIAYW.cjs → chunk-S3RMAXH5.cjs} +137 -25
- package/dist/chunk-S3RMAXH5.cjs.map +1 -0
- package/dist/{chunk-HK56GQQP.cjs → chunk-SSLNPHCL.cjs} +886 -13
- package/dist/chunk-SSLNPHCL.cjs.map +1 -0
- package/dist/{chunk-IBRW3UOA.js → chunk-TWLKXV2O.js} +3 -3
- package/dist/{chunk-IBRW3UOA.js.map → chunk-TWLKXV2O.js.map} +1 -1
- package/dist/{chunk-VCH7RI5H.js → chunk-UWA5MWCI.js} +4 -4
- package/dist/chunk-UWA5MWCI.js.map +1 -0
- package/dist/{chunk-RYVV5UVI.cjs → chunk-V4GILQR6.cjs} +4 -4
- package/dist/{chunk-RYVV5UVI.cjs.map → chunk-V4GILQR6.cjs.map} +1 -1
- package/dist/{chunk-QMTWG6JL.cjs → chunk-V4RO5KYY.cjs} +6 -4
- package/dist/chunk-V4RO5KYY.cjs.map +1 -0
- package/dist/{chunk-VZ5LDNHK.cjs → chunk-VTSH4YPT.cjs} +12 -12
- package/dist/{chunk-VZ5LDNHK.cjs.map → chunk-VTSH4YPT.cjs.map} +1 -1
- package/dist/{chunk-UUBNQV2T.cjs → chunk-WQDIZH2Z.cjs} +12 -12
- package/dist/{chunk-UUBNQV2T.cjs.map → chunk-WQDIZH2Z.cjs.map} +1 -1
- package/dist/{chunk-SUIDD2C5.cjs → chunk-XNCOSVNG.cjs} +63 -6
- package/dist/chunk-XNCOSVNG.cjs.map +1 -0
- package/dist/{chunk-EGSUMHCS.cjs → chunk-YB4XJY5L.cjs} +12 -12
- package/dist/{chunk-EGSUMHCS.cjs.map → chunk-YB4XJY5L.cjs.map} +1 -1
- package/dist/{chunk-JHDR56XO.js → chunk-YS6CGUNH.js} +3 -3
- package/dist/{chunk-JHDR56XO.js.map → chunk-YS6CGUNH.js.map} +1 -1
- package/dist/{types-WTr9W5Ud.d.ts → diagnostics-B-ffSEhl.d.cts} +82 -2
- package/dist/{types-WTr9W5Ud.d.cts → diagnostics-B-ffSEhl.d.ts} +82 -2
- 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 +8 -8
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +2 -2
- package/dist/diagrams/ecomap/index.cjs +7 -7
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/ecomap/index.js +2 -2
- package/dist/diagrams/entity/index.cjs +6 -6
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/entity/index.js +2 -2
- package/dist/diagrams/fishbone/index.cjs +8 -8
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.js +2 -2
- package/dist/diagrams/flowchart/index.cjs +8 -8
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/flowchart/index.js +2 -2
- package/dist/diagrams/genogram/index.cjs +9 -9
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/genogram/index.js +2 -2
- package/dist/diagrams/ladder/index.cjs +6 -6
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.js +2 -2
- package/dist/diagrams/logic/index.cjs +6 -6
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/logic/index.js +2 -2
- package/dist/diagrams/orgchart/index.cjs +7 -7
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.js +2 -2
- package/dist/diagrams/pedigree/index.cjs +7 -7
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.js +2 -2
- package/dist/diagrams/phylo/index.cjs +7 -7
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.js +2 -2
- package/dist/diagrams/sld/index.cjs +14 -6
- package/dist/diagrams/sld/index.d.cts +14 -2
- package/dist/diagrams/sld/index.d.ts +14 -2
- package/dist/diagrams/sld/index.js +2 -2
- package/dist/diagrams/sociogram/index.cjs +6 -6
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/sociogram/index.js +2 -2
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/venn/index.cjs +9 -9
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/diagrams/venn/index.js +2 -2
- package/dist/{index-BD2yDfQM.d.cts → index-DPWdYfNx.d.ts} +60 -2
- package/dist/{index-C30zQWZI.d.ts → index-S0njakQ2.d.cts} +60 -2
- package/dist/index.cjs +344 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -4
- package/dist/index.d.ts +38 -4
- package/dist/index.js +284 -17
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +18 -18
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +17 -17
- package/dist/{tools-DlpuE76u.d.cts → tools-CeGGMCs7.d.cts} +12 -4
- package/dist/{tools-BHWaJPOl.d.ts → tools-kK_enDwb.d.ts} +12 -4
- package/package.json +1 -1
- package/dist/chunk-2VNMKOUO.js.map +0 -1
- package/dist/chunk-3M6WB62Y.cjs.map +0 -1
- package/dist/chunk-4QPDZJAL.cjs.map +0 -1
- package/dist/chunk-6OSUNBZY.js.map +0 -1
- package/dist/chunk-D7EHZFK4.cjs.map +0 -1
- package/dist/chunk-EPKIJEH7.js.map +0 -1
- package/dist/chunk-HK56GQQP.cjs.map +0 -1
- package/dist/chunk-OK5ZS3LU.js.map +0 -1
- package/dist/chunk-QMTWG6JL.cjs.map +0 -1
- package/dist/chunk-QTNPMIO2.cjs.map +0 -1
- package/dist/chunk-SUIDD2C5.cjs.map +0 -1
- package/dist/chunk-TZTCIAYW.cjs.map +0 -1
- package/dist/chunk-UFTYX73U.js.map +0 -1
- package/dist/chunk-VCH7RI5H.js.map +0 -1
- package/dist/chunk-VJGMEGMR.js.map +0 -1
- package/dist/chunk-VKPCR7BG.js.map +0 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical.
|
|
32
|
+
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical. 33 diagram families across ten domains:
|
|
33
33
|
|
|
34
34
|
- 👪 **Relationships** — genograms, ecomaps, pedigrees, sociograms, phylogenetic trees
|
|
35
35
|
- ⚡ **Electrical & Industrial** — ladder logic, single-line diagrams, circuit schematics, logic gates, timing, block diagrams, **FBD**, **SFC**, breadboard, **P&ID** (ISA-5.1)
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
- 🔄 **Behavior modeling** — 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`)
|
|
39
39
|
- 🗄️ **Data modeling** — ERD crow's-foot notation
|
|
40
40
|
- 🗓️ **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
|
+
- 🖧 **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
|
|
41
42
|
- 📅 **Timelines** — proportional / equidistant / log axis · swimlane · gantt · lollipop · BC dates · geological Ma scale
|
|
42
43
|
|
|
43
44
|
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.
|
|
@@ -502,6 +503,79 @@ task G "Launch event" duration: 2 after: E, F
|
|
|
502
503
|
|
|
503
504
|
[PERT / CPM syntax →](https://schematex.dev/docs/pert)
|
|
504
505
|
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
### ◉ Petri net — *Murata 1989 / ISO-IEC 15909 place-transition net*
|
|
509
|
+
|
|
510
|
+
The only text-DSL Petri net tool that **understands the dynamics**, not just the shapes. You declare places (circles holding tokens), transitions (bars), and weighted arcs; the engine validates the bipartite structure, computes which transitions are *enabled* under the marking (highlighted green), and can `fire:` a sequence forward to render any reachable marking. Immediate vs. timed transitions, arc weights, capacity, and inhibitor / read / reset arcs — the recognised concurrency vocabulary.
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
petri "Mutual Exclusion — two processes, one resource"
|
|
514
|
+
place idleA *1 "A idle"
|
|
515
|
+
place idleB *1 "B idle"
|
|
516
|
+
place mutex *1 "resource"
|
|
517
|
+
place critA "A critical"
|
|
518
|
+
place critB "B critical"
|
|
519
|
+
transition enterA
|
|
520
|
+
transition exitA
|
|
521
|
+
transition enterB
|
|
522
|
+
transition exitB
|
|
523
|
+
idleA -> enterA
|
|
524
|
+
mutex -> enterA
|
|
525
|
+
enterA -> critA
|
|
526
|
+
critA -> exitA
|
|
527
|
+
exitA -> idleA
|
|
528
|
+
exitA -> mutex
|
|
529
|
+
idleB -> enterB
|
|
530
|
+
mutex -> enterB
|
|
531
|
+
enterB -> critB
|
|
532
|
+
critB -> exitB
|
|
533
|
+
exitB -> idleB
|
|
534
|
+
exitB -> mutex
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+

|
|
538
|
+
|
|
539
|
+
[Petri net syntax →](https://schematex.dev/docs/petri)
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
### 🖧 Network topology — *Cisco-convention icons · device / link / port integrity*
|
|
544
|
+
|
|
545
|
+
The free, text-first, zero-dependency network-diagram engine. Declare typed devices (router, switch, firewall, AP, server, **IP camera / NVR / PoE switch**, …) and typed annotated links (copper / fiber / wireless / serial / **PoE** / VPN / LAG, carrying VLAN / speed / port / mode), group them into sites, racks, subnets and VLANs, and let the engine lay out the topology class correctly — `tiered` (three-tier campus), `star`, `ring`, `bus`, `mesh`, `spine-leaf` (auto-meshed Clos), or `tree`. Unlike an LLM emitting raw Mermaid, it **never drops a device, a port, or a link**, and it validates IP-in-subnet and VLAN ranges.
|
|
546
|
+
|
|
547
|
+
```
|
|
548
|
+
network "Acme HQ — CCTV"
|
|
549
|
+
layout: tiered
|
|
550
|
+
internet net "Internet"
|
|
551
|
+
firewall fw1 "Perimeter FW" tier: edge
|
|
552
|
+
l3switch core1 "Core SW" tier: core
|
|
553
|
+
poeswitch poe1 "PoE Switch A" tier: access
|
|
554
|
+
poeswitch poe2 "PoE Switch B" tier: access
|
|
555
|
+
nvr nvr1 "Video Recorder"
|
|
556
|
+
monitor wall1 "Guard Station"
|
|
557
|
+
subnet cams "192.168.20.0/24" {
|
|
558
|
+
camera cam1 "Lobby Dome" type: dome ip: 192.168.20.11
|
|
559
|
+
camera cam2 "Gate PTZ" type: ptz ip: 192.168.20.12
|
|
560
|
+
camera cam3 "Dock Bullet" type: bullet ip: 192.168.20.13
|
|
561
|
+
poe1
|
|
562
|
+
poe2
|
|
563
|
+
}
|
|
564
|
+
net -- fw1 : wan "ISP 1Gbps"
|
|
565
|
+
fw1 -- core1 : fiber 10G
|
|
566
|
+
core1 -- poe1 : trunk vlan: 20 1G
|
|
567
|
+
core1 -- poe2 : trunk vlan: 20 1G
|
|
568
|
+
core1 -- nvr1 : 1G
|
|
569
|
+
core1 -- wall1
|
|
570
|
+
poe1 -- cam1 : poe
|
|
571
|
+
poe1 -- cam2 : poe
|
|
572
|
+
poe2 -- cam3 : poe
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+

|
|
576
|
+
|
|
577
|
+
[Network topology syntax →](https://schematex.dev/docs/network)
|
|
578
|
+
|
|
505
579
|
## Why SchemaTex?
|
|
506
580
|
|
|
507
581
|
**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:
|
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
3
|
+
var chunkSSLNPHCL_cjs = require('../chunk-SSLNPHCL.cjs');
|
|
4
|
+
require('../chunk-4XR7X7XW.cjs');
|
|
5
|
+
require('../chunk-FKJBXGWP.cjs');
|
|
6
|
+
require('../chunk-V4RO5KYY.cjs');
|
|
7
|
+
require('../chunk-XNCOSVNG.cjs');
|
|
8
|
+
require('../chunk-2L4YXZAZ.cjs');
|
|
9
|
+
require('../chunk-R6VX5YTJ.cjs');
|
|
10
10
|
require('../chunk-SBB6C4OP.cjs');
|
|
11
|
-
require('../chunk-
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-V4GILQR6.cjs');
|
|
12
|
+
require('../chunk-HWVBHU3O.cjs');
|
|
13
|
+
require('../chunk-C5C5EF3W.cjs');
|
|
14
|
+
require('../chunk-6JI6FWLZ.cjs');
|
|
15
|
+
require('../chunk-S3RMAXH5.cjs');
|
|
16
|
+
require('../chunk-VTSH4YPT.cjs');
|
|
17
|
+
require('../chunk-YB4XJY5L.cjs');
|
|
18
18
|
require('../chunk-3KRL2EGN.cjs');
|
|
19
|
-
require('../chunk-
|
|
20
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-4UFR2LB6.cjs');
|
|
20
|
+
require('../chunk-WQDIZH2Z.cjs');
|
|
21
21
|
require('../chunk-5UCXMYE7.cjs');
|
|
22
22
|
require('../chunk-ST5YRTTV.cjs');
|
|
23
|
-
require('../chunk-
|
|
24
|
-
require('../chunk-
|
|
23
|
+
require('../chunk-R66QG3XT.cjs');
|
|
24
|
+
require('../chunk-L7POWM5B.cjs');
|
|
25
25
|
require('../chunk-NAGUZFXX.cjs');
|
|
26
26
|
require('../chunk-3WNW5Y7P.cjs');
|
|
27
27
|
var ai = require('ai');
|
|
@@ -31,7 +31,7 @@ var schematexTools = {
|
|
|
31
31
|
listDiagrams: ai.tool({
|
|
32
32
|
description: "List every Schematex diagram type with a tagline, 'use when' hint, domain cluster, and authoritative standard. Call this first to discover what's available.",
|
|
33
33
|
inputSchema: zod.z.object({}),
|
|
34
|
-
execute: async () =>
|
|
34
|
+
execute: async () => chunkSSLNPHCL_cjs.listDiagrams()
|
|
35
35
|
}),
|
|
36
36
|
getSyntax: ai.tool({
|
|
37
37
|
description: "Return syntax for one diagram type. Default `detail: canonical` is the compact first-shot generation path: canonical header, preferred forms, rules, and repair checks. Request `detail: reference` only for advanced forms or imported adapters after choosing a type.",
|
|
@@ -46,7 +46,7 @@ var schematexTools = {
|
|
|
46
46
|
execute: async ({
|
|
47
47
|
type,
|
|
48
48
|
detail
|
|
49
|
-
}) =>
|
|
49
|
+
}) => chunkSSLNPHCL_cjs.getSyntax(type, { detail })
|
|
50
50
|
}),
|
|
51
51
|
getExamples: ai.tool({
|
|
52
52
|
description: "Return curated real-world DSL examples for a diagram type, each with scenario notes and tags. Use as few-shot context before generating DSL.",
|
|
@@ -56,7 +56,7 @@ var schematexTools = {
|
|
|
56
56
|
preferFeatured: zod.z.boolean().optional().describe("Rank featured examples first."),
|
|
57
57
|
maxComplexity: zod.z.number().int().min(1).max(5).optional().describe("Only return examples with complexity <= this value (1=simplest).")
|
|
58
58
|
}),
|
|
59
|
-
execute: async (args) =>
|
|
59
|
+
execute: async (args) => chunkSSLNPHCL_cjs.getExamples(args.type, {
|
|
60
60
|
limit: args.limit,
|
|
61
61
|
preferFeatured: args.preferFeatured,
|
|
62
62
|
maxComplexity: args.maxComplexity
|
|
@@ -70,7 +70,7 @@ var schematexTools = {
|
|
|
70
70
|
),
|
|
71
71
|
dsl: zod.z.string().describe("The DSL source text to validate.")
|
|
72
72
|
}),
|
|
73
|
-
execute: async ({ type, dsl }) =>
|
|
73
|
+
execute: async ({ type, dsl }) => chunkSSLNPHCL_cjs.validateDsl(type, dsl)
|
|
74
74
|
}),
|
|
75
75
|
renderDsl: ai.tool({
|
|
76
76
|
description: "Render Schematex DSL to an SVG string. Returns { ok: true, svg } or { ok: false, errors }. Use when the caller needs the actual diagram output, not just validation.",
|
|
@@ -85,7 +85,7 @@ var schematexTools = {
|
|
|
85
85
|
dsl,
|
|
86
86
|
theme,
|
|
87
87
|
padding
|
|
88
|
-
}) =>
|
|
88
|
+
}) => chunkSSLNPHCL_cjs.renderDsl(type, dsl, { theme, padding })
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
|
package/dist/ai/ai-sdk.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import {
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../
|
|
2
|
+
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-CeGGMCs7.cjs';
|
|
3
|
+
import '../api-BEJTXyBA.cjs';
|
|
4
|
+
import '../diagnostics-B-ffSEhl.cjs';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
|
8
8
|
readonly getSyntax: ai.Tool<{
|
|
9
9
|
type: string;
|
|
10
|
-
detail?: "
|
|
10
|
+
detail?: "reference" | "canonical" | undefined;
|
|
11
11
|
}, GetSyntaxResult>;
|
|
12
12
|
readonly getExamples: ai.Tool<{
|
|
13
13
|
type: string;
|
package/dist/ai/ai-sdk.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import {
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../
|
|
2
|
+
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-kK_enDwb.js';
|
|
3
|
+
import '../api-DFrSR3lw.js';
|
|
4
|
+
import '../diagnostics-B-ffSEhl.js';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
|
8
8
|
readonly getSyntax: ai.Tool<{
|
|
9
9
|
type: string;
|
|
10
|
-
detail?: "
|
|
10
|
+
detail?: "reference" | "canonical" | undefined;
|
|
11
11
|
}, GetSyntaxResult>;
|
|
12
12
|
readonly getExamples: ai.Tool<{
|
|
13
13
|
type: string;
|
package/dist/ai/ai-sdk.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-OTSVMKII.js';
|
|
2
|
+
import '../chunk-I2GQYOZ5.js';
|
|
3
|
+
import '../chunk-RJMCWT7Z.js';
|
|
4
|
+
import '../chunk-UWA5MWCI.js';
|
|
5
|
+
import '../chunk-MFAMNFPA.js';
|
|
6
|
+
import '../chunk-TWLKXV2O.js';
|
|
7
|
+
import '../chunk-522WB2EH.js';
|
|
8
8
|
import '../chunk-PIV2A3HG.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-H4MT5TJP.js';
|
|
10
|
+
import '../chunk-HAZALB7U.js';
|
|
11
|
+
import '../chunk-FBS3PACU.js';
|
|
12
|
+
import '../chunk-7F76AWOI.js';
|
|
13
|
+
import '../chunk-DOK7LKLO.js';
|
|
14
|
+
import '../chunk-YS6CGUNH.js';
|
|
15
|
+
import '../chunk-N5B242WY.js';
|
|
16
16
|
import '../chunk-2KTQ75LN.js';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-MVIEIKOI.js';
|
|
18
|
+
import '../chunk-3VB5AT4R.js';
|
|
19
19
|
import '../chunk-FO7BLCEW.js';
|
|
20
20
|
import '../chunk-6URNSB6G.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-3IE7KZY4.js';
|
|
22
|
+
import '../chunk-LRI4RH2N.js';
|
|
23
23
|
import '../chunk-5IKOLUWK.js';
|
|
24
24
|
import '../chunk-SYYBKDL7.js';
|
|
25
25
|
import { tool } from 'ai';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
3
|
+
var chunkSSLNPHCL_cjs = require('../chunk-SSLNPHCL.cjs');
|
|
4
|
+
require('../chunk-4XR7X7XW.cjs');
|
|
5
|
+
require('../chunk-FKJBXGWP.cjs');
|
|
6
|
+
require('../chunk-V4RO5KYY.cjs');
|
|
7
|
+
require('../chunk-XNCOSVNG.cjs');
|
|
8
|
+
require('../chunk-2L4YXZAZ.cjs');
|
|
9
|
+
require('../chunk-R6VX5YTJ.cjs');
|
|
10
10
|
require('../chunk-SBB6C4OP.cjs');
|
|
11
|
-
require('../chunk-
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-V4GILQR6.cjs');
|
|
12
|
+
require('../chunk-HWVBHU3O.cjs');
|
|
13
|
+
require('../chunk-C5C5EF3W.cjs');
|
|
14
|
+
require('../chunk-6JI6FWLZ.cjs');
|
|
15
|
+
require('../chunk-S3RMAXH5.cjs');
|
|
16
|
+
require('../chunk-VTSH4YPT.cjs');
|
|
17
|
+
require('../chunk-YB4XJY5L.cjs');
|
|
18
18
|
require('../chunk-3KRL2EGN.cjs');
|
|
19
|
-
require('../chunk-
|
|
20
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-4UFR2LB6.cjs');
|
|
20
|
+
require('../chunk-WQDIZH2Z.cjs');
|
|
21
21
|
require('../chunk-5UCXMYE7.cjs');
|
|
22
22
|
require('../chunk-ST5YRTTV.cjs');
|
|
23
|
-
require('../chunk-
|
|
24
|
-
require('../chunk-
|
|
23
|
+
require('../chunk-R66QG3XT.cjs');
|
|
24
|
+
require('../chunk-L7POWM5B.cjs');
|
|
25
25
|
require('../chunk-NAGUZFXX.cjs');
|
|
26
26
|
require('../chunk-3WNW5Y7P.cjs');
|
|
27
27
|
|
|
@@ -29,39 +29,47 @@ require('../chunk-3WNW5Y7P.cjs');
|
|
|
29
29
|
|
|
30
30
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkSSLNPHCL_cjs.DIAGRAM_REGISTRY; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "DIAGRAM_SINCE", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkSSLNPHCL_cjs.DIAGRAM_SINCE; }
|
|
33
37
|
});
|
|
34
38
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
35
39
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkSSLNPHCL_cjs.getAllDiagramTypes; }
|
|
37
41
|
});
|
|
38
42
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
39
43
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkSSLNPHCL_cjs.getDiagramMeta; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "getDiagramSince", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkSSLNPHCL_cjs.getDiagramSince; }
|
|
41
49
|
});
|
|
42
50
|
Object.defineProperty(exports, "getExamples", {
|
|
43
51
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkSSLNPHCL_cjs.getExamples; }
|
|
45
53
|
});
|
|
46
54
|
Object.defineProperty(exports, "getSyntax", {
|
|
47
55
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkSSLNPHCL_cjs.getSyntax; }
|
|
49
57
|
});
|
|
50
58
|
Object.defineProperty(exports, "listDiagrams", {
|
|
51
59
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkSSLNPHCL_cjs.listDiagrams; }
|
|
53
61
|
});
|
|
54
62
|
Object.defineProperty(exports, "renderDsl", {
|
|
55
63
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkSSLNPHCL_cjs.renderDsl; }
|
|
57
65
|
});
|
|
58
66
|
Object.defineProperty(exports, "resolveDiagramType", {
|
|
59
67
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkSSLNPHCL_cjs.resolveDiagramType; }
|
|
61
69
|
});
|
|
62
70
|
Object.defineProperty(exports, "validateDsl", {
|
|
63
71
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkSSLNPHCL_cjs.validateDsl; }
|
|
65
73
|
});
|
|
66
74
|
//# sourceMappingURL=index.cjs.map
|
|
67
75
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DIAGRAM_REGISTRY, a as
|
|
2
|
-
import {
|
|
3
|
-
import '../api-
|
|
1
|
+
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-CeGGMCs7.cjs';
|
|
2
|
+
import { a as DiagramType } from '../diagnostics-B-ffSEhl.cjs';
|
|
3
|
+
import '../api-BEJTXyBA.cjs';
|
|
4
4
|
|
|
5
5
|
interface GenerationProfile {
|
|
6
6
|
/** Canonical type id from `listDiagrams()`. */
|
|
@@ -19,4 +19,4 @@ interface GenerationProfile {
|
|
|
19
19
|
repair: readonly string[];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export type
|
|
22
|
+
export { DiagramType, type GenerationProfile };
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DIAGRAM_REGISTRY, a as
|
|
2
|
-
import {
|
|
3
|
-
import '../api-
|
|
1
|
+
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-kK_enDwb.js';
|
|
2
|
+
import { a as DiagramType } from '../diagnostics-B-ffSEhl.js';
|
|
3
|
+
import '../api-DFrSR3lw.js';
|
|
4
4
|
|
|
5
5
|
interface GenerationProfile {
|
|
6
6
|
/** Canonical type id from `listDiagrams()`. */
|
|
@@ -19,4 +19,4 @@ interface GenerationProfile {
|
|
|
19
19
|
repair: readonly string[];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export type
|
|
22
|
+
export { DiagramType, type GenerationProfile };
|
package/dist/ai/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export { DIAGRAM_REGISTRY, getAllDiagramTypes, getDiagramMeta, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-OTSVMKII.js';
|
|
2
|
+
import '../chunk-I2GQYOZ5.js';
|
|
3
|
+
import '../chunk-RJMCWT7Z.js';
|
|
4
|
+
import '../chunk-UWA5MWCI.js';
|
|
5
|
+
import '../chunk-MFAMNFPA.js';
|
|
6
|
+
import '../chunk-TWLKXV2O.js';
|
|
7
|
+
import '../chunk-522WB2EH.js';
|
|
8
8
|
import '../chunk-PIV2A3HG.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-H4MT5TJP.js';
|
|
10
|
+
import '../chunk-HAZALB7U.js';
|
|
11
|
+
import '../chunk-FBS3PACU.js';
|
|
12
|
+
import '../chunk-7F76AWOI.js';
|
|
13
|
+
import '../chunk-DOK7LKLO.js';
|
|
14
|
+
import '../chunk-YS6CGUNH.js';
|
|
15
|
+
import '../chunk-N5B242WY.js';
|
|
16
16
|
import '../chunk-2KTQ75LN.js';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-MVIEIKOI.js';
|
|
18
|
+
import '../chunk-3VB5AT4R.js';
|
|
19
19
|
import '../chunk-FO7BLCEW.js';
|
|
20
20
|
import '../chunk-6URNSB6G.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-3IE7KZY4.js';
|
|
22
|
+
import '../chunk-LRI4RH2N.js';
|
|
23
23
|
import '../chunk-5IKOLUWK.js';
|
|
24
24
|
import '../chunk-SYYBKDL7.js';
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,44 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type SchematexResultStatus = "valid" | "partial" | "invalid";
|
|
4
|
-
interface SchematexDiagnostic {
|
|
5
|
-
severity: "error" | "warning";
|
|
6
|
-
code: string;
|
|
7
|
-
message: string;
|
|
8
|
-
line?: number;
|
|
9
|
-
column?: number;
|
|
10
|
-
source?: string;
|
|
11
|
-
hint?: string;
|
|
12
|
-
fatal: boolean;
|
|
13
|
-
}
|
|
14
|
-
type SchematexParseResult = {
|
|
15
|
-
ok: true;
|
|
16
|
-
status: "valid" | "partial";
|
|
17
|
-
type: DiagramType;
|
|
18
|
-
ast: unknown;
|
|
19
|
-
diagnostics: SchematexDiagnostic[];
|
|
20
|
-
} | {
|
|
21
|
-
ok: false;
|
|
22
|
-
status: "invalid";
|
|
23
|
-
type: DiagramType | null;
|
|
24
|
-
diagnostics: SchematexDiagnostic[];
|
|
25
|
-
};
|
|
26
|
-
type SchematexRenderResult = {
|
|
27
|
-
ok: true;
|
|
28
|
-
status: "valid" | "partial";
|
|
29
|
-
type: DiagramType;
|
|
30
|
-
svg: string;
|
|
31
|
-
diagnostics: SchematexDiagnostic[];
|
|
32
|
-
} | {
|
|
33
|
-
ok: false;
|
|
34
|
-
status: "invalid";
|
|
35
|
-
type: DiagramType | null;
|
|
36
|
-
svg: string;
|
|
37
|
-
diagnostics: SchematexDiagnostic[];
|
|
38
|
-
};
|
|
1
|
+
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-B-ffSEhl.cjs';
|
|
39
2
|
|
|
40
3
|
interface SchematexConfig {
|
|
41
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence";
|
|
4
|
+
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence" | "petri" | "network";
|
|
42
5
|
width?: number;
|
|
43
6
|
height?: number;
|
|
44
7
|
padding?: number;
|
|
@@ -66,4 +29,4 @@ declare function render(text: string, config?: SchematexConfig): string;
|
|
|
66
29
|
declare function renderResult(text: string, config?: SchematexConfig): SchematexRenderResult;
|
|
67
30
|
declare function renderPreview(text: string, config?: SchematexConfig): string;
|
|
68
31
|
|
|
69
|
-
export { type SchematexConfig as S,
|
|
32
|
+
export { type SchematexConfig as S, parseResult as a, renderPreview as b, renderResult as c, parse as p, render as r };
|
|
@@ -1,44 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type SchematexResultStatus = "valid" | "partial" | "invalid";
|
|
4
|
-
interface SchematexDiagnostic {
|
|
5
|
-
severity: "error" | "warning";
|
|
6
|
-
code: string;
|
|
7
|
-
message: string;
|
|
8
|
-
line?: number;
|
|
9
|
-
column?: number;
|
|
10
|
-
source?: string;
|
|
11
|
-
hint?: string;
|
|
12
|
-
fatal: boolean;
|
|
13
|
-
}
|
|
14
|
-
type SchematexParseResult = {
|
|
15
|
-
ok: true;
|
|
16
|
-
status: "valid" | "partial";
|
|
17
|
-
type: DiagramType;
|
|
18
|
-
ast: unknown;
|
|
19
|
-
diagnostics: SchematexDiagnostic[];
|
|
20
|
-
} | {
|
|
21
|
-
ok: false;
|
|
22
|
-
status: "invalid";
|
|
23
|
-
type: DiagramType | null;
|
|
24
|
-
diagnostics: SchematexDiagnostic[];
|
|
25
|
-
};
|
|
26
|
-
type SchematexRenderResult = {
|
|
27
|
-
ok: true;
|
|
28
|
-
status: "valid" | "partial";
|
|
29
|
-
type: DiagramType;
|
|
30
|
-
svg: string;
|
|
31
|
-
diagnostics: SchematexDiagnostic[];
|
|
32
|
-
} | {
|
|
33
|
-
ok: false;
|
|
34
|
-
status: "invalid";
|
|
35
|
-
type: DiagramType | null;
|
|
36
|
-
svg: string;
|
|
37
|
-
diagnostics: SchematexDiagnostic[];
|
|
38
|
-
};
|
|
1
|
+
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-B-ffSEhl.js';
|
|
39
2
|
|
|
40
3
|
interface SchematexConfig {
|
|
41
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence";
|
|
4
|
+
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence" | "petri" | "network";
|
|
42
5
|
width?: number;
|
|
43
6
|
height?: number;
|
|
44
7
|
padding?: number;
|
|
@@ -66,4 +29,4 @@ declare function render(text: string, config?: SchematexConfig): string;
|
|
|
66
29
|
declare function renderResult(text: string, config?: SchematexConfig): SchematexRenderResult;
|
|
67
30
|
declare function renderPreview(text: string, config?: SchematexConfig): string;
|
|
68
31
|
|
|
69
|
-
export { type SchematexConfig as S,
|
|
32
|
+
export { type SchematexConfig as S, parseResult as a, renderPreview as b, renderResult as c, parse as p, render as r };
|
package/dist/browser.cjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
3
|
+
var chunk4XR7X7XW_cjs = require('./chunk-4XR7X7XW.cjs');
|
|
4
|
+
require('./chunk-FKJBXGWP.cjs');
|
|
5
|
+
require('./chunk-V4RO5KYY.cjs');
|
|
6
|
+
require('./chunk-XNCOSVNG.cjs');
|
|
7
|
+
require('./chunk-2L4YXZAZ.cjs');
|
|
8
|
+
require('./chunk-R6VX5YTJ.cjs');
|
|
9
9
|
require('./chunk-SBB6C4OP.cjs');
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-V4GILQR6.cjs');
|
|
11
|
+
require('./chunk-HWVBHU3O.cjs');
|
|
12
|
+
require('./chunk-C5C5EF3W.cjs');
|
|
13
|
+
require('./chunk-6JI6FWLZ.cjs');
|
|
14
|
+
require('./chunk-S3RMAXH5.cjs');
|
|
15
|
+
require('./chunk-VTSH4YPT.cjs');
|
|
16
|
+
require('./chunk-YB4XJY5L.cjs');
|
|
17
17
|
require('./chunk-3KRL2EGN.cjs');
|
|
18
|
-
require('./chunk-
|
|
19
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-4UFR2LB6.cjs');
|
|
19
|
+
require('./chunk-WQDIZH2Z.cjs');
|
|
20
20
|
require('./chunk-5UCXMYE7.cjs');
|
|
21
21
|
require('./chunk-ST5YRTTV.cjs');
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-R66QG3XT.cjs');
|
|
23
|
+
require('./chunk-L7POWM5B.cjs');
|
|
24
24
|
require('./chunk-NAGUZFXX.cjs');
|
|
25
25
|
require('./chunk-3WNW5Y7P.cjs');
|
|
26
26
|
|
|
27
27
|
// src/browser.ts
|
|
28
28
|
function renderToElement(text, config) {
|
|
29
|
-
return svgStringToElement(
|
|
29
|
+
return svgStringToElement(chunk4XR7X7XW_cjs.render(text, config));
|
|
30
30
|
}
|
|
31
31
|
function renderPreviewToElement(text, config) {
|
|
32
|
-
return svgStringToElement(
|
|
32
|
+
return svgStringToElement(chunk4XR7X7XW_cjs.renderPreview(text, config));
|
|
33
33
|
}
|
|
34
34
|
function svgStringToElement(svgString) {
|
|
35
35
|
const parser = new DOMParser();
|
|
@@ -42,23 +42,23 @@ function svgStringToElement(svgString) {
|
|
|
42
42
|
return el;
|
|
43
43
|
}
|
|
44
44
|
function renderToContainer(text, container, config) {
|
|
45
|
-
container.innerHTML =
|
|
45
|
+
container.innerHTML = chunk4XR7X7XW_cjs.render(text, config);
|
|
46
46
|
}
|
|
47
47
|
function renderPreviewToContainer(text, container, config) {
|
|
48
|
-
container.innerHTML =
|
|
48
|
+
container.innerHTML = chunk4XR7X7XW_cjs.renderPreview(text, config);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
Object.defineProperty(exports, "render", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk4XR7X7XW_cjs.render; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "renderPreview", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk4XR7X7XW_cjs.renderPreview; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "renderResult", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk4XR7X7XW_cjs.renderResult; }
|
|
62
62
|
});
|
|
63
63
|
exports.renderPreviewToContainer = renderPreviewToContainer;
|
|
64
64
|
exports.renderPreviewToElement = renderPreviewToElement;
|