@liberation-data/desk 0.32.1 → 0.33.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 CHANGED
@@ -289,7 +289,8 @@ Text that is read at length, such as a document's section, an answer or a report
289
289
 
290
290
  A window's surface takes the theme's colour, which is right for chrome and tiring behind paragraphs. A
291
291
  page is a sheet on a neutral ground of its own, `--desk-page`: a shade off the window in a light theme
292
- and a terminal's grey in a dark one. `fill` makes it at least as tall as the room it is given, so a short
292
+ and a terminal's grey in a dark one. A trace of the accent is mixed into it, `--desk-page-tint`, so the
293
+ sheet belongs to the theme it is read in; set that to `0%` for the neutral alone. `fill` makes it at least as tall as the room it is given, so a short
293
294
  section is still a whole sheet.
294
295
 
295
296
  `InfoTip` is an (i) holding what the view would explain if asked, so a window does not open with a
@@ -65,6 +65,9 @@
65
65
  /* What long text lies on (`Page`). Neutral, not the surface's hue: a shade off a white window,
66
66
  a terminal's grey in a dark one. */
67
67
  --desk-page: #f4f5f7;
68
+ /* How much of the accent is mixed into it, so the sheet belongs to the theme it is read in.
69
+ 0% is the neutral alone. */
70
+ --desk-page-tint: 4%;
68
71
  --desk-on-accent: #ffffff;
69
72
  --desk-ease: cubic-bezier(.32, .72, 0, 1);
70
73
  --desk-dock-size: 48px;
@@ -103,6 +106,7 @@
103
106
  --desk-led-glow: 7px;
104
107
  --desk-field-bg: rgb(0 0 0 / 35%);
105
108
  --desk-page: #26282c;
109
+ --desk-page-tint: 5%;
106
110
  }
107
111
  }
108
112
 
@@ -128,4 +132,5 @@
128
132
  --desk-led-glow: 7px;
129
133
  --desk-field-bg: rgb(0 0 0 / 35%);
130
134
  --desk-page: #26282c;
135
+ --desk-page-tint: 5%;
131
136
  }
@@ -440,7 +440,9 @@
440
440
  padding: var(--desk-space-5) var(--desk-space-6);
441
441
  border: 1px solid var(--desk-rule);
442
442
  border-radius: var(--desk-control-radius);
443
- background: var(--desk-page);
443
+ /* Mixed here and not in the token: an app that sets its accent below the root would otherwise
444
+ get the root's accent in its page. */
445
+ background: color-mix(in srgb, var(--desk-accent) var(--desk-page-tint), var(--desk-page));
444
446
  color: var(--desk-ink);
445
447
  }
446
448
 
package/dist/desk.css CHANGED
@@ -65,6 +65,9 @@
65
65
  /* What long text lies on (`Page`). Neutral, not the surface's hue: a shade off a white window,
66
66
  a terminal's grey in a dark one. */
67
67
  --desk-page: #f4f5f7;
68
+ /* How much of the accent is mixed into it, so the sheet belongs to the theme it is read in.
69
+ 0% is the neutral alone. */
70
+ --desk-page-tint: 4%;
68
71
  --desk-on-accent: #ffffff;
69
72
  --desk-ease: cubic-bezier(.32, .72, 0, 1);
70
73
  --desk-dock-size: 48px;
@@ -103,6 +106,7 @@
103
106
  --desk-led-glow: 7px;
104
107
  --desk-field-bg: rgb(0 0 0 / 35%);
105
108
  --desk-page: #26282c;
109
+ --desk-page-tint: 5%;
106
110
  }
107
111
  }
108
112
 
@@ -128,6 +132,7 @@
128
132
  --desk-led-glow: 7px;
129
133
  --desk-field-bg: rgb(0 0 0 / 35%);
130
134
  --desk-page: #26282c;
135
+ --desk-page-tint: 5%;
131
136
  }
132
137
 
133
138
  /* @liberation-data/desk — windows.css */
@@ -572,7 +577,9 @@
572
577
  padding: var(--desk-space-5) var(--desk-space-6);
573
578
  border: 1px solid var(--desk-rule);
574
579
  border-radius: var(--desk-control-radius);
575
- background: var(--desk-page);
580
+ /* Mixed here and not in the token: an app that sets its accent below the root would otherwise
581
+ get the root's accent in its page. */
582
+ background: color-mix(in srgb, var(--desk-accent) var(--desk-page-tint), var(--desk-page));
576
583
  color: var(--desk-ink);
577
584
  }
578
585
 
package/llms.txt CHANGED
@@ -261,6 +261,7 @@ window; `lazyWindow` retries its import on reload, unlike `React.lazy`, which ca
261
261
  <Section title={ReactNode} actions?={ReactNode}>{content}</Section> // a titled group inside a pane
262
262
  <Toolbar label?={string} trailing?={ReactNode}>{controls}</Toolbar> // className="desk-grow" takes spare room
263
263
  <Page label?={string} fill?>{long text}</Page> // a sheet for text read at length, on --desk-page; fill = at least the room's height
264
+ // --desk-page-tint (4% light, 5% dark) is how much --desk-accent is mixed into the page; 0% for the neutral alone.
264
265
  // text size by class, never px: desk-text-body | desk-text-small | desk-text-caption, plus desk-text-muted.
265
266
  // the scale is tokens: --desk-text-caption 11, -small 12, -body 13, -lead 15, -title 17, -display 22, -hero 28.
266
267
  <InfoTip label={string} placement?={'below'|'above'} align?={'start'|'end'}>{explanation}</InfoTip>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liberation-data/desk",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "description": "A desktop for the web, for React: windows, a dock, menus and commands, controls, tours and setup assistants.",
5
5
  "keywords": [
6
6
  "react",
@@ -64,6 +64,9 @@
64
64
  /* What long text lies on (`Page`). Neutral, not the surface's hue: a shade off a white window,
65
65
  a terminal's grey in a dark one. */
66
66
  --desk-page: #f4f5f7;
67
+ /* How much of the accent is mixed into it, so the sheet belongs to the theme it is read in.
68
+ 0% is the neutral alone. */
69
+ --desk-page-tint: 4%;
67
70
  --desk-on-accent: #ffffff;
68
71
  --desk-ease: cubic-bezier(.32, .72, 0, 1);
69
72
  --desk-dock-size: 48px;
@@ -102,6 +105,7 @@
102
105
  --desk-led-glow: 7px;
103
106
  --desk-field-bg: rgb(0 0 0 / 35%);
104
107
  --desk-page: #26282c;
108
+ --desk-page-tint: 5%;
105
109
  }
106
110
  }
107
111
 
@@ -127,4 +131,5 @@
127
131
  --desk-led-glow: 7px;
128
132
  --desk-field-bg: rgb(0 0 0 / 35%);
129
133
  --desk-page: #26282c;
134
+ --desk-page-tint: 5%;
130
135
  }
@@ -439,7 +439,9 @@
439
439
  padding: var(--desk-space-5) var(--desk-space-6);
440
440
  border: 1px solid var(--desk-rule);
441
441
  border-radius: var(--desk-control-radius);
442
- background: var(--desk-page);
442
+ /* Mixed here and not in the token: an app that sets its accent below the root would otherwise
443
+ get the root's accent in its page. */
444
+ background: color-mix(in srgb, var(--desk-accent) var(--desk-page-tint), var(--desk-page));
443
445
  color: var(--desk-ink);
444
446
  }
445
447