@udixio/tailwind 2.3.5 → 2.3.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## 2.3.7 (2025-10-17)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **theme, plugins-tailwind:** improve container caching and enhance debugging logs ([a8f955d](https://github.com/Udixio/UI/commit/a8f955d))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated @udixio/theme to 2.1.2
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - Joël VIGREUX
14
+
15
+ ## 2.3.6 (2025-10-17)
16
+
17
+ ### 🩹 Fixes
18
+
19
+ - **theme, plugins-tailwind:** enhance instance management and fix subThemes processing ([0a1b42e](https://github.com/Udixio/UI/commit/0a1b42e))
20
+
21
+ ### 🧱 Updated Dependencies
22
+
23
+ - Updated @udixio/theme to 2.1.1
24
+
25
+ ### ❤️ Thank You
26
+
27
+ - Joël VIGREUX
28
+
1
29
  ## 2.3.5 (2025-10-17)
2
30
 
3
31
  ### 🩹 Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.plugin.d.ts","sourceRoot":"","sources":["../../src/browser/tailwind.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAO/E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAgFD,qBAAa,cAAe,SAAQ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
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const tailwind_plugin = require("./tailwind.plugin-Dvf5FtVR.cjs");
3
+ const tailwind_plugin = require("./tailwind.plugin-D7mbDtcZ.cjs");
4
4
  exports.TailwindImplPluginBrowser = tailwind_plugin.TailwindImplPluginBrowser;
5
5
  exports.TailwindPlugin = tailwind_plugin.TailwindPlugin;
6
6
  exports.animation = tailwind_plugin.animation;
package/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
- import { m as main } from "./tailwind.plugin-kD1ORWiZ.js";
2
- import { T, b, a, f, s } from "./tailwind.plugin-kD1ORWiZ.js";
1
+ import { m as main } from "./tailwind.plugin-WLIf7Hf5.js";
2
+ import { T, b, a, f, s } from "./tailwind.plugin-WLIf7Hf5.js";
3
3
  export {
4
4
  T as TailwindImplPluginBrowser,
5
5
  b as TailwindPlugin,
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.plugin.d.ts","sourceRoot":"","sources":["../../src/node/tailwind.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EACL,yBAAyB,EACzB,qBAAqB,IAAI,4BAA4B,EACtD,MAAM,4BAA4B,CAAC;AAIpC,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAEjE,qBAAa,cAAe,SAAQ,cAAc,CAChD,kBAAkB,EAClB,qBAAqB,CACtB;IACQ,YAAY,wBAAgB;IAC5B,IAAI,SAAc;IACzB,WAAW,4BAAsB;CAClC;AAED,cAAM,kBAAmB,SAAQ,yBAAyB;IACxD,OAAO,CAAC,QAAQ;IAQD,MAAM;CAkFtB"}
1
+ {"version":3,"file":"tailwind.plugin.d.ts","sourceRoot":"","sources":["../../src/node/tailwind.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EACL,yBAAyB,EACzB,qBAAqB,IAAI,4BAA4B,EACtD,MAAM,4BAA4B,CAAC;AAIpC,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAEjE,qBAAa,cAAe,SAAQ,cAAc,CAChD,kBAAkB,EAClB,qBAAqB,CACtB;IACQ,YAAY,wBAAgB;IAC5B,IAAI,SAAc;IACzB,WAAW,4BAAsB;CAClC;AAED,cAAM,kBAAmB,SAAQ,yBAAyB;IACxD,OAAO,CAAC,QAAQ;IAQD,MAAM;CAmFtB"}
package/dist/node.cjs CHANGED
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
26
26
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
27
- const tailwind_plugin = require("./tailwind.plugin-Dvf5FtVR.cjs");
27
+ const tailwind_plugin = require("./tailwind.plugin-D7mbDtcZ.cjs");
28
28
  const theme = require("@udixio/theme");
29
29
  const fs = require("fs");
30
30
  const console = require("node:console");
@@ -61,6 +61,7 @@ class TailwindImplPlugin extends tailwind_plugin.TailwindImplPluginBrowser {
61
61
  return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
62
62
  }
63
63
  async onLoad() {
64
+ this.outputCss = "";
64
65
  if (!this.isNodeJs()) {
65
66
  await super.onLoad();
66
67
  return;
package/dist/node.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-kD1ORWiZ.js";
5
- import { a, f, s } from "./tailwind.plugin-kD1ORWiZ.js";
4
+ import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-WLIf7Hf5.js";
5
+ import { a, f, s } from "./tailwind.plugin-WLIf7Hf5.js";
6
6
  import { PluginAbstract, FontPlugin } from "@udixio/theme";
7
7
  import * as fs from "fs";
8
8
  import * as console from "node:console";
@@ -21,6 +21,7 @@ class TailwindImplPlugin extends TailwindImplPluginBrowser {
21
21
  return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
22
22
  }
23
23
  async onLoad() {
24
+ this.outputCss = "";
24
25
  if (!this.isNodeJs()) {
25
26
  await super.onLoad();
26
27
  return;
@@ -727,9 +727,12 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
727
727
  })}
728
728
  }`;
729
729
  const sourceColor = this.api.context.sourceColor;
730
+ const originalSourceColorHex = materialColorUtilities.hexFromArgb(sourceColor.toInt());
731
+ console.log("to subthmes", this.api.context.id);
730
732
  for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
731
733
  const newHue = materialColorUtilities.Hct.fromInt(materialColorUtilities.argbFromHex(value)).hue;
732
734
  const newColor = materialColorUtilities.Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
735
+ console.log("newColor", materialColorUtilities.hexFromArgb(newColor.toInt()));
733
736
  this.api.context.sourceColor = materialColorUtilities.hexFromArgb(newColor.toInt());
734
737
  const colors2 = this.getColors();
735
738
  this.outputCss += `
@@ -746,9 +749,11 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
746
749
  mode: darkMode,
747
750
  darkSelector: darkSelector ?? "",
748
751
  styles: Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.dark};`).join("\n ")
749
- })}
752
+ })}
750
753
  }`;
751
754
  }
755
+ console.log("finish");
756
+ this.api.context.sourceColor = originalSourceColorHex;
752
757
  }
753
758
  getColors() {
754
759
  const colors = {};
@@ -766,7 +771,7 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
766
771
  return colors;
767
772
  }
768
773
  async onLoad() {
769
- this.getColors();
774
+ this.outputCss = "";
770
775
  this.loadColor({ isDynamic: true });
771
776
  }
772
777
  }
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import plugin from "tailwindcss/plugin";
5
5
  import { kebabCase } from "text-case";
6
6
  import { PluginAbstract, FontPlugin, PluginImplAbstract } from "@udixio/theme";
7
- import { Hct, argbFromHex, hexFromArgb } from "@material/material-color-utilities";
7
+ import { hexFromArgb, Hct, argbFromHex } from "@material/material-color-utilities";
8
8
  const createAnimationFunc = ({
9
9
  addBase,
10
10
  prefix,
@@ -726,9 +726,12 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
726
726
  })}
727
727
  }`;
728
728
  const sourceColor = this.api.context.sourceColor;
729
+ const originalSourceColorHex = hexFromArgb(sourceColor.toInt());
730
+ console.log("to subthmes", this.api.context.id);
729
731
  for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
730
732
  const newHue = Hct.fromInt(argbFromHex(value)).hue;
731
733
  const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
734
+ console.log("newColor", hexFromArgb(newColor.toInt()));
732
735
  this.api.context.sourceColor = hexFromArgb(newColor.toInt());
733
736
  const colors2 = this.getColors();
734
737
  this.outputCss += `
@@ -745,9 +748,11 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
745
748
  mode: darkMode,
746
749
  darkSelector: darkSelector ?? "",
747
750
  styles: Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.dark};`).join("\n ")
748
- })}
751
+ })}
749
752
  }`;
750
753
  }
754
+ console.log("finish");
755
+ this.api.context.sourceColor = originalSourceColorHex;
751
756
  }
752
757
  getColors() {
753
758
  const colors = {};
@@ -765,7 +770,7 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
765
770
  return colors;
766
771
  }
767
772
  async onLoad() {
768
- this.getColors();
773
+ this.outputCss = "";
769
774
  this.loadColor({ isDynamic: true });
770
775
  }
771
776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/tailwind",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "type": "module",
5
5
  "main": "./dist/node.js",
6
6
  "module": "./dist/node.js",
@@ -31,7 +31,7 @@
31
31
  "chalk": "^5.6.0",
32
32
  "pathe": "^2.0.3",
33
33
  "tslib": "^2.3.0",
34
- "@udixio/theme": "2.1.0"
34
+ "@udixio/theme": "2.1.2"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
@@ -163,10 +163,15 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
163
163
  }`;
164
164
 
165
165
  const sourceColor = this.api.context.sourceColor;
166
+ const originalSourceColorHex = hexFromArgb(sourceColor.toInt());
167
+
168
+ console.log('to subthmes', this.api.context.id);
166
169
  for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
167
170
  const newHue = Hct.fromInt(argbFromHex(value)).hue;
168
171
  const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
169
172
 
173
+ console.log('newColor', hexFromArgb(newColor.toInt()));
174
+
170
175
  this.api.context.sourceColor = hexFromArgb(newColor.toInt());
171
176
  const colors = this.getColors();
172
177
  this.outputCss += `
@@ -188,9 +193,12 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
188
193
  styles: Object.entries(colors)
189
194
  .map(([key, value]) => `--color-${key}: ${value.dark};`)
190
195
  .join('\n '),
191
- })}
196
+ })}
192
197
  }`;
193
198
  }
199
+ console.log('finish');
200
+ // Restore original sourceColor after processing subThemes
201
+ this.api.context.sourceColor = originalSourceColorHex;
194
202
  }
195
203
 
196
204
  getColors() {
@@ -210,7 +218,8 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
210
218
  }
211
219
 
212
220
  async onLoad() {
213
- this.getColors();
221
+ this.outputCss = '';
222
+ // this.getColors();
214
223
 
215
224
  // if (typeof window !== 'undefined') {
216
225
  // const { tailwindBrowserInit } = await import('./tailwind-browser');
@@ -28,6 +28,7 @@ class TailwindImplPlugin extends TailwindImplPluginBrowser {
28
28
  }
29
29
 
30
30
  override async onLoad() {
31
+ this.outputCss = '';
31
32
  if (!this.isNodeJs()) {
32
33
  await super.onLoad();
33
34
  return;