@grafctory/skin 0.0.0-stage → 0.3.1

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.
Files changed (78) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +469 -2
  3. package/dist/index.core.d.ts +201 -0
  4. package/dist/index.core.d.ts.map +1 -0
  5. package/dist/index.core.js +17 -0
  6. package/dist/index.core.js.map +1 -0
  7. package/dist/index.css +126 -0
  8. package/dist/index.d.ts +432 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +184 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/markup/alerts.css +83 -0
  13. package/dist/markup/blocks.css +255 -0
  14. package/dist/markup/forms.css +551 -0
  15. package/dist/markup/headings.css +131 -0
  16. package/dist/markup/highlights.css +38 -0
  17. package/dist/markup/inlines.css +183 -0
  18. package/dist/markup/lists.css +206 -0
  19. package/dist/markup/reset.css +38 -0
  20. package/dist/markup/tables.css +78 -0
  21. package/dist/presets/inter.css +194 -0
  22. package/dist/presets/roboto.css +198 -0
  23. package/dist/tokens/borders.css +151 -0
  24. package/dist/tokens/borders.d.ts +57 -0
  25. package/dist/tokens/borders.d.ts.map +1 -0
  26. package/dist/tokens/borders.js +72 -0
  27. package/dist/tokens/borders.js.map +1 -0
  28. package/dist/tokens/colors.css +515 -0
  29. package/dist/tokens/colors.d.ts +171 -0
  30. package/dist/tokens/colors.d.ts.map +1 -0
  31. package/dist/tokens/colors.js +186 -0
  32. package/dist/tokens/colors.js.map +1 -0
  33. package/dist/tokens/elevations.css +110 -0
  34. package/dist/tokens/elevations.d.ts +54 -0
  35. package/dist/tokens/elevations.d.ts.map +1 -0
  36. package/dist/tokens/elevations.js +69 -0
  37. package/dist/tokens/elevations.js.map +1 -0
  38. package/dist/tokens/layers.css +57 -0
  39. package/dist/tokens/layers.d.ts +34 -0
  40. package/dist/tokens/layers.d.ts.map +1 -0
  41. package/dist/tokens/layers.js +49 -0
  42. package/dist/tokens/layers.js.map +1 -0
  43. package/dist/tokens/motions.css +91 -0
  44. package/dist/tokens/motions.d.ts +40 -0
  45. package/dist/tokens/motions.d.ts.map +1 -0
  46. package/dist/tokens/motions.js +55 -0
  47. package/dist/tokens/motions.js.map +1 -0
  48. package/dist/tokens/opacities.css +41 -0
  49. package/dist/tokens/opacities.d.ts +32 -0
  50. package/dist/tokens/opacities.d.ts.map +1 -0
  51. package/dist/tokens/opacities.js +47 -0
  52. package/dist/tokens/opacities.js.map +1 -0
  53. package/dist/tokens/palettes.css +546 -0
  54. package/dist/tokens/palettes.d.ts +140 -0
  55. package/dist/tokens/palettes.d.ts.map +1 -0
  56. package/dist/tokens/palettes.js +155 -0
  57. package/dist/tokens/palettes.js.map +1 -0
  58. package/dist/tokens/scalings.css +81 -0
  59. package/dist/tokens/scalings.d.ts +31 -0
  60. package/dist/tokens/scalings.d.ts.map +1 -0
  61. package/dist/tokens/scalings.js +46 -0
  62. package/dist/tokens/scalings.js.map +1 -0
  63. package/dist/tokens/spacings.css +78 -0
  64. package/dist/tokens/spacings.d.ts +34 -0
  65. package/dist/tokens/spacings.d.ts.map +1 -0
  66. package/dist/tokens/spacings.js +49 -0
  67. package/dist/tokens/spacings.js.map +1 -0
  68. package/dist/tokens/typography.css +156 -0
  69. package/dist/tokens/typography.d.ts +77 -0
  70. package/dist/tokens/typography.d.ts.map +1 -0
  71. package/dist/tokens/typography.js +92 -0
  72. package/dist/tokens/typography.js.map +1 -0
  73. package/dist/tokens/viewports.css +101 -0
  74. package/dist/tokens/viewports.d.ts +75 -0
  75. package/dist/tokens/viewports.d.ts.map +1 -0
  76. package/dist/tokens/viewports.js +90 -0
  77. package/dist/tokens/viewports.js.map +1 -0
  78. package/package.json +87 -4
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Design system internals.
3
+ *
4
+ * Settles what each token may be assigned: the tokens it may be named from, and the CSS values it takes written out.
5
+ * A consumer meets both through the published value type and addresses neither on its own.
6
+ *
7
+ * @module index.core
8
+ */
9
+ import type { Token } from "./index.js";
10
+ /**
11
+ * The tokens a token may be named from, each standing for the value it carries.
12
+ *
13
+ * Resolves a token to the ladder it belongs to, so an editor offers the handful of names that would make sense where
14
+ * it is assigned rather than every name the design system carries, or every name of the same broad sort: a text size
15
+ * offers the type and scaling ladders, both of which are measured against the text, and not the spacing one, though
16
+ * all three are lengths, because a size set from a gap is not a thing anyone means. A token belonging to no ladder, a
17
+ * switch or a keyword, resolves to nothing and is left to the literal alone. A box token, shaping the element it is
18
+ * assigned to, resolves to the ladder it is set from without being a step on it. A surface also takes a palette
19
+ * colour, tinting an area by the class it belongs to or by the colour an author gave it. The text the area holds
20
+ * then needs a `color` of its own, since the fill replaces the page for everything inside it.
21
+ *
22
+ * @typeParam K The token being assigned
23
+ */
24
+ export type Alias<K extends Token> = K extends Palette ? Palette : K extends Ink ? Ink : K extends Fill ? Fill | Palette : K extends Type ? Type | Scaling : K extends Scaling ? Scaling : K extends Spacing | Padding ? Spacing : K extends Radius | Rounding ? Radius : K extends Stroke ? Stroke : K extends Tracking ? Tracking : K extends Weight ? Weight : K extends Opacity ? Opacity : K extends Layer ? Layer : K extends Timing ? Timing : K extends Easing ? Easing : K extends Shadow | Lifting ? Shadow : K extends Family ? Family : K extends Filter ? Filter : never;
25
+ /**
26
+ * The CSS values a token takes written out, beside the tokens it may be named from.
27
+ *
28
+ * Resolves a token to the shape of the value it carries, so a colour is offered where a colour goes and a keyword
29
+ * token is held to the words it is defined over. A value of another shape is rejected at the call site rather than
30
+ * assigned and left to resolve to nothing.
31
+ *
32
+ * A function counts as written out, whatever it computes: `var()`, `calc()` and `color-mix()` alike stand wherever
33
+ * their shape admits a value at all, since what one resolves to is beyond the reach of a type. Openness beyond that
34
+ * is granted shape by shape rather than wholesale, an arbitrary string being taken only where CSS itself states no
35
+ * shape: a font stack, and the shorthands a shadow and an outline are written as.
36
+ *
37
+ * @typeParam K The token being assigned
38
+ */
39
+ export type Literal<K extends Token> = K extends Palette | Ink | Fill ? Paint : K extends Type | Scaling | Spacing | Radius | Stroke | Tracking | Padding | Rounding | "inlineSizeProse" ? Size : K extends `lineHeight${string}` ? Leading : K extends Weight ? Heft : K extends Opacity ? Fade : K extends Layer ? Order : K extends Timing ? Time : K extends Easing ? Curve : K extends "borderStyle" ? Line : K extends "textTransformHeading" | "textTransformCaps" ? Case : K extends Breakpoint ? Switch : K extends Family | Shadow | Lifting ? Open : K extends Filter ? Blur : never;
40
+ /**
41
+ * The scale steps, series slots, area classes and editor colours, which name a colour by position, by the thing it
42
+ * belongs to or by its hue, never by role, so a role never takes one and a surface fill may.
43
+ */
44
+ export type Palette = Extract<Token, `colorGray${Step}` | `colorSubtle${Step}` | `colorStrong${Step}` | `colorHeat${Step}` | `colorSeries${Slot}` | `colorArea${Slot}` | "colorBlack" | "colorGray" | "colorWhite" | `color${Hue}${"" | "Strong" | "Subtle"}`>;
45
+ /**
46
+ * The tokens painting a mark or a passage of text, the rule between two of them and the edge of a control.
47
+ */
48
+ export type Ink = Exclude<Extract<Token, `color${string}` | `borderColor${string}`>, Palette>;
49
+ /**
50
+ * The tokens painting a surface.
51
+ */
52
+ export type Fill = Extract<Token, `backgroundColor${string}`>;
53
+ /**
54
+ * The tokens sizing text.
55
+ */
56
+ export type Type = Extract<Token, `fontSize${string}`>;
57
+ /**
58
+ * The tokens sizing a thing against the text around it.
59
+ */
60
+ export type Scaling = Extract<Token, `scaling${string}`>;
61
+ /**
62
+ * The tokens setting a thing apart from its neighbour.
63
+ */
64
+ export type Spacing = Extract<Token, `spacing${string}`>;
65
+ /**
66
+ * The steps a corner is rounded on.
67
+ */
68
+ export type Radius = Exclude<Extract<Token, `borderRadius${string}`>, Rounding>;
69
+ /**
70
+ * The tokens sizing a line.
71
+ */
72
+ export type Stroke = Extract<Token, "borderWidth" | `strokeWidth${string}`>;
73
+ /**
74
+ * The tokens tracking a run of text.
75
+ */
76
+ export type Tracking = Extract<Token, `letterSpacing${string}`>;
77
+ /**
78
+ * The tokens weighting text.
79
+ */
80
+ export type Weight = Extract<Token, `fontWeight${string}`>;
81
+ /**
82
+ * The tokens fading a thing present but not available.
83
+ */
84
+ export type Opacity = Extract<Token, `opacity${string}`>;
85
+ /**
86
+ * The tokens ordering two things that overlap.
87
+ */
88
+ export type Layer = Extract<Token, `zIndex${string}`>;
89
+ /**
90
+ * The tokens timing a change.
91
+ */
92
+ export type Timing = Extract<Token, `duration${string}`>;
93
+ /**
94
+ * The tokens curving a change.
95
+ */
96
+ export type Easing = Extract<Token, `easing${string}`>;
97
+ /**
98
+ * The steps a shadow or an outline is drawn from, each stated as a whole shorthand.
99
+ */
100
+ export type Shadow = Exclude<Extract<Token, `boxShadow${string}` | `outline${string}`>, Lifting>;
101
+ /**
102
+ * The tokens softening what shows through a translucent surface.
103
+ */
104
+ export type Filter = Extract<Token, `backdropFilter${string}`>;
105
+ /**
106
+ * The tokens carrying a font stack.
107
+ */
108
+ export type Family = Extract<Token, `fontFamily${string}`>;
109
+ /**
110
+ * The tokens telling which breakpoints the viewport has passed.
111
+ */
112
+ export type Breakpoint = Extract<Token, `viewport${string}`>;
113
+ /**
114
+ * The token padding the element it is assigned to, set from a {@link Spacing spacing step}.
115
+ */
116
+ export type Padding = Extract<Token, "padding">;
117
+ /**
118
+ * The token rounding the element it is assigned to, set from a {@link Radius radius step}.
119
+ */
120
+ export type Rounding = Extract<Token, "borderRadius">;
121
+ /**
122
+ * The token lifting the element it is assigned to, set from a {@link Shadow shadow step}.
123
+ */
124
+ export type Lifting = Extract<Token, "boxShadow">;
125
+ /**
126
+ * A step of a ten-step scale, and a slot of a series or a class of an area.
127
+ */
128
+ type Step = "010" | "020" | "030" | "040" | "050" | "060" | "070" | "080" | "090" | "100";
129
+ type Slot = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
130
+ /**
131
+ * A hue of the editor colours.
132
+ */
133
+ type Hue = "Red" | "Yellow" | "Green" | "Blue" | "Purple";
134
+ /**
135
+ * A colour, written as a hex literal or as one of the two colours CSS names against the context.
136
+ */
137
+ type Paint = `#${string}` | "currentColor" | "transparent" | Call;
138
+ /**
139
+ * A length, carrying a unit unless it is zero.
140
+ */
141
+ type Size = 0 | `${number}${Unit}` | Call;
142
+ /**
143
+ * A line height, as a multiple of the font size, a length, or whatever the face itself calls for.
144
+ */
145
+ type Leading = number | Size | "normal";
146
+ /**
147
+ * A font weight, on the numeric ladder or as a keyword standing on it.
148
+ */
149
+ type Heft = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "normal" | "bold" | "lighter" | "bolder";
150
+ /**
151
+ * A degree of opacity, as a fraction of one or as a percentage.
152
+ */
153
+ type Fade = number | `${number}%` | Call;
154
+ /**
155
+ * A stacking position.
156
+ */
157
+ type Order = number | "auto";
158
+ /**
159
+ * A duration, in seconds or milliseconds.
160
+ */
161
+ type Time = `${number}s` | `${number}ms` | Call;
162
+ /**
163
+ * An acceleration curve, as a keyword or as a curve function.
164
+ */
165
+ type Curve = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end" | Call;
166
+ /**
167
+ * A line style.
168
+ */
169
+ type Line = "none" | "hidden" | "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset";
170
+ /**
171
+ * A text casing, or `none` to leave the text as written.
172
+ */
173
+ type Case = "none" | "capitalize" | "uppercase" | "lowercase";
174
+ /**
175
+ * A filter applied to what shows through, as a chain of filter functions or as none at all.
176
+ */
177
+ type Blur = "none" | Call;
178
+ /**
179
+ * The answer a breakpoint switch carries.
180
+ */
181
+ type Switch = "on" | "off";
182
+ /**
183
+ * A value CSS states no shape for, as a font stack or a shorthand.
184
+ *
185
+ * The bare `string` is intersected with an empty type, which keeps the token names as suggestions of their own rather
186
+ * than letting them dissolve into the wider type; it accepts exactly what `string` accepts.
187
+ */
188
+ type Open = string & {};
189
+ /**
190
+ * A CSS function call.
191
+ *
192
+ * Stands wherever a value is computed rather than written out, `var()`, `calc()` and `color-mix()` alike. What a
193
+ * function resolves to is beyond the reach of a type, so one is taken wherever a shape admits a value of its own.
194
+ */
195
+ type Call = `${string}(${string})`;
196
+ /**
197
+ * The unit a length is measured in.
198
+ */
199
+ type Unit = "px" | "rem" | "em" | "ch" | "ex" | "vw" | "vh" | "vmin" | "vmax" | "pt" | "mm" | "cm" | "in" | "%";
200
+ export {};
201
+ //# sourceMappingURL=index.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.core.d.ts","sourceRoot":"","sources":["../src/index.core.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,KAAK,IAChC,CAAC,SAAS,OAAO,GAAG,OAAO,GAC1B,CAAC,SAAS,GAAG,GAAG,GAAG,GAClB,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,OAAO,GAC9B,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,OAAO,GAC9B,CAAC,SAAS,OAAO,GAAG,OAAO,GAC1B,CAAC,SAAS,OAAO,GAAG,OAAO,GAAG,OAAO,GACpC,CAAC,SAAS,MAAM,GAAG,QAAQ,GAAG,MAAM,GACnC,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,CAAC,SAAS,QAAQ,GAAG,QAAQ,GAC5B,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,CAAC,SAAS,OAAO,GAAG,OAAO,GAC1B,CAAC,SAAS,KAAK,GAAG,KAAK,GACtB,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,MAAM,GAClC,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,CAAC,SAAS,MAAM,GAAG,MAAM,GACxB,KAAK,CAAA;AAEvB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC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I,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=index.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.core.js","sourceRoot":"","sources":["../src/index.core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
package/dist/index.css ADDED
@@ -0,0 +1,126 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * The token modules come first, the anchors ahead of what derives from them, then the base rules by increasing
19
+ * structural complexity, so a composite takes precedence over the plain elements it is built from. Every one of them
20
+ * is imported into the skin layer. A rule an app or a component writes outside a layer therefore wins whatever order
21
+ * the two stylesheets reach the document in, and whichever selector is the more specific.
22
+ */
23
+
24
+ @import "./tokens/typography.css" layer(skin);
25
+ @import "./tokens/spacings.css" layer(skin);
26
+ @import "./tokens/scalings.css" layer(skin);
27
+ @import "./tokens/colors.css" layer(skin);
28
+ @import "./tokens/borders.css" layer(skin);
29
+ @import "./tokens/elevations.css" layer(skin);
30
+ @import "./tokens/palettes.css" layer(skin);
31
+ @import "./tokens/layers.css" layer(skin);
32
+ @import "./tokens/motions.css" layer(skin);
33
+ @import "./tokens/opacities.css" layer(skin);
34
+ @import "./tokens/viewports.css" layer(skin);
35
+
36
+ @import "./markup/reset.css" layer(skin);
37
+
38
+ @import "./markup/headings.css" layer(skin);
39
+ @import "./markup/inlines.css" layer(skin);
40
+ @import "./markup/blocks.css" layer(skin);
41
+ @import "./markup/highlights.css" layer(skin);
42
+ @import "./markup/lists.css" layer(skin);
43
+ @import "./markup/tables.css" layer(skin);
44
+ @import "./markup/forms.css" layer(skin);
45
+ @import "./markup/alerts.css" layer(skin);
46
+
47
+ /*
48
+ * The page defaults and the attributes any element may carry. Every token value is stated once by the module
49
+ * registering it, so this file only reads the tokens it paints with, and an override stated anywhere reaches it.
50
+ */
51
+
52
+ @layer skin {
53
+
54
+ :root {
55
+
56
+ color-scheme: light dark;
57
+
58
+ color: var(--skin--color);
59
+ background-color: var(--skin--background-color);
60
+
61
+ font-family: var(--skin--font-family);
62
+ font-weight: var(--skin--font-weight);
63
+ line-height: var(--skin--line-height);
64
+
65
+ /*
66
+ * Running text of every kind, from a paragraph to a list item, a cell or a caption, inherits wrapping that
67
+ * keeps a lone word off its last line. Only the style is set, so a run kept on one line still stays on it.
68
+ */
69
+
70
+ text-wrap-style: pretty;
71
+
72
+ /* Greyscale antialiasing keeps macOS from emboldening text; other platforms ignore it. */
73
+
74
+ -webkit-font-smoothing: antialiased;
75
+ -moz-osx-font-smoothing: grayscale;
76
+
77
+ }
78
+
79
+ /*
80
+ * The root keeps the size the reader set, so a rem means that setting wherever it is read, as it does in a media
81
+ * query. The base size stated against it then resolves to one length at every depth, and the page takes it here.
82
+ */
83
+
84
+ body {
85
+ font-size: var(--skin--font-size);
86
+ }
87
+
88
+ /*
89
+ * A pinned scheme is settled by color-scheme, which picks the side of every light-dark() token pair and is what a
90
+ * form control, a scrollbar and a caret answer to. Stated for any element, not only the root, so an island that
91
+ * pins a scheme is not left with the colours of the page around it. The page colours are restated there too,
92
+ * since the island would otherwise inherit them as the root resolved them.
93
+ */
94
+
95
+ [data-scheme="light"] {
96
+ color-scheme: light;
97
+ }
98
+
99
+ [data-scheme="dark"] {
100
+ color-scheme: dark;
101
+ }
102
+
103
+ [data-scheme] {
104
+ color: var(--skin--color);
105
+ background-color: var(--skin--background-color);
106
+ }
107
+
108
+ /*
109
+ * An element marked data-offscreen is kept from sight and out of the page flow while staying in the accessibility
110
+ * tree, for text only a screen reader needs, as a status region or the name of a control shown as an icon.
111
+ * Clipping keeps it from opening a scrollbar, and the unwrapped line keeps its words read out as one run.
112
+ */
113
+
114
+ [data-offscreen] {
115
+ position: absolute;
116
+ width: 1px;
117
+ height: 1px;
118
+ margin: -1px;
119
+ padding: 0;
120
+ overflow: hidden;
121
+ clip-path: inset(50%);
122
+ white-space: nowrap;
123
+ border: 0;
124
+ }
125
+
126
+ }