vizmatic 0.1.0 → 0.1.1
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/cli.js +12 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -9,17 +9,24 @@ import { mkdir, readFile, readdir, writeFile } from "fs/promises";
|
|
|
9
9
|
import { basename, extname, join, relative, resolve } from "path";
|
|
10
10
|
import { pathToFileURL } from "url";
|
|
11
11
|
var RENDER_EXTENSIONS = /* @__PURE__ */ new Set([".js", ".jsx", ".mjs", ".ts", ".tsx"]);
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function usageText() {
|
|
13
|
+
return `Usage:
|
|
14
14
|
vizmatic render <file-or-directory...> --out <dir> [--theme dark,light] [--watermark Label] [--watermark-image path-or-url] [--watermark-position top-right] [--no-crop] [--force]
|
|
15
15
|
vizmatic gif <file-or-directory...> --out <dir> [--theme dark] [--watermark Label] [--watermark-image path-or-url] [--watermark-position top-right] [--scale 1]
|
|
16
16
|
|
|
17
17
|
Examples:
|
|
18
18
|
vizmatic render examples --out docs/assets/examples --theme dark --watermark Vizmatic
|
|
19
19
|
vizmatic render frames/attention.tsx --out dist/frames --theme dark,light
|
|
20
|
-
vizmatic gif examples/animated-pipeline.tsx --out docs/assets/examples --theme dark --watermark Vizmatic
|
|
20
|
+
vizmatic gif examples/animated-pipeline.tsx --out docs/assets/examples --theme dark --watermark Vizmatic`;
|
|
21
|
+
}
|
|
22
|
+
function usage() {
|
|
23
|
+
console.error(usageText());
|
|
21
24
|
process.exit(1);
|
|
22
25
|
}
|
|
26
|
+
function help() {
|
|
27
|
+
console.log(usageText());
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
23
30
|
var WATERMARK_POSITIONS = /* @__PURE__ */ new Set(["top-left", "top-right", "bottom-left", "bottom-right"]);
|
|
24
31
|
var IMAGE_MIME_BY_EXT = {
|
|
25
32
|
".apng": "image/apng",
|
|
@@ -293,6 +300,8 @@ async function main() {
|
|
|
293
300
|
await renderCommand(rest);
|
|
294
301
|
} else if (command === "gif") {
|
|
295
302
|
await gifCommand(rest);
|
|
303
|
+
} else if (!command || command === "help" || command === "--help" || command === "-h") {
|
|
304
|
+
help();
|
|
296
305
|
} else {
|
|
297
306
|
usage();
|
|
298
307
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vizmatic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Theme-aware visual primitives and render pipeline for AI-generated diagrams, figures, and presentation frames.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"bin": {
|
|
50
|
-
"vizmatic": "
|
|
50
|
+
"vizmatic": "dist/cli.js"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsup src/index.ts src/cli.ts --format esm --dts --target node20 --clean --external react",
|