react-native-webrtc-kaleidoscope 2.2.2 → 2.4.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 (100) hide show
  1. package/README.md +42 -3
  2. package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +354 -0
  3. package/catalog/shaders/aurora-silk/aurora-silk.form.tsx +35 -0
  4. package/catalog/shaders/aurora-silk/aurora-silk.frag +106 -0
  5. package/catalog/shaders/aurora-silk/aurora-silk.ts +92 -0
  6. package/catalog/shaders/halftone-waves/halftone-waves.form.tsx +35 -0
  7. package/catalog/shaders/halftone-waves/halftone-waves.frag +84 -0
  8. package/catalog/shaders/halftone-waves/halftone-waves.ts +100 -0
  9. package/catalog/shaders/index.ts +16 -0
  10. package/catalog/shaders/kaleidoscope/kaleidoscope.form.tsx +35 -0
  11. package/catalog/shaders/kaleidoscope/kaleidoscope.frag +93 -0
  12. package/catalog/shaders/kaleidoscope/kaleidoscope.ts +81 -0
  13. package/catalog/shaders/neo-memphis/neo-memphis.form.tsx +35 -0
  14. package/catalog/shaders/neo-memphis/neo-memphis.frag +152 -0
  15. package/catalog/shaders/neo-memphis/neo-memphis.ts +84 -0
  16. package/dist/catalog/shaders/aurora-silk/aurora-silk.d.ts +26 -0
  17. package/dist/catalog/shaders/aurora-silk/aurora-silk.d.ts.map +1 -0
  18. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts +3 -0
  19. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts.map +1 -0
  20. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.js +13 -0
  21. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.js.map +1 -0
  22. package/dist/catalog/shaders/aurora-silk/aurora-silk.js +70 -0
  23. package/dist/catalog/shaders/aurora-silk/aurora-silk.js.map +1 -0
  24. package/dist/catalog/shaders/halftone-waves/halftone-waves.d.ts +26 -0
  25. package/dist/catalog/shaders/halftone-waves/halftone-waves.d.ts.map +1 -0
  26. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts +3 -0
  27. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts.map +1 -0
  28. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.js +13 -0
  29. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.js.map +1 -0
  30. package/dist/catalog/shaders/halftone-waves/halftone-waves.js +78 -0
  31. package/dist/catalog/shaders/halftone-waves/halftone-waves.js.map +1 -0
  32. package/dist/catalog/shaders/index.d.ts +16 -0
  33. package/dist/catalog/shaders/index.d.ts.map +1 -1
  34. package/dist/catalog/shaders/index.js +9 -1
  35. package/dist/catalog/shaders/index.js.map +1 -1
  36. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.d.ts +24 -0
  37. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.d.ts.map +1 -0
  38. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts +3 -0
  39. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts.map +1 -0
  40. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.js +14 -0
  41. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.js.map +1 -0
  42. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.js +61 -0
  43. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.js.map +1 -0
  44. package/dist/catalog/shaders/neo-memphis/neo-memphis.d.ts +26 -0
  45. package/dist/catalog/shaders/neo-memphis/neo-memphis.d.ts.map +1 -0
  46. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts +3 -0
  47. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts.map +1 -0
  48. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.js +13 -0
  49. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.js.map +1 -0
  50. package/dist/catalog/shaders/neo-memphis/neo-memphis.js +62 -0
  51. package/dist/catalog/shaders/neo-memphis/neo-memphis.js.map +1 -0
  52. package/dist/src/components/preset-control-panel/preset-control-panel.d.ts +9 -1
  53. package/dist/src/components/preset-control-panel/preset-control-panel.d.ts.map +1 -1
  54. package/dist/src/components/preset-control-panel/preset-control-panel.js +7 -3
  55. package/dist/src/components/preset-control-panel/preset-control-panel.js.map +1 -1
  56. package/dist/src/kaleidoscope/controls.d.ts.map +1 -1
  57. package/dist/src/kaleidoscope/controls.js +6 -3
  58. package/dist/src/kaleidoscope/controls.js.map +1 -1
  59. package/dist/src/kaleidoscope/shader-to-spec.d.ts +15 -1
  60. package/dist/src/kaleidoscope/shader-to-spec.d.ts.map +1 -1
  61. package/dist/src/kaleidoscope/shader-to-spec.js +23 -4
  62. package/dist/src/kaleidoscope/shader-to-spec.js.map +1 -1
  63. package/dist/src/kaleidoscope/types.d.ts +3 -1
  64. package/dist/src/kaleidoscope/types.d.ts.map +1 -1
  65. package/dist/src/kaleidoscope/types.js.map +1 -1
  66. package/dist/src/persistence/async-storage-store.d.ts +3 -0
  67. package/dist/src/persistence/async-storage-store.d.ts.map +1 -0
  68. package/dist/src/persistence/async-storage-store.js +26 -0
  69. package/dist/src/persistence/async-storage-store.js.map +1 -0
  70. package/dist/src/persistence/index.d.ts +4 -0
  71. package/dist/src/persistence/index.d.ts.map +1 -0
  72. package/dist/src/persistence/index.js +22 -0
  73. package/dist/src/persistence/index.js.map +1 -0
  74. package/dist/src/persistence/provider.d.ts +38 -0
  75. package/dist/src/persistence/provider.d.ts.map +1 -0
  76. package/dist/src/persistence/provider.js +96 -0
  77. package/dist/src/persistence/provider.js.map +1 -0
  78. package/dist/src/persistence/state.d.ts +54 -0
  79. package/dist/src/persistence/state.d.ts.map +1 -0
  80. package/dist/src/persistence/state.js +126 -0
  81. package/dist/src/persistence/state.js.map +1 -0
  82. package/dist/web-driver/shaders.generated.d.ts +4 -0
  83. package/dist/web-driver/shaders.generated.d.ts.map +1 -1
  84. package/dist/web-driver/shaders.generated.js +351 -1
  85. package/dist/web-driver/shaders.generated.js.map +1 -1
  86. package/ios/KaleidoscopeModule/shaders/GENERATIVE.txt +4 -0
  87. package/ios/KaleidoscopeModule/shaders/SHADERS.txt +4 -0
  88. package/ios/KaleidoscopeModule/shaders/aurora-silk.metalsrc +51 -0
  89. package/ios/KaleidoscopeModule/shaders/halftone-waves.metalsrc +41 -0
  90. package/ios/KaleidoscopeModule/shaders/kaleidoscope.metalsrc +45 -0
  91. package/ios/KaleidoscopeModule/shaders/neo-memphis.metalsrc +181 -0
  92. package/package.json +43 -3
  93. package/src/components/preset-control-panel/preset-control-panel.tsx +15 -2
  94. package/src/kaleidoscope/controls.ts +6 -3
  95. package/src/kaleidoscope/shader-to-spec.ts +32 -5
  96. package/src/kaleidoscope/types.ts +3 -1
  97. package/src/persistence/async-storage-store.ts +33 -0
  98. package/src/persistence/index.ts +28 -0
  99. package/src/persistence/provider.tsx +165 -0
  100. package/src/persistence/state.ts +167 -0
@@ -4,11 +4,13 @@
4
4
  // from, and the shader's documentation). The per-shader `*_CONTROLS` are
5
5
  // re-exported individually; a consumer imports the one its preset's layer needs.
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SIMIANLIGHTS_CONTROLS = exports.PLASMA_CONTROLS = exports.NEBULA_CONTROLS = exports.LIGHT_BEAMS_AND_MOTES_CONTROLS = exports.GODRAYS_CONTROLS = exports.FIREFLIES_CONTROLS = exports.CORPORATE_BLOBS_CONTROLS = exports.CLOUDS_CONTROLS = exports.BLUR_CONTROLS = exports.ANAMORPHIC_LENSFLARE_CONTROLS = exports.defaultUniforms = void 0;
7
+ exports.SIMIANLIGHTS_CONTROLS = exports.PLASMA_CONTROLS = exports.NEO_MEMPHIS_CONTROLS = exports.NEBULA_CONTROLS = exports.LIGHT_BEAMS_AND_MOTES_CONTROLS = exports.KALEIDOSCOPE_CONTROLS = exports.HALFTONE_WAVES_CONTROLS = exports.GODRAYS_CONTROLS = exports.FIREFLIES_CONTROLS = exports.CORPORATE_BLOBS_CONTROLS = exports.CLOUDS_CONTROLS = exports.BLUR_CONTROLS = exports.AURORA_SILK_CONTROLS = exports.ANAMORPHIC_LENSFLARE_CONTROLS = exports.defaultUniforms = void 0;
8
8
  var types_1 = require("./_shared/types");
9
9
  Object.defineProperty(exports, "defaultUniforms", { enumerable: true, get: function () { return types_1.defaultUniforms; } });
10
10
  var anamorphic_lensflare_1 = require("./anamorphic-lensflare/anamorphic-lensflare");
11
11
  Object.defineProperty(exports, "ANAMORPHIC_LENSFLARE_CONTROLS", { enumerable: true, get: function () { return anamorphic_lensflare_1.ANAMORPHIC_LENSFLARE_CONTROLS; } });
12
+ var aurora_silk_1 = require("./aurora-silk/aurora-silk");
13
+ Object.defineProperty(exports, "AURORA_SILK_CONTROLS", { enumerable: true, get: function () { return aurora_silk_1.AURORA_SILK_CONTROLS; } });
12
14
  var blur_1 = require("./blur/blur");
13
15
  Object.defineProperty(exports, "BLUR_CONTROLS", { enumerable: true, get: function () { return blur_1.BLUR_CONTROLS; } });
14
16
  var clouds_1 = require("./clouds/clouds");
@@ -19,10 +21,16 @@ var fireflies_1 = require("./fireflies/fireflies");
19
21
  Object.defineProperty(exports, "FIREFLIES_CONTROLS", { enumerable: true, get: function () { return fireflies_1.FIREFLIES_CONTROLS; } });
20
22
  var godrays_1 = require("./godrays/godrays");
21
23
  Object.defineProperty(exports, "GODRAYS_CONTROLS", { enumerable: true, get: function () { return godrays_1.GODRAYS_CONTROLS; } });
24
+ var halftone_waves_1 = require("./halftone-waves/halftone-waves");
25
+ Object.defineProperty(exports, "HALFTONE_WAVES_CONTROLS", { enumerable: true, get: function () { return halftone_waves_1.HALFTONE_WAVES_CONTROLS; } });
26
+ var kaleidoscope_1 = require("./kaleidoscope/kaleidoscope");
27
+ Object.defineProperty(exports, "KALEIDOSCOPE_CONTROLS", { enumerable: true, get: function () { return kaleidoscope_1.KALEIDOSCOPE_CONTROLS; } });
22
28
  var light_beams_and_motes_1 = require("./light-beams-and-motes/light-beams-and-motes");
23
29
  Object.defineProperty(exports, "LIGHT_BEAMS_AND_MOTES_CONTROLS", { enumerable: true, get: function () { return light_beams_and_motes_1.LIGHT_BEAMS_AND_MOTES_CONTROLS; } });
24
30
  var nebula_1 = require("./nebula/nebula");
25
31
  Object.defineProperty(exports, "NEBULA_CONTROLS", { enumerable: true, get: function () { return nebula_1.NEBULA_CONTROLS; } });
32
+ var neo_memphis_1 = require("./neo-memphis/neo-memphis");
33
+ Object.defineProperty(exports, "NEO_MEMPHIS_CONTROLS", { enumerable: true, get: function () { return neo_memphis_1.NEO_MEMPHIS_CONTROLS; } });
26
34
  var plasma_1 = require("./plasma/plasma");
27
35
  Object.defineProperty(exports, "PLASMA_CONTROLS", { enumerable: true, get: function () { return plasma_1.PLASMA_CONTROLS; } });
28
36
  var simianlights_1 = require("./simianlights/simianlights");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../catalog/shaders/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,gFAAgF;AAChF,yEAAyE;AACzE,iFAAiF;;;AAajF,yCAAuE;AAA9D,wGAAA,eAAe,OAAA;AAExB,oFAA4F;AAAnF,qIAAA,6BAA6B,OAAA;AAEtC,oCAA4C;AAAnC,qGAAA,aAAa,OAAA;AAEtB,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,qEAA6E;AAApE,2HAAA,wBAAwB,OAAA;AAEjC,mDAA2D;AAAlD,+GAAA,kBAAkB,OAAA;AAE3B,6CAAqD;AAA5C,2GAAA,gBAAgB,OAAA;AAEzB,uFAA+F;AAAtF,uIAAA,8BAA8B,OAAA;AAEvC,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA","sourcesContent":["// Per-shader interface barrel. Each layer shader exports its typed uniforms and\n// a control descriptor (the runtime metadata the demo generates tuning controls\n// from, and the shader's documentation). The per-shader `*_CONTROLS` are\n// re-exported individually; a consumer imports the one its preset's layer needs.\n\nimport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nimport type { BlurUniforms } from './blur/blur';\nimport type { CloudsUniforms } from './clouds/clouds';\nimport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nimport type { FirefliesUniforms } from './fireflies/fireflies';\nimport type { GodraysUniforms } from './godrays/godrays';\nimport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nimport type { NebulaUniforms } from './nebula/nebula';\nimport type { PlasmaUniforms } from './plasma/plasma';\nimport type { SimianlightsUniforms } from './simianlights/simianlights';\n\nexport { defaultUniforms, type UniformControl } from './_shared/types';\nexport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nexport { ANAMORPHIC_LENSFLARE_CONTROLS } from './anamorphic-lensflare/anamorphic-lensflare';\nexport type { BlurUniforms } from './blur/blur';\nexport { BLUR_CONTROLS } from './blur/blur';\nexport type { CloudsUniforms } from './clouds/clouds';\nexport { CLOUDS_CONTROLS } from './clouds/clouds';\nexport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nexport { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';\nexport type { FirefliesUniforms } from './fireflies/fireflies';\nexport { FIREFLIES_CONTROLS } from './fireflies/fireflies';\nexport type { GodraysUniforms } from './godrays/godrays';\nexport { GODRAYS_CONTROLS } from './godrays/godrays';\nexport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nexport { LIGHT_BEAMS_AND_MOTES_CONTROLS } from './light-beams-and-motes/light-beams-and-motes';\nexport type { NebulaUniforms } from './nebula/nebula';\nexport { NEBULA_CONTROLS } from './nebula/nebula';\nexport type { PlasmaUniforms } from './plasma/plasma';\nexport { PLASMA_CONTROLS } from './plasma/plasma';\nexport type { SimianlightsUniforms } from './simianlights/simianlights';\nexport { SIMIANLIGHTS_CONTROLS } from './simianlights/simianlights';\n\n/**\n * The uniform-bearing layer shaders → their typed uniforms. `image` and `direct`\n * carry no uniforms, so they are absent. This is the map `PatchFor` re-indexes by\n * a layer's literal `shader` to type its `uniforms` as `Partial<PlasmaUniforms>`,\n * giving authors IntelliSense on a `kaleidoscope(id, patches)` call.\n */\nexport type ShaderUniformsMap = {\n readonly blur: BlurUniforms;\n readonly clouds: CloudsUniforms;\n readonly godrays: GodraysUniforms;\n readonly fireflies: FirefliesUniforms;\n readonly plasma: PlasmaUniforms;\n readonly nebula: NebulaUniforms;\n readonly simianlights: SimianlightsUniforms;\n readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;\n readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;\n readonly 'corporate-blobs': CorporateBlobsUniforms;\n};\n\n/** A patchable (uniform-bearing) layer shader name. */\nexport type PatchableShaderName = keyof ShaderUniformsMap;\n\n/**\n * What each layer `shader` accepts in a preset, DERIVED from `ShaderUniformsMap`\n * so adding a shader there flows through automatically (no hand-mirrored list):\n * every uniform-bearing shader's options are a `Partial` of its uniforms, plus\n * the two non-uniform layer kinds. The `KaleidoscopeLayer` discriminant narrows\n * over this.\n * - `image` replaces the target with a still image (needs `source`).\n * - `direct` passes the target through unchanged (a matrix passthrough).\n */\nexport type LayerShaderOptions = {\n readonly image: { readonly source: string };\n readonly direct: Record<never, never>;\n} & {\n readonly [K in keyof ShaderUniformsMap]: { readonly uniforms: Partial<ShaderUniformsMap[K]> };\n};\n\n/** A layer shader name (the `KaleidoscopeLayer` discriminant). */\nexport type LayerShaderName = keyof LayerShaderOptions;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../catalog/shaders/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,gFAAgF;AAChF,yEAAyE;AACzE,iFAAiF;;;AAiBjF,yCAAuE;AAA9D,wGAAA,eAAe,OAAA;AAExB,oFAA4F;AAAnF,qIAAA,6BAA6B,OAAA;AAEtC,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,oCAA4C;AAAnC,qGAAA,aAAa,OAAA;AAEtB,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,qEAA6E;AAApE,2HAAA,wBAAwB,OAAA;AAEjC,mDAA2D;AAAlD,+GAAA,kBAAkB,OAAA;AAE3B,6CAAqD;AAA5C,2GAAA,gBAAgB,OAAA;AAEzB,kEAA0E;AAAjE,yHAAA,uBAAuB,OAAA;AAEhC,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA;AAE9B,uFAA+F;AAAtF,uIAAA,8BAA8B,OAAA;AAEvC,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA","sourcesContent":["// Per-shader interface barrel. Each layer shader exports its typed uniforms and\n// a control descriptor (the runtime metadata the demo generates tuning controls\n// from, and the shader's documentation). The per-shader `*_CONTROLS` are\n// re-exported individually; a consumer imports the one its preset's layer needs.\n\nimport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nimport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nimport type { BlurUniforms } from './blur/blur';\nimport type { CloudsUniforms } from './clouds/clouds';\nimport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nimport type { FirefliesUniforms } from './fireflies/fireflies';\nimport type { GodraysUniforms } from './godrays/godrays';\nimport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nimport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nimport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nimport type { NebulaUniforms } from './nebula/nebula';\nimport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nimport type { PlasmaUniforms } from './plasma/plasma';\nimport type { SimianlightsUniforms } from './simianlights/simianlights';\n\nexport { defaultUniforms, type UniformControl } from './_shared/types';\nexport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nexport { ANAMORPHIC_LENSFLARE_CONTROLS } from './anamorphic-lensflare/anamorphic-lensflare';\nexport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nexport { AURORA_SILK_CONTROLS } from './aurora-silk/aurora-silk';\nexport type { BlurUniforms } from './blur/blur';\nexport { BLUR_CONTROLS } from './blur/blur';\nexport type { CloudsUniforms } from './clouds/clouds';\nexport { CLOUDS_CONTROLS } from './clouds/clouds';\nexport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nexport { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';\nexport type { FirefliesUniforms } from './fireflies/fireflies';\nexport { FIREFLIES_CONTROLS } from './fireflies/fireflies';\nexport type { GodraysUniforms } from './godrays/godrays';\nexport { GODRAYS_CONTROLS } from './godrays/godrays';\nexport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nexport { HALFTONE_WAVES_CONTROLS } from './halftone-waves/halftone-waves';\nexport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nexport { KALEIDOSCOPE_CONTROLS } from './kaleidoscope/kaleidoscope';\nexport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nexport { LIGHT_BEAMS_AND_MOTES_CONTROLS } from './light-beams-and-motes/light-beams-and-motes';\nexport type { NebulaUniforms } from './nebula/nebula';\nexport { NEBULA_CONTROLS } from './nebula/nebula';\nexport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nexport { NEO_MEMPHIS_CONTROLS } from './neo-memphis/neo-memphis';\nexport type { PlasmaUniforms } from './plasma/plasma';\nexport { PLASMA_CONTROLS } from './plasma/plasma';\nexport type { SimianlightsUniforms } from './simianlights/simianlights';\nexport { SIMIANLIGHTS_CONTROLS } from './simianlights/simianlights';\n\n/**\n * The uniform-bearing layer shaders → their typed uniforms. `image` and `direct`\n * carry no uniforms, so they are absent. This is the map `PatchFor` re-indexes by\n * a layer's literal `shader` to type its `uniforms` as `Partial<PlasmaUniforms>`,\n * giving authors IntelliSense on a `kaleidoscope(id, patches)` call.\n */\nexport type ShaderUniformsMap = {\n readonly blur: BlurUniforms;\n readonly clouds: CloudsUniforms;\n readonly godrays: GodraysUniforms;\n readonly fireflies: FirefliesUniforms;\n readonly kaleidoscope: KaleidoscopeShaderUniforms;\n readonly 'halftone-waves': HalftoneWavesUniforms;\n readonly plasma: PlasmaUniforms;\n readonly nebula: NebulaUniforms;\n readonly 'neo-memphis': NeoMemphisUniforms;\n readonly simianlights: SimianlightsUniforms;\n readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;\n readonly 'aurora-silk': AuroraSilkUniforms;\n readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;\n readonly 'corporate-blobs': CorporateBlobsUniforms;\n};\n\n/** A patchable (uniform-bearing) layer shader name. */\nexport type PatchableShaderName = keyof ShaderUniformsMap;\n\n/**\n * What each layer `shader` accepts in a preset, DERIVED from `ShaderUniformsMap`\n * so adding a shader there flows through automatically (no hand-mirrored list):\n * every uniform-bearing shader's options are a `Partial` of its uniforms, plus\n * the two non-uniform layer kinds. The `KaleidoscopeLayer` discriminant narrows\n * over this.\n * - `image` replaces the target with a still image (needs `source`).\n * - `direct` passes the target through unchanged (a matrix passthrough).\n */\nexport type LayerShaderOptions = {\n readonly image: { readonly source: string };\n readonly direct: Record<never, never>;\n} & {\n readonly [K in keyof ShaderUniformsMap]: { readonly uniforms: Partial<ShaderUniformsMap[K]> };\n};\n\n/** A layer shader name (the `KaleidoscopeLayer` discriminant). */\nexport type LayerShaderName = keyof LayerShaderOptions;\n"]}
@@ -0,0 +1,24 @@
1
+ import type { RGB } from '../../../src/lib/primitives.types';
2
+ import type { UniformControl } from '../_shared/types';
3
+ /** Typed uniforms for the `kaleidoscope` layer shader. */
4
+ export type KaleidoscopeShaderUniforms = {
5
+ /** Base palette color; also the pole uCalm eases toward. */
6
+ readonly uColorA: RGB;
7
+ /** Second palette color. */
8
+ readonly uColorB: RGB;
9
+ /** Accent color layered over the A/B field. */
10
+ readonly uColorC: RGB;
11
+ /** Mirror segment count; 6 = bold facets, 12 = lace. */
12
+ readonly uSegments: number;
13
+ /** Source-field drift rate; 0 freezes the pattern. */
14
+ readonly uSpeed: number;
15
+ /** Whole-field rotation rate; sign sets direction. */
16
+ readonly uRotate: number;
17
+ /** Pattern scale; higher = more rings of detail. */
18
+ readonly uZoom: number;
19
+ /** Eases contrast at frame center (the face zone); 0 = off. */
20
+ readonly uCalm: number;
21
+ };
22
+ /** The `kaleidoscope` shader's tunables; defaults are the "stained glass" look. */
23
+ export declare const KALEIDOSCOPE_CONTROLS: readonly UniformControl[];
24
+ //# sourceMappingURL=kaleidoscope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaleidoscope.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/kaleidoscope/kaleidoscope.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,0DAA0D;AAC1D,MAAM,MAAM,0BAA0B,GAAG;IACvC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,EAAE,SAAS,cAAc,EAiD1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type KaleidoscopeControls } from '../../../src/components/preset-control-panel';
2
+ export declare function KaleidoscopeForm({ uniforms, onPatch, disabled }: KaleidoscopeControls): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=kaleidoscope.form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaleidoscope.form.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/kaleidoscope/kaleidoscope.form.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8CAA8C,CAAC;AAGtD,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAqBrF"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KaleidoscopeForm = KaleidoscopeForm;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Kaleidoscope's editor form: the shader OWNS its control layout (the plasma
6
+ // pattern). One <Control uniform="…"/> per uniform in declared order; layout
7
+ // or grouping changes are a local edit here. Conventional layer id:
8
+ // "kaleidoscope".
9
+ const preset_control_panel_1 = require("../../../src/components/preset-control-panel");
10
+ const kaleidoscope_1 = require("./kaleidoscope");
11
+ function KaleidoscopeForm({ uniforms, onPatch, disabled }) {
12
+ return ((0, jsx_runtime_1.jsx)(preset_control_panel_1.ControlForm, { id: "kaleidoscope", uniforms: uniforms.kaleidoscope ?? {}, onPatch: onPatch, disabled: disabled, controls: kaleidoscope_1.KALEIDOSCOPE_CONTROLS, children: (0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "kaleidoscope", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorA" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorB" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorC" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSegments" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSpeed" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uRotate" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uZoom" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uCalm" })] }) }));
13
+ }
14
+ //# sourceMappingURL=kaleidoscope.form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaleidoscope.form.js","sourceRoot":"","sources":["../../../../catalog/shaders/kaleidoscope/kaleidoscope.form.tsx"],"names":[],"mappings":";;;;AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,kBAAkB;AAElB,uFAKsD;AACtD,iDAAuD;AAEvD,0BAAiC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAwB;IACpF,OAAO,CACL,uBAAC,kCAAW,IACV,EAAE,EAAC,cAAc,EACjB,QAAQ,EAAE,QAAQ,CAAC,YAAY,IAAI,EAAE,EACrC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,oCAAqB,YAE/B,wBAAC,qCAAc,IAAC,KAAK,EAAC,cAAc,aAClC,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,WAAW,GAAG,EAC/B,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,EAC3B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,IACZ,GACL,CACf,CAAC;AACJ,CAAC","sourcesContent":["// Kaleidoscope's editor form: the shader OWNS its control layout (the plasma\n// pattern). One <Control uniform=\"…\"/> per uniform in declared order; layout\n// or grouping changes are a local edit here. Conventional layer id:\n// \"kaleidoscope\".\n\nimport {\n Control,\n ControlForm,\n ControlSection,\n type KaleidoscopeControls,\n} from '../../../src/components/preset-control-panel';\nimport { KALEIDOSCOPE_CONTROLS } from './kaleidoscope';\n\nexport function KaleidoscopeForm({ uniforms, onPatch, disabled }: KaleidoscopeControls) {\n return (\n <ControlForm\n id=\"kaleidoscope\"\n uniforms={uniforms.kaleidoscope ?? {}}\n onPatch={onPatch}\n disabled={disabled}\n controls={KALEIDOSCOPE_CONTROLS}\n >\n <ControlSection title=\"kaleidoscope\">\n <Control uniform=\"uColorA\" />\n <Control uniform=\"uColorB\" />\n <Control uniform=\"uColorC\" />\n <Control uniform=\"uSegments\" />\n <Control uniform=\"uSpeed\" />\n <Control uniform=\"uRotate\" />\n <Control uniform=\"uZoom\" />\n <Control uniform=\"uCalm\" />\n </ControlSection>\n </ControlForm>\n );\n}\n"]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ // Kaleidoscope layer-shader interface: typed uniforms + control descriptor.
3
+ // The library's namesake: a mirrored polar fold over a drifting sine field, an
4
+ // opaque BACKGROUND layer (issue #61). One kaleidoscope.frag fans out into the
5
+ // book presets (stained-glass, mandala, prism) by varying these uniforms; the
6
+ // segment count and palette are the big levers. Shader source is
7
+ // shaders/kaleidoscope.frag.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.KALEIDOSCOPE_CONTROLS = void 0;
10
+ /** The `kaleidoscope` shader's tunables; defaults are the "stained glass" look. */
11
+ exports.KALEIDOSCOPE_CONTROLS = [
12
+ { name: 'uColorA', kind: 'color', default: [0.07, 0.15, 0.36], doc: 'Base palette color.' },
13
+ { name: 'uColorB', kind: 'color', default: [0.1, 0.55, 0.62], doc: 'Second palette color.' },
14
+ { name: 'uColorC', kind: 'color', default: [0.93, 0.69, 0.21], doc: 'Accent color.' },
15
+ {
16
+ name: 'uSegments',
17
+ kind: 'float',
18
+ default: 8,
19
+ min: 3,
20
+ max: 16,
21
+ step: 1,
22
+ doc: 'Mirror segment count; 6 = bold facets, 12 = lace.',
23
+ },
24
+ {
25
+ name: 'uSpeed',
26
+ kind: 'float',
27
+ default: 0.35,
28
+ min: 0,
29
+ max: 2,
30
+ step: 0.01,
31
+ doc: 'Drift rate; 0 freezes.',
32
+ },
33
+ {
34
+ name: 'uRotate',
35
+ kind: 'float',
36
+ default: 0.04,
37
+ min: -0.5,
38
+ max: 0.5,
39
+ step: 0.005,
40
+ doc: 'Whole-field rotation rate; sign sets direction.',
41
+ },
42
+ {
43
+ name: 'uZoom',
44
+ kind: 'float',
45
+ default: 1.6,
46
+ min: 0.5,
47
+ max: 4,
48
+ step: 0.05,
49
+ doc: 'Pattern scale; higher = more rings of detail.',
50
+ },
51
+ {
52
+ name: 'uCalm',
53
+ kind: 'float',
54
+ default: 0,
55
+ min: 0,
56
+ max: 1,
57
+ step: 0.01,
58
+ doc: 'Eases contrast at frame center (face zone).',
59
+ },
60
+ ];
61
+ //# sourceMappingURL=kaleidoscope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaleidoscope.js","sourceRoot":"","sources":["../../../../catalog/shaders/kaleidoscope/kaleidoscope.ts"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,iEAAiE;AACjE,6BAA6B;;;AAyB7B,mFAAmF;AACtE,QAAA,qBAAqB,GAA8B;IAC9D,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,E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typed uniforms + control descriptor.\n// The library's namesake: a mirrored polar fold over a drifting sine field, an\n// opaque BACKGROUND layer (issue #61). One kaleidoscope.frag fans out into the\n// book presets (stained-glass, mandala, prism) by varying these uniforms; the\n// segment count and palette are the big levers. Shader source is\n// shaders/kaleidoscope.frag.\n\nimport type { RGB } from '../../../src/lib/primitives.types';\nimport type { UniformControl } from '../_shared/types';\n\n/** Typed uniforms for the `kaleidoscope` layer shader. */\nexport type KaleidoscopeShaderUniforms = {\n /** Base palette color; also the pole uCalm eases toward. */\n readonly uColorA: RGB;\n /** Second palette color. */\n readonly uColorB: RGB;\n /** Accent color layered over the A/B field. */\n readonly uColorC: RGB;\n /** Mirror segment count; 6 = bold facets, 12 = lace. */\n readonly uSegments: number;\n /** Source-field drift rate; 0 freezes the pattern. */\n readonly uSpeed: number;\n /** Whole-field rotation rate; sign sets direction. */\n readonly uRotate: number;\n /** Pattern scale; higher = more rings of detail. */\n readonly uZoom: number;\n /** Eases contrast at frame center (the face zone); 0 = off. */\n readonly uCalm: number;\n};\n\n/** The `kaleidoscope` shader's tunables; defaults are the \"stained glass\" look. */\nexport const KALEIDOSCOPE_CONTROLS: readonly UniformControl[] = [\n { name: 'uColorA', kind: 'color', default: [0.07, 0.15, 0.36], doc: 'Base palette color.' },\n { name: 'uColorB', kind: 'color', default: [0.1, 0.55, 0.62], doc: 'Second palette color.' },\n { name: 'uColorC', kind: 'color', default: [0.93, 0.69, 0.21], doc: 'Accent color.' },\n {\n name: 'uSegments',\n kind: 'float',\n default: 8,\n min: 3,\n max: 16,\n step: 1,\n doc: 'Mirror segment count; 6 = bold facets, 12 = lace.',\n },\n {\n name: 'uSpeed',\n kind: 'float',\n default: 0.35,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Drift rate; 0 freezes.',\n },\n {\n name: 'uRotate',\n kind: 'float',\n default: 0.04,\n min: -0.5,\n max: 0.5,\n step: 0.005,\n doc: 'Whole-field rotation rate; sign sets direction.',\n },\n {\n name: 'uZoom',\n kind: 'float',\n default: 1.6,\n min: 0.5,\n max: 4,\n step: 0.05,\n doc: 'Pattern scale; higher = more rings of detail.',\n },\n {\n name: 'uCalm',\n kind: 'float',\n default: 0,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Eases contrast at frame center (face zone).',\n },\n];\n"]}
@@ -0,0 +1,26 @@
1
+ import type { RGB } from '../../../src/lib/primitives.types';
2
+ import type { UniformControl } from '../_shared/types';
3
+ /** Typed uniforms for the `neo-memphis` layer shader. */
4
+ export type NeoMemphisUniforms = {
5
+ /** Field color behind the shapes. */
6
+ readonly uBgColor: RGB;
7
+ /** Shape palette color 1. */
8
+ readonly uColorA: RGB;
9
+ /** Shape palette color 2. */
10
+ readonly uColorB: RGB;
11
+ /** Shape palette color 3. */
12
+ readonly uColorC: RGB;
13
+ /** Hero-grid cells across frame height; higher = smaller, busier shapes. */
14
+ readonly uScale: number;
15
+ /** Probability a cell draws its shape; the busy-ness dial. */
16
+ readonly uDensity: number;
17
+ /** Probability a shape renders outlined instead of filled. */
18
+ readonly uOutline: number;
19
+ /** Scroll + rotation rate; 0 freezes. */
20
+ readonly uDrift: number;
21
+ /** Fades shapes near frame center (the face zone); 0 = off. */
22
+ readonly uCalm: number;
23
+ };
24
+ /** The `neo-memphis` shader's tunables; defaults are the "pastel studio" look. */
25
+ export declare const NEO_MEMPHIS_CONTROLS: readonly UniformControl[];
26
+ //# sourceMappingURL=neo-memphis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo-memphis.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/neo-memphis/neo-memphis.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAkDzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type KaleidoscopeControls } from '../../../src/components/preset-control-panel';
2
+ export declare function NeoMemphisForm({ uniforms, onPatch, disabled }: KaleidoscopeControls): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=neo-memphis.form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo-memphis.form.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/neo-memphis/neo-memphis.form.tsx"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8CAA8C,CAAC;AAGtD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAsBnF"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NeoMemphisForm = NeoMemphisForm;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Neo-Memphis's editor form: the shader OWNS its control layout (the plasma
6
+ // pattern). One <Control uniform="…"/> per uniform in declared order.
7
+ // Conventional layer id: "neo-memphis".
8
+ const preset_control_panel_1 = require("../../../src/components/preset-control-panel");
9
+ const neo_memphis_1 = require("./neo-memphis");
10
+ function NeoMemphisForm({ uniforms, onPatch, disabled }) {
11
+ return ((0, jsx_runtime_1.jsx)(preset_control_panel_1.ControlForm, { id: "neo-memphis", uniforms: uniforms['neo-memphis'] ?? {}, onPatch: onPatch, disabled: disabled, controls: neo_memphis_1.NEO_MEMPHIS_CONTROLS, children: (0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "neo-memphis", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uBgColor" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorA" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorB" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uColorC" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uScale" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uDensity" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uOutline" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uDrift" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uCalm" })] }) }));
12
+ }
13
+ //# sourceMappingURL=neo-memphis.form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo-memphis.form.js","sourceRoot":"","sources":["../../../../catalog/shaders/neo-memphis/neo-memphis.form.tsx"],"names":[],"mappings":";;;;AAAA,4EAA4E;AAC5E,sEAAsE;AACtE,wCAAwC;AAExC,uFAKsD;AACtD,+CAAqD;AAErD,wBAA+B,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAwB;IAClF,OAAO,CACL,uBAAC,kCAAW,IACV,EAAE,EAAC,aAAa,EAChB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,EACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,kCAAoB,YAE9B,wBAAC,qCAAc,IAAC,KAAK,EAAC,aAAa,aACjC,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,IACZ,GACL,CACf,CAAC;AACJ,CAAC","sourcesContent":["// Neo-Memphis's editor form: the shader OWNS its control layout (the plasma\n// pattern). One <Control uniform=\"…\"/> per uniform in declared order.\n// Conventional layer id: \"neo-memphis\".\n\nimport {\n Control,\n ControlForm,\n ControlSection,\n type KaleidoscopeControls,\n} from '../../../src/components/preset-control-panel';\nimport { NEO_MEMPHIS_CONTROLS } from './neo-memphis';\n\nexport function NeoMemphisForm({ uniforms, onPatch, disabled }: KaleidoscopeControls) {\n return (\n <ControlForm\n id=\"neo-memphis\"\n uniforms={uniforms['neo-memphis'] ?? {}}\n onPatch={onPatch}\n disabled={disabled}\n controls={NEO_MEMPHIS_CONTROLS}\n >\n <ControlSection title=\"neo-memphis\">\n <Control uniform=\"uBgColor\" />\n <Control uniform=\"uColorA\" />\n <Control uniform=\"uColorB\" />\n <Control uniform=\"uColorC\" />\n <Control uniform=\"uScale\" />\n <Control uniform=\"uDensity\" />\n <Control uniform=\"uOutline\" />\n <Control uniform=\"uDrift\" />\n <Control uniform=\"uCalm\" />\n </ControlSection>\n </ControlForm>\n );\n}\n"]}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ // Neo-Memphis layer-shader interface: typed uniforms + control descriptor.
3
+ // Scattered flat-color geometric primitives (the 90s Memphis / "Jazz cup"
4
+ // pattern family), an opaque BACKGROUND layer (issue #61). One
5
+ // neo-memphis.frag fans out into the book presets (jazz-cup, bauhaus,
6
+ // confetti) by varying these uniforms; the palette is the big lever. Shader
7
+ // source is shaders/neo-memphis.frag.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.NEO_MEMPHIS_CONTROLS = void 0;
10
+ /** The `neo-memphis` shader's tunables; defaults are the "pastel studio" look. */
11
+ exports.NEO_MEMPHIS_CONTROLS = [
12
+ { name: 'uBgColor', kind: 'color', default: [0.96, 0.94, 0.89], doc: 'Field color.' },
13
+ { name: 'uColorA', kind: 'color', default: [0.16, 0.62, 0.56], doc: 'Shape palette color 1.' },
14
+ { name: 'uColorB', kind: 'color', default: [0.91, 0.45, 0.45], doc: 'Shape palette color 2.' },
15
+ { name: 'uColorC', kind: 'color', default: [0.27, 0.32, 0.55], doc: 'Shape palette color 3.' },
16
+ {
17
+ name: 'uScale',
18
+ kind: 'float',
19
+ default: 4,
20
+ min: 2,
21
+ max: 10,
22
+ step: 0.5,
23
+ doc: 'Hero-grid cells across frame height.',
24
+ },
25
+ {
26
+ name: 'uDensity',
27
+ kind: 'float',
28
+ default: 0.6,
29
+ min: 0,
30
+ max: 1,
31
+ step: 0.01,
32
+ doc: 'Probability a cell draws; busy-ness.',
33
+ },
34
+ {
35
+ name: 'uOutline',
36
+ kind: 'float',
37
+ default: 0.4,
38
+ min: 0,
39
+ max: 1,
40
+ step: 0.01,
41
+ doc: 'Share of outlined vs filled shapes.',
42
+ },
43
+ {
44
+ name: 'uDrift',
45
+ kind: 'float',
46
+ default: 0.5,
47
+ min: 0,
48
+ max: 2,
49
+ step: 0.01,
50
+ doc: 'Scroll + spin rate; 0 freezes.',
51
+ },
52
+ {
53
+ name: 'uCalm',
54
+ kind: 'float',
55
+ default: 0,
56
+ min: 0,
57
+ max: 1,
58
+ step: 0.01,
59
+ doc: 'Fades shapes at frame center (face zone).',
60
+ },
61
+ ];
62
+ //# sourceMappingURL=neo-memphis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo-memphis.js","sourceRoot":"","sources":["../../../../catalog/shaders/neo-memphis/neo-memphis.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,0EAA0E;AAC1E,+DAA+D;AAC/D,sEAAsE;AACtE,4EAA4E;AAC5E,sCAAsC;;;AA2BtC,kFAAkF;AACrE,QAAA,oBAAoB,GAA8B;IAC7D,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE;IACrF,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,wBAAwB,EAAE;IAC9F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,wBAAwB,EAAE;IAC9F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,wBAAwB,EAAE;IAC9F;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,CAAC;QACV,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,sCAAsC;KAC5C;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,GAAG;QACZ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,sCAAsC;KAC5C;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,GAAG;QACZ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,qCAAqC;KAC3C;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,GAAG;QACZ,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,gCAAgC;KACtC;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,CAAC;QACV,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,2CAA2C;KACjD;CACF,CAAC","sourcesContent":["// Neo-Memphis layer-shader interface: typed uniforms + control descriptor.\n// Scattered flat-color geometric primitives (the 90s Memphis / \"Jazz cup\"\n// pattern family), an opaque BACKGROUND layer (issue #61). One\n// neo-memphis.frag fans out into the book presets (jazz-cup, bauhaus,\n// confetti) by varying these uniforms; the palette is the big lever. Shader\n// source is shaders/neo-memphis.frag.\n\nimport type { RGB } from '../../../src/lib/primitives.types';\nimport type { UniformControl } from '../_shared/types';\n\n/** Typed uniforms for the `neo-memphis` layer shader. */\nexport type NeoMemphisUniforms = {\n /** Field color behind the shapes. */\n readonly uBgColor: RGB;\n /** Shape palette color 1. */\n readonly uColorA: RGB;\n /** Shape palette color 2. */\n readonly uColorB: RGB;\n /** Shape palette color 3. */\n readonly uColorC: RGB;\n /** Hero-grid cells across frame height; higher = smaller, busier shapes. */\n readonly uScale: number;\n /** Probability a cell draws its shape; the busy-ness dial. */\n readonly uDensity: number;\n /** Probability a shape renders outlined instead of filled. */\n readonly uOutline: number;\n /** Scroll + rotation rate; 0 freezes. */\n readonly uDrift: number;\n /** Fades shapes near frame center (the face zone); 0 = off. */\n readonly uCalm: number;\n};\n\n/** The `neo-memphis` shader's tunables; defaults are the \"pastel studio\" look. */\nexport const NEO_MEMPHIS_CONTROLS: readonly UniformControl[] = [\n { name: 'uBgColor', kind: 'color', default: [0.96, 0.94, 0.89], doc: 'Field color.' },\n { name: 'uColorA', kind: 'color', default: [0.16, 0.62, 0.56], doc: 'Shape palette color 1.' },\n { name: 'uColorB', kind: 'color', default: [0.91, 0.45, 0.45], doc: 'Shape palette color 2.' },\n { name: 'uColorC', kind: 'color', default: [0.27, 0.32, 0.55], doc: 'Shape palette color 3.' },\n {\n name: 'uScale',\n kind: 'float',\n default: 4,\n min: 2,\n max: 10,\n step: 0.5,\n doc: 'Hero-grid cells across frame height.',\n },\n {\n name: 'uDensity',\n kind: 'float',\n default: 0.6,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Probability a cell draws; busy-ness.',\n },\n {\n name: 'uOutline',\n kind: 'float',\n default: 0.4,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Share of outlined vs filled shapes.',\n },\n {\n name: 'uDrift',\n kind: 'float',\n default: 0.5,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Scroll + spin rate; 0 freezes.',\n },\n {\n name: 'uCalm',\n kind: 'float',\n default: 0,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Fades shapes at frame center (face zone).',\n },\n];\n"]}
@@ -6,7 +6,15 @@ export type PresetControlPanelProps<P extends KaleidoscopePresetBook> = {
6
6
  readonly value: (keyof P & string) | null;
7
7
  /** Routed to the host, which applies it via `kaleidoscope(value, [patch])`. */
8
8
  readonly onPatch: KaleidoscopeControls['onPatch'];
9
+ /**
10
+ * Per-layer uniform overrides (e.g. a persisted selection's stored patches)
11
+ * merged over the preset's baked uniforms when the forms seed. Seed-time
12
+ * only: the forms re-seed on a preset switch, not when this prop changes
13
+ * mid-mount, so hosts restoring persisted patches should mount the panel
14
+ * after hydration.
15
+ */
16
+ readonly patches?: KaleidoscopeControls['uniforms'];
9
17
  readonly disabled?: boolean;
10
18
  };
11
- export declare function PresetControlPanel<P extends KaleidoscopePresetBook>({ presets, value, onPatch, disabled, }: PresetControlPanelProps<P>): ReactElement | null;
19
+ export declare function PresetControlPanel<P extends KaleidoscopePresetBook>({ presets, value, onPatch, patches, disabled, }: PresetControlPanelProps<P>): ReactElement | null;
12
20
  //# sourceMappingURL=preset-control-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preset-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/preset-control-panel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,sBAAsB,IAAI;IACtE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,sBAAsB,EAAE,EACnE,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAgB,GACjB,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,IAAI,CAoBlD"}
1
+ {"version":3,"file":"preset-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/preset-control-panel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,sBAAsB,IAAI;IACtE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,sBAAsB,EAAE,EACnE,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAgB,GACjB,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,IAAI,CAwBlD"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PresetControlPanel = PresetControlPanel;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const scope_1 = require("../form/scope");
6
- function PresetControlPanel({ presets, value, onPatch, disabled = false, }) {
6
+ function PresetControlPanel({ presets, value, onPatch, patches, disabled = false, }) {
7
7
  if (value === null)
8
8
  return null;
9
9
  const preset = presets[value];
@@ -11,11 +11,15 @@ function PresetControlPanel({ presets, value, onPatch, disabled = false, }) {
11
11
  if (!Controls)
12
12
  return null;
13
13
  // Per-layer baked uniforms keyed by id, for the controls component to seed each
14
- // layer's ControlForm. Only tunable layers carry uniforms.
14
+ // layer's ControlForm. Only tunable layers carry uniforms; stored overrides
15
+ // merge over the baked values so restored tweaks appear in the forms.
15
16
  const uniforms = {};
16
17
  for (const layer of preset.layers) {
17
18
  if ('uniforms' in layer) {
18
- uniforms[layer.id] = { ...layer.uniforms };
19
+ uniforms[layer.id] = {
20
+ ...layer.uniforms,
21
+ ...patches?.[layer.id],
22
+ };
19
23
  }
20
24
  }
21
25
  return ((0, jsx_runtime_1.jsx)(scope_1.ControlScopeContext.Provider, { value: value, children: (0, jsx_runtime_1.jsx)(Controls, { uniforms: uniforms, onPatch: onPatch, disabled: disabled }, value) }));
@@ -1 +1 @@
1
- {"version":3,"file":"preset-control-panel.js","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/preset-control-panel.tsx"],"names":[],"mappings":";;;;AAWA,yCAAoD;AAWpD,4BAAqE,EACnE,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,KAAK,GACW;IAC3B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3B,gFAAgF;IAChF,2DAA2D;IAC3D,MAAM,QAAQ,GAA+D,EAAE,CAAC;IAChF,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAgD,CAAC;QAC3F,CAAC;IACH,CAAC;IAED,OAAO,CACL,uBAAC,2BAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACxC,uBAAC,QAAQ,IAAa,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,IAA/D,KAAK,CAA8D,GACrD,CAChC,CAAC;AACJ,CAAC","sourcesContent":["// PresetControlPanel: the thin, controlled editor. For the active preset it\n// renders that preset's `controls` component (keyed by preset id, so a switch\n// remounts and the ControlForms re-seed), handing it the per-layer baked\n// uniforms and a single shared onPatch. It never calls `kaleidoscope` itself;\n// the host routes onPatch into `kaleidoscope(activeId, [patch])`.\n\nimport type { ReactElement } from 'react';\nimport type {\n KaleidoscopeControls,\n KaleidoscopePresetBook,\n} from '../../kaleidoscope.preset-book.types';\nimport { ControlScopeContext } from '../form/scope';\n\nexport type PresetControlPanelProps<P extends KaleidoscopePresetBook> = {\n readonly presets: P;\n /** The active preset id, or null when nothing is selected. */\n readonly value: (keyof P & string) | null;\n /** Routed to the host, which applies it via `kaleidoscope(value, [patch])`. */\n readonly onPatch: KaleidoscopeControls['onPatch'];\n readonly disabled?: boolean;\n};\n\nexport function PresetControlPanel<P extends KaleidoscopePresetBook>({\n presets,\n value,\n onPatch,\n disabled = false,\n}: PresetControlPanelProps<P>): ReactElement | null {\n if (value === null) return null;\n const preset = presets[value];\n const Controls = preset?.controls;\n if (!Controls) return null;\n\n // Per-layer baked uniforms keyed by id, for the controls component to seed each\n // layer's ControlForm. Only tunable layers carry uniforms.\n const uniforms: Record<string, Record<string, number | readonly number[]>> = {};\n for (const layer of preset.layers) {\n if ('uniforms' in layer) {\n uniforms[layer.id] = { ...layer.uniforms } as Record<string, number | readonly number[]>;\n }\n }\n\n return (\n <ControlScopeContext.Provider value={value}>\n <Controls key={value} uniforms={uniforms} onPatch={onPatch} disabled={disabled} />\n </ControlScopeContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"preset-control-panel.js","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/preset-control-panel.tsx"],"names":[],"mappings":";;;;AAWA,yCAAoD;AAmBpD,4BAAqE,EACnE,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,GAAG,KAAK,GACW;IAC3B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3B,gFAAgF;IAChF,4EAA4E;IAC5E,sEAAsE;IACtE,MAAM,QAAQ,GAA+D,EAAE,CAAC;IAChF,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG;gBACnB,GAAG,KAAK,CAAC,QAAQ;gBACjB,GAAG,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;aACuB,CAAC;QAClD,CAAC;IACH,CAAC;IAED,OAAO,CACL,uBAAC,2BAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACxC,uBAAC,QAAQ,IAAa,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,IAA/D,KAAK,CAA8D,GACrD,CAChC,CAAC;AACJ,CAAC","sourcesContent":["// PresetControlPanel: the thin, controlled editor. For the active preset it\n// renders that preset's `controls` component (keyed by preset id, so a switch\n// remounts and the ControlForms re-seed), handing it the per-layer baked\n// uniforms and a single shared onPatch. It never calls `kaleidoscope` itself;\n// the host routes onPatch into `kaleidoscope(activeId, [patch])`.\n\nimport type { ReactElement } from 'react';\nimport type {\n KaleidoscopeControls,\n KaleidoscopePresetBook,\n} from '../../kaleidoscope.preset-book.types';\nimport { ControlScopeContext } from '../form/scope';\n\nexport type PresetControlPanelProps<P extends KaleidoscopePresetBook> = {\n readonly presets: P;\n /** The active preset id, or null when nothing is selected. */\n readonly value: (keyof P & string) | null;\n /** Routed to the host, which applies it via `kaleidoscope(value, [patch])`. */\n readonly onPatch: KaleidoscopeControls['onPatch'];\n /**\n * Per-layer uniform overrides (e.g. a persisted selection's stored patches)\n * merged over the preset's baked uniforms when the forms seed. Seed-time\n * only: the forms re-seed on a preset switch, not when this prop changes\n * mid-mount, so hosts restoring persisted patches should mount the panel\n * after hydration.\n */\n readonly patches?: KaleidoscopeControls['uniforms'];\n readonly disabled?: boolean;\n};\n\nexport function PresetControlPanel<P extends KaleidoscopePresetBook>({\n presets,\n value,\n onPatch,\n patches,\n disabled = false,\n}: PresetControlPanelProps<P>): ReactElement | null {\n if (value === null) return null;\n const preset = presets[value];\n const Controls = preset?.controls;\n if (!Controls) return null;\n\n // Per-layer baked uniforms keyed by id, for the controls component to seed each\n // layer's ControlForm. Only tunable layers carry uniforms; stored overrides\n // merge over the baked values so restored tweaks appear in the forms.\n const uniforms: Record<string, Record<string, number | readonly number[]>> = {};\n for (const layer of preset.layers) {\n if ('uniforms' in layer) {\n uniforms[layer.id] = {\n ...layer.uniforms,\n ...patches?.[layer.id],\n } as Record<string, number | readonly number[]>;\n }\n }\n\n return (\n <ControlScopeContext.Provider value={value}>\n <Controls key={value} uniforms={uniforms} onPatch={onPatch} disabled={disabled} />\n </ControlScopeContext.Provider>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/kaleidoscope/controls.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAsB,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAkB,MAAM,SAAS,CAAC;AAE5F,uEAAuE;AACvE,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,gBAAgB,CAAC;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAA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AEV;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAiB5C,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,sBAAsB,aAClD,gBAAgB,wBACL,uBAAuB,CAAC,CAAC,CAAC,aACrC,SAAS,WACX,OAAO,oBACE,gBAAgB,sBACd,kBAAkB,KACrC,mBAAmB,CAAC,CAAC,CA6DvB,CAAC"}
@@ -65,10 +65,13 @@ const createControls = (baseTrack, { presets, onTrack }, reconcile, setMask, set
65
65
  // Switch the preset (or clear): rebuild. Drop every live override first so
66
66
  // a reused layer id (e.g. 'blur', shared by the low/medium/high blur
67
67
  // presets) takes the new preset's baked uniforms instead of carrying a
68
- // stale slider override across. A transform rebuild does NOT pass through
69
- // here, so slider tweaks survive flips/rotations of the active preset.
68
+ // stale slider override across. Patches given WITH the switch (e.g. a
69
+ // persisted selection's overrides) merge into the rebuilt stack itself,
70
+ // so they land on every platform, native included. A transform rebuild
71
+ // does NOT pass through here, so slider tweaks survive flips/rotations
72
+ // of the active preset.
70
73
  activeId = cmd;
71
- art = cmd == null ? null : (0, shader_to_spec_1.compositeToEffectSpec)(presets[cmd]);
74
+ art = cmd == null ? null : (0, shader_to_spec_1.compositeToEffectSpec)(presets[cmd], patches);
72
75
  resetLayerUniforms();
73
76
  apply();
74
77
  },
@@ -1 +1 @@
1
- {"version":3,"file":"controls.js","sourceRoot":"","sources":["../../../src/kaleidoscope/controls.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,gEAAgE;AAChE,EAAE;AACF,+EAA+E;AAC/E,uEAAuE;AACvE,iFAAiF;AACjF,mDAAmD;;;AAInD,qDAAyD;AA6BzD,6EAA6E;AAC7E,iFAAiF;AACjF,+DAA+D;AAC/D,MAAM,kBAAkB,GAAG,CAAC,CAAkB,EAAgB,EAAE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AO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,SAAS,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,cAAc,GAAd,cAAc,CAiEzB","sourcesContent":["// The three-verb controls: shared composite-state machine, platform-agnostic.\n//\n// Holds the art effect (one composite) and the transform op list, reconciles\n// them into an ordered EffectSpec array (art FIRST so segmentation sees the\n// upright frame, transform LAST so it reorients the finished composite), and\n// applies them through an injected platform `reconcile`. Web rebuilds the\n// pipeline and yields a new track (disposing the prior one); native mutates in\n// place. `mask` writes the segmentation edge through an injected `setMask`; the\n// running composite reads it per frame, so it needs no rebuild.\n//\n// The art verb is rebuild-aware: switching to a different preset rebuilds, but\n// patching the currently-active preset routes through an injected live\n// layer-uniform channel (`setLayerUniforms`, keyed by layer id) so a slider drag\n// updates the running composite without a rebuild.\n\nimport type { KaleidoscopePreset, KaleidoscopePresetBook } from '../kaleidoscope.preset-book.types';\nimport type { EffectSpec, TransformName } from './effect.types';\nimport { compositeToEffectSpec } from './shader-to-spec';\nimport type { KaleidoscopeBinding, KaleidoscopeBindOptions, TransformInput } from './types';\n\n/** Apply the ordered specs to the base track and return the output. */\nexport type Reconcile = {\n apply: (specs: ReadonlyArray<EffectSpec>) => MediaStreamTrack;\n dispose: () => void;\n};\n\n/** Write the segmentation mask edge (platform tuning channel). */\nexport type SetMask = (hardness: number, threshold: number) => void;\n\n/**\n * Write a live per-layer uniform override (platform tuning channel), keyed by\n * layer id. The running composite merges these over the layer's baked uniforms\n * each frame, with no rebuild. Mirrors `setMask`.\n */\nexport type SetLayerUniforms = (\n id: string,\n uniforms: Readonly<Record<string, number | readonly number[]>>,\n) => void;\n\n/**\n * Drop every live per-layer override (platform tuning channel). A preset switch\n * calls this so a reused layer id reverts to the new preset's baked uniforms\n * rather than inheriting a stale override from the prior preset.\n */\nexport type ResetLayerUniforms = () => void;\n\n// Decompose an absolute transform into the discrete ops the pipeline already\n// runs (reused on web and native). Flips first, then rotation; rotation snaps to\n// the nearest 90°. 180° is two CW steps; 270° is one CCW step.\nconst decomposeTransform = (t?: TransformInput): EffectSpec[] => {\n if (!t) return [];\n const names: TransformName[] = [];\n if (t.flip?.x) names.push('flip-x');\n if (t.flip?.y) names.push('flip-y');\n const deg = (((Math.round((t.rotate ?? 0) / 90) * 90) % 360) + 360) % 360;\n if (deg === 90) names.push('rotate-cw');\n else if (deg === 180) names.push('rotate-cw', 'rotate-cw');\n else if (deg === 270) names.push('rotate-ccw');\n return names.map((name) => ({ name }));\n};\n\nexport const createControls = <P extends KaleidoscopePresetBook>(\n baseTrack: MediaStreamTrack,\n { presets, onTrack }: KaleidoscopeBindOptions<P>,\n reconcile: Reconcile,\n setMask: SetMask,\n setLayerUniforms: SetLayerUniforms,\n resetLayerUniforms: ResetLayerUniforms,\n): KaleidoscopeBinding<P> => {\n let art: EffectSpec | null = null;\n let transformOps: EffectSpec[] = [];\n let current = baseTrack;\n // The id of the active preset (null when cleared). A patch of THIS id routes\n // through the live channel; any other cmd rebuilds.\n let activeId: keyof P | null = null;\n\n const apply = (): void => {\n const specs: EffectSpec[] = [];\n if (art) specs.push(art);\n specs.push(...transformOps);\n current = reconcile.apply(specs);\n onTrack?.(current);\n };\n\n return {\n kaleidoscope: (\n cmd: keyof P | null,\n patches?: ReadonlyArray<{\n readonly id: string;\n readonly uniforms: Readonly<Record<string, number | readonly number[]>>;\n }>,\n ) => {\n // Patch the currently-active preset: route through the live no-rebuild\n // channel, keyed by layer id. The `shader` field on a patch is only for\n // narrowing; the channel resolves by `id`.\n if (cmd != null && cmd === activeId && patches && patches.length > 0) {\n for (const patch of patches) {\n setLayerUniforms(patch.id, patch.uniforms);\n }\n return;\n }\n // Switch the preset (or clear): rebuild. Drop every live override first so\n // a reused layer id (e.g. 'blur', shared by the low/medium/high blur\n // presets) takes the new preset's baked uniforms instead of carrying a\n // stale slider override across. A transform rebuild does NOT pass through\n // here, so slider tweaks survive flips/rotations of the active preset.\n activeId = cmd;\n art = cmd == null ? null : compositeToEffectSpec(presets[cmd] as KaleidoscopePreset);\n resetLayerUniforms();\n apply();\n },\n transform: (t) => {\n transformOps = decomposeTransform(t);\n apply();\n },\n mask: (m) => {\n // Updates the edge the per-frame composite reads; no pipeline rebuild.\n setMask(m.hardness, m.threshold);\n },\n get track() {\n return current;\n },\n dispose: () => {\n reconcile.dispose();\n },\n };\n};\n"]}
1
+ {"version":3,"file":"controls.js","sourceRoot":"","sources":["../../../src/kaleidoscope/controls.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,gEAAgE;AAChE,EAAE;AACF,+EAA+E;AAC/E,uEAAuE;AACvE,iFAAiF;AACjF,mDAAmD;;;AAInD,qDAAyD;AA6BzD,6EAA6E;AAC7E,iFAAiF;AACjF,+DAA+D;AAC/D,MAAM,kBAAkB,GAAG,CAAC,CAAkB,EAAgB,EAAE;IAC9D,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAClB,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IAC1E,IAAI,GAAG,KAAK,EAAE;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACnC,IA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AAC,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC7C,CAAC;gBACD,OAAO;YACT,CAAC;YACD,2EAA2E;YAC3E,qEAAqE;YACrE,uEAAuE;YACvE,sEAAsE;YACtE,wEAAwE;YACxE,uEAAuE;YACvE,uEAAuE;YACvE,wBAAwB;YACxB,QAAQ,GAAG,GAAG,CAAC;YACf,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,sCAAqB,EAAC,OAAO,CAAC,GAAG,CAAuB,EAAE,OAAO,CAAC,CAAC;YAC9F,kBAAkB,EAAE,CAAC;YACrB,KAAK,EAAE,CAAC;QACV,CAAC;QACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YACf,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;YACrC,KAAK,EAAE,CAAC;QACV,CAAC;QACD,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;YACV,uEAAuE;YACvE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,KAAK;YACP,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,SAAS,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AApEW,QAAA,cAAc,GAAd,cAAc,CAoEzB","sourcesContent":["// The three-verb controls: shared composite-state machine, platform-agnostic.\n//\n// Holds the art effect (one composite) and the transform op list, reconciles\n// them into an ordered EffectSpec array (art FIRST so segmentation sees the\n// upright frame, transform LAST so it reorients the finished composite), and\n// applies them through an injected platform `reconcile`. Web rebuilds the\n// pipeline and yields a new track (disposing the prior one); native mutates in\n// place. `mask` writes the segmentation edge through an injected `setMask`; the\n// running composite reads it per frame, so it needs no rebuild.\n//\n// The art verb is rebuild-aware: switching to a different preset rebuilds, but\n// patching the currently-active preset routes through an injected live\n// layer-uniform channel (`setLayerUniforms`, keyed by layer id) so a slider drag\n// updates the running composite without a rebuild.\n\nimport type { KaleidoscopePreset, KaleidoscopePresetBook } from '../kaleidoscope.preset-book.types';\nimport type { EffectSpec, TransformName } from './effect.types';\nimport { compositeToEffectSpec } from './shader-to-spec';\nimport type { KaleidoscopeBinding, KaleidoscopeBindOptions, TransformInput } from './types';\n\n/** Apply the ordered specs to the base track and return the output. */\nexport type Reconcile = {\n apply: (specs: ReadonlyArray<EffectSpec>) => MediaStreamTrack;\n dispose: () => void;\n};\n\n/** Write the segmentation mask edge (platform tuning channel). */\nexport type SetMask = (hardness: number, threshold: number) => void;\n\n/**\n * Write a live per-layer uniform override (platform tuning channel), keyed by\n * layer id. The running composite merges these over the layer's baked uniforms\n * each frame, with no rebuild. Mirrors `setMask`.\n */\nexport type SetLayerUniforms = (\n id: string,\n uniforms: Readonly<Record<string, number | readonly number[]>>,\n) => void;\n\n/**\n * Drop every live per-layer override (platform tuning channel). A preset switch\n * calls this so a reused layer id reverts to the new preset's baked uniforms\n * rather than inheriting a stale override from the prior preset.\n */\nexport type ResetLayerUniforms = () => void;\n\n// Decompose an absolute transform into the discrete ops the pipeline already\n// runs (reused on web and native). Flips first, then rotation; rotation snaps to\n// the nearest 90°. 180° is two CW steps; 270° is one CCW step.\nconst decomposeTransform = (t?: TransformInput): EffectSpec[] => {\n if (!t) return [];\n const names: TransformName[] = [];\n if (t.flip?.x) names.push('flip-x');\n if (t.flip?.y) names.push('flip-y');\n const deg = (((Math.round((t.rotate ?? 0) / 90) * 90) % 360) + 360) % 360;\n if (deg === 90) names.push('rotate-cw');\n else if (deg === 180) names.push('rotate-cw', 'rotate-cw');\n else if (deg === 270) names.push('rotate-ccw');\n return names.map((name) => ({ name }));\n};\n\nexport const createControls = <P extends KaleidoscopePresetBook>(\n baseTrack: MediaStreamTrack,\n { presets, onTrack }: KaleidoscopeBindOptions<P>,\n reconcile: Reconcile,\n setMask: SetMask,\n setLayerUniforms: SetLayerUniforms,\n resetLayerUniforms: ResetLayerUniforms,\n): KaleidoscopeBinding<P> => {\n let art: EffectSpec | null = null;\n let transformOps: EffectSpec[] = [];\n let current = baseTrack;\n // The id of the active preset (null when cleared). A patch of THIS id routes\n // through the live channel; any other cmd rebuilds.\n let activeId: keyof P | null = null;\n\n const apply = (): void => {\n const specs: EffectSpec[] = [];\n if (art) specs.push(art);\n specs.push(...transformOps);\n current = reconcile.apply(specs);\n onTrack?.(current);\n };\n\n return {\n kaleidoscope: (\n cmd: keyof P | null,\n patches?: ReadonlyArray<{\n readonly id: string;\n readonly uniforms: Readonly<Record<string, number | readonly number[]>>;\n }>,\n ) => {\n // Patch the currently-active preset: route through the live no-rebuild\n // channel, keyed by layer id. The `shader` field on a patch is only for\n // narrowing; the channel resolves by `id`.\n if (cmd != null && cmd === activeId && patches && patches.length > 0) {\n for (const patch of patches) {\n setLayerUniforms(patch.id, patch.uniforms);\n }\n return;\n }\n // Switch the preset (or clear): rebuild. Drop every live override first so\n // a reused layer id (e.g. 'blur', shared by the low/medium/high blur\n // presets) takes the new preset's baked uniforms instead of carrying a\n // stale slider override across. Patches given WITH the switch (e.g. a\n // persisted selection's overrides) merge into the rebuilt stack itself,\n // so they land on every platform, native included. A transform rebuild\n // does NOT pass through here, so slider tweaks survive flips/rotations\n // of the active preset.\n activeId = cmd;\n art = cmd == null ? null : compositeToEffectSpec(presets[cmd] as KaleidoscopePreset, patches);\n resetLayerUniforms();\n apply();\n },\n transform: (t) => {\n transformOps = decomposeTransform(t);\n apply();\n },\n mask: (m) => {\n // Updates the edge the per-frame composite reads; no pipeline rebuild.\n setMask(m.hardness, m.threshold);\n },\n get track() {\n return current;\n },\n dispose: () => {\n reconcile.dispose();\n },\n };\n};\n"]}
@@ -1,4 +1,18 @@
1
1
  import type { KaleidoscopePreset } from '../kaleidoscope.preset-book.types';
2
2
  import type { EffectSpec } from './effect.types';
3
- export declare const compositeToEffectSpec: (composite: KaleidoscopePreset) => EffectSpec;
3
+ /** The patch wire shape (layer id + partial uniforms), as the verb receives it. */
4
+ type LayerPatchInput = {
5
+ readonly id: string;
6
+ readonly uniforms: Readonly<Record<string, number | readonly number[]>>;
7
+ };
8
+ /**
9
+ * Project a composite into the spec, optionally merging per-layer uniform
10
+ * patches over the baked values (a switch-with-patches, e.g. restoring a
11
+ * persisted selection). Merging here, at the seam, is what carries the patches
12
+ * to EVERY platform: web rebuilds from these layers, and native re-sends them
13
+ * over setCompositeLayers. A patch addressing a non-tunable or unknown layer id
14
+ * is ignored.
15
+ */
16
+ export declare const compositeToEffectSpec: (composite: KaleidoscopePreset, patches?: ReadonlyArray<LayerPatchInput>) => EffectSpec;
17
+ export {};
4
18
  //# sourceMappingURL=shader-to-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shader-to-spec.d.ts","sourceRoot":"","sources":["../../../src/kaleidoscope/shader-to-spec.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,qBAAqB,cAAe,kBAAkB,KAAG,UAGpE,CAAC"}
1
+ {"version":3,"file":"shader-to-spec.d.ts","sourceRoot":"","sources":["../../../src/kaleidoscope/shader-to-spec.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,mFAAmF;AACnF,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CACzE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,cACrB,kBAAkB,YACnB,aAAa,CAAC,eAAe,CAAC,KACvC,UAaF,CAAC"}
@@ -9,9 +9,28 @@
9
9
  // blend. Transforms are not book entries; the transform verb handles them.
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.compositeToEffectSpec = void 0;
12
- const compositeToEffectSpec = (composite) => ({
13
- name: 'composite',
14
- layers: composite.layers,
15
- });
12
+ /**
13
+ * Project a composite into the spec, optionally merging per-layer uniform
14
+ * patches over the baked values (a switch-with-patches, e.g. restoring a
15
+ * persisted selection). Merging here, at the seam, is what carries the patches
16
+ * to EVERY platform: web rebuilds from these layers, and native re-sends them
17
+ * over setCompositeLayers. A patch addressing a non-tunable or unknown layer id
18
+ * is ignored.
19
+ */
20
+ const compositeToEffectSpec = (composite, patches) => {
21
+ if (!patches || patches.length === 0) {
22
+ return { name: 'composite', layers: composite.layers };
23
+ }
24
+ const byId = new Map(patches.map((patch) => [patch.id, patch.uniforms]));
25
+ return {
26
+ name: 'composite',
27
+ layers: composite.layers.map((layer) => {
28
+ const override = byId.get(layer.id);
29
+ if (!override || !('uniforms' in layer))
30
+ return layer;
31
+ return { ...layer, uniforms: { ...layer.uniforms, ...override } };
32
+ }),
33
+ };
34
+ };
16
35
  exports.compositeToEffectSpec = compositeToEffectSpec;
17
36
  //# sourceMappingURL=shader-to-spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shader-to-spec.js","sourceRoot":"","sources":["../../../src/kaleidoscope/shader-to-spec.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,iFAAiF;AACjF,8EAA8E;AAC9E,wCAAwC;AACxC,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;;;AAKpE,MAAM,qBAAqB,GAAG,CAAC,SAA6B,EAAc,EAAE,CAAC,CAAC;IACnF,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM;CACzB,CAAC,CAAC;AAHU,QAAA,qBAAqB,GAArB,qBAAqB,CAG/B","sourcesContent":["// Translate a book composite into the lower-level EffectSpec the primitive\n// `applyVideoEffects` consumes. This is the seam between the book vocabulary the\n// consumer sees and the effect the pipeline runs; the controls own the active\n// composite and reconcile through here.\n//\n// Every book entry is a composite (an ordered layer stack), so this is a thin\n// projection: the layers already carry their own ids, sources, uniforms, and\n// blend. Transforms are not book entries; the transform verb handles them.\n\nimport type { KaleidoscopePreset } from '../kaleidoscope.preset-book.types';\nimport type { EffectSpec } from './effect.types';\n\nexport const compositeToEffectSpec = (composite: KaleidoscopePreset): EffectSpec => ({\n name: 'composite',\n layers: composite.layers,\n});\n"]}
1
+ {"version":3,"file":"shader-to-spec.js","sourceRoot":"","sources":["../../../src/kaleidoscope/shader-to-spec.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,iFAAiF;AACjF,8EAA8E;AAC9E,wCAAwC;AACxC,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;;;AAW3E;;;;;;;GAOG;AACI,MAAM,qBAAqB,GAAG,CACnC,SAA6B,EAC7B,OAAwC,EAC5B,EAAE;IACd,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;IACzD,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACzE,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAC;YACtD,OAAO,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,QAAQ,EAAE,EAAuB,CAAC;QACzF,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,qBAAqB,GAArB,qBAAqB,CAgBhC","sourcesContent":["// Translate a book composite into the lower-level EffectSpec the primitive\n// `applyVideoEffects` consumes. This is the seam between the book vocabulary the\n// consumer sees and the effect the pipeline runs; the controls own the active\n// composite and reconcile through here.\n//\n// Every book entry is a composite (an ordered layer stack), so this is a thin\n// projection: the layers already carry their own ids, sources, uniforms, and\n// blend. Transforms are not book entries; the transform verb handles them.\n\nimport type { KaleidoscopeLayer, KaleidoscopePreset } from '../kaleidoscope.preset-book.types';\nimport type { EffectSpec } from './effect.types';\n\n/** The patch wire shape (layer id + partial uniforms), as the verb receives it. */\ntype LayerPatchInput = {\n readonly id: string;\n readonly uniforms: Readonly<Record<string, number | readonly number[]>>;\n};\n\n/**\n * Project a composite into the spec, optionally merging per-layer uniform\n * patches over the baked values (a switch-with-patches, e.g. restoring a\n * persisted selection). Merging here, at the seam, is what carries the patches\n * to EVERY platform: web rebuilds from these layers, and native re-sends them\n * over setCompositeLayers. A patch addressing a non-tunable or unknown layer id\n * is ignored.\n */\nexport const compositeToEffectSpec = (\n composite: KaleidoscopePreset,\n patches?: ReadonlyArray<LayerPatchInput>,\n): EffectSpec => {\n if (!patches || patches.length === 0) {\n return { name: 'composite', layers: composite.layers };\n }\n const byId = new Map(patches.map((patch) => [patch.id, patch.uniforms]));\n return {\n name: 'composite',\n layers: composite.layers.map((layer) => {\n const override = byId.get(layer.id);\n if (!override || !('uniforms' in layer)) return layer;\n return { ...layer, uniforms: { ...layer.uniforms, ...override } } as KaleidoscopeLayer;\n }),\n };\n};\n"]}
@@ -58,7 +58,9 @@ export type KaleidoscopeBindOptions<P extends KaleidoscopePresetBook> = {
58
58
  * The art verb: select a composite by id (rebuilding the pipeline), or clear it
59
59
  * with `null`. When `cmd` is the currently-active preset id and `patches` is
60
60
  * given, the patches merge through the live no-rebuild uniform channel (keyed by
61
- * layer id) instead of rebuilding, so a slider drag stays smooth.
61
+ * layer id) instead of rebuilding, so a slider drag stays smooth. On a preset
62
+ * SWITCH, patches merge into the rebuilt layer stack itself, so a restored
63
+ * selection lands tuned on every platform, native included.
62
64
  */
63
65
  type KaleidoscopeCommand<P extends KaleidoscopePresetBook> = <K extends keyof P>(cmd: K | null, patches?: PatchesFor<P, K>) => void;
64
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/kaleidoscope/types.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,MAAM,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,mBAAmB,CAAC;CACtD,GACG;IAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,GACpE,KAAK,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,sBAAsB,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,aAAa,CACzF,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CACjC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,oCA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