textmode.synth.js 1.0.0-beta.1

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 (54) hide show
  1. package/README.md +180 -0
  2. package/dist/textmode.synth.esm.js +967 -0
  3. package/dist/textmode.synth.umd.js +399 -0
  4. package/dist/types/SynthPlugin.d.ts +22 -0
  5. package/dist/types/SynthPlugin.d.ts.map +1 -0
  6. package/dist/types/compiler/GLSLGenerator.d.ts +44 -0
  7. package/dist/types/compiler/GLSLGenerator.d.ts.map +1 -0
  8. package/dist/types/compiler/SynthCompiler.d.ts +20 -0
  9. package/dist/types/compiler/SynthCompiler.d.ts.map +1 -0
  10. package/dist/types/compiler/UniformManager.d.ts +48 -0
  11. package/dist/types/compiler/UniformManager.d.ts.map +1 -0
  12. package/dist/types/compiler/index.d.ts +9 -0
  13. package/dist/types/compiler/index.d.ts.map +1 -0
  14. package/dist/types/compiler/types.d.ts +94 -0
  15. package/dist/types/compiler/types.d.ts.map +1 -0
  16. package/dist/types/core/ISynthSource.d.ts +718 -0
  17. package/dist/types/core/ISynthSource.d.ts.map +1 -0
  18. package/dist/types/core/SynthChain.d.ts +62 -0
  19. package/dist/types/core/SynthChain.d.ts.map +1 -0
  20. package/dist/types/core/SynthSource.d.ts +126 -0
  21. package/dist/types/core/SynthSource.d.ts.map +1 -0
  22. package/dist/types/core/index.d.ts +7 -0
  23. package/dist/types/core/index.d.ts.map +1 -0
  24. package/dist/types/core/types.d.ts +106 -0
  25. package/dist/types/core/types.d.ts.map +1 -0
  26. package/dist/types/index.d.ts +395 -0
  27. package/dist/types/index.d.ts.map +1 -0
  28. package/dist/types/lib/ArrayUtils.d.ts +225 -0
  29. package/dist/types/lib/ArrayUtils.d.ts.map +1 -0
  30. package/dist/types/transforms/TransformDefinition.d.ts +54 -0
  31. package/dist/types/transforms/TransformDefinition.d.ts.map +1 -0
  32. package/dist/types/transforms/TransformFactory.d.ts +64 -0
  33. package/dist/types/transforms/TransformFactory.d.ts.map +1 -0
  34. package/dist/types/transforms/TransformRegistry.d.ts +72 -0
  35. package/dist/types/transforms/TransformRegistry.d.ts.map +1 -0
  36. package/dist/types/transforms/categories/charModifiers.d.ts +16 -0
  37. package/dist/types/transforms/categories/charModifiers.d.ts.map +1 -0
  38. package/dist/types/transforms/categories/colors.d.ts +29 -0
  39. package/dist/types/transforms/categories/colors.d.ts.map +1 -0
  40. package/dist/types/transforms/categories/combine.d.ts +19 -0
  41. package/dist/types/transforms/categories/combine.d.ts.map +1 -0
  42. package/dist/types/transforms/categories/combineCoord.d.ts +23 -0
  43. package/dist/types/transforms/categories/combineCoord.d.ts.map +1 -0
  44. package/dist/types/transforms/categories/coordinates.d.ts +22 -0
  45. package/dist/types/transforms/categories/coordinates.d.ts.map +1 -0
  46. package/dist/types/transforms/categories/index.d.ts +15 -0
  47. package/dist/types/transforms/categories/index.d.ts.map +1 -0
  48. package/dist/types/transforms/categories/sources.d.ts +19 -0
  49. package/dist/types/transforms/categories/sources.d.ts.map +1 -0
  50. package/dist/types/transforms/index.d.ts +8 -0
  51. package/dist/types/transforms/index.d.ts.map +1 -0
  52. package/dist/types/utils/CharacterResolver.d.ts +19 -0
  53. package/dist/types/utils/CharacterResolver.d.ts.map +1 -0
  54. package/package.json +54 -0
@@ -0,0 +1,64 @@
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
+ import type { TransformDefinition } from './TransformDefinition';
9
+ import type { SynthParameterValue } from '../core/types';
10
+ /**
11
+ * Interface for the SynthSource class that will have methods injected.
12
+ * This is used to avoid circular dependencies.
13
+ */
14
+ export interface SynthSourcePrototype {
15
+ addTransform(name: string, userArgs: SynthParameterValue[]): unknown;
16
+ addCombineTransform(name: string, source: unknown, userArgs: SynthParameterValue[]): unknown;
17
+ }
18
+ /**
19
+ * Generated standalone functions for source transforms.
20
+ */
21
+ export interface GeneratedFunctions {
22
+ [name: string]: (...args: SynthParameterValue[]) => unknown;
23
+ }
24
+ /**
25
+ * Factory for generating dynamic transform methods.
26
+ */
27
+ declare class TransformFactory {
28
+ private _generatedFunctions;
29
+ private _synthSourceClass;
30
+ /**
31
+ * Set the SynthSource class to inject methods into.
32
+ * This must be called before injectMethods.
33
+ */
34
+ setSynthSourceClass(cls: new () => SynthSourcePrototype): void;
35
+ /**
36
+ * Inject chainable methods into the SynthSource prototype.
37
+ * This dynamically adds all registered transforms as methods.
38
+ */
39
+ injectMethods(prototype: SynthSourcePrototype): void;
40
+ /**
41
+ * Inject a single method for a transform.
42
+ */
43
+ private _injectMethod;
44
+ /**
45
+ * Generate standalone functions for source-type transforms.
46
+ * These allow starting a chain without explicitly creating a SynthSource.
47
+ */
48
+ generateStandaloneFunctions(): GeneratedFunctions;
49
+ /**
50
+ * Get the generated standalone functions.
51
+ */
52
+ getGeneratedFunctions(): GeneratedFunctions;
53
+ /**
54
+ * Add a new transform and inject its method.
55
+ * This can be used to add custom transforms at runtime.
56
+ */
57
+ addTransform(transform: TransformDefinition, prototype?: SynthSourcePrototype): void;
58
+ }
59
+ /**
60
+ * Singleton instance of the transform factory.
61
+ */
62
+ export declare const transformFactory: TransformFactory;
63
+ export {};
64
+ //# sourceMappingURL=TransformFactory.d.ts.map
@@ -0,0 +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,IAAI,kBAAkB;IAyBxD;;OAEG;IACI,qBAAqB,IAAI,kBAAkB;IAIlD;;;OAGG;IACI,YAAY,CAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,oBAAoB,GAAG,IAAI;CAqB3F;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * TransformRegistry - Centralized registry for all synthesis transforms.
3
+ *
4
+ * This module provides a singleton registry for managing transform definitions.
5
+ * Transforms can be registered at startup or dynamically added at runtime,
6
+ * enabling extensibility through user-defined transforms.
7
+ */
8
+ import type { TransformDefinition, ProcessedTransform } from './TransformDefinition';
9
+ import type { SynthTransformType } from '../core/types';
10
+ /**
11
+ * Centralized registry for synthesis transforms.
12
+ */
13
+ declare class TransformRegistry {
14
+ /** Map of transform name to definition */
15
+ private readonly _transforms;
16
+ /** Cache of processed transforms */
17
+ private readonly _processedCache;
18
+ /**
19
+ * Register a transform definition.
20
+ */
21
+ register(transform: TransformDefinition): void;
22
+ /**
23
+ * Register multiple transform definitions.
24
+ */
25
+ registerMany(transforms: TransformDefinition[]): void;
26
+ /**
27
+ * Get a transform definition by name.
28
+ */
29
+ get(name: string): TransformDefinition | undefined;
30
+ /**
31
+ * Get a processed transform by name (cached).
32
+ */
33
+ getProcessed(name: string): ProcessedTransform | undefined;
34
+ /**
35
+ * Check if a transform is registered.
36
+ */
37
+ has(name: string): boolean;
38
+ /**
39
+ * Get all transforms of a specific type.
40
+ */
41
+ getByType(type: SynthTransformType): TransformDefinition[];
42
+ /**
43
+ * Get all registered transform names.
44
+ */
45
+ getNames(): string[];
46
+ /**
47
+ * Get all registered transforms.
48
+ */
49
+ getAll(): TransformDefinition[];
50
+ /**
51
+ * Get source-type transforms (those that can start a chain).
52
+ */
53
+ getSourceTransforms(): TransformDefinition[];
54
+ /**
55
+ * Remove a transform from the registry.
56
+ */
57
+ remove(name: string): boolean;
58
+ /**
59
+ * Clear all transforms (mainly for testing).
60
+ */
61
+ clear(): void;
62
+ /**
63
+ * Get the count of registered transforms.
64
+ */
65
+ get size(): number;
66
+ }
67
+ /**
68
+ * Singleton instance of the transform registry.
69
+ */
70
+ export declare const transformRegistry: TransformRegistry;
71
+ export {};
72
+ //# sourceMappingURL=TransformRegistry.d.ts.map
@@ -0,0 +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;;OAEG;IACI,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIjC;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,kBAAkB,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"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Character modifier transform definitions.
3
+ *
4
+ * These transforms modify character properties like flipping,
5
+ * rotation, and color inversion.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const charFlipX: TransformDefinition;
9
+ export declare const charFlipY: TransformDefinition;
10
+ export declare const charInvert: TransformDefinition;
11
+ export declare const charRotate: TransformDefinition;
12
+ /**
13
+ * All character modifier transforms.
14
+ */
15
+ export declare const CHAR_MODIFY_TRANSFORMS: TransformDefinition[];
16
+ //# sourceMappingURL=charModifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charModifiers.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/charModifiers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,SAAS,qBAYpB,CAAC;AAEH,eAAO,MAAM,SAAS,qBAYpB,CAAC;AAEH,eAAO,MAAM,UAAU,qBAYrB,CAAC;AAEH,eAAO,MAAM,UAAU,qBAYrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAKvD,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Color transform definitions.
3
+ *
4
+ * These transforms modify color output values, enabling effects like
5
+ * brightness, contrast, saturation, hue shifting, and color manipulation.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const brightness: TransformDefinition;
9
+ export declare const contrast: TransformDefinition;
10
+ export declare const invert: TransformDefinition;
11
+ export declare const saturate: TransformDefinition;
12
+ export declare const hue: TransformDefinition;
13
+ export declare const colorama: TransformDefinition;
14
+ export declare const posterize: TransformDefinition;
15
+ export declare const luma: TransformDefinition;
16
+ export declare const thresh: TransformDefinition;
17
+ export declare const color: TransformDefinition;
18
+ export declare const r: TransformDefinition;
19
+ export declare const g: TransformDefinition;
20
+ export declare const b: TransformDefinition;
21
+ export declare const shift: TransformDefinition;
22
+ export declare const gamma: TransformDefinition;
23
+ export declare const levels: TransformDefinition;
24
+ export declare const clampColor: TransformDefinition;
25
+ /**
26
+ * All color transforms.
27
+ */
28
+ export declare const COLOR_TRANSFORMS: TransformDefinition[];
29
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Combine transform definitions.
3
+ *
4
+ * These transforms blend two sources together using various
5
+ * blending modes like add, multiply, blend, difference, and layer.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const add: TransformDefinition;
9
+ export declare const sub: TransformDefinition;
10
+ export declare const mult: TransformDefinition;
11
+ export declare const blend: TransformDefinition;
12
+ export declare const diff: TransformDefinition;
13
+ export declare const layer: TransformDefinition;
14
+ export declare const mask: TransformDefinition;
15
+ /**
16
+ * All combine transforms.
17
+ */
18
+ export declare const COMBINE_TRANSFORMS: TransformDefinition[];
19
+ //# sourceMappingURL=combine.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Combine coordinate transform definitions (modulation).
3
+ *
4
+ * These transforms use one source to modulate the coordinates
5
+ * of another, enabling effects like displacement and warping.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const modulate: TransformDefinition;
9
+ export declare const modulateScale: TransformDefinition;
10
+ export declare const modulateRotate: TransformDefinition;
11
+ export declare const modulatePixelate: TransformDefinition;
12
+ export declare const modulateKaleid: TransformDefinition;
13
+ export declare const modulateScrollX: TransformDefinition;
14
+ export declare const modulateScrollY: TransformDefinition;
15
+ export declare const modulateRepeat: TransformDefinition;
16
+ export declare const modulateRepeatX: TransformDefinition;
17
+ export declare const modulateRepeatY: TransformDefinition;
18
+ export declare const modulateHue: TransformDefinition;
19
+ /**
20
+ * All combine coordinate transforms.
21
+ */
22
+ export declare const COMBINE_COORD_TRANSFORMS: TransformDefinition[];
23
+ //# sourceMappingURL=combineCoord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combineCoord.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/combineCoord.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,QAAQ,qBAQnB,CAAC;AAEH,eAAO,MAAM,aAAa,qBAcxB,CAAC;AAEH,eAAO,MAAM,cAAc,qBAezB,CAAC;AAEH,eAAO,MAAM,gBAAgB,qBAY3B,CAAC;AAEH,eAAO,MAAM,cAAc,qBAczB,CAAC;AAEH,eAAO,MAAM,eAAe,qBAa1B,CAAC;AAEH,eAAO,MAAM,eAAe,qBAa1B,CAAC;AAEH,eAAO,MAAM,cAAc,qBAgBzB,CAAC;AAEH,eAAO,MAAM,eAAe,qBAa1B,CAAC;AAEH,eAAO,MAAM,eAAe,qBAa1B,CAAC;AAEH,eAAO,MAAM,WAAW,qBAQtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAYzD,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Coordinate transform definitions.
3
+ *
4
+ * These transforms modify UV coordinates before sampling,
5
+ * enabling effects like rotation, scaling, scrolling, and tiling.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const rotate: TransformDefinition;
9
+ export declare const scale: TransformDefinition;
10
+ export declare const scroll: TransformDefinition;
11
+ export declare const scrollX: TransformDefinition;
12
+ export declare const scrollY: TransformDefinition;
13
+ export declare const pixelate: TransformDefinition;
14
+ export declare const repeat: TransformDefinition;
15
+ export declare const repeatX: TransformDefinition;
16
+ export declare const repeatY: TransformDefinition;
17
+ export declare const kaleid: TransformDefinition;
18
+ /**
19
+ * All coordinate transforms.
20
+ */
21
+ export declare const COORD_TRANSFORMS: TransformDefinition[];
22
+ //# sourceMappingURL=coordinates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.d.ts","sourceRoot":"","sources":["../../../../src/transforms/categories/coordinates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,eAAO,MAAM,MAAM,qBAejB,CAAC;AAEH,eAAO,MAAM,KAAK,qBAiBhB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAgBjB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAalB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAalB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAYnB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAgBjB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAalB,CAAC;AAEH,eAAO,MAAM,OAAO,qBAalB,CAAC;AAEH,eAAO,MAAM,MAAM,qBAejB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,EAWjD,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Categories index - exports all transform categories.
3
+ */
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';
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';
10
+ import type { TransformDefinition } from '../TransformDefinition';
11
+ /**
12
+ * All built-in transforms combined.
13
+ */
14
+ export declare const ALL_TRANSFORMS: TransformDefinition[];
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Source generator transforms.
3
+ *
4
+ * These transforms create base visual patterns from UV coordinates.
5
+ * They are the starting point of most synth chains.
6
+ */
7
+ import { type TransformDefinition } from '../TransformDefinition';
8
+ export declare const osc: TransformDefinition;
9
+ export declare const noise: TransformDefinition;
10
+ export declare const voronoi: TransformDefinition;
11
+ export declare const gradient: TransformDefinition;
12
+ export declare const shape: TransformDefinition;
13
+ export declare const solid: TransformDefinition;
14
+ export declare const src: TransformDefinition;
15
+ /**
16
+ * All source generator transforms.
17
+ */
18
+ export declare const SOURCE_TRANSFORMS: TransformDefinition[];
19
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Transforms module - exports all transform-related functionality.
3
+ */
4
+ export * from './TransformDefinition';
5
+ export * from './TransformRegistry';
6
+ export * from './TransformFactory';
7
+ export * from './categories';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transforms/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { TextmodeFont } from 'textmode.js/loadables';
2
+ /**
3
+ * Resolver for character indices using font data.
4
+ * Caches resolved indices to avoid repeated lookups.
5
+ */
6
+ export declare class CharacterResolver {
7
+ private _resolvedIndices?;
8
+ private _lastFontCharacterCount;
9
+ private _lastChars;
10
+ /**
11
+ * Resolve character indices using the font's character map.
12
+ * @param chars The character string to resolve
13
+ * @param font The font to use for resolution
14
+ * @returns Array of resolved font indices
15
+ */
16
+ resolve(chars: string, font: TextmodeFont): Int32Array;
17
+ invalidate(): void;
18
+ }
19
+ //# sourceMappingURL=CharacterResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterResolver.d.ts","sourceRoot":"","sources":["../../../src/utils/CharacterResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;GAGG;AACH,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,gBAAgB,CAAC,CAAa;IACtC,OAAO,CAAC,uBAAuB,CAAK;IACpC,OAAO,CAAC,UAAU,CAAM;IAExB;;;;;OAKG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,UAAU;IAiCtD,UAAU,IAAI,IAAI;CAK5B"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "textmode.synth.js",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "Synth engine for textmode.js",
5
+ "type": "module",
6
+ "types": "./dist/types/index.d.ts",
7
+ "main": "./dist/textmode.synth.umd.js",
8
+ "module": "./dist/textmode.synth.esm.js",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/textmode.synth.esm.js",
13
+ "require": "./dist/textmode.synth.umd.js"
14
+ }
15
+ },
16
+ "scripts": {
17
+ "dev": "vite --port 5174 --host",
18
+ "build": "vite build && tsc",
19
+ "preview": "vite preview",
20
+ "build:docs": "typedoc",
21
+ "dev:docs": "typedoc --watch"
22
+ },
23
+ "devDependencies": {
24
+ "@rollup/plugin-terser": "^0.4.4",
25
+ "@types/node": "^24.5.2",
26
+ "terser": "^5.44.0",
27
+ "typescript": "~5.8.3",
28
+ "vite": "^7.1.7",
29
+ "vite-plugin-css-injected-by-js": "^3.5.2",
30
+ "typedoc": "^0.28.13",
31
+ "typedoc-plugin-markdown": "^4.7.0",
32
+ "typedoc-vitepress-theme": "^1.1.2"
33
+ },
34
+ "peerDependencies": {
35
+ "textmode.js": "^0.9.0-beta.1"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/humanbydefinition/textmode.synth.js.git"
40
+ },
41
+ "keywords": [
42
+ "textmode",
43
+ "textmode.js"
44
+ ],
45
+ "author": "humanbydefinition",
46
+ "license": "MIT",
47
+ "bugs": {
48
+ "url": "https://github.com/humanbydefinition/textmode.synth.js/issues"
49
+ },
50
+ "homepage": "https://code.textmode.art",
51
+ "files": [
52
+ "dist"
53
+ ]
54
+ }