@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.
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 -450
  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,56 +1,56 @@
1
- /**
2
- * Copyright 2015 Trim-marks Inc.
3
- * Copyright 2019 Vivliostyle Foundation
4
- *
5
- * Vivliostyle.js is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Affero General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * Vivliostyle.js is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Affero General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Affero General Public License
16
- * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * @fileoverview Logging - Logging utility
19
- */
20
- /**
21
- * Log level.
22
- * @enum {number}
23
- */
24
- export declare enum LogLevel {
25
- DEBUG = 1,
26
- INFO = 2,
27
- WARN = 3,
28
- ERROR = 4
29
- }
30
- export declare type ErrorInfo = {
31
- error: Error;
32
- messages: any[];
33
- };
34
- /**
35
- * Class logging error, warning, information or debug messages.
36
- */
37
- export declare class Logger {
38
- private opt_console?;
39
- private listeners;
40
- constructor(opt_console?: Console);
41
- private consoleDebug;
42
- private consoleInfo;
43
- private consoleWarn;
44
- private consoleError;
45
- private triggerListeners;
46
- /**
47
- * Add a listener function invoked when a log event with the specified level
48
- * occurs.
49
- */
50
- addListener(level: LogLevel, listener: (p1: ErrorInfo) => void): void;
51
- debug(...var_args: any[]): void;
52
- info(...var_args: any[]): void;
53
- warn(...var_args: any[]): void;
54
- error(...var_args: any[]): void;
55
- }
56
- export declare const logger: Logger;
1
+ /**
2
+ * Copyright 2015 Trim-marks Inc.
3
+ * Copyright 2019 Vivliostyle Foundation
4
+ *
5
+ * Vivliostyle.js is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * Vivliostyle.js is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ * @fileoverview Logging - Logging utility
19
+ */
20
+ /**
21
+ * Log level.
22
+ * @enum {number}
23
+ */
24
+ export declare enum LogLevel {
25
+ DEBUG = 1,
26
+ INFO = 2,
27
+ WARN = 3,
28
+ ERROR = 4
29
+ }
30
+ export type ErrorInfo = {
31
+ error: Error;
32
+ messages: any[];
33
+ };
34
+ /**
35
+ * Class logging error, warning, information or debug messages.
36
+ */
37
+ export declare class Logger {
38
+ private opt_console?;
39
+ private listeners;
40
+ constructor(opt_console?: Console);
41
+ private consoleDebug;
42
+ private consoleInfo;
43
+ private consoleWarn;
44
+ private consoleError;
45
+ private triggerListeners;
46
+ /**
47
+ * Add a listener function invoked when a log event with the specified level
48
+ * occurs.
49
+ */
50
+ addListener(level: LogLevel, listener: (p1: ErrorInfo) => void): void;
51
+ debug(...var_args: any[]): void;
52
+ info(...var_args: any[]): void;
53
+ warn(...var_args: any[]): void;
54
+ error(...var_args: any[]): void;
55
+ }
56
+ export declare const logger: Logger;
@@ -1,36 +1,36 @@
1
- /**
2
- * Checkes whether given order can be represented as an+b with a non-negative
3
- * interger n
4
- */
5
- export declare function matchANPlusB(order: number, a: number, b: number): boolean;
6
- export interface Matcher {
7
- matches(): boolean;
8
- }
9
- export declare class AnyMatcher implements Matcher {
10
- readonly matchers: Matcher[];
11
- constructor(matchers: Matcher[]);
12
- /** @override */
13
- matches(): boolean;
14
- }
15
- export declare class AllMatcher implements Matcher {
16
- readonly matchers: Matcher[];
17
- constructor(matchers: Matcher[]);
18
- /** @override */
19
- matches(): boolean;
20
- }
21
- export declare class NthFragmentMatcher implements Matcher {
22
- readonly elementOffset: number;
23
- readonly a: number;
24
- readonly b: number;
25
- static fragmentIndices: {};
26
- static registerFragmentIndex(elementOffset: number, fragmentIndex: number, priority: number): void;
27
- static clearFragmentIndices(): void;
28
- constructor(elementOffset: number, a: number, b: number);
29
- /** @override */
30
- matches(): boolean;
31
- }
32
- export declare class MatcherBuilder {
33
- static buildViewConditionMatcher(elementOffset: number, viewCondition: string): Matcher;
34
- static buildAllMatcher(matchers: Matcher[]): Matcher;
35
- static buildAnyMatcher(matchers: Matcher[]): Matcher;
36
- }
1
+ /**
2
+ * Checkes whether given order can be represented as an+b with a non-negative
3
+ * interger n
4
+ */
5
+ export declare function matchANPlusB(order: number, a: number, b: number): boolean;
6
+ export interface Matcher {
7
+ matches(): boolean;
8
+ }
9
+ export declare class AnyMatcher implements Matcher {
10
+ readonly matchers: Matcher[];
11
+ constructor(matchers: Matcher[]);
12
+ /** @override */
13
+ matches(): boolean;
14
+ }
15
+ export declare class AllMatcher implements Matcher {
16
+ readonly matchers: Matcher[];
17
+ constructor(matchers: Matcher[]);
18
+ /** @override */
19
+ matches(): boolean;
20
+ }
21
+ export declare class NthFragmentMatcher implements Matcher {
22
+ readonly elementOffset: number;
23
+ readonly a: number;
24
+ readonly b: number;
25
+ static fragmentIndices: {};
26
+ static registerFragmentIndex(elementOffset: number, fragmentIndex: number, priority: number): void;
27
+ static clearFragmentIndices(): void;
28
+ constructor(elementOffset: number, a: number, b: number);
29
+ /** @override */
30
+ matches(): boolean;
31
+ }
32
+ export declare class MatcherBuilder {
33
+ static buildViewConditionMatcher(elementOffset: number, viewCondition: string): Matcher;
34
+ static buildAllMatcher(matchers: Matcher[]): Matcher;
35
+ static buildAnyMatcher(matchers: Matcher[]): Matcher;
36
+ }
@@ -1,22 +1,22 @@
1
- /**
2
- * Copyright 2017 Trim-marks Inc.
3
- * Copyright 2019 Vivliostyle Foundation
4
- *
5
- * Vivliostyle.js is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Affero General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * Vivliostyle.js is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Affero General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Affero General Public License
16
- * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
17
- *
18
- * @fileoverview MathUtil - Math utilities
19
- */
20
- /** */
21
- export declare function mean(array: number[]): number;
22
- export declare function variance(array: number[]): number;
1
+ /**
2
+ * Copyright 2017 Trim-marks Inc.
3
+ * Copyright 2019 Vivliostyle Foundation
4
+ *
5
+ * Vivliostyle.js is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * Vivliostyle.js is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ * @fileoverview MathUtil - Math utilities
19
+ */
20
+ /** */
21
+ export declare function mean(array: number[]): number;
22
+ export declare function variance(array: number[]): number;
@@ -1,72 +1,72 @@
1
- /**
2
- * Copyright 2013 Google, Inc.
3
- * Copyright 2015 Trim-marks Inc.
4
- * Copyright 2019 Vivliostyle Foundation
5
- *
6
- * Vivliostyle.js is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU Affero General Public License as published by
8
- * the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * Vivliostyle.js is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU Affero General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Affero General Public License
17
- * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
18
- *
19
- * @fileoverview Net - Fetch resource from a URL.
20
- */
21
- import * as Base from "./base";
22
- import * as Task from "./task";
23
- import * as TaskUtil from "./task-util";
24
- import { Net, XmlDoc } from "./types";
25
- /**
26
- * @enum {string}
27
- */
28
- export declare enum XMLHttpRequestResponseType {
29
- DEFAULT = "",
30
- ARRAYBUFFER = "arraybuffer",
31
- BLOB = "blob",
32
- DOCUMENT = "document",
33
- JSON = "json",
34
- TEXT = "text"
35
- }
36
- export declare type Response = Net.Response;
37
- export declare function ajax(url: string, opt_type?: XMLHttpRequestResponseType, opt_method?: string, opt_data?: string, opt_contentType?: string): Task.Result<Response>;
38
- export declare function makeBlob(parts: (string | Blob | ArrayBuffer | ArrayBufferView)[], opt_type?: string): Blob;
39
- export declare function readBlob(blob: Blob): Task.Result<ArrayBuffer>;
40
- export declare function revokeObjectURL(url: string): void;
41
- /**
42
- * @return url
43
- */
44
- export declare function createObjectURL(blob: Blob): string;
45
- /**
46
- * @template Resource
47
- */
48
- export declare class ResourceStore<Resource> implements Net.ResourceStore<Resource> {
49
- readonly parser: (p1: Response, p2: ResourceStore<Resource>) => Task.Result<Resource>;
50
- readonly type: XMLHttpRequestResponseType;
51
- resources: {
52
- [key: string]: Resource;
53
- };
54
- fetchers: {
55
- [key: string]: TaskUtil.Fetcher<Resource>;
56
- };
57
- constructor(parser: (p1: Response, p2: ResourceStore<Resource>) => Task.Result<Resource>, type: XMLHttpRequestResponseType);
58
- /**
59
- * @return resource for the given URL
60
- */
61
- load(url: string, opt_required?: boolean, opt_message?: string): Task.Result<Resource>;
62
- private fetchInner;
63
- /**
64
- * @return fetcher for the resource for the given URL
65
- */
66
- fetch(url: string, opt_required?: boolean, opt_message?: string): TaskUtil.Fetcher<Resource>;
67
- get(url: string): XmlDoc.XMLDocHolder;
68
- delete(url: string): void;
69
- }
70
- export declare type JSONStore = ResourceStore<Base.JSON>;
71
- export declare function parseJSONResource(response: Response, store: JSONStore): Task.Result<Base.JSON>;
72
- export declare function newJSONStore(): JSONStore;
1
+ /**
2
+ * Copyright 2013 Google, Inc.
3
+ * Copyright 2015 Trim-marks Inc.
4
+ * Copyright 2019 Vivliostyle Foundation
5
+ *
6
+ * Vivliostyle.js is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * Vivliostyle.js is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Affero General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Affero General Public License
17
+ * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ * @fileoverview Net - Fetch resource from a URL.
20
+ */
21
+ import * as Base from "./base";
22
+ import * as Task from "./task";
23
+ import * as TaskUtil from "./task-util";
24
+ import { Net, XmlDoc } from "./types";
25
+ /**
26
+ * @enum {string}
27
+ */
28
+ export declare enum XMLHttpRequestResponseType {
29
+ DEFAULT = "",
30
+ ARRAYBUFFER = "arraybuffer",
31
+ BLOB = "blob",
32
+ DOCUMENT = "document",
33
+ JSON = "json",
34
+ TEXT = "text"
35
+ }
36
+ export type Response = Net.Response;
37
+ export declare function ajax(url: string, opt_type?: XMLHttpRequestResponseType, opt_method?: string, opt_data?: string, opt_contentType?: string): Task.Result<Response>;
38
+ export declare function makeBlob(parts: (string | Blob | ArrayBuffer | ArrayBufferView)[], opt_type?: string): Blob;
39
+ export declare function readBlob(blob: Blob): Task.Result<ArrayBuffer>;
40
+ export declare function revokeObjectURL(url: string): void;
41
+ /**
42
+ * @return url
43
+ */
44
+ export declare function createObjectURL(blob: Blob): string;
45
+ /**
46
+ * @template Resource
47
+ */
48
+ export declare class ResourceStore<Resource> implements Net.ResourceStore<Resource> {
49
+ readonly parser: (p1: Response, p2: ResourceStore<Resource>) => Task.Result<Resource>;
50
+ readonly type: XMLHttpRequestResponseType;
51
+ resources: {
52
+ [key: string]: Resource;
53
+ };
54
+ fetchers: {
55
+ [key: string]: TaskUtil.Fetcher<Resource>;
56
+ };
57
+ constructor(parser: (p1: Response, p2: ResourceStore<Resource>) => Task.Result<Resource>, type: XMLHttpRequestResponseType);
58
+ /**
59
+ * @return resource for the given URL
60
+ */
61
+ load(url: string, opt_required?: boolean, opt_message?: string): Task.Result<Resource>;
62
+ private fetchInner;
63
+ /**
64
+ * @return fetcher for the resource for the given URL
65
+ */
66
+ fetch(url: string, opt_required?: boolean, opt_message?: string): TaskUtil.Fetcher<Resource>;
67
+ get(url: string): XmlDoc.XMLDocHolder;
68
+ delete(url: string): void;
69
+ }
70
+ export type JSONStore = ResourceStore<Base.JSON>;
71
+ export declare function parseJSONResource(response: Response, store: JSONStore): Task.Result<Base.JSON>;
72
+ export declare function newJSONStore(): JSONStore;