@uniformdev/mesh-sdk 14.0.0 → 14.0.1-alpha.101

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.d.ts CHANGED
@@ -10,16 +10,69 @@ interface UniformMeshSDK {
10
10
  getCurrentLocation: <TValue = unknown, TMetadata = unknown>() => MeshLocation<TValue, TMetadata>;
11
11
  currentWindow: SdkWindow | undefined;
12
12
  version: string;
13
+ openLocationDialog: <TDialogValue>({ locationKey, options, }: {
14
+ locationKey: string;
15
+ options?: DialogOptions;
16
+ }) => Promise<LocationDialogResponse<TDialogValue> | undefined>;
17
+ closeLocationDialog: ({ dialogId, }: {
18
+ /** Id of the dialog to close. If no dialog with the given id exists, nothing will happen. */
19
+ dialogId: string;
20
+ }) => Promise<void>;
21
+ openConfirmationDialog({ titleText, bodyText, options, }: {
22
+ titleText: string;
23
+ bodyText: string;
24
+ options?: DialogOptions;
25
+ }): Promise<{
26
+ value: 'confirm' | 'cancel';
27
+ closeDialog: () => Promise<void>;
28
+ } | undefined>;
29
+ closeConfirmationDialog(): Promise<void>;
30
+ openCurrentLocationDialog<TDialogValue>({ options, }: {
31
+ options?: DialogOptions;
32
+ }): Promise<LocationDialogResponse<TDialogValue> | undefined>;
33
+ closeCurrentLocationDialog(): Promise<void>;
34
+ dialogContext?: {
35
+ dialogId: string;
36
+ };
13
37
  }
38
+ interface LocationDialogResponse<TDialogValue> {
39
+ /** Generated id for the dialog. */
40
+ dialogId: string;
41
+ /** The value set by the dialog. */
42
+ value: TDialogValue;
43
+ /** Allows for closing the dialog manually. Typically used when `closeDialogOnSetValue` is false. */
44
+ closeDialog: () => Promise<void>;
45
+ }
46
+ declare type DialogType = 'location' | 'confirm';
47
+ interface DialogOptions {
48
+ /**
49
+ * By default, dialogs will be closed when they set a value.
50
+ * You can disable this behavior by setting the `disableCloseDialogOnSetValue` property to true.
51
+ * You'll still be able to close a dialog via the `closeDialog` method that is returned from the `openLocationDialog` method.
52
+ */
53
+ disableCloseDialogOnSetValue?: boolean;
54
+ maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full';
55
+ /**
56
+ * Parameters to pass to the dialog, which will be available in the dialog via the `metadata` object for the dialog location, e.g. `metadata.dialogParams`.
57
+ * Parameters should be simple (serializable) types, not functions or DOM elements or similar non-serializable objects.
58
+ */
59
+ params?: DialogParams;
60
+ }
61
+ declare type DialogParamValue = string | number | boolean | null | DialogParamValue[] | {
62
+ [key: string]: DialogParamValue;
63
+ };
64
+ declare type DialogParams = {
65
+ [paramName: string]: DialogParamValue;
66
+ };
14
67
  declare global {
15
68
  interface Window {
16
69
  UniformMeshSDK: UniformMeshSDK;
17
70
  }
18
71
  }
19
72
  /** Defines methods used for interacting with a Mesh location */
20
- interface MeshLocation<TValue = unknown, TMetadata = unknown> {
73
+ interface MeshLocation<TValue = unknown, TMetadata = unknown, TSetValue = TValue> {
21
74
  getValue: () => TValue;
22
- setValue: (value: TValue) => Promise<void>;
75
+ setValue: (value: TSetValue) => Promise<void>;
23
76
  getMetadata: () => TMetadata;
24
77
  }
25
78
  /**
@@ -30,4 +83,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
30
83
  autoResizingDisabled?: boolean;
31
84
  }): Promise<UniformMeshSDK | undefined>;
32
85
 
33
- export { MeshLocation, UniformMeshSDK, initializeUniformMeshSDK };
86
+ export { DialogOptions, DialogParamValue, DialogParams, DialogType, LocationDialogResponse, MeshLocation, UniformMeshSDK, initializeUniformMeshSDK };
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 p({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{p as initializeUniformMeshSDK};
1
+ var g,u=({onHeightChange:l,autoResizingDisabled:o})=>{if(typeof window=="undefined")return;let e=window,i=()=>{let t=Math.ceil(e.document.documentElement.getBoundingClientRect().height);t!==g&&(g=t,l==null||l(t))},a=o?void 0:new MutationObserver(i),n={instance:e,observer:a,height:0,enableAutoResizing:()=>{a==null||a.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e.addEventListener("resize",i)},disableAutoResizing:()=>{a==null||a.disconnect(),e.removeEventListener("resize",i)}};return o||n.enableAutoResizing(),n};var D=()=>import("post-robot"),w={};async function v({autoResizingDisabled:l}={}){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 o=await f({dialogResponseHandlers:w}),e=await o.initialize(),i={getCurrentLocation:()=>({getValue:()=>e.locationValue,setValue:async a=>{await o.setValue(a),e.locationValue=a},getMetadata:()=>e.locationMetadata}),currentWindow:u({onHeightChange:a=>{o.resize(a)},autoResizingDisabled:l}),version:e.uniformApiVersion,openLocationDialog:async({locationKey:a,options:n})=>{let t=await o.openDialog({dialogType:"location",data:{locationKey:a},options:n});if(!!t)return{dialogId:t.dialogId,value:t.value,closeDialog:async()=>{await o.closeDialog({dialogId:t.dialogId,dialogType:"location"})}}},closeLocationDialog:async({dialogId:a})=>{await o.closeDialog({dialogId:a,dialogType:"location"})},openConfirmationDialog:async({titleText:a,bodyText:n})=>{let t=await o.openDialog({dialogType:"confirm",data:{titleText:a,bodyText:n}});if(!!t)return{value:t.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})}}},closeConfirmationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})},openCurrentLocationDialog:async({options:a})=>{let n=await o.openDialog({dialogType:"location",data:{},options:a});if(!!n)return{dialogId:n.dialogId,value:n.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})}}},closeCurrentLocationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})},dialogContext:e.dialogContext};return window.UniformMeshSDK=i,i}}async function f({dialogResponseHandlers:l}){let o=await D();return o.on("dialog-value",{},async({data:e})=>{let i=l[e.dialogId];!i||(e.value?i.resolve({value:e.value,dialogId:e.dialogId}):e.error&&i.reject(e.error),delete l[e.dialogId])}),{initialize:async()=>(await o.send(window.parent,"initialize")).data,resize:async e=>{o.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await o.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await o.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await o.send(window.parent,"getMetadata");return e==null?void 0:e.data},openDialog:async({dialogType:e,data:i,options:a})=>{var r;if(m(a==null?void 0:a.params)>1e5)throw new Error("Dialog parameters object is too large, maximum size is 100KB");let n=await o.send(window.parent,"openDialog",{dialogType:e,dialogData:i,options:a}),t=(r=n==null?void 0:n.data)==null?void 0:r.dialogId;if(!!t)return new Promise((c,p)=>{l[t]={resolve:c,reject:p}})},closeDialog:async({dialogId:e,dialogType:i,dialogData:a})=>{await o.send(window.parent,"closeDialog",{dialogId:e,dialogType:i,dialogData:a})}}}function m(l){if(!l||typeof Blob=="undefined")return 0;try{let o=JSON.stringify(l);return new Blob([o]).size}catch(o){throw new Error("Error calculating object size: "+o.message)}}export{v as initializeUniformMeshSDK};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var l=Object.create;var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var s=e=>o(e,"__esModule",{value:!0});var h=(e,n)=>{s(e);for(var t in n)o(e,t,{get:n[t],enumerable:!0})},M=(e,n,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of m(n))!p.call(e,a)&&a!=="default"&&o(e,a,{get:()=>n[a],enumerable:!(t=f(n,a))||t.enumerable});return e},y=e=>M(s(o(e!=null?l(g(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);h(exports,{initializeUniformMeshSDK:()=>b});var c,w=({onHeightChange:e,autoResizingDisabled:n})=>{if(typeof window=="undefined")return;let t=window,a=()=>{let r=Math.ceil(t.document.documentElement.getBoundingClientRect().height);r!==c&&(c=r,e==null||e(r))},i=n?void 0:new MutationObserver(a),d={instance:t,observer:i,height:0,enableAutoResizing:()=>{i==null||i.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),t.addEventListener("resize",a)},disableAutoResizing:()=>{i==null||i.disconnect(),t.removeEventListener("resize",a)}};return n||d.enableAutoResizing(),d};var V=()=>import("post-robot");async function b({autoResizingDisabled:e}={}){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 n=await k(),t=await n.initialize(),a={getCurrentLocation:()=>({getValue:()=>t.locationValue,setValue:async i=>{await n.setValue(i),t.locationValue=i},getMetadata:()=>t.locationMetadata}),currentWindow:w({onHeightChange:i=>{n.resize(i)},autoResizingDisabled:e}),version:t.uniformApiVersion};return window.UniformMeshSDK=a,a}}async function k(){let e=await V();return{initialize:async()=>(await e.send(window.parent,"initialize")).data,resize:async n=>{e.send(window.parent,"resize",{height:n})},getValue:async()=>{let n=await e.send(window.parent,"getValue");return n==null?void 0:n.data},setValue:async n=>{await e.send(window.parent,"setValue",n)},getMetadata:async()=>{let n=await e.send(window.parent,"getMetadata");return n==null?void 0:n.data}}}0&&(module.exports={initializeUniformMeshSDK});
1
+ var f=Object.create;var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var d=a=>r(a,"__esModule",{value:!0});var v=(a,o)=>{for(var e in o)r(a,e,{get:o[e],enumerable:!0})},g=(a,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of y(o))!V.call(a,i)&&(e||i!=="default")&&r(a,i,{get:()=>o[i],enumerable:!(n=m(o,i))||n.enumerable});return a},x=(a,o)=>g(d(r(a!=null?f(T(a)):{},"default",!o&&a&&a.__esModule?{get:()=>a.default,enumerable:!0}:{value:a,enumerable:!0})),a),b=(a=>(o,e)=>a&&a.get(o)||(e=g(d({}),o,1),a&&a.set(o,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var z={};v(z,{initializeUniformMeshSDK:()=>k});var c,p=({onHeightChange:a,autoResizingDisabled:o})=>{if(typeof window=="undefined")return;let e=window,n=()=>{let l=Math.ceil(e.document.documentElement.getBoundingClientRect().height);l!==c&&(c=l,a==null||a(l))},i=o?void 0:new MutationObserver(n),t={instance:e,observer:i,height:0,enableAutoResizing:()=>{i==null||i.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e.addEventListener("resize",n)},disableAutoResizing:()=>{i==null||i.disconnect(),e.removeEventListener("resize",n)}};return o||t.enableAutoResizing(),t};var I=()=>import("post-robot"),h={};async function k({autoResizingDisabled:a}={}){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 o=await M({dialogResponseHandlers:h}),e=await o.initialize(),n={getCurrentLocation:()=>({getValue:()=>e.locationValue,setValue:async i=>{await o.setValue(i),e.locationValue=i},getMetadata:()=>e.locationMetadata}),currentWindow:p({onHeightChange:i=>{o.resize(i)},autoResizingDisabled:a}),version:e.uniformApiVersion,openLocationDialog:async({locationKey:i,options:t})=>{let l=await o.openDialog({dialogType:"location",data:{locationKey:i},options:t});if(!!l)return{dialogId:l.dialogId,value:l.value,closeDialog:async()=>{await o.closeDialog({dialogId:l.dialogId,dialogType:"location"})}}},closeLocationDialog:async({dialogId:i})=>{await o.closeDialog({dialogId:i,dialogType:"location"})},openConfirmationDialog:async({titleText:i,bodyText:t})=>{let l=await o.openDialog({dialogType:"confirm",data:{titleText:i,bodyText:t}});if(!!l)return{value:l.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})}}},closeConfirmationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})},openCurrentLocationDialog:async({options:i})=>{let t=await o.openDialog({dialogType:"location",data:{},options:i});if(!!t)return{dialogId:t.dialogId,value:t.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})}}},closeCurrentLocationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})},dialogContext:e.dialogContext};return window.UniformMeshSDK=n,n}}async function M({dialogResponseHandlers:a}){let o=await I();return o.on("dialog-value",{},async({data:e})=>{let n=a[e.dialogId];!n||(e.value?n.resolve({value:e.value,dialogId:e.dialogId}):e.error&&n.reject(e.error),delete a[e.dialogId])}),{initialize:async()=>(await o.send(window.parent,"initialize")).data,resize:async e=>{o.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await o.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await o.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await o.send(window.parent,"getMetadata");return e==null?void 0:e.data},openDialog:async({dialogType:e,data:n,options:i})=>{var s;if(R(i==null?void 0:i.params)>1e5)throw new Error("Dialog parameters object is too large, maximum size is 100KB");let t=await o.send(window.parent,"openDialog",{dialogType:e,dialogData:n,options:i}),l=(s=t==null?void 0:t.data)==null?void 0:s.dialogId;if(!!l)return new Promise((D,w)=>{a[l]={resolve:D,reject:w}})},closeDialog:async({dialogId:e,dialogType:n,dialogData:i})=>{await o.send(window.parent,"closeDialog",{dialogId:e,dialogType:n,dialogData:i})}}}function R(a){if(!a||typeof Blob=="undefined")return 0;try{let o=JSON.stringify(a);return new Blob([o]).size}catch(o){throw new Error("Error calculating object size: "+o.message)}}module.exports=b(z);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 p({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{p as initializeUniformMeshSDK};
1
+ var g,u=({onHeightChange:l,autoResizingDisabled:o})=>{if(typeof window=="undefined")return;let e=window,i=()=>{let t=Math.ceil(e.document.documentElement.getBoundingClientRect().height);t!==g&&(g=t,l==null||l(t))},a=o?void 0:new MutationObserver(i),n={instance:e,observer:a,height:0,enableAutoResizing:()=>{a==null||a.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e.addEventListener("resize",i)},disableAutoResizing:()=>{a==null||a.disconnect(),e.removeEventListener("resize",i)}};return o||n.enableAutoResizing(),n};var D=()=>import("post-robot"),w={};async function v({autoResizingDisabled:l}={}){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 o=await f({dialogResponseHandlers:w}),e=await o.initialize(),i={getCurrentLocation:()=>({getValue:()=>e.locationValue,setValue:async a=>{await o.setValue(a),e.locationValue=a},getMetadata:()=>e.locationMetadata}),currentWindow:u({onHeightChange:a=>{o.resize(a)},autoResizingDisabled:l}),version:e.uniformApiVersion,openLocationDialog:async({locationKey:a,options:n})=>{let t=await o.openDialog({dialogType:"location",data:{locationKey:a},options:n});if(!!t)return{dialogId:t.dialogId,value:t.value,closeDialog:async()=>{await o.closeDialog({dialogId:t.dialogId,dialogType:"location"})}}},closeLocationDialog:async({dialogId:a})=>{await o.closeDialog({dialogId:a,dialogType:"location"})},openConfirmationDialog:async({titleText:a,bodyText:n})=>{let t=await o.openDialog({dialogType:"confirm",data:{titleText:a,bodyText:n}});if(!!t)return{value:t.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})}}},closeConfirmationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"confirm"})},openCurrentLocationDialog:async({options:a})=>{let n=await o.openDialog({dialogType:"location",data:{},options:a});if(!!n)return{dialogId:n.dialogId,value:n.value,closeDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})}}},closeCurrentLocationDialog:async()=>{await o.closeDialog({dialogId:void 0,dialogType:"location"})},dialogContext:e.dialogContext};return window.UniformMeshSDK=i,i}}async function f({dialogResponseHandlers:l}){let o=await D();return o.on("dialog-value",{},async({data:e})=>{let i=l[e.dialogId];!i||(e.value?i.resolve({value:e.value,dialogId:e.dialogId}):e.error&&i.reject(e.error),delete l[e.dialogId])}),{initialize:async()=>(await o.send(window.parent,"initialize")).data,resize:async e=>{o.send(window.parent,"resize",{height:e})},getValue:async()=>{let e=await o.send(window.parent,"getValue");return e==null?void 0:e.data},setValue:async e=>{await o.send(window.parent,"setValue",e)},getMetadata:async()=>{let e=await o.send(window.parent,"getMetadata");return e==null?void 0:e.data},openDialog:async({dialogType:e,data:i,options:a})=>{var r;if(m(a==null?void 0:a.params)>1e5)throw new Error("Dialog parameters object is too large, maximum size is 100KB");let n=await o.send(window.parent,"openDialog",{dialogType:e,dialogData:i,options:a}),t=(r=n==null?void 0:n.data)==null?void 0:r.dialogId;if(!!t)return new Promise((c,p)=>{l[t]={resolve:c,reject:p}})},closeDialog:async({dialogId:e,dialogType:i,dialogData:a})=>{await o.send(window.parent,"closeDialog",{dialogId:e,dialogType:i,dialogData:a})}}}function m(l){if(!l||typeof Blob=="undefined")return 0;try{let o=JSON.stringify(l);return new Blob([o]).size}catch(o){throw new Error("Error calculating object size: "+o.message)}}export{v as initializeUniformMeshSDK};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "14.0.0",
3
+ "version": "14.0.1-alpha.101+61fc2a31",
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.3",
32
- "@types/node": "16.11.12",
31
+ "@types/jest": "27.4.0",
32
+ "@types/node": "16.11.21",
33
33
  "@types/post-robot": "10.0.3",
34
- "eslint": "8.4.1",
35
- "jest": "27.4.5",
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.1",
39
- "tsup": "5.11.1"
38
+ "ts-jest": "27.1.3",
39
+ "tsup": "5.11.11"
40
40
  },
41
41
  "files": [
42
42
  "/dist"
43
43
  ],
44
- "gitHead": "5f7b1abf0fe161630b53bde4c5530f8b12a1c775"
44
+ "gitHead": "61fc2a311b553e21d03b1b70ec6db0ada73974b7"
45
45
  }