@touchcastllc/napster-companion-api-dev 2.0.0-alpha.3 → 2.0.0-alpha.5

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.
@@ -335,7 +335,11 @@ export interface LayoutConfig {
335
335
  * - `"inline"`: the avatar renders inside `mountContainer` and fills it. Size
336
336
  * and shape come from how you style that container; `position` is ignored.
337
337
  * When the container has no explicit height, an internal 4:5 ratio is used
338
- * so the avatar is never invisible.
338
+ * so the avatar is never invisible. The container's content area must be at
339
+ * least 176px wide (132px without screen share) and 80px tall (64px for
340
+ * `round`) or the controls clip — the SDK warns in the console when there
341
+ * is too little room. See the README, "Inline layout: minimum container
342
+ * size".
339
343
  */
340
344
  type?: "fixed" | "inline";
341
345
  /** Position of the avatar on screen. Meaningful only when `type` is
@@ -0,0 +1,53 @@
1
+ /**
2
+ * CA-845 — in inline layout the host sizes the container, so it can be given
3
+ * less room than the control row needs, and the buttons then clip silently
4
+ * (WCAG 1.4.10 Reflow needs a stated, testable floor). This watches the
5
+ * container and warns once when something stops fitting.
6
+ *
7
+ * It detects the problem from geometry instead of comparing against a stored
8
+ * width: the numbers can't drift out of step with the CSS (button size, gaps,
9
+ * pill padding), and the warning can say exactly how much room is missing.
10
+ */
11
+ export type FitProblem = {
12
+ kind: "controls-width";
13
+ availablePx: number;
14
+ requiredPx: number;
15
+ } | {
16
+ kind: "controls-height";
17
+ availablePx: number;
18
+ requiredPx: number;
19
+ } | {
20
+ kind: "entry-text";
21
+ availablePx: number;
22
+ };
23
+ export interface ContainerSizeWatcher {
24
+ /** Schedule a measurement now (e.g. controls were just mounted). */
25
+ check(): void;
26
+ destroy(): void;
27
+ }
28
+ /**
29
+ * Measures how the SDK's content sits inside the room the host gave it.
30
+ *
31
+ * "Room" is the root's own box, not the container's outer box: the root fills
32
+ * the container's content area, so the host's border and padding are already
33
+ * subtracted — which is what the integrator has to account for.
34
+ *
35
+ * - `controls-width`: the control row sticks out of its pill. `requiredPx` is
36
+ * the available width plus the overflow, i.e. the smallest room the row fits
37
+ * in.
38
+ * - `controls-height`: the pill is cut off by the top or bottom of the room.
39
+ * - `entry-text`: the entry-point card's text is clipped.
40
+ *
41
+ * Returns `[]` before the controls exist.
42
+ */
43
+ export declare function measureFit(root: HTMLElement): FitProblem[];
44
+ /**
45
+ * Watches the host container of an inline-layout widget and warns (always —
46
+ * `critical_warn` ignores debug mode, like other genuine integrator
47
+ * misconfiguration) when the controls or the start card stop fitting.
48
+ *
49
+ * One warning per kind of problem, each time it appears: it re-arms once the
50
+ * container fits again. Does nothing in fixed layout, where the SDK sizes
51
+ * itself (240px, wider than any threshold).
52
+ */
53
+ export declare function createContainerSizeWatcher(root: HTMLElement): ContainerSizeWatcher;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@touchcastllc/napster-companion-api-dev",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.5",
4
4
  "keywords": [
5
5
  "napster",
6
6
  "companion-api",