asciify-engine 4.0.0 → 4.1.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 +10 -7
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/hover.cjs +1 -1
- package/dist/hover.d.cts +1 -1
- package/dist/hover.d.ts +1 -1
- package/dist/hover.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/model-BJXd0Jl-.d.ts +202 -0
- package/dist/model-aIWlIoDT.d.cts +202 -0
- package/dist/studio.d.cts +4 -133
- package/dist/studio.d.ts +4 -133
- package/dist/types-BeXEm4UY.d.cts +323 -0
- package/dist/types-BeXEm4UY.d.ts +323 -0
- package/package.json +1 -1
- package/skills/asciify-engine/SKILL.md +5 -5
- package/skills/asciify-engine/references/hero-finish.md +1 -1
- package/skills/asciify-engine/references/upgrading.md +7 -2
- package/dist/characters-BNTu2oEF.d.cts +0 -71
- package/dist/characters-BNTu2oEF.d.ts +0 -71
- package/dist/types-CYKIEtDC.d.cts +0 -586
- package/dist/types-CYKIEtDC.d.ts +0 -586
|
@@ -1,586 +0,0 @@
|
|
|
1
|
-
type ColorMode = 'grayscale' | 'fullcolor' | 'matrix' | 'accent';
|
|
2
|
-
type RenderMode = 'ascii' | 'dots';
|
|
3
|
-
type AnimationStyle = 'none' | 'caustics' | 'current' | 'reform';
|
|
4
|
-
type ArtStyle = 'classic' | 'particles' | 'letters' | 'claudeCode' | 'art' | 'terminal' | 'box' | 'lines' | 'braille' | 'katakana' | 'circles' | 'shadows' | 'geometric' | 'pipes' | 'waves' | 'shards' | 'smoke' | 'ascii' | 'interface' | 'prompt' | 'data' | 'humanist' | 'mesh';
|
|
5
|
-
type HoverEffect = 'spotlight' | 'magnify' | 'repel' | 'glow' | 'colorShift' | 'attract' | 'shatter' | 'trail' | 'glitchText';
|
|
6
|
-
type HoverShape = 'circle' | 'box';
|
|
7
|
-
type HoverPreset = 'none' | 'subtle' | 'flashlight' | 'magnifier' | 'forceField' | 'neon' | 'fire' | 'ice' | 'gravity' | 'shatter' | 'ghost' | 'glitchReveal';
|
|
8
|
-
type SourceCropUnit = 'percent' | 'pixel';
|
|
9
|
-
type SourceCropAnchor = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
10
|
-
interface SourceCrop {
|
|
11
|
-
/** Legacy crop origin on the source media. Percent values use 0–1. Default: centered when cropped */
|
|
12
|
-
x?: number;
|
|
13
|
-
/** Legacy crop origin on the source media. Percent values use 0–1. Default: centered when cropped */
|
|
14
|
-
y?: number;
|
|
15
|
-
/** Legacy crop width on the source media. Percent values use 0–1. Default: mirrors `height` to preserve proportions */
|
|
16
|
-
width?: number;
|
|
17
|
-
/** Legacy crop height on the source media. Percent values use 0–1. Default: mirrors `width` to preserve proportions */
|
|
18
|
-
height?: number;
|
|
19
|
-
/** CSS-like crop inset from the top edge. Percent values use 0–1. */
|
|
20
|
-
top?: number;
|
|
21
|
-
/** CSS-like crop inset from the right edge. Percent values use 0–1. */
|
|
22
|
-
right?: number;
|
|
23
|
-
/** CSS-like crop inset from the bottom edge. Percent values use 0–1. */
|
|
24
|
-
bottom?: number;
|
|
25
|
-
/** CSS-like crop inset from the left edge. Percent values use 0–1. */
|
|
26
|
-
left?: number;
|
|
27
|
-
/**
|
|
28
|
-
* Keep the source aspect ratio when deriving a crop from a single `width` or
|
|
29
|
-
* `height`. CSS-like side insets (`top`, `right`, `bottom`, `left`) already
|
|
30
|
-
* define an exact source view box, and `asciifyVideo` sizes from that crop
|
|
31
|
-
* aspect so the output does not stretch. Default: `true`.
|
|
32
|
-
*/
|
|
33
|
-
preserveAspect?: boolean;
|
|
34
|
-
/** Bias auto-centered crops toward an edge or corner. Default: `'center'` */
|
|
35
|
-
anchor?: SourceCropAnchor;
|
|
36
|
-
/** Interpret values as normalized percentages or source pixels. Default: `'percent'` */
|
|
37
|
-
unit?: SourceCropUnit;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Named colour palette presets — pass as `colorMode` for themed rendering.
|
|
41
|
-
* Applied as a post-process colour remap over the standard grayscale output.
|
|
42
|
-
*/
|
|
43
|
-
type PaletteTheme = 'dracula' | 'monokai' | 'nord' | 'catppuccin' | 'solarized' | 'gruvbox';
|
|
44
|
-
declare const PALETTE_THEMES: Record<PaletteTheme, {
|
|
45
|
-
name: string;
|
|
46
|
-
accent: string;
|
|
47
|
-
bg: string;
|
|
48
|
-
fg: string;
|
|
49
|
-
}>;
|
|
50
|
-
type SourceType = 'image' | 'video' | 'gif' | null;
|
|
51
|
-
interface AsciiOptions {
|
|
52
|
-
/** Character cell width in pixels. Smaller = more detail, more cells. Default: `7` */
|
|
53
|
-
fontSize: number;
|
|
54
|
-
/** Extra horizontal spacing between characters (pixels). Default: `1` */
|
|
55
|
-
charSpacing: number;
|
|
56
|
-
/**
|
|
57
|
-
* Brightness adjustment applied before luminance mapping.
|
|
58
|
-
* Range −1 (black) → 0 (unchanged) → 1 (white). Default: `0`
|
|
59
|
-
*/
|
|
60
|
-
brightness: number;
|
|
61
|
-
/**
|
|
62
|
-
* Contrast boost applied before luminance mapping.
|
|
63
|
-
* `0` = unchanged, positive values increase contrast, negative decrease it.
|
|
64
|
-
* Default: `0`
|
|
65
|
-
*/
|
|
66
|
-
contrast: number;
|
|
67
|
-
/**
|
|
68
|
-
* Character density ramp — ordered from lightest to darkest.
|
|
69
|
-
* Use `CHARSETS` for pre-built ramps or supply your own string.
|
|
70
|
-
* Default: `' .:-=+*#%@'`
|
|
71
|
-
*/
|
|
72
|
-
charset: string;
|
|
73
|
-
/**
|
|
74
|
-
* Colour output mode.
|
|
75
|
-
* - `'grayscale'` — white-on-black monochrome
|
|
76
|
-
* - `'fullcolor'` — samples pixel colours from the source
|
|
77
|
-
* - `'matrix'` — green phosphor terminal look
|
|
78
|
-
* - `'accent'` — single accent colour with intensity-driven brightness
|
|
79
|
-
* Default: `'grayscale'`
|
|
80
|
-
*/
|
|
81
|
-
colorMode: ColorMode;
|
|
82
|
-
/**
|
|
83
|
-
* The accent colour used when `colorMode` is `'accent'` or `'matrix'`.
|
|
84
|
-
* Any CSS colour string. Default: `'#d4ff00'`
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* Hex color string used when `colorMode` is `'accent'`.
|
|
88
|
-
* Set to `'auto'` to let the engine pick contrasting ink automatically:
|
|
89
|
-
* dark ink (`#0d0d0d`) in light mode, light ink (`#faf9f7`) in dark mode.
|
|
90
|
-
*/
|
|
91
|
-
accentColor: string;
|
|
92
|
-
/**
|
|
93
|
-
* Invert luminance mapping (light pixels → dense chars). Default: `false`
|
|
94
|
-
*
|
|
95
|
-
* Set to `'auto'` to let the engine detect the OS color scheme:
|
|
96
|
-
* - Light mode → inverts (bright pixel = dark char = visible on white background)
|
|
97
|
-
* - Dark mode → normal (bright pixel = bright char = visible on dark background)
|
|
98
|
-
*/
|
|
99
|
-
invert: boolean | 'auto';
|
|
100
|
-
/**
|
|
101
|
-
* Render mode.
|
|
102
|
-
* - `'ascii'` — characters drawn as text
|
|
103
|
-
* - `'dots'` — each cell rendered as a filled circle (particle look)
|
|
104
|
-
* Default: `'ascii'`
|
|
105
|
-
*/
|
|
106
|
-
renderMode: RenderMode;
|
|
107
|
-
/**
|
|
108
|
-
* Per-character animation driven over time.
|
|
109
|
-
* Applies wave, glitch, rain-drop, spiral, and other effects to the rendered text.
|
|
110
|
-
* Default: `'none'`
|
|
111
|
-
*/
|
|
112
|
-
animationStyle: AnimationStyle;
|
|
113
|
-
/** Speed multiplier for `animationStyle` effects. Default: `1` */
|
|
114
|
-
animationSpeed: number;
|
|
115
|
-
/**
|
|
116
|
-
* Size of each dot relative to the cell when `renderMode === 'dots'`.
|
|
117
|
-
* `1` fills the whole cell, `0.5` draws half-size circles. Default: `0.8`
|
|
118
|
-
*/
|
|
119
|
-
dotSizeRatio: number;
|
|
120
|
-
/**
|
|
121
|
-
* Ordered Bayer (4×4) dither strength applied to the luminance map.
|
|
122
|
-
* `0` = no dithering, `1` = full dithering. Default: `0`
|
|
123
|
-
*/
|
|
124
|
-
ditherStrength: number;
|
|
125
|
-
/**
|
|
126
|
-
* Assumed aspect ratio (width ÷ height) of a single output character.
|
|
127
|
-
* Controls how many rows vs columns are generated — must match your rendering
|
|
128
|
-
* environment to preserve the source image's proportions.
|
|
129
|
-
* - `0.55` — browser monospace at `line-height: 1.09` (default)
|
|
130
|
-
* - `0.52` — browser monospace at `line-height: 1.15`
|
|
131
|
-
* - `0.5` — most terminal emulators
|
|
132
|
-
* Default: `0.55`
|
|
133
|
-
*/
|
|
134
|
-
charAspect: number;
|
|
135
|
-
/**
|
|
136
|
-
* Auto-stretch the luminance range before charset mapping.
|
|
137
|
-
* When `true`, the darkest pixel in the frame maps to the first charset character
|
|
138
|
-
* and the brightest to the last, maximising perceived detail and contrast.
|
|
139
|
-
* Particularly useful for images with low inherent contrast or muted tones.
|
|
140
|
-
* Default: `false`
|
|
141
|
-
*/
|
|
142
|
-
normalize: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Overall intensity of the hover / cursor interaction effect.
|
|
145
|
-
* `0` disables the effect. Default: `0`
|
|
146
|
-
*/
|
|
147
|
-
hoverStrength: number;
|
|
148
|
-
/**
|
|
149
|
-
* Radius of the hover interaction zone as a fraction of the canvas size.
|
|
150
|
-
* `0.1` = 10% of canvas width. Default: `0.2`
|
|
151
|
-
*/
|
|
152
|
-
hoverRadius: number;
|
|
153
|
-
/**
|
|
154
|
-
* Which cursor interaction style to apply when `hoverStrength > 0`.
|
|
155
|
-
* See `HoverPreset` or `HOVER_PRESETS` for ready-made configurations.
|
|
156
|
-
* Default: `'spotlight'`
|
|
157
|
-
*/
|
|
158
|
-
hoverEffect: HoverEffect;
|
|
159
|
-
/**
|
|
160
|
-
* Tint colour used by hover effects such as spotlight, glow, and colorShift.
|
|
161
|
-
* Any CSS colour string. Default: `'#ffffff'`
|
|
162
|
-
*/
|
|
163
|
-
hoverColor: string;
|
|
164
|
-
/**
|
|
165
|
-
* Shape of the hover interaction zone.
|
|
166
|
-
* - `'circle'` — radial falloff (default)
|
|
167
|
-
* - `'box'` — rectangular zone, text fills a block around the cursor
|
|
168
|
-
* Default: `'circle'`
|
|
169
|
-
*/
|
|
170
|
-
hoverShape: HoverShape;
|
|
171
|
-
/**
|
|
172
|
-
* Text string revealed by the `'glitchText'` hover effect.
|
|
173
|
-
* Characters around the cursor scramble and resolve into this text.
|
|
174
|
-
* Supports `\n` for multi-line reveals.
|
|
175
|
-
*
|
|
176
|
-
* Pass an **array** of strings to cycle through different words based on
|
|
177
|
-
* the cursor's grid region — the engine picks one via a spatial hash so
|
|
178
|
-
* each area of the canvas shows a different word.
|
|
179
|
-
*
|
|
180
|
-
* Default: `'ASCIIFY'`
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* // Single word:
|
|
184
|
-
* options: { hoverEffect: 'glitchText', hoverText: 'HELLO' }
|
|
185
|
-
*
|
|
186
|
-
* // Word pool — different text at different cursor positions:
|
|
187
|
-
* options: { hoverEffect: 'glitchText', hoverText: ['DEPLOY', 'SCALE', 'SHIP', 'BUILD'] }
|
|
188
|
-
*/
|
|
189
|
-
hoverText: string | string[];
|
|
190
|
-
/**
|
|
191
|
-
* Art style preset applied at render time.
|
|
192
|
-
* Shorthand for a specific combination of `charset`, `renderMode`, and `colorMode`.
|
|
193
|
-
* See `ART_STYLE_PRESETS` for the full list. Default: `'classic'`
|
|
194
|
-
*/
|
|
195
|
-
artStyle: ArtStyle;
|
|
196
|
-
/**
|
|
197
|
-
* Custom repeating text used when `artStyle` is `'letters'` or when you set
|
|
198
|
-
* a custom charset. Leave empty to use the selected `charset`. Default: `''`
|
|
199
|
-
*/
|
|
200
|
-
customText: string;
|
|
201
|
-
/**
|
|
202
|
-
* Chroma-key colour to remove from the source (green screen / blue screen).
|
|
203
|
-
* Pixels whose RGB distance from this colour is within `chromaKeyTolerance`
|
|
204
|
-
* are keyed out: their character becomes a space and alpha is set to 0,
|
|
205
|
-
* letting the canvas background show through.
|
|
206
|
-
*
|
|
207
|
-
* - `true` — **smart green screen**: heuristic detection (`g > r*1.4 && g > b*1.4`)
|
|
208
|
-
* catches every shade of green screen (lime, broadcast, chroma green) with no
|
|
209
|
-
* config. Works on virtually all studio/streaming footage.
|
|
210
|
-
* - `'blue-screen'` — **smart blue screen**: same heuristic for blue.
|
|
211
|
-
* - `{ r, g, b }` or CSS colour string — custom key colour + `chromaKeyTolerance`
|
|
212
|
-
* - `null` / `false` — disabled (default)
|
|
213
|
-
*
|
|
214
|
-
* @example
|
|
215
|
-
* // Standard green screen — zero config:
|
|
216
|
-
* options: { chromaKey: true }
|
|
217
|
-
*
|
|
218
|
-
* // Blue screen — zero config:
|
|
219
|
-
* options: { chromaKey: 'blue-screen' }
|
|
220
|
-
*
|
|
221
|
-
* // Custom CSS colour:
|
|
222
|
-
* options: { chromaKey: '#00b140', chromaKeyTolerance: 70 }
|
|
223
|
-
*/
|
|
224
|
-
chromaKey: {
|
|
225
|
-
r: number;
|
|
226
|
-
g: number;
|
|
227
|
-
b: number;
|
|
228
|
-
} | string | boolean | null;
|
|
229
|
-
/**
|
|
230
|
-
* Euclidean RGB tolerance radius for chroma-key detection.
|
|
231
|
-
* `0` = exact match only, `441` ≈ key out everything.
|
|
232
|
-
* Higher values remove more pixels. Default: `60`
|
|
233
|
-
*/
|
|
234
|
-
chromaKeyTolerance: number;
|
|
235
|
-
/**
|
|
236
|
-
* Extra normalized padding kept around the detected chroma-key foreground when
|
|
237
|
-
* `asciifyVideo` auto-trims keyed video content inside `sourceCrop`.
|
|
238
|
-
* `0` hugs the visible foreground. `0.01` keeps 1% safety padding.
|
|
239
|
-
* Default: `0.002`
|
|
240
|
-
*/
|
|
241
|
-
chromaKeyTrimPadding: number;
|
|
242
|
-
/**
|
|
243
|
-
* Minimum source-pixel luminance for chroma-key foreground auto-trim.
|
|
244
|
-
* Raise this when faint edge noise is counted as content and prevents a
|
|
245
|
-
* keyed subject from filling a preserved-ratio layout. Range `0–255`.
|
|
246
|
-
* Default: `0`
|
|
247
|
-
*/
|
|
248
|
-
chromaKeyTrimLuminanceThreshold: number;
|
|
249
|
-
/**
|
|
250
|
-
* How keyed video foreground trimming is applied when `chromaKey` and
|
|
251
|
-
* `sourceCrop` are enabled.
|
|
252
|
-
*
|
|
253
|
-
* - `'range'` samples the video/scroll range once and keeps a stable union
|
|
254
|
-
* crop. Best default for consistent framing.
|
|
255
|
-
* - `'frame'` remeasures each rendered frame and expands the crop to the
|
|
256
|
-
* render aspect. Best for scroll-scrubbed hero footage where foreground
|
|
257
|
-
* position changes and pure contain leaves empty edges.
|
|
258
|
-
* - `'off'` disables automatic keyed foreground trimming.
|
|
259
|
-
*
|
|
260
|
-
* Default: `'range'`
|
|
261
|
-
*/
|
|
262
|
-
chromaKeyTrimMode: 'range' | 'frame' | 'off';
|
|
263
|
-
/**
|
|
264
|
-
* Optional source crop applied before ASCII sampling.
|
|
265
|
-
*
|
|
266
|
-
* Use this when the media has empty edges or a subject that should be framed
|
|
267
|
-
* tighter without changing the destination canvas size.
|
|
268
|
-
*
|
|
269
|
-
* @example
|
|
270
|
-
* // Remove 15% from the top and 15% from the bottom, preserving proportions:
|
|
271
|
-
* options: { sourceCrop: { top: 0.15, bottom: 0.15 } }
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* // Keep 70% of the source, preserve proportions, and center it:
|
|
275
|
-
* options: { sourceCrop: { height: 0.7 } }
|
|
276
|
-
*
|
|
277
|
-
* @example
|
|
278
|
-
* // Use an exact source window when manual framing should override proportions:
|
|
279
|
-
* options: { sourceCrop: { x: 0.05, y: 0.08, width: 0.9, height: 0.9, preserveAspect: false } }
|
|
280
|
-
*/
|
|
281
|
-
sourceCrop?: SourceCrop | null;
|
|
282
|
-
/**
|
|
283
|
-
* Array of charset strings to cycle through over time.
|
|
284
|
-
* The engine picks `charsetFrames[Math.floor(time * charsetFps) % length]` on each
|
|
285
|
-
* render tick, re-mapping characters from stored cell luminance.
|
|
286
|
-
* Pairs beautifully with `animationStyle` and `asciiBackground`.
|
|
287
|
-
*
|
|
288
|
-
* Use `CHARSET_SEQUENCES` for curated combinations or build your own:
|
|
289
|
-
* @example
|
|
290
|
-
* options: { charsetFrames: CHARSET_SEQUENCES.cosmic }
|
|
291
|
-
* options: { charsetFrames: [CHARSETS.standard, CHARSETS.blocks, CHARSETS.circles] }
|
|
292
|
-
*/
|
|
293
|
-
charsetFrames?: string[];
|
|
294
|
-
/** Cycle rate for `charsetFrames` in frames-per-second. Default: `2` */
|
|
295
|
-
charsetFps?: number;
|
|
296
|
-
}
|
|
297
|
-
interface AsciiCell {
|
|
298
|
-
char: string;
|
|
299
|
-
r: number;
|
|
300
|
-
g: number;
|
|
301
|
-
b: number;
|
|
302
|
-
a: number;
|
|
303
|
-
/** Stored dithered luminance (0–255). Present when the frame was generated by the engine. Used for dynamic charset re-selection at render time via `charsetFrames`. */
|
|
304
|
-
lum?: number;
|
|
305
|
-
}
|
|
306
|
-
type AsciiFrame = AsciiCell[][];
|
|
307
|
-
interface AsciiResult {
|
|
308
|
-
frames: AsciiFrame[];
|
|
309
|
-
cols: number;
|
|
310
|
-
rows: number;
|
|
311
|
-
fps: number;
|
|
312
|
-
}
|
|
313
|
-
declare const CHARSETS: {
|
|
314
|
-
readonly standard: " .:-=+*#%@";
|
|
315
|
-
readonly blocks: " ░▒▓█";
|
|
316
|
-
readonly minimal: " .:+";
|
|
317
|
-
readonly dense: " .'`^\",:;Il!i><~+_-?][}{1)(|/tfjrxnuvczXYUJCLQ0OZmwqpdbkhao*#MW&8%B@$";
|
|
318
|
-
readonly binary: "01";
|
|
319
|
-
readonly dots: " ⠁⠃⠇⡇⣇⣧⣷⣿";
|
|
320
|
-
readonly letters: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
321
|
-
readonly claudeCode: " ╔╗╚╝║═╠╣╦╩╬░▒▓█│─┌┐└┘├┤┬┴┼";
|
|
322
|
-
readonly box: " ▪◾◼■█";
|
|
323
|
-
readonly lines: " ˗‐–—―━";
|
|
324
|
-
readonly braille: " ⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿⡀⡁⡂⡃⡄⡅⡆⡇⣀⣁⣂⣃⣄⣅⣆⣇⣈⣉⣊⣋⣌⣍⣎⣏⣐⣑⣒⣓⣔⣕⣖⣗⣘⣙⣚⣛⣜⣝⣞⣟⣠⣡⣢⣣⣤⣥⣦⣧⣨⣩⣪⣫⣬⣭⣮⣯⣰⣱⣲⣳⣴⣵⣶⣷⣸⣹⣺⣻⣼⣽⣾⣿";
|
|
325
|
-
readonly katakana: " ヲァィゥェォャュョッアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン";
|
|
326
|
-
readonly circles: " .·:∘○◦°•∙";
|
|
327
|
-
readonly shadows: " ·∘◦○◎⊙●◉";
|
|
328
|
-
readonly geometric: " ·△▷◇◈◆▣■█";
|
|
329
|
-
readonly pipes: " ╶─┐└├┤┬┴┼╬▒▓█";
|
|
330
|
-
readonly waves: " ˜∼≈〰≋∿∾∭∫";
|
|
331
|
-
readonly shards: " ╱╲╳◤◥◣◢△▲◆◼█";
|
|
332
|
-
readonly smoke: " ·˙⁚⁖∶∷⋮⋰⋱∴∵";
|
|
333
|
-
/** All printable ASCII characters ordered from airy punctuation to dense symbols. */
|
|
334
|
-
readonly ascii: " .'`^\",:;~-_+<>i!lI?/\\|()[]{}1tfjrxnuvczXYUJCLQ0OZmwqpdbkhao*#MW&8%B@$";
|
|
335
|
-
/** Clean product UI glyphs inspired by command palettes, panes, controls, and focus rings. */
|
|
336
|
-
readonly interface: " ·•-–—+=:;<>[]{}()⌘⌥⇧⌃↵↗↘◇◆◈□■";
|
|
337
|
-
/** Prompt, shell, and assistant transcript glyphs for modern AI/dev surfaces. */
|
|
338
|
-
readonly prompt: " .:;>_`/\\|{}[]()=+*#@$";
|
|
339
|
-
/** Analytical/data-viz glyphs: sparse dots into nodes, diamonds, and dense blocks. */
|
|
340
|
-
readonly data: " ·∙•◦○●◇◆◈▱▰▣█";
|
|
341
|
-
/** Warm editorial/math symbols for quieter Claude-like and research-oriented pages. */
|
|
342
|
-
readonly humanist: " ·˙,:;∴∵∷∶⁚⋮⋯∼≈≋∞";
|
|
343
|
-
/** Dense network/mesh characters for agent maps, model graphs, and infrastructure visuals. */
|
|
344
|
-
readonly mesh: " ·╶╴╷╵─│┌┐└┘├┤┬┴┼╬░▒▓█";
|
|
345
|
-
};
|
|
346
|
-
/**
|
|
347
|
-
* Curated charset sequences for use with `charsetFrames`.
|
|
348
|
-
* Each sequence morphs between 2–3 complementary charsets over time,
|
|
349
|
-
* creating a living texture effect.
|
|
350
|
-
*
|
|
351
|
-
* @example
|
|
352
|
-
* asciiBackground('#hero', { charsetFrames: CHARSET_SEQUENCES.cosmic })
|
|
353
|
-
*/
|
|
354
|
-
declare const CHARSET_SEQUENCES: {
|
|
355
|
-
/** Sparse marks → circles → orbs — soft tonal texture */
|
|
356
|
-
readonly cosmic: string[];
|
|
357
|
-
/** Katakana → braille dots → binary — hacker rain */
|
|
358
|
-
readonly rain: string[];
|
|
359
|
-
/** Box pipes → Claude glyphs → classic — terminal morph */
|
|
360
|
-
readonly terminal: string[];
|
|
361
|
-
/** Shards → blocks → squares — shattering crystal */
|
|
362
|
-
readonly crystal: string[];
|
|
363
|
-
/** Wave glyphs → smoke dots → circles — fluid / organic */
|
|
364
|
-
readonly fluid: string[];
|
|
365
|
-
/** Dense classic → art → blocks — maximum detail pulse */
|
|
366
|
-
readonly pulse: string[];
|
|
367
|
-
/** Braille → shadows → smoke — ethereal / dream-like */
|
|
368
|
-
readonly dream: string[];
|
|
369
|
-
/** Geometric shapes → shards → blocks — angular texture */
|
|
370
|
-
readonly angular: string[];
|
|
371
|
-
/** Interface controls → prompts → data nodes — clean assistant/product motion */
|
|
372
|
-
readonly assistant: string[];
|
|
373
|
-
/** Mesh → data → ASCII — alive network signal with readable texture */
|
|
374
|
-
readonly signal: string[];
|
|
375
|
-
/** Humanist symbols → waves → smoke — soft research/editorial motion */
|
|
376
|
-
readonly editorial: string[];
|
|
377
|
-
};
|
|
378
|
-
type CharsetSequenceKey = keyof typeof CHARSET_SEQUENCES;
|
|
379
|
-
type CharsetKey = keyof typeof CHARSETS;
|
|
380
|
-
/**
|
|
381
|
-
* Art Style presets — each one sets render mode, charset, color mode, etc.
|
|
382
|
-
*/
|
|
383
|
-
declare const ART_STYLE_PRESETS: Record<ArtStyle, Partial<AsciiOptions>>;
|
|
384
|
-
/**
|
|
385
|
-
* Higher-level living presets for output that should feel active immediately.
|
|
386
|
-
* They intentionally compose existing primitives so renderers and integrations
|
|
387
|
-
* can consume them as a normal `Partial<AsciiOptions>`.
|
|
388
|
-
*/
|
|
389
|
-
declare const LIVING_STYLE_PRESETS: {
|
|
390
|
-
readonly agentField: {
|
|
391
|
-
readonly charsetFrames: string[];
|
|
392
|
-
readonly charsetFps: 1.6;
|
|
393
|
-
readonly animationStyle: "caustics";
|
|
394
|
-
readonly animationSpeed: 0.75;
|
|
395
|
-
readonly ditherStrength: 0.12;
|
|
396
|
-
readonly hoverEffect: "glow";
|
|
397
|
-
readonly hoverStrength: 0.42;
|
|
398
|
-
readonly hoverRadius: 0.18;
|
|
399
|
-
readonly hoverColor: "#f4f1ea";
|
|
400
|
-
readonly normalize: true;
|
|
401
|
-
readonly fontSize?: number | undefined;
|
|
402
|
-
readonly charSpacing?: number | undefined;
|
|
403
|
-
readonly brightness?: number | undefined;
|
|
404
|
-
readonly contrast?: number | undefined;
|
|
405
|
-
readonly charset?: string | undefined;
|
|
406
|
-
readonly colorMode?: ColorMode | undefined;
|
|
407
|
-
readonly accentColor?: string | undefined;
|
|
408
|
-
readonly invert?: boolean | "auto" | undefined;
|
|
409
|
-
readonly renderMode?: RenderMode | undefined;
|
|
410
|
-
readonly dotSizeRatio?: number | undefined;
|
|
411
|
-
readonly charAspect?: number | undefined;
|
|
412
|
-
readonly hoverShape?: HoverShape | undefined;
|
|
413
|
-
readonly hoverText?: string | string[] | undefined;
|
|
414
|
-
readonly artStyle?: ArtStyle | undefined;
|
|
415
|
-
readonly customText?: string | undefined;
|
|
416
|
-
readonly chromaKey?: string | boolean | {
|
|
417
|
-
r: number;
|
|
418
|
-
g: number;
|
|
419
|
-
b: number;
|
|
420
|
-
} | null | undefined;
|
|
421
|
-
readonly chromaKeyTolerance?: number | undefined;
|
|
422
|
-
readonly chromaKeyTrimPadding?: number | undefined;
|
|
423
|
-
readonly chromaKeyTrimLuminanceThreshold?: number | undefined;
|
|
424
|
-
readonly chromaKeyTrimMode?: "range" | "frame" | "off" | undefined;
|
|
425
|
-
readonly sourceCrop?: SourceCrop | null;
|
|
426
|
-
};
|
|
427
|
-
readonly liquidSignal: {
|
|
428
|
-
readonly charsetFrames: string[];
|
|
429
|
-
readonly charsetFps: 2.4;
|
|
430
|
-
readonly animationStyle: "current";
|
|
431
|
-
readonly animationSpeed: 0.65;
|
|
432
|
-
readonly ditherStrength: 0.45;
|
|
433
|
-
readonly hoverEffect: "repel";
|
|
434
|
-
readonly hoverStrength: 0.55;
|
|
435
|
-
readonly hoverRadius: 0.22;
|
|
436
|
-
readonly hoverColor: "#8fd3ff";
|
|
437
|
-
readonly normalize: true;
|
|
438
|
-
readonly fontSize?: number | undefined;
|
|
439
|
-
readonly charSpacing?: number | undefined;
|
|
440
|
-
readonly brightness?: number | undefined;
|
|
441
|
-
readonly contrast?: number | undefined;
|
|
442
|
-
readonly charset?: string | undefined;
|
|
443
|
-
readonly colorMode?: ColorMode | undefined;
|
|
444
|
-
readonly accentColor?: string | undefined;
|
|
445
|
-
readonly invert?: boolean | "auto" | undefined;
|
|
446
|
-
readonly renderMode?: RenderMode | undefined;
|
|
447
|
-
readonly dotSizeRatio?: number | undefined;
|
|
448
|
-
readonly charAspect?: number | undefined;
|
|
449
|
-
readonly hoverShape?: HoverShape | undefined;
|
|
450
|
-
readonly hoverText?: string | string[] | undefined;
|
|
451
|
-
readonly artStyle?: ArtStyle | undefined;
|
|
452
|
-
readonly customText?: string | undefined;
|
|
453
|
-
readonly chromaKey?: string | boolean | {
|
|
454
|
-
r: number;
|
|
455
|
-
g: number;
|
|
456
|
-
b: number;
|
|
457
|
-
} | null | undefined;
|
|
458
|
-
readonly chromaKeyTolerance?: number | undefined;
|
|
459
|
-
readonly chromaKeyTrimPadding?: number | undefined;
|
|
460
|
-
readonly chromaKeyTrimLuminanceThreshold?: number | undefined;
|
|
461
|
-
readonly chromaKeyTrimMode?: "range" | "frame" | "off" | undefined;
|
|
462
|
-
readonly sourceCrop?: SourceCrop | null;
|
|
463
|
-
};
|
|
464
|
-
readonly cursorGravity: {
|
|
465
|
-
readonly charsetFrames: string[];
|
|
466
|
-
readonly charsetFps: 1.2;
|
|
467
|
-
readonly animationStyle: "current";
|
|
468
|
-
readonly animationSpeed: 0.9;
|
|
469
|
-
readonly ditherStrength: 0.2;
|
|
470
|
-
readonly hoverEffect: "attract";
|
|
471
|
-
readonly hoverStrength: 0.82;
|
|
472
|
-
readonly hoverRadius: 0.24;
|
|
473
|
-
readonly hoverColor: "#ffffff";
|
|
474
|
-
readonly normalize: true;
|
|
475
|
-
readonly fontSize?: number | undefined;
|
|
476
|
-
readonly charSpacing?: number | undefined;
|
|
477
|
-
readonly brightness?: number | undefined;
|
|
478
|
-
readonly contrast?: number | undefined;
|
|
479
|
-
readonly charset?: string | undefined;
|
|
480
|
-
readonly colorMode?: ColorMode | undefined;
|
|
481
|
-
readonly accentColor?: string | undefined;
|
|
482
|
-
readonly invert?: boolean | "auto" | undefined;
|
|
483
|
-
readonly renderMode?: RenderMode | undefined;
|
|
484
|
-
readonly dotSizeRatio?: number | undefined;
|
|
485
|
-
readonly charAspect?: number | undefined;
|
|
486
|
-
readonly hoverShape?: HoverShape | undefined;
|
|
487
|
-
readonly hoverText?: string | string[] | undefined;
|
|
488
|
-
readonly artStyle?: ArtStyle | undefined;
|
|
489
|
-
readonly customText?: string | undefined;
|
|
490
|
-
readonly chromaKey?: string | boolean | {
|
|
491
|
-
r: number;
|
|
492
|
-
g: number;
|
|
493
|
-
b: number;
|
|
494
|
-
} | null | undefined;
|
|
495
|
-
readonly chromaKeyTolerance?: number | undefined;
|
|
496
|
-
readonly chromaKeyTrimPadding?: number | undefined;
|
|
497
|
-
readonly chromaKeyTrimLuminanceThreshold?: number | undefined;
|
|
498
|
-
readonly chromaKeyTrimMode?: "range" | "frame" | "off" | undefined;
|
|
499
|
-
readonly sourceCrop?: SourceCrop | null;
|
|
500
|
-
};
|
|
501
|
-
readonly editorialPulse: {
|
|
502
|
-
readonly charsetFrames: string[];
|
|
503
|
-
readonly charsetFps: 0.9;
|
|
504
|
-
readonly animationStyle: "caustics";
|
|
505
|
-
readonly animationSpeed: 0.55;
|
|
506
|
-
readonly ditherStrength: 0.18;
|
|
507
|
-
readonly hoverEffect: "spotlight";
|
|
508
|
-
readonly hoverStrength: 0.35;
|
|
509
|
-
readonly hoverRadius: 0.2;
|
|
510
|
-
readonly hoverColor: "#fff8ea";
|
|
511
|
-
readonly normalize: true;
|
|
512
|
-
readonly fontSize?: number | undefined;
|
|
513
|
-
readonly charSpacing?: number | undefined;
|
|
514
|
-
readonly brightness?: number | undefined;
|
|
515
|
-
readonly contrast?: number | undefined;
|
|
516
|
-
readonly charset?: string | undefined;
|
|
517
|
-
readonly colorMode?: ColorMode | undefined;
|
|
518
|
-
readonly accentColor?: string | undefined;
|
|
519
|
-
readonly invert?: boolean | "auto" | undefined;
|
|
520
|
-
readonly renderMode?: RenderMode | undefined;
|
|
521
|
-
readonly dotSizeRatio?: number | undefined;
|
|
522
|
-
readonly charAspect?: number | undefined;
|
|
523
|
-
readonly hoverShape?: HoverShape | undefined;
|
|
524
|
-
readonly hoverText?: string | string[] | undefined;
|
|
525
|
-
readonly artStyle?: ArtStyle | undefined;
|
|
526
|
-
readonly customText?: string | undefined;
|
|
527
|
-
readonly chromaKey?: string | boolean | {
|
|
528
|
-
r: number;
|
|
529
|
-
g: number;
|
|
530
|
-
b: number;
|
|
531
|
-
} | null | undefined;
|
|
532
|
-
readonly chromaKeyTolerance?: number | undefined;
|
|
533
|
-
readonly chromaKeyTrimPadding?: number | undefined;
|
|
534
|
-
readonly chromaKeyTrimLuminanceThreshold?: number | undefined;
|
|
535
|
-
readonly chromaKeyTrimMode?: "range" | "frame" | "off" | undefined;
|
|
536
|
-
readonly sourceCrop?: SourceCrop | null;
|
|
537
|
-
};
|
|
538
|
-
readonly terminalFlow: {
|
|
539
|
-
readonly charsetFrames: string[];
|
|
540
|
-
readonly charsetFps: 3;
|
|
541
|
-
readonly animationStyle: "reform";
|
|
542
|
-
readonly animationSpeed: 1.1;
|
|
543
|
-
readonly ditherStrength: 0.22;
|
|
544
|
-
readonly hoverEffect: "glitchText";
|
|
545
|
-
readonly hoverStrength: 0.65;
|
|
546
|
-
readonly hoverRadius: 0.16;
|
|
547
|
-
readonly hoverColor: "#d4ff00";
|
|
548
|
-
readonly hoverText: ["BUILD", "SHIP", "RUN", "ASK", "MODEL"];
|
|
549
|
-
readonly normalize: true;
|
|
550
|
-
readonly fontSize?: number | undefined;
|
|
551
|
-
readonly charSpacing?: number | undefined;
|
|
552
|
-
readonly brightness?: number | undefined;
|
|
553
|
-
readonly contrast?: number | undefined;
|
|
554
|
-
readonly charset?: string | undefined;
|
|
555
|
-
readonly colorMode?: ColorMode | undefined;
|
|
556
|
-
readonly accentColor?: string | undefined;
|
|
557
|
-
readonly invert?: boolean | "auto" | undefined;
|
|
558
|
-
readonly renderMode?: RenderMode | undefined;
|
|
559
|
-
readonly dotSizeRatio?: number | undefined;
|
|
560
|
-
readonly charAspect?: number | undefined;
|
|
561
|
-
readonly hoverShape?: HoverShape | undefined;
|
|
562
|
-
readonly artStyle?: ArtStyle | undefined;
|
|
563
|
-
readonly customText?: string | undefined;
|
|
564
|
-
readonly chromaKey?: string | boolean | {
|
|
565
|
-
r: number;
|
|
566
|
-
g: number;
|
|
567
|
-
b: number;
|
|
568
|
-
} | null | undefined;
|
|
569
|
-
readonly chromaKeyTolerance?: number | undefined;
|
|
570
|
-
readonly chromaKeyTrimPadding?: number | undefined;
|
|
571
|
-
readonly chromaKeyTrimLuminanceThreshold?: number | undefined;
|
|
572
|
-
readonly chromaKeyTrimMode?: "range" | "frame" | "off" | undefined;
|
|
573
|
-
readonly sourceCrop?: SourceCrop | null;
|
|
574
|
-
};
|
|
575
|
-
};
|
|
576
|
-
type LivingStylePresetKey = keyof typeof LIVING_STYLE_PRESETS;
|
|
577
|
-
declare const DEFAULT_OPTIONS: AsciiOptions;
|
|
578
|
-
/**
|
|
579
|
-
* Hover presets — one-click configurations for the hover system.
|
|
580
|
-
*/
|
|
581
|
-
declare const HOVER_PRESETS: Record<HoverPreset, {
|
|
582
|
-
label: string;
|
|
583
|
-
options: Partial<AsciiOptions>;
|
|
584
|
-
}>;
|
|
585
|
-
|
|
586
|
-
export { type AsciiFrame as A, CHARSETS as C, DEFAULT_OPTIONS as D, type HoverEffect as H, LIVING_STYLE_PRESETS as L, PALETTE_THEMES as P, type RenderMode as R, type SourceType as S, type AsciiOptions as a, type ArtStyle as b, ART_STYLE_PRESETS as c, type AnimationStyle as d, type AsciiCell as e, type AsciiResult as f, CHARSET_SEQUENCES as g, type CharsetKey as h, type CharsetSequenceKey as i, type ColorMode as j, HOVER_PRESETS as k, type HoverPreset as l, type HoverShape as m, type LivingStylePresetKey as n, type PaletteTheme as o };
|