@iframe-resizer/react 5.4.5-beta.1 → 5.4.5-beta.11

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 CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/react
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.4.5-beta.1 2025-04-08 - 10:00:09.352Z_
25
+ _iframe-resizer version 5.4.5-beta.11 2025-04-15 - 21:16:10.331Z_
@@ -37,15 +37,29 @@ declare module '@iframe-resizer/react' {
37
37
  forwardRef?: any
38
38
  inPageLinks?: boolean
39
39
  license: string
40
- offset?: number
40
+ log?: boolean | 'expanded' | 'collapsed'
41
+ offsetSize?: number
41
42
  scrolling?: boolean | 'omit'
42
43
  tolerance?: number
43
44
  warningTimeout?: number
44
45
  }
45
46
 
46
47
  type ResizerEvents = {
47
- onReady?: (iframe: IFrameComponent) => void
48
+ onCLosed?: (iframeId: string) => void
48
49
  onMessage?: (ev: { iframe: IFrameComponent; message: any }) => void
50
+ onMouseEnter?: (ev: {
51
+ iframe: IFrameComponent
52
+ height: number
53
+ width: number
54
+ type: string
55
+ }) => void
56
+ onMouseLeave?: (ev: {
57
+ iframe: IFrameComponent
58
+ height: number
59
+ width: number
60
+ type: string
61
+ }) => void
62
+ onReady?: (iframe: IFrameComponent) => void
49
63
  onResized?: (ev: {
50
64
  iframe: IFrameComponent
51
65
  height: number
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.4.5-beta.1 (cjs) - 2025-04-08
4
+ * @module iframe-resizer/react 5.4.5-beta.11 (cjs) - 2025-04-15
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -70,12 +70,19 @@ function IframeResizer(props) {
70
70
  // deal with changes to the element and does not need recalling
71
71
  React.useEffect(() => {
72
72
  const iframe = iframeRef.current;
73
- const resizer = connectResizer({
73
+ const resizerOptions = {
74
74
  ...rest,
75
75
  onClose
76
- })(iframe);
76
+ };
77
77
  consoleGroup.label(`react(${iframe.id})`);
78
- return () => resizer?.disconnect();
78
+ consoleGroup.event('setup');
79
+ const resizer = connectResizer(resizerOptions)(iframe);
80
+ consoleGroup.expand(resizerOptions.logExpand);
81
+ if (rest.log) consoleGroup.log('Created React component');
82
+ return () => {
83
+ consoleGroup.endAutoGroup();
84
+ resizer?.disconnect();
85
+ };
79
86
  }, []); // eslint-disable-line react-hooks/exhaustive-deps
80
87
 
81
88
  React.useImperativeHandle(forwardRef, () => ({
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.4.5-beta.1 (esm) - 2025-04-08
4
+ * @module iframe-resizer/react 5.4.5-beta.11 (esm) - 2025-04-15
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -68,12 +68,19 @@ function IframeResizer(props) {
68
68
  // deal with changes to the element and does not need recalling
69
69
  useEffect(() => {
70
70
  const iframe = iframeRef.current;
71
- const resizer = connectResizer({
71
+ const resizerOptions = {
72
72
  ...rest,
73
73
  onClose
74
- })(iframe);
74
+ };
75
75
  consoleGroup.label(`react(${iframe.id})`);
76
- return () => resizer?.disconnect();
76
+ consoleGroup.event('setup');
77
+ const resizer = connectResizer(resizerOptions)(iframe);
78
+ consoleGroup.expand(resizerOptions.logExpand);
79
+ if (rest.log) consoleGroup.log('Created React component');
80
+ return () => {
81
+ consoleGroup.endAutoGroup();
82
+ resizer?.disconnect();
83
+ };
77
84
  }, []); // eslint-disable-line react-hooks/exhaustive-deps
78
85
 
79
86
  useImperativeHandle(forwardRef, () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/react",
3
- "version": "5.4.5-beta.1",
3
+ "version": "5.4.5-beta.11",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.27.0",
47
- "@iframe-resizer/core": "5.4.5-beta.1",
48
- "auto-console-group": "1.2.5"
47
+ "@iframe-resizer/core": "5.4.5-beta.11",
48
+ "auto-console-group": "1.2.9"
49
49
  }
50
50
  }