@msb235/blits-panel 0.2.0 → 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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ This package follows [semver](https://semver.org). Below 1.0.0, a breaking chang
4
4
  version and everything else the patch. The release workflow refuses a `panel-v*` tag with no
5
5
  section here.
6
6
 
7
+ ## 0.3.1
8
+
9
+ ### Fixed
10
+
11
+ - Built and tested against engine 0.15.1. The peer range, `^0.15.0`, is unchanged.
12
+
13
+ ## 0.3.0
14
+
15
+ ### Breaking
16
+
17
+ - `@msb235/blits` is a peer at `^0.15.0`, where it was `^0.14.0`. Engine 0.15.0 has breaking
18
+ changes of its own, listed in its changelog.
19
+
20
+ ### Added
21
+
22
+ - **◯ circles**, beside the voices, draws each bounded voice's circle on the page, in the voice's
23
+ hue, and the voice list marks a bounded voice with ◯. The `screen` option, which `offer` takes
24
+ too, says where a point in the mix's positions is on screen, for positions that are not client
25
+ coordinates. The agent sends `bounded` on each voice and a `circles` event, and takes a
26
+ `circles` command. Needs the engine's `within` on a watched voice, from 0.15.0.
27
+ - The panel shows the plan ahead of now: a lane per voice on the plots' time axis, from its start
28
+ to its end with a tick at each mark it reaches on the way, an arrow where no end is known, and
29
+ the marks the host announced. The axis runs 2 s past now, and on to the furthest mark known
30
+ within 30 s. The agent sends them as a `marks` event, and the panel now passes over an event
31
+ kind it does not know. `MarkInfo`, `AHEAD_MS`, and `AHEAD_CAP_MS` are exported, and
32
+ `ChannelPlot` takes a `range` to draw.
33
+
7
34
  ## 0.2.0
8
35
 
9
36
  ### Breaking
package/README.md CHANGED
@@ -34,6 +34,8 @@ gives back any clock it holds.
34
34
  - **Right side:** one plot per number in the picked subject's pose, then each voice's weight.
35
35
  A plot is marked "read, not shown" when the app did not read the subject that frame, so the
36
36
  panel read it.
37
+ - **◯ circles**, beside the voices: draws each bounded voice's circle (its `within`, or its
38
+ `around` weight's) on the page, in the voice's hue. A bounded voice is marked ◯ in the list.
37
39
 
38
40
  Holding a mix holds every mix on the same transport. Nothing the panel does while holding goes on
39
41
  the mix's tape, and freeing the hold lets the mix carry on from where the panel left it.
@@ -51,7 +53,7 @@ mount({
51
53
  });
52
54
  ```
53
55
 
54
- `offer({ pick, outline })` hands over the same two functions without mounting anything, so the
56
+ `offer({ pick, outline, screen })` hands over the same functions without mounting anything, so the
55
57
  blits DevTools extension can pick in the scene too.
56
58
 
57
59
  Subjects are named by the mix's `labelOf` option where it has one, and otherwise by their `name`
@@ -64,6 +66,7 @@ or `id`, a DOM element's tag, or their class and a number.
64
66
  | `history` | `10000` | How far back mixes made after `mount()` can scrub, in ms. `false` adds no history. |
65
67
  | `pick` | none | Finds the subject under a point, for subjects the DOM cannot see. |
66
68
  | `outline` | none | Where a subject is on screen, so hovering it can outline it. |
69
+ | `screen` | the same numbers | Where a point in the positions given to `mix.plot` is on screen, in client coordinates, so a bounded voice's circle lands in the right place. |
67
70
 
68
71
  ## The two halves
69
72
 
package/dist/agent.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type Screen } from './circles.js';
1
2
  import type { Source } from './protocol.js';
2
3
  /** What the page side of the panel can be told about the app; `offer()` tells it the same from afar. */
3
4
  export interface AgentOptions {
@@ -5,6 +6,11 @@ export interface AgentOptions {
5
6
  pick?: (x: number, y: number) => unknown;
6
7
  /** Where a subject is on screen, in client coordinates; a DOM element's own box otherwise. */
7
8
  outline?: (subject: unknown) => DOMRect | undefined;
9
+ /**
10
+ * Where a point in the positions the mix was given (`mix.plot`) is on screen, in client
11
+ * coordinates, for drawing a bounded voice's circle; the same numbers otherwise.
12
+ */
13
+ screen?: Screen;
8
14
  /** The panel's own element: picking on the page passes over it. */
9
15
  ignore?: Element;
10
16
  }
@@ -0,0 +1,18 @@
1
+ /** A bounded voice's circle, in the units of the positions the mix was given. */
2
+ export interface Ring {
3
+ voice: number;
4
+ x: number;
5
+ y: number;
6
+ r: number;
7
+ }
8
+ /** Where a point in the mix's positions is on screen, in client coordinates. */
9
+ export type Screen = (x: number, y: number) => {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ /** Draws each bounded voice's circle over the page, in the voice's hue. */
14
+ export declare class Circles {
15
+ private svg;
16
+ draw(rings: readonly Ring[], screen?: Screen): void;
17
+ clear(): void;
18
+ }
package/dist/ids.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /** Numbers subjects as they cross the seam, holding the objects weakly. */
2
+ export declare class Ids {
3
+ private weak;
4
+ private strong;
5
+ private back;
6
+ private next;
7
+ of(subject: unknown): number;
8
+ /** Forgets the ids of subjects that have been collected. */
9
+ prune(): void;
10
+ get(id: number): unknown;
11
+ }
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { type AgentOptions, agent, flatten } from './agent.js';
2
2
  export { type MountOptions, mount } from './mount.js';
3
3
  export { type Offer, offer } from './offer.js';
4
- export type { Command, Event, HoldInfo, MixInfo, Sample, Source, SubjectInfo, VoiceInfo, } from './protocol.js';
5
- export { CAP, Samples, WINDOW_MS } from './store.js';
4
+ export type { Command, Event, HoldInfo, MarkInfo, MixInfo, Sample, Source, SubjectInfo, VoiceInfo, } from './protocol.js';
5
+ export { AHEAD_CAP_MS, AHEAD_MS, CAP, Samples, WINDOW_MS } from './store.js';
6
6
  export { panelStyles } from './styles.js';
7
7
  export { ChannelPlot, type ChannelPlotProps } from './ui/ChannelPlot.js';
8
8
  export { hueColor } from './ui/hue.js';