@ionic/pwa-elements
Advanced tools
Comparing version 1.2.7 to 1.3.0
@@ -6,3 +6,3 @@ 'use strict'; | ||
__chunk_1.patchBrowser().then(resourcesUrl => { | ||
return __chunk_1.bootstrapLazy([["pwa-camera-modal.cjs",[[1,"pwa-camera-modal",{"present":[64],"dismiss":[64]}]]],["pwa-toast.cjs",[[1,"pwa-toast",{"message":[1],"duration":[2],"closing":[32]}]]],["pwa-camera.cjs",[[1,"pwa-camera",{"facingMode":[1,"facing-mode"],"onPhoto":[16],"photo":[32],"photoSrc":[32],"showShutterOverlay":[32],"flashIndex":[32],"cameraError":[32],"cameraErrorString":[32]}]]],["pwa-camera-modal-instance.cjs",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]], { resourcesUrl }); | ||
return __chunk_1.bootstrapLazy([["pwa-camera-modal.cjs",[[1,"pwa-camera-modal",{"present":[64],"dismiss":[64]}]]],["pwa-toast.cjs",[[1,"pwa-toast",{"message":[1],"duration":[2],"closing":[32]}]]],["pwa-camera.cjs",[[1,"pwa-camera",{"facingMode":[1,"facing-mode"],"onPhoto":[16],"photo":[32],"photoSrc":[32],"showShutterOverlay":[32],"flashIndex":[32]}]]],["pwa-camera-modal-instance.cjs",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]], { resourcesUrl }); | ||
}); |
@@ -9,3 +9,3 @@ 'use strict'; | ||
return __chunk_1.patchEsm().then(() => { | ||
__chunk_1.bootstrapLazy([["pwa-camera-modal.cjs",[[1,"pwa-camera-modal",{"present":[64],"dismiss":[64]}]]],["pwa-toast.cjs",[[1,"pwa-toast",{"message":[1],"duration":[2],"closing":[32]}]]],["pwa-camera.cjs",[[1,"pwa-camera",{"facingMode":[1,"facing-mode"],"onPhoto":[16],"photo":[32],"photoSrc":[32],"showShutterOverlay":[32],"flashIndex":[32],"cameraError":[32],"cameraErrorString":[32]}]]],["pwa-camera-modal-instance.cjs",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]], options); | ||
__chunk_1.bootstrapLazy([["pwa-camera-modal.cjs",[[1,"pwa-camera-modal",{"present":[64],"dismiss":[64]}]]],["pwa-toast.cjs",[[1,"pwa-toast",{"message":[1],"duration":[2],"closing":[32]}]]],["pwa-camera.cjs",[[1,"pwa-camera",{"facingMode":[1,"facing-mode"],"onPhoto":[16],"photo":[32],"photoSrc":[32],"showShutterOverlay":[32],"flashIndex":[32]}]]],["pwa-camera-modal-instance.cjs",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]], options); | ||
}); | ||
@@ -12,0 +12,0 @@ }; |
@@ -169,3 +169,2 @@ 'use strict'; | ||
this.flashIndex = 0; | ||
this.cameraError = false; | ||
// Whether the device has multiple cameras (front/back) | ||
@@ -206,4 +205,9 @@ this.hasMultipleCameras = false; | ||
async queryDevices() { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
try { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
} | ||
catch (e) { | ||
this.onPhoto(e); | ||
} | ||
} | ||
@@ -219,14 +223,5 @@ async initCamera(constraints) { | ||
catch (e) { | ||
this.cameraError = true; | ||
this.cameraErrorString = this.buildError(e); | ||
console.error(e); | ||
this.onPhoto(e); | ||
} | ||
} | ||
buildError(e) { | ||
switch (e.name) { | ||
case "DevicesNotFoundError": | ||
return "No Camera found"; | ||
} | ||
return "Unable to initialize Camera"; | ||
} | ||
async initStream(stream) { | ||
@@ -367,3 +362,3 @@ this.stream = stream; | ||
const videoStreamStyle = this.facingMode == "user" ? { transform: 'scaleX(-1)' } : {}; | ||
return (__chunk_1.h("div", { class: "camera-wrapper" }, __chunk_1.h("div", { class: "camera-header" }, __chunk_1.h("section", { class: "items" }, __chunk_1.h("div", { class: "item close", onClick: e => this.handleClose(e) }, __chunk_1.h("img", { src: this.iconExit() })), __chunk_1.h("div", { class: "item flash", onClick: e => this.handleFlashClick(e) }, this.flashModes.length > 0 && (__chunk_1.h("div", null, this.flashMode == 'off' ? __chunk_1.h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? __chunk_1.h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? __chunk_1.h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (__chunk_1.h("div", { class: "accept" }, __chunk_1.h("div", { class: "accept-image", style: { backgroundImage: `url(${this.photoSrc})` } }))), __chunk_1.h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.cameraError && (__chunk_1.h("div", { class: "error" }, this.cameraErrorString)), this.showShutterOverlay && (__chunk_1.h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (__chunk_1.h("video", { style: videoStreamStyle, ref: (el) => this.videoElement = el, autoplay: true, playsinline: true })) : (__chunk_1.h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), __chunk_1.h("canvas", { class: "offscreen-image-render", ref: e => this.offscreenCanvas = e, width: "100%", height: "100%" })), __chunk_1.h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
return (__chunk_1.h("div", { class: "camera-wrapper" }, __chunk_1.h("div", { class: "camera-header" }, __chunk_1.h("section", { class: "items" }, __chunk_1.h("div", { class: "item close", onClick: e => this.handleClose(e) }, __chunk_1.h("img", { src: this.iconExit() })), __chunk_1.h("div", { class: "item flash", onClick: e => this.handleFlashClick(e) }, this.flashModes.length > 0 && (__chunk_1.h("div", null, this.flashMode == 'off' ? __chunk_1.h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? __chunk_1.h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? __chunk_1.h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (__chunk_1.h("div", { class: "accept" }, __chunk_1.h("div", { class: "accept-image", style: { backgroundImage: `url(${this.photoSrc})` } }))), __chunk_1.h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.showShutterOverlay && (__chunk_1.h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (__chunk_1.h("video", { style: videoStreamStyle, ref: (el) => this.videoElement = el, autoplay: true, playsinline: true })) : (__chunk_1.h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), __chunk_1.h("canvas", { class: "offscreen-image-render", ref: e => this.offscreenCanvas = e, width: "100%", height: "100%" })), __chunk_1.h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
__chunk_1.h("div", { class: "shutter", onClick: (e) => this.handleShutterClick(e) }, __chunk_1.h("div", { class: "shutter-button" })), | ||
@@ -370,0 +365,0 @@ __chunk_1.h("div", { class: "rotate", onClick: (e) => this.handleRotateClick(e) }, __chunk_1.h("img", { src: this.iconReverseCamera() })), |
{ | ||
"entries": [ | ||
"components/camera-modal/camera-modal.js", | ||
"components/camera-modal/camera-modal-instance.js", | ||
"components/camera-modal/camera-modal.js", | ||
"components/toast/toast.js", | ||
@@ -6,0 +6,0 @@ "components/camera/camera.js" |
@@ -8,3 +8,2 @@ import { h } from '@stencil/core'; | ||
this.flashIndex = 0; | ||
this.cameraError = false; | ||
// Whether the device has multiple cameras (front/back) | ||
@@ -44,4 +43,9 @@ this.hasMultipleCameras = false; | ||
async queryDevices() { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
try { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
} | ||
catch (e) { | ||
this.onPhoto(e); | ||
} | ||
} | ||
@@ -57,14 +61,5 @@ async initCamera(constraints) { | ||
catch (e) { | ||
this.cameraError = true; | ||
this.cameraErrorString = this.buildError(e); | ||
console.error(e); | ||
this.onPhoto(e); | ||
} | ||
} | ||
buildError(e) { | ||
switch (e.name) { | ||
case "DevicesNotFoundError": | ||
return "No Camera found"; | ||
} | ||
return "Unable to initialize Camera"; | ||
} | ||
async initStream(stream) { | ||
@@ -220,3 +215,2 @@ this.stream = stream; | ||
h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, | ||
this.cameraError && (h("div", { class: "error" }, this.cameraErrorString)), | ||
this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), | ||
@@ -289,7 +283,5 @@ this.hasImageCapture() ? (h("video", { style: videoStreamStyle, ref: (el) => this.videoElement = el, autoplay: true, playsinline: true })) : (h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), | ||
"showShutterOverlay": {}, | ||
"flashIndex": {}, | ||
"cameraError": {}, | ||
"cameraErrorString": {} | ||
"flashIndex": {} | ||
}; } | ||
static get elementRef() { return "el"; } | ||
} |
@@ -205,3 +205,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
this.flashIndex = 0; | ||
this.cameraError = false; | ||
// Whether the device has multiple cameras (front/back) | ||
@@ -257,10 +256,17 @@ this.hasMultipleCameras = false; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var devices; | ||
var devices, e_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()]; | ||
case 0: | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()]; | ||
case 1: | ||
devices = _a.sent(); | ||
this.hasMultipleCameras = devices.filter(function (d) { return d.kind == 'videoinput'; }).length > 1; | ||
return [2 /*return*/]; | ||
return [3 /*break*/, 3]; | ||
case 2: | ||
e_1 = _a.sent(); | ||
this.onPhoto(e_1); | ||
return [3 /*break*/, 3]; | ||
case 3: return [2 /*return*/]; | ||
} | ||
@@ -272,3 +278,3 @@ }); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var stream, e_1; | ||
var stream, e_2; | ||
return __generator(this, function (_a) { | ||
@@ -289,6 +295,4 @@ switch (_a.label) { | ||
case 3: | ||
e_1 = _a.sent(); | ||
this.cameraError = true; | ||
this.cameraErrorString = this.buildError(e_1); | ||
console.error(e_1); | ||
e_2 = _a.sent(); | ||
this.onPhoto(e_2); | ||
return [3 /*break*/, 4]; | ||
@@ -300,9 +304,2 @@ case 4: return [2 /*return*/]; | ||
}; | ||
CameraPWA.prototype.buildError = function (e) { | ||
switch (e.name) { | ||
case "DevicesNotFoundError": | ||
return "No Camera found"; | ||
} | ||
return "Unable to initialize Camera"; | ||
}; | ||
CameraPWA.prototype.initStream = function (stream) { | ||
@@ -361,3 +358,3 @@ return __awaiter(this, void 0, void 0, function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var photo, e_2; | ||
var photo, e_3; | ||
return __generator(this, function (_a) { | ||
@@ -381,4 +378,4 @@ switch (_a.label) { | ||
case 4: | ||
e_2 = _a.sent(); | ||
console.error('Unable to take photo!', e_2); | ||
e_3 = _a.sent(); | ||
console.error('Unable to take photo!', e_3); | ||
return [3 /*break*/, 5]; | ||
@@ -493,3 +490,3 @@ case 5: return [2 /*return*/]; | ||
var videoStreamStyle = this.facingMode == "user" ? { transform: 'scaleX(-1)' } : {}; | ||
return (h("div", { class: "camera-wrapper" }, h("div", { class: "camera-header" }, h("section", { class: "items" }, h("div", { class: "item close", onClick: function (e) { return _this.handleClose(e); } }, h("img", { src: this.iconExit() })), h("div", { class: "item flash", onClick: function (e) { return _this.handleFlashClick(e); } }, this.flashModes.length > 0 && (h("div", null, this.flashMode == 'off' ? h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (h("div", { class: "accept" }, h("div", { class: "accept-image", style: { backgroundImage: "url(" + this.photoSrc + ")" } }))), h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.cameraError && (h("div", { class: "error" }, this.cameraErrorString)), this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (h("video", { style: videoStreamStyle, ref: function (el) { return _this.videoElement = el; }, autoplay: true, playsinline: true })) : (h("canvas", { ref: function (el) { return _this.canvasElement = el; }, width: "100%", height: "100%" })), h("canvas", { class: "offscreen-image-render", ref: function (e) { return _this.offscreenCanvas = e; }, width: "100%", height: "100%" })), h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
return (h("div", { class: "camera-wrapper" }, h("div", { class: "camera-header" }, h("section", { class: "items" }, h("div", { class: "item close", onClick: function (e) { return _this.handleClose(e); } }, h("img", { src: this.iconExit() })), h("div", { class: "item flash", onClick: function (e) { return _this.handleFlashClick(e); } }, this.flashModes.length > 0 && (h("div", null, this.flashMode == 'off' ? h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (h("div", { class: "accept" }, h("div", { class: "accept-image", style: { backgroundImage: "url(" + this.photoSrc + ")" } }))), h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (h("video", { style: videoStreamStyle, ref: function (el) { return _this.videoElement = el; }, autoplay: true, playsinline: true })) : (h("canvas", { ref: function (el) { return _this.canvasElement = el; }, width: "100%", height: "100%" })), h("canvas", { class: "offscreen-image-render", ref: function (e) { return _this.offscreenCanvas = e; }, width: "100%", height: "100%" })), h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
h("div", { class: "shutter", onClick: function (e) { return _this.handleShutterClick(e); } }, h("div", { class: "shutter-button" })), | ||
@@ -496,0 +493,0 @@ h("div", { class: "rotate", onClick: function (e) { return _this.handleRotateClick(e); } }, h("img", { src: this.iconReverseCamera() })), |
@@ -165,3 +165,2 @@ import { d as registerInstance, i as getContext, f as h, g as getElement } from './ionicpwaelements-51948158.js'; | ||
this.flashIndex = 0; | ||
this.cameraError = false; | ||
// Whether the device has multiple cameras (front/back) | ||
@@ -202,4 +201,9 @@ this.hasMultipleCameras = false; | ||
async queryDevices() { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
try { | ||
const devices = await navigator.mediaDevices.enumerateDevices(); | ||
this.hasMultipleCameras = devices.filter(d => d.kind == 'videoinput').length > 1; | ||
} | ||
catch (e) { | ||
this.onPhoto(e); | ||
} | ||
} | ||
@@ -215,14 +219,5 @@ async initCamera(constraints) { | ||
catch (e) { | ||
this.cameraError = true; | ||
this.cameraErrorString = this.buildError(e); | ||
console.error(e); | ||
this.onPhoto(e); | ||
} | ||
} | ||
buildError(e) { | ||
switch (e.name) { | ||
case "DevicesNotFoundError": | ||
return "No Camera found"; | ||
} | ||
return "Unable to initialize Camera"; | ||
} | ||
async initStream(stream) { | ||
@@ -363,3 +358,3 @@ this.stream = stream; | ||
const videoStreamStyle = this.facingMode == "user" ? { transform: 'scaleX(-1)' } : {}; | ||
return (h("div", { class: "camera-wrapper" }, h("div", { class: "camera-header" }, h("section", { class: "items" }, h("div", { class: "item close", onClick: e => this.handleClose(e) }, h("img", { src: this.iconExit() })), h("div", { class: "item flash", onClick: e => this.handleFlashClick(e) }, this.flashModes.length > 0 && (h("div", null, this.flashMode == 'off' ? h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (h("div", { class: "accept" }, h("div", { class: "accept-image", style: { backgroundImage: `url(${this.photoSrc})` } }))), h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.cameraError && (h("div", { class: "error" }, this.cameraErrorString)), this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (h("video", { style: videoStreamStyle, ref: (el) => this.videoElement = el, autoplay: true, playsinline: true })) : (h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), h("canvas", { class: "offscreen-image-render", ref: e => this.offscreenCanvas = e, width: "100%", height: "100%" })), h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
return (h("div", { class: "camera-wrapper" }, h("div", { class: "camera-header" }, h("section", { class: "items" }, h("div", { class: "item close", onClick: e => this.handleClose(e) }, h("img", { src: this.iconExit() })), h("div", { class: "item flash", onClick: e => this.handleFlashClick(e) }, this.flashModes.length > 0 && (h("div", null, this.flashMode == 'off' ? h("img", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? h("img", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? h("img", { src: this.iconFlashOn() }) : ''))))), this.photo && (h("div", { class: "accept" }, h("div", { class: "accept-image", style: { backgroundImage: `url(${this.photoSrc})` } }))), h("div", { class: "camera-video", style: { display: this.photo ? 'none' : '' } }, this.showShutterOverlay && (h("div", { class: "shutter-overlay" })), this.hasImageCapture() ? (h("video", { style: videoStreamStyle, ref: (el) => this.videoElement = el, autoplay: true, playsinline: true })) : (h("canvas", { ref: (el) => this.canvasElement = el, width: "100%", height: "100%" })), h("canvas", { class: "offscreen-image-render", ref: e => this.offscreenCanvas = e, width: "100%", height: "100%" })), h("div", { class: "camera-footer" }, !this.photo ? ([ | ||
h("div", { class: "shutter", onClick: (e) => this.handleShutterClick(e) }, h("div", { class: "shutter-button" })), | ||
@@ -366,0 +361,0 @@ h("div", { class: "rotate", onClick: (e) => this.handleRotateClick(e) }, h("img", { src: this.iconReverseCamera() })), |
@@ -1,1 +0,1 @@ | ||
import{a,b as r}from"./p-7a741ef8.js";a().then(a=>r([["p-biwru87b",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-fdm4yntq",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-dp4kxc5o",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32],cameraError:[32],cameraErrorString:[32]}]]],["p-ctbsxitn",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]],{resourcesUrl:a})); | ||
import{a,b as e}from"./p-7a741ef8.js";a().then(a=>e([["p-biwru87b",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-fdm4yntq",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-xgtgrjtl",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32]}]]],["p-ctbsxitn",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]],{resourcesUrl:a})); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-645e30f2.system.js"],function(){"use strict";var e,s;return{setters:[function(r){e=r.a,s=r.b}],execute:function(){e().then(function(e){return s([["p-bme9uj1c.system",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-v8lbilsw.system",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-aicorf8s.system",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32],cameraError:[32],cameraErrorString:[32]}]]],["p-imy1opd9.system",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]],{resourcesUrl:e})})}}}); | ||
System.register(["./p-645e30f2.system.js"],function(){"use strict";var e,s;return{setters:[function(t){e=t.a,s=t.b}],execute:function(){e().then(function(e){return s([["p-bme9uj1c.system",[[1,"pwa-camera-modal",{present:[64],dismiss:[64]}]]],["p-v8lbilsw.system",[[1,"pwa-toast",{message:[1],duration:[2],closing:[32]}]]],["p-vk2eb5zb.system",[[1,"pwa-camera",{facingMode:[1,"facing-mode"],onPhoto:[16],photo:[32],photoSrc:[32],showShutterOverlay:[32],flashIndex:[32]}]]],["p-imy1opd9.system",[[1,"pwa-camera-modal-instance",null,[[32,"keyup","handleBackdropKeyUp"]]]]]],{resourcesUrl:e})})}}}); |
@@ -12,4 +12,2 @@ import { FlashMode } from '../../definitions'; | ||
flashIndex: number; | ||
cameraError: boolean; | ||
cameraErrorString: any; | ||
offscreenCanvas: HTMLCanvasElement; | ||
@@ -33,3 +31,2 @@ defaultConstraints: any; | ||
initCamera(constraints?: MediaStreamConstraints): Promise<void>; | ||
buildError(e: any): "No Camera found" | "Unable to initialize Camera"; | ||
initStream(stream: MediaStream): Promise<void>; | ||
@@ -36,0 +33,0 @@ initPhotoCapabilities(imageCapture: any): Promise<void>; |
{ | ||
"name": "@ionic/pwa-elements", | ||
"version": "1.2.7", | ||
"version": "1.3.0", | ||
"description": "Stencil Component Starter", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# Ionic Elements for Progressive Web Apps | ||
This project is a growing collection of pre-built UI experiences for Web APIs such as camera/video, focused on building Progressive Web Apps that meet and exceed native mobile app experiences. | ||
This project is a growing collection of pre-built UI experiences for Web APIs such | ||
as camera/video, focused on building Progressive Web Apps that meet and exceed | ||
native mobile app experiences. | ||
These elements are a key part of our mission to build the [Progressive Web App OS](https://medium.com/@maxlynch/building-the-progressive-web-app-os-57daebcb69c1) by providing awesome UIs on top of low-level Web APIs. | ||
These elements are a key part of our mission to build the [Progressive Web App OS](https://medium.com/@maxlynch/building-the-progressive-web-app-os-57daebcb69c1) | ||
by providing awesome UIs on top of low-level Web APIs. | ||
These components are built as Web Components that can be used in any web app, using the power of [Stencil JS](http://stenciljs.com/). | ||
These components are built as Web Components that can be used in any web app, using | ||
the power of [Stencil JS](http://stenciljs.com/). | ||
## Currently Supported | ||
Currently, the project offers a quality in-app Camera experience using `getUserMedia`, with support for multiple cameras and with automatic handling of image data. | ||
Currently, the project offers a quality in-app Camera experience using | ||
`getUserMedia`, with support for multiple cameras and with automatic handling | ||
of image data. | ||
See [the provided example](https://github.com/ionic-team/ionic-pwa-elements/blob/master/src/index.html) for an example of how to use these components. | ||
See [the provided example](https://github.com/ionic-team/ionic-pwa-elements/blob/master/src/index.html) | ||
for an example of how to use these components. | ||
## Capacitor Usage | ||
Ionic PWA Elements were built primarily for developers using [Capacitor](http://capacitor.ionicframework.com/), our Native app container that allows web apps to run on nearly every platform with consistent APIs. | ||
Ionic PWA Elements were built primarily for developers using [Capacitor](http://capacitor.ionicframework.com/), | ||
our Native app container that allows web apps to run on nearly every platform | ||
with consistent APIs. | ||
Ionic PWA Elements offer web-UI experiences for Capacitor apps running in a browser as PWA, such that the API is identical for the PWA and the native app store app. | ||
Ionic PWA Elements offer web-UI experiences for Capacitor apps running in a browser | ||
as PWA, such that the API is identical for the PWA and the native app store app. | ||
See the [Capacitor PWA Elements](https://capacitor.ionicframework.com/docs/getting-started/pwa-elements/) page for more information on using this library in your Capacitor apps. | ||
See the [Capacitor PWA Elements](https://capacitor.ionicframework.com/docs/pwa-elements) | ||
page for more information on using this library in your Capacitor apps. |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33
803934
13610
9