shellfie-cli 2.0.0 → 2.0.2
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 +1 -1
- package/dist/animator.d.ts +8 -0
- package/dist/animator.d.ts.map +1 -0
- package/dist/animator.js +210 -0
- package/dist/animator.js.map +1 -0
- package/dist/cli.js +16 -1
- package/dist/cli.js.map +1 -1
- package/dist/dvd-executor-v2.d.ts +76 -0
- package/dist/dvd-executor-v2.d.ts.map +1 -0
- package/dist/dvd-executor-v2.js +258 -0
- package/dist/dvd-executor-v2.js.map +1 -0
- package/dist/dvd-executor.d.ts +144 -0
- package/dist/dvd-executor.d.ts.map +1 -0
- package/dist/dvd-executor.js +669 -0
- package/dist/dvd-executor.js.map +1 -0
- package/dist/dvd-parser.d.ts +96 -0
- package/dist/dvd-parser.d.ts.map +1 -0
- package/dist/dvd-parser.js +279 -0
- package/dist/dvd-parser.js.map +1 -0
- package/dist/dvd.d.ts +31 -0
- package/dist/dvd.d.ts.map +1 -0
- package/dist/dvd.js +154 -0
- package/dist/dvd.js.map +1 -0
- package/dist/frame-animator.d.ts +21 -0
- package/dist/frame-animator.d.ts.map +1 -0
- package/dist/frame-animator.js +254 -0
- package/dist/frame-animator.js.map +1 -0
- package/dist/frame-capture.d.ts +16 -0
- package/dist/frame-capture.d.ts.map +1 -0
- package/dist/frame-capture.js +162 -0
- package/dist/frame-capture.js.map +1 -0
- package/dist/svg-animator-v2.d.ts +23 -0
- package/dist/svg-animator-v2.d.ts.map +1 -0
- package/dist/svg-animator-v2.js +134 -0
- package/dist/svg-animator-v2.js.map +1 -0
- package/dist/svg-animator.d.ts +23 -0
- package/dist/svg-animator.d.ts.map +1 -0
- package/dist/svg-animator.js +134 -0
- package/dist/svg-animator.js.map +1 -0
- package/dist/terminal-renderer.d.ts +34 -0
- package/dist/terminal-renderer.d.ts.map +1 -0
- package/dist/terminal-renderer.js +229 -0
- package/dist/terminal-renderer.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG Animator
|
|
3
|
+
* Combines pre-rendered terminal SVGs into animated SVG
|
|
4
|
+
*/
|
|
5
|
+
import type { TerminalFrame } from './dvd-executor';
|
|
6
|
+
export interface AnimationOptions {
|
|
7
|
+
fps?: number;
|
|
8
|
+
loop?: boolean;
|
|
9
|
+
pauseAtEnd?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create animated SVG from frames
|
|
13
|
+
*/
|
|
14
|
+
export declare function createAnimatedSVG(frames: TerminalFrame[], options?: AnimationOptions): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Get animation metadata
|
|
17
|
+
*/
|
|
18
|
+
export declare function getAnimationMetadata(frames: TerminalFrame[]): {
|
|
19
|
+
duration: number;
|
|
20
|
+
frameCount: number;
|
|
21
|
+
fps: number;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=svg-animator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-animator.d.ts","sourceRoot":"","sources":["../src/svg-animator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAyED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EAAE,EACvB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAqDjB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,CAUA"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SVG Animator
|
|
4
|
+
* Combines pre-rendered terminal SVGs into animated SVG
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createAnimatedSVG = createAnimatedSVG;
|
|
8
|
+
exports.getAnimationMetadata = getAnimationMetadata;
|
|
9
|
+
/**
|
|
10
|
+
* Extract SVG body content (everything inside <svg>)
|
|
11
|
+
*/
|
|
12
|
+
function extractSVGBody(svg, frameId) {
|
|
13
|
+
const contentMatch = svg.match(/<svg[^>]*>([\s\S]*)<\/svg>/);
|
|
14
|
+
if (!contentMatch)
|
|
15
|
+
return '';
|
|
16
|
+
let content = contentMatch[1];
|
|
17
|
+
// Make IDs unique
|
|
18
|
+
content = content
|
|
19
|
+
.replace(/id="([^"]*)"/g, `id="$1-${frameId}"`)
|
|
20
|
+
.replace(/url\(#([^)]*)\)/g, `url(#$1-${frameId})`)
|
|
21
|
+
.replace(/class="([^"]*)"/g, `class="$1 ${frameId}"`);
|
|
22
|
+
return content;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get SVG dimensions from first frame
|
|
26
|
+
*/
|
|
27
|
+
function getSVGDimensions(svg) {
|
|
28
|
+
const widthMatch = svg.match(/width="(\d+)"/);
|
|
29
|
+
const heightMatch = svg.match(/height="(\d+)"/);
|
|
30
|
+
return {
|
|
31
|
+
width: widthMatch ? parseInt(widthMatch[1], 10) : 800,
|
|
32
|
+
height: heightMatch ? parseInt(heightMatch[1], 10) : 600,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create CSS keyframes for animation
|
|
37
|
+
*/
|
|
38
|
+
function createKeyframes(frames) {
|
|
39
|
+
if (frames.length === 0)
|
|
40
|
+
return '';
|
|
41
|
+
const totalDuration = frames[frames.length - 1].timestamp;
|
|
42
|
+
let css = '';
|
|
43
|
+
frames.forEach((frame, i) => {
|
|
44
|
+
const startPercent = i === 0 ? 0 : (frames[i - 1].timestamp / totalDuration) * 100;
|
|
45
|
+
const endPercent = (frame.timestamp / totalDuration) * 100;
|
|
46
|
+
const nextPercent = i < frames.length - 1
|
|
47
|
+
? (frames[i + 1].timestamp / totalDuration) * 100
|
|
48
|
+
: 100;
|
|
49
|
+
css += `
|
|
50
|
+
@keyframes frame-${i}-anim {
|
|
51
|
+
0% { opacity: 0; }
|
|
52
|
+
${startPercent.toFixed(2)}% { opacity: 0; }
|
|
53
|
+
${endPercent.toFixed(2)}% { opacity: 1; }
|
|
54
|
+
${nextPercent.toFixed(2)}% { opacity: 1; }
|
|
55
|
+
${(nextPercent + 0.01).toFixed(2)}% { opacity: 0; }
|
|
56
|
+
100% { opacity: 0; }
|
|
57
|
+
}`;
|
|
58
|
+
});
|
|
59
|
+
// First frame special case
|
|
60
|
+
const firstEnd = (frames[1]?.timestamp / totalDuration) * 100 || 100;
|
|
61
|
+
css = `
|
|
62
|
+
@keyframes frame-0-anim {
|
|
63
|
+
0% { opacity: 1; }
|
|
64
|
+
${firstEnd.toFixed(2)}% { opacity: 1; }
|
|
65
|
+
${(firstEnd + 0.01).toFixed(2)}% { opacity: 0; }
|
|
66
|
+
100% { opacity: 0; }
|
|
67
|
+
}` + css.substring(css.indexOf('@keyframes frame-1-anim'));
|
|
68
|
+
return css;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Create animated SVG from frames
|
|
72
|
+
*/
|
|
73
|
+
async function createAnimatedSVG(frames, options = {}) {
|
|
74
|
+
if (frames.length === 0) {
|
|
75
|
+
throw new Error('No frames to animate');
|
|
76
|
+
}
|
|
77
|
+
// Get dimensions from first frame
|
|
78
|
+
const { width, height } = getSVGDimensions(frames[0].svg);
|
|
79
|
+
// Calculate duration
|
|
80
|
+
const totalDuration = frames[frames.length - 1].timestamp;
|
|
81
|
+
const pauseAtEnd = options.pauseAtEnd || 1000;
|
|
82
|
+
const animationDuration = ((totalDuration + pauseAtEnd) / 1000).toFixed(2);
|
|
83
|
+
const animationIterationCount = options.loop !== false ? 'infinite' : '1';
|
|
84
|
+
// Create keyframes
|
|
85
|
+
const keyframes = createKeyframes(frames);
|
|
86
|
+
// Extract frame contents
|
|
87
|
+
const frameBodies = frames.map((frame, i) => ({
|
|
88
|
+
id: `frame-${i}`,
|
|
89
|
+
content: extractSVGBody(frame.svg, `f${i}`),
|
|
90
|
+
}));
|
|
91
|
+
// Build animated SVG
|
|
92
|
+
const svg = `<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg">
|
|
93
|
+
<style>
|
|
94
|
+
${keyframes}
|
|
95
|
+
|
|
96
|
+
.frame {
|
|
97
|
+
animation-duration: ${animationDuration}s;
|
|
98
|
+
animation-timing-function: step-end;
|
|
99
|
+
animation-iteration-count: ${animationIterationCount};
|
|
100
|
+
animation-fill-mode: forwards;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
${frames.map((_, i) => `
|
|
104
|
+
.frame-${i} {
|
|
105
|
+
animation-name: frame-${i}-anim;
|
|
106
|
+
}`).join('')}
|
|
107
|
+
</style>
|
|
108
|
+
|
|
109
|
+
<defs>
|
|
110
|
+
${frameBodies.map((frame) => `
|
|
111
|
+
<g id="${frame.id}">
|
|
112
|
+
${frame.content}
|
|
113
|
+
</g>`).join('')}
|
|
114
|
+
</defs>
|
|
115
|
+
|
|
116
|
+
${frameBodies.map((frame, i) => `
|
|
117
|
+
<use href="#${frame.id}" class="frame frame-${i}" />`).join('')}
|
|
118
|
+
</svg>`;
|
|
119
|
+
return svg;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get animation metadata
|
|
123
|
+
*/
|
|
124
|
+
function getAnimationMetadata(frames) {
|
|
125
|
+
const duration = frames.length > 0 ? frames[frames.length - 1].timestamp : 0;
|
|
126
|
+
const frameCount = frames.length;
|
|
127
|
+
const fps = frameCount > 1 ? frameCount / (duration / 1000) : 0;
|
|
128
|
+
return {
|
|
129
|
+
duration,
|
|
130
|
+
frameCount,
|
|
131
|
+
fps: Math.round(fps * 10) / 10,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=svg-animator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-animator.js","sourceRoot":"","sources":["../src/svg-animator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAoFH,8CAwDC;AAKD,oDAcC;AArJD;;GAEG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,OAAe;IAClD,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC7D,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,IAAI,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IAE9B,kBAAkB;IAClB,OAAO,GAAG,OAAO;SACd,OAAO,CAAC,eAAe,EAAE,UAAU,OAAO,GAAG,CAAC;SAC9C,OAAO,CAAC,kBAAkB,EAAE,WAAW,OAAO,GAAG,CAAC;SAClD,OAAO,CAAC,kBAAkB,EAAE,aAAa,OAAO,GAAG,CAAC,CAAC;IAExD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAEhD,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG;QACrD,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG;KACzD,CAAC;AACJ,CAAC;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|
|
4
|
+
*/
|
|
5
|
+
import { type Theme } from 'shellfie';
|
|
6
|
+
export interface TerminalState {
|
|
7
|
+
lines: string[];
|
|
8
|
+
cursorX: number;
|
|
9
|
+
cursorY: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
showCursor: boolean;
|
|
15
|
+
activeCursor?: boolean;
|
|
16
|
+
selectionStart?: number;
|
|
17
|
+
selectionEnd?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface RenderOptions {
|
|
20
|
+
title?: string;
|
|
21
|
+
template?: 'macos' | 'windows' | 'minimal';
|
|
22
|
+
theme?: Theme;
|
|
23
|
+
padding?: number;
|
|
24
|
+
watermark?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Render terminal state as SVG
|
|
28
|
+
*/
|
|
29
|
+
export declare function renderTerminalSVG(state: TerminalState, options?: RenderOptions): string;
|
|
30
|
+
/**
|
|
31
|
+
* Create terminal state from text buffer
|
|
32
|
+
*/
|
|
33
|
+
export declare function createTerminalState(buffer: string, cursorX: number, cursorY: number, width: number, height: number, fontSize: number, showCursor?: boolean, activeCursor?: boolean, selectionStart?: number, selectionEnd?: number): TerminalState;
|
|
34
|
+
//# sourceMappingURL=terminal-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-renderer.d.ts","sourceRoot":"","sources":["../src/terminal-renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtG,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAuL3F;AAsDD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,GAAE,OAAc,EAC1B,YAAY,GAAE,OAAe,EAC7B,cAAc,CAAC,EAAE,MAAM,EACvB,YAAY,CAAC,EAAE,MAAM,GACpB,aAAa,CAgBf"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Terminal Renderer
|
|
4
|
+
* Renders terminal state with cursor and fixed dimensions
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.renderTerminalSVG = renderTerminalSVG;
|
|
8
|
+
exports.createTerminalState = createTerminalState;
|
|
9
|
+
const shellfie_1 = require("shellfie");
|
|
10
|
+
/**
|
|
11
|
+
* Render terminal state as SVG
|
|
12
|
+
*/
|
|
13
|
+
function renderTerminalSVG(state, options = {}) {
|
|
14
|
+
const { lines, cursorX, cursorY, width, height, fontSize, fontFamily = "'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace", showCursor, } = state;
|
|
15
|
+
const padding = options.padding || 16;
|
|
16
|
+
const headerHeight = options.template === 'minimal' ? 0 : 39;
|
|
17
|
+
const lineHeight = fontSize * 1.4;
|
|
18
|
+
// Calculate character width (monospace approximation)
|
|
19
|
+
const charWidth = fontSize * 0.6;
|
|
20
|
+
// Use provided theme or default to dark theme
|
|
21
|
+
const theme = options.theme || shellfie_1.darkTheme;
|
|
22
|
+
// Background and chrome
|
|
23
|
+
const bgColor = theme.background;
|
|
24
|
+
const textColor = theme.foreground;
|
|
25
|
+
const cursorColor = theme.cursor;
|
|
26
|
+
const svgWidth = width;
|
|
27
|
+
const svgHeight = height;
|
|
28
|
+
let svg = `<svg width="${svgWidth}" height="${svgHeight}" xmlns="http://www.w3.org/2000/svg">`;
|
|
29
|
+
// Add styles
|
|
30
|
+
const cursorClass = state.activeCursor ? 'cursor-active' : 'cursor';
|
|
31
|
+
svg += `
|
|
32
|
+
<style>
|
|
33
|
+
.cursor {
|
|
34
|
+
animation: blink 1s step-end infinite;
|
|
35
|
+
}
|
|
36
|
+
.cursor-active {
|
|
37
|
+
/* No animation - solid cursor during typing/movement */
|
|
38
|
+
}
|
|
39
|
+
@keyframes blink {
|
|
40
|
+
0%, 50% { opacity: 1; }
|
|
41
|
+
50.01%, 100% { opacity: 0; }
|
|
42
|
+
}
|
|
43
|
+
</style>`;
|
|
44
|
+
// Background
|
|
45
|
+
svg += `
|
|
46
|
+
<rect width="${svgWidth}" height="${svgHeight}" fill="${bgColor}" rx="10" ry="10"/>`;
|
|
47
|
+
// Header (if not minimal)
|
|
48
|
+
if (options.template !== 'minimal') {
|
|
49
|
+
svg += `
|
|
50
|
+
<g class="title-bar">
|
|
51
|
+
<rect width="${svgWidth}" height="${headerHeight}" fill="${bgColor}" rx="10" ry="10"/>
|
|
52
|
+
<rect y="29" width="${svgWidth}" height="10" fill="${bgColor}"/>
|
|
53
|
+
<line x1="0" y1="39.5" x2="${svgWidth}" y2="39.5" stroke="#d4d4d41a" stroke-width="1"/>
|
|
54
|
+
<circle cx="16" cy="19.5" r="6" fill="#ff5f56"/>
|
|
55
|
+
<circle cx="36" cy="19.5" r="6" fill="#ffbd2e"/>
|
|
56
|
+
<circle cx="56" cy="19.5" r="6" fill="#27c93f"/>`;
|
|
57
|
+
if (options.title) {
|
|
58
|
+
svg += `
|
|
59
|
+
<text x="${svgWidth / 2}" y="24.2" fill="${textColor}" font-family="${fontFamily}" font-size="12" text-anchor="middle" opacity="0.8">${escapeXml(options.title)}</text>`;
|
|
60
|
+
}
|
|
61
|
+
svg += `
|
|
62
|
+
</g>`;
|
|
63
|
+
}
|
|
64
|
+
// Content area
|
|
65
|
+
const contentY = headerHeight + padding;
|
|
66
|
+
svg += `
|
|
67
|
+
<g class="content">`;
|
|
68
|
+
// Render lines with ANSI color support
|
|
69
|
+
lines.forEach((line, i) => {
|
|
70
|
+
const y = contentY + (i * lineHeight) + fontSize;
|
|
71
|
+
if (line) {
|
|
72
|
+
// Parse ANSI codes
|
|
73
|
+
const parsedLines = (0, shellfie_1.parseAnsi)(line);
|
|
74
|
+
if (parsedLines.length > 0 && parsedLines[0].spans.length > 0) {
|
|
75
|
+
let xOffset = padding;
|
|
76
|
+
parsedLines[0].spans.forEach((span) => {
|
|
77
|
+
const escapedText = escapeXml(span.text);
|
|
78
|
+
// Handle inverse/reverse video
|
|
79
|
+
let fgColor = resolveColor(span.style.foreground, theme);
|
|
80
|
+
let bgColor = span.style.background ? resolveColor(span.style.background, theme) : null;
|
|
81
|
+
if (span.style.inverse) {
|
|
82
|
+
// Swap foreground and background
|
|
83
|
+
const temp = fgColor;
|
|
84
|
+
fgColor = bgColor || theme.background;
|
|
85
|
+
bgColor = temp;
|
|
86
|
+
}
|
|
87
|
+
// Build style attributes
|
|
88
|
+
let styleAttr = '';
|
|
89
|
+
if (span.style.bold)
|
|
90
|
+
styleAttr += ' font-weight="bold"';
|
|
91
|
+
if (span.style.italic)
|
|
92
|
+
styleAttr += ' font-style="italic"';
|
|
93
|
+
if (span.style.underline)
|
|
94
|
+
styleAttr += ' text-decoration="underline"';
|
|
95
|
+
// Render background if needed (for inverse text)
|
|
96
|
+
if (bgColor) {
|
|
97
|
+
const spanWidth = span.text.length * charWidth;
|
|
98
|
+
svg += `
|
|
99
|
+
<rect x="${xOffset}" y="${y - fontSize}" width="${spanWidth}" height="${lineHeight}" fill="${bgColor}"/>`;
|
|
100
|
+
}
|
|
101
|
+
svg += `
|
|
102
|
+
<text x="${xOffset}" y="${y}" fill="${fgColor}" font-family="${fontFamily}" font-size="${fontSize}"${styleAttr} xml:space="preserve">${escapedText}</text>`;
|
|
103
|
+
// Update x offset for next span
|
|
104
|
+
xOffset += span.text.length * charWidth;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
// Render selection (on current line only, before cursor so cursor appears on top)
|
|
110
|
+
if (state.selectionStart !== undefined && state.selectionEnd !== undefined) {
|
|
111
|
+
const selStart = Math.min(state.selectionStart, state.selectionEnd);
|
|
112
|
+
const selEnd = Math.max(state.selectionStart, state.selectionEnd);
|
|
113
|
+
if (selStart !== selEnd) {
|
|
114
|
+
const selectionXStart = padding + (selStart * charWidth);
|
|
115
|
+
const selectionWidth = (selEnd - selStart) * charWidth;
|
|
116
|
+
const selectionY = contentY + (cursorY * lineHeight);
|
|
117
|
+
const selectionColor = theme.selection || '#4A90E2'; // Default blue if theme doesn't have selection color
|
|
118
|
+
svg += `
|
|
119
|
+
<rect class="selection" x="${selectionXStart}" y="${selectionY}" width="${selectionWidth}" height="${lineHeight}" fill="${selectionColor}" opacity="0.3"/>`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Render cursor
|
|
123
|
+
if (showCursor) {
|
|
124
|
+
const cursorXPos = padding + (cursorX * charWidth);
|
|
125
|
+
const cursorYPos = contentY + (cursorY * lineHeight);
|
|
126
|
+
const cursorClass = state.activeCursor ? 'cursor-active' : 'cursor';
|
|
127
|
+
svg += `
|
|
128
|
+
<rect class="${cursorClass}" x="${cursorXPos}" y="${cursorYPos}" width="${charWidth}" height="${lineHeight}" fill="${cursorColor}" opacity="0.7"/>`;
|
|
129
|
+
}
|
|
130
|
+
svg += `
|
|
131
|
+
</g>`;
|
|
132
|
+
// Render watermark if provided (after content, before closing svg)
|
|
133
|
+
if (options.watermark) {
|
|
134
|
+
// Parse ANSI codes in watermark
|
|
135
|
+
const parsedWatermark = (0, shellfie_1.parseAnsi)(options.watermark);
|
|
136
|
+
const watermarkFontSize = 12;
|
|
137
|
+
const watermarkY = svgHeight - padding;
|
|
138
|
+
if (parsedWatermark.length > 0 && parsedWatermark[0].spans.length > 0) {
|
|
139
|
+
// Calculate watermark width to right-align it
|
|
140
|
+
const watermarkText = parsedWatermark[0].spans.map(s => s.text).join('');
|
|
141
|
+
const watermarkWidth = watermarkText.length * (watermarkFontSize * 0.6);
|
|
142
|
+
let xOffset = svgWidth - padding - watermarkWidth;
|
|
143
|
+
parsedWatermark[0].spans.forEach((span) => {
|
|
144
|
+
const escapedText = escapeXml(span.text);
|
|
145
|
+
const fgColor = resolveColor(span.style.foreground, theme);
|
|
146
|
+
let styleAttr = '';
|
|
147
|
+
if (span.style.bold)
|
|
148
|
+
styleAttr += ' font-weight="bold"';
|
|
149
|
+
if (span.style.italic)
|
|
150
|
+
styleAttr += ' font-style="italic"';
|
|
151
|
+
if (span.style.dim)
|
|
152
|
+
styleAttr += ' opacity="0.5"';
|
|
153
|
+
svg += `
|
|
154
|
+
<text x="${xOffset}" y="${watermarkY}" fill="${fgColor}" font-family="${fontFamily}" font-size="${watermarkFontSize}"${styleAttr} xml:space="preserve">${escapedText}</text>`;
|
|
155
|
+
xOffset += span.text.length * (watermarkFontSize * 0.6);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
svg += `
|
|
160
|
+
</svg>`;
|
|
161
|
+
return svg;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Resolve ANSI color to hex
|
|
165
|
+
*/
|
|
166
|
+
function resolveColor(color, theme) {
|
|
167
|
+
if (!color)
|
|
168
|
+
return theme.foreground;
|
|
169
|
+
// Handle RGB objects
|
|
170
|
+
if (typeof color === 'object') {
|
|
171
|
+
return `rgb(${color.r}, ${color.g}, ${color.b})`;
|
|
172
|
+
}
|
|
173
|
+
// Handle ANSI color names
|
|
174
|
+
const colorMap = {
|
|
175
|
+
ansi0: 'black',
|
|
176
|
+
ansi1: 'red',
|
|
177
|
+
ansi2: 'green',
|
|
178
|
+
ansi3: 'yellow',
|
|
179
|
+
ansi4: 'blue',
|
|
180
|
+
ansi5: 'magenta',
|
|
181
|
+
ansi6: 'cyan',
|
|
182
|
+
ansi7: 'white',
|
|
183
|
+
ansi8: 'brightBlack',
|
|
184
|
+
ansi9: 'brightRed',
|
|
185
|
+
ansi10: 'brightGreen',
|
|
186
|
+
ansi11: 'brightYellow',
|
|
187
|
+
ansi12: 'brightBlue',
|
|
188
|
+
ansi13: 'brightMagenta',
|
|
189
|
+
ansi14: 'brightCyan',
|
|
190
|
+
ansi15: 'brightWhite',
|
|
191
|
+
};
|
|
192
|
+
const themeKey = colorMap[color];
|
|
193
|
+
if (themeKey) {
|
|
194
|
+
return theme[themeKey];
|
|
195
|
+
}
|
|
196
|
+
// Already a hex color
|
|
197
|
+
return color;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Escape XML special characters
|
|
201
|
+
*/
|
|
202
|
+
function escapeXml(text) {
|
|
203
|
+
return text
|
|
204
|
+
.replace(/&/g, '&')
|
|
205
|
+
.replace(/</g, '<')
|
|
206
|
+
.replace(/>/g, '>')
|
|
207
|
+
.replace(/"/g, '"')
|
|
208
|
+
.replace(/'/g, ''');
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Create terminal state from text buffer
|
|
212
|
+
*/
|
|
213
|
+
function createTerminalState(buffer, cursorX, cursorY, width, height, fontSize, showCursor = true, activeCursor = false, selectionStart, selectionEnd) {
|
|
214
|
+
const lines = buffer.split('\n');
|
|
215
|
+
return {
|
|
216
|
+
lines,
|
|
217
|
+
cursorX,
|
|
218
|
+
cursorY,
|
|
219
|
+
width,
|
|
220
|
+
height,
|
|
221
|
+
fontSize,
|
|
222
|
+
fontFamily: "'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace",
|
|
223
|
+
showCursor,
|
|
224
|
+
activeCursor,
|
|
225
|
+
selectionStart,
|
|
226
|
+
selectionEnd,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=terminal-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-renderer.js","sourceRoot":"","sources":["../src/terminal-renderer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA6BH,8CAuLC;AAyDD,kDA2BC;AAtSD,uCAAsG;AAwBtG;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAAoB,EAAE,UAAyB,EAAE;IACjF,MAAM,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,GAAG,mFAAmF,EAChG,UAAU,GACX,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7D,MAAM,UAAU,GAAG,QAAQ,GAAG,GAAG,CAAC;IAElC,sDAAsD;IACtD,MAAM,SAAS,GAAG,QAAQ,GAAG,GAAG,CAAC;IAEjC,8CAA8C;IAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,oBAAS,CAAC;IAEzC,wBAAwB;IACxB,MAAM,OAAO,GAAG,KAAK,CA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,EAAE,aAAa;QACrB,MAAM,EAAE,cAAc;QACtB,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,YAAY;QACpB,MAAM,EAAE,aAAa;KACtB,CAAC;IAEF,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,KAAK,CAAC,QAAQ,CAAW,CAAC;IACnC,CAAC;IAED,sBAAsB;IACtB,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI;SACR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CACjC,MAAc,EACd,OAAe,EACf,OAAe,EACf,KAAa,EACb,MAAc,EACd,QAAgB,EAChB,aAAsB,IAAI,EAC1B,eAAwB,KAAK,EAC7B,cAAuB,EACvB,YAAqB;IAErB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEjC,OAAO;QACL,KAAK;QACL,OAAO;QACP,OAAO;QACP,KAAK;QACL,MAAM;QACN,QAAQ;QACR,UAAU,EAAE,mFAAmF;QAC/F,UAAU;QACV,YAAY;QACZ,cAAc;QACd,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shellfie-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Transform terminal output into beautiful SVG images from the command line",
|
|
5
5
|
"bin": {
|
|
6
|
-
"shellfie": "
|
|
6
|
+
"shellfie": "dist/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"main": "dist/cli.js",
|
|
9
9
|
"types": "dist/cli.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "tool3",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"shellfie": "^2.0.
|
|
34
|
+
"shellfie": "^2.0.5",
|
|
35
35
|
"yargs": "^17.7.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|