@vivliostyle/core 2.24.2 → 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 -450
- 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,88 +1,88 @@
|
|
|
1
|
-
import * as Net from "./net";
|
|
2
|
-
import * as Task from "./task";
|
|
3
|
-
import { XmlDoc } from "./types";
|
|
4
|
-
export
|
|
5
|
-
export declare class XMLDocHolder implements XmlDoc.XMLDocHolder {
|
|
6
|
-
readonly store: XMLDocStore;
|
|
7
|
-
readonly url: string;
|
|
8
|
-
readonly document: Document;
|
|
9
|
-
lang: string | null;
|
|
10
|
-
totalOffset: number;
|
|
11
|
-
root: Element;
|
|
12
|
-
body: Element;
|
|
13
|
-
head: Element;
|
|
14
|
-
last: Element;
|
|
15
|
-
lastOffset: number;
|
|
16
|
-
idMap: {
|
|
17
|
-
[key: string]: Element;
|
|
18
|
-
};
|
|
19
|
-
constructor(store: XMLDocStore, url: string, document: Document);
|
|
20
|
-
doc(): XmlDoc.NodeList;
|
|
21
|
-
getElementOffset(element: Element): number;
|
|
22
|
-
getNodeOffset(srcNode: Node, offsetInNode: number, after: boolean): number;
|
|
23
|
-
getTotalOffset(): number;
|
|
24
|
-
/**
|
|
25
|
-
* @return last node such that its offset is less or equal to the given
|
|
26
|
-
*/
|
|
27
|
-
getNodeByOffset(offset: number): Node;
|
|
28
|
-
private buildIdMap;
|
|
29
|
-
/**
|
|
30
|
-
* Get element by URL in the source document(s). URL must be in either '#id'
|
|
31
|
-
* or 'url#id' form.
|
|
32
|
-
*/
|
|
33
|
-
getElement(url: string): Element | null;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* cf. https://w3c.github.io/DOM-Parsing/#the-domparser-interface
|
|
37
|
-
* @enum {string}
|
|
38
|
-
*/
|
|
39
|
-
export declare enum DOMParserSupportedType {
|
|
40
|
-
TEXT_HTML = "text/html",
|
|
41
|
-
TEXT_XML = "text/xml",
|
|
42
|
-
APPLICATION_XML = "application/xml",
|
|
43
|
-
APPLICATION_XHTML_XML = "application/xhtml+xml",
|
|
44
|
-
IMAGE_SVG_XML = "image/svg+xml"
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Parses a string with a DOMParser and returns the document.
|
|
48
|
-
* If a parse error occurs, return null.
|
|
49
|
-
*/
|
|
50
|
-
export declare function parseAndReturnNullIfError(str: string, type: string, opt_parser?: DOMParser): Document | null;
|
|
51
|
-
/**
|
|
52
|
-
* @returns null if contentType cannot be inferred from HTTP header and file
|
|
53
|
-
* extension
|
|
54
|
-
*/
|
|
55
|
-
export declare function resolveContentType(response: Net.Response): string | null;
|
|
56
|
-
export declare function parseXMLResource(response: Net.Response, store: XMLDocStore): Task.Result<XmlDoc.XMLDocHolder>;
|
|
57
|
-
export declare function newXMLDocStore(): XMLDocStore;
|
|
58
|
-
export declare class Predicate implements XmlDoc.Predicate {
|
|
59
|
-
readonly fn: (p1: Node) => boolean;
|
|
60
|
-
constructor(fn: (p1: Node) => boolean);
|
|
61
|
-
check(node: Node): boolean;
|
|
62
|
-
withAttribute(name: string, value: string): Predicate;
|
|
63
|
-
withChild(name: string, opt_childPredicate?: Predicate): Predicate;
|
|
64
|
-
}
|
|
65
|
-
export declare const predicate: Predicate;
|
|
66
|
-
export declare class NodeList implements XmlDoc.NodeList {
|
|
67
|
-
readonly nodes: Node[];
|
|
68
|
-
constructor(nodes: Node[]);
|
|
69
|
-
asArray(): Node[];
|
|
70
|
-
size(): number;
|
|
71
|
-
/**
|
|
72
|
-
* Filter with predicate
|
|
73
|
-
*/
|
|
74
|
-
predicate(pr: Predicate): NodeList;
|
|
75
|
-
forEachNode(fn: (p1: Node, p2: (p1: Node) => void) => void): NodeList;
|
|
76
|
-
/**
|
|
77
|
-
* @template T
|
|
78
|
-
*/
|
|
79
|
-
forEach<T>(fn: (p1: Node) => T): T[];
|
|
80
|
-
/**
|
|
81
|
-
* @template T
|
|
82
|
-
*/
|
|
83
|
-
forEachNonNull<T>(fn: (p1: Node) => T): T[];
|
|
84
|
-
child(tag: string): NodeList;
|
|
85
|
-
childElements(): NodeList;
|
|
86
|
-
attribute(name: string): (string | null)[];
|
|
87
|
-
textContent(): (string | null)[];
|
|
88
|
-
}
|
|
1
|
+
import * as Net from "./net";
|
|
2
|
+
import * as Task from "./task";
|
|
3
|
+
import { XmlDoc } from "./types";
|
|
4
|
+
export type XMLDocStore = XmlDoc.XMLDocStore;
|
|
5
|
+
export declare class XMLDocHolder implements XmlDoc.XMLDocHolder {
|
|
6
|
+
readonly store: XMLDocStore;
|
|
7
|
+
readonly url: string;
|
|
8
|
+
readonly document: Document;
|
|
9
|
+
lang: string | null;
|
|
10
|
+
totalOffset: number;
|
|
11
|
+
root: Element;
|
|
12
|
+
body: Element;
|
|
13
|
+
head: Element;
|
|
14
|
+
last: Element;
|
|
15
|
+
lastOffset: number;
|
|
16
|
+
idMap: {
|
|
17
|
+
[key: string]: Element;
|
|
18
|
+
};
|
|
19
|
+
constructor(store: XMLDocStore, url: string, document: Document);
|
|
20
|
+
doc(): XmlDoc.NodeList;
|
|
21
|
+
getElementOffset(element: Element): number;
|
|
22
|
+
getNodeOffset(srcNode: Node, offsetInNode: number, after: boolean): number;
|
|
23
|
+
getTotalOffset(): number;
|
|
24
|
+
/**
|
|
25
|
+
* @return last node such that its offset is less or equal to the given
|
|
26
|
+
*/
|
|
27
|
+
getNodeByOffset(offset: number): Node;
|
|
28
|
+
private buildIdMap;
|
|
29
|
+
/**
|
|
30
|
+
* Get element by URL in the source document(s). URL must be in either '#id'
|
|
31
|
+
* or 'url#id' form.
|
|
32
|
+
*/
|
|
33
|
+
getElement(url: string): Element | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* cf. https://w3c.github.io/DOM-Parsing/#the-domparser-interface
|
|
37
|
+
* @enum {string}
|
|
38
|
+
*/
|
|
39
|
+
export declare enum DOMParserSupportedType {
|
|
40
|
+
TEXT_HTML = "text/html",
|
|
41
|
+
TEXT_XML = "text/xml",
|
|
42
|
+
APPLICATION_XML = "application/xml",
|
|
43
|
+
APPLICATION_XHTML_XML = "application/xhtml+xml",
|
|
44
|
+
IMAGE_SVG_XML = "image/svg+xml"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Parses a string with a DOMParser and returns the document.
|
|
48
|
+
* If a parse error occurs, return null.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseAndReturnNullIfError(str: string, type: string, opt_parser?: DOMParser): Document | null;
|
|
51
|
+
/**
|
|
52
|
+
* @returns null if contentType cannot be inferred from HTTP header and file
|
|
53
|
+
* extension
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveContentType(response: Net.Response): string | null;
|
|
56
|
+
export declare function parseXMLResource(response: Net.Response, store: XMLDocStore): Task.Result<XmlDoc.XMLDocHolder>;
|
|
57
|
+
export declare function newXMLDocStore(): XMLDocStore;
|
|
58
|
+
export declare class Predicate implements XmlDoc.Predicate {
|
|
59
|
+
readonly fn: (p1: Node) => boolean;
|
|
60
|
+
constructor(fn: (p1: Node) => boolean);
|
|
61
|
+
check(node: Node): boolean;
|
|
62
|
+
withAttribute(name: string, value: string): Predicate;
|
|
63
|
+
withChild(name: string, opt_childPredicate?: Predicate): Predicate;
|
|
64
|
+
}
|
|
65
|
+
export declare const predicate: Predicate;
|
|
66
|
+
export declare class NodeList implements XmlDoc.NodeList {
|
|
67
|
+
readonly nodes: Node[];
|
|
68
|
+
constructor(nodes: Node[]);
|
|
69
|
+
asArray(): Node[];
|
|
70
|
+
size(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Filter with predicate
|
|
73
|
+
*/
|
|
74
|
+
predicate(pr: Predicate): NodeList;
|
|
75
|
+
forEachNode(fn: (p1: Node, p2: (p1: Node) => void) => void): NodeList;
|
|
76
|
+
/**
|
|
77
|
+
* @template T
|
|
78
|
+
*/
|
|
79
|
+
forEach<T>(fn: (p1: Node) => T): T[];
|
|
80
|
+
/**
|
|
81
|
+
* @template T
|
|
82
|
+
*/
|
|
83
|
+
forEachNonNull<T>(fn: (p1: Node) => T): T[];
|
|
84
|
+
child(tag: string): NodeList;
|
|
85
|
+
childElements(): NodeList;
|
|
86
|
+
attribute(name: string): (string | null)[];
|
|
87
|
+
textContent(): (string | null)[];
|
|
88
|
+
}
|
package/lib/vivliostyle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./vivliostyle/constants";
|
|
2
|
-
export * from "./vivliostyle/plugin";
|
|
3
|
-
export * from "./vivliostyle/profile";
|
|
4
|
-
export * from "./vivliostyle/core-viewer";
|
|
5
|
-
export * from "./vivliostyle/print";
|
|
6
|
-
export * from "./vivliostyle/assets";
|
|
1
|
+
export * from "./vivliostyle/constants";
|
|
2
|
+
export * from "./vivliostyle/plugin";
|
|
3
|
+
export * from "./vivliostyle/profile";
|
|
4
|
+
export * from "./vivliostyle/core-viewer";
|
|
5
|
+
export * from "./vivliostyle/print";
|
|
6
|
+
export * from "./vivliostyle/assets";
|