react-iframe-bridge 0.5.0 → 0.5.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.
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Roc, RocDocument } from 'rest-on-couch-client';
3
3
  import { SampleEntryContent, SampleEntryId } from '../types/db';
4
- export declare function useIframeBridgeContext(): IframeBridgeReadyContextType;
4
+ export declare function useIframeBridgeContext<PublicUserInfo = unknown>(): IframeBridgeReadyContextType<PublicUserInfo>;
5
5
  export declare function useIframeBridgeSample(): RocDocument<SampleEntryContent, SampleEntryId>;
6
6
  interface IframeBridgeReadyContextTypeBase<PublicUserInfo> {
7
7
  state: 'ready';
@@ -7,7 +7,9 @@ import { createContext, useContext, useEffect, useReducer, } from 'react';
7
7
  import { Roc } from 'rest-on-couch-client';
8
8
  import ErrorPage from '../components/ErrorPage';
9
9
  import LoadingFull from '../components/LoadingFull';
10
- const iframeBridgeContext = createContext(null);
10
+ const iframeBridgeContext =
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ createContext(null);
11
13
  export function useIframeBridgeContext() {
12
14
  const context = useContext(iframeBridgeContext);
13
15
  if (!context) {
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Roc, RocDocument } from 'rest-on-couch-client';
3
3
  import { SampleEntryContent, SampleEntryId } from '../types/db';
4
- export declare function useIframeBridgeContext(): IframeBridgeReadyContextType;
4
+ export declare function useIframeBridgeContext<PublicUserInfo = unknown>(): IframeBridgeReadyContextType<PublicUserInfo>;
5
5
  export declare function useIframeBridgeSample(): RocDocument<SampleEntryContent, SampleEntryId>;
6
6
  interface IframeBridgeReadyContextTypeBase<PublicUserInfo> {
7
7
  state: 'ready';
@@ -13,7 +13,9 @@ const react_1 = require("react");
13
13
  const rest_on_couch_client_1 = require("rest-on-couch-client");
14
14
  const ErrorPage_1 = __importDefault(require("../components/ErrorPage"));
15
15
  const LoadingFull_1 = __importDefault(require("../components/LoadingFull"));
16
- const iframeBridgeContext = (0, react_1.createContext)(null);
16
+ const iframeBridgeContext =
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ (0, react_1.createContext)(null);
17
19
  function useIframeBridgeContext() {
18
20
  const context = (0, react_1.useContext)(iframeBridgeContext);
19
21
  if (!context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-iframe-bridge",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
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",
@@ -36,8 +36,8 @@
36
36
  "devDependencies": {
37
37
  "@types/react": "^17.0.16",
38
38
  "@types/react-dom": "^17.0.9",
39
- "@zakodium/eslint-config": "^3.0.3",
40
- "eslint": "^7.32.0",
39
+ "@zakodium/eslint-config": "^5.1.1",
40
+ "eslint": "^8.14.0",
41
41
  "prettier": "^2.3.2",
42
42
  "react": "^17.0.2",
43
43
  "react-dom": "^17.0.2"