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

@antv/g-mobile

Package Overview
Dependencies
Maintainers
58
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-mobile - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3-alpha.0

dist/canvas-element.d.ts

16

dist/index.umd.min.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@antv/g")):"function"==typeof define&&define.amd?define(["@antv/g"],e):"object"==typeof exports?exports.MobileCanvas2D=e(require("@antv/g")):(t.G=t.G||{},t.G.MobileCanvas2D=e(t.G))}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(e,n){e.exports=t},function(t,e,n){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;var i=n(0);function c(t,e){return t.currentStyle?t.currentStyle[e]:window&&window.document?document.defaultView.getComputedStyle(t,null).getPropertyValue(e):void 0}function s(t,e){var n,r;return t.canvas.width=(n=t.canvas,"auto"===(r=c(n,"width"))&&(r=n.offsetWidth),parseFloat(r)*e||t.canvas.width||0),t.canvas.height=function(t){var e=c(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t.canvas)*e||t.canvas.height||0,t}var a=n(2),u=function(){function t(t){this.isCanvasElement=!0,this.emitter=new a.EventEmitter,this.context=t;var e=t.canvas||{};this.width=e.width||0,this.height=e.height||0}return t.prototype.getContext=function(){return this.context},t.prototype.getBoundingClientRect=function(){var t=this.width,e=this.height;return{top:0,right:t,bottom:e,left:0,width:t,height:e,x:0,y:0}},t.prototype.addEventListener=function(t,e){this.emitter.on(t,e)},t.prototype.removeEventListener=function(t,e){this.emitter.off(t,e)},t.prototype.dispatchEvent=function(t,e){this.emitter.emit(t,e)},t}();var f=function(t){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new u(t):null},l=function(t){function e(e){var n,r=e.context,i=e.devicePixelRatio;if(r){var c=s(r,i);n=f(c)}return t.call(this,o(o({},e),{canvas:n,devicePixelRatio:i}))||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(i.Canvas);e.a=l},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function i(){}function c(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new c(n,r||t,i),a=o?o+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=o?o+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,c=new Array(i);r<i;r++)c[r]=n[r].fn;return c},u.prototype.listenerCount=function(t){var e=o?o+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,r,i,c){var s=o?o+t:t;if(!this._events[s])return!1;var a,u,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,c),!0}for(u=1,a=new Array(l-1);u<l;u++)a[u-1]=arguments[u];f.fn.apply(f.context,a)}else{var v,p=f.length;for(u=0;u<p;u++)switch(f[u].once&&this.removeListener(t,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,e);break;case 3:f[u].fn.call(f[u].context,e,n);break;case 4:f[u].fn.call(f[u].context,e,n,r);break;default:if(!a)for(v=1,a=new Array(l-1);v<l;v++)a[v-1]=arguments[v];f[u].fn.apply(f[u].context,a)}}return!0},u.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,r){var i=o?o+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||r&&!c.once||n&&c.context!==n||a(this,i);else{for(var s=0,u=[],f=c.length;s<f;s++)(c[s].fn!==e||r&&!c[s].once||n&&c[s].context!==n)&&u.push(c[s]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=o,u.EventEmitter=u,t.exports=u},function(t,e,n){"use strict";n.r(e);var r=n(0);for(var o in r)["default","Canvas"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var i=n(1);n.d(e,"Canvas",(function(){return i.a}))}])}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g")):"function"==typeof define&&define.amd?define(["exports","@antv/g"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Mobile={}),t.window.G)}(this,(function(t,e){"use strict";function n(){return n=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,e){return t.currentStyle?t.currentStyle[e]:window&&window.document?document.defaultView.getComputedStyle(t,null).getPropertyValue(e):void 0}function i(t,e){var n,r;return t.canvas.width=("auto"===(r=o(n=t.canvas,"width"))&&(r=n.offsetWidth),parseFloat(r)*e||t.canvas.width||0),t.canvas.height=function(t){var e=o(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t.canvas)*e||t.canvas.height||0,t}var s=function(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new o(r,i||t,s),a=n?n+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],c]:t._events[a].push(c):(t._events[a]=c,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var t,r,o=[];if(0===this._eventsCount)return o;for(r in t=this._events)e.call(t,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},c.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,o=e.length,i=Array(o);o>r;r++)i[r]=e[r].fn;return i},c.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},c.prototype.emit=function(t,e,r,o,i,s){var c=n?n+t:t;if(!this._events[c])return!1;var a,u,f=this._events[c],h=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),h){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,r),!0;case 4:return f.fn.call(f.context,e,r,o),!0;case 5:return f.fn.call(f.context,e,r,o,i),!0;case 6:return f.fn.call(f.context,e,r,o,i,s),!0}for(u=1,a=Array(h-1);h>u;u++)a[u-1]=arguments[u];f.fn.apply(f.context,a)}else{var v,p=f.length;for(u=0;p>u;u++)switch(f[u].once&&this.removeListener(t,f[u].fn,void 0,!0),h){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,e);break;case 3:f[u].fn.call(f[u].context,e,r);break;case 4:f[u].fn.call(f[u].context,e,r,o);break;default:if(!a)for(v=1,a=Array(h-1);h>v;v++)a[v-1]=arguments[v];f[u].fn.apply(f[u].context,a)}}return!0},c.prototype.on=function(t,e,n){return i(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return i(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,r,o){var i=n?n+t:t;if(!this._events[i])return this;if(!e)return s(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||o&&!c.once||r&&c.context!==r||s(this,i);else{for(var a=0,u=[],f=c.length;f>a;a++)(c[a].fn!==e||o&&!c[a].once||r&&c[a].context!==r)&&u.push(c[a]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},c.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&s(this,e):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,t.exports=c})),c=function(){function t(t){this.context=void 0,this.width=void 0,this.height=void 0,this.isCanvasElement=!0,this.emitter=new s.EventEmitter,this.context=t;var e=t.canvas||{};this.width=e.width||0,this.height=e.height||0}var e=t.prototype;return e.getContext=function(){return this.context},e.getBoundingClientRect=function(){var t=this.width,e=this.height;return{top:0,right:t,bottom:e,left:0,width:t,height:e,x:0,y:0}},e.addEventListener=function(t,e){this.emitter.on(t,e)},e.removeEventListener=function(t,e){this.emitter.off(t,e)},e.dispatchEvent=function(t,e){this.emitter.emit(t,e)},t}();var a=function(t){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new c(t):null},u=function(t){var e,o;function s(e){var r,o=e.context,s=e.devicePixelRatio;if(o){var c=i(o,s);r=a(c)}return t.call(this,n({},e,{canvas:r,devicePixelRatio:s}))||this}return(e=s).prototype=Object.create((o=t).prototype),e.prototype.constructor=e,r(e,o),s}(e.Canvas);Object.keys(e).forEach((function(n){"default"!==n&&Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t.Canvas=u,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@antv/g-mobile",
"version": "1.1.2",
"version": "1.1.3-alpha.0",
"description": "A renderer implemented with Canvas2D API in mobile environment",
"main": "lib/index.js",
"module": "es/index.js",
"types": "es/index.d.ts",
"keywords": [
"antv",
"g"
],
"homepage": "https://github.com/antvis/g#readme",
"bugs": {
"url": "https://github.com/antvis/g/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/antvis/g.git"
},
"license": "MIT",
"author": "https://github.com/orgs/antvis/people",
"main": "dist/index.js",
"unpkg": "dist/index.umd.min.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": [
"package.json",
"dist",
"es",
"lib",
"LICENSE",
"README.md"
],
"repository": {
"type": "git",
"url": "git+https://github.com/antvis/g.git"
"dependencies": {
"eventemitter3": "^4.0.0",
"tslib": "^2.3.1"
},
"keywords": [
"util",
"antv",
"g"
],
"publishConfig": {
"access": "public"
},
"author": "https://github.com/orgs/antvis/people",
"license": "MIT",
"bugs": {
"url": "https://github.com/antvis/g/issues"
},
"devDependencies": {

@@ -38,6 +37,2 @@ "@types/gl-matrix": "^2.4.5",

},
"homepage": "https://github.com/antvis/g#readme",
"dependencies": {
"tslib": "^2.3.1"
},
"peerDependencies": {

@@ -47,6 +42,6 @@ "@antv/g": "^5.0.1",

},
"scripts": {
"umd": "webpack"
"publishConfig": {
"access": "public"
},
"gitHead": "633cec1df324421b0c0821cb18d3ee351c1a47f3"
"gitHead": "d8b58d9c45bd5e41e47696a006aad8027c416409"
}
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