@vutex/vutex 0.0.16 → 0.0.17
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/package.json +6 -6
- package/src/runtime.ts +1 -1
- package/src/types.ts +9 -3
package/package.json
CHANGED
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"license": "MPL-2.0",
|
|
32
32
|
"name": "@vutex/vutex",
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@vutex/vutex-darwin-arm64": "0.0.
|
|
35
|
-
"@vutex/vutex-darwin-x64": "0.0.
|
|
36
|
-
"@vutex/vutex-linux-arm64": "0.0.
|
|
37
|
-
"@vutex/vutex-linux-x64": "0.0.
|
|
38
|
-
"@vutex/vutex-win32-x64": "0.0.
|
|
34
|
+
"@vutex/vutex-darwin-arm64": "0.0.17",
|
|
35
|
+
"@vutex/vutex-darwin-x64": "0.0.17",
|
|
36
|
+
"@vutex/vutex-linux-arm64": "0.0.17",
|
|
37
|
+
"@vutex/vutex-linux-x64": "0.0.17",
|
|
38
|
+
"@vutex/vutex-win32-x64": "0.0.17"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"typecheck": "tsc --noEmit"
|
|
51
51
|
},
|
|
52
52
|
"type": "module",
|
|
53
|
-
"version": "0.0.
|
|
53
|
+
"version": "0.0.17"
|
|
54
54
|
}
|
package/src/runtime.ts
CHANGED
|
@@ -120,7 +120,7 @@ export function createVuTeXRuntime(
|
|
|
120
120
|
async function render(inputPath: string, renderOptions: RenderDocumentOptions = {}): Promise<RenderDocumentResult> {
|
|
121
121
|
const manifest = await readManifest(projectRoot);
|
|
122
122
|
const outputFormat = normalizeOutputFormat(renderOptions.output ?? manifest?.document?.output);
|
|
123
|
-
const inputFormat = renderOptions.input ?? manifest?.document?.input ?? formatFromPath(inputPath);
|
|
123
|
+
const inputFormat = renderOptions.input ?? manifest?.document?.input ?? defaults.input ?? formatFromPath(inputPath);
|
|
124
124
|
const explicitTheme = typeof renderOptions.theme === "string" && renderOptions.theme.length > 0
|
|
125
125
|
? renderOptions.theme
|
|
126
126
|
: undefined;
|
package/src/types.ts
CHANGED
|
@@ -7,13 +7,19 @@ export type CreateVuTeXOptions = {
|
|
|
7
7
|
host?: VuTeXHost;
|
|
8
8
|
backend?: VuTeXBackend;
|
|
9
9
|
/**
|
|
10
|
-
* Fallback theme
|
|
11
|
-
* manifest picks one. Distributions such as `@vutex/latex` set
|
|
12
|
-
* preset never has to write into the user's project.
|
|
10
|
+
* Fallback theme, math face and input format when neither the render call
|
|
11
|
+
* nor the manifest picks one. Distributions such as `@vutex/latex` set
|
|
12
|
+
* these so a preset never has to write into the user's project.
|
|
13
13
|
*/
|
|
14
14
|
defaults?: {
|
|
15
15
|
theme?: string;
|
|
16
16
|
mathFont?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Input format used when the render call and the manifest stay silent.
|
|
19
|
+
* An input distribution such as `@vutex/typst` sets this so files with
|
|
20
|
+
* no recognised extension still reach the right adapter.
|
|
21
|
+
*/
|
|
22
|
+
input?: string;
|
|
17
23
|
};
|
|
18
24
|
};
|
|
19
25
|
|