@iframe-resizer/react 5.5.7 → 5.5.8-beta.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  Iframe Resizer Version 5
2
2
 
3
- This JavaScript library is Copyright © 2013-2025 David J. Bradshaw and is distributed under the GPL V3 for non-commercial use. A commercial license is available upon request.
3
+ This JavaScript library is Copyright © 2013-2025 David J. Bradshaw and is dual-licensed, either under GPL V3, or a commercial license that is available for purchase upon request.
4
4
 
5
5
  For more information on commercial licensing see https://iframe-resizer.com/pricing/
6
6
 
package/README.md CHANGED
@@ -25,4 +25,4 @@ yarn add @iframe-resizer/react
25
25
 
26
26
  ---
27
27
 
28
- _iframe-resizer version 5.5.7 2025-09-23 - 09:33:32.779Z_
28
+ _iframe-resizer version 5.5.8-beta.2 2026-01-23 - 11:49:46.192Z_
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.5.7 (cjs) - 2025-09-23
4
+ * @module iframe-resizer/react 5.5.8-beta.2 (cjs) - 2026-01-23
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @see {@link https://iframe-resizer.com}
15
15
  *
16
- * @copyright (c) 2013 - 2025, David J. Bradshaw. All rights reserved.
16
+ * @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
17
17
  */
18
18
 
19
19
 
@@ -24,31 +24,28 @@ const connectResizer = require('@iframe-resizer/core');
24
24
  const acg = require('auto-console-group');
25
25
  const React = require('react');
26
26
 
27
- const filterIframeAttribs = props => {
28
- const {
29
- license,
30
- bodyBackground,
31
- bodyMargin,
32
- bodyPadding,
33
- checkOrigin,
34
- direction,
35
- inPageLinks,
36
- log,
37
- offset,
38
- offsetHeight,
39
- offsetWidth,
40
- scrolling,
41
- tolerance,
42
- warningTimeout,
43
- waitForLoad,
44
- onAfterClose,
45
- onReady,
46
- onMessage,
47
- onResized,
48
- ...iframeProps
49
- } = props;
50
- return iframeProps;
51
- };
27
+ const filterIframeAttribs = ({
28
+ license,
29
+ bodyBackground,
30
+ bodyMargin,
31
+ bodyPadding,
32
+ checkOrigin,
33
+ direction,
34
+ inPageLinks,
35
+ log,
36
+ offset,
37
+ offsetHeight,
38
+ offsetWidth,
39
+ scrolling,
40
+ tolerance,
41
+ warningTimeout,
42
+ waitForLoad,
43
+ onAfterClose,
44
+ onReady,
45
+ onMessage,
46
+ onResized,
47
+ ...iframeProps
48
+ }) => iframeProps;
52
49
 
53
50
  const esModuleInterop = mod =>
54
51
  // eslint-disable-next-line no-underscore-dangle
@@ -58,17 +55,15 @@ mod?.__esModule ? mod.default : mod;
58
55
  const createAutoConsoleGroup = esModuleInterop(acg);
59
56
 
60
57
  // TODO: Add support for React.forwardRef() in next major version (Breaking change)
61
- function IframeResizer(props) {
62
- // eslint-disable-next-line react/prop-types
63
- const {
64
- forwardRef,
65
- ...rest
66
- } = props;
67
- const filteredProps = filterIframeAttribs(rest);
58
+ function IframeResizer({
59
+ forwardRef,
60
+ ...props
61
+ }) {
62
+ const filteredProps = filterIframeAttribs(props);
68
63
  const iframeRef = React.useRef(null);
69
64
  const consoleGroup = createAutoConsoleGroup();
70
65
  const onBeforeClose = () => {
71
- consoleGroup.event('Blocked Close Event');
66
+ consoleGroup.event('close');
72
67
  consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
73
68
  return false;
74
69
  };
@@ -78,14 +73,14 @@ function IframeResizer(props) {
78
73
  React.useEffect(() => {
79
74
  const iframe = iframeRef.current;
80
75
  const resizerOptions = {
81
- ...rest,
76
+ ...props,
82
77
  onBeforeClose
83
78
  };
84
79
  consoleGroup.label(`react(${iframe.id})`);
85
80
  consoleGroup.event('setup');
86
81
  const resizer = connectResizer(resizerOptions)(iframe);
87
82
  consoleGroup.expand(resizerOptions.logExpand);
88
- if (rest.log) consoleGroup.log('Created React component');
83
+ if (props.log) consoleGroup.log('Created React component');
89
84
  return () => {
90
85
  consoleGroup.endAutoGroup();
91
86
  resizer?.disconnect();
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.5.7 (esm) - 2025-09-23
4
+ * @module iframe-resizer/react 5.5.8-beta.2 (esm) - 2026-01-23
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @see {@link https://iframe-resizer.com}
15
15
  *
16
- * @copyright (c) 2013 - 2025, David J. Bradshaw. All rights reserved.
16
+ * @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
17
17
  */
18
18
 
19
19
 
@@ -22,31 +22,28 @@ import connectResizer from '@iframe-resizer/core';
22
22
  import acg from 'auto-console-group';
23
23
  import React, { useRef, useEffect, useImperativeHandle } from 'react';
24
24
 
25
- const filterIframeAttribs = props => {
26
- const {
27
- license,
28
- bodyBackground,
29
- bodyMargin,
30
- bodyPadding,
31
- checkOrigin,
32
- direction,
33
- inPageLinks,
34
- log,
35
- offset,
36
- offsetHeight,
37
- offsetWidth,
38
- scrolling,
39
- tolerance,
40
- warningTimeout,
41
- waitForLoad,
42
- onAfterClose,
43
- onReady,
44
- onMessage,
45
- onResized,
46
- ...iframeProps
47
- } = props;
48
- return iframeProps;
49
- };
25
+ const filterIframeAttribs = ({
26
+ license,
27
+ bodyBackground,
28
+ bodyMargin,
29
+ bodyPadding,
30
+ checkOrigin,
31
+ direction,
32
+ inPageLinks,
33
+ log,
34
+ offset,
35
+ offsetHeight,
36
+ offsetWidth,
37
+ scrolling,
38
+ tolerance,
39
+ warningTimeout,
40
+ waitForLoad,
41
+ onAfterClose,
42
+ onReady,
43
+ onMessage,
44
+ onResized,
45
+ ...iframeProps
46
+ }) => iframeProps;
50
47
 
51
48
  const esModuleInterop = mod =>
52
49
  // eslint-disable-next-line no-underscore-dangle
@@ -56,17 +53,15 @@ mod?.__esModule ? mod.default : mod;
56
53
  const createAutoConsoleGroup = esModuleInterop(acg);
57
54
 
58
55
  // TODO: Add support for React.forwardRef() in next major version (Breaking change)
59
- function IframeResizer(props) {
60
- // eslint-disable-next-line react/prop-types
61
- const {
62
- forwardRef,
63
- ...rest
64
- } = props;
65
- const filteredProps = filterIframeAttribs(rest);
56
+ function IframeResizer({
57
+ forwardRef,
58
+ ...props
59
+ }) {
60
+ const filteredProps = filterIframeAttribs(props);
66
61
  const iframeRef = useRef(null);
67
62
  const consoleGroup = createAutoConsoleGroup();
68
63
  const onBeforeClose = () => {
69
- consoleGroup.event('Blocked Close Event');
64
+ consoleGroup.event('close');
70
65
  consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
71
66
  return false;
72
67
  };
@@ -76,14 +71,14 @@ function IframeResizer(props) {
76
71
  useEffect(() => {
77
72
  const iframe = iframeRef.current;
78
73
  const resizerOptions = {
79
- ...rest,
74
+ ...props,
80
75
  onBeforeClose
81
76
  };
82
77
  consoleGroup.label(`react(${iframe.id})`);
83
78
  consoleGroup.event('setup');
84
79
  const resizer = connectResizer(resizerOptions)(iframe);
85
80
  consoleGroup.expand(resizerOptions.logExpand);
86
- if (rest.log) consoleGroup.log('Created React component');
81
+ if (props.log) consoleGroup.log('Created React component');
87
82
  return () => {
88
83
  consoleGroup.endAutoGroup();
89
84
  resizer?.disconnect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/react",
3
- "version": "5.5.7",
3
+ "version": "5.5.8-beta.2",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {
@@ -39,7 +39,7 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@babel/runtime": "^7.28.4",
42
- "@iframe-resizer/core": "5.5.7",
42
+ "@iframe-resizer/core": "5.5.8-beta.2",
43
43
  "auto-console-group": "1.2.11"
44
44
  }
45
45
  }