@vivliostyle/core 2.24.3 → 2.25.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 (63) hide show
  1. package/lib/vivliostyle/adaptive-viewer.d.ts +167 -167
  2. package/lib/vivliostyle/asserts.d.ts +21 -21
  3. package/lib/vivliostyle/assets.d.ts +35 -35
  4. package/lib/vivliostyle/base.d.ts +189 -189
  5. package/lib/vivliostyle/break-position.d.ts +39 -39
  6. package/lib/vivliostyle/break.d.ts +112 -112
  7. package/lib/vivliostyle/cfi.d.ts +77 -77
  8. package/lib/vivliostyle/columns.d.ts +52 -52
  9. package/lib/vivliostyle/constants.d.ts +53 -53
  10. package/lib/vivliostyle/core-viewer.d.ts +240 -240
  11. package/lib/vivliostyle/counters.d.ts +127 -127
  12. package/lib/vivliostyle/css-cascade.d.ts +974 -954
  13. package/lib/vivliostyle/css-logical-util.d.ts +3 -3
  14. package/lib/vivliostyle/css-page.d.ts +451 -451
  15. package/lib/vivliostyle/css-parser.d.ts +320 -320
  16. package/lib/vivliostyle/css-prop.d.ts +74 -74
  17. package/lib/vivliostyle/css-styler.d.ts +210 -210
  18. package/lib/vivliostyle/css-tokenizer.d.ts +243 -243
  19. package/lib/vivliostyle/css-validator.d.ts +319 -319
  20. package/lib/vivliostyle/css.d.ts +205 -205
  21. package/lib/vivliostyle/diff.d.ts +26 -26
  22. package/lib/vivliostyle/display.d.ts +62 -57
  23. package/lib/vivliostyle/epub.d.ts +329 -329
  24. package/lib/vivliostyle/exprs.d.ts +395 -395
  25. package/lib/vivliostyle/font.d.ts +87 -87
  26. package/lib/vivliostyle/footnotes.d.ts +41 -41
  27. package/lib/vivliostyle/geometry-util.d.ts +110 -110
  28. package/lib/vivliostyle/layout-helper.d.ts +16 -15
  29. package/lib/vivliostyle/layout-processor.d.ts +73 -73
  30. package/lib/vivliostyle/layout-retryers.d.ts +21 -21
  31. package/lib/vivliostyle/layout-util.d.ts +55 -55
  32. package/lib/vivliostyle/layout.d.ts +456 -456
  33. package/lib/vivliostyle/logging.d.ts +56 -56
  34. package/lib/vivliostyle/matchers.d.ts +36 -36
  35. package/lib/vivliostyle/math-util.d.ts +22 -22
  36. package/lib/vivliostyle/net.d.ts +72 -72
  37. package/lib/vivliostyle/ops.d.ts +263 -263
  38. package/lib/vivliostyle/page-floats.d.ts +178 -178
  39. package/lib/vivliostyle/page-master.d.ts +247 -247
  40. package/lib/vivliostyle/plugin.d.ts +172 -172
  41. package/lib/vivliostyle/print.d.ts +7 -7
  42. package/lib/vivliostyle/profile.d.ts +59 -59
  43. package/lib/vivliostyle/pseudo-element.d.ts +32 -32
  44. package/lib/vivliostyle/repetitive-element.d.ts +162 -162
  45. package/lib/vivliostyle/scripts.d.ts +15 -15
  46. package/lib/vivliostyle/sha1.d.ts +33 -33
  47. package/lib/vivliostyle/shared.d.ts +24 -24
  48. package/lib/vivliostyle/sizing.d.ts +29 -29
  49. package/lib/vivliostyle/table.d.ts +263 -263
  50. package/lib/vivliostyle/task-util.d.ts +37 -37
  51. package/lib/vivliostyle/task.d.ts +357 -357
  52. package/lib/vivliostyle/text-polyfill.d.ts +3 -3
  53. package/lib/vivliostyle/toc.d.ts +64 -64
  54. package/lib/vivliostyle/types.d.ts +977 -977
  55. package/lib/vivliostyle/urls.d.ts +25 -25
  56. package/lib/vivliostyle/vgen.d.ts +213 -213
  57. package/lib/vivliostyle/viewer-app.d.ts +19 -19
  58. package/lib/vivliostyle/vtree.d.ts +392 -392
  59. package/lib/vivliostyle/xml-doc.d.ts +88 -88
  60. package/lib/vivliostyle.d.ts +6 -6
  61. package/lib/vivliostyle.js +1 -1
  62. package/lib/vivliostyle.js.map +1 -1
  63. package/package.json +5 -5
@@ -1,87 +1,87 @@
1
- import * as Css from "./css";
2
- import * as CssCascade from "./css-cascade";
3
- import * as Exprs from "./exprs";
4
- import * as Task from "./task";
5
- import * as TaskUtil from "./task-util";
6
- export declare const traitProps: {
7
- [key: string]: Css.Val;
8
- };
9
- export declare const bogusFontData: string;
10
- export declare let bogusFontCounter: number;
11
- export declare function makeFontTraitKey(properties: {
12
- [key: string]: Css.Val;
13
- }): string;
14
- export declare function fillDefaults(properties: {
15
- [key: string]: Css.Val;
16
- }): void;
17
- export declare function prepareProperties(properties: CssCascade.ElementStyle, context: Exprs.Context): {
18
- [key: string]: Css.Val;
19
- };
20
- /**
21
- * A font declared in a font-face rule.
22
- */
23
- export declare class Face {
24
- readonly properties: {
25
- [key: string]: Css.Val;
26
- };
27
- fontTraitKey: string;
28
- src: string | null;
29
- blobURLs: string[];
30
- blobs: Blob[];
31
- family: string | null;
32
- constructor(properties: {
33
- [key: string]: Css.Val;
34
- });
35
- /**
36
- * Check if font traits are the same for two font faces
37
- */
38
- traitsEqual(other: Face): boolean;
39
- /**
40
- * Create "at" font-face rule.
41
- */
42
- makeAtRule(src: string, fontBytes: Blob): string;
43
- }
44
- /**
45
- * Set of the fonts declared in all stylesheets of a document.
46
- * @param deobfuscator function
47
- * that takes url and returns data deobfuscator
48
- */
49
- export declare class DocumentFaces {
50
- readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result<Blob>) | null) | null;
51
- /**
52
- * Maps source font family names to the family names used in the HTML view.
53
- */
54
- familyMap: {
55
- [key: string]: string;
56
- };
57
- constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result<Blob>) | null) | null);
58
- registerFamily(srcFace: Face, viewFace: Face): void;
59
- filterFontFamily(val: Css.Val): Css.Val;
60
- }
61
- /**
62
- * Object that loads fonts in a document and allocates font families for them
63
- * in the view document
64
- * @param head where to add styles in the view document (normally head element)
65
- * @param body where to probe text in the view document (normally body element)
66
- */
67
- export declare class Mapper {
68
- readonly head: Element;
69
- readonly body: Element;
70
- /**
71
- * Maps Face.src to an entry for an already-loaded font.
72
- */
73
- srcURLMap: {
74
- [key: string]: TaskUtil.Fetcher<Face>;
75
- };
76
- familyPrefix: string;
77
- familyCounter: number;
78
- constructor(head: Element, body: Element, opt_familyPrefix?: string);
79
- getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string;
80
- /**
81
- * @param fontBytes deobfuscated font bytes (if deobfuscation is needed)
82
- */
83
- private initFont;
84
- loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher<Face>;
85
- findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result<boolean>;
86
- waitFontLoading(): Task.Result<boolean>;
87
- }
1
+ import * as Css from "./css";
2
+ import * as CssCascade from "./css-cascade";
3
+ import * as Exprs from "./exprs";
4
+ import * as Task from "./task";
5
+ import * as TaskUtil from "./task-util";
6
+ export declare const traitProps: {
7
+ [key: string]: Css.Val;
8
+ };
9
+ export declare const bogusFontData: string;
10
+ export declare let bogusFontCounter: number;
11
+ export declare function makeFontTraitKey(properties: {
12
+ [key: string]: Css.Val;
13
+ }): string;
14
+ export declare function fillDefaults(properties: {
15
+ [key: string]: Css.Val;
16
+ }): void;
17
+ export declare function prepareProperties(properties: CssCascade.ElementStyle, context: Exprs.Context): {
18
+ [key: string]: Css.Val;
19
+ };
20
+ /**
21
+ * A font declared in a font-face rule.
22
+ */
23
+ export declare class Face {
24
+ readonly properties: {
25
+ [key: string]: Css.Val;
26
+ };
27
+ fontTraitKey: string;
28
+ src: string | null;
29
+ blobURLs: string[];
30
+ blobs: Blob[];
31
+ family: string | null;
32
+ constructor(properties: {
33
+ [key: string]: Css.Val;
34
+ });
35
+ /**
36
+ * Check if font traits are the same for two font faces
37
+ */
38
+ traitsEqual(other: Face): boolean;
39
+ /**
40
+ * Create "at" font-face rule.
41
+ */
42
+ makeAtRule(src: string, fontBytes: Blob): string;
43
+ }
44
+ /**
45
+ * Set of the fonts declared in all stylesheets of a document.
46
+ * @param deobfuscator function
47
+ * that takes url and returns data deobfuscator
48
+ */
49
+ export declare class DocumentFaces {
50
+ readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result<Blob>) | null) | null;
51
+ /**
52
+ * Maps source font family names to the family names used in the HTML view.
53
+ */
54
+ familyMap: {
55
+ [key: string]: string;
56
+ };
57
+ constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result<Blob>) | null) | null);
58
+ registerFamily(srcFace: Face, viewFace: Face): void;
59
+ filterFontFamily(val: Css.Val): Css.Val;
60
+ }
61
+ /**
62
+ * Object that loads fonts in a document and allocates font families for them
63
+ * in the view document
64
+ * @param head where to add styles in the view document (normally head element)
65
+ * @param body where to probe text in the view document (normally body element)
66
+ */
67
+ export declare class Mapper {
68
+ readonly head: Element;
69
+ readonly body: Element;
70
+ /**
71
+ * Maps Face.src to an entry for an already-loaded font.
72
+ */
73
+ srcURLMap: {
74
+ [key: string]: TaskUtil.Fetcher<Face>;
75
+ };
76
+ familyPrefix: string;
77
+ familyCounter: number;
78
+ constructor(head: Element, body: Element, opt_familyPrefix?: string);
79
+ getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string;
80
+ /**
81
+ * @param fontBytes deobfuscated font bytes (if deobfuscation is needed)
82
+ */
83
+ private initFont;
84
+ loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher<Face>;
85
+ findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result<boolean>;
86
+ waitFontLoading(): Task.Result<boolean>;
87
+ }
@@ -1,41 +1,41 @@
1
- import * as Css from "./css";
2
- import * as PageFloats from "./page-floats";
3
- import * as Task from "./task";
4
- import * as Vtree from "./vtree";
5
- import { Layout } from "./types";
6
- declare const PageFloatFragment: typeof PageFloats.PageFloatFragment;
7
- export declare class Footnote extends PageFloats.PageFloat {
8
- readonly footnotePolicy: Css.Ident | null;
9
- constructor(nodePosition: Vtree.NodePosition, floatReference: PageFloats.FloatReference, flowName: string, footnotePolicy: Css.Ident | null, floatMinWrapBlock: Css.Numeric | null);
10
- isAllowedToPrecede(other: PageFloats.PageFloat): boolean;
11
- }
12
- /**
13
- * @extends PageFloatFragment
14
- */
15
- export declare class FootnoteFragment extends PageFloatFragment {
16
- constructor(floatReference: PageFloats.FloatReference, continuations: PageFloats.PageFloatContinuation[], area: Vtree.Container, continues: boolean);
17
- getOrder(): number;
18
- shouldBeStashedBefore(float: PageFloats.PageFloat): boolean;
19
- }
20
- export declare class LineFootnotePolicyLayoutConstraint implements Layout.LayoutConstraint {
21
- readonly footnote: Footnote;
22
- constructor(footnote: Footnote);
23
- allowLayout(nodeContext: Vtree.NodeContext): boolean;
24
- }
25
- export declare class FootnoteLayoutStrategy implements PageFloats.PageFloatLayoutStrategy {
26
- /** @override */
27
- appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean;
28
- /** @override */
29
- appliesToFloat(float: PageFloats.PageFloat): boolean;
30
- /** @override */
31
- createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext, column: Layout.Column): Task.Result<PageFloats.PageFloat>;
32
- /** @override */
33
- createPageFloatFragment(continuations: PageFloats.PageFloatContinuation[], floatSide: string, floatArea: Layout.PageFloatArea, continues: boolean): PageFloats.PageFloatFragment;
34
- /** @override */
35
- findPageFloatFragment(float: PageFloats.PageFloat, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext): PageFloats.PageFloatFragment | null;
36
- /** @override */
37
- adjustPageFloatArea(floatArea: Layout.PageFloatArea, floatContainer: Vtree.Container, column: Layout.Column): void;
38
- /** @override */
39
- forbid(float: PageFloats.PageFloat, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext): void;
40
- }
41
- export {};
1
+ import * as Css from "./css";
2
+ import * as PageFloats from "./page-floats";
3
+ import * as Task from "./task";
4
+ import * as Vtree from "./vtree";
5
+ import { Layout } from "./types";
6
+ declare const PageFloatFragment: typeof PageFloats.PageFloatFragment;
7
+ export declare class Footnote extends PageFloats.PageFloat {
8
+ readonly footnotePolicy: Css.Ident | null;
9
+ constructor(nodePosition: Vtree.NodePosition, floatReference: PageFloats.FloatReference, flowName: string, footnotePolicy: Css.Ident | null, floatMinWrapBlock: Css.Numeric | null);
10
+ isAllowedToPrecede(other: PageFloats.PageFloat): boolean;
11
+ }
12
+ /**
13
+ * @extends PageFloatFragment
14
+ */
15
+ export declare class FootnoteFragment extends PageFloatFragment {
16
+ constructor(floatReference: PageFloats.FloatReference, continuations: PageFloats.PageFloatContinuation[], area: Vtree.Container, continues: boolean);
17
+ getOrder(): number;
18
+ shouldBeStashedBefore(float: PageFloats.PageFloat): boolean;
19
+ }
20
+ export declare class LineFootnotePolicyLayoutConstraint implements Layout.LayoutConstraint {
21
+ readonly footnote: Footnote;
22
+ constructor(footnote: Footnote);
23
+ allowLayout(nodeContext: Vtree.NodeContext): boolean;
24
+ }
25
+ export declare class FootnoteLayoutStrategy implements PageFloats.PageFloatLayoutStrategy {
26
+ /** @override */
27
+ appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean;
28
+ /** @override */
29
+ appliesToFloat(float: PageFloats.PageFloat): boolean;
30
+ /** @override */
31
+ createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext, column: Layout.Column): Task.Result<PageFloats.PageFloat>;
32
+ /** @override */
33
+ createPageFloatFragment(continuations: PageFloats.PageFloatContinuation[], floatSide: string, floatArea: Layout.PageFloatArea, continues: boolean): PageFloats.PageFloatFragment;
34
+ /** @override */
35
+ findPageFloatFragment(float: PageFloats.PageFloat, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext): PageFloats.PageFloatFragment | null;
36
+ /** @override */
37
+ adjustPageFloatArea(floatArea: Layout.PageFloatArea, floatContainer: Vtree.Container, column: Layout.Column): void;
38
+ /** @override */
39
+ forbid(float: PageFloats.PageFloat, pageFloatLayoutContext: PageFloats.PageFloatLayoutContext): void;
40
+ }
41
+ export {};
@@ -1,110 +1,110 @@
1
- export declare class Rect {
2
- x1: number;
3
- y1: number;
4
- x2: number;
5
- y2: number;
6
- constructor(x1: number, y1: number, x2: number, y2: number);
7
- }
8
- export declare class Point {
9
- x: number;
10
- y: number;
11
- constructor(x: number, y: number);
12
- }
13
- export declare class Insets {
14
- left: number;
15
- top: number;
16
- right: number;
17
- bottom: number;
18
- constructor(left: number, top: number, right: number, bottom: number);
19
- }
20
- export declare class Segment {
21
- low: Point;
22
- high: Point;
23
- winding: number;
24
- shapeId: number;
25
- constructor(low: Point, high: Point, winding: number, shapeId: number);
26
- }
27
- /**
28
- * A single band for exclusion result. Left float is from the left box edge
29
- * to x1. Right float is from x2 to the right box edge.
30
- */
31
- export declare class Band {
32
- y1: number;
33
- y2: number;
34
- x1: number;
35
- x2: number;
36
- /** Left float. */
37
- left: Element | null;
38
- /** Right float. */
39
- right: Element | null;
40
- constructor(y1: number, y2: number, x1: number, x2: number);
41
- }
42
- export declare function segmentCompare(s1: Segment, s2: Segment): number;
43
- export declare class Shape {
44
- points: Point[];
45
- constructor(points: Point[]);
46
- /**
47
- * Converts this shape to a sequence of Segments and adds segments to the
48
- * given array.
49
- * @param arr array to add segments.
50
- * @param id shapeId to write into segments.
51
- */
52
- addSegments(arr: Segment[], id: number): void;
53
- withOffset(offsetX: number, offsetY: number): Shape;
54
- }
55
- export declare function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape;
56
- export declare function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape;
57
- export declare function shapeForRectObj(r: Rect): Shape;
58
- export declare class BandIntersection {
59
- x: number;
60
- winding: number;
61
- shapeId: number;
62
- lowOrHigh: number;
63
- constructor(x: number, winding: number, shapeId: number, lowOrHigh: number);
64
- }
65
- export declare function intersectY(s: Segment, y: number): number;
66
- export declare function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void;
67
- export declare function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[];
68
- /**
69
- * Round v up to make it a multiple of unit. If unit is zero, return v.
70
- */
71
- export declare function ceil(v: number, unit: number): number;
72
- /**
73
- * Round v down to make it a multiple of unit. If unit is zero, return v.
74
- */
75
- export declare function floor(v: number, unit: number): number;
76
- export declare function rotatePoint(point: Point): Point;
77
- /**
78
- * Vertical box to pseudo-horizontal coords.
79
- */
80
- export declare function rotateBox(box: Rect): Rect;
81
- /**
82
- * Pseudo-horizontal coords to vertical.
83
- */
84
- export declare function unrotateBox(box: Rect): Rect;
85
- export declare function rotateShape(shape: Shape): Shape;
86
- export declare function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[];
87
- export declare function normalize(box: Rect, bands: Band[]): void;
88
- /**
89
- * Find the index of the bottommost band so that y < band.y2
90
- */
91
- export declare function findBand(bands: Band[], y: number): number;
92
- /**
93
- * Find the uppermost rectangle contained in the specified rect which occupies
94
- * full width of the rect without overlapping with any band in the specified
95
- * bands.
96
- * @returns Returns null if such rectangle does not exist.
97
- */
98
- export declare function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null;
99
- /**
100
- * Find the bottommost rectangle contained in the specified rect which occupies
101
- * full width of the rect without overlapping with any band in the specified
102
- * bands.
103
- * @returns Returns null if such rectangle does not exist.
104
- */
105
- export declare function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null;
106
- /**
107
- * @param side either "left" or "right"
108
- */
109
- export declare function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean;
110
- export declare function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void;
1
+ export declare class Rect {
2
+ x1: number;
3
+ y1: number;
4
+ x2: number;
5
+ y2: number;
6
+ constructor(x1: number, y1: number, x2: number, y2: number);
7
+ }
8
+ export declare class Point {
9
+ x: number;
10
+ y: number;
11
+ constructor(x: number, y: number);
12
+ }
13
+ export declare class Insets {
14
+ left: number;
15
+ top: number;
16
+ right: number;
17
+ bottom: number;
18
+ constructor(left: number, top: number, right: number, bottom: number);
19
+ }
20
+ export declare class Segment {
21
+ low: Point;
22
+ high: Point;
23
+ winding: number;
24
+ shapeId: number;
25
+ constructor(low: Point, high: Point, winding: number, shapeId: number);
26
+ }
27
+ /**
28
+ * A single band for exclusion result. Left float is from the left box edge
29
+ * to x1. Right float is from x2 to the right box edge.
30
+ */
31
+ export declare class Band {
32
+ y1: number;
33
+ y2: number;
34
+ x1: number;
35
+ x2: number;
36
+ /** Left float. */
37
+ left: Element | null;
38
+ /** Right float. */
39
+ right: Element | null;
40
+ constructor(y1: number, y2: number, x1: number, x2: number);
41
+ }
42
+ export declare function segmentCompare(s1: Segment, s2: Segment): number;
43
+ export declare class Shape {
44
+ points: Point[];
45
+ constructor(points: Point[]);
46
+ /**
47
+ * Converts this shape to a sequence of Segments and adds segments to the
48
+ * given array.
49
+ * @param arr array to add segments.
50
+ * @param id shapeId to write into segments.
51
+ */
52
+ addSegments(arr: Segment[], id: number): void;
53
+ withOffset(offsetX: number, offsetY: number): Shape;
54
+ }
55
+ export declare function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape;
56
+ export declare function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape;
57
+ export declare function shapeForRectObj(r: Rect): Shape;
58
+ export declare class BandIntersection {
59
+ x: number;
60
+ winding: number;
61
+ shapeId: number;
62
+ lowOrHigh: number;
63
+ constructor(x: number, winding: number, shapeId: number, lowOrHigh: number);
64
+ }
65
+ export declare function intersectY(s: Segment, y: number): number;
66
+ export declare function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void;
67
+ export declare function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[];
68
+ /**
69
+ * Round v up to make it a multiple of unit. If unit is zero, return v.
70
+ */
71
+ export declare function ceil(v: number, unit: number): number;
72
+ /**
73
+ * Round v down to make it a multiple of unit. If unit is zero, return v.
74
+ */
75
+ export declare function floor(v: number, unit: number): number;
76
+ export declare function rotatePoint(point: Point): Point;
77
+ /**
78
+ * Vertical box to pseudo-horizontal coords.
79
+ */
80
+ export declare function rotateBox(box: Rect): Rect;
81
+ /**
82
+ * Pseudo-horizontal coords to vertical.
83
+ */
84
+ export declare function unrotateBox(box: Rect): Rect;
85
+ export declare function rotateShape(shape: Shape): Shape;
86
+ export declare function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[];
87
+ export declare function normalize(box: Rect, bands: Band[]): void;
88
+ /**
89
+ * Find the index of the bottommost band so that y < band.y2
90
+ */
91
+ export declare function findBand(bands: Band[], y: number): number;
92
+ /**
93
+ * Find the uppermost rectangle contained in the specified rect which occupies
94
+ * full width of the rect without overlapping with any band in the specified
95
+ * bands.
96
+ * @returns Returns null if such rectangle does not exist.
97
+ */
98
+ export declare function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null;
99
+ /**
100
+ * Find the bottommost rectangle contained in the specified rect which occupies
101
+ * full width of the rect without overlapping with any band in the specified
102
+ * bands.
103
+ * @returns Returns null if such rectangle does not exist.
104
+ */
105
+ export declare function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null;
106
+ /**
107
+ * @param side either "left" or "right"
108
+ */
109
+ export declare function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean;
110
+ export declare function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void;
@@ -1,15 +1,16 @@
1
- import { Layout, Vtree } from "./types";
2
- /**
3
- * Calculate the position of the "after" edge in the block-progression
4
- * dimension. Return 0 if position was determined successfully and return
5
- * non-zero if position could not be determined and the node should be
6
- * considered zero-height.
7
- */
8
- export declare function calculateEdge(nodeContext: Vtree.NodeContext, clientLayout: Vtree.ClientLayout, extraOffset: number, vertical: boolean): number;
9
- export declare function getElementHeight(element: Element, column: Layout.Column, vertical: boolean): number;
10
- export declare function isOrphan(node: Node): boolean;
11
- export declare function removeFollowingSiblings(parentNode: Node, viewNode: Node): void;
12
- export declare function isSpecial(e: Element): boolean;
13
- export declare function isSpecialNodeContext(nodeContext: Vtree.NodeContext): boolean;
14
- export declare function isSpecialInlineDisplay(display: string): boolean;
15
- export declare function findAncestorSpecialInlineNodeContext(nodeContext: Vtree.NodeContext): Vtree.NodeContext | null;
1
+ import { Layout, Vtree } from "./types";
2
+ /**
3
+ * Calculate the position of the "after" edge in the block-progression
4
+ * dimension. Return 0 if position was determined successfully and return
5
+ * non-zero if position could not be determined and the node should be
6
+ * considered zero-height.
7
+ */
8
+ export declare function calculateEdge(nodeContext: Vtree.NodeContext, clientLayout: Vtree.ClientLayout, extraOffset: number, vertical: boolean): number;
9
+ export declare function getElementHeight(element: Element, column: Layout.Column, vertical: boolean): number;
10
+ export declare function isOrphan(node: Node): boolean;
11
+ export declare function removeFollowingSiblings(parentNode: Node, viewNode: Node): void;
12
+ export declare function isSpecial(e: Element): boolean;
13
+ export declare function isOutOfFlow(node: Node): boolean;
14
+ export declare function isSpecialNodeContext(nodeContext: Vtree.NodeContext): boolean;
15
+ export declare function isSpecialInlineDisplay(display: string): boolean;
16
+ export declare function findAncestorSpecialInlineNodeContext(nodeContext: Vtree.NodeContext): Vtree.NodeContext | null;