pulse-ui-client 0.1.29 → 0.1.30

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/channel.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { ServerChannelMessage } from "./messages";
2
1
  import type { PulseSocketIOClient } from "./client";
2
+ import type { ServerChannelMessage } from "./messages";
3
3
  export declare class PulseChannelResetError extends Error {
4
4
  constructor(message: string);
5
5
  }
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { RouteInfo } from "./helpers";
2
- import type { VDOM, VDOMUpdate } from "./vdom";
3
- import type { ClientChannelMessage, ServerErrorInfo } from "./messages";
4
1
  import type { NavigateFunction } from "react-router";
5
2
  import type { ChannelBridge } from "./channel";
3
+ import type { RouteInfo } from "./helpers";
4
+ import type { ClientMessage, ServerErrorInfo } from "./messages";
5
+ import type { VDOM, VDOMUpdate } from "./vdom";
6
6
  export interface MountedView {
7
7
  routeInfo: RouteInfo;
8
8
  onInit: (vdom: VDOM, callbacks: string[], renderProps: string[], cssRefs: string[]) => void;
@@ -21,16 +21,7 @@ export interface PulseClient {
21
21
  mountView(path: string, view: MountedView): () => void;
22
22
  }
23
23
  export declare class PulseSocketIOClient {
24
- private url;
25
- private renderId;
26
- private frameworkNavigate;
27
- private activeViews;
28
- private socket;
29
- private messageQueue;
30
- private connectionListeners;
31
- private serverErrors;
32
- private serverErrorListeners;
33
- private channels;
24
+ #private;
34
25
  constructor(url: string, renderId: string, frameworkNavigate: NavigateFunction);
35
26
  isConnected(): boolean;
36
27
  connect(): Promise<void>;
@@ -38,18 +29,12 @@ export declare class PulseSocketIOClient {
38
29
  private notifyConnectionListeners;
39
30
  onServerError(listener: ServerErrorListener): () => void;
40
31
  private notifyServerError;
41
- private sendMessage;
42
- sendChannelMessage(message: ClientChannelMessage): Promise<void>;
32
+ sendMessage(payload: ClientMessage): void;
43
33
  mountView(path: string, view: MountedView): void;
44
34
  navigate(path: string, routeInfo: RouteInfo): Promise<void>;
45
35
  unmount(path: string): void;
46
36
  disconnect(): void;
47
- private handleServerMessage;
48
- private performApiCall;
49
- invokeCallback(path: string, callback: string, args: any[]): Promise<void>;
37
+ invokeCallback(path: string, callback: string, args: any[]): void;
50
38
  acquireChannel(id: string): ChannelBridge;
51
39
  releaseChannel(id: string): void;
52
- private ensureChannelEntry;
53
- private routeChannelMessage;
54
- private handleTransportDisconnect;
55
40
  }
package/dist/helpers.d.ts CHANGED
@@ -7,7 +7,7 @@ export interface RouteInfo {
7
7
  pathParams: Record<string, string | undefined>;
8
8
  catchall: string[];
9
9
  }
10
- export declare function extractServerRouteInfo({ params, request, }: LoaderFunctionArgs): {
10
+ export declare function extractServerRouteInfo({ params, request }: LoaderFunctionArgs): {
11
11
  hash: string;
12
12
  pathname: string;
13
13
  query: string;