@breadstone/mosaik-themes 0.0.221 → 0.0.223

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 (51) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/_index.scss +1 -1
  3. package/index.cjs +63 -31
  4. package/index.cjs.map +1 -1
  5. package/index.d.mts +119 -72
  6. package/index.d.ts +119 -72
  7. package/index.js +63 -32
  8. package/index.js.map +1 -1
  9. package/package.json +5 -5
  10. package/tailwind/v3/index.d.ts +7 -0
  11. package/tailwind/v3/index.d.ts.map +1 -0
  12. package/tailwind/v3/index.js +43 -0
  13. package/tailwind/v3/index.js.map +1 -0
  14. package/tailwind/v3/plugins/base/buildTailwindPlugin.d.ts +1 -0
  15. package/tailwind/v3/plugins/base/buildTailwindPlugin.d.ts.map +1 -0
  16. package/tailwind/v3/plugins/base/buildTailwindPlugin.js +147 -0
  17. package/tailwind/v3/plugins/base/buildTailwindPlugin.js.map +1 -0
  18. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.d.ts +2 -0
  19. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.d.ts.map +1 -0
  20. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.js +403 -0
  21. package/tailwind/v3/plugins/cosmopolitanTailwindPlugin.js.map +1 -0
  22. package/tailwind/v3/plugins/joyTailwindPlugin.d.ts +2 -0
  23. package/tailwind/v3/plugins/joyTailwindPlugin.d.ts.map +1 -0
  24. package/tailwind/v3/plugins/joyTailwindPlugin.js +419 -0
  25. package/tailwind/v3/plugins/joyTailwindPlugin.js.map +1 -0
  26. package/tailwind/v3/plugins/memphisTailwindPlugin.d.ts +2 -0
  27. package/tailwind/v3/plugins/memphisTailwindPlugin.d.ts.map +1 -0
  28. package/tailwind/v3/plugins/memphisTailwindPlugin.js +420 -0
  29. package/tailwind/v3/plugins/memphisTailwindPlugin.js.map +1 -0
  30. package/tailwind/v3/presets/base/buildTailwindPreset.d.ts +1 -0
  31. package/tailwind/v3/presets/base/buildTailwindPreset.d.ts.map +1 -0
  32. package/tailwind/v3/presets/base/buildTailwindPreset.js +39 -0
  33. package/tailwind/v3/presets/base/buildTailwindPreset.js.map +1 -0
  34. package/tailwind/v3/presets/cosmopolitanTailwindPresets.d.ts +2 -0
  35. package/tailwind/v3/presets/cosmopolitanTailwindPresets.d.ts.map +1 -0
  36. package/tailwind/v3/presets/cosmopolitanTailwindPresets.js +392 -0
  37. package/tailwind/v3/presets/cosmopolitanTailwindPresets.js.map +1 -0
  38. package/tailwind/v3/presets/joyTailwindPresets.d.ts +2 -0
  39. package/tailwind/v3/presets/joyTailwindPresets.d.ts.map +1 -0
  40. package/tailwind/v3/presets/joyTailwindPresets.js +408 -0
  41. package/tailwind/v3/presets/joyTailwindPresets.js.map +1 -0
  42. package/tailwind/v3/presets/memphisTailwindPresets.d.ts +2 -0
  43. package/tailwind/v3/presets/memphisTailwindPresets.d.ts.map +1 -0
  44. package/tailwind/v3/presets/memphisTailwindPresets.js +409 -0
  45. package/tailwind/v3/presets/memphisTailwindPresets.js.map +1 -0
  46. package/themes/cosmopolitan.scss +2 -0
  47. package/themes/joy.scss +16 -13
  48. package/themes/memphis.scss +27 -20
  49. /package/tailwind/v4/{cosmopolitanTailwindPresets.css → presets/cosmopolitanTailwindPresets.css} +0 -0
  50. /package/tailwind/v4/{joyTailwindPresets.css → presets/joyTailwindPresets.css} +0 -0
  51. /package/tailwind/v4/{memphisTailwindPresets.css → presets/memphisTailwindPresets.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ ## 0.0.222 (2026-01-21)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **Cdk/Utils:** add deepMerge function for merging nested objects ([958d8b1db2](https://github.com/RueDeRennes/mosaik/commit/958d8b1db2))
6
+ - **theme:** add theme mode support to theme preset saving and updating methods ([faf111347c](https://github.com/RueDeRennes/mosaik/commit/faf111347c))
7
+ - **theming): update Theme2Component to include 'name' and 'global' props refactor(theming): reorganize ITheme utility functions for better clarity feat(theming): add THEME_MODES and THEME_MODES_WITH_SYSTEM constants fix(theming:** export ThemeMode and THEME_MODES from index ([5b0d68ef4a](https://github.com/RueDeRennes/mosaik/commit/5b0d68ef4a))
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **theme:** update paths for Tailwind presets and add Snyk organization setting ([a2defd1849](https://github.com/RueDeRennes/mosaik/commit/a2defd1849))
12
+ - **package.json:** add missing newline at end of file ([8b6d8f8c2b](https://github.com/RueDeRennes/mosaik/commit/8b6d8f8c2b))
13
+
14
+ ## 0.0.221 (2026-01-16)
15
+
16
+ ### 🩹 Fixes
17
+
18
+ - **package.json:** update release version to 0.0.221 ([03ebc3de62](https://github.com/RueDeRennes/mosaik/commit/03ebc3de62))
19
+ - **package.json:** update release version to 0.0.220 ([320c50e503](https://github.com/RueDeRennes/mosaik/commit/320c50e503))
20
+
21
+ ## 0.0.220 (2026-01-15)
22
+
23
+ ### 🩹 Fixes
24
+
25
+ - **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))
26
+ - **_index.scss:** correct theme import paths to lowercase for consistency ([2a083a7608](https://github.com/RueDeRennes/mosaik/commit/2a083a7608))
27
+
28
+ ## 0.0.218 (2026-01-15)
29
+
30
+ ### 🚀 Features
31
+
32
+ - **meter:** enhance MeterRing and MeterBar components with new styles and properties ([026b313a58](https://github.com/RueDeRennes/mosaik/commit/026b313a58))
33
+ - **badge:** enhance styling and theming for Memphis and Joy badges ([98af94984e](https://github.com/RueDeRennes/mosaik/commit/98af94984e))
34
+
35
+ ## 0.0.217 (2026-01-09)
36
+
37
+ ### 🚀 Features
38
+
39
+ - **theme:** update transition properties and add new component tokens for Joy and Memphis themes ([904888d0f5](https://github.com/RueDeRennes/mosaik/commit/904888d0f5))
40
+ - **llms:** add new components and llms plugin for documentation generation ([3c4d1ad7a1](https://github.com/RueDeRennes/mosaik/commit/3c4d1ad7a1))
41
+
42
+ ### 🩹 Fixes
43
+
44
+ - **tailwind:** update copy command for CSS presets to use cp instead of rsync ([7e75cb5b81](https://github.com/RueDeRennes/mosaik/commit/7e75cb5b81))
45
+ - **tailwind:** replace cp with rsync for copying CSS presets ([1c7ceea1d4](https://github.com/RueDeRennes/mosaik/commit/1c7ceea1d4))
46
+
1
47
  ## 0.0.216 (2026-01-04)
2
48
 
3
49
  This was a version bump only for mosaik-themes to align it with other projects, there were no code changes.
package/_index.scss CHANGED
@@ -1,4 +1,4 @@
1
- @use './themes/cosmopolitan.scss' as cosmopolitan;
1
+ @use './themes/cosmopolitan' as cosmopolitan;
2
2
  @use './themes/joy' as joy;
3
3
  @use './themes/memphis' as memphis;
4
4
  @mixin cosmopolitan-style($radius: cosmopolitan.$layout-radius, $thickness: cosmopolitan.$layout-thickness, $space: cosmopolitan.$layout-space) {
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];
@@ -2824,6 +2824,11 @@ exports.ThemePalette = void 0;
2824
2824
  }
2825
2825
  __name(getPaletteColor, "getPaletteColor");
2826
2826
  ITheme2.getPaletteColor = getPaletteColor;
2827
+ function getElevationShadow(theme, mode, key) {
2828
+ return theme.elevation[mode][key];
2829
+ }
2830
+ __name(getElevationShadow, "getElevationShadow");
2831
+ ITheme2.getElevationShadow = getElevationShadow;
2827
2832
  })(exports.ITheme || (exports.ITheme = {}));
2828
2833
  exports.ITheme = void 0;
2829
2834
 
@@ -2857,6 +2862,12 @@ exports.ITheme = void 0;
2857
2862
  })(exports.ThemeScheme || (exports.ThemeScheme = {}));
2858
2863
  exports.ThemeScheme = void 0;
2859
2864
 
2865
+ // src/Theming/Utils/ThemeMode.ts
2866
+ var THEME_MODES = [
2867
+ "dark",
2868
+ "light"
2869
+ ];
2870
+
2860
2871
  // src/Theming/Adapters/BrowserPlatformAdapter.ts
2861
2872
  var BrowserPlatformAdapter = class {
2862
2873
  static {
@@ -3162,35 +3173,55 @@ var MaterialThemeGeneratorStrategy = class {
3162
3173
  */
3163
3174
  generateScheme(baseColor, mode) {
3164
3175
  const baseChroma = chroma__default.default(baseColor);
3165
- const luminance = baseChroma.luminance();
3166
- const isDarkBase = luminance < 0.3;
3167
- const adjustColor = /* @__PURE__ */ __name((color, targetAmount) => {
3176
+ const baseLuminance = baseChroma.luminance();
3177
+ const adjustColor = /* @__PURE__ */ __name((color, amount, minLuminance = 0.02, maxLuminance = 0.98) => {
3168
3178
  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();
3179
+ const factor = Math.abs(amount) / 25.5;
3180
+ let result = amount > 0 ? c.brighten(factor) : c.darken(factor);
3181
+ const resultLuminance = result.luminance();
3182
+ if (resultLuminance < minLuminance) {
3183
+ result = chroma__default.default(result).luminance(minLuminance);
3184
+ } else if (resultLuminance > maxLuminance) {
3185
+ result = chroma__default.default(result).luminance(maxLuminance);
3172
3186
  }
3173
- if (targetAmount > 0) {
3174
- return c.brighten(targetAmount / 25.5).hex();
3187
+ return result.hex();
3188
+ }, "adjustColor");
3189
+ const generateForeground = /* @__PURE__ */ __name(() => {
3190
+ if (mode === "light") {
3191
+ const darkened = baseChroma.darken(4).saturate(-0.3);
3192
+ const targetLuminance2 = Math.min(darkened.luminance(), 0.08);
3193
+ return chroma__default.default(darkened).luminance(targetLuminance2).hex();
3175
3194
  }
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();
3195
+ const lightened = baseChroma.brighten(4).saturate(-0.3);
3196
+ const targetLuminance = Math.max(lightened.luminance(), 0.85);
3197
+ return chroma__default.default(lightened).luminance(targetLuminance).hex();
3198
+ }, "generateForeground");
3199
+ const generateSurface = /* @__PURE__ */ __name(() => {
3200
+ if (mode === "light") {
3201
+ return baseLuminance > 0.9 ? adjustColor(baseColor, -8) : adjustColor(baseColor, 8);
3179
3202
  }
3180
- return darkened.hex();
3181
- }, "adjustColor");
3203
+ return adjustColor(baseColor, 15);
3204
+ }, "generateSurface");
3205
+ const generateHighlight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -15, 0.05, 0.95) : adjustColor(baseColor, 20, 0.05, 0.95), "generateHighlight");
3206
+ const generateMiddlelight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -30, 0.1, 0.9) : adjustColor(baseColor, 35, 0.1, 0.9), "generateMiddlelight");
3207
+ const generateLowlight = /* @__PURE__ */ __name(() => mode === "light" ? adjustColor(baseColor, -50, 0.15, 0.85) : adjustColor(baseColor, 55, 0.15, 0.85), "generateLowlight");
3208
+ const generateDisabled = /* @__PURE__ */ __name(() => {
3209
+ const desaturated = baseChroma.desaturate(2);
3210
+ return mode === "light" ? chroma__default.default(desaturated).darken(0.5).hex() : chroma__default.default(desaturated).brighten(0.5).hex();
3211
+ }, "generateDisabled");
3212
+ const foreground = generateForeground();
3182
3213
  return {
3183
- surface: adjustColor(baseColor, mode === "dark" ? -10 : 10),
3214
+ surface: generateSurface(),
3184
3215
  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),
3216
+ foreground,
3217
+ highlight: generateHighlight(),
3218
+ middlelight: generateMiddlelight(),
3219
+ lowlight: generateLowlight(),
3189
3220
  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)
3221
+ semiTransparent: chroma__default.default(baseColor).alpha(0.67).hex(),
3222
+ disabled: generateDisabled(),
3223
+ contrast: foreground,
3224
+ selection: generateHighlight()
3194
3225
  };
3195
3226
  }
3196
3227
  };
@@ -3763,6 +3794,7 @@ exports.MaterialThemeGeneratorStrategy = MaterialThemeGeneratorStrategy;
3763
3794
  exports.MemphisThemeGeneratorStrategy = MemphisThemeGeneratorStrategy;
3764
3795
  exports.NodePlatformAdapter = NodePlatformAdapter;
3765
3796
  exports.PlatformAdapterFactory = PlatformAdapterFactory;
3797
+ exports.THEME_MODES = THEME_MODES;
3766
3798
  exports.TailwindThemeGeneratorStrategy = TailwindThemeGeneratorStrategy;
3767
3799
  exports.ThemeGenerator = ThemeGenerator;
3768
3800
  exports.ThemeGeneratorServiceLocator = ThemeGeneratorServiceLocator;