pulse-ui-client 0.1.31 → 0.1.36
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/index.d.ts +352 -15
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -21
- package/package.json +18 -17
- package/dist/channel.d.ts +0 -28
- package/dist/client.d.ts +0 -40
- package/dist/form.d.ts +0 -21
- package/dist/helpers.d.ts +0 -21
- package/dist/index.bun.js +0 -5
- package/dist/index.development.js +0 -2138
- package/dist/index.node.js +0 -4
- package/dist/messages.d.ts +0 -108
- package/dist/pulse.d.ts +0 -30
- package/dist/renderer.d.ts +0 -21
- package/dist/serialize/clean.d.ts +0 -3
- package/dist/serialize/elements.d.ts +0 -1
- package/dist/serialize/events.d.ts +0 -1
- package/dist/serialize/extractor.d.ts +0 -5
- package/dist/serialize/serializer.d.ts +0 -12
- package/dist/transport.d.ts +0 -35
- package/dist/usePulseChannel.d.ts +0 -2
- package/dist/vdom.d.ts +0 -59
package/dist/transport.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ClientMessage, ServerMessage } from "./messages";
|
|
2
|
-
export type MessageListener = (message: ServerMessage) => void;
|
|
3
|
-
export type ConnectionStatusListener = (connected: boolean) => void;
|
|
4
|
-
export interface Transport {
|
|
5
|
-
connect(listener: MessageListener): Promise<void>;
|
|
6
|
-
disconnect(): void;
|
|
7
|
-
sendMessage(payload: ClientMessage): Promise<void>;
|
|
8
|
-
isConnected(): boolean;
|
|
9
|
-
onConnectionChange(listener: ConnectionStatusListener): () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare class SocketIOTransport implements Transport {
|
|
12
|
-
private url;
|
|
13
|
-
private socket;
|
|
14
|
-
private listener;
|
|
15
|
-
private messageQueue;
|
|
16
|
-
private connectionListeners;
|
|
17
|
-
constructor(url: string);
|
|
18
|
-
connect(listener: MessageListener): Promise<void>;
|
|
19
|
-
disconnect(): void;
|
|
20
|
-
sendMessage(payload: ClientMessage): Promise<void>;
|
|
21
|
-
isConnected(): boolean;
|
|
22
|
-
onConnectionChange(listener: ConnectionStatusListener): () => void;
|
|
23
|
-
private notifyConnectionListeners;
|
|
24
|
-
}
|
|
25
|
-
export declare class InMemoryTransport implements Transport {
|
|
26
|
-
private listener;
|
|
27
|
-
private connected;
|
|
28
|
-
private connectionListeners;
|
|
29
|
-
dispatchMessage(message: ServerMessage): void;
|
|
30
|
-
connect(listener: MessageListener): Promise<void>;
|
|
31
|
-
disconnect(): void;
|
|
32
|
-
sendMessage(payload: ClientMessage): Promise<void>;
|
|
33
|
-
isConnected(): boolean;
|
|
34
|
-
onConnectionChange(listener: ConnectionStatusListener): () => void;
|
|
35
|
-
}
|
package/dist/vdom.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from "react";
|
|
2
|
-
export declare const FRAGMENT_TAG = "$$fragment";
|
|
3
|
-
export declare const MOUNT_POINT_PREFIX = "$$";
|
|
4
|
-
export type RegistryEntry = ComponentType<any>;
|
|
5
|
-
export type ComponentRegistry = Record<string, ComponentType<any>>;
|
|
6
|
-
export interface VDOMElement {
|
|
7
|
-
tag: string;
|
|
8
|
-
props?: Record<string, any>;
|
|
9
|
-
children?: VDOMNode[];
|
|
10
|
-
key?: string;
|
|
11
|
-
lazy?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export type PrimitiveNode = string | number | boolean;
|
|
14
|
-
export type VDOMNode = PrimitiveNode | VDOMElement;
|
|
15
|
-
export type VDOM = VDOMNode;
|
|
16
|
-
export interface VDOMUpdateBase {
|
|
17
|
-
type: string;
|
|
18
|
-
path: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ReplaceUpdate extends VDOMUpdateBase {
|
|
21
|
-
type: "replace";
|
|
22
|
-
data: VDOMNode;
|
|
23
|
-
}
|
|
24
|
-
export interface UpdatePropsUpdate extends VDOMUpdateBase {
|
|
25
|
-
type: "update_props";
|
|
26
|
-
data: {
|
|
27
|
-
set?: Record<string, any>;
|
|
28
|
-
remove?: string[];
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export interface ReconciliationUpdate {
|
|
32
|
-
type: "reconciliation";
|
|
33
|
-
path: string;
|
|
34
|
-
N: number;
|
|
35
|
-
new: [number[], VDOM[]];
|
|
36
|
-
reuse: [number[], number[]];
|
|
37
|
-
}
|
|
38
|
-
export interface PathDelta {
|
|
39
|
-
add?: string[];
|
|
40
|
-
remove?: string[];
|
|
41
|
-
}
|
|
42
|
-
export interface UpdateCallbacksUpdate extends VDOMUpdateBase {
|
|
43
|
-
type: "update_callbacks";
|
|
44
|
-
data: PathDelta;
|
|
45
|
-
}
|
|
46
|
-
export interface UpdateRenderPropsUpdate extends VDOMUpdateBase {
|
|
47
|
-
type: "update_render_props";
|
|
48
|
-
data: PathDelta;
|
|
49
|
-
}
|
|
50
|
-
export interface UpdateCssRefsUpdate extends VDOMUpdateBase {
|
|
51
|
-
type: "update_css_refs";
|
|
52
|
-
data: PathDelta;
|
|
53
|
-
}
|
|
54
|
-
export type VDOMUpdate = ReplaceUpdate | UpdatePropsUpdate | ReconciliationUpdate | UpdateCallbacksUpdate | UpdateRenderPropsUpdate | UpdateCssRefsUpdate;
|
|
55
|
-
export type UpdateType = VDOMUpdate["type"];
|
|
56
|
-
export declare function isElementNode(node: VDOMNode): node is VDOMElement;
|
|
57
|
-
export declare function isMountPointNode(node: VDOMNode): node is VDOMElement;
|
|
58
|
-
export declare function isTextNode(node: VDOMNode): node is string;
|
|
59
|
-
export declare function isFragment(node: VDOMNode): boolean;
|