textmode.synth.js 1.0.0-beta.1 → 1.0.0-beta.3

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 (85) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +104 -121
  3. package/dist/textmode.synth.esm.js +491 -410
  4. package/dist/textmode.synth.umd.js +31 -52
  5. package/dist/types/api/index.d.ts +7 -0
  6. package/dist/types/api/index.d.ts.map +1 -0
  7. package/dist/types/api/sources.d.ts +327 -0
  8. package/dist/types/api/sources.d.ts.map +1 -0
  9. package/dist/types/augmentations/index.d.ts +7 -0
  10. package/dist/types/augmentations/index.d.ts.map +1 -0
  11. package/dist/types/augmentations/textmode.d.ts +65 -0
  12. package/dist/types/augmentations/textmode.d.ts.map +1 -0
  13. package/dist/types/bootstrap.d.ts +11 -0
  14. package/dist/types/bootstrap.d.ts.map +1 -0
  15. package/dist/types/compiler/ExternalLayerManager.d.ts +60 -0
  16. package/dist/types/compiler/ExternalLayerManager.d.ts.map +1 -0
  17. package/dist/types/compiler/FeedbackTracker.d.ts +53 -0
  18. package/dist/types/compiler/FeedbackTracker.d.ts.map +1 -0
  19. package/dist/types/compiler/GLSLGenerator.d.ts +2 -2
  20. package/dist/types/compiler/GLSLGenerator.d.ts.map +1 -1
  21. package/dist/types/compiler/SynthCompiler.d.ts +7 -1
  22. package/dist/types/compiler/SynthCompiler.d.ts.map +1 -1
  23. package/dist/types/compiler/TransformCodeGenerator.d.ts +77 -0
  24. package/dist/types/compiler/TransformCodeGenerator.d.ts.map +1 -0
  25. package/dist/types/compiler/UniformManager.d.ts.map +1 -1
  26. package/dist/types/compiler/index.d.ts +14 -3
  27. package/dist/types/compiler/index.d.ts.map +1 -1
  28. package/dist/types/compiler/types.d.ts +7 -7
  29. package/dist/types/compiler/types.d.ts.map +1 -1
  30. package/dist/types/core/GlobalState.d.ts +30 -0
  31. package/dist/types/core/GlobalState.d.ts.map +1 -0
  32. package/dist/types/core/ISynthSource.d.ts +173 -202
  33. package/dist/types/core/ISynthSource.d.ts.map +1 -1
  34. package/dist/types/core/SynthChain.d.ts +0 -2
  35. package/dist/types/core/SynthChain.d.ts.map +1 -1
  36. package/dist/types/core/SynthSource.d.ts +4 -3
  37. package/dist/types/core/SynthSource.d.ts.map +1 -1
  38. package/dist/types/core/index.d.ts +9 -3
  39. package/dist/types/core/index.d.ts.map +1 -1
  40. package/dist/types/core/types.d.ts +57 -4
  41. package/dist/types/core/types.d.ts.map +1 -1
  42. package/dist/types/extensions/index.d.ts +10 -0
  43. package/dist/types/extensions/index.d.ts.map +1 -0
  44. package/dist/types/extensions/textmodelayer.d.ts +22 -0
  45. package/dist/types/extensions/textmodelayer.d.ts.map +1 -0
  46. package/dist/types/extensions/textmodifier.d.ts +11 -0
  47. package/dist/types/extensions/textmodifier.d.ts.map +1 -0
  48. package/dist/types/index.d.ts +11 -364
  49. package/dist/types/index.d.ts.map +1 -1
  50. package/dist/types/lifecycle/index.d.ts +10 -0
  51. package/dist/types/lifecycle/index.d.ts.map +1 -0
  52. package/dist/types/lifecycle/synthDispose.d.ts +11 -0
  53. package/dist/types/lifecycle/synthDispose.d.ts.map +1 -0
  54. package/dist/types/lifecycle/synthRender.d.ts +11 -0
  55. package/dist/types/lifecycle/synthRender.d.ts.map +1 -0
  56. package/dist/types/{SynthPlugin.d.ts → plugin/SynthPlugin.d.ts} +1 -1
  57. package/dist/types/plugin/SynthPlugin.d.ts.map +1 -0
  58. package/dist/types/plugin/constants.d.ts +5 -0
  59. package/dist/types/plugin/constants.d.ts.map +1 -0
  60. package/dist/types/plugin/index.d.ts +10 -0
  61. package/dist/types/plugin/index.d.ts.map +1 -0
  62. package/dist/types/transforms/TransformDefinition.d.ts +0 -12
  63. package/dist/types/transforms/TransformDefinition.d.ts.map +1 -1
  64. package/dist/types/transforms/TransformFactory.d.ts +4 -7
  65. package/dist/types/transforms/TransformFactory.d.ts.map +1 -1
  66. package/dist/types/transforms/TransformRegistry.d.ts +3 -6
  67. package/dist/types/transforms/TransformRegistry.d.ts.map +1 -1
  68. package/dist/types/transforms/categories/colors.d.ts +1 -1
  69. package/dist/types/transforms/categories/colors.d.ts.map +1 -1
  70. package/dist/types/transforms/categories/combine.d.ts.map +1 -1
  71. package/dist/types/transforms/categories/index.d.ts +3 -4
  72. package/dist/types/transforms/categories/index.d.ts.map +1 -1
  73. package/dist/types/transforms/categories/sources.d.ts.map +1 -1
  74. package/dist/types/{lib → utils}/ArrayUtils.d.ts +20 -5
  75. package/dist/types/utils/ArrayUtils.d.ts.map +1 -0
  76. package/dist/types/utils/CharacterResolver.d.ts.map +1 -1
  77. package/dist/types/utils/collectExternalLayerRefs.d.ts +7 -0
  78. package/dist/types/utils/collectExternalLayerRefs.d.ts.map +1 -0
  79. package/dist/types/utils/index.d.ts +12 -0
  80. package/dist/types/utils/index.d.ts.map +1 -0
  81. package/package.json +16 -9
  82. package/dist/types/SynthPlugin.d.ts.map +0 -1
  83. package/dist/types/lib/ArrayUtils.d.ts.map +0 -1
  84. package/dist/types/transforms/categories/charModifiers.d.ts +0 -16
  85. package/dist/types/transforms/categories/charModifiers.d.ts.map +0 -1
@@ -1,13 +1,12 @@
1
1
  /**
2
- * A `hydra`-inspired chainable visual synthesis system for `textmode.js`.
3
- * Enables procedural generation of characters, colors, and visual effects
4
- * through method chaining.
2
+ *
3
+ * A derivative work of [hydra-synth](https://github.com/hydra-synth/hydra-synth) by [Olivia Jack](https://github.com/ojack),
4
+ * adapted for the [textmode.js](https://github.com/humanbydefinition/textmode.js) ecosystem, providing
5
+ * a visual synthesis system for procedural generation of characters, colors,
6
+ * and visual effects through method chaining.
5
7
  *
6
8
  * @example
7
9
  * ```ts
8
- * import { textmode } from 'textmode.js';
9
- * import { SynthPlugin, osc, noise } from 'textmode.synth.js';
10
- *
11
10
  * // Create textmode instance with SynthPlugin
12
11
  * const t = textmode.create({
13
12
  * width: 800,
@@ -33,363 +32,11 @@
33
32
  *
34
33
  * @packageDocumentation
35
34
  */
36
- import { SynthSource } from './core/SynthSource';
37
- import type { SynthContext } from './core/types';
38
- /**
39
- * Create a character source from any color/pattern source.
40
- *
41
- * This function converts any pattern (like `osc()`, `noise()`, `voronoi()`) into
42
- * character indices. The pattern's luminance or color values are mapped to character indices.
43
- *
44
- * This is the recommended way to define character generation in textmode.synth.js,
45
- * as it provides a unified, compositional API where the same patterns can drive
46
- * characters, character colors, and cell colors.
47
- *
48
- * @param source - A SynthSource producing color values that will be mapped to characters
49
- * @param charCount - Number of different characters to use (default: 256)
50
- * @returns A new SynthSource configured for character generation
51
- *
52
- * @example
53
- * ```typescript
54
- * // Simple usage - same pattern for chars and colors
55
- * const pattern = osc(1, 0.1);
56
- * layer.synth(
57
- * char(pattern)
58
- * .charColor(pattern.clone())
59
- * );
60
- *
61
- * // With limited character count
62
- * layer.synth(
63
- * char(noise(10), 16)
64
- * .charMap('@#%*+=-:. ')
65
- * );
66
- * ```
67
- */
68
- export declare const char: (source: SynthSource, charCount?: number) => SynthSource;
69
- /**
70
- * Create a synth source with character foreground color defined.
71
- *
72
- * This function creates a SynthSource where the character foreground color
73
- * is driven by the provided source pattern. This is compositional and can be
74
- * combined with `char()` and `cellColor()`.
75
- *
76
- * @param source - A SynthSource producing color values for character foreground
77
- * @returns A new SynthSource configured with character color
78
- *
79
- * @example
80
- * ```typescript
81
- * const t = textmode.create({
82
- * width: 800,
83
- * height: 600,
84
- * plugins: [SynthPlugin]
85
- * });
86
- *
87
- * // Start with character color
88
- * const pattern = osc(10, 0.1);
89
- * t.layers.base.synth(
90
- * charColor(pattern)
91
- * .char(noise(10))
92
- * .cellColor(solid(0, 0, 0, 0.5))
93
- * );
94
- *
95
- * // Using different patterns for each aspect
96
- * t.layers.base.synth(
97
- * charColor(voronoi(5).mult(osc(20)))
98
- * .char(noise(10), 16)
99
- * .charMap('@#%*+=-:. ')
100
- * );
101
- * ```
102
- */
103
- export declare const charColor: (source: SynthSource) => SynthSource;
104
- /**
105
- * Create a synth source with cell background color defined.
106
- *
107
- * This function creates a SynthSource where the cell background color
108
- * is driven by the provided source pattern. This is compositional and can be
109
- * combined with `char()` and `charColor()`.
110
- *
111
- * @param source - A SynthSource producing color values for cell background
112
- * @returns A new SynthSource configured with cell color
113
- *
114
- * @example
115
- * ```typescript
116
- * const t = textmode.create({
117
- * width: 800,
118
- * height: 600,
119
- * plugins: [SynthPlugin]
120
- * });
121
- *
122
- * // Start with cell color
123
- * t.layers.base.synth(
124
- * cellColor(solid(0, 0, 0, 0.5))
125
- * .char(noise(10))
126
- * .charColor(osc(5))
127
- * );
128
- *
129
- * // Complete composition - all three defined
130
- * const colorPattern = voronoi(5, 0.3);
131
- * t.layers.base.synth(
132
- * cellColor(colorPattern.clone().invert())
133
- * .char(noise(10), 16)
134
- * .charMap('@#%*+=-:. ')
135
- * .charColor(colorPattern)
136
- * );
137
- * ```
138
- */
139
- export declare const cellColor: (source: SynthSource) => SynthSource;
140
- /**
141
- * Create a synth source with both character and cell colors defined.
142
- *
143
- * This function creates a SynthSource where both the character foreground color
144
- * and the cell background color are driven by the same source pattern.
145
- * This is a convenience function equivalent to calling both `charColor()` and
146
- * `cellColor()` with the same source.
147
- *
148
- * @param source - A SynthSource producing color values for both character and cell colors
149
- * @returns A new SynthSource configured with both color sources
150
- *
151
- * @example
152
- * ```typescript
153
- * const t = textmode.create({
154
- * width: 800,
155
- * height: 600,
156
- * plugins: [SynthPlugin]
157
- * });
158
- *
159
- * // Use same pattern for both foreground and background colors
160
- * const colorPattern = osc(10, 0.1).mult(voronoi(5));
161
- * t.layers.base.synth(
162
- * paint(colorPattern)
163
- * .char(noise(10), 16)
164
- * .charMap('@#%*+=-:. ')
165
- * );
166
- *
167
- * // Paint with gradient
168
- * t.layers.base.synth(
169
- * paint(gradient(0.5))
170
- * );
171
- * ```
172
- */
173
- export declare const paint: (source: SynthSource) => SynthSource;
174
- export { SynthPlugin } from './SynthPlugin';
175
- export type { SynthTransformType, SynthParameterValue, SynthContext, } from './core/types';
35
+ import './bootstrap';
36
+ import './augmentations';
37
+ export { SynthPlugin } from './plugin';
176
38
  export { SynthSource } from './core/SynthSource';
177
- /**
178
- * Generate oscillating patterns using sine waves.
179
- * @param frequency - Frequency of the oscillation (default: 60.0)
180
- * @param sync - Synchronization offset (default: 0.1)
181
- * @param offset - Phase offset (default: 0.0)
182
- *
183
- * @example
184
- * ```typescript
185
- * const t = textmode.create({
186
- * width: 800,
187
- * height: 600,
188
- * plugins: [SynthPlugin]
189
- * });
190
- *
191
- * // Basic oscillating color pattern
192
- * t.layers.base.synth(
193
- * osc(1, 0.1)
194
- * .charColor(osc(10, 0.1))
195
- * );
196
- *
197
- * // Animated frequency using array modulation
198
- * t.layers.base.synth(
199
- * osc([1, 10, 50, 100].fast(2), 0.001)
200
- * .charColor(osc([1, 10, 50, 100].fast(2), 0.001))
201
- * );
202
- * ```
203
- */
204
- export declare const osc: (frequency?: number | number[] | ((ctx: SynthContext) => number), sync?: number | number[] | ((ctx: SynthContext) => number), offset?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
205
- /**
206
- * Generate Perlin noise patterns.
207
- * @param scale - Scale of the noise pattern (default: 10.0)
208
- * @param offset - Offset in noise space (default: 0.1)
209
- *
210
- * @example
211
- * ```typescript
212
- * const t = textmode.create({
213
- * width: 800,
214
- * height: 600,
215
- * plugins: [SynthPlugin]
216
- * });
217
- *
218
- * // Basic noise pattern
219
- * t.layers.base.synth(
220
- * noise(10, 0.1)
221
- * .charColor(noise(10, 0.1))
222
- * );
223
- * ```
224
- */
225
- export declare const noise: (scale?: number | number[] | ((ctx: SynthContext) => number), offset?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
226
- /**
227
- * Generate Voronoi (cellular) patterns.
228
- * @param scale - Scale of Voronoi cells (default: 5.0)
229
- * @param speed - Animation speed (default: 0.3)
230
- * @param blending - Blending between cell regions (default: 0.3)
231
- *
232
- * @example
233
- * ```typescript
234
- * const t = textmode.create({
235
- * width: 800,
236
- * height: 600,
237
- * plugins: [SynthPlugin]
238
- * });
239
- *
240
- * // Animated Voronoi pattern
241
- * t.layers.base.synth(
242
- * voronoi(5, 0.3, 0.3)
243
- * .charColor(voronoi(5, 0.3, 0.3))
244
- * );
245
- * ```
246
- */
247
- export declare const voronoi: (scale?: number | number[] | ((ctx: SynthContext) => number), speed?: number | number[] | ((ctx: SynthContext) => number), blending?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
248
- /**
249
- * Generate a rotating radial gradient.
250
- * @param speed - Rotation speed (default: 0.0)
251
- *
252
- * @example
253
- * ```typescript
254
- * const t = textmode.create({
255
- * width: 800,
256
- * height: 600,
257
- * plugins: [SynthPlugin]
258
- * });
259
- *
260
- * // Animated gradient with array modulation
261
- * t.layers.base.synth(
262
- * gradient([1, 2, 4])
263
- * .charColor(gradient([1, 2, 4]))
264
- * .cellColor(
265
- * gradient([1, 2, 4])
266
- * .invert((ctx) => Math.sin(ctx.time) * 2)
267
- * )
268
- * );
269
- * ```
270
- */
271
- export declare const gradient: (speed?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
272
- /**
273
- * Generate geometric shapes (polygons).
274
- * @param sides - Number of sides (default: 3)
275
- * @param radius - Radius of the shape (default: 0.3)
276
- * @param smoothing - Edge smoothing amount (default: 0.01)
277
- *
278
- * @example
279
- * ```typescript
280
- * const t = textmode.create({
281
- * width: 800,
282
- * height: 600,
283
- * plugins: [SynthPlugin]
284
- * });
285
- *
286
- * // Triangle
287
- * t.layers.base.synth(
288
- * shape(3)
289
- * .charMap('. ')
290
- * );
291
- *
292
- * // High-sided polygon (circle-like)
293
- * t.layers.base.synth(
294
- * shape(100)
295
- * .charMap('. ')
296
- * );
297
- * ```
298
- */
299
- export declare const shape: (sides?: number | number[] | ((ctx: SynthContext) => number), radius?: number | number[] | ((ctx: SynthContext) => number), smoothing?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
300
- /**
301
- * Generate a solid color.
302
- * @param r - Red channel (0-1, default: 0.0)
303
- * @param g - Green channel (0-1, default: 0.0)
304
- * @param b - Blue channel (0-1, default: 0.0)
305
- * @param a - Alpha channel (0-1, default: 1.0)
306
- *
307
- * @example
308
- * ```typescript
309
- * const t = textmode.create({
310
- * width: 800,
311
- * height: 600,
312
- * plugins: [SynthPlugin]
313
- * });
314
- *
315
- * // Solid colors with array modulation
316
- * t.layers.base.synth(
317
- * solid(0.6, 0, 0, 1)
318
- * .charColor(solid([1, 0, 0], [0, 1, 0], [0, 0, 1], 1))
319
- * .cellColor(
320
- * solid([1, 0, 0], [0, 1, 0], [0, 0, 1], 1)
321
- * .invert()
322
- * )
323
- * );
324
- * ```
325
- */
326
- export declare const solid: (r?: number | number[] | ((ctx: SynthContext) => number), g?: number | number[] | ((ctx: SynthContext) => number), b?: number | number[] | ((ctx: SynthContext) => number), a?: number | number[] | ((ctx: SynthContext) => number)) => SynthSource;
327
- /**
328
- * Sample the previous frame's primary color output for feedback effects.
329
- * This is the core of feedback loops - it reads from the previous frame's
330
- * character foreground color, enabling effects like trails, motion blur,
331
- * and recursive patterns.
332
- *
333
- * **Context-aware behavior:** When called without arguments, `src()` automatically
334
- * samples the appropriate texture based on where it's used in the synth chain:
335
- * - Inside `char(...)` → samples previous frame's character data
336
- * - Inside `charColor(...)` → samples previous frame's primary color
337
- * - Inside `cellColor(...)` → samples previous frame's cell color
338
- *
339
- * **Cross-layer sampling:** When called with a layer argument, `src(layer)` samples
340
- * from another layer's output, enabling hydra-style multi-output compositions:
341
- * - The sampled texture is still context-aware based on the current compilation target
342
- *
343
- * Equivalent to hydra's `src(o0)`.
344
- *
345
- * @param layer - Optional TextmodeLayer to sample from. If omitted, samples from self (feedback).
346
- * @returns A new SynthSource that samples the specified layer or self
347
- *
348
- * @example
349
- * ```typescript
350
- * const t = textmode.create({
351
- * width: 800,
352
- * height: 600,
353
- * plugins: [SynthPlugin]
354
- * });
355
- *
356
- * // Classic hydra-style feedback loop with noise modulation
357
- * t.layers.base.synth(
358
- * src().modulate(noise(3), 0.005).blend(shape(4), 0.01)
359
- * );
360
- *
361
- * // Cross-layer sampling (hydra-style o0, o1, etc.)
362
- * const layer1 = t.layers.add();
363
- * const layer2 = t.layers.add();
364
- *
365
- * layer1.synth(noise(10).mult(osc(20)));
366
- *
367
- * layer2.synth(
368
- * char(voronoi(5).diff(src(layer1))) // Sample layer1's char texture
369
- * .charColor(osc(10).blend(src(layer1), 0.5)) // Sample layer1's primary color
370
- * );
371
- *
372
- * // Complex multi-layer composition
373
- * t.layers.base.synth(
374
- * noise(3, 0.3).thresh(0.3).diff(src(layer2), 0.3)
375
- * );
376
- * ```
377
- */
378
- export declare const src: (layer?: {
379
- id?: string;
380
- }) => SynthSource;
381
- export type { ModulatedArray, EasingFunction } from './lib/ArrayUtils';
382
- declare module 'textmode.js' {
383
- interface TextmodeLayer {
384
- /**
385
- * Set a synth source for this layer.
386
- *
387
- * The synth will render procedurally generated characters and colors
388
- * directly to the layer's MRT framebuffer before the draw callback runs.
389
- *
390
- * @param source A SynthSource chain defining the procedural generation
391
- */
392
- synth(source: SynthSource): void;
393
- }
394
- }
39
+ export type { SynthParameterValue, SynthContext } from './core/types';
40
+ export { cellColor, char, charColor, gradient, noise, osc, paint, shape, solid, src, voronoi, } from './api';
41
+ export type { ModulatedArray, EasingFunction } from './utils/ArrayUtils';
395
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAUH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,cAAc,CAAC;AA0CvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,IAAI,WA7CuB,WAAW,cAAc,MAAM,KAAK,WA6CpC,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAC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AAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,YAAY,KAAK,MAAM,CAAC,EACvD,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,YAAY,KAAK,MAAM,CAAC,KACnD,WAAW,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,GAAG,WAMuB;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,WAAW,AANhC,CAAC;AAiCvC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvE,OAAO,QAAQ,aAAa,CAAC;IAC5B,UAAU,aAAa;QACtB;;;;;;;WAOG;QACH,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;KACjC;CACD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,aAAa,CAAC;AAGrB,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EACN,SAAS,EACT,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,EACH,KAAK,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,OAAO,GACP,MAAM,OAAO,CAAC;AAEf,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Lifecycle module exports.
3
+ *
4
+ * Provides lifecycle callbacks for plugin integration with textmode.js.
5
+ *
6
+ * @module
7
+ */
8
+ export { synthRender } from './synthRender';
9
+ export { synthDispose } from './synthDispose';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Synth dispose lifecycle callback.
3
+ *
4
+ * Cleans up synth resources when a layer is disposed.
5
+ */
6
+ import type { TextmodeLayer } from 'textmode.js/layering';
7
+ /**
8
+ * Clean up synth resources when a layer is disposed.
9
+ */
10
+ export declare function synthDispose(layer: TextmodeLayer): void;
11
+ //# sourceMappingURL=synthDispose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthDispose.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/synthDispose.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,QAWhD"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Synth render lifecycle callback.
3
+ *
4
+ * Renders synth sources before the user draw callback.
5
+ */
6
+ import type { TextmodeLayer } from 'textmode.js/layering';
7
+ /**
8
+ * Render synth before user draw callback.
9
+ */
10
+ export declare function synthRender(layer: TextmodeLayer, textmodifier: any): Promise<void>;
11
+ //# sourceMappingURL=synthRender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthRender.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/synthRender.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS1D;;GAEG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,iBAyLxE"}
@@ -6,7 +6,7 @@ import type { TextmodePlugin } from 'textmode.js/plugins';
6
6
  *
7
7
  * @example
8
8
  * ```typescript
9
- * import { textmode } from 'textmode.js';
9
+ * import { textmode } from 'textmode.js'; // es module imports
10
10
  * import { SynthPlugin, noise, osc } from 'textmode.synth.js';
11
11
  *
12
12
  * const t = textmode.create({ plugins: [SynthPlugin] });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SynthPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugin/SynthPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AAY7E;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,EAAE,cAwCzB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Plugin constants.
3
+ */
4
+ export declare const PLUGIN_NAME = "textmode.synth.js";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/plugin/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,WAAW,sBAAsB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Plugin module exports.
3
+ *
4
+ * This module provides the main SynthPlugin and related constants.
5
+ *
6
+ * @module
7
+ */
8
+ export { SynthPlugin } from './SynthPlugin';
9
+ export { PLUGIN_NAME } from './constants';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugin/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -39,16 +39,4 @@ export declare function processTransform(def: TransformDefinition): ProcessedTra
39
39
  export declare function defineTransform<T extends SynthTransformType>(definition: TransformDefinition & {
40
40
  type: T;
41
41
  }): TransformDefinition;
42
- /**
43
- * Get default values for a transform's inputs.
44
- */
45
- export declare function getDefaultArgs(def: TransformDefinition): (number | number[] | null)[];
46
- /**
47
- * Check if a transform type requires a nested source.
48
- */
49
- export declare function requiresNestedSource(type: SynthTransformType): boolean;
50
- /**
51
- * Check if a transform type is a source generator.
52
- */
53
- export declare function isSourceType(type: SynthTransformType): boolean;
54
42
  //# sourceMappingURL=TransformDefinition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransformDefinition.d.ts","sourceRoot":"","sources":["../../../src/transforms/TransformDefinition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,IAAI,EAAE,kBAAkB,CAAC;IACzB,uBAAuB;IACvB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC9D,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,GAAG,kBAAkB,CAc7E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,kBAAkB,EAC3D,UAAU,EAAE,mBAAmB,GAAG;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GAC3C,mBAAmB,CAErB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,mBAAmB,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAErF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEtE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAE9D"}
1
+ {"version":3,"file":"TransformDefinition.d.ts","sourceRoot":"","sources":["../../../src/transforms/TransformDefinition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,IAAI,EAAE,kBAAkB,CAAC;IACzB,uBAAuB;IACvB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC9D,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,GAAG,kBAAkB,CAc7E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,kBAAkB,EAC3D,UAAU,EAAE,mBAAmB,GAAG;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GAC3C,mBAAmB,CAErB"}
@@ -1,10 +1,3 @@
1
- /**
2
- * TransformFactory - Dynamic method generation for SynthSource.
3
- *
4
- * This module handles the dynamic generation of chainable methods on
5
- * SynthSource based on registered transform definitions. It eliminates
6
- * the need to manually write boilerplate methods for each transform.
7
- */
8
1
  import type { TransformDefinition } from './TransformDefinition';
9
2
  import type { SynthParameterValue } from '../core/types';
10
3
  /**
@@ -23,6 +16,10 @@ export interface GeneratedFunctions {
23
16
  }
24
17
  /**
25
18
  * Factory for generating dynamic transform methods.
19
+ *
20
+ * Handles the dynamic generation of chainable methods on
21
+ * SynthSource based on registered transform definitions. It eliminates
22
+ * the need to manually write boilerplate methods for each transform.
26
23
  */
27
24
  declare class TransformFactory {
28
25
  private _generatedFunctions;
@@ -1 +1 @@
1
- {"version":3,"file":"TransformFactory.d.ts","sourceRoot":"","sources":["../../../src/transforms/TransformFactory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC;IACrE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC;CAC7F;AAOD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,mBAAmB,EAAE,KAAK,OAAO,CAAC;CAC5D;AAED;;GAEG;AACH,cAAM,gBAAgB;IACrB,OAAO,CAAC,mBAAmB,CAA0B;IACrD,OAAO,CAAC,iBAAiB,CAAiD;IAE1E;;;OAGG;IACI,mBAAmB,CAAC,GAAG,EAAE,UAAU,oBAAoB,GAAG,IAAI;IAIrE;;;OAGG;IACI,aAAa,CAAC,SAAS,EAAE,oBAAoB,GAAG,IAAI;IAQ3D;;OAEG;IACH,OAAO,CAAC,aAAa;IAyBrB;;;OAGG;IACI,2BAA2B,I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,SAAS,CAAC,EAAE,oBAAoB,GAAG,IAAI;CAqB3F;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
@@ -1,15 +1,12 @@
1
+ import type { TransformDefinition, ProcessedTransform } from './TransformDefinition';
2
+ import type { SynthTransformType } from '../core/types';
1
3
  /**
2
- * TransformRegistry - Centralized registry for all synthesis transforms.
4
+ * Centralized registry for synthesis transforms.
3
5
  *
4
6
  * This module provides a singleton registry for managing transform definitions.
5
7
  * Transforms can be registered at startup or dynamically added at runtime,
6
8
  * enabling extensibility through user-defined transforms.
7
9
  */
8
- import type { TransformDefinition, ProcessedTransform } from './TransformDefinition';
9
- import type { SynthTransformType } from '../core/types';
10
- /**
11
- * Centralized registry for synthesis transforms.
12
- */
13
10
  declare class TransformRegistry {
14
11
  /** Map of transform name to definition */
15
12
  private readonly _transforms;
@@ -1 +1 @@
1
- {"version":3,"file":"TransformRegistry.d.ts","sourceRoot":"","sources":["../../../src/transforms/TransformRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD;;GAEG;AACH,cAAM,iBAAiB;IACtB,0CAA0C;IAC1C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0C;IAEtE,oCAAoC;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyC;IAEzE;;OAEG;IACI,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI;IASrD;;OAEG;IACI,YAAY,CAAC,UAAU,EAAE,mBAAmB,EAAE,GAAG,IAAI;IAM5D;;OAEG;IACI,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIzD;;OAEG;IACI,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAYjE;;O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BAAkB,GAAG,mBAAmB,EAAE;IAIjE;;OAEG;IACI,QAAQ,IAAI,MAAM,EAAE;IAI3B;;OAEG;IACI,MAAM,IAAI,mBAAmB,EAAE;IAItC;;OAEG;IACI,mBAAmB,IAAI,mBAAmB,EAAE;IAInD;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAKpC;;OAEG;IACI,KAAK,IAAI,IAAI;IAKpB;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;CACD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -21,7 +21,7 @@ export declare const b: TransformDefinition;
21
21
  export declare const shift: TransformDefinition;
22
22
  export declare const gamma: TransformDefinition;
23
23
  export declare const levels: TransformDefinition;
24
- export declare const clampColor: TransformDefinition;
24
+ export declare const clamp: TransformDefinition;
25
25
  /**
26
26
  * All color transforms.
27
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,UAAU,qBAQrB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBASnB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAQjB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAUnB,CAAC;AAEH,eAAO,MAAM,GAAG,qBAUd,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAYnB,CAAC;AAEH,eAAO,MAAM,SAAS,qBAgBpB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAYf,CAAC;AAEH,eAAO,MAAM,MAAM,qBAWjB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAehB,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,KAAK,qBAkBhB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAiBjB,CAAC;AAEH,eAAO,MAAM,UAAU,qBAWrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,EAkBjD,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,UAAU,qBAQrB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBASnB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAQjB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAUnB,CAAC;AAEH,eAAO,MAAM,GAAG,qBAUd,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAYnB,CAAC;AAEH,eAAO,MAAM,SAAS,qBAgBpB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAYf,CAAC;AAEH,eAAO,MAAM,MAAM,qBAWjB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAehB,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,CAAC,qBAWZ,CAAC;AAEH,eAAO,MAAM,KAAK,qBAkBhB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAiBjB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAWhB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,EAkBjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/combine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,GAAG,qBAQd,CAAC;AAEH,eAAO,MAAM,GAAG,qBAQd,CAAC;AAEH,eAAO,MAAM,IAAI,qBAQf,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAQf,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,IAAI,qBASf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,mBAAmB,EAQnD,CAAC"}
1
+ {"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/combine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,GAAG,qBAQd,CAAC;AAEH,eAAO,MAAM,GAAG,qBAQd,CAAC;AAEH,eAAO,MAAM,IAAI,qBAQf,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAQf,CAAC;AAEH,eAAO,MAAM,KAAK,qBAQhB,CAAC;AAEH,eAAO,MAAM,IAAI,qBASf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,mBAAmB,EAA+C,CAAC"}
@@ -2,11 +2,10 @@
2
2
  * Categories index - exports all transform categories.
3
3
  */
4
4
  export { SOURCE_TRANSFORMS, osc, noise, voronoi, gradient, shape, solid, src } from './sources';
5
- export { COORD_TRANSFORMS, rotate, scale, scroll, scrollX, scrollY, pixelate, repeat, repeatX, repeatY, kaleid } from './coordinates';
6
- export { COLOR_TRANSFORMS, brightness, contrast, invert, saturate, hue, colorama, posterize, luma, thresh, color, r, g, b } from './colors';
5
+ export { COORD_TRANSFORMS, rotate, scale, scroll, scrollX, scrollY, pixelate, repeat, repeatX, repeatY, kaleid, } from './coordinates';
6
+ export { COLOR_TRANSFORMS, brightness, contrast, invert, saturate, hue, colorama, posterize, luma, thresh, color, r, g, b, } from './colors';
7
7
  export { COMBINE_TRANSFORMS, add, sub, mult, blend, diff, layer, mask } from './combine';
8
- export { COMBINE_COORD_TRANSFORMS, modulate, modulateScale, modulateRotate, modulatePixelate, modulateKaleid, modulateScrollX, modulateScrollY } from './combineCoord';
9
- export { CHAR_MODIFY_TRANSFORMS, charFlipX, charFlipY, charInvert, charRotate } from './charModifiers';
8
+ export { COMBINE_COORD_TRANSFORMS, modulate, modulateScale, modulateRotate, modulatePixelate, modulateKaleid, modulateScrollX, modulateScrollY, } from './combineCoord';
10
9
  import type { TransformDefinition } from '../TransformDefinition';
11
10
  /**
12
11
  * All built-in transforms combined.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC5I,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACvK,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQvG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,mBAAmB,EAO/C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EACN,gBAAgB,EAChB,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,MAAM,EACN,KAAK,EACL,CAAC,EACD,CAAC,EACD,CAAC,GACD,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EACN,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,GACf,MAAM,gBAAgB,CAAC;AAOxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,mBAAmB,EAM/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/sources.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,GAAG,qBAgBd,CAAC;AAEH,eAAO,MAAM,KAAK,qBAWhB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAkClB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAQnB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAgBhB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAahB,CAAC;AAEH,eAAO,MAAM,GAAG,qBAQd,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,EAQlD,CAAC"}
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/sources.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,GAAG,qBAgBd,CAAC;AAEH,eAAO,MAAM,KAAK,qBAWhB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAkClB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAQnB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAgBhB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAahB,CAAC;AAEH,eAAO,MAAM,GAAG,qBASd,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,EAQlD,CAAC"}