@gehdoc/svg-to-video 0.26.0 → 0.27.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/README.md +2 -2
- package/dist/src/index.js +3 -3
- package/dist/src/mcp.js +1 -1
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ A high-fidelity tool to transform your CSS-animated SVGs into high-quality video
|
|
|
24
24
|
- **Transparent Backgrounds**: Export your animations with a full alpha channel using **WebM or aPNG**, and optimized indexed transparency with **GIF89a**. Perfect for overlays in video editing tools or web use.
|
|
25
25
|
- **Privacy-First**: The Web Studio runs entirely in your browser—your SVG files never leave your computer.
|
|
26
26
|
- **Frame-Accurate**: Our engine scrubs the **Web Animations API**, ensuring every frame is captured exactly as rendered.
|
|
27
|
-
- **AI Agent Native**: Native **Model Context Protocol (MCP)** server and **Agent Skill (`SKILL.md`)** support to let AI assistants render their generated SVG animations into MP4/GIF automatically.
|
|
27
|
+
- **AI Agent Native**: Native **Model Context Protocol (MCP)** server and **Agent Skill (`SKILL.md`)** support indexed on the official [MCP Registry](https://registry.modelcontextprotocol.io/) (`mcp.json`) to let AI assistants render their generated SVG animations into MP4/GIF automatically.
|
|
28
28
|
- **Universal Animated Formats**: Beyond video, generate lightweight **Animated PNGs (aPNG)** and **GIFs** perfect for documentation, Slack, or GitHub, with full control over background transparency.
|
|
29
29
|
- **Copy to Clipboard**: Instant export to **Base64 Data URL**—copy your video and embed it directly into your HTML, CSS, or JS code without manual downloads. Perfect for rapid prototyping and developers.
|
|
30
30
|
- **Metadata Injection**: Support for custom titles and comments across video (MP4, WebM, MKV, MOV) and animated image (aPNG, GIF) formats.
|
|
@@ -86,7 +86,7 @@ npx @gehdoc/svg-to-video input.svg 60 ./out-dir -d 5 --format apng
|
|
|
86
86
|
docker run --rm -v $(pwd):/data:Z gehdoc/svg-to-video /data/input.svg 60 /data/out-dir -d 5 --format gif
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
See [docs/CLI.md](./docs/CLI.md) for full usage, arguments, and options.
|
|
89
|
+
See [docs/CLI.md](./docs/CLI.md) for full usage, arguments, and options. For local building and source execution, see [CONTRIBUTING.md](./CONTRIBUTING.md#commands--testing-strategy).
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
package/dist/src/index.js
CHANGED
|
@@ -4,15 +4,15 @@ import child_process from 'child_process';
|
|
|
4
4
|
import puppeteer from 'puppeteer';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import path from 'path';
|
|
7
|
-
import { seekAnimations } from '
|
|
7
|
+
import { seekAnimations } from '#shared/animation-engine.js';
|
|
8
8
|
import { validateOptions } from './utils/validateOptions.js';
|
|
9
|
-
import { analyzeSvgAnimation, parseSvgDimensions, calculateAspectRatio, } from '
|
|
9
|
+
import { analyzeSvgAnimation, parseSvgDimensions, calculateAspectRatio, } from '#shared/analyzeSvgAnimation.js';
|
|
10
10
|
import { formatRegistry } from './formats/registry.js';
|
|
11
11
|
import { pkg } from './utils/packageInfo.js';
|
|
12
12
|
import { JSDOM } from 'jsdom'; // For duration detection in Node environment
|
|
13
13
|
import { Logger } from './utils/logger.js';
|
|
14
14
|
import { trackEvent } from './utils/analytics.js';
|
|
15
|
-
import { ConversionTracker } from '
|
|
15
|
+
import { ConversionTracker } from '#shared/rendererTracking.js';
|
|
16
16
|
const frameFileExtension = 'png';
|
|
17
17
|
async function main() {
|
|
18
18
|
const program = new Command();
|
package/dist/src/mcp.js
CHANGED
|
@@ -8,7 +8,7 @@ import os from 'os';
|
|
|
8
8
|
import { execFileSync } from 'child_process';
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
10
|
import { JSDOM } from 'jsdom';
|
|
11
|
-
import { analyzeSvgAnimation, parseSvgDimensions, calculateAspectRatio, } from '
|
|
11
|
+
import { analyzeSvgAnimation, parseSvgDimensions, calculateAspectRatio, } from '#shared/analyzeSvgAnimation.js';
|
|
12
12
|
import { isLoggerJsonOutput } from './utils/logger.js';
|
|
13
13
|
import { trackEvent } from './utils/analytics.js';
|
|
14
14
|
import { pkg } from './utils/packageInfo.js';
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gehdoc/svg-to-video",
|
|
3
|
-
"
|
|
3
|
+
"mcpName": "io.github.gehdoc/svg-to-video",
|
|
4
|
+
"version": "0.27.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"description": "Professional animated SVG to Video (MP4/WebM/MKV/MOV) and Animated Image (aPNG/GIF) converter featuring frame-accurate rendering, CLI automation, and a serverless Web Studio.",
|
|
6
7
|
"imports": {
|
|
7
|
-
"#shared/*": "./dist/shared/*"
|
|
8
|
-
"@shared/*": "./dist/shared/*"
|
|
8
|
+
"#shared/*": "./dist/shared/*"
|
|
9
9
|
},
|
|
10
10
|
"author": "GehDoc",
|
|
11
11
|
"repository": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"tsx": "^4.23.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
+
"@eslint/js": "^9.39.4",
|
|
64
65
|
"@types/commander": "^2.12.0",
|
|
65
66
|
"@types/ffprobe-static": "^2.0.3",
|
|
66
67
|
"@types/jsdom": "^28.0.3",
|
|
@@ -68,15 +69,16 @@
|
|
|
68
69
|
"@types/pngjs": "^6.0.5",
|
|
69
70
|
"@vitest/browser-playwright": "4.1.11",
|
|
70
71
|
"@vitest/coverage-v8": "4.1.11",
|
|
71
|
-
"eslint": "^
|
|
72
|
+
"eslint": "^9.39.4",
|
|
72
73
|
"ffprobe": "^1.1.2",
|
|
73
74
|
"ffprobe-static": "^3.1.0",
|
|
75
|
+
"globals": "^17.4.0",
|
|
74
76
|
"husky": "^9.1.7",
|
|
75
77
|
"lint-staged": "^16.3.2",
|
|
76
78
|
"pngjs": "^7.0.0",
|
|
77
79
|
"prettier": "^3.8.1",
|
|
78
80
|
"prettier-plugin-sh": "^0.19.0",
|
|
79
|
-
"typescript": "^
|
|
81
|
+
"typescript": "^6.0.3",
|
|
80
82
|
"typescript-eslint": "^8.69.0",
|
|
81
83
|
"vitest": "4.1.11"
|
|
82
84
|
},
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
"mcp": "tsx src/mcp.ts",
|
|
91
93
|
"test:cli": "tsx --test tests/cli.spec.ts",
|
|
92
94
|
"test:mcp": "tsx --test tests/mcp.spec.ts",
|
|
93
|
-
"test:pack": "tsx --test tests/pack.spec.ts",
|
|
95
|
+
"test:pack": "npm run build && tsx --test tests/pack.spec.ts",
|
|
94
96
|
"test:unit": "tsx --test src/**/*.test.ts tests/**/*.test.ts && vitest run shared/*.test.ts && npm run test:unit -w web",
|
|
95
97
|
"test": "npm run test:cli && npm run test:mcp && npm run test:pack && npm run test:unit && npm run test:web -w web && npm run test:storybook -w web && npm run test:visual -w web",
|
|
96
98
|
"type-check": "tsc -p tsconfig.json --noEmit && npm run type-check -w web",
|