react-frame-component 5.2.1 → 5.2.2

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.
Files changed (2) hide show
  1. package/index.d.ts +31 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1 +1,31 @@
1
- declare module 'react-frame-component';
1
+ declare module 'react-frame-component' {
2
+ import * as React from 'react';
3
+
4
+ export interface FrameComponentProps
5
+ extends React.IframeHTMLAttributes<HTMLIFrameElement> {
6
+ head?: React.ReactNode | undefined;
7
+ mountTarget?: string | undefined;
8
+ initialContent?: string | undefined;
9
+ contentDidMount?: (() => void) | undefined;
10
+ contentDidUpdate?: (() => void) | undefined;
11
+ children: React.ReactNode;
12
+ ref?: React.Ref<FrameComponent>;
13
+ }
14
+
15
+ export default class FrameComponent extends React.Component<
16
+ FrameComponentProps
17
+ > {}
18
+
19
+ export interface FrameContextProps {
20
+ document?: HTMLDocument;
21
+ window?: Window;
22
+ }
23
+
24
+ export const FrameContext: React.Context<FrameContextProps>;
25
+
26
+ export const FrameContextProvider: React.Provider<FrameContextProps>;
27
+
28
+ export const FrameContextConsumer: React.Consumer<FrameContextProps>;
29
+
30
+ export function useFrame(): FrameContextProps;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-frame-component",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "description": "React component to wrap your application or component in an iFrame for encapsulation purposes",
5
5
  "main": "lib/index.js",
6
6
  "files": [