schematex 0.3.2 → 0.3.3

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.
Files changed (171) hide show
  1. package/dist/ai/ai-sdk.cjs +25 -25
  2. package/dist/ai/ai-sdk.d.cts +1 -1
  3. package/dist/ai/ai-sdk.d.ts +1 -1
  4. package/dist/ai/ai-sdk.js +20 -20
  5. package/dist/ai/index.cjs +28 -28
  6. package/dist/ai/index.d.cts +1 -1
  7. package/dist/ai/index.d.ts +1 -1
  8. package/dist/ai/index.js +20 -20
  9. package/dist/browser.cjs +22 -22
  10. package/dist/browser.js +20 -20
  11. package/dist/{chunk-LFZZ4NCP.cjs → chunk-3WNW5Y7P.cjs} +48 -8
  12. package/dist/chunk-3WNW5Y7P.cjs.map +1 -0
  13. package/dist/{chunk-MKKFIPKU.cjs → chunk-55UEHL57.cjs} +46 -46
  14. package/dist/{chunk-MKKFIPKU.cjs.map → chunk-55UEHL57.cjs.map} +1 -1
  15. package/dist/{chunk-BJ65PKDU.js → chunk-5U2W3HQA.js} +3 -3
  16. package/dist/{chunk-BJ65PKDU.js.map → chunk-5U2W3HQA.js.map} +1 -1
  17. package/dist/{chunk-75BMFCP5.cjs → chunk-5UCXMYE7.cjs} +44 -44
  18. package/dist/{chunk-75BMFCP5.cjs.map → chunk-5UCXMYE7.cjs.map} +1 -1
  19. package/dist/{chunk-F6OROIHS.js → chunk-66XQBGX7.js} +3 -3
  20. package/dist/{chunk-F6OROIHS.js.map → chunk-66XQBGX7.js.map} +1 -1
  21. package/dist/{chunk-HIQPEAL7.js → chunk-6TIN33CA.js} +3 -3
  22. package/dist/{chunk-HIQPEAL7.js.map → chunk-6TIN33CA.js.map} +1 -1
  23. package/dist/{chunk-RNGYXGHS.js → chunk-6YUP3QMA.js} +19 -19
  24. package/dist/{chunk-RNGYXGHS.js.map → chunk-6YUP3QMA.js.map} +1 -1
  25. package/dist/{chunk-C3IVD7DI.cjs → chunk-7EWFVNYD.cjs} +25 -25
  26. package/dist/{chunk-C3IVD7DI.cjs.map → chunk-7EWFVNYD.cjs.map} +1 -1
  27. package/dist/{chunk-56LXBM45.js → chunk-AC3XH3LB.js} +4 -4
  28. package/dist/{chunk-56LXBM45.js.map → chunk-AC3XH3LB.js.map} +1 -1
  29. package/dist/{chunk-YTEEZV6J.cjs → chunk-APV4AWQ5.cjs} +422 -422
  30. package/dist/{chunk-YTEEZV6J.cjs.map → chunk-APV4AWQ5.cjs.map} +1 -1
  31. package/dist/{chunk-UK7JF5QB.cjs → chunk-AVIKQZSX.cjs} +37 -37
  32. package/dist/{chunk-UK7JF5QB.cjs.map → chunk-AVIKQZSX.cjs.map} +1 -1
  33. package/dist/{chunk-OK5RYX55.cjs → chunk-CWZKP3CJ.cjs} +26 -26
  34. package/dist/{chunk-OK5RYX55.cjs.map → chunk-CWZKP3CJ.cjs.map} +1 -1
  35. package/dist/{chunk-2J2QWNGI.js → chunk-FIVUMDLF.js} +26 -7
  36. package/dist/chunk-FIVUMDLF.js.map +1 -0
  37. package/dist/{chunk-ZTSO3S4P.js → chunk-FO7BLCEW.js} +3 -3
  38. package/dist/{chunk-ZTSO3S4P.js.map → chunk-FO7BLCEW.js.map} +1 -1
  39. package/dist/{chunk-6BKUD5EJ.js → chunk-GLFBHQSQ.js} +4 -4
  40. package/dist/{chunk-6BKUD5EJ.js.map → chunk-GLFBHQSQ.js.map} +1 -1
  41. package/dist/{chunk-ZNLEUL7T.js → chunk-GVCPFBAV.js} +4 -4
  42. package/dist/chunk-GVCPFBAV.js.map +1 -0
  43. package/dist/{chunk-KUXOHLGC.cjs → chunk-HOI6QKC6.cjs} +52 -52
  44. package/dist/{chunk-KUXOHLGC.cjs.map → chunk-HOI6QKC6.cjs.map} +1 -1
  45. package/dist/{chunk-L2KUGWFR.cjs → chunk-IAEABLIV.cjs} +46 -46
  46. package/dist/{chunk-L2KUGWFR.cjs.map → chunk-IAEABLIV.cjs.map} +1 -1
  47. package/dist/{chunk-M5ZC3LFJ.js → chunk-IQRRZPVZ.js} +3 -3
  48. package/dist/{chunk-M5ZC3LFJ.js.map → chunk-IQRRZPVZ.js.map} +1 -1
  49. package/dist/{chunk-H4CJTKEH.js → chunk-MNOO7STY.js} +5 -5
  50. package/dist/{chunk-H4CJTKEH.js.map → chunk-MNOO7STY.js.map} +1 -1
  51. package/dist/{chunk-XI6JOG76.cjs → chunk-N56YC75X.cjs} +45 -45
  52. package/dist/{chunk-XI6JOG76.cjs.map → chunk-N56YC75X.cjs.map} +1 -1
  53. package/dist/{chunk-X4F6VVEJ.js → chunk-PAG3BNIV.js} +3 -3
  54. package/dist/{chunk-X4F6VVEJ.js.map → chunk-PAG3BNIV.js.map} +1 -1
  55. package/dist/{chunk-W7GIQTJV.cjs → chunk-PG6TDGKI.cjs} +21 -21
  56. package/dist/{chunk-W7GIQTJV.cjs.map → chunk-PG6TDGKI.cjs.map} +1 -1
  57. package/dist/{chunk-7MVDN5UC.cjs → chunk-Q5OFA4I2.cjs} +35 -35
  58. package/dist/{chunk-7MVDN5UC.cjs.map → chunk-Q5OFA4I2.cjs.map} +1 -1
  59. package/dist/{chunk-BUN3CRMP.cjs → chunk-QOLBWCF5.cjs} +65 -65
  60. package/dist/{chunk-BUN3CRMP.cjs.map → chunk-QOLBWCF5.cjs.map} +1 -1
  61. package/dist/{chunk-2UJAVPA4.cjs → chunk-QXL7AY2H.cjs} +26 -26
  62. package/dist/{chunk-2UJAVPA4.cjs.map → chunk-QXL7AY2H.cjs.map} +1 -1
  63. package/dist/{chunk-WHJXRLFD.js → chunk-SYYBKDL7.js} +48 -8
  64. package/dist/chunk-SYYBKDL7.js.map +1 -0
  65. package/dist/{chunk-SE23X5OE.js → chunk-TQU44E46.js} +4 -4
  66. package/dist/{chunk-SE23X5OE.js.map → chunk-TQU44E46.js.map} +1 -1
  67. package/dist/{chunk-SFSZUOFT.js → chunk-U3KRKXF7.js} +3 -3
  68. package/dist/{chunk-SFSZUOFT.js.map → chunk-U3KRKXF7.js.map} +1 -1
  69. package/dist/{chunk-EYHD7LV3.cjs → chunk-UDGU73RL.cjs} +129 -129
  70. package/dist/{chunk-EYHD7LV3.cjs.map → chunk-UDGU73RL.cjs.map} +1 -1
  71. package/dist/{chunk-M3R6RCXY.js → chunk-UDJ2KN2A.js} +3 -3
  72. package/dist/{chunk-M3R6RCXY.js.map → chunk-UDJ2KN2A.js.map} +1 -1
  73. package/dist/{chunk-BJWMPPEA.js → chunk-UT4TIDAA.js} +3 -3
  74. package/dist/{chunk-BJWMPPEA.js.map → chunk-UT4TIDAA.js.map} +1 -1
  75. package/dist/{chunk-RODV6PC4.cjs → chunk-UWRTV6IV.cjs} +7 -7
  76. package/dist/{chunk-RODV6PC4.cjs.map → chunk-UWRTV6IV.cjs.map} +1 -1
  77. package/dist/{chunk-IT2TVXC7.js → chunk-WTF6JXHN.js} +4 -4
  78. package/dist/{chunk-IT2TVXC7.js.map → chunk-WTF6JXHN.js.map} +1 -1
  79. package/dist/{chunk-7BEJHG43.js → chunk-X5QJO4ZD.js} +3 -3
  80. package/dist/{chunk-7BEJHG43.js.map → chunk-X5QJO4ZD.js.map} +1 -1
  81. package/dist/{chunk-NFT6VW73.js → chunk-XV2DTN6G.js} +3 -3
  82. package/dist/{chunk-NFT6VW73.js.map → chunk-XV2DTN6G.js.map} +1 -1
  83. package/dist/{chunk-XUEROLSB.cjs → chunk-YUPG2M3I.cjs} +16 -16
  84. package/dist/chunk-YUPG2M3I.cjs.map +1 -0
  85. package/dist/{chunk-K5QG53GT.cjs → chunk-ZCW7YH3C.cjs} +26 -26
  86. package/dist/{chunk-K5QG53GT.cjs.map → chunk-ZCW7YH3C.cjs.map} +1 -1
  87. package/dist/{chunk-GYTWJ6VB.cjs → chunk-ZFNZ2FYI.cjs} +67 -48
  88. package/dist/chunk-ZFNZ2FYI.cjs.map +1 -0
  89. package/dist/{chunk-3YXXZ4LT.cjs → chunk-ZZJDGGC3.cjs} +33 -33
  90. package/dist/{chunk-3YXXZ4LT.cjs.map → chunk-ZZJDGGC3.cjs.map} +1 -1
  91. package/dist/diagrams/blockdiagram/index.cjs +6 -6
  92. package/dist/diagrams/blockdiagram/index.d.cts +1 -1
  93. package/dist/diagrams/blockdiagram/index.d.ts +1 -1
  94. package/dist/diagrams/blockdiagram/index.js +2 -2
  95. package/dist/diagrams/circuit/index.cjs +8 -8
  96. package/dist/diagrams/circuit/index.d.cts +1 -1
  97. package/dist/diagrams/circuit/index.d.ts +1 -1
  98. package/dist/diagrams/circuit/index.js +2 -2
  99. package/dist/diagrams/ecomap/index.cjs +8 -8
  100. package/dist/diagrams/ecomap/index.d.cts +1 -1
  101. package/dist/diagrams/ecomap/index.d.ts +1 -1
  102. package/dist/diagrams/ecomap/index.js +3 -3
  103. package/dist/diagrams/entity/index.cjs +6 -6
  104. package/dist/diagrams/entity/index.d.cts +1 -1
  105. package/dist/diagrams/entity/index.d.ts +1 -1
  106. package/dist/diagrams/entity/index.js +2 -2
  107. package/dist/diagrams/fishbone/index.cjs +8 -8
  108. package/dist/diagrams/fishbone/index.d.cts +1 -1
  109. package/dist/diagrams/fishbone/index.d.ts +1 -1
  110. package/dist/diagrams/fishbone/index.js +2 -2
  111. package/dist/diagrams/flowchart/index.cjs +8 -8
  112. package/dist/diagrams/flowchart/index.d.cts +2 -2
  113. package/dist/diagrams/flowchart/index.d.ts +2 -2
  114. package/dist/diagrams/flowchart/index.js +2 -2
  115. package/dist/diagrams/genogram/index.cjs +10 -10
  116. package/dist/diagrams/genogram/index.d.cts +1 -1
  117. package/dist/diagrams/genogram/index.d.ts +1 -1
  118. package/dist/diagrams/genogram/index.js +3 -3
  119. package/dist/diagrams/ladder/index.cjs +6 -6
  120. package/dist/diagrams/ladder/index.d.cts +1 -1
  121. package/dist/diagrams/ladder/index.d.ts +1 -1
  122. package/dist/diagrams/ladder/index.js +2 -2
  123. package/dist/diagrams/logic/index.cjs +6 -6
  124. package/dist/diagrams/logic/index.d.cts +1 -1
  125. package/dist/diagrams/logic/index.d.ts +1 -1
  126. package/dist/diagrams/logic/index.js +2 -2
  127. package/dist/diagrams/orgchart/index.cjs +7 -7
  128. package/dist/diagrams/orgchart/index.d.cts +1 -1
  129. package/dist/diagrams/orgchart/index.d.ts +1 -1
  130. package/dist/diagrams/orgchart/index.js +2 -2
  131. package/dist/diagrams/pedigree/index.cjs +8 -8
  132. package/dist/diagrams/pedigree/index.d.cts +1 -1
  133. package/dist/diagrams/pedigree/index.d.ts +1 -1
  134. package/dist/diagrams/pedigree/index.js +3 -3
  135. package/dist/diagrams/phylo/index.cjs +7 -7
  136. package/dist/diagrams/phylo/index.d.cts +1 -1
  137. package/dist/diagrams/phylo/index.d.ts +1 -1
  138. package/dist/diagrams/phylo/index.js +2 -2
  139. package/dist/diagrams/sld/index.cjs +6 -6
  140. package/dist/diagrams/sld/index.d.cts +1 -1
  141. package/dist/diagrams/sld/index.d.ts +1 -1
  142. package/dist/diagrams/sld/index.js +2 -2
  143. package/dist/diagrams/sociogram/index.cjs +7 -7
  144. package/dist/diagrams/sociogram/index.d.cts +1 -1
  145. package/dist/diagrams/sociogram/index.d.ts +1 -1
  146. package/dist/diagrams/sociogram/index.js +3 -3
  147. package/dist/diagrams/timing/index.cjs +5 -5
  148. package/dist/diagrams/timing/index.d.cts +1 -1
  149. package/dist/diagrams/timing/index.d.ts +1 -1
  150. package/dist/diagrams/timing/index.js +2 -2
  151. package/dist/diagrams/venn/index.cjs +9 -9
  152. package/dist/diagrams/venn/index.d.cts +1 -1
  153. package/dist/diagrams/venn/index.d.ts +1 -1
  154. package/dist/diagrams/venn/index.js +2 -2
  155. package/dist/{index-dWDwG6BW.d.ts → index-D3u6vcA4.d.ts} +1 -1
  156. package/dist/{index-BrLxEzSQ.d.cts → index-bdfj6FpQ.d.cts} +1 -1
  157. package/dist/index.cjs +41 -41
  158. package/dist/index.d.cts +2 -2
  159. package/dist/index.d.ts +2 -2
  160. package/dist/index.js +19 -19
  161. package/dist/react.cjs +20 -20
  162. package/dist/react.js +19 -19
  163. package/dist/{types-BtiUg7Gx.d.cts → types-DnU2UlWz.d.cts} +2 -0
  164. package/dist/{types-BtiUg7Gx.d.ts → types-DnU2UlWz.d.ts} +2 -0
  165. package/package.json +1 -1
  166. package/dist/chunk-2J2QWNGI.js.map +0 -1
  167. package/dist/chunk-GYTWJ6VB.cjs.map +0 -1
  168. package/dist/chunk-LFZZ4NCP.cjs.map +0 -1
  169. package/dist/chunk-WHJXRLFD.js.map +0 -1
  170. package/dist/chunk-XUEROLSB.cjs.map +0 -1
  171. package/dist/chunk-ZNLEUL7T.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYTEEZV6J_cjs = require('./chunk-YTEEZV6J.cjs');
3
+ var chunkAPV4AWQ5_cjs = require('./chunk-APV4AWQ5.cjs');
4
4
 
5
5
  // src/ai/registry.ts
6
6
  var DIAGRAM_REGISTRY = [
@@ -987,7 +987,7 @@ var SYNTAX = {
987
987
  },
988
988
  "circuit": {
989
989
  "title": "Circuit schematic",
990
- "content": '## 1. A minimal circuit\n\nThe smallest useful positional circuit: a voltage source, a resistor, and a ground.\n\n```\ncircuit "Voltage divider"\nV1: voltage_source down value="5V"\nwire right\nR1: resistor right value="10k"\nwire right\nground\n```\n\nFour rules cover 80% of positional-mode usage:\n\n1. Start with the keyword `circuit`, optionally followed by a quoted title.\n2. Each component is `id: type direction` \u2014 or just `type direction` for anonymous components.\n3. Each component\'s output end becomes the starting point for the next component (the "cursor").\n4. `at: id.end` (or `at: id.start`) jumps the cursor to any named anchor \u2014 use this to branch.\n\n> Comments must start with `#` on their own line.\n\n---\n\n## 2. Components\n\n### 2.1 Positional mode syntax\n\nA named component line has the form:\n\n```\nid: type direction [value="\u2026"] [label="\u2026"]\n```\n\nAn anonymous component omits the `id:` prefix \u2014 the parser assigns an auto ID.\n\n```\nR1: resistor right value="4.7k" label="R1"\ncapacitor down value="100n"\n```\n\n**Direction** is one of `right` (default), `left`, `up`, `down`. It controls which way the component extends from the current cursor position.\n\n### 2.2 Passive components\n\n| DSL type | Description |\n|---|---|\n| `resistor` | Zigzag (ANSI) or rectangle (IEC) |\n| `potentiometer` | Resistor + wiper arrow, 3-pin |\n| `rheostat` | 2-pin variable resistor |\n| `thermistor_ntc` | NTC thermistor (also: `therm`, `ntc`) |\n| `thermistor_ptc` | PTC thermistor (also: `ptc`) |\n| `ldr` | Light-dependent resistor |\n| `varistor` | Voltage-dependent resistor |\n| `fuse` | Standard fuse |\n| `fuse_slow` | Slow-blow fuse (`T` designation) |\n| `capacitor` | Non-polar capacitor |\n| `electrolytic_cap` | Polar/electrolytic capacitor (also: `ecap`) |\n| `variable_cap` | Variable capacitor |\n| `inductor` | Air-core inductor |\n| `inductor_iron` | Iron-core inductor |\n| `inductor_ferrite` | Ferrite-core inductor |\n| `variable_inductor` | Variable inductor |\n| `ferrite_bead` | EMI ferrite bead |\n| `crystal` | Quartz crystal oscillator (also: `xtal`) |\n| `transformer` | Coupled coils (also: `xfmr`) |\n\n```\ncircuit "Passive components gallery"\n# Row 1: resistor \u2192 capacitor \u2192 inductor\nR1: resistor right value="1k"\nwire right\nC1: capacitor right value="100n"\nwire right\nL1: inductor right value="10u"\n# Row 2: crystal and transformer, offset below\nat: R1.start\nwire down\nwire down\nX1: crystal right\nwire right\nwire right\nT1: transformer right\n```\n\n### 2.3 Sources and power\n\n| DSL type | Description |\n|---|---|\n| `voltage_source` | Circle + polarity (also: `vsource`) |\n| `current_source` | Circle + arrow (also: `isource`) |\n| `ac_source` | Circle + sine symbol (also: `acsource`) |\n| `battery` | Alternating long/short terminal lines |\n| `vcc` | Power rail arrow (pointing up) |\n| `ground` | Earth ground \u2014 3 decreasing lines (also: `gnd`) |\n| `gnd_signal` | Signal ground \u2014 solid triangle |\n| `gnd_chassis` | Chassis ground |\n| `gnd_digital` | Digital ground |\n\n```\ncircuit "Sources and power gallery"\n# voltage source with ground\nV1: voltage_source down value="5V"\nwire down\nground\nat: V1.start\nwire right\nwire right\n# battery\nB1: battery down value="9V"\nwire down\nground\nat: B1.start\nwire right\nwire right\n# ac source\nA1: ac_source down value="120V"\nwire down\nground\nat: A1.start\nwire right\nwire right\n# vcc rail\nvcc up\nwire down\ngnd_signal down\n```\n\n### 2.4 Semiconductors \u2014 diodes\n\n| DSL type | Description |\n|---|---|\n| `diode` | Triangle + cathode bar |\n| `zener` | Diode + bent cathode bar |\n| `schottky` | Diode + S-bar |\n| `led` | Diode + outward emission arrows |\n| `photodiode` | Diode + inward light arrows |\n| `varactor` | Diode + variable capacitor |\n| `tvs_diode` | Bidirectional TVS (two bent bars) |\n| `bridge_rectifier` | 4-diode bridge, 4-pin |\n\n```\ncircuit "Diode types gallery"\nD1: diode right\nwire right\nD2: zener right\nwire right\nD3: led right\nwire right\nD4: schottky right\nwire right\nD5: photodiode right\nwire right\nground\nat: D1.start\nwire left\nground\n```\n\n### 2.5 Semiconductors \u2014 transistors\n\n| DSL type | Description |\n|---|---|\n| `npn` | NPN BJT (also: `transistor`, `bjt_npn`) |\n| `pnp` | PNP BJT (also: `bjt_pnp`) |\n| `darlington_npn` | NPN Darlington pair |\n| `darlington_pnp` | PNP Darlington pair |\n| `nmos` | N-channel MOSFET enhancement (also: `mosfet_n`) |\n| `pmos` | P-channel MOSFET enhancement (also: `mosfet_p`) |\n| `nmos_depletion` | N-channel MOSFET depletion |\n| `jfet_n` | N-channel JFET |\n| `jfet_p` | P-channel JFET |\n| `igbt` | IGBT |\n| `scr` | SCR / thyristor |\n| `triac` | TRIAC |\n| `diac` | DIAC |\n| `phototransistor` | NPN with light arrows |\n| `optocoupler` | LED + phototransistor in isolation box |\n\n```\ncircuit "Transistor types gallery"\n# NPN BJT\nQ1: npn right\nwire right\nwire right\n# PNP BJT\nQ2: pnp right\nwire right\nwire right\n# N-channel MOSFET\nQ3: nmos right\nwire right\nwire right\n# P-channel MOSFET\nQ4: pmos right\n```\n\n### 2.6 Analog ICs and op-amps\n\n| DSL type | Description |\n|---|---|\n| `opamp` | Triangle: +/\u2212 inputs, output |\n| `comparator` | Same shape, open-collector output |\n| `schmitt_buffer` | Buffer + hysteresis symbol |\n| `tri_state_buffer` | Buffer + enable pin |\n| `instrumentation_amp` | Three-op-amp INA block |\n| `generic_ic` | Configurable rect with labeled pins (also: `ic`) |\n| `voltage_regulator` | 3-terminal block: IN/GND/OUT (also: `reg`) |\n| `dc_dc_converter` | 2-port block with DC/DC label |\n| `555_timer` | 8-pin 555 pinout block (also: `timer555`) |\n\n```\ncircuit "Analog IC gallery"\n# op-amp with input/output wires\nwire right\nU1: opamp right\nwire right\nwire right\nwire right\n# comparator\nU2: comparator right\nwire right\nwire right\nwire right\n# generic IC block\nU3: generic_ic right\n```\n\n### 2.7 Switches and relays\n\n| DSL type | Description |\n|---|---|\n| `switch_spst` | Single-pole single-throw |\n| `switch_spdt` | Single-pole double-throw |\n| `switch_dpdt` | Double-pole double-throw |\n| `push_no` | Push button normally-open |\n| `push_nc` | Push button normally-closed |\n| `relay_coil` | Relay coil (2-pin rect) |\n| `relay_no` | Relay contact normally-open |\n| `relay_nc` | Relay contact normally-closed |\n\n```\ncircuit "Switch and relay gallery"\n# SPST switch\nS1: switch_spst right\nwire right\nwire right\n# SPDT switch\nS2: switch_spdt right\nwire right\nwire right\n# normally-open push button\nS3: push_no right\nwire right\nwire right\n# relay coil + contact pair\nK1: relay_coil right\nwire right\nK2: relay_no right\n```\n\n### 2.8 Electromechanical and measurement\n\n| DSL type | Description |\n|---|---|\n| `motor` | Circle + M |\n| `speaker` | Cone + box |\n| `microphone` | Capsule symbol |\n| `buzzer` | Piezo buzzer |\n| `ammeter` | Circle + A |\n| `voltmeter` | Circle + V |\n| `wattmeter` | Circle + W |\n| `oscilloscope` | Circle + waveform |\n\n### 2.9 Connectors and annotations\n\n| DSL type | Description |\n|---|---|\n| `wire` | Plain wire segment |\n| `dot` | Junction dot (T-junction marker) |\n| `label` | Net label / flag |\n| `port` | Named port (hollow circle) |\n| `test_point` | TP marker |\n| `no_connect` | X \u2014 intentionally unconnected pin |\n| `antenna` | Antenna stub |\n\n```\ncircuit "Passive components"\nR1: resistor right value="1k" label="R1"\nwire right\nC1: capacitor down value="100n" label="C1"\nwire down\nground\nat: R1.start\nwire up\nbattery up label="9V"\n```\n\n---\n\n## 3. Wiring and branching\n\n### 3.1 Wire segments\n\n`wire direction [N]` draws a bare wire from the current cursor in the given direction. An optional number sets the length in pixels.\n\n```\nwire right\nwire down 40\nwire left 20\n```\n\n### 3.2 Jumping the cursor with `at:`\n\n`at: id.end` moves the cursor to a named anchor without drawing anything. Use it to branch from a previously placed component.\n\n```\nR1: resistor right value="10k"\nat: R1.end\nC1: capacitor down value="100n"\n```\n\nNamed anchor suffixes: `end`, `start`. Components retain their ID across the whole diagram, so you can jump back to any previously placed component.\n\n### 3.3 Junction dots\n\nPlace a `dot` (or use `net NAME: dot`) to mark a T-junction \u2014 a point where three or more wires meet. Without a dot, crossed wires are drawn as a crossover (no connection).\n\n```\nR1: resistor right\ndot\nwire right # continues from R1.end\nat: R1.end\nC1: capacitor down # branches down from the same point\n```\n\n### 3.4 Named nets\n\n`net NAME` declares a named net. `net NAME: dot` declares the net and places a junction dot at the current cursor, remembering that location. Later, `at: NAME` jumps back to that net\'s anchor.\n\n```\nnet VOUT: dot\nR2: resistor right value="10k"\nat: VOUT\nC1: capacitor down value="470n"\n```\n\n### 3.5 Net labels\n\n`label "text" direction?` places a text label at the current cursor position. Labels do not advance the cursor. They are useful for naming power rails or inter-sheet connections.\n\n```\nlabel "VCC" up\nlabel "GND" down\n```\n\n```\ncircuit "RC filter"\nV1: voltage_source down value="5V"\nwire right\nR1: resistor right value="1k" label="R1"\nnet OUT: dot\nwire right\nlabel "Vout" right\nat: OUT\nC1: capacitor down value="100n" label="C1"\nwire down\nground\n```\n\n---\n\n## 4. Netlist mode\n\nAdd `netlist` after the title on the header line to switch to SPICE-style netlist parsing. The auto-layout engine computes component positions from the net connectivity.\n\n```\ncircuit "Low-pass filter" netlist\n```\n\n### 4.1 Netlist line format\n\nEach line is: `ID net1 net2 [net3\u2026] [value] [key=value\u2026]`\n\n- **ID** \u2014 component identifier. The first letter determines the default type (SPICE prefix convention).\n- **net1, net2, \u2026** \u2014 net names the pins connect to. Use `0`, `gnd`, or `GND` for the ground net.\n- **value** (optional bare token) \u2014 component value or model name.\n- **key=value** (optional) \u2014 `label=`, `value=`, `type=` overrides.\n\n### 4.2 SPICE prefix \u2192 component type\n\n| Prefix | Default type | Pin order |\n|---|---|---|\n| `R` | `resistor` | p1, p2 |\n| `C` | `capacitor` | p1, p2 |\n| `L` | `inductor` | p1, p2 |\n| `D` | `diode` | anode (start), cathode (end) |\n| `V` | `voltage_source` | plus, minus |\n| `I` | `current_source` | plus, minus |\n| `Q` | `npn` | c, b, e |\n| `M` | `nmos` | d, g, s |\n| `J` | `jfet_n` | d, g, s |\n| `S` | `switch_spst` | p1, p2 |\n| `F` | `fuse` | p1, p2 |\n| `B` | `battery` | plus, minus |\n| `K` | `relay_coil` | p1, p2 |\n| `U`, `X` | `generic_ic` | custom via `pins=` |\n\n### 4.3 Transistor model override\n\nFor `Q` lines, a trailing model name overrides the type:\n\n```\nQ1 c b e npn # NPN BJT\nQ2 c b e pnp # PNP BJT\nM1 d g s nmos # N-channel MOSFET\nM2 d g s pmos # P-channel MOSFET\n```\n\nFor `D` lines, similarly:\n\n```\nD1 anode cathode zener\nD2 anode cathode led\nD3 anode cathode schottky\nD4 anode cathode photodiode\n```\n\n### 4.4 Netlist example\n\n```\ncircuit "CE Amp (netlist)" netlist\nV1 vcc 0 9V\nRc vcc c 2.2k\nRb vcc b 100k\nQ1 c b e npn\nRe e 0 1k\n```\n\n---\n\n## 5. Attributes\n\nBoth positional and netlist modes accept these key=value attributes:\n\n| Attribute | Accepted by | Effect |\n|---|---|---|\n| `label="\u2026"` | all components | Display label (reference designator) |\n| `value="\u2026"` | all components | Value annotation (1k\u03A9, 100nF, 5V) |\n| `at=id.end` | positional components | Start this component at a named anchor |\n| `length=N` | `wire`, some passives | Length in pixels |\n\nIn positional mode, `at=` inside the component line is equivalent to a preceding `at:` line:\n\n```\nC1: capacitor down at=R1.end value="100n"\n```\n\n---\n\n## 6. Labels & comments\n\n- **Diagram title:** `circuit "RC Filter"` \u2014 first line only.\n- **Component label:** `label="R1"` attribute \u2014 reference designator shown beside the symbol.\n- **Value annotation:** `value="4.7k"` \u2014 shown beside or below the component.\n- **Net label:** `label "VOUT" right` \u2014 standalone net flag at the current cursor.\n- **Comments:** `#` at the start of a line (after leading whitespace).\n\n---\n\n## 7. Reserved words & escaping\n\n**Reserved at line start (positional):** `circuit` (header), `at:`, `net`, `wire`, `label`.\n\n**Reserved in netlist mode:** same header rules apply; all other lines are SPICE component lines.\n\n**Ground net aliases (netlist only):** `0`, `gnd`, `GND`, `Gnd`, `ground`, `Ground` \u2014 all treated as the same node.\n\n**Component IDs** must match `[a-zA-Z_][a-zA-Z0-9_]*`. Spaces in values must be quoted: `value="10 k\u03A9"`.\n\n---\n\n## 8. Common mistakes\n\n| You wrote | Parser says | Fix |\n|---|---|---|\n| `resistor right 1k` (bare value without `value=`) | `1k` is parsed as an unknown attribute flag and ignored | Use `value="1k"`: `resistor right value="1k"` |\n| `at: R1.center` | `center` is not a recognized anchor suffix \u2014 cursor stays at current position | Use `at: R1.end` or `at: R1.start` |\n| `wire 40` (no direction) | Direction defaults to `right`; length `40` is accepted | Explicit direction recommended: `wire right 40` |\n| `R1 vcc out 10k` in positional mode | Line matches the bare-type pattern; `R1` is read as a type name, fails lookup | In positional mode, use `R1: resistor right value="10k"` |\n| `Q1 c b e` (netlist, no model) | Type defaults to `npn` from `Q` prefix \u2014 correct | OK; add `npn` explicitly for clarity |\n| `net OUT` then `at: OUT` without `net OUT: dot` | `OUT` net exists but has no anchor; jump has no destination | Use `net OUT: dot` to register the cursor position |\n| `label VCC up` (unquoted label) | `VCC` is parsed as a direction token, then `up` \u2014 the label text is lost | Quote the text: `label "VCC" up` |\n\n---\n\n## 9. Grammar (EBNF)\n\n```text\ndocument = header statement*\n\n-- Positional mode --\nheader = "circuit" ( WS quoted-string )? NEWLINE\nstatement = blank | comment | component | wire | at | net-decl | label-stmt\n\ncomponent = ( id ":" WS )? type WS direction? attrs* NEWLINE\nwire = "wire" ( WS direction )? ( WS integer )? NEWLINE\nat = "at:" WS anchor NEWLINE\nanchor = id "." ( "start" | "end" )\n | id // net name anchor\n\nnet-decl = "net" WS id NEWLINE // declare net only\n | "net" WS id ":" WS "dot" NEWLINE // declare + place dot\n\nlabel-stmt = "label" WS quoted-string ( WS direction )? NEWLINE\n\ncomponent-attr = "value=" quoted-string\n | "label=" quoted-string\n | "at=" anchor\n | "length=" integer\n\ndirection = "right" | "left" | "up" | "down"\ntype = // any value from \xA72 component tables\n\n-- Netlist mode --\nnetlist-header = "circuit" ( WS quoted-string )? WS "netlist" NEWLINE\nnetlist-stmt = id WS net-ref+ ( WS kv-pair )* NEWLINE\n | comment\nnet-ref = id | "0" // net name or ground alias\nkv-pair = id "=" ( quoted-string | bare-value )\n\nid = [a-zA-Z_] [a-zA-Z0-9_]*\ninteger = [0-9]+\nquoted-string = \'"\' any-char-but-quote* \'"\'\ncomment = "#" any NEWLINE\n```\n\nAuthoritative source: `src/diagrams/circuit/parser.ts` and `src/diagrams/circuit/netlist.ts`. If this diverges from the parser, the parser wins \u2014 please open an issue.\n\n---'
990
+ "content": '## 1. A minimal circuit\n\nThe smallest useful positional circuit: a voltage source, a resistor, and a ground.\n\n```\ncircuit "Voltage divider"\nV1: voltage_source down value="5V"\nwire right\nR1: resistor right value="10k"\nwire right\nground\n```\n\nFour rules cover 80% of positional-mode usage:\n\n1. Start with the keyword `circuit`, optionally followed by a quoted title.\n2. Each component is `id: type direction` \u2014 or just `type direction` for anonymous components.\n3. Each component\'s output end becomes the starting point for the next component (the "cursor").\n4. `at: id.end` (or `at: id.start`) jumps the cursor to any named anchor \u2014 use this to branch.\n\n> Comments must start with `#` on their own line.\n\n---\n\n## 2. Components\n\n### 2.1 Positional mode syntax\n\nA named component line has the form:\n\n```\nid: type direction [value="\u2026"] [label="\u2026"]\n```\n\nAn anonymous component omits the `id:` prefix \u2014 the parser assigns an auto ID.\n\n```\nR1: resistor right value="4.7k" label="R1"\ncapacitor down value="100n"\n```\n\n**Direction** is one of `right` (default), `left`, `up`, `down`. It controls which way the component extends from the current cursor position.\n\n### 2.2 Passive components\n\n| DSL type | Description |\n|---|---|\n| `resistor` | Zigzag (ANSI) or rectangle (IEC) |\n| `potentiometer` | Resistor + wiper arrow, 3-pin |\n| `rheostat` | 2-pin variable resistor |\n| `thermistor_ntc` | NTC thermistor (also: `therm`, `ntc`) |\n| `thermistor_ptc` | PTC thermistor (also: `ptc`) |\n| `ldr` | Light-dependent resistor |\n| `varistor` | Voltage-dependent resistor |\n| `fuse` | Standard fuse |\n| `fuse_slow` | Slow-blow fuse (`T` designation) |\n| `capacitor` | Non-polar capacitor |\n| `electrolytic_cap` | Polar/electrolytic capacitor (also: `ecap`) |\n| `variable_cap` | Variable capacitor |\n| `inductor` | Air-core inductor |\n| `inductor_iron` | Iron-core inductor |\n| `inductor_ferrite` | Ferrite-core inductor |\n| `variable_inductor` | Variable inductor |\n| `ferrite_bead` | EMI ferrite bead |\n| `crystal` | Quartz crystal oscillator (also: `xtal`) |\n| `transformer` | Coupled coils (also: `xfmr`) |\n\n```\ncircuit "Passive components gallery"\n# Row 1: resistor \u2192 capacitor \u2192 inductor\nR1: resistor right value="1k"\nwire right\nC1: capacitor right value="100n"\nwire right\nL1: inductor right value="10u"\n# Row 2: crystal and transformer, offset below\nat: R1.start\nwire down\nwire down\nX1: crystal right\nwire right\nwire right\nT1: transformer right\n```\n\n### 2.3 Sources and power\n\n| DSL type | Description |\n|---|---|\n| `voltage_source` | Circle + polarity (also: `vsource`) |\n| `current_source` | Circle + arrow (also: `isource`) |\n| `ac_source` | Circle + sine symbol (also: `acsource`) |\n| `battery` | Alternating long/short terminal lines |\n| `vcc` | Power rail arrow (pointing up) |\n| `ground` | Earth ground \u2014 3 decreasing lines (also: `gnd`) |\n| `gnd_signal` | Signal ground \u2014 solid triangle |\n| `gnd_chassis` | Chassis ground |\n| `gnd_digital` | Digital ground |\n\n```\ncircuit "Sources and power gallery"\n# voltage source with ground\nV1: voltage_source down value="5V"\nwire down\nground\nat: V1.start\nwire right\nwire right\n# battery\nB1: battery down value="9V"\nwire down\nground\nat: B1.start\nwire right\nwire right\n# ac source\nA1: ac_source down value="120V"\nwire down\nground\nat: A1.start\nwire right\nwire right\n# vcc rail\nvcc up\nwire down\ngnd_signal down\n```\n\n### 2.4 Semiconductors \u2014 diodes\n\n| DSL type | Description |\n|---|---|\n| `diode` | Triangle + cathode bar |\n| `zener` | Diode + bent cathode bar |\n| `schottky` | Diode + S-bar |\n| `led` | Diode + outward emission arrows |\n| `photodiode` | Diode + inward light arrows |\n| `varactor` | Diode + variable capacitor |\n| `tvs_diode` | Bidirectional TVS (two bent bars) |\n| `bridge_rectifier` | 4-diode bridge, 4-pin |\n\n```\ncircuit "Diode types gallery"\nD1: diode right\nwire right\nD2: zener right\nwire right\nD3: led right\nwire right\nD4: schottky right\nwire right\nD5: photodiode right\nwire right\nground\nat: D1.start\nwire left\nground\n```\n\n### 2.5 Semiconductors \u2014 transistors\n\n| DSL type | Description |\n|---|---|\n| `npn` | NPN BJT (also: `transistor`, `bjt_npn`) |\n| `pnp` | PNP BJT (also: `bjt_pnp`) |\n| `darlington_npn` | NPN Darlington pair |\n| `darlington_pnp` | PNP Darlington pair |\n| `nmos` | N-channel MOSFET enhancement (also: `mosfet_n`) |\n| `pmos` | P-channel MOSFET enhancement (also: `mosfet_p`) |\n| `nmos_depletion` | N-channel MOSFET depletion |\n| `jfet_n` | N-channel JFET |\n| `jfet_p` | P-channel JFET |\n| `igbt` | IGBT |\n| `scr` | SCR / thyristor |\n| `triac` | TRIAC |\n| `diac` | DIAC |\n| `phototransistor` | NPN with light arrows |\n| `optocoupler` | LED + phototransistor in isolation box |\n\n```\ncircuit "Transistor types gallery"\n# NPN BJT\nQ1: npn right\nwire right\nwire right\n# PNP BJT\nQ2: pnp right\nwire right\nwire right\n# N-channel MOSFET\nQ3: nmos right\nwire right\nwire right\n# P-channel MOSFET\nQ4: pmos right\n```\n\n### 2.6 Analog ICs and op-amps\n\n| DSL type | Description |\n|---|---|\n| `opamp` | Triangle: +/\u2212 inputs, output |\n| `comparator` | Same shape, open-collector output |\n| `schmitt_buffer` | Buffer + hysteresis symbol |\n| `tri_state_buffer` | Buffer + enable pin |\n| `instrumentation_amp` | Three-op-amp INA block |\n| `generic_ic` | Configurable rect with labeled pins (also: `ic`) |\n| `voltage_regulator` | 3-terminal block: IN/GND/OUT (also: `reg`) |\n| `dc_dc_converter` | 2-port block with DC/DC label |\n| `555_timer` | 8-pin 555 pinout block (also: `timer555`) |\n\n```\ncircuit "Analog IC gallery"\n# op-amp with input/output wires\nwire right\nU1: opamp right\nwire right\nwire right\nwire right\n# comparator\nU2: comparator right\nwire right\nwire right\nwire right\n# generic IC block\nU3: generic_ic right\n```\n\n### 2.7 Switches and relays\n\n| DSL type | Description |\n|---|---|\n| `switch_spst` | Single-pole single-throw |\n| `switch_spdt` | Single-pole double-throw |\n| `switch_dpdt` | Double-pole double-throw |\n| `push_no` | Push button normally-open |\n| `push_nc` | Push button normally-closed |\n| `relay_coil` | Relay coil (2-pin rect) |\n| `relay_no` | Relay contact normally-open |\n| `relay_nc` | Relay contact normally-closed |\n\n```\ncircuit "Switch and relay gallery"\n# SPST switch\nS1: switch_spst right\nwire right\nwire right\n# SPDT switch\nS2: switch_spdt right\nwire right\nwire right\n# normally-open push button\nS3: push_no right\nwire right\nwire right\n# relay coil + contact pair\nK1: relay_coil right\nwire right\nK2: relay_no right\n```\n\n### 2.8 Electromechanical and measurement\n\n| DSL type | Description |\n|---|---|\n| `motor` | Circle + M |\n| `speaker` | Cone + box |\n| `microphone` | Capsule symbol |\n| `buzzer` | Piezo buzzer |\n| `ammeter` | Circle + A |\n| `voltmeter` | Circle + V |\n| `wattmeter` | Circle + W |\n| `oscilloscope` | Circle + waveform |\n\n### 2.9 Connectors and annotations\n\n| DSL type | Description |\n|---|---|\n| `wire` | Plain wire segment |\n| `dot` | Junction dot (T-junction marker) |\n| `label` | Net label / flag |\n| `port` | Named port (hollow circle) |\n| `test_point` | TP marker |\n| `no_connect` | X \u2014 intentionally unconnected pin |\n| `antenna` | Antenna stub |\n\n```\ncircuit "Passive components"\nR1: resistor right value="1k" label="R1"\nwire right\nC1: capacitor down value="100n" label="C1"\nwire down\nground\nat: R1.start\nwire up\nbattery up label="9V"\n```\n\n---\n\n## 3. Wiring and branching\n\n### 3.1 Wire segments\n\n`wire direction [N]` draws a bare wire from the current cursor in the given direction. An optional number sets the length in pixels.\n\n```\nwire right\nwire down 40\nwire left 20\n```\n\n### 3.2 Jumping the cursor with `at:`\n\n`at: id.end` moves the cursor to a named anchor without drawing anything. Use it to branch from a previously placed component.\n\n```\nR1: resistor right value="10k"\nat: R1.end\nC1: capacitor down value="100n"\n```\n\nNamed anchor suffixes: `end`, `start`. Components retain their ID across the whole diagram, so you can jump back to any previously placed component.\n\n### 3.3 Junction dots\n\nPlace a `dot` (or use `net NAME: dot`) to mark a T-junction \u2014 a point where three or more wires meet. Without a dot, crossed wires are drawn as a crossover (no connection).\n\n```\nR1: resistor right\ndot\nwire right # continues from R1.end\nat: R1.end\nC1: capacitor down # branches down from the same point\n```\n\n### 3.4 Named nets\n\n`net NAME` declares a named net. `net NAME: dot` declares the net and places a junction dot at the current cursor, remembering that location. Later, `at: NAME` jumps back to that net\'s anchor.\n\n```\nnet VOUT: dot\nR2: resistor right value="10k"\nat: VOUT\nC1: capacitor down value="470n"\n```\n\n### 3.5 Net labels\n\n`label "text" direction?` places a text label at the current cursor position. Labels do not advance the cursor. They are useful for naming power rails or inter-sheet connections.\n\n```\nlabel "VCC" up\nlabel "GND" down\n```\n\n```\ncircuit "RC filter"\nV1: voltage_source down value="5V"\nwire right\nR1: resistor right value="1k" label="R1"\nnet OUT: dot\nwire right\nlabel "Vout" right\nat: OUT\nC1: capacitor down value="100n" label="C1"\nwire down\nground\n```\n\n---\n\n## 4. Netlist mode\n\nAdd `netlist` after the title on the header line to switch to SPICE-style netlist parsing. The auto-layout engine computes component positions from the net connectivity.\n\n```\ncircuit "Low-pass filter" netlist\n```\n\n### 4.1 Netlist line format\n\nEach line is: `ID net1 net2 [net3\u2026] [value] [key=value\u2026]`\n\n- **ID** \u2014 component identifier. The first letter determines the default type (SPICE prefix convention).\n- **net1, net2, \u2026** \u2014 net names the pins connect to. Net names matching `0`, `gnd`, `ground`, `earth`, `pe`, `agnd`, `dgnd`, `gnda`, `gndd`, `vss`, or `com` (case-insensitive, with optional `_<word>` or numeric suffix \u2014 e.g. `gnd_ref`, `AGND_DIG`, `EARTH1`) all canonicalize to the ground net.\n- **value** (optional bare token) \u2014 component value or model name.\n- **key=value** (optional) \u2014 `label=`, `value=`, `type=` overrides.\n\n### 4.2 SPICE prefix \u2192 component type\n\n| Prefix | Default type | Pin order |\n|---|---|---|\n| `R` | `resistor` | p1, p2 |\n| `C` | `capacitor` | p1, p2 |\n| `L` | `inductor` | p1, p2 |\n| `D` | `diode` | anode (start), cathode (end) |\n| `V` | `voltage_source` | plus, minus |\n| `I` | `current_source` | plus, minus |\n| `Q` | `npn` | c, b, e |\n| `M` | `nmos` | d, g, s |\n| `J` | `jfet_n` | d, g, s |\n| `S` | `switch_spst` | p1, p2 |\n| `F` | `fuse` | p1, p2 |\n| `B` | `battery` | plus, minus |\n| `K` | `relay_coil` | p1, p2 |\n| `U`, `X` | `generic_ic` | custom via `pins=` |\n| `W` | `wire` | start, end |\n| `T` | `terminal_block` | custom via `pins=` (also `type=junction_box`) |\n\n> **Scope:** schematex circuit covers **electrical schematics only** (IEEE 315 / IEC 60617). Hydraulic and pneumatic schematics (ISO 1219) use a fundamentally different visual grammar \u2014 directional valve envelopes, cylinder symbols, line styles for pressure/return/drain \u2014 and are not supported by this engine. Hydraulic prefixes such as `EV*` (electrovalve), `BOMBA*` (pump), `TANK*`, `DIPOSIT*` will be rejected with a "cannot infer type" error.\n\n### 4.3 Transistor model override\n\nFor `Q` lines, a trailing model name overrides the type:\n\n```\nQ1 c b e npn # NPN BJT\nQ2 c b e pnp # PNP BJT\nM1 d g s nmos # N-channel MOSFET\nM2 d g s pmos # P-channel MOSFET\n```\n\nFor `D` lines, similarly:\n\n```\nD1 anode cathode zener\nD2 anode cathode led\nD3 anode cathode schottky\nD4 anode cathode photodiode\n```\n\n### 4.4 Netlist example\n\n```\ncircuit "CE Amp (netlist)" netlist\nV1 vcc 0 9V\nRc vcc c 2.2k\nRb vcc b 100k\nQ1 c b e npn\nRe e 0 1k\n```\n\n---\n\n## 5. Attributes\n\nBoth positional and netlist modes accept these key=value attributes:\n\n| Attribute | Accepted by | Effect |\n|---|---|---|\n| `label="\u2026"` | all components | Display label (reference designator) |\n| `value="\u2026"` | all components | Value annotation (1k\u03A9, 100nF, 5V) |\n| `at=id.end` | positional components | Start this component at a named anchor |\n| `length=N` | `wire`, some passives | Length in pixels |\n\nIn positional mode, `at=` inside the component line is equivalent to a preceding `at:` line:\n\n```\nC1: capacitor down at=R1.end value="100n"\n```\n\n---\n\n## 6. Labels & comments\n\n- **Diagram title:** `circuit "RC Filter"` \u2014 first line only.\n- **Component label:** `label="R1"` attribute \u2014 reference designator shown beside the symbol.\n- **Value annotation:** `value="4.7k"` \u2014 shown beside or below the component.\n- **Net label:** `label "VOUT" right` \u2014 standalone net flag at the current cursor.\n- **Comments:** `#` at the start of a line (after leading whitespace).\n\n---\n\n## 7. Reserved words & escaping\n\n**Reserved at line start (positional):** `circuit` (header), `at:`, `net`, `wire`, `label`.\n\n**Reserved in netlist mode:** same header rules apply; all other lines are SPICE component lines.\n\n**Ground net aliases (netlist only):** `0`, `gnd`, `GND`, `Gnd`, `ground`, `Ground` \u2014 all treated as the same node.\n\n**Component IDs** must match `[a-zA-Z_][a-zA-Z0-9_]*`. Spaces in values must be quoted: `value="10 k\u03A9"`.\n\n---\n\n## 8. Common mistakes\n\n| You wrote | Parser says | Fix |\n|---|---|---|\n| `resistor right 1k` (bare value without `value=`) | `1k` is parsed as an unknown attribute flag and ignored | Use `value="1k"`: `resistor right value="1k"` |\n| `at: R1.center` | `center` is not a recognized anchor suffix \u2014 cursor stays at current position | Use `at: R1.end` or `at: R1.start` |\n| `wire 40` (no direction) | Direction defaults to `right`; length `40` is accepted | Explicit direction recommended: `wire right 40` |\n| `R1 vcc out 10k` in positional mode | Line matches the bare-type pattern; `R1` is read as a type name, fails lookup | In positional mode, use `R1: resistor right value="10k"` |\n| `Q1 c b e` (netlist, no model) | Type defaults to `npn` from `Q` prefix \u2014 correct | OK; add `npn` explicitly for clarity |\n| `net OUT` then `at: OUT` without `net OUT: dot` | `OUT` net exists but has no anchor; jump has no destination | Use `net OUT: dot` to register the cursor position |\n| `label VCC up` (unquoted label) | `VCC` is parsed as a direction token, then `up` \u2014 the label text is lost | Quote the text: `label "VCC" up` |\n\n---\n\n## 9. Grammar (EBNF)\n\n```text\ndocument = header statement*\n\n-- Positional mode --\nheader = "circuit" ( WS quoted-string )? NEWLINE\nstatement = blank | comment | component | wire | at | net-decl | label-stmt\n\ncomponent = ( id ":" WS )? type WS direction? attrs* NEWLINE\nwire = "wire" ( WS direction )? ( WS integer )? NEWLINE\nat = "at:" WS anchor NEWLINE\nanchor = id "." ( "start" | "end" )\n | id // net name anchor\n\nnet-decl = "net" WS id NEWLINE // declare net only\n | "net" WS id ":" WS "dot" NEWLINE // declare + place dot\n\nlabel-stmt = "label" WS quoted-string ( WS direction )? NEWLINE\n\ncomponent-attr = "value=" quoted-string\n | "label=" quoted-string\n | "at=" anchor\n | "length=" integer\n\ndirection = "right" | "left" | "up" | "down"\ntype = // any value from \xA72 component tables\n\n-- Netlist mode --\nnetlist-header = "circuit" ( WS quoted-string )? WS "netlist" NEWLINE\nnetlist-stmt = id WS net-ref+ ( WS kv-pair )* NEWLINE\n | comment\nnet-ref = id | "0" // net name or ground alias\nkv-pair = id "=" ( quoted-string | bare-value )\n\nid = [a-zA-Z_] [a-zA-Z0-9_]*\ninteger = [0-9]+\nquoted-string = \'"\' any-char-but-quote* \'"\'\ncomment = "#" any NEWLINE\n```\n\nAuthoritative source: `src/diagrams/circuit/parser.ts` and `src/diagrams/circuit/netlist.ts`. If this diverges from the parser, the parser wins \u2014 please open an issue.\n\n---'
991
991
  },
992
992
  "block": {
993
993
  "title": "Block diagram",
@@ -1019,7 +1019,7 @@ var SYNTAX = {
1019
1019
  },
1020
1020
  "flowchart": {
1021
1021
  "title": "Flowchart",
1022
- "content": '## 1. Your first flowchart\n\nThe smallest useful flowchart: a decision with two outcomes.\n\n```\nflowchart TD\n A([Start]) --> B{File exists?}\n B -->|Yes| C[Read file]\n B -->|No| D[Return error]\n C --> E([Done])\n```\n\nFour rules cover 80% of usage:\n\n1. Start with `flowchart` followed by a direction: `TD`, `LR`, `BT`, or `RL`.\n2. Each node is `ID[Label]` \u2014 the shape brackets determine the node type (see \xA72).\n3. Connect nodes with `-->`. Add a label between pipe characters: `-->|Yes|`.\n4. Nodes are created automatically when first referenced in an edge \u2014 but explicit declarations let you set shapes and labels independently.\n\n> Comments start with `%%` on their own line.\n\n---\n\n## 2. Node shapes\n\nEach node shape is written as `ID<brackets>Label<brackets>`. The ID must start with a letter and may contain letters, digits, `_`, and `-`.\n\n| Syntax | Shape | Typical use |\n|---|---|---|\n| `A[Label]` | Rectangle | Process step, operation |\n| `A(Label)` | Rounded rectangle | Subprocess, soft step |\n| `A([Label])` | Stadium (pill) | Start / end terminal |\n| `A{Label}` | Diamond | Decision / condition |\n| `A{{Label}}` | Hexagon | Preparation, configuration |\n| `A[[Label]]` | Subroutine | Predefined process |\n| `A[(Label)]` | Cylinder | Database, storage |\n| `A((Label))` | Circle | Connector, junction |\n| `A(((Label)))` | Double circle | End state |\n| `A[/Label/]` | Parallelogram | Input / output |\n| `A[\\Label\\]` | Parallelogram (alt) | Manual operation |\n| `A[/Label\\]` | Trapezoid | Manual input |\n| `A[\\Label/]` | Trapezoid (alt) | Off-page connector |\n| `A>Label]` | Asymmetric | Tag, annotation |\n\n```\nflowchart TD\n t([Terminal / stadium])\n r[Rectangle process]\n d{Diamond decision}\n p[/Parallelogram input/]\n db[(Cylinder database)]\n sub[[Subroutine]]\n t --> r --> d\n d -->|branch A| p\n d -->|branch B| db\n p --> sub\n db --> sub\n```\n\n---\n\n## 3. Edges\n\nAn edge connects two nodes. The connector symbol determines the visual style and whether a label or arrowhead is present.\n\n### 3.1 Edge types\n\n```\nflowchart TD\n A --> B\n C --- D\n E -.-> F\n G ==> H\n I <--> J\n K --x L\n M --o N\n```\n\n| Syntax | Style | Arrow | Typical use |\n|---|---|---|---|\n| `A --> B` | Solid | Arrow | Normal flow |\n| `A --- B` | Solid | None | Association, undirected link |\n| `A -.-> B` | Dotted | Arrow | Optional / async path |\n| `A ==> B` | Thick | Arrow | Critical / primary path |\n| `A <--> B` | Solid | Both ends | Bidirectional flow |\n| `A --x B` | Solid | Cross | Blocked / rejected path |\n| `A --o B` | Solid | Circle | Aggregation / composition |\n\n### 3.2 Edge labels\n\nTwo syntaxes attach a label to an edge:\n\n**Pipe label** \u2014 placed between `|` characters directly after the arrow:\n```\nA -->|Yes| B\nA -.->|optional| B\nA ==>|critical| B\n```\n\n**Inline label** \u2014 text placed between the dashes, before the arrow character:\n```\nA -- success --> B\nA -- error --x C\n```\n\nBoth produce identical results. Pipe label is more common when sharing a diagram with Mermaid tools.\n\n```\nflowchart TD\n req[Request received]\n req -->|valid| proc[Process]\n req -->|invalid| err[Return 400]\n proc -- success --> ok([Done])\n proc -.->|timeout| retry[Retry queue]\n retry ==>|max retries| dead[(Dead letter)]\n```\n\n### 3.3 Chains\n\nConnect three or more nodes in a single line:\n\n```\nA --> B --> C --> D\n```\n\nThis is equivalent to three separate edge statements.\n\n### 3.4 Fan-out with `&`\n\nUse `&` to include multiple nodes on either side of an arrow. The parser generates the full cross-product of edges:\n\n```\nA & B --> C %% A\u2192C and B\u2192C\nA --> B & C %% A\u2192B and A\u2192C\nA & B --> C & D %% four edges: A\u2192C, A\u2192D, B\u2192C, B\u2192D\n```\n\n```\nflowchart LR\n deploy[Deploy service]\n smoke[Smoke test]\n health[Health check]\n notify_slack[Slack alert]\n notify_email[Email alert]\n deploy --> smoke & health\n smoke & health -->|fail| notify_slack & notify_email\n```\n\n---\n\n## 4. Subgraphs\n\nA `subgraph` groups related nodes into a labeled cluster with a visible border.\n\n```\nsubgraph "Title"\n A --> B\nend\n```\n\nThree subgraph header forms are accepted:\n\n| Form | ID | Label |\n|---|---|---|\n| `subgraph "My Group"` | auto-generated | `My Group` |\n| `subgraph sg1 "My Group"` | `sg1` | `My Group` |\n| `subgraph sg1 [My Group]` | `sg1` | `My Group` |\n\nSubgraphs can have their own `direction` override:\n\n```\nsubgraph sg1 "Frontend"\n direction LR\n ui[React App] --> api[API Client]\nend\n```\n\n```\nflowchart TB\n subgraph ingestion [Ingestion]\n raw[/Raw events/] --> parse[Parse & validate]\n parse --> enrich[Enrich]\n end\n subgraph storage [Storage]\n dw[(Data warehouse)]\n cache[(Redis cache)]\n end\n enrich --> dw\n enrich --> cache\n dw --> report[Generate report]\n```\n\n---\n\n## 5. Styling\n\n### 5.1 Semantic classes\n\nAssign CSS class names to nodes for theme-level visual grouping. Classes are defined with `classDef` and applied with `class`.\n\n```\nclassDef danger fill:#f9c,stroke:#c00\nclassDef safe fill:#cfc,stroke:#090\nclass errorNode danger\nclass successNode safe\n```\n\n### 5.2 Per-node style overrides\n\n```\nstyle nodeId fill:#f9f,stroke:#333,stroke-width:4px\n```\n\nAccepts standard CSS property names. Multiple properties are comma-separated.\n\n---\n\n## 6. Labels & comments\n\n- **Direction:** `flowchart TD` \u2014 first token after `flowchart` or `graph`. `TD` and `TB` are equivalent.\n- **Title:** `flowchart LR "My diagram"` \u2014 optional quoted string after the direction.\n- **Edge labels:** pipe syntax `-->|label|` or inline `-- label -->`.\n- **Comments:** `%%` at the start of a line (after leading whitespace).\n\n```\nflowchart LR\n%% This is a comment \u2014 ignored by the parser\nA[Step 1] --> B[Step 2] %% inline %% is NOT supported \u2014 only line-start %%\n```\n\n---\n\n## 7. Reserved words & escaping\n\n**Reserved at line start:** `flowchart`, `graph` (header), `subgraph`, `end`, `direction`, `class`, `classDef`, `style`, `linkStyle`.\n\n**Reserved ID characters:** IDs match `[A-Za-z0-9_-]` starting with a letter. Do not use spaces or operator characters in node IDs.\n\n**Operator tokens to avoid inside IDs:** `-->`, `---`, `-.->`, `==>`, `<-->`, `--x`, `--o`, `|`, `&`.\n\n**Labels with special characters:** The label is everything inside the shape brackets. Special characters are supported inside labels as-is \u2014 brackets/braces that would be ambiguous are closed by the matching closing token.\n\n---\n\n## 8. Common mistakes\n\n| You wrote | Parser says | Fix |\n|---|---|---|\n| `flowchart` with no direction | Direction defaults to `TB` | Add a direction: `flowchart TD` |\n| `A --> B` before declaring shapes | Works \u2014 nodes created as rectangles with the ID as label | Declare explicitly when you need a non-rect shape: `A([Start])` |\n| `A[Label with [brackets]]` | Inner `]` closes the shape early | Avoid nested brackets in labels |\n| `subgraph My Group` (unquoted, with space) | Parser takes `My` as subgraph id, `Group` as unknown token | Quote: `subgraph "My Group"` |\n| `%% comment` mid-line after code | Inline comments are not supported; `%%` must be at line start | Move comments to their own line |\n| `A --> B --> C` mixed with `A --> B` | Chains are additive \u2014 duplicate edges may appear | Use chains OR separate lines, not both for the same pair |\n| `direction LR` outside a subgraph | Silently ignored \u2014 `direction` override only applies inside `subgraph \u2026 end` | Set direction on the `flowchart` header line |\n\n---\n\n## 9. Grammar (EBNF)\n\n```text\ndocument = header (blank | comment | subgraph-block | direction-stmt\n | class-stmt | classdef-stmt | style-stmt\n | linkstyle-stmt | chain-stmt)*\n\nheader = ("flowchart" | "graph") ( WS direction )? ( WS title )? NEWLINE\ndirection = "TD" | "TB" | "BT" | "LR" | "RL"\ntitle = \'"\' any-char-but-quote* \'"\' | bare-word\n\nsubgraph-block = "subgraph" ( WS subgraph-header )? NEWLINE\n ( WS? "direction" WS direction NEWLINE )?\n statement*\n "end" NEWLINE\nsubgraph-header = id WS "[" label "]"\n | id WS quoted-string\n | quoted-string\n | id\n\nchain-stmt = node-group ( WS edge-op WS pipe-label? WS node-group )* NEWLINE\nnode-group = node-ref ( WS "&" WS node-ref )*\nnode-ref = id shape-suffix?\nshape-suffix = "[" label "]" %% rect\n | "(" label ")" %% round\n | "([" label "])" %% stadium\n | "{" label "}" %% diamond\n | "{{" label "}}" %% hexagon\n | "[[" label "]]" %% subroutine\n | "[(" label ")]" %% cylinder\n | "((" label "))" %% circle\n | "(((" label ")))" %% double-circle\n | "[/" label "/]" %% parallelogram\n | "[\\" label "\\]" %% parallelogram-alt\n | "[/" label "\\]" %% trapezoid\n | "[\\" label "/]" %% trapezoid-alt\n | ">" label "]" %% asymmetric\n\nedge-op = "-->" | "---" | "-."-".->" | "==>" | "<-->" | "--x" | "--o"\n | inline-label variants of the above\npipe-label = "|" text "|"\n\nclass-stmt = "class" WS id-list WS class-name NEWLINE\nclassdef-stmt = "classDef" WS class-name WS css-props NEWLINE\nstyle-stmt = "style" WS id WS css-props NEWLINE\nlinkstyle-stmt = "linkStyle" WS ... %% parsed but not yet rendered\n\ncomment = "%%" any NEWLINE\nid = [A-Za-z] [A-Za-z0-9_-]*\n```\n\nAuthoritative source: `src/diagrams/flowchart/parser.ts`. If this diverges from the parser, the parser wins \u2014 please open an issue.\n\n---'
1022
+ "content": '## 1. Your first flowchart\n\nThe smallest useful flowchart: a decision with two outcomes.\n\n```\nflowchart TD\n A([Start]) --> B{File exists?}\n B -->|Yes| C[Read file]\n B -->|No| D[Return error]\n C --> E([Done])\n```\n\nFour rules cover 80% of usage:\n\n1. Start with `flowchart` followed by a direction: `TD`, `LR`, `BT`, or `RL`.\n2. Each node is `ID[Label]` \u2014 the shape brackets determine the node type (see \xA72).\n3. Connect nodes with `-->`. Add a label between pipe characters: `-->|Yes|`.\n4. Nodes are created automatically when first referenced in an edge \u2014 but explicit declarations let you set shapes and labels independently.\n\n> Comments start with `%%` on their own line.\n\n---\n\n## 2. Node shapes\n\nEach node shape is written as `ID<brackets>Label<brackets>`. The ID must start with a letter and may contain letters, digits, `_`, and `-`.\n\n| Syntax | Shape | Typical use |\n|---|---|---|\n| `A[Label]` | Rectangle | Process step, operation |\n| `A(Label)` | Rounded rectangle | Subprocess, soft step |\n| `A([Label])` | Stadium (pill) | Start / end terminal |\n| `A{Label}` | Diamond | Decision / condition |\n| `A{{Label}}` | Hexagon | Preparation, configuration |\n| `A[[Label]]` | Subroutine | Predefined process |\n| `A[(Label)]` | Cylinder | Database, storage |\n| `A((Label))` | Circle | Connector, junction |\n| `A(((Label)))` | Double circle | End state |\n| `A[/Label/]` | Parallelogram | Input / output |\n| `A[\\Label\\]` | Parallelogram (alt) | Manual operation |\n| `A[/Label\\]` | Trapezoid | Manual input |\n| `A[\\Label/]` | Trapezoid (alt) | Off-page connector |\n| `A>Label]` | Asymmetric | Tag, annotation |\n\n```\nflowchart TD\n t([Terminal / stadium])\n r[Rectangle process]\n d{Diamond decision}\n p[/Parallelogram input/]\n db[(Cylinder database)]\n sub[[Subroutine]]\n t --> r --> d\n d -->|branch A| p\n d -->|branch B| db\n p --> sub\n db --> sub\n```\n\n---\n\n## 3. Edges\n\nAn edge connects two nodes. The connector symbol determines the visual style and whether a label or arrowhead is present.\n\n### 3.1 Edge types\n\n```\nflowchart TD\n A --> B\n C --- D\n E -.-> F\n G ==> H\n I <--> J\n K --x L\n M --o N\n```\n\n| Syntax | Style | Arrow | Typical use |\n|---|---|---|---|\n| `A --> B` | Solid | Arrow | Normal flow |\n| `A --- B` | Solid | None | Association, undirected link |\n| `A -.-> B` | Dotted | Arrow | Optional / async path |\n| `A ==> B` | Thick | Arrow | Critical / primary path |\n| `A <--> B` | Solid | Both ends | Bidirectional flow |\n| `A --x B` | Solid | Cross | Blocked / rejected path |\n| `A --o B` | Solid | Circle | Aggregation / composition |\n\n### 3.2 Edge labels\n\nTwo syntaxes attach a label to an edge:\n\n**Pipe label** \u2014 placed between `|` characters directly after the arrow:\n```\nA -->|Yes| B\nA -.->|optional| B\nA ==>|critical| B\n```\n\n**Inline label** \u2014 text placed between the dashes, before the arrow character:\n```\nA -- success --> B\nA -- error --x C\n```\n\nBoth produce identical results. Pipe label is more common when sharing a diagram with Mermaid tools.\n\n```\nflowchart TD\n req[Request received]\n req -->|valid| proc[Process]\n req -->|invalid| err[Return 400]\n proc -- success --> ok([Done])\n proc -.->|timeout| retry[Retry queue]\n retry ==>|max retries| dead[(Dead letter)]\n```\n\n### 3.3 Chains\n\nConnect three or more nodes in a single line:\n\n```\nA --> B --> C --> D\n```\n\nThis is equivalent to three separate edge statements.\n\n### 3.4 Fan-out with `&`\n\nUse `&` to include multiple nodes on either side of an arrow. The parser generates the full cross-product of edges:\n\n```\nA & B --> C %% A\u2192C and B\u2192C\nA --> B & C %% A\u2192B and A\u2192C\nA & B --> C & D %% four edges: A\u2192C, A\u2192D, B\u2192C, B\u2192D\n```\n\n```\nflowchart LR\n deploy[Deploy service]\n smoke[Smoke test]\n health[Health check]\n notify_slack[Slack alert]\n notify_email[Email alert]\n deploy --> smoke & health\n smoke & health -->|fail| notify_slack & notify_email\n```\n\n---\n\n## 4. Subgraphs\n\nA `subgraph` groups related nodes into a labeled cluster with a visible border.\n\n```\nsubgraph "Title"\n A --> B\nend\n```\n\nThree subgraph header forms are accepted:\n\n| Form | ID | Label |\n|---|---|---|\n| `subgraph "My Group"` | auto-generated | `My Group` |\n| `subgraph sg1 "My Group"` | `sg1` | `My Group` |\n| `subgraph sg1 [My Group]` | `sg1` | `My Group` |\n\nSubgraphs can have their own `direction` override:\n\n```\nsubgraph sg1 "Frontend"\n direction LR\n ui[React App] --> api[API Client]\nend\n```\n\n```\nflowchart TB\n subgraph ingestion [Ingestion]\n raw[/Raw events/] --> parse[Parse & validate]\n parse --> enrich[Enrich]\n end\n subgraph storage [Storage]\n dw[(Data warehouse)]\n cache[(Redis cache)]\n end\n enrich --> dw\n enrich --> cache\n dw --> report[Generate report]\n```\n\n---\n\n## 5. Styling\n\n### 5.1 Semantic classes\n\nAssign CSS class names to nodes for theme-level visual grouping. Classes are defined with `classDef` and applied with `class`.\n\n```\nclassDef danger fill:#f9c,stroke:#c00\nclassDef safe fill:#cfc,stroke:#090\nclass errorNode danger\nclass successNode safe\n```\n\n### 5.2 Per-node style overrides\n\n```\nstyle nodeId fill:#f9f,stroke:#333,stroke-width:4px\n```\n\nAccepts standard CSS property names. Multiple properties are comma-separated.\n\n### 5.3 Per-edge style overrides\n\n`linkStyle` targets edges by their **declaration index** (0-based, in the order they appear in the source). Multiple comma-separated indices apply the same props to several edges:\n\n```\nflowchart TD\n A --> B\n B ==> C\n B -.-> D\n C --> E\n D --> E\n linkStyle 1 stroke:#d32f2f,stroke-width:4px\n linkStyle 2,4 stroke:#f57c00,stroke-dasharray:5 5\n```\n\nUse this to highlight a critical path or distinguish an alternate flow.\n\n### 5.4 Inline label formatting\n\nNode labels accept three inline formatting tags:\n\n| Tag | Effect |\n|---|---|\n| `<br/>` or `<br>` | Line break |\n| `<b>\u2026</b>` | Bold |\n| `<i>\u2026</i>` | Italic |\n\n```\nflowchart TD\n M1["0 \\| 0<br/><b>START</b>"]\n M2["4 \\| 4<br/><b>Phase 1</b><br/><i>est. 4h</i>"]\n M1 --> M2\n```\n\nTags can be nested and mixed mid-line (`Hello <b>world</b>!`). Edge labels are single-line and do not currently support these tags.\n\n---\n\n## 6. Labels & comments\n\n- **Direction:** `flowchart TD` \u2014 first token after `flowchart` or `graph`. `TD` and `TB` are equivalent.\n- **Title:** `flowchart LR "My diagram"` \u2014 optional quoted string after the direction.\n- **Edge labels:** pipe syntax `-->|label|` or inline `-- label -->`.\n- **Comments:** `%%` at the start of a line (after leading whitespace).\n\n```\nflowchart LR\n%% This is a comment \u2014 ignored by the parser\nA[Step 1] --> B[Step 2] %% inline %% is NOT supported \u2014 only line-start %%\n```\n\n---\n\n## 7. Reserved words & escaping\n\n**Reserved at line start:** `flowchart`, `graph` (header), `subgraph`, `end`, `direction`, `class`, `classDef`, `style`, `linkStyle`.\n\n**Reserved ID characters:** IDs match `[A-Za-z0-9_-]` starting with a letter. Do not use spaces or operator characters in node IDs.\n\n**Operator tokens to avoid inside IDs:** `-->`, `---`, `-.->`, `==>`, `<-->`, `--x`, `--o`, `|`, `&`.\n\n**Labels with special characters:** The label is everything inside the shape brackets. Special characters are supported inside labels as-is \u2014 brackets/braces that would be ambiguous are closed by the matching closing token.\n\n---\n\n## 8. Common mistakes\n\n| You wrote | Parser says | Fix |\n|---|---|---|\n| `flowchart` with no direction | Direction defaults to `TB` | Add a direction: `flowchart TD` |\n| `A --> B` before declaring shapes | Works \u2014 nodes created as rectangles with the ID as label | Declare explicitly when you need a non-rect shape: `A([Start])` |\n| `A[Label with [brackets]]` | Inner `]` closes the shape early | Avoid nested brackets in labels |\n| `subgraph My Group` (unquoted, with space) | Parser takes `My` as subgraph id, `Group` as unknown token | Quote: `subgraph "My Group"` |\n| `%% comment` mid-line after code | Inline comments are not supported; `%%` must be at line start | Move comments to their own line |\n| `A --> B --> C` mixed with `A --> B` | Chains are additive \u2014 duplicate edges may appear | Use chains OR separate lines, not both for the same pair |\n| `direction LR` outside a subgraph | Silently ignored \u2014 `direction` override only applies inside `subgraph \u2026 end` | Set direction on the `flowchart` header line |\n\n---\n\n## 9. Grammar (EBNF)\n\n```text\ndocument = header (blank | comment | subgraph-block | direction-stmt\n | class-stmt | classdef-stmt | style-stmt\n | linkstyle-stmt | chain-stmt)*\n\nheader = ("flowchart" | "graph") ( WS direction )? ( WS title )? NEWLINE\ndirection = "TD" | "TB" | "BT" | "LR" | "RL"\ntitle = \'"\' any-char-but-quote* \'"\' | bare-word\n\nsubgraph-block = "subgraph" ( WS subgraph-header )? NEWLINE\n ( WS? "direction" WS direction NEWLINE )?\n statement*\n "end" NEWLINE\nsubgraph-header = id WS "[" label "]"\n | id WS quoted-string\n | quoted-string\n | id\n\nchain-stmt = node-group ( WS edge-op WS pipe-label? WS node-group )* NEWLINE\nnode-group = node-ref ( WS "&" WS node-ref )*\nnode-ref = id shape-suffix?\nshape-suffix = "[" label "]" %% rect\n | "(" label ")" %% round\n | "([" label "])" %% stadium\n | "{" label "}" %% diamond\n | "{{" label "}}" %% hexagon\n | "[[" label "]]" %% subroutine\n | "[(" label ")]" %% cylinder\n | "((" label "))" %% circle\n | "(((" label ")))" %% double-circle\n | "[/" label "/]" %% parallelogram\n | "[\\" label "\\]" %% parallelogram-alt\n | "[/" label "\\]" %% trapezoid\n | "[\\" label "/]" %% trapezoid-alt\n | ">" label "]" %% asymmetric\n\nedge-op = "-->" | "---" | "-."-".->" | "==>" | "<-->" | "--x" | "--o"\n | inline-label variants of the above\npipe-label = "|" text "|"\n\nclass-stmt = "class" WS id-list WS class-name NEWLINE\nclassdef-stmt = "classDef" WS class-name WS css-props NEWLINE\nstyle-stmt = "style" WS id WS css-props NEWLINE\nlinkstyle-stmt = "linkStyle" WS index-list WS css-props NEWLINE\nindex-list = NUMBER ( "," NUMBER )* | "default"\n\ncomment = "%%" any NEWLINE\nid = [A-Za-z] [A-Za-z0-9_-]*\n```\n\nAuthoritative source: `src/diagrams/flowchart/parser.ts`. If this diverges from the parser, the parser wins \u2014 please open an issue.\n\n---'
1023
1023
  },
1024
1024
  "matrix": {
1025
1025
  "title": "Matrix / Quadrant diagram",
@@ -1123,7 +1123,7 @@ function getExamples(type, opts = {}) {
1123
1123
  function validateDsl(type, dsl) {
1124
1124
  const config = type ? { type } : void 0;
1125
1125
  try {
1126
- chunkYTEEZV6J_cjs.parse(dsl, config);
1126
+ chunkAPV4AWQ5_cjs.parse(dsl, config);
1127
1127
  return { ok: true, type: type ?? resolveTypeFromText(dsl) };
1128
1128
  } catch (err) {
1129
1129
  return {
@@ -1139,7 +1139,7 @@ function renderDsl(type, dsl, options = {}) {
1139
1139
  ...type ? { type } : {}
1140
1140
  };
1141
1141
  try {
1142
- const svg = chunkYTEEZV6J_cjs.render(dsl, config);
1142
+ const svg = chunkAPV4AWQ5_cjs.render(dsl, config);
1143
1143
  return { ok: true, type: type ?? resolveTypeFromText(dsl), svg };
1144
1144
  } catch (err) {
1145
1145
  return {
@@ -1163,5 +1163,5 @@ exports.getSyntax = getSyntax;
1163
1163
  exports.listDiagrams = listDiagrams;
1164
1164
  exports.renderDsl = renderDsl;
1165
1165
  exports.validateDsl = validateDsl;
1166
- //# sourceMappingURL=chunk-RODV6PC4.cjs.map
1167
- //# sourceMappingURL=chunk-RODV6PC4.cjs.map
1166
+ //# sourceMappingURL=chunk-UWRTV6IV.cjs.map
1167
+ //# sourceMappingURL=chunk-UWRTV6IV.cjs.map