@webmate-studio/builder 0.2.142 → 0.2.144

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": "@webmate-studio/builder",
3
- "version": "0.2.142",
3
+ "version": "0.2.144",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
@@ -139,8 +139,11 @@ function generateColorVariables(t, lines) {
139
139
  if (mapping.bgSubtle) lines.push(` --color-${world}-bg-subtle: var(--color-${world}-${mapping.bgSubtle});`);
140
140
  if (mapping.bgSubtleHover) lines.push(` --color-${world}-bg-subtle-hover: var(--color-${world}-${mapping.bgSubtleHover});`);
141
141
  if (mapping.text) lines.push(` --color-${world}-text: var(--color-${world}-${mapping.text});`);
142
+ if (mapping.textHover) lines.push(` --color-${world}-text-hover: var(--color-${world}-${mapping.textHover});`);
142
143
  if (mapping.border) lines.push(` --color-${world}-border: var(--color-${world}-${mapping.border});`);
143
- if (mapping.ring) lines.push(` --color-${world}-ring: var(--color-${world}-${mapping.ring});`);
144
+ if (mapping.borderHover) lines.push(` --color-${world}-border-hover: var(--color-${world}-${mapping.borderHover});`);
145
+ // ring zeigt auf border (kein eigenes Mapping nötig)
146
+ lines.push(` --color-${world}-ring: var(--color-${world}-border);`);
144
147
  }
145
148
  }
146
149
 
@@ -200,8 +203,10 @@ function generateColorUtilities(t) {
200
203
  { cls: `bg-${world}-subtle`, prop: 'background-color', varRef: `--color-${world}-bg-subtle` },
201
204
  { cls: `bg-${world}-subtle-hover`, prop: 'background-color', varRef: `--color-${world}-bg-subtle-hover` },
202
205
  { cls: `text-${world}`, prop: 'color', varRef: `--color-${world}-text` },
206
+ { cls: `text-${world}-hover`, prop: 'color', varRef: `--color-${world}-text-hover` },
203
207
  { cls: `text-on-${world}`, prop: 'color', varRef: `--color-on-${world}` },
204
208
  { cls: `border-${world}`, prop: 'border-color', varRef: `--color-${world}-border` },
209
+ { cls: `border-${world}-hover`, prop: 'border-color', varRef: `--color-${world}-border-hover` },
205
210
  { cls: `ring-${world}`, prop: '--tw-ring-color', varRef: `--color-${world}-ring` },
206
211
  { cls: `border-on-${world}`, prop: 'border-color', varRef: `--color-on-${world}` },
207
212
  ];
@@ -360,13 +360,18 @@ function computeChroma(stepL, baseL, baseC, stdDev, chromaScale) {
360
360
  gaussian = 0.97 * Math.exp((-12 / stdDev) * edgeDiff * edgeDiff);
361
361
  }
362
362
 
363
- // Lightness-Begrenzung: Asymmetrisch
364
- // Helle Seite (L > 0.85): Chroma fällt steil auf 0 → Steps 1-2 bleiben fast weiß
365
- // Dunkle Seite (L < 0.3): Chroma fällt moderat Steps 11-12 behalten Farbton
366
- // Mitte (0.3-0.85): Nahezu volle Chroma möglich
363
+ // Lightness-Begrenzung: Asymmetrisch + Chroma-abhängig
364
+ // Bei hochgesättigten Farben (Grün, Cyan) wirken schon kleine Chroma-Werte
365
+ // bei hoher Lightness "neonig". Der Einsatzpunkt wird daher bei hoher
366
+ // Base-Chroma nach unten verschoben.
367
+ // Helle Seite: Einsatz ab threshold (0.85 bei C=0, 0.75 bei C≥0.17)
368
+ // Dunkle Seite (L < 0.3): Chroma fällt moderat
369
+ // Mitte: volle Chroma möglich
370
+ const chromaFactor = Math.min(baseC / 0.17, 1.0); // 0 bei grau, 1 bei gesättigtem Grün
371
+ const lightThreshold = 0.85 - chromaFactor * 0.10; // 0.85 → 0.75
367
372
  let lightnessLimit;
368
- if (stepL > 0.85) {
369
- const t = (stepL - 0.85) / 0.15;
373
+ if (stepL > lightThreshold) {
374
+ const t = (stepL - lightThreshold) / (1.0 - lightThreshold);
370
375
  lightnessLimit = 1.0 - t * t;
371
376
  } else if (stepL < 0.3) {
372
377
  const t = stepL / 0.3;
@@ -563,9 +568,10 @@ export const DEFAULT_SEMANTIC_MAPPINGS = {
563
568
  bgSubtle: '3',
564
569
  bgSubtleHover: '4',
565
570
  text: '11',
571
+ textHover: '12',
566
572
  textOn: null, // Auto-berechnet
567
573
  border: '7',
568
- ring: '8'
574
+ borderHover: '8'
569
575
  };
570
576
 
571
577