bluedither 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluedither",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "A bold, dithered-shader hero theme for Claude Code — skill + fine-tuner",
5
5
  "type": "module",
6
6
  "bin": {
package/skill.md CHANGED
@@ -89,13 +89,7 @@ Follow the generator's patterns for component structure, file naming, shader ini
89
89
  ## Step 6 — Inform About Fine-Tuner
90
90
 
91
91
  Tell the user:
92
- > Your BlueDither theme has been generated. To customize colors, fonts, spacing, and shader parameters visually, run:
93
- >
94
- > ```
95
- > npm run tune
96
- > ```
97
- >
98
- > Open http://localhost:3333 to see your theme with a floating customization panel.
92
+ > Your BlueDither theme has been generated with the tuner panel built in. Adjust colors, fonts, spacing, and shader parameters live, then click "Commit Changes" to save.
99
93
 
100
94
  ## CSS Custom Property Computation
101
95
 
@@ -115,7 +109,7 @@ Border radius converts directly: `px / 16` rem (no clamp).
115
109
  2. **Only content slots are editable** — never change colors, typography, spacing, shader, or opacity tokens during generation.
116
110
  3. **Two sections only** — navbar + hero. No footers, sidebars, additional sections, icons, or images.
117
111
  4. **Framework-native output** — use the framework's idioms (JSX for React, SFCs for Vue, etc.), never output raw HTML for a framework project.
118
- 5. **Shader is required** — the WebGL dithering shader must be initialized in every greenfield and hero-partial output.
112
+ 5. **Shader is required** — the WebGL dithering shader must be initialized in every greenfield and hero-partial output. **Always assign the mount to `window.__BD_SHADER__`** so the tuner can update shader params live.
119
113
  6. **CSS namespace** — all custom properties use `--bd-*` prefix. All classes use `bd-*` prefix.
120
114
  7. **Headline is 2 lines max**, ALL CAPS, 4-6 words.
121
115
  8. **Exactly 4 nav items.**
@@ -41,7 +41,7 @@ Navbar component with logo, nav items, and CTA.
41
41
  ### `BlueDitherHero.jsx`
42
42
  Hero section with shader and text content.
43
43
 
44
- - **Shader initialization**: Use `useEffect` + `useRef` for the shader parent div:
44
+ - **Shader initialization**: Use `useEffect` + `useRef` for the shader parent div. **CRITICAL**: Assign the mount to `window.__BD_SHADER__` so the tuner can update shader params live:
45
45
  ```jsx
46
46
  import { useEffect, useRef } from 'react';
47
47
 
@@ -51,7 +51,8 @@ useEffect(() => {
51
51
  // Dynamic import to avoid SSR issues
52
52
  import('./paper-shaders-bundle.js').then(({ ShaderMount, ditheringFragmentShader, getShaderColorFromString }) => {
53
53
  const mount = new ShaderMount(shaderRef.current, ditheringFragmentShader, uniforms, opts, speed, 0, 2);
54
- return () => mount.dispose();
54
+ window.__BD_SHADER__ = mount;
55
+ return () => { mount.dispose(); window.__BD_SHADER__ = null; };
55
56
  });
56
57
  }, []);
57
58
  ```
@@ -62,10 +62,12 @@ Hero section with shader initialization using `onMount`:
62
62
  onMount(async () => {
63
63
  const { ShaderMount, ditheringFragmentShader, getShaderColorFromString } = await import('./paper-shaders-bundle.js');
64
64
  shaderMount = new ShaderMount(shaderParent, ditheringFragmentShader, uniforms, opts, speed, 0, 2);
65
+ window.__BD_SHADER__ = shaderMount;
65
66
  });
66
67
 
67
68
  onDestroy(() => {
68
69
  shaderMount?.dispose();
70
+ window.__BD_SHADER__ = null;
69
71
  });
70
72
  </script>
71
73
 
@@ -32,9 +32,13 @@ URL-encode the font family name.
32
32
 
33
33
  Copy `theme/shaders/bluedither-shader.js` and `theme/shaders/paper-shaders-bundle.js` to the target project.
34
34
 
35
- Import and initialize inline:
35
+ Import and initialize inline. **CRITICAL**: Assign to `window.__BD_SHADER__` so the tuner can update shader params live:
36
36
  ```js
37
37
  import { ShaderMount, ditheringFragmentShader, getShaderColorFromString } from './paper-shaders-bundle.js';
38
+
39
+ // After creating the mount:
40
+ const mount = new ShaderMount(parent, ditheringFragmentShader, uniforms, opts, speed, 0, 2);
41
+ window.__BD_SHADER__ = mount;
38
42
  ```
39
43
 
40
44
  Map shader tokens to uniforms as shown in `template/index.html`'s existing `<script type="module">` block.
@@ -66,10 +66,12 @@ let shaderMount = null;
66
66
  onMounted(async () => {
67
67
  const { ShaderMount, ditheringFragmentShader, getShaderColorFromString } = await import('./paper-shaders-bundle.js');
68
68
  shaderMount = new ShaderMount(shaderParent.value, ditheringFragmentShader, uniforms, opts, speed, 0, 2);
69
+ window.__BD_SHADER__ = shaderMount;
69
70
  });
70
71
 
71
72
  onUnmounted(() => {
72
73
  shaderMount?.dispose();
74
+ window.__BD_SHADER__ = null;
73
75
  });
74
76
  </script>
75
77