@promptctl/rich-js 0.28.0 → 0.29.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.
Files changed (162) hide show
  1. package/README.md +7 -7
  2. package/dist/core/animation.d.ts +37 -37
  3. package/dist/core/animation.js +61 -61
  4. package/dist/core/ansi.d.ts +4 -4
  5. package/dist/core/ansi.js +9 -9
  6. package/dist/core/bidi.js +6 -6
  7. package/dist/core/cells.d.ts +1 -1
  8. package/dist/core/cells.js +5 -5
  9. package/dist/core/clock.d.ts +1 -1
  10. package/dist/core/color.d.ts +50 -50
  11. package/dist/core/color.js +69 -69
  12. package/dist/core/console.d.ts +8 -8
  13. package/dist/core/console.js +5 -5
  14. package/dist/core/control-codes.d.ts +3 -3
  15. package/dist/core/control-codes.js +7 -7
  16. package/dist/core/easing.d.ts +40 -40
  17. package/dist/core/easing.js +40 -40
  18. package/dist/core/env.d.ts +1 -1
  19. package/dist/core/env.js +1 -1
  20. package/dist/core/export-html.js +1 -1
  21. package/dist/core/export-lines.d.ts +11 -11
  22. package/dist/core/export-lines.js +12 -12
  23. package/dist/core/export-svg.d.ts +3 -3
  24. package/dist/core/export-svg.js +4 -4
  25. package/dist/core/markup.js +1 -1
  26. package/dist/core/memo.d.ts +1 -1
  27. package/dist/core/memo.js +1 -1
  28. package/dist/core/oklch.d.ts +14 -14
  29. package/dist/core/oklch.js +10 -10
  30. package/dist/core/orient.d.ts +3 -3
  31. package/dist/core/orient.js +3 -3
  32. package/dist/core/paint.d.ts +9 -9
  33. package/dist/core/paint.js +3 -3
  34. package/dist/core/pretty.d.ts +1 -1
  35. package/dist/core/pretty.js +3 -3
  36. package/dist/core/protocol.d.ts +26 -26
  37. package/dist/core/protocol.js +22 -22
  38. package/dist/core/render.d.ts +11 -11
  39. package/dist/core/render.js +12 -12
  40. package/dist/core/segment.d.ts +3 -3
  41. package/dist/core/segment.js +5 -5
  42. package/dist/core/strip.d.ts +83 -83
  43. package/dist/core/strip.js +70 -70
  44. package/dist/core/style.d.ts +20 -20
  45. package/dist/core/style.js +55 -55
  46. package/dist/core/text.d.ts +2 -2
  47. package/dist/core/text.js +5 -5
  48. package/dist/core/timeline.d.ts +5 -5
  49. package/dist/core/timeline.js +9 -9
  50. package/dist/core/tween.d.ts +6 -6
  51. package/dist/core/tween.js +10 -10
  52. package/dist/core/view.d.ts +4 -4
  53. package/dist/core/view.js +12 -12
  54. package/dist/host/app.d.ts +9 -9
  55. package/dist/host/app.js +12 -12
  56. package/dist/host/host-environment.d.ts +2 -2
  57. package/dist/host/host-environment.js +2 -2
  58. package/dist/host/index.d.ts +2 -2
  59. package/dist/host/input.d.ts +7 -7
  60. package/dist/host/input.js +4 -4
  61. package/dist/host/terminal-colors.d.ts +2 -2
  62. package/dist/host/terminal-colors.js +4 -4
  63. package/dist/host/terminal-host.d.ts +2 -2
  64. package/dist/host/terminal-host.js +1 -1
  65. package/dist/index.d.ts +14 -14
  66. package/dist/index.js +10 -10
  67. package/dist/node/prompt.d.ts +1 -1
  68. package/dist/node/prompt.js +1 -1
  69. package/dist/node/terminal-host.d.ts +1 -1
  70. package/dist/node/traceback.js +2 -2
  71. package/dist/renderables/change.js +2 -2
  72. package/dist/renderables/effect.d.ts +39 -39
  73. package/dist/renderables/effect.js +45 -45
  74. package/dist/renderables/effects.d.ts +81 -81
  75. package/dist/renderables/effects.js +157 -157
  76. package/dist/renderables/embed.d.ts +1 -1
  77. package/dist/renderables/embed.js +2 -2
  78. package/dist/renderables/flexStrip.d.ts +7 -7
  79. package/dist/renderables/flexStrip.js +15 -15
  80. package/dist/renderables/frames.d.ts +6 -6
  81. package/dist/renderables/frames.js +11 -11
  82. package/dist/renderables/glyph-effect.d.ts +15 -15
  83. package/dist/renderables/glyph-effect.js +17 -17
  84. package/dist/renderables/glyph-effects.d.ts +7 -7
  85. package/dist/renderables/glyph-effects.js +16 -16
  86. package/dist/renderables/html-entities.d.ts +1 -1
  87. package/dist/renderables/html-entities.js +1 -1
  88. package/dist/renderables/lifecycle.d.ts +4 -4
  89. package/dist/renderables/lifecycle.js +12 -12
  90. package/dist/renderables/live.d.ts +2 -2
  91. package/dist/renderables/live.js +7 -7
  92. package/dist/renderables/markdown-parse.js +3 -3
  93. package/dist/renderables/panel.js +3 -3
  94. package/dist/renderables/progress.d.ts +1 -1
  95. package/dist/renderables/progress.js +1 -1
  96. package/dist/renderables/progressBar.d.ts +1 -1
  97. package/dist/renderables/progressBar.js +6 -6
  98. package/dist/renderables/prompt.d.ts +1 -1
  99. package/dist/renderables/scroll.d.ts +1 -1
  100. package/dist/renderables/scroll.js +3 -3
  101. package/dist/renderables/spinner.d.ts +4 -4
  102. package/dist/renderables/spinner.js +10 -10
  103. package/dist/renderables/syntax.d.ts +2 -2
  104. package/dist/renderables/syntax.js +2 -2
  105. package/dist/renderables/table.js +3 -3
  106. package/dist/renderables/traceback.d.ts +1 -1
  107. package/dist/renderables/traceback.js +1 -1
  108. package/dist/renderables/tree.js +3 -3
  109. package/dist/template-bindings/animation-funcs.d.ts +14 -14
  110. package/dist/template-bindings/animation-funcs.js +27 -27
  111. package/dist/template-bindings/color-funcs.d.ts +14 -14
  112. package/dist/template-bindings/color-funcs.js +25 -25
  113. package/dist/template-bindings/index.d.ts +9 -9
  114. package/dist/template-bindings/index.js +9 -9
  115. package/dist/template-bindings/palette-funcs.d.ts +1 -1
  116. package/dist/template-bindings/palette-funcs.js +3 -3
  117. package/dist/template-bindings/style-funcs.d.ts +5 -5
  118. package/dist/template-bindings/style-funcs.js +16 -16
  119. package/dist/themes/{transpose.d.ts → adjust.d.ts} +23 -23
  120. package/dist/themes/{transpose.js → adjust.js} +28 -28
  121. package/dist/themes/buildPalette.d.ts +3 -3
  122. package/dist/themes/buildPalette.js +20 -20
  123. package/dist/themes/colorMath.d.ts +16 -16
  124. package/dist/themes/colorMath.js +32 -32
  125. package/dist/themes/data/ansi-tables.d.ts +2 -2
  126. package/dist/themes/data/ansi-tables.js +2 -2
  127. package/dist/themes/data/types.d.ts +4 -4
  128. package/dist/themes/data/types.js +2 -2
  129. package/dist/themes/palette.d.ts +12 -12
  130. package/dist/themes/palette.js +16 -16
  131. package/dist/themes/ramp.d.ts +17 -17
  132. package/dist/themes/ramp.js +12 -12
  133. package/dist/themes/registry.js +4 -4
  134. package/dist/themes/terminalThemes.d.ts +1 -1
  135. package/dist/themes/terminalThemes.js +1 -1
  136. package/dist/widgets/button.d.ts +2 -2
  137. package/dist/widgets/button.js +4 -4
  138. package/dist/widgets/checkbox.d.ts +2 -2
  139. package/dist/widgets/checkbox.js +2 -2
  140. package/dist/widgets/dropdown.d.ts +2 -2
  141. package/dist/widgets/dropdown.js +3 -3
  142. package/dist/widgets/event-router.d.ts +6 -6
  143. package/dist/widgets/event-router.js +2 -2
  144. package/dist/widgets/focus-manager.d.ts +3 -3
  145. package/dist/widgets/focus-manager.js +3 -3
  146. package/dist/widgets/index.d.ts +2 -2
  147. package/dist/widgets/index.js +1 -1
  148. package/dist/widgets/ink.d.ts +3 -3
  149. package/dist/widgets/ink.js +4 -4
  150. package/dist/widgets/slider.d.ts +2 -2
  151. package/dist/widgets/static-item.d.ts +2 -2
  152. package/dist/widgets/text-input.d.ts +2 -2
  153. package/dist/widgets/text-input.js +5 -5
  154. package/dist/widgets/themed-widget.js +1 -1
  155. package/dist/widgets/toggle.d.ts +3 -3
  156. package/dist/widgets/toggle.js +3 -3
  157. package/dist/widgets/types.d.ts +6 -6
  158. package/dist/widgets/types.js +2 -2
  159. package/dist/widgets/widget-app.d.ts +10 -10
  160. package/dist/widgets/widget-app.js +8 -8
  161. package/dist/widgets/widget-base.d.ts +2 -2
  162. package/package.json +1 -1
@@ -2,21 +2,21 @@
2
2
  * The effect catalogue: shimmer, pulse, sparkle and wheel, which loop for as
3
3
  * long as they are drawn, fade-in and dissolve-out, which run once and are
4
4
  * done, a blink and a bold pulse, which move an attribute on a beat, and a
5
- * gradient, which lays a colour ramp across an element and may move it. Each is an `Effect` for `Effected` (`./effect.ts`); the defaults
5
+ * gradient, which lays a color ramp across an element and may move it. Each is an `Effect` for `Effected` (`./effect.ts`); the defaults
6
6
  * in `EFFECT_CURVES` are the ones signed off by eye in the effects-feel demo
7
7
  * (`npm run effects-feel`), at 30 fps and at one frame a second, and
8
8
  * `EFFECT_CATALOGUE` makes every one of them at those, by name, one way.
9
9
  *
10
10
  * Each effect is something a first-time observer already knows from life —
11
- * a slow glow, sunlight moving on water, the colours of daylight, fireflies, ink
11
+ * a slow glow, sunlight moving on water, the colors of daylight, fireflies, ink
12
12
  * blooming in water, mist lifting — because a motion the eye recognises
13
13
  * reads as calm and alive, where a motion it has to learn reads as a widget.
14
14
  * One effect here is not ambience but a signal, and keeps none of this on
15
- * purpose: `steppedInk` steps its ink through colours on a beat, the news
15
+ * purpose: `steppedInk` steps its ink through colors on a beat, the news
16
16
  * that something is at its limit, and jumps from slot to slot where the
17
17
  * loops hold still. Nor is `gradient` a light: it paints an ink rather than
18
18
  * lighting it, so it may darken one, and a ramp scrolled across it jumps
19
- * where the ramp wraps unless its ends are one colour. Of the list below it
19
+ * where the ramp wraps unless its ends are one color. Of the list below it
20
20
  * keeps the words. What makes the loops' motions familiar is what every
21
21
  * curve of theirs keeps:
22
22
  *
@@ -32,13 +32,13 @@
32
32
  * filaments, fronts — never per-cell static.
33
33
  * - Light only ever lights, and never takes the words away. Ink and the
34
34
  * fill under it both move toward the light and never darken, each by its
35
- * own share: the share a colour can take while every cell it is drawn in
35
+ * own share: the share a color can take while every cell it is drawn in
36
36
  * still reads at its resting contrast or WCAG AA, whichever is lower. A
37
37
  * cell with contrast to spare glows brightly; one with none barely moves.
38
38
  * - Elements are apart. Each sits at its own `z` in the noise, so two
39
39
  * elements under one effect do not move in lockstep.
40
40
  *
41
- * Colour moves are in OKLCH, where equal steps look equal. A curve's `ease`
41
+ * Color moves are in OKLCH, where equal steps look equal. A curve's `ease`
42
42
  * maps its intensity in [0, 1] — how strongly the effect acts on a cell at a
43
43
  * moment — onto its swing, for the loops and the transitions alike.
44
44
  *
@@ -52,11 +52,11 @@
52
52
  */
53
53
  import { Animation } from "../core/animation.js";
54
54
  import { ColorRgba } from "../core/color.js";
55
- import { type Beat, type Timing } from "../core/easing.js";
55
+ import { type StepSequence, type Timing } from "../core/easing.js";
56
56
  import type { ColorRamp } from "../themes/ramp.js";
57
57
  import { type CellAttributes, type Drawn, type Effect, type EffectCell } from "./effect.js";
58
- /** What a loop does to one colour at strength `w` in [0, 1]: at 0, nothing. */
59
- export type Touch = (color: ColorRgba, w: number) => ColorRgba;
58
+ /** What a loop does to one color at strength `w` in [0, 1]: at 0, nothing. */
59
+ export type ColorModifier = (color: ColorRgba, w: number) => ColorRgba;
60
60
  /**
61
61
  * How strongly a loop acts at a moment `t` on each cell of a frame drawing
62
62
  * what `Drawn` says, in [0, 1]; `onColors` holds a field outside it to it.
@@ -64,51 +64,51 @@ export type Touch = (color: ColorRgba, w: number) => ColorRgba;
64
64
  * then every cell is asked.
65
65
  */
66
66
  export type Field = (t: number, drawn: Drawn) => (cell: EffectCell) => number;
67
- /** A looping effect: what it does to a colour, and where and when, how strongly. */
67
+ /** A looping effect: what it does to a color, and where and when, how strongly. */
68
68
  export interface Loop {
69
- readonly touch: Touch;
69
+ readonly touch: ColorModifier;
70
70
  readonly field: Field;
71
71
  }
72
72
  /**
73
73
  * How much of `touch` each of `colors` (hex) can take: the largest share in
74
74
  * [0, 1] at which every pair `drawn` shows it in, touched at the same
75
75
  * strength, still reads at its resting contrast or `LEGIBLE`, whichever is
76
- * lower, in the colours `Effected` writes it in at `drawn`'s depth and terminal.
77
- * A colour in a pair but not in `colors` takes none, and so does one
76
+ * lower, in the colors `Effected` writes it in at `drawn`'s depth and terminal.
77
+ * A color in a pair but not in `colors` takes none, and so does one
78
78
  * the terminal supplies, whatever its hex, as in `onColors`. One of `colors`
79
79
  * no pair writes has nothing to be measured against, and takes it all.
80
80
  *
81
- * Colours are settled lightest first, each against every partner: one
81
+ * Colors are settled lightest first, each against every partner: one
82
82
  * already settled at its share, one not yet settled as it is. So the lighter
83
- * colour of a cell takes the light first and its darker partner spends
83
+ * color of a cell takes the light first and its darker partner spends
84
84
  * whatever contrast is left — pale lettering lifting off a dark fill gives
85
- * the fill room to glow — and a darker colour left as it is always holds,
85
+ * the fill room to glow — and a darker color left as it is always holds,
86
86
  * because its lighter partner was settled against exactly that.
87
87
  */
88
- export declare function shares({ pairs, depth, terminal }: Drawn, colors: ReadonlySet<string>, touch: Touch): Map<string, number>;
88
+ export declare function shares({ pairs, depth, terminal }: Drawn, colors: ReadonlySet<string>, touch: ColorModifier): Map<string, number>;
89
89
  /**
90
- * A loop as an `Effect` on the element's own colours, by hex, wherever a cell
90
+ * A loop as an `Effect` on the element's own colors, by hex, wherever a cell
91
91
  * shows them, each touched at its share of the cell's strength: the share
92
92
  * `shares` settles for it against the pairs the element draws its words in
93
93
  * (`Drawn`), touched as `Effected` writes them at the frame's depth — at 256
94
- * colours a touched colour lands on a colour the slot can write, and the
95
- * contrast it spends is that colour's; on a sixteen-colour terminal nothing
96
- * moves (`stillWhereNothingMoves`). `colors` are the ones lit, by default every colour the element
94
+ * colors a touched color lands on a color the slot can write, and the
95
+ * contrast it spends is that color's; on a sixteen-color terminal nothing
96
+ * moves (`staticWhereUnchanged`). `colors` are the ones lit, by default every color the element
97
97
  * sets itself. A powerline strip's fill is the ground of its cells and the
98
98
  * ink of the seam glyphs between them, so the arrow moves with the cell it
99
- * points out of. A colour the terminal supplies (`Pair.terminal`) is
99
+ * points out of. A color the terminal supplies (`Pair.terminal`) is
100
100
  * not the element's, whatever its hex, and takes no share.
101
101
  *
102
- * Settling shares is costly, so it is done once for each set of colours an
102
+ * Settling shares is costly, so it is done once for each set of colors an
103
103
  * element draws: make the effect once and draw it in every frame, and a frame
104
104
  * drawing what an earlier one drew costs no settling.
105
105
  */
106
106
  export declare function onColors(loop: Loop, colors?: ReadonlySet<string>): Effect;
107
107
  /**
108
- * A ramp laid across the element: each lit cell's ink is the colour `ramp`
108
+ * A ramp laid across the element: each lit cell's ink is the color `ramp`
109
109
  * shows at `t` at the cell's column, the element's leftmost cell reading
110
110
  * the ramp's first stop and its rightmost its last, each at its cell's
111
- * centre — or, where that colour would not read on the cell's ground, the
111
+ * centre — or, where that color would not read on the cell's ground, the
112
112
  * nearest that does (`legibleInks`, as `steppedInk` writes its steps). A
113
113
  * ramp that moves (`ColorRamp.moving`) scrolls along the element and turns
114
114
  * its hues, and the frame changes when the ramp does — every frame for a
@@ -116,20 +116,20 @@ export declare function onColors(loop: Loop, colors?: ReadonlySet<string>): Effe
116
116
  * `Animation.constant(ramp)`. Lit cells are those whose ink is one of
117
117
  * `colors`, named as a style names them (`"#a6e3a1"`, `"bright_green"`),
118
118
  * opaque, and matched as the screen shows them at the frame's depth — so
119
- * below truecolor every ink that lands on the same palette colour is lit —
120
- * by default every colour the element sets itself — never an ink the terminal supplies: a
121
- * rule's line by its colour and not its title, a panel's border and not its
119
+ * below truecolor every ink that lands on the same palette color is lit —
120
+ * by default every color the element sets itself — never an ink the terminal supplies: a
121
+ * rule's line by its color and not its title, a panel's border and not its
122
122
  * body. The element is where its frame lists
123
123
  * cells, as the fireflies read it, so a padded or confined element has the
124
- * ramp across what it shows. On a sixteen-colour terminal nothing moves
125
- * (`stillWhereNothingMoves`): a gradient there is jumps between slots, and the cells
124
+ * ramp across what it shows. On a sixteen-color terminal nothing moves
125
+ * (`staticWhereUnchanged`): a gradient there is jumps between slots, and the cells
126
126
  * hold as drawn.
127
127
  */
128
128
  export declare function gradient(ramp: Animation<ColorRamp>, colors?: readonly string[]): Effect;
129
129
  /**
130
- * A loop as an `Effect` on colours by hex, each touched at the share
130
+ * A loop as an `Effect` on colors by hex, each touched at the share
131
131
  * `share` gives it of the cell's strength in a frame drawing what `Drawn`
132
- * says; a colour it gives none, and one the terminal supplies, stays as it is.
132
+ * says; a color it gives none, and one the terminal supplies, stays as it is.
133
133
  */
134
134
  export declare function atShares(loop: Loop, share: (drawn: Drawn) => ReadonlyMap<string, number>): Effect;
135
135
  /**
@@ -154,38 +154,38 @@ export declare function requireZ(what: string, z: number): void;
154
154
  /**
155
155
  * Each effect's curve as it was signed off. Every loop's period is a prime
156
156
  * number of seconds, so no two loops come back into step within a sitting.
157
- * The periods are long on purpose: at one frame a second a loop's colour
157
+ * The periods are long on purpose: at one frame a second a loop's color
158
158
  * moves by no more than a just-noticeable step from one frame to the next.
159
159
  */
160
160
  export declare const EFFECT_CURVES: {
161
161
  readonly shimmer: {
162
162
  readonly seconds: 109;
163
- readonly ease: import("../core/easing.js").Ease;
163
+ readonly ease: import("../core/easing.js").Easing;
164
164
  readonly swing: 0.9;
165
165
  };
166
166
  readonly pulse: {
167
167
  readonly seconds: 43;
168
- readonly ease: import("../core/easing.js").Ease;
168
+ readonly ease: import("../core/easing.js").Easing;
169
169
  readonly swing: 0.85;
170
170
  };
171
171
  readonly sparkle: {
172
172
  readonly seconds: 139;
173
- readonly ease: import("../core/easing.js").Ease;
173
+ readonly ease: import("../core/easing.js").Easing;
174
174
  readonly swing: 0.95;
175
175
  };
176
176
  readonly wheel: {
177
177
  readonly seconds: 907;
178
- readonly ease: import("../core/easing.js").Ease;
178
+ readonly ease: import("../core/easing.js").Easing;
179
179
  readonly swing: 1;
180
180
  };
181
181
  readonly fade: {
182
182
  readonly seconds: 20;
183
- readonly ease: import("../core/easing.js").Ease;
183
+ readonly ease: import("../core/easing.js").Easing;
184
184
  readonly swing: 1;
185
185
  };
186
186
  readonly dissolve: {
187
187
  readonly seconds: 30;
188
- readonly ease: import("../core/easing.js").Ease;
188
+ readonly ease: import("../core/easing.js").Easing;
189
189
  readonly swing: 1;
190
190
  };
191
191
  };
@@ -197,19 +197,19 @@ export declare const EFFECT_LIGHTS: {
197
197
  /** How far a shimmer's light reaches either side of its centre, in columns, as signed off. */
198
198
  export declare const SHIMMER_WIDTH = 24;
199
199
  /**
200
- * A colour under `glow`: the one way every light here falls. It moves `w` of
201
- * the way toward the light's colour, and never below its own lightness —
202
- * light can warm a colour and lift it, never darken it. A colour already
200
+ * A color under `glow`: the one way every light here falls. It moves `w` of
201
+ * the way toward the light's color, and never below its own lightness —
202
+ * light can warm a color and lift it, never darken it. A color already
203
203
  * lighter than the light only warms, and white, which has no warmer shade at
204
204
  * its lightness, stays white.
205
205
  */
206
- export declare function light(glow: ColorRgba): Touch;
206
+ export declare function light(glow: ColorRgba): ColorModifier;
207
207
  /**
208
- * Pulse, as a gentle glow on one element of a screen: the colours handed to
208
+ * Pulse, as a gentle glow on one element of a screen: the colors handed to
209
209
  * it, an element's own, warm into `light` and settle back, over and over, the
210
210
  * way an indicator breathes while something is waiting. Swing: how far into
211
211
  * the light it goes at the top of a beat, 0–1. The element glows as one —
212
- * every cell it is drawn in at once — and the colours not handed to it, the
212
+ * every cell it is drawn in at once — and the colors not handed to it, the
213
213
  * rest of the screen, stay as they are, so what pulses is what was chosen.
214
214
  * Each element keeps a time of its own, a little quicker or slower than
215
215
  * another's by `z`, and no beat is quite the last: the rhythm wanders ahead
@@ -266,11 +266,11 @@ export type Visibility = (t: number, drawn: Drawn) => (cell: EffectCell) => numb
266
266
  * A cell mixed toward the ground of the terminal the frame is drawn on
267
267
  * (`Drawn.terminal`) by how hidden it is: its fill toward the ground, and its ink
268
268
  * toward that fill, so an element with fills of its own — a powerline strip —
269
- * arrives and leaves whole, fill and words together, never as bare coloured
269
+ * arrives and leaves whole, fill and words together, never as bare colored
270
270
  * blocks. Invisible is ink and fill equal to the ground. `swing` scales the
271
271
  * hiding — 1 reaches fully invisible. A cell wholly shown is returned as it was.
272
272
  */
273
- export declare function veiled(visibility: Visibility, swing: number): Effect;
273
+ export declare function mask(visibility: Visibility, swing: number): Effect;
274
274
  /**
275
275
  * An effect that runs once: a fade-in or a dissolve-out over its curve's
276
276
  * `seconds` from `t = 0`, its own clock as every effect's is — the caller
@@ -281,8 +281,8 @@ export declare function veiled(visibility: Visibility, swing: number): Effect;
281
281
  * `schedule` is when its frame next changes on that clock, whatever the
282
282
  * element draws: what a caller drawing the transition inside an animation —
283
283
  * a lifecycle — says its frame does, since the frame it hands over carries
284
- * no word of its own (`stampFrame`, `../core/animation.ts`). Until done it changes
285
- * every frame, or on each hold of a beat (`onBeat`), and from then never.
284
+ * no word of its own (`stampValidityFrame`, `../core/animation.ts`). Until done it changes
285
+ * every frame, or on each hold of a beat (`sampleAndHold`), and from then never.
286
286
  * [LAW:one-source-of-truth] `done` is that schedule read as a fact — done
287
287
  * from the first moment it never changes again — so no transition carries
288
288
  * two answers to when it is over.
@@ -296,20 +296,20 @@ export declare class Transition<E = Effect> {
296
296
  /**
297
297
  * `effect` run once over `seconds` as a `Transition`: what it draws until it
298
298
  * is done, then held. [LAW:single-enforcer] The one rule for when a
299
- * transition is done and what it answers after, for a colour effect and a
299
+ * transition is done and what it answers after, for a color effect and a
300
300
  * glyph effect (`./glyph-effects.ts`) alike.
301
301
  */
302
302
  export declare function transition<D, F>(seconds: number, effect: (drawn: D) => Animation<F>): Transition<(drawn: D) => Animation<F>>;
303
303
  /**
304
304
  * `effect` sampled and held on `beat`: drawn at the moment the hold in
305
- * progress began (`Beat.lastChange`), so within a hold every frame is the frame
305
+ * progress began (`StepSequence.validFrom`), so within a hold every frame is the frame
306
306
  * at its start, and at each hold's start it moves on. A continuous effect
307
307
  * given a short curve becomes one that steps — a `wheel` turning a sixth of
308
308
  * a turn once a second — and at one redraw a second a hold shorter than a
309
309
  * second is skipped, as frames are. [LAW:no-ambient-temporal-coupling] The
310
310
  * held time is a function of `t`, so the same `t` draws the same bytes at
311
311
  * any rate. The frame next changes at a hold's start, and only one the
312
- * sampled effect has moved by (`Animation.onBeat`): an effect that moves
312
+ * sampled effect has moved by (`Animation.sampleAndHold`): an effect that moves
313
313
  * every frame turns the beat at the end of this hold, and one that is done
314
314
  * and says never leaves the beat saying never too.
315
315
  *
@@ -317,8 +317,8 @@ export declare function transition<D, F>(seconds: number, effect: (drawn: D) =>
317
317
  * beat arrives a hold at a time and is done at the first hold that starts
318
318
  * after it was: an element arriving through it wakes its host on the beats.
319
319
  */
320
- export declare function onBeat(effect: Effect, beat: Beat): Effect;
321
- export declare function onBeat<E extends (drawn: never) => Animation<unknown>>(transition: Transition<E>, beat: Beat): Transition<E>;
320
+ export declare function sampleAndHold(effect: Effect, stepSequence: StepSequence): Effect;
321
+ export declare function sampleAndHold<E extends (drawn: never) => Animation<unknown>>(transition: Transition<E>, stepSequence: StepSequence): Transition<E>;
322
322
  /**
323
323
  * Fade-in, as ink blooming in water: patches of the element surface first
324
324
  * and the rest follows outward from them, each cell rising smoothly over its
@@ -335,17 +335,17 @@ export declare function fadeIn(curve: Curve, z: number): Transition;
335
335
  */
336
336
  export declare function dissolveOut(curve: Curve, z: number): Transition;
337
337
  /**
338
- * Wheel, as the colour of daylight going round: every hue turning the whole
338
+ * WheelEvent, as the color of daylight going round: every hue turning the whole
339
339
  * way round once a period — far too slowly to be seen moving, so a glance
340
340
  * sees a steady palette and an hour's absence a different one — each
341
341
  * segment of the element at its own pace. Swing: how far the segments stray
342
342
  * from one another, 0–1, 1 being half a turn apart. A segment is a region
343
- * of adjacent cells of one colour of the element's own, carried as their
343
+ * of adjacent cells of one color of the element's own, carried as their
344
344
  * ground or, on the terminal's ground, as their ink (`segmentsOf`), and it
345
- * paces by where it sits, not by its colour: two
346
- * regions of one fill at two places turn apart, and each colour of the seam
347
- * a joiner drew between them turns with the region of that colour beside
348
- * it, so a powerline cap keeps the colour of the cell it caps. An ink that
345
+ * paces by where it sits, not by its color: two
346
+ * regions of one fill at two places turn apart, and each color of the seam
347
+ * a joiner drew between them turns with the region of that color beside
348
+ * it, so a powerline cap keeps the color of the cell it caps. An ink that
349
349
  * is no fill turns with the ground it sits on, so a cell's words and fill
350
350
  * turn together. A segment's stray is slow noise at its place, at
351
351
  * `STRAY_PERIODS` in time and `STRAY_SPREAD` across the element, so
@@ -354,28 +354,28 @@ export declare function dissolveOut(curve: Curve, z: number): Transition;
354
354
  * column moves its hue a little, and those it pushes along as little. Only the
355
355
  * stray reads the place: a place in the shared turn would jump a growing
356
356
  * run by `360·t·Δ/P`, without bound in `t`.
357
- * A colour keeps its luminance as it turns (`hueTurned`), so every pair of
358
- * words reads at the contrast it rested at; at 256 colours a turned colour
359
- * lands on a colour the depth writes, one that keeps every pair of words it
357
+ * A color keeps its luminance as it turns (`hueTurned`), so every pair of
358
+ * words reads at the contrast it rested at; at 256 colors a turned color
359
+ * lands on a color the depth writes, one that keeps every pair of words it
360
360
  * is drawn in at its floor (`floorOf`) — its resting contrast or WCAG AA,
361
361
  * whichever is lower — as `shares` keeps the light's (`turnedBounds`). The
362
- * turn only happens to the element's own colours (`Drawn.colors`), never the
363
- * terminal's. On a sixteen-colour terminal nothing turns (`stillWhereNothingMoves`).
362
+ * turn only happens to the element's own colors (`Drawn.colors`), never the
363
+ * terminal's. On a sixteen-color terminal nothing turns (`staticWhereUnchanged`).
364
364
  */
365
365
  export declare function wheel(curve: Curve, z: number): Effect;
366
366
  /**
367
367
  * Several effects on one element, as one effect: each layer is handed the look
368
368
  * the one before it left and the same cell, so later layers are on top, and each
369
369
  * recognises a cell by what the element drew (`EffectCell.pair`), never by the
370
- * colour it is handed. A hue a layer turned onto another of the element's
371
- * colours is not mistaken for it, and turns once. It changes when the soonest
370
+ * color it is handed. A hue a layer turned onto another of the element's
371
+ * colors is not mistaken for it, and turns once. It changes when the soonest
372
372
  * layer does, and with no layers it leaves every cell as drawn.
373
373
  *
374
374
  * Every word reads at its floor (`floorOf`), whatever the layers did and in
375
- * whatever order. Each loop proves that for colours as the element drew them,
376
- * and a colour another layer moved voids the proof: light lands at another
375
+ * whatever order. Each loop proves that for colors as the element drew them,
376
+ * and a color another layer moved voids the proof: light lands at another
377
377
  * luminance on a turned hue. So once the layers have moved a cell, its ground
378
- * lands where its inks can still read (`groundBounds`), a function of the colour
378
+ * lands where its inks can still read (`groundBounds`), a function of the color
379
379
  * alone so one fill stays one fill, and an ink that does not read on it slides
380
380
  * to the luminance that does, on the side of the ground it stands on while that
381
381
  * side has room. A layer that takes an ink across its ground crosses it here too:
@@ -385,7 +385,7 @@ export declare function wheel(curve: Curve, z: number): Effect;
385
385
  * it would be alone. A frame that takes a ground past its bounds is the one
386
386
  * exception, whatever its ink reads: a swap of ink and ground lands at the floor,
387
387
  * since a bound cannot ask what one cell's ink does without splitting a fill.
388
- * The floor outranks a colour being the terminal's: a terminal
388
+ * The floor outranks a color being the terminal's: a terminal
389
389
  * ink is moved here where a ground under it left it unreadable. The rule is the
390
390
  * same for one layer as for five: a veil (`veiled`, or a transition's `effect`)
391
391
  * stops at the floor here, so a transition goes in an `Effected` around this
@@ -398,23 +398,23 @@ export interface ColorStep {
398
398
  readonly seconds: number;
399
399
  }
400
400
  /**
401
- * A signal: every cell's ink stepping through `steps`' colours on a beat,
402
- * one colour a hold, looping, for the time it is handed — a gauge's
403
- * chevrons in bright changing colours. The ground is left as the cell draws
401
+ * A signal: every cell's ink stepping through `steps`' colors on a beat,
402
+ * one color a hold, looping, for the time it is handed — a gauge's
403
+ * chevrons in bright changing colors. The ground is left as the cell draws
404
404
  * it, and the words stay legible on it: each step's ink is written as the
405
- * colour nearest the step's (OKLab's ΔE) that the depth draws and that
405
+ * color nearest the step's (OKLab's ΔE) that the depth draws and that
406
406
  * reads on the cell's ground, as `Effected` writes it, at the cell's floor
407
407
  * (`floorOf`) — its resting contrast or `LEGIBLE`, whichever is lower, the
408
408
  * floor every loop here keeps. In truecolor that is the step itself, or its
409
409
  * hue and chroma at the lightness nearest it that reaches the floor
410
- * (`ensureContrast`, the one slide a template's `readableOn` makes too);
411
- * below truecolor, the nearest of the colours the depth has an index for, so on a
412
- * sixteen-colour terminal it steps from slot to slot, the one effect here
413
- * that does (`stillWhereNothingMoves`). A cell whose ground no offered colour reads
410
+ * (`ensureContrast`, the one slide a template's `ensureContrast` makes too);
411
+ * below truecolor, the nearest of the colors the depth has an index for, so on a
412
+ * sixteen-color terminal it steps from slot to slot, the one effect here
413
+ * that does (`staticWhereUnchanged`). A cell whose ground no offered color reads
414
414
  * on keeps the ink it rested in.
415
415
  *
416
416
  * The search is settled once for each ground and step — below truecolor,
417
- * which colours read on a ground once for that ground — so a frame
417
+ * which colors read on a ground once for that ground — so a frame
418
418
  * inside a step redoes none, and nor does a later pass of the beat: at sixty
419
419
  * frames a second a one-second step is sixty identical frames, and the
420
420
  * frame changes when the beat does: the signal is the beat mapped to inks.
@@ -476,7 +476,7 @@ export type TransitionName = "fade" | "dissolve";
476
476
  * Every effect in the catalogue by its name in `EFFECT_CURVES`, each made the
477
477
  * one way: for an element, at its signed-off curve unless handed another,
478
478
  * with the light and the width it was signed off with. A loop comes lit on
479
- * the element's own colours (`onColors`); a transition comes as itself, to
479
+ * the element's own colors (`onColors`); a transition comes as itself, to
480
480
  * be told when it is done. [LAW:types-are-the-program] Keyed by the two
481
481
  * name types, which `EFFECT_CURVES` is held to as well: a curve signed off
482
482
  * does not compile until it is named a loop or a transition, and then not