native-fn 1.0.41 → 1.0.43
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/dist/native.cjs +380 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +380 -1
- package/dist/native.umd.js +380 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +262 -98
- package/dist/plugin/app/index.d.ts +18 -0
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +262 -98
- package/dist/plugin/app/index.umd.js +262 -98
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/constants/platform.d.ts +21 -12
- package/dist/plugin/app/src/types/platform.d.ts +17 -0
- package/dist/plugin/app/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/app/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/app/src/utils/dynamic-import.d.ts +1 -0
- package/dist/plugin/camera/index.cjs +248 -86
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +248 -86
- package/dist/plugin/camera/index.umd.js +248 -86
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/constants/platform.d.ts +21 -12
- package/dist/plugin/camera/src/types/platform.d.ts +17 -0
- package/dist/plugin/camera/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/camera/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/camera/src/utils/dynamic-import.d.ts +1 -0
- package/dist/plugin/clipboard/index.cjs +7 -4
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +7 -4
- package/dist/plugin/clipboard/index.umd.js +7 -4
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/constants/platform.d.ts +21 -12
- package/dist/plugin/clipboard/src/types/platform.d.ts +17 -0
- package/dist/plugin/clipboard/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/clipboard/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/clipboard/src/utils/dynamic-import.d.ts +1 -0
- package/dist/plugin/fullscreen/index.cjs +241 -82
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +241 -82
- package/dist/plugin/fullscreen/index.umd.js +241 -82
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/constants/platform.d.ts +21 -12
- package/dist/plugin/fullscreen/src/types/platform.d.ts +17 -0
- package/dist/plugin/fullscreen/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/fullscreen/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/fullscreen/src/utils/dynamic-import.d.ts +1 -0
- package/dist/plugin/platform/index.cjs +7 -7
- package/dist/plugin/platform/index.d.ts +18 -0
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +7 -7
- package/dist/plugin/platform/index.umd.js +7 -7
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/constants/platform.d.ts +19 -0
- package/dist/plugin/platform/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/platform/src/utils/dynamic-import.d.ts +1 -0
- package/dist/plugin/theme/index.cjs +252 -91
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +252 -91
- package/dist/plugin/theme/index.umd.js +252 -91
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/constants/platform.d.ts +21 -12
- package/dist/plugin/theme/src/types/platform.d.ts +17 -0
- package/dist/plugin/theme/src/utils/create-custom-error.d.ts +5 -0
- package/dist/plugin/theme/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/plugin/theme/src/utils/dynamic-import.d.ts +1 -0
- package/dist/src/constants/platform.d.ts +21 -12
- package/dist/src/types/platform.d.ts +17 -0
- package/dist/src/utils/create-custom-error.d.ts +5 -0
- package/dist/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/src/utils/dynamic-import.d.ts +1 -0
- package/package.json +1 -8
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { PlatformInstance } from "../types/platform";
|
|
2
|
+
declare global {
|
|
3
|
+
interface Navigator {
|
|
4
|
+
userAgentData?: UserAgentData;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
interface ModernUserAgentDataBrand {
|
|
8
|
+
brand: string;
|
|
9
|
+
version: string;
|
|
10
|
+
}
|
|
11
|
+
type UserAgentDataBrand = ModernUserAgentDataBrand | string | null | undefined;
|
|
12
|
+
interface UserAgentDataValues {
|
|
13
|
+
brands?: UserAgentDataBrand[];
|
|
14
|
+
fullVersionList?: UserAgentDataBrand[];
|
|
15
|
+
platformVersion?: string | null | undefined;
|
|
16
|
+
}
|
|
17
|
+
interface UserAgentData {
|
|
18
|
+
getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
|
|
19
|
+
}
|
|
1
20
|
export declare enum OS {
|
|
2
21
|
Unknown = "Unknown",
|
|
3
22
|
Android = "Android",
|
|
@@ -33,15 +52,5 @@ export declare enum Browsers {
|
|
|
33
52
|
IE = "IE",
|
|
34
53
|
SamsungInternet = "SamsungInternet"
|
|
35
54
|
}
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
export declare let OS_VERSION: string;
|
|
39
|
-
export declare let ENGINE_NAME: Engines;
|
|
40
|
-
export declare let ENGINE_VERSION: string;
|
|
41
|
-
export declare let BROWSER_NAME: Browsers;
|
|
42
|
-
export declare let BROWSER_VERSION: string;
|
|
43
|
-
export declare const RENDERER: string;
|
|
44
|
-
export declare const IS_WEBVIEW: boolean;
|
|
45
|
-
export declare const IS_MOBILE: boolean;
|
|
46
|
-
export declare const IS_DESKTOP: boolean;
|
|
47
|
-
export declare const IS_STANDALONE: boolean;
|
|
55
|
+
declare const Platform: PlatformInstance;
|
|
56
|
+
export default Platform;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Browsers, Devices, Engines, OS } from "../constants/platform";
|
|
2
|
+
export declare interface PlatformInstance {
|
|
3
|
+
os: OS;
|
|
4
|
+
device: Devices;
|
|
5
|
+
engine: Engines;
|
|
6
|
+
browser: Browsers;
|
|
7
|
+
osVersion: string;
|
|
8
|
+
engineVersion: string;
|
|
9
|
+
browserVersion: string;
|
|
10
|
+
renderer: string;
|
|
11
|
+
userAgent: string;
|
|
12
|
+
isWebview: boolean;
|
|
13
|
+
isStandalone: boolean;
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
isDesktop: boolean;
|
|
16
|
+
isNodeJS: boolean;
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function createHiddenElement<K extends keyof HTMLElementTagNameMap>(tagName: K, focusable?: boolean): HTMLElementTagNameMap[K];
|
|
1
|
+
export default function createHiddenElement<K extends keyof HTMLElementTagNameMap>(tagName: K, focusable?: boolean): HTMLElementTagNameMap[K] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function dynamicImport<T = any>(moduleName: string): Promise<T | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
|
|
@@ -28,12 +28,6 @@
|
|
|
28
28
|
"require": "./dist/plugin/theme/index.cjs",
|
|
29
29
|
"default": "./dist/plugin/theme/index.mjs"
|
|
30
30
|
},
|
|
31
|
-
"./plugin/platform": {
|
|
32
|
-
"types": "./dist/plugin/platform/index.d.ts",
|
|
33
|
-
"import": "./dist/plugin/platform/index.mjs",
|
|
34
|
-
"require": "./dist/plugin/platform/index.cjs",
|
|
35
|
-
"default": "./dist/plugin/platform/index.mjs"
|
|
36
|
-
},
|
|
37
31
|
"./plugin/camera": {
|
|
38
32
|
"types": "./dist/plugin/camera/index.d.ts",
|
|
39
33
|
"import": "./dist/plugin/camera/index.mjs",
|
|
@@ -58,7 +52,6 @@
|
|
|
58
52
|
"*": {
|
|
59
53
|
"plugin/app": ["dist/plugin/app/index.d.ts"],
|
|
60
54
|
"plugin/theme": ["dist/plugin/theme/index.d.ts"],
|
|
61
|
-
"plugin/platform": ["dist/plugin/platform/index.d.ts"],
|
|
62
55
|
"plugin/camera": ["dist/plugin/camera/index.d.ts"],
|
|
63
56
|
"plugin/clipboard": ["dist/plugin/clipboard/index.d.ts"],
|
|
64
57
|
"plugin/fullscreen": ["dist/plugin/fullscreen/index.d.ts"],
|