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