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.
- package/dist/index.d.ts +19 -4
- package/dist/native.cjs +2 -2
- package/dist/native.mjs +2 -2
- package/dist/native.umd.js +2 -2
- package/dist/plugin/app/index.cjs +1 -1
- package/dist/plugin/app/index.d.ts +86 -4
- package/dist/plugin/app/index.mjs +1 -1
- package/dist/plugin/app/index.umd.js +1 -1
- package/dist/plugin/app/src/plugin/app/cores/app.d.ts +2 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +3 -3
- package/dist/plugin/app/src/plugin/app/types/appModule.d.ts +54 -0
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +1 -1
- package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
- package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +2 -2
- package/dist/plugin/app/src/plugin/platform/index.d.ts +3 -3
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +1 -1
- package/dist/plugin/app/src/plugin/platform/types/platformModule.d.ts +13 -0
- package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +3 -3
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/types/themeModule.d.ts +24 -0
- package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/platform/index.cjs +1 -1
- package/dist/plugin/platform/index.d.ts +51 -4
- package/dist/plugin/platform/index.mjs +1 -1
- package/dist/plugin/platform/index.umd.js +1 -1
- package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/app/types/appModule.d.ts +54 -0
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/platform/types/platformModule.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +3 -3
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/types/themeModule.d.ts +24 -0
- package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +1 -1
- package/dist/plugin/theme/index.d.ts +75 -4
- package/dist/plugin/theme/index.mjs +1 -1
- package/dist/plugin/theme/index.umd.js +1 -1
- package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/app/types/appModule.d.ts +54 -0
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/platform/types/platformModule.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +3 -3
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/types/themeModule.d.ts +24 -0
- package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/src/plugin/app/cores/app.d.ts +2 -2
- package/dist/src/plugin/app/index.d.ts +3 -3
- package/dist/src/plugin/app/types/appModule.d.ts +54 -0
- package/dist/src/plugin/app/types/index.d.ts +1 -1
- package/dist/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
- package/dist/src/plugin/platform/cores/platform.d.ts +2 -2
- package/dist/src/plugin/platform/index.d.ts +3 -3
- package/dist/src/plugin/platform/types/index.d.ts +1 -1
- package/dist/src/plugin/platform/types/platformModule.d.ts +13 -0
- package/dist/src/plugin/theme/constants/theme.d.ts +1 -1
- package/dist/src/plugin/theme/cores/theme.d.ts +2 -2
- package/dist/src/plugin/theme/index.d.ts +3 -3
- package/dist/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/src/plugin/theme/types/theme.d.ts +2 -2
- package/dist/src/plugin/theme/types/themeModule.d.ts +24 -0
- package/dist/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/package.json +56 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
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 =
|
|
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
|
|
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 {
|
|
39
|
+
export { nativeInstance as default };
|
package/dist/native.umd.js
CHANGED
|
@@ -1,4 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { AppModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const AppPlugin: NativePlugin<
|
|
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 './
|
|
1
|
+
export * from './appModule';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { PlatformModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const PlatformPlugin: NativePlugin<
|
|
4
|
+
declare const PlatformPlugin: NativePlugin<PlatformModule>;
|
|
5
5
|
export default PlatformPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { ThemeModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const ThemePlugin: NativePlugin<
|
|
4
|
+
declare const ThemePlugin: NativePlugin<ThemeModule>;
|
|
5
5
|
export default ThemePlugin;
|
|
@@ -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;
|
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { AppModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const AppPlugin: NativePlugin<
|
|
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 './
|
|
1
|
+
export * from './appModule';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { PlatformModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const PlatformPlugin: NativePlugin<
|
|
4
|
+
declare const PlatformPlugin: NativePlugin<PlatformModule>;
|
|
5
5
|
export default PlatformPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const 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
|
|
2
|
-
import
|
|
1
|
+
import type { NativePlugin } from '../../types';
|
|
2
|
+
import type { ThemeModule } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const ThemePlugin: NativePlugin<
|
|
4
|
+
declare const ThemePlugin: NativePlugin<ThemeModule>;
|
|
5
5
|
export default ThemePlugin;
|
|
@@ -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;
|