native-fn 1.2.2 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +191 -49
- package/dist/index.d.ts +148 -98
- package/dist/native.cjs +810 -288
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +810 -288
- package/dist/native.umd.js +810 -288
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/appearance/index.cjs +65 -64
- package/dist/plugin/appearance/index.d.ts +5 -5
- package/dist/plugin/appearance/index.mjs +66 -65
- package/dist/plugin/appearance/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/appearance/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/appearance/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/appearance/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/appearance/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/appearance/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/appearance/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/appearance/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/appearance/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/appearance/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/appearance/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/appearance/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/appearance/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/appearance/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/badge/index.d.ts +3 -3
- package/dist/plugin/badge/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/badge/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/badge/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/badge/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/badge/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/badge/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/badge/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/badge/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/badge/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/badge/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/badge/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/badge/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/badge/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/badge/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/badge/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/badge/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/badge/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/badge/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/badge/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/badge/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/badge/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/badge/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/badge/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/badge/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/battery/index.cjs +4 -6
- package/dist/plugin/battery/index.d.ts +3 -3
- package/dist/plugin/battery/index.mjs +4 -6
- package/dist/plugin/battery/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/battery/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/battery/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/battery/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/battery/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/battery/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/battery/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/battery/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/battery/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/battery/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/battery/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/battery/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/battery/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/battery/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/battery/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/battery/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/battery/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/battery/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/battery/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/battery/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/battery/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/battery/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/battery/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/battery/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/clipboard/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/clipboard/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/clipboard/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/clipboard/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/clipboard/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/clipboard/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/clipboard/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/clipboard/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/clipboard/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/clipboard/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/clipboard/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/clipboard/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/clipboard/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/clipboard/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/dimension/index.cjs +711 -122
- package/dist/plugin/dimension/index.d.ts +81 -31
- package/dist/plugin/dimension/index.mjs +712 -122
- package/dist/plugin/dimension/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/dimension/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/dimension/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/dimension/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/dimension/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/dimension/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/dimension/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/dimension/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/dimension/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/dimension/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/dimension/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/dimension/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/dimension/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/dimension/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/fullscreen/index.cjs +96 -91
- package/dist/plugin/fullscreen/index.d.ts +7 -7
- package/dist/plugin/fullscreen/index.mjs +96 -91
- package/dist/plugin/fullscreen/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/fullscreen/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/fullscreen/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/fullscreen/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/fullscreen/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/fullscreen/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/fullscreen/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/fullscreen/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/fullscreen/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/fullscreen/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/fullscreen/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/fullscreen/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/fullscreen/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/fullscreen/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/geolocation/index.cjs +249 -182
- package/dist/plugin/geolocation/index.d.ts +4 -4
- package/dist/plugin/geolocation/index.mjs +249 -182
- package/dist/plugin/geolocation/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/geolocation/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/geolocation/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/geolocation/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/geolocation/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/geolocation/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/geolocation/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/geolocation/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/geolocation/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/geolocation/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/geolocation/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/geolocation/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/geolocation/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/geolocation/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/geolocation/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/geolocation/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/geolocation/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/geolocation/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/geolocation/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/geolocation/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/geolocation/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/geolocation/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/geolocation/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/geolocation/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/notification/index.cjs +288 -13
- package/dist/plugin/notification/index.d.ts +4 -4
- package/dist/plugin/notification/index.mjs +288 -13
- package/dist/plugin/notification/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/notification/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/notification/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/notification/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/notification/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/notification/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/notification/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/notification/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/notification/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/notification/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/notification/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/notification/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/notification/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/notification/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/notification/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/notification/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/notification/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/notification/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/notification/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/notification/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/notification/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/notification/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/notification/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/notification/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/open/index.cjs +64 -55
- package/dist/plugin/open/index.d.ts +28 -12
- package/dist/plugin/open/index.mjs +64 -55
- package/dist/plugin/open/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/open/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/open/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/open/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/open/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/open/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/open/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/open/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/open/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/open/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/open/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/open/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/open/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/open/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/open/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/open/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/open/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/open/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/open/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/open/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/open/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/open/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/open/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/open/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/permission/index.cjs +372 -13
- package/dist/plugin/permission/index.d.ts +11 -5
- package/dist/plugin/permission/index.mjs +372 -13
- package/dist/plugin/permission/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/permission/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/permission/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/permission/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/permission/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/permission/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/permission/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/permission/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/permission/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/permission/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/permission/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/permission/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/permission/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/permission/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/permission/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/permission/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/permission/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/permission/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/permission/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/permission/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/permission/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/permission/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/permission/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/permission/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/pip/index.cjs +58 -57
- package/dist/plugin/pip/index.d.ts +7 -7
- package/dist/plugin/pip/index.mjs +58 -57
- package/dist/plugin/pip/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/pip/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/pip/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/pip/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/pip/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/pip/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/pip/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/pip/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/pip/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/pip/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/pip/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/pip/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/pip/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/pip/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/pip/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/pip/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/pip/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/pip/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/pip/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/pip/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/pip/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/pip/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/pip/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/pip/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/platform/index.cjs +98 -92
- package/dist/plugin/platform/index.d.ts +30 -14
- package/dist/plugin/platform/index.mjs +92 -85
- package/dist/plugin/platform/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/platform/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/platform/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/platform/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/platform/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/platform/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/platform/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/platform/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/platform/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/platform/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/platform/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/platform/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/theme/index.cjs +63 -54
- package/dist/plugin/theme/index.d.ts +2 -2
- package/dist/plugin/theme/index.mjs +63 -54
- package/dist/plugin/theme/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/theme/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/theme/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/theme/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/theme/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/theme/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/theme/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/theme/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/theme/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/theme/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/theme/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/theme/src/utils/insert-sort.d.ts +1 -0
- package/dist/plugin/vibration/index.d.ts +3 -3
- package/dist/plugin/vibration/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/plugin/vibration/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/plugin/vibration/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/plugin/vibration/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/plugin/vibration/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/plugin/vibration/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/plugin/vibration/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/plugin/vibration/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/plugin/vibration/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/plugin/vibration/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/plugin/vibration/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/plugin/vibration/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/plugin/vibration/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/plugin/vibration/src/plugin/open/types/open.d.ts +12 -12
- package/dist/plugin/vibration/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/plugin/vibration/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/plugin/vibration/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/plugin/vibration/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/vibration/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/plugin/vibration/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/vibration/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/plugin/vibration/src/types/subscription-manager.d.ts +3 -3
- package/dist/plugin/vibration/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/plugin/vibration/src/utils/insert-sort.d.ts +1 -0
- package/dist/src/plugin/appearance/constants/index.d.ts +1 -1
- package/dist/src/plugin/appearance/types/appearance.d.ts +3 -3
- package/dist/src/plugin/badge/types/badge.d.ts +3 -3
- package/dist/src/plugin/battery/types/battery.d.ts +3 -3
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +2 -2
- package/dist/src/plugin/dimension/constants/index.d.ts +10 -6
- package/dist/src/plugin/dimension/cores/index.d.ts +15 -0
- package/dist/src/plugin/dimension/types/dimensions.d.ts +52 -24
- package/dist/src/plugin/dimension/utils/create-env-observer.d.ts +16 -7
- package/dist/src/plugin/dimension/utils/create-environment-observer.d.ts +33 -0
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +7 -7
- package/dist/src/plugin/geolocation/types/geolocation.d.ts +4 -4
- package/dist/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/src/plugin/open/types/open.d.ts +12 -12
- package/dist/src/plugin/permission/constants/index.d.ts +3 -1
- package/dist/src/plugin/permission/types/permission.d.ts +7 -4
- package/dist/src/plugin/pip/types/pip.d.ts +7 -7
- package/dist/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/src/plugin/platform/types/platform.d.ts +13 -13
- package/dist/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/src/plugin/vibration/types/vibration.d.ts +3 -3
- package/dist/src/types/subscription-manager.d.ts +3 -3
- package/dist/src/utils/create-subscription-manager.d.ts +1 -1
- package/dist/src/utils/insert-sort.d.ts +1 -0
- package/package.json +1 -1
|
@@ -87,11 +87,11 @@ var Browsers;
|
|
|
87
87
|
Browsers["IE"] = "IE";
|
|
88
88
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
89
89
|
})(Browsers || (Browsers = {}));
|
|
90
|
-
var USER_AGENT
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
var USER_AGENT;
|
|
91
|
+
if (typeof globalThis.navigator.userAgent !== 'undefined')
|
|
92
|
+
USER_AGENT = globalThis.navigator.userAgent;
|
|
93
|
+
else
|
|
94
|
+
USER_AGENT = '';
|
|
95
95
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
96
96
|
'Google Chrome': 'Chrome',
|
|
97
97
|
'Microsoft Edge': 'Edge',
|
|
@@ -368,9 +368,12 @@ var EventListener = {
|
|
|
368
368
|
|
|
369
369
|
var currentUserAgent = USER_AGENT;
|
|
370
370
|
var parsedCache = null;
|
|
371
|
-
var
|
|
372
|
-
var
|
|
373
|
-
var
|
|
371
|
+
var parsedFromHighEntropyValuesOSName = undefined;
|
|
372
|
+
var parsedFromHighEntropyValuesOSVersion = undefined;
|
|
373
|
+
var parsedFromHighEntropyValuesBrowserName = undefined;
|
|
374
|
+
var parsedFromHighEntropyValuesBrowserVersion = undefined;
|
|
375
|
+
var parsedFromHighEntropyValuesEngineName = undefined;
|
|
376
|
+
var parsedFromHighEntropyValuesEngineVersion = undefined;
|
|
374
377
|
var parsedFromHighEntropyValuesDevice = null;
|
|
375
378
|
var parsedFromNavigatorGPU = {};
|
|
376
379
|
var cachedLocale = null;
|
|
@@ -417,9 +420,12 @@ function normalizeLocale(locale) {
|
|
|
417
420
|
function invalidateCache() {
|
|
418
421
|
parsedCache = null;
|
|
419
422
|
cachedLocale = null;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
+
parsedFromHighEntropyValuesOSName = undefined;
|
|
424
|
+
parsedFromHighEntropyValuesOSVersion = undefined;
|
|
425
|
+
parsedFromHighEntropyValuesBrowserName = undefined;
|
|
426
|
+
parsedFromHighEntropyValuesBrowserVersion = undefined;
|
|
427
|
+
parsedFromHighEntropyValuesEngineName = undefined;
|
|
428
|
+
parsedFromHighEntropyValuesEngineVersion = undefined;
|
|
423
429
|
parsedFromHighEntropyValuesDevice = null;
|
|
424
430
|
parsedFromNavigatorGPU = {};
|
|
425
431
|
}
|
|
@@ -435,71 +441,74 @@ function getParsedCache() {
|
|
|
435
441
|
return parsedCache;
|
|
436
442
|
}
|
|
437
443
|
function parseOS() {
|
|
438
|
-
var
|
|
444
|
+
var name = OS.Unknown;
|
|
445
|
+
var version = '';
|
|
439
446
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
440
447
|
var map = OS_RESOLVER_MAP[i];
|
|
441
448
|
var matched = currentUserAgent.match(map[0]);
|
|
442
449
|
if (matched !== null) {
|
|
443
|
-
|
|
444
|
-
|
|
450
|
+
name = map[1];
|
|
451
|
+
version = resolveVersion(matched[1], map[2]);
|
|
445
452
|
break;
|
|
446
453
|
}
|
|
447
454
|
}
|
|
448
|
-
if (
|
|
449
|
-
var
|
|
450
|
-
if (
|
|
451
|
-
var major = parseInt(
|
|
455
|
+
if (name === OS.iOS && compareVersion(version, '18.6') === 0) {
|
|
456
|
+
var execs = /\) Version\/([\d.]+)/.exec(currentUserAgent);
|
|
457
|
+
if (execs !== null) {
|
|
458
|
+
var major = parseInt(execs[1].split('.')[0], 10);
|
|
452
459
|
if (major >= 26)
|
|
453
|
-
|
|
460
|
+
version = execs[1];
|
|
454
461
|
}
|
|
455
462
|
}
|
|
456
463
|
if (currentUserAgent === USER_AGENT) {
|
|
457
|
-
if (typeof
|
|
458
|
-
|
|
459
|
-
if (typeof
|
|
460
|
-
|
|
461
|
-
if (
|
|
462
|
-
|
|
464
|
+
if (typeof parsedFromHighEntropyValuesOSName !== 'undefined')
|
|
465
|
+
name = parsedFromHighEntropyValuesOSName;
|
|
466
|
+
if (typeof parsedFromHighEntropyValuesOSVersion !== 'undefined')
|
|
467
|
+
version = parsedFromHighEntropyValuesOSVersion;
|
|
468
|
+
if (name === OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
|
|
469
|
+
name = OS.iOS;
|
|
463
470
|
}
|
|
464
|
-
return
|
|
471
|
+
return { name: name, version: version };
|
|
465
472
|
}
|
|
466
473
|
function parseBrowser() {
|
|
467
|
-
var
|
|
474
|
+
var name = Browsers.Unknown;
|
|
475
|
+
var version = '';
|
|
468
476
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
469
477
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
470
478
|
var matched = currentUserAgent.match(map[0]);
|
|
471
479
|
if (matched !== null) {
|
|
472
|
-
|
|
473
|
-
|
|
480
|
+
name = map[1];
|
|
481
|
+
version = resolveVersion(matched[1], map[2]);
|
|
474
482
|
break;
|
|
475
483
|
}
|
|
476
484
|
}
|
|
477
485
|
if (currentUserAgent === USER_AGENT) {
|
|
478
|
-
if (typeof
|
|
479
|
-
|
|
480
|
-
if (typeof
|
|
481
|
-
|
|
486
|
+
if (typeof parsedFromHighEntropyValuesBrowserName !== 'undefined')
|
|
487
|
+
name = parsedFromHighEntropyValuesBrowserName;
|
|
488
|
+
if (typeof parsedFromHighEntropyValuesBrowserVersion !== 'undefined')
|
|
489
|
+
version = parsedFromHighEntropyValuesBrowserVersion;
|
|
482
490
|
}
|
|
483
|
-
return
|
|
491
|
+
return { name: name, version: version };
|
|
484
492
|
}
|
|
485
493
|
function parseEngine() {
|
|
486
|
-
var
|
|
494
|
+
var name = Engines.Unknown;
|
|
495
|
+
var version = '';
|
|
487
496
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
488
497
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
489
498
|
var matched = currentUserAgent.match(map[0]);
|
|
490
499
|
if (matched !== null) {
|
|
491
|
-
|
|
492
|
-
|
|
500
|
+
name = map[1];
|
|
501
|
+
version = resolveVersion(matched[1], map[2]);
|
|
493
502
|
break;
|
|
494
503
|
}
|
|
495
504
|
}
|
|
496
505
|
if (currentUserAgent === USER_AGENT) {
|
|
497
|
-
if (typeof
|
|
498
|
-
|
|
499
|
-
if (typeof
|
|
500
|
-
|
|
506
|
+
if (typeof parsedFromHighEntropyValuesEngineName !== 'undefined')
|
|
507
|
+
name = parsedFromHighEntropyValuesEngineName;
|
|
508
|
+
if (typeof parsedFromHighEntropyValuesEngineVersion !== 'undefined')
|
|
509
|
+
version = parsedFromHighEntropyValuesEngineVersion;
|
|
501
510
|
}
|
|
502
|
-
return
|
|
511
|
+
return { name: name, version: version };
|
|
503
512
|
}
|
|
504
513
|
function getGPU() {
|
|
505
514
|
return {
|
|
@@ -512,24 +521,22 @@ function getGPU() {
|
|
|
512
521
|
function getLocale() {
|
|
513
522
|
if (cachedLocale !== null)
|
|
514
523
|
return cachedLocale;
|
|
515
|
-
var
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
for (var i = 0; i < language.length; i++)
|
|
525
|
-
addLanguage(language[i]);
|
|
524
|
+
var language = null;
|
|
525
|
+
var languages = [];
|
|
526
|
+
var timezone = null;
|
|
527
|
+
var offset = 0;
|
|
528
|
+
var isRTL = false;
|
|
529
|
+
var isRTLResolved = null;
|
|
530
|
+
function addLanguages(langs) {
|
|
531
|
+
for (var i = 0; i < langs.length; i++)
|
|
532
|
+
addLanguage(langs[i]);
|
|
526
533
|
}
|
|
527
|
-
function addLanguage(
|
|
528
|
-
|
|
529
|
-
if (typeof
|
|
530
|
-
if (
|
|
531
|
-
|
|
532
|
-
|
|
534
|
+
function addLanguage(lang) {
|
|
535
|
+
lang = normalizeLocale(lang);
|
|
536
|
+
if (typeof lang === 'string' && languages.indexOf(lang) === -1) {
|
|
537
|
+
if (language === null)
|
|
538
|
+
language = lang;
|
|
539
|
+
languages.push(lang);
|
|
533
540
|
}
|
|
534
541
|
}
|
|
535
542
|
if (typeof Intl !== 'undefined') {
|
|
@@ -539,7 +546,7 @@ function getLocale() {
|
|
|
539
546
|
catch (_) {
|
|
540
547
|
}
|
|
541
548
|
try {
|
|
542
|
-
|
|
549
|
+
timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
543
550
|
}
|
|
544
551
|
catch (_) {
|
|
545
552
|
}
|
|
@@ -557,38 +564,38 @@ function getLocale() {
|
|
|
557
564
|
addLanguage(globalThis.navigator.systemLanguage);
|
|
558
565
|
}
|
|
559
566
|
try {
|
|
560
|
-
|
|
567
|
+
offset = new Date().getTimezoneOffset() * -1;
|
|
561
568
|
}
|
|
562
569
|
catch (_) {
|
|
563
570
|
}
|
|
564
|
-
if (typeof
|
|
571
|
+
if (typeof language === 'string') {
|
|
565
572
|
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
566
573
|
try {
|
|
567
|
-
var intlLocale = new Intl.Locale(
|
|
574
|
+
var intlLocale = new Intl.Locale(language);
|
|
568
575
|
if (typeof intlLocale.getTextInfo === 'function')
|
|
569
|
-
|
|
576
|
+
isRTLResolved = intlLocale.getTextInfo().direction === 'rtl';
|
|
570
577
|
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
571
|
-
|
|
578
|
+
isRTLResolved = intlLocale.textInfo.direction === 'rtl';
|
|
572
579
|
}
|
|
573
580
|
catch (_) {
|
|
574
581
|
}
|
|
575
582
|
}
|
|
576
|
-
if (typeof
|
|
577
|
-
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(
|
|
583
|
+
if (typeof isRTLResolved !== 'boolean') {
|
|
584
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(language);
|
|
578
585
|
if (matched !== null) {
|
|
579
|
-
var
|
|
586
|
+
var lang = matched[1].toLowerCase();
|
|
580
587
|
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
581
|
-
if (RTL_LANGUAGES[i] ===
|
|
582
|
-
|
|
588
|
+
if (RTL_LANGUAGES[i] === lang) {
|
|
589
|
+
isRTLResolved = true;
|
|
583
590
|
break;
|
|
584
591
|
}
|
|
585
592
|
}
|
|
586
593
|
}
|
|
587
594
|
}
|
|
588
595
|
}
|
|
589
|
-
if (typeof
|
|
590
|
-
|
|
591
|
-
cachedLocale =
|
|
596
|
+
if (typeof isRTLResolved === 'boolean')
|
|
597
|
+
isRTL = isRTLResolved;
|
|
598
|
+
cachedLocale = { language: language, languages: languages, timezone: timezone, offset: offset, isRTL: isRTL };
|
|
592
599
|
return cachedLocale;
|
|
593
600
|
}
|
|
594
601
|
function getDevice() {
|
|
@@ -639,38 +646,38 @@ function parseFromHighEntropyValues() {
|
|
|
639
646
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
640
647
|
browserName = brandName;
|
|
641
648
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
642
|
-
|
|
649
|
+
parsedFromHighEntropyValuesBrowserName = Browsers.Chrome;
|
|
643
650
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
644
|
-
|
|
651
|
+
parsedFromHighEntropyValuesBrowserName = Browsers.Edge;
|
|
645
652
|
else if (browserName === 'Opera Mobi')
|
|
646
|
-
|
|
647
|
-
|
|
653
|
+
parsedFromHighEntropyValuesBrowserName = Browsers.Opera;
|
|
654
|
+
parsedFromHighEntropyValuesBrowserVersion = brandVersion;
|
|
648
655
|
}
|
|
649
656
|
prevBrandName = brandName;
|
|
650
657
|
}
|
|
651
658
|
if (brandName === 'Chromium')
|
|
652
|
-
|
|
659
|
+
parsedFromHighEntropyValuesEngineVersion = brandVersion;
|
|
653
660
|
}
|
|
654
661
|
if (typeof platformVersion === 'string') {
|
|
655
662
|
if (getParsedCache().os.name === OS.Windows) {
|
|
656
663
|
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
657
|
-
|
|
664
|
+
parsedFromHighEntropyValuesOSVersion = '11';
|
|
658
665
|
else
|
|
659
|
-
|
|
666
|
+
parsedFromHighEntropyValuesOSVersion = '10';
|
|
660
667
|
}
|
|
661
668
|
else {
|
|
662
|
-
|
|
669
|
+
parsedFromHighEntropyValuesOSVersion = platformVersion;
|
|
663
670
|
}
|
|
664
671
|
}
|
|
665
672
|
if (typeof platform === 'string') {
|
|
666
673
|
if (/android/i.test(platform))
|
|
667
|
-
|
|
674
|
+
parsedFromHighEntropyValuesOSName = OS.Android;
|
|
668
675
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
669
|
-
|
|
676
|
+
parsedFromHighEntropyValuesOSName = OS.iOS;
|
|
670
677
|
else if (/windows|win32/i.test(platform))
|
|
671
|
-
|
|
678
|
+
parsedFromHighEntropyValuesOSName = OS.Windows;
|
|
672
679
|
else if (/macos|macintel/i.test(platform))
|
|
673
|
-
|
|
680
|
+
parsedFromHighEntropyValuesOSName = OS.MacOS;
|
|
674
681
|
}
|
|
675
682
|
if (result.mobile === true)
|
|
676
683
|
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
@@ -3,6 +3,6 @@ export declare enum Appearances {
|
|
|
3
3
|
Light = "light",
|
|
4
4
|
Dark = "dark"
|
|
5
5
|
}
|
|
6
|
-
export declare let
|
|
6
|
+
export declare let PREFERS_COLOR_SCHEME_MEDIA_QUERY_LIST: MediaQueryList;
|
|
7
7
|
export declare const CONTEXT: CanvasRenderingContext2D | null;
|
|
8
8
|
export declare const SVG_PIXEL_DATA_URL: string;
|
|
@@ -2,8 +2,8 @@ import { Appearances } from "../constants";
|
|
|
2
2
|
export declare interface AppearanceInstance {
|
|
3
3
|
get value(): Appearances;
|
|
4
4
|
onChange(listener: (appearance: Appearances) => void, options?: AddEventListenerOptions): () => void;
|
|
5
|
-
Constants: {
|
|
6
|
-
Appearances: typeof Appearances;
|
|
5
|
+
readonly Constants: {
|
|
6
|
+
readonly Appearances: typeof Appearances;
|
|
7
7
|
};
|
|
8
|
-
Errors: {};
|
|
8
|
+
readonly Errors: {};
|
|
9
9
|
}
|
|
@@ -3,8 +3,8 @@ export declare interface BadgeInstance {
|
|
|
3
3
|
get supported(): boolean;
|
|
4
4
|
set(contents: number): Promise<void>;
|
|
5
5
|
clear(): Promise<void>;
|
|
6
|
-
Constants: {};
|
|
7
|
-
Errors: {
|
|
8
|
-
NotSupportedError: typeof NotSupportedError;
|
|
6
|
+
readonly Constants: {};
|
|
7
|
+
readonly Errors: {
|
|
8
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
@@ -19,8 +19,8 @@ export declare interface BatteryInstance {
|
|
|
19
19
|
get supported(): boolean;
|
|
20
20
|
get value(): Promise<BatteryManager>;
|
|
21
21
|
onChange(listener: (battery: BatteryManager) => void, options?: AddEventListenerOptions): () => void;
|
|
22
|
-
Constants: {};
|
|
23
|
-
Errors: {
|
|
24
|
-
NotSupportedError: typeof NotSupportedError;
|
|
22
|
+
readonly Constants: {};
|
|
23
|
+
readonly Errors: {
|
|
24
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Dimensions } from "../types";
|
|
2
1
|
export declare enum Orientation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
PortraitPrimary = "portrait-primary",
|
|
3
|
+
PortraitSecondary = "portrait-secondary",
|
|
4
|
+
LandscapePrimary = "landscape-primary",
|
|
5
|
+
LandscapeSecondary = "landscape-secondary"
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Orientation {
|
|
8
|
+
function isLandscape(orientation: Orientation): boolean;
|
|
9
|
+
function isPortrait(orientation: Orientation): boolean;
|
|
6
10
|
}
|
|
7
11
|
export declare const ENV_PRESETS: {
|
|
8
12
|
readonly 'safe-area-inset': {
|
|
@@ -40,5 +44,5 @@ export declare const ENV_PRESETS: {
|
|
|
40
44
|
readonly left: "viewport-segment-left";
|
|
41
45
|
};
|
|
42
46
|
};
|
|
43
|
-
export declare
|
|
44
|
-
export declare let
|
|
47
|
+
export declare let ORIENTATION_MEDIA_QUERY_LIST: MediaQueryList;
|
|
48
|
+
export declare let DEVICE_POSTURE_MEDIA_QUERY_LIST: MediaQueryList;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import { DimensionInstance } from "../types";
|
|
2
|
+
declare global {
|
|
3
|
+
interface DOMRectReadOnly {
|
|
4
|
+
readonly x: number;
|
|
5
|
+
readonly y: number;
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
readonly top: number;
|
|
9
|
+
readonly right: number;
|
|
10
|
+
readonly bottom: number;
|
|
11
|
+
readonly left: number;
|
|
12
|
+
}
|
|
13
|
+
interface VisualViewport {
|
|
14
|
+
readonly segments?: DOMRectReadOnly[];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
2
17
|
declare const Dimension: DimensionInstance;
|
|
3
18
|
export default Dimension;
|
|
@@ -1,34 +1,62 @@
|
|
|
1
1
|
import { ENV_PRESETS, Orientation } from "../constants";
|
|
2
|
+
import { NotSupportedError } from "../../../errors/not-supported-error";
|
|
3
|
+
import { PermissionNotGrantedError } from "../../../errors/permission-not-granted-error";
|
|
2
4
|
export type EnvironmentPresetKey = keyof typeof ENV_PRESETS;
|
|
3
|
-
export type
|
|
5
|
+
export type EnvironmentPresetAttribute<K extends EnvironmentPresetKey> = keyof typeof ENV_PRESETS[K];
|
|
4
6
|
export type EnvironmentPresetValues<K extends EnvironmentPresetKey> = {
|
|
5
|
-
[P in
|
|
7
|
+
[P in EnvironmentPresetAttribute<K>]: number;
|
|
6
8
|
};
|
|
7
|
-
export declare interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
Errors: {};
|
|
9
|
+
export declare interface Environment {
|
|
10
|
+
readonly safeAreaInset: EnvironmentObserver<'safe-area-inset'>;
|
|
11
|
+
readonly safeAreaMaxInset: EnvironmentObserver<'safe-area-max-inset'>;
|
|
12
|
+
readonly keyboardInset: EnvironmentObserver<'keyboard-inset'>;
|
|
13
|
+
readonly titlebarArea: EnvironmentObserver<'titlebar-area'>;
|
|
14
|
+
readonly viewportSegment: EnvironmentObserver<'viewport-segment'>;
|
|
15
15
|
}
|
|
16
|
-
export declare interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
innerHeight: number;
|
|
21
|
-
scale: number;
|
|
22
|
-
orientation: Orientation;
|
|
16
|
+
export declare interface SegmentsObserver {
|
|
17
|
+
get value(): EnvironmentPresetValues<'viewport-segment'>[];
|
|
18
|
+
onChange(listener: (value: EnvironmentPresetValues<'viewport-segment'>[]) => void, options?: AddEventListenerOptions): () => void;
|
|
19
|
+
useCssVariable(prefix: string): () => void;
|
|
23
20
|
}
|
|
24
|
-
export declare
|
|
21
|
+
export declare type EnvironmentObserver<K extends EnvironmentPresetKey> = K extends 'viewport-segment' ? SegmentsObserver : {
|
|
25
22
|
get value(): EnvironmentPresetValues<K>;
|
|
26
23
|
onChange(listener: (value: EnvironmentPresetValues<K>) => void, options?: AddEventListenerOptions): () => void;
|
|
24
|
+
useCssVariable(prefix: string): () => void;
|
|
25
|
+
};
|
|
26
|
+
export declare interface Dimensions {
|
|
27
|
+
readonly outerWidth: number;
|
|
28
|
+
readonly outerHeight: number;
|
|
29
|
+
readonly innerWidth: number;
|
|
30
|
+
readonly innerHeight: number;
|
|
31
|
+
readonly scale: number;
|
|
27
32
|
}
|
|
28
|
-
export declare interface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
export declare interface DeviceOrientationValue {
|
|
34
|
+
readonly alpha: number | null;
|
|
35
|
+
readonly beta: number | null;
|
|
36
|
+
readonly gamma: number | null;
|
|
37
|
+
readonly absolute: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare interface DeviceOrientationInstance {
|
|
40
|
+
get supported(): boolean;
|
|
41
|
+
readonly value: Promise<DeviceOrientationValue>;
|
|
42
|
+
onChange(listener: (value: DeviceOrientationValue) => void, options?: AddEventListenerOptions): () => void;
|
|
43
|
+
}
|
|
44
|
+
export declare interface ScreenOrientationInstance {
|
|
45
|
+
get supported(): boolean;
|
|
46
|
+
readonly value: Orientation;
|
|
47
|
+
onChange(listener: (value: Orientation) => void, options?: AddEventListenerOptions): () => void;
|
|
48
|
+
}
|
|
49
|
+
export declare interface DimensionInstance {
|
|
50
|
+
get value(): Dimensions;
|
|
51
|
+
readonly environment: Environment;
|
|
52
|
+
readonly screenOrientation: ScreenOrientationInstance;
|
|
53
|
+
readonly deviceOrientation: DeviceOrientationInstance;
|
|
54
|
+
onChange(listener: (dimension: Dimensions) => void, options?: AddEventListenerOptions): () => void;
|
|
55
|
+
readonly Constants: {
|
|
56
|
+
readonly Orientation: typeof Orientation;
|
|
57
|
+
};
|
|
58
|
+
readonly Errors: {
|
|
59
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
60
|
+
readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
|
|
61
|
+
};
|
|
34
62
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvironmentObserver, EnvironmentPresetKey } from "../types";
|
|
2
2
|
declare global {
|
|
3
3
|
interface Navigator {
|
|
4
4
|
readonly virtualKeyboard?: VirtualKeyboard;
|
|
5
|
+
readonly devicePosture?: DevicePosture;
|
|
5
6
|
}
|
|
7
|
+
var viewport: BrowsingContextViewport | undefined;
|
|
8
|
+
}
|
|
9
|
+
interface DevicePosture extends EventTarget {
|
|
10
|
+
readonly type: 'continuous' | 'folded';
|
|
11
|
+
onchange: ((this: DevicePosture, ev: Event) => any) | null;
|
|
6
12
|
}
|
|
7
|
-
type ChangeCallback<K extends EnvironmentPresetKey> = (values: EnvironmentPresetValues<K>) => void;
|
|
8
13
|
interface VirtualKeyboardEventMap {
|
|
9
14
|
geometrychange: Event;
|
|
10
15
|
}
|
|
@@ -16,9 +21,13 @@ interface VirtualKeyboard extends EventTarget {
|
|
|
16
21
|
addEventListener<K extends keyof VirtualKeyboardEventMap>(type: K, listener: (this: VirtualKeyboard, ev: VirtualKeyboardEventMap[K]) => any, options?: AddEventListenerOptions): void;
|
|
17
22
|
removeEventListener<K extends keyof VirtualKeyboardEventMap>(type: K, listener: (this: VirtualKeyboard, ev: VirtualKeyboardEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
18
23
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
interface BrowsingContextViewportEventMap {
|
|
25
|
+
change: Event;
|
|
26
|
+
}
|
|
27
|
+
interface BrowsingContextViewport extends EventTarget {
|
|
28
|
+
readonly segments: ReadonlyArray<DOMRectReadOnly> | null;
|
|
29
|
+
addEventListener<K extends keyof BrowsingContextViewportEventMap>(type: K, listener: (this: BrowsingContextViewport, ev: BrowsingContextViewportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
30
|
+
removeEventListener<K extends keyof BrowsingContextViewportEventMap>(type: K, listener: (this: BrowsingContextViewport, ev: BrowsingContextViewportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
31
|
+
}
|
|
32
|
+
export default function createEnvObserver<K extends EnvironmentPresetKey>(preset: K): EnvironmentObserver<K>;
|
|
24
33
|
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EnvironmentObserver, EnvironmentPresetKey } from "../types";
|
|
2
|
+
declare global {
|
|
3
|
+
interface Navigator {
|
|
4
|
+
readonly virtualKeyboard?: VirtualKeyboard;
|
|
5
|
+
readonly devicePosture?: DevicePosture;
|
|
6
|
+
}
|
|
7
|
+
var viewport: BrowsingContextViewport | undefined;
|
|
8
|
+
}
|
|
9
|
+
interface DevicePosture extends EventTarget {
|
|
10
|
+
readonly type: 'continuous' | 'folded';
|
|
11
|
+
onchange: ((this: DevicePosture, ev: Event) => any) | null;
|
|
12
|
+
}
|
|
13
|
+
interface VirtualKeyboardEventMap {
|
|
14
|
+
geometrychange: Event;
|
|
15
|
+
}
|
|
16
|
+
interface VirtualKeyboard extends EventTarget {
|
|
17
|
+
readonly boundingRect: DOMRect;
|
|
18
|
+
overlaysContent: boolean;
|
|
19
|
+
show(): void;
|
|
20
|
+
hide(): void;
|
|
21
|
+
addEventListener<K extends keyof VirtualKeyboardEventMap>(type: K, listener: (this: VirtualKeyboard, ev: VirtualKeyboardEventMap[K]) => any, options?: AddEventListenerOptions): void;
|
|
22
|
+
removeEventListener<K extends keyof VirtualKeyboardEventMap>(type: K, listener: (this: VirtualKeyboard, ev: VirtualKeyboardEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
23
|
+
}
|
|
24
|
+
interface BrowsingContextViewportEventMap {
|
|
25
|
+
change: Event;
|
|
26
|
+
}
|
|
27
|
+
interface BrowsingContextViewport extends EventTarget {
|
|
28
|
+
readonly segments: ReadonlyArray<DOMRectReadOnly> | null;
|
|
29
|
+
addEventListener<K extends keyof BrowsingContextViewportEventMap>(type: K, listener: (this: BrowsingContextViewport, ev: BrowsingContextViewportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
30
|
+
removeEventListener<K extends keyof BrowsingContextViewportEventMap>(type: K, listener: (this: BrowsingContextViewport, ev: BrowsingContextViewportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
31
|
+
}
|
|
32
|
+
export default function createEnvironmentObserver<K extends EnvironmentPresetKey>(preset: K): EnvironmentObserver<K>;
|
|
33
|
+
export {};
|
|
@@ -11,14 +11,14 @@ export declare interface FullscreenInstance {
|
|
|
11
11
|
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
12
12
|
onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
13
13
|
onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
|
|
14
|
-
Constants: {};
|
|
15
|
-
Errors: {
|
|
16
|
-
NotSupportedError: typeof NotSupportedError;
|
|
17
|
-
InvalidStateError: typeof InvalidStateError;
|
|
14
|
+
readonly Constants: {};
|
|
15
|
+
readonly Errors: {
|
|
16
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
17
|
+
readonly InvalidStateError: typeof InvalidStateError;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
export declare interface FullscreenEventPayload {
|
|
21
|
-
nativeEvent: Event;
|
|
22
|
-
element: Element;
|
|
23
|
-
isActive: boolean;
|
|
21
|
+
readonly nativeEvent: Event;
|
|
22
|
+
readonly element: Element;
|
|
23
|
+
readonly isActive: boolean;
|
|
24
24
|
}
|
|
@@ -4,9 +4,9 @@ export declare interface GeolocationInstance {
|
|
|
4
4
|
get supported(): boolean;
|
|
5
5
|
get value(): Promise<GeolocationCoordinates>;
|
|
6
6
|
onChange(listener: (coordinates: GeolocationCoordinates) => void, options?: AddEventListenerOptions): () => void;
|
|
7
|
-
Constants: {};
|
|
8
|
-
Errors: {
|
|
9
|
-
NotSupportedError: typeof NotSupportedError;
|
|
10
|
-
PermissionNotGrantedError: typeof PermissionNotGrantedError;
|
|
7
|
+
readonly Constants: {};
|
|
8
|
+
readonly Errors: {
|
|
9
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
10
|
+
readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -19,9 +19,9 @@ export interface NotificationOptions {
|
|
|
19
19
|
export declare interface NotificationInstance {
|
|
20
20
|
send(options: NotificationOptions): Promise<Notification>;
|
|
21
21
|
get supported(): boolean;
|
|
22
|
-
Constants: {};
|
|
23
|
-
Errors: {
|
|
24
|
-
NotSupportedError: typeof NotSupportedError;
|
|
25
|
-
PermissionNotGrantedError: typeof PermissionNotGrantedError;
|
|
22
|
+
readonly Constants: {};
|
|
23
|
+
readonly Errors: {
|
|
24
|
+
readonly NotSupportedError: typeof NotSupportedError;
|
|
25
|
+
readonly PermissionNotGrantedError: typeof PermissionNotGrantedError;
|
|
26
26
|
};
|
|
27
27
|
}
|