@eva/plugin-a11y 1.1.1-fix.0 → 1.1.1-fix.1
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/plugin-a11y.cjs.js +1 -1
- package/dist/plugin-a11y.cjs.prod.js +1 -1
- package/package.json +2 -2
- package/dist/EVA.plugin.a11y.js +0 -3627
- package/dist/EVA.plugin.a11y.min.js +0 -1
- package/dist/miniprogram.js +0 -458
- package/dist/plugin-a11y.cjs.js.map +0 -1
- package/dist/plugin-a11y.d.ts +0 -91
- package/dist/plugin-a11y.esm.js.map +0 -1
package/dist/plugin-a11y.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var isEqual = require('lodash-es/isEqual');
|
|
|
7
7
|
var EventEmitter = require('eventemitter3');
|
|
8
8
|
var pixi_js = require('pixi.js');
|
|
9
9
|
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e[
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
11
11
|
|
|
12
12
|
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
13
13
|
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/eva.js"),e=require("lodash-es/isEqual"),r=require("eventemitter3"),n=require("pixi.js");function o(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var a=o(e),i=o(r),s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function c(t,e){function r(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var p=function(){return(p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function l(t,e,r,n){var o,a=arguments.length,i=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a<3?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i}function h(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(i,s)}c((n=n.apply(t,e||[])).next())}))}function u(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function f(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,a=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}var y,m=function(t){function e(e){return e.autoStart=!1,t.call(this,e)||this}return c(e,t),e}(n.Application),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(n.Container),b=function(){function e(t){var e=t.game,r=t.rendererSystem;this.renderers=[],this.game=e,this.rendererSystem=r}return e.prototype.register=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=d(r),a=o.next();!a.done;a=o.next()){var i=a.value;i.game=this.game,i.rendererManager=this.rendererSystem.rendererManager,i.containerManager=this.rendererSystem.containerManager,this.renderers.push(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.componentChanged=function(e){var r,n,o=function(e){var r,n;try{for(var o=(r=void 0,d(i.renderers)),s=o.next();!s.done;s=o.next()){var c=s.value,p=c.observerInfo[e.componentName];if(p){if([t.OBSERVER_TYPE.ADD,t.OBSERVER_TYPE.REMOVE].indexOf(e.type)>-1){try{c.componentChanged&&c.componentChanged(e)}catch(t){console.error("gameObject: "+e.gameObject.name+", "+e.componentName+" is error.",e,t)}continue}if(p.findIndex((function(t){return a(t,e.prop)}))>-1)try{c.componentChanged&&c.componentChanged(e)}catch(t){console.error("gameObject: "+(e.gameObject&&e.gameObject.name)+", "+e.componentName+" is componentChanged error.",e,t)}}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},i=this;try{for(var s=d(e),c=s.next();!c.done;c=s.next()){o(c.value)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype.update=function(t){var e,r,n,o;try{for(var a=d(t.components),i=a.next();!i.done;i=a.next()){var s=i.value;try{for(var c=(n=void 0,d(this.renderers)),p=c.next();!p.done;p=c.next()){var l=p.value,h=[];if(l.observerInfo[s.name]&&-1===h.indexOf(t)){h.push(t);try{l.rendererUpdate&&l.rendererUpdate(t)}catch(e){console.info("gameObject: "+t.name+", "+s.name+" is update error",e)}}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}},e}(),E=function(){function t(){this.containerMap={}}return t.prototype.addContainer=function(t){var e=t.name,r=t.container;this.containerMap[e]=r},t.prototype.getContainer=function(t){return this.containerMap[t]},t.prototype.removeContainer=function(t){var e;null===(e=this.containerMap[t])||void 0===e||e.destroy({children:!0}),delete this.containerMap[t]},t.prototype.updateTransform=function(t){var e=t.name,r=t.transform,n=this.containerMap[e];if(n){var o=r.anchor,a=r.origin,i=r.position,s=r.rotation,c=r.scale,p=r.size,l=r.skew;n.rotation=s,n.scale=c,n.pivot.x=p.width*a.x,n.pivot.y=p.height*a.y,n.skew=l;var h=i.x,u=i.y;if(r.parent){var d=r.parent;h+=d.size.width*o.x,u+=d.size.height*o.y}n.position={x:h,y:u}}},t}(),w=function(e){function r(t){var r=t.system,n=t.containerManager,o=e.call(this)||this;return o.name="Transform",o.waitRemoveIds=[],o.waitChangeScenes=[],o.containerManager=n,o.init(r),o}return c(r,e),r.prototype.init=function(t){var e=this;this.system=t,this.on("changeScene",(function(t){var r=t.scene,n=t.mode,o=t.application;e.waitChangeScenes.push({scene:r,mode:n,application:o})}))},r.prototype.update=function(){var t,e,r,n;try{for(var o=d(this.waitRemoveIds),a=o.next();!a.done;a=o.next()){var i=a.value;this.containerManager.removeContainer(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}this.waitRemoveIds=[];try{for(var s=d(this.waitChangeScenes),c=s.next();!c.done;c=s.next()){var p=c.value,l=this.containerManager.getContainer(p.scene.id);l&&(p.application.stage.removeChildren(),p.application.stage.addChild(l))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}this.waitChangeScenes=[]},r.prototype.componentChanged=function(e){e.type===t.OBSERVER_TYPE.ADD?this.addContainer(e):e.type===t.OBSERVER_TYPE.CHANGE?this.change(e):e.type===t.OBSERVER_TYPE.REMOVE&&this.waitRemoveIds.push(e.gameObject.id)},r.prototype.addContainer=function(t){var e=new g;e.name=t.gameObject.name,this.containerManager.addContainer({name:t.gameObject.id,container:e}),t.component.worldTransform=e.transform.worldTransform},r.prototype.change=function(t){var e=t.component;if(e.parent){this.containerManager.getContainer(e.parent.gameObject.id).addChild(this.containerManager.getContainer(t.gameObject.id));var r=t.gameObject.transform.parent&&t.gameObject.transform.parent.gameObject.getComponent("Render");r&&(r.sortDirty=!0)}else{var n=this.containerManager.getContainer(t.gameObject.id);delete e.worldTransform,n.parent&&n.parent.removeChild(n)}},r.prototype.destroy=function(){this.removeAllListeners(),this.waitRemoveIds=null,this.waitChangeScenes=null,this.system=null,this.containerManager=null},r=l([t.decorators.componentObserver({Transform:["_parent"]})],r)}(i);!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(y||(y={}));var O=function(t){t.plugins.interaction.autoPreventDefault=!0,t.view.style.touchAction="none"},C=function(t){t.plugins.interaction.autoPreventDefault=!1,t.view.style.touchAction="auto"},x=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.multiApps=[],t}return c(r,e),r.prototype.init=function(e){var r=this;this.params=e,this.application=this.createApplication(e),this.containerManager=new E,this.rendererManager=new b({game:this.game,rendererSystem:this}),this.game.canvas=this.application.view,this.transform=new w({system:this,containerManager:this.containerManager}),this.game.on("sceneChanged",(function(e){var n,o=e.scene,a=e.mode,i=e.params;switch(a){case t.LOAD_SCENE_MODE.SINGLE:n=r.application;break;case t.LOAD_SCENE_MODE.MULTI_CANVAS:n=r.createMultiApplication({params:i})}o.canvas=n.view,r.transform.emit("changeScene",{scene:o,mode:a,application:n})}))},r.prototype.registerObserver=function(t){var e,r=this.constructor.observerInfo;for(var n in t)r[n]||(r[n]=[]),(e=r[n]).push.apply(e,v(t[n]))},r.prototype.createMultiApplication=function(t){var e=t.params,r=this.createApplication(e);return this.multiApps.push(r),r},r.prototype.createApplication=function(t){t.view=t.canvas,t.renderType===y.CANVAS&&(t.forceCanvas=!0),n.ticker.shared.autoStart=!1,n.ticker.shared.stop();var e=new m(p({sharedTicker:!0},t));return void 0!==t.preventScroll&&(console.warn("PreventScroll property will deprecate at next major version, please use enableEnable instead. https://eva.js.org/#/tutorials/game"),t.preventScroll?C(e.renderer):O(e.renderer)),void 0!==t.enableScroll&&(t.enableScroll?C(e.renderer):O(e.renderer)),void 0===t.preventScroll&&void 0===t.enableScroll&&C(e.renderer),e},r.prototype.update=function(){var t,e,r,n,o=this.componentObserver.clear();try{for(var a=d(o),i=a.next();!i.done;i=a.next()){var s=i.value;this.transform.componentChanged(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var c=d(this.game.gameObjects),p=c.next();!p.done;p=c.next()){var l=p.value;this.containerManager.updateTransform({name:l.id,transform:l.transform}),this.rendererManager.update(l)}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}},r.prototype.lateUpdate=function(t){this.transform.update(),this.application.ticker.update(t.time)},r.prototype.onDestroy=function(){var t,e;this.application.destroy();try{for(var r=d(this.multiApps),n=r.next();!n.done;n=r.next()){var o=n.value;o&&o.destroy()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.transform.destroy(),this.transform=null,this.params=null,this.rendererManager=null,this.containerManager=null,this.application=null,this.game=null,this.multiApps=null},r.prototype.resize=function(t,e){this.params.width=t,this.params.height=e,this.application.renderer.resize(t,e)},r.systemName="Renderer",r=l([t.decorators.componentObserver({Transform:["_parent"]})],r)}(t.System);var A,S,N,j,R=function(t,e){var r=e.width,n=e.height,o=e.position,a=e.left,i=void 0===a?0:a,s=e.top,c=void 0===s?0:s,p=e.zIndex,l=e.pointerEvents,h=e.background;t.style.width=r+"px",t.style.height=n+"px",t.style.position=o,t.style.left=""+i,t.style.top=""+c,t.style.zIndex=""+p,t.style.pointerEvents=l,t.style.background=h,t.style.border="none",t.style.overflow="hidden"},M=function(e){function r(t){var r=e.call(this)||this;Object.assign(r,t);var n=t.hint,o=void 0===n?"":n,a=t.event,i=t.delay,s=void 0===i?0:i,c=t.attr,p=void 0===c?{}:c,l=t.role,h=void 0===l?"":l,u=t.props,d=void 0===u?{}:u,f=t.state,v=void 0===f?{}:f;return r.hint=o,r.event=a,r.delay=s,r.attr=p,r.role=h,r.props=d,r.state=v,r.a11yId="_"+function(t){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[],n=e.length,o=0;o<t;o++)r[o]=e[0|Math.random()*n];return r.join("")}(6),r}return c(r,e),r.componentName="A11y",l([t.decorators.IDEProp],r.prototype,"interactive",void 0),l([t.decorators.IDEProp],r.prototype,"hint",void 0),l([t.decorators.IDEProp],r.prototype,"event",void 0),l([t.decorators.IDEProp],r.prototype,"delay",void 0),l([t.decorators.IDEProp],r.prototype,"role",void 0),l([t.decorators.IDEProp],r.prototype,"props",void 0),l([t.decorators.IDEProp],r.prototype,"state",void 0),l([t.decorators.IDEProp],r.prototype,"attr",void 0),l([t.decorators.IDEProp],r.prototype,"a11yId",void 0),r}(t.Component);exports.A11yActivate=void 0,(A=exports.A11yActivate||(exports.A11yActivate={}))[A.ENABLE=0]="ENABLE",A[A.DISABLE=1]="DISABLE",A[A.CHECK=2]="CHECK",function(t){t.NONE="none",t.AUTO="auto"}(S||(S={})),function(t){t.DEBUG="rgba(255,0,0,0.5)",t.NONE="transparent"}(N||(N={})),function(t){t.BUTTON="button",t.DIV="div"}(j||(j={}));var I=["hint","event","delay","attr","role","props","state","a11yId","name"],P=function(t,e,r){var n=this;["touchstart","touchend","tap"].forEach((function(o){t.emit(o,{stopPropagation:function(){return r.stopPropagation()},data:{position:n.eventPosition},gameObject:e})}))},D=function(e){function r(t){var r=e.call(this,t)||this;return r.cache=new Map,r.eventCache=new Map,r}return c(r,e),Object.defineProperty(r.prototype,"ratioX",{get:function(){return this._ratioX||this.setRatio()?this._ratioX:0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ratioY",{get:function(){return this._ratioY||this.setRatio()?this._ratioY:0},enumerable:!1,configurable:!0}),r.prototype.init=function(t){return void 0===t&&(t={}),h(this,void 0,void 0,(function(){var e,r,n,o,a,i,s,c;return u(this,(function(p){switch(p.label){case 0:switch(e=t.activate,r=void 0===e?exports.A11yActivate.CHECK:e,n=t.delay,o=void 0===n?100:n,a=t.checkA11yOpen,i=void 0===a?function(){return Promise.resolve(!1)}:a,this.delay=o,r){case exports.A11yActivate.CHECK:return[3,1];case exports.A11yActivate.DISABLE:return[3,5];case exports.A11yActivate.ENABLE:return[3,6]}return[3,7];case 1:return p.trys.push([1,3,,4]),s=this,[4,i()];case 2:return s.activate=p.sent(),[3,4];case 3:return p.sent(),this.activate=!1,[3,4];case 4:return[3,7];case 5:return this.activate=!1,[3,7];case 6:return this.activate=!0,[3,7];case 7:return this.debug=t.debug||!1,this.debug&&(this.activate=!0),this.activate?(c=document.createElement("div"),this.div=c,this.game.canvas.parentNode&&this.game.canvas.parentNode.appendChild(this.div),[2]):[2]}}))}))},r.prototype.setRatio=function(){var t=this.getCanvasBoundingClientRect(),e=t.width,r=t.height,n=this.getRenderRect(),o=n.renderWidth,a=n.renderHeight;return this._ratioX=e/o,this._ratioY=r/a,!(!e&&!r)&&(this.initDiv(),!0)},r.prototype.getRenderRect=function(){var t=(this.game.getSystem(x)||{width:300,height:300}).params,e=t.height;return{renderWidth:t.width,renderHeight:e}},r.prototype.getCanvasBoundingClientRect=function(){var t=this.game.canvas.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}},r.prototype.initDiv=function(){var t=this,e=window.pageXOffset,r=window.pageYOffset,n=this.getCanvasBoundingClientRect(),o={width:n.width,height:n.height,left:n.left+e+"px",top:n.top+r+"px",position:"absolute",zIndex:3,pointerEvents:S.NONE,background:N.NONE};R(this.div,o),this.div.addEventListener("click",(function(e){var r=e.currentTarget.getBoundingClientRect(),n=r.left,o=r.top,a=(e.pageX-n)/t.ratioX,i=(e.pageY-o)/t.ratioY;t.eventPosition={x:a,y:i}}),!0)},r.prototype.update=function(){return h(this,void 0,void 0,(function(){var e,r,n,o,a,i;return u(this,(function(s){if(e=this.componentObserver.clear(),!this.activate)return[2];try{for(r=d(e),n=r.next();!n.done;n=r.next())switch((o=n.value).type){case t.OBSERVER_TYPE.ADD:"Event"===o.componentName&&this.addEvent(o.gameObject),"A11y"===o.componentName&&this.add(o);break;case t.OBSERVER_TYPE.CHANGE:"Transform"===o.componentName&&this.transformChange(o);break;case t.OBSERVER_TYPE.REMOVE:"Event"===o.componentName&&this.removeEvent(o),"A11y"===o.componentName&&this.remove(o)}}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return[2]}))}))},r.prototype.remove=function(t){var e=t.component;if(e){var r=e.a11yId,n=this.div.querySelector("#"+r);n&&this.div.removeChild(n),this.cache.delete(r)}},r.prototype.add=function(t){var e=this;if(this.activate){var r=t.component,n=t.gameObject,o=r.delay,a=r.a11yId,i=r.event;if(n){var s=n.transform;if(s){var c=document.createElement("div");this.cache.set(a,c),i||(i=n.getComponent("Event")),setTimeout((function(){e.setPosition(c,s),e.setA11yAttr(c,r),i&&e.addEvent(n),n.scene&&e.div.appendChild(c)}),o||this.delay)}}}},r.prototype.transformChange=function(t){var e=t.component,r=t.gameObject.getComponent(M);if(r){var n=r.a11yId;if(e.inScene){if(this.cache.has(n)){var o=this.cache.get(n);o&&this.div.appendChild(o)}}else{var a=this.div.querySelector("#"+n);a&&this.div.removeChild(a)}}},r.prototype.setEvent=function(t,e,r,n){if(e){var o=P.bind(this,e,r);this.eventCache.set(n,o),t.addEventListener("click",o)}},r.prototype.addEvent=function(t){var e=t.getComponent(M);if(e){var r=t.getComponent("Event");if(r){var n=this.cache.get(e.a11yId);n&&this.setEvent(n,r,t,e.a11yId)}}},r.prototype.removeEvent=function(t){var e=t.gameObject.getComponent(M);if(e&&t.component){var r=e.a11yId,n=this.eventCache.get(r),o=this.cache.get(r);o&&o.removeEventListener("click",n)}},r.prototype.setA11yAttr=function(t,e){var r,n,o,a,i,s,c=e.hint,p=e.props,l=void 0===p?{}:p,h=e.state,u=void 0===h?{}:h,f=e.role,v=e.a11yId,y=f||"text";t.setAttribute("role",y),t.setAttribute("aria-label",c),t.id=v;var m=Object.keys(l);try{for(var g=d(m),b=g.next();!b.done;b=g.next()){var E=b.value;t.setAttribute(E,l[E])}}catch(t){r={error:t}}finally{try{b&&!b.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}var w=Object.keys(u);try{for(var O=d(w),C=O.next();!C.done;C=O.next()){E=C.value;t.setAttribute(E,u[E])}}catch(t){o={error:t}}finally{try{C&&!C.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}try{for(var x=d(Object.keys(e)),A=x.next();!A.done;A=x.next()){"string"==typeof e[E=A.value]&&-1===I.indexOf(E)&&1!==E.indexOf("_")&&t.setAttribute(E,e[E])}}catch(t){i={error:t}}finally{try{A&&!A.done&&(s=x.return)&&s.call(x)}finally{if(i)throw i.error}}},r.prototype.setPosition=function(t,e){var r=e.size,n=r.width,o=r.height,a={width:0===n?1:n*this.ratioX,height:0===o?1:o*this.ratioY,position:"absolute",zIndex:3,pointerEvents:S.AUTO,background:this.debug?N.DEBUG:N.NONE},i=p({},e);R(t,a),function(t,e,r,n){var o=e.worldTransform,a="matrix("+o.a+", "+o.b+", "+o.c+", "+o.d+", "+o.tx*r+", "+o.ty*n+")";t.style.transform=""+a,t.style.webkitTransform=""+a,t.style.transformOrigin="left top",t.style.webkitTransformOrigin="left top"}(t,i,this.ratioX,this.ratioY)},r.prototype.onDestroy=function(){this.div.parentElement.removeChild(this.div),this.cache=null,this.eventCache=null},r.systemName="A11ySystem",r=l([t.decorators.componentObserver({A11y:[],Transform:["inScene"],Event:[]})],r)}(t.System);exports.A11y=M,exports.A11ySystem=D;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/eva.js"),e=require("lodash-es/isEqual"),r=require("eventemitter3"),n=require("pixi.js");function o(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var a=o(e),i=o(r),s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},s(t,e)};function c(t,e){function r(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var p=function(){return p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)};function l(t,e,r,n){var o,a=arguments.length,i=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a<3?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i}function h(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(i,s)}c((n=n.apply(t,e||[])).next())}))}function u(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function f(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,a=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}var y,m=function(t){function e(e){return e.autoStart=!1,t.call(this,e)||this}return c(e,t),e}(n.Application),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(n.Container),b=function(){function e(t){var e=t.game,r=t.rendererSystem;this.renderers=[],this.game=e,this.rendererSystem=r}return e.prototype.register=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=d(r),a=o.next();!a.done;a=o.next()){var i=a.value;i.game=this.game,i.rendererManager=this.rendererSystem.rendererManager,i.containerManager=this.rendererSystem.containerManager,this.renderers.push(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.componentChanged=function(e){var r,n,o=function(e){var r,n;try{for(var o=(r=void 0,d(i.renderers)),s=o.next();!s.done;s=o.next()){var c=s.value,p=c.observerInfo[e.componentName];if(p){if([t.OBSERVER_TYPE.ADD,t.OBSERVER_TYPE.REMOVE].indexOf(e.type)>-1){try{c.componentChanged&&c.componentChanged(e)}catch(t){console.error("gameObject: "+e.gameObject.name+", "+e.componentName+" is error.",e,t)}continue}if(p.findIndex((function(t){return a(t,e.prop)}))>-1)try{c.componentChanged&&c.componentChanged(e)}catch(t){console.error("gameObject: "+(e.gameObject&&e.gameObject.name)+", "+e.componentName+" is componentChanged error.",e,t)}}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},i=this;try{for(var s=d(e),c=s.next();!c.done;c=s.next()){o(c.value)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype.update=function(t){var e,r,n,o;try{for(var a=d(t.components),i=a.next();!i.done;i=a.next()){var s=i.value;try{for(var c=(n=void 0,d(this.renderers)),p=c.next();!p.done;p=c.next()){var l=p.value,h=[];if(l.observerInfo[s.name]&&-1===h.indexOf(t)){h.push(t);try{l.rendererUpdate&&l.rendererUpdate(t)}catch(e){console.info("gameObject: "+t.name+", "+s.name+" is update error",e)}}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}},e}(),E=function(){function t(){this.containerMap={}}return t.prototype.addContainer=function(t){var e=t.name,r=t.container;this.containerMap[e]=r},t.prototype.getContainer=function(t){return this.containerMap[t]},t.prototype.removeContainer=function(t){var e;null===(e=this.containerMap[t])||void 0===e||e.destroy({children:!0}),delete this.containerMap[t]},t.prototype.updateTransform=function(t){var e=t.name,r=t.transform,n=this.containerMap[e];if(n){var o=r.anchor,a=r.origin,i=r.position,s=r.rotation,c=r.scale,p=r.size,l=r.skew;n.rotation=s,n.scale=c,n.pivot.x=p.width*a.x,n.pivot.y=p.height*a.y,n.skew=l;var h=i.x,u=i.y;if(r.parent){var d=r.parent;h+=d.size.width*o.x,u+=d.size.height*o.y}n.position={x:h,y:u}}},t}(),w=function(e){function r(t){var r=t.system,n=t.containerManager,o=e.call(this)||this;return o.name="Transform",o.waitRemoveIds=[],o.waitChangeScenes=[],o.containerManager=n,o.init(r),o}return c(r,e),r.prototype.init=function(t){var e=this;this.system=t,this.on("changeScene",(function(t){var r=t.scene,n=t.mode,o=t.application;e.waitChangeScenes.push({scene:r,mode:n,application:o})}))},r.prototype.update=function(){var t,e,r,n;try{for(var o=d(this.waitRemoveIds),a=o.next();!a.done;a=o.next()){var i=a.value;this.containerManager.removeContainer(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}this.waitRemoveIds=[];try{for(var s=d(this.waitChangeScenes),c=s.next();!c.done;c=s.next()){var p=c.value,l=this.containerManager.getContainer(p.scene.id);l&&(p.application.stage.removeChildren(),p.application.stage.addChild(l))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}this.waitChangeScenes=[]},r.prototype.componentChanged=function(e){e.type===t.OBSERVER_TYPE.ADD?this.addContainer(e):e.type===t.OBSERVER_TYPE.CHANGE?this.change(e):e.type===t.OBSERVER_TYPE.REMOVE&&this.waitRemoveIds.push(e.gameObject.id)},r.prototype.addContainer=function(t){var e=new g;e.name=t.gameObject.name,this.containerManager.addContainer({name:t.gameObject.id,container:e}),t.component.worldTransform=e.transform.worldTransform},r.prototype.change=function(t){var e=t.component;if(e.parent){this.containerManager.getContainer(e.parent.gameObject.id).addChild(this.containerManager.getContainer(t.gameObject.id));var r=t.gameObject.transform.parent&&t.gameObject.transform.parent.gameObject.getComponent("Render");r&&(r.sortDirty=!0)}else{var n=this.containerManager.getContainer(t.gameObject.id);delete e.worldTransform,n.parent&&n.parent.removeChild(n)}},r.prototype.destroy=function(){this.removeAllListeners(),this.waitRemoveIds=null,this.waitChangeScenes=null,this.system=null,this.containerManager=null},r=l([t.decorators.componentObserver({Transform:["_parent"]})],r)}(i);!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(y||(y={}));var O=function(t){t.plugins.interaction.autoPreventDefault=!0,t.view.style.touchAction="none"},C=function(t){t.plugins.interaction.autoPreventDefault=!1,t.view.style.touchAction="auto"},x=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.multiApps=[],t}return c(r,e),r.prototype.init=function(e){var r=this;this.params=e,this.application=this.createApplication(e),this.containerManager=new E,this.rendererManager=new b({game:this.game,rendererSystem:this}),this.game.canvas=this.application.view,this.transform=new w({system:this,containerManager:this.containerManager}),this.game.on("sceneChanged",(function(e){var n,o=e.scene,a=e.mode,i=e.params;switch(a){case t.LOAD_SCENE_MODE.SINGLE:n=r.application;break;case t.LOAD_SCENE_MODE.MULTI_CANVAS:n=r.createMultiApplication({params:i})}o.canvas=n.view,r.transform.emit("changeScene",{scene:o,mode:a,application:n})}))},r.prototype.registerObserver=function(t){var e,r=this.constructor.observerInfo;for(var n in t)r[n]||(r[n]=[]),(e=r[n]).push.apply(e,v(t[n]))},r.prototype.createMultiApplication=function(t){var e=t.params,r=this.createApplication(e);return this.multiApps.push(r),r},r.prototype.createApplication=function(t){t.view=t.canvas,t.renderType===y.CANVAS&&(t.forceCanvas=!0),n.ticker.shared.autoStart=!1,n.ticker.shared.stop();var e=new m(p({sharedTicker:!0},t));return void 0!==t.preventScroll&&(console.warn("PreventScroll property will deprecate at next major version, please use enableEnable instead. https://eva.js.org/#/tutorials/game"),t.preventScroll?C(e.renderer):O(e.renderer)),void 0!==t.enableScroll&&(t.enableScroll?C(e.renderer):O(e.renderer)),void 0===t.preventScroll&&void 0===t.enableScroll&&C(e.renderer),e},r.prototype.update=function(){var t,e,r,n,o=this.componentObserver.clear();try{for(var a=d(o),i=a.next();!i.done;i=a.next()){var s=i.value;this.transform.componentChanged(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var c=d(this.game.gameObjects),p=c.next();!p.done;p=c.next()){var l=p.value;this.containerManager.updateTransform({name:l.id,transform:l.transform}),this.rendererManager.update(l)}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}},r.prototype.lateUpdate=function(t){this.transform.update(),this.application.ticker.update(t.time)},r.prototype.onDestroy=function(){var t,e;this.application.destroy();try{for(var r=d(this.multiApps),n=r.next();!n.done;n=r.next()){var o=n.value;o&&o.destroy()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.transform.destroy(),this.transform=null,this.params=null,this.rendererManager=null,this.containerManager=null,this.application=null,this.game=null,this.multiApps=null},r.prototype.resize=function(t,e){this.params.width=t,this.params.height=e,this.application.renderer.resize(t,e)},r.systemName="Renderer",r=l([t.decorators.componentObserver({Transform:["_parent"]})],r)}(t.System);var A,S,N,j,R=function(t,e){var r=e.width,n=e.height,o=e.position,a=e.left,i=void 0===a?0:a,s=e.top,c=void 0===s?0:s,p=e.zIndex,l=e.pointerEvents,h=e.background;t.style.width=r+"px",t.style.height=n+"px",t.style.position=o,t.style.left=""+i,t.style.top=""+c,t.style.zIndex=""+p,t.style.pointerEvents=l,t.style.background=h,t.style.border="none",t.style.overflow="hidden"},M=function(e){function r(t){var r=e.call(this)||this;Object.assign(r,t);var n=t.hint,o=void 0===n?"":n,a=t.event,i=t.delay,s=void 0===i?0:i,c=t.attr,p=void 0===c?{}:c,l=t.role,h=void 0===l?"":l,u=t.props,d=void 0===u?{}:u,f=t.state,v=void 0===f?{}:f;return r.hint=o,r.event=a,r.delay=s,r.attr=p,r.role=h,r.props=d,r.state=v,r.a11yId="_"+function(t){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[],n=e.length,o=0;o<t;o++)r[o]=e[0|Math.random()*n];return r.join("")}(6),r}return c(r,e),r.componentName="A11y",l([t.decorators.IDEProp],r.prototype,"interactive",void 0),l([t.decorators.IDEProp],r.prototype,"hint",void 0),l([t.decorators.IDEProp],r.prototype,"event",void 0),l([t.decorators.IDEProp],r.prototype,"delay",void 0),l([t.decorators.IDEProp],r.prototype,"role",void 0),l([t.decorators.IDEProp],r.prototype,"props",void 0),l([t.decorators.IDEProp],r.prototype,"state",void 0),l([t.decorators.IDEProp],r.prototype,"attr",void 0),l([t.decorators.IDEProp],r.prototype,"a11yId",void 0),r}(t.Component),I=M;exports.A11yActivate=void 0,(A=exports.A11yActivate||(exports.A11yActivate={}))[A.ENABLE=0]="ENABLE",A[A.DISABLE=1]="DISABLE",A[A.CHECK=2]="CHECK",function(t){t.NONE="none",t.AUTO="auto"}(S||(S={})),function(t){t.DEBUG="rgba(255,0,0,0.5)",t.NONE="transparent"}(N||(N={})),function(t){t.BUTTON="button",t.DIV="div"}(j||(j={}));var P=["hint","event","delay","attr","role","props","state","a11yId","name"],D=function(t,e,r){var n=this;["touchstart","touchend","tap"].forEach((function(o){t.emit(o,{stopPropagation:function(){return r.stopPropagation()},data:{position:n.eventPosition},gameObject:e})}))},_=function(e){function r(t){var r=e.call(this,t)||this;return r.cache=new Map,r.eventCache=new Map,r}return c(r,e),Object.defineProperty(r.prototype,"ratioX",{get:function(){return this._ratioX||this.setRatio()?this._ratioX:0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ratioY",{get:function(){return this._ratioY||this.setRatio()?this._ratioY:0},enumerable:!1,configurable:!0}),r.prototype.init=function(t){return void 0===t&&(t={}),h(this,void 0,void 0,(function(){var e,r,n,o,a,i,s,c;return u(this,(function(p){switch(p.label){case 0:switch(e=t.activate,r=void 0===e?exports.A11yActivate.CHECK:e,n=t.delay,o=void 0===n?100:n,a=t.checkA11yOpen,i=void 0===a?function(){return Promise.resolve(!1)}:a,this.delay=o,r){case exports.A11yActivate.CHECK:return[3,1];case exports.A11yActivate.DISABLE:return[3,5];case exports.A11yActivate.ENABLE:return[3,6]}return[3,7];case 1:return p.trys.push([1,3,,4]),s=this,[4,i()];case 2:return s.activate=p.sent(),[3,4];case 3:return p.sent(),this.activate=!1,[3,4];case 4:return[3,7];case 5:return this.activate=!1,[3,7];case 6:return this.activate=!0,[3,7];case 7:return this.debug=t.debug||!1,this.debug&&(this.activate=!0),this.activate?(c=document.createElement("div"),this.div=c,this.game.canvas.parentNode&&this.game.canvas.parentNode.appendChild(this.div),[2]):[2]}}))}))},r.prototype.setRatio=function(){var t=this.getCanvasBoundingClientRect(),e=t.width,r=t.height,n=this.getRenderRect(),o=n.renderWidth,a=n.renderHeight;return this._ratioX=e/o,this._ratioY=r/a,!(!e&&!r)&&(this.initDiv(),!0)},r.prototype.getRenderRect=function(){var t=(this.game.getSystem(x)||{width:300,height:300}).params,e=t.height;return{renderWidth:t.width,renderHeight:e}},r.prototype.getCanvasBoundingClientRect=function(){var t=this.game.canvas.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}},r.prototype.initDiv=function(){var t=this,e=window.pageXOffset,r=window.pageYOffset,n=this.getCanvasBoundingClientRect(),o={width:n.width,height:n.height,left:n.left+e+"px",top:n.top+r+"px",position:"absolute",zIndex:3,pointerEvents:S.NONE,background:N.NONE};R(this.div,o),this.div.addEventListener("click",(function(e){var r=e.currentTarget.getBoundingClientRect(),n=r.left,o=r.top,a=(e.pageX-n)/t.ratioX,i=(e.pageY-o)/t.ratioY;t.eventPosition={x:a,y:i}}),!0)},r.prototype.update=function(){return h(this,void 0,void 0,(function(){var e,r,n,o,a,i;return u(this,(function(s){if(e=this.componentObserver.clear(),!this.activate)return[2];try{for(r=d(e),n=r.next();!n.done;n=r.next())switch((o=n.value).type){case t.OBSERVER_TYPE.ADD:"Event"===o.componentName&&this.addEvent(o.gameObject),"A11y"===o.componentName&&this.add(o);break;case t.OBSERVER_TYPE.CHANGE:"Transform"===o.componentName&&this.transformChange(o);break;case t.OBSERVER_TYPE.REMOVE:"Event"===o.componentName&&this.removeEvent(o),"A11y"===o.componentName&&this.remove(o)}}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return[2]}))}))},r.prototype.remove=function(t){var e=t.component;if(e){var r=e.a11yId,n=this.div.querySelector("#"+r);n&&this.div.removeChild(n),this.cache.delete(r)}},r.prototype.add=function(t){var e=this;if(this.activate){var r=t.component,n=t.gameObject,o=r.delay,a=r.a11yId,i=r.event;if(n){var s=n.transform;if(s){var c=document.createElement("div");this.cache.set(a,c),i||(i=n.getComponent("Event")),setTimeout((function(){e.setPosition(c,s),e.setA11yAttr(c,r),i&&e.addEvent(n),n.scene&&e.div.appendChild(c)}),o||this.delay)}}}},r.prototype.transformChange=function(t){var e=t.component,r=t.gameObject.getComponent(I);if(r){var n=r.a11yId;if(e.inScene){if(this.cache.has(n)){var o=this.cache.get(n);o&&this.div.appendChild(o)}}else{var a=this.div.querySelector("#"+n);a&&this.div.removeChild(a)}}},r.prototype.setEvent=function(t,e,r,n){if(e){var o=D.bind(this,e,r);this.eventCache.set(n,o),t.addEventListener("click",o)}},r.prototype.addEvent=function(t){var e=t.getComponent(I);if(e){var r=t.getComponent("Event");if(r){var n=this.cache.get(e.a11yId);n&&this.setEvent(n,r,t,e.a11yId)}}},r.prototype.removeEvent=function(t){var e=t.gameObject.getComponent(I);if(e&&t.component){var r=e.a11yId,n=this.eventCache.get(r),o=this.cache.get(r);o&&o.removeEventListener("click",n)}},r.prototype.setA11yAttr=function(t,e){var r,n,o,a,i,s,c=e.hint,p=e.props,l=void 0===p?{}:p,h=e.state,u=void 0===h?{}:h,f=e.role,v=e.a11yId,y=f||"text";t.setAttribute("role",y),t.setAttribute("aria-label",c),t.id=v;var m=Object.keys(l);try{for(var g=d(m),b=g.next();!b.done;b=g.next()){var E=b.value;t.setAttribute(E,l[E])}}catch(t){r={error:t}}finally{try{b&&!b.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}var w=Object.keys(u);try{for(var O=d(w),C=O.next();!C.done;C=O.next()){E=C.value;t.setAttribute(E,u[E])}}catch(t){o={error:t}}finally{try{C&&!C.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}try{for(var x=d(Object.keys(e)),A=x.next();!A.done;A=x.next()){"string"==typeof e[E=A.value]&&-1===P.indexOf(E)&&1!==E.indexOf("_")&&t.setAttribute(E,e[E])}}catch(t){i={error:t}}finally{try{A&&!A.done&&(s=x.return)&&s.call(x)}finally{if(i)throw i.error}}},r.prototype.setPosition=function(t,e){var r=e.size,n=r.width,o=r.height,a={width:0===n?1:n*this.ratioX,height:0===o?1:o*this.ratioY,position:"absolute",zIndex:3,pointerEvents:S.AUTO,background:this.debug?N.DEBUG:N.NONE},i=p({},e);R(t,a),function(t,e,r,n){var o=e.worldTransform,a="matrix("+o.a+", "+o.b+", "+o.c+", "+o.d+", "+o.tx*r+", "+o.ty*n+")";t.style.transform=""+a,t.style.webkitTransform=""+a,t.style.transformOrigin="left top",t.style.webkitTransformOrigin="left top"}(t,i,this.ratioX,this.ratioY)},r.prototype.onDestroy=function(){this.div.parentElement.removeChild(this.div),this.cache=null,this.eventCache=null},r.systemName="A11ySystem",r=l([t.decorators.componentObserver({A11y:[],Transform:["inScene"],Event:[]})],r)}(t.System);exports.A11y=I,exports.A11ySystem=_;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-a11y",
|
|
3
|
-
"version": "1.1.1-fix.
|
|
3
|
+
"version": "1.1.1-fix.1",
|
|
4
4
|
"description": "@eva/plugin-a11y",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-a11y.esm.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"homepage": "https://eva.js.org",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eva/eva.js": "1.1.1-fix.
|
|
21
|
+
"@eva/eva.js": "1.1.1-fix.1",
|
|
22
22
|
"eventemitter3": "^3.1.2"
|
|
23
23
|
}
|
|
24
24
|
}
|