native-fn 1.0.89 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/dist/index.d.ts +747 -29
  2. package/dist/native.cjs +4283 -74
  3. package/dist/native.min.cjs +1 -1
  4. package/dist/native.min.mjs +1 -1
  5. package/dist/native.mjs +4283 -74
  6. package/dist/native.umd.js +4283 -74
  7. package/dist/native.umd.min.js +1 -1
  8. package/dist/plugin/app/index.cjs +637 -663
  9. package/dist/plugin/app/index.d.ts +4 -114
  10. package/dist/plugin/app/index.min.cjs +1 -1
  11. package/dist/plugin/app/index.min.mjs +1 -1
  12. package/dist/plugin/app/index.mjs +637 -663
  13. package/dist/plugin/app/index.umd.js +637 -663
  14. package/dist/plugin/app/index.umd.min.js +1 -1
  15. package/dist/plugin/app/src/plugin/app/constants/index.d.ts +13 -0
  16. package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -2
  17. package/dist/plugin/app/src/plugin/app/index.d.ts +2 -11
  18. package/dist/plugin/app/src/plugin/app/types/app.d.ts +13 -3
  19. package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -15
  20. package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +2 -2
  21. package/dist/plugin/app/src/plugin/appearance/index.d.ts +2 -7
  22. package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -3
  23. package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -12
  24. package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
  25. package/dist/plugin/app/src/plugin/clipboard/index.d.ts +2 -4
  26. package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  27. package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -10
  28. package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +2 -2
  29. package/dist/plugin/app/src/plugin/dimension/index.d.ts +3 -4
  30. package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +4 -2
  31. package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -12
  32. package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
  33. package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +2 -4
  34. package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  35. package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -10
  36. package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +6 -6
  37. package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +24 -6
  38. package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -11
  39. package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -10
  40. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +22 -14
  41. package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
  42. package/dist/plugin/app/src/plugin/theme/index.d.ts +2 -4
  43. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -10
  44. package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +3 -1
  45. package/dist/plugin/app/src/types/native.d.ts +16 -26
  46. package/dist/plugin/appearance/index.cjs +392 -585
  47. package/dist/plugin/appearance/index.d.ts +4 -37
  48. package/dist/plugin/appearance/index.min.cjs +1 -1
  49. package/dist/plugin/appearance/index.min.mjs +1 -1
  50. package/dist/plugin/appearance/index.mjs +392 -585
  51. package/dist/plugin/appearance/index.umd.js +392 -585
  52. package/dist/plugin/appearance/index.umd.min.js +1 -1
  53. package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +13 -0
  54. package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -2
  55. package/dist/plugin/appearance/src/plugin/app/index.d.ts +2 -11
  56. package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +13 -3
  57. package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -15
  58. package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +2 -2
  59. package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +2 -7
  60. package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -3
  61. package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -12
  62. package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
  63. package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +2 -4
  64. package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  65. package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -10
  66. package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +2 -2
  67. package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +3 -4
  68. package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +4 -2
  69. package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -12
  70. package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
  71. package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +2 -4
  72. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  73. package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -10
  74. package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +6 -6
  75. package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +24 -6
  76. package/dist/plugin/appearance/src/plugin/platform/index.d.ts +2 -11
  77. package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -10
  78. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +22 -14
  79. package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
  80. package/dist/plugin/appearance/src/plugin/theme/index.d.ts +2 -4
  81. package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -10
  82. package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +3 -1
  83. package/dist/plugin/appearance/src/types/native.d.ts +16 -26
  84. package/dist/plugin/clipboard/index.cjs +48 -822
  85. package/dist/plugin/clipboard/index.d.ts +4 -27
  86. package/dist/plugin/clipboard/index.min.cjs +1 -1
  87. package/dist/plugin/clipboard/index.min.mjs +1 -1
  88. package/dist/plugin/clipboard/index.mjs +48 -822
  89. package/dist/plugin/clipboard/index.umd.js +48 -822
  90. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  91. package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +13 -0
  92. package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -2
  93. package/dist/plugin/clipboard/src/plugin/app/index.d.ts +2 -11
  94. package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +13 -3
  95. package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -15
  96. package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +2 -2
  97. package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +2 -7
  98. package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -3
  99. package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -12
  100. package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
  101. package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +2 -4
  102. package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  103. package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -10
  104. package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +2 -2
  105. package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +3 -4
  106. package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +4 -2
  107. package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -12
  108. package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
  109. package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +2 -4
  110. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  111. package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -10
  112. package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +6 -6
  113. package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +24 -6
  114. package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -11
  115. package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -10
  116. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +22 -14
  117. package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
  118. package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +2 -4
  119. package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -10
  120. package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +3 -1
  121. package/dist/plugin/clipboard/src/types/native.d.ts +16 -26
  122. package/dist/plugin/dimension/index.cjs +3 -883
  123. package/dist/plugin/dimension/index.d.ts +4 -36
  124. package/dist/plugin/dimension/index.min.cjs +1 -1
  125. package/dist/plugin/dimension/index.min.mjs +1 -1
  126. package/dist/plugin/dimension/index.mjs +3 -883
  127. package/dist/plugin/dimension/index.umd.js +3 -883
  128. package/dist/plugin/dimension/index.umd.min.js +1 -1
  129. package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +13 -0
  130. package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +3 -2
  131. package/dist/plugin/dimension/src/plugin/app/index.d.ts +2 -11
  132. package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +13 -3
  133. package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -15
  134. package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +2 -2
  135. package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +2 -7
  136. package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +6 -3
  137. package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -12
  138. package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +2 -2
  139. package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +2 -4
  140. package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  141. package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -10
  142. package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +2 -2
  143. package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +3 -4
  144. package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +4 -2
  145. package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -12
  146. package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +2 -2
  147. package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +2 -4
  148. package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  149. package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -10
  150. package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +6 -6
  151. package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +24 -6
  152. package/dist/plugin/dimension/src/plugin/platform/index.d.ts +2 -11
  153. package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -10
  154. package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +22 -14
  155. package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +2 -2
  156. package/dist/plugin/dimension/src/plugin/theme/index.d.ts +2 -4
  157. package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -10
  158. package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +3 -1
  159. package/dist/plugin/dimension/src/types/native.d.ts +16 -26
  160. package/dist/plugin/fullscreen/index.cjs +391 -588
  161. package/dist/plugin/fullscreen/index.d.ts +4 -33
  162. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  163. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  164. package/dist/plugin/fullscreen/index.mjs +391 -588
  165. package/dist/plugin/fullscreen/index.umd.js +391 -588
  166. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  167. package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +13 -0
  168. package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -2
  169. package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +2 -11
  170. package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +13 -3
  171. package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -15
  172. package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +2 -2
  173. package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +2 -7
  174. package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -3
  175. package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -12
  176. package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
  177. package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +2 -4
  178. package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  179. package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -10
  180. package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +2 -2
  181. package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +3 -4
  182. package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +4 -2
  183. package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -12
  184. package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
  185. package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +2 -4
  186. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  187. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -10
  188. package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +6 -6
  189. package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +24 -6
  190. package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -11
  191. package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -10
  192. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +22 -14
  193. package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
  194. package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +2 -4
  195. package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -10
  196. package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +3 -1
  197. package/dist/plugin/fullscreen/src/types/native.d.ts +16 -26
  198. package/dist/plugin/platform/index.cjs +409 -488
  199. package/dist/plugin/platform/index.d.ts +4 -96
  200. package/dist/plugin/platform/index.min.cjs +1 -1
  201. package/dist/plugin/platform/index.min.mjs +1 -1
  202. package/dist/plugin/platform/index.mjs +409 -488
  203. package/dist/plugin/platform/index.umd.js +409 -488
  204. package/dist/plugin/platform/index.umd.min.js +1 -1
  205. package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +13 -0
  206. package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +3 -2
  207. package/dist/plugin/platform/src/plugin/app/index.d.ts +2 -11
  208. package/dist/plugin/platform/src/plugin/app/types/app.d.ts +13 -3
  209. package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -15
  210. package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +2 -2
  211. package/dist/plugin/platform/src/plugin/appearance/index.d.ts +2 -7
  212. package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +6 -3
  213. package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -12
  214. package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +2 -2
  215. package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +2 -4
  216. package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  217. package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -10
  218. package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +2 -2
  219. package/dist/plugin/platform/src/plugin/dimension/index.d.ts +3 -4
  220. package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +4 -2
  221. package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -12
  222. package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +2 -2
  223. package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +2 -4
  224. package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  225. package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -10
  226. package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +6 -6
  227. package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +24 -6
  228. package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -11
  229. package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -10
  230. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +22 -14
  231. package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +2 -2
  232. package/dist/plugin/platform/src/plugin/theme/index.d.ts +2 -4
  233. package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -10
  234. package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +3 -1
  235. package/dist/plugin/platform/src/types/native.d.ts +16 -26
  236. package/dist/plugin/theme/index.cjs +390 -461
  237. package/dist/plugin/theme/index.d.ts +4 -27
  238. package/dist/plugin/theme/index.min.cjs +1 -1
  239. package/dist/plugin/theme/index.min.mjs +1 -1
  240. package/dist/plugin/theme/index.mjs +390 -461
  241. package/dist/plugin/theme/index.umd.js +390 -461
  242. package/dist/plugin/theme/index.umd.min.js +1 -1
  243. package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +13 -0
  244. package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -2
  245. package/dist/plugin/theme/src/plugin/app/index.d.ts +2 -11
  246. package/dist/plugin/theme/src/plugin/app/types/app.d.ts +13 -3
  247. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -15
  248. package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +2 -2
  249. package/dist/plugin/theme/src/plugin/appearance/index.d.ts +2 -7
  250. package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -3
  251. package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -12
  252. package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
  253. package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +2 -4
  254. package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +3 -1
  255. package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -10
  256. package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +2 -2
  257. package/dist/plugin/theme/src/plugin/dimension/index.d.ts +3 -4
  258. package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +4 -2
  259. package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -12
  260. package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
  261. package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +2 -4
  262. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
  263. package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -10
  264. package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +6 -6
  265. package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +24 -6
  266. package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -11
  267. package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -10
  268. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +22 -14
  269. package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
  270. package/dist/plugin/theme/src/plugin/theme/index.d.ts +2 -4
  271. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -10
  272. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +3 -1
  273. package/dist/plugin/theme/src/types/native.d.ts +16 -26
  274. package/dist/src/constants/index.d.ts +1 -0
  275. package/dist/src/errors/not-supported-error.d.ts +2 -0
  276. package/dist/src/errors/permission-not-granted-error.d.ts +2 -0
  277. package/dist/src/plugin/Display/constants/index.d.ts +4 -0
  278. package/dist/src/plugin/Display/cores/index.d.ts +3 -0
  279. package/dist/src/plugin/Display/index.d.ts +3 -0
  280. package/dist/src/plugin/Display/types/display.d.ts +13 -0
  281. package/dist/src/plugin/Display/types/index.d.ts +1 -0
  282. package/dist/src/plugin/app/constants/index.d.ts +21 -0
  283. package/dist/src/plugin/app/cores/index.d.ts +10 -2
  284. package/dist/src/plugin/app/index.d.ts +2 -11
  285. package/dist/src/plugin/app/types/app.d.ts +73 -3
  286. package/dist/src/plugin/app/types/index.d.ts +0 -15
  287. package/dist/src/plugin/appearance/constants/index.d.ts +1 -4
  288. package/dist/src/plugin/appearance/index.d.ts +2 -7
  289. package/dist/src/plugin/appearance/types/appearance.d.ts +5 -2
  290. package/dist/src/plugin/appearance/types/appearanceInstance.d.ts +9 -0
  291. package/dist/src/plugin/appearance/types/index.d.ts +0 -12
  292. package/dist/src/plugin/badge/cores/index.d.ts +3 -0
  293. package/dist/src/plugin/badge/index.d.ts +3 -0
  294. package/dist/src/plugin/badge/types/badge.d.ts +10 -0
  295. package/dist/src/plugin/badge/types/index.d.ts +1 -0
  296. package/dist/src/plugin/battery/cores/index.d.ts +3 -0
  297. package/dist/src/plugin/battery/index.d.ts +3 -0
  298. package/dist/src/plugin/battery/types/battery.d.ts +26 -0
  299. package/dist/src/plugin/battery/types/index.d.ts +1 -0
  300. package/dist/src/plugin/clipboard/index.d.ts +2 -4
  301. package/dist/src/plugin/clipboard/types/clipboard.d.ts +2 -0
  302. package/dist/src/plugin/clipboard/types/index.d.ts +0 -10
  303. package/dist/src/plugin/dimension/constants/index.d.ts +42 -2
  304. package/dist/src/plugin/dimension/index.d.ts +3 -4
  305. package/dist/src/plugin/dimension/types/dimensions.d.ts +24 -1
  306. package/dist/src/plugin/dimension/types/index.d.ts +0 -12
  307. package/dist/src/plugin/dimension/utils/create-env-observer.d.ts +24 -0
  308. package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -1
  309. package/dist/src/plugin/fullscreen/index.d.ts +2 -4
  310. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +11 -6
  311. package/dist/src/plugin/fullscreen/types/index.d.ts +0 -10
  312. package/dist/src/plugin/geolocation/constants/index.d.ts +2 -0
  313. package/dist/src/plugin/geolocation/cores/index.d.ts +3 -0
  314. package/dist/src/plugin/geolocation/index.d.ts +3 -0
  315. package/dist/src/plugin/geolocation/types/geolocation.d.ts +12 -0
  316. package/dist/src/plugin/geolocation/types/index.d.ts +1 -0
  317. package/dist/src/plugin/network/cores/index.d.ts +15 -0
  318. package/dist/src/plugin/network/index.d.ts +3 -0
  319. package/dist/src/plugin/network/types/index.d.ts +1 -0
  320. package/dist/src/plugin/network/types/network.d.ts +4 -0
  321. package/dist/src/plugin/notification/cores/index.d.ts +3 -0
  322. package/dist/src/plugin/notification/index.d.ts +3 -0
  323. package/dist/src/plugin/notification/types/index.d.ts +1 -0
  324. package/dist/src/plugin/notification/types/notification.d.ts +27 -0
  325. package/dist/src/plugin/open/constants/index.d.ts +28 -0
  326. package/dist/src/plugin/open/cores/index.d.ts +55 -0
  327. package/dist/src/plugin/open/errors/not-supported-error.d.ts +2 -0
  328. package/dist/src/plugin/open/errors/url-open-error.d.ts +2 -0
  329. package/dist/src/plugin/open/errors/user-cancel-error.d.ts +2 -0
  330. package/dist/src/plugin/open/index.d.ts +3 -0
  331. package/dist/src/plugin/open/types/index.d.ts +1 -0
  332. package/dist/src/plugin/open/types/open.d.ts +187 -0
  333. package/dist/src/plugin/permission/constants/index.d.ts +22 -0
  334. package/dist/src/plugin/permission/cores/index.d.ts +3 -0
  335. package/dist/src/plugin/permission/index.d.ts +3 -0
  336. package/dist/src/plugin/permission/types/index.d.ts +1 -0
  337. package/dist/src/plugin/permission/types/permission.d.ts +10 -0
  338. package/dist/src/plugin/pip/cores/index.d.ts +12 -0
  339. package/dist/src/plugin/pip/index.d.ts +3 -0
  340. package/dist/src/plugin/pip/types/index.d.ts +1 -0
  341. package/dist/src/plugin/pip/types/pip.d.ts +15 -0
  342. package/dist/src/plugin/platform/constants/index.d.ts +5 -6
  343. package/dist/src/plugin/platform/cores/index.d.ts +36 -5
  344. package/dist/src/plugin/platform/index.d.ts +2 -11
  345. package/dist/src/plugin/platform/types/index.d.ts +0 -10
  346. package/dist/src/plugin/platform/types/platform.d.ts +31 -14
  347. package/dist/src/plugin/pwa/cores/index.d.ts +3 -0
  348. package/dist/src/plugin/pwa/index.d.ts +3 -0
  349. package/dist/src/plugin/pwa/types/index.d.ts +1 -0
  350. package/dist/src/plugin/pwa/types/pwa.d.ts +8 -0
  351. package/dist/src/plugin/speech/cores/index.d.ts +53 -0
  352. package/dist/src/plugin/speech/index.d.ts +3 -0
  353. package/dist/src/plugin/speech/types/index.d.ts +1 -0
  354. package/dist/src/plugin/speech/types/speech.d.ts +9 -0
  355. package/dist/src/plugin/theme/index.d.ts +2 -4
  356. package/dist/src/plugin/theme/types/index.d.ts +0 -10
  357. package/dist/src/plugin/theme/types/theme.d.ts +2 -0
  358. package/dist/src/plugin/vibration/cores/index.d.ts +3 -0
  359. package/dist/src/plugin/vibration/index.d.ts +3 -0
  360. package/dist/src/plugin/vibration/types/index.d.ts +1 -0
  361. package/dist/src/plugin/vibration/types/vibration.d.ts +9 -0
  362. package/dist/src/types/event-listener.d.ts +35 -0
  363. package/dist/src/types/index.d.ts +3 -0
  364. package/dist/src/types/listener-entry.d.ts +0 -1
  365. package/dist/src/types/native.d.ts +30 -26
  366. package/dist/src/types/subscription-manager.d.ts +4 -0
  367. package/dist/src/utils/create-env-observer.d.ts +8 -0
  368. package/dist/src/utils/create-hidden-element.d.ts +1 -1
  369. package/dist/src/utils/create-subscription-manager.d.ts +2 -0
  370. package/dist/src/utils/defer.d.ts +1 -0
  371. package/dist/src/utils/event-listener.d.ts +3 -0
  372. package/dist/src/utils/keys.d.ts +1 -0
  373. package/dist/src/utils/now.d.ts +1 -0
  374. package/dist/src/utils/pad-start.d.ts +1 -0
  375. package/dist/src/utils/random-string.d.ts +1 -0
  376. package/dist/src/utils/set-style.d.ts +3 -0
  377. package/package.json +1 -1
@@ -209,758 +209,11 @@ var EventListenerUtils = {
209
209
  }
210
210
  };
211
211
 
212
- function compareVersion(lhs, rhs) {
213
- var pa = lhs.split('.');
214
- var pb = rhs.split('.');
215
- var length = Math.max(pa.length, pb.length);
216
- for (var i = 0; i < length; i++) {
217
- var a = void 0;
218
- var b = void 0;
219
- if (i < pa.length)
220
- a = parseInt(pa[i], 10);
221
- else
222
- a = 0;
223
- if (i < pb.length)
224
- b = parseInt(pb[i], 10);
225
- else
226
- b = 0;
227
- if (a > b)
228
- return 1;
229
- if (a < b)
230
- return -1;
231
- }
232
- return 0;
233
- }
234
-
235
- var OS;
236
- (function (OS) {
237
- OS["Unknown"] = "Unknown";
238
- OS["Android"] = "Android";
239
- OS["iOS"] = "iOS";
240
- OS["Windows"] = "Windows";
241
- OS["MacOS"] = "MacOS";
242
- })(OS || (OS = {}));
243
- var Devices;
244
- (function (Devices) {
245
- Devices["Unknown"] = "Unknown";
246
- Devices["Mobile"] = "Mobile";
247
- Devices["Desktop"] = "Desktop";
248
- })(Devices || (Devices = {}));
249
- var Engines;
250
- (function (Engines) {
251
- Engines["Unknown"] = "Unknown";
252
- Engines["EdgeHTML"] = "EdgeHTML";
253
- Engines["ArkWeb"] = "ArkWeb";
254
- Engines["Blink"] = "Blink";
255
- Engines["Presto"] = "Presto";
256
- Engines["WebKit"] = "WebKit";
257
- Engines["Trident"] = "Trident";
258
- Engines["NetFront"] = "NetFront";
259
- Engines["KHTML"] = "KHTML";
260
- Engines["Tasman"] = "Tasman";
261
- Engines["Gecko"] = "Gecko";
262
- })(Engines || (Engines = {}));
263
- var Browsers;
264
- (function (Browsers) {
265
- Browsers["Unknown"] = "Unknown";
266
- Browsers["Chrome"] = "Chrome";
267
- Browsers["Safari"] = "Safari";
268
- Browsers["Edge"] = "Edge";
269
- Browsers["Firefox"] = "Firefox";
270
- Browsers["Opera"] = "Opera";
271
- Browsers["IE"] = "IE";
272
- Browsers["SamsungInternet"] = "SamsungInternet";
273
- })(Browsers || (Browsers = {}));
274
- var CrossPlatformFramework;
275
- (function (CrossPlatformFramework) {
276
- CrossPlatformFramework["Unknown"] = "Unknown";
277
- CrossPlatformFramework["ReactNative"] = "ReactNative";
278
- CrossPlatformFramework["Electron"] = "Electron";
279
- CrossPlatformFramework["Cordova"] = "Cordova";
280
- })(CrossPlatformFramework || (CrossPlatformFramework = {}));
281
- var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
282
- var HIGH_ENTROPY_BRAND_NAME_MAP = {
283
- 'Google Chrome': 'Chrome',
284
- 'Microsoft Edge': 'Edge',
285
- 'Microsoft Edge WebView2': 'Edge WebView2',
286
- 'Android WebView': 'Chrome WebView',
287
- 'HeadlessChrome': 'Chrome Headless',
288
- 'OperaMobile': 'Opera Mobi',
289
- };
290
-
291
- var readyState = 'loading';
292
- var readyCallback = [];
293
- var pendingTasks = 0;
294
- var Platform = {
295
- os: { name: OS.Unknown, version: '' },
296
- engine: { name: Engines.Unknown, version: '' },
297
- browser: { name: Browsers.Unknown, version: '' },
298
- crossPlatformFramework: CrossPlatformFramework.Unknown,
299
- userAgent: USER_AGENT,
300
- get locale() {
301
- return getLocale();
302
- },
303
- get device() {
304
- if (this.os.name === OS.iOS || this.os.name === OS.Android)
305
- return Devices.Mobile;
306
- if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
307
- return Devices.Desktop;
308
- return Devices.Unknown;
309
- },
310
- get renderer() {
311
- return getRenderer();
312
- },
313
- get isWebview() {
314
- return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
315
- },
316
- get isNode() {
317
- return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
318
- },
319
- get isStandalone() {
320
- if (this.os.name === OS.iOS)
321
- return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
322
- if (!('matchMedia' in globalThis))
323
- return false;
324
- return globalThis.matchMedia('(display-mode: standalone)').matches;
325
- },
326
- onready: function (callback) {
327
- if (readyState === 'complete') {
328
- try {
329
- callback(this);
330
- }
331
- catch (_) {
332
- }
333
- }
334
- else {
335
- readyCallback.push(callback);
336
- }
337
- }
338
- };
339
- function resolveWindowsVersion(string) {
340
- if (typeof string === 'undefined')
341
- return '';
342
- var mapped = {
343
- '4.90': 'ME',
344
- 'NT3.51': 'NT 3.11',
345
- 'NT4.0': 'NT 4.0',
346
- 'NT 5.0': '2000',
347
- 'NT 5.1': 'XP',
348
- 'NT 5.2': 'XP',
349
- 'NT 6.0': 'Vista',
350
- 'NT 6.1': '7',
351
- 'NT 6.2': '8',
352
- 'NT 6.3': '8.1',
353
- 'NT 6.4': '10',
354
- 'NT 10.0': '10',
355
- 'ARM': 'RT'
356
- }[string];
357
- if (typeof mapped !== 'undefined')
358
- return mapped;
359
- return string;
360
- }
361
- function resolveUnderscoreVersion(string) {
362
- if (typeof string === 'undefined')
363
- return '';
364
- return string.replace(/_/g, '.');
365
- }
366
- var OS_RESOLVER_MAP = [
367
- [/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
368
- [/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
369
- [/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i, OS.Windows, resolveWindowsVersion],
370
- [/windows nt ?([\d.)]*)(?!.+xbox)/i, OS.Windows, resolveWindowsVersion],
371
- [/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i, OS.Windows, resolveWindowsVersion],
372
- [/windows ce\/?([\d.]*)/i, OS.Windows, resolveWindowsVersion],
373
- [/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i, OS.iOS, resolveUnderscoreVersion],
374
- [/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i, OS.iOS, resolveUnderscoreVersion],
375
- [/cfnetwork\/.+darwin/i, OS.iOS, resolveUnderscoreVersion],
376
- [/mac os x ?([\w. ]*)/i, OS.MacOS, resolveUnderscoreVersion],
377
- [/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i, OS.MacOS, resolveUnderscoreVersion],
378
- [/droid ([\w.]+)\b.+(android[- ]x86)/i, OS.Android],
379
- [/android\w*[-\/.; ]?([\d.]*)/i, OS.Android],
380
- ];
381
- var ENGINE_RESOLVER_MAP = [
382
- [/windows.+ edge\/([\w.]+)/i, Engines.EdgeHTML],
383
- [/arkweb\/([\w.]+)/i, Engines.ArkWeb],
384
- [/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i, Engines.Blink],
385
- [/presto\/([\w.]+)/i, Engines.Presto],
386
- [/webkit\/([\w.]+)/i, Engines.WebKit],
387
- [/trident\/([\w.]+)/i, Engines.Trident],
388
- [/netfront\/([\w.]+)/i, Engines.NetFront],
389
- [/khtml[\/ ]\(?([\w.]+)/i, Engines.KHTML],
390
- [/tasman[\/ ]\(?([\w.]+)/i, Engines.Tasman],
391
- [/rv:([\w.]{1,9})\b.+gecko/i, Engines.Gecko]
392
- ];
393
- var BROWSER_RESOLVER_MAP = [
394
- [/\b(?:crmo|crios)\/([\w.]+)/i, Browsers.Chrome],
395
- [/webview.+edge\/([\w.]+)/i, Browsers.Edge],
396
- [/edg(?:e|ios|a)?\/([\w.]+)/i, Browsers.Edge],
397
- [/opera mini\/([-\w.]+)/i, Browsers.Opera],
398
- [/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i, Browsers.Opera],
399
- [/opera(?:.+version\/|[\/ ]+)([\w.]+)/i, Browsers.Opera],
400
- [/opios[\/ ]+([\w.]+)/i, Browsers.Opera],
401
- [/\bop(?:rg)?x\/([\w.]+)/i, Browsers.Opera],
402
- [/\bopr\/([\w.]+)/i, Browsers.Opera],
403
- [/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i, Browsers.IE],
404
- [/(?:ms|\()ie ([\w.]+)/i, Browsers.IE],
405
- [/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i, Browsers.IE],
406
- [/\bfocus\/([\w.]+)/i, Browsers.Firefox],
407
- [/\bopt\/([\w.]+)/i, Browsers.Opera],
408
- [/coast\/([\w.]+)/i, Browsers.Opera],
409
- [/fxios\/([\w.-]+)/i, Browsers.Firefox],
410
- [/samsungbrowser\/([\w.]+)/i, Browsers.SamsungInternet],
411
- [/headlesschrome(?:\/([\w.]+)| )/i, Browsers.Chrome],
412
- [/wv\).+chrome\/([\w.]+).+edgw\//i, Browsers.Edge],
413
- [/ wv\).+(chrome)\/([\w.]+)/i, Browsers.Chrome],
414
- [/chrome\/([\w.]+) mobile/i, Browsers.Chrome],
415
- [/chrome\/v?([\w.]+)/i, Browsers.Chrome],
416
- [/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i, Browsers.Safari],
417
- [/iphone .*mobile(?:\/\w+ | ?)safari/i, Browsers.Safari],
418
- [/version\/([\w.,]+) .*safari/i, Browsers.Safari],
419
- [/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i, Browsers.Safari, '1'],
420
- [/(?:mobile|tablet);.*firefox\/([\w.-]+)/i, Browsers.Firefox],
421
- [/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
422
- [/firefox\/([\w.]+)/i, Browsers.Firefox],
423
- ];
424
- function incrementPendingTasks() {
425
- pendingTasks++;
426
- }
427
- function decrementPendingTasks() {
428
- pendingTasks--;
429
- checkReady();
430
- }
431
- function checkReady() {
432
- if (pendingTasks === 0 && readyState === 'loading') {
433
- readyState = 'complete';
434
- for (var i = 0; i < readyCallback.length; i++) {
435
- try {
436
- readyCallback[i](Platform);
437
- }
438
- catch (_) {
439
- }
440
- }
441
- readyCallback.length = 0;
442
- }
443
- }
444
- function resolveSemanticWindowsVersion(version, defaultValue) {
445
- if (version.major === 10 && version.minor === 0 && version.build >= 22000)
446
- return '11';
447
- if (version.major === 10 && version.minor === 0 && version.build < 22000)
448
- return '10';
449
- if (version.major === 6 && version.minor === 3)
450
- return '8.1';
451
- if (version.major === 6 && version.minor === 2)
452
- return '8';
453
- if (version.major === 6 && version.minor === 1)
454
- return '7';
455
- if (version.major === 6 && version.minor === 0)
456
- return 'Vista';
457
- if (version.major === 5 && version.minor === 1)
458
- return 'XP';
459
- if (version.major === 5 && version.minor === 2)
460
- return 'XP';
461
- if (version.major === 5 && version.minor === 0)
462
- return '2000';
463
- if (version.major === 4 && version.minor === 90)
464
- return 'ME';
465
- if (version.major === 4 && version.minor === 0)
466
- return 'NT 4.0';
467
- if (version.major === 3 && version.minor === 51)
468
- return 'NT 3.11';
469
- return defaultValue;
470
- }
471
- function resolveSemanticDarwinVersion(version, defaultValue) {
472
- if (version.major >= 24)
473
- return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
474
- if (version.major === 23)
475
- return '14.' + version.minor + '.' + version.build;
476
- if (version.major === 22)
477
- return '13.' + version.minor + '.' + version.build;
478
- if (version.major === 21)
479
- return '12.' + version.minor + '.' + version.build;
480
- if (version.major === 20)
481
- return '11.' + version.minor + '.' + version.build;
482
- if (version.major === 19)
483
- return '10.15.' + version.minor;
484
- if (version.major === 18)
485
- return '10.14.' + version.minor;
486
- if (version.major === 17)
487
- return '10.13.' + version.minor;
488
- if (version.major === 16)
489
- return '10.12.' + version.minor;
490
- if (version.major === 15)
491
- return '10.11.' + version.minor;
492
- if (version.major === 14)
493
- return '10.10.' + version.minor;
494
- if (version.major === 13)
495
- return '10.9.' + version.minor;
496
- if (version.major >= 5 && version.major <= 12)
497
- return '10.' + (version.major - 4) + '.' + version.minor;
498
- return defaultValue;
499
- }
500
- function resolveSemanticAndroidVersion(version, defaultValue) {
501
- if (version.major >= 36)
502
- return '16';
503
- if (version.major === 35)
504
- return '15';
505
- if (version.major === 34)
506
- return '14';
507
- if (version.major === 33)
508
- return '13';
509
- if (version.major === 32)
510
- return '12.1';
511
- if (version.major === 31)
512
- return '12';
513
- if (version.major === 30)
514
- return '11';
515
- if (version.major === 29)
516
- return '10';
517
- if (version.major === 28)
518
- return '9';
519
- if (version.major === 27)
520
- return '8.1';
521
- if (version.major === 26)
522
- return '8.0';
523
- if (version.major === 25)
524
- return '7.1';
525
- if (version.major === 24)
526
- return '7.0';
527
- if (version.major === 23)
528
- return '6.0';
529
- if (version.major === 22)
530
- return '5.1';
531
- if (version.major === 21)
532
- return '5.0';
533
- if (version.major === 20)
534
- return '4.4';
535
- if (version.major === 19)
536
- return '4.4';
537
- if (version.major === 18)
538
- return '4.3';
539
- if (version.major === 17)
540
- return '4.2';
541
- if (version.major === 16)
542
- return '4.1';
543
- if (version.major === 15)
544
- return '4.0.3';
545
- if (version.major === 14)
546
- return '4.0';
547
- if (version.major === 13)
548
- return '3.2';
549
- if (version.major === 12)
550
- return '3.1';
551
- if (version.major === 11)
552
- return '3.0';
553
- if (version.major === 10)
554
- return '2.3.3';
555
- if (version.major === 9)
556
- return '2.3';
557
- if (version.major === 8)
558
- return '2.2';
559
- if (version.major === 7)
560
- return '2.1';
561
- if (version.major === 6)
562
- return '2.0.1';
563
- if (version.major === 5)
564
- return '2.0';
565
- if (version.major === 4)
566
- return '1.6';
567
- if (version.major === 3)
568
- return '1.5';
569
- if (version.major === 2)
570
- return '1.1';
571
- if (version.major === 1)
572
- return '1.0';
573
- return defaultValue;
574
- }
575
- function resolveVersion(string, resolver) {
576
- if (typeof resolver === 'function')
577
- return resolver(string);
578
- if (typeof resolver === 'string')
579
- return resolver;
580
- if (typeof string === 'undefined')
581
- return '';
582
- return string;
583
- }
584
- function normalizeBrand(entry) {
585
- if (entry === null || typeof entry === 'undefined')
586
- return { brand: '', version: '' };
587
- if (typeof entry === 'string')
588
- return { brand: entry, version: '' };
589
- return { brand: entry.brand, version: entry.version };
590
- }
591
- function getSemanticVersion(string) {
592
- var parts = string.split('.');
593
- return {
594
- major: parseInt(parts[0] || '0'),
595
- minor: parseInt(parts[1] || '0'),
596
- build: parseInt(parts[2] || '0')
597
- };
598
- }
599
- function parseOSFromCordova() {
600
- Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
601
- if (typeof globalThis.device !== 'undefined') {
602
- switch (globalThis.device.platform) {
603
- case 'Android':
604
- Platform.os = {
605
- name: OS.Android,
606
- version: globalThis.device.version,
607
- };
608
- break;
609
- case 'iOS':
610
- Platform.os = {
611
- name: OS.iOS,
612
- version: globalThis.device.version,
613
- };
614
- break;
615
- }
616
- }
617
- decrementPendingTasks();
618
- }
619
- function getRenderer() {
620
- if (typeof globalThis.document === 'undefined')
621
- return '';
622
- var canvas = globalThis.document.createElement('canvas');
623
- if (typeof canvas.getContext !== 'function')
624
- return '';
625
- var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
626
- if (context === null)
627
- return '';
628
- if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
629
- var extension = context.getExtension('WEBGL_debug_renderer_info');
630
- if (extension === null)
631
- return context.getParameter(context.RENDERER);
632
- else
633
- return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
634
- }
635
- else {
636
- return '';
637
- }
638
- }
639
- function normalizeLocale(locale) {
640
- if (locale === null || typeof locale === 'undefined')
641
- return locale;
642
- if (locale.length === 0)
643
- return null;
644
- locale = locale.replace(/_/g, '-');
645
- if (locale === 'C' || locale.toLowerCase() === 'posix')
646
- return 'en-US';
647
- if (locale.indexOf('.') !== -1)
648
- return normalizeLocale(locale.split('.')[0]);
649
- if (locale.indexOf('@') !== -1)
650
- return normalizeLocale(locale.split('@')[0]);
651
- var parts = locale.split('-');
652
- if (parts.length === 0)
653
- return null;
654
- parts[0] = parts[0].toLowerCase();
655
- if (parts.length > 1 && parts[1].length === 2)
656
- parts[1] = parts[1].toUpperCase();
657
- if (parts.length > 2 && parts[1].length === 4)
658
- parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
659
- return parts.join('-');
660
- }
661
- function getLocale() {
662
- var locale = {
663
- language: null,
664
- languages: [],
665
- timezone: null,
666
- timezoneOffset: 0,
667
- };
668
- function addLanguages(language) {
669
- for (var i = 0; i < language.length; i++)
670
- addLanguage(language[i]);
671
- }
672
- function addLanguage(language) {
673
- language = normalizeLocale(language);
674
- if (typeof language === "string" && locale.languages.indexOf(language) === -1) {
675
- if (locale.language === null)
676
- locale.language = language;
677
- locale.languages.push(language);
678
- }
679
- }
680
- if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
681
- try {
682
- var reactNative = require('react-native');
683
- var nativeModules = reactNative.NativeModules;
684
- if (typeof nativeModules.SettingsManager !== 'undefined') {
685
- var settingManager = nativeModules.SettingsManager;
686
- if (typeof settingManager !== 'undefined') {
687
- var constant = typeof settingManager.getConstants === 'function'
688
- ? settingManager.getConstants()
689
- : settingManager;
690
- if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
691
- var settings = constant.settings;
692
- if (typeof settings.AppleLocale === 'string')
693
- addLanguage(settings.AppleLocale);
694
- if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
695
- addLanguages(settings.AppleLanguages);
696
- }
697
- }
698
- }
699
- if (typeof nativeModules.I18nManager !== 'undefined') {
700
- var i18nManager = nativeModules.I18nManager;
701
- if (typeof i18nManager !== 'undefined') {
702
- var constant = typeof i18nManager.getConstants === 'function'
703
- ? i18nManager.getConstants()
704
- : i18nManager;
705
- if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
706
- addLanguage(constant.localeIdentifier);
707
- }
708
- }
709
- }
710
- catch (_) {
711
- }
712
- }
713
- if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
714
- try {
715
- var electron = require('electron');
716
- var app = electron.app;
717
- if (typeof app.getLocale !== 'undefined')
718
- addLanguage(app.getLocale());
719
- if (typeof app.getSystemLocale !== 'undefined')
720
- addLanguage(app.getSystemLocale());
721
- if (typeof app.getPreferredSystemLanguages !== 'undefined')
722
- addLanguages(app.getPreferredSystemLanguages());
723
- }
724
- catch (_) {
725
- }
726
- }
727
- if (typeof Intl !== 'undefined') {
728
- try {
729
- addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
730
- }
731
- catch (_) {
732
- }
733
- try {
734
- locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
735
- }
736
- catch (_) {
737
- }
738
- }
739
- if (typeof globalThis.navigator !== 'undefined') {
740
- if (typeof globalThis.navigator.languages !== 'undefined')
741
- addLanguages(globalThis.navigator.languages);
742
- if (typeof globalThis.navigator.language !== 'undefined')
743
- addLanguage(globalThis.navigator.language);
744
- if (typeof globalThis.navigator.userLanguage !== 'undefined')
745
- addLanguage(globalThis.navigator.userLanguage);
746
- if (typeof globalThis.navigator.browserLanguage !== 'undefined')
747
- addLanguage(globalThis.navigator.browserLanguage);
748
- if (typeof globalThis.navigator.systemLanguage !== 'undefined')
749
- addLanguage(globalThis.navigator.systemLanguage);
750
- }
751
- try {
752
- locale.timezoneOffset = new Date().getTimezoneOffset();
753
- }
754
- catch (_) {
755
- }
756
- return locale;
757
- }
758
- function init() {
759
- if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.electron !== 'undefined') || (/ electron\//i.test(USER_AGENT)))
760
- Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
761
- if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
762
- Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
763
- for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
764
- var map = OS_RESOLVER_MAP[i];
765
- var regexp = map[0];
766
- var os = map[1];
767
- var resolver = map[2];
768
- var matched = Platform.userAgent.match(regexp);
769
- if (matched !== null) {
770
- Platform.os = {
771
- name: os,
772
- version: resolveVersion(matched[1], resolver),
773
- };
774
- break;
775
- }
776
- }
777
- if (Platform.os.name === OS.iOS && compareVersion(Platform.os.version, '18.6') === 0) {
778
- var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
779
- if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
780
- Platform.os.version = version[1];
781
- }
782
- for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
783
- var map = ENGINE_RESOLVER_MAP[i];
784
- var regexp = map[0];
785
- var engine = map[1];
786
- var resolver = map[2];
787
- var matched = Platform.userAgent.match(regexp);
788
- if (matched !== null) {
789
- Platform.engine = {
790
- name: engine,
791
- version: resolveVersion(matched[1], resolver),
792
- };
793
- break;
794
- }
795
- }
796
- for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
797
- var map = BROWSER_RESOLVER_MAP[i];
798
- var regexp = map[0];
799
- var browser = map[1];
800
- var resolver = map[2];
801
- var matched = Platform.userAgent.match(regexp);
802
- if (matched !== null) {
803
- Platform.browser = {
804
- name: browser,
805
- version: resolveVersion(matched[1], resolver),
806
- };
807
- break;
808
- }
809
- }
810
- if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
811
- try {
812
- var reactNative = require('react-native');
813
- var platform = reactNative.Platform;
814
- var os = platform.OS;
815
- var release = '' + platform.Version;
816
- var version = getSemanticVersion(release);
817
- switch (os) {
818
- case 'android':
819
- Platform.os = {
820
- name: OS.Android,
821
- version: resolveSemanticAndroidVersion(version, release),
822
- };
823
- break;
824
- case 'ios':
825
- Platform.os = {
826
- name: OS.iOS,
827
- version: release,
828
- };
829
- break;
830
- case 'windows':
831
- Platform.os = {
832
- name: OS.Windows,
833
- version: resolveSemanticWindowsVersion(version, release),
834
- };
835
- break;
836
- case 'macos':
837
- Platform.os = {
838
- name: OS.MacOS,
839
- version: release,
840
- };
841
- break;
842
- }
843
- }
844
- catch (_) {
845
- }
846
- finally {
847
- }
848
- }
849
- if (Platform.isNode) {
850
- try {
851
- var os = require('os');
852
- var platform = os.platform();
853
- var release = os.release();
854
- var version = getSemanticVersion(release);
855
- switch (platform) {
856
- case 'win32':
857
- Platform.os = {
858
- name: OS.Windows,
859
- version: resolveSemanticWindowsVersion(version, release),
860
- };
861
- break;
862
- case 'darwin':
863
- Platform.os = {
864
- name: OS.MacOS,
865
- version: resolveSemanticDarwinVersion(version, release),
866
- };
867
- break;
868
- case 'android':
869
- Platform.os = {
870
- name: OS.Android,
871
- version: release,
872
- };
873
- break;
874
- case 'linux':
875
- if (/android/i.test(release)) {
876
- Platform.os = {
877
- name: OS.Android,
878
- version: release,
879
- };
880
- }
881
- break;
882
- }
883
- }
884
- catch (_) {
885
- }
886
- finally {
887
- }
888
- }
889
- if (typeof globalThis.document !== 'undefined') {
890
- if (typeof globalThis.device !== 'undefined') {
891
- parseOSFromCordova();
892
- }
893
- else {
894
- globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
895
- }
896
- }
897
- if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
898
- incrementPendingTasks();
899
- globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
900
- .then(function (result) {
901
- try {
902
- var brands = result.fullVersionList || result.brands || [];
903
- var platformVersion = result.platformVersion;
904
- var platform = result.platform;
905
- var browserName = Platform.browser.name;
906
- var prevBrandName = null;
907
- for (var i = 0; i < brands.length; i++) {
908
- var brand = normalizeBrand(brands[i]);
909
- var brandVersion = brand.version;
910
- var brandName = brand.brand;
911
- if (/not.a.brand/i.test(brandName))
912
- continue;
913
- if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
914
- brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
915
- prevBrandName = browserName;
916
- if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
917
- browserName = brandName;
918
- if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
919
- Platform.browser.name = Browsers.Chrome;
920
- else if (browserName === 'Edge' || browserName === 'Edge WebView2')
921
- Platform.browser.name = Browsers.Edge;
922
- else if (browserName === 'Opera Mobi')
923
- Platform.browser.name = Browsers.Opera;
924
- Platform.browser.version = brandVersion;
925
- }
926
- prevBrandName = brandName;
927
- }
928
- if (brandName === 'Chromium')
929
- Platform.engine.version = brandVersion;
930
- }
931
- if (typeof platformVersion === 'string') {
932
- if (Platform.os.name === OS.Windows)
933
- Platform.os.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
934
- else
935
- Platform.os.version = platformVersion;
936
- }
937
- if (typeof platform === 'string') {
938
- if (/android/i.test(platform))
939
- Platform.os.name = OS.Android;
940
- else if (/ios|iphone|ipad/i.test(platform))
941
- Platform.os.name = OS.iOS;
942
- else if (/windows|win32/i.test(platform))
943
- Platform.os.name = OS.Windows;
944
- else if (/macos|macintel/i.test(platform))
945
- Platform.os.name = OS.MacOS;
946
- }
947
- if (result.mobile === true)
948
- Platform.device = Devices.Mobile;
949
- }
950
- catch (_) {
951
- }
952
- finally {
953
- decrementPendingTasks();
954
- }
955
- });
956
- }
957
- checkReady();
958
- }
959
- init();
960
-
961
212
  var Clipboard = {
962
213
  copy: copy,
963
- paste: paste
214
+ paste: paste,
215
+ Constants: {},
216
+ Errors: {},
964
217
  };
965
218
  function isObject(item) {
966
219
  return item !== null && typeof item === 'object';
@@ -974,11 +227,18 @@ function isSerializable(item) {
974
227
  function isElement(item) {
975
228
  return isObject(item) && typeof item.innerText !== 'undefined';
976
229
  }
230
+ function isSelection(item) {
231
+ return Object.prototype.toString.call(item) === '[object Selection]';
232
+ }
977
233
  function convertToString(item) {
978
234
  if (isElement(item)) {
979
- return item.innerHTML;
235
+ if ('value' in item && typeof item.value === 'string')
236
+ return item.value;
237
+ return item.textContent;
980
238
  }
981
- else if (isSerializable(item)) {
239
+ if (isSelection(item))
240
+ return item.toString();
241
+ if (isSerializable(item)) {
982
242
  try {
983
243
  return JSON.stringify(item);
984
244
  }
@@ -991,6 +251,20 @@ function convertToString(item) {
991
251
  }
992
252
  return item;
993
253
  }
254
+ function convertToHTML(item) {
255
+ var html = null;
256
+ if (isElement(item))
257
+ html = item.outerHTML;
258
+ if (isSelection(item) && item.rangeCount > 0) {
259
+ var div = globalThis.document.createElement('div');
260
+ for (var i = 0; i < item.rangeCount; i++)
261
+ div.appendChild(item.getRangeAt(i).cloneContents());
262
+ html = div.innerHTML;
263
+ }
264
+ if (html === null)
265
+ return;
266
+ return html;
267
+ }
994
268
  function supportsClipboardAPI() {
995
269
  return (isSecureContext() && typeof navigator !== 'undefined' && 'clipboard' in navigator);
996
270
  }
@@ -1002,49 +276,28 @@ function supportsClipboardReadAPI() {
1002
276
  }
1003
277
  function copy(item) {
1004
278
  var text = convertToString(item);
1005
- if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
1006
- return copyViaElectron(text);
1007
- }
1008
- else if (supportsClipboardWriteAPI()) {
1009
- return copyViaClipboardAPI(text)
279
+ var html = convertToHTML(item);
280
+ if (supportsClipboardWriteAPI()) {
281
+ return copyViaClipboardAPI(text, html)
1010
282
  .then(function (success) {
1011
283
  if (success)
1012
284
  return true;
1013
- return copyViaLegacy(text);
285
+ return copyViaLegacy(text, html);
1014
286
  })
1015
287
  .catch(function () {
1016
- return copyViaLegacy(text);
1017
- });
1018
- }
1019
- return Promise.resolve(copyViaLegacy(text));
1020
- }
1021
- function copyViaElectron(text) {
1022
- try {
1023
- var electron_1 = require('electron');
1024
- return new Promise(function (resolve) {
1025
- try {
1026
- electron_1.clipboard.writeText(text);
1027
- electron_1.clipboard.writeHTML(text);
1028
- resolve(true);
1029
- }
1030
- catch (_) {
1031
- resolve(false);
1032
- }
288
+ return copyViaLegacy(text, html);
1033
289
  });
1034
290
  }
1035
- catch (_) {
1036
- return Promise.resolve(false);
1037
- }
291
+ return Promise.resolve(copyViaLegacy(text, html));
1038
292
  }
1039
- function copyViaClipboardAPI(text) {
293
+ function copyViaClipboardAPI(text, html) {
1040
294
  try {
1041
295
  if ('ClipboardItem' in window && 'write' in navigator.clipboard) {
1042
- return navigator.clipboard.write([
1043
- new ClipboardItem({
1044
- 'text/html': new Blob([text], { type: 'text/html' }),
1045
- 'text/plain': new Blob([text], { type: 'text/plain' })
1046
- })
1047
- ])
296
+ var items = {};
297
+ if (typeof html !== 'undefined')
298
+ items['text/html'] = new Blob([html], { type: 'text/html' });
299
+ items['text/plain'] = new Blob([text], { type: 'text/plain' });
300
+ return navigator.clipboard.write([new ClipboardItem(items)])
1048
301
  .then(function () {
1049
302
  return true;
1050
303
  })
@@ -1067,7 +320,7 @@ function copyViaClipboardAPI(text) {
1067
320
  }
1068
321
  return Promise.resolve(false);
1069
322
  }
1070
- function copyViaSelection(text) {
323
+ function copyViaSelection(text, html) {
1071
324
  if (!globalThis.getSelection || !globalThis.document.createRange)
1072
325
  return false;
1073
326
  var div = createHiddenElement('div');
@@ -1087,7 +340,8 @@ function copyViaSelection(text) {
1087
340
  try {
1088
341
  if (event.clipboardData !== null && typeof event.clipboardData.setData === 'function') {
1089
342
  event.preventDefault();
1090
- event.clipboardData.setData('text/html', text);
343
+ if (typeof html !== 'undefined')
344
+ event.clipboardData.setData('text/html', html);
1091
345
  event.clipboardData.setData('text/plain', text);
1092
346
  }
1093
347
  }
@@ -1112,11 +366,13 @@ function copyViaSelection(text) {
1112
366
  return false;
1113
367
  }
1114
368
  }
1115
- function copyViaClipboardData(text) {
369
+ function copyViaClipboardData(text, html) {
1116
370
  var windowWithClipboardData = window;
1117
371
  var clipboardData = windowWithClipboardData.clipboardData;
1118
372
  if (typeof clipboardData !== 'undefined' && typeof clipboardData.setData === 'function') {
1119
373
  try {
374
+ if (typeof html !== 'undefined')
375
+ clipboardData.setData('HTML', html);
1120
376
  return clipboardData.setData('Text', text);
1121
377
  }
1122
378
  catch (_) {
@@ -1125,14 +381,11 @@ function copyViaClipboardData(text) {
1125
381
  }
1126
382
  return false;
1127
383
  }
1128
- function copyViaLegacy(text) {
1129
- return copyViaSelection(text) || copyViaClipboardData(text);
384
+ function copyViaLegacy(text, html) {
385
+ return copyViaSelection(text, html) || copyViaClipboardData(text, html);
1130
386
  }
1131
387
  function paste() {
1132
- if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
1133
- return pasteViaElectron();
1134
- }
1135
- else if (supportsClipboardReadAPI()) {
388
+ if (supportsClipboardReadAPI()) {
1136
389
  return pasteViaClipboardAPI()
1137
390
  .then(function (text) {
1138
391
  if (text !== null)
@@ -1145,25 +398,6 @@ function paste() {
1145
398
  }
1146
399
  return Promise.resolve(pasteViaLegacy());
1147
400
  }
1148
- function pasteViaElectron() {
1149
- try {
1150
- var electron_2 = require('electron');
1151
- return new Promise(function (resolve) {
1152
- try {
1153
- var html = electron_2.clipboard.readHTML();
1154
- if (html)
1155
- return resolve(html.replace(/<meta[^>]*\bcharset\b[^>]*>/i, ''));
1156
- return resolve(electron_2.clipboard.readText() || '');
1157
- }
1158
- catch (_) {
1159
- resolve('');
1160
- }
1161
- });
1162
- }
1163
- catch (_) {
1164
- return Promise.resolve('');
1165
- }
1166
- }
1167
401
  function pasteViaClipboardAPI() {
1168
402
  try {
1169
403
  if ('ClipboardItem' in window && 'read' in navigator.clipboard) {
@@ -1275,12 +509,4 @@ function cleanupPaste(div, onPaste) {
1275
509
  EventListenerUtils.remove(globalThis.document, { type: 'paste', callback: onPaste });
1276
510
  }
1277
511
 
1278
- var NativeClipboardPlugin = {
1279
- installed: false,
1280
- name: 'Clipboard',
1281
- module: Clipboard,
1282
- Constants: {},
1283
- Errors: {}
1284
- };
1285
-
1286
- module.exports = NativeClipboardPlugin;
512
+ module.exports = Clipboard;