@angular-helpers/browser-web-apis 21.1.0 → 21.3.0
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/README.es.md +523 -2
- package/README.md +579 -2
- package/fesm2022/angular-helpers-browser-web-apis.mjs +1990 -3
- package/package.json +1 -1
- package/types/angular-helpers-browser-web-apis.d.ts +864 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { DestroyRef, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { DestroyRef, ElementRef, Signal, EnvironmentProviders } from '@angular/core';
|
|
4
4
|
import { CanActivateFn } from '@angular/router';
|
|
5
5
|
|
|
6
6
|
type PermissionNameExt = PermissionName | 'clipboard-read' | 'clipboard-write';
|
|
@@ -126,7 +126,7 @@ declare class ClipboardService extends BrowserApiBaseService {
|
|
|
126
126
|
static ɵprov: i0.ɵɵInjectableDeclaration<ClipboardService>;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
type BrowserCapabilityId = 'permissions' | 'geolocation' | 'clipboard' | 'notification' | 'mediaDevices' | 'camera' | 'webWorker' | 'regexSecurity' | 'webStorage' | 'webShare' | 'battery' | 'webSocket';
|
|
129
|
+
type BrowserCapabilityId = 'permissions' | 'geolocation' | 'clipboard' | 'notification' | 'mediaDevices' | 'camera' | 'webWorker' | 'regexSecurity' | 'webStorage' | 'webShare' | 'battery' | 'webSocket' | 'intersectionObserver' | 'resizeObserver' | 'pageVisibility' | 'broadcastChannel' | 'networkInformation' | 'screenWakeLock' | 'screenOrientation' | 'fullscreen' | 'fileSystemAccess' | 'mediaRecorder' | 'serverSentEvents' | 'vibration' | 'speechSynthesis' | 'mutationObserver' | 'performanceObserver' | 'idleDetector' | 'eyeDropper' | 'barcodeDetector' | 'webAudio' | 'gamepad' | 'webBluetooth' | 'webUsb' | 'webNfc' | 'paymentRequest' | 'credentialManagement';
|
|
130
130
|
declare class BrowserCapabilityService {
|
|
131
131
|
getCapabilities(): readonly [{
|
|
132
132
|
readonly id: "permissions";
|
|
@@ -176,12 +176,112 @@ declare class BrowserCapabilityService {
|
|
|
176
176
|
readonly id: "webSocket";
|
|
177
177
|
readonly label: "WebSocket API";
|
|
178
178
|
readonly requiresSecureContext: false;
|
|
179
|
+
}, {
|
|
180
|
+
readonly id: "intersectionObserver";
|
|
181
|
+
readonly label: "Intersection Observer";
|
|
182
|
+
readonly requiresSecureContext: false;
|
|
183
|
+
}, {
|
|
184
|
+
readonly id: "resizeObserver";
|
|
185
|
+
readonly label: "Resize Observer";
|
|
186
|
+
readonly requiresSecureContext: false;
|
|
187
|
+
}, {
|
|
188
|
+
readonly id: "pageVisibility";
|
|
189
|
+
readonly label: "Page Visibility API";
|
|
190
|
+
readonly requiresSecureContext: false;
|
|
191
|
+
}, {
|
|
192
|
+
readonly id: "broadcastChannel";
|
|
193
|
+
readonly label: "Broadcast Channel API";
|
|
194
|
+
readonly requiresSecureContext: false;
|
|
195
|
+
}, {
|
|
196
|
+
readonly id: "networkInformation";
|
|
197
|
+
readonly label: "Network Information API";
|
|
198
|
+
readonly requiresSecureContext: false;
|
|
199
|
+
}, {
|
|
200
|
+
readonly id: "screenWakeLock";
|
|
201
|
+
readonly label: "Screen Wake Lock API";
|
|
202
|
+
readonly requiresSecureContext: true;
|
|
203
|
+
}, {
|
|
204
|
+
readonly id: "screenOrientation";
|
|
205
|
+
readonly label: "Screen Orientation API";
|
|
206
|
+
readonly requiresSecureContext: false;
|
|
207
|
+
}, {
|
|
208
|
+
readonly id: "fullscreen";
|
|
209
|
+
readonly label: "Fullscreen API";
|
|
210
|
+
readonly requiresSecureContext: false;
|
|
211
|
+
}, {
|
|
212
|
+
readonly id: "fileSystemAccess";
|
|
213
|
+
readonly label: "File System Access API";
|
|
214
|
+
readonly requiresSecureContext: true;
|
|
215
|
+
}, {
|
|
216
|
+
readonly id: "mediaRecorder";
|
|
217
|
+
readonly label: "MediaRecorder API";
|
|
218
|
+
readonly requiresSecureContext: true;
|
|
219
|
+
}, {
|
|
220
|
+
readonly id: "serverSentEvents";
|
|
221
|
+
readonly label: "Server-Sent Events";
|
|
222
|
+
readonly requiresSecureContext: false;
|
|
223
|
+
}, {
|
|
224
|
+
readonly id: "vibration";
|
|
225
|
+
readonly label: "Vibration API";
|
|
226
|
+
readonly requiresSecureContext: false;
|
|
227
|
+
}, {
|
|
228
|
+
readonly id: "speechSynthesis";
|
|
229
|
+
readonly label: "Speech Synthesis API";
|
|
230
|
+
readonly requiresSecureContext: false;
|
|
231
|
+
}, {
|
|
232
|
+
readonly id: "mutationObserver";
|
|
233
|
+
readonly label: "Mutation Observer";
|
|
234
|
+
readonly requiresSecureContext: false;
|
|
235
|
+
}, {
|
|
236
|
+
readonly id: "performanceObserver";
|
|
237
|
+
readonly label: "Performance Observer";
|
|
238
|
+
readonly requiresSecureContext: false;
|
|
239
|
+
}, {
|
|
240
|
+
readonly id: "idleDetector";
|
|
241
|
+
readonly label: "Idle Detection API";
|
|
242
|
+
readonly requiresSecureContext: true;
|
|
243
|
+
}, {
|
|
244
|
+
readonly id: "eyeDropper";
|
|
245
|
+
readonly label: "EyeDropper API";
|
|
246
|
+
readonly requiresSecureContext: true;
|
|
247
|
+
}, {
|
|
248
|
+
readonly id: "barcodeDetector";
|
|
249
|
+
readonly label: "Barcode Detection API";
|
|
250
|
+
readonly requiresSecureContext: true;
|
|
251
|
+
}, {
|
|
252
|
+
readonly id: "webAudio";
|
|
253
|
+
readonly label: "Web Audio API";
|
|
254
|
+
readonly requiresSecureContext: false;
|
|
255
|
+
}, {
|
|
256
|
+
readonly id: "gamepad";
|
|
257
|
+
readonly label: "Gamepad API";
|
|
258
|
+
readonly requiresSecureContext: true;
|
|
259
|
+
}, {
|
|
260
|
+
readonly id: "webBluetooth";
|
|
261
|
+
readonly label: "Web Bluetooth API";
|
|
262
|
+
readonly requiresSecureContext: true;
|
|
263
|
+
}, {
|
|
264
|
+
readonly id: "webUsb";
|
|
265
|
+
readonly label: "WebUSB API";
|
|
266
|
+
readonly requiresSecureContext: true;
|
|
267
|
+
}, {
|
|
268
|
+
readonly id: "webNfc";
|
|
269
|
+
readonly label: "Web NFC API";
|
|
270
|
+
readonly requiresSecureContext: true;
|
|
271
|
+
}, {
|
|
272
|
+
readonly id: "paymentRequest";
|
|
273
|
+
readonly label: "Payment Request API";
|
|
274
|
+
readonly requiresSecureContext: true;
|
|
275
|
+
}, {
|
|
276
|
+
readonly id: "credentialManagement";
|
|
277
|
+
readonly label: "Credential Management API";
|
|
278
|
+
readonly requiresSecureContext: true;
|
|
179
279
|
}];
|
|
180
280
|
isSecureContext(): boolean;
|
|
181
281
|
isSupported(capability: BrowserCapabilityId): boolean;
|
|
182
282
|
getAllStatuses(): {
|
|
183
|
-
id: "camera" | "geolocation" | "permissions" | "mediaDevices" | "clipboard" | "notification" | "webWorker" | "regexSecurity" | "webStorage" | "webShare" | "battery" | "webSocket";
|
|
184
|
-
label: "Permissions API" | "Geolocation API" | "Clipboard API" | "Notification API" | "MediaDevices API" | "Camera API" | "Web Worker API" | "Regex Security" | "Web Storage" | "Web Share" | "Battery API" | "WebSocket API";
|
|
283
|
+
id: "camera" | "geolocation" | "permissions" | "mediaDevices" | "clipboard" | "notification" | "webWorker" | "regexSecurity" | "webStorage" | "webShare" | "battery" | "webSocket" | "intersectionObserver" | "resizeObserver" | "pageVisibility" | "broadcastChannel" | "networkInformation" | "screenWakeLock" | "screenOrientation" | "fullscreen" | "fileSystemAccess" | "mediaRecorder" | "serverSentEvents" | "vibration" | "speechSynthesis" | "mutationObserver" | "performanceObserver" | "idleDetector" | "eyeDropper" | "barcodeDetector" | "webAudio" | "gamepad" | "webBluetooth" | "webUsb" | "webNfc" | "paymentRequest" | "credentialManagement";
|
|
284
|
+
label: "Permissions API" | "Geolocation API" | "Clipboard API" | "Notification API" | "MediaDevices API" | "Camera API" | "Web Worker API" | "Regex Security" | "Web Storage" | "Web Share" | "Battery API" | "WebSocket API" | "Intersection Observer" | "Resize Observer" | "Page Visibility API" | "Broadcast Channel API" | "Network Information API" | "Screen Wake Lock API" | "Screen Orientation API" | "Fullscreen API" | "File System Access API" | "MediaRecorder API" | "Server-Sent Events" | "Vibration API" | "Speech Synthesis API" | "Mutation Observer" | "Performance Observer" | "Idle Detection API" | "EyeDropper API" | "Barcode Detection API" | "Web Audio API" | "Gamepad API" | "Web Bluetooth API" | "WebUSB API" | "Web NFC API" | "Payment Request API" | "Credential Management API";
|
|
185
285
|
supported: boolean;
|
|
186
286
|
secureContext: boolean;
|
|
187
287
|
requiresSecureContext: boolean;
|
|
@@ -256,6 +356,11 @@ type BrowserError = Error & {
|
|
|
256
356
|
type EventHandler<T = Event> = (event: T) => void;
|
|
257
357
|
type StorageValue = string | number | boolean | object | null;
|
|
258
358
|
type ErrorCallback = (error: BrowserError) => void;
|
|
359
|
+
/**
|
|
360
|
+
* Accepted element input for inject functions.
|
|
361
|
+
* Supports static elements, ElementRef, or deferred signals (e.g. from viewChild).
|
|
362
|
+
*/
|
|
363
|
+
type ElementInput = Element | ElementRef<Element> | Signal<Element | ElementRef<Element> | undefined>;
|
|
259
364
|
|
|
260
365
|
interface StorageOptions {
|
|
261
366
|
prefix?: string;
|
|
@@ -387,6 +492,632 @@ declare class WebWorkerService extends BrowserApiBaseService {
|
|
|
387
492
|
static ɵprov: i0.ɵɵInjectableDeclaration<WebWorkerService>;
|
|
388
493
|
}
|
|
389
494
|
|
|
495
|
+
interface IntersectionObserverOptions {
|
|
496
|
+
root?: Element | Document | null;
|
|
497
|
+
rootMargin?: string;
|
|
498
|
+
threshold?: number | number[];
|
|
499
|
+
}
|
|
500
|
+
declare class IntersectionObserverService {
|
|
501
|
+
private readonly platformId;
|
|
502
|
+
isSupported(): boolean;
|
|
503
|
+
observe(element: Element, options?: IntersectionObserverOptions): Observable<IntersectionObserverEntry[]>;
|
|
504
|
+
observeVisibility(element: Element, options?: IntersectionObserverOptions): Observable<boolean>;
|
|
505
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntersectionObserverService, never>;
|
|
506
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<IntersectionObserverService>;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
interface ResizeObserverOptions {
|
|
510
|
+
box?: ResizeObserverBoxOptions;
|
|
511
|
+
}
|
|
512
|
+
interface ElementSize {
|
|
513
|
+
width: number;
|
|
514
|
+
height: number;
|
|
515
|
+
inlineSize: number;
|
|
516
|
+
blockSize: number;
|
|
517
|
+
}
|
|
518
|
+
declare class ResizeObserverService {
|
|
519
|
+
private readonly platformId;
|
|
520
|
+
isSupported(): boolean;
|
|
521
|
+
observe(element: Element, options?: ResizeObserverOptions): Observable<ResizeObserverEntry[]>;
|
|
522
|
+
observeSize(element: Element, options?: ResizeObserverOptions): Observable<ElementSize>;
|
|
523
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeObserverService, never>;
|
|
524
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResizeObserverService>;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
type VisibilityState = 'visible' | 'hidden' | 'prerender';
|
|
528
|
+
declare class PageVisibilityService {
|
|
529
|
+
private readonly platformId;
|
|
530
|
+
isSupported(): boolean;
|
|
531
|
+
get isHidden(): boolean;
|
|
532
|
+
get visibilityState(): VisibilityState;
|
|
533
|
+
watch(): Observable<VisibilityState>;
|
|
534
|
+
watchVisibility(): Observable<boolean>;
|
|
535
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageVisibilityService, never>;
|
|
536
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PageVisibilityService>;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
declare class BroadcastChannelService {
|
|
540
|
+
private readonly destroyRef;
|
|
541
|
+
private readonly platformId;
|
|
542
|
+
private channels;
|
|
543
|
+
isSupported(): boolean;
|
|
544
|
+
private ensureSupport;
|
|
545
|
+
open<T = unknown>(name: string): Observable<T>;
|
|
546
|
+
post<T = unknown>(name: string, data: T): void;
|
|
547
|
+
close(name: string): void;
|
|
548
|
+
closeAll(): void;
|
|
549
|
+
getOpenChannels(): string[];
|
|
550
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastChannelService, never>;
|
|
551
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BroadcastChannelService>;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
type ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
|
|
555
|
+
type EffectiveConnectionType = 'slow-2g' | '2g' | '3g' | '4g';
|
|
556
|
+
interface NetworkInformation {
|
|
557
|
+
type?: ConnectionType;
|
|
558
|
+
effectiveType?: EffectiveConnectionType;
|
|
559
|
+
downlink?: number;
|
|
560
|
+
downlinkMax?: number;
|
|
561
|
+
rtt?: number;
|
|
562
|
+
saveData?: boolean;
|
|
563
|
+
online: boolean;
|
|
564
|
+
}
|
|
565
|
+
declare class NetworkInformationService {
|
|
566
|
+
private readonly platformId;
|
|
567
|
+
isSupported(): boolean;
|
|
568
|
+
getSnapshot(): NetworkInformation;
|
|
569
|
+
watch(): Observable<NetworkInformation>;
|
|
570
|
+
get isOnline(): boolean;
|
|
571
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NetworkInformationService, never>;
|
|
572
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NetworkInformationService>;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
type WakeLockType = 'screen';
|
|
576
|
+
interface WakeLockStatus {
|
|
577
|
+
active: boolean;
|
|
578
|
+
type?: WakeLockType;
|
|
579
|
+
released?: boolean;
|
|
580
|
+
}
|
|
581
|
+
declare class ScreenWakeLockService extends BrowserApiBaseService {
|
|
582
|
+
private sentinel;
|
|
583
|
+
protected getApiName(): string;
|
|
584
|
+
isSupported(): boolean;
|
|
585
|
+
get isActive(): boolean;
|
|
586
|
+
request(type?: WakeLockType): Promise<WakeLockStatus>;
|
|
587
|
+
release(): Promise<void>;
|
|
588
|
+
watchStatus(): Observable<WakeLockStatus>;
|
|
589
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScreenWakeLockService, never>;
|
|
590
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenWakeLockService>;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
type OrientationType = 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary';
|
|
594
|
+
type OrientationLockType = 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary';
|
|
595
|
+
interface OrientationInfo {
|
|
596
|
+
type: OrientationType;
|
|
597
|
+
angle: number;
|
|
598
|
+
}
|
|
599
|
+
declare class ScreenOrientationService {
|
|
600
|
+
private readonly platformId;
|
|
601
|
+
isSupported(): boolean;
|
|
602
|
+
getSnapshot(): OrientationInfo;
|
|
603
|
+
get isPortrait(): boolean;
|
|
604
|
+
get isLandscape(): boolean;
|
|
605
|
+
watch(): Observable<OrientationInfo>;
|
|
606
|
+
lock(orientation: OrientationLockType): Promise<void>;
|
|
607
|
+
unlock(): void;
|
|
608
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScreenOrientationService, never>;
|
|
609
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenOrientationService>;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
declare class FullscreenService {
|
|
613
|
+
private readonly destroyRef;
|
|
614
|
+
private readonly platformId;
|
|
615
|
+
isSupported(): boolean;
|
|
616
|
+
get isFullscreen(): boolean;
|
|
617
|
+
get fullscreenElement(): Element | null;
|
|
618
|
+
request(element?: Element): Promise<void>;
|
|
619
|
+
exit(): Promise<void>;
|
|
620
|
+
toggle(element?: Element): Promise<void>;
|
|
621
|
+
watch(): Observable<boolean>;
|
|
622
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FullscreenService, never>;
|
|
623
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FullscreenService>;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
interface FileOpenOptions {
|
|
627
|
+
multiple?: boolean;
|
|
628
|
+
excludeAcceptAllOption?: boolean;
|
|
629
|
+
types?: Array<{
|
|
630
|
+
description?: string;
|
|
631
|
+
accept: Record<string, string[]>;
|
|
632
|
+
}>;
|
|
633
|
+
}
|
|
634
|
+
interface FileSaveOptions {
|
|
635
|
+
suggestedName?: string;
|
|
636
|
+
excludeAcceptAllOption?: boolean;
|
|
637
|
+
types?: Array<{
|
|
638
|
+
description?: string;
|
|
639
|
+
accept: Record<string, string[]>;
|
|
640
|
+
}>;
|
|
641
|
+
}
|
|
642
|
+
declare class FileSystemAccessService extends BrowserApiBaseService {
|
|
643
|
+
protected getApiName(): string;
|
|
644
|
+
isSupported(): boolean;
|
|
645
|
+
private get win();
|
|
646
|
+
private ensureSupport;
|
|
647
|
+
openFile(options?: FileOpenOptions): Promise<File[]>;
|
|
648
|
+
saveFile(content: string | Blob, options?: FileSaveOptions): Promise<void>;
|
|
649
|
+
openDirectory(options?: {
|
|
650
|
+
id?: string;
|
|
651
|
+
mode?: 'read' | 'readwrite';
|
|
652
|
+
startIn?: string;
|
|
653
|
+
}): Promise<FileSystemDirectoryHandle | null>;
|
|
654
|
+
readFileAsText(file: File): Promise<string>;
|
|
655
|
+
readFileAsArrayBuffer(file: File): Promise<ArrayBuffer>;
|
|
656
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSystemAccessService, never>;
|
|
657
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FileSystemAccessService>;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
type RecordingState = 'inactive' | 'recording' | 'paused';
|
|
661
|
+
interface RecordingOptions {
|
|
662
|
+
mimeType?: string;
|
|
663
|
+
audioBitsPerSecond?: number;
|
|
664
|
+
videoBitsPerSecond?: number;
|
|
665
|
+
bitsPerSecond?: number;
|
|
666
|
+
timeslice?: number;
|
|
667
|
+
}
|
|
668
|
+
interface RecordingResult {
|
|
669
|
+
blob: Blob;
|
|
670
|
+
url: string;
|
|
671
|
+
mimeType: string;
|
|
672
|
+
duration: number;
|
|
673
|
+
}
|
|
674
|
+
declare class MediaRecorderService extends BrowserApiBaseService {
|
|
675
|
+
private recorder;
|
|
676
|
+
private chunks;
|
|
677
|
+
private startTime;
|
|
678
|
+
private readonly dataSubject;
|
|
679
|
+
private readonly stateSubject;
|
|
680
|
+
protected getApiName(): string;
|
|
681
|
+
isSupported(): boolean;
|
|
682
|
+
get state(): RecordingState;
|
|
683
|
+
static isTypeSupported(mimeType: string): boolean;
|
|
684
|
+
watchState(): Observable<RecordingState>;
|
|
685
|
+
watchData(): Observable<Blob>;
|
|
686
|
+
start(stream: MediaStream, options?: RecordingOptions): Promise<void>;
|
|
687
|
+
pause(): void;
|
|
688
|
+
resume(): void;
|
|
689
|
+
stop(): RecordingResult | null;
|
|
690
|
+
getResult(): RecordingResult | null;
|
|
691
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaRecorderService, never>;
|
|
692
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MediaRecorderService>;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
type SSEConnectionState = 'connecting' | 'open' | 'closed';
|
|
696
|
+
interface SSEMessage<T = unknown> {
|
|
697
|
+
data: T;
|
|
698
|
+
type: string;
|
|
699
|
+
lastEventId: string;
|
|
700
|
+
origin: string;
|
|
701
|
+
}
|
|
702
|
+
interface SSEConfig {
|
|
703
|
+
withCredentials?: boolean;
|
|
704
|
+
eventTypes?: string[];
|
|
705
|
+
}
|
|
706
|
+
declare class ServerSentEventsService {
|
|
707
|
+
private readonly destroyRef;
|
|
708
|
+
private readonly platformId;
|
|
709
|
+
private sources;
|
|
710
|
+
isSupported(): boolean;
|
|
711
|
+
private ensureSupport;
|
|
712
|
+
connect<T = unknown>(url: string, config?: SSEConfig): Observable<SSEMessage<T>>;
|
|
713
|
+
disconnect(url: string): void;
|
|
714
|
+
disconnectAll(): void;
|
|
715
|
+
getState(url: string): SSEConnectionState;
|
|
716
|
+
getActiveConnections(): string[];
|
|
717
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ServerSentEventsService, never>;
|
|
718
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ServerSentEventsService>;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
type VibrationPattern = number | number[];
|
|
722
|
+
interface VibrationPreset {
|
|
723
|
+
success: VibrationPattern;
|
|
724
|
+
error: VibrationPattern;
|
|
725
|
+
notification: VibrationPattern;
|
|
726
|
+
doubleTap: VibrationPattern;
|
|
727
|
+
}
|
|
728
|
+
declare class VibrationService {
|
|
729
|
+
private readonly platformId;
|
|
730
|
+
readonly presets: VibrationPreset;
|
|
731
|
+
isSupported(): boolean;
|
|
732
|
+
vibrate(pattern?: VibrationPattern): boolean;
|
|
733
|
+
success(): boolean;
|
|
734
|
+
error(): boolean;
|
|
735
|
+
notification(): boolean;
|
|
736
|
+
doubleTap(): boolean;
|
|
737
|
+
stop(): boolean;
|
|
738
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VibrationService, never>;
|
|
739
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VibrationService>;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
type SpeechState = 'idle' | 'speaking' | 'paused';
|
|
743
|
+
interface SpeechOptions {
|
|
744
|
+
lang?: string;
|
|
745
|
+
voice?: SpeechSynthesisVoice;
|
|
746
|
+
volume?: number;
|
|
747
|
+
rate?: number;
|
|
748
|
+
pitch?: number;
|
|
749
|
+
}
|
|
750
|
+
declare class SpeechSynthesisService {
|
|
751
|
+
private readonly destroyRef;
|
|
752
|
+
private readonly platformId;
|
|
753
|
+
isSupported(): boolean;
|
|
754
|
+
private ensureSupport;
|
|
755
|
+
get state(): SpeechState;
|
|
756
|
+
get isPending(): boolean;
|
|
757
|
+
getVoices(): SpeechSynthesisVoice[];
|
|
758
|
+
watchVoices(): Observable<SpeechSynthesisVoice[]>;
|
|
759
|
+
speak(text: string, options?: SpeechOptions): Observable<SpeechState>;
|
|
760
|
+
pause(): void;
|
|
761
|
+
resume(): void;
|
|
762
|
+
cancel(): void;
|
|
763
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpeechSynthesisService, never>;
|
|
764
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SpeechSynthesisService>;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
interface MutationObserverOptions {
|
|
768
|
+
childList?: boolean;
|
|
769
|
+
attributes?: boolean;
|
|
770
|
+
characterData?: boolean;
|
|
771
|
+
subtree?: boolean;
|
|
772
|
+
attributeOldValue?: boolean;
|
|
773
|
+
characterDataOldValue?: boolean;
|
|
774
|
+
attributeFilter?: string[];
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
declare class MutationObserverService {
|
|
778
|
+
private readonly platformId;
|
|
779
|
+
isSupported(): boolean;
|
|
780
|
+
observe(target: Node, options?: MutationObserverOptions): Observable<MutationRecord[]>;
|
|
781
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MutationObserverService, never>;
|
|
782
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MutationObserverService>;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
type PerformanceEntryType = 'element' | 'event' | 'first-input' | 'largest-contentful-paint' | 'layout-shift' | 'longtask' | 'mark' | 'measure' | 'navigation' | 'paint' | 'resource' | 'visibility-state';
|
|
786
|
+
interface PerformanceObserverConfig {
|
|
787
|
+
entryTypes?: PerformanceEntryType[];
|
|
788
|
+
type?: PerformanceEntryType;
|
|
789
|
+
buffered?: boolean;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
declare class PerformanceObserverService {
|
|
793
|
+
private readonly platformId;
|
|
794
|
+
isSupported(): boolean;
|
|
795
|
+
observe(config: PerformanceObserverConfig): Observable<PerformanceEntryList>;
|
|
796
|
+
observeByType(type: PerformanceEntryType, buffered?: boolean): Observable<PerformanceEntryList>;
|
|
797
|
+
getSupportedEntryTypes(): PerformanceEntryType[];
|
|
798
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PerformanceObserverService, never>;
|
|
799
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PerformanceObserverService>;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
type UserIdleState = 'active' | 'idle';
|
|
803
|
+
type ScreenIdleState = 'locked' | 'unlocked';
|
|
804
|
+
interface IdleState {
|
|
805
|
+
user: UserIdleState;
|
|
806
|
+
screen: ScreenIdleState;
|
|
807
|
+
}
|
|
808
|
+
interface IdleDetectorOptions {
|
|
809
|
+
threshold?: number;
|
|
810
|
+
}
|
|
811
|
+
declare class IdleDetectorService {
|
|
812
|
+
private readonly platformId;
|
|
813
|
+
isSupported(): boolean;
|
|
814
|
+
requestPermission(): Promise<PermissionState>;
|
|
815
|
+
watch(options?: IdleDetectorOptions): Observable<IdleState>;
|
|
816
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IdleDetectorService, never>;
|
|
817
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<IdleDetectorService>;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
interface ColorSelectionResult {
|
|
821
|
+
sRGBHex: string;
|
|
822
|
+
}
|
|
823
|
+
declare class EyeDropperService {
|
|
824
|
+
private readonly platformId;
|
|
825
|
+
isSupported(): boolean;
|
|
826
|
+
open(signal?: AbortSignal): Promise<ColorSelectionResult>;
|
|
827
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EyeDropperService, never>;
|
|
828
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EyeDropperService>;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
type BarcodeFormat = 'aztec' | 'code_128' | 'code_39' | 'code_93' | 'codabar' | 'data_matrix' | 'ean_13' | 'ean_8' | 'itf' | 'pdf417' | 'qr_code' | 'upc_a' | 'upc_e' | 'unknown';
|
|
832
|
+
interface DetectedBarcode {
|
|
833
|
+
boundingBox: DOMRectReadOnly;
|
|
834
|
+
cornerPoints: ReadonlyArray<{
|
|
835
|
+
x: number;
|
|
836
|
+
y: number;
|
|
837
|
+
}>;
|
|
838
|
+
format: BarcodeFormat;
|
|
839
|
+
rawValue: string;
|
|
840
|
+
}
|
|
841
|
+
declare class BarcodeDetectorService {
|
|
842
|
+
private readonly platformId;
|
|
843
|
+
isSupported(): boolean;
|
|
844
|
+
getSupportedFormats(): Promise<BarcodeFormat[]>;
|
|
845
|
+
detect(image: ImageBitmapSource, formats?: BarcodeFormat[]): Promise<DetectedBarcode[]>;
|
|
846
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BarcodeDetectorService, never>;
|
|
847
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BarcodeDetectorService>;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
type AudioContextState = 'suspended' | 'running' | 'closed';
|
|
851
|
+
interface AudioAnalyserData {
|
|
852
|
+
frequencyData: Uint8Array;
|
|
853
|
+
timeDomainData: Uint8Array;
|
|
854
|
+
}
|
|
855
|
+
declare class WebAudioService {
|
|
856
|
+
private readonly platformId;
|
|
857
|
+
private readonly destroyRef;
|
|
858
|
+
private context;
|
|
859
|
+
isSupported(): boolean;
|
|
860
|
+
getContext(): AudioContext;
|
|
861
|
+
resume(): Promise<void>;
|
|
862
|
+
close(): Promise<void>;
|
|
863
|
+
getState(): AudioContextState;
|
|
864
|
+
createOscillator(type?: OscillatorType, frequency?: number): OscillatorNode;
|
|
865
|
+
createGain(value?: number): GainNode;
|
|
866
|
+
createAnalyser(fftSize?: number): AnalyserNode;
|
|
867
|
+
watchAnalyser(analyser: AnalyserNode, intervalMs?: number): Observable<AudioAnalyserData>;
|
|
868
|
+
decodeAudioData(arrayBuffer: ArrayBuffer): Promise<AudioBuffer>;
|
|
869
|
+
playBuffer(buffer: AudioBuffer, loop?: boolean): AudioBufferSourceNode;
|
|
870
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebAudioService, never>;
|
|
871
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebAudioService>;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
interface GamepadState {
|
|
875
|
+
id: string;
|
|
876
|
+
index: number;
|
|
877
|
+
connected: boolean;
|
|
878
|
+
buttons: ReadonlyArray<{
|
|
879
|
+
pressed: boolean;
|
|
880
|
+
value: number;
|
|
881
|
+
}>;
|
|
882
|
+
axes: readonly number[];
|
|
883
|
+
timestamp: number;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
declare class GamepadService {
|
|
887
|
+
private readonly platformId;
|
|
888
|
+
isSupported(): boolean;
|
|
889
|
+
getSnapshot(index: number): GamepadState | null;
|
|
890
|
+
getConnectedGamepads(): GamepadState[];
|
|
891
|
+
watchConnections(): Observable<{
|
|
892
|
+
gamepad: GamepadState;
|
|
893
|
+
type: 'connected' | 'disconnected';
|
|
894
|
+
}>;
|
|
895
|
+
poll(index: number, intervalMs?: number): Observable<GamepadState>;
|
|
896
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GamepadService, never>;
|
|
897
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GamepadService>;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
interface BluetoothRequestDeviceOptions {
|
|
901
|
+
filters?: Array<{
|
|
902
|
+
services?: string[];
|
|
903
|
+
name?: string;
|
|
904
|
+
namePrefix?: string;
|
|
905
|
+
}>;
|
|
906
|
+
optionalServices?: string[];
|
|
907
|
+
acceptAllDevices?: boolean;
|
|
908
|
+
}
|
|
909
|
+
interface BluetoothRemoteGATTServer {
|
|
910
|
+
readonly connected: boolean;
|
|
911
|
+
readonly device: BluetoothDeviceRef;
|
|
912
|
+
connect(): Promise<BluetoothRemoteGATTServer>;
|
|
913
|
+
disconnect(): void;
|
|
914
|
+
getPrimaryService(service: string): Promise<BluetoothRemoteGATTService>;
|
|
915
|
+
}
|
|
916
|
+
interface BluetoothRemoteGATTService {
|
|
917
|
+
getCharacteristic(characteristic: string): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
918
|
+
}
|
|
919
|
+
interface BluetoothRemoteGATTCharacteristic extends EventTarget {
|
|
920
|
+
readonly value: DataView | null;
|
|
921
|
+
readValue(): Promise<DataView>;
|
|
922
|
+
writeValue(value: BufferSource): Promise<void>;
|
|
923
|
+
startNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
924
|
+
stopNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
925
|
+
}
|
|
926
|
+
interface BluetoothDeviceRef extends EventTarget {
|
|
927
|
+
readonly id: string;
|
|
928
|
+
readonly name: string | undefined;
|
|
929
|
+
readonly gatt: BluetoothRemoteGATTServer | undefined;
|
|
930
|
+
}
|
|
931
|
+
interface UsbDeviceRef {
|
|
932
|
+
readonly vendorId: number;
|
|
933
|
+
readonly productId: number;
|
|
934
|
+
readonly productName: string | undefined;
|
|
935
|
+
readonly manufacturerName: string | undefined;
|
|
936
|
+
readonly serialNumber: string | undefined;
|
|
937
|
+
readonly opened: boolean;
|
|
938
|
+
open(): Promise<void>;
|
|
939
|
+
close(): Promise<void>;
|
|
940
|
+
selectConfiguration(configurationValue: number): Promise<void>;
|
|
941
|
+
claimInterface(interfaceNumber: number): Promise<void>;
|
|
942
|
+
releaseInterface(interfaceNumber: number): Promise<void>;
|
|
943
|
+
transferIn(endpointNumber: number, length: number): Promise<UsbTransferResult>;
|
|
944
|
+
transferOut(endpointNumber: number, data: BufferSource): Promise<UsbTransferResult>;
|
|
945
|
+
}
|
|
946
|
+
interface UsbTransferResult {
|
|
947
|
+
readonly data: DataView | undefined;
|
|
948
|
+
readonly status: 'ok' | 'stall' | 'babble';
|
|
949
|
+
}
|
|
950
|
+
interface UsbDeviceFilterDef {
|
|
951
|
+
vendorId?: number;
|
|
952
|
+
productId?: number;
|
|
953
|
+
classCode?: number;
|
|
954
|
+
subclassCode?: number;
|
|
955
|
+
protocolCode?: number;
|
|
956
|
+
serialNumber?: string;
|
|
957
|
+
}
|
|
958
|
+
interface NdefMessage {
|
|
959
|
+
records: NdefRecord[];
|
|
960
|
+
}
|
|
961
|
+
interface NdefRecord {
|
|
962
|
+
recordType: string;
|
|
963
|
+
mediaType?: string;
|
|
964
|
+
id?: string;
|
|
965
|
+
data?: DataView;
|
|
966
|
+
encoding?: string;
|
|
967
|
+
lang?: string;
|
|
968
|
+
}
|
|
969
|
+
interface NdefReadingEvent {
|
|
970
|
+
serialNumber: string;
|
|
971
|
+
message: NdefMessage;
|
|
972
|
+
}
|
|
973
|
+
interface NdefWriteOptions {
|
|
974
|
+
overwrite?: boolean;
|
|
975
|
+
signal?: AbortSignal;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
interface BluetoothDeviceInfo {
|
|
979
|
+
id: string;
|
|
980
|
+
name: string | undefined;
|
|
981
|
+
connected: boolean;
|
|
982
|
+
}
|
|
983
|
+
declare class WebBluetoothService {
|
|
984
|
+
private readonly platformId;
|
|
985
|
+
isSupported(): boolean;
|
|
986
|
+
requestDevice(options?: BluetoothRequestDeviceOptions): Promise<BluetoothDeviceRef>;
|
|
987
|
+
connect(device: BluetoothDeviceRef): Promise<BluetoothRemoteGATTServer>;
|
|
988
|
+
disconnect(device: BluetoothDeviceRef): void;
|
|
989
|
+
watchDisconnection(device: BluetoothDeviceRef): Observable<void>;
|
|
990
|
+
readCharacteristic(server: BluetoothRemoteGATTServer, serviceUuid: string, characteristicUuid: string): Promise<DataView>;
|
|
991
|
+
writeCharacteristic(server: BluetoothRemoteGATTServer, serviceUuid: string, characteristicUuid: string, value: BufferSource): Promise<void>;
|
|
992
|
+
watchCharacteristic(server: BluetoothRemoteGATTServer, serviceUuid: string, characteristicUuid: string): Observable<DataView>;
|
|
993
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebBluetoothService, never>;
|
|
994
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebBluetoothService>;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
interface UsbDeviceInfo {
|
|
998
|
+
vendorId: number;
|
|
999
|
+
productId: number;
|
|
1000
|
+
productName: string | undefined;
|
|
1001
|
+
manufacturerName: string | undefined;
|
|
1002
|
+
serialNumber: string | undefined;
|
|
1003
|
+
opened: boolean;
|
|
1004
|
+
}
|
|
1005
|
+
declare class WebUsbService {
|
|
1006
|
+
private readonly platformId;
|
|
1007
|
+
isSupported(): boolean;
|
|
1008
|
+
requestDevice(filters?: UsbDeviceFilterDef[]): Promise<UsbDeviceRef>;
|
|
1009
|
+
getDevices(): Promise<UsbDeviceRef[]>;
|
|
1010
|
+
open(device: UsbDeviceRef): Promise<void>;
|
|
1011
|
+
close(device: UsbDeviceRef): Promise<void>;
|
|
1012
|
+
selectConfiguration(device: UsbDeviceRef, configurationValue: number): Promise<void>;
|
|
1013
|
+
claimInterface(device: UsbDeviceRef, interfaceNumber: number): Promise<void>;
|
|
1014
|
+
releaseInterface(device: UsbDeviceRef, interfaceNumber: number): Promise<void>;
|
|
1015
|
+
transferIn(device: UsbDeviceRef, endpointNumber: number, length: number): Promise<UsbTransferResult>;
|
|
1016
|
+
transferOut(device: UsbDeviceRef, endpointNumber: number, data: BufferSource): Promise<UsbTransferResult>;
|
|
1017
|
+
watchConnection(): Observable<{
|
|
1018
|
+
device: UsbDeviceRef;
|
|
1019
|
+
type: 'connect' | 'disconnect';
|
|
1020
|
+
}>;
|
|
1021
|
+
getDeviceInfo(device: UsbDeviceRef): UsbDeviceInfo;
|
|
1022
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebUsbService, never>;
|
|
1023
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebUsbService>;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
declare class WebNfcService {
|
|
1027
|
+
private readonly platformId;
|
|
1028
|
+
isSupported(): boolean;
|
|
1029
|
+
scan(): Observable<NdefReadingEvent>;
|
|
1030
|
+
write(message: NdefMessage | string, options?: NdefWriteOptions): Promise<void>;
|
|
1031
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebNfcService, never>;
|
|
1032
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebNfcService>;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
interface PaymentMethodConfig {
|
|
1036
|
+
supportedMethods: string;
|
|
1037
|
+
data?: Record<string, unknown>;
|
|
1038
|
+
}
|
|
1039
|
+
interface PaymentDetailsInit {
|
|
1040
|
+
total: {
|
|
1041
|
+
label: string;
|
|
1042
|
+
amount: {
|
|
1043
|
+
currency: string;
|
|
1044
|
+
value: string;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
displayItems?: Array<{
|
|
1048
|
+
label: string;
|
|
1049
|
+
amount: {
|
|
1050
|
+
currency: string;
|
|
1051
|
+
value: string;
|
|
1052
|
+
};
|
|
1053
|
+
}>;
|
|
1054
|
+
}
|
|
1055
|
+
interface PaymentOptionsConfig {
|
|
1056
|
+
requestPayerName?: boolean;
|
|
1057
|
+
requestPayerEmail?: boolean;
|
|
1058
|
+
requestPayerPhone?: boolean;
|
|
1059
|
+
requestShipping?: boolean;
|
|
1060
|
+
}
|
|
1061
|
+
interface PaymentResult {
|
|
1062
|
+
methodName: string;
|
|
1063
|
+
details: Record<string, unknown>;
|
|
1064
|
+
payerName: string | null;
|
|
1065
|
+
payerEmail: string | null;
|
|
1066
|
+
payerPhone: string | null;
|
|
1067
|
+
}
|
|
1068
|
+
declare class PaymentRequestService {
|
|
1069
|
+
private readonly platformId;
|
|
1070
|
+
isSupported(): boolean;
|
|
1071
|
+
canMakePayment(methods: PaymentMethodConfig[], details: PaymentDetailsInit): Promise<boolean>;
|
|
1072
|
+
show(methods: PaymentMethodConfig[], details: PaymentDetailsInit, options?: PaymentOptionsConfig): Promise<PaymentResult>;
|
|
1073
|
+
abort(methods: PaymentMethodConfig[], details: PaymentDetailsInit): Promise<void>;
|
|
1074
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentRequestService, never>;
|
|
1075
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentRequestService>;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
interface PasswordCredentialData {
|
|
1079
|
+
id: string;
|
|
1080
|
+
password: string;
|
|
1081
|
+
name?: string;
|
|
1082
|
+
iconURL?: string;
|
|
1083
|
+
}
|
|
1084
|
+
interface PublicKeyCredentialOptions {
|
|
1085
|
+
challenge: BufferSource;
|
|
1086
|
+
rp: {
|
|
1087
|
+
name: string;
|
|
1088
|
+
id?: string;
|
|
1089
|
+
};
|
|
1090
|
+
user: {
|
|
1091
|
+
id: BufferSource;
|
|
1092
|
+
name: string;
|
|
1093
|
+
displayName: string;
|
|
1094
|
+
};
|
|
1095
|
+
pubKeyCredParams: Array<{
|
|
1096
|
+
type: 'public-key';
|
|
1097
|
+
alg: number;
|
|
1098
|
+
}>;
|
|
1099
|
+
timeout?: number;
|
|
1100
|
+
attestation?: AttestationConveyancePreference;
|
|
1101
|
+
authenticatorSelection?: AuthenticatorSelectionCriteria;
|
|
1102
|
+
}
|
|
1103
|
+
interface CredentialResult {
|
|
1104
|
+
id: string;
|
|
1105
|
+
type: string;
|
|
1106
|
+
}
|
|
1107
|
+
declare class CredentialManagementService {
|
|
1108
|
+
private readonly platformId;
|
|
1109
|
+
isSupported(): boolean;
|
|
1110
|
+
isPublicKeySupported(): boolean;
|
|
1111
|
+
get(options?: CredentialRequestOptions): Promise<Credential | null>;
|
|
1112
|
+
store(credential: Credential): Promise<void>;
|
|
1113
|
+
createPasswordCredential(data: PasswordCredentialData): Promise<Credential>;
|
|
1114
|
+
createPublicKeyCredential(options: PublicKeyCredentialOptions): Promise<Credential | null>;
|
|
1115
|
+
preventSilentAccess(): Promise<void>;
|
|
1116
|
+
isConditionalMediationAvailable(): Promise<boolean>;
|
|
1117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CredentialManagementService, never>;
|
|
1118
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CredentialManagementService>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
390
1121
|
interface MediaDevice {
|
|
391
1122
|
deviceId: string;
|
|
392
1123
|
groupId: string;
|
|
@@ -476,6 +1207,83 @@ interface GeolocationWatchOptions extends GeolocationOptions {
|
|
|
476
1207
|
maximumAge?: number;
|
|
477
1208
|
}
|
|
478
1209
|
|
|
1210
|
+
interface PageVisibilityRef {
|
|
1211
|
+
readonly state: Signal<VisibilityState>;
|
|
1212
|
+
readonly isVisible: Signal<boolean>;
|
|
1213
|
+
readonly isHidden: Signal<boolean>;
|
|
1214
|
+
}
|
|
1215
|
+
declare function injectPageVisibility(): PageVisibilityRef;
|
|
1216
|
+
|
|
1217
|
+
interface ResizeRef {
|
|
1218
|
+
readonly size: Signal<ElementSize | null>;
|
|
1219
|
+
readonly width: Signal<number>;
|
|
1220
|
+
readonly height: Signal<number>;
|
|
1221
|
+
readonly inlineSize: Signal<number>;
|
|
1222
|
+
readonly blockSize: Signal<number>;
|
|
1223
|
+
}
|
|
1224
|
+
declare function injectResizeObserver(elementOrRef: ElementInput, options?: ResizeObserverOptions): ResizeRef;
|
|
1225
|
+
|
|
1226
|
+
interface IntersectionRef {
|
|
1227
|
+
readonly isIntersecting: Signal<boolean>;
|
|
1228
|
+
readonly isVisible: Signal<boolean>;
|
|
1229
|
+
}
|
|
1230
|
+
declare function injectIntersectionObserver(elementOrRef: ElementInput, options?: IntersectionObserverOptions): IntersectionRef;
|
|
1231
|
+
|
|
1232
|
+
interface NetworkInformationRef {
|
|
1233
|
+
readonly snapshot: Signal<NetworkInformation>;
|
|
1234
|
+
readonly online: Signal<boolean>;
|
|
1235
|
+
readonly effectiveType: Signal<EffectiveConnectionType | undefined>;
|
|
1236
|
+
readonly downlink: Signal<number | undefined>;
|
|
1237
|
+
readonly rtt: Signal<number | undefined>;
|
|
1238
|
+
readonly type: Signal<ConnectionType | undefined>;
|
|
1239
|
+
readonly saveData: Signal<boolean | undefined>;
|
|
1240
|
+
}
|
|
1241
|
+
declare function injectNetworkInformation(): NetworkInformationRef;
|
|
1242
|
+
|
|
1243
|
+
interface ScreenOrientationRef {
|
|
1244
|
+
readonly orientation: Signal<OrientationInfo>;
|
|
1245
|
+
readonly type: Signal<OrientationType>;
|
|
1246
|
+
readonly angle: Signal<number>;
|
|
1247
|
+
readonly isPortrait: Signal<boolean>;
|
|
1248
|
+
readonly isLandscape: Signal<boolean>;
|
|
1249
|
+
lock(orientation: OrientationLockType): Promise<void>;
|
|
1250
|
+
unlock(): void;
|
|
1251
|
+
}
|
|
1252
|
+
declare function injectScreenOrientation(): ScreenOrientationRef;
|
|
1253
|
+
|
|
1254
|
+
interface MutationRef {
|
|
1255
|
+
readonly mutations: Signal<MutationRecord[]>;
|
|
1256
|
+
readonly mutationCount: Signal<number>;
|
|
1257
|
+
}
|
|
1258
|
+
declare function injectMutationObserver(elementOrRef: ElementInput, options?: MutationObserverOptions): MutationRef;
|
|
1259
|
+
|
|
1260
|
+
interface PerformanceObserverRef {
|
|
1261
|
+
readonly entries: Signal<PerformanceEntryList>;
|
|
1262
|
+
readonly entryCount: Signal<number>;
|
|
1263
|
+
readonly latestEntry: Signal<PerformanceEntry | undefined>;
|
|
1264
|
+
}
|
|
1265
|
+
declare function injectPerformanceObserver(config: PerformanceObserverConfig): PerformanceObserverRef;
|
|
1266
|
+
|
|
1267
|
+
interface IdleDetectorRef {
|
|
1268
|
+
readonly state: Signal<IdleState>;
|
|
1269
|
+
readonly userState: Signal<UserIdleState>;
|
|
1270
|
+
readonly screenState: Signal<ScreenIdleState>;
|
|
1271
|
+
readonly isUserIdle: Signal<boolean>;
|
|
1272
|
+
readonly isScreenLocked: Signal<boolean>;
|
|
1273
|
+
}
|
|
1274
|
+
declare function injectIdleDetector(options?: IdleDetectorOptions): IdleDetectorRef;
|
|
1275
|
+
|
|
1276
|
+
interface GamepadRef {
|
|
1277
|
+
readonly state: Signal<GamepadState | null>;
|
|
1278
|
+
readonly connected: Signal<boolean>;
|
|
1279
|
+
readonly buttons: Signal<ReadonlyArray<{
|
|
1280
|
+
pressed: boolean;
|
|
1281
|
+
value: number;
|
|
1282
|
+
}>>;
|
|
1283
|
+
readonly axes: Signal<readonly number[]>;
|
|
1284
|
+
}
|
|
1285
|
+
declare function injectGamepad(index: number, intervalMs?: number): GamepadRef;
|
|
1286
|
+
|
|
479
1287
|
declare class BrowserSupportUtil {
|
|
480
1288
|
static isSupported(feature: string): boolean;
|
|
481
1289
|
static getUnsupportedFeatures(): string[];
|
|
@@ -512,6 +1320,31 @@ interface BrowserWebApisConfig {
|
|
|
512
1320
|
enableWebStorage?: boolean;
|
|
513
1321
|
enableWebSocket?: boolean;
|
|
514
1322
|
enableWebWorker?: boolean;
|
|
1323
|
+
enableIntersectionObserver?: boolean;
|
|
1324
|
+
enableResizeObserver?: boolean;
|
|
1325
|
+
enablePageVisibility?: boolean;
|
|
1326
|
+
enableBroadcastChannel?: boolean;
|
|
1327
|
+
enableNetworkInformation?: boolean;
|
|
1328
|
+
enableScreenWakeLock?: boolean;
|
|
1329
|
+
enableScreenOrientation?: boolean;
|
|
1330
|
+
enableFullscreen?: boolean;
|
|
1331
|
+
enableFileSystemAccess?: boolean;
|
|
1332
|
+
enableMediaRecorder?: boolean;
|
|
1333
|
+
enableServerSentEvents?: boolean;
|
|
1334
|
+
enableVibration?: boolean;
|
|
1335
|
+
enableSpeechSynthesis?: boolean;
|
|
1336
|
+
enableMutationObserver?: boolean;
|
|
1337
|
+
enablePerformanceObserver?: boolean;
|
|
1338
|
+
enableIdleDetector?: boolean;
|
|
1339
|
+
enableEyeDropper?: boolean;
|
|
1340
|
+
enableBarcodeDetector?: boolean;
|
|
1341
|
+
enableWebAudio?: boolean;
|
|
1342
|
+
enableGamepad?: boolean;
|
|
1343
|
+
enableWebBluetooth?: boolean;
|
|
1344
|
+
enableWebUsb?: boolean;
|
|
1345
|
+
enableWebNfc?: boolean;
|
|
1346
|
+
enablePaymentRequest?: boolean;
|
|
1347
|
+
enableCredentialManagement?: boolean;
|
|
515
1348
|
}
|
|
516
1349
|
declare const defaultBrowserWebApisConfig: BrowserWebApisConfig;
|
|
517
1350
|
declare function provideBrowserWebApis(config?: BrowserWebApisConfig): EnvironmentProviders;
|
|
@@ -530,8 +1363,33 @@ declare function provideMediaApis(): EnvironmentProviders;
|
|
|
530
1363
|
declare function provideLocationApis(): EnvironmentProviders;
|
|
531
1364
|
declare function provideStorageApis(): EnvironmentProviders;
|
|
532
1365
|
declare function provideCommunicationApis(): EnvironmentProviders;
|
|
1366
|
+
declare function provideIntersectionObserver(): EnvironmentProviders;
|
|
1367
|
+
declare function provideResizeObserver(): EnvironmentProviders;
|
|
1368
|
+
declare function providePageVisibility(): EnvironmentProviders;
|
|
1369
|
+
declare function provideBroadcastChannel(): EnvironmentProviders;
|
|
1370
|
+
declare function provideNetworkInformation(): EnvironmentProviders;
|
|
1371
|
+
declare function provideScreenWakeLock(): EnvironmentProviders;
|
|
1372
|
+
declare function provideScreenOrientation(): EnvironmentProviders;
|
|
1373
|
+
declare function provideFullscreen(): EnvironmentProviders;
|
|
1374
|
+
declare function provideFileSystemAccess(): EnvironmentProviders;
|
|
1375
|
+
declare function provideMediaRecorder(): EnvironmentProviders;
|
|
1376
|
+
declare function provideServerSentEvents(): EnvironmentProviders;
|
|
1377
|
+
declare function provideVibration(): EnvironmentProviders;
|
|
1378
|
+
declare function provideSpeechSynthesis(): EnvironmentProviders;
|
|
1379
|
+
declare function provideMutationObserver(): EnvironmentProviders;
|
|
1380
|
+
declare function providePerformanceObserver(): EnvironmentProviders;
|
|
1381
|
+
declare function provideIdleDetector(): EnvironmentProviders;
|
|
1382
|
+
declare function provideEyeDropper(): EnvironmentProviders;
|
|
1383
|
+
declare function provideBarcodeDetector(): EnvironmentProviders;
|
|
1384
|
+
declare function provideWebAudio(): EnvironmentProviders;
|
|
1385
|
+
declare function provideGamepad(): EnvironmentProviders;
|
|
1386
|
+
declare function provideWebBluetooth(): EnvironmentProviders;
|
|
1387
|
+
declare function provideWebUsb(): EnvironmentProviders;
|
|
1388
|
+
declare function provideWebNfc(): EnvironmentProviders;
|
|
1389
|
+
declare function providePaymentRequest(): EnvironmentProviders;
|
|
1390
|
+
declare function provideCredentialManagement(): EnvironmentProviders;
|
|
533
1391
|
|
|
534
1392
|
declare const version = "0.1.0";
|
|
535
1393
|
|
|
536
|
-
export { BatteryService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, GeolocationService, MediaDevicesService, NotificationService, PermissionsService, WebShareService, WebSocketService, WebStorageService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, permissionGuard, provideBattery, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideGeolocation, provideLocationApis, provideMediaApis, provideMediaDevices, provideNotifications, providePermissions, provideStorageApis, provideWebShare, provideWebSocket, provideWebStorage, provideWebWorker, version };
|
|
537
|
-
export type { BatteryInfo, BatteryManager, BrowserCapabilityId, BrowserError, BrowserPermissions, BrowserWebApisConfig, CameraCapabilities, CameraInfo, ErrorCallback, EventHandler, GeolocationCoordinates, GeolocationError, GeolocationOptions, GeolocationPosition$1 as GeolocationPosition, GeolocationWatchOptions, MediaDevice, MediaDeviceKind, MediaDevicesInfo, MediaStreamConstraints$1 as MediaStreamConstraints, MediaTrackConstraints$1 as MediaTrackConstraints, PermissionNameExt, PermissionRequest, StorageEvent, StorageOptions, StorageValue, WebSocketConfig, WebSocketMessage, WebSocketStatus, WorkerMessage, WorkerStatus, WorkerTask };
|
|
1394
|
+
export { BarcodeDetectorService, BatteryService, BroadcastChannelService, BrowserApiBaseService, BrowserCapabilityService, BrowserSupportUtil, CameraService, ClipboardService, CredentialManagementService, EyeDropperService, FileSystemAccessService, FullscreenService, GamepadService, GeolocationService, IdleDetectorService, IntersectionObserverService, MediaDevicesService, MediaRecorderService, MutationObserverService, NetworkInformationService, NotificationService, PageVisibilityService, PaymentRequestService, PerformanceObserverService, PermissionsService, ResizeObserverService, ScreenOrientationService, ScreenWakeLockService, ServerSentEventsService, SpeechSynthesisService, VibrationService, WebAudioService, WebBluetoothService, WebNfcService, WebShareService, WebSocketService, WebStorageService, WebUsbService, WebWorkerService, permissionGuard as createPermissionGuard, defaultBrowserWebApisConfig, injectGamepad, injectIdleDetector, injectIntersectionObserver, injectMutationObserver, injectNetworkInformation, injectPageVisibility, injectPerformanceObserver, injectResizeObserver, injectScreenOrientation, permissionGuard, provideBarcodeDetector, provideBattery, provideBroadcastChannel, provideBrowserWebApis, provideCamera, provideClipboard, provideCommunicationApis, provideCredentialManagement, provideEyeDropper, provideFileSystemAccess, provideFullscreen, provideGamepad, provideGeolocation, provideIdleDetector, provideIntersectionObserver, provideLocationApis, provideMediaApis, provideMediaDevices, provideMediaRecorder, provideMutationObserver, provideNetworkInformation, provideNotifications, providePageVisibility, providePaymentRequest, providePerformanceObserver, providePermissions, provideResizeObserver, provideScreenOrientation, provideScreenWakeLock, provideServerSentEvents, provideSpeechSynthesis, provideStorageApis, provideVibration, provideWebAudio, provideWebBluetooth, provideWebNfc, provideWebShare, provideWebSocket, provideWebStorage, provideWebUsb, provideWebWorker, version };
|
|
1395
|
+
export type { AudioAnalyserData, AudioContextState, BarcodeFormat, BatteryInfo, BatteryManager, BluetoothDeviceInfo, BluetoothDeviceRef, BluetoothRequestDeviceOptions, BrowserCapabilityId, BrowserError, BrowserPermissions, BrowserWebApisConfig, CameraCapabilities, CameraInfo, ColorSelectionResult, ConnectionType, CredentialResult, DetectedBarcode, EffectiveConnectionType, ElementInput, ElementSize, ErrorCallback, EventHandler, FileOpenOptions, FileSaveOptions, GamepadRef, GamepadState, GeolocationCoordinates, GeolocationError, GeolocationOptions, GeolocationPosition$1 as GeolocationPosition, GeolocationWatchOptions, IdleDetectorOptions, IdleDetectorRef, IdleState, IntersectionObserverOptions, IntersectionRef, MediaDevice, MediaDeviceKind, MediaDevicesInfo, MediaStreamConstraints$1 as MediaStreamConstraints, MediaTrackConstraints$1 as MediaTrackConstraints, MutationObserverOptions, MutationRef, NdefMessage, NdefReadingEvent, NdefWriteOptions, NetworkInformation, NetworkInformationRef, OrientationInfo, OrientationLockType, OrientationType, PageVisibilityRef, PasswordCredentialData, PaymentDetailsInit, PaymentMethodConfig, PaymentOptionsConfig, PaymentResult, PerformanceEntryType, PerformanceObserverConfig, PerformanceObserverRef, PermissionNameExt, PermissionRequest, PublicKeyCredentialOptions, RecordingOptions, RecordingResult, RecordingState, ResizeObserverOptions, ResizeRef, SSEConfig, SSEConnectionState, SSEMessage, ScreenIdleState, ScreenOrientationRef, SpeechOptions, SpeechState, StorageEvent, StorageOptions, StorageValue, UsbDeviceFilterDef, UsbDeviceInfo, UsbDeviceRef, UserIdleState, VibrationPattern, VibrationPreset, VisibilityState, WakeLockStatus, WakeLockType, WebSocketConfig, WebSocketMessage, WebSocketStatus, WorkerMessage, WorkerStatus, WorkerTask };
|