native-fn 1.1.9 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +488 -146
  2. package/dist/index.d.ts +138 -119
  3. package/dist/native.cjs +661 -565
  4. package/dist/native.min.cjs +1 -1
  5. package/dist/native.min.mjs +1 -1
  6. package/dist/native.mjs +661 -565
  7. package/dist/native.umd.js +661 -565
  8. package/dist/native.umd.min.js +1 -1
  9. package/dist/plugin/appearance/index.cjs +8 -3
  10. package/dist/plugin/appearance/index.mjs +8 -3
  11. package/dist/plugin/appearance/src/errors/invalid-state-error.d.ts +2 -0
  12. package/dist/plugin/appearance/src/plugin/badge/types/badge.d.ts +1 -1
  13. package/dist/plugin/appearance/src/plugin/battery/types/battery.d.ts +1 -1
  14. package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +3 -3
  15. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  16. package/dist/plugin/appearance/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  17. package/dist/plugin/appearance/src/plugin/open/types/open.d.ts +1 -1
  18. package/dist/plugin/appearance/src/plugin/permission/types/permission.d.ts +1 -0
  19. package/dist/plugin/appearance/src/plugin/pip/cores/index.d.ts +6 -6
  20. package/dist/plugin/appearance/src/plugin/pip/types/pip.d.ts +14 -5
  21. package/dist/plugin/appearance/src/plugin/vibration/types/vibration.d.ts +1 -1
  22. package/dist/plugin/appearance/src/types/subscription-manager.d.ts +1 -1
  23. package/dist/plugin/badge/index.cjs +2 -2
  24. package/dist/plugin/badge/index.d.ts +1 -1
  25. package/dist/plugin/badge/index.mjs +2 -2
  26. package/dist/plugin/badge/src/errors/invalid-state-error.d.ts +2 -0
  27. package/dist/plugin/badge/src/plugin/badge/types/badge.d.ts +1 -1
  28. package/dist/plugin/badge/src/plugin/battery/types/battery.d.ts +1 -1
  29. package/dist/plugin/badge/src/plugin/fullscreen/cores/index.d.ts +3 -3
  30. package/dist/plugin/badge/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  31. package/dist/plugin/badge/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  32. package/dist/plugin/badge/src/plugin/open/types/open.d.ts +1 -1
  33. package/dist/plugin/badge/src/plugin/permission/types/permission.d.ts +1 -0
  34. package/dist/plugin/badge/src/plugin/pip/cores/index.d.ts +6 -6
  35. package/dist/plugin/badge/src/plugin/pip/types/pip.d.ts +14 -5
  36. package/dist/plugin/badge/src/plugin/vibration/types/vibration.d.ts +1 -1
  37. package/dist/plugin/badge/src/types/subscription-manager.d.ts +1 -1
  38. package/dist/plugin/battery/index.cjs +3 -3
  39. package/dist/plugin/battery/index.d.ts +1 -1
  40. package/dist/plugin/battery/index.mjs +3 -3
  41. package/dist/plugin/battery/src/errors/invalid-state-error.d.ts +2 -0
  42. package/dist/plugin/battery/src/plugin/badge/types/badge.d.ts +1 -1
  43. package/dist/plugin/battery/src/plugin/battery/types/battery.d.ts +1 -1
  44. package/dist/plugin/battery/src/plugin/fullscreen/cores/index.d.ts +3 -3
  45. package/dist/plugin/battery/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  46. package/dist/plugin/battery/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  47. package/dist/plugin/battery/src/plugin/open/types/open.d.ts +1 -1
  48. package/dist/plugin/battery/src/plugin/permission/types/permission.d.ts +1 -0
  49. package/dist/plugin/battery/src/plugin/pip/cores/index.d.ts +6 -6
  50. package/dist/plugin/battery/src/plugin/pip/types/pip.d.ts +14 -5
  51. package/dist/plugin/battery/src/plugin/vibration/types/vibration.d.ts +1 -1
  52. package/dist/plugin/battery/src/types/subscription-manager.d.ts +1 -1
  53. package/dist/plugin/clipboard/src/errors/invalid-state-error.d.ts +2 -0
  54. package/dist/plugin/clipboard/src/plugin/badge/types/badge.d.ts +1 -1
  55. package/dist/plugin/clipboard/src/plugin/battery/types/battery.d.ts +1 -1
  56. package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +3 -3
  57. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  58. package/dist/plugin/clipboard/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  59. package/dist/plugin/clipboard/src/plugin/open/types/open.d.ts +1 -1
  60. package/dist/plugin/clipboard/src/plugin/permission/types/permission.d.ts +1 -0
  61. package/dist/plugin/clipboard/src/plugin/pip/cores/index.d.ts +6 -6
  62. package/dist/plugin/clipboard/src/plugin/pip/types/pip.d.ts +14 -5
  63. package/dist/plugin/clipboard/src/plugin/vibration/types/vibration.d.ts +1 -1
  64. package/dist/plugin/clipboard/src/types/subscription-manager.d.ts +1 -1
  65. package/dist/plugin/dimension/src/errors/invalid-state-error.d.ts +2 -0
  66. package/dist/plugin/dimension/src/plugin/badge/types/badge.d.ts +1 -1
  67. package/dist/plugin/dimension/src/plugin/battery/types/battery.d.ts +1 -1
  68. package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +3 -3
  69. package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  70. package/dist/plugin/dimension/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  71. package/dist/plugin/dimension/src/plugin/open/types/open.d.ts +1 -1
  72. package/dist/plugin/dimension/src/plugin/permission/types/permission.d.ts +1 -0
  73. package/dist/plugin/dimension/src/plugin/pip/cores/index.d.ts +6 -6
  74. package/dist/plugin/dimension/src/plugin/pip/types/pip.d.ts +14 -5
  75. package/dist/plugin/dimension/src/plugin/vibration/types/vibration.d.ts +1 -1
  76. package/dist/plugin/dimension/src/types/subscription-manager.d.ts +1 -1
  77. package/dist/plugin/fullscreen/index.cjs +539 -266
  78. package/dist/plugin/fullscreen/index.d.ts +20 -10
  79. package/dist/plugin/fullscreen/index.mjs +539 -266
  80. package/dist/plugin/fullscreen/src/errors/invalid-state-error.d.ts +2 -0
  81. package/dist/plugin/fullscreen/src/plugin/badge/types/badge.d.ts +1 -1
  82. package/dist/plugin/fullscreen/src/plugin/battery/types/battery.d.ts +1 -1
  83. package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +3 -3
  84. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  85. package/dist/plugin/fullscreen/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  86. package/dist/plugin/fullscreen/src/plugin/open/types/open.d.ts +1 -1
  87. package/dist/plugin/fullscreen/src/plugin/permission/types/permission.d.ts +1 -0
  88. package/dist/plugin/fullscreen/src/plugin/pip/cores/index.d.ts +6 -6
  89. package/dist/plugin/fullscreen/src/plugin/pip/types/pip.d.ts +14 -5
  90. package/dist/plugin/fullscreen/src/plugin/vibration/types/vibration.d.ts +1 -1
  91. package/dist/plugin/fullscreen/src/types/subscription-manager.d.ts +1 -1
  92. package/dist/plugin/geolocation/index.cjs +6 -0
  93. package/dist/plugin/geolocation/index.d.ts +1 -1
  94. package/dist/plugin/geolocation/index.mjs +6 -0
  95. package/dist/plugin/geolocation/src/errors/invalid-state-error.d.ts +2 -0
  96. package/dist/plugin/geolocation/src/plugin/badge/types/badge.d.ts +1 -1
  97. package/dist/plugin/geolocation/src/plugin/battery/types/battery.d.ts +1 -1
  98. package/dist/plugin/geolocation/src/plugin/fullscreen/cores/index.d.ts +3 -3
  99. package/dist/plugin/geolocation/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  100. package/dist/plugin/geolocation/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  101. package/dist/plugin/geolocation/src/plugin/open/types/open.d.ts +1 -1
  102. package/dist/plugin/geolocation/src/plugin/permission/types/permission.d.ts +1 -0
  103. package/dist/plugin/geolocation/src/plugin/pip/cores/index.d.ts +6 -6
  104. package/dist/plugin/geolocation/src/plugin/pip/types/pip.d.ts +14 -5
  105. package/dist/plugin/geolocation/src/plugin/vibration/types/vibration.d.ts +1 -1
  106. package/dist/plugin/geolocation/src/types/subscription-manager.d.ts +1 -1
  107. package/dist/plugin/notification/index.cjs +6 -0
  108. package/dist/plugin/notification/index.mjs +6 -0
  109. package/dist/plugin/notification/src/errors/invalid-state-error.d.ts +2 -0
  110. package/dist/plugin/notification/src/plugin/badge/types/badge.d.ts +1 -1
  111. package/dist/plugin/notification/src/plugin/battery/types/battery.d.ts +1 -1
  112. package/dist/plugin/notification/src/plugin/fullscreen/cores/index.d.ts +3 -3
  113. package/dist/plugin/notification/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  114. package/dist/plugin/notification/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  115. package/dist/plugin/notification/src/plugin/open/types/open.d.ts +1 -1
  116. package/dist/plugin/notification/src/plugin/permission/types/permission.d.ts +1 -0
  117. package/dist/plugin/notification/src/plugin/pip/cores/index.d.ts +6 -6
  118. package/dist/plugin/notification/src/plugin/pip/types/pip.d.ts +14 -5
  119. package/dist/plugin/notification/src/plugin/vibration/types/vibration.d.ts +1 -1
  120. package/dist/plugin/notification/src/types/subscription-manager.d.ts +1 -1
  121. package/dist/plugin/open/index.cjs +128 -123
  122. package/dist/plugin/open/index.d.ts +35 -35
  123. package/dist/plugin/open/index.mjs +128 -123
  124. package/dist/plugin/open/src/errors/invalid-state-error.d.ts +2 -0
  125. package/dist/plugin/open/src/plugin/badge/types/badge.d.ts +1 -1
  126. package/dist/plugin/open/src/plugin/battery/types/battery.d.ts +1 -1
  127. package/dist/plugin/open/src/plugin/fullscreen/cores/index.d.ts +3 -3
  128. package/dist/plugin/open/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  129. package/dist/plugin/open/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  130. package/dist/plugin/open/src/plugin/open/types/open.d.ts +1 -1
  131. package/dist/plugin/open/src/plugin/permission/types/permission.d.ts +1 -0
  132. package/dist/plugin/open/src/plugin/pip/cores/index.d.ts +6 -6
  133. package/dist/plugin/open/src/plugin/pip/types/pip.d.ts +14 -5
  134. package/dist/plugin/open/src/plugin/vibration/types/vibration.d.ts +1 -1
  135. package/dist/plugin/open/src/types/subscription-manager.d.ts +1 -1
  136. package/dist/plugin/permission/index.cjs +6 -0
  137. package/dist/plugin/permission/index.d.ts +1 -0
  138. package/dist/plugin/permission/index.mjs +6 -0
  139. package/dist/plugin/permission/src/errors/invalid-state-error.d.ts +2 -0
  140. package/dist/plugin/permission/src/plugin/badge/types/badge.d.ts +1 -1
  141. package/dist/plugin/permission/src/plugin/battery/types/battery.d.ts +1 -1
  142. package/dist/plugin/permission/src/plugin/fullscreen/cores/index.d.ts +3 -3
  143. package/dist/plugin/permission/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  144. package/dist/plugin/permission/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  145. package/dist/plugin/permission/src/plugin/open/types/open.d.ts +1 -1
  146. package/dist/plugin/permission/src/plugin/permission/types/permission.d.ts +1 -0
  147. package/dist/plugin/permission/src/plugin/pip/cores/index.d.ts +6 -6
  148. package/dist/plugin/permission/src/plugin/pip/types/pip.d.ts +14 -5
  149. package/dist/plugin/permission/src/plugin/vibration/types/vibration.d.ts +1 -1
  150. package/dist/plugin/permission/src/types/subscription-manager.d.ts +1 -1
  151. package/dist/plugin/pip/index.cjs +651 -268
  152. package/dist/plugin/pip/index.d.ts +22 -12
  153. package/dist/plugin/pip/index.mjs +651 -268
  154. package/dist/plugin/pip/src/errors/invalid-state-error.d.ts +2 -0
  155. package/dist/plugin/pip/src/plugin/badge/types/badge.d.ts +1 -1
  156. package/dist/plugin/pip/src/plugin/battery/types/battery.d.ts +1 -1
  157. package/dist/plugin/pip/src/plugin/fullscreen/cores/index.d.ts +3 -3
  158. package/dist/plugin/pip/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  159. package/dist/plugin/pip/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  160. package/dist/plugin/pip/src/plugin/open/types/open.d.ts +1 -1
  161. package/dist/plugin/pip/src/plugin/permission/types/permission.d.ts +1 -0
  162. package/dist/plugin/pip/src/plugin/pip/cores/index.d.ts +6 -6
  163. package/dist/plugin/pip/src/plugin/pip/types/pip.d.ts +14 -5
  164. package/dist/plugin/pip/src/plugin/vibration/types/vibration.d.ts +1 -1
  165. package/dist/plugin/pip/src/types/subscription-manager.d.ts +1 -1
  166. package/dist/plugin/platform/index.cjs +8 -3
  167. package/dist/plugin/platform/index.d.ts +5 -5
  168. package/dist/plugin/platform/index.mjs +8 -3
  169. package/dist/plugin/platform/src/errors/invalid-state-error.d.ts +2 -0
  170. package/dist/plugin/platform/src/plugin/badge/types/badge.d.ts +1 -1
  171. package/dist/plugin/platform/src/plugin/battery/types/battery.d.ts +1 -1
  172. package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +3 -3
  173. package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  174. package/dist/plugin/platform/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  175. package/dist/plugin/platform/src/plugin/open/types/open.d.ts +1 -1
  176. package/dist/plugin/platform/src/plugin/permission/types/permission.d.ts +1 -0
  177. package/dist/plugin/platform/src/plugin/pip/cores/index.d.ts +6 -6
  178. package/dist/plugin/platform/src/plugin/pip/types/pip.d.ts +14 -5
  179. package/dist/plugin/platform/src/plugin/vibration/types/vibration.d.ts +1 -1
  180. package/dist/plugin/platform/src/types/subscription-manager.d.ts +1 -1
  181. package/dist/plugin/theme/index.cjs +8 -3
  182. package/dist/plugin/theme/index.mjs +8 -3
  183. package/dist/plugin/theme/src/errors/invalid-state-error.d.ts +2 -0
  184. package/dist/plugin/theme/src/plugin/badge/types/badge.d.ts +1 -1
  185. package/dist/plugin/theme/src/plugin/battery/types/battery.d.ts +1 -1
  186. package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +3 -3
  187. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  188. package/dist/plugin/theme/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  189. package/dist/plugin/theme/src/plugin/open/types/open.d.ts +1 -1
  190. package/dist/plugin/theme/src/plugin/permission/types/permission.d.ts +1 -0
  191. package/dist/plugin/theme/src/plugin/pip/cores/index.d.ts +6 -6
  192. package/dist/plugin/theme/src/plugin/pip/types/pip.d.ts +14 -5
  193. package/dist/plugin/theme/src/plugin/vibration/types/vibration.d.ts +1 -1
  194. package/dist/plugin/theme/src/types/subscription-manager.d.ts +1 -1
  195. package/dist/plugin/vibration/index.cjs +5 -5
  196. package/dist/plugin/vibration/index.d.ts +1 -1
  197. package/dist/plugin/vibration/index.mjs +5 -5
  198. package/dist/plugin/vibration/src/errors/invalid-state-error.d.ts +2 -0
  199. package/dist/plugin/vibration/src/plugin/badge/types/badge.d.ts +1 -1
  200. package/dist/plugin/vibration/src/plugin/battery/types/battery.d.ts +1 -1
  201. package/dist/plugin/vibration/src/plugin/fullscreen/cores/index.d.ts +3 -3
  202. package/dist/plugin/vibration/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  203. package/dist/plugin/vibration/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  204. package/dist/plugin/vibration/src/plugin/open/types/open.d.ts +1 -1
  205. package/dist/plugin/vibration/src/plugin/permission/types/permission.d.ts +1 -0
  206. package/dist/plugin/vibration/src/plugin/pip/cores/index.d.ts +6 -6
  207. package/dist/plugin/vibration/src/plugin/pip/types/pip.d.ts +14 -5
  208. package/dist/plugin/vibration/src/plugin/vibration/types/vibration.d.ts +1 -1
  209. package/dist/plugin/vibration/src/types/subscription-manager.d.ts +1 -1
  210. package/dist/src/errors/invalid-state-error.d.ts +2 -0
  211. package/dist/src/plugin/badge/types/badge.d.ts +1 -1
  212. package/dist/src/plugin/battery/types/battery.d.ts +1 -1
  213. package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -3
  214. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +15 -6
  215. package/dist/src/plugin/geolocation/types/geolocation.d.ts +1 -1
  216. package/dist/src/plugin/open/types/open.d.ts +1 -1
  217. package/dist/src/plugin/permission/types/permission.d.ts +1 -0
  218. package/dist/src/plugin/pip/cores/index.d.ts +6 -6
  219. package/dist/src/plugin/pip/types/pip.d.ts +14 -5
  220. package/dist/src/plugin/vibration/types/vibration.d.ts +1 -1
  221. package/dist/src/types/subscription-manager.d.ts +1 -1
  222. package/package.json +21 -13
@@ -0,0 +1,2 @@
1
+ declare const InvalidStateError: ErrorConstructor;
2
+ export { InvalidStateError, };
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface BadgeInstance {
3
+ get supported(): boolean;
3
4
  set(contents: number): Promise<void>;
4
5
  clear(): Promise<void>;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;
@@ -16,8 +16,8 @@ export interface BatteryManager extends EventTarget {
16
16
  onlevelchange: ((this: BatteryManager, ev: Event) => any) | null;
17
17
  }
18
18
  export declare interface BatteryInstance {
19
- get value(): Promise<BatteryManager>;
20
19
  get supported(): boolean;
20
+ get value(): Promise<BatteryManager>;
21
21
  onChange(listener: (battery: BatteryManager) => void, options?: AddEventListenerOptions): () => void;
22
22
  Constants: {};
23
23
  Errors: {
@@ -7,7 +7,6 @@ declare global {
7
7
  webkitDisplayingFullscreen?: boolean;
8
8
  onwebkitbeginfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
9
9
  onwebkitendfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
10
- [key: symbol]: boolean | undefined;
11
10
  }
12
11
  interface Document {
13
12
  readonly fullscreenEnabled: boolean;
@@ -32,6 +31,7 @@ declare global {
32
31
  mozRequestFullScreen?: () => Promise<void>;
33
32
  msRequestFullscreen?: () => Promise<void>;
34
33
  }
34
+ var __nativeFnFsBridgeKey__: symbol | undefined;
35
35
  }
36
- declare const _default: FullscreenInstance;
37
- export default _default;
36
+ declare const Fullscreen: FullscreenInstance;
37
+ export default Fullscreen;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface FullscreenInstance {
3
- supported: boolean;
4
- element: Element | null;
5
- isFullscreen: boolean;
4
+ get supported(): boolean;
5
+ get element(): Element | null;
6
+ get isActive(): boolean;
6
7
  request(target?: Element, options?: FullscreenOptions): Promise<void>;
7
- exit(): Promise<void>;
8
8
  toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
9
+ exit(): Promise<void>;
10
+ onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface FullscreenEventPayload {
21
+ nativeEvent: Event;
22
+ element: Element;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  import { PermissionNotGrantedError } from "../../../errors/permission-not-granted-error";
3
3
  export declare interface GeolocationInstance {
4
- get value(): Promise<GeolocationCoordinates>;
5
4
  get supported(): boolean;
5
+ get value(): Promise<GeolocationCoordinates>;
6
6
  onChange(listener: (coordinates: GeolocationCoordinates) => void, options?: AddEventListenerOptions): () => void;
7
7
  Constants: {};
8
8
  Errors: {
@@ -1,5 +1,5 @@
1
1
  import { AppOpenState, CameraType, CaptureType, DirectoryExploreMode, ExplorerStartIn, SettingType } from "../constants";
2
- import { OS } from "../../platform/constants";
2
+ import { OS } from "../../platform";
3
3
  import { URLOpenError } from "../errors/url-open-error";
4
4
  import { UserCancelledError } from "../errors/user-cancel-error";
5
5
  import { NotSupportedError } from "../../../errors/not-supported-error";
@@ -1,5 +1,6 @@
1
1
  import { PermissionState, PermissionType } from "../constants";
2
2
  export declare interface PermissionInstance {
3
+ get supported(): boolean;
3
4
  request(type: PermissionType): Promise<PermissionState>;
4
5
  check(type: PermissionType): Promise<PermissionState>;
5
6
  Constants: {
@@ -1,12 +1,12 @@
1
1
  import { PipInstance } from "../types";
2
2
  declare global {
3
3
  interface HTMLVideoElement {
4
- webkitSupportsPresentationMode?: (mode: string) => boolean;
5
- webkitSetPresentationMode?: (mode: string) => void;
4
+ webkitSupportsPresentationMode?(mode: string): boolean;
5
+ webkitSetPresentationMode?(mode: string): void;
6
6
  webkitPresentationMode?: string;
7
- onwebkitpresentationmodechanged?: ((this: HTMLVideoElement, ev: Event) => any) | null;
8
- [key: symbol]: boolean | undefined;
7
+ onwebkitpresentationmodechanged?: ((this: Element, ev: Event) => any) | null;
9
8
  }
9
+ var __nativeFnPipBridgeKey__: symbol | undefined;
10
10
  }
11
- declare const _default: PipInstance;
12
- export default _default;
11
+ declare const Pip: PipInstance;
12
+ export default Pip;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface PipInstance {
3
- supported: boolean;
4
- element: HTMLVideoElement | null;
5
- isPip: boolean;
4
+ get supported(): boolean;
5
+ get element(): HTMLVideoElement | null;
6
+ get isActive(): boolean;
6
7
  request(target?: HTMLVideoElement): Promise<void>;
7
8
  exit(): Promise<void>;
8
9
  toggle(target?: HTMLVideoElement): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
+ onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface PipEventPayload {
21
+ nativeEvent: Event;
22
+ element: HTMLVideoElement;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface VibrationInstance {
3
+ get supported(): boolean;
3
4
  run(pattern: number | number[]): boolean;
4
5
  stop(): boolean;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;
@@ -1,4 +1,4 @@
1
1
  export declare interface SubscriptionManager<T, U> {
2
2
  emit: (value: U) => void;
3
- subscribe: (this: T, listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
3
+ subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
4
4
  }
@@ -656,10 +656,15 @@ function parseFromHighEntropyValues() {
656
656
  parsedFromHighEntropyValuesEngine.version = brandVersion;
657
657
  }
658
658
  if (typeof platformVersion === 'string') {
659
- if (getParsedCache().os.name === exports.OS.Windows)
660
- parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
661
- else
659
+ if (getParsedCache().os.name === exports.OS.Windows) {
660
+ if (parseInt(platformVersion.split('.')[0], 10) >= 13)
661
+ parsedFromHighEntropyValuesOS.version = '11';
662
+ else
663
+ parsedFromHighEntropyValuesOS.version = '10';
664
+ }
665
+ else {
662
666
  parsedFromHighEntropyValuesOS.version = platformVersion;
667
+ }
663
668
  }
664
669
  if (typeof platform === 'string') {
665
670
  if (/android/i.test(platform))
@@ -65,7 +65,6 @@ declare global {
65
65
  webkitDisplayingFullscreen?: boolean;
66
66
  onwebkitbeginfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
67
67
  onwebkitendfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
68
- [key: symbol]: boolean | undefined;
69
68
  }
70
69
  interface Document {
71
70
  readonly fullscreenEnabled: boolean;
@@ -90,6 +89,7 @@ declare global {
90
89
  mozRequestFullScreen?: () => Promise<void>;
91
90
  msRequestFullscreen?: () => Promise<void>;
92
91
  }
92
+ var __nativeFnFsBridgeKey__: symbol | undefined;
93
93
  }
94
94
 
95
95
  interface Contact {
@@ -175,12 +175,12 @@ declare global {
175
175
 
176
176
  declare global {
177
177
  interface HTMLVideoElement {
178
- webkitSupportsPresentationMode?: (mode: string) => boolean;
179
- webkitSetPresentationMode?: (mode: string) => void;
178
+ webkitSupportsPresentationMode?(mode: string): boolean;
179
+ webkitSetPresentationMode?(mode: string): void;
180
180
  webkitPresentationMode?: string;
181
- onwebkitpresentationmodechanged?: ((this: HTMLVideoElement, ev: Event) => any) | null;
182
- [key: symbol]: boolean | undefined;
181
+ onwebkitpresentationmodechanged?: ((this: Element, ev: Event) => any) | null;
183
182
  }
183
+ var __nativeFnPipBridgeKey__: symbol | undefined;
184
184
  }
185
185
 
186
186
  type Writeable<T> = {
@@ -652,10 +652,15 @@ function parseFromHighEntropyValues() {
652
652
  parsedFromHighEntropyValuesEngine.version = brandVersion;
653
653
  }
654
654
  if (typeof platformVersion === 'string') {
655
- if (getParsedCache().os.name === OS.Windows)
656
- parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
657
- else
655
+ if (getParsedCache().os.name === OS.Windows) {
656
+ if (parseInt(platformVersion.split('.')[0], 10) >= 13)
657
+ parsedFromHighEntropyValuesOS.version = '11';
658
+ else
659
+ parsedFromHighEntropyValuesOS.version = '10';
660
+ }
661
+ else {
658
662
  parsedFromHighEntropyValuesOS.version = platformVersion;
663
+ }
659
664
  }
660
665
  if (typeof platform === 'string') {
661
666
  if (/android/i.test(platform))
@@ -0,0 +1,2 @@
1
+ declare const InvalidStateError: ErrorConstructor;
2
+ export { InvalidStateError, };
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface BadgeInstance {
3
+ get supported(): boolean;
3
4
  set(contents: number): Promise<void>;
4
5
  clear(): Promise<void>;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;
@@ -16,8 +16,8 @@ export interface BatteryManager extends EventTarget {
16
16
  onlevelchange: ((this: BatteryManager, ev: Event) => any) | null;
17
17
  }
18
18
  export declare interface BatteryInstance {
19
- get value(): Promise<BatteryManager>;
20
19
  get supported(): boolean;
20
+ get value(): Promise<BatteryManager>;
21
21
  onChange(listener: (battery: BatteryManager) => void, options?: AddEventListenerOptions): () => void;
22
22
  Constants: {};
23
23
  Errors: {
@@ -7,7 +7,6 @@ declare global {
7
7
  webkitDisplayingFullscreen?: boolean;
8
8
  onwebkitbeginfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
9
9
  onwebkitendfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
10
- [key: symbol]: boolean | undefined;
11
10
  }
12
11
  interface Document {
13
12
  readonly fullscreenEnabled: boolean;
@@ -32,6 +31,7 @@ declare global {
32
31
  mozRequestFullScreen?: () => Promise<void>;
33
32
  msRequestFullscreen?: () => Promise<void>;
34
33
  }
34
+ var __nativeFnFsBridgeKey__: symbol | undefined;
35
35
  }
36
- declare const _default: FullscreenInstance;
37
- export default _default;
36
+ declare const Fullscreen: FullscreenInstance;
37
+ export default Fullscreen;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface FullscreenInstance {
3
- supported: boolean;
4
- element: Element | null;
5
- isFullscreen: boolean;
4
+ get supported(): boolean;
5
+ get element(): Element | null;
6
+ get isActive(): boolean;
6
7
  request(target?: Element, options?: FullscreenOptions): Promise<void>;
7
- exit(): Promise<void>;
8
8
  toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
9
+ exit(): Promise<void>;
10
+ onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface FullscreenEventPayload {
21
+ nativeEvent: Event;
22
+ element: Element;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  import { PermissionNotGrantedError } from "../../../errors/permission-not-granted-error";
3
3
  export declare interface GeolocationInstance {
4
- get value(): Promise<GeolocationCoordinates>;
5
4
  get supported(): boolean;
5
+ get value(): Promise<GeolocationCoordinates>;
6
6
  onChange(listener: (coordinates: GeolocationCoordinates) => void, options?: AddEventListenerOptions): () => void;
7
7
  Constants: {};
8
8
  Errors: {
@@ -1,5 +1,5 @@
1
1
  import { AppOpenState, CameraType, CaptureType, DirectoryExploreMode, ExplorerStartIn, SettingType } from "../constants";
2
- import { OS } from "../../platform/constants";
2
+ import { OS } from "../../platform";
3
3
  import { URLOpenError } from "../errors/url-open-error";
4
4
  import { UserCancelledError } from "../errors/user-cancel-error";
5
5
  import { NotSupportedError } from "../../../errors/not-supported-error";
@@ -1,5 +1,6 @@
1
1
  import { PermissionState, PermissionType } from "../constants";
2
2
  export declare interface PermissionInstance {
3
+ get supported(): boolean;
3
4
  request(type: PermissionType): Promise<PermissionState>;
4
5
  check(type: PermissionType): Promise<PermissionState>;
5
6
  Constants: {
@@ -1,12 +1,12 @@
1
1
  import { PipInstance } from "../types";
2
2
  declare global {
3
3
  interface HTMLVideoElement {
4
- webkitSupportsPresentationMode?: (mode: string) => boolean;
5
- webkitSetPresentationMode?: (mode: string) => void;
4
+ webkitSupportsPresentationMode?(mode: string): boolean;
5
+ webkitSetPresentationMode?(mode: string): void;
6
6
  webkitPresentationMode?: string;
7
- onwebkitpresentationmodechanged?: ((this: HTMLVideoElement, ev: Event) => any) | null;
8
- [key: symbol]: boolean | undefined;
7
+ onwebkitpresentationmodechanged?: ((this: Element, ev: Event) => any) | null;
9
8
  }
9
+ var __nativeFnPipBridgeKey__: symbol | undefined;
10
10
  }
11
- declare const _default: PipInstance;
12
- export default _default;
11
+ declare const Pip: PipInstance;
12
+ export default Pip;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface PipInstance {
3
- supported: boolean;
4
- element: HTMLVideoElement | null;
5
- isPip: boolean;
4
+ get supported(): boolean;
5
+ get element(): HTMLVideoElement | null;
6
+ get isActive(): boolean;
6
7
  request(target?: HTMLVideoElement): Promise<void>;
7
8
  exit(): Promise<void>;
8
9
  toggle(target?: HTMLVideoElement): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
+ onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface PipEventPayload {
21
+ nativeEvent: Event;
22
+ element: HTMLVideoElement;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface VibrationInstance {
3
+ get supported(): boolean;
3
4
  run(pattern: number | number[]): boolean;
4
5
  stop(): boolean;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;
@@ -1,4 +1,4 @@
1
1
  export declare interface SubscriptionManager<T, U> {
2
2
  emit: (value: U) => void;
3
- subscribe: (this: T, listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
3
+ subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
4
4
  }
@@ -513,10 +513,15 @@ function parseFromHighEntropyValues() {
513
513
  parsedFromHighEntropyValuesEngine.version = brandVersion;
514
514
  }
515
515
  if (typeof platformVersion === 'string') {
516
- if (getParsedCache().os.name === OS.Windows)
517
- parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
518
- else
516
+ if (getParsedCache().os.name === OS.Windows) {
517
+ if (parseInt(platformVersion.split('.')[0], 10) >= 13)
518
+ parsedFromHighEntropyValuesOS.version = '11';
519
+ else
520
+ parsedFromHighEntropyValuesOS.version = '10';
521
+ }
522
+ else {
519
523
  parsedFromHighEntropyValuesOS.version = platformVersion;
524
+ }
520
525
  }
521
526
  if (typeof platform === 'string') {
522
527
  if (/android/i.test(platform))
@@ -511,10 +511,15 @@ function parseFromHighEntropyValues() {
511
511
  parsedFromHighEntropyValuesEngine.version = brandVersion;
512
512
  }
513
513
  if (typeof platformVersion === 'string') {
514
- if (getParsedCache().os.name === OS.Windows)
515
- parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
516
- else
514
+ if (getParsedCache().os.name === OS.Windows) {
515
+ if (parseInt(platformVersion.split('.')[0], 10) >= 13)
516
+ parsedFromHighEntropyValuesOS.version = '11';
517
+ else
518
+ parsedFromHighEntropyValuesOS.version = '10';
519
+ }
520
+ else {
517
521
  parsedFromHighEntropyValuesOS.version = platformVersion;
522
+ }
518
523
  }
519
524
  if (typeof platform === 'string') {
520
525
  if (/android/i.test(platform))
@@ -0,0 +1,2 @@
1
+ declare const InvalidStateError: ErrorConstructor;
2
+ export { InvalidStateError, };
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface BadgeInstance {
3
+ get supported(): boolean;
3
4
  set(contents: number): Promise<void>;
4
5
  clear(): Promise<void>;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;
@@ -16,8 +16,8 @@ export interface BatteryManager extends EventTarget {
16
16
  onlevelchange: ((this: BatteryManager, ev: Event) => any) | null;
17
17
  }
18
18
  export declare interface BatteryInstance {
19
- get value(): Promise<BatteryManager>;
20
19
  get supported(): boolean;
20
+ get value(): Promise<BatteryManager>;
21
21
  onChange(listener: (battery: BatteryManager) => void, options?: AddEventListenerOptions): () => void;
22
22
  Constants: {};
23
23
  Errors: {
@@ -7,7 +7,6 @@ declare global {
7
7
  webkitDisplayingFullscreen?: boolean;
8
8
  onwebkitbeginfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
9
9
  onwebkitendfullscreen?: ((this: HTMLVideoElement, ev: Event) => any) | null;
10
- [key: symbol]: boolean | undefined;
11
10
  }
12
11
  interface Document {
13
12
  readonly fullscreenEnabled: boolean;
@@ -32,6 +31,7 @@ declare global {
32
31
  mozRequestFullScreen?: () => Promise<void>;
33
32
  msRequestFullscreen?: () => Promise<void>;
34
33
  }
34
+ var __nativeFnFsBridgeKey__: symbol | undefined;
35
35
  }
36
- declare const _default: FullscreenInstance;
37
- export default _default;
36
+ declare const Fullscreen: FullscreenInstance;
37
+ export default Fullscreen;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface FullscreenInstance {
3
- supported: boolean;
4
- element: Element | null;
5
- isFullscreen: boolean;
4
+ get supported(): boolean;
5
+ get element(): Element | null;
6
+ get isActive(): boolean;
6
7
  request(target?: Element, options?: FullscreenOptions): Promise<void>;
7
- exit(): Promise<void>;
8
8
  toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
9
+ exit(): Promise<void>;
10
+ onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface FullscreenEventPayload {
21
+ nativeEvent: Event;
22
+ element: Element;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  import { PermissionNotGrantedError } from "../../../errors/permission-not-granted-error";
3
3
  export declare interface GeolocationInstance {
4
- get value(): Promise<GeolocationCoordinates>;
5
4
  get supported(): boolean;
5
+ get value(): Promise<GeolocationCoordinates>;
6
6
  onChange(listener: (coordinates: GeolocationCoordinates) => void, options?: AddEventListenerOptions): () => void;
7
7
  Constants: {};
8
8
  Errors: {
@@ -1,5 +1,5 @@
1
1
  import { AppOpenState, CameraType, CaptureType, DirectoryExploreMode, ExplorerStartIn, SettingType } from "../constants";
2
- import { OS } from "../../platform/constants";
2
+ import { OS } from "../../platform";
3
3
  import { URLOpenError } from "../errors/url-open-error";
4
4
  import { UserCancelledError } from "../errors/user-cancel-error";
5
5
  import { NotSupportedError } from "../../../errors/not-supported-error";
@@ -1,5 +1,6 @@
1
1
  import { PermissionState, PermissionType } from "../constants";
2
2
  export declare interface PermissionInstance {
3
+ get supported(): boolean;
3
4
  request(type: PermissionType): Promise<PermissionState>;
4
5
  check(type: PermissionType): Promise<PermissionState>;
5
6
  Constants: {
@@ -1,12 +1,12 @@
1
1
  import { PipInstance } from "../types";
2
2
  declare global {
3
3
  interface HTMLVideoElement {
4
- webkitSupportsPresentationMode?: (mode: string) => boolean;
5
- webkitSetPresentationMode?: (mode: string) => void;
4
+ webkitSupportsPresentationMode?(mode: string): boolean;
5
+ webkitSetPresentationMode?(mode: string): void;
6
6
  webkitPresentationMode?: string;
7
- onwebkitpresentationmodechanged?: ((this: HTMLVideoElement, ev: Event) => any) | null;
8
- [key: symbol]: boolean | undefined;
7
+ onwebkitpresentationmodechanged?: ((this: Element, ev: Event) => any) | null;
9
8
  }
9
+ var __nativeFnPipBridgeKey__: symbol | undefined;
10
10
  }
11
- declare const _default: PipInstance;
12
- export default _default;
11
+ declare const Pip: PipInstance;
12
+ export default Pip;
@@ -1,15 +1,24 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
+ import { InvalidStateError } from "../../../errors/invalid-state-error";
2
3
  export declare interface PipInstance {
3
- supported: boolean;
4
- element: HTMLVideoElement | null;
5
- isPip: boolean;
4
+ get supported(): boolean;
5
+ get element(): HTMLVideoElement | null;
6
+ get isActive(): boolean;
6
7
  request(target?: HTMLVideoElement): Promise<void>;
7
8
  exit(): Promise<void>;
8
9
  toggle(target?: HTMLVideoElement): Promise<void>;
9
- onChange(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
- onError(listener: (event: Event) => void, options?: AddEventListenerOptions): () => void;
10
+ onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
+ onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
+ onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
+ onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
11
14
  Constants: {};
12
15
  Errors: {
13
16
  NotSupportedError: typeof NotSupportedError;
17
+ InvalidStateError: typeof InvalidStateError;
14
18
  };
15
19
  }
20
+ export declare interface PipEventPayload {
21
+ nativeEvent: Event;
22
+ element: HTMLVideoElement;
23
+ isActive: boolean;
24
+ }
@@ -1,8 +1,8 @@
1
1
  import { NotSupportedError } from "../../../errors/not-supported-error";
2
2
  export declare interface VibrationInstance {
3
+ get supported(): boolean;
3
4
  run(pattern: number | number[]): boolean;
4
5
  stop(): boolean;
5
- get supported(): boolean;
6
6
  Constants: {};
7
7
  Errors: {
8
8
  NotSupportedError: typeof NotSupportedError;