@vivliostyle/cli 8.1.2 → 8.2.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/dist/const.d.ts +2 -0
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +2 -0
- package/dist/const.js.map +1 -1
- package/dist/input/config.d.ts +17 -2
- package/dist/input/config.d.ts.map +1 -1
- package/dist/input/config.js +75 -7
- package/dist/input/config.js.map +1 -1
- package/dist/output/epub.d.ts.map +1 -1
- package/dist/output/epub.js +41 -14
- package/dist/output/epub.js.map +1 -1
- package/dist/processor/compile.d.ts +4 -1
- package/dist/processor/compile.d.ts.map +1 -1
- package/dist/processor/compile.js +57 -33
- package/dist/processor/compile.js.map +1 -1
- package/dist/processor/html.d.ts +21 -2
- package/dist/processor/html.d.ts.map +1 -1
- package/dist/processor/html.js +62 -3
- package/dist/processor/html.js.map +1 -1
- package/dist/schema/vivliostyleConfig.schema.d.ts +48 -4
- package/dist/schema/vivliostyleConfig.schema.d.ts.map +1 -1
- package/dist/util.d.ts +3 -1
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +2 -2
- package/dist/util.js.map +1 -1
- package/package.json +2 -3
- package/schemas/vivliostyle/vivliostyleConfig.schema.json +91 -46
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivliostyle/cli",
|
|
3
3
|
"description": "Save the pdf file via headless browser and Vivliostyle.",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.2.0",
|
|
5
5
|
"author": "spring_raining <harusamex.com@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@npmcli/arborist": "^6.1.3",
|
|
27
27
|
"@vivliostyle/jsdom": "22.1.0-vivliostyle-cli.1",
|
|
28
28
|
"@vivliostyle/vfm": "2.1.0",
|
|
29
|
-
"@vivliostyle/viewer": "2.25.
|
|
29
|
+
"@vivliostyle/viewer": "2.25.5",
|
|
30
30
|
"ajv": "^8.11.2",
|
|
31
31
|
"ajv-formats": "^2.1.1",
|
|
32
32
|
"archiver": "^5.3.1",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"hast-util-to-html": "^7.1.3",
|
|
48
48
|
"hastscript": "^6.0.0",
|
|
49
49
|
"ignore": "5.2.4",
|
|
50
|
-
"image-size": "^1.0.0",
|
|
51
50
|
"is-interactive": "1.0.0",
|
|
52
51
|
"mime-types": "^2.1.32",
|
|
53
52
|
"node-stream-zip": "^1.14.0",
|
|
@@ -9,21 +9,7 @@
|
|
|
9
9
|
"properties": {
|
|
10
10
|
"path": { "type": "string" },
|
|
11
11
|
"title": { "type": "string" },
|
|
12
|
-
"theme": {
|
|
13
|
-
"oneOf": [
|
|
14
|
-
{ "$ref": "#/definitions/theme" },
|
|
15
|
-
{ "$ref": "#/definitions/themeObject" },
|
|
16
|
-
{
|
|
17
|
-
"type": "array",
|
|
18
|
-
"items": {
|
|
19
|
-
"oneOf": [
|
|
20
|
-
{ "$ref": "#/definitions/theme" },
|
|
21
|
-
{ "$ref": "#/definitions/themeObject" }
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
12
|
+
"theme": { "$ref": "#/definitions/themeSpecifier" },
|
|
27
13
|
"encodingFormat": { "type": "string" },
|
|
28
14
|
"rel": {
|
|
29
15
|
"type": ["string", "array"],
|
|
@@ -47,28 +33,46 @@
|
|
|
47
33
|
"const": "contents"
|
|
48
34
|
},
|
|
49
35
|
"title": { "type": "string" },
|
|
50
|
-
"theme": {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
36
|
+
"theme": { "$ref": "#/definitions/themeSpecifier" },
|
|
37
|
+
"pageBreakBefore": {
|
|
38
|
+
"description": "Specify the page break position before this document. It is useful when you want to specify which side a first page of the document should be placed on a two-page spread.",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": ["left", "right", "recto", "verso"]
|
|
41
|
+
},
|
|
42
|
+
"pageCounterReset": {
|
|
43
|
+
"description": "Reset the starting page number of this document by the specified integer. It is useful when you want to control page numbers when including a cover page.",
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"minimum": 1
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": ["rel"],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"coverEntryObject": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"rel": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "cover"
|
|
57
|
+
},
|
|
58
|
+
"path": { "type": "string" },
|
|
59
|
+
"title": { "type": "string" },
|
|
60
|
+
"theme": { "$ref": "#/definitions/themeSpecifier" },
|
|
61
|
+
"imageSrc": { "type": "string" },
|
|
62
|
+
"imageAlt": { "type": "string" },
|
|
63
|
+
"pageBreakBefore": {
|
|
64
|
+
"description": "Specify the page break position before this document. It is useful when you want to specify which side a first page of the document should be placed on a two-page spread.",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": ["left", "right", "recto", "verso"]
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
"required": ["rel"],
|
|
67
70
|
"additionalProperties": false
|
|
68
71
|
},
|
|
69
72
|
"entryObject": {
|
|
70
|
-
"
|
|
73
|
+
"anyOf": [
|
|
71
74
|
{ "$ref": "#/definitions/contentsEntryObject" },
|
|
75
|
+
{ "$ref": "#/definitions/coverEntryObject" },
|
|
72
76
|
{ "$ref": "#/definitions/articleEntryObject" }
|
|
73
77
|
]
|
|
74
78
|
},
|
|
@@ -129,6 +133,21 @@
|
|
|
129
133
|
"required": ["specifier"],
|
|
130
134
|
"additionalProperties": false
|
|
131
135
|
},
|
|
136
|
+
"themeSpecifier": {
|
|
137
|
+
"oneOf": [
|
|
138
|
+
{ "$ref": "#/definitions/theme" },
|
|
139
|
+
{ "$ref": "#/definitions/themeObject" },
|
|
140
|
+
{
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"oneOf": [
|
|
144
|
+
{ "$ref": "#/definitions/theme" },
|
|
145
|
+
{ "$ref": "#/definitions/themeObject" }
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
132
151
|
"vfmReplaceRule": {
|
|
133
152
|
"type": "object",
|
|
134
153
|
"properties": {
|
|
@@ -158,20 +177,8 @@
|
|
|
158
177
|
"minLength": 1
|
|
159
178
|
},
|
|
160
179
|
"theme": {
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
{ "$ref": "#/definitions/theme" },
|
|
164
|
-
{ "$ref": "#/definitions/themeObject" },
|
|
165
|
-
{
|
|
166
|
-
"type": "array",
|
|
167
|
-
"items": {
|
|
168
|
-
"oneOf": [
|
|
169
|
-
{ "$ref": "#/definitions/theme" },
|
|
170
|
-
{ "$ref": "#/definitions/themeObject" }
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
]
|
|
180
|
+
"$ref": "#/definitions/themeSpecifier",
|
|
181
|
+
"description": "Theme package path(s) or URL(s) of css file."
|
|
175
182
|
},
|
|
176
183
|
"entry": {
|
|
177
184
|
"description": "Entry file(s) of document.",
|
|
@@ -245,6 +252,7 @@
|
|
|
245
252
|
"default": "ltr"
|
|
246
253
|
},
|
|
247
254
|
"toc": {
|
|
255
|
+
"description": "Specify whether to generate a table of contents (ToC) document. If a string is set, the ToC document will be saved at that location. (default: index.html)",
|
|
248
256
|
"oneOf": [
|
|
249
257
|
{ "type": "boolean" },
|
|
250
258
|
{
|
|
@@ -254,12 +262,44 @@
|
|
|
254
262
|
]
|
|
255
263
|
},
|
|
256
264
|
"tocTitle": {
|
|
265
|
+
"description": "Specify the title of the generated ToC document.",
|
|
257
266
|
"type": "string",
|
|
258
267
|
"minLength": 1
|
|
259
268
|
},
|
|
260
269
|
"cover": {
|
|
261
|
-
"
|
|
262
|
-
"
|
|
270
|
+
"description": "Options about cover images and cover page documents",
|
|
271
|
+
"oneOf": [
|
|
272
|
+
{
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "object",
|
|
278
|
+
"properties": {
|
|
279
|
+
"src": {
|
|
280
|
+
"description": "Specify the cover image to be used for the cover page.",
|
|
281
|
+
"type": "string",
|
|
282
|
+
"minLength": 1
|
|
283
|
+
},
|
|
284
|
+
"name": {
|
|
285
|
+
"description": "Specify alternative text for the cover image.",
|
|
286
|
+
"type": "string",
|
|
287
|
+
"minLength": 1
|
|
288
|
+
},
|
|
289
|
+
"htmlPath": {
|
|
290
|
+
"description": "Specify the location where the generated cover document will be saved. (default: cover.html) If falsy value is set, the cover document won't be generated.",
|
|
291
|
+
"oneOf": [
|
|
292
|
+
{
|
|
293
|
+
"type": "string",
|
|
294
|
+
"minLength": 1
|
|
295
|
+
},
|
|
296
|
+
{ "type": "boolean" }
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"required": ["src"]
|
|
301
|
+
}
|
|
302
|
+
]
|
|
263
303
|
},
|
|
264
304
|
"timeout": {
|
|
265
305
|
"description": "Timeout limit for waiting Vivliostyle process [120000]",
|
|
@@ -324,6 +364,11 @@
|
|
|
324
364
|
"type": "string",
|
|
325
365
|
"minLength": 1
|
|
326
366
|
},
|
|
367
|
+
"viewerParam": {
|
|
368
|
+
"description": "specify viewer parameters. (ex: \"allowScripts=false&pixelRatio=16\")",
|
|
369
|
+
"type": "string",
|
|
370
|
+
"minLength": 1
|
|
371
|
+
},
|
|
327
372
|
"browser": {
|
|
328
373
|
"description": "EXPERIMENTAL SUPPORT: Specify a browser type to launch Vivliostyle viewer. Currently, Firefox and Webkit support preview command only!",
|
|
329
374
|
"oneOf": [{ "$ref": "#/definitions/browserType" }],
|