Skip to content
This repository was archived by the owner on Dec 28, 2022. It is now read-only.

Commit eed7e73

Browse files
author
Jiří Třečák
committed
More structure, added stubs for main transformers that are shared between different blueprints
1 parent 23436f1 commit eed7e73

15 files changed

+43
-19
lines changed

src/borders.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all border tokens as named variables.
44
Tokens are named by their group path and then name,
5-
and their value rendered using `rendered-color` blueprint
5+
and their value rendered using `rendered-border` blueprint
66

77
*}

src/colors.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all color tokens as named variables.
44
Tokens are named by their group path and then name,
55
and their value rendered using `rendered-color` blueprint
66

src/gradients.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all gradient tokens as named variables.
44
Tokens are named by their group path and then name,
5-
and their value rendered using `rendered-color` blueprint
5+
and their value rendered using `gradient-color` blueprint
66

77
*}

src/measures.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all measure tokens as named variables.
44
Tokens are named by their group path and then name,
5-
and their value rendered using `rendered-color` blueprint
5+
and their value rendered using `rendered-measure` blueprint
66

77
*}

src/object-renderers/rendered-border.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to present Border token as CSS string.
3+
Injectable blueprint that represents Border token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

src/object-renderers/rendered-color.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Renderer to convert Color token as CSS string.
3+
Injectable blueprint that represents Color token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

src/object-renderers/rendered-gradient.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to present Gradient token as CSS string.
3+
Injectable blueprint that represents Gradient token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

src/object-renderers/rendered-measure.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to present Measure token as CSS string.
3+
Injectable blueprint that represents Measure token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

src/object-renderers/rendered-name.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to convert name of the token to a CSS string.
3+
Injectable blueprint that represents token name and groups as css-valid string.
44
Note that this only converts the name, actual value is provided somewhere else
55

66

src/object-renderers/rendered-shadow.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to present Shadow token as CSS string.
3+
Injectable blueprint that represents Shadow token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{*
2+
3+
Injectable blueprint that represents full token as key: value to be used inside :root {} declarations.
4+
5+
Source data: Token Metadata and Payload, all types (https://developers.supernova.io/design-system-data/tokens)
6+
Note: Token is passed as `context` property because it is injected
7+
8+
{
9+
"context": {
10+
"id": string
11+
"name": string
12+
"description": string
13+
"tokenType": Depends on the token type
14+
"origin": ItemOrigin | null
15+
"value": Depends on the token type
16+
}
17+
}
18+
19+
20+
Rendered as:
21+
22+
--[name]: [value];
23+
24+
*}

src/object-renderers/rendered-typography.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Rendered to present Typography token as CSS string.
3+
Injectable blueprint that represents Typography token as CSS string.
44
Note that this only converts the value, actual name is provided somewhere else
55

66

src/radii.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all radii tokens as named variables.
44
Tokens are named by their group path and then name,
5-
and their value rendered using `rendered-color` blueprint
5+
and their value rendered using `rendered-radii` blueprint
66

77
*}

src/shadows.pr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all shadow tokens as named variables.
44
Tokens are named by their group path and then name,
5-
and their value rendered using `rendered-color` blueprint
5+
and their value rendered using `shadow-color` blueprint
66

77
*}

src/typography.pr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{*
22

3-
Generate all tokens as named variables.
3+
Generate all typography tokens as named variables.
44
Tokens are named by their group path and then name,
55
and their value rendered using `rendered-color` blueprint
66

0 commit comments

Comments
 (0)