@terrazzo/token-tools 0.2.7 → 0.2.9
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/css/typography.d.ts +2 -1
- package/dist/css/typography.js +12 -2
- package/dist/css/typography.js.map +1 -1
- package/package.json +1 -1
- package/.turbo/turbo-build.log +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @terrazzo/token-tools
|
|
2
2
|
|
|
3
|
+
## 0.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#387](https://github.com/terrazzoapp/terrazzo/pull/387) [`f14224b`](https://github.com/terrazzoapp/terrazzo/commit/f14224b5ae3dcf31d1a67a2f3346ffabfe7dc71b) Thanks [@drwpow](https://github.com/drwpow)! - Fix incorrect parsing of typography tokens’ lineHeight when it’s a dimension value.
|
|
8
|
+
|
|
9
|
+
- [#387](https://github.com/terrazzoapp/terrazzo/pull/387) [`f14224b`](https://github.com/terrazzoapp/terrazzo/commit/f14224b5ae3dcf31d1a67a2f3346ffabfe7dc71b) Thanks [@drwpow](https://github.com/drwpow)! - Fix warning on parsing dimension tokens in typography tokens
|
|
10
|
+
|
|
11
|
+
## 0.2.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#380](https://github.com/terrazzoapp/terrazzo/pull/380) [`a18c0a9`](https://github.com/terrazzoapp/terrazzo/commit/a18c0a972b6e6c19f2c0856e10326d96a838fcd2) Thanks [@drwpow](https://github.com/drwpow)! - Fix bug in normalize where modes were skipped over
|
|
16
|
+
|
|
3
17
|
## 0.2.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/css/typography.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { TypographyValue } from '../types.js';
|
|
1
2
|
import { type IDGenerator } from './lib.js';
|
|
2
3
|
/** Convert typography value to multiple CSS values */
|
|
3
|
-
export declare function transformTypographyValue(value:
|
|
4
|
+
export declare function transformTypographyValue(value: TypographyValue, { aliasOf, partialAliasOf, transformAlias, }?: {
|
|
4
5
|
aliasOf?: string;
|
|
5
6
|
partialAliasOf?: Record<keyof typeof value, string>;
|
|
6
7
|
transformAlias?: IDGenerator;
|
package/dist/css/typography.js
CHANGED
|
@@ -3,6 +3,7 @@ import { transformDimensionValue } from './dimension.js';
|
|
|
3
3
|
import { transformFontFamilyValue } from './font-family.js';
|
|
4
4
|
import { transformFontWeightValue } from './font-weight.js';
|
|
5
5
|
import { defaultAliasTransform, transformCompositeAlias } from './lib.js';
|
|
6
|
+
import { transformNumberValue } from './number.js';
|
|
6
7
|
import { transformStringValue } from './string.js';
|
|
7
8
|
/** Convert typography value to multiple CSS values */
|
|
8
9
|
export function transformTypographyValue(value, { aliasOf, partialAliasOf, transformAlias = defaultAliasTransform, } = {}) {
|
|
@@ -21,8 +22,8 @@ export function transformTypographyValue(value, { aliasOf, partialAliasOf, trans
|
|
|
21
22
|
transformedValue = transformFontFamilyValue(subvalue, { transformAlias });
|
|
22
23
|
break;
|
|
23
24
|
}
|
|
24
|
-
case '
|
|
25
|
-
case '
|
|
25
|
+
case 'fontSize':
|
|
26
|
+
case 'letterSpacing': {
|
|
26
27
|
transformedValue = transformDimensionValue(subvalue, { transformAlias });
|
|
27
28
|
break;
|
|
28
29
|
}
|
|
@@ -30,6 +31,15 @@ export function transformTypographyValue(value, { aliasOf, partialAliasOf, trans
|
|
|
30
31
|
transformedValue = transformFontWeightValue(subvalue, { transformAlias });
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
34
|
+
case 'lineHeight': {
|
|
35
|
+
if (typeof subvalue === 'number') {
|
|
36
|
+
transformedValue = transformNumberValue(subvalue, { transformAlias });
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
transformedValue = transformDimensionValue(subvalue, { transformAlias });
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
33
43
|
default: {
|
|
34
44
|
transformedValue = transformStringValue(subvalue, { transformAlias });
|
|
35
45
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/css/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAoB,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,sDAAsD;AACtD,MAAM,UAAU,wBAAwB,CACtC,
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/css/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAoB,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,sDAAsD;AACtD,MAAM,UAAU,wBAAwB,CACtC,KAAsB,EACtB,EACE,OAAO,EACP,cAAc,EACd,cAAc,GAAG,qBAAqB,MACqE,EAAE;IAE/G,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,uBAAuB,CA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,EAAE,CAAC,CAAC;oBAChF,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,GAAG,gBAAgB,CAAC;IACjD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @terrazzo/token-tools@0.2.7 build /home/runner/work/terrazzo/terrazzo/packages/token-tools
|
|
3
|
-
> pnpm run build:ts && pnpm -w run inject-license @terrazzo/token-tools dist/index.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> @terrazzo/token-tools@0.2.7 build:ts /home/runner/work/terrazzo/terrazzo/packages/token-tools
|
|
7
|
-
> tsc -p tsconfig.build.json
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> @terrazzo/monorepo@ inject-license /home/runner/work/terrazzo/terrazzo
|
|
11
|
-
> node scripts/inject-license.js "@terrazzo/token-tools" "dist/index.js"
|
|
12
|
-
|