native-fn 1.0.74 → 1.0.75

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 (66) hide show
  1. package/dist/index.d.ts +5 -5
  2. package/dist/native.cjs +1 -1
  3. package/dist/native.min.cjs +1 -1
  4. package/dist/native.min.mjs +1 -1
  5. package/dist/native.mjs +1 -1
  6. package/dist/native.umd.js +1 -1
  7. package/dist/native.umd.min.js +1 -1
  8. package/dist/plugin/app/index.cjs +355 -176
  9. package/dist/plugin/app/index.min.cjs +1 -1
  10. package/dist/plugin/app/index.min.mjs +1 -1
  11. package/dist/plugin/app/index.mjs +355 -176
  12. package/dist/plugin/app/index.umd.js +355 -176
  13. package/dist/plugin/app/index.umd.min.js +1 -1
  14. package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +12 -0
  15. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +16 -6
  16. package/dist/plugin/app/src/types/native.d.ts +5 -5
  17. package/dist/plugin/appearance/index.cjs +344 -165
  18. package/dist/plugin/appearance/index.min.cjs +1 -1
  19. package/dist/plugin/appearance/index.min.mjs +1 -1
  20. package/dist/plugin/appearance/index.mjs +344 -165
  21. package/dist/plugin/appearance/index.umd.js +344 -165
  22. package/dist/plugin/appearance/index.umd.min.js +1 -1
  23. package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +12 -0
  24. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +16 -6
  25. package/dist/plugin/appearance/src/types/native.d.ts +5 -5
  26. package/dist/plugin/clipboard/index.cjs +339 -160
  27. package/dist/plugin/clipboard/index.min.cjs +1 -1
  28. package/dist/plugin/clipboard/index.min.mjs +1 -1
  29. package/dist/plugin/clipboard/index.mjs +339 -160
  30. package/dist/plugin/clipboard/index.umd.js +339 -160
  31. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  32. package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +12 -0
  33. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +16 -6
  34. package/dist/plugin/clipboard/src/types/native.d.ts +5 -5
  35. package/dist/plugin/fullscreen/index.cjs +348 -169
  36. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  37. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  38. package/dist/plugin/fullscreen/index.mjs +348 -169
  39. package/dist/plugin/fullscreen/index.umd.js +348 -169
  40. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  41. package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +12 -0
  42. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +16 -6
  43. package/dist/plugin/fullscreen/src/types/native.d.ts +5 -5
  44. package/dist/plugin/platform/index.cjs +339 -160
  45. package/dist/plugin/platform/index.d.ts +17 -7
  46. package/dist/plugin/platform/index.min.cjs +1 -1
  47. package/dist/plugin/platform/index.min.mjs +1 -1
  48. package/dist/plugin/platform/index.mjs +339 -160
  49. package/dist/plugin/platform/index.umd.js +339 -160
  50. package/dist/plugin/platform/index.umd.min.js +1 -1
  51. package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +12 -0
  52. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +16 -6
  53. package/dist/plugin/platform/src/types/native.d.ts +5 -5
  54. package/dist/plugin/theme/index.cjs +339 -160
  55. package/dist/plugin/theme/index.min.cjs +1 -1
  56. package/dist/plugin/theme/index.min.mjs +1 -1
  57. package/dist/plugin/theme/index.mjs +339 -160
  58. package/dist/plugin/theme/index.umd.js +339 -160
  59. package/dist/plugin/theme/index.umd.min.js +1 -1
  60. package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +12 -0
  61. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +16 -6
  62. package/dist/plugin/theme/src/types/native.d.ts +5 -5
  63. package/dist/src/plugin/platform/cores/index.d.ts +12 -0
  64. package/dist/src/plugin/platform/types/platform.d.ts +16 -6
  65. package/dist/src/types/native.d.ts +5 -5
  66. package/package.json +1 -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
- osVersion: string;
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
- osVersion: string;
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.74",
3
+ "version": "1.0.75",
4
4
  "description": " ",
5
5
  "type": "module",
6
6