playhtml 2.7.0 → 2.8.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/dist/main.d.ts CHANGED
@@ -40,6 +40,9 @@ declare class CursorClientAwareness {
40
40
  private otherUsersWithMessages;
41
41
  private cursorPresenceChangeCallbacks;
42
42
  private coordinateMode;
43
+ private zones;
44
+ private currentZone;
45
+ private cursorZoneState;
43
46
  constructor(provider: default_2, options?: CursorOptions);
44
47
  private initialize;
45
48
  private setupAwarenessHandling;
@@ -48,6 +51,9 @@ declare class CursorClientAwareness {
48
51
  private rebuildSpatialGrid;
49
52
  private checkProximityOptimized;
50
53
  private addCursorStyles;
54
+ private createCursorPositionCallback;
55
+ private applyZoneStyling;
56
+ private hitTestZones;
51
57
  private setupCursorTracking;
52
58
  private repositionAllCursors;
53
59
  private throttledUpdateCursorAwareness;
@@ -72,6 +78,8 @@ declare class CursorClientAwareness {
72
78
  private updateAllCursorVisibility;
73
79
  private showAllCursors;
74
80
  configure(options: Partial<CursorOptions>): void;
81
+ registerZone(element: HTMLElement, options?: CursorZoneOptions): void;
82
+ unregisterZone(elementId: string): void;
75
83
  hideCursor(connectionId: string): void;
76
84
  showCursor(connectionId: string): void;
77
85
  destroy(): void;
@@ -132,6 +140,11 @@ export declare type CursorRoom = "page" | "domain" | "section" | ((context: {
132
140
  search: string;
133
141
  }) => string);
134
142
 
143
+ export declare interface CursorZoneOptions {
144
+ onCustomCursorRender?: (connectionId: string, element: HTMLElement) => HTMLElement | null;
145
+ getCursorStyle?: (presence: CursorPresence) => Partial<CSSStyleDeclaration> | Record<string, string>;
146
+ }
147
+
135
148
  declare interface DefaultRoomOptions {
136
149
  includeSearch?: boolean;
137
150
  }