@vivliostyle/cli 9.8.3 → 9.9.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/{chunk-HYY2WKJZ.js → chunk-3O3N2V7D.js} +4 -4
- package/dist/{chunk-3VKIUKTD.js → chunk-6KEOMYDZ.js} +2 -2
- package/dist/{chunk-QOPM72CS.js → chunk-6UU7DEUR.js} +4 -4
- package/dist/{chunk-MDTA37GZ.js → chunk-G3GROLBN.js} +2 -2
- package/dist/{chunk-PBAUN5CU.js → chunk-OZ4XTSAH.js} +2 -2
- package/dist/{chunk-LI2REENX.js → chunk-QWX5MAON.js} +4 -4
- package/dist/{chunk-YUYXQJDY.js → chunk-UYKCTF6F.js} +26 -11
- package/dist/chunk-UYKCTF6F.js.map +1 -0
- package/dist/{chunk-PPI5DA75.js → chunk-WELNNHOB.js} +52 -32
- package/dist/chunk-WELNNHOB.js.map +1 -0
- package/dist/commands/build.js +5 -5
- package/dist/commands/init.js +3 -3
- package/dist/commands/preview.js +5 -5
- package/dist/config/schema.d.ts +2455 -1660
- package/dist/config/schema.js +5 -1
- package/dist/index.js +8 -8
- package/dist/vite-adapter.js +4 -4
- package/package.json +2 -2
- package/dist/chunk-PPI5DA75.js.map +0 -1
- package/dist/chunk-YUYXQJDY.js.map +0 -1
- /package/dist/{chunk-HYY2WKJZ.js.map → chunk-3O3N2V7D.js.map} +0 -0
- /package/dist/{chunk-3VKIUKTD.js.map → chunk-6KEOMYDZ.js.map} +0 -0
- /package/dist/{chunk-QOPM72CS.js.map → chunk-6UU7DEUR.js.map} +0 -0
- /package/dist/{chunk-MDTA37GZ.js.map → chunk-G3GROLBN.js.map} +0 -0
- /package/dist/{chunk-PBAUN5CU.js.map → chunk-OZ4XTSAH.js.map} +0 -0
- /package/dist/{chunk-LI2REENX.js.map → chunk-QWX5MAON.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveViteConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OZ4XTSAH.js";
|
|
4
4
|
import {
|
|
5
5
|
createViteServer,
|
|
6
6
|
getViewerFullUrl,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
mergeInlineConfig,
|
|
10
10
|
resolveTaskConfig,
|
|
11
11
|
warnDeprecatedConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WELNNHOB.js";
|
|
13
13
|
import {
|
|
14
14
|
Logger,
|
|
15
15
|
isUnicodeSupported,
|
|
16
16
|
randomBookSymbol,
|
|
17
17
|
setupConfigFromFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-G3GROLBN.js";
|
|
19
19
|
import {
|
|
20
20
|
cliVersion
|
|
21
21
|
} from "./chunk-4IIM6RSG.js";
|
|
@@ -85,4 +85,4 @@ ${blueBright("\u2559\u2500")} ${dim(`Preview URL: ${terminalLink(url, url, { fal
|
|
|
85
85
|
export {
|
|
86
86
|
preview
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=chunk-
|
|
88
|
+
//# sourceMappingURL=chunk-3O3N2V7D.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Logger,
|
|
3
3
|
cwd,
|
|
4
4
|
runExitHandlers
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G3GROLBN.js";
|
|
6
6
|
import {
|
|
7
7
|
CONTAINER_URL,
|
|
8
8
|
cliVersion
|
|
@@ -86,4 +86,4 @@ module.exports = vivliostyleConfig;
|
|
|
86
86
|
export {
|
|
87
87
|
init
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-6KEOMYDZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveViteConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OZ4XTSAH.js";
|
|
4
4
|
import {
|
|
5
5
|
buildWebPublication,
|
|
6
6
|
cleanupWorkspace,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
prepareThemeDirectory,
|
|
19
19
|
resolveTaskConfig,
|
|
20
20
|
warnDeprecatedConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WELNNHOB.js";
|
|
22
22
|
import {
|
|
23
23
|
importNodeModule
|
|
24
24
|
} from "./chunk-FXUEYQRY.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
randomBookSymbol,
|
|
33
33
|
runExitHandlers,
|
|
34
34
|
setupConfigFromFlags
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-G3GROLBN.js";
|
|
36
36
|
import {
|
|
37
37
|
CONTAINER_LOCAL_HOSTNAME,
|
|
38
38
|
CONTAINER_ROOT_DIR,
|
|
@@ -746,4 +746,4 @@ async function build(inlineConfig, { containerForkMode = false } = {}) {
|
|
|
746
746
|
export {
|
|
747
747
|
build
|
|
748
748
|
};
|
|
749
|
-
//# sourceMappingURL=chunk-
|
|
749
|
+
//# sourceMappingURL=chunk-6UU7DEUR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VivliostyleInlineConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UYKCTF6F.js";
|
|
4
4
|
import {
|
|
5
5
|
EMPTY_DATA_URI
|
|
6
6
|
} from "./chunk-4IIM6RSG.js";
|
|
@@ -1163,4 +1163,4 @@ export {
|
|
|
1163
1163
|
parseFlagsToInlineConfig,
|
|
1164
1164
|
setupConfigFromFlags
|
|
1165
1165
|
};
|
|
1166
|
-
//# sourceMappingURL=chunk-
|
|
1166
|
+
//# sourceMappingURL=chunk-G3GROLBN.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Logger,
|
|
3
3
|
useTmpDirectory
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G3GROLBN.js";
|
|
5
5
|
|
|
6
6
|
// src/config/vite.ts
|
|
7
7
|
import upath from "upath";
|
|
@@ -74,4 +74,4 @@ async function resolveViteConfig({
|
|
|
74
74
|
export {
|
|
75
75
|
resolveViteConfig
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-OZ4XTSAH.js.map
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
vsStaticServePlugin,
|
|
8
8
|
vsViewerPlugin,
|
|
9
9
|
warnDeprecatedConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WELNNHOB.js";
|
|
11
11
|
import {
|
|
12
12
|
Logger,
|
|
13
13
|
setupConfigFromFlags
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G3GROLBN.js";
|
|
15
15
|
import {
|
|
16
16
|
VivliostyleInlineConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UYKCTF6F.js";
|
|
18
18
|
|
|
19
19
|
// src/vite-adapter.ts
|
|
20
20
|
import * as v from "valibot";
|
|
@@ -54,4 +54,4 @@ async function createVitePlugin(inlineConfig = {}) {
|
|
|
54
54
|
export {
|
|
55
55
|
createVitePlugin
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-QWX5MAON.js.map
|
|
@@ -37,6 +37,24 @@ var ValidString = v.pipe(
|
|
|
37
37
|
v.trim(),
|
|
38
38
|
v.minLength(1, "At least one character is required")
|
|
39
39
|
);
|
|
40
|
+
var DocumentProcessorSchema = v.pipe(
|
|
41
|
+
v.function(),
|
|
42
|
+
v.metadata({
|
|
43
|
+
typeString: '(option: import("@vivliostyle/vfm").StringifyMarkdownOptions, metadata: import("@vivliostyle/vfm").Metadata) => import("unified").Processor'
|
|
44
|
+
}),
|
|
45
|
+
v.description($`
|
|
46
|
+
Custom function to provide a unified Processor for converting the source document to HTML.
|
|
47
|
+
`)
|
|
48
|
+
);
|
|
49
|
+
var DocumentMetadataReaderSchema = v.pipe(
|
|
50
|
+
v.function(),
|
|
51
|
+
v.metadata({
|
|
52
|
+
typeString: '(content: string) => import("@vivliostyle/vfm").Metadata'
|
|
53
|
+
}),
|
|
54
|
+
v.description($`
|
|
55
|
+
Custom function to extract metadata from the source document content.
|
|
56
|
+
`)
|
|
57
|
+
);
|
|
40
58
|
var ThemeConfig = v.pipe(
|
|
41
59
|
v.intersect([
|
|
42
60
|
v.required(
|
|
@@ -90,7 +108,9 @@ var ArticleEntryConfig = v.pipe(
|
|
|
90
108
|
v.union([v.array(ValidString), ValidString]),
|
|
91
109
|
v.transform((input) => [input].flat())
|
|
92
110
|
)
|
|
93
|
-
)
|
|
111
|
+
),
|
|
112
|
+
documentProcessor: v.optional(DocumentProcessorSchema),
|
|
113
|
+
documentMetadataReader: v.optional(DocumentMetadataReaderSchema)
|
|
94
114
|
}),
|
|
95
115
|
["path"],
|
|
96
116
|
"Missing required field: path"
|
|
@@ -613,15 +633,8 @@ var BuildTask = v.pipe(
|
|
|
613
633
|
Timeout limit for waiting for the Vivliostyle process (in ms). (default: \`300000\`)
|
|
614
634
|
`)
|
|
615
635
|
),
|
|
616
|
-
documentProcessor:
|
|
617
|
-
|
|
618
|
-
v.metadata({
|
|
619
|
-
typeString: '(option: import("@vivliostyle/vfm").StringifyMarkdownOptions, metadata: import("@vivliostyle/vfm").Metadata) => import("unified").Processor'
|
|
620
|
-
}),
|
|
621
|
-
v.description($`
|
|
622
|
-
Custom function to provide a unified Processor for converting markdown to HTML.
|
|
623
|
-
`)
|
|
624
|
-
),
|
|
636
|
+
documentProcessor: DocumentProcessorSchema,
|
|
637
|
+
documentMetadataReader: DocumentMetadataReaderSchema,
|
|
625
638
|
vfm: v.pipe(
|
|
626
639
|
v.union([VfmConfig]),
|
|
627
640
|
v.description($`
|
|
@@ -1079,6 +1092,8 @@ export {
|
|
|
1079
1092
|
StructuredDocument,
|
|
1080
1093
|
StructuredDocumentSection,
|
|
1081
1094
|
ValidString,
|
|
1095
|
+
DocumentProcessorSchema,
|
|
1096
|
+
DocumentMetadataReaderSchema,
|
|
1082
1097
|
ThemeConfig,
|
|
1083
1098
|
ThemeSpecifier,
|
|
1084
1099
|
ArticleEntryConfig,
|
|
@@ -1100,4 +1115,4 @@ export {
|
|
|
1100
1115
|
VivliostyleConfigSchema,
|
|
1101
1116
|
VivliostyleInlineConfig
|
|
1102
1117
|
};
|
|
1103
|
-
//# sourceMappingURL=chunk-
|
|
1118
|
+
//# sourceMappingURL=chunk-UYKCTF6F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/schema.ts"],"sourcesContent":["import { Metadata, StringifyMarkdownOptions } from '@vivliostyle/vfm';\nimport { satisfies as semverSatisfies } from 'semver';\nimport { type Processor } from 'unified';\nimport upath from 'upath';\nimport * as v from 'valibot';\nimport { cliVersion, CONTAINER_URL } from '../const.js';\nimport { LoggerInterface } from '../logger.js';\n\nconst $ = (strings: TemplateStringsArray, ...values: any[]) => {\n const lines = String.raw({ raw: strings }, ...values).split('\\n');\n const indent = lines\n .filter((line) => line.trim())\n .map((line) => line.match(/^\\s*/)?.[0].length ?? 0)\n .reduce((min, len) => Math.min(min, len), Infinity);\n return lines\n .map((line) => line.slice(indent))\n .join('\\n')\n .trim();\n};\n\n/**\n * @see https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md\n */\nexport type StructuredDocument = {\n title: string;\n href: string;\n children: StructuredDocument[];\n sections?: StructuredDocumentSection[];\n};\n/** @hidden */\nexport const StructuredDocument: v.GenericSchema<StructuredDocument> = v.pipe(\n v.object({\n title: v.string(),\n href: v.string(),\n children: v.array(v.lazy(() => StructuredDocument)),\n sections: v.optional(v.array(v.lazy(() => StructuredDocumentSection))),\n }),\n v.title('StructuredDocument'),\n);\n\n/**\n * @see https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md\n */\nexport type StructuredDocumentSection = {\n headingHtml: string;\n headingText: string;\n level: number;\n children: StructuredDocumentSection[];\n href?: string;\n id?: string;\n};\n/** @hidden */\nexport const StructuredDocumentSection: v.GenericSchema<StructuredDocumentSection> =\n v.pipe(\n v.object({\n headingHtml: v.string(),\n headingText: v.string(),\n level: v.number(),\n children: v.array(v.lazy(() => StructuredDocumentSection)),\n href: v.optional(v.string()),\n id: v.optional(v.string()),\n }),\n v.title('StructuredDocumentSection'),\n );\n\nexport const ValidString = v.pipe(\n v.string(),\n v.trim(),\n v.minLength(1, 'At least one character is required'),\n);\n\nexport const DocumentProcessorSchema = v.pipe(\n v.function() as v.GenericSchema<\n (option: StringifyMarkdownOptions, metadata: Metadata) => Processor\n >,\n v.metadata({\n typeString:\n '(option: import(\"@vivliostyle/vfm\").StringifyMarkdownOptions, metadata: import(\"@vivliostyle/vfm\").Metadata) => import(\"unified\").Processor',\n }),\n v.description($`\n Custom function to provide a unified Processor for converting the source document to HTML.\n `),\n);\n\nexport const DocumentMetadataReaderSchema = v.pipe(\n v.function() as v.GenericSchema<(content: string) => Metadata>,\n v.metadata({\n typeString: '(content: string) => import(\"@vivliostyle/vfm\").Metadata',\n }),\n v.description($`\n Custom function to extract metadata from the source document content.\n `),\n);\n\nexport const ThemeConfig = v.pipe(\n v.intersect([\n v.required(\n v.object({\n specifier: v.pipe(\n ValidString,\n v.description($`\n The specifier name for importing the theme package or the path to a CSS file.\n - An npm-style package argument is allowed (e.g., \\`@vivliostyle/theme-academic@1\\`, \\`./local-pkg\\`).\n - A URL or a local path to a CSS file is allowed (e.g., \\`./style.css\\`, \\`https://example.com/style.css\\`).\n `),\n ),\n }),\n 'Missing required field: specifier',\n ),\n v.partial(\n v.object({\n import: v.pipe(\n v.union([v.array(ValidString), ValidString]),\n v.transform((input) => [input].flat()),\n v.description($`\n The path(s) to the CSS file(s) to import from the package.\n Specify this if you want to import files other than the default.\n `),\n ),\n }),\n ),\n ]),\n v.title('ThemeConfig'),\n);\nexport type ThemeConfig = v.InferInput<typeof ThemeConfig>;\n\nexport const ThemeSpecifier = v.pipe(\n v.union([\n v.array(v.union([ThemeConfig, ValidString])),\n ThemeConfig,\n ValidString,\n ]),\n v.transform((input) =>\n [input]\n .flat()\n .map((item) => (typeof item === 'string' ? { specifier: item } : item)),\n ),\n);\nexport type ThemeSpecifier = v.InferInput<typeof ThemeSpecifier>;\n\nexport const ArticleEntryConfig = v.pipe(\n v.required(\n v.object({\n path: ValidString,\n output: v.optional(ValidString),\n title: v.optional(ValidString),\n theme: v.optional(ThemeSpecifier),\n encodingFormat: v.optional(ValidString),\n rel: v.optional(\n v.pipe(\n v.union([v.array(ValidString), ValidString]),\n v.transform((input) => [input].flat()),\n ),\n ),\n documentProcessor: v.optional(DocumentProcessorSchema),\n documentMetadataReader: v.optional(DocumentMetadataReaderSchema),\n }),\n ['path'],\n 'Missing required field: path',\n ),\n v.title('ArticleEntryConfig'),\n);\nexport type ArticleEntryConfig = v.InferInput<typeof ArticleEntryConfig>;\n\nconst PageBreak = v.union([\n v.literal('left'),\n v.literal('right'),\n v.literal('recto'),\n v.literal('verso'),\n]);\n\nexport const ContentsEntryConfig = v.pipe(\n v.object({\n rel: v.literal('contents'),\n path: v.optional(ValidString),\n output: v.optional(ValidString),\n title: v.optional(ValidString),\n theme: v.optional(ThemeSpecifier),\n pageBreakBefore: v.pipe(\n v.optional(PageBreak),\n v.description($`\n Specifies the page break position before this document.\n Useful for determining which side the first page of the document should be placed on in a two-page spread.\n `),\n ),\n pageCounterReset: v.pipe(\n v.optional(v.pipe(v.number(), v.safeInteger())),\n v.description($`\n Resets the starting page number of this document to the specified integer.\n Useful for controlling page numbers when including a page.\n `),\n ),\n }),\n v.title('ContentsEntryConfig'),\n);\nexport type ContentsEntryConfig = v.InferInput<typeof ContentsEntryConfig>;\n\nexport const CoverEntryConfig = v.pipe(\n v.object({\n rel: v.literal('cover'),\n path: v.optional(ValidString),\n output: v.optional(ValidString),\n title: v.optional(ValidString),\n theme: v.optional(ThemeSpecifier),\n imageSrc: v.optional(ValidString),\n imageAlt: v.optional(v.string()), // Allow empty string\n pageBreakBefore: v.pipe(\n v.optional(PageBreak),\n v.description($`\n Specifies the page break position before this document.\n Useful for determining which side the first page of the document should be placed on in a two-page spread.\n `),\n ),\n }),\n v.title('CoverEntryConfig'),\n);\nexport type CoverEntryConfig = v.InferInput<typeof CoverEntryConfig>;\n\nexport const EntryConfig = v.union([\n ContentsEntryConfig,\n CoverEntryConfig,\n ArticleEntryConfig,\n]);\nexport type EntryConfig = v.InferInput<typeof EntryConfig>;\n\nexport const OutputFormat = v.union([\n v.literal('pdf'),\n v.literal('epub'),\n v.literal('webpub'),\n]);\nexport type OutputFormat = v.InferInput<typeof OutputFormat>;\n\nexport const RenderMode = v.union([v.literal('local'), v.literal('docker')]);\nexport type RenderMode = v.InferInput<typeof RenderMode>;\n\nexport const OutputConfig = v.pipe(\n v.intersect([\n v.required(\n v.object({\n path: v.pipe(\n ValidString,\n v.description($`\n Specifies the output file name or directory. (default: \\`<title>.pdf\\`)\n `),\n ),\n }),\n 'Missing required field: path',\n ),\n v.partial(\n v.object({\n format: v.pipe(\n OutputFormat,\n v.description($`\n Specifies the output format.\n `),\n ),\n renderMode: v.pipe(\n RenderMode,\n v.description($`\n If set to \\`docker\\`, Vivliostyle will render the PDF using a Docker container. (default: \\`local\\`)\n `),\n ),\n preflight: v.pipe(\n v.union([v.literal('press-ready'), v.literal('press-ready-local')]),\n v.description($`\n Apply the process to generate a print-ready PDF.\n `),\n ),\n preflightOption: v.pipe(\n v.array(ValidString),\n v.description($`\n Options for the preflight process (e.g., \\`gray-scale\\`, \\`enforce-outline\\`).\n Refer to the press-ready documentation for more information: [press-ready](https://github.com/vibranthq/press-ready)\n `),\n ),\n }),\n ),\n ]),\n v.title('OutputConfig'),\n);\nexport type OutputConfig = v.InferInput<typeof OutputConfig>;\n\n// Use v.looseObject to allow unknown keys in future VFM versions\nexport const VfmReplaceRule = v.looseObject({\n test: v.instance(RegExp),\n match: v.pipe(\n v.function() as v.GenericSchema<\n (result: RegExpMatchArray, h: any) => Object | string\n >,\n // https://github.com/fabian-hiller/valibot/issues/243\n v.metadata({\n typeString: '(result: RegExpMatchArray, h: any) => Object | string',\n }),\n ),\n});\nexport type VfmReplaceRule = v.InferInput<typeof VfmReplaceRule>;\n\nexport const BrowserType = v.union([\n v.literal('chromium'),\n v.literal('firefox'),\n v.literal('webkit'),\n]);\nexport type BrowserType = v.InferInput<typeof BrowserType>;\n\nexport const ReadingProgression = v.union([v.literal('ltr'), v.literal('rtl')]);\nexport type ReadingProgression = v.InferInput<typeof ReadingProgression>;\n\nexport const LogLevel = v.union([\n v.literal('silent'),\n v.literal('info'),\n v.literal('verbose'),\n v.literal('debug'),\n]);\nexport type LogLevel = v.InferInput<typeof LogLevel>;\n\nconst notAllowedPatternRe = /(^\\s*[/\\\\]|^(.*[/\\\\])?\\s*\\.\\.\\s*([/\\\\].*)?$)/g;\nconst validateAssetPatternSettings = (propName: string) =>\n v.check<string[], string>(\n (input) => input.every((pattern) => !notAllowedPatternRe.test(pattern)),\n `Invalid pattern was found in copyAsset.${propName} option`,\n );\n\n// See the special characters of glob pattern\n// https://github.com/micromatch/picomatch\nconst notAllowedExtensionRe = /([\\\\/*?@+!|(){}[\\]]|\\.\\.|^\\s*\\.)/g;\nconst validateAssetExtensionSettings = (propName: string) =>\n v.check<string[], string>(\n (input) => input.every((pattern) => !notAllowedExtensionRe.test(pattern)),\n `Invalid pattern was found in copyAsset.${propName} option`,\n );\n\nexport const CopyAssetConfig = v.pipe(\n v.partial(\n v.object({\n includes: v.pipe(\n v.array(ValidString),\n validateAssetPatternSettings('includes'),\n v.description($`\n Directories and files to include as asset files. Supports wildcard characters for glob patterns.\n `),\n ),\n excludes: v.pipe(\n v.array(ValidString),\n validateAssetPatternSettings('excludes'),\n v.description($`\n Directories and files to exclude from asset files. Supports wildcard characters for glob patterns.\n `),\n ),\n includeFileExtensions: v.pipe(\n v.array(ValidString),\n validateAssetExtensionSettings('includeFileExtensions'),\n v.description($`\n File extensions to include as asset files. (default: \\`[css, css.map, png, jpg, jpeg, svg, gif, webp, apng, ttf, otf, woff, woff2]\\`)\n `),\n ),\n excludeFileExtensions: v.pipe(\n v.array(ValidString),\n validateAssetExtensionSettings('excludeFileExtensions'),\n v.description($`\n File extensions to exclude from asset files.\n `),\n ),\n }),\n ),\n v.title('CopyAssetConfig'),\n);\nexport type CopyAssetConfig = v.InferInput<typeof CopyAssetConfig>;\n\nexport const TocConfig = v.pipe(\n v.partial(\n v.object({\n title: v.pipe(\n ValidString,\n v.description($`\n Title of the generated ToC document.\n `),\n ),\n htmlPath: v.pipe(\n ValidString,\n v.description($`\n Location where the generated ToC document will be saved. (default: \\`index.html\\`)\n `),\n ),\n sectionDepth: v.pipe(\n v.number(),\n v.integer(),\n v.minValue(0),\n v.maxValue(6),\n v.description($`\n Depth of sections to include in the ToC document. (default: \\`0\\`)\n `),\n ),\n transformDocumentList: v.pipe(\n v.function() as v.GenericSchema<\n (\n nodeList: StructuredDocument[],\n ) => (propsList: { children: any }[]) => any\n >,\n v.metadata({\n typeString:\n '(nodeList: StructuredDocument[]) => (propsList: { children: any }[]) => any',\n typeReferences: [StructuredDocument],\n }),\n v.description($`\n Function to transform the document list.\n `),\n ),\n transformSectionList: v.pipe(\n v.function() as v.GenericSchema<\n (\n nodeList: StructuredDocumentSection[],\n ) => (propsList: { children: any }[]) => any\n >,\n v.metadata({\n typeString:\n '(nodeList: StructuredDocumentSection[]) => (propsList: { children: any }[]) => any',\n typeReferences: [StructuredDocumentSection],\n }),\n v.description($`\n Function to transform the section list.\n `),\n ),\n }),\n ),\n v.title('TocConfig'),\n);\nexport type TocConfig = v.InferInput<typeof TocConfig>;\n\nexport const CoverConfig = v.pipe(\n v.intersect([\n v.required(\n v.object({\n src: v.pipe(\n ValidString,\n v.description($`\n Path to the cover image for the cover page.\n `),\n ),\n }),\n 'Missing required field: src',\n ),\n v.partial(\n v.object({\n name: v.pipe(\n v.string(), // Allow empty string\n v.description($`\n Alternative text for the cover image.\n `),\n ),\n htmlPath: v.pipe(\n v.union([ValidString, v.boolean()]),\n v.description($`\n Path where the generated cover document will be saved. (default: \\`cover.html\\`)\n If set to a falsy value, the cover document will not be generated.\n `),\n ),\n }),\n ),\n ]),\n v.title('CoverConfig'),\n);\nexport type CoverConfig = v.InferInput<typeof CoverConfig>;\n\nconst VfmConfig = v.pipe(\n v.partial(\n // Use v.looseObject to allow unknown keys in future VFM versions\n v.looseObject({\n style: v.pipe(\n v.union([v.array(ValidString), ValidString]),\n\n v.transform((input) => [input].flat()),\n v.description($`\n Path(s) or URL(s) to custom stylesheets.\n `),\n ),\n partial: v.pipe(\n v.boolean(),\n v.description($`\n Output markdown fragments instead of a full document.\n `),\n ),\n title: v.pipe(\n ValidString,\n v.description($`\n Title of the document (ignored in partial mode).\n `),\n ),\n language: v.pipe(\n ValidString,\n v.description($`\n Language of the document (ignored in partial mode).\n `),\n ),\n replace: v.pipe(\n v.array(VfmReplaceRule),\n v.description($`\n Handlers for replacing matched HTML strings.\n `),\n ),\n hardLineBreaks: v.pipe(\n v.boolean(),\n v.description($`\n Insert \\`<br>\\` tags at hard line breaks without requiring spaces.\n `),\n ),\n disableFormatHtml: v.pipe(\n v.boolean(),\n v.description($`\n Disable automatic HTML formatting.\n `),\n ),\n math: v.pipe(\n v.boolean(),\n v.description($`\n Enable support for math syntax.\n `),\n ),\n }),\n ),\n v.title('VfmConfig'),\n);\nexport type VfmConfig = v.InferInput<typeof VfmConfig>;\n\nexport const ServerConfig = v.pipe(\n v.partial(\n v.object({\n host: v.pipe(\n v.union([v.boolean(), ValidString]),\n v.description($`\n IP address the server should listen on.\n Set to \\`true\\` to listen on all addresses.\n (default: \\`true\\` if a PDF build with Docker render mode is required, otherwise \\`false\\`)\n `),\n ),\n port: v.pipe(\n v.number(),\n v.minValue(0),\n v.maxValue(65535),\n v.description($`\n Port the server should listen on. (default: \\`13000\\`)\n `),\n ),\n proxy: v.pipe(\n v.record(\n ValidString,\n v.union([\n v.pipe(\n v.custom<import('vite').ProxyOptions>((value) =>\n Boolean(value && typeof value === 'object'),\n ),\n v.metadata({\n typeString: 'import(\"vite\").ProxyOptions',\n }),\n ),\n ValidString,\n ]),\n ),\n v.description($`\n Custom proxy rules for the Vivliostyle preview server.\n `),\n ),\n allowedHosts: v.pipe(\n v.union([v.array(ValidString), v.boolean()]),\n v.description($`\n The hostnames that are allowed to respond to.\n Set to \\`true\\` to allow all hostnames.\n See [\\`server.allowedHosts\\` option of Vite](https://vite.dev/config/server-options.html#server-allowedhosts) for more details.\n `),\n ),\n }),\n ),\n v.title('ServerConfig'),\n);\nexport type ServerConfig = v.InferInput<typeof ServerConfig>;\n\nexport const BuildTask = v.pipe(\n v.intersect([\n v.required(\n v.object({\n entry: v.pipe(\n v.union([\n v.pipe(\n v.array(v.union([ValidString, EntryConfig])),\n v.minLength(1, 'At least one entry is required'),\n ),\n ArticleEntryConfig,\n ValidString,\n ]),\n v.transform((input) =>\n [input]\n .flat()\n .map((item) =>\n typeof item === 'string' ? { path: item } : item,\n ),\n ),\n v.description($`\n Entry file(s) of the document.\n `),\n ),\n }),\n 'Missing required field: entry',\n ),\n v.partial(\n v.object({\n title: v.pipe(\n ValidString,\n v.description($`\n Title of the document.\n `),\n ),\n author: v.pipe(\n ValidString,\n v.description($`\n Author of the document.\n `),\n ),\n theme: v.pipe(\n ThemeSpecifier,\n v.description($`\n Theme package path(s) or URL(s) of the CSS file.\n `),\n ),\n entryContext: v.pipe(\n ValidString,\n v.description($`\n Directory containing the referenced entry file(s).\n `),\n ),\n output: v.pipe(\n v.union([\n v.array(v.union([OutputConfig, ValidString])),\n OutputConfig,\n ValidString,\n ]),\n v.transform((input): (OutputConfig & { format: OutputFormat })[] =>\n [input].flat().map((item) => {\n const obj = typeof item === 'string' ? { path: item } : item;\n const ext = upath.extname(obj.path).toLowerCase();\n return {\n ...obj,\n format:\n obj.format ||\n (ext === '.pdf'\n ? 'pdf'\n : ext === '.epub'\n ? 'epub'\n : 'webpub'),\n };\n }),\n ),\n v.description($`\n Output options.\n `),\n ),\n workspaceDir: v.pipe(\n ValidString,\n v.description($`\n Directory where intermediate files (e.g., manuscript HTMLs, publication.json) are saved. (default: \\`.vivliostyle\\`)\n `),\n ),\n /** @deprecated */\n includeAssets: v.pipe(\n v.union([v.array(ValidString), ValidString]),\n v.transform((input) => [input].flat()),\n v.metadata({ deprecated: true }),\n v.description($`\n Use \\`copyAsset.includes\\` instead.\n `),\n ),\n copyAsset: v.pipe(\n v.union([CopyAssetConfig]),\n v.description($`\n Options for asset files to be copied when exporting output.\n `),\n ),\n size: v.pipe(\n ValidString,\n v.description($`\n PDF output size. (default: \\`letter\\`)\n - Preset: \\`A5\\`, \\`A4\\`, \\`A3\\`, \\`B5\\`, \\`B4\\`, \\`JIS-B5\\`, \\`JIS-B4\\`, \\`letter\\`, \\`legal\\`, \\`ledger\\`\n - Custom (comma-separated): \\`182mm,257mm\\` or \\`8.5in,11in\\`\n `),\n ),\n pressReady: v.pipe(\n v.boolean(),\n v.description($`\n Generate a press-ready PDF compatible with PDF/X-1a. (default: \\`false\\`)\n This option is equivalent to setting \\`\"preflight\": \"press-ready\"\\`.\n `),\n ),\n language: v.pipe(\n ValidString,\n v.description($`\n Language of the document.\n `),\n ),\n readingProgression: v.pipe(\n ReadingProgression,\n v.description($`\n Specifies the reading progression of the document.\n This is typically determined automatically by the CSS writing-mode.\n Use this option only if explicit configuration is needed.\n `),\n ),\n toc: v.pipe(\n v.union([TocConfig, v.boolean(), ValidString]),\n v.transform((input) =>\n typeof input === 'string'\n ? { htmlPath: input }\n : input === true\n ? {}\n : input || undefined,\n ),\n v.description($`\n Options for Table of Contents (ToC) documents.\n `),\n ),\n /** @deprecated */\n tocTitle: v.pipe(\n ValidString,\n v.metadata({ deprecated: true }),\n v.description($`\n Use \\`toc.title\\` instead\n `),\n ),\n cover: v.pipe(\n v.union([CoverConfig, ValidString]),\n v.transform((input) =>\n typeof input === 'string' ? { src: input } : input,\n ),\n v.description($`\n Options for cover images and cover page documents.\n `),\n ),\n timeout: v.pipe(\n v.number(),\n v.minValue(0),\n v.description($`\n Timeout limit for waiting for the Vivliostyle process (in ms). (default: \\`300000\\`)\n `),\n ),\n documentProcessor: DocumentProcessorSchema,\n documentMetadataReader: DocumentMetadataReaderSchema,\n vfm: v.pipe(\n v.union([VfmConfig]),\n v.description($`\n Options for converting Markdown into a stringified format (HTML).\n `),\n ),\n image: v.pipe(\n ValidString,\n v.check((value) => {\n const [url, version] = value.split(':');\n if (url !== CONTAINER_URL || !/^\\d+(\\.\\d+){0,2}$/.test(version)) {\n return true;\n }\n return semverSatisfies(cliVersion, version);\n }, `The specified image is not compatible with the CLI version ${cliVersion}. Please check the image version.`),\n v.description($`\n Docker image used for rendering.\n `),\n ),\n /** @deprecated */\n http: v.pipe(\n v.boolean(),\n v.metadata({ deprecated: true }),\n v.description($`\n This option is enabled by default, and the file protocol is no longer supported.\n `),\n ),\n viewer: v.pipe(\n ValidString,\n v.description($`\n URL of a custom viewer to display content instead of the default Vivliostyle CLI viewer.\n Useful for using a custom viewer with staging features (e.g., \\`https://vivliostyle.vercel.app/\\`).\n `),\n ),\n viewerParam: v.pipe(\n ValidString,\n v.description($`\n Parameters for the Vivliostyle viewer (e.g., \\`allowScripts=false&pixelRatio=16\\`).\n `),\n ),\n browser: v.pipe(\n BrowserType,\n v.description($`\n EXPERIMENTAL SUPPORT: Specifies the browser type for launching the Vivliostyle viewer.\n Currently, Firefox and Webkit support only the preview command.\n `),\n ),\n base: v.pipe(\n ValidString,\n v.regex(/^\\//, 'Base path must start with a slash'),\n v.check((value) => value !== '/', 'Base path must not be root'),\n v.transform((value) => value.replace(/(?!^)\\/+$/, '')),\n v.description($`\n Base path of the served documents. (default: \\`/vivliostyle\\`)\n `),\n ),\n server: v.pipe(\n v.union([ServerConfig]),\n v.description($`\n Options for the preview server.\n `),\n ),\n static: v.pipe(\n v.record(\n v.pipe(\n ValidString,\n v.regex(/^\\//, 'Base path must start with a slash'),\n v.transform((value) => value.replace(/(?!^)\\/+$/, '')),\n ),\n v.pipe(\n v.union([v.array(ValidString), ValidString]),\n v.transform((input) => [input].flat()),\n ),\n ),\n v.description($`\n Specifies static files to be served by the preview server.\n \\`\\`\\`js\n export default {\n static: {\n '/static': 'path/to/static',\n '/': ['root1', 'root2'],\n },\n };\n \\`\\`\\`\n `),\n v.transform((input) => {\n return input;\n }),\n ),\n temporaryFilePrefix: v.pipe(\n ValidString,\n v.description($`\n Prefix for temporary file names.\n `),\n ),\n vite: v.pipe(\n v.custom<import('vite').UserConfig>(() => true),\n v.metadata({\n typeString: 'import(\"vite\").UserConfig',\n }),\n v.description($`\n Configuration options for the Vite server.\n `),\n ),\n viteConfigFile: v.pipe(\n v.union([ValidString, v.boolean()]),\n v.description($`\n Path to the Vite config file.\n If a falsy value is provided, Vivliostyle CLI ignores the existing Vite config file.\n `),\n ),\n }),\n ),\n ]),\n v.title('BuildTask'),\n);\nexport type BuildTask = v.InferInput<typeof BuildTask>;\nexport type ParsedBuildTask = v.InferOutput<typeof BuildTask>;\n\n/** @hidden */\nexport const VivliostyleConfigSchema = v.pipe(\n v.union([\n v.pipe(\n v.array(BuildTask),\n v.minLength(1, 'At least one config entry is required'),\n ),\n BuildTask,\n ]),\n v.transform(\n (\n input,\n ): {\n tasks: ParsedBuildTask[];\n inlineOptions: InlineOptions;\n } => ({\n tasks: [input].flat(),\n inlineOptions: {},\n }),\n ),\n v.title('VivliostyleConfigSchema'),\n);\n/**\n * @see https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md\n */\nexport type VivliostyleConfigSchema = v.InferInput<\n typeof VivliostyleConfigSchema\n>;\nexport type ParsedVivliostyleConfigSchema = v.InferOutput<\n typeof VivliostyleConfigSchema\n>;\n\nexport type InputFormat =\n | 'markdown'\n | 'webbook'\n | 'pub-manifest'\n | 'epub'\n | 'epub-opf';\n\nexport const VivliostyleInlineConfig = v.pipe(\n v.partial(\n v.object({\n cwd: v.pipe(\n ValidString,\n v.description($`\n Set a working directory.\n `),\n ),\n config: v.pipe(\n ValidString,\n v.description($`\n Path to vivliostyle.config.js.\n `),\n ),\n configData: v.pipe(\n v.custom<VivliostyleConfigSchema | null | undefined>(() => true),\n v.metadata({\n typeString: 'VivliostyleConfigSchema',\n }),\n v.description($`\n Vivliostyle config object.\n `),\n ),\n input: v.pipe(\n ValidString,\n v.transform((input): { format: InputFormat; entry: string } => {\n const ext = upath.extname(input).toLowerCase();\n if (/^(https?|data):/.test(input)) {\n return { format: 'webbook', entry: input };\n } else if (ext === '.md' || ext === '.markdown') {\n return { format: 'markdown', entry: input };\n } else if (ext === '.json' || ext === '.jsonld') {\n return { format: 'pub-manifest', entry: input };\n } else if (ext === '.epub') {\n return { format: 'epub', entry: input };\n } else if (ext === '.opf') {\n return { format: 'epub-opf', entry: input };\n } else if (['.html', '.htm', '.xhtml', '.xht'].includes(ext)) {\n return { format: 'webbook', entry: input };\n }\n throw new Error(`Cannot detect an input format: ${input}`);\n }),\n v.description($`\n Input file of document.\n `),\n ),\n output: v.pipe(\n v.union([\n v.array(v.union([OutputConfig, ValidString])),\n OutputConfig,\n ValidString,\n ]),\n v.transform((input): (OutputConfig & { format: OutputFormat })[] =>\n [input].flat().map((item) => {\n const obj = typeof item === 'string' ? { path: item } : item;\n const ext = upath.extname(obj.path).toLowerCase();\n return {\n ...obj,\n format:\n obj.format ||\n (ext === '.pdf' ? 'pdf' : ext === '.epub' ? 'epub' : 'webpub'),\n };\n }),\n ),\n v.description($`\n Output file name or directory.\n `),\n ),\n theme: v.pipe(\n ThemeSpecifier,\n v.description($`\n Theme path or package name.\n `),\n ),\n size: v.pipe(\n ValidString,\n v.description($`\n Output pdf size.\n preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger\n custom(comma separated): 182mm,257mm or 8.5in,11in\n `),\n ),\n cropMarks: v.pipe(\n v.boolean(),\n v.description($`\n Print crop marks.\n `),\n ),\n bleed: v.pipe(\n ValidString,\n v.description($`\n Extent of the bleed area for printing with crop marks. [3mm]\n `),\n ),\n cropOffset: v.pipe(\n ValidString,\n v.description($`\n Distance between the edge of the trim size and the edge of the media size. [auto (13mm + bleed)]\n `),\n ),\n css: v.pipe(\n ValidString,\n v.description($`\n Custom style CSS code. (ex: \":root {--my-color: lime;}\")\n `),\n ),\n style: v.pipe(\n ValidString,\n v.description($`\n Additional stylesheet URL or path.\n `),\n ),\n userStyle: v.pipe(\n ValidString,\n v.description($`\n User stylesheet URL or path.\n `),\n ),\n singleDoc: v.pipe(\n v.boolean(),\n v.description($`\n Single HTML document input.\n `),\n ),\n quick: v.pipe(\n v.boolean(),\n v.description($`\n Quick loading with rough page count.\n `),\n ),\n pressReady: v.pipe(\n v.boolean(),\n v.description($`\n Make generated PDF compatible with press ready PDF/X-1a.\n This option is equivalent with \"preflight\": \"press-ready\"\n `),\n ),\n title: v.pipe(ValidString, v.description($`Title`)),\n author: v.pipe(ValidString, v.description($`Author`)),\n language: v.pipe(ValidString, v.description($`Language`)),\n readingProgression: v.pipe(\n ReadingProgression,\n v.description($`\n Direction of reading progression.\n `),\n ),\n timeout: v.pipe(\n v.number(),\n v.minValue(0),\n v.description($`\n Timeout limit for waiting Vivliostyle process (ms).\n `),\n ),\n renderMode: v.pipe(\n RenderMode,\n v.description($`\n If docker is set, Vivliostyle try to render PDF on Docker container. [local]\n `),\n ),\n preflight: v.pipe(\n v.union([v.literal('press-ready'), v.literal('press-ready-local')]),\n v.description($`\n Apply the process to generate PDF for printing.\n `),\n ),\n preflightOption: v.pipe(\n v.union([v.array(ValidString), ValidString]),\n v.transform((input) => [input].flat()),\n v.description($`\n Options for preflight process (ex: gray-scale, enforce-outline).\n Please refer the document of press-ready for further information.\n `),\n ),\n sandbox: v.pipe(\n v.boolean(),\n v.description($`Launch chrome with sandbox.`),\n ),\n executableBrowser: v.pipe(\n ValidString,\n v.description($`\n Specify a path of executable browser you installed.\n `),\n ),\n image: v.pipe(\n ValidString,\n v.description($`\n Specify a docker image to render.\n `),\n ),\n viewer: v.pipe(\n ValidString,\n v.description($`\n Specify a URL of displaying viewer instead of vivliostyle-cli's one.\n It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)\n `),\n ),\n viewerParam: v.pipe(\n ValidString,\n v.description($`\n Specify viewer parameters. (ex: \"allowScripts=false&pixelRatio=16\")\n `),\n ),\n browser: v.pipe(\n BrowserType,\n v.description($`\n Specify a browser type to launch Vivliostyle viewer [chromium].\n `),\n ),\n proxyServer: v.pipe(\n ValidString,\n v.description($`\n HTTP/SOCK proxy server url for underlying Playwright.\n `),\n ),\n proxyBypass: v.pipe(\n ValidString,\n v.description($`\n Optional comma-separated domains to bypass proxy.\n `),\n ),\n proxyUser: v.pipe(\n ValidString,\n v.description($`\n Optional username for HTTP proxy authentication.\n `),\n ),\n proxyPass: v.pipe(\n ValidString,\n v.description($`\n Optional password for HTTP proxy authentication.\n `),\n ),\n logLevel: v.pipe(\n LogLevel,\n v.description($`\n Specify a log level of console outputs.\n `),\n ),\n ignoreHttpsErrors: v.pipe(\n v.boolean(),\n v.description($`\n true to ignore HTTPS errors when Playwright browser opens a new page.\n `),\n ),\n openViewer: v.pipe(\n v.boolean(),\n v.description($`\n Open a browser to display the document preview.\n `),\n ),\n enableStaticServe: v.pipe(\n v.boolean(),\n v.description($`\n Enable static file serving as configured in the Vivliostyle config file.\n `),\n ),\n enableViewerStartPage: v.pipe(\n v.boolean(),\n v.description($`\n Open a start page of the viewer when the input file is not specified.\n `),\n ),\n vite: v.pipe(\n v.custom<import('vite').UserConfig>(() => true),\n v.metadata({\n typeString: 'import(\"vite\").UserConfig',\n }),\n v.description($`\n Configuration options for the Vite server.\n `),\n ),\n viteConfigFile: v.pipe(\n v.union([ValidString, v.boolean()]),\n v.description($`\n Path to the Vite config file.\n If a falsy value is provided, Vivliostyle CLI ignores the existing Vite config file.\n `),\n ),\n host: v.pipe(\n v.union([v.boolean(), ValidString]),\n v.description($`\n IP address the server should listen on.\n Set to \\`true\\` to listen on all addresses.\n (default: \\`true\\` if a PDF build with Docker render mode is required, otherwise \\`false\\`)\n `),\n ),\n port: v.pipe(\n v.number(),\n v.minValue(0),\n v.maxValue(65535),\n v.description($`\n Port the server should listen on. (default: \\`13000\\`)\n `),\n ),\n logger: v.pipe(\n v.custom<LoggerInterface>(() => true),\n v.metadata({\n typeString: 'LoggerInterface',\n }),\n v.description($`\n Custom logger interface.\n `),\n ),\n disableServerStartup: v.pipe(\n v.boolean(),\n v.description($`\n Disable the startup of the preview server during the build process.\n `),\n ),\n }),\n ),\n v.check(\n (options) =>\n !options.input ||\n !options.output ||\n !['epub', 'epub-opf'].includes(options.input.format) ||\n options.output.every((o) => o.format !== 'webpub'),\n 'Exporting webpub format from EPUB or OPF file is not supported.',\n ),\n v.check(\n (options) =>\n !options.input ||\n !options.output ||\n !['epub', 'epub-opf'].includes(options.input.format) ||\n options.output.every((o) => o.format !== 'epub'),\n 'Exporting EPUB format from EPUB or OPF file is not supported.',\n ),\n v.title('VivliostyleInlineConfig'),\n);\nexport type VivliostyleInlineConfig = v.InferInput<\n typeof VivliostyleInlineConfig\n>;\nexport type ParsedVivliostyleInlineConfig = v.InferOutput<\n typeof VivliostyleInlineConfig\n>;\n\nexport type InlineOptions = Pick<\n ParsedVivliostyleInlineConfig,\n | 'cwd'\n | 'config'\n | 'configData'\n | 'input'\n | 'cropMarks'\n | 'bleed'\n | 'cropOffset'\n | 'css'\n | 'style'\n | 'userStyle'\n | 'singleDoc'\n | 'quick'\n | 'sandbox'\n | 'executableBrowser'\n | 'proxyServer'\n | 'proxyBypass'\n | 'proxyUser'\n | 'proxyPass'\n | 'logLevel'\n | 'ignoreHttpsErrors'\n | 'openViewer'\n | 'enableStaticServe'\n | 'enableViewerStartPage'\n | 'logger'\n | 'renderMode'\n | 'preflight'\n | 'preflightOption'\n | 'disableServerStartup'\n>;\n"],"mappings":";;;;;;AACA,SAAS,aAAa,uBAAuB;AAE7C,OAAO,W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AA,QACJ,QAAM,CAAG,UAAQ,GAAG,WAAW,CAAC;AAAA,QAChC,cAAY;AAAA;AAAA;AAAA;AAAA,SAIb;AAAA,MACH;AAAA,MACA,MAAQ;AAAA,QACJ,SAAO;AAAA,QACP,WAAS,CAAC;AAAA,QACV,WAAS,KAAK;AAAA,QACd,cAAY;AAAA;AAAA,SAEb;AAAA,MACH;AAAA,MACA,QAAU;AAAA,QACN,SAAwB,MAAM,IAAI;AAAA,QAClC,WAAS;AAAA,UACT,YAAY;AAAA,QACd,CAAC;AAAA,QACC,cAAY;AAAA;AAAA,SAEb;AAAA,MACH;AAAA,MACA,sBAAwB;AAAA,QACpB,UAAQ;AAAA,QACR,cAAY;AAAA;AAAA,SAEb;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EACE;AAAA,IACA,CAAC,YACC,CAAC,QAAQ,SACT,CAAC,QAAQ,UACT,CAAC,CAAC,QAAQ,UAAU,EAAE,SAAS,QAAQ,MAAM,MAAM,KACnD,QAAQ,OAAO,MAAM,CAAC,MAAM,EAAE,WAAW,QAAQ;AAAA,IACnD;AAAA,EACF;AAAA,EACE;AAAA,IACA,CAAC,YACC,CAAC,QAAQ,SACT,CAAC,QAAQ,UACT,CAAC,CAAC,QAAQ,UAAU,EAAE,SAAS,QAAQ,MAAM,MAAM,KACnD,QAAQ,OAAO,MAAM,CAAC,MAAM,EAAE,WAAW,MAAM;AAAA,IACjD;AAAA,EACF;AAAA,EACE,QAAM,yBAAyB;AACnC;","names":[]}
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
touchTmpFile,
|
|
27
27
|
useTmpDirectory,
|
|
28
28
|
writeFileIfChanged
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-G3GROLBN.js";
|
|
30
30
|
import {
|
|
31
31
|
VivliostyleConfigSchema
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UYKCTF6F.js";
|
|
33
33
|
import {
|
|
34
34
|
CONTAINER_LOCAL_HOSTNAME,
|
|
35
35
|
CONTAINER_URL,
|
|
@@ -220,6 +220,11 @@ function mergeInlineConfig({ tasks, inlineOptions }, inlineConfig) {
|
|
|
220
220
|
})),
|
|
221
221
|
inlineOptions: {
|
|
222
222
|
...pruneObject(inlineOptions),
|
|
223
|
+
...pruneObject({
|
|
224
|
+
renderMode,
|
|
225
|
+
preflight,
|
|
226
|
+
preflightOption
|
|
227
|
+
}),
|
|
223
228
|
...pruneObject(
|
|
224
229
|
overrideInlineOptions
|
|
225
230
|
)
|
|
@@ -228,7 +233,10 @@ function mergeInlineConfig({ tasks, inlineOptions }, inlineConfig) {
|
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
// src/config/resolve.ts
|
|
231
|
-
import {
|
|
236
|
+
import {
|
|
237
|
+
readMetadata,
|
|
238
|
+
VFM
|
|
239
|
+
} from "@vivliostyle/vfm";
|
|
232
240
|
import { lookup as mime } from "mime-types";
|
|
233
241
|
import fs3 from "node:fs";
|
|
234
242
|
import { fileURLToPath, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
@@ -236,31 +244,21 @@ import npa from "npm-package-arg";
|
|
|
236
244
|
import upath2 from "upath";
|
|
237
245
|
|
|
238
246
|
// src/processor/markdown.ts
|
|
239
|
-
import {
|
|
240
|
-
readMetadata
|
|
241
|
-
} from "@vivliostyle/vfm";
|
|
242
247
|
import fs2 from "node:fs";
|
|
243
248
|
import vfile from "vfile";
|
|
244
|
-
function
|
|
245
|
-
try {
|
|
246
|
-
return readMetadata(content);
|
|
247
|
-
} catch {
|
|
248
|
-
return {};
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
async function processMarkdown(documentProcessorFactory, filepath, options = {}) {
|
|
249
|
+
async function processMarkdown(documentProcessorFactory, documentMetadataReader, filepath, options = {}) {
|
|
252
250
|
const markdownString = fs2.readFileSync(filepath, "utf8");
|
|
253
251
|
const processor = documentProcessorFactory(
|
|
254
252
|
options,
|
|
255
|
-
|
|
253
|
+
documentMetadataReader(markdownString)
|
|
256
254
|
);
|
|
257
255
|
const processed = await processor.process(
|
|
258
256
|
vfile({ path: filepath, contents: markdownString })
|
|
259
257
|
);
|
|
260
258
|
return processed;
|
|
261
259
|
}
|
|
262
|
-
function readMarkdownMetadata(filepath) {
|
|
263
|
-
return
|
|
260
|
+
function readMarkdownMetadata(filepath, documentMetadataReader) {
|
|
261
|
+
return documentMetadataReader(fs2.readFileSync(filepath, "utf8"));
|
|
264
262
|
}
|
|
265
263
|
|
|
266
264
|
// src/config/resolve.ts
|
|
@@ -377,13 +375,14 @@ function parseFileMetadata({
|
|
|
377
375
|
contentType,
|
|
378
376
|
sourcePath,
|
|
379
377
|
workspaceDir,
|
|
380
|
-
themesDir
|
|
378
|
+
themesDir,
|
|
379
|
+
documentMetadataReader
|
|
381
380
|
}) {
|
|
382
381
|
const sourceDir = upath2.dirname(sourcePath);
|
|
383
382
|
let title;
|
|
384
383
|
let themes;
|
|
385
384
|
if (contentType === "text/markdown") {
|
|
386
|
-
const metadata = readMarkdownMetadata(sourcePath);
|
|
385
|
+
const metadata = readMarkdownMetadata(sourcePath, documentMetadataReader);
|
|
387
386
|
title = metadata.title;
|
|
388
387
|
if (metadata.vfm?.theme && themesDir) {
|
|
389
388
|
themes = [metadata.vfm.theme].flat().filter(
|
|
@@ -438,6 +437,7 @@ function resolveTaskConfig(config, options) {
|
|
|
438
437
|
const quick = options.quick ?? false;
|
|
439
438
|
const temporaryFilePrefix = config.temporaryFilePrefix ?? `.vs-${Date.now()}.`;
|
|
440
439
|
const documentProcessorFactory = config?.documentProcessor ?? VFM;
|
|
440
|
+
const documentMetadataReader = config?.documentMetadataReader ?? readMetadata;
|
|
441
441
|
const vfmOptions = {
|
|
442
442
|
...config?.vfm,
|
|
443
443
|
hardLineBreaks: config?.vfm?.hardLineBreaks ?? false,
|
|
@@ -558,7 +558,9 @@ function resolveTaskConfig(config, options) {
|
|
|
558
558
|
context,
|
|
559
559
|
temporaryFilePrefix,
|
|
560
560
|
themeIndexes,
|
|
561
|
-
base
|
|
561
|
+
base,
|
|
562
|
+
documentProcessorFactory,
|
|
563
|
+
documentMetadataReader
|
|
562
564
|
}) : resolveComposedProjectConfig({
|
|
563
565
|
config,
|
|
564
566
|
context,
|
|
@@ -566,7 +568,9 @@ function resolveTaskConfig(config, options) {
|
|
|
566
568
|
outputs,
|
|
567
569
|
temporaryFilePrefix,
|
|
568
570
|
themeIndexes,
|
|
569
|
-
cover
|
|
571
|
+
cover,
|
|
572
|
+
documentProcessorFactory,
|
|
573
|
+
documentMetadataReader
|
|
570
574
|
});
|
|
571
575
|
for (const output of outputs) {
|
|
572
576
|
const relPath = upath2.relative(context, output.path);
|
|
@@ -612,6 +616,7 @@ function resolveTaskConfig(config, options) {
|
|
|
612
616
|
language,
|
|
613
617
|
readingProgression,
|
|
614
618
|
documentProcessorFactory,
|
|
619
|
+
documentMetadataReader,
|
|
615
620
|
vfmOptions,
|
|
616
621
|
cover,
|
|
617
622
|
timeout,
|
|
@@ -638,7 +643,9 @@ function resolveSingleInputConfig({
|
|
|
638
643
|
context,
|
|
639
644
|
temporaryFilePrefix,
|
|
640
645
|
themeIndexes,
|
|
641
|
-
base
|
|
646
|
+
base,
|
|
647
|
+
documentProcessorFactory,
|
|
648
|
+
documentMetadataReader
|
|
642
649
|
}) {
|
|
643
650
|
Logger.debug("entering single entry config mode");
|
|
644
651
|
let serverRootDir;
|
|
@@ -694,7 +701,8 @@ function resolveSingleInputConfig({
|
|
|
694
701
|
const metadata = parseFileMetadata({
|
|
695
702
|
contentType,
|
|
696
703
|
sourcePath,
|
|
697
|
-
workspaceDir
|
|
704
|
+
workspaceDir,
|
|
705
|
+
documentMetadataReader
|
|
698
706
|
});
|
|
699
707
|
const target = upath2.resolve(
|
|
700
708
|
workspaceDir,
|
|
@@ -719,7 +727,9 @@ function resolveSingleInputConfig({
|
|
|
719
727
|
},
|
|
720
728
|
target,
|
|
721
729
|
title: metadata.title,
|
|
722
|
-
themes
|
|
730
|
+
themes,
|
|
731
|
+
documentProcessorFactory,
|
|
732
|
+
documentMetadataReader
|
|
723
733
|
});
|
|
724
734
|
exportAliases.push({
|
|
725
735
|
source: target,
|
|
@@ -802,7 +812,9 @@ function resolveComposedProjectConfig({
|
|
|
802
812
|
outputs,
|
|
803
813
|
temporaryFilePrefix,
|
|
804
814
|
themeIndexes,
|
|
805
|
-
cover
|
|
815
|
+
cover,
|
|
816
|
+
documentProcessorFactory,
|
|
817
|
+
documentMetadataReader
|
|
806
818
|
}) {
|
|
807
819
|
Logger.debug("entering composed project config mode");
|
|
808
820
|
const workspaceDir = upath2.resolve(
|
|
@@ -853,7 +865,7 @@ function resolveComposedProjectConfig({
|
|
|
853
865
|
const isCoverEntry = (entry) => entry.rel === "cover";
|
|
854
866
|
const isArticleEntry = (entry) => !isContentsEntry(entry) && !isCoverEntry(entry);
|
|
855
867
|
function parseEntry(entry) {
|
|
856
|
-
const getInputInfo = (entryPath) => {
|
|
868
|
+
const getInputInfo = (entryPath, options) => {
|
|
857
869
|
if (/^https?:/.test(entryPath)) {
|
|
858
870
|
return {
|
|
859
871
|
type: "uri",
|
|
@@ -875,6 +887,7 @@ function resolveComposedProjectConfig({
|
|
|
875
887
|
`Invalid manuscript type ${contentType} detected: ${entry}`
|
|
876
888
|
);
|
|
877
889
|
}
|
|
890
|
+
const effectiveMetadataReader = options?.entryDocumentMetadataReader ?? documentMetadataReader;
|
|
878
891
|
return {
|
|
879
892
|
type: "file",
|
|
880
893
|
pathname,
|
|
@@ -883,7 +896,8 @@ function resolveComposedProjectConfig({
|
|
|
883
896
|
contentType,
|
|
884
897
|
sourcePath: pathname,
|
|
885
898
|
workspaceDir,
|
|
886
|
-
themesDir
|
|
899
|
+
themesDir,
|
|
900
|
+
documentMetadataReader: effectiveMetadataReader
|
|
887
901
|
})
|
|
888
902
|
};
|
|
889
903
|
};
|
|
@@ -999,7 +1013,9 @@ Maybe you want to set the "output" field instead.`
|
|
|
999
1013
|
return parsedEntry;
|
|
1000
1014
|
}
|
|
1001
1015
|
if (isArticleEntry(entry)) {
|
|
1002
|
-
const inputInfo = getInputInfo(entry.path
|
|
1016
|
+
const inputInfo = getInputInfo(entry.path, {
|
|
1017
|
+
entryDocumentMetadataReader: entry.documentMetadataReader
|
|
1018
|
+
});
|
|
1003
1019
|
const { metadata, ...source } = inputInfo;
|
|
1004
1020
|
const target = entry.output ? upath2.resolve(workspaceDir, entry.output) : getTargetPath(inputInfo);
|
|
1005
1021
|
const themes = entry.theme ? [entry.theme].flat().map(
|
|
@@ -1012,7 +1028,10 @@ Maybe you want to set the "output" field instead.`
|
|
|
1012
1028
|
target,
|
|
1013
1029
|
title: entry.title ?? metadata?.title ?? projectTitle,
|
|
1014
1030
|
themes,
|
|
1015
|
-
...entry.rel && { rel: entry.rel }
|
|
1031
|
+
...entry.rel && { rel: entry.rel },
|
|
1032
|
+
// Use per-entry settings if specified, otherwise fall back to global settings
|
|
1033
|
+
documentProcessorFactory: entry.documentProcessor ?? documentProcessorFactory,
|
|
1034
|
+
documentMetadataReader: entry.documentMetadataReader ?? documentMetadataReader
|
|
1016
1035
|
};
|
|
1017
1036
|
return parsedEntry;
|
|
1018
1037
|
}
|
|
@@ -3097,7 +3116,6 @@ async function transformManuscript(entry, {
|
|
|
3097
3116
|
title,
|
|
3098
3117
|
entries,
|
|
3099
3118
|
language,
|
|
3100
|
-
documentProcessorFactory,
|
|
3101
3119
|
vfmOptions,
|
|
3102
3120
|
rootUrl
|
|
3103
3121
|
}) {
|
|
@@ -3110,8 +3128,10 @@ async function transformManuscript(entry, {
|
|
|
3110
3128
|
);
|
|
3111
3129
|
if (source?.type === "file") {
|
|
3112
3130
|
if (source.contentType === "text/markdown") {
|
|
3131
|
+
const manuscriptEntry = entry;
|
|
3113
3132
|
const vfile2 = await processMarkdown(
|
|
3114
|
-
documentProcessorFactory,
|
|
3133
|
+
manuscriptEntry.documentProcessorFactory,
|
|
3134
|
+
manuscriptEntry.documentMetadataReader,
|
|
3115
3135
|
source.pathname,
|
|
3116
3136
|
{
|
|
3117
3137
|
...vfmOptions,
|
|
@@ -3985,4 +4005,4 @@ export {
|
|
|
3985
4005
|
getViewerFullUrl,
|
|
3986
4006
|
createViteServer
|
|
3987
4007
|
};
|
|
3988
|
-
//# sourceMappingURL=chunk-
|
|
4008
|
+
//# sourceMappingURL=chunk-WELNNHOB.js.map
|