@ng-web-apis/common
Advanced tools
Comparing version 1.12.0 to 1.12.1
@@ -122,2 +122,3 @@ (function (global, factory) { | ||
var NETWORK_INFORMATION = new core.InjectionToken('An abstraction over window.navigator.connection object', { | ||
// @ts-ignore | ||
factory: function () { return core.inject(NAVIGATOR).connection || null; }, | ||
@@ -166,3 +167,3 @@ }); | ||
var windowRef = core.inject(WINDOW); | ||
return (windowRef.speechRecogniton || windowRef.webkitSpeechRecognition || null); | ||
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null; | ||
}, | ||
@@ -169,0 +170,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ng-web-apis/common",["exports","@angular/common","rxjs","rxjs/operators","@angular/core"],e):e((n["ng-web-apis"]=n["ng-web-apis"]||{},n["ng-web-apis"].common={}),n.ng.common,n.rxjs,n.rxjs.operators,n.ng.core)}(this,function(n,e,o,t,c){"use strict";var a=new c.InjectionToken("An abstraction over global window object",{factory:function(){var n=c.inject(e.DOCUMENT).defaultView;if(!n)throw new Error("Window is not available");return n}}),r=new c.InjectionToken("Shared Observable based on `window.requestAnimationFrame`",{factory:function(){var n=c.inject(a),r=n.requestAnimationFrame,i=n.cancelAnimationFrame;return new o.Observable(function(e){var o=NaN,t=function(n){e.next(n),o=r(t)};return o=r(t),function(){i(o)}}).pipe(t.share())}}),i=new c.InjectionToken("An abstraction over window.caches object",{factory:function(){return c.inject(a).caches}}),s=new c.InjectionToken("An abstraction over window.crypto object",{factory:function(){return c.inject(a).crypto}}),u=new c.InjectionToken("An abstraction over window.CSS object",{factory:function(){return c.inject(a).CSS||{escape:function(n){return n},supports:function(){return!1}}}}),f=new c.InjectionToken("An abstraction over window.history object",{factory:function(){return c.inject(a).history}}),w=new c.InjectionToken("An abstraction over window.localStorage object",{factory:function(){return c.inject(a).localStorage}}),j=new c.InjectionToken("An abstraction over window.location object",{factory:function(){return c.inject(a).location}}),b=new c.InjectionToken("An abstraction over window.navigator object",{factory:function(){return c.inject(a).navigator}}),d=new c.InjectionToken("An abstraction over window.navigator.connection object",{factory:function(){return c.inject(b).connection||null}}),v=new c.InjectionToken("Shared Observable based on `document visibility changed`",{factory:function(){var n=c.inject(e.DOCUMENT);return o.fromEvent(n,"visibilitychange").pipe(t.startWith(0),t.map(function(){return"hidden"!==n.visibilityState}),t.distinctUntilChanged(),t.share())}}),A=new c.InjectionToken("An abstraction over window.performance object",{factory:function(){return c.inject(a).performance}}),I=new c.InjectionToken("An abstraction over window.sessionStorage object",{factory:function(){return c.inject(a).sessionStorage}}),l=new c.InjectionToken("An abstraction over SpeechRecognition class",{factory:function(){var n=c.inject(a);return n.speechRecogniton||n.webkitSpeechRecognition||null}}),p=new c.InjectionToken("An abstraction over window.speechSynthesis object",{factory:function(){return c.inject(a).speechSynthesis}}),S=new c.InjectionToken("An abstraction over window.navigator.userAgent object",{factory:function(){return c.inject(b).userAgent}});n.ANIMATION_FRAME=r,n.CACHES=i,n.CRYPTO=s,n.CSS=u,n.HISTORY=f,n.LOCAL_STORAGE=w,n.LOCATION=j,n.NAVIGATOR=b,n.NETWORK_INFORMATION=d,n.PAGE_VISIBILITY=v,n.PERFORMANCE=A,n.SESSION_STORAGE=I,n.SPEECH_RECOGNITION=l,n.SPEECH_SYNTHESIS=p,n.USER_AGENT=S,n.WINDOW=a,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ng-web-apis/common",["exports","@angular/common","rxjs","rxjs/operators","@angular/core"],e):e((n["ng-web-apis"]=n["ng-web-apis"]||{},n["ng-web-apis"].common={}),n.ng.common,n.rxjs,n.rxjs.operators,n.ng.core)}(this,function(n,e,o,t,c){"use strict";var a=new c.InjectionToken("An abstraction over global window object",{factory:function(){var n=c.inject(e.DOCUMENT).defaultView;if(!n)throw new Error("Window is not available");return n}}),r=new c.InjectionToken("Shared Observable based on `window.requestAnimationFrame`",{factory:function(){var n=c.inject(a),r=n.requestAnimationFrame,i=n.cancelAnimationFrame;return new o.Observable(function(e){var o=NaN,t=function(n){e.next(n),o=r(t)};return o=r(t),function(){i(o)}}).pipe(t.share())}}),i=new c.InjectionToken("An abstraction over window.caches object",{factory:function(){return c.inject(a).caches}}),s=new c.InjectionToken("An abstraction over window.crypto object",{factory:function(){return c.inject(a).crypto}}),u=new c.InjectionToken("An abstraction over window.CSS object",{factory:function(){return c.inject(a).CSS||{escape:function(n){return n},supports:function(){return!1}}}}),f=new c.InjectionToken("An abstraction over window.history object",{factory:function(){return c.inject(a).history}}),w=new c.InjectionToken("An abstraction over window.localStorage object",{factory:function(){return c.inject(a).localStorage}}),j=new c.InjectionToken("An abstraction over window.location object",{factory:function(){return c.inject(a).location}}),b=new c.InjectionToken("An abstraction over window.navigator object",{factory:function(){return c.inject(a).navigator}}),d=new c.InjectionToken("An abstraction over window.navigator.connection object",{factory:function(){return c.inject(b).connection||null}}),v=new c.InjectionToken("Shared Observable based on `document visibility changed`",{factory:function(){var n=c.inject(e.DOCUMENT);return o.fromEvent(n,"visibilitychange").pipe(t.startWith(0),t.map(function(){return"hidden"!==n.visibilityState}),t.distinctUntilChanged(),t.share())}}),A=new c.InjectionToken("An abstraction over window.performance object",{factory:function(){return c.inject(a).performance}}),I=new c.InjectionToken("An abstraction over window.sessionStorage object",{factory:function(){return c.inject(a).sessionStorage}}),l=new c.InjectionToken("An abstraction over SpeechRecognition class",{factory:function(){var n=c.inject(a);return n.speechRecognition||n.webkitSpeechRecognition||null}}),p=new c.InjectionToken("An abstraction over window.speechSynthesis object",{factory:function(){return c.inject(a).speechSynthesis}}),S=new c.InjectionToken("An abstraction over window.navigator.userAgent object",{factory:function(){return c.inject(b).userAgent}});n.ANIMATION_FRAME=r,n.CACHES=i,n.CRYPTO=s,n.CSS=u,n.HISTORY=f,n.LOCAL_STORAGE=w,n.LOCATION=j,n.NAVIGATOR=b,n.NETWORK_INFORMATION=d,n.PAGE_VISIBILITY=v,n.PERFORMANCE=A,n.SESSION_STORAGE=I,n.SPEECH_RECOGNITION=l,n.SPEECH_SYNTHESIS=p,n.USER_AGENT=S,n.WINDOW=a,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ng-web-apis-common.umd.min.js.map |
@@ -5,4 +5,2 @@ /** | ||
*/ | ||
/// <reference types="network-information-types" /> | ||
/// <reference types="network-information-types" /> | ||
import { inject, InjectionToken } from '@angular/core'; | ||
@@ -12,4 +10,5 @@ import { NAVIGATOR } from './navigator'; | ||
export const NETWORK_INFORMATION = new InjectionToken('An abstraction over window.navigator.connection object', { | ||
// @ts-ignore | ||
factory: () => inject(NAVIGATOR).connection || null, | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay1pbmZvcm1hdGlvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9jb21tb24vIiwic291cmNlcyI6WyJ0b2tlbnMvbmV0d29yay1pbmZvcm1hdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsbURBQW1EOztBQUVuRCxPQUFPLEVBQUMsTUFBTSxFQUFFLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNyRCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sYUFBYSxDQUFDOztBQUV0QyxNQUFNLE9BQU8sbUJBQW1CLEdBQUcsSUFBSSxjQUFjLENBQ2pELHdEQUF3RCxFQUN4RDtJQUNJLE9BQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUMsVUFBVSxJQUFJLElBQUk7Q0FDdEQsQ0FDSiIsInNvdXJjZXNDb250ZW50IjpbIi8vL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xDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtpbmplY3QsIEluamVjdGlvblRva2VufSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHtOQVZJR0FUT1J9IGZyb20gJy4vbmF2aWdhdG9yJztcclxuXHJcbmV4cG9ydCBjb25zdCBORVRXT1JLX0lORk9STUFUSU9OID0gbmV3IEluamVjdGlvblRva2VuPFxyXG4gICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgdHlwZW9mIG5hdmlnYXRvclsnY29ubmVjdGlvbiddIHwgbnVsbFxyXG4+KCdBbiBhYnN0cmFjdGlvbiBvdmVyIHdpbmRvdy5uYXZpZ2F0b3IuY29ubmVjdGlvbiBvYmplY3QnLCB7XHJcbiAgICAvLyBAdHMtaWdub3JlXHJcbiAgICBmYWN0b3J5OiAoKSA9PiBpbmplY3QoTkFWSUdBVE9SKS5jb25uZWN0aW9uIHx8IG51bGwsXHJcbn0pO1xyXG4iXX0= |
@@ -12,5 +12,5 @@ /** | ||
const windowRef = inject(WINDOW); | ||
return (windowRef.speechRecogniton || windowRef.webkitSpeechRecognition || null); | ||
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null; | ||
}, | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlZWNoLXJlY29nbml0aW9uLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2NvbW1vbi8iLCJzb3VyY2VzIjpbInRva2Vucy9zcGVlY2gtcmVjb2duaXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFPLE1BQU0sZUFBZSxDQUFDO0FBQzNELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxVQUFVLENBQUM7O0FBRWhDLE1BQU0sT0FBTyxrQkFBa0IsR0FBRyxJQUFJLGNBQWMs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0aW9uIHx8IG51bGw7XHJcbiAgICB9LFxyXG59KTtcclxuIl19 |
@@ -5,4 +5,2 @@ /** | ||
*/ | ||
/// <reference types="network-information-types" /> | ||
/// <reference types="network-information-types" /> | ||
import { inject, InjectionToken } from '@angular/core'; | ||
@@ -12,4 +10,5 @@ import { NAVIGATOR } from './navigator'; | ||
export var NETWORK_INFORMATION = new InjectionToken('An abstraction over window.navigator.connection object', { | ||
// @ts-ignore | ||
factory: function () { return inject(NAVIGATOR).connection || null; }, | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay1pbmZvcm1hdGlvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZy13ZWItYXBpcy9jb21tb24vIiwic291cmNlcyI6WyJ0b2tlbnMvbmV0d29yay1pbmZvcm1hdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsbURBQW1EOztBQUVuRCxPQUFPLEVBQUMsTUFBTSxFQUFFLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNyRCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sYUFBYSxDQUFDOztBQUV0QyxNQUFNLEtBQU8sbUJBQW1CLEdBQUcsSUFBSSxjQUFjLENBQ2pELHdEQUF3RCxFQUN4RDtJQUNJLE9BQU8sRUFBRSxjQUFNLE9BQUEsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDLFVBQVUsSUFBSSxJQUFJLEVBQXBDLENBQW9DO0NBQ3RELENBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSB0eXBlcz1cIm5ldHdvcmstaW5mb3JtYXRpb24tdHlwZXNcIiAvPlxyXG5cclxuaW1wb3J0IHtpbmplY3QsIEluamVjdGlvblRva2VufSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHtOQVZJR0FUT1J9IGZyb20gJy4vbmF2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19JTkZPUk1BVElPTiA9IG5ldyBJbmplY3Rpb25Ub2tlbjxcclxuICAgIC8vIEB0cy1pZ25vcmVcclxuICAgIHR5cGVvZiBuYXZpZ2F0b3JbJ2Nvbm5lY3Rpb24nXSB8IG51bGxcclxuPignQW4gYWJzdHJhY3Rpb24gb3ZlciB3aW5kb3cubmF2aWdhdG9yLmNvbm5lY3Rpb24gb2JqZWN0Jywge1xyXG4gICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgZmFjdG9yeTogKCkgPT4gaW5qZWN0KE5BVklHQVRPUikuY29ubmVjdGlvbiB8fCBudWxsLFxyXG59KTtcclxuIl19 |
@@ -12,5 +12,5 @@ /** | ||
var windowRef = inject(WINDOW); | ||
return (windowRef.speechRecogniton || windowRef.webkitSpeechRecognition || null); | ||
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null; | ||
}, | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlZWNoLXJlY29nbml0aW9uLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2NvbW1vbi8iLCJzb3VyY2VzIjpbInRva2Vucy9zcGVlY2gtcmVjb2duaXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFPLE1BQU0sZUFBZSxDQUFDO0FBQzNELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxVQUFVLENBQUM7O0FBRWhDLE1BQU0sS0FBTyxrQkFBa0IsR0FBRyxJQUFJLGNBQWMsQ0FDaEQsNkNBQTZDLEVBQzdDO0lBQ0ksT0FBTyxFQUFFOztZQUNDLFNBQVMsR0FBUSxNQUFNLENBQUMsTUFBTSxDQUFDO1FBRXJDLE9BQU8sQ0FDSCxTQUFTLENBQUMsZ0JBQWdCLElBQUksU0FBUyxDQUFDLHVCQUF1QixJQUFJLElBQUksQ0FDMUUsQ0FBQztJQUNOLENBQUM7Q0FDSixDQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtpbmplY3QsIEluamVjdGlvblRva2VuLCBUeXBlfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHtXSU5ET1d9IGZyb20gJy4vd2luZG93JztcclxuXHJcbmV4cG9ydCBjb25zdCBTUEVFQ0hfUkVDT0dOSVRJT04gPSBuZXcgSW5qZWN0aW9uVG9rZW48VHlwZTxTcGVlY2hSZWNvZ25pdGlvbj4gfCBudWxsPihcclxuICAgICdBbiBhYnN0cmFjdGlvbiBvdmVyIFNwZWVjaFJlY29nbml0aW9uIGNsYXNzJyxcclxuICAgIHtcclxuICAgICAgICBmYWN0b3J5OiAoKSA9PiB7XHJcbiAgICAgICAgICAgIGNvbnN0IHdpbmRvd1JlZjogYW55ID0gaW5qZWN0KFdJTkRPVyk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gKFxyXG4gICAgICAgICAgICAgICAgd2luZG93UmVmLnNwZWVjaFJlY29nbml0b24gfHwgd2luZG93UmVmLndlYmtpdFNwZWVjaFJlY29nbml0aW9uIHx8IG51bGxcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9LFxyXG4gICAgfSxcclxuKTtcclxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BlZWNoLXJlY29nbml0aW9uLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5nLXdlYi1hcGlzL2NvbW1vbi8iLCJzb3VyY2VzIjpbInRva2Vucy9zcGVlY2gtcmVjb2duaXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUUsY0FBYyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxVQUFVLENBQUM7O0FBRWhDLE1BQU0sS0FBTyxrQkFBa0IsR0FBRyxJQUFJLGNBQWMsQ0FHbEQsNkNBQTZDLEVBQUU7SUFDN0MsT0FBTyxFQUFFOztZQUNDLFNBQVMsR0FBUSxNQUFNLENBQUMsTUFBTSxDQUFDO1FBRXJDLE9BQU8sU0FBUyxDQUFDLGlCQUFpQixJQUFJLFNBQVMsQ0FBQyx1QkFBdUIsSUFBSSxJQUFJLENBQUM7SUFDcEYsQ0FBQztDQUNKLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2luamVjdCwgSW5qZWN0aW9uVG9rZW59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQge1dJTkRPV30gZnJvbSAnLi93aW5kb3cnO1xyXG5cclxuZXhwb3J0IGNvbnN0IFNQRUVDSF9SRUNPR05JVElPTiA9IG5ldyBJbmplY3Rpb25Ub2tlbjxcclxuICAgIC8vIEB0cy1pZ25vcmVcclxuICAgIHR5cGVvZiB3aW5kb3dbJ3NwZWVjaFJlY29nbml0aW9uJ10gfCBudWxsXHJcbj4oJ0FuIGFic3RyYWN0aW9uIG92ZXIgU3BlZWNoUmVjb2duaXRpb24gY2xhc3MnLCB7XHJcbiAgICBmYWN0b3J5OiAoKSA9PiB7XHJcbiAgICAgICAgY29uc3Qgd2luZG93UmVmOiBhbnkgPSBpbmplY3QoV0lORE9XKTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHdpbmRvd1JlZi5zcGVlY2hSZWNvZ25pdGlvbiB8fCB3aW5kb3dSZWYud2Via2l0U3BlZWNoUmVjb2duaXRpb24gfHwgbnVsbDtcclxuICAgIH0sXHJcbn0pO1xyXG4iXX0= |
@@ -119,2 +119,3 @@ import { DOCUMENT } from '@angular/common'; | ||
const NETWORK_INFORMATION = new InjectionToken('An abstraction over window.navigator.connection object', { | ||
// @ts-ignore | ||
factory: () => inject(NAVIGATOR).connection || null, | ||
@@ -163,3 +164,3 @@ }); | ||
const windowRef = inject(WINDOW); | ||
return (windowRef.speechRecogniton || windowRef.webkitSpeechRecognition || null); | ||
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null; | ||
}, | ||
@@ -166,0 +167,0 @@ }); |
@@ -121,2 +121,3 @@ import { DOCUMENT } from '@angular/common'; | ||
var NETWORK_INFORMATION = new InjectionToken('An abstraction over window.navigator.connection object', { | ||
// @ts-ignore | ||
factory: function () { return inject(NAVIGATOR).connection || null; }, | ||
@@ -165,3 +166,3 @@ }); | ||
var windowRef = inject(WINDOW); | ||
return (windowRef.speechRecogniton || windowRef.webkitSpeechRecognition || null); | ||
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null; | ||
}, | ||
@@ -168,0 +169,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"ANIMATION_FRAME":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":35},"arguments":["Shared Observable based on `window.requestAnimationFrame`",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./tokens/animation-frame"}]},"CACHES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over window.caches object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/caches"}]},"CRYPTO":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over window.crypto object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/crypto"}]},"CSS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":12,"character":23},"arguments":["An abstraction over window.CSS object",{"__symbolic":"error","message":"Lambda not supported","line":13,"character":13,"module":"./tokens/css"}]},"HISTORY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":27},"arguments":["An abstraction over window.history object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/history"}]},"LOCAL_STORAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":33},"arguments":["An abstraction over window.localStorage object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/local-storage"}]},"LOCATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":28},"arguments":["An abstraction over window.location object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/location"}]},"NAVIGATOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":29},"arguments":["An abstraction over window.navigator object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/navigator"}]},"NETWORK_INFORMATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":39},"arguments":["An abstraction over window.navigator.connection object",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./tokens/network-information"}]},"PAGE_VISIBILITY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":35},"arguments":["Shared Observable based on `document visibility changed`",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./tokens/page-visibility"}]},"PERFORMANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":31},"arguments":["An abstraction over window.performance object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/performance"}]},"SESSION_STORAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":35},"arguments":["An abstraction over window.sessionStorage object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/session-storage"}]},"SPEECH_RECOGNITION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["An abstraction over SpeechRecognition class",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/speech-recognition"}]},"SPEECH_SYNTHESIS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":36},"arguments":["An abstraction over window.speechSynthesis object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/speech-synthesis"}]},"USER_AGENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":30},"arguments":["An abstraction over window.navigator.userAgent object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/user-agent"}]},"WINDOW":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over global window object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/window"}]}},"origins":{"ANIMATION_FRAME":"./tokens/animation-frame","CACHES":"./tokens/caches","CRYPTO":"./tokens/crypto","CSS":"./tokens/css","HISTORY":"./tokens/history","LOCAL_STORAGE":"./tokens/local-storage","LOCATION":"./tokens/location","NAVIGATOR":"./tokens/navigator","NETWORK_INFORMATION":"./tokens/network-information","PAGE_VISIBILITY":"./tokens/page-visibility","PERFORMANCE":"./tokens/performance","SESSION_STORAGE":"./tokens/session-storage","SPEECH_RECOGNITION":"./tokens/speech-recognition","SPEECH_SYNTHESIS":"./tokens/speech-synthesis","USER_AGENT":"./tokens/user-agent","WINDOW":"./tokens/window"},"importAs":"@ng-web-apis/common"} | ||
{"__symbolic":"module","version":4,"metadata":{"ANIMATION_FRAME":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":35},"arguments":["Shared Observable based on `window.requestAnimationFrame`",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./tokens/animation-frame"}]},"CACHES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over window.caches object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/caches"}]},"CRYPTO":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over window.crypto object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/crypto"}]},"CSS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":12,"character":23},"arguments":["An abstraction over window.CSS object",{"__symbolic":"error","message":"Lambda not supported","line":13,"character":13,"module":"./tokens/css"}]},"HISTORY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":27},"arguments":["An abstraction over window.history object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/history"}]},"LOCAL_STORAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":33},"arguments":["An abstraction over window.localStorage object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/local-storage"}]},"LOCATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":28},"arguments":["An abstraction over window.location object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/location"}]},"NAVIGATOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":29},"arguments":["An abstraction over window.navigator object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/navigator"}]},"NETWORK_INFORMATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":39},"arguments":["An abstraction over window.navigator.connection object",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":13,"module":"./tokens/network-information"}]},"PAGE_VISIBILITY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":35},"arguments":["Shared Observable based on `document visibility changed`",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./tokens/page-visibility"}]},"PERFORMANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":31},"arguments":["An abstraction over window.performance object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/performance"}]},"SESSION_STORAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":35},"arguments":["An abstraction over window.sessionStorage object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/session-storage"}]},"SPEECH_RECOGNITION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["An abstraction over SpeechRecognition class",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":13,"module":"./tokens/speech-recognition"}]},"SPEECH_SYNTHESIS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":36},"arguments":["An abstraction over window.speechSynthesis object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/speech-synthesis"}]},"USER_AGENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":30},"arguments":["An abstraction over window.navigator.userAgent object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/user-agent"}]},"WINDOW":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":26},"arguments":["An abstraction over global window object",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./tokens/window"}]}},"origins":{"ANIMATION_FRAME":"./tokens/animation-frame","CACHES":"./tokens/caches","CRYPTO":"./tokens/crypto","CSS":"./tokens/css","HISTORY":"./tokens/history","LOCAL_STORAGE":"./tokens/local-storage","LOCATION":"./tokens/location","NAVIGATOR":"./tokens/navigator","NETWORK_INFORMATION":"./tokens/network-information","PAGE_VISIBILITY":"./tokens/page-visibility","PERFORMANCE":"./tokens/performance","SESSION_STORAGE":"./tokens/session-storage","SPEECH_RECOGNITION":"./tokens/speech-recognition","SPEECH_SYNTHESIS":"./tokens/speech-synthesis","USER_AGENT":"./tokens/user-agent","WINDOW":"./tokens/window"},"importAs":"@ng-web-apis/common"} |
{ | ||
"name": "@ng-web-apis/common", | ||
"version": "1.12.0", | ||
"version": "1.12.1", | ||
"peerDependencies": { | ||
@@ -8,6 +8,2 @@ "@angular/common": ">=6.0.0", | ||
}, | ||
"dependencies": { | ||
"network-information-types": "^0.1.0", | ||
"tslib": "^1.9.0" | ||
}, | ||
"description": "A set of common utils for consuming Web APIs with Angular", | ||
@@ -45,3 +41,6 @@ "keywords": [ | ||
"metadata": "ng-web-apis-common.metadata.json", | ||
"sideEffects": false | ||
"sideEffects": false, | ||
"dependencies": { | ||
"tslib": "^1.9.0" | ||
} | ||
} |
@@ -1,3 +0,2 @@ | ||
/// <reference types="network-information-types" /> | ||
import { InjectionToken } from '@angular/core'; | ||
export declare const NETWORK_INFORMATION: InjectionToken<NetworkInformation | null>; | ||
export declare const NETWORK_INFORMATION: InjectionToken<any>; |
@@ -1,2 +0,2 @@ | ||
import { InjectionToken, Type } from '@angular/core'; | ||
export declare const SPEECH_RECOGNITION: InjectionToken<Type<SpeechRecognition> | null>; | ||
import { InjectionToken } from '@angular/core'; | ||
export declare const SPEECH_RECOGNITION: InjectionToken<any>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3
151574
- Removednetwork-information-types@^0.1.0
- Removednetwork-information-types@0.1.1(transitive)
- Removedtypescript@5.7.3(transitive)