@machinemetrics/mm-react-embeddable 0.4.0 → 0.4.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.
@@ -3273,7 +3273,7 @@ const da = Mt.iframe`
3273
3273
  width: 100%;
3274
3274
  height: 100%;
3275
3275
  border: none;
3276
- visibility: ${(t) => t.isReady ? "visible" : "hidden"};
3276
+ visibility: ${(t) => t.isready ? "visible" : "hidden"};
3277
3277
  `, pa = ({
3278
3278
  id: t,
3279
3279
  genericFrameFallback: a,
@@ -3312,7 +3312,7 @@ const da = Mt.iframe`
3312
3312
  }
3313
3313
  },
3314
3314
  /* @__PURE__ */ ke.createElement("div", { style: { textAlign: "center" } }, "Application must adhere to the MM App Manifest specification to be embedded.")
3315
- ) : /* @__PURE__ */ ke.createElement(da, { isReady: C, ref: m, src: y, ...v });
3315
+ ) : /* @__PURE__ */ ke.createElement(da, { isready: C, ref: m, src: y, ...v });
3316
3316
  };
3317
3317
  pa.propTypes = {
3318
3318
  id: Le.string,
@@ -118,5 +118,5 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
118
118
  width: 100%;
119
119
  height: 100%;
120
120
  border: none;
121
- visibility: ${t=>t.isReady?"visible":"hidden"};
122
- `,Or=({id:t,genericFrameFallback:a,src:n,path:i,onInit:p=()=>{},...v})=>{const m=te.useRef(),[y,_]=te.useState(),[C,T]=te.useState(0),{registerFrame:A,sendMessage:M}=te.useContext(Dt),[N,$]=te.useState(),[j,x]=te.useState(!1);return te.useEffect(()=>{i!==void 0&&$(i)},[i]),te.useEffect(()=>{N===void 0||!C||M(t,"navigate",{path:N})},[N,C,t,M]),te.useEffect(()=>{!n||!t||!m||(async()=>{const F=new URL(n);A(t,F.origin,m),p();try{if((await(await fetch(`${F.origin}/mm-app-manifest.json`)).json()).manifestVersion)_(`${F.origin}/mm-embedded-interop?id=${t}`);else throw Error()}catch{a?(_(n),T(1)):x(!0)}})()},[n,t,A,m]),Tr(t,"ready",()=>T(F=>F+1)),j?Ae.createElement("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},Ae.createElement("div",{style:{textAlign:"center"}},"Application must adhere to the MM App Manifest specification to be embedded.")):Ae.createElement(ho,{isReady:C,ref:m,src:y,...v})};Or.propTypes={id:$e.string,genericFrameFallback:$e.bool,src:$e.string.isRequired,path:$e.string,onInit:$e.func},Pe.MMEmbeddedWrapper=Or,Pe.MMEmbeddedWrapperProvider=Rr,Pe.useEmbeddedEffect=Tr,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
121
+ visibility: ${t=>t.isready?"visible":"hidden"};
122
+ `,Or=({id:t,genericFrameFallback:a,src:n,path:i,onInit:p=()=>{},...v})=>{const m=te.useRef(),[y,_]=te.useState(),[C,T]=te.useState(0),{registerFrame:A,sendMessage:M}=te.useContext(Dt),[N,$]=te.useState(),[j,x]=te.useState(!1);return te.useEffect(()=>{i!==void 0&&$(i)},[i]),te.useEffect(()=>{N===void 0||!C||M(t,"navigate",{path:N})},[N,C,t,M]),te.useEffect(()=>{!n||!t||!m||(async()=>{const F=new URL(n);A(t,F.origin,m),p();try{if((await(await fetch(`${F.origin}/mm-app-manifest.json`)).json()).manifestVersion)_(`${F.origin}/mm-embedded-interop?id=${t}`);else throw Error()}catch{a?(_(n),T(1)):x(!0)}})()},[n,t,A,m]),Tr(t,"ready",()=>T(F=>F+1)),j?Ae.createElement("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},Ae.createElement("div",{style:{textAlign:"center"}},"Application must adhere to the MM App Manifest specification to be embedded.")):Ae.createElement(ho,{isready:C,ref:m,src:y,...v})};Or.propTypes={id:$e.string,genericFrameFallback:$e.bool,src:$e.string.isRequired,path:$e.string,onInit:$e.func},Pe.MMEmbeddedWrapper=Or,Pe.MMEmbeddedWrapperProvider=Rr,Pe.useEmbeddedEffect=Tr,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@machinemetrics/mm-react-embeddable",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "module": "dist/mm-react-embeddable.es.js",
6
6
  "source": "src/index.js",
7
7
  "type": "module",
8
8
  "engines": {
9
- "node": ">=20"
9
+ "node": ">=18"
10
10
  },
11
11
  "scripts": {
12
12
  "build": "vite build",