bluedither 1.0.19 → 1.0.20

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.
@@ -10,6 +10,10 @@
10
10
  */
11
11
 
12
12
  (async function () {
13
+ // Prevent double-init (React StrictMode re-fires effects in dev)
14
+ if (window.__BD_INJECT_LOADED__) return;
15
+ window.__BD_INJECT_LOADED__ = true;
16
+
13
17
  // Find the base path to bluedither/ directory
14
18
  const scriptEl = document.currentScript;
15
19
  const scriptSrc = scriptEl?.src || '';
@@ -9,6 +9,10 @@
9
9
  * - Real-time shader parameter updates
10
10
  */
11
11
 
12
+ // Prevent double-init (React StrictMode re-fires effects in dev)
13
+ if (!window.__BD_TUNER_LOADED__) {
14
+ window.__BD_TUNER_LOADED__ = true;
15
+
12
16
  const tokens = structuredClone(
13
17
  window.__BD_TOKENS__ ||
14
18
  JSON.parse(document.querySelector('script[type="application/json"][data-bluedither-tokens]')?.textContent || '{}')
@@ -341,17 +345,17 @@ function addSegmented(section, label, tokenPath, options, extraCb) {
341
345
 
342
346
  // ── Colors ──
343
347
  const colorsSection = addSection('Colors');
344
- addColor(colorsSection, 'Background', 'colors.background', '--bd-color-background');
348
+ addColor(colorsSection, 'Background', 'colors.background', '--bd-bg');
345
349
  // Shader Front is declared first (but appended later) so Primary can reference it
346
350
  let shaderFrontHandle;
347
- addColor(colorsSection, 'Primary', 'colors.primary', '--bd-color-primary', (v) => {
351
+ addColor(colorsSection, 'Primary', 'colors.primary', '--bd-primary', (v) => {
348
352
  // Sync shader front color: update token, UI, and live shader
349
353
  shaderFrontHandle.setValue(v);
350
354
  updateShader('colorFront', v);
351
355
  });
352
- addColor(colorsSection, 'Text', 'colors.text', '--bd-color-text');
353
- addColor(colorsSection, 'CTA Background', 'colors.ctaBackground', '--bd-color-cta-bg');
354
- addColor(colorsSection, 'CTA Text', 'colors.ctaText', '--bd-color-cta-text');
356
+ addColor(colorsSection, 'Text', 'colors.text', '--bd-text');
357
+ addColor(colorsSection, 'CTA Background', 'colors.ctaBackground', '--bd-cta-bg');
358
+ addColor(colorsSection, 'CTA Text', 'colors.ctaText', '--bd-cta-text');
355
359
  shaderFrontHandle = addColor(colorsSection, 'Shader Front', 'colors.shaderFront', null, (v) => updateShader('colorFront', v));
356
360
 
357
361
  // ── Typography ──
@@ -360,8 +364,8 @@ addFontDropdown(typoSection, 'Primary Font', 'typography.primaryFont', '--bd-fon
360
364
  addFontDropdown(typoSection, 'Secondary Font', 'typography.secondaryFont', '--bd-font-secondary');
361
365
  addPxField(typoSection, 'Headline Size', 'typography.headline.referencePx', 32, 300, 1, '--bd-headline-size');
362
366
  addPxField(typoSection, 'Headline LH', 'typography.headline.lineHeightPx', 24, 280, 1, '--bd-headline-lh');
363
- addPxField(typoSection, 'Sub Size', 'typography.subHeadline.referencePx', 10, 48, 1, '--bd-subheadline-size');
364
- addPxField(typoSection, 'Sub LH', 'typography.subHeadline.lineHeightPx', 12, 80, 1, '--bd-subheadline-lh');
367
+ addPxField(typoSection, 'Sub Size', 'typography.subHeadline.referencePx', 10, 48, 1, '--bd-sub-size');
368
+ addPxField(typoSection, 'Sub LH', 'typography.subHeadline.lineHeightPx', 12, 80, 1, '--bd-sub-lh');
365
369
  addPxField(typoSection, 'Logo Size', 'typography.logo.referencePx', 12, 80, 1, '--bd-logo-size');
366
370
  addPxField(typoSection, 'Nav Size', 'typography.navItem.referencePx', 10, 48, 1, '--bd-nav-size');
367
371
 
@@ -499,3 +503,4 @@ commitBtn.onclick = async () => {
499
503
  }
500
504
  };
501
505
  panel.appendChild(commitBtn);
506
+ } // end guard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluedither",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "A bold, dithered-shader hero theme for Claude Code — skill + fine-tuner",
5
5
  "type": "module",
6
6
  "bin": {