1 |
|
2 | const { db } = require('./db/db');
|
3 | const fsw = require('./fsw');
|
4 | const swu = require('./swu');
|
5 |
|
6 | module.exports = { db, fsw, swu }
|
7 |
|
8 | /**
|
9 | * The elements of a style string
|
10 | * @typedef {object} StyleObject
|
11 | * @property {boolean} colorize - boolean to use standardized colors for symbol groups
|
12 | * @property {number} padding - integer value for padding around symbol or sign
|
13 | * @property {string} background - css name or hex color for background
|
14 | * @property {array} detail - array for css name or hex color for line and optional fill
|
15 | * @property {number} zoom - decimal value for zoom level
|
16 | * @property {object[]} detailsym - custom colors for individual symbols
|
17 | * @property {number} detailsym.index - symbol index in sign box
|
18 | * @property {array} detailsym.detail - array for css name or hex color for line and optional fill
|
19 | * @property {string} classes - list of class names separated with spaces used for SVG
|
20 | * @property {string} id - id name used for SVG
|
21 | */
|
22 |
|
23 | /**
|
24 | * @typedef {object} ColumnOptions
|
25 | * @property {number} height - the height of the columns
|
26 | * @property {number} width - the widths of the columns
|
27 | * @property {number} offset - the lane offset for left and right lanes
|
28 | * @property {number} pad - amount of padding before and after signs as well as at top, left, and right of columns
|
29 | * @property {number} margin - amount of space at bottom of column that is not available
|
30 | * @property {boolean} dynamic - enables variable width columns
|
31 | * @property {string} background - background color for columns
|
32 | * @property {StyleObject} style - an object of style options
|
33 | * @property {object} punctuation - an object of punctuation options
|
34 | * @property {boolean} punctuation.spacing - enables special spacing for punctuation with no space above and custom space below
|
35 | * @property {number} punctuation.pad - the amount of spacing after a punctuation if punctuation spacing is enabled
|
36 | * @property {boolean} punctuation.pull - prevents line breaks before punctuation by reducing spacing between signs in a column
|
37 | */
|
38 |
|
39 | /**
|
40 | * @typedef {ColumnSegment[]} ColumnData
|
41 | */
|
42 |
|
43 | /**
|
44 | * @typedef {object} ColumnSegment
|
45 | * @property {number} x - the x position in the column
|
46 | * @property {number} y - the y position in the column
|
47 | * @property {number} minX - the min x value within the segment
|
48 | * @property {number} minY - the min y value within the segment
|
49 | * @property {number} width - the width of the text segment
|
50 | * @property {number} height - the height of the text segment
|
51 | * @property {number} lane - Left as -1, Middle as 0, Right as 1
|
52 | * @property {number} padding - the padding of the text segment affects colored background
|
53 | * @property {string} segment - "sign" or "symbol"
|
54 | * @property {string} text - the text of the sign or symbol with optional style string
|
55 | * @property {number} zoom - the zoom size of the segment
|
56 | */
|