@pbkit/wrp
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -9,8 +9,8 @@ import { Atom } from "jotai"; | ||
export declare type GuestAtom = Atom<WrpGuest | undefined>; | ||
export declare type ClientAtom = Atom<RpcClientImpl | undefined>; | ||
export declare type ClientImplAtom = Atom<RpcClientImpl | undefined>; | ||
export interface WrpAtomSet { | ||
channelAtom: ChannelAtom; | ||
guestAtom: GuestAtom; | ||
clientAtom: ClientAtom; | ||
clientImplAtom: ClientImplAtom; | ||
} | ||
export declare function createWrpAtomSet(socketAtom: SocketAtom): WrpAtomSet; |
@@ -44,3 +44,3 @@ "use strict"; | ||
const guestAtom = (0, utils_1.selectAtom)(channelAndGuestAtom, (cag) => cag === null || cag === void 0 ? void 0 : cag.guest); | ||
const clientAtom = (0, jotai_1.atom)((get) => { | ||
const clientImplAtom = (0, jotai_1.atom)((get) => { | ||
const guest = get(guestAtom); | ||
@@ -51,4 +51,4 @@ if (!guest) | ||
}); | ||
return { channelAtom, guestAtom, clientAtom }; | ||
return { channelAtom, guestAtom, clientImplAtom }; | ||
} | ||
exports.createWrpAtomSet = createWrpAtomSet; |
@@ -1,5 +0,9 @@ | ||
import { ChannelAtom, ClientAtom, GuestAtom, SocketAtom } from "./index"; | ||
import { ChannelAtom, ClientImplAtom, GuestAtom, SocketAtom } from "./index"; | ||
export declare const socketAtom: SocketAtom; | ||
export declare const channelAtom: ChannelAtom; | ||
export declare const guestAtom: GuestAtom; | ||
export declare const clientAtom: ClientAtom; | ||
/** | ||
* @deprecated use `clientImplAtom` instead | ||
*/ | ||
export declare const clientAtom: ClientImplAtom; | ||
export declare const clientImplAtom: ClientImplAtom; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.clientAtom = exports.guestAtom = exports.channelAtom = exports.socketAtom = void 0; | ||
exports.clientImplAtom = exports.clientAtom = exports.guestAtom = exports.channelAtom = exports.socketAtom = void 0; | ||
const jotai_1 = require("jotai"); | ||
@@ -19,2 +19,6 @@ const ios_1 = require("../glue/ios"); | ||
exports.guestAtom = wrpAtomSet.guestAtom; | ||
exports.clientAtom = wrpAtomSet.clientAtom; | ||
/** | ||
* @deprecated use `clientImplAtom` instead | ||
*/ | ||
exports.clientAtom = wrpAtomSet.clientImplAtom; | ||
exports.clientImplAtom = wrpAtomSet.clientImplAtom; |
{ | ||
"name": "@pbkit/wrp", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": "JongChan Choi <jong@chan.moe>", | ||
@@ -5,0 +5,0 @@ "license": "(MIT OR Apache-2.0)", |
128304
2676