@ggterm/core 0.2.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/annotations.d.ts +79 -0
- package/dist/annotations.d.ts.map +1 -0
- package/dist/canvas/canvas.d.ts.map +1 -0
- package/dist/canvas/index.d.ts.map +1 -0
- package/dist/cli-plot.d.ts +14 -0
- package/dist/cli-plot.d.ts.map +1 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +6485 -0
- package/dist/coords/cartesian.d.ts +96 -0
- package/dist/coords/cartesian.d.ts.map +1 -0
- package/dist/demo.d.ts +6 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/export/index.d.ts +6 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/vega-lite.d.ts +87 -0
- package/dist/export/vega-lite.d.ts.map +1 -0
- package/dist/facets/index.d.ts +168 -0
- package/dist/facets/index.d.ts.map +1 -0
- package/dist/geoms/area.d.ts.map +1 -0
- package/dist/geoms/bar.d.ts +38 -0
- package/dist/geoms/bar.d.ts.map +1 -0
- package/dist/geoms/boxplot.d.ts.map +1 -0
- package/dist/geoms/contour.d.ts +33 -0
- package/dist/geoms/contour.d.ts.map +1 -0
- package/dist/geoms/errorbar.d.ts +41 -0
- package/dist/geoms/errorbar.d.ts.map +1 -0
- package/dist/geoms/histogram.d.ts +62 -0
- package/dist/geoms/histogram.d.ts.map +1 -0
- package/dist/geoms/index.d.ts +22 -0
- package/dist/geoms/index.d.ts.map +1 -0
- package/dist/geoms/line.d.ts.map +1 -0
- package/dist/geoms/path.d.ts +59 -0
- package/dist/geoms/path.d.ts.map +1 -0
- package/dist/geoms/point.d.ts +30 -0
- package/dist/geoms/point.d.ts.map +1 -0
- package/dist/geoms/qq.d.ts +75 -0
- package/dist/geoms/qq.d.ts.map +1 -0
- package/dist/geoms/rect.d.ts +37 -0
- package/dist/geoms/rect.d.ts.map +1 -0
- package/dist/geoms/rug.d.ts +65 -0
- package/dist/geoms/rug.d.ts.map +1 -0
- package/dist/geoms/segment.d.ts.map +1 -0
- package/dist/geoms/smooth.d.ts +51 -0
- package/dist/geoms/smooth.d.ts.map +1 -0
- package/dist/geoms/step.d.ts +43 -0
- package/dist/geoms/step.d.ts.map +1 -0
- package/dist/geoms/text.d.ts +23 -0
- package/dist/geoms/text.d.ts.map +1 -0
- package/dist/geoms/tile.d.ts +27 -0
- package/dist/geoms/tile.d.ts.map +1 -0
- package/dist/geoms/violin.d.ts +29 -0
- package/dist/geoms/violin.d.ts.map +1 -0
- package/dist/grammar.d.ts +81 -0
- package/dist/grammar.d.ts.map +1 -0
- package/dist/history/index.d.ts +75 -0
- package/dist/history/index.d.ts.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9168 -0
- package/dist/performance/binning.d.ts +112 -0
- package/dist/performance/binning.d.ts.map +1 -0
- package/dist/performance/canvas-diff.d.ts +107 -0
- package/dist/performance/canvas-diff.d.ts.map +1 -0
- package/dist/performance/index.d.ts +14 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/level-of-detail.d.ts +98 -0
- package/dist/performance/level-of-detail.d.ts.map +1 -0
- package/dist/performance/sampling.d.ts +86 -0
- package/dist/performance/sampling.d.ts.map +1 -0
- package/dist/pipeline/index.d.ts +11 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/render-axes.d.ts +94 -0
- package/dist/pipeline/render-axes.d.ts.map +1 -0
- package/dist/pipeline/render-geoms.d.ts +121 -0
- package/dist/pipeline/render-geoms.d.ts.map +1 -0
- package/dist/pipeline/scales.d.ts +151 -0
- package/dist/pipeline/scales.d.ts.map +1 -0
- package/dist/positions/index.d.ts +141 -0
- package/dist/positions/index.d.ts.map +1 -0
- package/dist/repl/index.d.ts +6 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/repl/repl.d.ts +161 -0
- package/dist/repl/repl.d.ts.map +1 -0
- package/dist/scales/alpha.d.ts +57 -0
- package/dist/scales/alpha.d.ts.map +1 -0
- package/dist/scales/color.d.ts +260 -0
- package/dist/scales/color.d.ts.map +1 -0
- package/dist/scales/continuous.d.ts +60 -0
- package/dist/scales/continuous.d.ts.map +1 -0
- package/dist/scales/datetime.d.ts +60 -0
- package/dist/scales/datetime.d.ts.map +1 -0
- package/dist/scales/discrete.d.ts +36 -0
- package/dist/scales/discrete.d.ts.map +1 -0
- package/dist/scales/index.d.ts +11 -0
- package/dist/scales/index.d.ts.map +1 -0
- package/dist/scales/shape.d.ts +43 -0
- package/dist/scales/shape.d.ts.map +1 -0
- package/dist/scales/size.d.ts +43 -0
- package/dist/scales/size.d.ts.map +1 -0
- package/dist/stats/bin.d.ts.map +1 -0
- package/dist/stats/boxplot.d.ts.map +1 -0
- package/dist/stats/count.d.ts +21 -0
- package/dist/stats/count.d.ts.map +1 -0
- package/dist/stats/density.d.ts +36 -0
- package/dist/stats/density.d.ts.map +1 -0
- package/dist/stats/index.d.ts +18 -0
- package/dist/stats/index.d.ts.map +1 -0
- package/dist/stats/qq.d.ts +47 -0
- package/dist/stats/qq.d.ts.map +1 -0
- package/dist/stats/smooth.d.ts.map +1 -0
- package/dist/stats/summary.d.ts.map +1 -0
- package/dist/streaming/data-buffer.d.ts +121 -0
- package/dist/streaming/data-buffer.d.ts.map +1 -0
- package/dist/streaming/data-window.d.ts +133 -0
- package/dist/streaming/data-window.d.ts.map +1 -0
- package/dist/streaming/index.d.ts +14 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/rolling-aggregator.d.ts +116 -0
- package/dist/streaming/rolling-aggregator.d.ts.map +1 -0
- package/dist/streaming/streaming-plot.d.ts +194 -0
- package/dist/streaming/streaming-plot.d.ts.map +1 -0
- package/dist/terminal/capabilities.d.ts +89 -0
- package/dist/terminal/capabilities.d.ts.map +1 -0
- package/dist/terminal/colors.d.ts +82 -0
- package/dist/terminal/colors.d.ts.map +1 -0
- package/dist/terminal/index.d.ts +12 -0
- package/dist/terminal/index.d.ts.map +1 -0
- package/dist/terminal/renderer-chain.d.ts +110 -0
- package/dist/terminal/renderer-chain.d.ts.map +1 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/types.d.ts +198 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal Capability Detection
|
|
3
|
+
*
|
|
4
|
+
* Detects terminal features for optimal rendering:
|
|
5
|
+
* - Color support (16, 256, truecolor)
|
|
6
|
+
* - Graphics protocols (Sixel, Kitty, iTerm2)
|
|
7
|
+
* - Unicode support
|
|
8
|
+
* - Terminal dimensions
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Color capability levels
|
|
12
|
+
*/
|
|
13
|
+
export type ColorCapability = 'none' | '16' | '256' | 'truecolor';
|
|
14
|
+
/**
|
|
15
|
+
* Graphics protocol support
|
|
16
|
+
*/
|
|
17
|
+
export type GraphicsProtocol = 'none' | 'sixel' | 'kitty' | 'iterm2';
|
|
18
|
+
/**
|
|
19
|
+
* Terminal capabilities
|
|
20
|
+
*/
|
|
21
|
+
export interface TerminalCapabilities {
|
|
22
|
+
/** Color support level */
|
|
23
|
+
colors: ColorCapability;
|
|
24
|
+
/** Graphics protocol (if any) */
|
|
25
|
+
graphics: GraphicsProtocol;
|
|
26
|
+
/** Unicode/UTF-8 support */
|
|
27
|
+
unicode: boolean;
|
|
28
|
+
/** Braille character support */
|
|
29
|
+
braille: boolean;
|
|
30
|
+
/** Terminal width in characters */
|
|
31
|
+
width: number;
|
|
32
|
+
/** Terminal height in characters */
|
|
33
|
+
height: number;
|
|
34
|
+
/** Terminal name/program */
|
|
35
|
+
terminal: string;
|
|
36
|
+
/** Is running in CI environment */
|
|
37
|
+
isCI: boolean;
|
|
38
|
+
/** Is a TTY (interactive terminal) */
|
|
39
|
+
isTTY: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Detect color capability from environment
|
|
43
|
+
*/
|
|
44
|
+
export declare function detectColorCapability(): ColorCapability;
|
|
45
|
+
/**
|
|
46
|
+
* Detect graphics protocol support
|
|
47
|
+
*/
|
|
48
|
+
export declare function detectGraphicsProtocol(): GraphicsProtocol;
|
|
49
|
+
/**
|
|
50
|
+
* Detect Unicode support
|
|
51
|
+
*/
|
|
52
|
+
export declare function detectUnicodeSupport(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Detect terminal dimensions
|
|
55
|
+
*/
|
|
56
|
+
export declare function detectTerminalSize(): {
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Check if running in CI environment
|
|
62
|
+
*/
|
|
63
|
+
export declare function isCI(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Get terminal name/program
|
|
66
|
+
*/
|
|
67
|
+
export declare function getTerminalName(): string;
|
|
68
|
+
/**
|
|
69
|
+
* Detect all terminal capabilities
|
|
70
|
+
*/
|
|
71
|
+
export declare function detectCapabilities(): TerminalCapabilities;
|
|
72
|
+
/**
|
|
73
|
+
* Query terminal for sixel support using DA1 escape sequence
|
|
74
|
+
* Note: This is async and requires terminal interaction
|
|
75
|
+
*/
|
|
76
|
+
export declare function querySixelSupport(): Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Get recommended renderer based on capabilities
|
|
79
|
+
*/
|
|
80
|
+
export declare function getRecommendedRenderer(caps: TerminalCapabilities): string;
|
|
81
|
+
/**
|
|
82
|
+
* Get cached terminal capabilities
|
|
83
|
+
*/
|
|
84
|
+
export declare function getCapabilities(): TerminalCapabilities;
|
|
85
|
+
/**
|
|
86
|
+
* Clear capability cache (useful for testing)
|
|
87
|
+
*/
|
|
88
|
+
export declare function clearCapabilityCache(): void;
|
|
89
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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CAM1D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAWzE;AAKD;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAKtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal Color Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides color conversion and palette optimization for different terminal capabilities:
|
|
5
|
+
* - Truecolor (24-bit RGB)
|
|
6
|
+
* - 256 color palette
|
|
7
|
+
* - 16 color ANSI palette
|
|
8
|
+
*/
|
|
9
|
+
import type { RGBA } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Standard ANSI 16 colors
|
|
12
|
+
* These are the basic 16 colors available on all terminals
|
|
13
|
+
*/
|
|
14
|
+
export declare const ANSI_16_COLORS: RGBA[];
|
|
15
|
+
/**
|
|
16
|
+
* Generate the 256-color palette
|
|
17
|
+
* 0-15: ANSI 16 colors
|
|
18
|
+
* 16-231: 6x6x6 RGB cube
|
|
19
|
+
* 232-255: Grayscale ramp
|
|
20
|
+
*/
|
|
21
|
+
export declare function generate256Palette(): RGBA[];
|
|
22
|
+
export declare function getPalette256(): RGBA[];
|
|
23
|
+
/**
|
|
24
|
+
* Calculate color distance using weighted Euclidean distance
|
|
25
|
+
* Weighted for human perception (red and blue less than green)
|
|
26
|
+
*/
|
|
27
|
+
export declare function colorDistance(a: RGBA, b: RGBA): number;
|
|
28
|
+
/**
|
|
29
|
+
* Find the closest color in a palette
|
|
30
|
+
*/
|
|
31
|
+
export declare function findClosestPaletteColor(color: RGBA, palette: RGBA[]): number;
|
|
32
|
+
/**
|
|
33
|
+
* Convert RGB to ANSI 256 color index
|
|
34
|
+
*/
|
|
35
|
+
export declare function rgbToAnsi256(color: RGBA): number;
|
|
36
|
+
/**
|
|
37
|
+
* Convert RGB to ANSI 16 color index
|
|
38
|
+
*/
|
|
39
|
+
export declare function rgbToAnsi16(color: RGBA): number;
|
|
40
|
+
/**
|
|
41
|
+
* Generate ANSI escape sequence for foreground color
|
|
42
|
+
*/
|
|
43
|
+
export declare function fgEscape(color: RGBA, mode: 'truecolor' | '256' | '16'): string;
|
|
44
|
+
/**
|
|
45
|
+
* Generate ANSI escape sequence for background color
|
|
46
|
+
*/
|
|
47
|
+
export declare function bgEscape(color: RGBA, mode: 'truecolor' | '256' | '16'): string;
|
|
48
|
+
/**
|
|
49
|
+
* Quantize a color to a specific palette depth
|
|
50
|
+
*/
|
|
51
|
+
export declare function quantizeColor(color: RGBA, depth: '256' | '16'): RGBA;
|
|
52
|
+
/**
|
|
53
|
+
* Floyd-Steinberg dithering for color reduction
|
|
54
|
+
* Distributes quantization error to neighboring pixels
|
|
55
|
+
*/
|
|
56
|
+
export declare function ditherPixels(pixels: RGBA[], width: number, height: number, depth: '256' | '16'): RGBA[];
|
|
57
|
+
/**
|
|
58
|
+
* Create an optimized palette from a set of colors
|
|
59
|
+
* Uses median cut algorithm for color quantization
|
|
60
|
+
*/
|
|
61
|
+
export declare function createOptimizedPalette(colors: RGBA[], maxColors: number): RGBA[];
|
|
62
|
+
/**
|
|
63
|
+
* Color mode type
|
|
64
|
+
*/
|
|
65
|
+
export type ColorMode = 'truecolor' | '256' | '16' | 'none';
|
|
66
|
+
/**
|
|
67
|
+
* Get color escape based on terminal capability
|
|
68
|
+
*/
|
|
69
|
+
export declare function getColorEscape(color: RGBA, mode: ColorMode, type: 'fg' | 'bg'): string;
|
|
70
|
+
/**
|
|
71
|
+
* Reset escape sequence
|
|
72
|
+
*/
|
|
73
|
+
export declare const RESET = "\u001B[0m";
|
|
74
|
+
/**
|
|
75
|
+
* Reset foreground only
|
|
76
|
+
*/
|
|
77
|
+
export declare const RESET_FG = "\u001B[39m";
|
|
78
|
+
/**
|
|
79
|
+
* Reset background only
|
|
80
|
+
*/
|
|
81
|
+
export declare const RESET_BG = "\u001B[49m";
|
|
82
|
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G,IAAI,GAClB,IAAI,EAAE,CA2CR;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,CAkIhF;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,CAAA;AAE3D;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,IAAI,GAAG,IAAI,GAChB,MAAM,CASR;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,cAAY,CAAA;AAE9B;;GAEG;AACH,eAAO,MAAM,QAAQ,eAAa,CAAA;AAElC;;GAEG;AACH,eAAO,MAAM,QAAQ,eAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides terminal capability detection, color management, and rendering optimization.
|
|
5
|
+
*/
|
|
6
|
+
export { detectCapabilities, getCapabilities, clearCapabilityCache, detectColorCapability, detectGraphicsProtocol, detectUnicodeSupport, detectTerminalSize, isCI, getTerminalName, getRecommendedRenderer, querySixelSupport, } from './capabilities';
|
|
7
|
+
export type { ColorCapability, GraphicsProtocol, TerminalCapabilities, } from './capabilities';
|
|
8
|
+
export { ANSI_16_COLORS, generate256Palette, getPalette256, colorDistance, findClosestPaletteColor, rgbToAnsi256, rgbToAnsi16, fgEscape, bgEscape, quantizeColor, ditherPixels, createOptimizedPalette, getColorEscape, RESET, RESET_FG, RESET_BG, } from './colors';
|
|
9
|
+
export type { ColorMode } from './colors';
|
|
10
|
+
export { isRendererAvailable, selectRenderer, selectColorMode, RendererChain, createRendererChain, autoRenderer, getTerminalInfo, } from './renderer-chain';
|
|
11
|
+
export type { RendererType, RendererConfig } from './renderer-chain';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/terminal/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,IAAI,EACJ,eAAe,EACf,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;AAEvB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAChB,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatic Renderer Fallback Chain
|
|
3
|
+
*
|
|
4
|
+
* Provides intelligent renderer selection based on terminal capabilities.
|
|
5
|
+
* Automatically falls back to simpler renderers when advanced features aren't available.
|
|
6
|
+
*/
|
|
7
|
+
import type { Canvas, RenderOptions, Renderer } from '../types';
|
|
8
|
+
import { type TerminalCapabilities, type GraphicsProtocol } from './capabilities';
|
|
9
|
+
import { type ColorMode } from './colors';
|
|
10
|
+
/**
|
|
11
|
+
* Renderer types in order of preference (best to worst)
|
|
12
|
+
*/
|
|
13
|
+
export type RendererType = 'kitty' | 'iterm2' | 'sixel' | 'braille' | 'block-subpixel' | 'block' | 'ascii';
|
|
14
|
+
/**
|
|
15
|
+
* Renderer configuration
|
|
16
|
+
*/
|
|
17
|
+
export interface RendererConfig {
|
|
18
|
+
/** Preferred renderer (will be used if available) */
|
|
19
|
+
preferred?: RendererType;
|
|
20
|
+
/** Force a specific renderer (ignores capability detection) */
|
|
21
|
+
force?: RendererType;
|
|
22
|
+
/** Minimum acceptable renderer in fallback chain */
|
|
23
|
+
minimum?: RendererType;
|
|
24
|
+
/** Color mode override */
|
|
25
|
+
colorMode?: ColorMode;
|
|
26
|
+
/** Enable dithering for color reduction */
|
|
27
|
+
dithering?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Check if a renderer is available given terminal capabilities
|
|
31
|
+
*/
|
|
32
|
+
export declare function isRendererAvailable(type: RendererType, caps: TerminalCapabilities): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Select the best available renderer based on capabilities
|
|
35
|
+
*/
|
|
36
|
+
export declare function selectRenderer(config?: RendererConfig, caps?: TerminalCapabilities): RendererType;
|
|
37
|
+
/**
|
|
38
|
+
* Get the appropriate color mode for capabilities
|
|
39
|
+
*/
|
|
40
|
+
export declare function selectColorMode(caps?: TerminalCapabilities): ColorMode;
|
|
41
|
+
/**
|
|
42
|
+
* Renderer chain - manages automatic fallback
|
|
43
|
+
*/
|
|
44
|
+
export declare class RendererChain {
|
|
45
|
+
private capabilities;
|
|
46
|
+
private selectedRenderer;
|
|
47
|
+
private colorMode;
|
|
48
|
+
private renderers;
|
|
49
|
+
constructor(config?: RendererConfig);
|
|
50
|
+
/**
|
|
51
|
+
* Get current capabilities
|
|
52
|
+
*/
|
|
53
|
+
getCapabilities(): TerminalCapabilities;
|
|
54
|
+
/**
|
|
55
|
+
* Get selected renderer type
|
|
56
|
+
*/
|
|
57
|
+
getSelectedRenderer(): RendererType;
|
|
58
|
+
/**
|
|
59
|
+
* Get selected color mode
|
|
60
|
+
*/
|
|
61
|
+
getColorMode(): ColorMode;
|
|
62
|
+
/**
|
|
63
|
+
* Register a renderer implementation
|
|
64
|
+
*/
|
|
65
|
+
registerRenderer(type: RendererType, renderer: Renderer): void;
|
|
66
|
+
/**
|
|
67
|
+
* Check if a renderer is registered
|
|
68
|
+
*/
|
|
69
|
+
hasRenderer(type: RendererType): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Render using the selected renderer
|
|
72
|
+
*/
|
|
73
|
+
render(canvas: Canvas, options: RenderOptions): string;
|
|
74
|
+
/**
|
|
75
|
+
* Built-in ASCII fallback renderer
|
|
76
|
+
*/
|
|
77
|
+
private renderASCII;
|
|
78
|
+
/**
|
|
79
|
+
* Get a description of current rendering setup
|
|
80
|
+
*/
|
|
81
|
+
describe(): string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Create a renderer chain with sensible defaults
|
|
85
|
+
*/
|
|
86
|
+
export declare function createRendererChain(config?: RendererConfig): RendererChain;
|
|
87
|
+
/**
|
|
88
|
+
* Auto-detect and create the best renderer for the current terminal
|
|
89
|
+
*/
|
|
90
|
+
export declare function autoRenderer(): {
|
|
91
|
+
type: RendererType;
|
|
92
|
+
colorMode: ColorMode;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Get terminal info summary
|
|
96
|
+
*/
|
|
97
|
+
export declare function getTerminalInfo(): {
|
|
98
|
+
terminal: string;
|
|
99
|
+
renderer: RendererType;
|
|
100
|
+
colorMode: ColorMode;
|
|
101
|
+
size: {
|
|
102
|
+
width: number;
|
|
103
|
+
height: number;
|
|
104
|
+
};
|
|
105
|
+
graphics: GraphicsProtocol;
|
|
106
|
+
unicode: boolean;
|
|
107
|
+
isCI: boolean;
|
|
108
|
+
isTTY: boolean;
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=renderer-chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer-chain.d.ts","sourceRoot":"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B,SAAS,IAAI,KAAK,CA2BjC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,KAAK,CA2BpC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,KAAK,CA2BjC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types for ggterm Grammar of Graphics
|
|
3
|
+
*/
|
|
4
|
+
export type DataRecord = Record<string, unknown>;
|
|
5
|
+
export type DataSource = DataRecord[];
|
|
6
|
+
export interface AestheticMapping {
|
|
7
|
+
x: string;
|
|
8
|
+
y: string;
|
|
9
|
+
/** Secondary y-axis data field */
|
|
10
|
+
y2?: string;
|
|
11
|
+
/** End x coordinate for segments/annotations */
|
|
12
|
+
xend?: string;
|
|
13
|
+
/** End y coordinate for segments/annotations */
|
|
14
|
+
yend?: string;
|
|
15
|
+
/** Min x for rect/area annotations */
|
|
16
|
+
xmin?: string;
|
|
17
|
+
/** Max x for rect/area annotations */
|
|
18
|
+
xmax?: string;
|
|
19
|
+
/** Min y for rect/area annotations */
|
|
20
|
+
ymin?: string;
|
|
21
|
+
/** Max y for rect/area annotations */
|
|
22
|
+
ymax?: string;
|
|
23
|
+
color?: string;
|
|
24
|
+
fill?: string;
|
|
25
|
+
size?: string;
|
|
26
|
+
shape?: string;
|
|
27
|
+
alpha?: string;
|
|
28
|
+
group?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RGBA {
|
|
32
|
+
r: number;
|
|
33
|
+
g: number;
|
|
34
|
+
b: number;
|
|
35
|
+
a: number;
|
|
36
|
+
}
|
|
37
|
+
export type Domain = [number, number] | string[];
|
|
38
|
+
export type Range = [number, number] | string[] | RGBA[];
|
|
39
|
+
export type ScaleTransform = 'identity' | 'log10' | 'sqrt' | 'reverse';
|
|
40
|
+
export interface Scale {
|
|
41
|
+
type: 'continuous' | 'discrete' | 'identity';
|
|
42
|
+
aesthetic: string;
|
|
43
|
+
domain?: Domain;
|
|
44
|
+
range?: Range;
|
|
45
|
+
/** Custom tick positions */
|
|
46
|
+
breaks?: number[];
|
|
47
|
+
/** Custom tick labels (must match breaks length if both provided) */
|
|
48
|
+
labels?: string[];
|
|
49
|
+
/** Scale transformation */
|
|
50
|
+
trans?: ScaleTransform;
|
|
51
|
+
map(value: unknown): number | string | RGBA;
|
|
52
|
+
invert?(position: number): unknown;
|
|
53
|
+
}
|
|
54
|
+
export interface Coord {
|
|
55
|
+
type: string;
|
|
56
|
+
transform(x: number, y: number): {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
};
|
|
60
|
+
/** X-axis limits for zooming (data is clipped, not filtered) */
|
|
61
|
+
xlim?: [number, number];
|
|
62
|
+
/** Y-axis limits for zooming (data is clipped, not filtered) */
|
|
63
|
+
ylim?: [number, number];
|
|
64
|
+
/** Whether to clip points outside the limits (default: true) */
|
|
65
|
+
clip?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface PositionSpec {
|
|
68
|
+
type: 'identity' | 'dodge' | 'stack' | 'fill' | 'jitter';
|
|
69
|
+
width?: number;
|
|
70
|
+
height?: number;
|
|
71
|
+
preserve?: 'total' | 'single';
|
|
72
|
+
}
|
|
73
|
+
export interface Geom {
|
|
74
|
+
type: string;
|
|
75
|
+
stat?: string;
|
|
76
|
+
position?: string | PositionSpec;
|
|
77
|
+
params: Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
export interface Stat {
|
|
80
|
+
type: string;
|
|
81
|
+
compute(data: DataSource, aes: AestheticMapping): DataSource;
|
|
82
|
+
}
|
|
83
|
+
export type Labeller = (value: string, variable?: string) => string;
|
|
84
|
+
export interface Facet {
|
|
85
|
+
type: 'wrap' | 'grid';
|
|
86
|
+
vars: string | {
|
|
87
|
+
rows?: string;
|
|
88
|
+
cols?: string;
|
|
89
|
+
};
|
|
90
|
+
ncol?: number;
|
|
91
|
+
nrow?: number;
|
|
92
|
+
scales?: 'fixed' | 'free' | 'free_x' | 'free_y';
|
|
93
|
+
/** Labeller function for customizing strip labels */
|
|
94
|
+
labeller?: Labeller;
|
|
95
|
+
/** Move row/column strips (for grid): 'x' moves col to bottom, 'y' moves row to left */
|
|
96
|
+
switch?: 'x' | 'y' | 'both' | null;
|
|
97
|
+
}
|
|
98
|
+
export interface Theme {
|
|
99
|
+
panel: {
|
|
100
|
+
background: string;
|
|
101
|
+
border: 'none' | 'single' | 'double' | 'rounded';
|
|
102
|
+
grid: {
|
|
103
|
+
major: string | null;
|
|
104
|
+
minor: string | null;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
axis: {
|
|
108
|
+
text: {
|
|
109
|
+
color: string;
|
|
110
|
+
};
|
|
111
|
+
ticks: {
|
|
112
|
+
char: string;
|
|
113
|
+
length: number;
|
|
114
|
+
};
|
|
115
|
+
title: {
|
|
116
|
+
color: string;
|
|
117
|
+
bold: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
legend: {
|
|
121
|
+
position: 'right' | 'bottom' | 'none';
|
|
122
|
+
title: {
|
|
123
|
+
bold: boolean;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
title: {
|
|
127
|
+
align: 'left' | 'center' | 'right';
|
|
128
|
+
bold: boolean;
|
|
129
|
+
};
|
|
130
|
+
facet: {
|
|
131
|
+
strip: {
|
|
132
|
+
/** Strip text color */
|
|
133
|
+
text: string;
|
|
134
|
+
/** Strip background color (use empty string for no background) */
|
|
135
|
+
background: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export interface Labels {
|
|
140
|
+
title?: string;
|
|
141
|
+
subtitle?: string;
|
|
142
|
+
caption?: string;
|
|
143
|
+
x?: string;
|
|
144
|
+
y?: string;
|
|
145
|
+
/** Label for secondary y-axis */
|
|
146
|
+
y2?: string;
|
|
147
|
+
color?: string;
|
|
148
|
+
fill?: string;
|
|
149
|
+
size?: string;
|
|
150
|
+
}
|
|
151
|
+
export interface RenderOptions {
|
|
152
|
+
width: number;
|
|
153
|
+
height: number;
|
|
154
|
+
renderer?: 'braille' | 'block' | 'sixel' | 'auto';
|
|
155
|
+
colorMode?: 'none' | '16' | '256' | 'truecolor' | 'auto';
|
|
156
|
+
}
|
|
157
|
+
export interface CanvasCell {
|
|
158
|
+
char: string;
|
|
159
|
+
fg: RGBA;
|
|
160
|
+
bg: RGBA;
|
|
161
|
+
bold?: boolean;
|
|
162
|
+
italic?: boolean;
|
|
163
|
+
underline?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export interface Canvas {
|
|
166
|
+
width: number;
|
|
167
|
+
height: number;
|
|
168
|
+
cells: CanvasCell[][];
|
|
169
|
+
setCell(x: number, y: number, cell: Partial<CanvasCell>): void;
|
|
170
|
+
getCell(x: number, y: number): CanvasCell;
|
|
171
|
+
clear(): void;
|
|
172
|
+
}
|
|
173
|
+
export interface Renderer {
|
|
174
|
+
render(canvas: Canvas, options: RenderOptions): string;
|
|
175
|
+
}
|
|
176
|
+
export interface PlotSpec {
|
|
177
|
+
data: DataSource;
|
|
178
|
+
aes: AestheticMapping;
|
|
179
|
+
geoms: Geom[];
|
|
180
|
+
stats: Stat[];
|
|
181
|
+
scales: Scale[];
|
|
182
|
+
coord: Coord;
|
|
183
|
+
facet?: Facet;
|
|
184
|
+
theme: Theme;
|
|
185
|
+
labels: Labels;
|
|
186
|
+
}
|
|
187
|
+
export interface ComputedPoint {
|
|
188
|
+
x: number;
|
|
189
|
+
y: number;
|
|
190
|
+
color?: RGBA;
|
|
191
|
+
size?: number;
|
|
192
|
+
shape?: string;
|
|
193
|
+
alpha?: number;
|
|
194
|
+
group?: string | number;
|
|
195
|
+
label?: string;
|
|
196
|
+
data: DataRecord;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,MAAM,M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
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ggterm/core",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Grammar of Graphics engine for terminals",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ggterm": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./cli": {
|
|
17
|
+
"import": "./dist/cli.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "bun build ./src/index.ts ./src/cli.ts --outdir ./dist --target node && tsc --emitDeclarationOnly",
|
|
22
|
+
"test": "bun test",
|
|
23
|
+
"typecheck": "tsc --noEmit"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"grammar-of-graphics",
|
|
30
|
+
"visualization",
|
|
31
|
+
"terminal",
|
|
32
|
+
"charts"
|
|
33
|
+
],
|
|
34
|
+
"author": "Scott Handley",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/handleylab/ggterm.git",
|
|
39
|
+
"directory": "packages/core"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/handleylab/ggterm#readme",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/handleylab/ggterm/issues"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"typescript": "^5.3.0",
|
|
48
|
+
"@types/bun": "^1.1.0"
|
|
49
|
+
}
|
|
50
|
+
}
|