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

@eox/chart

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eox/chart - npm Package Compare versions

Comparing version 2.0.0-alpha7b to 2.0.0-alpha8

2

dist/interface.umd.js

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

(function(s,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(s=typeof globalThis<"u"?globalThis:s||self,t(s.Interface={}))})(this,function(s){"use strict";var g=Object.defineProperty;var b=(s,t,n)=>t in s?g(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n;var f=(s,t,n)=>(b(s,typeof t!="symbol"?t+"":t,n),n);const t=new MessageChannel,n=t.port1;class m{constructor(e){f(this,"iframe");this.iframe=e}setData(e){n.postMessage({type:"setData",body:{data:e}})}setSignalsData(e){n.postMessage({type:"setSignalsData",body:{data:e}})}setSignalsEndpoint(e){n.postMessage({type:"setSignalsEndpoint",body:{options:e}})}setSignalsGeometry(e){n.postMessage({type:"setSignalsGeometry",body:{geometry:e}})}setOptions(e){n.postMessage({type:"setOptions",body:{options:e}})}getFoo(){return new Promise(e=>{const o=Date.now();n.onmessage=i=>{i.data.ts===o&&e(i.data.body)},n.postMessage({ts:o,type:"getFoo",body:"hello world"})})}}const h=a=>a?new Promise(e=>{var c,d;const o=document.createElement("iframe");o.style.cssText="width: 100%; height: 100%; display: block; margin: 0; border: none;",o.setAttribute("src",(c=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&c.includes("localhost")?"http://localhost:5173/index.html":"about:blank"),o.setAttribute("id","EOxChart"),a==null||a.appendChild(o),(d=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&d.includes("localhost")||fetch("https://raw.githack.com/EOX-A/elements/chartelement/elements/chart/dist/index.html").then(r=>r.text()).then(r=>{var l,u,p;const y=r.replace("./assets/","https://raw.githack.com/EOX-A/elements/chartelement/elements/chart/dist/assets/");(l=o.contentDocument)==null||l.open(),(u=o.contentDocument)==null||u.write(y),(p=o.contentDocument)==null||p.close()});let i=!1;o.onload=()=>{var r;i||((r=o.contentWindow)==null||r.postMessage("init","*",[t.port2]),i=!0,e(new m(o)))}}):(console.error("no div selected"),null);s.createChart=h,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
(function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n.Interface={}))})(this,function(n){"use strict";var v=Object.defineProperty;var S=(n,s,o)=>s in n?v(n,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[s]=o;var y=(n,s,o)=>(S(n,typeof s!="symbol"?s+"":s,o),o);const g={name:"@eox/chart",version:"2.0.0-alpha8",dependencies:{"chart.js":"^4.2.1","chartjs-adapter-luxon":"^1.3.1","chartjs-chart-error-bars":"^4.1.2"},devDependencies:{"@eox/eslint-config":"^1.0.0","@types/luxon":"^3.2.0","@typescript-eslint/eslint-plugin":"^5.50.0","@typescript-eslint/parser":"^5.50.0",cypress:"^12.6.0","cypress-vite":"^1.3.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-typescript":"^0.14.0",install:"^0.13.0",luxon:"^3.3.0",npm:"^9.6.3","p-retry":"^5.1.2","pre-commit":"^1.2.2","start-server-and-test":"^1.15.2",typescript:"^4.9.3",vite:"^4.0.0"},engines:{npm:">=8.0.0",node:">=18.0.0"},files:["dist","scripts","src","typings"],main:"./dist/interface.mjs",scripts:{start:"vite",build:"tsc && vite build --config vite.config.interface.ts && vite build --config vite.config.map.ts",watch:"node scripts/watch.mjs",preview:"vite preview",format:"prettier --write .",lint:"eslint --ext .js,.ts .","lint:fix":"eslint --ext .js,.ts . --fix",cypress:"start-server-and-test start 5173 'cypress open'",test:"start-server-and-test start 5173 'cypress run'"},"pre-commit":["format","lint:fix"]},d=new MessageChannel,i=d.port1;class b{constructor(e){y(this,"iframe");this.iframe=e}setData(e){i.postMessage({type:"setData",body:{data:e}})}setSignalsData(e){i.postMessage({type:"setSignalsData",body:{data:e}})}setSignalsEndpoint(e){i.postMessage({type:"setSignalsEndpoint",body:{options:e}})}setSignalsGeometry(e){i.postMessage({type:"setSignalsGeometry",body:{geometry:e}})}setOptions(e){i.postMessage({type:"setOptions",body:{options:e}})}getFoo(){return new Promise(e=>{const t=Date.now();i.onmessage=c=>{c.data.ts===t&&e(c.data.body)},i.postMessage({ts:t,type:"getFoo",body:"hello world"})})}}const w=r=>r?new Promise(e=>{var l,u;const t=document.createElement("iframe");if(t.style.cssText="width: 100%; height: 100%; display: block; margin: 0; border: none;",t.setAttribute("src",(l=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&l.includes("localhost")?"http://localhost:5173/index.html":"about:blank"),t.setAttribute("id","EOxChart"),r==null||r.appendChild(t),!((u=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||new URL("interface.umd.js",document.baseURI).href)!=null&&u.includes("localhost"))){const a=`https://www.unpkg.com/@eox/chart@${g.version}/dist`;fetch(`${a}/index.html`).then(p=>p.text()).then(p=>{var f,m,h;const x=p.replace("./assets/",`${a}/assets/`);(f=t.contentDocument)==null||f.open(),(m=t.contentDocument)==null||m.write(x),(h=t.contentDocument)==null||h.close()})}let c=!1;t.onload=()=>{var a;c||((a=t.contentWindow)==null||a.postMessage("init","*",[d.port2]),c=!0,e(new b(t)))}}):(console.error("no div selected"),null);n.createChart=w,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
{
"name": "@eox/chart",
"version": "2.0.0-alpha7b",
"version": "2.0.0-alpha8",
"dependencies": {

@@ -31,2 +31,9 @@ "chart.js": "^4.2.1",

},
"files": [
"dist",
"scripts",
"src",
"typings"
],
"main": "./dist/interface.mjs",
"scripts": {

@@ -33,0 +40,0 @@ "start": "vite",

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

import pkg from "../package.json";
const channel = new MessageChannel();

@@ -65,12 +67,13 @@ const port1 = channel.port1;

if (!import.meta?.url?.includes("localhost")) {
fetch("https://raw.githack.com/EOX-A/elements/chartelement/elements/chart/dist/index.html")
.then((response) => {
return response.text();
})
.then((text) => {
const html = text.replace('./assets/', 'https://raw.githack.com/EOX-A/elements/chartelement/elements/chart/dist/assets/');
iframe.contentDocument?.open();
iframe.contentDocument?.write(html);
iframe.contentDocument?.close();
})
const hostUrl = `https://www.unpkg.com/@eox/chart@${pkg.version}/dist`;
fetch(`${hostUrl}/index.html`)
.then((response) => {
return response.text();
})
.then((text) => {
const html = text.replace("./assets/", `${hostUrl}/assets/`);
iframe.contentDocument?.open();
iframe.contentDocument?.write(html);
iframe.contentDocument?.close();
});
}

@@ -77,0 +80,0 @@ let iframeLoaded = false;

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