@breadstone/mosaik-themes 0.0.220 → 0.0.222

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 (47) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/index.cjs +58 -31
  3. package/index.cjs.map +1 -1
  4. package/index.d.mts +8 -2
  5. package/index.d.ts +8 -2
  6. package/index.js +58 -32
  7. package/index.js.map +1 -1
  8. package/package.json +5 -5
  9. package/tailwind/v3/index.d.ts +7 -0
  10. package/tailwind/v3/index.d.ts.map +1 -0
  11. package/tailwind/v3/index.js +43 -0
  12. package/tailwind/v3/index.js.map +1 -0
  13. package/tailwind/v3/plugins/base/buildTailwindPlugin.d.ts +1 -0
  14. package/tailwind/v3/plugins/base/buildTailwindPlugin.d.ts.map +1 -0
  15. package/tailwind/v3/plugins/base/buildTailwindPlugin.js +147 -0
  16. package/tailwind/v3/plugins/base/buildTailwindPlugin.js.map +1 -0
  17. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.d.ts +2 -0
  18. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.d.ts.map +1 -0
  19. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.js +403 -0
  20. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.js.map +1 -0
  21. package/tailwind/v3/plugins/joyTailwindPlugin.d.ts +2 -0
  22. package/tailwind/v3/plugins/joyTailwindPlugin.d.ts.map +1 -0
  23. package/tailwind/v3/plugins/joyTailwindPlugin.js +419 -0
  24. package/tailwind/v3/plugins/joyTailwindPlugin.js.map +1 -0
  25. package/tailwind/v3/plugins/memphisTailwindPlugin.d.ts +2 -0
  26. package/tailwind/v3/plugins/memphisTailwindPlugin.d.ts.map +1 -0
  27. package/tailwind/v3/plugins/memphisTailwindPlugin.js +420 -0
  28. package/tailwind/v3/plugins/memphisTailwindPlugin.js.map +1 -0
  29. package/tailwind/v3/presets/base/buildTailwindPreset.d.ts +1 -0
  30. package/tailwind/v3/presets/base/buildTailwindPreset.d.ts.map +1 -0
  31. package/tailwind/v3/presets/base/buildTailwindPreset.js +39 -0
  32. package/tailwind/v3/presets/base/buildTailwindPreset.js.map +1 -0
  33. package/tailwind/v3/presets/cosmopolitanTailwindPresets.d.ts +2 -0
  34. package/tailwind/v3/presets/cosmopolitanTailwindPresets.d.ts.map +1 -0
  35. package/tailwind/v3/presets/cosmopolitanTailwindPresets.js +392 -0
  36. package/tailwind/v3/presets/cosmopolitanTailwindPresets.js.map +1 -0
  37. package/tailwind/v3/presets/joyTailwindPresets.d.ts +2 -0
  38. package/tailwind/v3/presets/joyTailwindPresets.d.ts.map +1 -0
  39. package/tailwind/v3/presets/joyTailwindPresets.js +408 -0
  40. package/tailwind/v3/presets/joyTailwindPresets.js.map +1 -0
  41. package/tailwind/v3/presets/memphisTailwindPresets.d.ts +2 -0
  42. package/tailwind/v3/presets/memphisTailwindPresets.d.ts.map +1 -0
  43. package/tailwind/v3/presets/memphisTailwindPresets.js +409 -0
  44. package/tailwind/v3/presets/memphisTailwindPresets.js.map +1 -0
  45. /package/tailwind/v4/{cosmopolitanTailwindPresets.css → presets/cosmopolitanTailwindPresets.css} +0 -0
  46. /package/tailwind/v4/{joyTailwindPresets.css → presets/joyTailwindPresets.css} +0 -0
  47. /package/tailwind/v4/{memphisTailwindPresets.css → presets/memphisTailwindPresets.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## 0.0.221 (2026-01-16)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **package.json:** update release version to 0.0.221 ([03ebc3de62](https://github.com/RueDeRennes/mosaik/commit/03ebc3de62))
6
+ - **package.json:** update release version to 0.0.220 ([320c50e503](https://github.com/RueDeRennes/mosaik/commit/320c50e503))
7
+
8
+ ## 0.0.220 (2026-01-15)
9
+
10
+ ### 🩹 Fixes
11
+
12
+ - **Sandbox.json): update theme import paths for consistency in SCSS usage fix(package.json:** increment release version to 0.0.219 ([57dce3aace](https://github.com/RueDeRennes/mosaik/commit/57dce3aace))
13
+ - **_index.scss:** correct theme import paths to lowercase for consistency ([2a083a7608](https://github.com/RueDeRennes/mosaik/commit/2a083a7608))
14
+
15
+ ## 0.0.218 (2026-01-15)
16
+
17
+ ### 🚀 Features
18
+
19
+ - **meter:** enhance MeterRing and MeterBar components with new styles and properties ([026b313a58](https://github.com/RueDeRennes/mosaik/commit/026b313a58))
20
+ - **badge:** enhance styling and theming for Memphis and Joy badges ([98af94984e](https://github.com/RueDeRennes/mosaik/commit/98af94984e))
21
+
22
+ ## 0.0.217 (2026-01-09)
23
+
24
+ ### 🚀 Features
25
+
26
+ - **theme:** update transition properties and add new component tokens for Joy and Memphis themes ([904888d0f5](https://github.com/RueDeRennes/mosaik/commit/904888d0f5))
27
+ - **llms:** add new components and llms plugin for documentation generation ([3c4d1ad7a1](https://github.com/RueDeRennes/mosaik/commit/3c4d1ad7a1))
28
+
29
+ ### 🩹 Fixes
30
+
31
+ - **tailwind:** update copy command for CSS presets to use cp instead of rsync ([7e75cb5b81](https://github.com/RueDeRennes/mosaik/commit/7e75cb5b81))
32
+ - **tailwind:** replace cp with rsync for copying CSS presets ([1c7ceea1d4](https://github.com/RueDeRennes/mosaik/commit/1c7ceea1d4))
33
+
1
34
  ## 0.0.216 (2026-01-04)
2
35
 
3
36
  This was a version bump only for mosaik-themes to align it with other projects, there were no code changes.
package/index.cjs CHANGED
@@ -2795,6 +2795,15 @@ exports.ThemePalette = void 0;
2795
2795
  }
2796
2796
  __name(getScheme, "getScheme");
2797
2797
  ITheme2.getScheme = getScheme;
2798
+ function getPalette(theme, mode, semanticColor) {
2799
+ const paletteEntry = theme.palette[mode][semanticColor];
2800
+ if (!exports.ThemePalette.isThemePalette(paletteEntry)) {
2801
+ throw new Error(`Palette '${semanticColor}' is not a valid theme palette for mode '${mode}'.`);
2802
+ }
2803
+ return paletteEntry;
2804
+ }
2805
+ __name(getPalette, "getPalette");
2806
+ ITheme2.getPalette = getPalette;
2798
2807
  function getSchemeColor(theme, mode, role) {
2799
2808
  const scheme = theme.scheme[mode];
2800
2809
  const color = scheme[role];
@@ -2805,15 +2814,6 @@ exports.ThemePalette = void 0;
2805
2814
  }
2806
2815
  __name(getSchemeColor, "getSchemeColor");
2807
2816
  ITheme2.getSchemeColor = getSchemeColor;
2808
- function getPalette(theme, mode, semanticColor) {
2809
- const paletteEntry = theme.palette[mode][semanticColor];
2810
- if (!exports.ThemePalette.isThemePalette(paletteEntry)) {
2811
- throw new Error(`Palette '${semanticColor}' is not a valid theme palette for mode '${mode}'.`);
2812
- }
2813
- return paletteEntry;
2814
- }
2815
- __name(getPalette, "getPalette");
2816
- ITheme2.getPalette = getPalette;
2817
2817
  function getPaletteColor(theme, mode, semanticColor, shade) {
2818
2818
  const palette = getPalette(theme, mode, semanticColor);
2819
2819
  const color = palette[shade];
@@ -2857,6 +2857,12 @@ exports.ITheme = void 0;
2857
2857
  })(exports.ThemeScheme || (exports.ThemeScheme = {}));
2858
2858
  exports.ThemeScheme = void 0;
2859
2859
 
2860
+ // src/Theming/Utils/ThemeMode.ts
2861
+ var THEME_MODES = [
2862
+ "dark",
2863
+ "light"
2864
+ ];
2865
+
2860
2866
  // src/Theming/Adapters/BrowserPlatformAdapter.ts
2861
2867
  var BrowserPlatformAdapter = class {
2862
2868
  static {
@@ -3162,35 +3168,55 @@ var MaterialThemeGeneratorStrategy = class {
3162
3168
  */
3163
3169
  generateScheme(baseColor, mode) {
3164
3170
  const baseChroma = chroma__default.default(baseColor);
3165
- const luminance = baseChroma.luminance();
3166
- const isDarkBase = luminance < 0.3;
3167
- const adjustColor = /* @__PURE__ */ __name((color, targetAmount) => {
3171
+ const baseLuminance = baseChroma.luminance();
3172
+ const adjustColor = /* @__PURE__ */ __name((color, amount, minLuminance = 0.02, maxLuminance = 0.98) => {
3168
3173
  const c = chroma__default.default(color);
3169
- const currentLuminance = c.luminance();
3170
- if (currentLuminance < 0.15 && targetAmount < 0) {
3171
- return c.brighten(Math.abs(targetAmount / 25.5)).hex();
3174
+ const factor = Math.abs(amount) / 25.5;
3175
+ let result = amount > 0 ? c.brighten(factor) : c.darken(factor);
3176
+ const resultLuminance = result.luminance();
3177
+ if (resultLuminance < minLuminance) {
3178
+ result = chroma__default.default(result).luminance(minLuminance);
3179
+ } else if (resultLuminance > maxLuminance) {
3180
+ result = chroma__default.default(result).luminance(maxLuminance);
3172
3181
  }
3173
- if (targetAmount > 0) {
3174
- return c.brighten(targetAmount / 25.5).hex();
3182
+ return result.hex();
3183
+ }, "adjustColor");
3184
+ const generateForeground = /* @__PURE__ */ __name(() => {
3185
+ if (mode === "light") {
3186
+ const darkened = baseChroma.darken(4).saturate(-0.3);
3187
+ const targetLuminance2 = Math.min(darkened.luminance(), 0.08);
3188
+ return chroma__default.default(darkened).luminance(targetLuminance2).hex();
3175
3189
  }
3176
- const darkened = c.darken(Math.abs(targetAmount / 25.5));
3177
- if (darkened.luminance() < 0.02) {
3178
- return c.brighten(Math.abs(targetAmount / 50)).hex();
3190
+ const lightened = baseChroma.brighten(4).saturate(-0.3);
3191
+ const targetLuminance = Math.max(lightened.luminance(), 0.85);
3192
+ return chroma__default.default(lightened).luminance(targetLuminance).hex();
3193
+ }, "generateForeground");
3194
+ const generateSurface = /* @__PURE__ */ __name(() => {
3195
+ if (mode === "light") {
3196
+ return baseLuminance > 0.9 ? adjustColor(baseColor, -8) : adjustColor(baseColor, 8);
3179
3197
  }
3180
- return darkened.hex();
3181
- }, "adjustColor");
3198
+ return adjustColor(baseColor, 15);
3199
+ }, "generateSurface");
3200
+ const generateHighlight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -15, 0.05, 0.95) : adjustColor(baseColor, 20, 0.05, 0.95), "generateHighlight");
3201
+ const generateMiddlelight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -30, 0.1, 0.9) : adjustColor(baseColor, 35, 0.1, 0.9), "generateMiddlelight");
3202
+ const generateLowlight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -50, 0.15, 0.85) : adjustColor(baseColor, 55, 0.15, 0.85), "generateLowlight");
3203
+ const generateDisabled = /* @__PURE__ */ __name(() => {
3204
+ const desaturated = baseChroma.desaturate(2);
3205
+ return mode === "light" ? chroma__default.default(desaturated).darken(0.5).hex() : chroma__default.default(desaturated).brighten(0.5).hex();
3206
+ }, "generateDisabled");
3207
+ const foreground = generateForeground();
3182
3208
  return {
3183
- surface: adjustColor(baseColor, mode === "dark" ? -10 : 10),
3209
+ surface: generateSurface(),
3184
3210
  background: baseColor,
3185
- foreground: adjustColor(baseColor, mode === "dark" ? 190 : -190),
3186
- highlight: adjustColor(baseColor, mode === "dark" ? 30 : -30),
3187
- middlelight: adjustColor(baseColor, isDarkBase ? 50 : -50),
3188
- lowlight: adjustColor(baseColor, isDarkBase ? 80 : -80),
3211
+ foreground,
3212
+ highlight: generateHighlight(),
3213
+ middlelight: generateMiddlelight(),
3214
+ lowlight: generateLowlight(),
3189
3215
  transparent: `${baseColor}00`,
3190
- semiTransparent: `${baseColor}aa`,
3191
- disabled: adjustColor(baseColor, isDarkBase ? 40 : -40),
3192
- contrast: adjustColor(baseColor, mode === "dark" ? 190 : -190),
3193
- selection: adjustColor(baseColor, mode === "dark" ? 30 : -30)
3216
+ semiTransparent: chroma__default.default(baseColor).alpha(0.67).hex(),
3217
+ disabled: generateDisabled(),
3218
+ contrast: foreground,
3219
+ selection: generateHighlight()
3194
3220
  };
3195
3221
  }
3196
3222
  };
@@ -3763,6 +3789,7 @@ exports.MaterialThemeGeneratorStrategy = MaterialThemeGeneratorStrategy;
3763
3789
  exports.MemphisThemeGeneratorStrategy = MemphisThemeGeneratorStrategy;
3764
3790
  exports.NodePlatformAdapter = NodePlatformAdapter;
3765
3791
  exports.PlatformAdapterFactory = PlatformAdapterFactory;
3792
+ exports.THEME_MODES = THEME_MODES;
3766
3793
  exports.TailwindThemeGeneratorStrategy = TailwindThemeGeneratorStrategy;
3767
3794
  exports.ThemeGenerator = ThemeGenerator;
3768
3795
  exports.ThemeGeneratorServiceLocator = ThemeGeneratorServiceLocator;