@iframe-resizer/react 5.2.0-beta.1 → 5.2.0-beta.3
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/README.md +1 -1
- package/iframe-resizer.react.d.ts +50 -46
- package/index.cjs.js +3 -2
- package/index.esm.js +3 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -7,58 +7,62 @@
|
|
|
7
7
|
declare module '@iframe-resizer/react' {
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
namespace IframeResizer {
|
|
11
|
+
type IFrameObject = {
|
|
12
|
+
moveToAnchor: (anchor: string) => void
|
|
13
|
+
resize: () => void
|
|
14
|
+
sendMessage: (message: string, targetOrigin?: string) => void
|
|
15
|
+
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
interface IFrameComponent extends HTMLIFrameElement {
|
|
18
|
+
iFrameResizer: IFrameObject
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
type IFrameForwardRef = Omit<IFrameObject, 'close' | 'disconnect'> & {
|
|
22
|
+
getElement: () => IFrameComponent
|
|
23
|
+
getRef: () => any
|
|
24
|
+
}
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
type IframeProps = React.DetailedHTMLProps<
|
|
27
|
+
React.IframeHTMLAttributes<HTMLIFrameElement>,
|
|
28
|
+
HTMLIFrameElement
|
|
29
|
+
>
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
type ResizerOptions = {
|
|
32
|
+
bodyBackground?: string | null
|
|
33
|
+
bodyMargin?: string | number | null
|
|
34
|
+
bodyPadding?: string | number | null
|
|
35
|
+
checkOrigin?: boolean | string[]
|
|
36
|
+
direction?: 'vertical' | 'horizontal' | 'none'
|
|
37
|
+
forwardRef?: any
|
|
38
|
+
inPageLinks?: boolean
|
|
39
|
+
license: string
|
|
40
|
+
offset?: number
|
|
41
|
+
scrolling?: boolean | 'omit'
|
|
42
|
+
tolerance?: number
|
|
43
|
+
warningTimeout?: number
|
|
44
|
+
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
type ResizerEvents = {
|
|
47
|
+
onInit?: (iframe: IFrameComponent) => void
|
|
48
|
+
onMessage?: (ev: { iframe: IFrameComponent; message: any }) => void
|
|
49
|
+
onResized?: (ev: {
|
|
50
|
+
iframe: IFrameComponent
|
|
51
|
+
height: number
|
|
52
|
+
width: number
|
|
53
|
+
type: string
|
|
54
|
+
}) => void
|
|
55
|
+
onScroll?: (ev: { x: number; y: number }) => boolean
|
|
56
|
+
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
type IframeResizerProps = Omit<IframeProps, 'scrolling'> &
|
|
59
|
+
ResizerOptions &
|
|
60
|
+
ResizerEvents
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
function IframeResizer(
|
|
63
|
+
function IframeResizer(
|
|
64
|
+
props: IframeResizer.IframeResizerProps,
|
|
65
|
+
): React.ReactElement
|
|
62
66
|
|
|
63
|
-
export
|
|
67
|
+
export = IframeResizer
|
|
64
68
|
}
|
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/react 5.2.0-beta.
|
|
4
|
+
* @module iframe-resizer/react 5.2.0-beta.3 (cjs) - 2024-07-11
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -26,7 +26,7 @@ const connectResizer = require('@iframe-resizer/core');
|
|
|
26
26
|
const React = require('react');
|
|
27
27
|
const warning = require('warning');
|
|
28
28
|
|
|
29
|
-
var _excluded$1 = ["license", "bodyBackground", "bodyMargin", "bodyPadding", "checkOrigin", "direction", "inPageLinks", "offset", "offsetHeight", "offsetWidth", "scrolling", "tolerance", "warningTimeout", "onClosed", "onReady", "onMessage", "onResized"];
|
|
29
|
+
var _excluded$1 = ["license", "bodyBackground", "bodyMargin", "bodyPadding", "checkOrigin", "direction", "inPageLinks", "offset", "offsetHeight", "offsetWidth", "scrolling", "tolerance", "warningTimeout", "waitForLoad", "onClosed", "onReady", "onMessage", "onResized"];
|
|
30
30
|
const filterIframeAttribs = (function (props) {
|
|
31
31
|
props.license;
|
|
32
32
|
props.bodyBackground;
|
|
@@ -41,6 +41,7 @@ const filterIframeAttribs = (function (props) {
|
|
|
41
41
|
props.scrolling;
|
|
42
42
|
props.tolerance;
|
|
43
43
|
props.warningTimeout;
|
|
44
|
+
props.waitForLoad;
|
|
44
45
|
props.onClosed;
|
|
45
46
|
props.onReady;
|
|
46
47
|
props.onMessage;
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/react 5.2.0-beta.
|
|
4
|
+
* @module iframe-resizer/react 5.2.0-beta.3 (esm) - 2024-07-11
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -24,7 +24,7 @@ import connectResizer from '@iframe-resizer/core';
|
|
|
24
24
|
import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
25
25
|
import warning from 'warning';
|
|
26
26
|
|
|
27
|
-
var _excluded$1 = ["license", "bodyBackground", "bodyMargin", "bodyPadding", "checkOrigin", "direction", "inPageLinks", "offset", "offsetHeight", "offsetWidth", "scrolling", "tolerance", "warningTimeout", "onClosed", "onReady", "onMessage", "onResized"];
|
|
27
|
+
var _excluded$1 = ["license", "bodyBackground", "bodyMargin", "bodyPadding", "checkOrigin", "direction", "inPageLinks", "offset", "offsetHeight", "offsetWidth", "scrolling", "tolerance", "warningTimeout", "waitForLoad", "onClosed", "onReady", "onMessage", "onResized"];
|
|
28
28
|
const filterIframeAttribs = (function (props) {
|
|
29
29
|
props.license;
|
|
30
30
|
props.bodyBackground;
|
|
@@ -39,6 +39,7 @@ const filterIframeAttribs = (function (props) {
|
|
|
39
39
|
props.scrolling;
|
|
40
40
|
props.tolerance;
|
|
41
41
|
props.warningTimeout;
|
|
42
|
+
props.waitForLoad;
|
|
42
43
|
props.onClosed;
|
|
43
44
|
props.onReady;
|
|
44
45
|
props.onMessage;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/react",
|
|
3
|
-
"version": "5.2.0-beta.
|
|
3
|
+
"version": "5.2.0-beta.3",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "David J. Bradshaw",
|
|
8
8
|
"email": "info@iframe-resizer.com"
|
|
9
9
|
},
|
|
10
|
-
"description": "Keep
|
|
10
|
+
"description": "Keep iFrames sized to their content.",
|
|
11
11
|
"github": "https://github.com/davidjbradshaw/iframe-resizer",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"react"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@
|
|
46
|
+
"@babel/runtime": "^7.24.7",
|
|
47
|
+
"@iframe-resizer/core": "5.2.0-beta.3",
|
|
47
48
|
"warning": "^4.0.3"
|
|
48
49
|
}
|
|
49
50
|
}
|