@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,205 +1,205 @@
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 Css - CSS Values and utilities to handle them.
20
- */
21
- import * as Base from "./base";
22
- import * as Exprs from "./exprs";
23
- export declare class Visitor {
24
- visitValues(values: Val[]): Val[];
25
- visitEmpty(empty: Val): Val;
26
- visitSlash(slash: Val): Val;
27
- visitStr(str: Str): Val;
28
- visitIdent(ident: Ident): Val;
29
- visitNumeric(numeric: Numeric): Val;
30
- visitNum(num: Num): Val;
31
- visitInt(num: Int): Val;
32
- visitHexColor(color: HexColor): Val;
33
- visitURL(url: URL): Val;
34
- visitURange(urange: URange): Val;
35
- visitSpaceList(list: SpaceList): Val;
36
- visitCommaList(list: CommaList): Val;
37
- visitFunc(func: Func): Val;
38
- visitExpr(expr: Expr): Val;
39
- }
40
- export declare class FilterVisitor extends Visitor {
41
- error: boolean;
42
- constructor();
43
- visitValues(values: Val[]): Val[];
44
- visitEmpty(empty: Val): Val;
45
- visitStr(str: Str): Val;
46
- visitIdent(ident: Ident): Val;
47
- visitSlash(slash: Val): Val;
48
- visitNumeric(numeric: Numeric): Val;
49
- visitNum(num: Num): Val;
50
- visitInt(num: Int): Val;
51
- visitHexColor(color: HexColor): Val;
52
- visitURL(url: URL): Val;
53
- visitURange(urange: URange): Val;
54
- visitSpaceList(list: SpaceList): Val;
55
- visitCommaList(list: CommaList): Val;
56
- visitFunc(func: Func): Val;
57
- visitExpr(expr: Expr): Val;
58
- }
59
- export declare class Val {
60
- /** @override */
61
- toString(): string;
62
- stringValue(): string;
63
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
64
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
65
- isExpr(): boolean;
66
- isNumeric(): boolean;
67
- isNum(): boolean;
68
- isIdent(): boolean;
69
- isSpaceList(): boolean;
70
- visit(visitor: Visitor): Val;
71
- }
72
- export declare class Empty extends Val {
73
- private static empty;
74
- static get instance(): Empty;
75
- private constructor();
76
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
77
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
78
- visit(visitor: Visitor): Val;
79
- }
80
- export declare const empty: Empty;
81
- export declare class Slash extends Val {
82
- private static slash;
83
- static get instance(): Slash;
84
- private constructor();
85
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
86
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
87
- visit(visitor: Visitor): Val;
88
- }
89
- export declare const slash: Slash;
90
- export declare class Str extends Val {
91
- str: string;
92
- constructor(str: string);
93
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
94
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
95
- visit(visitor: Visitor): Val;
96
- }
97
- export declare class Ident extends Val {
98
- name: string;
99
- constructor(name: string);
100
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
101
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
102
- visit(visitor: Visitor): Val;
103
- isIdent(): boolean;
104
- }
105
- export declare function getName(name: string): Ident;
106
- export declare class Numeric extends Val {
107
- num: number;
108
- unit: string;
109
- constructor(num: number, unit: string);
110
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
111
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
112
- visit(visitor: Visitor): Val;
113
- isNumeric(): boolean;
114
- }
115
- export declare class Num extends Val {
116
- num: number;
117
- constructor(num: number);
118
- toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
119
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
120
- visit(visitor: Visitor): Val;
121
- isNum(): boolean;
122
- }
123
- export declare class Int extends Num {
124
- constructor(num: number);
125
- visit(visitor: Visitor): Val;
126
- }
127
- export declare class HexColor extends Val {
128
- hex: string;
129
- constructor(hex: string);
130
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
131
- visit(visitor: Visitor): Val;
132
- }
133
- export declare class URL extends Val {
134
- url: string;
135
- constructor(url: string);
136
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
137
- visit(visitor: Visitor): Val;
138
- }
139
- export declare class URange extends Val {
140
- urangeText: string;
141
- constructor(urangeText: string);
142
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
143
- visit(visitor: Visitor): Val;
144
- }
145
- export declare function appendList(buf: Base.StringBuffer, values: Val[], separator: string, toString: boolean): void;
146
- export declare class SpaceList extends Val {
147
- values: Val[];
148
- constructor(values: Val[]);
149
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
150
- visit(visitor: Visitor): Val;
151
- isSpaceList(): boolean;
152
- }
153
- export declare class CommaList extends Val {
154
- values: Val[];
155
- constructor(values: Val[]);
156
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
157
- visit(visitor: Visitor): Val;
158
- }
159
- export declare class Func extends Val {
160
- name: string;
161
- values: Val[];
162
- constructor(name: string, values: Val[]);
163
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
164
- visit(visitor: Visitor): Val;
165
- }
166
- export declare class Expr extends Val {
167
- expr: Exprs.Val;
168
- constructor(expr: Exprs.Val);
169
- toExpr(): Exprs.Val;
170
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
171
- visit(visitor: Visitor): Val;
172
- isExpr(): boolean;
173
- }
174
- /**
175
- * Custom property value, may be arbitrary token
176
- */
177
- export declare class AnyToken extends Val {
178
- text: string;
179
- constructor(text: string);
180
- appendTo(buf: Base.StringBuffer, toString: boolean): void;
181
- }
182
- export declare function toNumber(val: Val, context: Exprs.Context): number;
183
- /**
184
- * Convert numeric value to px
185
- */
186
- export declare function convertNumericToPx(val: Val, context: Exprs.Context): Numeric;
187
- export declare const ident: {
188
- [key: string]: Ident;
189
- };
190
- export declare const hundredPercent: Numeric;
191
- export declare const fullWidth: Numeric;
192
- export declare const fullHeight: Numeric;
193
- export declare const numericZero: Numeric;
194
- export declare const fullURange: URange;
195
- export declare const processingOrder: {
196
- "font-size": number;
197
- "line-height": number;
198
- color: number;
199
- };
200
- export declare function isDefaultingValue(value: Val): boolean;
201
- /**
202
- * Function to sort property names in the order they should be processed
203
- */
204
- export declare function processingOrderFn(name1: string, name2: string): number;
205
- export declare function isCustomPropName(name: string): boolean;
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 Css - CSS Values and utilities to handle them.
20
+ */
21
+ import * as Base from "./base";
22
+ import * as Exprs from "./exprs";
23
+ export declare class Visitor {
24
+ visitValues(values: Val[]): Val[];
25
+ visitEmpty(empty: Val): Val;
26
+ visitSlash(slash: Val): Val;
27
+ visitStr(str: Str): Val;
28
+ visitIdent(ident: Ident): Val;
29
+ visitNumeric(numeric: Numeric): Val;
30
+ visitNum(num: Num): Val;
31
+ visitInt(num: Int): Val;
32
+ visitHexColor(color: HexColor): Val;
33
+ visitURL(url: URL): Val;
34
+ visitURange(urange: URange): Val;
35
+ visitSpaceList(list: SpaceList): Val;
36
+ visitCommaList(list: CommaList): Val;
37
+ visitFunc(func: Func): Val;
38
+ visitExpr(expr: Expr): Val;
39
+ }
40
+ export declare class FilterVisitor extends Visitor {
41
+ error: boolean;
42
+ constructor();
43
+ visitValues(values: Val[]): Val[];
44
+ visitEmpty(empty: Val): Val;
45
+ visitStr(str: Str): Val;
46
+ visitIdent(ident: Ident): Val;
47
+ visitSlash(slash: Val): Val;
48
+ visitNumeric(numeric: Numeric): Val;
49
+ visitNum(num: Num): Val;
50
+ visitInt(num: Int): Val;
51
+ visitHexColor(color: HexColor): Val;
52
+ visitURL(url: URL): Val;
53
+ visitURange(urange: URange): Val;
54
+ visitSpaceList(list: SpaceList): Val;
55
+ visitCommaList(list: CommaList): Val;
56
+ visitFunc(func: Func): Val;
57
+ visitExpr(expr: Expr): Val;
58
+ }
59
+ export declare class Val {
60
+ /** @override */
61
+ toString(): string;
62
+ stringValue(): string;
63
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
64
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
65
+ isExpr(): boolean;
66
+ isNumeric(): boolean;
67
+ isNum(): boolean;
68
+ isIdent(): boolean;
69
+ isSpaceList(): boolean;
70
+ visit(visitor: Visitor): Val;
71
+ }
72
+ export declare class Empty extends Val {
73
+ private static empty;
74
+ static get instance(): Empty;
75
+ private constructor();
76
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
77
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
78
+ visit(visitor: Visitor): Val;
79
+ }
80
+ export declare const empty: Empty;
81
+ export declare class Slash extends Val {
82
+ private static slash;
83
+ static get instance(): Slash;
84
+ private constructor();
85
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
86
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
87
+ visit(visitor: Visitor): Val;
88
+ }
89
+ export declare const slash: Slash;
90
+ export declare class Str extends Val {
91
+ str: string;
92
+ constructor(str: string);
93
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
94
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
95
+ visit(visitor: Visitor): Val;
96
+ }
97
+ export declare class Ident extends Val {
98
+ name: string;
99
+ constructor(name: string);
100
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
101
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
102
+ visit(visitor: Visitor): Val;
103
+ isIdent(): boolean;
104
+ }
105
+ export declare function getName(name: string): Ident;
106
+ export declare class Numeric extends Val {
107
+ num: number;
108
+ unit: string;
109
+ constructor(num: number, unit: string);
110
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
111
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
112
+ visit(visitor: Visitor): Val;
113
+ isNumeric(): boolean;
114
+ }
115
+ export declare class Num extends Val {
116
+ num: number;
117
+ constructor(num: number);
118
+ toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val): Exprs.Val;
119
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
120
+ visit(visitor: Visitor): Val;
121
+ isNum(): boolean;
122
+ }
123
+ export declare class Int extends Num {
124
+ constructor(num: number);
125
+ visit(visitor: Visitor): Val;
126
+ }
127
+ export declare class HexColor extends Val {
128
+ hex: string;
129
+ constructor(hex: string);
130
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
131
+ visit(visitor: Visitor): Val;
132
+ }
133
+ export declare class URL extends Val {
134
+ url: string;
135
+ constructor(url: string);
136
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
137
+ visit(visitor: Visitor): Val;
138
+ }
139
+ export declare class URange extends Val {
140
+ urangeText: string;
141
+ constructor(urangeText: string);
142
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
143
+ visit(visitor: Visitor): Val;
144
+ }
145
+ export declare function appendList(buf: Base.StringBuffer, values: Val[], separator: string, toString: boolean): void;
146
+ export declare class SpaceList extends Val {
147
+ values: Val[];
148
+ constructor(values: Val[]);
149
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
150
+ visit(visitor: Visitor): Val;
151
+ isSpaceList(): boolean;
152
+ }
153
+ export declare class CommaList extends Val {
154
+ values: Val[];
155
+ constructor(values: Val[]);
156
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
157
+ visit(visitor: Visitor): Val;
158
+ }
159
+ export declare class Func extends Val {
160
+ name: string;
161
+ values: Val[];
162
+ constructor(name: string, values: Val[]);
163
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
164
+ visit(visitor: Visitor): Val;
165
+ }
166
+ export declare class Expr extends Val {
167
+ expr: Exprs.Val;
168
+ constructor(expr: Exprs.Val);
169
+ toExpr(): Exprs.Val;
170
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
171
+ visit(visitor: Visitor): Val;
172
+ isExpr(): boolean;
173
+ }
174
+ /**
175
+ * Custom property value, may be arbitrary token
176
+ */
177
+ export declare class AnyToken extends Val {
178
+ text: string;
179
+ constructor(text: string);
180
+ appendTo(buf: Base.StringBuffer, toString: boolean): void;
181
+ }
182
+ export declare function toNumber(val: Val, context: Exprs.Context): number;
183
+ /**
184
+ * Convert numeric value to px
185
+ */
186
+ export declare function convertNumericToPx(val: Val, context: Exprs.Context): Numeric;
187
+ export declare const ident: {
188
+ [key: string]: Ident;
189
+ };
190
+ export declare const hundredPercent: Numeric;
191
+ export declare const fullWidth: Numeric;
192
+ export declare const fullHeight: Numeric;
193
+ export declare const numericZero: Numeric;
194
+ export declare const fullURange: URange;
195
+ export declare const processingOrder: {
196
+ "font-size": number;
197
+ "line-height": number;
198
+ color: number;
199
+ };
200
+ export declare function isDefaultingValue(value: Val): boolean;
201
+ /**
202
+ * Function to sort property names in the order they should be processed
203
+ */
204
+ export declare function processingOrderFn(name1: string, name2: string): number;
205
+ export declare function isCustomPropName(name: string): boolean;
@@ -1,26 +1,26 @@
1
- /**
2
- * Copyright 2016 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 Diff utility
19
- */
20
- export type Change = (number | string)[];
21
- export declare function diffChars(originalText: string, newText: string): Change[];
22
- export declare function restoreOriginalText(changes: Change[]): string;
23
- export declare function restoreNewText(changes: Change[]): string;
24
- export declare function resolveNewIndex(changes: Change[], oldIndex: number): number;
25
- export declare function resolveOriginalIndex(changes: Change[], newIndex: number): number;
26
- export declare function resolveIndex(changes: Change[], index: number, coef: number): number;
1
+ /**
2
+ * Copyright 2016 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 Diff utility
19
+ */
20
+ export type Change = (number | string)[];
21
+ export declare function diffChars(originalText: string, newText: string): Change[];
22
+ export declare function restoreOriginalText(changes: Change[]): string;
23
+ export declare function restoreNewText(changes: Change[]): string;
24
+ export declare function resolveNewIndex(changes: Change[], oldIndex: number): number;
25
+ export declare function resolveOriginalIndex(changes: Change[], newIndex: number): number;
26
+ export declare function resolveIndex(changes: Change[], index: number, coef: number): number;
@@ -1,57 +1,62 @@
1
- /**
2
- * Copyright 2016 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 Display - CSS Display Module
19
- */
20
- import * as Css from "./css";
21
- export declare const FLOW_ROOT_ATTR = "data-vivliostyle-flow-root";
22
- export declare function isFlowRoot(element: Element): boolean;
23
- /**
24
- * 'Blockify' a display value.
25
- * cf. https://drafts.csswg.org/css-display/#transformations
26
- * https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
27
- */
28
- export declare function blockify(display: Css.Ident): Css.Ident;
29
- /**
30
- * Judge if the generated box is absolutely positioned.
31
- */
32
- export declare function isAbsolutelyPositioned(position: Css.Ident): boolean;
33
- /**
34
- * Get computed values of display, position and float.
35
- * cf. https://drafts.csswg.org/css-display/#transformations
36
- * https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
37
- */
38
- export declare function getComputedDislayValue(display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): {
39
- display: Css.Ident;
40
- position: Css.Ident;
41
- float: Css.Ident;
42
- };
43
- /**
44
- * Judges if the generated box is block.
45
- */
46
- export declare function isBlock(display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): boolean;
47
- export declare function isInlineLevel(display: Css.Ident | string): boolean;
48
- export declare function isRubyInternalDisplay(display: Css.Ident | string): boolean;
49
- /**
50
- * Judges if the generated box establishes a new block formatting context.
51
- */
52
- export declare function establishesBFC(display: Css.Ident, position: Css.Ident, float: Css.Ident, overflow: Css.Ident, writingMode?: Css.Ident, parentWritingMode?: Css.Ident, isFlowRoot?: boolean): boolean;
53
- /**
54
- * Judges if the generated box establishes a containing block for descendant
55
- * boxes with 'position: absolute'.
56
- */
57
- export declare function establishesCBForAbsolute(position: Css.Ident): boolean;
1
+ /**
2
+ * Copyright 2016 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 Display - CSS Display Module
19
+ */
20
+ import * as Css from "./css";
21
+ export declare const FLOW_ROOT_ATTR = "data-vivliostyle-flow-root";
22
+ export declare function isFlowRoot(element: Element): boolean;
23
+ /**
24
+ * 'Blockify' a display value.
25
+ * cf. https://drafts.csswg.org/css-display/#transformations
26
+ * https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
27
+ */
28
+ export declare function blockify(display: Css.Ident): Css.Ident;
29
+ /**
30
+ * Judge if the generated box is absolutely positioned.
31
+ */
32
+ export declare function isAbsolutelyPositioned(position: Css.Val): boolean;
33
+ /**
34
+ * Check if the position value is 'running()'.
35
+ * https://drafts.csswg.org/css-gcpm/#running-elements
36
+ */
37
+ export declare function isRunning(position: Css.Val): boolean;
38
+ /**
39
+ * Get computed values of display, position and float.
40
+ * cf. https://drafts.csswg.org/css-display/#transformations
41
+ * https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
42
+ */
43
+ export declare function getComputedDisplayValue(display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): {
44
+ display: Css.Ident;
45
+ position: Css.Ident;
46
+ float: Css.Ident;
47
+ };
48
+ /**
49
+ * Judges if the generated box is block.
50
+ */
51
+ export declare function isBlock(display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): boolean;
52
+ export declare function isInlineLevel(display: Css.Ident | string): boolean;
53
+ export declare function isRubyInternalDisplay(display: Css.Ident | string): boolean;
54
+ /**
55
+ * Judges if the generated box establishes a new block formatting context.
56
+ */
57
+ export declare function establishesBFC(display: Css.Ident, position: Css.Ident, float: Css.Ident, overflow: Css.Ident, writingMode?: Css.Ident, parentWritingMode?: Css.Ident, isFlowRoot?: boolean): boolean;
58
+ /**
59
+ * Judges if the generated box establishes a containing block for descendant
60
+ * boxes with 'position: absolute'.
61
+ */
62
+ export declare function establishesCBForAbsolute(position: Css.Ident): boolean;