native-fn 1.0.74 → 1.0.76
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/index.d.ts +5 -5
- package/dist/native.cjs +1 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/native.umd.js +1 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +355 -176
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +355 -176
- package/dist/plugin/app/index.umd.js +355 -176
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/app/src/types/native.d.ts +5 -5
- package/dist/plugin/appearance/index.cjs +344 -165
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +344 -165
- package/dist/plugin/appearance/index.umd.js +344 -165
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/appearance/src/types/native.d.ts +5 -5
- package/dist/plugin/clipboard/index.cjs +339 -160
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +339 -160
- package/dist/plugin/clipboard/index.umd.js +339 -160
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/clipboard/src/types/native.d.ts +5 -5
- package/dist/plugin/fullscreen/index.cjs +348 -169
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +348 -169
- package/dist/plugin/fullscreen/index.umd.js +348 -169
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/fullscreen/src/types/native.d.ts +5 -5
- package/dist/plugin/platform/index.cjs +339 -160
- package/dist/plugin/platform/index.d.ts +17 -7
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +339 -160
- package/dist/plugin/platform/index.umd.js +339 -160
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/platform/src/types/native.d.ts +5 -5
- package/dist/plugin/theme/index.cjs +339 -160
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +339 -160
- package/dist/plugin/theme/index.umd.js +339 -160
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/plugin/theme/src/types/native.d.ts +5 -5
- package/dist/src/plugin/platform/cores/index.d.ts +12 -0
- package/dist/src/plugin/platform/types/platform.d.ts +16 -6
- package/dist/src/types/native.d.ts +5 -5
- package/package.json +8 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
|
|
2
2
|
export declare interface PlatformInstance {
|
|
3
|
-
os: OS
|
|
3
|
+
os: NameVersionPair<OS>;
|
|
4
|
+
engine: NameVersionPair<Engines>;
|
|
5
|
+
browser: NameVersionPair<Browsers>;
|
|
4
6
|
device: Devices;
|
|
5
|
-
engine: Engines;
|
|
6
|
-
browser: Browsers;
|
|
7
7
|
crossPlatformFramework: CrossPlatformFramework;
|
|
8
|
-
|
|
9
|
-
engineVersion: string;
|
|
10
|
-
browserVersion: string;
|
|
8
|
+
network: Network;
|
|
11
9
|
renderer: string;
|
|
12
10
|
userAgent: string;
|
|
13
11
|
isNode: boolean;
|
|
@@ -16,3 +14,15 @@ export declare interface PlatformInstance {
|
|
|
16
14
|
isDesktop: boolean;
|
|
17
15
|
isWebview: boolean;
|
|
18
16
|
}
|
|
17
|
+
export declare interface NameVersionPair<T> {
|
|
18
|
+
name: T;
|
|
19
|
+
version: string;
|
|
20
|
+
}
|
|
21
|
+
export declare interface Network {
|
|
22
|
+
isOnline: boolean | null;
|
|
23
|
+
effectiveType: 'slow-2g' | '2g' | '3g' | '4g' | null;
|
|
24
|
+
type: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | null;
|
|
25
|
+
downlink: number | null;
|
|
26
|
+
rtt: number | null;
|
|
27
|
+
saveData: boolean | null;
|
|
28
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PluginNotExtendedError } from "../errors/plugin-not-extended-error";
|
|
2
|
-
export interface NativePlugins {
|
|
2
|
+
export declare interface NativePlugins {
|
|
3
3
|
}
|
|
4
|
-
export interface NativeConstants extends Record<string, any> {
|
|
4
|
+
export declare interface NativeConstants extends Record<string, any> {
|
|
5
5
|
}
|
|
6
|
-
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
|
+
export declare interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
7
7
|
PluginNotExtendedError: typeof PluginNotExtendedError;
|
|
8
8
|
}
|
|
9
9
|
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
@@ -13,10 +13,10 @@ export declare interface NativePlugin<Key extends string, Module, Constants exte
|
|
|
13
13
|
Constants: Constants;
|
|
14
14
|
Errors: Errors;
|
|
15
15
|
}
|
|
16
|
-
export type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
|
|
16
|
+
export declare type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
|
|
17
17
|
[Plugin in Key]: Module;
|
|
18
18
|
}, NativeConstants & Constants, NativeErrors & Errors>;
|
|
19
|
-
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
19
|
+
export declare type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
20
20
|
Version: string;
|
|
21
21
|
Constants: AssignedConstants;
|
|
22
22
|
Errors: AssignedErrors;
|
|
@@ -5,8 +5,18 @@ declare global {
|
|
|
5
5
|
interface Navigator {
|
|
6
6
|
userAgent?: string;
|
|
7
7
|
userAgentData?: UserAgentData;
|
|
8
|
+
connection?: NavigatorConnection;
|
|
9
|
+
mozConnection?: NavigatorConnection;
|
|
10
|
+
webkitConnection?: NavigatorConnection;
|
|
8
11
|
}
|
|
9
12
|
}
|
|
13
|
+
interface NavigatorConnection {
|
|
14
|
+
effectiveType?: 'slow-2g' | '2g' | '3g' | '4g';
|
|
15
|
+
type?: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other';
|
|
16
|
+
downlink?: number;
|
|
17
|
+
rtt?: number;
|
|
18
|
+
saveData?: boolean;
|
|
19
|
+
}
|
|
10
20
|
interface CordovaDevice {
|
|
11
21
|
platform: string;
|
|
12
22
|
version: string;
|
|
@@ -20,6 +30,8 @@ interface UserAgentDataValues {
|
|
|
20
30
|
brands?: UserAgentDataBrand[];
|
|
21
31
|
fullVersionList?: UserAgentDataBrand[];
|
|
22
32
|
platformVersion?: string | null | undefined;
|
|
33
|
+
platform?: string | null | undefined;
|
|
34
|
+
mobile?: boolean;
|
|
23
35
|
}
|
|
24
36
|
interface UserAgentData {
|
|
25
37
|
getHighEntropyValues?(hints: string[]): Promise<UserAgentDataValues>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Browsers, CrossPlatformFramework, Devices, Engines, OS } from "../constants";
|
|
2
2
|
export declare interface PlatformInstance {
|
|
3
|
-
os: OS
|
|
3
|
+
os: NameVersionPair<OS>;
|
|
4
|
+
engine: NameVersionPair<Engines>;
|
|
5
|
+
browser: NameVersionPair<Browsers>;
|
|
4
6
|
device: Devices;
|
|
5
|
-
engine: Engines;
|
|
6
|
-
browser: Browsers;
|
|
7
7
|
crossPlatformFramework: CrossPlatformFramework;
|
|
8
|
-
|
|
9
|
-
engineVersion: string;
|
|
10
|
-
browserVersion: string;
|
|
8
|
+
network: Network;
|
|
11
9
|
renderer: string;
|
|
12
10
|
userAgent: string;
|
|
13
11
|
isNode: boolean;
|
|
@@ -16,3 +14,15 @@ export declare interface PlatformInstance {
|
|
|
16
14
|
isDesktop: boolean;
|
|
17
15
|
isWebview: boolean;
|
|
18
16
|
}
|
|
17
|
+
export declare interface NameVersionPair<T> {
|
|
18
|
+
name: T;
|
|
19
|
+
version: string;
|
|
20
|
+
}
|
|
21
|
+
export declare interface Network {
|
|
22
|
+
isOnline: boolean | null;
|
|
23
|
+
effectiveType: 'slow-2g' | '2g' | '3g' | '4g' | null;
|
|
24
|
+
type: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | null;
|
|
25
|
+
downlink: number | null;
|
|
26
|
+
rtt: number | null;
|
|
27
|
+
saveData: boolean | null;
|
|
28
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PluginNotExtendedError } from "../errors/plugin-not-extended-error";
|
|
2
|
-
export interface NativePlugins {
|
|
2
|
+
export declare interface NativePlugins {
|
|
3
3
|
}
|
|
4
|
-
export interface NativeConstants extends Record<string, any> {
|
|
4
|
+
export declare interface NativeConstants extends Record<string, any> {
|
|
5
5
|
}
|
|
6
|
-
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
|
+
export declare interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
7
7
|
PluginNotExtendedError: typeof PluginNotExtendedError;
|
|
8
8
|
}
|
|
9
9
|
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
@@ -13,10 +13,10 @@ export declare interface NativePlugin<Key extends string, Module, Constants exte
|
|
|
13
13
|
Constants: Constants;
|
|
14
14
|
Errors: Errors;
|
|
15
15
|
}
|
|
16
|
-
export type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
|
|
16
|
+
export declare type ExtendedNativeBase<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = NativeBase<NativePlugins & {
|
|
17
17
|
[Plugin in Key]: Module;
|
|
18
18
|
}, NativeConstants & Constants, NativeErrors & Errors>;
|
|
19
|
-
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
19
|
+
export declare type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
20
20
|
Version: string;
|
|
21
21
|
Constants: AssignedConstants;
|
|
22
22
|
Errors: AssignedErrors;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
"import": "./dist/plugin/fullscreen/index.mjs",
|
|
52
52
|
"require": "./dist/plugin/fullscreen/index.cjs",
|
|
53
53
|
"default": "./dist/plugin/fullscreen/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./plugin/platform'": {
|
|
56
|
+
"types": "./dist/plugin/platform'/index.d.ts",
|
|
57
|
+
"import": "./dist/plugin/platform'/index.mjs",
|
|
58
|
+
"require": "./dist/plugin/platform'/index.cjs",
|
|
59
|
+
"default": "./dist/plugin/platform'/index.mjs"
|
|
54
60
|
}
|
|
55
61
|
},
|
|
56
62
|
|
|
@@ -62,6 +68,7 @@
|
|
|
62
68
|
"plugin/camera": ["dist/plugin/camera/index.d.ts"],
|
|
63
69
|
"plugin/clipboard": ["dist/plugin/clipboard/index.d.ts"],
|
|
64
70
|
"plugin/fullscreen": ["dist/plugin/fullscreen/index.d.ts"],
|
|
71
|
+
"plugin/platform'": ["dist/plugin/platform'/index.d.ts"],
|
|
65
72
|
"dist/*": ["dist/*"]
|
|
66
73
|
}
|
|
67
74
|
},
|