@udixio/tailwind 1.7.2 → 1.7.3
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 +14 -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.cjs +1 -1
- package/dist/node.js +2 -2
- package/dist/{tailwind.plugin-q0sIRBpo.js → tailwind.plugin-BWGo32wO.js} +6 -2
- package/dist/{tailwind.plugin-CUI_jxzw.cjs → tailwind.plugin-sDnlHrTp.cjs} +6 -2
- package/package.json +2 -2
- package/src/browser/tailwind.plugin.ts +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.7.3 (2025-09-04)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- the external colors must be coherent ([08cd685](https://github.com/Udixio/UI/commit/08cd685))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated @udixio/theme to 1.3.1
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Joël VIGREUX
|
|
14
|
+
|
|
1
15
|
## 1.7.2 (2025-09-04)
|
|
2
16
|
|
|
3
17
|
### 🧱 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;
|
|
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;AAG/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;IA0E/C,SAAS;eAII,MAAM;cACP,MAAM;;IAiBZ,MAAM;CAUb"}
|
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-sDnlHrTp.cjs");
|
|
4
4
|
exports.TailwindImplPluginBrowser = tailwind_plugin.TailwindImplPluginBrowser;
|
|
5
5
|
exports.TailwindPlugin = tailwind_plugin.TailwindPlugin;
|
|
6
6
|
exports.default = tailwind_plugin.main;
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as main } from "./tailwind.plugin-
|
|
2
|
-
import { T, a, f, s } from "./tailwind.plugin-
|
|
1
|
+
import { m as main } from "./tailwind.plugin-BWGo32wO.js";
|
|
2
|
+
import { T, a, f, s } from "./tailwind.plugin-BWGo32wO.js";
|
|
3
3
|
export {
|
|
4
4
|
T as TailwindImplPluginBrowser,
|
|
5
5
|
a as TailwindPlugin,
|
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-sDnlHrTp.cjs");
|
|
28
28
|
const theme = require("@udixio/theme");
|
|
29
29
|
const fs = require("fs");
|
|
30
30
|
const console = require("node:console");
|
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 { f, s } from "./tailwind.plugin-
|
|
4
|
+
import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-BWGo32wO.js";
|
|
5
|
+
import { f, s } from "./tailwind.plugin-BWGo32wO.js";
|
|
6
6
|
import { PluginAbstract, FontPlugin } from "@udixio/theme";
|
|
7
7
|
import * as fs from "fs";
|
|
8
8
|
import * as console from "node:console";
|
|
@@ -3,6 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import plugin from "tailwindcss/plugin";
|
|
5
5
|
import { PluginAbstract, FontPlugin, PluginImplAbstract } from "@udixio/theme";
|
|
6
|
+
import { Hct, argbFromHex, hexFromArgb } from "@material/material-color-utilities";
|
|
6
7
|
const defaultConfig = {
|
|
7
8
|
statePrefix: "state",
|
|
8
9
|
disabledStyles: {
|
|
@@ -279,13 +280,16 @@ class TailwindImplPluginBrowser extends PluginImplAbstract {
|
|
|
279
280
|
styles: Object.entries(colors).map(([key, value]) => `--color-${key}: ${value.dark};`).join("\n ")
|
|
280
281
|
})}
|
|
281
282
|
}`;
|
|
283
|
+
const sourceColor = this.api.themes.sourceColorHex;
|
|
282
284
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
283
|
-
|
|
285
|
+
const newHue = Hct.fromInt(argbFromHex(value)).hue;
|
|
286
|
+
const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
287
|
+
this.api.themes.update({ sourceColorHex: hexFromArgb(newColor.toInt()) });
|
|
284
288
|
const colors2 = this.getColors();
|
|
285
289
|
this.outputCss += `
|
|
286
290
|
@layer theme {
|
|
287
291
|
${createFlexibleSelector(dynamicSelector, ".theme-" + key)} {
|
|
288
|
-
${Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.
|
|
292
|
+
${Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.light};`).join("\n ")}
|
|
289
293
|
}
|
|
290
294
|
}
|
|
291
295
|
`;
|
|
@@ -4,6 +4,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
const plugin = require("tailwindcss/plugin");
|
|
6
6
|
const theme = require("@udixio/theme");
|
|
7
|
+
const materialColorUtilities = require("@material/material-color-utilities");
|
|
7
8
|
const defaultConfig = {
|
|
8
9
|
statePrefix: "state",
|
|
9
10
|
disabledStyles: {
|
|
@@ -280,13 +281,16 @@ class TailwindImplPluginBrowser extends theme.PluginImplAbstract {
|
|
|
280
281
|
styles: Object.entries(colors).map(([key, value]) => `--color-${key}: ${value.dark};`).join("\n ")
|
|
281
282
|
})}
|
|
282
283
|
}`;
|
|
284
|
+
const sourceColor = this.api.themes.sourceColorHex;
|
|
283
285
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
284
|
-
|
|
286
|
+
const newHue = materialColorUtilities.Hct.fromInt(materialColorUtilities.argbFromHex(value)).hue;
|
|
287
|
+
const newColor = materialColorUtilities.Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
288
|
+
this.api.themes.update({ sourceColorHex: materialColorUtilities.hexFromArgb(newColor.toInt()) });
|
|
285
289
|
const colors2 = this.getColors();
|
|
286
290
|
this.outputCss += `
|
|
287
291
|
@layer theme {
|
|
288
292
|
${createFlexibleSelector(dynamicSelector, ".theme-" + key)} {
|
|
289
|
-
${Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.
|
|
293
|
+
${Object.entries(colors2).map(([key2, value2]) => `--color-${key2}: ${value2.light};`).join("\n ")}
|
|
290
294
|
}
|
|
291
295
|
}
|
|
292
296
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/tailwind",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/node.js",
|
|
6
6
|
"module": "./dist/node.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"chalk": "^5.6.0",
|
|
31
31
|
"pathe": "^2.0.3",
|
|
32
32
|
"tslib": "^2.3.0",
|
|
33
|
-
"@udixio/theme": "1.3.
|
|
33
|
+
"@udixio/theme": "1.3.1"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FontPlugin, PluginAbstract, PluginImplAbstract } from '@udixio/theme';
|
|
2
|
+
import { argbFromHex, Hct, hexFromArgb } from '@material/material-color-utilities';
|
|
2
3
|
|
|
3
4
|
export interface TailwindPluginOptions {
|
|
4
5
|
darkMode?: 'class' | 'media';
|
|
@@ -157,14 +158,18 @@ export class TailwindImplPluginBrowser extends PluginImplAbstract<TailwindPlugin
|
|
|
157
158
|
})}
|
|
158
159
|
}`;
|
|
159
160
|
|
|
161
|
+
const sourceColor = this.api.themes.sourceColorHex;
|
|
160
162
|
for (const [key, value] of Object.entries(this.options.subThemes ?? {})) {
|
|
161
|
-
|
|
163
|
+
const newHue = Hct.fromInt(argbFromHex(value)).hue;
|
|
164
|
+
const newColor = Hct.from(newHue, sourceColor.chroma, sourceColor.tone);
|
|
165
|
+
|
|
166
|
+
this.api.themes.update({ sourceColorHex: hexFromArgb(newColor.toInt()) });
|
|
162
167
|
const colors = this.getColors();
|
|
163
168
|
this.outputCss += `
|
|
164
169
|
@layer theme {
|
|
165
170
|
${createFlexibleSelector(dynamicSelector, '.theme-' + key)} {
|
|
166
171
|
${Object.entries(colors)
|
|
167
|
-
.map(([key, value]) => `--color-${key}: ${value.
|
|
172
|
+
.map(([key, value]) => `--color-${key}: ${value.light};`)
|
|
168
173
|
.join('\n ')}
|
|
169
174
|
}
|
|
170
175
|
}
|