Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@verygoodgraphics/vgg-wasm

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@verygoodgraphics/vgg-wasm - npm Package Compare versions

Comparing version 0.1.25 to 0.1.26

4

dist/vgg-wasm.iife.js

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

var vggWasm=function(d){"use strict";var b=Object.defineProperty;var F=(d,i,c)=>i in d?b(d,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):d[i]=c;var a=(d,i,c)=>F(d,typeof i!="symbol"?i+"":i,c);var i=(r=>(r.Load="load",r.FirstRender="firstrender",r.LoadError="loaderror",r.StateChange="statechange",r.Click="click",r.Ready="ready",r))(i||{}),c=(r=>(r.Loading="loading",r.Ready="ready",r.Rendered="rendered",r.Error="error",r.Destroyed="destroyed",r))(c||{}),h=(r=>(r.StartLoading="Start loading",r.DownloadVGGRuntimeJS="Download VGG Runtime JS",r.CreateVGGWasmInstance="Create VGG Wasm Instance",r.VGGWasmInstanceReady="VGG Wasm Instance Ready",r.DownloadSourceFile="Download Source File",r.LoadSourceFile="Load Source File",r))(h||{});class v{constructor(e=[]){this.listeners=e}getListeners(e){return this.listeners.filter(t=>t.type===e)}add(e){this.listeners.includes(e)||this.listeners.push(e)}remove(e){for(let t=0;t<this.listeners.length;t++){const s=this.listeners[t];if(s.type===e.type&&s.callback===e.callback){this.listeners.splice(t,1);break}}}removeAll(e){e?this.listeners.filter(t=>t.type===e).forEach(t=>this.remove(t)):this.listeners.splice(0,this.listeners.length)}fire(e,t){this.getListeners(e.type).forEach(n=>n.callback(e,t))}}const w=(r=21)=>crypto.getRandomValues(new Uint8Array(r)).reduce((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_","");class y{constructor(e,t){a(this,"selector");a(this,"vggSdk");this.selector=e,this.vggSdk=t}on(e,t){return this.addEventListener(this.selector,e,t),this}update(e){if(!this.vggSdk)throw new Error("VGG SDK not ready");this.vggSdk.updateElement(this.selector,e)}addEventListener(e,t,s){if(!this.vggSdk)throw new Error("VGG SDK not ready");const n=m=>s(this,m),o=w(7),l=`export default (event, opts) => {
var vggWasm=function(d){"use strict";var b=Object.defineProperty;var I=(d,i,c)=>i in d?b(d,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):d[i]=c;var a=(d,i,c)=>I(d,typeof i!="symbol"?i+"":i,c);var i=(n=>(n.Load="load",n.FirstRender="firstrender",n.LoadError="loaderror",n.StateChange="statechange",n.Click="click",n.Ready="ready",n))(i||{}),c=(n=>(n.Loading="loading",n.Ready="ready",n.Rendered="rendered",n.Error="error",n.Destroyed="destroyed",n))(c||{}),h=(n=>(n.StartLoading="Start loading",n.DownloadVGGRuntimeJS="Download VGG Runtime JS",n.CreateVGGWasmInstance="Create VGG Wasm Instance",n.VGGWasmInstanceReady="VGG Wasm Instance Ready",n.DownloadSourceFile="Download Source File",n.LoadSourceFile="Load Source File",n))(h||{});class v{constructor(e=[]){this.listeners=e}getListeners(e){return this.listeners.filter(t=>t.type===e)}add(e){this.listeners.includes(e)||this.listeners.push(e)}remove(e){for(let t=0;t<this.listeners.length;t++){const r=this.listeners[t];if(r.type===e.type&&r.callback===e.callback){this.listeners.splice(t,1);break}}}removeAll(e){e?this.listeners.filter(t=>t.type===e).forEach(t=>this.remove(t)):this.listeners.splice(0,this.listeners.length)}fire(e,t){this.getListeners(e.type).forEach(s=>s.callback(e,t))}}class w{constructor(e){this.debug=e}logEvent(e){this.debug&&console.log(`%cVGGEvent::${e.type}`,"background: #f59e0b; color: #78350f; font-weight: bold; border-radius: 2px; padding: 0 2.5px;",e.id?`${e.id} → ${e.path}`:"")}logLifeCycle(e){this.debug&&console.log(`%cVGGLifeCycle::${e.phase}`,"background: #f59e0b; color: #78350f; font-weight: bold; border-radius: 2px; padding: 0 2.5px;",e.status)}}const S=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_","");class y{constructor(e,t){a(this,"selector");a(this,"vggSdk");this.selector=e,this.vggSdk=t}on(e,t){return this.addEventListener(this.selector,e,t),this}update(e){if(!this.vggSdk)throw new Error("VGG SDK not ready");this.vggSdk.updateElement(this.selector,e)}addEventListener(e,t,r){if(!this.vggSdk)throw new Error("VGG SDK not ready");const s=m=>r(this,m),o=S(7),l=`export default (event, opts) => {
const sdk = new opts.instance.VggSdk()

@@ -25,2 +25,2 @@

}
}`;this.vggSdk.addEventListener(e,t,l);const g=globalThis.vggInstances[this.vggSdk.getEnv()];if(g)try{g.listeners.set(o,n)}catch(m){console.error(m)}return{selector:e,removeEventListener:()=>{this.vggSdk.removeEventListener(e,t,l),g.listeners.delete(o)}}}}class S{constructor(e){this.debug=e}logEvent(e){this.debug&&console.log(`%cVGGEvent::${e.type}`,"background: #f59e0b; color: #78350f; font-weight: bold; border-radius: 2px; padding: 0 2.5px;",e.id?`${e.id} → ${e.path}`:"")}logLifeCycle(e){this.debug&&console.log(`%cVGGLifeCycle::${e.phase}`,"background: #f59e0b; color: #78350f; font-weight: bold; border-radius: 2px; padding: 0 2.5px;",e.status)}}const f=class f{constructor(e){a(this,"props");a(this,"defaultRuntime","https://s5.vgg.cool/runtime/latest");a(this,"canvas");a(this,"width",0);a(this,"height",0);a(this,"editMode",!1);a(this,"disableLoader",!1);a(this,"verbose");a(this,"src");a(this,"runtime");a(this,"vggInstanceKey","");a(this,"eventManager");a(this,"state",c.Loading);a(this,"onLoadingStateUpdate");a(this,"vggWasmInstance",null);a(this,"vggSdk",null);a(this,"customFonts",[]);a(this,"observables",new Map);a(this,"checkStateFrame",0);a(this,"logger");var t,s;this.props=e,this.canvas=e.canvas,this.src=e.src,this.runtime=e.runtime||this.defaultRuntime,this.width=((t=this.canvas)==null?void 0:t.width)??0,this.height=((s=this.canvas)==null?void 0:s.height)??0,this.customFonts=e.customFonts??[],this.editMode=e.editMode??!1,this.verbose=e.verbose??!1,this.logger=new S(this.verbose),this.disableLoader=e.disableLoader??!1,this.onLoadingStateUpdate=e.onLoadingStateUpdate??(()=>{}),this.eventManager=new v,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError),e.onReady&&this.on(i.Ready,e.onReady),e.onRendered&&this.on(i.FirstRender,e.onRendered),e.onStateChange&&this.on(i.StateChange,e.onStateChange),e.onSelect&&this.on(i.Click,e.onSelect)}async load(){try{this.updateLoader(h.StartLoading),await this.init({...this.props})}catch(e){this.eventManager.fire({type:"loaderror",data:e.message})}}updateLoader(e){var t;this.disableLoader||(t=this.onLoadingStateUpdate)==null||t.call(this,e)}async init({src:e}){if(this.updateLoader(h.DownloadVGGRuntimeJS),this.src=e,Array.from(document.scripts).some(s=>s.src.includes("vgg_runtime.js"))||await this.loadScript(this.runtime+"/vgg_runtime.js"),await new Promise(s=>{const n=setInterval(()=>{window._vgg_createWasmInstance&&(clearInterval(n),s(!0))},100)}),!this.canvas)throw new Error("Canvas element required");if(!this.src)throw new Error(f.missingErrorMessage);await new Promise(t=>{this.checkStateFrame=requestAnimationFrame(()=>this.checkState(t))}),console.log("VGG SDK ready",this.vggSdk),await this.loadFonts(),this.logger.logLifeCycle({phase:"init",status:"end"})}async createVggWasmInstance(){const e=this.runtime;try{const t=setTimeout(()=>{throw new Error("VGG Wasm instance creation timeout")},3e4),s=await window._vgg_createWasmInstance({noInitialRun:!0,canvas:this.canvas,locateFile:function(n,o){return n.endsWith(".data")?e+"/"+n:o+n}});return clearTimeout(t),s}catch(t){return console.error(t),null}}async checkState(e){if(this.updateLoader(h.CreateVGGWasmInstance),window._vgg_createWasmInstance){const t=await this.createVggWasmInstance();if(t){this.vggWasmInstance=t;try{this.vggWasmInstance.ccall("emscripten_main","void",["number","number","boolean"],[this.width,this.height,this.editMode])}catch(n){console.error(n)}this.vggSdk=new t.VggSdk;const s=globalThis.vggInstances??{};this.vggInstanceKey=this.vggSdk.getEnv(),this.editMode?Object.assign(s,{[this.vggInstanceKey]:{instance:t,listener:n=>{try{const o=JSON.parse(n);this.logger.logEvent(o),o.type==="select"?this.eventManager.fire({type:i.Click,data:o}):o.type==="firstRender"&&(this.state=c.Rendered,this.eventManager.fire({type:i.FirstRender}))}catch(o){console.error(o)}}}}):Object.assign(s,{[this.vggInstanceKey]:{instance:t,listeners:new Map,listener:n=>{try{JSON.parse(n).type==="firstRender"&&(this.state=c.Rendered,this.eventManager.fire({type:i.FirstRender}))}catch(o){console.error(o)}}}}),globalThis.vggInstances=s,this.state=c.Ready,this.eventManager.fire({type:i.Load})}else this.state=c.Error,this.eventManager.fire({type:i.LoadError});cancelAnimationFrame(this.checkStateFrame),e(!0),this.updateLoader(h.VGGWasmInstanceReady)}else this.checkStateFrame=requestAnimationFrame(()=>this.checkState(e))}async loadScript(e){const t=document.createElement("script");return t.src=e,document.head.appendChild(t),new Promise(s=>{t.onload=()=>{s(!0)}})}async loadFonts(){const e=this.customFonts;for(const t of e)await fetch(t).then(s=>{if(s.ok)return s.arrayBuffer();throw new Error(s.statusText)}).then(s=>{var l;const n=new Uint8Array(s),o=((l=t.split("/").pop())==null?void 0:l.split(".")[0])??"";this.loadFontFile(n,o)}).catch(s=>{console.error(`Failed to add font: ${s.message}`)})}loadFontFile(e,t){if(!this.vggSdk)throw new Error("VGG SDK not ready");if(!this.vggSdk.addFont(e,t))throw new Error("add font failed!")}on(e,t){return this.eventManager.add({type:e,callback:t}),this}async render(e,t){if(this.width=(t==null?void 0:t.width)??this.width,this.height=(t==null?void 0:t.height)??this.height,this.editMode=(t==null?void 0:t.editMode)??this.editMode,!this.vggWasmInstance){console.warn("VGG Wasm instance not ready");return}const s=e??this.src;let n;if(typeof s=="string"){this.updateLoader(h.DownloadSourceFile);const l=await fetch(s);if(!l.ok)throw new Error("Failed to fetch Daruma file");const g=await l.arrayBuffer();n=new Int8Array(g)}else if(s instanceof Int8Array)n=s;else throw new Error("Invalid source file");if(this.updateLoader(h.LoadSourceFile),!this.vggWasmInstance)return;const o=this.vggWasmInstance.ccall("load_file_from_mem","boolean",["string","array","number"],["name",n,n.length]);if(this.eventManager.fire({type:i.Ready},this),!o)throw new Error("Failed to load Daruma file")}$(e){if(!this.vggSdk)throw new Error("VGG SDK not ready");const t=this.observables.get(e);if(!t){const s=new y(String(e),this.vggSdk);return this.observables.set(e,s),s}return t}destroy(){var t;try{(t=this.vggWasmInstance)==null||t._vggExit()}catch{}const e=globalThis.vggInstances??{};return delete e[this.vggInstanceKey],this.eventManager.removeAll(),this.vggWasmInstance=null,this.src="",this.vggSdk=null,this.state=c.Destroyed,this.logger.logLifeCycle({phase:"destroy",status:"end"}),this.observables.clear(),this}getTextContent(){var t;return((t=this.vggSdk)==null?void 0:t.texts())??[]}snapshot(e={type:"png",quality:100}){var s;return(s=this.vggSdk)==null?void 0:s.makeImageSnapshot(e)}setContentMode(e="fit"){if(!this.vggSdk)throw new Error("VGG SDK not ready");if(e==="original")this.vggSdk.setContentMode("topLeft");else if(e==="fit")this.vggSdk.setContentMode("scaleAspectFit");else if(e==="fill")this.vggSdk.setContentMode("scaleAspectFill");else if(e==="autoFill")this.vggSdk.setContentMode("scaleAspectFillTopCenter");else throw new Error("Invalid content mode")}setFitToViewportEnabled(e){var t;(t=this.vggSdk)==null||t.setFitToViewportEnabled(e)}getAllFrames(){var t;const e=(t=this.vggSdk)==null?void 0:t.getFramesInfo();return e?JSON.parse(e):[]}setCurrentFrame(e,t=!0){var s;(s=this.vggSdk)==null||s.setCurrentFrameById(e,t)}nextFrame(){const e=this.getAllFrames(),s=(e.findIndex(n=>n.id===this.currentFrameId)+1)%e.length;this.setCurrentFrame(e[s].id)}prevFrame(){const e=this.getAllFrames(),s=(e.findIndex(n=>n.id===this.currentFrameId)-1+e.length)%e.length;this.setCurrentFrame(e[s].id)}get currentFrameId(){var e;return(e=this.vggSdk)==null?void 0:e.currentFrameId()}getFontsInUse(){var t;const e=(t=this.vggSdk)==null?void 0:t.requiredFonts();if(!e)return[];try{return JSON.parse(e)}catch(s){return console.error(s),[]}}};a(f,"missingErrorMessage","Daruma source file required");let u=f;return typeof globalThis<"u"&&(globalThis.VGG=u),d.EventType=i,d.State=c,d.VGG=u,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),d}({});
}`;this.vggSdk.addEventListener(e,t,l);const g=globalThis.vggInstances[this.vggSdk.getEnv()];if(g)try{g.listeners.set(o,s)}catch(m){console.error(m)}return{selector:e,removeEventListener:()=>{this.vggSdk.removeEventListener(e,t,l),g.listeners.delete(o)}}}}var F={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const f=class f{constructor(e){a(this,"props");a(this,"defaultRuntime",F.VITE_VGG_RUNTIME??"https://s5.vgg.cool/runtime/latest");a(this,"canvas");a(this,"width",0);a(this,"height",0);a(this,"editMode",!1);a(this,"disableLoader",!1);a(this,"verbose");a(this,"src");a(this,"runtime");a(this,"vggInstanceKey","");a(this,"eventManager");a(this,"state",c.Loading);a(this,"onLoadingStateUpdate");a(this,"vggWasmInstance",null);a(this,"vggSdk",null);a(this,"customFonts",[]);a(this,"observables",new Map);a(this,"checkStateFrame",0);a(this,"logger");var t,r;this.props=e,this.canvas=e.canvas,this.src=e.src,this.runtime=e.runtime||this.defaultRuntime,this.width=((t=this.canvas)==null?void 0:t.width)??0,this.height=((r=this.canvas)==null?void 0:r.height)??0,this.customFonts=e.customFonts??[],this.editMode=e.editMode??!1,this.verbose=e.verbose??!1,this.logger=new w(this.verbose),this.disableLoader=e.disableLoader??!1,this.onLoadingStateUpdate=e.onLoadingStateUpdate??(()=>{}),this.eventManager=new v,e.onLoad&&this.on(i.Load,e.onLoad),e.onLoadError&&this.on(i.LoadError,e.onLoadError),e.onReady&&this.on(i.Ready,e.onReady),e.onRendered&&this.on(i.FirstRender,e.onRendered),e.onStateChange&&this.on(i.StateChange,e.onStateChange),e.onSelect&&this.on(i.Click,e.onSelect)}async load(){try{this.updateLoader(h.StartLoading),await this.init({...this.props})}catch(e){e instanceof Error?this.eventManager.fire({type:"loaderror",data:e.message}):this.eventManager.fire({type:"loaderror",data:"An unknown error occurred"})}}updateLoader(e){var t;this.disableLoader||(t=this.onLoadingStateUpdate)==null||t.call(this,e)}async init({src:e}){this.updateLoader(h.DownloadVGGRuntimeJS),this.src=e;{if(!Array.from(document.scripts).some(r=>r.src.includes("vgg_runtime.js")))try{await this.loadScript(`${this.runtime}/vgg_runtime.js`)}catch{try{const s=localStorage.getItem("local_vgg_runtime_url");s&&(this.runtime=s.replace("/vgg_runtime.js",""),await this.loadScript(s))}catch(s){throw console.error(s),new Error("VGG Wasm instance creation timeout")}}await new Promise(r=>{const s=setInterval(()=>{window._vgg_createWasmInstance&&(clearInterval(s),r(!0))},100)})}if(!this.canvas)throw new Error("Canvas element required");if(!this.src)throw new Error(f.missingErrorMessage);await new Promise(t=>{this.checkStateFrame=requestAnimationFrame(()=>this.checkState(t))}),console.log("VGG SDK ready",this.vggSdk),await this.loadFonts(),this.logger.logLifeCycle({phase:"init",status:"end"})}async createVggWasmInstance(){const e=this.runtime;try{const t=setTimeout(()=>{throw new Error("VGG Wasm instance creation timeout")},3e4),r=await window._vgg_createWasmInstance({noInitialRun:!0,canvas:this.canvas,locateFile:(s,o)=>s.endsWith(".data")?`${e}/${s}`:o+s});return clearTimeout(t),r}catch(t){return console.error(t),null}}async checkState(e){if(this.updateLoader(h.CreateVGGWasmInstance),window._vgg_createWasmInstance){const t=await this.createVggWasmInstance();if(t){this.vggWasmInstance=t;try{this.vggWasmInstance.ccall("emscripten_main","void",["number","number","boolean"],[this.width,this.height,this.editMode])}catch(s){console.error(s)}this.vggSdk=new t.VggSdk;const r=globalThis.vggInstances??{};this.vggInstanceKey=this.vggSdk.getEnv(),this.editMode?Object.assign(r,{[this.vggInstanceKey]:{instance:t,listener:s=>{try{const o=JSON.parse(s);this.logger.logEvent(o),o.type==="select"?this.eventManager.fire({type:i.Click,data:o}):o.type==="firstRender"&&(this.state=c.Rendered,this.eventManager.fire({type:i.FirstRender}))}catch(o){console.error(o)}}}}):Object.assign(r,{[this.vggInstanceKey]:{instance:t,listeners:new Map,listener:s=>{try{JSON.parse(s).type==="firstRender"&&(this.state=c.Rendered,this.eventManager.fire({type:i.FirstRender}))}catch(o){console.error(o)}}}}),globalThis.vggInstances=r,this.state=c.Ready,this.eventManager.fire({type:i.Load})}else this.state=c.Error,this.eventManager.fire({type:i.LoadError});cancelAnimationFrame(this.checkStateFrame),e(!0),this.updateLoader(h.VGGWasmInstanceReady)}else this.checkStateFrame=requestAnimationFrame(()=>this.checkState(e))}async loadScript(e){const t=document.createElement("script");return t.src=e,document.head.appendChild(t),new Promise((r,s)=>{t.onload=()=>{r(!0)},t.onerror=()=>{s(new Error(`Failed to load script: ${e}`))}})}async loadFonts(){const e=this.customFonts;for(const t of e)await fetch(t).then(r=>{if(r.ok)return r.arrayBuffer();throw new Error(r.statusText)}).then(r=>{var l;const s=new Uint8Array(r),o=((l=t.split("/").pop())==null?void 0:l.split(".")[0])??"";this.loadFontFile(s,o)}).catch(r=>{console.error(`Failed to add font: ${r.message}`)})}loadFontFile(e,t){if(!this.vggSdk)throw new Error("VGG SDK not ready");if(!this.vggSdk.addFont(e,t))throw new Error("add font failed!")}on(e,t){return this.eventManager.add({type:e,callback:t}),this}async render(e,t){if(this.width=(t==null?void 0:t.width)??this.width,this.height=(t==null?void 0:t.height)??this.height,this.editMode=(t==null?void 0:t.editMode)??this.editMode,!this.vggWasmInstance){console.warn("VGG Wasm instance not ready");return}const r=e??this.src;let s;if(typeof r=="string"){this.updateLoader(h.DownloadSourceFile);const l=await fetch(r);if(!l.ok)throw new Error("Failed to fetch Daruma file");const g=await l.arrayBuffer();s=new Int8Array(g)}else if(r instanceof Int8Array)s=r;else throw new Error("Invalid source file");if(this.updateLoader(h.LoadSourceFile),!this.vggWasmInstance)return;const o=this.vggWasmInstance.ccall("load_file_from_mem","boolean",["string","array","number"],["name",s,s.length]);if(this.eventManager.fire({type:i.Ready},this),!o)throw new Error("Failed to load Daruma file")}$(e){if(!this.vggSdk)throw new Error("VGG SDK not ready");const t=this.observables.get(e);if(!t){const r=new y(String(e),this.vggSdk);return this.observables.set(e,r),r}return t}destroy(){var t;try{(t=this.vggWasmInstance)==null||t._vggExit()}catch{}const e=globalThis.vggInstances??{};return delete e[this.vggInstanceKey],this.eventManager.removeAll(),this.vggWasmInstance=null,this.src="",this.vggSdk=null,this.state=c.Destroyed,this.logger.logLifeCycle({phase:"destroy",status:"end"}),this.observables.clear(),this}getTextContent(){var t;return((t=this.vggSdk)==null?void 0:t.texts())??[]}snapshot(e={type:"png",quality:100}){var r;return(r=this.vggSdk)==null?void 0:r.makeImageSnapshot(e)}setContentMode(e="fit"){if(!this.vggSdk)throw new Error("VGG SDK not ready");if(e==="original")this.vggSdk.setContentMode("topLeft");else if(e==="fit")this.vggSdk.setContentMode("scaleAspectFit");else if(e==="fill")this.vggSdk.setContentMode("scaleAspectFill");else if(e==="autoFill")this.vggSdk.setContentMode("scaleAspectFillTopCenter");else throw new Error("Invalid content mode")}setFitToViewportEnabled(e){var t;(t=this.vggSdk)==null||t.setFitToViewportEnabled(e)}getAllFrames(){var t;const e=(t=this.vggSdk)==null?void 0:t.getFramesInfo();return e?JSON.parse(e):[]}setCurrentFrame(e,t=!0){var r;(r=this.vggSdk)==null||r.setCurrentFrameById(e,t)}nextFrame(){const e=this.getAllFrames(),r=(e.findIndex(s=>s.id===this.currentFrameId)+1)%e.length;this.setCurrentFrame(e[r].id)}prevFrame(){const e=this.getAllFrames(),r=(e.findIndex(s=>s.id===this.currentFrameId)-1+e.length)%e.length;this.setCurrentFrame(e[r].id)}get currentFrameId(){var e;return(e=this.vggSdk)==null?void 0:e.currentFrameId()}getFontsInUse(){var t;const e=(t=this.vggSdk)==null?void 0:t.requiredFonts();if(!e)return[];try{return JSON.parse(e)}catch(r){return console.error(r),[]}}};a(f,"missingErrorMessage","Daruma source file required");let u=f;return typeof globalThis<"u"&&(globalThis.VGG=u),d.EventType=i,d.State=c,d.VGG=u,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),d}({});

@@ -9,3 +9,3 @@ {

"license": "MIT",
"version": "0.1.25",
"version": "0.1.26",
"files": [

@@ -12,0 +12,0 @@ "dist"

# VGG WASM
## Environment
Create a `.env` file and set the VGG runtime URL if you want to use a specific version, otherwise it will use the latest version.
```bash
# Open your terminal and goto the root directory of your project
cp /packages/wasm/.env.example /packages/wasm/.env
```
## Usage

@@ -4,0 +13,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc