schematex 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +379 -0
  3. package/dist/chunk-2MQWZ2XY.cjs +453 -0
  4. package/dist/chunk-2MQWZ2XY.cjs.map +1 -0
  5. package/dist/chunk-2UKC6ZCY.cjs +1803 -0
  6. package/dist/chunk-2UKC6ZCY.cjs.map +1 -0
  7. package/dist/chunk-34X3ZJ6E.cjs +783 -0
  8. package/dist/chunk-34X3ZJ6E.cjs.map +1 -0
  9. package/dist/chunk-3FTUWAXK.cjs +1220 -0
  10. package/dist/chunk-3FTUWAXK.cjs.map +1 -0
  11. package/dist/chunk-3J7TFUOC.js +745 -0
  12. package/dist/chunk-3J7TFUOC.js.map +1 -0
  13. package/dist/chunk-47ZC6EMJ.js +1009 -0
  14. package/dist/chunk-47ZC6EMJ.js.map +1 -0
  15. package/dist/chunk-4DBRNOPA.cjs +750 -0
  16. package/dist/chunk-4DBRNOPA.cjs.map +1 -0
  17. package/dist/chunk-4G7ZIBHN.js +778 -0
  18. package/dist/chunk-4G7ZIBHN.js.map +1 -0
  19. package/dist/chunk-5C7DPDHQ.js +1321 -0
  20. package/dist/chunk-5C7DPDHQ.js.map +1 -0
  21. package/dist/chunk-ADOXGKAK.js +1251 -0
  22. package/dist/chunk-ADOXGKAK.js.map +1 -0
  23. package/dist/chunk-BE5HNDA5.cjs +874 -0
  24. package/dist/chunk-BE5HNDA5.cjs.map +1 -0
  25. package/dist/chunk-CZRM7LT7.js +889 -0
  26. package/dist/chunk-CZRM7LT7.js.map +1 -0
  27. package/dist/chunk-D4JTSPOL.js +1795 -0
  28. package/dist/chunk-D4JTSPOL.js.map +1 -0
  29. package/dist/chunk-DS47NTWZ.cjs +1034 -0
  30. package/dist/chunk-DS47NTWZ.cjs.map +1 -0
  31. package/dist/chunk-FDLZEKEB.js +449 -0
  32. package/dist/chunk-FDLZEKEB.js.map +1 -0
  33. package/dist/chunk-FGPTCDUT.cjs +1851 -0
  34. package/dist/chunk-FGPTCDUT.cjs.map +1 -0
  35. package/dist/chunk-HDKDQAEQ.cjs +86 -0
  36. package/dist/chunk-HDKDQAEQ.cjs.map +1 -0
  37. package/dist/chunk-IX554O5K.js +346 -0
  38. package/dist/chunk-IX554O5K.js.map +1 -0
  39. package/dist/chunk-KLJEK547.js +71 -0
  40. package/dist/chunk-KLJEK547.js.map +1 -0
  41. package/dist/chunk-LMFSHK45.js +1028 -0
  42. package/dist/chunk-LMFSHK45.js.map +1 -0
  43. package/dist/chunk-MDICUK6F.cjs +1258 -0
  44. package/dist/chunk-MDICUK6F.cjs.map +1 -0
  45. package/dist/chunk-N7KOXOMX.cjs +363 -0
  46. package/dist/chunk-N7KOXOMX.cjs.map +1 -0
  47. package/dist/chunk-NYCIK4SU.cjs +775 -0
  48. package/dist/chunk-NYCIK4SU.cjs.map +1 -0
  49. package/dist/chunk-PDPHRZZT.js +770 -0
  50. package/dist/chunk-PDPHRZZT.js.map +1 -0
  51. package/dist/chunk-ROFLJ74T.js +1212 -0
  52. package/dist/chunk-ROFLJ74T.js.map +1 -0
  53. package/dist/chunk-S6BK5DB6.cjs +845 -0
  54. package/dist/chunk-S6BK5DB6.cjs.map +1 -0
  55. package/dist/chunk-U4I37IBN.js +874 -0
  56. package/dist/chunk-U4I37IBN.js.map +1 -0
  57. package/dist/chunk-U5GGE6PJ.js +839 -0
  58. package/dist/chunk-U5GGE6PJ.js.map +1 -0
  59. package/dist/chunk-UHLYS3W5.cjs +1015 -0
  60. package/dist/chunk-UHLYS3W5.cjs.map +1 -0
  61. package/dist/chunk-URSKIHSY.cjs +881 -0
  62. package/dist/chunk-URSKIHSY.cjs.map +1 -0
  63. package/dist/chunk-V6WO7RK7.cjs +1056 -0
  64. package/dist/chunk-V6WO7RK7.cjs.map +1 -0
  65. package/dist/chunk-VFQCTXOX.js +869 -0
  66. package/dist/chunk-VFQCTXOX.js.map +1 -0
  67. package/dist/chunk-XQ52ICHU.cjs +895 -0
  68. package/dist/chunk-XQ52ICHU.cjs.map +1 -0
  69. package/dist/chunk-XX4BKS7Y.js +1051 -0
  70. package/dist/chunk-XX4BKS7Y.js.map +1 -0
  71. package/dist/chunk-XXU36667.js +1844 -0
  72. package/dist/chunk-XXU36667.js.map +1 -0
  73. package/dist/chunk-ZX7QKZK2.cjs +1326 -0
  74. package/dist/chunk-ZX7QKZK2.cjs.map +1 -0
  75. package/dist/diagrams/blockdiagram/index.cjs +25 -0
  76. package/dist/diagrams/blockdiagram/index.cjs.map +1 -0
  77. package/dist/diagrams/blockdiagram/index.d.cts +67 -0
  78. package/dist/diagrams/blockdiagram/index.d.ts +67 -0
  79. package/dist/diagrams/blockdiagram/index.js +4 -0
  80. package/dist/diagrams/blockdiagram/index.js.map +1 -0
  81. package/dist/diagrams/circuit/index.cjs +34 -0
  82. package/dist/diagrams/circuit/index.cjs.map +1 -0
  83. package/dist/diagrams/circuit/index.d.cts +138 -0
  84. package/dist/diagrams/circuit/index.d.ts +138 -0
  85. package/dist/diagrams/circuit/index.js +5 -0
  86. package/dist/diagrams/circuit/index.js.map +1 -0
  87. package/dist/diagrams/ecomap/index.cjs +30 -0
  88. package/dist/diagrams/ecomap/index.cjs.map +1 -0
  89. package/dist/diagrams/ecomap/index.d.cts +15 -0
  90. package/dist/diagrams/ecomap/index.d.ts +15 -0
  91. package/dist/diagrams/ecomap/index.js +5 -0
  92. package/dist/diagrams/ecomap/index.js.map +1 -0
  93. package/dist/diagrams/entity/index.cjs +26 -0
  94. package/dist/diagrams/entity/index.cjs.map +1 -0
  95. package/dist/diagrams/entity/index.d.cts +54 -0
  96. package/dist/diagrams/entity/index.d.ts +54 -0
  97. package/dist/diagrams/entity/index.js +5 -0
  98. package/dist/diagrams/entity/index.js.map +1 -0
  99. package/dist/diagrams/fishbone/index.cjs +34 -0
  100. package/dist/diagrams/fishbone/index.cjs.map +1 -0
  101. package/dist/diagrams/fishbone/index.d.cts +185 -0
  102. package/dist/diagrams/fishbone/index.d.ts +185 -0
  103. package/dist/diagrams/fishbone/index.js +5 -0
  104. package/dist/diagrams/fishbone/index.js.map +1 -0
  105. package/dist/diagrams/flowchart/index.cjs +34 -0
  106. package/dist/diagrams/flowchart/index.cjs.map +1 -0
  107. package/dist/diagrams/flowchart/index.d.cts +2 -0
  108. package/dist/diagrams/flowchart/index.d.ts +2 -0
  109. package/dist/diagrams/flowchart/index.js +5 -0
  110. package/dist/diagrams/flowchart/index.js.map +1 -0
  111. package/dist/diagrams/genogram/index.cjs +38 -0
  112. package/dist/diagrams/genogram/index.cjs.map +1 -0
  113. package/dist/diagrams/genogram/index.d.cts +20 -0
  114. package/dist/diagrams/genogram/index.d.ts +20 -0
  115. package/dist/diagrams/genogram/index.js +5 -0
  116. package/dist/diagrams/genogram/index.js.map +1 -0
  117. package/dist/diagrams/ladder/index.cjs +26 -0
  118. package/dist/diagrams/ladder/index.cjs.map +1 -0
  119. package/dist/diagrams/ladder/index.d.cts +49 -0
  120. package/dist/diagrams/ladder/index.d.ts +49 -0
  121. package/dist/diagrams/ladder/index.js +5 -0
  122. package/dist/diagrams/ladder/index.js.map +1 -0
  123. package/dist/diagrams/logic/index.cjs +26 -0
  124. package/dist/diagrams/logic/index.cjs.map +1 -0
  125. package/dist/diagrams/logic/index.d.cts +73 -0
  126. package/dist/diagrams/logic/index.d.ts +73 -0
  127. package/dist/diagrams/logic/index.js +5 -0
  128. package/dist/diagrams/logic/index.js.map +1 -0
  129. package/dist/diagrams/orgchart/index.cjs +30 -0
  130. package/dist/diagrams/orgchart/index.cjs.map +1 -0
  131. package/dist/diagrams/orgchart/index.d.cts +100 -0
  132. package/dist/diagrams/orgchart/index.d.ts +100 -0
  133. package/dist/diagrams/orgchart/index.js +5 -0
  134. package/dist/diagrams/orgchart/index.js.map +1 -0
  135. package/dist/diagrams/pedigree/index.cjs +30 -0
  136. package/dist/diagrams/pedigree/index.cjs.map +1 -0
  137. package/dist/diagrams/pedigree/index.d.cts +15 -0
  138. package/dist/diagrams/pedigree/index.d.ts +15 -0
  139. package/dist/diagrams/pedigree/index.js +5 -0
  140. package/dist/diagrams/pedigree/index.js.map +1 -0
  141. package/dist/diagrams/phylo/index.cjs +30 -0
  142. package/dist/diagrams/phylo/index.cjs.map +1 -0
  143. package/dist/diagrams/phylo/index.d.cts +32 -0
  144. package/dist/diagrams/phylo/index.d.ts +32 -0
  145. package/dist/diagrams/phylo/index.js +5 -0
  146. package/dist/diagrams/phylo/index.js.map +1 -0
  147. package/dist/diagrams/sld/index.cjs +26 -0
  148. package/dist/diagrams/sld/index.cjs.map +1 -0
  149. package/dist/diagrams/sld/index.d.cts +58 -0
  150. package/dist/diagrams/sld/index.d.ts +58 -0
  151. package/dist/diagrams/sld/index.js +5 -0
  152. package/dist/diagrams/sld/index.js.map +1 -0
  153. package/dist/diagrams/sociogram/index.cjs +26 -0
  154. package/dist/diagrams/sociogram/index.cjs.map +1 -0
  155. package/dist/diagrams/sociogram/index.d.cts +76 -0
  156. package/dist/diagrams/sociogram/index.d.ts +76 -0
  157. package/dist/diagrams/sociogram/index.js +5 -0
  158. package/dist/diagrams/sociogram/index.js.map +1 -0
  159. package/dist/diagrams/timing/index.cjs +21 -0
  160. package/dist/diagrams/timing/index.cjs.map +1 -0
  161. package/dist/diagrams/timing/index.d.cts +9 -0
  162. package/dist/diagrams/timing/index.d.ts +9 -0
  163. package/dist/diagrams/timing/index.js +4 -0
  164. package/dist/diagrams/timing/index.js.map +1 -0
  165. package/dist/diagrams/venn/index.cjs +38 -0
  166. package/dist/diagrams/venn/index.cjs.map +1 -0
  167. package/dist/diagrams/venn/index.d.cts +69 -0
  168. package/dist/diagrams/venn/index.d.ts +69 -0
  169. package/dist/diagrams/venn/index.js +5 -0
  170. package/dist/diagrams/venn/index.js.map +1 -0
  171. package/dist/index-BSlza1YY.d.ts +150 -0
  172. package/dist/index-BXefHVce.d.cts +150 -0
  173. package/dist/index.cjs +2033 -0
  174. package/dist/index.cjs.map +1 -0
  175. package/dist/index.d.cts +29 -0
  176. package/dist/index.d.ts +29 -0
  177. package/dist/index.js +1944 -0
  178. package/dist/index.js.map +1 -0
  179. package/dist/types-DqfcYkcY.d.cts +741 -0
  180. package/dist/types-DqfcYkcY.d.ts +741 -0
  181. package/package.json +163 -0
@@ -0,0 +1,76 @@
1
+ import { b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
2
+
3
+ type SociogramLayout = "circular" | "force-directed" | "concentric";
4
+ type EdgeValence = "positive" | "negative" | "neutral";
5
+ type EdgeDirection = "one-way" | "mutual" | "undirected";
6
+ type NodeRole = "star" | "isolate" | "bridge" | "neglectee" | "rejected";
7
+ type SizingMode = "uniform" | "in-degree" | "betweenness";
8
+ type ColoringMode = "default" | "group" | "role";
9
+ interface SociogramNode {
10
+ id: string;
11
+ label?: string;
12
+ group?: string;
13
+ role?: NodeRole;
14
+ size?: "small" | "medium" | "large";
15
+ properties?: Record<string, string>;
16
+ }
17
+ interface SociogramEdge {
18
+ from: string;
19
+ to: string;
20
+ direction: EdgeDirection;
21
+ valence: EdgeValence;
22
+ weight: number;
23
+ label?: string;
24
+ }
25
+ interface SociogramGroup {
26
+ id: string;
27
+ label?: string;
28
+ color?: string;
29
+ members: string[];
30
+ }
31
+ interface SociogramConfig {
32
+ layout: SociogramLayout;
33
+ sizing: SizingMode;
34
+ coloring: ColoringMode;
35
+ highlight: string[];
36
+ }
37
+ interface SociogramAST {
38
+ type: "sociogram";
39
+ title?: string;
40
+ config: SociogramConfig;
41
+ nodes: SociogramNode[];
42
+ edges: SociogramEdge[];
43
+ groups: SociogramGroup[];
44
+ }
45
+ declare function parseSociogram(text: string): SociogramAST;
46
+
47
+ interface SociogramLayoutNode {
48
+ node: SociogramNode;
49
+ x: number;
50
+ y: number;
51
+ radius: number;
52
+ computedRole?: NodeRole;
53
+ }
54
+ interface SociogramLayoutEdge {
55
+ edge: SociogramEdge;
56
+ x1: number;
57
+ y1: number;
58
+ x2: number;
59
+ y2: number;
60
+ }
61
+ interface SociogramLayoutResult {
62
+ width: number;
63
+ height: number;
64
+ nodes: SociogramLayoutNode[];
65
+ edges: SociogramLayoutEdge[];
66
+ ast: SociogramAST;
67
+ }
68
+ declare function layoutSociogram(ast: SociogramAST): SociogramLayoutResult;
69
+
70
+ declare function renderSociogram(layout: SociogramLayoutResult, options?: {
71
+ theme?: string;
72
+ }): string;
73
+
74
+ declare const sociogram: DiagramPlugin;
75
+
76
+ export { layoutSociogram, parseSociogram, renderSociogram, sociogram };
@@ -0,0 +1,76 @@
1
+ import { b as DiagramPlugin } from '../../types-DqfcYkcY.js';
2
+
3
+ type SociogramLayout = "circular" | "force-directed" | "concentric";
4
+ type EdgeValence = "positive" | "negative" | "neutral";
5
+ type EdgeDirection = "one-way" | "mutual" | "undirected";
6
+ type NodeRole = "star" | "isolate" | "bridge" | "neglectee" | "rejected";
7
+ type SizingMode = "uniform" | "in-degree" | "betweenness";
8
+ type ColoringMode = "default" | "group" | "role";
9
+ interface SociogramNode {
10
+ id: string;
11
+ label?: string;
12
+ group?: string;
13
+ role?: NodeRole;
14
+ size?: "small" | "medium" | "large";
15
+ properties?: Record<string, string>;
16
+ }
17
+ interface SociogramEdge {
18
+ from: string;
19
+ to: string;
20
+ direction: EdgeDirection;
21
+ valence: EdgeValence;
22
+ weight: number;
23
+ label?: string;
24
+ }
25
+ interface SociogramGroup {
26
+ id: string;
27
+ label?: string;
28
+ color?: string;
29
+ members: string[];
30
+ }
31
+ interface SociogramConfig {
32
+ layout: SociogramLayout;
33
+ sizing: SizingMode;
34
+ coloring: ColoringMode;
35
+ highlight: string[];
36
+ }
37
+ interface SociogramAST {
38
+ type: "sociogram";
39
+ title?: string;
40
+ config: SociogramConfig;
41
+ nodes: SociogramNode[];
42
+ edges: SociogramEdge[];
43
+ groups: SociogramGroup[];
44
+ }
45
+ declare function parseSociogram(text: string): SociogramAST;
46
+
47
+ interface SociogramLayoutNode {
48
+ node: SociogramNode;
49
+ x: number;
50
+ y: number;
51
+ radius: number;
52
+ computedRole?: NodeRole;
53
+ }
54
+ interface SociogramLayoutEdge {
55
+ edge: SociogramEdge;
56
+ x1: number;
57
+ y1: number;
58
+ x2: number;
59
+ y2: number;
60
+ }
61
+ interface SociogramLayoutResult {
62
+ width: number;
63
+ height: number;
64
+ nodes: SociogramLayoutNode[];
65
+ edges: SociogramLayoutEdge[];
66
+ ast: SociogramAST;
67
+ }
68
+ declare function layoutSociogram(ast: SociogramAST): SociogramLayoutResult;
69
+
70
+ declare function renderSociogram(layout: SociogramLayoutResult, options?: {
71
+ theme?: string;
72
+ }): string;
73
+
74
+ declare const sociogram: DiagramPlugin;
75
+
76
+ export { layoutSociogram, parseSociogram, renderSociogram, sociogram };
@@ -0,0 +1,5 @@
1
+ export { layoutSociogram, parseSociogram, renderSociogram, sociogram } from '../../chunk-PDPHRZZT.js';
2
+ import '../../chunk-IX554O5K.js';
3
+ import '../../chunk-KLJEK547.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var chunk2MQWZ2XY_cjs = require('../../chunk-2MQWZ2XY.cjs');
4
+ require('../../chunk-HDKDQAEQ.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "parseTiming", {
9
+ enumerable: true,
10
+ get: function () { return chunk2MQWZ2XY_cjs.parseTiming; }
11
+ });
12
+ Object.defineProperty(exports, "renderTiming", {
13
+ enumerable: true,
14
+ get: function () { return chunk2MQWZ2XY_cjs.renderTiming; }
15
+ });
16
+ Object.defineProperty(exports, "timing", {
17
+ enumerable: true,
18
+ get: function () { return chunk2MQWZ2XY_cjs.timing; }
19
+ });
20
+ //# sourceMappingURL=index.cjs.map
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,9 @@
1
+ import { T as TimingAST, b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
2
+
3
+ declare function parseTiming(text: string): TimingAST;
4
+
5
+ declare function renderTiming(ast: TimingAST): string;
6
+
7
+ declare const timing: DiagramPlugin;
8
+
9
+ export { parseTiming, renderTiming, timing };
@@ -0,0 +1,9 @@
1
+ import { T as TimingAST, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
2
+
3
+ declare function parseTiming(text: string): TimingAST;
4
+
5
+ declare function renderTiming(ast: TimingAST): string;
6
+
7
+ declare const timing: DiagramPlugin;
8
+
9
+ export { parseTiming, renderTiming, timing };
@@ -0,0 +1,4 @@
1
+ export { parseTiming, renderTiming, timing } from '../../chunk-FDLZEKEB.js';
2
+ import '../../chunk-KLJEK547.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var chunk3FTUWAXK_cjs = require('../../chunk-3FTUWAXK.cjs');
4
+ require('../../chunk-N7KOXOMX.cjs');
5
+ require('../../chunk-HDKDQAEQ.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "VennParseError", {
10
+ enumerable: true,
11
+ get: function () { return chunk3FTUWAXK_cjs.VennParseError; }
12
+ });
13
+ Object.defineProperty(exports, "layoutVenn", {
14
+ enumerable: true,
15
+ get: function () { return chunk3FTUWAXK_cjs.layoutVenn; }
16
+ });
17
+ Object.defineProperty(exports, "parseVennDSL", {
18
+ enumerable: true,
19
+ get: function () { return chunk3FTUWAXK_cjs.parseVennDSL; }
20
+ });
21
+ Object.defineProperty(exports, "renderVenn", {
22
+ enumerable: true,
23
+ get: function () { return chunk3FTUWAXK_cjs.renderVenn; }
24
+ });
25
+ Object.defineProperty(exports, "renderVennAST", {
26
+ enumerable: true,
27
+ get: function () { return chunk3FTUWAXK_cjs.renderVennAST; }
28
+ });
29
+ Object.defineProperty(exports, "renderVennLayout", {
30
+ enumerable: true,
31
+ get: function () { return chunk3FTUWAXK_cjs.renderVennLayout; }
32
+ });
33
+ Object.defineProperty(exports, "venn", {
34
+ enumerable: true,
35
+ get: function () { return chunk3FTUWAXK_cjs.venn; }
36
+ });
37
+ //# sourceMappingURL=index.cjs.map
38
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,69 @@
1
+ import { V as VennAST, m as VennLayoutResult, b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
2
+
3
+ /**
4
+ * Venn / Euler DSL parser (hand-written recursive descent).
5
+ *
6
+ * Accepts four DSL modes (see 15-VENN-STANDARD §5):
7
+ * 1. Declarative set + intersection: `A & B : 42`
8
+ * 2. Enumeration shorthand: `A = { 1, 2, 3 }`
9
+ * 3. Region-labeled: `region A & B : "..."`
10
+ * 4. Euler-explicit: `dogs subset mammals`
11
+ *
12
+ * All four can be mixed within one document (except enumeration sets imply
13
+ * automatic intersections and shouldn't be combined with explicit `A & B :`).
14
+ */
15
+
16
+ declare class VennParseError extends Error {
17
+ readonly line?: number | undefined;
18
+ constructor(message: string, line?: number | undefined);
19
+ }
20
+ declare function parseVennDSL(input: string): VennAST;
21
+
22
+ /**
23
+ * Venn / Euler SVG renderer.
24
+ *
25
+ * Produces a semantic SVG:
26
+ * - `<title>` + `<desc>` for accessibility
27
+ * - CSS class hierarchy `.schematex-venn-*`
28
+ * - One `<circle>` or `<ellipse>` per set, grouped under a layer that
29
+ * can apply `mix-blend-mode: multiply` for natural overlap blending.
30
+ * - `<text>` per region label, optional `<path>` leader for externalised
31
+ * labels.
32
+ */
33
+
34
+ declare function renderVennAST(ast: VennAST, options?: {
35
+ theme?: string;
36
+ }): string;
37
+ declare function renderVennLayout(ast: VennAST, layout: VennLayoutResult, options?: {
38
+ theme?: string;
39
+ }): string;
40
+ declare function renderVenn(text: string, options?: {
41
+ theme?: string;
42
+ }): string;
43
+
44
+ /**
45
+ * Venn / Euler layout dispatcher.
46
+ *
47
+ * Picks a layout based on `ast.sets.length`, `config.mode` and
48
+ * `config.proportional`:
49
+ *
50
+ * - n=2 fixed or analytic proportional
51
+ * - n=3 fixed or gradient-descent proportional
52
+ * - n=4 fixed (4 ellipses); proportional deferred
53
+ * - Euler (subset / disjoint / partial overlap) — derived from relations or
54
+ * inferred by auto-detecting which regions actually have values.
55
+ */
56
+
57
+ interface LayoutOptions {
58
+ /** Canvas width override. */
59
+ width?: number;
60
+ /** Canvas height override. */
61
+ height?: number;
62
+ /** Padding around the diagram (px). */
63
+ padding?: number;
64
+ }
65
+ declare function layoutVenn(ast: VennAST, opts?: LayoutOptions): VennLayoutResult;
66
+
67
+ declare const venn: DiagramPlugin;
68
+
69
+ export { VennParseError, layoutVenn, parseVennDSL, renderVenn, renderVennAST, renderVennLayout, venn };
@@ -0,0 +1,69 @@
1
+ import { V as VennAST, m as VennLayoutResult, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
2
+
3
+ /**
4
+ * Venn / Euler DSL parser (hand-written recursive descent).
5
+ *
6
+ * Accepts four DSL modes (see 15-VENN-STANDARD §5):
7
+ * 1. Declarative set + intersection: `A & B : 42`
8
+ * 2. Enumeration shorthand: `A = { 1, 2, 3 }`
9
+ * 3. Region-labeled: `region A & B : "..."`
10
+ * 4. Euler-explicit: `dogs subset mammals`
11
+ *
12
+ * All four can be mixed within one document (except enumeration sets imply
13
+ * automatic intersections and shouldn't be combined with explicit `A & B :`).
14
+ */
15
+
16
+ declare class VennParseError extends Error {
17
+ readonly line?: number | undefined;
18
+ constructor(message: string, line?: number | undefined);
19
+ }
20
+ declare function parseVennDSL(input: string): VennAST;
21
+
22
+ /**
23
+ * Venn / Euler SVG renderer.
24
+ *
25
+ * Produces a semantic SVG:
26
+ * - `<title>` + `<desc>` for accessibility
27
+ * - CSS class hierarchy `.schematex-venn-*`
28
+ * - One `<circle>` or `<ellipse>` per set, grouped under a layer that
29
+ * can apply `mix-blend-mode: multiply` for natural overlap blending.
30
+ * - `<text>` per region label, optional `<path>` leader for externalised
31
+ * labels.
32
+ */
33
+
34
+ declare function renderVennAST(ast: VennAST, options?: {
35
+ theme?: string;
36
+ }): string;
37
+ declare function renderVennLayout(ast: VennAST, layout: VennLayoutResult, options?: {
38
+ theme?: string;
39
+ }): string;
40
+ declare function renderVenn(text: string, options?: {
41
+ theme?: string;
42
+ }): string;
43
+
44
+ /**
45
+ * Venn / Euler layout dispatcher.
46
+ *
47
+ * Picks a layout based on `ast.sets.length`, `config.mode` and
48
+ * `config.proportional`:
49
+ *
50
+ * - n=2 fixed or analytic proportional
51
+ * - n=3 fixed or gradient-descent proportional
52
+ * - n=4 fixed (4 ellipses); proportional deferred
53
+ * - Euler (subset / disjoint / partial overlap) — derived from relations or
54
+ * inferred by auto-detecting which regions actually have values.
55
+ */
56
+
57
+ interface LayoutOptions {
58
+ /** Canvas width override. */
59
+ width?: number;
60
+ /** Canvas height override. */
61
+ height?: number;
62
+ /** Padding around the diagram (px). */
63
+ padding?: number;
64
+ }
65
+ declare function layoutVenn(ast: VennAST, opts?: LayoutOptions): VennLayoutResult;
66
+
67
+ declare const venn: DiagramPlugin;
68
+
69
+ export { VennParseError, layoutVenn, parseVennDSL, renderVenn, renderVennAST, renderVennLayout, venn };
@@ -0,0 +1,5 @@
1
+ export { VennParseError, layoutVenn, parseVennDSL, renderVenn, renderVennAST, renderVennLayout, venn } from '../../chunk-ROFLJ74T.js';
2
+ import '../../chunk-IX554O5K.js';
3
+ import '../../chunk-KLJEK547.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,150 @@
1
+ import { n as FlowchartAST, o as FlowchartLayoutResult, b as DiagramPlugin } from './types-DqfcYkcY.js';
2
+
3
+ /**
4
+ * Flowchart DSL parser (M1).
5
+ *
6
+ * Supports a mermaid-inspired subset:
7
+ * flowchart TD | TB | BT | LR | RL
8
+ * A[Label] rect
9
+ * A(Label) round
10
+ * A([Label]) stadium
11
+ * A{Label} diamond
12
+ * A[/Label/] parallelogram
13
+ * A --> B solid edge
14
+ * A --- B no-arrow edge
15
+ * A -.-> B dotted
16
+ * A ==> B thick
17
+ * A <--> B bidirectional
18
+ * A --x B crossed end
19
+ * A --o B round end
20
+ * A -->|yes| B edge with pipe label
21
+ * A -- yes --> B edge with inline label
22
+ * A --> B --> C chain
23
+ * %% comment
24
+ *
25
+ * Hand-written tokenizer + recursive descent. Zero deps.
26
+ */
27
+
28
+ /** Top-level parser entry. */
29
+ declare function parseFlowchart(source: string): FlowchartAST;
30
+
31
+ /**
32
+ * Flowchart Sugiyama-style layered layout (M1).
33
+ *
34
+ * Phases:
35
+ * 1. Cycle removal — Greedy-FAS (Eades-Lin-Smyth 1993)
36
+ * 2. Layer assignment — Longest-path layering
37
+ * 3. Dummy node insertion for edges spanning > 1 layer
38
+ * 4. Crossing minimization — median heuristic, bi-directional sweep
39
+ * 5. X-coordinate assignment — simple symmetric pass
40
+ * (Brandes-Köpf full 4-alignment is deferred; for M1 a centered
41
+ * median-based placement produces visually indistinguishable results
42
+ * on graphs ≤ 20 nodes, which is the M1 target.)
43
+ *
44
+ * Zero runtime dependencies. All heuristics hand-written.
45
+ */
46
+
47
+ declare const FC_CONST: {
48
+ readonly nodeWidth: 120;
49
+ readonly nodeHeight: 44;
50
+ readonly nodeSpacingX: 32;
51
+ readonly layerSpacingY: 56;
52
+ readonly dummyWidth: 1;
53
+ readonly padding: 24;
54
+ readonly charWidth: 6.8;
55
+ readonly labelHPad: 16;
56
+ readonly minNodeWidth: 72;
57
+ readonly maxLabelWidth: 220;
58
+ readonly crossingSweepIters: 24;
59
+ };
60
+ declare function layoutFlowchart(ast: FlowchartAST): FlowchartLayoutResult;
61
+
62
+ /**
63
+ * Shared design-token system for all Schematex diagram renderers.
64
+ *
65
+ * Two-layer architecture:
66
+ * 1. BaseTheme — universal tokens every diagram uses
67
+ * 2. Semantic extensions — diagram-family tokens (PersonTokens, BiologyTokens, …)
68
+ *
69
+ * Three built-in presets: default, monochrome, dark.
70
+ * All tokens are also exposed as CSS custom properties (--schematex-*)
71
+ * so consumers can override them.
72
+ */
73
+ type ThemeName = "default" | "monochrome" | "dark";
74
+ interface BaseTheme {
75
+ bg: string;
76
+ text: string;
77
+ textMuted: string;
78
+ stroke: string;
79
+ fill: string;
80
+ fillMuted: string;
81
+ /** Emphasis / interactive / link color. Use for net labels, focus, selected. */
82
+ accent: string;
83
+ positive: string;
84
+ negative: string;
85
+ /** Mid-gray. Use for muted strokes, neutral-valence edges, dashed separators. */
86
+ neutral: string;
87
+ warn: string;
88
+ /** Category palette — 8 distinguishable colors for ecomap systems, sociogram groups, etc. */
89
+ palette: readonly string[];
90
+ }
91
+ interface PersonTokens {
92
+ maleFill: string;
93
+ femaleFill: string;
94
+ unknownFill: string;
95
+ deceasedMark: string;
96
+ conditionFill: string;
97
+ }
98
+ interface BiologyTokens {
99
+ cladeColors: readonly string[];
100
+ supportGood: string;
101
+ supportMedium: string;
102
+ supportWarn: string;
103
+ supportBad: string;
104
+ }
105
+ /**
106
+ * Tokens for set-theory diagrams (Venn / Euler). Paletteof set fills is
107
+ * tuned slightly softer than BaseTheme to blend nicely under
108
+ * `mix-blend-mode: multiply`.
109
+ */
110
+ interface VennTokens {
111
+ vennSetColors: readonly string[];
112
+ vennBlendMode: "multiply" | "screen" | "none";
113
+ vennSetOpacity: number;
114
+ vennSetStroke: string;
115
+ vennLabelColor: string;
116
+ vennCountColor: string;
117
+ vennLeaderColor: string;
118
+ }
119
+ type ResolvedTheme<T = object> = BaseTheme & T;
120
+ declare const BASE_THEMES: Record<ThemeName, BaseTheme>;
121
+ declare const PERSON_TOKENS: Record<ThemeName, PersonTokens>;
122
+ declare const BIOLOGY_TOKENS: Record<ThemeName, BiologyTokens>;
123
+ declare const VENN_TOKENS: Record<ThemeName, VennTokens>;
124
+ declare function resolveBaseTheme(name: string): BaseTheme;
125
+ declare function resolvePersonTheme(name: string): ResolvedTheme<PersonTokens>;
126
+ declare function resolveBiologyTheme(name: string): ResolvedTheme<BiologyTokens>;
127
+ /**
128
+ * Fishbone uses BaseTheme directly — its bone colors come from `theme.palette`.
129
+ * Kept as a named resolver so callers don't have to know that.
130
+ */
131
+ declare function resolveFishboneTheme(name: string): BaseTheme;
132
+ declare function resolveVennTheme(name: string): ResolvedTheme<VennTokens>;
133
+ declare function resolveGenogramTheme(name: string): ResolvedTheme<PersonTokens>;
134
+
135
+ /**
136
+ * Flowchart renderer — LayoutResult → SVG string.
137
+ *
138
+ * Produces semantic, themeable SVG per spec §12:
139
+ * - <title>/<desc> for a11y
140
+ * - data-* attributes for interaction hooks
141
+ * - CSS custom properties from resolveBaseTheme
142
+ * - Arrowhead markers in <defs>
143
+ */
144
+
145
+ declare function renderFlowchartAST(ast: FlowchartAST, themeName?: ThemeName): string;
146
+ declare function renderFlowchart(text: string, themeName?: ThemeName): string;
147
+
148
+ declare const flowchart: DiagramPlugin;
149
+
150
+ export { BASE_THEMES as B, FC_CONST as F, PERSON_TOKENS as P, type ResolvedTheme as R, type ThemeName as T, VENN_TOKENS as V, BIOLOGY_TOKENS as a, type BaseTheme as b, type BiologyTokens as c, type PersonTokens as d, type VennTokens as e, flowchart as f, resolveBiologyTheme as g, resolveFishboneTheme as h, resolveGenogramTheme as i, resolvePersonTheme as j, resolveVennTheme as k, layoutFlowchart as l, renderFlowchart as m, renderFlowchartAST as n, parseFlowchart as p, resolveBaseTheme as r };