playhtml 2.11.0 → 2.11.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/dist/main.d.ts +45 -3
- package/dist/playhtml.es.js +4002 -2971
- package/package.json +3 -2
package/dist/main.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { PlayerIdentity as PlayerIdentity_2 } from '../../../common/src';
|
|
|
17
17
|
import { PlayEvent } from '../../common/src';
|
|
18
18
|
import { PresenceAPI } from '../../common/src';
|
|
19
19
|
import { PresenceRoom } from '../../common/src';
|
|
20
|
+
import { PresenceServerMessage } from '../../../common/src';
|
|
20
21
|
import { RegisteredPlayEvent } from '../../common/src';
|
|
21
22
|
import { TagType } from '../../common/src';
|
|
22
23
|
|
|
@@ -29,14 +30,19 @@ export { Cursor }
|
|
|
29
30
|
declare class CursorClientAwareness {
|
|
30
31
|
private provider;
|
|
31
32
|
private options;
|
|
33
|
+
private presenceTransport?;
|
|
32
34
|
private cursors;
|
|
33
35
|
private cursorAnimators;
|
|
34
36
|
private spatialGrid;
|
|
35
37
|
private proximityUsers;
|
|
36
38
|
private currentCursor;
|
|
37
39
|
private playerIdentity;
|
|
38
|
-
private
|
|
40
|
+
private awarenessUpdateTimeout;
|
|
39
41
|
private lastUpdate;
|
|
42
|
+
private pointerFrame;
|
|
43
|
+
private pendingPointerSample;
|
|
44
|
+
private cursorEventCleanups;
|
|
45
|
+
private ownCursorSvgCache;
|
|
40
46
|
private visibilityThreshold;
|
|
41
47
|
private isStylesAdded;
|
|
42
48
|
private globalApiListeners;
|
|
@@ -45,8 +51,13 @@ declare class CursorClientAwareness {
|
|
|
45
51
|
private chat;
|
|
46
52
|
private currentMessage;
|
|
47
53
|
private otherUsersWithMessages;
|
|
54
|
+
private lastSentMessage;
|
|
48
55
|
private cursorPresenceChangeCallbacks;
|
|
49
56
|
private coordinateMode;
|
|
57
|
+
private presenceStore;
|
|
58
|
+
private presenceTransportUnsubscribe;
|
|
59
|
+
private presenceExpiryInterval;
|
|
60
|
+
private serverCursorMaxHz;
|
|
50
61
|
private getContainerMatrix;
|
|
51
62
|
private clientToStorage;
|
|
52
63
|
private storageToClient;
|
|
@@ -57,12 +68,22 @@ declare class CursorClientAwareness {
|
|
|
57
68
|
private lastKnownContainer;
|
|
58
69
|
private clientIdToStableId;
|
|
59
70
|
private pendingRemovals;
|
|
60
|
-
constructor(provider: default_2, options?: CursorOptions);
|
|
71
|
+
constructor(provider: default_2, options?: CursorOptions, presenceTransport?: CursorPresenceTransport | undefined);
|
|
61
72
|
private initialize;
|
|
62
73
|
private setupAwarenessHandling;
|
|
74
|
+
private setupPresenceTransportHandling;
|
|
75
|
+
private handlePresenceTransportMessage;
|
|
76
|
+
private handlePresenceRate;
|
|
77
|
+
private startPresenceExpiryTimer;
|
|
78
|
+
private removeExpiredPresenceCursors;
|
|
79
|
+
private renderPresenceStore;
|
|
80
|
+
private refreshPresenceTransportColors;
|
|
63
81
|
private syncExistingAwareness;
|
|
64
82
|
private handleAwarenessChange;
|
|
65
83
|
private hasOtherClientForStableId;
|
|
84
|
+
private cursorPresenceEntries;
|
|
85
|
+
private activeCursorPresenceEntries;
|
|
86
|
+
private isFreshCursorPresence;
|
|
66
87
|
private rebuildSpatialGrid;
|
|
67
88
|
private checkProximityOptimized;
|
|
68
89
|
private addCursorStyles;
|
|
@@ -70,10 +91,19 @@ declare class CursorClientAwareness {
|
|
|
70
91
|
private resolveTargetCoords;
|
|
71
92
|
private applyZoneStyling;
|
|
72
93
|
private hitTestZones;
|
|
94
|
+
private getOwnCursorSvg;
|
|
95
|
+
private addCursorEventListener;
|
|
96
|
+
private requestPointerFrame;
|
|
97
|
+
private cancelPointerFrame;
|
|
98
|
+
private queuePointerSample;
|
|
99
|
+
private processPointerSample;
|
|
73
100
|
private setupCursorTracking;
|
|
74
101
|
private repositionAllCursors;
|
|
75
|
-
private
|
|
102
|
+
private snapCursorToPresence;
|
|
103
|
+
private getActiveCursorConnectionCount;
|
|
104
|
+
private scheduleCursorAwarenessUpdate;
|
|
76
105
|
private updateCursorAwareness;
|
|
106
|
+
private publishPresenceTransportState;
|
|
77
107
|
private getContainer;
|
|
78
108
|
refreshContainer(): void;
|
|
79
109
|
refreshCursorStyles(): void;
|
|
@@ -98,6 +128,7 @@ declare class CursorClientAwareness {
|
|
|
98
128
|
private updateAllCursorVisibility;
|
|
99
129
|
private showAllCursors;
|
|
100
130
|
configure(options: Partial<CursorOptions>): void;
|
|
131
|
+
private publishPlayerIdentity;
|
|
101
132
|
registerZone(element: HTMLElement, options?: CursorZoneOptions): void;
|
|
102
133
|
unregisterZone(elementId: string): void;
|
|
103
134
|
hideCursor(connectionId: string): void;
|
|
@@ -170,6 +201,17 @@ export declare interface CursorOptions {
|
|
|
170
201
|
|
|
171
202
|
export { CursorPresence }
|
|
172
203
|
|
|
204
|
+
declare type CursorPresenceTransport = {
|
|
205
|
+
join(input: {
|
|
206
|
+
identity: PlayerIdentity_2;
|
|
207
|
+
page?: string;
|
|
208
|
+
}): void;
|
|
209
|
+
update(channel: string, value: unknown): void;
|
|
210
|
+
clear(channel: string): void;
|
|
211
|
+
subscribe(listener: (message: PresenceServerMessage) => void): () => void;
|
|
212
|
+
destroy(): void;
|
|
213
|
+
};
|
|
214
|
+
|
|
173
215
|
export declare type CursorRoom = "page" | "domain" | "section" | ((context: {
|
|
174
216
|
domain: string;
|
|
175
217
|
pathname: string;
|