@uniformdev/mesh-sdk 14.0.0 → 14.0.1-alpha.95
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/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -8
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var u,c=({onHeightChange:t,autoResizingDisabled:e})=>{if(typeof window=="undefined")return;let a=window,i=()=>{let o=Math.ceil(a.document.documentElement.getBoundingClientRect().height);o!==u&&(u=o,t==null||t(o))},n=e?void 0:new MutationObserver(i),r={instance:a,observer:n,height:0,enableAutoResizing:()=>{n==null||n.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),a.addEventListener("resize",i)},disableAutoResizing:()=>{n==null||n.disconnect(),a.removeEventListener("resize",i)}};return e||r.enableAutoResizing(),r};var w=()=>import("post-robot");async function
|
|
1
|
+
var u,c=({onHeightChange:t,autoResizingDisabled:e})=>{if(typeof window=="undefined")return;let a=window,i=()=>{let o=Math.ceil(a.document.documentElement.getBoundingClientRect().height);o!==u&&(u=o,t==null||t(o))},n=e?void 0:new MutationObserver(i),r={instance:a,observer:n,height:0,enableAutoResizing:()=>{n==null||n.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),a.addEventListener("resize",i)},disableAutoResizing:()=>{n==null||n.disconnect(),a.removeEventListener("resize",i)}};return e||r.enableAutoResizing(),r};var w=()=>import("post-robot");async function h({autoResizingDisabled:t}={}){if(typeof window!="undefined"&&typeof window.UniformMeshSDK=="undefined"){if(typeof window.parent=="undefined"||window.parent==window)throw new Error("It appears you are trying to connect with the Uniform Mesh SDK outside of an iframe. Be sure you are loading your app via a location URL configured in the Uniform dashboard.");let e=await l(),a=await e.initialize(),i={getCurrentLocation:()=>({getValue:()=>a.locationValue,setValue:async n=>{await e.setValue(n),a.locationValue=n},getMetadata:()=>a.locationMetadata}),currentWindow:c({onHeightChange:n=>{e.resize(n)},autoResizingDisabled:t}),version:a.uniformApiVersion};return window.UniformMeshSDK=i,i}}async function l(){let t=await w();return{initialize:async()=>(await t.send(window.parent,"initialize")).data,resize:async e=>{t.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await t.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await t.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await t.send(window.parent,"getMetadata");return e==null?void 0:e.data}}}export{h as initializeUniformMeshSDK};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var f=Object.create;var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var s=n=>o(n,"__esModule",{value:!0});var M=(n,e)=>{for(var t in e)o(n,t,{get:e[t],enumerable:!0})},u=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of g(e))!p.call(n,a)&&(t||a!=="default")&&o(n,a,{get:()=>e[a],enumerable:!(i=m(e,a))||i.enumerable});return n},y=(n,e)=>u(s(o(n!=null?f(h(n)):{},"default",!e&&n&&n.__esModule?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),V=(n=>(e,t)=>n&&n.get(e)||(t=u(s({}),e,1),n&&n.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var D={};M(D,{initializeUniformMeshSDK:()=>T});var w,l=({onHeightChange:n,autoResizingDisabled:e})=>{if(typeof window=="undefined")return;let t=window,i=()=>{let r=Math.ceil(t.document.documentElement.getBoundingClientRect().height);r!==w&&(w=r,n==null||n(r))},a=e?void 0:new MutationObserver(i),d={instance:t,observer:a,height:0,enableAutoResizing:()=>{a==null||a.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),t.addEventListener("resize",i)},disableAutoResizing:()=>{a==null||a.disconnect(),t.removeEventListener("resize",i)}};return e||d.enableAutoResizing(),d};var b=()=>import("post-robot");async function T({autoResizingDisabled:n}={}){if(typeof window!="undefined"&&typeof window.UniformMeshSDK=="undefined"){if(typeof window.parent=="undefined"||window.parent==window)throw new Error("It appears you are trying to connect with the Uniform Mesh SDK outside of an iframe. Be sure you are loading your app via a location URL configured in the Uniform dashboard.");let e=await z(),t=await e.initialize(),i={getCurrentLocation:()=>({getValue:()=>t.locationValue,setValue:async a=>{await e.setValue(a),t.locationValue=a},getMetadata:()=>t.locationMetadata}),currentWindow:l({onHeightChange:a=>{e.resize(a)},autoResizingDisabled:n}),version:t.uniformApiVersion};return window.UniformMeshSDK=i,i}}async function z(){let n=await b();return{initialize:async()=>(await n.send(window.parent,"initialize")).data,resize:async e=>{n.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await n.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await n.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await n.send(window.parent,"getMetadata");return e==null?void 0:e.data}}}module.exports=V(D);0&&(module.exports={initializeUniformMeshSDK});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var u,c=({onHeightChange:t,autoResizingDisabled:e})=>{if(typeof window=="undefined")return;let a=window,i=()=>{let o=Math.ceil(a.document.documentElement.getBoundingClientRect().height);o!==u&&(u=o,t==null||t(o))},n=e?void 0:new MutationObserver(i),r={instance:a,observer:n,height:0,enableAutoResizing:()=>{n==null||n.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),a.addEventListener("resize",i)},disableAutoResizing:()=>{n==null||n.disconnect(),a.removeEventListener("resize",i)}};return e||r.enableAutoResizing(),r};var w=()=>import("post-robot");async function
|
|
1
|
+
var u,c=({onHeightChange:t,autoResizingDisabled:e})=>{if(typeof window=="undefined")return;let a=window,i=()=>{let o=Math.ceil(a.document.documentElement.getBoundingClientRect().height);o!==u&&(u=o,t==null||t(o))},n=e?void 0:new MutationObserver(i),r={instance:a,observer:n,height:0,enableAutoResizing:()=>{n==null||n.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),a.addEventListener("resize",i)},disableAutoResizing:()=>{n==null||n.disconnect(),a.removeEventListener("resize",i)}};return e||r.enableAutoResizing(),r};var w=()=>import("post-robot");async function h({autoResizingDisabled:t}={}){if(typeof window!="undefined"&&typeof window.UniformMeshSDK=="undefined"){if(typeof window.parent=="undefined"||window.parent==window)throw new Error("It appears you are trying to connect with the Uniform Mesh SDK outside of an iframe. Be sure you are loading your app via a location URL configured in the Uniform dashboard.");let e=await l(),a=await e.initialize(),i={getCurrentLocation:()=>({getValue:()=>a.locationValue,setValue:async n=>{await e.setValue(n),a.locationValue=n},getMetadata:()=>a.locationMetadata}),currentWindow:c({onHeightChange:n=>{e.resize(n)},autoResizingDisabled:t}),version:a.uniformApiVersion};return window.UniformMeshSDK=i,i}}async function l(){let t=await w();return{initialize:async()=>(await t.send(window.parent,"initialize")).data,resize:async e=>{t.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await t.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await t.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await t.send(window.parent,"getMetadata");return e==null?void 0:e.data}}}export{h as initializeUniformMeshSDK};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1-alpha.95+8da07b5d",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"post-robot": "10.0.44"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/jest": "27.0
|
|
32
|
-
"@types/node": "16.11.
|
|
31
|
+
"@types/jest": "27.4.0",
|
|
32
|
+
"@types/node": "16.11.21",
|
|
33
33
|
"@types/post-robot": "10.0.3",
|
|
34
|
-
"eslint": "8.
|
|
35
|
-
"jest": "27.4.
|
|
34
|
+
"eslint": "8.7.0",
|
|
35
|
+
"jest": "27.4.7",
|
|
36
36
|
"npm-run-all": "4.1.5",
|
|
37
37
|
"rimraf": "3.0.2",
|
|
38
|
-
"ts-jest": "27.1.
|
|
39
|
-
"tsup": "5.11.
|
|
38
|
+
"ts-jest": "27.1.3",
|
|
39
|
+
"tsup": "5.11.11"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"/dist"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "8da07b5d49096489ce9fd4da0c8a8bbe06ba5737"
|
|
45
45
|
}
|