mdeck 3.9.0 → 3.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.10.0 — 2026-10-11
4
+
5
+ - Glass has a `motion` setting: `motion: 0` holds its light still, for recordings and calm rooms. The guide for theme authors names the settings themes share: `motion` for what moves while presenting and `texture` for grain, paper and scanlines.
6
+
3
7
  ## 3.9.0 — 2026-10-11
4
8
 
5
9
  - Theme parameters say what kind of value they take: `type = "size"` (pixels, with `min`, `max` and `step`), `"number"`, `"switch"` (1 or 0), `"choice"` (one of `choices`) or `"font"`. The deck settings show a slider, a box to tick or a list instead of a text box; a deck value that does not fit is left out, so the theme's own value stays, and `mdeck check` says why; a value outside the range is used, with a warning. `mdeck list themes` shows each theme's settings and what they take, and the design page lets a theme's author set the kind. `mdeck themes build` writes each theme's settings into the gallery's `looks.json`. A parameter without a type takes any text, as before. The built-in themes give every parameter a type and a description with its default and range. A theme that uses `type` needs this version of mdeck.
@@ -3,7 +3,7 @@ kind = "theme"
3
3
  id = "glass"
4
4
  title = "Glass"
5
5
  description = "Liquid glass: soft pools of light behind every slide, content without frames, titles on a frosted pane with a bright rim; capsule labels, glass beads for list markers and a glass lens for chapter numbers; Geist throughout, dark by default."
6
- version = "0.2.0"
6
+ version = "0.3.0"
7
7
  author = "Tilman Schieber"
8
8
  license = "MIT"
9
9
  # The palette this theme uses unless the deck sets one; colours come only from palettes.
@@ -40,6 +40,8 @@ styles = "styles.css"
40
40
  # The glass: how round the panes are and how much they blur what is behind them.
41
41
  "--glass-radius" = "44px"
42
42
  "--glass-blur" = "28px"
43
+ # Whether the light drifts (1) or holds still (0).
44
+ "--motion" = "1"
43
45
 
44
46
  # Type families
45
47
  "--font-display" = "\"Geist\", \"Inter\", \"Helvetica Neue\", Arial, sans-serif"
@@ -64,6 +66,12 @@ min = 0
64
66
  max = 48
65
67
  description = "28px by default, from 0px (clear glass) to about 48px."
66
68
 
69
+ [params.motion]
70
+ token = "--motion"
71
+ title = "Motion"
72
+ type = "switch"
73
+ description = "1 (the default) lets the pools of light drift while presenting; 0 keeps them still, for recordings or a calm room. Print and reduced motion are always still."
74
+
67
75
  # What this theme is for and how to write for it: shown in listings, and read
68
76
  # by assistants that write slides as the theme author's advice.
69
77
  [guide]
@@ -53,9 +53,9 @@
53
53
  to tint. Radial gradients only (no blur filter): they stay vector in a
54
54
  PDF and are cheap to draw. */
55
55
  background:
56
- radial-gradient(circle max(var(--a-r) * 2.8, 720px) at calc(var(--a-x) + var(--dx)) calc(var(--a-y) + var(--dy)), var(--wash-a) 0%, color-mix(in oklab, var(--wash-a) 55%, transparent) 40%, transparent 100%),
57
- radial-gradient(circle max(var(--b-r) * 2.8, 640px) at calc(var(--b-x) - var(--dx)) calc(var(--b-y) - var(--dy)), var(--wash-b) 0%, color-mix(in oklab, var(--wash-b) 55%, transparent) 40%, transparent 100%),
58
- radial-gradient(circle max(var(--c-r) * 2.6, 520px) at calc(var(--c-x) + var(--dy)) calc(var(--c-y) + var(--dx)), var(--wash-c) 0%, transparent 100%),
56
+ radial-gradient(circle max(var(--a-r) * 2.8, 720px) at calc(var(--a-x) + var(--dx) * var(--motion)) calc(var(--a-y) + var(--dy) * var(--motion)), var(--wash-a) 0%, color-mix(in oklab, var(--wash-a) 55%, transparent) 40%, transparent 100%),
57
+ radial-gradient(circle max(var(--b-r) * 2.8, 640px) at calc(var(--b-x) - var(--dx) * var(--motion)) calc(var(--b-y) - var(--dy) * var(--motion)), var(--wash-b) 0%, color-mix(in oklab, var(--wash-b) 55%, transparent) 40%, transparent 100%),
58
+ radial-gradient(circle max(var(--c-r) * 2.6, 520px) at calc(var(--c-x) + var(--dy) * var(--motion)) calc(var(--c-y) + var(--dx) * var(--motion)), var(--wash-c) 0%, transparent 100%),
59
59
  var(--canvas);
60
60
  }
61
61
 
@@ -526,7 +526,7 @@ strong { font-weight: 650; color: var(--ink); }
526
526
  }
527
527
 
528
528
  /* The light drifts slowly while presenting; never in print or for people
529
- who prefer less motion. */
529
+ who prefer less motion. motion: 0 holds it still. */
530
530
  @media (prefers-reduced-motion: no-preference) {
531
531
  .slide:is(.slide--title, .slide--chapter, .slide--focus) { animation: glass-drift 22s ease-in-out infinite alternate; }
532
532
  }
@@ -82,7 +82,10 @@ params:
82
82
 
83
83
  Available params depend on the theme; `mdeck list themes` shows them with the
84
84
  kind of value each takes: a size in pixels, a number, a switch (`1` or `0`), a
85
- choice or a font. `0` or `0px` turns a feature off. A value that does not fit
85
+ choice or a font. `0` or `0px` turns a feature off.
86
+ A font named this way is not downloaded: it has to be installed on the
87
+ computer that shows the slides, or the browser uses the next font in the
88
+ list; PDFs and single files embed only the theme's own fonts. A value that does not fit
86
89
  is left out, and `mdeck check` says why. Colours are not params: they come from
87
90
  the palette.
88
91
 
@@ -138,7 +138,7 @@ params:
138
138
  fontBody: "Georgia, serif"
139
139
  ```
140
140
 
141
- Its default is simply the token's value. Colours are not parameters: they come from the palette.
141
+ Its default is simply the token's value. Colours are not parameters: they come from the palette. A font a deck names this way is not downloaded: it has to be installed on the computer that shows the slides, or the browser uses the next font in the list; PDFs and single files embed only the theme's own fonts.
142
142
 
143
143
  Say what kind of value a parameter takes with `type`, so mdeck can check what authors write and the editor can offer the right control:
144
144
 
@@ -167,6 +167,8 @@ A few habits make parameters easy to use:
167
167
  - Turn a feature off with its parameter at zero (`0px`, `0`) rather than a second parameter.
168
168
  - Use a switch or a strength by multiplying with it, as in `calc(330px * var(--shapes))`.
169
169
  - Let the `description` give the default and a sensible range: the editor shows it under the control, and assistants read it.
170
+ - Offer what people change from one talk to the next, because of the room, the medium or the content, and leave sizes and distances at the values the theme was made with.
171
+ - Use the shared names where they fit, so people learn them once: `motion` (a switch) turns off everything that moves while presenting, for recordings and calm rooms; `texture` (a switch) turns off grain, paper and scanlines, for washed-out projectors and handouts.
170
172
 
171
173
  ## Say what it is for
172
174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdeck",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "type": "module",
5
5
  "description": "Write slides as a plain text file, present them in the browser, share them as one HTML file or PDF.",
6
6
  "license": "MIT",