1 | export function columnPng(fswColumn: ColumnSegment[], options: ColumnOptions): string;
|
2 | export function columnSvg(fswColumn: ColumnSegment[], options: ColumnOptions): string;
|
3 | export function columnsPng(fswText: string, options: ColumnOptions): string[];
|
4 | export function columnsSvg(fswText: string, options: ColumnOptions): string[];
|
5 | export function signNormalize(fswSign: string): string;
|
6 | export function signPng(fswSign: string): string;
|
7 | export function signSvg(fswSign: string): string;
|
8 | export function signSvgBody(fswSign: string): string;
|
9 | export function symbolFill(fsw: string): string;
|
10 | export function symbolLine(fsw: string): string;
|
11 | export function symbolNormalize(fswSym: string): string;
|
12 | export function symbolPng(fswSym: string): string;
|
13 | export function symbolSize(fsw: string): number[];
|
14 | export function symbolSvg(fswSym: string): string;
|
15 | export function symbolSvgBody(fswSym: string): string;
|
16 | export function symbolText(fsw: string): string;
|
17 | export var __esModule: boolean;
|
18 | /**
|
19 | * Object of query elements with regular expression identification.
|
20 | */
|
21 | type QueryObject = {
|
22 | /**
|
23 | * - required true for query object
|
24 | */
|
25 | query: boolean;
|
26 | /**
|
27 | * - an object for prefix elements
|
28 | */
|
29 | prefix?: {
|
30 | /**
|
31 | * - true if sorting prefix is required
|
32 | */
|
33 | required: boolean;
|
34 | /**
|
35 | * - array of symbol strings, range arrays, and OR arrays of strings and range arrays
|
36 | */
|
37 | parts?: (string | string[] | (string | string[])[])[];
|
38 | };
|
39 | /**
|
40 | * - array of objects for symbols, ranges, and list of symbols or ranges, with optional coordinates
|
41 | */
|
42 | signbox?: (QuerySignboxSymbol | QuerySignboxRange | QuerySignboxOr)[];
|
43 | /**
|
44 | * - amount that x or y coordinates can vary and find a match, defaults to 20
|
45 | */
|
46 | variance?: number;
|
47 | /**
|
48 | * - boolean value for including style string in matches
|
49 | */
|
50 | style?: boolean;
|
51 | };
|
52 | type QuerySignboxSymbol = {
|
53 | /**
|
54 | * - a symbol
|
55 | */
|
56 | symbol: string;
|
57 | /**
|
58 | * - an optional coordinate
|
59 | */
|
60 | coord?: number[];
|
61 | };
|
62 | type QuerySignboxRange = {
|
63 | /**
|
64 | * - an array of two symbols
|
65 | */
|
66 | range: string[];
|
67 | /**
|
68 | * - an optional coordinate
|
69 | */
|
70 | coord?: number[];
|
71 | };
|
72 | type QuerySignboxOr = {
|
73 | /**
|
74 | * - an array of symbol strings and range arrays
|
75 | */
|
76 | or: (string | string[])[];
|
77 | /**
|
78 | * - an optional coordinate
|
79 | */
|
80 | coord?: number[];
|
81 | };
|
82 | type ColumnOptions = {
|
83 | /**
|
84 | * - the height of the columns
|
85 | */
|
86 | height?: number;
|
87 | /**
|
88 | * - the widths of the columns
|
89 | */
|
90 | width?: number;
|
91 | /**
|
92 | * - the lane offset for left and right lanes
|
93 | */
|
94 | offset?: number;
|
95 | /**
|
96 | * - amount of padding before and after signs as well as at top, left, and right of columns
|
97 | */
|
98 | pad?: number;
|
99 | /**
|
100 | * - amount of space at bottom of column that is not available
|
101 | */
|
102 | margin?: number;
|
103 | /**
|
104 | * - enables variable width columns
|
105 | */
|
106 | dynamic?: boolean;
|
107 | /**
|
108 | * - background color for columns
|
109 | */
|
110 | background?: string;
|
111 | /**
|
112 | * - an object of style options
|
113 | */
|
114 | style?: StyleObject;
|
115 | /**
|
116 | * - an object of punctuation options
|
117 | */
|
118 | punctuation?: {
|
119 | /**
|
120 | * - enables special spacing for punctuation with no space above and custom space below
|
121 | */
|
122 | spacing?: boolean;
|
123 | /**
|
124 | * - the amount of spacing after a punctuation if punctuation spacing is enabled
|
125 | */
|
126 | pad?: number;
|
127 | /**
|
128 | * - prevents line breaks before punctuation by reducing spacing between signs in a column
|
129 | */
|
130 | pull?: boolean;
|
131 | };
|
132 | };
|
133 | type ColumnData = ColumnSegment[];
|
134 | type ColumnSegment = {
|
135 | /**
|
136 | * - the x position in the column
|
137 | */
|
138 | x: number;
|
139 | /**
|
140 | * - the y position in the column
|
141 | */
|
142 | y: number;
|
143 | /**
|
144 | * - the min x value within the segment
|
145 | */
|
146 | minX: number;
|
147 | /**
|
148 | * - the min y value within the segment
|
149 | */
|
150 | minY: number;
|
151 | /**
|
152 | * - the width of the text segment
|
153 | */
|
154 | width: number;
|
155 | /**
|
156 | * - the height of the text segment
|
157 | */
|
158 | height: number;
|
159 | /**
|
160 | * - Left as -1, Middle as 0, Right as 1
|
161 | */
|
162 | lane: number;
|
163 | /**
|
164 | * - the padding of the text segment affects colored background
|
165 | */
|
166 | padding: number;
|
167 | /**
|
168 | * - "sign" or "symbol"
|
169 | */
|
170 | segment: string;
|
171 | /**
|
172 | * - the text of the sign or symbol with optional style string
|
173 | */
|
174 | text: string;
|
175 | /**
|
176 | * - the zoom size of the segment
|
177 | */
|
178 | zoom: number;
|
179 | };
|
180 | type SegmentInfo = {
|
181 | /**
|
182 | * - the min x value within the segment
|
183 | */
|
184 | minX: number;
|
185 | /**
|
186 | * - the min y value within the segment
|
187 | */
|
188 | minY: number;
|
189 | /**
|
190 | * - the width of the text segment
|
191 | */
|
192 | width: number;
|
193 | /**
|
194 | * - the height of the text segment
|
195 | */
|
196 | height: number;
|
197 | /**
|
198 | * - Left as -1, Middle as 0, Right as 1
|
199 | */
|
200 | lane: number;
|
201 | /**
|
202 | * - the padding of the text segment affects colored background
|
203 | */
|
204 | padding: number;
|
205 | /**
|
206 | * - "sign" or "symbol"
|
207 | */
|
208 | segment: string;
|
209 | /**
|
210 | * - the zoom size of the segment
|
211 | */
|
212 | zoom: number;
|
213 | };
|
214 | /**
|
215 | * The elements of a style string
|
216 | */
|
217 | type StyleObject = {
|
218 | /**
|
219 | * - boolean to use standardized colors for symbol groups
|
220 | */
|
221 | colorize?: boolean;
|
222 | /**
|
223 | * - integer value for padding around symbol or sign
|
224 | */
|
225 | padding?: number;
|
226 | /**
|
227 | * - css name or hex color for background
|
228 | */
|
229 | background?: string;
|
230 | /**
|
231 | * - array for css name or hex color for line and optional fill
|
232 | */
|
233 | detail?: string[];
|
234 | /**
|
235 | * - decimal value for zoom level
|
236 | */
|
237 | zoom?: number;
|
238 | /**
|
239 | * - custom colors for individual symbols
|
240 | */
|
241 | detailsym?: {
|
242 | /**
|
243 | * - symbol index in sign box
|
244 | */
|
245 | index: number;
|
246 | /**
|
247 | * - array for css name or hex color for line and optional fill
|
248 | */
|
249 | detail: string[];
|
250 | }[];
|
251 | /**
|
252 | * - list of class names separated with spaces used for SVG
|
253 | */
|
254 | classes?: string;
|
255 | /**
|
256 | * - id name used for SVG
|
257 | */
|
258 | id?: string;
|
259 | };
|
260 | /**
|
261 | * The elements of a symbol string
|
262 | */
|
263 | type SymbolObject = {
|
264 | /**
|
265 | * - symbol identifier
|
266 | */
|
267 | symbol?: string;
|
268 | /**
|
269 | * - x,y coordinate
|
270 | */
|
271 | coord?: number[];
|
272 | /**
|
273 | * - style string
|
274 | */
|
275 | style?: string;
|
276 | };
|
277 | /**
|
278 | * The elements of a sign string
|
279 | */
|
280 | type SignObject = {
|
281 | /**
|
282 | * - array of symbols
|
283 | */
|
284 | sequence?: string[];
|
285 | /**
|
286 | * - signbox marker or lane
|
287 | */
|
288 | box?: string;
|
289 | /**
|
290 | * - preprocessed x,y coordinate
|
291 | */
|
292 | max?: number[];
|
293 | /**
|
294 | * - array of symbols with coordinates
|
295 | */
|
296 | spatials?: {
|
297 | symbol: string;
|
298 | coord: number[];
|
299 | }[];
|
300 | /**
|
301 | * - style string
|
302 | */
|
303 | style?: string;
|
304 | };
|