react-iframe-bridge 0.6.0 → 0.7.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.
|
@@ -3,20 +3,20 @@ import { Roc, RocDocument } from 'rest-on-couch-client';
|
|
|
3
3
|
import { SampleEntryContent, SampleEntryId } from '../types/db';
|
|
4
4
|
export declare function useIframeBridgeContext<PublicUserInfo = unknown>(): IframeBridgeReadyContextType<PublicUserInfo>;
|
|
5
5
|
export declare function useIframeBridgeSample(): RocDocument<SampleEntryContent, SampleEntryId>;
|
|
6
|
-
interface IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
6
|
+
interface IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
7
7
|
state: 'ready';
|
|
8
8
|
data: IframeDataMessage;
|
|
9
|
-
roc: Roc<PublicUserInfo>;
|
|
9
|
+
roc: Roc<PublicUserInfo, PrivateUserInfo>;
|
|
10
10
|
}
|
|
11
|
-
interface IframeBridgeReadyContextTypeWithSample<PublicUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
11
|
+
interface IframeBridgeReadyContextTypeWithSample<PublicUserInfo, PrivateUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
12
12
|
hasSample: true;
|
|
13
13
|
sample: RocDocument<SampleEntryContent, SampleEntryId>;
|
|
14
14
|
}
|
|
15
|
-
interface IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
15
|
+
interface IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo, PrivateUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
16
16
|
hasSample: false;
|
|
17
17
|
sample: null;
|
|
18
18
|
}
|
|
19
|
-
declare type IframeBridgeReadyContextType<PublicUserInfo = unknown> = IframeBridgeReadyContextTypeWithSample<PublicUserInfo> | IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo>;
|
|
19
|
+
declare type IframeBridgeReadyContextType<PublicUserInfo = unknown, PrivateUserInfo = unknown> = IframeBridgeReadyContextTypeWithSample<PublicUserInfo, PrivateUserInfo> | IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo, PrivateUserInfo>;
|
|
20
20
|
interface IframeDataMessage {
|
|
21
21
|
couchDB: {
|
|
22
22
|
url: string;
|
package/lib/contexts/roc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Roc } from 'rest-on-couch-client';
|
|
3
|
-
export declare function useRoc<PublicUserInfo = unknown>(): Roc<PublicUserInfo>;
|
|
3
|
+
export declare function useRoc<PublicUserInfo = unknown>(): Roc<PublicUserInfo, unknown>;
|
|
4
4
|
export declare function RocProvider(props: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
url: string;
|
|
@@ -3,20 +3,20 @@ import { Roc, RocDocument } from 'rest-on-couch-client';
|
|
|
3
3
|
import { SampleEntryContent, SampleEntryId } from '../types/db';
|
|
4
4
|
export declare function useIframeBridgeContext<PublicUserInfo = unknown>(): IframeBridgeReadyContextType<PublicUserInfo>;
|
|
5
5
|
export declare function useIframeBridgeSample(): RocDocument<SampleEntryContent, SampleEntryId>;
|
|
6
|
-
interface IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
6
|
+
interface IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
7
7
|
state: 'ready';
|
|
8
8
|
data: IframeDataMessage;
|
|
9
|
-
roc: Roc<PublicUserInfo>;
|
|
9
|
+
roc: Roc<PublicUserInfo, PrivateUserInfo>;
|
|
10
10
|
}
|
|
11
|
-
interface IframeBridgeReadyContextTypeWithSample<PublicUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
11
|
+
interface IframeBridgeReadyContextTypeWithSample<PublicUserInfo, PrivateUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
12
12
|
hasSample: true;
|
|
13
13
|
sample: RocDocument<SampleEntryContent, SampleEntryId>;
|
|
14
14
|
}
|
|
15
|
-
interface IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo> {
|
|
15
|
+
interface IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo, PrivateUserInfo> extends IframeBridgeReadyContextTypeBase<PublicUserInfo, PrivateUserInfo> {
|
|
16
16
|
hasSample: false;
|
|
17
17
|
sample: null;
|
|
18
18
|
}
|
|
19
|
-
declare type IframeBridgeReadyContextType<PublicUserInfo = unknown> = IframeBridgeReadyContextTypeWithSample<PublicUserInfo> | IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo>;
|
|
19
|
+
declare type IframeBridgeReadyContextType<PublicUserInfo = unknown, PrivateUserInfo = unknown> = IframeBridgeReadyContextTypeWithSample<PublicUserInfo, PrivateUserInfo> | IframeBridgeReadyContextTypeWithoutSample<PublicUserInfo, PrivateUserInfo>;
|
|
20
20
|
interface IframeDataMessage {
|
|
21
21
|
couchDB: {
|
|
22
22
|
url: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Roc } from 'rest-on-couch-client';
|
|
3
|
-
export declare function useRoc<PublicUserInfo = unknown>(): Roc<PublicUserInfo>;
|
|
3
|
+
export declare function useRoc<PublicUserInfo = unknown>(): Roc<PublicUserInfo, unknown>;
|
|
4
4
|
export declare function RocProvider(props: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
url: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-iframe-bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "React hooks and components to work with iframe-bridge.",
|
|
5
5
|
"main": "lib-cjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"clsx": "^1.1.1",
|
|
32
32
|
"iframe-bridge": "^2.0.0",
|
|
33
33
|
"immer": "^9.0.5",
|
|
34
|
-
"rest-on-couch-client": "^5.
|
|
34
|
+
"rest-on-couch-client": "^5.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/react": "^17.0.16",
|