@fusion.dev/helix-theme 0.140.0 → 0.141.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/README.md +2 -1
- package/dist/types.d.ts +24 -5
- package/package.json +1 -1
- package/wasm/fusion_helix_theme_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,8 @@ document.head.append(Object.assign(document.createElement('style'), {
|
|
|
20
20
|
|
|
21
21
|
Give it what you mean, a brand color and whatever else you have an opinion
|
|
22
22
|
about, and it returns every token the system needs with the contrast
|
|
23
|
-
relationships already satisfied
|
|
23
|
+
relationships already satisfied. With no brand, the theme is ink: near-black on
|
|
24
|
+
a light page and near-white on a dark one.
|
|
24
25
|
|
|
25
26
|
**It has to be awaited and there is no way around that.** WebAssembly
|
|
26
27
|
instantiates asynchronously, so the engine is handed back from `initTheme`
|
package/dist/types.d.ts
CHANGED
|
@@ -83,9 +83,9 @@ export interface PairingRequest {
|
|
|
83
83
|
export interface ThemeIntent {
|
|
84
84
|
/**
|
|
85
85
|
* The second emphasis. A color pins it and the relationship stands aside.
|
|
86
|
-
* Unnamed, it is the brand
|
|
87
|
-
* `tone="accent"` draws in it.
|
|
88
|
-
* complement.
|
|
86
|
+
* Unnamed, it is the brand, or the ink where there is no brand: a palette
|
|
87
|
+
* with one color has one, and `tone="accent"` draws in it.
|
|
88
|
+
* `{ from: 'brand', rotate: 180 }` asks for the complement.
|
|
89
89
|
*/
|
|
90
90
|
accent?: Seed;
|
|
91
91
|
/**
|
|
@@ -103,9 +103,28 @@ export interface ThemeIntent {
|
|
|
103
103
|
light?: Color;
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
106
|
-
* The one color most consumers care about,
|
|
106
|
+
* The one color most consumers care about, or one for each scheme.
|
|
107
|
+
*
|
|
108
|
+
* **Unnamed, the theme is ink**: the primary is the neutral's own near-black
|
|
109
|
+
* on a light page and near-white on a dark one, and a filled control is drawn
|
|
110
|
+
* in it with the page's color for its label. An accent related to the brand
|
|
111
|
+
* is refused without one, and an accent named as a color is the one second
|
|
112
|
+
* color an ink theme has.
|
|
113
|
+
*
|
|
114
|
+
* **A brand that already reads is kept as it is.** Where the color clears
|
|
115
|
+
* every ground it lands on, it is the primary, and where its label clears on
|
|
116
|
+
* it, it is the fill. A navy brand stays navy on a light page. A color that
|
|
117
|
+
* does not read is moved only as far as the contrast target needs.
|
|
118
|
+
*
|
|
119
|
+
* **`{ light, dark }` names the color each scheme takes**, the way
|
|
120
|
+
* `background` does, for a brand whose two faces are two colors: a navy that
|
|
121
|
+
* turns sky blue in the dark. A scheme the pair leaves out has no brand, and
|
|
122
|
+
* is ink.
|
|
107
123
|
*/
|
|
108
|
-
brand
|
|
124
|
+
brand?: Color | {
|
|
125
|
+
dark?: Color;
|
|
126
|
+
light?: Color;
|
|
127
|
+
};
|
|
109
128
|
/**
|
|
110
129
|
* How saturated the palette is, independent of which hue it is.
|
|
111
130
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-theme",
|
|
3
3
|
"description": "Theme derivation engine. Computes a complete, contrast-guaranteed token set from intent inputs.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.141.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
Binary file
|