@vivliostyle/cli 5.9.0 → 6.1.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 (150) hide show
  1. package/dist/browser.d.ts +1 -1
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +21 -63
  4. package/dist/browser.js.map +1 -1
  5. package/dist/build.d.ts +1 -1
  6. package/dist/build.d.ts.map +1 -1
  7. package/dist/build.js +46 -47
  8. package/dist/build.js.map +1 -1
  9. package/dist/builder.d.ts +5 -6
  10. package/dist/builder.d.ts.map +1 -1
  11. package/dist/builder.js +124 -103
  12. package/dist/builder.js.map +1 -1
  13. package/dist/cli.js +5 -10
  14. package/dist/cli.js.map +1 -1
  15. package/dist/commands/build.js +10 -16
  16. package/dist/commands/build.js.map +1 -1
  17. package/dist/commands/build.parser.d.ts +3 -3
  18. package/dist/commands/build.parser.d.ts.map +1 -1
  19. package/dist/commands/build.parser.js +13 -21
  20. package/dist/commands/build.parser.js.map +1 -1
  21. package/dist/commands/init.js +7 -9
  22. package/dist/commands/init.js.map +1 -1
  23. package/dist/commands/init.parser.d.ts +2 -2
  24. package/dist/commands/init.parser.d.ts.map +1 -1
  25. package/dist/commands/init.parser.js +3 -10
  26. package/dist/commands/init.parser.js.map +1 -1
  27. package/dist/commands/preview.js +8 -11
  28. package/dist/commands/preview.js.map +1 -1
  29. package/dist/commands/preview.parser.d.ts +2 -2
  30. package/dist/commands/preview.parser.d.ts.map +1 -1
  31. package/dist/commands/preview.parser.js +5 -12
  32. package/dist/commands/preview.parser.js.map +1 -1
  33. package/dist/config.d.ts +29 -18
  34. package/dist/config.d.ts.map +1 -1
  35. package/dist/config.js +285 -251
  36. package/dist/config.js.map +1 -1
  37. package/dist/const.d.ts +2 -0
  38. package/dist/const.d.ts.map +1 -1
  39. package/dist/const.js +12 -15
  40. package/dist/const.js.map +1 -1
  41. package/dist/container.js +31 -41
  42. package/dist/container.js.map +1 -1
  43. package/dist/epub.d.ts.map +1 -1
  44. package/dist/epub.js +10 -17
  45. package/dist/epub.js.map +1 -1
  46. package/dist/html.d.ts +3 -3
  47. package/dist/html.d.ts.map +1 -1
  48. package/dist/html.js +21 -30
  49. package/dist/html.js.map +1 -1
  50. package/dist/index.d.ts +5 -5
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +3 -9
  53. package/dist/index.js.map +1 -1
  54. package/dist/init.js +12 -19
  55. package/dist/init.js.map +1 -1
  56. package/dist/input.d.ts +2 -2
  57. package/dist/input.d.ts.map +1 -1
  58. package/dist/input.js +8 -16
  59. package/dist/input.js.map +1 -1
  60. package/dist/markdown.js +9 -17
  61. package/dist/markdown.js.map +1 -1
  62. package/dist/output.d.ts +1 -1
  63. package/dist/output.d.ts.map +1 -1
  64. package/dist/output.js +6 -16
  65. package/dist/output.js.map +1 -1
  66. package/dist/pdf.d.ts +3 -3
  67. package/dist/pdf.d.ts.map +1 -1
  68. package/dist/pdf.js +66 -79
  69. package/dist/pdf.js.map +1 -1
  70. package/dist/postprocess.d.ts +5 -5
  71. package/dist/postprocess.d.ts.map +1 -1
  72. package/dist/postprocess.js +54 -81
  73. package/dist/postprocess.js.map +1 -1
  74. package/dist/preview.d.ts +1 -1
  75. package/dist/preview.d.ts.map +1 -1
  76. package/dist/preview.js +53 -58
  77. package/dist/preview.js.map +1 -1
  78. package/dist/schema/pubManifest.d.ts +2 -471
  79. package/dist/schema/pubManifest.d.ts.map +1 -1
  80. package/dist/schema/pubManifest.js +41 -42
  81. package/dist/schema/pubManifest.js.map +1 -1
  82. package/dist/schema/publication.schema.d.ts +12 -12
  83. package/dist/schema/publication.schema.d.ts.map +1 -1
  84. package/dist/schema/publication.schema.js +1 -2
  85. package/dist/schema/publication.schema.js.map +1 -1
  86. package/dist/schema/vivliostyle.d.ts +1 -1
  87. package/dist/schema/vivliostyle.d.ts.map +1 -1
  88. package/dist/schema/vivliostyle.js +7 -8
  89. package/dist/schema/vivliostyle.js.map +1 -1
  90. package/dist/schema/vivliostyleConfig.schema.d.ts +22 -9
  91. package/dist/schema/vivliostyleConfig.schema.d.ts.map +1 -1
  92. package/dist/schema/vivliostyleConfig.schema.js +1 -2
  93. package/dist/schema/vivliostyleConfig.schema.js.map +1 -1
  94. package/dist/server.d.ts +7 -6
  95. package/dist/server.d.ts.map +1 -1
  96. package/dist/server.js +26 -38
  97. package/dist/server.js.map +1 -1
  98. package/dist/theme.d.ts +6 -0
  99. package/dist/theme.d.ts.map +1 -0
  100. package/dist/theme.js +74 -0
  101. package/dist/theme.js.map +1 -0
  102. package/dist/util.d.ts +3 -3
  103. package/dist/util.d.ts.map +1 -1
  104. package/dist/util.js +80 -98
  105. package/dist/util.js.map +1 -1
  106. package/dist/webbook.d.ts +1 -1
  107. package/dist/webbook.d.ts.map +1 -1
  108. package/dist/webbook.js +40 -44
  109. package/dist/webbook.js.map +1 -1
  110. package/package.json +33 -17
  111. package/schemas/pubManifest/README.md +5 -0
  112. package/schemas/pubManifest/module/ItemList.schema.json +32 -0
  113. package/schemas/pubManifest/module/bcp.schema.json +7 -0
  114. package/schemas/pubManifest/module/context.schema.json +62 -0
  115. package/schemas/pubManifest/module/contributor-object.schema.json +42 -0
  116. package/schemas/pubManifest/module/contributor.schema.json +26 -0
  117. package/schemas/pubManifest/module/date.schema.json +7 -0
  118. package/schemas/pubManifest/module/duration.schema.json +7 -0
  119. package/schemas/pubManifest/module/item-lists.schema.json +16 -0
  120. package/schemas/pubManifest/module/language.schema.json +16 -0
  121. package/schemas/pubManifest/module/link.schema.json +60 -0
  122. package/schemas/pubManifest/module/localizable-object.schema.json +15 -0
  123. package/schemas/pubManifest/module/localizable.schema.json +26 -0
  124. package/schemas/pubManifest/module/resource.categorization.schema.json +31 -0
  125. package/schemas/pubManifest/module/strings.schema.json +9 -0
  126. package/schemas/pubManifest/module/url.schema.json +7 -0
  127. package/schemas/pubManifest/module/urls.schema.json +18 -0
  128. package/schemas/pubManifest/publication.schema.json +123 -0
  129. package/schemas/vivliostyle/vivliostyleConfig.schema.json +348 -0
  130. package/types/better-ajv-errors.d.ts +28 -0
  131. package/types/custom.d.ts +9 -0
  132. package/types/playwright.d.ts +49 -0
  133. package/dist/schema/pubManifest/module/ItemList.schema.json +0 -32
  134. package/dist/schema/pubManifest/module/bcp.schema.json +0 -7
  135. package/dist/schema/pubManifest/module/context.schema.json +0 -62
  136. package/dist/schema/pubManifest/module/contributor-object.schema.json +0 -42
  137. package/dist/schema/pubManifest/module/contributor.schema.json +0 -26
  138. package/dist/schema/pubManifest/module/date.schema.json +0 -7
  139. package/dist/schema/pubManifest/module/duration.schema.json +0 -7
  140. package/dist/schema/pubManifest/module/item-lists.schema.json +0 -16
  141. package/dist/schema/pubManifest/module/language.schema.json +0 -16
  142. package/dist/schema/pubManifest/module/link.schema.json +0 -60
  143. package/dist/schema/pubManifest/module/localizable-object.schema.json +0 -15
  144. package/dist/schema/pubManifest/module/localizable.schema.json +0 -26
  145. package/dist/schema/pubManifest/module/resource.categorization.schema.json +0 -31
  146. package/dist/schema/pubManifest/module/strings.schema.json +0 -9
  147. package/dist/schema/pubManifest/module/url.schema.json +0 -7
  148. package/dist/schema/pubManifest/module/urls.schema.json +0 -18
  149. package/dist/schema/pubManifest/publication.schema.json +0 -123
  150. package/dist/schema/vivliostyle/vivliostyleConfig.schema.json +0 -296
@@ -0,0 +1,348 @@
1
+ {
2
+ "definitions": {
3
+ "entry": {
4
+ "type": "string",
5
+ "minLength": 1
6
+ },
7
+ "articleEntryObject": {
8
+ "type": "object",
9
+ "properties": {
10
+ "path": { "type": "string" },
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
+ },
27
+ "encodingFormat": { "type": "string" },
28
+ "rel": {
29
+ "type": ["string", "array"],
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ }
34
+ },
35
+ "required": ["path"],
36
+ "additionalProperties": false
37
+ },
38
+ "browserType": {
39
+ "type": "string",
40
+ "enum": ["chromium", "firefox", "webkit"]
41
+ },
42
+ "contentsEntryObject": {
43
+ "type": "object",
44
+ "properties": {
45
+ "rel": {
46
+ "type": "string",
47
+ "const": "contents"
48
+ },
49
+ "title": { "type": "string" },
50
+ "theme": {
51
+ "oneOf": [
52
+ { "$ref": "#/definitions/theme" },
53
+ { "$ref": "#/definitions/themeObject" },
54
+ {
55
+ "type": "array",
56
+ "items": {
57
+ "oneOf": [
58
+ { "$ref": "#/definitions/theme" },
59
+ { "$ref": "#/definitions/themeObject" }
60
+ ]
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ "required": ["rel"],
67
+ "additionalProperties": false
68
+ },
69
+ "entryObject": {
70
+ "oneOf": [
71
+ { "$ref": "#/definitions/contentsEntryObject" },
72
+ { "$ref": "#/definitions/articleEntryObject" }
73
+ ]
74
+ },
75
+ "output": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ },
79
+ "outputObject": {
80
+ "type": "object",
81
+ "properties": {
82
+ "path": {
83
+ "description": "Specify output file name or directory [<title>.pdf].",
84
+ "type": "string"
85
+ },
86
+ "format": {
87
+ "description": "Specify output format.",
88
+ "type": "string"
89
+ },
90
+ "renderMode": {
91
+ "description": "if docker is set, Vivliostyle try to render PDF on Docker container [local].",
92
+ "type": "string",
93
+ "enum": ["local", "docker"]
94
+ },
95
+ "preflight": {
96
+ "description": "Apply the process to generate PDF for printing.",
97
+ "type": "string",
98
+ "enum": ["press-ready", "press-ready-local"]
99
+ },
100
+ "preflightOption": {
101
+ "description": "Options for preflight process (ex: gray-scale, enforce-outline). Please refer the document of press-ready for further information. https://github.com/vibranthq/press-ready",
102
+ "type": "array",
103
+ "items": { "type": "string" }
104
+ }
105
+ },
106
+ "required": ["path"],
107
+ "additionalProperties": false
108
+ },
109
+ "theme": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ },
113
+ "themeObject": {
114
+ "type": "object",
115
+ "properties": {
116
+ "specifier": {
117
+ "description": "Sepcifier name of importing theme package or a path of CSS file. \n- A npm-style package argument is allowed (ex: @vivliostyle/theme-academic@1 ./local-pkg)\n- A URL or a local path of CSS is allowed (ex: ./style.css, https://example.com/style.css)",
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "import": {
122
+ "description": "Importing CSS path(s) of the package. Specify this if you want to import other than the default file.",
123
+ "type": ["string", "array"],
124
+ "items": {
125
+ "type": "string"
126
+ }
127
+ }
128
+ },
129
+ "required": ["specifier"],
130
+ "additionalProperties": false
131
+ },
132
+ "vfmReplaceRule": {
133
+ "type": "object",
134
+ "properties": {
135
+ "test": {
136
+ "type": "object",
137
+ "tsType": "RegExp"
138
+ },
139
+ "match": {
140
+ "instanceOf": "Function",
141
+ "tsType": "(result: RegExpMatchArray, h: any) => Object | string"
142
+ }
143
+ },
144
+ "required": ["test", "match"],
145
+ "additionalProperties": false
146
+ },
147
+ "vivliostyleConfigEntry": {
148
+ "type": "object",
149
+ "properties": {
150
+ "title": {
151
+ "type": "string",
152
+ "description": "Title",
153
+ "minLength": 1
154
+ },
155
+ "author": {
156
+ "type": "string",
157
+ "description": "Author",
158
+ "minLength": 1
159
+ },
160
+ "theme": {
161
+ "description": "Theme package path(s) or URL(s) of css file.",
162
+ "oneOf": [
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
+ ]
175
+ },
176
+ "entry": {
177
+ "description": "Entry file(s) of document.",
178
+ "oneOf": [
179
+ { "$ref": "#/definitions/entry" },
180
+ { "$ref": "#/definitions/articleEntryObject" },
181
+ {
182
+ "type": "array",
183
+ "items": {
184
+ "oneOf": [
185
+ { "$ref": "#/definitions/entry" },
186
+ { "$ref": "#/definitions/entryObject" }
187
+ ]
188
+ },
189
+ "uniqueItems": true
190
+ }
191
+ ]
192
+ },
193
+ "entryContext": {
194
+ "description": "Directory of referencing entry file(s).",
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "output": {
199
+ "description": "Options about outputs.",
200
+ "oneOf": [
201
+ {
202
+ "type": "array",
203
+ "items": {
204
+ "oneOf": [
205
+ { "$ref": "#/definitions/output" },
206
+ { "$ref": "#/definitions/outputObject" }
207
+ ]
208
+ }
209
+ },
210
+ { "$ref": "#/definitions/output" },
211
+ { "$ref": "#/definitions/outputObject" }
212
+ ]
213
+ },
214
+ "workspaceDir": {
215
+ "type": "string",
216
+ "description": "",
217
+ "minLength": 1
218
+ },
219
+ "includeAssets": {
220
+ "oneOf": [
221
+ {
222
+ "type": "array",
223
+ "items": { "$ref": "#/definitions/entry" }
224
+ },
225
+ { "$ref": "#/definitions/entry" }
226
+ ]
227
+ },
228
+ "size": {
229
+ "description": "Output pdf size [Letter]. preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger. custom(comma separated): 182mm,257mm or 8.5in,11in.",
230
+ "type": "string",
231
+ "minLength": 1
232
+ },
233
+ "pressReady": {
234
+ "description": "Make generated PDF compatible with press ready PDF/X-1a [false]. This option is equivalent with \"preflight\": \"press-ready\"",
235
+ "type": "boolean"
236
+ },
237
+ "language": {
238
+ "description": "Language",
239
+ "type": "string",
240
+ "minLength": 1
241
+ },
242
+ "readingProgression": {
243
+ "type": "string",
244
+ "enum": ["ltr", "rtl"],
245
+ "default": "ltr"
246
+ },
247
+ "toc": {
248
+ "oneOf": [
249
+ { "type": "boolean" },
250
+ {
251
+ "type": "string",
252
+ "minLength": 1
253
+ }
254
+ ]
255
+ },
256
+ "tocTitle": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ },
260
+ "cover": {
261
+ "type": "string",
262
+ "minLength": 1
263
+ },
264
+ "timeout": {
265
+ "description": "Timeout limit for waiting Vivliostyle process [120000]",
266
+ "type": "number",
267
+ "minimum": 0
268
+ },
269
+ "vfm": {
270
+ "description": "Option for convert Markdown to a stringify (HTML).",
271
+ "type": "object",
272
+ "properties": {
273
+ "style": {
274
+ "description": "Custom stylesheet path/URL.",
275
+ "type": ["string", "array"],
276
+ "items": {
277
+ "type": "string"
278
+ }
279
+ },
280
+ "partial": {
281
+ "description": "Output markdown fragments.",
282
+ "type": "boolean"
283
+ },
284
+ "title": {
285
+ "description": "Document title (ignored in partial mode).",
286
+ "type": "string"
287
+ },
288
+ "language": {
289
+ "description": "Document language (ignored in partial mode).",
290
+ "type": "string"
291
+ },
292
+ "replace": {
293
+ "description": "Replacement handler for HTML string.",
294
+ "type": "array",
295
+ "items": {
296
+ "$ref": "#/definitions/vfmReplaceRule"
297
+ }
298
+ },
299
+ "hardLineBreaks": {
300
+ "description": "Add `<br>` at the position of hard line breaks, without needing spaces.",
301
+ "type": "boolean"
302
+ },
303
+ "disableFormatHtml": {
304
+ "description": "Disable automatic HTML format.",
305
+ "type": "boolean"
306
+ },
307
+ "math": {
308
+ "description": "Enable math syntax.",
309
+ "type": "boolean"
310
+ }
311
+ }
312
+ },
313
+ "image": {
314
+ "description": "Specify a docker image to render.",
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "http": {
319
+ "description": "Launch an HTTP server hosting contents instead of file protocol. It is useful that requires CORS such as external web fonts.",
320
+ "type": "boolean"
321
+ },
322
+ "viewer": {
323
+ "description": "Specify a URL of displaying viewer instead of vivliostyle-cli's one. It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)",
324
+ "type": "string",
325
+ "minLength": 1
326
+ },
327
+ "browser": {
328
+ "description": "EXPERIMENTAL SUPPORT: Specify a browser type to launch Vivliostyle viewer. Currently, Firefox and Webkit support preview command only!",
329
+ "oneOf": [{ "$ref": "#/definitions/browserType" }],
330
+ "default": "chromium"
331
+ }
332
+ },
333
+ "required": ["entry"]
334
+ }
335
+ },
336
+ "oneOf": [
337
+ {
338
+ "$ref": "#/definitions/vivliostyleConfigEntry"
339
+ },
340
+ {
341
+ "type": "array",
342
+ "items": {
343
+ "$ref": "#/definitions/vivliostyleConfigEntry"
344
+ },
345
+ "minItems": 1
346
+ }
347
+ ]
348
+ }
@@ -0,0 +1,28 @@
1
+ // Type file providing better-ajv-errors package seems not to be loaded
2
+ // because newer TypeScript doesn't look "types" settings in `type: module` context.
3
+ declare module 'better-ajv-errors' {
4
+ import type { ErrorObject } from 'ajv';
5
+
6
+ export interface IOutputError {
7
+ start: { line: number; column: number; offset: number };
8
+ // Optional for required
9
+ end?: { line: number; column: number; offset: number };
10
+ error: string;
11
+ suggestion?: string;
12
+ }
13
+
14
+ export interface IInputOptions {
15
+ format?: 'cli' | 'js';
16
+ indent?: number | null;
17
+
18
+ /** Raw JSON used when highlighting error location */
19
+ json?: string | null;
20
+ }
21
+
22
+ export default function <S, T, Options extends IInputOptions>(
23
+ schema: S,
24
+ data: T,
25
+ errors: Array<ErrorObject>,
26
+ options?: Options,
27
+ ): Options extends { format: 'js' } ? Array<IOutputError> : string;
28
+ }
@@ -0,0 +1,9 @@
1
+ declare module 'hastscript';
2
+
3
+ declare type Without<T> = { [P in keyof T]?: never };
4
+ type Tail<T extends any[]> = T extends [any, ...infer XS] ? XS : never;
5
+ type Union<T extends any[]> = T extends [] ? {} : T[0] & Union<Tail<T>>;
6
+ declare type XOR<T extends any[], U extends any[] = []> = T extends []
7
+ ? never
8
+ : (T[0] & Without<Union<[...U, ...Tail<T>]>>) | XOR<Tail<T>, [T[0], ...U]>;
9
+ declare type Resolved<T> = T extends Promise<infer U> ? U : never;
@@ -0,0 +1,49 @@
1
+ declare module 'playwright-core/lib/server' {
2
+ export type BrowserName = 'chromium' | 'firefox' | 'webkit';
3
+ type InternalTool =
4
+ | 'ffmpeg'
5
+ | 'firefox-beta'
6
+ | 'chromium-with-symbols'
7
+ | 'chromium-tip-of-tree';
8
+ type ChromiumChannel =
9
+ | 'chrome'
10
+ | 'chrome-beta'
11
+ | 'chrome-dev'
12
+ | 'chrome-canary'
13
+ | 'msedge'
14
+ | 'msedge-beta'
15
+ | 'msedge-dev'
16
+ | 'msedge-canary';
17
+
18
+ export interface Executable {
19
+ type: 'browser' | 'tool' | 'channel';
20
+ name: BrowserName | InternalTool | ChromiumChannel;
21
+ browserName: BrowserName | undefined;
22
+ installType:
23
+ | 'download-by-default'
24
+ | 'download-on-demand'
25
+ | 'install-script'
26
+ | 'none';
27
+ directory: string | undefined;
28
+ executablePathOrDie(sdkLanguage?: string): string;
29
+ executablePath(sdkLanguage?: string): string | undefined;
30
+ validateHostRequirements(sdkLanguage: string): Promise<void>;
31
+ }
32
+
33
+ class Registry {
34
+ executables(): Executable[];
35
+ findExecutable(name: BrowserName): Executable;
36
+ findExecutable(name: string): Executable | undefined;
37
+ defaultExecutables(): Executable[];
38
+ installDeps(
39
+ executablesToInstallDeps: Executable[],
40
+ dryRun: boolean,
41
+ ): Promise<void>;
42
+ install(
43
+ executablesToInstall: Executable[],
44
+ forceReinstall: boolean,
45
+ ): Promise<void>;
46
+ }
47
+
48
+ export const registry: Registry;
49
+ }
@@ -1,32 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/ItemList.schema.json",
4
- "title": "schema.org ItemList object",
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "oneOf": [
9
- {
10
- "type": "string",
11
- "const": "ItemList"
12
- },
13
- {
14
- "type": "array",
15
- "items": {
16
- "type": "string"
17
- },
18
- "contains": {
19
- "const": "ItemList"
20
- }
21
- }
22
- ]
23
- },
24
- "itemListElement": {
25
- "type": ["array"],
26
- "items": {
27
- "type": "string"
28
- }
29
- }
30
- },
31
- "required": ["type", "itemListElement"]
32
- }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/bcp.schema.json",
4
- "title": "BCP47 Language tag",
5
- "type": "string",
6
- "pattern": "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$"
7
- }
@@ -1,62 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/context.schema.json",
4
- "title": "Publication Contexts",
5
- "type": "array",
6
- "items": [
7
- {
8
- "const": "https://schema.org"
9
- },
10
- {
11
- "const": "https://www.w3.org/ns/pub-context"
12
- }
13
- ],
14
- "additionalItems": {
15
- "anyOf": [
16
- {
17
- "type": "string"
18
- },
19
- {
20
- "type": "object",
21
- "properties": {
22
- "language": {
23
- "$ref": "bcp.schema.json"
24
- },
25
- "direction": false
26
- },
27
- "required": ["language"]
28
- },
29
- {
30
- "type": "object",
31
- "properties": {
32
- "direction": {
33
- "type": "string",
34
- "enum": ["ltr", "rtl"]
35
- },
36
- "language": false
37
- },
38
- "required": ["direction"]
39
- },
40
- {
41
- "type": "object",
42
- "properties": {
43
- "language": {
44
- "$ref": "bcp.schema.json"
45
- },
46
- "direction": {
47
- "type": "string",
48
- "enum": ["ltr", "rtl"]
49
- }
50
- },
51
- "required": ["language", "direction"]
52
- },
53
- {
54
- "type": "object",
55
- "properties": {
56
- "language": false,
57
- "direction": false
58
- }
59
- }
60
- ]
61
- }
62
- }
@@ -1,42 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/contributor-object.schema.json",
4
- "title": "Contributor Object",
5
- "type": "object",
6
- "properties": {
7
- "name": {
8
- "$ref": "localizable.schema.json"
9
- },
10
- "id": {
11
- "$ref": "url.schema.json"
12
- },
13
- "type": {
14
- "oneOf": [
15
- {
16
- "type": "string",
17
- "enum": ["Person", "Organization"],
18
- "default": "Person"
19
- },
20
- {
21
- "type": "array",
22
- "items": {
23
- "type": "string"
24
- },
25
- "contains": {
26
- "enum": ["Person", "Organization"]
27
- }
28
- }
29
- ]
30
- },
31
- "url": {
32
- "$ref": "url.schema.json"
33
- },
34
- "identifier": {
35
- "type": "array",
36
- "items": {
37
- "type": "string"
38
- }
39
- }
40
- },
41
- "required": ["name"]
42
- }
@@ -1,26 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/contributor.schema.json",
4
- "title": "Contributor",
5
- "anyOf": [
6
- {
7
- "type": "string"
8
- },
9
- {
10
- "type": "array",
11
- "items": {
12
- "anyOf": [
13
- {
14
- "type": "string"
15
- },
16
- {
17
- "$ref": "contributor-object.schema.json"
18
- }
19
- ]
20
- }
21
- },
22
- {
23
- "$ref": "contributor-object.schema.json"
24
- }
25
- ]
26
- }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/date.schema.json",
4
- "title": "Dates",
5
- "type": "string",
6
- "format": "date-time"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/duration.schema.json",
4
- "title": "Duration",
5
- "type": "string",
6
- "pattern": "^P(?!$)((\\d+Y)|(\\d+\\.\\d+Y$))?((\\d+M)|(\\d+\\.\\d+M$))?((\\d+W)|(\\d+\\.\\d+W$))?((\\d+D)|(\\d+\\.\\d+D$))?(T(?=\\d)((\\d+H)|(\\d+\\.\\d+H$))?((\\d+M)|(\\d+\\.\\d+M$))?(\\d+(\\.\\d+)?S)?)??$"
7
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/item-lists.schema.json",
4
- "title": "Lists of ItemList",
5
- "oneOf": [
6
- {
7
- "$ref": "ItemList.schema.json"
8
- },
9
- {
10
- "type": "array",
11
- "items": {
12
- "$ref": "ItemList.schema.json"
13
- }
14
- }
15
- ]
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.w3.org/ns/pub-schema/manifest/module/language.schema.json",
4
- "title": "Languages",
5
- "oneOf": [
6
- {
7
- "$ref": "bcp.schema.json"
8
- },
9
- {
10
- "type": "array",
11
- "items": {
12
- "$ref": "bcp.schema.json"
13
- }
14
- }
15
- ]
16
- }