native-fn 1.3.0 → 1.3.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 (313) hide show
  1. package/README.md +159 -41
  2. package/dist/index.d.ts +117 -88
  3. package/dist/native.cjs +464 -244
  4. package/dist/native.min.cjs +1 -1
  5. package/dist/native.min.mjs +1 -1
  6. package/dist/native.mjs +464 -244
  7. package/dist/native.umd.js +464 -244
  8. package/dist/native.umd.min.js +1 -1
  9. package/dist/plugin/appearance/index.cjs +49 -46
  10. package/dist/plugin/appearance/index.d.ts +3 -3
  11. package/dist/plugin/appearance/index.mjs +49 -46
  12. package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +3 -3
  13. package/dist/plugin/appearance/src/plugin/badge/types/badge.d.ts +3 -3
  14. package/dist/plugin/appearance/src/plugin/battery/types/battery.d.ts +3 -3
  15. package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  16. package/dist/plugin/appearance/src/plugin/dimension/constants/index.d.ts +8 -3
  17. package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +37 -15
  18. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  19. package/dist/plugin/appearance/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  20. package/dist/plugin/appearance/src/plugin/notification/types/notification.d.ts +4 -4
  21. package/dist/plugin/appearance/src/plugin/open/types/open.d.ts +12 -12
  22. package/dist/plugin/appearance/src/plugin/permission/constants/index.d.ts +3 -1
  23. package/dist/plugin/appearance/src/plugin/permission/types/permission.d.ts +7 -4
  24. package/dist/plugin/appearance/src/plugin/pip/types/pip.d.ts +7 -7
  25. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +13 -13
  26. package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +2 -2
  27. package/dist/plugin/appearance/src/plugin/vibration/types/vibration.d.ts +3 -3
  28. package/dist/plugin/appearance/src/types/subscription-manager.d.ts +3 -3
  29. package/dist/plugin/appearance/src/utils/create-subscription-manager.d.ts +1 -1
  30. package/dist/plugin/badge/index.d.ts +3 -3
  31. package/dist/plugin/badge/src/plugin/appearance/types/appearance.d.ts +3 -3
  32. package/dist/plugin/badge/src/plugin/badge/types/badge.d.ts +3 -3
  33. package/dist/plugin/badge/src/plugin/battery/types/battery.d.ts +3 -3
  34. package/dist/plugin/badge/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  35. package/dist/plugin/badge/src/plugin/dimension/constants/index.d.ts +8 -3
  36. package/dist/plugin/badge/src/plugin/dimension/types/dimensions.d.ts +37 -15
  37. package/dist/plugin/badge/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  38. package/dist/plugin/badge/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  39. package/dist/plugin/badge/src/plugin/notification/types/notification.d.ts +4 -4
  40. package/dist/plugin/badge/src/plugin/open/types/open.d.ts +12 -12
  41. package/dist/plugin/badge/src/plugin/permission/constants/index.d.ts +3 -1
  42. package/dist/plugin/badge/src/plugin/permission/types/permission.d.ts +7 -4
  43. package/dist/plugin/badge/src/plugin/pip/types/pip.d.ts +7 -7
  44. package/dist/plugin/badge/src/plugin/platform/types/platform.d.ts +13 -13
  45. package/dist/plugin/badge/src/plugin/theme/types/theme.d.ts +2 -2
  46. package/dist/plugin/badge/src/plugin/vibration/types/vibration.d.ts +3 -3
  47. package/dist/plugin/badge/src/types/subscription-manager.d.ts +3 -3
  48. package/dist/plugin/badge/src/utils/create-subscription-manager.d.ts +1 -1
  49. package/dist/plugin/battery/index.d.ts +3 -3
  50. package/dist/plugin/battery/src/plugin/appearance/types/appearance.d.ts +3 -3
  51. package/dist/plugin/battery/src/plugin/badge/types/badge.d.ts +3 -3
  52. package/dist/plugin/battery/src/plugin/battery/types/battery.d.ts +3 -3
  53. package/dist/plugin/battery/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  54. package/dist/plugin/battery/src/plugin/dimension/constants/index.d.ts +8 -3
  55. package/dist/plugin/battery/src/plugin/dimension/types/dimensions.d.ts +37 -15
  56. package/dist/plugin/battery/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  57. package/dist/plugin/battery/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  58. package/dist/plugin/battery/src/plugin/notification/types/notification.d.ts +4 -4
  59. package/dist/plugin/battery/src/plugin/open/types/open.d.ts +12 -12
  60. package/dist/plugin/battery/src/plugin/permission/constants/index.d.ts +3 -1
  61. package/dist/plugin/battery/src/plugin/permission/types/permission.d.ts +7 -4
  62. package/dist/plugin/battery/src/plugin/pip/types/pip.d.ts +7 -7
  63. package/dist/plugin/battery/src/plugin/platform/types/platform.d.ts +13 -13
  64. package/dist/plugin/battery/src/plugin/theme/types/theme.d.ts +2 -2
  65. package/dist/plugin/battery/src/plugin/vibration/types/vibration.d.ts +3 -3
  66. package/dist/plugin/battery/src/types/subscription-manager.d.ts +3 -3
  67. package/dist/plugin/battery/src/utils/create-subscription-manager.d.ts +1 -1
  68. package/dist/plugin/clipboard/index.d.ts +2 -2
  69. package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +3 -3
  70. package/dist/plugin/clipboard/src/plugin/badge/types/badge.d.ts +3 -3
  71. package/dist/plugin/clipboard/src/plugin/battery/types/battery.d.ts +3 -3
  72. package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  73. package/dist/plugin/clipboard/src/plugin/dimension/constants/index.d.ts +8 -3
  74. package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +37 -15
  75. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  76. package/dist/plugin/clipboard/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  77. package/dist/plugin/clipboard/src/plugin/notification/types/notification.d.ts +4 -4
  78. package/dist/plugin/clipboard/src/plugin/open/types/open.d.ts +12 -12
  79. package/dist/plugin/clipboard/src/plugin/permission/constants/index.d.ts +3 -1
  80. package/dist/plugin/clipboard/src/plugin/permission/types/permission.d.ts +7 -4
  81. package/dist/plugin/clipboard/src/plugin/pip/types/pip.d.ts +7 -7
  82. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +13 -13
  83. package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +2 -2
  84. package/dist/plugin/clipboard/src/plugin/vibration/types/vibration.d.ts +3 -3
  85. package/dist/plugin/clipboard/src/types/subscription-manager.d.ts +3 -3
  86. package/dist/plugin/clipboard/src/utils/create-subscription-manager.d.ts +1 -1
  87. package/dist/plugin/dimension/index.cjs +310 -80
  88. package/dist/plugin/dimension/index.d.ts +48 -19
  89. package/dist/plugin/dimension/index.mjs +310 -80
  90. package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +3 -3
  91. package/dist/plugin/dimension/src/plugin/badge/types/badge.d.ts +3 -3
  92. package/dist/plugin/dimension/src/plugin/battery/types/battery.d.ts +3 -3
  93. package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  94. package/dist/plugin/dimension/src/plugin/dimension/constants/index.d.ts +8 -3
  95. package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +37 -15
  96. package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  97. package/dist/plugin/dimension/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  98. package/dist/plugin/dimension/src/plugin/notification/types/notification.d.ts +4 -4
  99. package/dist/plugin/dimension/src/plugin/open/types/open.d.ts +12 -12
  100. package/dist/plugin/dimension/src/plugin/permission/constants/index.d.ts +3 -1
  101. package/dist/plugin/dimension/src/plugin/permission/types/permission.d.ts +7 -4
  102. package/dist/plugin/dimension/src/plugin/pip/types/pip.d.ts +7 -7
  103. package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +13 -13
  104. package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +2 -2
  105. package/dist/plugin/dimension/src/plugin/vibration/types/vibration.d.ts +3 -3
  106. package/dist/plugin/dimension/src/types/subscription-manager.d.ts +3 -3
  107. package/dist/plugin/dimension/src/utils/create-subscription-manager.d.ts +1 -1
  108. package/dist/plugin/fullscreen/index.cjs +87 -80
  109. package/dist/plugin/fullscreen/index.d.ts +7 -7
  110. package/dist/plugin/fullscreen/index.mjs +87 -80
  111. package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +3 -3
  112. package/dist/plugin/fullscreen/src/plugin/badge/types/badge.d.ts +3 -3
  113. package/dist/plugin/fullscreen/src/plugin/battery/types/battery.d.ts +3 -3
  114. package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  115. package/dist/plugin/fullscreen/src/plugin/dimension/constants/index.d.ts +8 -3
  116. package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +37 -15
  117. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  118. package/dist/plugin/fullscreen/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  119. package/dist/plugin/fullscreen/src/plugin/notification/types/notification.d.ts +4 -4
  120. package/dist/plugin/fullscreen/src/plugin/open/types/open.d.ts +12 -12
  121. package/dist/plugin/fullscreen/src/plugin/permission/constants/index.d.ts +3 -1
  122. package/dist/plugin/fullscreen/src/plugin/permission/types/permission.d.ts +7 -4
  123. package/dist/plugin/fullscreen/src/plugin/pip/types/pip.d.ts +7 -7
  124. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +13 -13
  125. package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +2 -2
  126. package/dist/plugin/fullscreen/src/plugin/vibration/types/vibration.d.ts +3 -3
  127. package/dist/plugin/fullscreen/src/types/subscription-manager.d.ts +3 -3
  128. package/dist/plugin/fullscreen/src/utils/create-subscription-manager.d.ts +1 -1
  129. package/dist/plugin/geolocation/index.cjs +245 -176
  130. package/dist/plugin/geolocation/index.d.ts +4 -4
  131. package/dist/plugin/geolocation/index.mjs +245 -176
  132. package/dist/plugin/geolocation/src/plugin/appearance/types/appearance.d.ts +3 -3
  133. package/dist/plugin/geolocation/src/plugin/badge/types/badge.d.ts +3 -3
  134. package/dist/plugin/geolocation/src/plugin/battery/types/battery.d.ts +3 -3
  135. package/dist/plugin/geolocation/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  136. package/dist/plugin/geolocation/src/plugin/dimension/constants/index.d.ts +8 -3
  137. package/dist/plugin/geolocation/src/plugin/dimension/types/dimensions.d.ts +37 -15
  138. package/dist/plugin/geolocation/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  139. package/dist/plugin/geolocation/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  140. package/dist/plugin/geolocation/src/plugin/notification/types/notification.d.ts +4 -4
  141. package/dist/plugin/geolocation/src/plugin/open/types/open.d.ts +12 -12
  142. package/dist/plugin/geolocation/src/plugin/permission/constants/index.d.ts +3 -1
  143. package/dist/plugin/geolocation/src/plugin/permission/types/permission.d.ts +7 -4
  144. package/dist/plugin/geolocation/src/plugin/pip/types/pip.d.ts +7 -7
  145. package/dist/plugin/geolocation/src/plugin/platform/types/platform.d.ts +13 -13
  146. package/dist/plugin/geolocation/src/plugin/theme/types/theme.d.ts +2 -2
  147. package/dist/plugin/geolocation/src/plugin/vibration/types/vibration.d.ts +3 -3
  148. package/dist/plugin/geolocation/src/types/subscription-manager.d.ts +3 -3
  149. package/dist/plugin/geolocation/src/utils/create-subscription-manager.d.ts +1 -1
  150. package/dist/plugin/notification/index.cjs +288 -13
  151. package/dist/plugin/notification/index.d.ts +4 -4
  152. package/dist/plugin/notification/index.mjs +288 -13
  153. package/dist/plugin/notification/src/plugin/appearance/types/appearance.d.ts +3 -3
  154. package/dist/plugin/notification/src/plugin/badge/types/badge.d.ts +3 -3
  155. package/dist/plugin/notification/src/plugin/battery/types/battery.d.ts +3 -3
  156. package/dist/plugin/notification/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  157. package/dist/plugin/notification/src/plugin/dimension/constants/index.d.ts +8 -3
  158. package/dist/plugin/notification/src/plugin/dimension/types/dimensions.d.ts +37 -15
  159. package/dist/plugin/notification/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  160. package/dist/plugin/notification/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  161. package/dist/plugin/notification/src/plugin/notification/types/notification.d.ts +4 -4
  162. package/dist/plugin/notification/src/plugin/open/types/open.d.ts +12 -12
  163. package/dist/plugin/notification/src/plugin/permission/constants/index.d.ts +3 -1
  164. package/dist/plugin/notification/src/plugin/permission/types/permission.d.ts +7 -4
  165. package/dist/plugin/notification/src/plugin/pip/types/pip.d.ts +7 -7
  166. package/dist/plugin/notification/src/plugin/platform/types/platform.d.ts +13 -13
  167. package/dist/plugin/notification/src/plugin/theme/types/theme.d.ts +2 -2
  168. package/dist/plugin/notification/src/plugin/vibration/types/vibration.d.ts +3 -3
  169. package/dist/plugin/notification/src/types/subscription-manager.d.ts +3 -3
  170. package/dist/plugin/notification/src/utils/create-subscription-manager.d.ts +1 -1
  171. package/dist/plugin/open/index.cjs +58 -49
  172. package/dist/plugin/open/index.d.ts +12 -12
  173. package/dist/plugin/open/index.mjs +58 -49
  174. package/dist/plugin/open/src/plugin/appearance/types/appearance.d.ts +3 -3
  175. package/dist/plugin/open/src/plugin/badge/types/badge.d.ts +3 -3
  176. package/dist/plugin/open/src/plugin/battery/types/battery.d.ts +3 -3
  177. package/dist/plugin/open/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  178. package/dist/plugin/open/src/plugin/dimension/constants/index.d.ts +8 -3
  179. package/dist/plugin/open/src/plugin/dimension/types/dimensions.d.ts +37 -15
  180. package/dist/plugin/open/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  181. package/dist/plugin/open/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  182. package/dist/plugin/open/src/plugin/notification/types/notification.d.ts +4 -4
  183. package/dist/plugin/open/src/plugin/open/types/open.d.ts +12 -12
  184. package/dist/plugin/open/src/plugin/permission/constants/index.d.ts +3 -1
  185. package/dist/plugin/open/src/plugin/permission/types/permission.d.ts +7 -4
  186. package/dist/plugin/open/src/plugin/pip/types/pip.d.ts +7 -7
  187. package/dist/plugin/open/src/plugin/platform/types/platform.d.ts +13 -13
  188. package/dist/plugin/open/src/plugin/theme/types/theme.d.ts +2 -2
  189. package/dist/plugin/open/src/plugin/vibration/types/vibration.d.ts +3 -3
  190. package/dist/plugin/open/src/types/subscription-manager.d.ts +3 -3
  191. package/dist/plugin/open/src/utils/create-subscription-manager.d.ts +1 -1
  192. package/dist/plugin/permission/index.cjs +372 -13
  193. package/dist/plugin/permission/index.d.ts +11 -5
  194. package/dist/plugin/permission/index.mjs +372 -13
  195. package/dist/plugin/permission/src/plugin/appearance/types/appearance.d.ts +3 -3
  196. package/dist/plugin/permission/src/plugin/badge/types/badge.d.ts +3 -3
  197. package/dist/plugin/permission/src/plugin/battery/types/battery.d.ts +3 -3
  198. package/dist/plugin/permission/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  199. package/dist/plugin/permission/src/plugin/dimension/constants/index.d.ts +8 -3
  200. package/dist/plugin/permission/src/plugin/dimension/types/dimensions.d.ts +37 -15
  201. package/dist/plugin/permission/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  202. package/dist/plugin/permission/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  203. package/dist/plugin/permission/src/plugin/notification/types/notification.d.ts +4 -4
  204. package/dist/plugin/permission/src/plugin/open/types/open.d.ts +12 -12
  205. package/dist/plugin/permission/src/plugin/permission/constants/index.d.ts +3 -1
  206. package/dist/plugin/permission/src/plugin/permission/types/permission.d.ts +7 -4
  207. package/dist/plugin/permission/src/plugin/pip/types/pip.d.ts +7 -7
  208. package/dist/plugin/permission/src/plugin/platform/types/platform.d.ts +13 -13
  209. package/dist/plugin/permission/src/plugin/theme/types/theme.d.ts +2 -2
  210. package/dist/plugin/permission/src/plugin/vibration/types/vibration.d.ts +3 -3
  211. package/dist/plugin/permission/src/types/subscription-manager.d.ts +3 -3
  212. package/dist/plugin/permission/src/utils/create-subscription-manager.d.ts +1 -1
  213. package/dist/plugin/pip/index.cjs +49 -46
  214. package/dist/plugin/pip/index.d.ts +7 -7
  215. package/dist/plugin/pip/index.mjs +49 -46
  216. package/dist/plugin/pip/src/plugin/appearance/types/appearance.d.ts +3 -3
  217. package/dist/plugin/pip/src/plugin/badge/types/badge.d.ts +3 -3
  218. package/dist/plugin/pip/src/plugin/battery/types/battery.d.ts +3 -3
  219. package/dist/plugin/pip/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  220. package/dist/plugin/pip/src/plugin/dimension/constants/index.d.ts +8 -3
  221. package/dist/plugin/pip/src/plugin/dimension/types/dimensions.d.ts +37 -15
  222. package/dist/plugin/pip/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  223. package/dist/plugin/pip/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  224. package/dist/plugin/pip/src/plugin/notification/types/notification.d.ts +4 -4
  225. package/dist/plugin/pip/src/plugin/open/types/open.d.ts +12 -12
  226. package/dist/plugin/pip/src/plugin/permission/constants/index.d.ts +3 -1
  227. package/dist/plugin/pip/src/plugin/permission/types/permission.d.ts +7 -4
  228. package/dist/plugin/pip/src/plugin/pip/types/pip.d.ts +7 -7
  229. package/dist/plugin/pip/src/plugin/platform/types/platform.d.ts +13 -13
  230. package/dist/plugin/pip/src/plugin/theme/types/theme.d.ts +2 -2
  231. package/dist/plugin/pip/src/plugin/vibration/types/vibration.d.ts +3 -3
  232. package/dist/plugin/pip/src/types/subscription-manager.d.ts +3 -3
  233. package/dist/plugin/pip/src/utils/create-subscription-manager.d.ts +1 -1
  234. package/dist/plugin/platform/index.cjs +87 -80
  235. package/dist/plugin/platform/index.d.ts +13 -13
  236. package/dist/plugin/platform/index.mjs +87 -80
  237. package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +3 -3
  238. package/dist/plugin/platform/src/plugin/badge/types/badge.d.ts +3 -3
  239. package/dist/plugin/platform/src/plugin/battery/types/battery.d.ts +3 -3
  240. package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  241. package/dist/plugin/platform/src/plugin/dimension/constants/index.d.ts +8 -3
  242. package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +37 -15
  243. package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  244. package/dist/plugin/platform/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  245. package/dist/plugin/platform/src/plugin/notification/types/notification.d.ts +4 -4
  246. package/dist/plugin/platform/src/plugin/open/types/open.d.ts +12 -12
  247. package/dist/plugin/platform/src/plugin/permission/constants/index.d.ts +3 -1
  248. package/dist/plugin/platform/src/plugin/permission/types/permission.d.ts +7 -4
  249. package/dist/plugin/platform/src/plugin/pip/types/pip.d.ts +7 -7
  250. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +13 -13
  251. package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -2
  252. package/dist/plugin/platform/src/plugin/vibration/types/vibration.d.ts +3 -3
  253. package/dist/plugin/platform/src/types/subscription-manager.d.ts +3 -3
  254. package/dist/plugin/platform/src/utils/create-subscription-manager.d.ts +1 -1
  255. package/dist/plugin/theme/index.cjs +58 -49
  256. package/dist/plugin/theme/index.d.ts +2 -2
  257. package/dist/plugin/theme/index.mjs +58 -49
  258. package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +3 -3
  259. package/dist/plugin/theme/src/plugin/badge/types/badge.d.ts +3 -3
  260. package/dist/plugin/theme/src/plugin/battery/types/battery.d.ts +3 -3
  261. package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  262. package/dist/plugin/theme/src/plugin/dimension/constants/index.d.ts +8 -3
  263. package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +37 -15
  264. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  265. package/dist/plugin/theme/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  266. package/dist/plugin/theme/src/plugin/notification/types/notification.d.ts +4 -4
  267. package/dist/plugin/theme/src/plugin/open/types/open.d.ts +12 -12
  268. package/dist/plugin/theme/src/plugin/permission/constants/index.d.ts +3 -1
  269. package/dist/plugin/theme/src/plugin/permission/types/permission.d.ts +7 -4
  270. package/dist/plugin/theme/src/plugin/pip/types/pip.d.ts +7 -7
  271. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +13 -13
  272. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -2
  273. package/dist/plugin/theme/src/plugin/vibration/types/vibration.d.ts +3 -3
  274. package/dist/plugin/theme/src/types/subscription-manager.d.ts +3 -3
  275. package/dist/plugin/theme/src/utils/create-subscription-manager.d.ts +1 -1
  276. package/dist/plugin/vibration/index.d.ts +3 -3
  277. package/dist/plugin/vibration/src/plugin/appearance/types/appearance.d.ts +3 -3
  278. package/dist/plugin/vibration/src/plugin/badge/types/badge.d.ts +3 -3
  279. package/dist/plugin/vibration/src/plugin/battery/types/battery.d.ts +3 -3
  280. package/dist/plugin/vibration/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  281. package/dist/plugin/vibration/src/plugin/dimension/constants/index.d.ts +8 -3
  282. package/dist/plugin/vibration/src/plugin/dimension/types/dimensions.d.ts +37 -15
  283. package/dist/plugin/vibration/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  284. package/dist/plugin/vibration/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  285. package/dist/plugin/vibration/src/plugin/notification/types/notification.d.ts +4 -4
  286. package/dist/plugin/vibration/src/plugin/open/types/open.d.ts +12 -12
  287. package/dist/plugin/vibration/src/plugin/permission/constants/index.d.ts +3 -1
  288. package/dist/plugin/vibration/src/plugin/permission/types/permission.d.ts +7 -4
  289. package/dist/plugin/vibration/src/plugin/pip/types/pip.d.ts +7 -7
  290. package/dist/plugin/vibration/src/plugin/platform/types/platform.d.ts +13 -13
  291. package/dist/plugin/vibration/src/plugin/theme/types/theme.d.ts +2 -2
  292. package/dist/plugin/vibration/src/plugin/vibration/types/vibration.d.ts +3 -3
  293. package/dist/plugin/vibration/src/types/subscription-manager.d.ts +3 -3
  294. package/dist/plugin/vibration/src/utils/create-subscription-manager.d.ts +1 -1
  295. package/dist/src/plugin/appearance/types/appearance.d.ts +3 -3
  296. package/dist/src/plugin/badge/types/badge.d.ts +3 -3
  297. package/dist/src/plugin/battery/types/battery.d.ts +3 -3
  298. package/dist/src/plugin/clipboard/types/clipboard.d.ts +2 -2
  299. package/dist/src/plugin/dimension/constants/index.d.ts +8 -3
  300. package/dist/src/plugin/dimension/types/dimensions.d.ts +37 -15
  301. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
  302. package/dist/src/plugin/geolocation/types/geolocation.d.ts +4 -4
  303. package/dist/src/plugin/notification/types/notification.d.ts +4 -4
  304. package/dist/src/plugin/open/types/open.d.ts +12 -12
  305. package/dist/src/plugin/permission/constants/index.d.ts +3 -1
  306. package/dist/src/plugin/permission/types/permission.d.ts +7 -4
  307. package/dist/src/plugin/pip/types/pip.d.ts +7 -7
  308. package/dist/src/plugin/platform/types/platform.d.ts +13 -13
  309. package/dist/src/plugin/theme/types/theme.d.ts +2 -2
  310. package/dist/src/plugin/vibration/types/vibration.d.ts +3 -3
  311. package/dist/src/types/subscription-manager.d.ts +3 -3
  312. package/dist/src/utils/create-subscription-manager.d.ts +1 -1
  313. package/package.json +1 -1
@@ -1,15 +1,17 @@
1
1
  import { ENV_PRESETS, Orientation } from "../constants";
2
+ import { NotSupportedError } from "../../../errors/not-supported-error";
3
+ import { PermissionNotGrantedError } from "../../../errors/permission-not-granted-error";
2
4
  export type EnvironmentPresetKey = keyof typeof ENV_PRESETS;
3
5
  export type EnvironmentPresetAttribute<K extends EnvironmentPresetKey> = keyof typeof ENV_PRESETS[K];
4
6
  export type EnvironmentPresetValues<K extends EnvironmentPresetKey> = {
5
7
  [P in EnvironmentPresetAttribute<K>]: number;
6
8
  };
7
9
  export declare interface Environment {
8
- safeAreaInset: EnvironmentObserver<'safe-area-inset'>;
9
- safeAreaMaxInset: EnvironmentObserver<'safe-area-max-inset'>;
10
- keyboardInset: EnvironmentObserver<'keyboard-inset'>;
11
- titlebarArea: EnvironmentObserver<'titlebar-area'>;
12
- viewportSegment: EnvironmentObserver<'viewport-segment'>;
10
+ readonly safeAreaInset: EnvironmentObserver<'safe-area-inset'>;
11
+ readonly safeAreaMaxInset: EnvironmentObserver<'safe-area-max-inset'>;
12
+ readonly keyboardInset: EnvironmentObserver<'keyboard-inset'>;
13
+ readonly titlebarArea: EnvironmentObserver<'titlebar-area'>;
14
+ readonly viewportSegment: EnvironmentObserver<'viewport-segment'>;
13
15
  }
14
16
  export declare interface SegmentsObserver {
15
17
  get value(): EnvironmentPresetValues<'viewport-segment'>[];
@@ -22,19 +24,39 @@ export declare type EnvironmentObserver<K extends EnvironmentPresetKey> = K exte
22
24
  useCssVariable(prefix: string): () => void;
23
25
  };
24
26
  export declare interface Dimensions {
25
- outerWidth: number;
26
- outerHeight: number;
27
- innerWidth: number;
28
- innerHeight: number;
29
- scale: number;
30
- orientation: Orientation;
27
+ readonly outerWidth: number;
28
+ readonly outerHeight: number;
29
+ readonly innerWidth: number;
30
+ readonly innerHeight: number;
31
+ readonly scale: number;
32
+ }
33
+ export declare interface DeviceOrientationValue {
34
+ readonly alpha: number | null;
35
+ readonly beta: number | null;
36
+ readonly gamma: number | null;
37
+ readonly absolute: boolean;
38
+ }
39
+ export declare interface DeviceOrientationInstance {
40
+ get supported(): boolean;
41
+ readonly value: Promise<DeviceOrientationValue>;
42
+ onChange(listener: (value: DeviceOrientationValue) => void, options?: AddEventListenerOptions): () => void;
43
+ }
44
+ export declare interface ScreenOrientationInstance {
45
+ get supported(): boolean;
46
+ readonly value: Orientation;
47
+ onChange(listener: (value: Orientation) => void, options?: AddEventListenerOptions): () => void;
31
48
  }
32
49
  export declare interface DimensionInstance {
33
50
  get value(): Dimensions;
34
- environment: Environment;
51
+ readonly environment: Environment;
52
+ readonly screenOrientation: ScreenOrientationInstance;
53
+ readonly deviceOrientation: DeviceOrientationInstance;
35
54
  onChange(listener: (dimension: Dimensions) => void, options?: AddEventListenerOptions): () => void;
36
- Constants: {
37
- Orientation: typeof Orientation;
55
+ readonly Constants: {
56
+ readonly Orientation: typeof Orientation;
57
+ };
58
+ readonly Errors: {
59
+ readonly NotSupportedError: typeof NotSupportedError;
60
+ readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
38
61
  };
39
- Errors: {};
40
62
  }
@@ -11,14 +11,14 @@ export declare interface FullscreenInstance {
11
11
  onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
12
  onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
13
  onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
14
- Constants: {};
15
- Errors: {
16
- NotSupportedError: typeof NotSupportedError;
17
- InvalidStateError: typeof InvalidStateError;
14
+ readonly Constants: {};
15
+ readonly Errors: {
16
+ readonly NotSupportedError: typeof NotSupportedError;
17
+ readonly InvalidStateError: typeof InvalidStateError;
18
18
  };
19
19
  }
20
20
  export declare interface FullscreenEventPayload {
21
- nativeEvent: Event;
22
- element: Element;
23
- isActive: boolean;
21
+ readonly nativeEvent: Event;
22
+ readonly element: Element;
23
+ readonly isActive: boolean;
24
24
  }
@@ -4,9 +4,9 @@ export declare interface GeolocationInstance {
4
4
  get supported(): boolean;
5
5
  get value(): Promise<GeolocationCoordinates>;
6
6
  onChange(listener: (coordinates: GeolocationCoordinates) => void, options?: AddEventListenerOptions): () => void;
7
- Constants: {};
8
- Errors: {
9
- NotSupportedError: typeof NotSupportedError;
10
- PermissionNotGrantedError: typeof PermissionNotGrantedError;
7
+ readonly Constants: {};
8
+ readonly Errors: {
9
+ readonly NotSupportedError: typeof NotSupportedError;
10
+ readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
11
11
  };
12
12
  }
@@ -19,9 +19,9 @@ export interface NotificationOptions {
19
19
  export declare interface NotificationInstance {
20
20
  send(options: NotificationOptions): Promise<Notification>;
21
21
  get supported(): boolean;
22
- Constants: {};
23
- Errors: {
24
- NotSupportedError: typeof NotSupportedError;
25
- PermissionNotGrantedError: typeof PermissionNotGrantedError;
22
+ readonly Constants: {};
23
+ readonly Errors: {
24
+ readonly NotSupportedError: typeof NotSupportedError;
25
+ readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
26
26
  };
27
27
  }
@@ -82,8 +82,8 @@ export interface DirectoryOptions {
82
82
  startIn?: ExplorerStartIn;
83
83
  }
84
84
  export interface FileWithPath {
85
- file: File;
86
- relativePath: string;
85
+ readonly file: File;
86
+ readonly relativePath: string;
87
87
  }
88
88
  export interface CameraOptions {
89
89
  type?: CameraType;
@@ -175,7 +175,7 @@ export declare interface OpenInstance {
175
175
  contact(options?: ContactOptions): Promise<Contact[]>;
176
176
  share(options: ShareData): Promise<void>;
177
177
  calendar(options: CalendarOptions): void;
178
- supported: {
178
+ readonly supported: {
179
179
  get intent(): boolean;
180
180
  get universal(): boolean;
181
181
  get setting(): boolean;
@@ -185,15 +185,15 @@ export declare interface OpenInstance {
185
185
  get share(): boolean;
186
186
  get calendar(): boolean;
187
187
  };
188
- Constants: {
189
- AppOpenState: typeof AppOpenState;
190
- SettingType: typeof SettingType;
191
- CameraType: typeof CameraType;
192
- CaptureType: typeof CaptureType;
188
+ readonly Constants: {
189
+ readonly AppOpenState: typeof AppOpenState;
190
+ readonly SettingType: typeof SettingType;
191
+ readonly CameraType: typeof CameraType;
192
+ readonly CaptureType: typeof CaptureType;
193
193
  };
194
- Errors: {
195
- URLOpenError: typeof URLOpenError;
196
- NotSupportedError: typeof NotSupportedError;
197
- UserCancelledError: typeof UserCancelledError;
194
+ readonly Errors: {
195
+ readonly URLOpenError: typeof URLOpenError;
196
+ readonly NotSupportedError: typeof NotSupportedError;
197
+ readonly UserCancelledError: typeof UserCancelledError;
198
198
  };
199
199
  }
@@ -12,7 +12,9 @@ export declare enum PermissionType {
12
12
  Camera = "camera",
13
13
  ClipboardRead = "clipboard-read",
14
14
  Microphone = "microphone",
15
- MIDI = "midi"
15
+ MIDI = "midi",
16
+ DeviceOrientation = "device-orientation",
17
+ DeviceMotion = "device-motion"
16
18
  }
17
19
  export declare enum PermissionState {
18
20
  Grant = "grant",
@@ -1,11 +1,14 @@
1
1
  import { PermissionState, PermissionType } from "../constants";
2
+ import { NotSupportedError } from "../../../errors/not-supported-error";
2
3
  export declare interface PermissionInstance {
3
4
  get supported(): boolean;
4
5
  request(type: PermissionType): Promise<PermissionState>;
5
6
  check(type: PermissionType): Promise<PermissionState>;
6
- Constants: {
7
- PermissionType: typeof PermissionType;
8
- PermissionState: typeof PermissionState;
7
+ readonly Constants: {
8
+ readonly PermissionType: typeof PermissionType;
9
+ readonly PermissionState: typeof PermissionState;
10
+ };
11
+ readonly Errors: {
12
+ readonly NotSupportedError: typeof NotSupportedError;
9
13
  };
10
- Errors: {};
11
14
  }
@@ -11,14 +11,14 @@ export declare interface PipInstance {
11
11
  onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
12
12
  onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
13
13
  onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
14
- Constants: {};
15
- Errors: {
16
- NotSupportedError: typeof NotSupportedError;
17
- InvalidStateError: typeof InvalidStateError;
14
+ readonly Constants: {};
15
+ readonly Errors: {
16
+ readonly NotSupportedError: typeof NotSupportedError;
17
+ readonly InvalidStateError: typeof InvalidStateError;
18
18
  };
19
19
  }
20
20
  export declare interface PipEventPayload {
21
- nativeEvent: Event;
22
- element: HTMLVideoElement;
23
- isActive: boolean;
21
+ readonly nativeEvent: Event;
22
+ readonly element: HTMLVideoElement;
23
+ readonly isActive: boolean;
24
24
  }
@@ -14,24 +14,24 @@ export declare interface PlatformInstance {
14
14
  get isNode(): boolean;
15
15
  get isStandalone(): boolean;
16
16
  get isWebview(): boolean;
17
- Constants: {
18
- OS: typeof OS;
19
- Engines: typeof Engines;
20
- Browsers: typeof Browsers;
21
- Devices: typeof Devices;
17
+ readonly Constants: {
18
+ readonly OS: typeof OS;
19
+ readonly Engines: typeof Engines;
20
+ readonly Browsers: typeof Browsers;
21
+ readonly Devices: typeof Devices;
22
22
  };
23
- Errors: {};
23
+ readonly Errors: {};
24
24
  }
25
25
  export declare interface NameVersionPair<T> {
26
- name: T;
27
- version: string;
26
+ readonly name: T;
27
+ readonly version: string;
28
28
  }
29
29
  export declare interface Locale {
30
- language: string | null;
31
- languages: string[];
32
- timezone: string | null;
33
- offset: number;
34
- isRTL: boolean;
30
+ readonly language: string | null;
31
+ readonly languages: readonly string[];
32
+ readonly timezone: string | null;
33
+ readonly offset: number;
34
+ readonly isRTL: boolean;
35
35
  }
36
36
  export interface GPUAdapterInfo {
37
37
  readonly vendor?: string;
@@ -1,6 +1,6 @@
1
1
  export declare interface ThemeInstance {
2
2
  get value(): string | undefined;
3
3
  set value(color: string | undefined);
4
- Constants: {};
5
- Errors: {};
4
+ readonly Constants: {};
5
+ readonly Errors: {};
6
6
  }
@@ -3,8 +3,8 @@ export declare interface VibrationInstance {
3
3
  get supported(): boolean;
4
4
  run(pattern: number | number[]): boolean;
5
5
  stop(): boolean;
6
- Constants: {};
7
- Errors: {
8
- NotSupportedError: typeof NotSupportedError;
6
+ readonly Constants: {};
7
+ readonly Errors: {
8
+ readonly NotSupportedError: typeof NotSupportedError;
9
9
  };
10
10
  }
@@ -1,4 +1,4 @@
1
- export declare interface SubscriptionManager<T, U> {
2
- emit: (value: U) => void;
3
- subscribe: (listener: (value: U) => void, options?: AddEventListenerOptions) => () => void;
1
+ export declare interface SubscriptionManager<T> {
2
+ emit: (value: T) => void;
3
+ subscribe: (listener: (value: T) => void, options?: AddEventListenerOptions) => () => void;
4
4
  }
@@ -1,2 +1,2 @@
1
1
  import { SubscriptionManager } from "../types/subscription-manager";
2
- export default function createSubscriptionManager<T, U>(attach: () => void, detach: () => void): SubscriptionManager<T, U>;
2
+ export default function createSubscriptionManager<T>(attach: () => void, detach: () => void): SubscriptionManager<T>;
@@ -372,9 +372,12 @@ var EventListener = {
372
372
 
373
373
  var currentUserAgent = exports.USER_AGENT;
374
374
  var parsedCache = null;
375
- var parsedFromHighEntropyValuesOS = {};
376
- var parsedFromHighEntropyValuesBrowser = {};
377
- var parsedFromHighEntropyValuesEngine = {};
375
+ var parsedFromHighEntropyValuesOSName = undefined;
376
+ var parsedFromHighEntropyValuesOSVersion = undefined;
377
+ var parsedFromHighEntropyValuesBrowserName = undefined;
378
+ var parsedFromHighEntropyValuesBrowserVersion = undefined;
379
+ var parsedFromHighEntropyValuesEngineName = undefined;
380
+ var parsedFromHighEntropyValuesEngineVersion = undefined;
378
381
  var parsedFromHighEntropyValuesDevice = null;
379
382
  var parsedFromNavigatorGPU = {};
380
383
  var cachedLocale = null;
@@ -421,9 +424,12 @@ function normalizeLocale(locale) {
421
424
  function invalidateCache() {
422
425
  parsedCache = null;
423
426
  cachedLocale = null;
424
- parsedFromHighEntropyValuesOS = {};
425
- parsedFromHighEntropyValuesBrowser = {};
426
- parsedFromHighEntropyValuesEngine = {};
427
+ parsedFromHighEntropyValuesOSName = undefined;
428
+ parsedFromHighEntropyValuesOSVersion = undefined;
429
+ parsedFromHighEntropyValuesBrowserName = undefined;
430
+ parsedFromHighEntropyValuesBrowserVersion = undefined;
431
+ parsedFromHighEntropyValuesEngineName = undefined;
432
+ parsedFromHighEntropyValuesEngineVersion = undefined;
427
433
  parsedFromHighEntropyValuesDevice = null;
428
434
  parsedFromNavigatorGPU = {};
429
435
  }
@@ -439,71 +445,74 @@ function getParsedCache() {
439
445
  return parsedCache;
440
446
  }
441
447
  function parseOS() {
442
- var result = { name: exports.OS.Unknown, version: '' };
448
+ var name = exports.OS.Unknown;
449
+ var version = '';
443
450
  for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
444
451
  var map = OS_RESOLVER_MAP[i];
445
452
  var matched = currentUserAgent.match(map[0]);
446
453
  if (matched !== null) {
447
- result.name = map[1];
448
- result.version = resolveVersion(matched[1], map[2]);
454
+ name = map[1];
455
+ version = resolveVersion(matched[1], map[2]);
449
456
  break;
450
457
  }
451
458
  }
452
- if (result.name === exports.OS.iOS && compareVersion(result.version, '18.6') === 0) {
453
- var version = /\) Version\/([\d.]+)/.exec(currentUserAgent);
454
- if (version !== null) {
455
- var major = parseInt(version[1].split('.')[0], 10);
459
+ if (name === exports.OS.iOS && compareVersion(version, '18.6') === 0) {
460
+ var execs = /\) Version\/([\d.]+)/.exec(currentUserAgent);
461
+ if (execs !== null) {
462
+ var major = parseInt(execs[1].split('.')[0], 10);
456
463
  if (major >= 26)
457
- result.version = version[1];
464
+ version = execs[1];
458
465
  }
459
466
  }
460
467
  if (currentUserAgent === exports.USER_AGENT) {
461
- if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
462
- result.name = parsedFromHighEntropyValuesOS.name;
463
- if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
464
- result.version = parsedFromHighEntropyValuesOS.version;
465
- if (result.name === exports.OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
466
- result.name = exports.OS.iOS;
468
+ if (typeof parsedFromHighEntropyValuesOSName !== 'undefined')
469
+ name = parsedFromHighEntropyValuesOSName;
470
+ if (typeof parsedFromHighEntropyValuesOSVersion !== 'undefined')
471
+ version = parsedFromHighEntropyValuesOSVersion;
472
+ if (name === exports.OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
473
+ name = exports.OS.iOS;
467
474
  }
468
- return result;
475
+ return { name: name, version: version };
469
476
  }
470
477
  function parseBrowser() {
471
- var result = { name: exports.Browsers.Unknown, version: '' };
478
+ var name = exports.Browsers.Unknown;
479
+ var version = '';
472
480
  for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
473
481
  var map = BROWSER_RESOLVER_MAP[i];
474
482
  var matched = currentUserAgent.match(map[0]);
475
483
  if (matched !== null) {
476
- result.name = map[1];
477
- result.version = resolveVersion(matched[1], map[2]);
484
+ name = map[1];
485
+ version = resolveVersion(matched[1], map[2]);
478
486
  break;
479
487
  }
480
488
  }
481
489
  if (currentUserAgent === exports.USER_AGENT) {
482
- if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
483
- result.name = parsedFromHighEntropyValuesBrowser.name;
484
- if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
485
- result.version = parsedFromHighEntropyValuesBrowser.version;
490
+ if (typeof parsedFromHighEntropyValuesBrowserName !== 'undefined')
491
+ name = parsedFromHighEntropyValuesBrowserName;
492
+ if (typeof parsedFromHighEntropyValuesBrowserVersion !== 'undefined')
493
+ version = parsedFromHighEntropyValuesBrowserVersion;
486
494
  }
487
- return result;
495
+ return { name: name, version: version };
488
496
  }
489
497
  function parseEngine() {
490
- var result = { name: exports.Engines.Unknown, version: '' };
498
+ var name = exports.Engines.Unknown;
499
+ var version = '';
491
500
  for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
492
501
  var map = ENGINE_RESOLVER_MAP[i];
493
502
  var matched = currentUserAgent.match(map[0]);
494
503
  if (matched !== null) {
495
- result.name = map[1];
496
- result.version = resolveVersion(matched[1], map[2]);
504
+ name = map[1];
505
+ version = resolveVersion(matched[1], map[2]);
497
506
  break;
498
507
  }
499
508
  }
500
509
  if (currentUserAgent === exports.USER_AGENT) {
501
- if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
502
- result.name = parsedFromHighEntropyValuesEngine.name;
503
- if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
504
- result.version = parsedFromHighEntropyValuesEngine.version;
510
+ if (typeof parsedFromHighEntropyValuesEngineName !== 'undefined')
511
+ name = parsedFromHighEntropyValuesEngineName;
512
+ if (typeof parsedFromHighEntropyValuesEngineVersion !== 'undefined')
513
+ version = parsedFromHighEntropyValuesEngineVersion;
505
514
  }
506
- return result;
515
+ return { name: name, version: version };
507
516
  }
508
517
  function getGPU() {
509
518
  return {
@@ -516,24 +525,22 @@ function getGPU() {
516
525
  function getLocale() {
517
526
  if (cachedLocale !== null)
518
527
  return cachedLocale;
519
- var locale = {
520
- language: null,
521
- languages: [],
522
- timezone: null,
523
- offset: 0,
524
- isRTL: false,
525
- };
526
- var isRTL = null;
527
- function addLanguages(language) {
528
- for (var i = 0; i < language.length; i++)
529
- addLanguage(language[i]);
528
+ var language = null;
529
+ var languages = [];
530
+ var timezone = null;
531
+ var offset = 0;
532
+ var isRTL = false;
533
+ var isRTLResolved = null;
534
+ function addLanguages(langs) {
535
+ for (var i = 0; i < langs.length; i++)
536
+ addLanguage(langs[i]);
530
537
  }
531
- function addLanguage(language) {
532
- language = normalizeLocale(language);
533
- if (typeof language === 'string' && locale.languages.indexOf(language) === -1) {
534
- if (locale.language === null)
535
- locale.language = language;
536
- locale.languages.push(language);
538
+ function addLanguage(lang) {
539
+ lang = normalizeLocale(lang);
540
+ if (typeof lang === 'string' && languages.indexOf(lang) === -1) {
541
+ if (language === null)
542
+ language = lang;
543
+ languages.push(lang);
537
544
  }
538
545
  }
539
546
  if (typeof Intl !== 'undefined') {
@@ -543,7 +550,7 @@ function getLocale() {
543
550
  catch (_) {
544
551
  }
545
552
  try {
546
- locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
553
+ timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
547
554
  }
548
555
  catch (_) {
549
556
  }
@@ -561,38 +568,38 @@ function getLocale() {
561
568
  addLanguage(globalThis.navigator.systemLanguage);
562
569
  }
563
570
  try {
564
- locale.offset = new Date().getTimezoneOffset() * -1;
571
+ offset = new Date().getTimezoneOffset() * -1;
565
572
  }
566
573
  catch (_) {
567
574
  }
568
- if (typeof locale.language === 'string') {
575
+ if (typeof language === 'string') {
569
576
  if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
570
577
  try {
571
- var intlLocale = new Intl.Locale(locale.language);
578
+ var intlLocale = new Intl.Locale(language);
572
579
  if (typeof intlLocale.getTextInfo === 'function')
573
- isRTL = intlLocale.getTextInfo().direction === 'rtl';
580
+ isRTLResolved = intlLocale.getTextInfo().direction === 'rtl';
574
581
  else if (typeof intlLocale.textInfo !== 'undefined')
575
- isRTL = intlLocale.textInfo.direction === 'rtl';
582
+ isRTLResolved = intlLocale.textInfo.direction === 'rtl';
576
583
  }
577
584
  catch (_) {
578
585
  }
579
586
  }
580
- if (typeof isRTL !== 'boolean') {
581
- var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
587
+ if (typeof isRTLResolved !== 'boolean') {
588
+ var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(language);
582
589
  if (matched !== null) {
583
- var language = matched[1].toLowerCase();
590
+ var lang = matched[1].toLowerCase();
584
591
  for (var i = 0; i < RTL_LANGUAGES.length; i++) {
585
- if (RTL_LANGUAGES[i] === language) {
586
- isRTL = true;
592
+ if (RTL_LANGUAGES[i] === lang) {
593
+ isRTLResolved = true;
587
594
  break;
588
595
  }
589
596
  }
590
597
  }
591
598
  }
592
599
  }
593
- if (typeof isRTL === 'boolean')
594
- locale.isRTL = isRTL;
595
- cachedLocale = locale;
600
+ if (typeof isRTLResolved === 'boolean')
601
+ isRTL = isRTLResolved;
602
+ cachedLocale = { language: language, languages: languages, timezone: timezone, offset: offset, isRTL: isRTL };
596
603
  return cachedLocale;
597
604
  }
598
605
  function getDevice() {
@@ -643,38 +650,38 @@ function parseFromHighEntropyValues() {
643
650
  if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
644
651
  browserName = brandName;
645
652
  if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
646
- parsedFromHighEntropyValuesBrowser.name = exports.Browsers.Chrome;
653
+ parsedFromHighEntropyValuesBrowserName = exports.Browsers.Chrome;
647
654
  else if (browserName === 'Edge' || browserName === 'Edge WebView2')
648
- parsedFromHighEntropyValuesBrowser.name = exports.Browsers.Edge;
655
+ parsedFromHighEntropyValuesBrowserName = exports.Browsers.Edge;
649
656
  else if (browserName === 'Opera Mobi')
650
- parsedFromHighEntropyValuesBrowser.name = exports.Browsers.Opera;
651
- parsedFromHighEntropyValuesBrowser.version = brandVersion;
657
+ parsedFromHighEntropyValuesBrowserName = exports.Browsers.Opera;
658
+ parsedFromHighEntropyValuesBrowserVersion = brandVersion;
652
659
  }
653
660
  prevBrandName = brandName;
654
661
  }
655
662
  if (brandName === 'Chromium')
656
- parsedFromHighEntropyValuesEngine.version = brandVersion;
663
+ parsedFromHighEntropyValuesEngineVersion = brandVersion;
657
664
  }
658
665
  if (typeof platformVersion === 'string') {
659
666
  if (getParsedCache().os.name === exports.OS.Windows) {
660
667
  if (parseInt(platformVersion.split('.')[0], 10) >= 13)
661
- parsedFromHighEntropyValuesOS.version = '11';
668
+ parsedFromHighEntropyValuesOSVersion = '11';
662
669
  else
663
- parsedFromHighEntropyValuesOS.version = '10';
670
+ parsedFromHighEntropyValuesOSVersion = '10';
664
671
  }
665
672
  else {
666
- parsedFromHighEntropyValuesOS.version = platformVersion;
673
+ parsedFromHighEntropyValuesOSVersion = platformVersion;
667
674
  }
668
675
  }
669
676
  if (typeof platform === 'string') {
670
677
  if (/android/i.test(platform))
671
- parsedFromHighEntropyValuesOS.name = exports.OS.Android;
678
+ parsedFromHighEntropyValuesOSName = exports.OS.Android;
672
679
  else if (/ios|iphone|ipad/i.test(platform))
673
- parsedFromHighEntropyValuesOS.name = exports.OS.iOS;
680
+ parsedFromHighEntropyValuesOSName = exports.OS.iOS;
674
681
  else if (/windows|win32/i.test(platform))
675
- parsedFromHighEntropyValuesOS.name = exports.OS.Windows;
682
+ parsedFromHighEntropyValuesOSName = exports.OS.Windows;
676
683
  else if (/macos|macintel/i.test(platform))
677
- parsedFromHighEntropyValuesOS.name = exports.OS.MacOS;
684
+ parsedFromHighEntropyValuesOSName = exports.OS.MacOS;
678
685
  }
679
686
  if (result.mobile === true)
680
687
  parsedFromHighEntropyValuesDevice = exports.Devices.Mobile;
@@ -217,24 +217,24 @@ declare interface PlatformInstance {
217
217
  get isNode(): boolean;
218
218
  get isStandalone(): boolean;
219
219
  get isWebview(): boolean;
220
- Constants: {
221
- OS: typeof OS;
222
- Engines: typeof Engines;
223
- Browsers: typeof Browsers;
224
- Devices: typeof Devices;
220
+ readonly Constants: {
221
+ readonly OS: typeof OS;
222
+ readonly Engines: typeof Engines;
223
+ readonly Browsers: typeof Browsers;
224
+ readonly Devices: typeof Devices;
225
225
  };
226
- Errors: {};
226
+ readonly Errors: {};
227
227
  }
228
228
  declare interface NameVersionPair<T> {
229
- name: T;
230
- version: string;
229
+ readonly name: T;
230
+ readonly version: string;
231
231
  }
232
232
  declare interface Locale {
233
- language: string | null;
234
- languages: string[];
235
- timezone: string | null;
236
- offset: number;
237
- isRTL: boolean;
233
+ readonly language: string | null;
234
+ readonly languages: readonly string[];
235
+ readonly timezone: string | null;
236
+ readonly offset: number;
237
+ readonly isRTL: boolean;
238
238
  }
239
239
  interface GPUAdapterInfo {
240
240
  readonly vendor?: string;