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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { A as AmbientMotion } from './ambient-motion-CqF5-eZ2.cjs';
|
|
2
|
+
|
|
3
|
+
/** Curated ASCII ramps. Use custom text to supply a different alphabet. */
|
|
4
|
+
declare const CHARACTER_SETS: {
|
|
5
|
+
readonly standard: {
|
|
6
|
+
readonly label: "Classic ASCII";
|
|
7
|
+
readonly chars: " .:-=+*#%@";
|
|
8
|
+
};
|
|
9
|
+
readonly asciify: {
|
|
10
|
+
readonly label: "Asciify";
|
|
11
|
+
readonly chars: " .:-=+ASCIIFY#@";
|
|
12
|
+
};
|
|
13
|
+
readonly minimal: {
|
|
14
|
+
readonly label: "Minimal";
|
|
15
|
+
readonly chars: " .:+";
|
|
16
|
+
};
|
|
17
|
+
readonly detailed: {
|
|
18
|
+
readonly label: "Detailed";
|
|
19
|
+
readonly chars: " .,:;i1tfLCG08@";
|
|
20
|
+
};
|
|
21
|
+
readonly letters: {
|
|
22
|
+
readonly label: "Letters";
|
|
23
|
+
readonly chars: " .ilLCFTYASMW";
|
|
24
|
+
};
|
|
25
|
+
readonly technical: {
|
|
26
|
+
readonly label: "Technical";
|
|
27
|
+
readonly chars: " .:;>_/[{}]=+*#@$";
|
|
28
|
+
};
|
|
29
|
+
readonly blocks: {
|
|
30
|
+
readonly label: "Tonal blocks";
|
|
31
|
+
readonly chars: " ░▒▓█";
|
|
32
|
+
};
|
|
33
|
+
readonly braille: {
|
|
34
|
+
readonly label: "Braille";
|
|
35
|
+
readonly chars: " ⠁⠃⠇⡇⣇⣧⣷⣿";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
declare const STUDIO_CHARACTER_SETS: {
|
|
39
|
+
readonly standard: {
|
|
40
|
+
readonly label: "Classic ASCII";
|
|
41
|
+
readonly chars: " .:-=+*#%@";
|
|
42
|
+
};
|
|
43
|
+
readonly asciify: {
|
|
44
|
+
readonly label: "Asciify";
|
|
45
|
+
readonly chars: " .:-=+ASCIIFY#@";
|
|
46
|
+
};
|
|
47
|
+
readonly minimal: {
|
|
48
|
+
readonly label: "Minimal";
|
|
49
|
+
readonly chars: " .:+";
|
|
50
|
+
};
|
|
51
|
+
readonly detailed: {
|
|
52
|
+
readonly label: "Detailed";
|
|
53
|
+
readonly chars: " .,:;i1tfLCG08@";
|
|
54
|
+
};
|
|
55
|
+
readonly letters: {
|
|
56
|
+
readonly label: "Letters";
|
|
57
|
+
readonly chars: " .ilLCFTYASMW";
|
|
58
|
+
};
|
|
59
|
+
readonly technical: {
|
|
60
|
+
readonly label: "Technical";
|
|
61
|
+
readonly chars: " .:;>_/[{}]=+*#@$";
|
|
62
|
+
};
|
|
63
|
+
readonly blocks: {
|
|
64
|
+
readonly label: "Tonal blocks";
|
|
65
|
+
readonly chars: " ░▒▓█";
|
|
66
|
+
};
|
|
67
|
+
readonly braille: {
|
|
68
|
+
readonly label: "Braille";
|
|
69
|
+
readonly chars: " ⠁⠃⠇⡇⣇⣧⣷⣿";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** Serializable, media-independent editing state. No DOM work at import time. */
|
|
74
|
+
declare const STUDIO_STYLES: readonly ["ascii", "blocks", "braille", "dots", "lines", "cross", "diagonal", "diamond", "mixed", "pixel", "mosaic", "lego", "voxel", "disco", "dither"];
|
|
75
|
+
type StudioStyle = (typeof STUDIO_STYLES)[number];
|
|
76
|
+
declare const DITHER_ALGORITHMS: readonly ["none", "bayer2", "bayer4", "bayer8", "bayer16", "floyd-steinberg", "atkinson", "stucki", "sierra", "sierra-lite", "burkes", "jarvis", "halftone", "lines", "noise"];
|
|
77
|
+
type DitherAlgorithm = (typeof DITHER_ALGORITHMS)[number];
|
|
78
|
+
declare const BLEND_MODES: readonly ["source-over", "multiply", "screen", "overlay", "soft-light", "hard-light", "color-dodge", "color-burn", "hue", "saturation", "color", "luminosity"];
|
|
79
|
+
declare const STUDIO_PALETTES: Record<string, readonly string[]>;
|
|
80
|
+
interface StudioMask {
|
|
81
|
+
kind: "rectangle" | "ellipse" | "brush";
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
points?: [number, number][];
|
|
87
|
+
size?: number;
|
|
88
|
+
}
|
|
89
|
+
interface StudioLight {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
radius: number;
|
|
93
|
+
intensity: number;
|
|
94
|
+
color: string;
|
|
95
|
+
}
|
|
96
|
+
interface StudioSettings {
|
|
97
|
+
version: 1;
|
|
98
|
+
aspectRatio: "original" | "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9";
|
|
99
|
+
style: StudioStyle;
|
|
100
|
+
cellSize: number;
|
|
101
|
+
charset: string;
|
|
102
|
+
colorMode: "accent" | "source" | "gray";
|
|
103
|
+
ink: string;
|
|
104
|
+
crop: {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
zoom: number;
|
|
108
|
+
rotation: number;
|
|
109
|
+
};
|
|
110
|
+
backdrop: {
|
|
111
|
+
mode: "solid" | "transparent" | "source" | "blurred" | "gradient";
|
|
112
|
+
color: string;
|
|
113
|
+
color2: string;
|
|
114
|
+
blur: number;
|
|
115
|
+
opacity: number;
|
|
116
|
+
};
|
|
117
|
+
color: {
|
|
118
|
+
brightness: number;
|
|
119
|
+
contrast: number;
|
|
120
|
+
saturation: number;
|
|
121
|
+
grayscale: number;
|
|
122
|
+
tint: string;
|
|
123
|
+
amount: number;
|
|
124
|
+
blend: (typeof BLEND_MODES)[number];
|
|
125
|
+
};
|
|
126
|
+
dither: {
|
|
127
|
+
algorithm: DitherAlgorithm;
|
|
128
|
+
palette: string;
|
|
129
|
+
colors: string[];
|
|
130
|
+
amount: number;
|
|
131
|
+
scale: number;
|
|
132
|
+
threshold: number;
|
|
133
|
+
motion: "none" | "drift" | "shimmer";
|
|
134
|
+
speed: number;
|
|
135
|
+
};
|
|
136
|
+
mask: {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
invert: boolean;
|
|
139
|
+
shapes: StudioMask[];
|
|
140
|
+
};
|
|
141
|
+
lights: StudioLight[];
|
|
142
|
+
effects: {
|
|
143
|
+
bloom: number;
|
|
144
|
+
characterBloom: number;
|
|
145
|
+
grain: number;
|
|
146
|
+
dust: number;
|
|
147
|
+
scanlines: number;
|
|
148
|
+
crt: number;
|
|
149
|
+
prism: number;
|
|
150
|
+
vignette: number;
|
|
151
|
+
glitch: number;
|
|
152
|
+
pixelate: number;
|
|
153
|
+
blur: number;
|
|
154
|
+
blurType: "gaussian" | "directional" | "radial" | "progressive";
|
|
155
|
+
angle: number;
|
|
156
|
+
focus: number;
|
|
157
|
+
halftone: number;
|
|
158
|
+
};
|
|
159
|
+
motion: {
|
|
160
|
+
type: AmbientMotion;
|
|
161
|
+
speed: number;
|
|
162
|
+
};
|
|
163
|
+
hover: {
|
|
164
|
+
effect: "none" | "trail" | "water" | "contour" | "dissolve" | "silk" | "vortex";
|
|
165
|
+
strength: number;
|
|
166
|
+
radius: number;
|
|
167
|
+
edgeSafe: boolean;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
declare const DEFAULT_STUDIO_SETTINGS: StudioSettings;
|
|
171
|
+
/** Whitelist external settings; reject future versions instead of misinterpreting them. */
|
|
172
|
+
declare function normalizeStudioSettings(input?: unknown): StudioSettings;
|
|
173
|
+
declare function serializeStudioSettings(settings: StudioSettings): string;
|
|
174
|
+
declare function parseStudioSettings(json: string): StudioSettings;
|
|
175
|
+
declare function studioCrop(sw: number, sh: number, w: number, h: number, c: StudioSettings["crop"]): {
|
|
176
|
+
width: number;
|
|
177
|
+
height: number;
|
|
178
|
+
x: number;
|
|
179
|
+
y: number;
|
|
180
|
+
scale: number;
|
|
181
|
+
rotated: boolean;
|
|
182
|
+
};
|
|
183
|
+
/** Dimensions for the saved canvas ratio, including source rotation. */
|
|
184
|
+
declare function studioDimensions(width: number, height: number, settings: StudioSettings): [number, number];
|
|
185
|
+
/** Partial configuration for mounting and incremental updates. Arrays replace previous arrays. */
|
|
186
|
+
type StudioInput = {
|
|
187
|
+
[K in keyof StudioSettings]?: StudioSettings[K] extends readonly unknown[] ? StudioSettings[K] : StudioSettings[K] extends object ? Partial<StudioSettings[K]> : StudioSettings[K];
|
|
188
|
+
};
|
|
189
|
+
declare function updateStudioSettings(current: StudioSettings, patch: StudioInput): StudioSettings;
|
|
190
|
+
/** Effective grid and usable cell-size range at a bounded render resolution.
|
|
191
|
+
* pixelRatio preserves preview density when exporting at a larger resolution.
|
|
192
|
+
*/
|
|
193
|
+
declare function studioGrid(width: number, height: number, settings: Pick<StudioSettings, 'style' | 'cellSize' | 'dither'>, maxCells?: number, pixelRatio?: number): {
|
|
194
|
+
cell: number;
|
|
195
|
+
rowHeight: number;
|
|
196
|
+
columns: number;
|
|
197
|
+
rows: number;
|
|
198
|
+
minimum: number;
|
|
199
|
+
limited: boolean;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export { BLEND_MODES as B, CHARACTER_SETS as C, DEFAULT_STUDIO_SETTINGS as D, type StudioSettings as S, type StudioInput as a, DITHER_ALGORITHMS as b, type DitherAlgorithm as c, STUDIO_CHARACTER_SETS as d, STUDIO_PALETTES as e, STUDIO_STYLES as f, type StudioLight as g, type StudioMask as h, type StudioStyle as i, studioCrop as j, studioDimensions as k, studioGrid as l, normalizeStudioSettings as n, parseStudioSettings as p, serializeStudioSettings as s, updateStudioSettings as u };
|
package/dist/studio.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { S as StudioSettings, a as StudioInput } from './model-aIWlIoDT.cjs';
|
|
2
|
+
export { B as BLEND_MODES, C as CHARACTER_SETS, D as DEFAULT_STUDIO_SETTINGS, b as DITHER_ALGORITHMS, c as DitherAlgorithm, d as STUDIO_CHARACTER_SETS, e as STUDIO_PALETTES, f as STUDIO_STYLES, g as StudioLight, h as StudioMask, i as StudioStyle, n as normalizeStudioSettings, p as parseStudioSettings, s as serializeStudioSettings, j as studioCrop, k as studioDimensions, l as studioGrid, u as updateStudioSettings } from './model-aIWlIoDT.cjs';
|
|
3
3
|
import * as figlet_fonts_Wavy from 'figlet/fonts/Wavy';
|
|
4
4
|
import * as figlet_fonts_Univers from 'figlet/fonts/Univers';
|
|
5
5
|
import * as figlet_fonts_3_D from 'figlet/fonts/3-D';
|
|
@@ -21,136 +21,7 @@ import * as figlet_fonts_Big from 'figlet/fonts/Big';
|
|
|
21
21
|
import * as figlet_fonts_Small from 'figlet/fonts/Small';
|
|
22
22
|
import * as figlet_fonts_Slant from 'figlet/fonts/Slant';
|
|
23
23
|
import * as figlet_fonts_Standard from 'figlet/fonts/Standard';
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
/** Serializable, media-independent editing state. No DOM work at import time. */
|
|
27
|
-
declare const STUDIO_STYLES: readonly ["ascii", "blocks", "braille", "dots", "lines", "cross", "diagonal", "diamond", "mixed", "pixel", "mosaic", "lego", "voxel", "disco", "dither"];
|
|
28
|
-
type StudioStyle = (typeof STUDIO_STYLES)[number];
|
|
29
|
-
declare const DITHER_ALGORITHMS: readonly ["none", "bayer2", "bayer4", "bayer8", "bayer16", "floyd-steinberg", "atkinson", "stucki", "sierra", "sierra-lite", "burkes", "jarvis", "halftone", "lines", "noise"];
|
|
30
|
-
type DitherAlgorithm = (typeof DITHER_ALGORITHMS)[number];
|
|
31
|
-
declare const BLEND_MODES: readonly ["source-over", "multiply", "screen", "overlay", "soft-light", "hard-light", "color-dodge", "color-burn", "hue", "saturation", "color", "luminosity"];
|
|
32
|
-
declare const STUDIO_PALETTES: Record<string, readonly string[]>;
|
|
33
|
-
interface StudioMask {
|
|
34
|
-
kind: "rectangle" | "ellipse" | "brush";
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
points?: [number, number][];
|
|
40
|
-
size?: number;
|
|
41
|
-
}
|
|
42
|
-
interface StudioLight {
|
|
43
|
-
x: number;
|
|
44
|
-
y: number;
|
|
45
|
-
radius: number;
|
|
46
|
-
intensity: number;
|
|
47
|
-
color: string;
|
|
48
|
-
}
|
|
49
|
-
interface StudioSettings {
|
|
50
|
-
version: 1;
|
|
51
|
-
aspectRatio: "original" | "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9";
|
|
52
|
-
style: StudioStyle;
|
|
53
|
-
cellSize: number;
|
|
54
|
-
charset: string;
|
|
55
|
-
colorMode: "accent" | "source" | "gray";
|
|
56
|
-
ink: string;
|
|
57
|
-
crop: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
zoom: number;
|
|
61
|
-
rotation: number;
|
|
62
|
-
};
|
|
63
|
-
backdrop: {
|
|
64
|
-
mode: "solid" | "transparent" | "source" | "blurred" | "gradient";
|
|
65
|
-
color: string;
|
|
66
|
-
color2: string;
|
|
67
|
-
blur: number;
|
|
68
|
-
opacity: number;
|
|
69
|
-
};
|
|
70
|
-
color: {
|
|
71
|
-
brightness: number;
|
|
72
|
-
contrast: number;
|
|
73
|
-
saturation: number;
|
|
74
|
-
grayscale: number;
|
|
75
|
-
tint: string;
|
|
76
|
-
amount: number;
|
|
77
|
-
blend: (typeof BLEND_MODES)[number];
|
|
78
|
-
};
|
|
79
|
-
dither: {
|
|
80
|
-
algorithm: DitherAlgorithm;
|
|
81
|
-
palette: string;
|
|
82
|
-
colors: string[];
|
|
83
|
-
amount: number;
|
|
84
|
-
scale: number;
|
|
85
|
-
threshold: number;
|
|
86
|
-
motion: "none" | "drift" | "shimmer";
|
|
87
|
-
speed: number;
|
|
88
|
-
};
|
|
89
|
-
mask: {
|
|
90
|
-
enabled: boolean;
|
|
91
|
-
invert: boolean;
|
|
92
|
-
shapes: StudioMask[];
|
|
93
|
-
};
|
|
94
|
-
lights: StudioLight[];
|
|
95
|
-
effects: {
|
|
96
|
-
bloom: number;
|
|
97
|
-
characterBloom: number;
|
|
98
|
-
grain: number;
|
|
99
|
-
dust: number;
|
|
100
|
-
scanlines: number;
|
|
101
|
-
crt: number;
|
|
102
|
-
prism: number;
|
|
103
|
-
vignette: number;
|
|
104
|
-
glitch: number;
|
|
105
|
-
pixelate: number;
|
|
106
|
-
blur: number;
|
|
107
|
-
blurType: "gaussian" | "directional" | "radial" | "progressive";
|
|
108
|
-
angle: number;
|
|
109
|
-
focus: number;
|
|
110
|
-
halftone: number;
|
|
111
|
-
};
|
|
112
|
-
motion: {
|
|
113
|
-
type: AmbientMotion;
|
|
114
|
-
speed: number;
|
|
115
|
-
};
|
|
116
|
-
hover: {
|
|
117
|
-
effect: "none" | "trail" | "water" | "contour" | "dissolve" | "silk" | "vortex";
|
|
118
|
-
strength: number;
|
|
119
|
-
radius: number;
|
|
120
|
-
edgeSafe: boolean;
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
declare const DEFAULT_STUDIO_SETTINGS: StudioSettings;
|
|
124
|
-
/** Whitelist external settings; reject future versions instead of misinterpreting them. */
|
|
125
|
-
declare function normalizeStudioSettings(input?: unknown): StudioSettings;
|
|
126
|
-
declare function serializeStudioSettings(settings: StudioSettings): string;
|
|
127
|
-
declare function parseStudioSettings(json: string): StudioSettings;
|
|
128
|
-
declare function studioCrop(sw: number, sh: number, w: number, h: number, c: StudioSettings["crop"]): {
|
|
129
|
-
width: number;
|
|
130
|
-
height: number;
|
|
131
|
-
x: number;
|
|
132
|
-
y: number;
|
|
133
|
-
scale: number;
|
|
134
|
-
rotated: boolean;
|
|
135
|
-
};
|
|
136
|
-
/** Dimensions for the saved canvas ratio, including source rotation. */
|
|
137
|
-
declare function studioDimensions(width: number, height: number, settings: StudioSettings): [number, number];
|
|
138
|
-
/** Partial configuration for mounting and incremental updates. Arrays replace previous arrays. */
|
|
139
|
-
type StudioInput = {
|
|
140
|
-
[K in keyof StudioSettings]?: StudioSettings[K] extends readonly unknown[] ? StudioSettings[K] : StudioSettings[K] extends object ? Partial<StudioSettings[K]> : StudioSettings[K];
|
|
141
|
-
};
|
|
142
|
-
declare function updateStudioSettings(current: StudioSettings, patch: StudioInput): StudioSettings;
|
|
143
|
-
/** Effective grid and usable cell-size range at a bounded render resolution.
|
|
144
|
-
* pixelRatio preserves preview density when exporting at a larger resolution.
|
|
145
|
-
*/
|
|
146
|
-
declare function studioGrid(width: number, height: number, settings: Pick<StudioSettings, 'style' | 'cellSize' | 'dither'>, maxCells?: number, pixelRatio?: number): {
|
|
147
|
-
cell: number;
|
|
148
|
-
rowHeight: number;
|
|
149
|
-
columns: number;
|
|
150
|
-
rows: number;
|
|
151
|
-
minimum: number;
|
|
152
|
-
limited: boolean;
|
|
153
|
-
};
|
|
24
|
+
export { M as STUDIO_MOTIONS } from './ambient-motion-CqF5-eZ2.cjs';
|
|
154
25
|
|
|
155
26
|
declare const STUDIO_LOOKS: {
|
|
156
27
|
id: string;
|
|
@@ -306,4 +177,4 @@ declare function createStudioText(text: string, font?: keyof typeof loaders, ink
|
|
|
306
177
|
ascii: string;
|
|
307
178
|
}>;
|
|
308
179
|
|
|
309
|
-
export {
|
|
180
|
+
export { type MountStudioOptions, STUDIO_LOOKS, STUDIO_TEXT_FONTS, type StudioExportFormat, type StudioExportOptions, type StudioExportSource, StudioInput, type StudioMedia, StudioSettings, type StudioSource, createStudioRenderer, createStudioText, exportStudio, loadStudioMedia, mountStudio, mountStudioMedia, restyleStudio, studioLook, studioSourceSize };
|
package/dist/studio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { S as StudioSettings, a as StudioInput } from './model-BJXd0Jl-.js';
|
|
2
|
+
export { B as BLEND_MODES, C as CHARACTER_SETS, D as DEFAULT_STUDIO_SETTINGS, b as DITHER_ALGORITHMS, c as DitherAlgorithm, d as STUDIO_CHARACTER_SETS, e as STUDIO_PALETTES, f as STUDIO_STYLES, g as StudioLight, h as StudioMask, i as StudioStyle, n as normalizeStudioSettings, p as parseStudioSettings, s as serializeStudioSettings, j as studioCrop, k as studioDimensions, l as studioGrid, u as updateStudioSettings } from './model-BJXd0Jl-.js';
|
|
3
3
|
import * as figlet_fonts_Wavy from 'figlet/fonts/Wavy';
|
|
4
4
|
import * as figlet_fonts_Univers from 'figlet/fonts/Univers';
|
|
5
5
|
import * as figlet_fonts_3_D from 'figlet/fonts/3-D';
|
|
@@ -21,136 +21,7 @@ import * as figlet_fonts_Big from 'figlet/fonts/Big';
|
|
|
21
21
|
import * as figlet_fonts_Small from 'figlet/fonts/Small';
|
|
22
22
|
import * as figlet_fonts_Slant from 'figlet/fonts/Slant';
|
|
23
23
|
import * as figlet_fonts_Standard from 'figlet/fonts/Standard';
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
/** Serializable, media-independent editing state. No DOM work at import time. */
|
|
27
|
-
declare const STUDIO_STYLES: readonly ["ascii", "blocks", "braille", "dots", "lines", "cross", "diagonal", "diamond", "mixed", "pixel", "mosaic", "lego", "voxel", "disco", "dither"];
|
|
28
|
-
type StudioStyle = (typeof STUDIO_STYLES)[number];
|
|
29
|
-
declare const DITHER_ALGORITHMS: readonly ["none", "bayer2", "bayer4", "bayer8", "bayer16", "floyd-steinberg", "atkinson", "stucki", "sierra", "sierra-lite", "burkes", "jarvis", "halftone", "lines", "noise"];
|
|
30
|
-
type DitherAlgorithm = (typeof DITHER_ALGORITHMS)[number];
|
|
31
|
-
declare const BLEND_MODES: readonly ["source-over", "multiply", "screen", "overlay", "soft-light", "hard-light", "color-dodge", "color-burn", "hue", "saturation", "color", "luminosity"];
|
|
32
|
-
declare const STUDIO_PALETTES: Record<string, readonly string[]>;
|
|
33
|
-
interface StudioMask {
|
|
34
|
-
kind: "rectangle" | "ellipse" | "brush";
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
points?: [number, number][];
|
|
40
|
-
size?: number;
|
|
41
|
-
}
|
|
42
|
-
interface StudioLight {
|
|
43
|
-
x: number;
|
|
44
|
-
y: number;
|
|
45
|
-
radius: number;
|
|
46
|
-
intensity: number;
|
|
47
|
-
color: string;
|
|
48
|
-
}
|
|
49
|
-
interface StudioSettings {
|
|
50
|
-
version: 1;
|
|
51
|
-
aspectRatio: "original" | "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9";
|
|
52
|
-
style: StudioStyle;
|
|
53
|
-
cellSize: number;
|
|
54
|
-
charset: string;
|
|
55
|
-
colorMode: "accent" | "source" | "gray";
|
|
56
|
-
ink: string;
|
|
57
|
-
crop: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
zoom: number;
|
|
61
|
-
rotation: number;
|
|
62
|
-
};
|
|
63
|
-
backdrop: {
|
|
64
|
-
mode: "solid" | "transparent" | "source" | "blurred" | "gradient";
|
|
65
|
-
color: string;
|
|
66
|
-
color2: string;
|
|
67
|
-
blur: number;
|
|
68
|
-
opacity: number;
|
|
69
|
-
};
|
|
70
|
-
color: {
|
|
71
|
-
brightness: number;
|
|
72
|
-
contrast: number;
|
|
73
|
-
saturation: number;
|
|
74
|
-
grayscale: number;
|
|
75
|
-
tint: string;
|
|
76
|
-
amount: number;
|
|
77
|
-
blend: (typeof BLEND_MODES)[number];
|
|
78
|
-
};
|
|
79
|
-
dither: {
|
|
80
|
-
algorithm: DitherAlgorithm;
|
|
81
|
-
palette: string;
|
|
82
|
-
colors: string[];
|
|
83
|
-
amount: number;
|
|
84
|
-
scale: number;
|
|
85
|
-
threshold: number;
|
|
86
|
-
motion: "none" | "drift" | "shimmer";
|
|
87
|
-
speed: number;
|
|
88
|
-
};
|
|
89
|
-
mask: {
|
|
90
|
-
enabled: boolean;
|
|
91
|
-
invert: boolean;
|
|
92
|
-
shapes: StudioMask[];
|
|
93
|
-
};
|
|
94
|
-
lights: StudioLight[];
|
|
95
|
-
effects: {
|
|
96
|
-
bloom: number;
|
|
97
|
-
characterBloom: number;
|
|
98
|
-
grain: number;
|
|
99
|
-
dust: number;
|
|
100
|
-
scanlines: number;
|
|
101
|
-
crt: number;
|
|
102
|
-
prism: number;
|
|
103
|
-
vignette: number;
|
|
104
|
-
glitch: number;
|
|
105
|
-
pixelate: number;
|
|
106
|
-
blur: number;
|
|
107
|
-
blurType: "gaussian" | "directional" | "radial" | "progressive";
|
|
108
|
-
angle: number;
|
|
109
|
-
focus: number;
|
|
110
|
-
halftone: number;
|
|
111
|
-
};
|
|
112
|
-
motion: {
|
|
113
|
-
type: AmbientMotion;
|
|
114
|
-
speed: number;
|
|
115
|
-
};
|
|
116
|
-
hover: {
|
|
117
|
-
effect: "none" | "trail" | "water" | "contour" | "dissolve" | "silk" | "vortex";
|
|
118
|
-
strength: number;
|
|
119
|
-
radius: number;
|
|
120
|
-
edgeSafe: boolean;
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
declare const DEFAULT_STUDIO_SETTINGS: StudioSettings;
|
|
124
|
-
/** Whitelist external settings; reject future versions instead of misinterpreting them. */
|
|
125
|
-
declare function normalizeStudioSettings(input?: unknown): StudioSettings;
|
|
126
|
-
declare function serializeStudioSettings(settings: StudioSettings): string;
|
|
127
|
-
declare function parseStudioSettings(json: string): StudioSettings;
|
|
128
|
-
declare function studioCrop(sw: number, sh: number, w: number, h: number, c: StudioSettings["crop"]): {
|
|
129
|
-
width: number;
|
|
130
|
-
height: number;
|
|
131
|
-
x: number;
|
|
132
|
-
y: number;
|
|
133
|
-
scale: number;
|
|
134
|
-
rotated: boolean;
|
|
135
|
-
};
|
|
136
|
-
/** Dimensions for the saved canvas ratio, including source rotation. */
|
|
137
|
-
declare function studioDimensions(width: number, height: number, settings: StudioSettings): [number, number];
|
|
138
|
-
/** Partial configuration for mounting and incremental updates. Arrays replace previous arrays. */
|
|
139
|
-
type StudioInput = {
|
|
140
|
-
[K in keyof StudioSettings]?: StudioSettings[K] extends readonly unknown[] ? StudioSettings[K] : StudioSettings[K] extends object ? Partial<StudioSettings[K]> : StudioSettings[K];
|
|
141
|
-
};
|
|
142
|
-
declare function updateStudioSettings(current: StudioSettings, patch: StudioInput): StudioSettings;
|
|
143
|
-
/** Effective grid and usable cell-size range at a bounded render resolution.
|
|
144
|
-
* pixelRatio preserves preview density when exporting at a larger resolution.
|
|
145
|
-
*/
|
|
146
|
-
declare function studioGrid(width: number, height: number, settings: Pick<StudioSettings, 'style' | 'cellSize' | 'dither'>, maxCells?: number, pixelRatio?: number): {
|
|
147
|
-
cell: number;
|
|
148
|
-
rowHeight: number;
|
|
149
|
-
columns: number;
|
|
150
|
-
rows: number;
|
|
151
|
-
minimum: number;
|
|
152
|
-
limited: boolean;
|
|
153
|
-
};
|
|
24
|
+
export { M as STUDIO_MOTIONS } from './ambient-motion-CqF5-eZ2.js';
|
|
154
25
|
|
|
155
26
|
declare const STUDIO_LOOKS: {
|
|
156
27
|
id: string;
|
|
@@ -306,4 +177,4 @@ declare function createStudioText(text: string, font?: keyof typeof loaders, ink
|
|
|
306
177
|
ascii: string;
|
|
307
178
|
}>;
|
|
308
179
|
|
|
309
|
-
export {
|
|
180
|
+
export { type MountStudioOptions, STUDIO_LOOKS, STUDIO_TEXT_FONTS, type StudioExportFormat, type StudioExportOptions, type StudioExportSource, StudioInput, type StudioMedia, StudioSettings, type StudioSource, createStudioRenderer, createStudioText, exportStudio, loadStudioMedia, mountStudio, mountStudioMedia, restyleStudio, studioLook, studioSourceSize };
|