@udixio/tailwind 2.0.0 → 2.1.0
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 +10 -0
- 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/plugins-tailwind/animation.d.ts.map +1 -1
- package/dist/{tailwind.plugin-DLbaMny3.js → tailwind.plugin-DfVIrskO.js} +12 -3
- package/dist/{tailwind.plugin-ImuL0_jV.cjs → tailwind.plugin-DmhUL7Oj.cjs} +12 -3
- package/package.json +1 -1
- package/src/plugins-tailwind/animation.ts +18 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 2.1.0 (2025-10-16)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **animation:** remove redundant `updateAnimNamesAndWillChange` logic and centralize handling in `animation` plugin ([d13c4d7](https://github.com/Udixio/UI/commit/d13c4d7))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Joël VIGREUX
|
|
10
|
+
|
|
1
11
|
# 2.0.0 (2025-10-15)
|
|
2
12
|
|
|
3
13
|
### 🚀 Features
|
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-DmhUL7Oj.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-DfVIrskO.js";
|
|
2
|
+
import { T, b, a, f, s } from "./tailwind.plugin-DfVIrskO.js";
|
|
3
3
|
export {
|
|
4
4
|
T as TailwindImplPluginBrowser,
|
|
5
5
|
b 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-DmhUL7Oj.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 { a, f, s } from "./tailwind.plugin-
|
|
4
|
+
import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-DfVIrskO.js";
|
|
5
|
+
import { a, f, s } from "./tailwind.plugin-DfVIrskO.js";
|
|
6
6
|
import { PluginAbstract, FontPlugin } from "@udixio/theme";
|
|
7
7
|
import * as fs from "fs";
|
|
8
8
|
import * as console from "node:console";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/plugins-tailwind/animation.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/plugins-tailwind/animation.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4GD,eAAO,MAAM,SAAS,sFA+brB,CAAC"}
|
|
@@ -9,8 +9,10 @@ const createAnimationFunc = ({
|
|
|
9
9
|
addBase,
|
|
10
10
|
prefix,
|
|
11
11
|
matchUtilities,
|
|
12
|
-
addUtilities
|
|
12
|
+
addUtilities,
|
|
13
|
+
animationNames
|
|
13
14
|
}) => (name, styles, values, callback) => {
|
|
15
|
+
animationNames.add(name);
|
|
14
16
|
const variableName = (propertyName) => {
|
|
15
17
|
return `--${prefix}-${propertyName}`;
|
|
16
18
|
};
|
|
@@ -75,11 +77,13 @@ const createAnimationFunc = ({
|
|
|
75
77
|
const animation = plugin.withOptions(
|
|
76
78
|
({ prefix = "anim" }) => {
|
|
77
79
|
return ({ addBase, matchUtilities, addUtilities }) => {
|
|
80
|
+
const animationNames = /* @__PURE__ */ new Set();
|
|
78
81
|
const createAnimation = createAnimationFunc({
|
|
79
82
|
addBase,
|
|
80
83
|
prefix,
|
|
81
84
|
matchUtilities,
|
|
82
|
-
addUtilities
|
|
85
|
+
addUtilities,
|
|
86
|
+
animationNames
|
|
83
87
|
});
|
|
84
88
|
addBase({
|
|
85
89
|
"@keyframes enter": {
|
|
@@ -304,7 +308,6 @@ const animation = plugin.withOptions(
|
|
|
304
308
|
});
|
|
305
309
|
addUtilities({
|
|
306
310
|
[`.${prefix}-${name}-scroll-${directionAlias}`]: {
|
|
307
|
-
[`--${prefix}-name-${name}-${directionAlias}`]: `${prefix}-${name}`,
|
|
308
311
|
[`--${prefix}-name-${name}`]: `${prefix}-${name}`,
|
|
309
312
|
[`--${prefix}-dependencies-${name}`]: dependencies.join(", "),
|
|
310
313
|
animationTimeline: `var(--${prefix}-timeline, view())`,
|
|
@@ -439,6 +442,12 @@ const animation = plugin.withOptions(
|
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
);
|
|
445
|
+
addBase({
|
|
446
|
+
[`[class*="${prefix}-"]`]: {
|
|
447
|
+
animationName: Array.from(animationNames).map((name) => `var(--${prefix}-name-${name}, noop)`).join(", "),
|
|
448
|
+
["will-change"]: Array.from(animationNames).map((name) => `var(--${prefix}-dependencies-${name}, noop)`).join(", ")
|
|
449
|
+
}
|
|
450
|
+
});
|
|
442
451
|
};
|
|
443
452
|
}
|
|
444
453
|
);
|
|
@@ -10,8 +10,10 @@ const createAnimationFunc = ({
|
|
|
10
10
|
addBase,
|
|
11
11
|
prefix,
|
|
12
12
|
matchUtilities,
|
|
13
|
-
addUtilities
|
|
13
|
+
addUtilities,
|
|
14
|
+
animationNames
|
|
14
15
|
}) => (name, styles, values, callback) => {
|
|
16
|
+
animationNames.add(name);
|
|
15
17
|
const variableName = (propertyName) => {
|
|
16
18
|
return `--${prefix}-${propertyName}`;
|
|
17
19
|
};
|
|
@@ -76,11 +78,13 @@ const createAnimationFunc = ({
|
|
|
76
78
|
const animation = plugin.withOptions(
|
|
77
79
|
({ prefix = "anim" }) => {
|
|
78
80
|
return ({ addBase, matchUtilities, addUtilities }) => {
|
|
81
|
+
const animationNames = /* @__PURE__ */ new Set();
|
|
79
82
|
const createAnimation = createAnimationFunc({
|
|
80
83
|
addBase,
|
|
81
84
|
prefix,
|
|
82
85
|
matchUtilities,
|
|
83
|
-
addUtilities
|
|
86
|
+
addUtilities,
|
|
87
|
+
animationNames
|
|
84
88
|
});
|
|
85
89
|
addBase({
|
|
86
90
|
"@keyframes enter": {
|
|
@@ -305,7 +309,6 @@ const animation = plugin.withOptions(
|
|
|
305
309
|
});
|
|
306
310
|
addUtilities({
|
|
307
311
|
[`.${prefix}-${name}-scroll-${directionAlias}`]: {
|
|
308
|
-
[`--${prefix}-name-${name}-${directionAlias}`]: `${prefix}-${name}`,
|
|
309
312
|
[`--${prefix}-name-${name}`]: `${prefix}-${name}`,
|
|
310
313
|
[`--${prefix}-dependencies-${name}`]: dependencies.join(", "),
|
|
311
314
|
animationTimeline: `var(--${prefix}-timeline, view())`,
|
|
@@ -440,6 +443,12 @@ const animation = plugin.withOptions(
|
|
|
440
443
|
}
|
|
441
444
|
}
|
|
442
445
|
);
|
|
446
|
+
addBase({
|
|
447
|
+
[`[class*="${prefix}-"]`]: {
|
|
448
|
+
animationName: Array.from(animationNames).map((name) => `var(--${prefix}-name-${name}, noop)`).join(", "),
|
|
449
|
+
["will-change"]: Array.from(animationNames).map((name) => `var(--${prefix}-dependencies-${name}, noop)`).join(", ")
|
|
450
|
+
}
|
|
451
|
+
});
|
|
443
452
|
};
|
|
444
453
|
}
|
|
445
454
|
);
|
package/package.json
CHANGED
|
@@ -11,11 +11,13 @@ const createAnimationFunc =
|
|
|
11
11
|
prefix,
|
|
12
12
|
matchUtilities,
|
|
13
13
|
addUtilities,
|
|
14
|
+
animationNames,
|
|
14
15
|
}: {
|
|
15
16
|
addBase: PluginAPI['addBase'];
|
|
16
17
|
matchUtilities: PluginAPI['matchUtilities'];
|
|
17
18
|
addUtilities: PluginAPI['addUtilities'];
|
|
18
19
|
prefix: string;
|
|
20
|
+
animationNames: Set<string>;
|
|
19
21
|
}) =>
|
|
20
22
|
(
|
|
21
23
|
name: string,
|
|
@@ -36,6 +38,8 @@ const createAnimationFunc =
|
|
|
36
38
|
dependencies: string[];
|
|
37
39
|
}) => void,
|
|
38
40
|
) => {
|
|
41
|
+
animationNames.add(name);
|
|
42
|
+
|
|
39
43
|
const variableName = (propertyName: string) => {
|
|
40
44
|
return `--${prefix}-${propertyName}`;
|
|
41
45
|
};
|
|
@@ -110,11 +114,14 @@ const createAnimationFunc =
|
|
|
110
114
|
export const animation = plugin.withOptions(
|
|
111
115
|
({ prefix = 'anim' }: AnimationPluginOptions) => {
|
|
112
116
|
return ({ addBase, matchUtilities, addUtilities }: PluginAPI) => {
|
|
117
|
+
const animationNames: Set<string> = new Set();
|
|
118
|
+
|
|
113
119
|
const createAnimation = createAnimationFunc({
|
|
114
120
|
addBase,
|
|
115
121
|
prefix,
|
|
116
122
|
matchUtilities,
|
|
117
123
|
addUtilities,
|
|
124
|
+
animationNames,
|
|
118
125
|
});
|
|
119
126
|
|
|
120
127
|
addBase({
|
|
@@ -391,7 +398,6 @@ export const animation = plugin.withOptions(
|
|
|
391
398
|
|
|
392
399
|
addUtilities({
|
|
393
400
|
[`.${prefix}-${name}-scroll-${directionAlias}`]: {
|
|
394
|
-
[`--${prefix}-name-${name}-${directionAlias}`]: `${prefix}-${name}`,
|
|
395
401
|
[`--${prefix}-name-${name}`]: `${prefix}-${name}`,
|
|
396
402
|
[`--${prefix}-dependencies-${name}`]: dependencies.join(', '),
|
|
397
403
|
animationTimeline: `var(--${prefix}-timeline, view())`,
|
|
@@ -539,6 +545,17 @@ export const animation = plugin.withOptions(
|
|
|
539
545
|
},
|
|
540
546
|
},
|
|
541
547
|
);
|
|
548
|
+
|
|
549
|
+
addBase({
|
|
550
|
+
[`[class*="${prefix}-"]`]: {
|
|
551
|
+
animationName: Array.from(animationNames)
|
|
552
|
+
.map((name) => `var(--${prefix}-name-${name}, noop)`)
|
|
553
|
+
.join(', '),
|
|
554
|
+
['will-change']: Array.from(animationNames)
|
|
555
|
+
.map((name) => `var(--${prefix}-dependencies-${name}, noop)`)
|
|
556
|
+
.join(', '),
|
|
557
|
+
},
|
|
558
|
+
});
|
|
542
559
|
};
|
|
543
560
|
},
|
|
544
561
|
);
|