@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.
- package/lib/vivliostyle/adaptive-viewer.d.ts +167 -167
- package/lib/vivliostyle/asserts.d.ts +21 -21
- package/lib/vivliostyle/assets.d.ts +35 -35
- package/lib/vivliostyle/base.d.ts +189 -189
- package/lib/vivliostyle/break-position.d.ts +39 -39
- package/lib/vivliostyle/break.d.ts +112 -112
- package/lib/vivliostyle/cfi.d.ts +77 -77
- package/lib/vivliostyle/columns.d.ts +52 -52
- package/lib/vivliostyle/constants.d.ts +53 -53
- package/lib/vivliostyle/core-viewer.d.ts +240 -240
- package/lib/vivliostyle/counters.d.ts +127 -127
- package/lib/vivliostyle/css-cascade.d.ts +974 -954
- package/lib/vivliostyle/css-logical-util.d.ts +3 -3
- package/lib/vivliostyle/css-page.d.ts +451 -451
- package/lib/vivliostyle/css-parser.d.ts +320 -320
- package/lib/vivliostyle/css-prop.d.ts +74 -74
- package/lib/vivliostyle/css-styler.d.ts +210 -210
- package/lib/vivliostyle/css-tokenizer.d.ts +243 -243
- package/lib/vivliostyle/css-validator.d.ts +319 -319
- package/lib/vivliostyle/css.d.ts +205 -205
- package/lib/vivliostyle/diff.d.ts +26 -26
- package/lib/vivliostyle/display.d.ts +62 -57
- package/lib/vivliostyle/epub.d.ts +329 -329
- package/lib/vivliostyle/exprs.d.ts +395 -395
- package/lib/vivliostyle/font.d.ts +87 -87
- package/lib/vivliostyle/footnotes.d.ts +41 -41
- package/lib/vivliostyle/geometry-util.d.ts +110 -110
- package/lib/vivliostyle/layout-helper.d.ts +16 -15
- package/lib/vivliostyle/layout-processor.d.ts +73 -73
- package/lib/vivliostyle/layout-retryers.d.ts +21 -21
- package/lib/vivliostyle/layout-util.d.ts +55 -55
- package/lib/vivliostyle/layout.d.ts +456 -456
- package/lib/vivliostyle/logging.d.ts +56 -56
- package/lib/vivliostyle/matchers.d.ts +36 -36
- package/lib/vivliostyle/math-util.d.ts +22 -22
- package/lib/vivliostyle/net.d.ts +72 -72
- package/lib/vivliostyle/ops.d.ts +263 -263
- package/lib/vivliostyle/page-floats.d.ts +178 -178
- package/lib/vivliostyle/page-master.d.ts +247 -247
- package/lib/vivliostyle/plugin.d.ts +172 -172
- package/lib/vivliostyle/print.d.ts +7 -7
- package/lib/vivliostyle/profile.d.ts +59 -59
- package/lib/vivliostyle/pseudo-element.d.ts +32 -32
- package/lib/vivliostyle/repetitive-element.d.ts +162 -162
- package/lib/vivliostyle/scripts.d.ts +15 -15
- package/lib/vivliostyle/sha1.d.ts +33 -33
- package/lib/vivliostyle/shared.d.ts +24 -24
- package/lib/vivliostyle/sizing.d.ts +29 -29
- package/lib/vivliostyle/table.d.ts +263 -263
- package/lib/vivliostyle/task-util.d.ts +37 -37
- package/lib/vivliostyle/task.d.ts +357 -357
- package/lib/vivliostyle/text-polyfill.d.ts +3 -3
- package/lib/vivliostyle/toc.d.ts +64 -64
- package/lib/vivliostyle/types.d.ts +977 -977
- package/lib/vivliostyle/urls.d.ts +25 -25
- package/lib/vivliostyle/vgen.d.ts +213 -213
- package/lib/vivliostyle/viewer-app.d.ts +19 -19
- package/lib/vivliostyle/vtree.d.ts +392 -392
- package/lib/vivliostyle/xml-doc.d.ts +88 -88
- package/lib/vivliostyle.d.ts +6 -6
- package/lib/vivliostyle.js +1 -1
- package/lib/vivliostyle.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,189 +1,189 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RegExp pattern for ::first-letter pseudo element:
|
|
3
|
-
* https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
|
|
4
|
-
*/
|
|
5
|
-
export declare const firstLetterPattern: RegExp;
|
|
6
|
-
/**
|
|
7
|
-
* Indicates the offset position of an element in a document
|
|
8
|
-
*/
|
|
9
|
-
export declare const ELEMENT_OFFSET_ATTR = "data-adapt-eloff";
|
|
10
|
-
export declare let emptyObj: {};
|
|
11
|
-
export type JSON = any;
|
|
12
|
-
export declare function jsonToString(json: JSON): string;
|
|
13
|
-
export declare function stringToJSON(str: string): JSON;
|
|
14
|
-
export declare function stripFragment(url: string): string;
|
|
15
|
-
export declare function stripFragmentAndQuery(url: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Base URL relative to which URLs of resources are resolved.
|
|
18
|
-
*/
|
|
19
|
-
export declare let baseURL: string;
|
|
20
|
-
export declare function setBaseURL(value: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Base URL relative to which URLs of resources such as validation.txt and
|
|
23
|
-
* user-agent.css are resolved.
|
|
24
|
-
*/
|
|
25
|
-
export declare let resourceBaseURL: string;
|
|
26
|
-
export declare function setResourceBaseURL(value: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* @param relURL relative URL
|
|
29
|
-
* @param baseURL base (absolute) URL
|
|
30
|
-
* @return resolved (absolute) URL
|
|
31
|
-
*/
|
|
32
|
-
export declare function resolveURL(relURL: string, baseURL: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* @return converted URL
|
|
35
|
-
*/
|
|
36
|
-
export declare function convertSpecialURL(url: string): string;
|
|
37
|
-
export interface DocumentURLTransformer {
|
|
38
|
-
transformFragment(fragment: string, baseURL: string): string;
|
|
39
|
-
transformURL(url: string, baseURL: string): string;
|
|
40
|
-
restoreURL(encoded: string): string[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Various namespaces.
|
|
44
|
-
* @enum {string}
|
|
45
|
-
*/
|
|
46
|
-
export declare enum NS {
|
|
47
|
-
epub = "http://www.idpf.org/2007/ops",
|
|
48
|
-
EV = "http://www.w3.org/2001/xml-events",
|
|
49
|
-
MATHML = "http://www.w3.org/1998/Math/MathML",
|
|
50
|
-
XML = "http://www.w3.org/XML/1998/namespace",
|
|
51
|
-
XHTML = "http://www.w3.org/1999/xhtml",
|
|
52
|
-
XLINK = "http://www.w3.org/1999/xlink",
|
|
53
|
-
SHADOW = "http://www.pyroxy.com/ns/shadow",
|
|
54
|
-
SVG = "http://www.w3.org/2000/svg",
|
|
55
|
-
DC = "http://purl.org/dc/elements/1.1/",
|
|
56
|
-
NCX = "http://www.daisy.org/z3986/2005/ncx/"
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @param name parameter name
|
|
60
|
-
* @param opt_url URL; window.location.href is used if not provided
|
|
61
|
-
* @return parameter value
|
|
62
|
-
*/
|
|
63
|
-
export declare function getURLParam(name: string, opt_url?: string): string | null;
|
|
64
|
-
/**
|
|
65
|
-
* @param name parameter name
|
|
66
|
-
* @param value parameter value
|
|
67
|
-
* @return new url
|
|
68
|
-
*/
|
|
69
|
-
export declare function setURLParam(url: string, name: string, value: string): string;
|
|
70
|
-
export declare function asString(v: any): string | null;
|
|
71
|
-
export interface Comparable {
|
|
72
|
-
/**
|
|
73
|
-
* @return -1 when this less then other, 0 when this equals other
|
|
74
|
-
*/
|
|
75
|
-
compare(other: Comparable): number;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A priority queue.
|
|
79
|
-
*/
|
|
80
|
-
export declare class PriorityQueue {
|
|
81
|
-
queue: Comparable[];
|
|
82
|
-
length(): number;
|
|
83
|
-
add(item: Comparable): void;
|
|
84
|
-
/**
|
|
85
|
-
* @return highest priority Comparable.
|
|
86
|
-
*/
|
|
87
|
-
peek(): Comparable;
|
|
88
|
-
/**
|
|
89
|
-
* Remove the highest-priority item from the queue.
|
|
90
|
-
* @return removed item.
|
|
91
|
-
*/
|
|
92
|
-
remove(): Comparable;
|
|
93
|
-
}
|
|
94
|
-
export declare const knownPrefixes: string[];
|
|
95
|
-
export declare const propNameMap: {
|
|
96
|
-
[key: string]: string[];
|
|
97
|
-
};
|
|
98
|
-
export declare function checkIfPropertySupported(prefix: string, prop: string): boolean;
|
|
99
|
-
export declare function getPrefixedPropertyNames(prop: string): string[] | null;
|
|
100
|
-
export declare function setCSSProperty(elem: Element, prop: string, value: string): void;
|
|
101
|
-
export declare function getCSSProperty(elem: Element, prop: string, opt_value?: string): string;
|
|
102
|
-
export declare function getLangAttribute(element: Element): string;
|
|
103
|
-
export declare class StringBuffer {
|
|
104
|
-
list: string[];
|
|
105
|
-
append(str: string): StringBuffer;
|
|
106
|
-
clear(): void;
|
|
107
|
-
/** @override */
|
|
108
|
-
toString(): string;
|
|
109
|
-
}
|
|
110
|
-
export declare function escapeChar(str: string): string;
|
|
111
|
-
export declare function escapeCSSIdent(name: string): string;
|
|
112
|
-
export declare function escapeCSSStr(str: string): string;
|
|
113
|
-
export declare function lightURLEncode(str: string): string;
|
|
114
|
-
export declare function isLetter(ch: string): boolean;
|
|
115
|
-
export declare function escapeCharToHex(str: string, prefix?: string): string;
|
|
116
|
-
export declare function escapeNameStrToHex(str: string, prefix?: string): string;
|
|
117
|
-
export declare function escapeRegExp(str: string): string;
|
|
118
|
-
export declare function unescapeCharFromHex(str: string, prefix?: string): string;
|
|
119
|
-
export declare function unescapeStrFromHex(str: string, prefix?: string): string;
|
|
120
|
-
/**
|
|
121
|
-
* Function good is defined for ints from 0 to high-1. It is such that for
|
|
122
|
-
* each i between 1 and high-1 !good(i-1) || good(i) is true. In other words,
|
|
123
|
-
* it goes like false ... false true ... true.
|
|
124
|
-
* Find i such that (i == 0 || !good(i-1)) && (i == h || good(i))
|
|
125
|
-
* In other words, good(i) is the "first" good = true.
|
|
126
|
-
*/
|
|
127
|
-
export declare function binarySearch(high: number, good: (p1: number) => boolean): number;
|
|
128
|
-
/**
|
|
129
|
-
* Function to sort numbers low to high
|
|
130
|
-
*/
|
|
131
|
-
export declare function numberCompare(a: number, b: number): number;
|
|
132
|
-
export declare const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
133
|
-
export declare function appendBase64(sb: StringBuffer, data: string): void;
|
|
134
|
-
/**
|
|
135
|
-
* Index array using key function. First encountered item wins on collision.
|
|
136
|
-
* Elements with empty and null keys are dropped.
|
|
137
|
-
*/
|
|
138
|
-
export declare function indexArray<T>(arr: T[], key: (p1: T) => string | null): {
|
|
139
|
-
[key: string]: T;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Convert array of strings to an object with the values in the array set to
|
|
143
|
-
* true.
|
|
144
|
-
*/
|
|
145
|
-
export declare function arrayToSet(arr: string[]): {
|
|
146
|
-
[key: string]: boolean;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Index array using key function. Repeated indices are all combined into
|
|
150
|
-
* arrays. Elements with empty and null keys are dropped. Ordering of the
|
|
151
|
-
* elements in arrays is preserved.
|
|
152
|
-
*/
|
|
153
|
-
export declare function multiIndexArray<T>(arr: T[], key: (p1: T) => string | null): {
|
|
154
|
-
[key: string]: T[];
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Apply function to each value of the object
|
|
158
|
-
* @param fn second parameter is the key
|
|
159
|
-
*/
|
|
160
|
-
export declare function mapObj<P, R>(obj: {
|
|
161
|
-
[key: string]: P;
|
|
162
|
-
}, fn: (p1: P, p2: string) => R): {
|
|
163
|
-
[key: string]: R;
|
|
164
|
-
};
|
|
165
|
-
export declare function mapSize(obj: object): number;
|
|
166
|
-
export type Event = {
|
|
167
|
-
type: string;
|
|
168
|
-
target?: any;
|
|
169
|
-
currentTarget?: any;
|
|
170
|
-
preventDefault?: any;
|
|
171
|
-
newPage?: any;
|
|
172
|
-
anchorElement?: any;
|
|
173
|
-
href?: any;
|
|
174
|
-
content?: any;
|
|
175
|
-
};
|
|
176
|
-
export type EventListener = (p1: Event) => void;
|
|
177
|
-
/**
|
|
178
|
-
* Extemely simple-minded EventTarget implementation. Consider using
|
|
179
|
-
* goog.events.EventTarget if you are using Closure library.
|
|
180
|
-
*/
|
|
181
|
-
export declare class SimpleEventTarget {
|
|
182
|
-
listeners: {
|
|
183
|
-
[key: string]: EventListener[];
|
|
184
|
-
};
|
|
185
|
-
dispatchEvent(evt: Event): void;
|
|
186
|
-
addEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
187
|
-
removeEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
188
|
-
}
|
|
189
|
-
export type EventTarget = SimpleEventTarget;
|
|
1
|
+
/**
|
|
2
|
+
* RegExp pattern for ::first-letter pseudo element:
|
|
3
|
+
* https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
|
|
4
|
+
*/
|
|
5
|
+
export declare const firstLetterPattern: RegExp;
|
|
6
|
+
/**
|
|
7
|
+
* Indicates the offset position of an element in a document
|
|
8
|
+
*/
|
|
9
|
+
export declare const ELEMENT_OFFSET_ATTR = "data-adapt-eloff";
|
|
10
|
+
export declare let emptyObj: {};
|
|
11
|
+
export type JSON = any;
|
|
12
|
+
export declare function jsonToString(json: JSON): string;
|
|
13
|
+
export declare function stringToJSON(str: string): JSON;
|
|
14
|
+
export declare function stripFragment(url: string): string;
|
|
15
|
+
export declare function stripFragmentAndQuery(url: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Base URL relative to which URLs of resources are resolved.
|
|
18
|
+
*/
|
|
19
|
+
export declare let baseURL: string;
|
|
20
|
+
export declare function setBaseURL(value: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Base URL relative to which URLs of resources such as validation.txt and
|
|
23
|
+
* user-agent.css are resolved.
|
|
24
|
+
*/
|
|
25
|
+
export declare let resourceBaseURL: string;
|
|
26
|
+
export declare function setResourceBaseURL(value: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* @param relURL relative URL
|
|
29
|
+
* @param baseURL base (absolute) URL
|
|
30
|
+
* @return resolved (absolute) URL
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveURL(relURL: string, baseURL: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* @return converted URL
|
|
35
|
+
*/
|
|
36
|
+
export declare function convertSpecialURL(url: string): string;
|
|
37
|
+
export interface DocumentURLTransformer {
|
|
38
|
+
transformFragment(fragment: string, baseURL: string): string;
|
|
39
|
+
transformURL(url: string, baseURL: string): string;
|
|
40
|
+
restoreURL(encoded: string): string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Various namespaces.
|
|
44
|
+
* @enum {string}
|
|
45
|
+
*/
|
|
46
|
+
export declare enum NS {
|
|
47
|
+
epub = "http://www.idpf.org/2007/ops",
|
|
48
|
+
EV = "http://www.w3.org/2001/xml-events",
|
|
49
|
+
MATHML = "http://www.w3.org/1998/Math/MathML",
|
|
50
|
+
XML = "http://www.w3.org/XML/1998/namespace",
|
|
51
|
+
XHTML = "http://www.w3.org/1999/xhtml",
|
|
52
|
+
XLINK = "http://www.w3.org/1999/xlink",
|
|
53
|
+
SHADOW = "http://www.pyroxy.com/ns/shadow",
|
|
54
|
+
SVG = "http://www.w3.org/2000/svg",
|
|
55
|
+
DC = "http://purl.org/dc/elements/1.1/",
|
|
56
|
+
NCX = "http://www.daisy.org/z3986/2005/ncx/"
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @param name parameter name
|
|
60
|
+
* @param opt_url URL; window.location.href is used if not provided
|
|
61
|
+
* @return parameter value
|
|
62
|
+
*/
|
|
63
|
+
export declare function getURLParam(name: string, opt_url?: string): string | null;
|
|
64
|
+
/**
|
|
65
|
+
* @param name parameter name
|
|
66
|
+
* @param value parameter value
|
|
67
|
+
* @return new url
|
|
68
|
+
*/
|
|
69
|
+
export declare function setURLParam(url: string, name: string, value: string): string;
|
|
70
|
+
export declare function asString(v: any): string | null;
|
|
71
|
+
export interface Comparable {
|
|
72
|
+
/**
|
|
73
|
+
* @return -1 when this less then other, 0 when this equals other
|
|
74
|
+
*/
|
|
75
|
+
compare(other: Comparable): number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A priority queue.
|
|
79
|
+
*/
|
|
80
|
+
export declare class PriorityQueue {
|
|
81
|
+
queue: Comparable[];
|
|
82
|
+
length(): number;
|
|
83
|
+
add(item: Comparable): void;
|
|
84
|
+
/**
|
|
85
|
+
* @return highest priority Comparable.
|
|
86
|
+
*/
|
|
87
|
+
peek(): Comparable;
|
|
88
|
+
/**
|
|
89
|
+
* Remove the highest-priority item from the queue.
|
|
90
|
+
* @return removed item.
|
|
91
|
+
*/
|
|
92
|
+
remove(): Comparable;
|
|
93
|
+
}
|
|
94
|
+
export declare const knownPrefixes: string[];
|
|
95
|
+
export declare const propNameMap: {
|
|
96
|
+
[key: string]: string[];
|
|
97
|
+
};
|
|
98
|
+
export declare function checkIfPropertySupported(prefix: string, prop: string): boolean;
|
|
99
|
+
export declare function getPrefixedPropertyNames(prop: string): string[] | null;
|
|
100
|
+
export declare function setCSSProperty(elem: Element, prop: string, value: string): void;
|
|
101
|
+
export declare function getCSSProperty(elem: Element, prop: string, opt_value?: string): string;
|
|
102
|
+
export declare function getLangAttribute(element: Element): string;
|
|
103
|
+
export declare class StringBuffer {
|
|
104
|
+
list: string[];
|
|
105
|
+
append(str: string): StringBuffer;
|
|
106
|
+
clear(): void;
|
|
107
|
+
/** @override */
|
|
108
|
+
toString(): string;
|
|
109
|
+
}
|
|
110
|
+
export declare function escapeChar(str: string): string;
|
|
111
|
+
export declare function escapeCSSIdent(name: string): string;
|
|
112
|
+
export declare function escapeCSSStr(str: string): string;
|
|
113
|
+
export declare function lightURLEncode(str: string): string;
|
|
114
|
+
export declare function isLetter(ch: string): boolean;
|
|
115
|
+
export declare function escapeCharToHex(str: string, prefix?: string): string;
|
|
116
|
+
export declare function escapeNameStrToHex(str: string, prefix?: string): string;
|
|
117
|
+
export declare function escapeRegExp(str: string): string;
|
|
118
|
+
export declare function unescapeCharFromHex(str: string, prefix?: string): string;
|
|
119
|
+
export declare function unescapeStrFromHex(str: string, prefix?: string): string;
|
|
120
|
+
/**
|
|
121
|
+
* Function good is defined for ints from 0 to high-1. It is such that for
|
|
122
|
+
* each i between 1 and high-1 !good(i-1) || good(i) is true. In other words,
|
|
123
|
+
* it goes like false ... false true ... true.
|
|
124
|
+
* Find i such that (i == 0 || !good(i-1)) && (i == h || good(i))
|
|
125
|
+
* In other words, good(i) is the "first" good = true.
|
|
126
|
+
*/
|
|
127
|
+
export declare function binarySearch(high: number, good: (p1: number) => boolean): number;
|
|
128
|
+
/**
|
|
129
|
+
* Function to sort numbers low to high
|
|
130
|
+
*/
|
|
131
|
+
export declare function numberCompare(a: number, b: number): number;
|
|
132
|
+
export declare const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
133
|
+
export declare function appendBase64(sb: StringBuffer, data: string): void;
|
|
134
|
+
/**
|
|
135
|
+
* Index array using key function. First encountered item wins on collision.
|
|
136
|
+
* Elements with empty and null keys are dropped.
|
|
137
|
+
*/
|
|
138
|
+
export declare function indexArray<T>(arr: T[], key: (p1: T) => string | null): {
|
|
139
|
+
[key: string]: T;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Convert array of strings to an object with the values in the array set to
|
|
143
|
+
* true.
|
|
144
|
+
*/
|
|
145
|
+
export declare function arrayToSet(arr: string[]): {
|
|
146
|
+
[key: string]: boolean;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Index array using key function. Repeated indices are all combined into
|
|
150
|
+
* arrays. Elements with empty and null keys are dropped. Ordering of the
|
|
151
|
+
* elements in arrays is preserved.
|
|
152
|
+
*/
|
|
153
|
+
export declare function multiIndexArray<T>(arr: T[], key: (p1: T) => string | null): {
|
|
154
|
+
[key: string]: T[];
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Apply function to each value of the object
|
|
158
|
+
* @param fn second parameter is the key
|
|
159
|
+
*/
|
|
160
|
+
export declare function mapObj<P, R>(obj: {
|
|
161
|
+
[key: string]: P;
|
|
162
|
+
}, fn: (p1: P, p2: string) => R): {
|
|
163
|
+
[key: string]: R;
|
|
164
|
+
};
|
|
165
|
+
export declare function mapSize(obj: object): number;
|
|
166
|
+
export type Event = {
|
|
167
|
+
type: string;
|
|
168
|
+
target?: any;
|
|
169
|
+
currentTarget?: any;
|
|
170
|
+
preventDefault?: any;
|
|
171
|
+
newPage?: any;
|
|
172
|
+
anchorElement?: any;
|
|
173
|
+
href?: any;
|
|
174
|
+
content?: any;
|
|
175
|
+
};
|
|
176
|
+
export type EventListener = (p1: Event) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Extemely simple-minded EventTarget implementation. Consider using
|
|
179
|
+
* goog.events.EventTarget if you are using Closure library.
|
|
180
|
+
*/
|
|
181
|
+
export declare class SimpleEventTarget {
|
|
182
|
+
listeners: {
|
|
183
|
+
[key: string]: EventListener[];
|
|
184
|
+
};
|
|
185
|
+
dispatchEvent(evt: Event): void;
|
|
186
|
+
addEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
187
|
+
removeEventListener(type: string, listener: EventListener, capture?: boolean): void;
|
|
188
|
+
}
|
|
189
|
+
export type EventTarget = SimpleEventTarget;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Layout, RepetitiveElement, Vtree } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Potential breaking position.
|
|
4
|
-
*/
|
|
5
|
-
export type BreakPosition = Layout.BreakPosition;
|
|
6
|
-
export declare abstract class AbstractBreakPosition implements Layout.AbstractBreakPosition {
|
|
7
|
-
abstract findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext;
|
|
8
|
-
abstract getMinBreakPenalty(): number;
|
|
9
|
-
calculateOffset(column: any): {
|
|
10
|
-
current: number;
|
|
11
|
-
minimum: number;
|
|
12
|
-
};
|
|
13
|
-
/** @override */
|
|
14
|
-
breakPositionChosen(column: Layout.Column): void;
|
|
15
|
-
getNodeContext(): Vtree.NodeContext;
|
|
16
|
-
}
|
|
17
|
-
export declare function calculateOffset(nodeContext: Vtree.NodeContext, elementsOffsets: RepetitiveElement.ElementsOffset[]): {
|
|
18
|
-
current: number;
|
|
19
|
-
minimum: number;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Potential edge breaking position.
|
|
23
|
-
*/
|
|
24
|
-
export declare class EdgeBreakPosition extends AbstractBreakPosition implements Layout.EdgeBreakPosition {
|
|
25
|
-
readonly position: Vtree.NodeContext;
|
|
26
|
-
readonly breakOnEdge: string | null;
|
|
27
|
-
overflows: boolean;
|
|
28
|
-
readonly computedBlockSize: number;
|
|
29
|
-
overflowIfRepetitiveElementsDropped: boolean;
|
|
30
|
-
protected isEdgeUpdated: boolean;
|
|
31
|
-
private edge;
|
|
32
|
-
constructor(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, computedBlockSize: number);
|
|
33
|
-
findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext;
|
|
34
|
-
getMinBreakPenalty(): number;
|
|
35
|
-
private updateEdge;
|
|
36
|
-
private updateOverflows;
|
|
37
|
-
getNodeContext(): Vtree.NodeContext;
|
|
38
|
-
private isFirstContentOfRepetitiveElementsOwner;
|
|
39
|
-
}
|
|
1
|
+
import { Layout, RepetitiveElement, Vtree } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Potential breaking position.
|
|
4
|
+
*/
|
|
5
|
+
export type BreakPosition = Layout.BreakPosition;
|
|
6
|
+
export declare abstract class AbstractBreakPosition implements Layout.AbstractBreakPosition {
|
|
7
|
+
abstract findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext;
|
|
8
|
+
abstract getMinBreakPenalty(): number;
|
|
9
|
+
calculateOffset(column: any): {
|
|
10
|
+
current: number;
|
|
11
|
+
minimum: number;
|
|
12
|
+
};
|
|
13
|
+
/** @override */
|
|
14
|
+
breakPositionChosen(column: Layout.Column): void;
|
|
15
|
+
getNodeContext(): Vtree.NodeContext;
|
|
16
|
+
}
|
|
17
|
+
export declare function calculateOffset(nodeContext: Vtree.NodeContext, elementsOffsets: RepetitiveElement.ElementsOffset[]): {
|
|
18
|
+
current: number;
|
|
19
|
+
minimum: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Potential edge breaking position.
|
|
23
|
+
*/
|
|
24
|
+
export declare class EdgeBreakPosition extends AbstractBreakPosition implements Layout.EdgeBreakPosition {
|
|
25
|
+
readonly position: Vtree.NodeContext;
|
|
26
|
+
readonly breakOnEdge: string | null;
|
|
27
|
+
overflows: boolean;
|
|
28
|
+
readonly computedBlockSize: number;
|
|
29
|
+
overflowIfRepetitiveElementsDropped: boolean;
|
|
30
|
+
protected isEdgeUpdated: boolean;
|
|
31
|
+
private edge;
|
|
32
|
+
constructor(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, computedBlockSize: number);
|
|
33
|
+
findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext;
|
|
34
|
+
getMinBreakPenalty(): number;
|
|
35
|
+
private updateEdge;
|
|
36
|
+
private updateOverflows;
|
|
37
|
+
getNodeContext(): Vtree.NodeContext;
|
|
38
|
+
private isFirstContentOfRepetitiveElementsOwner;
|
|
39
|
+
}
|