@udixio/tailwind 2.3.4 → 2.3.6
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 +24 -0
- package/dist/browser/tailwind.plugin.d.ts.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +2 -2
- package/dist/node/tailwind.plugin.d.ts.map +1 -1
- package/dist/node.cjs +2 -1
- package/dist/node.js +3 -2
- package/dist/{tailwind.plugin-CNzjEOdG.js → tailwind.plugin-Bvh5RFHQ.js} +11 -9
- package/dist/{tailwind.plugin-BVo4TZ6g.cjs → tailwind.plugin-CEGlpiFj.cjs} +10 -8
- package/package.json +2 -2
- package/src/browser/tailwind.plugin.ts +8 -2
- package/src/node/tailwind.plugin.ts +1 -0
- package/src/plugins-tailwind/animation.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 2.3.6 (2025-10-17)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **theme, plugins-tailwind:** enhance instance management and fix subThemes processing ([0a1b42e](https://github.com/Udixio/UI/commit/0a1b42e))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated @udixio/theme to 2.1.1
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Joël VIGREUX
|
|
14
|
+
|
|
15
|
+
## 2.3.5 (2025-10-17)
|
|
16
|
+
|
|
17
|
+
### 🩹 Fixes
|
|
18
|
+
|
|
19
|
+
- **plugins-tailwind:** correct `dx` and `dy` value mappings in animation plugin ([7bb82d9](https://github.com/Udixio/UI/commit/7bb82d9))
|
|
20
|
+
|
|
21
|
+
### ❤️ Thank You
|
|
22
|
+
|
|
23
|
+
- Joël VIGREUX
|
|
24
|
+
|
|
1
25
|
## 2.3.4 (2025-10-17)
|
|
2
26
|
|
|
3
27
|
### 🧱 Updated Dependencies
|
|
@@ -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,cAAc,CAChD,yBAAyB,EACzB,qBAAqB,CACtB;IACQ,YAAY,wBAAgB;IAC5B,IAAI,SAAc;IACzB,WAAW,mCAA6B;CACzC;AAED,qBAAa,yBAA0B,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;IAC/E,SAAS,SAAM;IAEtB,MAAM;IAeN,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE;
|
|
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,cAAc,CAChD,yBAAyB,EACzB,qBAAqB,CACtB;IACQ,YAAY,wBAAgB;IAC5B,IAAI,SAAc;IACzB,WAAW,mCAA6B;CACzC;AAED,qBAAa,yBAA0B,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;IAC/E,SAAS,SAAM;IAEtB,MAAM;IAeN,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE;IA+E/C,SAAS;eAC+B,MAAM;cAAQ,MAAM;;IAetD,MAAM;CAYb"}
|
package/dist/browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const tailwind_plugin = require("./tailwind.plugin-
|
|
3
|
+
const tailwind_plugin = require("./tailwind.plugin-CEGlpiFj.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-
|
|
2
|
-
import { T, b, a, f, s } from "./tailwind.plugin-
|
|
1
|
+
import { m as main } from "./tailwind.plugin-Bvh5RFHQ.js";
|
|
2
|
+
import { T, b, a, f, s } from "./tailwind.plugin-Bvh5RFHQ.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;
|
|
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-
|
|
27
|
+
const tailwind_plugin = require("./tailwind.plugin-CEGlpiFj.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-
|
|
5
|
-
import { a, f, s } from "./tailwind.plugin-
|
|
4
|
+
import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-Bvh5RFHQ.js";
|
|
5
|
+
import { a, f, s } from "./tailwind.plugin-Bvh5RFHQ.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;
|
|
@@ -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
|
|
7
|
+
import { hexFromArgb, Hct, argbFromHex } from "@material/material-color-utilities";
|
|
8
8
|
const createAnimationFunc = ({
|
|
9
9
|
addBase,
|
|
10
10
|
prefix,
|
|
@@ -289,14 +289,14 @@ const animation = plugin.withOptions(
|
|
|
289
289
|
throw new Error(`Invalid direction: ${directionAlias}`);
|
|
290
290
|
}
|
|
291
291
|
const dxdy = {
|
|
292
|
-
"from-top": { dx: "0", dy: "1" },
|
|
293
|
-
"from-bottom": { dx: "0", dy: "
|
|
292
|
+
"from-top": { dx: "0", dy: "-1" },
|
|
293
|
+
"from-bottom": { dx: "0", dy: "1" },
|
|
294
294
|
"from-left": { dx: "-1", dy: "0" },
|
|
295
295
|
"from-right": { dx: "1", dy: "0" },
|
|
296
|
-
"from-top-left": { dx: "1", dy: "1" },
|
|
297
|
-
"from-top-right": { dx: "
|
|
298
|
-
"from-bottom-left": { dx: "1", dy: "
|
|
299
|
-
"from-bottom-right": { dx: "
|
|
296
|
+
"from-top-left": { dx: "-1", dy: "-1" },
|
|
297
|
+
"from-top-right": { dx: "1", dy: "-1" },
|
|
298
|
+
"from-bottom-left": { dx: "-1", dy: "1" },
|
|
299
|
+
"from-bottom-right": { dx: "1", dy: "1" }
|
|
300
300
|
};
|
|
301
301
|
const { dx, dy } = dxdy[direction];
|
|
302
302
|
addUtilities({
|
|
@@ -726,6 +726,7 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
|
|
|
726
726
|
})}
|
|
727
727
|
}`;
|
|
728
728
|
const sourceColor = this.api.context.sourceColor;
|
|
729
|
+
const originalSourceColorHex = hexFromArgb(sourceColor.toInt());
|
|
729
730
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
730
731
|
const newHue = Hct.fromInt(argbFromHex(value)).hue;
|
|
731
732
|
const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
@@ -745,9 +746,10 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
|
|
|
745
746
|
mode: darkMode,
|
|
746
747
|
darkSelector: darkSelector ?? "",
|
|
747
748
|
styles: Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.dark};`).join("\n ")
|
|
748
|
-
})}
|
|
749
|
+
})}
|
|
749
750
|
}`;
|
|
750
751
|
}
|
|
752
|
+
this.api.context.sourceColor = originalSourceColorHex;
|
|
751
753
|
}
|
|
752
754
|
getColors() {
|
|
753
755
|
const colors = {};
|
|
@@ -765,7 +767,7 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
|
|
|
765
767
|
return colors;
|
|
766
768
|
}
|
|
767
769
|
async onLoad() {
|
|
768
|
-
this.
|
|
770
|
+
this.outputCss = "";
|
|
769
771
|
this.loadColor({ isDynamic: true });
|
|
770
772
|
}
|
|
771
773
|
}
|
|
@@ -290,14 +290,14 @@ const animation = plugin.withOptions(
|
|
|
290
290
|
throw new Error(`Invalid direction: ${directionAlias}`);
|
|
291
291
|
}
|
|
292
292
|
const dxdy = {
|
|
293
|
-
"from-top": { dx: "0", dy: "1" },
|
|
294
|
-
"from-bottom": { dx: "0", dy: "
|
|
293
|
+
"from-top": { dx: "0", dy: "-1" },
|
|
294
|
+
"from-bottom": { dx: "0", dy: "1" },
|
|
295
295
|
"from-left": { dx: "-1", dy: "0" },
|
|
296
296
|
"from-right": { dx: "1", dy: "0" },
|
|
297
|
-
"from-top-left": { dx: "1", dy: "1" },
|
|
298
|
-
"from-top-right": { dx: "
|
|
299
|
-
"from-bottom-left": { dx: "1", dy: "
|
|
300
|
-
"from-bottom-right": { dx: "
|
|
297
|
+
"from-top-left": { dx: "-1", dy: "-1" },
|
|
298
|
+
"from-top-right": { dx: "1", dy: "-1" },
|
|
299
|
+
"from-bottom-left": { dx: "-1", dy: "1" },
|
|
300
|
+
"from-bottom-right": { dx: "1", dy: "1" }
|
|
301
301
|
};
|
|
302
302
|
const { dx, dy } = dxdy[direction];
|
|
303
303
|
addUtilities({
|
|
@@ -727,6 +727,7 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
|
|
|
727
727
|
})}
|
|
728
728
|
}`;
|
|
729
729
|
const sourceColor = this.api.context.sourceColor;
|
|
730
|
+
const originalSourceColorHex = materialColorUtilities.hexFromArgb(sourceColor.toInt());
|
|
730
731
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
731
732
|
const newHue = materialColorUtilities.Hct.fromInt(materialColorUtilities.argbFromHex(value)).hue;
|
|
732
733
|
const newColor = materialColorUtilities.Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
@@ -746,9 +747,10 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
|
|
|
746
747
|
mode: darkMode,
|
|
747
748
|
darkSelector: darkSelector ?? "",
|
|
748
749
|
styles: Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.dark};`).join("\n ")
|
|
749
|
-
})}
|
|
750
|
+
})}
|
|
750
751
|
}`;
|
|
751
752
|
}
|
|
753
|
+
this.api.context.sourceColor = originalSourceColorHex;
|
|
752
754
|
}
|
|
753
755
|
getColors() {
|
|
754
756
|
const colors = {};
|
|
@@ -766,7 +768,7 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
|
|
|
766
768
|
return colors;
|
|
767
769
|
}
|
|
768
770
|
async onLoad() {
|
|
769
|
-
this.
|
|
771
|
+
this.outputCss = "";
|
|
770
772
|
this.loadColor({ isDynamic: true });
|
|
771
773
|
}
|
|
772
774
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/tailwind",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
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.
|
|
34
|
+
"@udixio/theme": "2.1.1"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -163,6 +163,8 @@ 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
|
+
|
|
166
168
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
167
169
|
const newHue = Hct.fromInt(argbFromHex(value)).hue;
|
|
168
170
|
const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
@@ -188,9 +190,12 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
|
|
|
188
190
|
styles: Object.entries(colors)
|
|
189
191
|
.map(([key, value]) => `--color-${key}: ${value.dark};`)
|
|
190
192
|
.join('\n '),
|
|
191
|
-
})}
|
|
193
|
+
})}
|
|
192
194
|
}`;
|
|
193
195
|
}
|
|
196
|
+
|
|
197
|
+
// Restore original sourceColor after processing subThemes
|
|
198
|
+
this.api.context.sourceColor = originalSourceColorHex;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
getColors() {
|
|
@@ -210,7 +215,8 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
|
|
|
210
215
|
}
|
|
211
216
|
|
|
212
217
|
async onLoad() {
|
|
213
|
-
this.
|
|
218
|
+
this.outputCss = '';
|
|
219
|
+
// this.getColors();
|
|
214
220
|
|
|
215
221
|
// if (typeof window !== 'undefined') {
|
|
216
222
|
// const { tailwindBrowserInit } = await import('./tailwind-browser');
|
|
@@ -376,14 +376,14 @@ export const animation = plugin.withOptions(
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
const dxdy: Record<typeof direction, { dx: string; dy: string }> = {
|
|
379
|
-
'from-top': { dx: '0', dy: '1' },
|
|
380
|
-
'from-bottom': { dx: '0', dy: '
|
|
379
|
+
'from-top': { dx: '0', dy: '-1' },
|
|
380
|
+
'from-bottom': { dx: '0', dy: '1' },
|
|
381
381
|
'from-left': { dx: '-1', dy: '0' },
|
|
382
382
|
'from-right': { dx: '1', dy: '0' },
|
|
383
|
-
'from-top-left': { dx: '1', dy: '1' },
|
|
384
|
-
'from-top-right': { dx: '
|
|
385
|
-
'from-bottom-left': { dx: '1', dy: '
|
|
386
|
-
'from-bottom-right': { dx: '
|
|
383
|
+
'from-top-left': { dx: '-1', dy: '-1' },
|
|
384
|
+
'from-top-right': { dx: '1', dy: '-1' },
|
|
385
|
+
'from-bottom-left': { dx: '-1', dy: '1' },
|
|
386
|
+
'from-bottom-right': { dx: '1', dy: '1' },
|
|
387
387
|
} as const;
|
|
388
388
|
const { dx, dy } = dxdy[direction];
|
|
389
389
|
|