hanc-webrtc-widgets 2.0.1 → 2.0.2

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.
@@ -13,17 +13,25 @@ export declare class FloatingCall extends LitElement {
13
13
  offsetY: number;
14
14
  orbSize: number;
15
15
  orbColor?: string;
16
+ orbColorLight?: string;
17
+ orbColorDark?: string;
16
18
  hideButton: boolean;
17
19
  buttonPosition: ButtonPosition;
18
20
  activeOrbColor?: string;
21
+ activeOrbColorLight?: string;
22
+ activeOrbColorDark?: string;
19
23
  buttonColor?: string;
20
24
  buttonHoverColor?: string;
21
25
  buttonActiveColor?: string;
22
26
  buttonTextColor?: string;
23
27
  minimized: boolean;
24
28
  private callStatus;
29
+ private prefersLightScheme;
30
+ private colorSchemeQuery;
25
31
  private renderer;
26
32
  private audioSimTimer;
33
+ private audioSimFrameId;
34
+ private audioSimPhase;
27
35
  private simulatedTargetLevel;
28
36
  private simulatedCurrentLevel;
29
37
  private baseColors;
@@ -34,12 +42,16 @@ export declare class FloatingCall extends LitElement {
34
42
  buttonStartText: string;
35
43
  buttonConnectingText: string;
36
44
  buttonEndText: string;
45
+ private handleColorSchemeChange;
37
46
  connectedCallback(): void;
38
47
  disconnectedCallback(): void;
39
48
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
40
49
  firstUpdated(): void;
41
50
  private setupRenderer;
51
+ private setupColorSchemeListener;
52
+ private teardownColorSchemeListener;
42
53
  private clamp;
54
+ private resolveColorValue;
43
55
  private buildOrbPalette;
44
56
  private getBaseOrbColors;
45
57
  private getActiveSeedColor;
@@ -10,16 +10,24 @@ export declare class InlineCall extends LitElement {
10
10
  visualStyle: VisualStyle;
11
11
  orbSize: number;
12
12
  orbColor?: string;
13
+ orbColorLight?: string;
14
+ orbColorDark?: string;
13
15
  hideButton: boolean;
14
16
  buttonPosition: ButtonPosition;
15
17
  activeOrbColor?: string;
18
+ activeOrbColorLight?: string;
19
+ activeOrbColorDark?: string;
16
20
  buttonColor?: string;
17
21
  buttonHoverColor?: string;
18
22
  buttonActiveColor?: string;
19
23
  buttonTextColor?: string;
20
24
  private callStatus;
25
+ private prefersLightScheme;
26
+ private colorSchemeQuery;
21
27
  private renderer;
22
28
  private audioSimTimer;
29
+ private audioSimFrameId;
30
+ private audioSimPhase;
23
31
  private simulatedTargetLevel;
24
32
  private simulatedCurrentLevel;
25
33
  private baseColors;
@@ -29,12 +37,16 @@ export declare class InlineCall extends LitElement {
29
37
  buttonStartText: string;
30
38
  buttonConnectingText: string;
31
39
  buttonEndText: string;
40
+ private handleColorSchemeChange;
32
41
  connectedCallback(): void;
33
42
  disconnectedCallback(): void;
34
43
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
35
44
  firstUpdated(): void;
36
45
  private setupRenderer;
46
+ private setupColorSchemeListener;
47
+ private teardownColorSchemeListener;
37
48
  private clamp;
49
+ private resolveColorValue;
38
50
  private buildOrbPalette;
39
51
  private getBaseOrbColors;
40
52
  private getActiveSeedColor;
@@ -43,6 +55,7 @@ export declare class InlineCall extends LitElement {
43
55
  private updateButtonThemeVars;
44
56
  private getAnimationForState;
45
57
  private syncOrbAppearance;
58
+ private applyNeuralNetworkTuning;
46
59
  private startAudioSimulation;
47
60
  private stopAudioSimulation;
48
61
  private handleStatusChange;
@@ -1,2 +1,3 @@
1
+ export declare function getRelativeLuminance(color: string): number | null;
1
2
  export declare function blendColors(base: string, target: string, ratio: number): string;
2
3
  export declare function colorWithAlpha(color: string, alpha: number): string;
@@ -17,6 +17,8 @@ export declare abstract class BaseRenderer {
17
17
  protected targetAudioLevel: number;
18
18
  protected isActive: boolean;
19
19
  protected animationId: number | null;
20
+ protected lastFrameTime: number | null;
21
+ protected frameDelta: number;
20
22
  constructor(canvas: HTMLCanvasElement, size: number, colors: ColorConfig, animation: AnimationConfig);
21
23
  /**
22
24
  * Setup canvas with device pixel ratio
@@ -49,7 +51,7 @@ export declare abstract class BaseRenderer {
49
51
  /**
50
52
  * Animation loop
51
53
  */
52
- protected animate: () => void;
54
+ protected animate: (timestamp: number) => void;
53
55
  /**
54
56
  * Update state
55
57
  */
@@ -78,5 +80,9 @@ export declare abstract class BaseRenderer {
78
80
  * Cleanup
79
81
  */
80
82
  destroy(): void;
81
- private updateColors;
83
+ /**
84
+ * Reset transient animation state so repeated sessions feel consistent.
85
+ */
86
+ resetDynamics(): void;
87
+ protected updateColors(): void;
82
88
  }
@@ -5,10 +5,18 @@ import { ColorConfig, AnimationConfig } from '../types/config';
5
5
  */
6
6
  export declare class NeuralNetworkRenderer extends BaseRenderer {
7
7
  private nodes;
8
+ private thicknessScale;
9
+ private glowRadiusScale;
10
+ private activeBlend;
8
11
  constructor(canvas: HTMLCanvasElement, size: number, colors: ColorConfig, animation: AnimationConfig);
12
+ setThicknessScale(scale: number): void;
13
+ setGlowRadiusScale(scale: number): void;
14
+ resetDynamics(): void;
9
15
  private initNetwork;
10
16
  private createNode;
11
17
  protected render(): void;
18
+ protected update(): void;
19
+ protected getSpeedMultiplier(activeBlend?: number): number;
12
20
  private updateNodes;
13
21
  private drawConnections;
14
22
  private drawNodes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanc-webrtc-widgets",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/hanc-webrtc-widgets.umd.js",
6
6
  "module": "dist/hanc-webrtc-widgets.es.js",