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.
- package/LICENSE +661 -0
- package/README.md +379 -0
- package/dist/chunk-2MQWZ2XY.cjs +453 -0
- package/dist/chunk-2MQWZ2XY.cjs.map +1 -0
- package/dist/chunk-2UKC6ZCY.cjs +1803 -0
- package/dist/chunk-2UKC6ZCY.cjs.map +1 -0
- package/dist/chunk-34X3ZJ6E.cjs +783 -0
- package/dist/chunk-34X3ZJ6E.cjs.map +1 -0
- package/dist/chunk-3FTUWAXK.cjs +1220 -0
- package/dist/chunk-3FTUWAXK.cjs.map +1 -0
- package/dist/chunk-3J7TFUOC.js +745 -0
- package/dist/chunk-3J7TFUOC.js.map +1 -0
- package/dist/chunk-47ZC6EMJ.js +1009 -0
- package/dist/chunk-47ZC6EMJ.js.map +1 -0
- package/dist/chunk-4DBRNOPA.cjs +750 -0
- package/dist/chunk-4DBRNOPA.cjs.map +1 -0
- package/dist/chunk-4G7ZIBHN.js +778 -0
- package/dist/chunk-4G7ZIBHN.js.map +1 -0
- package/dist/chunk-5C7DPDHQ.js +1321 -0
- package/dist/chunk-5C7DPDHQ.js.map +1 -0
- package/dist/chunk-ADOXGKAK.js +1251 -0
- package/dist/chunk-ADOXGKAK.js.map +1 -0
- package/dist/chunk-BE5HNDA5.cjs +874 -0
- package/dist/chunk-BE5HNDA5.cjs.map +1 -0
- package/dist/chunk-CZRM7LT7.js +889 -0
- package/dist/chunk-CZRM7LT7.js.map +1 -0
- package/dist/chunk-D4JTSPOL.js +1795 -0
- package/dist/chunk-D4JTSPOL.js.map +1 -0
- package/dist/chunk-DS47NTWZ.cjs +1034 -0
- package/dist/chunk-DS47NTWZ.cjs.map +1 -0
- package/dist/chunk-FDLZEKEB.js +449 -0
- package/dist/chunk-FDLZEKEB.js.map +1 -0
- package/dist/chunk-FGPTCDUT.cjs +1851 -0
- package/dist/chunk-FGPTCDUT.cjs.map +1 -0
- package/dist/chunk-HDKDQAEQ.cjs +86 -0
- package/dist/chunk-HDKDQAEQ.cjs.map +1 -0
- package/dist/chunk-IX554O5K.js +346 -0
- package/dist/chunk-IX554O5K.js.map +1 -0
- package/dist/chunk-KLJEK547.js +71 -0
- package/dist/chunk-KLJEK547.js.map +1 -0
- package/dist/chunk-LMFSHK45.js +1028 -0
- package/dist/chunk-LMFSHK45.js.map +1 -0
- package/dist/chunk-MDICUK6F.cjs +1258 -0
- package/dist/chunk-MDICUK6F.cjs.map +1 -0
- package/dist/chunk-N7KOXOMX.cjs +363 -0
- package/dist/chunk-N7KOXOMX.cjs.map +1 -0
- package/dist/chunk-NYCIK4SU.cjs +775 -0
- package/dist/chunk-NYCIK4SU.cjs.map +1 -0
- package/dist/chunk-PDPHRZZT.js +770 -0
- package/dist/chunk-PDPHRZZT.js.map +1 -0
- package/dist/chunk-ROFLJ74T.js +1212 -0
- package/dist/chunk-ROFLJ74T.js.map +1 -0
- package/dist/chunk-S6BK5DB6.cjs +845 -0
- package/dist/chunk-S6BK5DB6.cjs.map +1 -0
- package/dist/chunk-U4I37IBN.js +874 -0
- package/dist/chunk-U4I37IBN.js.map +1 -0
- package/dist/chunk-U5GGE6PJ.js +839 -0
- package/dist/chunk-U5GGE6PJ.js.map +1 -0
- package/dist/chunk-UHLYS3W5.cjs +1015 -0
- package/dist/chunk-UHLYS3W5.cjs.map +1 -0
- package/dist/chunk-URSKIHSY.cjs +881 -0
- package/dist/chunk-URSKIHSY.cjs.map +1 -0
- package/dist/chunk-V6WO7RK7.cjs +1056 -0
- package/dist/chunk-V6WO7RK7.cjs.map +1 -0
- package/dist/chunk-VFQCTXOX.js +869 -0
- package/dist/chunk-VFQCTXOX.js.map +1 -0
- package/dist/chunk-XQ52ICHU.cjs +895 -0
- package/dist/chunk-XQ52ICHU.cjs.map +1 -0
- package/dist/chunk-XX4BKS7Y.js +1051 -0
- package/dist/chunk-XX4BKS7Y.js.map +1 -0
- package/dist/chunk-XXU36667.js +1844 -0
- package/dist/chunk-XXU36667.js.map +1 -0
- package/dist/chunk-ZX7QKZK2.cjs +1326 -0
- package/dist/chunk-ZX7QKZK2.cjs.map +1 -0
- package/dist/diagrams/blockdiagram/index.cjs +25 -0
- package/dist/diagrams/blockdiagram/index.cjs.map +1 -0
- package/dist/diagrams/blockdiagram/index.d.cts +67 -0
- package/dist/diagrams/blockdiagram/index.d.ts +67 -0
- package/dist/diagrams/blockdiagram/index.js +4 -0
- package/dist/diagrams/blockdiagram/index.js.map +1 -0
- package/dist/diagrams/circuit/index.cjs +34 -0
- package/dist/diagrams/circuit/index.cjs.map +1 -0
- package/dist/diagrams/circuit/index.d.cts +138 -0
- package/dist/diagrams/circuit/index.d.ts +138 -0
- package/dist/diagrams/circuit/index.js +5 -0
- package/dist/diagrams/circuit/index.js.map +1 -0
- package/dist/diagrams/ecomap/index.cjs +30 -0
- package/dist/diagrams/ecomap/index.cjs.map +1 -0
- package/dist/diagrams/ecomap/index.d.cts +15 -0
- package/dist/diagrams/ecomap/index.d.ts +15 -0
- package/dist/diagrams/ecomap/index.js +5 -0
- package/dist/diagrams/ecomap/index.js.map +1 -0
- package/dist/diagrams/entity/index.cjs +26 -0
- package/dist/diagrams/entity/index.cjs.map +1 -0
- package/dist/diagrams/entity/index.d.cts +54 -0
- package/dist/diagrams/entity/index.d.ts +54 -0
- package/dist/diagrams/entity/index.js +5 -0
- package/dist/diagrams/entity/index.js.map +1 -0
- package/dist/diagrams/fishbone/index.cjs +34 -0
- package/dist/diagrams/fishbone/index.cjs.map +1 -0
- package/dist/diagrams/fishbone/index.d.cts +185 -0
- package/dist/diagrams/fishbone/index.d.ts +185 -0
- package/dist/diagrams/fishbone/index.js +5 -0
- package/dist/diagrams/fishbone/index.js.map +1 -0
- package/dist/diagrams/flowchart/index.cjs +34 -0
- package/dist/diagrams/flowchart/index.cjs.map +1 -0
- package/dist/diagrams/flowchart/index.d.cts +2 -0
- package/dist/diagrams/flowchart/index.d.ts +2 -0
- package/dist/diagrams/flowchart/index.js +5 -0
- package/dist/diagrams/flowchart/index.js.map +1 -0
- package/dist/diagrams/genogram/index.cjs +38 -0
- package/dist/diagrams/genogram/index.cjs.map +1 -0
- package/dist/diagrams/genogram/index.d.cts +20 -0
- package/dist/diagrams/genogram/index.d.ts +20 -0
- package/dist/diagrams/genogram/index.js +5 -0
- package/dist/diagrams/genogram/index.js.map +1 -0
- package/dist/diagrams/ladder/index.cjs +26 -0
- package/dist/diagrams/ladder/index.cjs.map +1 -0
- package/dist/diagrams/ladder/index.d.cts +49 -0
- package/dist/diagrams/ladder/index.d.ts +49 -0
- package/dist/diagrams/ladder/index.js +5 -0
- package/dist/diagrams/ladder/index.js.map +1 -0
- package/dist/diagrams/logic/index.cjs +26 -0
- package/dist/diagrams/logic/index.cjs.map +1 -0
- package/dist/diagrams/logic/index.d.cts +73 -0
- package/dist/diagrams/logic/index.d.ts +73 -0
- package/dist/diagrams/logic/index.js +5 -0
- package/dist/diagrams/logic/index.js.map +1 -0
- package/dist/diagrams/orgchart/index.cjs +30 -0
- package/dist/diagrams/orgchart/index.cjs.map +1 -0
- package/dist/diagrams/orgchart/index.d.cts +100 -0
- package/dist/diagrams/orgchart/index.d.ts +100 -0
- package/dist/diagrams/orgchart/index.js +5 -0
- package/dist/diagrams/orgchart/index.js.map +1 -0
- package/dist/diagrams/pedigree/index.cjs +30 -0
- package/dist/diagrams/pedigree/index.cjs.map +1 -0
- package/dist/diagrams/pedigree/index.d.cts +15 -0
- package/dist/diagrams/pedigree/index.d.ts +15 -0
- package/dist/diagrams/pedigree/index.js +5 -0
- package/dist/diagrams/pedigree/index.js.map +1 -0
- package/dist/diagrams/phylo/index.cjs +30 -0
- package/dist/diagrams/phylo/index.cjs.map +1 -0
- package/dist/diagrams/phylo/index.d.cts +32 -0
- package/dist/diagrams/phylo/index.d.ts +32 -0
- package/dist/diagrams/phylo/index.js +5 -0
- package/dist/diagrams/phylo/index.js.map +1 -0
- package/dist/diagrams/sld/index.cjs +26 -0
- package/dist/diagrams/sld/index.cjs.map +1 -0
- package/dist/diagrams/sld/index.d.cts +58 -0
- package/dist/diagrams/sld/index.d.ts +58 -0
- package/dist/diagrams/sld/index.js +5 -0
- package/dist/diagrams/sld/index.js.map +1 -0
- package/dist/diagrams/sociogram/index.cjs +26 -0
- package/dist/diagrams/sociogram/index.cjs.map +1 -0
- package/dist/diagrams/sociogram/index.d.cts +76 -0
- package/dist/diagrams/sociogram/index.d.ts +76 -0
- package/dist/diagrams/sociogram/index.js +5 -0
- package/dist/diagrams/sociogram/index.js.map +1 -0
- package/dist/diagrams/timing/index.cjs +21 -0
- package/dist/diagrams/timing/index.cjs.map +1 -0
- package/dist/diagrams/timing/index.d.cts +9 -0
- package/dist/diagrams/timing/index.d.ts +9 -0
- package/dist/diagrams/timing/index.js +4 -0
- package/dist/diagrams/timing/index.js.map +1 -0
- package/dist/diagrams/venn/index.cjs +38 -0
- package/dist/diagrams/venn/index.cjs.map +1 -0
- package/dist/diagrams/venn/index.d.cts +69 -0
- package/dist/diagrams/venn/index.d.ts +69 -0
- package/dist/diagrams/venn/index.js +5 -0
- package/dist/diagrams/venn/index.js.map +1 -0
- package/dist/index-BSlza1YY.d.ts +150 -0
- package/dist/index-BXefHVce.d.cts +150 -0
- package/dist/index.cjs +2033 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +1944 -0
- package/dist/index.js.map +1 -0
- package/dist/types-DqfcYkcY.d.cts +741 -0
- package/dist/types-DqfcYkcY.d.ts +741 -0
- package/package.json +163 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { F as FishboneAST, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Fishbone DSL parser.
|
|
5
|
+
*
|
|
6
|
+
* Supports two syntactic styles, mixable in one document:
|
|
7
|
+
*
|
|
8
|
+
* Style A — structured (per 13-FISHBONE-STANDARD §11)
|
|
9
|
+
*
|
|
10
|
+
* fishbone "Title"
|
|
11
|
+
* effect "Problem statement"
|
|
12
|
+
* category content "内容 Content"
|
|
13
|
+
* category tech "技术 Technical"
|
|
14
|
+
* content : "更新频率下降"
|
|
15
|
+
* content : "关键词未覆盖"
|
|
16
|
+
* - "长尾词无内容"
|
|
17
|
+
* - "竞品占位 H1"
|
|
18
|
+
*
|
|
19
|
+
* Style B — compact shorthand (convenient for quick authoring, AI output)
|
|
20
|
+
*
|
|
21
|
+
* fishbone "Title"
|
|
22
|
+
* effect "Problem statement"
|
|
23
|
+
* category Content: 更新频率下降; 同质化严重; 关键词未覆盖
|
|
24
|
+
* category Technical: Core Web Vitals 差; 索引覆盖率下降
|
|
25
|
+
*
|
|
26
|
+
* Config directives:
|
|
27
|
+
*
|
|
28
|
+
* config direction = left|right # head orientation (default right)
|
|
29
|
+
* config width = 900
|
|
30
|
+
* config height = 620
|
|
31
|
+
*
|
|
32
|
+
* Lines starting with `#` are comments. Leading whitespace is indentation; a
|
|
33
|
+
* line that begins with `-` (after ≥2 spaces of indent) is a Level-2 sub-cause
|
|
34
|
+
* for the most-recent Level-1 cause.
|
|
35
|
+
*/
|
|
36
|
+
declare function parseFishboneDSL(text: string): FishboneAST;
|
|
37
|
+
|
|
38
|
+
declare function renderFishboneAST(ast: FishboneAST, options?: {
|
|
39
|
+
theme?: string;
|
|
40
|
+
}): string;
|
|
41
|
+
declare function renderFishbone(text: string, options?: {
|
|
42
|
+
theme?: string;
|
|
43
|
+
}): string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Fishbone layout engine.
|
|
47
|
+
*
|
|
48
|
+
* Geometric contract (see 13-FISHBONE-STANDARD §5, §9):
|
|
49
|
+
* - Horizontal spine at `spineY`
|
|
50
|
+
* - Effect polygon at right (ltr) or left (rtl) end
|
|
51
|
+
* - Category ribs slant AWAY from the fish head (signature of Ishikawa form)
|
|
52
|
+
* - Ribs are paired top/bottom on the same X column for visual rhythm
|
|
53
|
+
* - Each rib hosts Level-1 causes as short horizontal branches toward the head
|
|
54
|
+
* - Rib length adapts to (max) cause count in its half so headers align
|
|
55
|
+
*
|
|
56
|
+
* This is an optimized v2 layout that improves on the naive fixed-slope design:
|
|
57
|
+
* 1. Dynamic row heights — a Level-1 cause with N sub-causes reserves
|
|
58
|
+
* (baseRow + N·subRow) of vertical space so nothing overlaps.
|
|
59
|
+
* 2. Per-half aligned headers — ribs in the same half share the same outer Y
|
|
60
|
+
* so category pills form a clean visual row.
|
|
61
|
+
* 3. Column-pairing — top and bottom ribs share the same spine X.
|
|
62
|
+
* 4. Smart canvas sizing — derives width/height from content, respecting
|
|
63
|
+
* optional user overrides from `config width = …` / `config height = …`.
|
|
64
|
+
* 5. Label-aware extents — long cause labels extend the canvas rather than
|
|
65
|
+
* clipping, so multi-lingual / verbose content is first-class.
|
|
66
|
+
* 6. Label bboxes exposed for the renderer to build a text-gap mask.
|
|
67
|
+
*/
|
|
68
|
+
interface FishboneLayoutCause {
|
|
69
|
+
label: string;
|
|
70
|
+
/** Rib index (0 = first category) */
|
|
71
|
+
ribIndex: number;
|
|
72
|
+
/** Slot index on the rib (0 = closest to spine) */
|
|
73
|
+
slotIndex: number;
|
|
74
|
+
/** Cause start point on the rib */
|
|
75
|
+
ribX: number;
|
|
76
|
+
ribY: number;
|
|
77
|
+
/** Horizontal branch end point (label starts just beyond) */
|
|
78
|
+
branchX: number;
|
|
79
|
+
branchY: number;
|
|
80
|
+
/** Label anchor (x where text starts, y baseline) */
|
|
81
|
+
labelX: number;
|
|
82
|
+
labelY: number;
|
|
83
|
+
labelAnchor: "start" | "end";
|
|
84
|
+
/** Direction this cause branch sticks out: "head" = toward head, "tail" = toward tail. */
|
|
85
|
+
causeSide: "head" | "tail";
|
|
86
|
+
/** Sub-causes (Level 2) stacked below the main label */
|
|
87
|
+
subCauses: FishboneLayoutSubCause[];
|
|
88
|
+
}
|
|
89
|
+
interface FishboneLayoutSubCause {
|
|
90
|
+
label: string;
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
tickX1: number;
|
|
94
|
+
tickX2: number;
|
|
95
|
+
tickY: number;
|
|
96
|
+
anchor: "start" | "end";
|
|
97
|
+
}
|
|
98
|
+
interface FishboneLayoutRib {
|
|
99
|
+
index: number;
|
|
100
|
+
half: "top" | "bottom";
|
|
101
|
+
label: string;
|
|
102
|
+
color: string;
|
|
103
|
+
/** Where rib meets spine */
|
|
104
|
+
spineX: number;
|
|
105
|
+
spineY: number;
|
|
106
|
+
/** Far end of rib (where header pill sits) */
|
|
107
|
+
endX: number;
|
|
108
|
+
endY: number;
|
|
109
|
+
/** Header pill geometry */
|
|
110
|
+
headerX: number;
|
|
111
|
+
headerY: number;
|
|
112
|
+
headerW: number;
|
|
113
|
+
headerH: number;
|
|
114
|
+
causes: FishboneLayoutCause[];
|
|
115
|
+
}
|
|
116
|
+
interface FishboneBBox {
|
|
117
|
+
x: number;
|
|
118
|
+
y: number;
|
|
119
|
+
w: number;
|
|
120
|
+
h: number;
|
|
121
|
+
}
|
|
122
|
+
interface FishboneLayoutResult {
|
|
123
|
+
width: number;
|
|
124
|
+
height: number;
|
|
125
|
+
orientation: "ltr" | "rtl";
|
|
126
|
+
spineY: number;
|
|
127
|
+
spineStartX: number;
|
|
128
|
+
spineEndX: number;
|
|
129
|
+
tailForkTipTop: {
|
|
130
|
+
x: number;
|
|
131
|
+
y: number;
|
|
132
|
+
};
|
|
133
|
+
tailForkTipBot: {
|
|
134
|
+
x: number;
|
|
135
|
+
y: number;
|
|
136
|
+
};
|
|
137
|
+
head: {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
tipX: number;
|
|
141
|
+
tipY: number;
|
|
142
|
+
w: number;
|
|
143
|
+
h: number;
|
|
144
|
+
label: string;
|
|
145
|
+
};
|
|
146
|
+
ribs: FishboneLayoutRib[];
|
|
147
|
+
/** Label bounding boxes (for text-gap mask) */
|
|
148
|
+
textBBoxes: FishboneBBox[];
|
|
149
|
+
title?: string;
|
|
150
|
+
}
|
|
151
|
+
declare const FB_CONST: {
|
|
152
|
+
readonly PADDING: 40;
|
|
153
|
+
readonly HEAD_W: 90;
|
|
154
|
+
readonly HEAD_H: 80;
|
|
155
|
+
readonly TAIL_LEN: 40;
|
|
156
|
+
readonly SPINE_OFFSET_FROM_TAIL: 40;
|
|
157
|
+
readonly RIB_SLOPE: 0.6;
|
|
158
|
+
readonly RIB_BASE_EXTENT_Y: 30;
|
|
159
|
+
readonly ROW_HEIGHT: 30;
|
|
160
|
+
readonly SUB_ROW_HEIGHT: 17;
|
|
161
|
+
readonly BRANCH_LEN: 30;
|
|
162
|
+
readonly SUB_TICK_LEN: 10;
|
|
163
|
+
readonly HEADER_W: 132;
|
|
164
|
+
readonly HEADER_H: 34;
|
|
165
|
+
readonly HEADER_GAP: 12;
|
|
166
|
+
readonly COL_STEP: 130;
|
|
167
|
+
readonly COL_FIRST_OFFSET: 170;
|
|
168
|
+
readonly LABEL_FONT: 12;
|
|
169
|
+
readonly HEADER_FONT: 14;
|
|
170
|
+
readonly SUB_FONT: 11;
|
|
171
|
+
readonly EFFECT_FONT: 14;
|
|
172
|
+
readonly LABEL_GAP: 6;
|
|
173
|
+
readonly MIN_ROWS_PER_HALF: 4;
|
|
174
|
+
readonly COL_GAP_BETWEEN_LABELS: 18;
|
|
175
|
+
readonly HEAD_PAD_X: 44;
|
|
176
|
+
readonly HEAD_PAD_Y: 20;
|
|
177
|
+
readonly TITLE_CLEARANCE: 24;
|
|
178
|
+
};
|
|
179
|
+
declare function layoutFishbone(ast: FishboneAST, opts?: {
|
|
180
|
+
palette?: readonly string[];
|
|
181
|
+
}): FishboneLayoutResult;
|
|
182
|
+
|
|
183
|
+
declare const fishbone: DiagramPlugin;
|
|
184
|
+
|
|
185
|
+
export { FB_CONST, fishbone, layoutFishbone, parseFishboneDSL, renderFishbone, renderFishboneAST };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FB_CONST, fishbone, layoutFishbone, parseFishboneDSL, renderFishbone, renderFishboneAST } from '../../chunk-U4I37IBN.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,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkMDICUK6F_cjs = require('../../chunk-MDICUK6F.cjs');
|
|
4
|
+
require('../../chunk-N7KOXOMX.cjs');
|
|
5
|
+
require('../../chunk-HDKDQAEQ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "FC_CONST", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkMDICUK6F_cjs.FC_CONST; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "flowchart", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkMDICUK6F_cjs.flowchart; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "layoutFlowchart", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkMDICUK6F_cjs.layoutFlowchart; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "parseFlowchart", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkMDICUK6F_cjs.parseFlowchart; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "renderFlowchart", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkMDICUK6F_cjs.renderFlowchart; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "renderFlowchartAST", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkMDICUK6F_cjs.renderFlowchartAST; }
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.cjs.map
|
|
34
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FC_CONST, flowchart, layoutFlowchart, parseFlowchart, renderFlowchart, renderFlowchartAST } from '../../chunk-ADOXGKAK.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,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2UKC6ZCY_cjs = require('../../chunk-2UKC6ZCY.cjs');
|
|
4
|
+
require('../../chunk-N7KOXOMX.cjs');
|
|
5
|
+
require('../../chunk-HDKDQAEQ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ParseError", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2UKC6ZCY_cjs.ParseError; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "genogram", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk2UKC6ZCY_cjs.genogram; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "getRequiredDefs", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk2UKC6ZCY_cjs.getRequiredDefs; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "layoutGenogram", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunk2UKC6ZCY_cjs.layoutGenogram; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "parseGenogram", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunk2UKC6ZCY_cjs.parseGenogram; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "renderGenogram", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunk2UKC6ZCY_cjs.renderGenogram; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "renderIndividualSymbol", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunk2UKC6ZCY_cjs.renderIndividualSymbol; }
|
|
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,20 @@
|
|
|
1
|
+
import { D as DiagramAST, L as LayoutConfig, a as LayoutResult, R as RenderConfig, I as Individual, b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
|
|
2
|
+
|
|
3
|
+
declare class ParseError extends Error {
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
source: string;
|
|
7
|
+
constructor(message: string, line: number, column: number, source: string);
|
|
8
|
+
}
|
|
9
|
+
declare function parseGenogram(text: string): DiagramAST;
|
|
10
|
+
|
|
11
|
+
declare function layoutGenogram(ast: DiagramAST, config: LayoutConfig): LayoutResult;
|
|
12
|
+
|
|
13
|
+
declare function renderGenogram(layout: LayoutResult, config: RenderConfig, ast?: DiagramAST): string;
|
|
14
|
+
|
|
15
|
+
declare function renderIndividualSymbol(individual: Individual, x: number, y: number, size: number): string;
|
|
16
|
+
declare function getRequiredDefs(individuals: Individual[], includeArrowMarker?: boolean): string;
|
|
17
|
+
|
|
18
|
+
declare const genogram: DiagramPlugin;
|
|
19
|
+
|
|
20
|
+
export { ParseError, genogram, getRequiredDefs, layoutGenogram, parseGenogram, renderGenogram, renderIndividualSymbol };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { D as DiagramAST, L as LayoutConfig, a as LayoutResult, R as RenderConfig, I as Individual, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
|
|
2
|
+
|
|
3
|
+
declare class ParseError extends Error {
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
source: string;
|
|
7
|
+
constructor(message: string, line: number, column: number, source: string);
|
|
8
|
+
}
|
|
9
|
+
declare function parseGenogram(text: string): DiagramAST;
|
|
10
|
+
|
|
11
|
+
declare function layoutGenogram(ast: DiagramAST, config: LayoutConfig): LayoutResult;
|
|
12
|
+
|
|
13
|
+
declare function renderGenogram(layout: LayoutResult, config: RenderConfig, ast?: DiagramAST): string;
|
|
14
|
+
|
|
15
|
+
declare function renderIndividualSymbol(individual: Individual, x: number, y: number, size: number): string;
|
|
16
|
+
declare function getRequiredDefs(individuals: Individual[], includeArrowMarker?: boolean): string;
|
|
17
|
+
|
|
18
|
+
declare const genogram: DiagramPlugin;
|
|
19
|
+
|
|
20
|
+
export { ParseError, genogram, getRequiredDefs, layoutGenogram, parseGenogram, renderGenogram, renderIndividualSymbol };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ParseError, genogram, getRequiredDefs, layoutGenogram, parseGenogram, renderGenogram, renderIndividualSymbol } from '../../chunk-D4JTSPOL.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,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk4DBRNOPA_cjs = require('../../chunk-4DBRNOPA.cjs');
|
|
4
|
+
require('../../chunk-N7KOXOMX.cjs');
|
|
5
|
+
require('../../chunk-HDKDQAEQ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ladder", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk4DBRNOPA_cjs.ladder; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "layoutLadder", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk4DBRNOPA_cjs.layoutLadder; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "parseLadderDSL", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk4DBRNOPA_cjs.parseLadderDSL; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "renderLadder", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunk4DBRNOPA_cjs.renderLadder; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
26
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { f as LadderAST, R as RenderConfig, g as LadderRung, h as LadderElement, b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
|
|
2
|
+
|
|
3
|
+
declare function parseLadderDSL(text: string): LadderAST;
|
|
4
|
+
|
|
5
|
+
declare function renderLadder(ast: LadderAST, config?: RenderConfig): string;
|
|
6
|
+
|
|
7
|
+
type LadderElementKind = "contact" | "coil" | "function_block" | "compare";
|
|
8
|
+
interface LadderLayoutNode {
|
|
9
|
+
id: string;
|
|
10
|
+
rungIndex: number;
|
|
11
|
+
element: LadderElement;
|
|
12
|
+
kind: LadderElementKind;
|
|
13
|
+
/** x of the element body (left edge) */
|
|
14
|
+
x: number;
|
|
15
|
+
/** y of the element body (top edge) */
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
/** rung centerline Y (where wires attach) */
|
|
20
|
+
rungY: number;
|
|
21
|
+
}
|
|
22
|
+
interface LadderLayoutWire {
|
|
23
|
+
path: string;
|
|
24
|
+
}
|
|
25
|
+
interface LadderLayoutRung {
|
|
26
|
+
rung: LadderRung;
|
|
27
|
+
index: number;
|
|
28
|
+
y: number;
|
|
29
|
+
/** Rightmost x reached by elements on this rung. */
|
|
30
|
+
endX: number;
|
|
31
|
+
/** Rung slot total height (used for spacing). */
|
|
32
|
+
height: number;
|
|
33
|
+
/** Total pixel height reserved above rungY for name/tag labels. */
|
|
34
|
+
headerHeight: number;
|
|
35
|
+
}
|
|
36
|
+
interface LadderLayoutResult {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
leftRailX: number;
|
|
40
|
+
rightRailX: number;
|
|
41
|
+
rungs: LadderLayoutRung[];
|
|
42
|
+
nodes: LadderLayoutNode[];
|
|
43
|
+
wires: LadderLayoutWire[];
|
|
44
|
+
}
|
|
45
|
+
declare function layoutLadder(ast: LadderAST): LadderLayoutResult;
|
|
46
|
+
|
|
47
|
+
declare const ladder: DiagramPlugin;
|
|
48
|
+
|
|
49
|
+
export { ladder, layoutLadder, parseLadderDSL, renderLadder };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { f as LadderAST, R as RenderConfig, g as LadderRung, h as LadderElement, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
|
|
2
|
+
|
|
3
|
+
declare function parseLadderDSL(text: string): LadderAST;
|
|
4
|
+
|
|
5
|
+
declare function renderLadder(ast: LadderAST, config?: RenderConfig): string;
|
|
6
|
+
|
|
7
|
+
type LadderElementKind = "contact" | "coil" | "function_block" | "compare";
|
|
8
|
+
interface LadderLayoutNode {
|
|
9
|
+
id: string;
|
|
10
|
+
rungIndex: number;
|
|
11
|
+
element: LadderElement;
|
|
12
|
+
kind: LadderElementKind;
|
|
13
|
+
/** x of the element body (left edge) */
|
|
14
|
+
x: number;
|
|
15
|
+
/** y of the element body (top edge) */
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
/** rung centerline Y (where wires attach) */
|
|
20
|
+
rungY: number;
|
|
21
|
+
}
|
|
22
|
+
interface LadderLayoutWire {
|
|
23
|
+
path: string;
|
|
24
|
+
}
|
|
25
|
+
interface LadderLayoutRung {
|
|
26
|
+
rung: LadderRung;
|
|
27
|
+
index: number;
|
|
28
|
+
y: number;
|
|
29
|
+
/** Rightmost x reached by elements on this rung. */
|
|
30
|
+
endX: number;
|
|
31
|
+
/** Rung slot total height (used for spacing). */
|
|
32
|
+
height: number;
|
|
33
|
+
/** Total pixel height reserved above rungY for name/tag labels. */
|
|
34
|
+
headerHeight: number;
|
|
35
|
+
}
|
|
36
|
+
interface LadderLayoutResult {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
leftRailX: number;
|
|
40
|
+
rightRailX: number;
|
|
41
|
+
rungs: LadderLayoutRung[];
|
|
42
|
+
nodes: LadderLayoutNode[];
|
|
43
|
+
wires: LadderLayoutWire[];
|
|
44
|
+
}
|
|
45
|
+
declare function layoutLadder(ast: LadderAST): LadderLayoutResult;
|
|
46
|
+
|
|
47
|
+
declare const ladder: DiagramPlugin;
|
|
48
|
+
|
|
49
|
+
export { ladder, layoutLadder, parseLadderDSL, renderLadder };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBE5HNDA5_cjs = require('../../chunk-BE5HNDA5.cjs');
|
|
4
|
+
require('../../chunk-N7KOXOMX.cjs');
|
|
5
|
+
require('../../chunk-HDKDQAEQ.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "layoutLogic", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkBE5HNDA5_cjs.layoutLogic; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "logic", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkBE5HNDA5_cjs.logic; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "parseLogic", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkBE5HNDA5_cjs.parseLogic; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "renderLogic", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkBE5HNDA5_cjs.renderLogic; }
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
26
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { d as LogicGateAST, R as RenderConfig, b as DiagramPlugin } from '../../types-DqfcYkcY.cjs';
|
|
2
|
+
|
|
3
|
+
declare function parseLogic(text: string): LogicGateAST;
|
|
4
|
+
|
|
5
|
+
declare function renderLogic(ast: LogicGateAST, config?: RenderConfig): string;
|
|
6
|
+
|
|
7
|
+
interface GateGeometry {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
inputPins: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
label?: string;
|
|
15
|
+
}>;
|
|
16
|
+
outputPins: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
label?: string;
|
|
21
|
+
bubble?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
/** Body SVG path (ANSI) */
|
|
24
|
+
ansiPath: string;
|
|
25
|
+
/** Output bubble? */
|
|
26
|
+
outputBubble?: boolean;
|
|
27
|
+
/** Clock triangle pin id (sequential) */
|
|
28
|
+
clockPin?: string;
|
|
29
|
+
/** IEC label inside rectangle */
|
|
30
|
+
iecLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface LogicLayoutNode {
|
|
34
|
+
id: string;
|
|
35
|
+
kind: "input" | "gate" | "output";
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
layer: number;
|
|
39
|
+
geometry?: GateGeometry;
|
|
40
|
+
gateType?: string;
|
|
41
|
+
label: string;
|
|
42
|
+
isActiveLow?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface LogicLayoutWire {
|
|
45
|
+
fromNode: string;
|
|
46
|
+
fromX: number;
|
|
47
|
+
fromY: number;
|
|
48
|
+
toNode: string;
|
|
49
|
+
toX: number;
|
|
50
|
+
toY: number;
|
|
51
|
+
isActiveLow?: boolean;
|
|
52
|
+
path: string;
|
|
53
|
+
}
|
|
54
|
+
interface LogicLayoutModule {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
}
|
|
62
|
+
interface LogicLayoutResult {
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
nodes: LogicLayoutNode[];
|
|
66
|
+
wires: LogicLayoutWire[];
|
|
67
|
+
modules: LogicLayoutModule[];
|
|
68
|
+
}
|
|
69
|
+
declare function layoutLogic(ast: LogicGateAST): LogicLayoutResult;
|
|
70
|
+
|
|
71
|
+
declare const logic: DiagramPlugin;
|
|
72
|
+
|
|
73
|
+
export { layoutLogic, logic, parseLogic, renderLogic };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { d as LogicGateAST, R as RenderConfig, b as DiagramPlugin } from '../../types-DqfcYkcY.js';
|
|
2
|
+
|
|
3
|
+
declare function parseLogic(text: string): LogicGateAST;
|
|
4
|
+
|
|
5
|
+
declare function renderLogic(ast: LogicGateAST, config?: RenderConfig): string;
|
|
6
|
+
|
|
7
|
+
interface GateGeometry {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
inputPins: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
label?: string;
|
|
15
|
+
}>;
|
|
16
|
+
outputPins: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
label?: string;
|
|
21
|
+
bubble?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
/** Body SVG path (ANSI) */
|
|
24
|
+
ansiPath: string;
|
|
25
|
+
/** Output bubble? */
|
|
26
|
+
outputBubble?: boolean;
|
|
27
|
+
/** Clock triangle pin id (sequential) */
|
|
28
|
+
clockPin?: string;
|
|
29
|
+
/** IEC label inside rectangle */
|
|
30
|
+
iecLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface LogicLayoutNode {
|
|
34
|
+
id: string;
|
|
35
|
+
kind: "input" | "gate" | "output";
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
layer: number;
|
|
39
|
+
geometry?: GateGeometry;
|
|
40
|
+
gateType?: string;
|
|
41
|
+
label: string;
|
|
42
|
+
isActiveLow?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface LogicLayoutWire {
|
|
45
|
+
fromNode: string;
|
|
46
|
+
fromX: number;
|
|
47
|
+
fromY: number;
|
|
48
|
+
toNode: string;
|
|
49
|
+
toX: number;
|
|
50
|
+
toY: number;
|
|
51
|
+
isActiveLow?: boolean;
|
|
52
|
+
path: string;
|
|
53
|
+
}
|
|
54
|
+
interface LogicLayoutModule {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
}
|
|
62
|
+
interface LogicLayoutResult {
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
nodes: LogicLayoutNode[];
|
|
66
|
+
wires: LogicLayoutWire[];
|
|
67
|
+
modules: LogicLayoutModule[];
|
|
68
|
+
}
|
|
69
|
+
declare function layoutLogic(ast: LogicGateAST): LogicLayoutResult;
|
|
70
|
+
|
|
71
|
+
declare const logic: DiagramPlugin;
|
|
72
|
+
|
|
73
|
+
export { layoutLogic, logic, parseLogic, renderLogic };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|