@autumnsgrove/gossamer 0.1.0 → 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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/dist/animation.js +165 -0
  3. package/dist/animation.test.js +204 -0
  4. package/dist/characters.d.ts.map +1 -1
  5. package/dist/characters.js +176 -0
  6. package/dist/characters.test.js +115 -0
  7. package/dist/colors.d.ts +312 -0
  8. package/dist/colors.d.ts.map +1 -0
  9. package/dist/colors.js +199 -0
  10. package/dist/index.d.ts +5 -3
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +79 -1308
  13. package/dist/index.test.js +92 -0
  14. package/dist/patterns.d.ts +119 -2
  15. package/dist/patterns.d.ts.map +1 -1
  16. package/dist/patterns.js +539 -0
  17. package/dist/patterns.test.js +223 -0
  18. package/dist/renderer.d.ts +27 -0
  19. package/dist/renderer.d.ts.map +1 -1
  20. package/dist/renderer.js +362 -0
  21. package/dist/svelte/GossamerBorder.svelte.d.ts +56 -1
  22. package/dist/svelte/GossamerBorder.svelte.d.ts.map +1 -0
  23. package/{src → dist}/svelte/GossamerClouds.svelte +6 -6
  24. package/dist/svelte/GossamerClouds.svelte.d.ts +31 -1
  25. package/dist/svelte/GossamerClouds.svelte.d.ts.map +1 -0
  26. package/dist/svelte/GossamerImage.svelte.d.ts +28 -1
  27. package/dist/svelte/GossamerImage.svelte.d.ts.map +1 -0
  28. package/dist/svelte/GossamerOverlay.svelte.d.ts +32 -1
  29. package/dist/svelte/GossamerOverlay.svelte.d.ts.map +1 -0
  30. package/dist/svelte/GossamerText.svelte.d.ts +29 -1
  31. package/dist/svelte/GossamerText.svelte.d.ts.map +1 -0
  32. package/dist/svelte/index.js +31 -3649
  33. package/dist/svelte/presets.d.ts +4 -2
  34. package/dist/svelte/presets.js +161 -0
  35. package/dist/utils/canvas.js +139 -0
  36. package/dist/utils/image.js +195 -0
  37. package/dist/utils/performance.js +205 -0
  38. package/package.json +20 -15
  39. package/dist/index.js.map +0 -1
  40. package/dist/style.css +0 -124
  41. package/dist/svelte/index.js.map +0 -1
  42. package/src/animation.test.ts +0 -254
  43. package/src/animation.ts +0 -243
  44. package/src/characters.test.ts +0 -148
  45. package/src/characters.ts +0 -164
  46. package/src/index.test.ts +0 -115
  47. package/src/index.ts +0 -203
  48. package/src/patterns.test.ts +0 -273
  49. package/src/patterns.ts +0 -316
  50. package/src/renderer.ts +0 -309
  51. package/src/svelte/index.ts +0 -75
  52. package/src/svelte/presets.ts +0 -174
  53. package/src/utils/canvas.ts +0 -210
  54. package/src/utils/image.ts +0 -275
  55. package/src/utils/performance.ts +0 -282
  56. /package/{src → dist}/svelte/GossamerBorder.svelte +0 -0
  57. /package/{src → dist}/svelte/GossamerImage.svelte +0 -0
  58. /package/{src → dist}/svelte/GossamerOverlay.svelte +0 -0
  59. /package/{src → dist}/svelte/GossamerText.svelte +0 -0
@@ -0,0 +1,312 @@
1
+ /**
2
+ * Gossamer Color Palettes
3
+ *
4
+ * Grove-themed color palettes for ASCII effects.
5
+ * Designed to complement Glass UI components.
6
+ */
7
+ /**
8
+ * Color definition with metadata
9
+ */
10
+ export interface ColorDef {
11
+ /** Hex color value */
12
+ hex: string;
13
+ /** Human-readable name */
14
+ name: string;
15
+ /** Recommended opacity for glass overlays (0-1) */
16
+ glassOpacity?: number;
17
+ }
18
+ /**
19
+ * Grove Green palette - Primary brand colors
20
+ */
21
+ export declare const GROVE_GREEN: {
22
+ readonly 50: {
23
+ readonly hex: "#f0fdf4";
24
+ readonly name: "Grove Green 50";
25
+ readonly glassOpacity: 0.3;
26
+ };
27
+ readonly 100: {
28
+ readonly hex: "#dcfce7";
29
+ readonly name: "Grove Green 100";
30
+ readonly glassOpacity: 0.25;
31
+ };
32
+ readonly 200: {
33
+ readonly hex: "#bbf7d0";
34
+ readonly name: "Grove Green 200";
35
+ readonly glassOpacity: 0.2;
36
+ };
37
+ readonly 300: {
38
+ readonly hex: "#86efac";
39
+ readonly name: "Grove Green 300";
40
+ readonly glassOpacity: 0.18;
41
+ };
42
+ readonly 400: {
43
+ readonly hex: "#4ade80";
44
+ readonly name: "Grove Green 400";
45
+ readonly glassOpacity: 0.15;
46
+ };
47
+ readonly 500: {
48
+ readonly hex: "#22c55e";
49
+ readonly name: "Grove Green 500";
50
+ readonly glassOpacity: 0.12;
51
+ };
52
+ readonly 600: {
53
+ readonly hex: "#16a34a";
54
+ readonly name: "Grove Green 600";
55
+ readonly glassOpacity: 0.1;
56
+ };
57
+ readonly 700: {
58
+ readonly hex: "#15803d";
59
+ readonly name: "Grove Green 700";
60
+ readonly glassOpacity: 0.1;
61
+ };
62
+ readonly 800: {
63
+ readonly hex: "#166534";
64
+ readonly name: "Grove Green 800";
65
+ readonly glassOpacity: 0.08;
66
+ };
67
+ readonly 900: {
68
+ readonly hex: "#14532d";
69
+ readonly name: "Grove Green 900";
70
+ readonly glassOpacity: 0.08;
71
+ };
72
+ };
73
+ /**
74
+ * Cream palette - Light/warm backgrounds
75
+ */
76
+ export declare const CREAM: {
77
+ readonly 50: {
78
+ readonly hex: "#fefdfb";
79
+ readonly name: "Cream 50";
80
+ readonly glassOpacity: 0.4;
81
+ };
82
+ readonly 100: {
83
+ readonly hex: "#fdfcf8";
84
+ readonly name: "Cream 100";
85
+ readonly glassOpacity: 0.35;
86
+ };
87
+ readonly 200: {
88
+ readonly hex: "#faf8f3";
89
+ readonly name: "Cream 200";
90
+ readonly glassOpacity: 0.3;
91
+ };
92
+ readonly 300: {
93
+ readonly hex: "#f5f2ea";
94
+ readonly name: "Cream 300";
95
+ readonly glassOpacity: 0.25;
96
+ };
97
+ readonly 400: {
98
+ readonly hex: "#ede9de";
99
+ readonly name: "Cream 400";
100
+ readonly glassOpacity: 0.2;
101
+ };
102
+ readonly 500: {
103
+ readonly hex: "#e2ddd0";
104
+ readonly name: "Cream 500";
105
+ readonly glassOpacity: 0.18;
106
+ };
107
+ readonly 600: {
108
+ readonly hex: "#d4cec0";
109
+ readonly name: "Cream 600";
110
+ readonly glassOpacity: 0.15;
111
+ };
112
+ readonly 700: {
113
+ readonly hex: "#c4bdb0";
114
+ readonly name: "Cream 700";
115
+ readonly glassOpacity: 0.12;
116
+ };
117
+ readonly 800: {
118
+ readonly hex: "#b0a99c";
119
+ readonly name: "Cream 800";
120
+ readonly glassOpacity: 0.1;
121
+ };
122
+ readonly 900: {
123
+ readonly hex: "#9a9387";
124
+ readonly name: "Cream 900";
125
+ readonly glassOpacity: 0.08;
126
+ };
127
+ };
128
+ /**
129
+ * Bark palette - Dark/earth tones
130
+ */
131
+ export declare const BARK: {
132
+ readonly 50: {
133
+ readonly hex: "#faf7f5";
134
+ readonly name: "Bark 50";
135
+ readonly glassOpacity: 0.3;
136
+ };
137
+ readonly 100: {
138
+ readonly hex: "#f0ebe6";
139
+ readonly name: "Bark 100";
140
+ readonly glassOpacity: 0.25;
141
+ };
142
+ readonly 200: {
143
+ readonly hex: "#e0d5cc";
144
+ readonly name: "Bark 200";
145
+ readonly glassOpacity: 0.2;
146
+ };
147
+ readonly 300: {
148
+ readonly hex: "#ccb59c";
149
+ readonly name: "Bark 300";
150
+ readonly glassOpacity: 0.18;
151
+ };
152
+ readonly 400: {
153
+ readonly hex: "#b89a7a";
154
+ readonly name: "Bark 400";
155
+ readonly glassOpacity: 0.15;
156
+ };
157
+ readonly 500: {
158
+ readonly hex: "#a57c5a";
159
+ readonly name: "Bark 500";
160
+ readonly glassOpacity: 0.12;
161
+ };
162
+ readonly 600: {
163
+ readonly hex: "#8a6344";
164
+ readonly name: "Bark 600";
165
+ readonly glassOpacity: 0.1;
166
+ };
167
+ readonly 700: {
168
+ readonly hex: "#6f4d39";
169
+ readonly name: "Bark 700";
170
+ readonly glassOpacity: 0.1;
171
+ };
172
+ readonly 800: {
173
+ readonly hex: "#553a2a";
174
+ readonly name: "Bark 800";
175
+ readonly glassOpacity: 0.08;
176
+ };
177
+ readonly 900: {
178
+ readonly hex: "#3d2914";
179
+ readonly name: "Bark 900";
180
+ readonly glassOpacity: 0.06;
181
+ };
182
+ };
183
+ /**
184
+ * Status colors
185
+ */
186
+ export declare const STATUS: {
187
+ readonly success: {
188
+ readonly hex: "#22c55e";
189
+ readonly name: "Success";
190
+ readonly glassOpacity: 0.12;
191
+ };
192
+ readonly warning: {
193
+ readonly hex: "#f59e0b";
194
+ readonly name: "Warning";
195
+ readonly glassOpacity: 0.12;
196
+ };
197
+ readonly error: {
198
+ readonly hex: "#dc2626";
199
+ readonly name: "Error";
200
+ readonly glassOpacity: 0.1;
201
+ };
202
+ readonly info: {
203
+ readonly hex: "#0ea5e9";
204
+ readonly name: "Info";
205
+ readonly glassOpacity: 0.12;
206
+ };
207
+ };
208
+ /**
209
+ * Combined Grove color schemes for easy access
210
+ */
211
+ export declare const GROVE_COLORS: {
212
+ readonly grove: "#22c55e";
213
+ readonly 'grove-light': "#86efac";
214
+ readonly 'grove-dark': "#15803d";
215
+ readonly 'grove-muted': "#4ade80";
216
+ readonly cream: "#fefdfb";
217
+ readonly 'cream-warm': "#faf8f3";
218
+ readonly 'cream-deep': "#e2ddd0";
219
+ readonly bark: "#3d2914";
220
+ readonly 'bark-light': "#a57c5a";
221
+ readonly 'bark-medium': "#6f4d39";
222
+ readonly white: "#ffffff";
223
+ readonly black: "#000000";
224
+ readonly transparent: "transparent";
225
+ };
226
+ /**
227
+ * Glass-optimized color schemes
228
+ * Pre-configured for use with Glass components
229
+ */
230
+ export declare const GLASS_SCHEMES: {
231
+ readonly 'grove-mist': {
232
+ readonly color: "#22c55e";
233
+ readonly background: "transparent";
234
+ readonly opacity: 0.12;
235
+ readonly description: "Subtle green mist for light glass";
236
+ };
237
+ readonly 'cream-haze': {
238
+ readonly color: "#d4cec0";
239
+ readonly background: "transparent";
240
+ readonly opacity: 0.15;
241
+ readonly description: "Warm cream haze for cozy glass";
242
+ };
243
+ readonly 'bark-shadow': {
244
+ readonly color: "#6f4d39";
245
+ readonly background: "transparent";
246
+ readonly opacity: 0.08;
247
+ readonly description: "Soft earth shadow for depth";
248
+ };
249
+ readonly 'grove-glow': {
250
+ readonly color: "#4ade80";
251
+ readonly background: "#1a1915";
252
+ readonly opacity: 0.15;
253
+ readonly description: "Glowing green for dark glass";
254
+ };
255
+ readonly 'cream-dust': {
256
+ readonly color: "#f5f2ea";
257
+ readonly background: "#1a1915";
258
+ readonly opacity: 0.1;
259
+ readonly description: "Dusty cream particles in dark";
260
+ };
261
+ readonly moonlight: {
262
+ readonly color: "#e2e8f0";
263
+ readonly background: "#1a1915";
264
+ readonly opacity: 0.08;
265
+ readonly description: "Cool moonlight glow";
266
+ };
267
+ readonly 'spring-fresh': {
268
+ readonly color: "#86efac";
269
+ readonly background: "transparent";
270
+ readonly opacity: 0.18;
271
+ readonly description: "Fresh spring green overlay";
272
+ };
273
+ readonly 'autumn-warm': {
274
+ readonly color: "#d97706";
275
+ readonly background: "transparent";
276
+ readonly opacity: 0.1;
277
+ readonly description: "Warm autumn amber tones";
278
+ };
279
+ readonly 'winter-frost': {
280
+ readonly color: "#93c5fd";
281
+ readonly background: "transparent";
282
+ readonly opacity: 0.12;
283
+ readonly description: "Cool frost blue overlay";
284
+ };
285
+ };
286
+ export type GroveColorName = keyof typeof GROVE_COLORS;
287
+ export type GlassSchemeName = keyof typeof GLASS_SCHEMES;
288
+ /**
289
+ * Get a Grove color by name
290
+ */
291
+ export declare function getGroveColor(name: GroveColorName | string): string;
292
+ /**
293
+ * Get a glass scheme by name
294
+ */
295
+ export declare function getGlassScheme(name: GlassSchemeName | string): {
296
+ color: string;
297
+ background: string;
298
+ opacity: number;
299
+ };
300
+ /**
301
+ * List all Grove color names
302
+ */
303
+ export declare function getGroveColorNames(): string[];
304
+ /**
305
+ * List all glass scheme names
306
+ */
307
+ export declare function getGlassSchemeNames(): string[];
308
+ /**
309
+ * Apply opacity to a hex color, returning rgba string
310
+ */
311
+ export declare function hexToRgba(hex: string, opacity: number): string;
312
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1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G;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAK9D"}
package/dist/colors.js ADDED
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Gossamer Color Palettes
3
+ *
4
+ * Grove-themed color palettes for ASCII effects.
5
+ * Designed to complement Glass UI components.
6
+ */
7
+ /**
8
+ * Grove Green palette - Primary brand colors
9
+ */
10
+ export const GROVE_GREEN = {
11
+ 50: { hex: '#f0fdf4', name: 'Grove Green 50', glassOpacity: 0.3 },
12
+ 100: { hex: '#dcfce7', name: 'Grove Green 100', glassOpacity: 0.25 },
13
+ 200: { hex: '#bbf7d0', name: 'Grove Green 200', glassOpacity: 0.2 },
14
+ 300: { hex: '#86efac', name: 'Grove Green 300', glassOpacity: 0.18 },
15
+ 400: { hex: '#4ade80', name: 'Grove Green 400', glassOpacity: 0.15 },
16
+ 500: { hex: '#22c55e', name: 'Grove Green 500', glassOpacity: 0.12 },
17
+ 600: { hex: '#16a34a', name: 'Grove Green 600', glassOpacity: 0.1 },
18
+ 700: { hex: '#15803d', name: 'Grove Green 700', glassOpacity: 0.1 },
19
+ 800: { hex: '#166534', name: 'Grove Green 800', glassOpacity: 0.08 },
20
+ 900: { hex: '#14532d', name: 'Grove Green 900', glassOpacity: 0.08 },
21
+ };
22
+ /**
23
+ * Cream palette - Light/warm backgrounds
24
+ */
25
+ export const CREAM = {
26
+ 50: { hex: '#fefdfb', name: 'Cream 50', glassOpacity: 0.4 },
27
+ 100: { hex: '#fdfcf8', name: 'Cream 100', glassOpacity: 0.35 },
28
+ 200: { hex: '#faf8f3', name: 'Cream 200', glassOpacity: 0.3 },
29
+ 300: { hex: '#f5f2ea', name: 'Cream 300', glassOpacity: 0.25 },
30
+ 400: { hex: '#ede9de', name: 'Cream 400', glassOpacity: 0.2 },
31
+ 500: { hex: '#e2ddd0', name: 'Cream 500', glassOpacity: 0.18 },
32
+ 600: { hex: '#d4cec0', name: 'Cream 600', glassOpacity: 0.15 },
33
+ 700: { hex: '#c4bdb0', name: 'Cream 700', glassOpacity: 0.12 },
34
+ 800: { hex: '#b0a99c', name: 'Cream 800', glassOpacity: 0.1 },
35
+ 900: { hex: '#9a9387', name: 'Cream 900', glassOpacity: 0.08 },
36
+ };
37
+ /**
38
+ * Bark palette - Dark/earth tones
39
+ */
40
+ export const BARK = {
41
+ 50: { hex: '#faf7f5', name: 'Bark 50', glassOpacity: 0.3 },
42
+ 100: { hex: '#f0ebe6', name: 'Bark 100', glassOpacity: 0.25 },
43
+ 200: { hex: '#e0d5cc', name: 'Bark 200', glassOpacity: 0.2 },
44
+ 300: { hex: '#ccb59c', name: 'Bark 300', glassOpacity: 0.18 },
45
+ 400: { hex: '#b89a7a', name: 'Bark 400', glassOpacity: 0.15 },
46
+ 500: { hex: '#a57c5a', name: 'Bark 500', glassOpacity: 0.12 },
47
+ 600: { hex: '#8a6344', name: 'Bark 600', glassOpacity: 0.1 },
48
+ 700: { hex: '#6f4d39', name: 'Bark 700', glassOpacity: 0.1 },
49
+ 800: { hex: '#553a2a', name: 'Bark 800', glassOpacity: 0.08 },
50
+ 900: { hex: '#3d2914', name: 'Bark 900', glassOpacity: 0.06 },
51
+ };
52
+ /**
53
+ * Status colors
54
+ */
55
+ export const STATUS = {
56
+ success: { hex: '#22c55e', name: 'Success', glassOpacity: 0.12 },
57
+ warning: { hex: '#f59e0b', name: 'Warning', glassOpacity: 0.12 },
58
+ error: { hex: '#dc2626', name: 'Error', glassOpacity: 0.1 },
59
+ info: { hex: '#0ea5e9', name: 'Info', glassOpacity: 0.12 },
60
+ };
61
+ /**
62
+ * Combined Grove color schemes for easy access
63
+ */
64
+ export const GROVE_COLORS = {
65
+ // Greens
66
+ grove: GROVE_GREEN[500].hex,
67
+ 'grove-light': GROVE_GREEN[300].hex,
68
+ 'grove-dark': GROVE_GREEN[700].hex,
69
+ 'grove-muted': GROVE_GREEN[400].hex,
70
+ // Creams
71
+ cream: CREAM[50].hex,
72
+ 'cream-warm': CREAM[200].hex,
73
+ 'cream-deep': CREAM[500].hex,
74
+ // Barks
75
+ bark: BARK[900].hex,
76
+ 'bark-light': BARK[500].hex,
77
+ 'bark-medium': BARK[700].hex,
78
+ // Utility
79
+ white: '#ffffff',
80
+ black: '#000000',
81
+ transparent: 'transparent',
82
+ };
83
+ /**
84
+ * Glass-optimized color schemes
85
+ * Pre-configured for use with Glass components
86
+ */
87
+ export const GLASS_SCHEMES = {
88
+ // Light mode schemes (on light backgrounds)
89
+ 'grove-mist': {
90
+ color: GROVE_GREEN[500].hex,
91
+ background: 'transparent',
92
+ opacity: 0.12,
93
+ description: 'Subtle green mist for light glass',
94
+ },
95
+ 'cream-haze': {
96
+ color: CREAM[600].hex,
97
+ background: 'transparent',
98
+ opacity: 0.15,
99
+ description: 'Warm cream haze for cozy glass',
100
+ },
101
+ 'bark-shadow': {
102
+ color: BARK[700].hex,
103
+ background: 'transparent',
104
+ opacity: 0.08,
105
+ description: 'Soft earth shadow for depth',
106
+ },
107
+ // Dark mode schemes (on dark backgrounds)
108
+ 'grove-glow': {
109
+ color: GROVE_GREEN[400].hex,
110
+ background: '#1a1915',
111
+ opacity: 0.15,
112
+ description: 'Glowing green for dark glass',
113
+ },
114
+ 'cream-dust': {
115
+ color: CREAM[300].hex,
116
+ background: '#1a1915',
117
+ opacity: 0.1,
118
+ description: 'Dusty cream particles in dark',
119
+ },
120
+ 'moonlight': {
121
+ color: '#e2e8f0',
122
+ background: '#1a1915',
123
+ opacity: 0.08,
124
+ description: 'Cool moonlight glow',
125
+ },
126
+ // Accent schemes
127
+ 'spring-fresh': {
128
+ color: GROVE_GREEN[300].hex,
129
+ background: 'transparent',
130
+ opacity: 0.18,
131
+ description: 'Fresh spring green overlay',
132
+ },
133
+ 'autumn-warm': {
134
+ color: '#d97706',
135
+ background: 'transparent',
136
+ opacity: 0.1,
137
+ description: 'Warm autumn amber tones',
138
+ },
139
+ 'winter-frost': {
140
+ color: '#93c5fd',
141
+ background: 'transparent',
142
+ opacity: 0.12,
143
+ description: 'Cool frost blue overlay',
144
+ },
145
+ };
146
+ /**
147
+ * Get a Grove color by name
148
+ */
149
+ export function getGroveColor(name) {
150
+ if (name in GROVE_COLORS) {
151
+ return GROVE_COLORS[name];
152
+ }
153
+ // If it's already a hex color, return it
154
+ if (name.startsWith('#')) {
155
+ return name;
156
+ }
157
+ // Default to grove green
158
+ return GROVE_COLORS.grove;
159
+ }
160
+ /**
161
+ * Get a glass scheme by name
162
+ */
163
+ export function getGlassScheme(name) {
164
+ if (name in GLASS_SCHEMES) {
165
+ const scheme = GLASS_SCHEMES[name];
166
+ return {
167
+ color: scheme.color,
168
+ background: scheme.background,
169
+ opacity: scheme.opacity,
170
+ };
171
+ }
172
+ // Default to grove-mist
173
+ return {
174
+ color: GLASS_SCHEMES['grove-mist'].color,
175
+ background: GLASS_SCHEMES['grove-mist'].background,
176
+ opacity: GLASS_SCHEMES['grove-mist'].opacity,
177
+ };
178
+ }
179
+ /**
180
+ * List all Grove color names
181
+ */
182
+ export function getGroveColorNames() {
183
+ return Object.keys(GROVE_COLORS);
184
+ }
185
+ /**
186
+ * List all glass scheme names
187
+ */
188
+ export function getGlassSchemeNames() {
189
+ return Object.keys(GLASS_SCHEMES);
190
+ }
191
+ /**
192
+ * Apply opacity to a hex color, returning rgba string
193
+ */
194
+ export function hexToRgba(hex, opacity) {
195
+ const r = parseInt(hex.slice(1, 3), 16);
196
+ const g = parseInt(hex.slice(3, 5), 16);
197
+ const b = parseInt(hex.slice(5, 7), 16);
198
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
199
+ }
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface PresetConfig {
37
37
  /** Character set */
38
38
  characters: string;
39
39
  /** Pattern type */
40
- pattern: 'perlin' | 'waves' | 'static' | 'ripple' | 'fbm';
40
+ pattern: 'perlin' | 'waves' | 'static' | 'ripple' | 'fbm' | 'clouds' | 'plasma' | 'vortex' | 'matrix' | 'gradient' | 'diamond' | 'fractal';
41
41
  /** Pattern frequency */
42
42
  frequency: number;
43
43
  /** Pattern amplitude */
@@ -66,10 +66,12 @@ export declare function calculateBrightness(r: number, g: number, b: number): nu
66
66
  export declare function brightnessToChar(brightness: number, characters?: string): string;
67
67
  export { GossamerRenderer } from './renderer';
68
68
  export type { RenderConfig } from './renderer';
69
- export { perlinNoise2D, fbmNoise, wavePattern, ripplePattern, staticNoise, seededNoise2D, generateBrightnessGrid, gridToImageData, DEFAULT_PATTERN_CONFIG, } from './patterns';
70
- export type { PatternConfig, PatternType } from './patterns';
69
+ export { perlinNoise2D, fbmNoise, staticNoise, seededNoise2D, wavePattern, ripplePattern, cloudsPattern, plasmaPattern, vortexPattern, matrixPattern, gradientPattern, diamondPattern, fractalPattern, generateBrightnessGrid, gridToImageData, createBrightnessBuffer, fillBrightnessBuffer, getBufferValue, DEFAULT_PATTERN_CONFIG, } from './patterns';
70
+ export type { PatternConfig, PatternType, BrightnessBuffer } from './patterns';
71
71
  export { CHARACTER_SETS, getCharacterSet, getCharacters, getCharacterSetNames, createCharacterSet, validateCharacterSet, invertCharacters, } from './characters';
72
72
  export type { CharacterSet } from './characters';
73
+ export { GROVE_GREEN, CREAM, BARK, STATUS, GROVE_COLORS, GLASS_SCHEMES, getGroveColor, getGlassScheme, getGroveColorNames, getGlassSchemeNames, hexToRgba, } from './colors';
74
+ export type { ColorDef, GroveColorName, GlassSchemeName } from './colors';
73
75
  export { createAnimationLoop, throttle, debounce, calculateFPS, easings, } from './animation';
74
76
  export type { AnimationState, AnimationOptions, EasingFunction } from './animation';
75
77
  export { createCanvas, getDevicePixelRatio, resizeCanvasToContainer, createOffscreenCanvas, clearCanvas, getImageData, optimizeContext, setupTextRendering, measureTextWidth, calculateCellSize, setBlendMode, } from './utils/canvas';
@@ -1 +1 @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