@knowvah/dot-engine 2.6.2 → 2.6.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.
- package/dist/common/htmltable-lex.d.ts +38 -0
- package/dist/common/htmltable-lex.d.ts.map +1 -1
- package/dist/common/htmltable-parse-attrs.d.ts +41 -0
- package/dist/common/htmltable-parse-attrs.d.ts.map +1 -0
- package/dist/common/htmltable-parse.d.ts +3 -0
- package/dist/common/htmltable-parse.d.ts.map +1 -1
- package/dist/common/htmltable-pos.d.ts +17 -0
- package/dist/common/htmltable-pos.d.ts.map +1 -1
- package/dist/common/htmltable.d.ts +13 -1
- package/dist/common/htmltable.d.ts.map +1 -1
- package/dist/common/make-label.d.ts.map +1 -1
- package/dist/common/spline-midpoint.d.ts +8 -0
- package/dist/common/spline-midpoint.d.ts.map +1 -1
- package/dist/index.js +617 -322
- package/dist/index.js.map +4 -4
- package/dist/label/node.d.ts +7 -1
- package/dist/label/node.d.ts.map +1 -1
- package/dist/layout/circo/position-helpers.d.ts +15 -3
- package/dist/layout/circo/position-helpers.d.ts.map +1 -1
- package/dist/layout/circo/position.d.ts +17 -1
- package/dist/layout/circo/position.d.ts.map +1 -1
- package/dist/layout/dot/ortho-adapter.d.ts.map +1 -1
- package/dist/layout/neato/multispline.d.ts.map +1 -1
- package/dist/layout/pack/poly-pack.d.ts +2 -18
- package/dist/layout/pack/poly-pack.d.ts.map +1 -1
- package/dist/pathplan/shortest.d.ts.map +1 -1
- package/dist/render.js +770 -475
- package/dist/render.js.map +4 -4
- package/package.json +1 -1
- package/src/common/htmltable-lex.ts +265 -5
- package/src/common/htmltable-parse-attrs.ts +166 -0
- package/src/common/htmltable-parse.ts +262 -242
- package/src/common/htmltable-pos.ts +37 -38
- package/src/common/htmltable.ts +139 -45
- package/src/common/make-label.ts +19 -3
- package/src/common/spline-midpoint.ts +30 -9
- package/src/label/node.ts +8 -2
- package/src/layout/circo/position-helpers.ts +28 -17
- package/src/layout/circo/position.ts +28 -7
- package/src/layout/dot/ortho-adapter.ts +20 -9
- package/src/layout/neato/multispline.ts +17 -5
- package/src/layout/pack/poly-pack.ts +5 -31
- package/src/pathplan/shortest.ts +15 -2
|
@@ -9,8 +9,46 @@
|
|
|
9
9
|
* @see lib/common/htmllex.c:startElement
|
|
10
10
|
* @see lib/common/htmllex.c:findNext
|
|
11
11
|
*/
|
|
12
|
+
import { HtmlParseError } from './htmltable-types.js';
|
|
12
13
|
import type { Token } from './htmltable-types.js';
|
|
13
14
|
export type { Token } from './htmltable-types.js';
|
|
15
|
+
/**
|
|
16
|
+
* A label failure C reports on stderr before dropping the HTML label
|
|
17
|
+
* (`ctx->error`, parseHTML rv 3). `diagnostics` holds the lines in print
|
|
18
|
+
* order, each already carrying its `Error: ` prefix where C's agerrorf adds
|
|
19
|
+
* one; the caller prints them (one `console.error` each) and then C's
|
|
20
|
+
* `in label of ...` continuation (labels.c:make_label).
|
|
21
|
+
* @see lib/common/htmllex.c:htmllex
|
|
22
|
+
*/
|
|
23
|
+
export declare class HtmlLexError extends HtmlParseError {
|
|
24
|
+
readonly diagnostics: readonly string[];
|
|
25
|
+
constructor(tag: string, message: string, diagnostics: readonly string[]);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `agerrorf("%s in line %lu \n", msg, lineno)` followed by `error_context`.
|
|
29
|
+
* @see lib/common/htmllex.c:htmlerror
|
|
30
|
+
* @see lib/common/htmllex.c:error_context
|
|
31
|
+
*/
|
|
32
|
+
export declare function htmlErrorInLine(message: string, line: number, context: string): HtmlLexError;
|
|
33
|
+
/**
|
|
34
|
+
* C's `htmlerror` (yacc error) as it reads when the lexer last returned
|
|
35
|
+
* `tok`; undefined when the token has no recorded chunk.
|
|
36
|
+
* @see lib/common/htmllex.c:htmlerror
|
|
37
|
+
*/
|
|
38
|
+
export declare function htmlErrorAtToken(message: string, tok: Token | undefined): HtmlLexError | undefined;
|
|
39
|
+
/** Tokens produced before the first lexical error, plus that error. */
|
|
40
|
+
export interface TokenizeResult {
|
|
41
|
+
tokens: Token[];
|
|
42
|
+
error?: HtmlParseError;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Tokenize until the first lexical error and return both. C interleaves
|
|
46
|
+
* lexing with the yacc parse, so a syntax error in the tokens before the
|
|
47
|
+
* failing chunk is reported in preference to the lexical error; callers that
|
|
48
|
+
* parse the partial stream get that precedence.
|
|
49
|
+
* @see lib/common/htmllex.c:findNext
|
|
50
|
+
*/
|
|
51
|
+
export declare function tokenizeDeferred(src: string): TokenizeResult;
|
|
14
52
|
/** @see lib/common/htmllex.c:findNext */
|
|
15
53
|
export declare function tokenize(src: string): Token[];
|
|
16
54
|
//# sourceMappingURL=htmltable-lex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmltable-lex.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-lex.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"htmltable-lex.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-lex.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA6IlD;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,cAAc;IAC9C,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;gBAE5B,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE;CAKzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,CAG5F;AA2CD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAIlG;AAsID,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAoB5D;AAED,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,CAI7C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attribute interpretation for the HTML-like label parser: the values
|
|
3
|
+
* mkTbl/mkCell/mkBR/mkFont read off a tag, and the table/cell records built
|
|
4
|
+
* from them.
|
|
5
|
+
*
|
|
6
|
+
* @see lib/common/htmllex.c:mkTbl
|
|
7
|
+
* @see lib/common/htmllex.c:mkCell
|
|
8
|
+
*/
|
|
9
|
+
import type { HtmlAlign, HtmlCell, HtmlCellContent, HtmlRow, HtmlTable, HtmlVAlign } from './htmltable-types.js';
|
|
10
|
+
export declare const parseAlign: (v: string) => HtmlAlign | undefined;
|
|
11
|
+
export declare const parseVAlign: (v: string) => HtmlVAlign | undefined;
|
|
12
|
+
export declare const num: (s: string | undefined) => number | undefined;
|
|
13
|
+
export declare const parseFixedSize: (a: Record<string, string>) => true | undefined;
|
|
14
|
+
export declare const parseTitle: (a: Record<string, string>) => string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Parse SIDES attribute into a bitmask matching C sidesfn().
|
|
17
|
+
* Unrecognised chars are silently skipped (C issues a warning but continues).
|
|
18
|
+
* C guard: if (flags != BORDER_MASK) p->flags |= flags — the full-mask case
|
|
19
|
+
* is a no-op (means "all sides", the default), so we return undefined for it.
|
|
20
|
+
* @see lib/common/htmllex.c:sidesfn
|
|
21
|
+
*/
|
|
22
|
+
export declare const parseSides: (v: string | undefined) => number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Parse GRADIENTANGLE attribute — integer in [0, 360].
|
|
25
|
+
* Out-of-range or non-integer values are ignored (C issues a warning).
|
|
26
|
+
* @see lib/common/htmllex.c:gradientanglefn
|
|
27
|
+
*/
|
|
28
|
+
export declare const parseGradientAngle: (v: string | undefined) => number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Parse COLUMNS attribute — only "*" is valid (sets vrule=true).
|
|
31
|
+
* @see lib/common/htmllex.c:columnsfn
|
|
32
|
+
*/
|
|
33
|
+
export declare const parseColumns: (v: string | undefined) => true | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Parse ROWS attribute — only "*" is valid (sets hrule=true).
|
|
36
|
+
* @see lib/common/htmllex.c:rowsfn
|
|
37
|
+
*/
|
|
38
|
+
export declare const parseRows: (v: string | undefined) => true | undefined;
|
|
39
|
+
export declare const buildCell: (content: HtmlCellContent[], a: Record<string, string>) => HtmlCell;
|
|
40
|
+
export declare const buildTable: (rows: HtmlRow[], a: Record<string, string>) => HtmlTable;
|
|
41
|
+
//# sourceMappingURL=htmltable-parse-attrs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmltable-parse-attrs.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-parse-attrs.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,UAAU,EACX,MAAM,sBAAsB,CAAC;AAqB9B,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,SAAS,GAAG,SAMlD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,UAAU,GAAG,SAMpD,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAIpD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,IAAI,GAAG,SACL,CAAC;AAE9D,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAAM,GAAG,SACV,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAY3D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAMnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,IAAI,GAAG,SAC9B,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,IAAI,GAAG,SAC3B,CAAC;AAE/B,eAAO,MAAM,SAAS,GAAI,SAAS,eAAe,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,QAwBhF,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,MAAM,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,SAwBtE,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @see lib/common/htmlparse.y
|
|
7
7
|
*/
|
|
8
8
|
import type { HtmlLabel, HtmlTable, HtmlText, Token } from './htmltable-types.js';
|
|
9
|
+
import { HtmlParseError } from './htmltable-types.js';
|
|
9
10
|
interface FontState {
|
|
10
11
|
bold?: boolean;
|
|
11
12
|
italic?: boolean;
|
|
@@ -21,6 +22,8 @@ interface FontState {
|
|
|
21
22
|
interface ParseState {
|
|
22
23
|
tokens: Token[];
|
|
23
24
|
pos: number;
|
|
25
|
+
/** Lexical error found after the last token: C reports it when the parser asks for more. */
|
|
26
|
+
pending?: HtmlParseError;
|
|
24
27
|
}
|
|
25
28
|
/** @see lib/common/htmlparse.y:fonttext / text rules */
|
|
26
29
|
export declare const parseText: (s: ParseState, fontStack: FontState[]) => HtmlText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmltable-parse.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-parse.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"htmltable-parse.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-parse.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,KAAK,EAIV,SAAS,EAET,SAAS,EACT,QAAQ,EAER,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAetD,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA+BD,UAAU,UAAU;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAwHD,wDAAwD;AACxD,eAAO,MAAM,SAAS,GAAI,GAAG,UAAU,EAAE,WAAW,SAAS,EAAE,KAAG,QAejE,CAAC;AA8MF,0EAA0E;AAC1E,eAAO,MAAM,UAAU,GAAI,GAAG,UAAU,EAAE,WAAW,SAAS,EAAE,KAAG,SAelE,CAAC;AAkGF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,SAa5C,CAAC"}
|
|
@@ -185,6 +185,23 @@ export declare function placeCell(ctx: CellPlaceCtx): PlacedCell;
|
|
|
185
185
|
export declare function posHtmlTable(tbl: HtmlTable, finfo: HtmlFontInfo, measurer: TextMeasurer, pos?: Box, sides?: number): PlacedHtml;
|
|
186
186
|
/** Position a sized HtmlLabel relative to its center. */
|
|
187
187
|
export declare function posHtmlLabel(label: HtmlLabel, finfo: HtmlFontInfo, measurer: TextMeasurer): PlacedHtml;
|
|
188
|
+
/** A built HTML label plus make_html_label's "problem" return value. */
|
|
189
|
+
export interface HtmlLabelResult {
|
|
190
|
+
label: TextlabelT;
|
|
191
|
+
rv: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* make_html_label: parse, size and position an HTML-like label. Returns C's
|
|
195
|
+
* rv too (nonzero: the caller appends `in label of ...`, labels.c:make_label).
|
|
196
|
+
* Parse diagnostics print here, once per label, as parseHTML does. The
|
|
197
|
+
* optional `imageSizer` resolves `<IMG SRC>`; absent means C's missing image.
|
|
198
|
+
* @see lib/common/htmltable.c:make_html_label
|
|
199
|
+
*/
|
|
200
|
+
export declare function makeHtmlLabelRv(content: string, finfo: HtmlFontInfo & {
|
|
201
|
+
imageSizer?: ImageSizer;
|
|
202
|
+
pencolor?: string;
|
|
203
|
+
}, measurer: TextMeasurer): HtmlLabelResult;
|
|
204
|
+
/** {@link makeHtmlLabelRv} without the problem flag. */
|
|
188
205
|
export declare function makeHtmlLabel(content: string, finfo: HtmlFontInfo & {
|
|
189
206
|
imageSizer?: ImageSizer;
|
|
190
207
|
pencolor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmltable-pos.d.ts","sourceRoot":"","sources":["../../src/common/htmltable-pos.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,GA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E,YAAY,GAAG,UAAU,CA6BvD;AA2GD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,EACtB,GAAG,CAAC,EAAE,GAAG,EACT,KAAK,GAAE,MAAuB,GAC7B,UAAU,CAqCZ;AAmBD,yDAAyD;AACzD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,GACrB,UAAU,CAGZ;AAKD,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,YAAY,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EACpE,QAAQ,EAAE,YAAY,GACrB,eAAe,CA2BjB;AAED,wDAAwD;AACxD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,YAAY,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EACpE,QAAQ,EAAE,YAAY,GACrB,UAAU,CAEZ"}
|
|
@@ -39,6 +39,15 @@ export declare const cellPad: (cell: HtmlCell, tbl: HtmlTable) => number;
|
|
|
39
39
|
* @see lib/common/htmltable.c:1115 size_html_tbl (cp->data.border default)
|
|
40
40
|
*/
|
|
41
41
|
export declare const cellBorder: (cell: HtmlCell, tbl: HtmlTable) => number;
|
|
42
|
+
/**
|
|
43
|
+
* Propagate pen (border) color down the table tree. A table with no explicit
|
|
44
|
+
* COLOR inherits `parentColor`; each cell inherits the (possibly inherited)
|
|
45
|
+
* table color; each nested table inherits its enclosing cell's color. Mirrors
|
|
46
|
+
* C, which defaults the top table's pencolor to getPenColor(obj) then copies
|
|
47
|
+
* parent->child during processTbl.
|
|
48
|
+
* @see lib/common/htmltable.c:1911 (top table), :1406-1407 (cell), :1556-1557
|
|
49
|
+
*/
|
|
50
|
+
export declare function inheritTablePenColor(tbl: HtmlTable, parentColor: string | undefined): void;
|
|
42
51
|
/** Full table layout: per-cell sizes plus column/row dimensions. */
|
|
43
52
|
export interface HtmlTableLayout {
|
|
44
53
|
entries: {
|
|
@@ -54,6 +63,8 @@ export interface HtmlTableLayout {
|
|
|
54
63
|
heights: number[];
|
|
55
64
|
spacing: number;
|
|
56
65
|
border: number;
|
|
66
|
+
/** processTbl's return: nonzero when sizing any cell had a problem. */
|
|
67
|
+
rv: number;
|
|
57
68
|
}
|
|
58
69
|
/**
|
|
59
70
|
* Lay out a table: per-cell sizes and column/row dimension arrays.
|
|
@@ -68,7 +79,8 @@ export declare const layoutHtmlTable: (tbl: HtmlTable, measurer: TextMeasurer, e
|
|
|
68
79
|
* When absent or when the sizer returns null, images get zero size and a
|
|
69
80
|
* warning is emitted, matching C's missing-image behavior exactly.
|
|
70
81
|
*
|
|
82
|
+
* @returns make_html_label's `rv |= size_html_*`: nonzero on a sizing problem.
|
|
71
83
|
* @see lib/common/htmltable.c:make_html_label
|
|
72
84
|
*/
|
|
73
|
-
export declare const sizeHtmlLabel: (label: HtmlLabel, measurer: TextMeasurer, env?: HtmlSizeEnv) =>
|
|
85
|
+
export declare const sizeHtmlLabel: (label: HtmlLabel, measurer: TextMeasurer, env?: HtmlSizeEnv) => number;
|
|
74
86
|
//# sourceMappingURL=htmltable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmltable.d.ts","sourceRoot":"","sources":["../../src/common/htmltable.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACV,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,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EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,YAAY,GACrB,UAAU,CAEZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,YAAY,EACtB,GAAG,CAAC,EAAE,QAAQ,GACb,UAAU,CAoBZ"}
|
|
@@ -17,6 +17,14 @@ type BezLike = {
|
|
|
17
17
|
export type SplLike = {
|
|
18
18
|
list: BezLike[];
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* DIST2(p, q) as the oracle compiles it. clang -ffp-contract=on turns
|
|
22
|
+
* `dx*dx + dy*dy` into `fmul t, dy, dy; fmadd d, dx, dx, t` at every libgvc
|
|
23
|
+
* site the port reaches through here: dotneato_closest's scan and bisection,
|
|
24
|
+
* edgeMidpoint's APPROXEQPT and polylineMidpoint's DIST (libgvc 16.1
|
|
25
|
+
* disassembly), and resolvePort's inlined closestSide.
|
|
26
|
+
* @see lib/common/geom.h:DIST2
|
|
27
|
+
*/
|
|
20
28
|
export declare function dist2(p: Point, q: Point): number;
|
|
21
29
|
/** @see lib/common/utils.c:dotneato_closest */
|
|
22
30
|
export declare function dotneatoClosest(spl: SplLike, pt: Point): Point;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spline-midpoint.d.ts","sourceRoot":"","sources":["../../src/common/spline-midpoint.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG9C,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,EAAE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