native-fn 1.0.32 → 1.0.34

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 (39) hide show
  1. package/dist/index.d.ts +4 -2
  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.d.ts +6 -0
  9. package/dist/plugin/app/src/plugin/app/types/index.d.ts +6 -0
  10. package/dist/plugin/app/src/plugin/platform/types/index.d.ts +6 -0
  11. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +6 -0
  12. package/dist/plugin/app/src/types/native.d.ts +3 -1
  13. package/dist/plugin/platform/index.d.ts +6 -0
  14. package/dist/plugin/platform/src/plugin/app/types/index.d.ts +6 -0
  15. package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +6 -0
  16. package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +6 -0
  17. package/dist/plugin/platform/src/types/native.d.ts +3 -1
  18. package/dist/plugin/theme/index.d.ts +6 -0
  19. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +6 -0
  20. package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +6 -0
  21. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +6 -0
  22. package/dist/plugin/theme/src/types/native.d.ts +3 -1
  23. package/dist/src/plugin/app/types/index.d.ts +6 -0
  24. package/dist/src/plugin/platform/types/index.d.ts +6 -0
  25. package/dist/src/plugin/theme/types/index.d.ts +6 -0
  26. package/dist/src/types/native.d.ts +3 -1
  27. package/package.json +1 -1
  28. package/dist/plugin/app/src/plugin/app/types/appModule.d.ts +0 -54
  29. package/dist/plugin/app/src/plugin/platform/types/platformModule.d.ts +0 -13
  30. package/dist/plugin/app/src/plugin/theme/types/themeModule.d.ts +0 -24
  31. package/dist/plugin/platform/src/plugin/app/types/appModule.d.ts +0 -54
  32. package/dist/plugin/platform/src/plugin/platform/types/platformModule.d.ts +0 -13
  33. package/dist/plugin/platform/src/plugin/theme/types/themeModule.d.ts +0 -24
  34. package/dist/plugin/theme/src/plugin/app/types/appModule.d.ts +0 -54
  35. package/dist/plugin/theme/src/plugin/platform/types/platformModule.d.ts +0 -13
  36. package/dist/plugin/theme/src/plugin/theme/types/themeModule.d.ts +0 -24
  37. package/dist/src/plugin/app/types/appModule.d.ts +0 -54
  38. package/dist/src/plugin/platform/types/platformModule.d.ts +0 -13
  39. package/dist/src/plugin/theme/types/themeModule.d.ts +0 -24
package/dist/index.d.ts CHANGED
@@ -11,9 +11,11 @@ declare interface NativeBase extends ModuleBase {
11
11
  Version: string;
12
12
  extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
13
  }
14
- declare type NativeInstance = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
14
+ interface NativePlugins {
15
+ }
16
+ type NativeInstance = NativeBase & NativePlugins;
15
17
 
16
18
  declare const Native: NativeInstance;
17
19
 
18
20
  export { Native as default };
19
- export type { ModuleBase, NativeBase, NativeInstance, NativePlugin };
21
+ export type { ModuleBase, NativeBase, NativeInstance, NativePlugin, NativePlugins };
package/dist/native.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "1.0.31";
3
+ var version = "1.0.34";
4
4
  var packageJSON = {
5
5
  version: version};
6
6
 
@@ -1 +1 @@
1
- "use strict";function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var s=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(s[e]=n[e])}return s}var r={Version:"1.0.31",Constants:{},Errors:{},extends:function(r){return r.installed||(this.Constants=t(this.Constants,r.Constants),this.Errors=t(this.Errors,r.Errors),this[r.name]=r.module,r.installed=!0),this}};module.exports=r;
1
+ "use strict";function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var s=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(s[e]=n[e])}return s}var r={Version:"1.0.34",Constants:{},Errors:{},extends:function(r){return r.installed||(this.Constants=t(this.Constants,r.Constants),this.Errors=t(this.Errors,r.Errors),this[r.name]=r.module,r.installed=!0),this}};module.exports=r;
@@ -1 +1 @@
1
- function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=Object(t[0]),o=1;o<t.length;o++){var s=t[o];if(null!=s)for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(n[e]=s[e])}return n}var r={Version:"1.0.31",Constants:{},Errors:{},extends:function(r){return r.installed||(this.Constants=t(this.Constants,r.Constants),this.Errors=t(this.Errors,r.Errors),this[r.name]=r.module,r.installed=!0),this}};export{r as default};
1
+ function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=Object(t[0]),o=1;o<t.length;o++){var s=t[o];if(null!=s)for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(n[e]=s[e])}return n}var r={Version:"1.0.34",Constants:{},Errors:{},extends:function(r){return r.installed||(this.Constants=t(this.Constants,r.Constants),this.Errors=t(this.Errors,r.Errors),this[r.name]=r.module,r.installed=!0),this}};export{r as default};
package/dist/native.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var version = "1.0.31";
1
+ var version = "1.0.34";
2
2
  var packageJSON = {
3
3
  version: version};
4
4
 
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Native = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- var version = "1.0.31";
7
+ var version = "1.0.34";
8
8
  var packageJSON = {
9
9
  version: version};
10
10
 
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Native=e()}(this,(function(){"use strict";function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=Object(t[0]),o=1;o<t.length;o++){var r=t[o];if(null!=r)for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&(n[s]=r[s])}return n}return{Version:"1.0.31",Constants:{},Errors:{},extends:function(e){return e.installed||(this.Constants=t(this.Constants,e.Constants),this.Errors=t(this.Errors,e.Errors),this[e.name]=e.module,e.installed=!0),this}}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Native=e()}(this,(function(){"use strict";function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=Object(t[0]),o=1;o<t.length;o++){var r=t[o];if(null!=r)for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&(n[s]=r[s])}return n}return{Version:"1.0.34",Constants:{},Errors:{},extends:function(e){return e.installed||(this.Constants=t(this.Constants,e.Constants),this.Errors=t(this.Errors,e.Errors),this[e.name]=e.module,e.installed=!0),this}}}));
@@ -82,6 +82,12 @@ declare interface AppInstance {
82
82
  messenger: Messenger;
83
83
  }
84
84
 
85
+ declare module 'native-fn' {
86
+ interface NativePlugins {
87
+ App: AppInstance;
88
+ }
89
+ }
90
+
85
91
  declare const NativeAppPlugin: NativePlugin<AppInstance>;
86
92
 
87
93
  export { NativeAppPlugin as default };
@@ -1 +1,7 @@
1
1
  export * from './app';
2
+ import type { AppInstance } from './app';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ App: AppInstance;
6
+ }
7
+ }
@@ -1 +1,7 @@
1
1
  export * from './platform';
2
+ import type { PlatformInstance } from './platform';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ Platform: PlatformInstance;
6
+ }
7
+ }
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
3
  export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module 'native-fn' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -11,4 +11,6 @@ export declare interface NativeBase extends ModuleBase {
11
11
  Version: string;
12
12
  extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
13
  }
14
- export declare type NativeInstance = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
14
+ export interface NativePlugins {
15
+ }
16
+ export type NativeInstance = NativeBase & NativePlugins;
@@ -47,6 +47,12 @@ declare interface PlatformInstance {
47
47
  isDesktop: boolean;
48
48
  }
49
49
 
50
+ declare module 'native-fn' {
51
+ interface NativePlugins {
52
+ Platform: PlatformInstance;
53
+ }
54
+ }
55
+
50
56
  declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
51
57
 
52
58
  export { NativePlatformPlugin as default };
@@ -1 +1,7 @@
1
1
  export * from './app';
2
+ import type { AppInstance } from './app';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ App: AppInstance;
6
+ }
7
+ }
@@ -1 +1,7 @@
1
1
  export * from './platform';
2
+ import type { PlatformInstance } from './platform';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ Platform: PlatformInstance;
6
+ }
7
+ }
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
3
  export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module 'native-fn' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -11,4 +11,6 @@ export declare interface NativeBase extends ModuleBase {
11
11
  Version: string;
12
12
  extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
13
  }
14
- export declare type NativeInstance = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
14
+ export interface NativePlugins {
15
+ }
16
+ export type NativeInstance = NativeBase & NativePlugins;
@@ -71,6 +71,12 @@ declare interface ThemeInstance {
71
71
  onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
72
72
  }
73
73
 
74
+ declare module 'native-fn' {
75
+ interface NativePlugins {
76
+ Theme: ThemeInstance;
77
+ }
78
+ }
79
+
74
80
  declare const NativeThemePlugin: NativePlugin<ThemeInstance>;
75
81
 
76
82
  export { NativeThemePlugin as default };
@@ -1 +1,7 @@
1
1
  export * from './app';
2
+ import type { AppInstance } from './app';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ App: AppInstance;
6
+ }
7
+ }
@@ -1 +1,7 @@
1
1
  export * from './platform';
2
+ import type { PlatformInstance } from './platform';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ Platform: PlatformInstance;
6
+ }
7
+ }
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
3
  export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module 'native-fn' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -11,4 +11,6 @@ export declare interface NativeBase extends ModuleBase {
11
11
  Version: string;
12
12
  extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
13
  }
14
- export declare type NativeInstance = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
14
+ export interface NativePlugins {
15
+ }
16
+ export type NativeInstance = NativeBase & NativePlugins;
@@ -1 +1,7 @@
1
1
  export * from './app';
2
+ import type { AppInstance } from './app';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ App: AppInstance;
6
+ }
7
+ }
@@ -1 +1,7 @@
1
1
  export * from './platform';
2
+ import type { PlatformInstance } from './platform';
3
+ declare module 'native-fn' {
4
+ interface NativePlugins {
5
+ Platform: PlatformInstance;
6
+ }
7
+ }
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
3
  export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module 'native-fn' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -11,4 +11,6 @@ export declare interface NativeBase extends ModuleBase {
11
11
  Version: string;
12
12
  extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
13
  }
14
- export declare type NativeInstance = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
14
+ export interface NativePlugins {
15
+ }
16
+ export type NativeInstance = NativeBase & NativePlugins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-fn",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": " ",
5
5
  "type": "module",
6
6
 
@@ -1,54 +0,0 @@
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 AppInstance {
52
- open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
- messenger: Messenger;
54
- }
@@ -1,13 +0,0 @@
1
- import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformInstance {
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,24 +0,0 @@
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 ThemeInstance {
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,54 +0,0 @@
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 AppInstance {
52
- open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
- messenger: Messenger;
54
- }
@@ -1,13 +0,0 @@
1
- import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformInstance {
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,24 +0,0 @@
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 ThemeInstance {
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,54 +0,0 @@
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 AppInstance {
52
- open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
- messenger: Messenger;
54
- }
@@ -1,13 +0,0 @@
1
- import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformInstance {
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,24 +0,0 @@
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 ThemeInstance {
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,54 +0,0 @@
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 AppInstance {
52
- open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
- messenger: Messenger;
54
- }
@@ -1,13 +0,0 @@
1
- import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformInstance {
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,24 +0,0 @@
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 ThemeInstance {
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
- }