🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@iframe-resizer/react

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iframe-resizer/react - npm Package Compare versions

Comparing version
6.0.0-beta.10
to
6.0.0-beta.11
+3
-3
index.cjs.js
/*!
* @preserve
*
* @module iframe-resizer/react 6.0.0-beta.10 (esm) - 2026-04-16
* @module iframe-resizer/react 6.0.0-beta.11 (esm) - 2026-04-21
*
* @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
* @license GPL-3.0-only For use with GPL compliant sites (fully published front & backend source code)
* Alternatively for commercial use, you can purchase a license from

@@ -20,3 +20,3 @@ * https://iframe-resizer.com/pricing

"use strict";const e=require("@iframe-resizer/common"),o=require("@iframe-resizer/core"),r=require("auto-console-group"),n=require("react"),t=e.esModuleInterop(r);const s=n.forwardRef(function(e,r){const{log:s,logExpand:a}=e,c=(({license:e,bodyBackground:o,bodyMargin:r,bodyPadding:n,checkOrigin:t,direction:s,inPageLinks:a,log:c,logExpand:i,offsetSize:u,scrolling:d,tolerance:l,waitForLoad:g,warningTimeout:f,onAfterClose:m,onMessage:p,onMouseEnter:R,onMouseLeave:v,onReady:M,onResized:z,onScroll:E,...y})=>y)(e),i=n.useRef(null),u=t(),d=()=>(u.event("close"),u.warn("Close event ignored, to remove the iframe update your React component."),!1);return n.useEffect(()=>{const r=i.current,n={...e,onBeforeClose:d};u.label(`react(${r.id})`),u.event("setup");const t=o(n)(r);return u.expand(a),s&&u.log("Created React component"),()=>{u.endAutoGroup(),t?.disconnect()}},[]),n.useImperativeHandle(r,()=>({getRef:()=>i,getElement:()=>i.current,moveToAnchor:e=>i.current.iframeResizer.moveToAnchor(e),sendMessage:(e,o)=>{i.current.iframeResizer.sendMessage(e,o)}})),n.createElement("iframe",{...c,ref:i})});module.exports=s;
"use strict";const e=require("@iframe-resizer/common"),r=require("@iframe-resizer/core"),o=require("auto-console-group"),n=require("react"),t=e.esModuleInterop(o);const s=n.forwardRef(function(e,o){const{log:s,logExpand:c}=e,i=(({license:e,bodyBackground:r,bodyMargin:o,bodyPadding:n,checkOrigin:t,direction:s,inPageLinks:c,log:i,logExpand:a,offsetSize:u,scrolling:l,tolerance:d,waitForLoad:g,warningTimeout:f,onAfterClose:m,onMessage:p,onMouseEnter:R,onMouseLeave:v,onReady:z,onResized:M,onScroll:E,...y})=>y)(e),a=n.useRef(null),u=n.useRef(null);u.current||(u.current=t());const l=u.current,d=()=>(l.event("close"),l.warn("Close event ignored, to remove the iframe update your React component."),!1);return n.useEffect(()=>{const o=a.current;l.label(`react(${o.id})`),l.event("setup");const n=r({...e,onBeforeClose:d})(o);return l.expand(c),s&&l.log("Created React component"),()=>{l.endAutoGroup(),n?.disconnect()}},[]),n.useImperativeHandle(o,()=>({getRef:()=>a,getElement:()=>a.current,getVersion:()=>a.current.iframeResizer.getVersion(),moveToAnchor:e=>a.current.iframeResizer.moveToAnchor(e),sendMessage:(e,r)=>{a.current.iframeResizer.sendMessage(e,r)}}),[]),n.createElement("iframe",{...i,ref:a})});module.exports=s;
//# sourceMappingURL=index.cjs.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.cjs.js","sources":["../../packages/react/index.tsx","../../packages/react/filter-iframe-attribs.ts"],"sourcesContent":["// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable react/require-default-props */\nimport { esModuleInterop } from '@iframe-resizer/common'\nimport type {\n IframeComponent,\n IframeObject,\n IframeOptions,\n} from '@iframe-resizer/core'\nimport connectResizer from '@iframe-resizer/core'\nimport acg from 'auto-console-group'\nimport React, {\n forwardRef,\n type ReactElement,\n type RefObject,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react'\n\nimport filterIframeAttribs from './filter-iframe-attribs'\n\nexport type IframeForwardRef = Omit<IframeObject, 'close' | 'disconnect'> & {\n getElement: () => IframeComponent\n getRef: () => RefObject<HTMLIFrameElement | null>\n}\n\ntype IframeProps = React.DetailedHTMLProps<\n React.IframeHTMLAttributes<HTMLIFrameElement>,\n HTMLIFrameElement\n>\n\nexport type IframeResizerProps = Omit<IframeProps, 'scrolling'> &\n Omit<IframeOptions, 'id' | 'onBeforeClose'>\n\n// Deal with UMD not converting default exports to named exports\nconst createAutoConsoleGroup = esModuleInterop(acg)\n\nfunction IframeResizer(\n props: IframeResizerProps,\n ref: React.ForwardedRef<IframeForwardRef>,\n): ReactElement {\n const { log, logExpand } = props\n const filteredProps = filterIframeAttribs(props)\n const iframeRef = useRef<IframeComponent>(null)\n const consoleGroup = createAutoConsoleGroup()\n\n const onBeforeClose = (): boolean => {\n consoleGroup.event('close')\n consoleGroup.warn(\n `Close event ignored, to remove the iframe update your React component.`,\n )\n\n return false\n }\n\n // This hook is only run once, as once iframe-resizer is bound, it will\n // deal with changes to the element and does not need recalling\n useEffect(() => {\n const iframe = iframeRef.current\n const resizerOptions = { ...props, onBeforeClose }\n\n consoleGroup.label(`react(${iframe.id})`)\n consoleGroup.event('setup')\n\n const resizer = connectResizer(resizerOptions)(iframe)\n\n consoleGroup.expand(logExpand)\n if (log) consoleGroup.log('Created React component')\n\n return () => {\n consoleGroup.endAutoGroup()\n resizer?.disconnect()\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n useImperativeHandle(ref, () => ({\n getRef: () => iframeRef,\n getElement: () => iframeRef.current,\n moveToAnchor: (anchor: string) =>\n iframeRef.current.iframeResizer.moveToAnchor(anchor),\n sendMessage: (message: any, targetOrigin?: string) => {\n iframeRef.current.iframeResizer.sendMessage(message, targetOrigin)\n },\n }))\n\n // eslint-disable-next-line jsx-a11y/iframe-has-title\n return <iframe {...filteredProps} ref={iframeRef} />\n}\n\nexport default forwardRef<IframeForwardRef, IframeResizerProps>(IframeResizer)\n\nexport {\n type IframeComponent,\n type IframeDirection,\n type IframeLogOption,\n type IframeMessageData,\n type IframeMouseData,\n type IframeObject,\n type IframeOptions,\n type IframeResizedData,\n type IframeScrollData,\n type IframeScrollOption,\n} from '@iframe-resizer/core'\n","export default ({\n license,\n bodyBackground,\n bodyMargin,\n bodyPadding,\n checkOrigin,\n direction,\n inPageLinks,\n log,\n logExpand,\n offsetSize,\n scrolling,\n tolerance,\n waitForLoad,\n warningTimeout,\n onAfterClose,\n onMessage,\n onMouseEnter,\n onMouseLeave,\n onReady,\n onResized,\n onScroll,\n ...iframeProps\n}: Record<string, unknown>): Record<string, unknown> => iframeProps\n"],"names":["createAutoConsoleGroup","esModuleInterop","acg","index","forwardRef","props","ref","log","logExpand","filteredProps","license","bodyBackground","bodyMargin","bodyPadding","checkOrigin","direction","inPageLinks","offsetSize","scrolling","tolerance","waitForLoad","warningTimeout","onAfterClose","onMessage","onMouseEnter","onMouseLeave","onReady","onResized","onScroll","iframeProps","filterIframeAttribs","iframeRef","useRef","consoleGroup","onBeforeClose","event","warn","useEffect","iframe","current","resizerOptions","label","id","resizer","connectResizer","expand","endAutoGroup","disconnect","useImperativeHandle","getRef","getElement","moveToAnchor","anchor","iframeResizer","sendMessage","message","targetOrigin","React","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;4IAmCMA,EAAyBC,EAAAA,gBAAgBC,GAsD/C,MAAAC,EAAeC,EAAAA,WApDf,SACEC,EACAC,GAEA,MAAMC,IAAEA,EAAAC,UAAKA,GAAcH,EACrBI,EC1CO,GACbC,UACAC,iBACAC,aACAC,cACAC,cACAC,YACAC,cACAT,MACAC,YACAS,aACAC,YACAC,YACAC,cACAC,iBACAC,eACAC,YACAC,eACAC,eACAC,UACAC,YACAC,cACGC,KACmDA,EDmBhCC,CAAoBzB,GACpC0B,EAAYC,EAAAA,OAAwB,MACpCC,EAAejC,IAEfkC,EAAgB,KACpBD,EAAaE,MAAM,SACnBF,EAAaG,KACX,2EAGK,GAkCT,OA7BAC,EAAAA,UAAU,KACR,MAAMC,EAASP,EAAUQ,QACnBC,EAAiB,IAAKnC,EAAO6B,iBAEnCD,EAAaQ,MAAM,SAASH,EAAOI,OACnCT,EAAaE,MAAM,SAEnB,MAAMQ,EAAUC,EAAeJ,EAAfI,CAA+BN,GAK/C,OAHAL,EAAaY,OAAOrC,GAChBD,GAAK0B,EAAa1B,IAAI,2BAEnB,KACL0B,EAAaa,eACbH,GAASI,eAEV,IAEHC,EAAAA,oBAAoB1C,EAAK,KAAA,CACvB2C,OAAQ,IAAMlB,EACdmB,WAAY,IAAMnB,EAAUQ,QAC5BY,aAAeC,GACbrB,EAAUQ,QAAQc,cAAcF,aAAaC,GAC/CE,YAAa,CAACC,EAAcC,KAC1BzB,EAAUQ,QAAQc,cAAcC,YAAYC,EAASC,OAKlDC,EAAAC,cAAC,SAAA,IAAWjD,EAAeH,IAAKyB,GACzC"}
{"version":3,"file":"index.cjs.js","sources":["../../packages/react/index.tsx","../../packages/react/filter-iframe-attribs.ts"],"sourcesContent":["// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable react/require-default-props */\nimport { esModuleInterop } from '@iframe-resizer/common'\nimport type {\n IFrameComponent,\n IFrameObject,\n IFrameOptions,\n} from '@iframe-resizer/core'\nimport connectResizer from '@iframe-resizer/core'\nimport acg from 'auto-console-group'\nimport React, {\n forwardRef,\n type ReactElement,\n type RefObject,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react'\n\nimport filterIframeAttribs from './filter-iframe-attribs'\n\nexport type IFrameForwardRef = Omit<IFrameObject, 'close' | 'disconnect'> & {\n /** @deprecated Use getRef() instead */\n getElement: () => IFrameComponent\n getRef: () => RefObject<IFrameComponent | null>\n}\n\ntype IframeProps = React.DetailedHTMLProps<\n React.IframeHTMLAttributes<HTMLIFrameElement>,\n HTMLIFrameElement\n>\n\nexport type IframeResizerProps = Omit<IframeProps, 'scrolling'> &\n Omit<IFrameOptions, 'id' | 'onBeforeClose'>\n\n// Deal with UMD not converting default exports to named exports\nconst createAutoConsoleGroup = esModuleInterop(acg)\n\nfunction IframeResizer(\n props: IframeResizerProps,\n ref: React.ForwardedRef<IFrameForwardRef>,\n): ReactElement {\n const { log, logExpand } = props\n const filteredProps = filterIframeAttribs(props)\n const iframeRef = useRef<IFrameComponent>(null)\n const consoleGroupRef =\n useRef<ReturnType<typeof createAutoConsoleGroup>>(null)\n\n if (!consoleGroupRef.current) {\n consoleGroupRef.current = createAutoConsoleGroup()\n }\n\n const consoleGroup = consoleGroupRef.current\n\n const onBeforeClose = (): boolean => {\n consoleGroup.event('close')\n consoleGroup.warn(\n `Close event ignored, to remove the iframe update your React component.`,\n )\n\n return false\n }\n\n // This hook is only run once, as once iframe-resizer is bound, it will\n // deal with changes to the element and does not need recalling\n useEffect(() => {\n const iframe = iframeRef.current\n\n consoleGroup.label(`react(${iframe.id})`)\n consoleGroup.event('setup')\n\n const resizer = connectResizer({ ...props, onBeforeClose })(iframe)\n\n consoleGroup.expand(logExpand)\n if (log) consoleGroup.log('Created React component')\n\n return () => {\n consoleGroup.endAutoGroup()\n resizer?.disconnect()\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n useImperativeHandle(\n ref,\n () => ({\n getRef: () => iframeRef,\n getElement: () => iframeRef.current,\n getVersion: () => iframeRef.current.iframeResizer.getVersion(),\n moveToAnchor: (anchor: string) =>\n iframeRef.current.iframeResizer.moveToAnchor(anchor),\n sendMessage: (message: any, targetOrigin?: string) => {\n iframeRef.current.iframeResizer.sendMessage(message, targetOrigin)\n },\n }),\n [],\n )\n\n // eslint-disable-next-line jsx-a11y/iframe-has-title\n return <iframe {...filteredProps} ref={iframeRef} />\n}\n\nexport default forwardRef<IFrameForwardRef, IframeResizerProps>(IframeResizer)\n\nexport type * from '@iframe-resizer/core'\n","export default ({\n license,\n bodyBackground,\n bodyMargin,\n bodyPadding,\n checkOrigin,\n direction,\n inPageLinks,\n log,\n logExpand,\n offsetSize,\n scrolling,\n tolerance,\n waitForLoad,\n warningTimeout,\n onAfterClose,\n onMessage,\n onMouseEnter,\n onMouseLeave,\n onReady,\n onResized,\n onScroll,\n ...iframeProps\n}: Record<string, unknown>): Record<string, unknown> => iframeProps\n"],"names":["createAutoConsoleGroup","esModuleInterop","acg","index","forwardRef","props","ref","log","logExpand","filteredProps","license","bodyBackground","bodyMargin","bodyPadding","checkOrigin","direction","inPageLinks","offsetSize","scrolling","tolerance","waitForLoad","warningTimeout","onAfterClose","onMessage","onMouseEnter","onMouseLeave","onReady","onResized","onScroll","iframeProps","filterIframeAttribs","iframeRef","useRef","consoleGroupRef","current","consoleGroup","onBeforeClose","event","warn","useEffect","iframe","label","id","resizer","connectResizer","expand","endAutoGroup","disconnect","useImperativeHandle","getRef","getElement","getVersion","iframeResizer","moveToAnchor","anchor","sendMessage","message","targetOrigin","React","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;4IAoCMA,EAAyBC,EAAAA,gBAAgBC,GAiE/C,MAAAC,EAAeC,EAAAA,WA/Df,SACEC,EACAC,GAEA,MAAMC,IAAEA,EAAAC,UAAKA,GAAcH,EACrBI,EC3CO,GACbC,UACAC,iBACAC,aACAC,cACAC,cACAC,YACAC,cACAT,MACAC,YACAS,aACAC,YACAC,YACAC,cACAC,iBACAC,eACAC,YACAC,eACAC,eACAC,UACAC,YACAC,cACGC,KACmDA,EDoBhCC,CAAoBzB,GACpC0B,EAAYC,EAAAA,OAAwB,MACpCC,EACJD,EAAAA,OAAkD,MAE/CC,EAAgBC,UACnBD,EAAgBC,QAAUlC,KAG5B,MAAMmC,EAAeF,EAAgBC,QAE/BE,EAAgB,KACpBD,EAAaE,MAAM,SACnBF,EAAaG,KACX,2EAGK,GAsCT,OAjCAC,EAAAA,UAAU,KACR,MAAMC,EAAST,EAAUG,QAEzBC,EAAaM,MAAM,SAASD,EAAOE,OACnCP,EAAaE,MAAM,SAEnB,MAAMM,EAAUC,EAAe,IAAKvC,EAAO+B,iBAA3BQ,CAA4CJ,GAK5D,OAHAL,EAAaU,OAAOrC,GAChBD,GAAK4B,EAAa5B,IAAI,2BAEnB,KACL4B,EAAaW,eACbH,GAASI,eAEV,IAEHC,EAAAA,oBACE1C,EACA,KAAA,CACE2C,OAAQ,IAAMlB,EACdmB,WAAY,IAAMnB,EAAUG,QAC5BiB,WAAY,IAAMpB,EAAUG,QAAQkB,cAAcD,aAClDE,aAAeC,GACbvB,EAAUG,QAAQkB,cAAcC,aAAaC,GAC/CC,YAAa,CAACC,EAAcC,KAC1B1B,EAAUG,QAAQkB,cAAcG,YAAYC,EAASC,MAGzD,IAIKC,EAAAC,cAAC,SAAA,IAAWlD,EAAeH,IAAKyB,GACzC"}

@@ -1,11 +0,12 @@

import { IframeComponent, IframeObject, IframeOptions } from '@iframe-resizer/core';
import { IFrameComponent, IFrameObject, IFrameOptions } from '@iframe-resizer/core';
import { default as React, RefObject } from 'react';
export type IframeForwardRef = Omit<IframeObject, 'close' | 'disconnect'> & {
getElement: () => IframeComponent;
getRef: () => RefObject<HTMLIFrameElement | null>;
export type IFrameForwardRef = Omit<IFrameObject, 'close' | 'disconnect'> & {
/** @deprecated Use getRef() instead */
getElement: () => IFrameComponent;
getRef: () => RefObject<IFrameComponent | null>;
};
type IframeProps = React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
export type IframeResizerProps = Omit<IframeProps, 'scrolling'> & Omit<IframeOptions, 'id' | 'onBeforeClose'>;
export type IframeResizerProps = Omit<IframeProps, 'scrolling'> & Omit<IFrameOptions, 'id' | 'onBeforeClose'>;
declare const _default: any;
export default _default;
export { type IframeComponent, type IframeDirection, type IframeLogOption, type IframeMessageData, type IframeMouseData, type IframeObject, type IframeOptions, type IframeResizedData, type IframeScrollData, type IframeScrollOption, } from '@iframe-resizer/core';
export type * from '@iframe-resizer/core';
/*!
* @preserve
*
* @module iframe-resizer/react 6.0.0-beta.10 (esm) - 2026-04-16
* @module iframe-resizer/react 6.0.0-beta.11 (esm) - 2026-04-21
*
* @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
* @license GPL-3.0-only For use with GPL compliant sites (fully published front & backend source code)
* Alternatively for commercial use, you can purchase a license from

@@ -20,3 +20,3 @@ * https://iframe-resizer.com/pricing

import{esModuleInterop as e}from"@iframe-resizer/common";import o from"@iframe-resizer/core";import r from"auto-console-group";import n,{forwardRef as t,useRef as a,useEffect as c,useImperativeHandle as i}from"react";const s=e(r);const m=t(function(e,r){const{log:t,logExpand:m}=e,l=(({license:e,bodyBackground:o,bodyMargin:r,bodyPadding:n,checkOrigin:t,direction:a,inPageLinks:c,log:i,logExpand:s,offsetSize:m,scrolling:l,tolerance:d,waitForLoad:u,warningTimeout:g,onAfterClose:f,onMessage:p,onMouseEnter:v,onMouseLeave:R,onReady:z,onResized:M,onScroll:y,...E})=>E)(e),d=a(null),u=s(),g=()=>(u.event("close"),u.warn("Close event ignored, to remove the iframe update your React component."),!1);return c(()=>{const r=d.current,n={...e,onBeforeClose:g};u.label(`react(${r.id})`),u.event("setup");const a=o(n)(r);return u.expand(m),t&&u.log("Created React component"),()=>{u.endAutoGroup(),a?.disconnect()}},[]),i(r,()=>({getRef:()=>d,getElement:()=>d.current,moveToAnchor:e=>d.current.iframeResizer.moveToAnchor(e),sendMessage:(e,o)=>{d.current.iframeResizer.sendMessage(e,o)}})),/* @__PURE__ */n.createElement("iframe",{...l,ref:d})});export{m as default};
import{esModuleInterop as e}from"@iframe-resizer/common";import o from"@iframe-resizer/core";import r from"auto-console-group";import n,{forwardRef as t,useRef as c,useEffect as i,useImperativeHandle as s}from"react";const a=e(r);const l=t(function(e,r){const{log:t,logExpand:l}=e,m=(({license:e,bodyBackground:o,bodyMargin:r,bodyPadding:n,checkOrigin:t,direction:c,inPageLinks:i,log:s,logExpand:a,offsetSize:l,scrolling:m,tolerance:u,waitForLoad:d,warningTimeout:g,onAfterClose:f,onMessage:p,onMouseEnter:R,onMouseLeave:v,onReady:z,onResized:M,onScroll:y,...E})=>E)(e),u=c(null),d=c(null);d.current||(d.current=a());const g=d.current,f=()=>(g.event("close"),g.warn("Close event ignored, to remove the iframe update your React component."),!1);return i(()=>{const r=u.current;g.label(`react(${r.id})`),g.event("setup");const n=o({...e,onBeforeClose:f})(r);return g.expand(l),t&&g.log("Created React component"),()=>{g.endAutoGroup(),n?.disconnect()}},[]),s(r,()=>({getRef:()=>u,getElement:()=>u.current,getVersion:()=>u.current.iframeResizer.getVersion(),moveToAnchor:e=>u.current.iframeResizer.moveToAnchor(e),sendMessage:(e,o)=>{u.current.iframeResizer.sendMessage(e,o)}}),[]),/* @__PURE__ */n.createElement("iframe",{...m,ref:u})});export{l as default};
//# sourceMappingURL=index.esm.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.esm.js","sources":["../../packages/react/filter-iframe-attribs.ts","../../packages/react/index.tsx"],"sourcesContent":["export default ({\n license,\n bodyBackground,\n bodyMargin,\n bodyPadding,\n checkOrigin,\n direction,\n inPageLinks,\n log,\n logExpand,\n offsetSize,\n scrolling,\n tolerance,\n waitForLoad,\n warningTimeout,\n onAfterClose,\n onMessage,\n onMouseEnter,\n onMouseLeave,\n onReady,\n onResized,\n onScroll,\n ...iframeProps\n}: Record<string, unknown>): Record<string, unknown> => iframeProps\n","// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable react/require-default-props */\nimport { esModuleInterop } from '@iframe-resizer/common'\nimport type {\n IframeComponent,\n IframeObject,\n IframeOptions,\n} from '@iframe-resizer/core'\nimport connectResizer from '@iframe-resizer/core'\nimport acg from 'auto-console-group'\nimport React, {\n forwardRef,\n type ReactElement,\n type RefObject,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react'\n\nimport filterIframeAttribs from './filter-iframe-attribs'\n\nexport type IframeForwardRef = Omit<IframeObject, 'close' | 'disconnect'> & {\n getElement: () => IframeComponent\n getRef: () => RefObject<HTMLIFrameElement | null>\n}\n\ntype IframeProps = React.DetailedHTMLProps<\n React.IframeHTMLAttributes<HTMLIFrameElement>,\n HTMLIFrameElement\n>\n\nexport type IframeResizerProps = Omit<IframeProps, 'scrolling'> &\n Omit<IframeOptions, 'id' | 'onBeforeClose'>\n\n// Deal with UMD not converting default exports to named exports\nconst createAutoConsoleGroup = esModuleInterop(acg)\n\nfunction IframeResizer(\n props: IframeResizerProps,\n ref: React.ForwardedRef<IframeForwardRef>,\n): ReactElement {\n const { log, logExpand } = props\n const filteredProps = filterIframeAttribs(props)\n const iframeRef = useRef<IframeComponent>(null)\n const consoleGroup = createAutoConsoleGroup()\n\n const onBeforeClose = (): boolean => {\n consoleGroup.event('close')\n consoleGroup.warn(\n `Close event ignored, to remove the iframe update your React component.`,\n )\n\n return false\n }\n\n // This hook is only run once, as once iframe-resizer is bound, it will\n // deal with changes to the element and does not need recalling\n useEffect(() => {\n const iframe = iframeRef.current\n const resizerOptions = { ...props, onBeforeClose }\n\n consoleGroup.label(`react(${iframe.id})`)\n consoleGroup.event('setup')\n\n const resizer = connectResizer(resizerOptions)(iframe)\n\n consoleGroup.expand(logExpand)\n if (log) consoleGroup.log('Created React component')\n\n return () => {\n consoleGroup.endAutoGroup()\n resizer?.disconnect()\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n useImperativeHandle(ref, () => ({\n getRef: () => iframeRef,\n getElement: () => iframeRef.current,\n moveToAnchor: (anchor: string) =>\n iframeRef.current.iframeResizer.moveToAnchor(anchor),\n sendMessage: (message: any, targetOrigin?: string) => {\n iframeRef.current.iframeResizer.sendMessage(message, targetOrigin)\n },\n }))\n\n // eslint-disable-next-line jsx-a11y/iframe-has-title\n return <iframe {...filteredProps} ref={iframeRef} />\n}\n\nexport default forwardRef<IframeForwardRef, IframeResizerProps>(IframeResizer)\n\nexport {\n type IframeComponent,\n type IframeDirection,\n type IframeLogOption,\n type IframeMessageData,\n type IframeMouseData,\n type IframeObject,\n type IframeOptions,\n type IframeResizedData,\n type IframeScrollData,\n type IframeScrollOption,\n} from '@iframe-resizer/core'\n"],"names":["createAutoConsoleGroup","esModuleInterop","acg","index","forwardRef","props","ref","log","logExpand","filteredProps","license","bodyBackground","bodyMargin","bodyPadding","checkOrigin","direction","inPageLinks","offsetSize","scrolling","tolerance","waitForLoad","warningTimeout","onAfterClose","onMessage","onMouseEnter","onMouseLeave","onReady","onResized","onScroll","iframeProps","filterIframeAttribs","iframeRef","useRef","consoleGroup","onBeforeClose","event","warn","useEffect","iframe","current","resizerOptions","label","id","resizer","connectResizer","expand","endAutoGroup","disconnect","useImperativeHandle","getRef","getElement","moveToAnchor","anchor","iframeResizer","sendMessage","message","targetOrigin","React","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;yNAAA,MCmCMA,EAAyBC,EAAgBC,GAsD/C,MAAAC,EAAeC,EApDf,SACEC,EACAC,GAEA,MAAMC,IAAEA,EAAAC,UAAKA,GAAcH,EACrBI,ED1CO,GACbC,UACAC,iBACAC,aACAC,cACAC,cACAC,YACAC,cACAT,MACAC,YACAS,aACAC,YACAC,YACAC,cACAC,iBACAC,eACAC,YACAC,eACAC,eACAC,UACAC,YACAC,cACGC,KACmDA,ECmBhCC,CAAoBzB,GACpC0B,EAAYC,EAAwB,MACpCC,EAAejC,IAEfkC,EAAgB,KACpBD,EAAaE,MAAM,SACnBF,EAAaG,KACX,2EAGK,GAkCT,OA7BAC,EAAU,KACR,MAAMC,EAASP,EAAUQ,QACnBC,EAAiB,IAAKnC,EAAO6B,iBAEnCD,EAAaQ,MAAM,SAASH,EAAOI,OACnCT,EAAaE,MAAM,SAEnB,MAAMQ,EAAUC,EAAeJ,EAAfI,CAA+BN,GAK/C,OAHAL,EAAaY,OAAOrC,GAChBD,GAAK0B,EAAa1B,IAAI,2BAEnB,KACL0B,EAAaa,eACbH,GAASI,eAEV,IAEHC,EAAoB1C,EAAK,KAAA,CACvB2C,OAAQ,IAAMlB,EACdmB,WAAY,IAAMnB,EAAUQ,QAC5BY,aAAeC,GACbrB,EAAUQ,QAAQc,cAAcF,aAAaC,GAC/CE,YAAa,CAACC,EAAcC,KAC1BzB,EAAUQ,QAAQc,cAAcC,YAAYC,EAASC,sBAKlDC,EAAAC,cAAC,SAAA,IAAWjD,EAAeH,IAAKyB,GACzC"}
{"version":3,"file":"index.esm.js","sources":["../../packages/react/filter-iframe-attribs.ts","../../packages/react/index.tsx"],"sourcesContent":["export default ({\n license,\n bodyBackground,\n bodyMargin,\n bodyPadding,\n checkOrigin,\n direction,\n inPageLinks,\n log,\n logExpand,\n offsetSize,\n scrolling,\n tolerance,\n waitForLoad,\n warningTimeout,\n onAfterClose,\n onMessage,\n onMouseEnter,\n onMouseLeave,\n onReady,\n onResized,\n onScroll,\n ...iframeProps\n}: Record<string, unknown>): Record<string, unknown> => iframeProps\n","// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable react/require-default-props */\nimport { esModuleInterop } from '@iframe-resizer/common'\nimport type {\n IFrameComponent,\n IFrameObject,\n IFrameOptions,\n} from '@iframe-resizer/core'\nimport connectResizer from '@iframe-resizer/core'\nimport acg from 'auto-console-group'\nimport React, {\n forwardRef,\n type ReactElement,\n type RefObject,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react'\n\nimport filterIframeAttribs from './filter-iframe-attribs'\n\nexport type IFrameForwardRef = Omit<IFrameObject, 'close' | 'disconnect'> & {\n /** @deprecated Use getRef() instead */\n getElement: () => IFrameComponent\n getRef: () => RefObject<IFrameComponent | null>\n}\n\ntype IframeProps = React.DetailedHTMLProps<\n React.IframeHTMLAttributes<HTMLIFrameElement>,\n HTMLIFrameElement\n>\n\nexport type IframeResizerProps = Omit<IframeProps, 'scrolling'> &\n Omit<IFrameOptions, 'id' | 'onBeforeClose'>\n\n// Deal with UMD not converting default exports to named exports\nconst createAutoConsoleGroup = esModuleInterop(acg)\n\nfunction IframeResizer(\n props: IframeResizerProps,\n ref: React.ForwardedRef<IFrameForwardRef>,\n): ReactElement {\n const { log, logExpand } = props\n const filteredProps = filterIframeAttribs(props)\n const iframeRef = useRef<IFrameComponent>(null)\n const consoleGroupRef =\n useRef<ReturnType<typeof createAutoConsoleGroup>>(null)\n\n if (!consoleGroupRef.current) {\n consoleGroupRef.current = createAutoConsoleGroup()\n }\n\n const consoleGroup = consoleGroupRef.current\n\n const onBeforeClose = (): boolean => {\n consoleGroup.event('close')\n consoleGroup.warn(\n `Close event ignored, to remove the iframe update your React component.`,\n )\n\n return false\n }\n\n // This hook is only run once, as once iframe-resizer is bound, it will\n // deal with changes to the element and does not need recalling\n useEffect(() => {\n const iframe = iframeRef.current\n\n consoleGroup.label(`react(${iframe.id})`)\n consoleGroup.event('setup')\n\n const resizer = connectResizer({ ...props, onBeforeClose })(iframe)\n\n consoleGroup.expand(logExpand)\n if (log) consoleGroup.log('Created React component')\n\n return () => {\n consoleGroup.endAutoGroup()\n resizer?.disconnect()\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n useImperativeHandle(\n ref,\n () => ({\n getRef: () => iframeRef,\n getElement: () => iframeRef.current,\n getVersion: () => iframeRef.current.iframeResizer.getVersion(),\n moveToAnchor: (anchor: string) =>\n iframeRef.current.iframeResizer.moveToAnchor(anchor),\n sendMessage: (message: any, targetOrigin?: string) => {\n iframeRef.current.iframeResizer.sendMessage(message, targetOrigin)\n },\n }),\n [],\n )\n\n // eslint-disable-next-line jsx-a11y/iframe-has-title\n return <iframe {...filteredProps} ref={iframeRef} />\n}\n\nexport default forwardRef<IFrameForwardRef, IframeResizerProps>(IframeResizer)\n\nexport type * from '@iframe-resizer/core'\n"],"names":["createAutoConsoleGroup","esModuleInterop","acg","index","forwardRef","props","ref","log","logExpand","filteredProps","license","bodyBackground","bodyMargin","bodyPadding","checkOrigin","direction","inPageLinks","offsetSize","scrolling","tolerance","waitForLoad","warningTimeout","onAfterClose","onMessage","onMouseEnter","onMouseLeave","onReady","onResized","onScroll","iframeProps","filterIframeAttribs","iframeRef","useRef","consoleGroupRef","current","consoleGroup","onBeforeClose","event","warn","useEffect","iframe","label","id","resizer","connectResizer","expand","endAutoGroup","disconnect","useImperativeHandle","getRef","getElement","getVersion","iframeResizer","moveToAnchor","anchor","sendMessage","message","targetOrigin","React","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;yNAAA,MCoCMA,EAAyBC,EAAgBC,GAiE/C,MAAAC,EAAeC,EA/Df,SACEC,EACAC,GAEA,MAAMC,IAAEA,EAAAC,UAAKA,GAAcH,EACrBI,ED3CO,GACbC,UACAC,iBACAC,aACAC,cACAC,cACAC,YACAC,cACAT,MACAC,YACAS,aACAC,YACAC,YACAC,cACAC,iBACAC,eACAC,YACAC,eACAC,eACAC,UACAC,YACAC,cACGC,KACmDA,ECoBhCC,CAAoBzB,GACpC0B,EAAYC,EAAwB,MACpCC,EACJD,EAAkD,MAE/CC,EAAgBC,UACnBD,EAAgBC,QAAUlC,KAG5B,MAAMmC,EAAeF,EAAgBC,QAE/BE,EAAgB,KACpBD,EAAaE,MAAM,SACnBF,EAAaG,KACX,2EAGK,GAsCT,OAjCAC,EAAU,KACR,MAAMC,EAAST,EAAUG,QAEzBC,EAAaM,MAAM,SAASD,EAAOE,OACnCP,EAAaE,MAAM,SAEnB,MAAMM,EAAUC,EAAe,IAAKvC,EAAO+B,iBAA3BQ,CAA4CJ,GAK5D,OAHAL,EAAaU,OAAOrC,GAChBD,GAAK4B,EAAa5B,IAAI,2BAEnB,KACL4B,EAAaW,eACbH,GAASI,eAEV,IAEHC,EACE1C,EACA,KAAA,CACE2C,OAAQ,IAAMlB,EACdmB,WAAY,IAAMnB,EAAUG,QAC5BiB,WAAY,IAAMpB,EAAUG,QAAQkB,cAAcD,aAClDE,aAAeC,GACbvB,EAAUG,QAAQkB,cAAcC,aAAaC,GAC/CC,YAAa,CAACC,EAAcC,KAC1B1B,EAAUG,QAAQkB,cAAcG,YAAYC,EAASC,MAGzD,mBAIKC,EAAAC,cAAC,SAAA,IAAWlD,EAAeH,IAAKyB,GACzC"}
{
"name": "@iframe-resizer/react",
"version": "6.0.0-beta.10",
"license": "GPL-3.0",
"version": "6.0.0-beta.11",
"license": "GPL-3.0-only",
"homepage": "https://iframe-resizer.com",

@@ -11,3 +11,2 @@ "author": {

"description": "Keep iframes sized to their content.",
"github": "https://github.com/davidjbradshaw/iframe-resizer",
"repository": {

@@ -42,7 +41,6 @@ "type": "git",

"dependencies": {
"@iframe-resizer/common": "6.0.0-beta.10",
"@iframe-resizer/core": "6.0.0-beta.10",
"auto-console-group": "1.3.0",
"react": "^19.2.4"
"@iframe-resizer/common": "6.0.0-beta.11",
"@iframe-resizer/core": "6.0.0-beta.11",
"auto-console-group": "1.3.0"
}
}

@@ -28,2 +28,2 @@ <p align="center"><br>

_iframe-resizer version 6.0.0-beta.10 2026-04-16 - 16:31:17.632Z_
_iframe-resizer version 6.0.0-beta.11 2026-04-21 - 20:15:29.236Z_