native-fn 1.0.27 → 1.0.29

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 (85) hide show
  1. package/dist/index.d.ts +19 -4
  2. package/dist/native.cjs +2 -2
  3. package/dist/native.mjs +2 -2
  4. package/dist/native.umd.js +2 -2
  5. package/dist/plugin/app/index.cjs +1 -1
  6. package/dist/plugin/app/index.d.ts +86 -4
  7. package/dist/plugin/app/index.mjs +1 -1
  8. package/dist/plugin/app/index.umd.js +1 -1
  9. package/dist/plugin/app/src/plugin/app/cores/app.d.ts +2 -2
  10. package/dist/plugin/app/src/plugin/app/index.d.ts +3 -3
  11. package/dist/plugin/app/src/plugin/app/types/appModule.d.ts +54 -0
  12. package/dist/plugin/app/src/plugin/app/types/index.d.ts +1 -1
  13. package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  14. package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +2 -2
  15. package/dist/plugin/app/src/plugin/platform/index.d.ts +3 -3
  16. package/dist/plugin/app/src/plugin/platform/types/index.d.ts +1 -1
  17. package/dist/plugin/app/src/plugin/platform/types/platformModule.d.ts +13 -0
  18. package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +1 -1
  19. package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +2 -2
  20. package/dist/plugin/app/src/plugin/theme/index.d.ts +3 -3
  21. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
  22. package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +2 -2
  23. package/dist/plugin/app/src/plugin/theme/types/themeModule.d.ts +24 -0
  24. package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +1 -1
  25. package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  26. package/dist/plugin/platform/index.cjs +1 -1
  27. package/dist/plugin/platform/index.d.ts +51 -4
  28. package/dist/plugin/platform/index.mjs +1 -1
  29. package/dist/plugin/platform/index.umd.js +1 -1
  30. package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +2 -2
  31. package/dist/plugin/platform/src/plugin/app/index.d.ts +3 -3
  32. package/dist/plugin/platform/src/plugin/app/types/appModule.d.ts +54 -0
  33. package/dist/plugin/platform/src/plugin/app/types/index.d.ts +1 -1
  34. package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  35. package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +2 -2
  36. package/dist/plugin/platform/src/plugin/platform/index.d.ts +3 -3
  37. package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +1 -1
  38. package/dist/plugin/platform/src/plugin/platform/types/platformModule.d.ts +13 -0
  39. package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +1 -1
  40. package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +2 -2
  41. package/dist/plugin/platform/src/plugin/theme/index.d.ts +3 -3
  42. package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +1 -1
  43. package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -2
  44. package/dist/plugin/platform/src/plugin/theme/types/themeModule.d.ts +24 -0
  45. package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +1 -1
  46. package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  47. package/dist/plugin/theme/index.cjs +1 -1
  48. package/dist/plugin/theme/index.d.ts +75 -4
  49. package/dist/plugin/theme/index.mjs +1 -1
  50. package/dist/plugin/theme/index.umd.js +1 -1
  51. package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +2 -2
  52. package/dist/plugin/theme/src/plugin/app/index.d.ts +3 -3
  53. package/dist/plugin/theme/src/plugin/app/types/appModule.d.ts +54 -0
  54. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +1 -1
  55. package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  56. package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +2 -2
  57. package/dist/plugin/theme/src/plugin/platform/index.d.ts +3 -3
  58. package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +1 -1
  59. package/dist/plugin/theme/src/plugin/platform/types/platformModule.d.ts +13 -0
  60. package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +1 -1
  61. package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +2 -2
  62. package/dist/plugin/theme/src/plugin/theme/index.d.ts +3 -3
  63. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
  64. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -2
  65. package/dist/plugin/theme/src/plugin/theme/types/themeModule.d.ts +24 -0
  66. package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +1 -1
  67. package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  68. package/dist/src/plugin/app/cores/app.d.ts +2 -2
  69. package/dist/src/plugin/app/index.d.ts +3 -3
  70. package/dist/src/plugin/app/types/appModule.d.ts +54 -0
  71. package/dist/src/plugin/app/types/index.d.ts +1 -1
  72. package/dist/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  73. package/dist/src/plugin/platform/cores/platform.d.ts +2 -2
  74. package/dist/src/plugin/platform/index.d.ts +3 -3
  75. package/dist/src/plugin/platform/types/index.d.ts +1 -1
  76. package/dist/src/plugin/platform/types/platformModule.d.ts +13 -0
  77. package/dist/src/plugin/theme/constants/theme.d.ts +1 -1
  78. package/dist/src/plugin/theme/cores/theme.d.ts +2 -2
  79. package/dist/src/plugin/theme/index.d.ts +3 -3
  80. package/dist/src/plugin/theme/types/index.d.ts +1 -1
  81. package/dist/src/plugin/theme/types/theme.d.ts +2 -2
  82. package/dist/src/plugin/theme/types/themeModule.d.ts +24 -0
  83. package/dist/src/plugin/theme/utils/parse-color.d.ts +1 -1
  84. package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  85. package/package.json +56 -12
package/dist/index.d.ts CHANGED
@@ -1,4 +1,19 @@
1
- import { Native } from "./src/types";
2
- export * from './src/types';
3
- declare const Native: Native;
4
- export default Native;
1
+ declare interface NativePlugin<T> {
2
+ installed: boolean;
3
+ name: string;
4
+ module: T;
5
+ constants: Record<string, any>;
6
+ errors: Record<string, ErrorConstructor>;
7
+ }
8
+ declare interface NativeBase {
9
+ Version: string;
10
+ Constants: Record<string, any>;
11
+ Errors: Record<string, ErrorConstructor>;
12
+ extends: <T>(plugin: NativePlugin<T>) => Native;
13
+ }
14
+ declare type Native = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
15
+
16
+ declare const nativeInstance: Native;
17
+
18
+ export { nativeInstance as default };
19
+ export type { Native, NativeBase, NativePlugin };
package/dist/native.cjs CHANGED
@@ -23,7 +23,7 @@ function assign() {
23
23
  return to;
24
24
  }
25
25
 
26
- var Native = {
26
+ var nativeInstance = {
27
27
  Version: packageJSON.version,
28
28
  Constants: {},
29
29
  Errors: {},
@@ -38,4 +38,4 @@ var Native = {
38
38
  }
39
39
  };
40
40
 
41
- module.exports = Native;
41
+ module.exports = nativeInstance;
package/dist/native.mjs CHANGED
@@ -21,7 +21,7 @@ function assign() {
21
21
  return to;
22
22
  }
23
23
 
24
- var Native = {
24
+ var nativeInstance = {
25
25
  Version: packageJSON.version,
26
26
  Constants: {},
27
27
  Errors: {},
@@ -36,4 +36,4 @@ var Native = {
36
36
  }
37
37
  };
38
38
 
39
- export { Native as default };
39
+ export { nativeInstance as default };
@@ -27,7 +27,7 @@
27
27
  return to;
28
28
  }
29
29
 
30
- var Native = {
30
+ var nativeInstance = {
31
31
  Version: packageJSON.version,
32
32
  Constants: {},
33
33
  Errors: {},
@@ -42,6 +42,6 @@
42
42
  }
43
43
  };
44
44
 
45
- return Native;
45
+ return nativeInstance;
46
46
 
47
47
  }));
@@ -1019,7 +1019,7 @@ var AppPlugin = {
1019
1019
  },
1020
1020
  errors: {
1021
1021
  URLOpenError: URLOpenError
1022
- },
1022
+ }
1023
1023
  };
1024
1024
 
1025
1025
  module.exports = AppPlugin;
@@ -1,4 +1,86 @@
1
- import { Native } from "./src/types";
2
- export * from './src/types';
3
- declare const Native: Native;
4
- export default Native;
1
+ declare interface NativePlugin<T> {
2
+ installed: boolean;
3
+ name: string;
4
+ module: T;
5
+ constants: Record<string, any>;
6
+ errors: Record<string, ErrorConstructor>;
7
+ }
8
+
9
+ declare enum OS {
10
+ Unknown = "Unknown",
11
+ Android = "Android",
12
+ iOS = "iOS",
13
+ Windows = "Windows",
14
+ MacOS = "MacOS"
15
+ }
16
+
17
+ declare enum AppOpenState {
18
+ Scheme = 0,
19
+ Universal = 1,
20
+ Intent = 2,
21
+ Fallback = 3,
22
+ Store = 4
23
+ }
24
+ declare enum Messengers {
25
+ Telephone = "telephone",
26
+ Message = "message",
27
+ Mail = "mail"
28
+ }
29
+
30
+ declare interface EventListenerUtil {
31
+ useStd: boolean;
32
+ add: (target: any, eventListenerOptions: EventListenerOptions) => void;
33
+ remove: (target: any, eventListenerOptions: EventListenerOptions) => void;
34
+ withVender: (target: any, type?: string) => string;
35
+ }
36
+ declare interface EventListenerOptions {
37
+ type?: string;
38
+ callback: EventListenerOrEventListenerObject | null;
39
+ options?: AddEventListenerOptions | boolean;
40
+ }
41
+ declare interface AppInfo {
42
+ scheme?: URLCandidate;
43
+ fallback?: URLCandidate | (() => any);
44
+ timeout?: number;
45
+ allowWebStore?: boolean;
46
+ }
47
+ declare interface AndroidAppInfo extends AppInfo {
48
+ packageName?: string;
49
+ intent?: URLCandidate;
50
+ }
51
+ declare interface IOSAppInfo extends MacOSAppInfo {
52
+ universal?: URLCandidate;
53
+ }
54
+ declare interface WindowsAppInfo extends AppInfo {
55
+ productId?: string;
56
+ }
57
+ declare interface MacOSAppInfo extends AppInfo {
58
+ bundleId?: string;
59
+ trackId?: string;
60
+ }
61
+ declare interface AppOpenOptions {
62
+ [OS.Android]?: AndroidAppInfo;
63
+ [OS.iOS]?: IOSAppInfo;
64
+ [OS.Windows]?: WindowsAppInfo;
65
+ [OS.MacOS]?: MacOSAppInfo;
66
+ }
67
+ declare type URLCandidate = URL | string;
68
+ declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
69
+ declare type StringifiableSequence = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
70
+ declare type MessengerOpenOptions = {
71
+ to?: Stringifiable | StringifiableSequence;
72
+ cc?: Stringifiable | StringifiableSequence;
73
+ bcc?: Stringifiable | StringifiableSequence;
74
+ subject?: Stringifiable;
75
+ body?: Stringifiable;
76
+ } | HTMLFormElement | FormData;
77
+ declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
78
+ declare interface AppModule {
79
+ open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
80
+ messenger: Messenger;
81
+ }
82
+
83
+ declare const AppPlugin: NativePlugin<AppModule>;
84
+
85
+ export { AppPlugin as default };
86
+ export type { AndroidAppInfo, AppInfo, AppModule, AppOpenOptions, EventListenerOptions, EventListenerUtil, IOSAppInfo, MacOSAppInfo, Messenger, MessengerOpenOptions, Stringifiable, StringifiableSequence, URLCandidate, WindowsAppInfo };
@@ -1017,7 +1017,7 @@ var AppPlugin = {
1017
1017
  },
1018
1018
  errors: {
1019
1019
  URLOpenError: URLOpenError
1020
- },
1020
+ }
1021
1021
  };
1022
1022
 
1023
1023
  export { AppPlugin as default };
@@ -1023,7 +1023,7 @@
1023
1023
  },
1024
1024
  errors: {
1025
1025
  URLOpenError: URLOpenError
1026
- },
1026
+ }
1027
1027
  };
1028
1028
 
1029
1029
  return AppPlugin;
@@ -1,3 +1,3 @@
1
- import { App } from '../types/app';
2
- declare const App: App;
1
+ import type { AppModule } from '../types/appModule';
2
+ declare const App: AppModule;
3
3
  export default App;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import App from "./cores/app";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { AppModule } from "./types";
3
3
  export * from './types';
4
- declare const AppPlugin: NativePlugin<App>;
4
+ declare const AppPlugin: NativePlugin<AppModule>;
5
5
  export default AppPlugin;
@@ -0,0 +1,54 @@
1
+ import { OS } from '../../../constants/platform';
2
+ import { AppOpenState, Messengers } from '../constants/app';
3
+ export declare interface EventListenerUtil {
4
+ useStd: boolean;
5
+ add: (target: any, eventListenerOptions: EventListenerOptions) => void;
6
+ remove: (target: any, eventListenerOptions: EventListenerOptions) => void;
7
+ withVender: (target: any, type?: string) => string;
8
+ }
9
+ export declare interface EventListenerOptions {
10
+ type?: string;
11
+ callback: EventListenerOrEventListenerObject | null;
12
+ options?: AddEventListenerOptions | boolean;
13
+ }
14
+ export declare interface AppInfo {
15
+ scheme?: URLCandidate;
16
+ fallback?: URLCandidate | (() => any);
17
+ timeout?: number;
18
+ allowWebStore?: boolean;
19
+ }
20
+ export declare interface AndroidAppInfo extends AppInfo {
21
+ packageName?: string;
22
+ intent?: URLCandidate;
23
+ }
24
+ export declare interface IOSAppInfo extends MacOSAppInfo {
25
+ universal?: URLCandidate;
26
+ }
27
+ export declare interface WindowsAppInfo extends AppInfo {
28
+ productId?: string;
29
+ }
30
+ export declare interface MacOSAppInfo extends AppInfo {
31
+ bundleId?: string;
32
+ trackId?: string;
33
+ }
34
+ export declare interface AppOpenOptions {
35
+ [OS.Android]?: AndroidAppInfo;
36
+ [OS.iOS]?: IOSAppInfo;
37
+ [OS.Windows]?: WindowsAppInfo;
38
+ [OS.MacOS]?: MacOSAppInfo;
39
+ }
40
+ export declare type URLCandidate = URL | string;
41
+ export declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
42
+ export declare type StringifiableSequence = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
43
+ export declare type MessengerOpenOptions = {
44
+ to?: Stringifiable | StringifiableSequence;
45
+ cc?: Stringifiable | StringifiableSequence;
46
+ bcc?: Stringifiable | StringifiableSequence;
47
+ subject?: Stringifiable;
48
+ body?: Stringifiable;
49
+ } | HTMLFormElement | FormData;
50
+ export declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
51
+ export declare interface AppModule {
52
+ open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
+ messenger: Messenger;
54
+ }
@@ -1 +1 @@
1
- export * from './app';
1
+ export * from './appModule';
@@ -1,3 +1,3 @@
1
- import { EventListenerUtil } from '../types/app';
1
+ import type { EventListenerUtil } from '../types/appModule';
2
2
  declare const EventListenerUtils: EventListenerUtil;
3
3
  export default EventListenerUtils;
@@ -1,3 +1,3 @@
1
- import { Platform } from '../types/platform';
2
- declare const Platform: Platform;
1
+ import type { PlatformModule } from '../types/platformModule';
2
+ declare const Platform: PlatformModule;
3
3
  export default Platform;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import Platform from "./cores/platform";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { PlatformModule } from "./types";
3
3
  export * from './types';
4
- declare const PlatformPlugin: NativePlugin<Platform>;
4
+ declare const PlatformPlugin: NativePlugin<PlatformModule>;
5
5
  export default PlatformPlugin;
@@ -1 +1 @@
1
- export * from './platform';
1
+ export * from './platformModule';
@@ -0,0 +1,13 @@
1
+ import { Devices, Engines, OS } from '../../../constants/platform';
2
+ export declare interface PlatformModule {
3
+ os: OS;
4
+ device: Devices;
5
+ engine: Engines;
6
+ osVersion: string;
7
+ engineVersion: string;
8
+ renderer: string;
9
+ isWebview: boolean;
10
+ isStandalone: boolean;
11
+ isMobile: boolean;
12
+ isDesktop: boolean;
13
+ }
@@ -1,4 +1,4 @@
1
- import { ListenerEntry } from '../types/theme';
1
+ import type { ListenerEntry } from '../types/themeModule';
2
2
  export declare enum Appearances {
3
3
  Unknown = "unknown",
4
4
  Light = "light",
@@ -1,3 +1,3 @@
1
- import { Theme } from '../types/theme';
2
- declare const Theme: Theme;
1
+ import type { ThemeModule } from '../types/themeModule';
2
+ declare const Theme: ThemeModule;
3
3
  export default Theme;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import Theme from "./cores/theme";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { ThemeModule } from "./types";
3
3
  export * from './types';
4
- declare const ThemePlugin: NativePlugin<Theme>;
4
+ declare const ThemePlugin: NativePlugin<ThemeModule>;
5
5
  export default ThemePlugin;
@@ -1,3 +1,3 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
- export * from './theme';
3
+ export * from './themeModule';
@@ -1,6 +1,6 @@
1
1
  import { Appearances } from '../constants/theme';
2
- import { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
- import { Color } from '../types/color';
2
+ import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
+ import type { Color } from '../types/color';
4
4
  export declare interface ListenerEntry {
5
5
  fn: (appearance: Appearances) => any;
6
6
  capture: boolean;
@@ -0,0 +1,24 @@
1
+ import { Appearances } from '../constants/theme';
2
+ import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
+ import type { Color } from '../types/color';
4
+ export declare interface ListenerEntry {
5
+ fn: (appearance: Appearances) => any;
6
+ capture: boolean;
7
+ once: boolean;
8
+ signal?: AbortSignal;
9
+ }
10
+ export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
11
+ export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
12
+ export declare interface SetThemeColorOptions {
13
+ appearance?: ThemeColorMetaAppearanceKeys;
14
+ duration?: number;
15
+ easingFunction?: EasingSyntax | EasingKeyword;
16
+ defaultColor?: string;
17
+ }
18
+ export declare interface ThemeModule {
19
+ setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
20
+ getThemeColor: () => Color | undefined;
21
+ removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
22
+ detectAppearance: () => Promise<Appearances>;
23
+ onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
24
+ }
@@ -1,2 +1,2 @@
1
- import { RGBA } from '../types/color';
1
+ import type { RGBA } from '../types/color';
2
2
  export default function parseColor(color: string): RGBA;
@@ -1,2 +1,2 @@
1
- import { EasingFunction, EasingKeyword, EasingSyntax } from '../types/easing-syntax';
1
+ import type { EasingFunction, EasingKeyword, EasingSyntax } from '../types/easing-syntax';
2
2
  export default function parseEasingFunction(easingFunction: EasingSyntax | EasingKeyword): EasingFunction;
@@ -165,7 +165,7 @@ var PlatformPlugin = {
165
165
  name: 'Platform',
166
166
  module: Platform,
167
167
  constants: {},
168
- errors: {},
168
+ errors: {}
169
169
  };
170
170
 
171
171
  module.exports = PlatformPlugin;
@@ -1,4 +1,51 @@
1
- import { Native } from "./src/types";
2
- export * from './src/types';
3
- declare const Native: Native;
4
- export default Native;
1
+ declare interface NativePlugin<T> {
2
+ installed: boolean;
3
+ name: string;
4
+ module: T;
5
+ constants: Record<string, any>;
6
+ errors: Record<string, ErrorConstructor>;
7
+ }
8
+
9
+ declare enum OS {
10
+ Unknown = "Unknown",
11
+ Android = "Android",
12
+ iOS = "iOS",
13
+ Windows = "Windows",
14
+ MacOS = "MacOS"
15
+ }
16
+ declare enum Devices {
17
+ Unknown = "Unknown",
18
+ Mobile = "Mobile",
19
+ Desktop = "Desktop"
20
+ }
21
+ declare enum Engines {
22
+ Unknown = "Unknown",
23
+ EdgeHTML = "EdgeHTML",
24
+ ArkWeb = "ArkWeb",
25
+ Blink = "Blink",
26
+ Presto = "Presto",
27
+ WebKit = "WebKit",
28
+ Trident = "Trident",
29
+ NetFront = "NetFront",
30
+ KHTML = "KHTML",
31
+ Tasman = "Tasman",
32
+ Gecko = "Gecko"
33
+ }
34
+
35
+ declare interface PlatformModule {
36
+ os: OS;
37
+ device: Devices;
38
+ engine: Engines;
39
+ osVersion: string;
40
+ engineVersion: string;
41
+ renderer: string;
42
+ isWebview: boolean;
43
+ isStandalone: boolean;
44
+ isMobile: boolean;
45
+ isDesktop: boolean;
46
+ }
47
+
48
+ declare const PlatformPlugin: NativePlugin<PlatformModule>;
49
+
50
+ export { PlatformPlugin as default };
51
+ export type { PlatformModule };
@@ -163,7 +163,7 @@ var PlatformPlugin = {
163
163
  name: 'Platform',
164
164
  module: Platform,
165
165
  constants: {},
166
- errors: {},
166
+ errors: {}
167
167
  };
168
168
 
169
169
  export { PlatformPlugin as default };
@@ -169,7 +169,7 @@
169
169
  name: 'Platform',
170
170
  module: Platform,
171
171
  constants: {},
172
- errors: {},
172
+ errors: {}
173
173
  };
174
174
 
175
175
  return PlatformPlugin;
@@ -1,3 +1,3 @@
1
- import { App } from '../types/app';
2
- declare const App: App;
1
+ import type { AppModule } from '../types/appModule';
2
+ declare const App: AppModule;
3
3
  export default App;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import App from "./cores/app";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { AppModule } from "./types";
3
3
  export * from './types';
4
- declare const AppPlugin: NativePlugin<App>;
4
+ declare const AppPlugin: NativePlugin<AppModule>;
5
5
  export default AppPlugin;
@@ -0,0 +1,54 @@
1
+ import { OS } from '../../../constants/platform';
2
+ import { AppOpenState, Messengers } from '../constants/app';
3
+ export declare interface EventListenerUtil {
4
+ useStd: boolean;
5
+ add: (target: any, eventListenerOptions: EventListenerOptions) => void;
6
+ remove: (target: any, eventListenerOptions: EventListenerOptions) => void;
7
+ withVender: (target: any, type?: string) => string;
8
+ }
9
+ export declare interface EventListenerOptions {
10
+ type?: string;
11
+ callback: EventListenerOrEventListenerObject | null;
12
+ options?: AddEventListenerOptions | boolean;
13
+ }
14
+ export declare interface AppInfo {
15
+ scheme?: URLCandidate;
16
+ fallback?: URLCandidate | (() => any);
17
+ timeout?: number;
18
+ allowWebStore?: boolean;
19
+ }
20
+ export declare interface AndroidAppInfo extends AppInfo {
21
+ packageName?: string;
22
+ intent?: URLCandidate;
23
+ }
24
+ export declare interface IOSAppInfo extends MacOSAppInfo {
25
+ universal?: URLCandidate;
26
+ }
27
+ export declare interface WindowsAppInfo extends AppInfo {
28
+ productId?: string;
29
+ }
30
+ export declare interface MacOSAppInfo extends AppInfo {
31
+ bundleId?: string;
32
+ trackId?: string;
33
+ }
34
+ export declare interface AppOpenOptions {
35
+ [OS.Android]?: AndroidAppInfo;
36
+ [OS.iOS]?: IOSAppInfo;
37
+ [OS.Windows]?: WindowsAppInfo;
38
+ [OS.MacOS]?: MacOSAppInfo;
39
+ }
40
+ export declare type URLCandidate = URL | string;
41
+ export declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
42
+ export declare type StringifiableSequence = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
43
+ export declare type MessengerOpenOptions = {
44
+ to?: Stringifiable | StringifiableSequence;
45
+ cc?: Stringifiable | StringifiableSequence;
46
+ bcc?: Stringifiable | StringifiableSequence;
47
+ subject?: Stringifiable;
48
+ body?: Stringifiable;
49
+ } | HTMLFormElement | FormData;
50
+ export declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
51
+ export declare interface AppModule {
52
+ open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
+ messenger: Messenger;
54
+ }
@@ -1 +1 @@
1
- export * from './app';
1
+ export * from './appModule';
@@ -1,3 +1,3 @@
1
- import { EventListenerUtil } from '../types/app';
1
+ import type { EventListenerUtil } from '../types/appModule';
2
2
  declare const EventListenerUtils: EventListenerUtil;
3
3
  export default EventListenerUtils;
@@ -1,3 +1,3 @@
1
- import { Platform } from '../types/platform';
2
- declare const Platform: Platform;
1
+ import type { PlatformModule } from '../types/platformModule';
2
+ declare const Platform: PlatformModule;
3
3
  export default Platform;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import Platform from "./cores/platform";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { PlatformModule } from "./types";
3
3
  export * from './types';
4
- declare const PlatformPlugin: NativePlugin<Platform>;
4
+ declare const PlatformPlugin: NativePlugin<PlatformModule>;
5
5
  export default PlatformPlugin;
@@ -1 +1 @@
1
- export * from './platform';
1
+ export * from './platformModule';
@@ -0,0 +1,13 @@
1
+ import { Devices, Engines, OS } from '../../../constants/platform';
2
+ export declare interface PlatformModule {
3
+ os: OS;
4
+ device: Devices;
5
+ engine: Engines;
6
+ osVersion: string;
7
+ engineVersion: string;
8
+ renderer: string;
9
+ isWebview: boolean;
10
+ isStandalone: boolean;
11
+ isMobile: boolean;
12
+ isDesktop: boolean;
13
+ }
@@ -1,4 +1,4 @@
1
- import { ListenerEntry } from '../types/theme';
1
+ import type { ListenerEntry } from '../types/themeModule';
2
2
  export declare enum Appearances {
3
3
  Unknown = "unknown",
4
4
  Light = "light",
@@ -1,3 +1,3 @@
1
- import { Theme } from '../types/theme';
2
- declare const Theme: Theme;
1
+ import type { ThemeModule } from '../types/themeModule';
2
+ declare const Theme: ThemeModule;
3
3
  export default Theme;
@@ -1,5 +1,5 @@
1
- import { NativePlugin } from "../../types";
2
- import Theme from "./cores/theme";
1
+ import type { NativePlugin } from '../../types';
2
+ import type { ThemeModule } from "./types";
3
3
  export * from './types';
4
- declare const ThemePlugin: NativePlugin<Theme>;
4
+ declare const ThemePlugin: NativePlugin<ThemeModule>;
5
5
  export default ThemePlugin;
@@ -1,3 +1,3 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
- export * from './theme';
3
+ export * from './themeModule';
@@ -1,6 +1,6 @@
1
1
  import { Appearances } from '../constants/theme';
2
- import { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
- import { Color } from '../types/color';
2
+ import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
+ import type { Color } from '../types/color';
4
4
  export declare interface ListenerEntry {
5
5
  fn: (appearance: Appearances) => any;
6
6
  capture: boolean;