@terrazzo/plugin-tailwind 2.0.0-alpha.1 → 2.0.0-alpha.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 +2 -0
- package/README.md +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -12
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
- [#530](https://github.com/terrazzoapp/terrazzo/pull/530) [`370ed7b`](https://github.com/terrazzoapp/terrazzo/commit/370ed7b0f578a64824124145d7f4936536b37bb3) Thanks [@drwpow](https://github.com/drwpow)! - Validation moved to lint rules, which means token validation can be individually configured, and optionally extended.
|
|
16
16
|
|
|
17
|
+
- [#568](https://github.com/terrazzoapp/terrazzo/pull/568) [`67c75be`](https://github.com/terrazzoapp/terrazzo/commit/67c75be78978cece52b61cf258ccc3a875e6af48) Thanks [@drwpow](https://github.com/drwpow)! - Fix border tokens not cascading correctly across modes
|
|
18
|
+
|
|
17
19
|
## 0.3.3
|
|
18
20
|
|
|
19
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Requires [Node.js 20 or later](https://nodejs.org). With that installed, run:
|
|
|
10
10
|
npm i -D @terrazzo/cli @terrazzo/plugin-css @terrazzo/plugin-tailwind
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Add a `terrazzo.config.
|
|
13
|
+
Add a `terrazzo.config.ts` to the root of your project with:
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import { defineConfig } from "@terrazzo/cli";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/lib.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;UAAiB,qBAAA;;;AAAjB;AAaA;;;SANS;ECHI;EAIW,YAAA,CAAA,EAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/lib.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;UAAiB,qBAAA;;;AAAjB;AAaA;;;SANS;ECHI;EAIW,YAAA,CAAA,EAAA;;;;;;iBDKR,eAAA,WAA0B;;;;;;cCT7B,SAAA;ADSG,iBCLQ,cAAA,CDKkB,OAAM,ECLA,qBDKA,CAAA,ECLwB,MDKxB"}
|
package/dist/index.js
CHANGED
|
@@ -2085,14 +2085,11 @@ const convertXyz65ToItp = ({ x, y, z, alpha }) => {
|
|
|
2085
2085
|
const l = transferPqEncode(.3592832590121217 * absX + .6976051147779502 * absY - .0358915932320289 * absZ);
|
|
2086
2086
|
const m = transferPqEncode(-.1920808463704995 * absX + 1.1004767970374323 * absY + .0753748658519118 * absZ);
|
|
2087
2087
|
const s = transferPqEncode(.0070797844607477 * absX + .0748396662186366 * absY + .8433265453898765 * absZ);
|
|
2088
|
-
const i = .5 * l + .5 * m;
|
|
2089
|
-
const t = 1.61376953125 * l - 3.323486328125 * m + 1.709716796875 * s;
|
|
2090
|
-
const p$2 = 4.378173828125 * l - 4.24560546875 * m - .132568359375 * s;
|
|
2091
2088
|
const res = {
|
|
2092
2089
|
mode: "itp",
|
|
2093
|
-
i,
|
|
2094
|
-
t,
|
|
2095
|
-
p:
|
|
2090
|
+
i: .5 * l + .5 * m,
|
|
2091
|
+
t: 1.61376953125 * l - 3.323486328125 * m + 1.709716796875 * s,
|
|
2092
|
+
p: 4.378173828125 * l - 4.24560546875 * m - .132568359375 * s
|
|
2096
2093
|
};
|
|
2097
2094
|
if (alpha !== void 0) res.alpha = alpha;
|
|
2098
2095
|
return res;
|
|
@@ -2360,13 +2357,11 @@ const convertLuvToXyz50 = ({ l, u, v, alpha }) => {
|
|
|
2360
2357
|
let up = u / (13 * l) + un;
|
|
2361
2358
|
let vp = v / (13 * l) + vn;
|
|
2362
2359
|
let y = D50.Y * (l <= 8 ? l / k : Math.pow((l + 16) / 116, 3));
|
|
2363
|
-
let x = y * (9 * up) / (4 * vp);
|
|
2364
|
-
let z = y * (12 - 3 * up - 20 * vp) / (4 * vp);
|
|
2365
2360
|
let res = {
|
|
2366
2361
|
mode: "xyz50",
|
|
2367
|
-
x,
|
|
2362
|
+
x: y * (9 * up) / (4 * vp),
|
|
2368
2363
|
y,
|
|
2369
|
-
z
|
|
2364
|
+
z: y * (12 - 3 * up - 20 * vp) / (4 * vp)
|
|
2370
2365
|
};
|
|
2371
2366
|
if (alpha !== void 0) res.alpha = alpha;
|
|
2372
2367
|
return res;
|
|
@@ -2519,8 +2514,7 @@ function find_cusp(a, b) {
|
|
|
2519
2514
|
b: S_cusp * b
|
|
2520
2515
|
});
|
|
2521
2516
|
let L_cusp = Math.cbrt(1 / Math.max(rgb$4.r, rgb$4.g, rgb$4.b));
|
|
2522
|
-
|
|
2523
|
-
return [L_cusp, C_cusp];
|
|
2517
|
+
return [L_cusp, L_cusp * S_cusp];
|
|
2524
2518
|
}
|
|
2525
2519
|
function find_gamut_intersection(a, b, L1, C1$1, L0, cusp = null) {
|
|
2526
2520
|
if (!cusp) cusp = find_cusp(a, b);
|