native-fn 1.0.31 → 1.0.33

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 (109) hide show
  1. package/dist/index.d.ts +13 -11
  2. package/dist/native.cjs +5 -5
  3. package/dist/native.min.cjs +1 -1
  4. package/dist/native.min.mjs +1 -1
  5. package/dist/native.mjs +5 -5
  6. package/dist/native.umd.js +5 -5
  7. package/dist/native.umd.min.js +1 -1
  8. package/dist/plugin/app/index.cjs +4 -4
  9. package/dist/plugin/app/index.d.ts +15 -7
  10. package/dist/plugin/app/index.min.cjs +1 -1
  11. package/dist/plugin/app/index.min.mjs +1 -1
  12. package/dist/plugin/app/index.mjs +4 -4
  13. package/dist/plugin/app/index.umd.js +4 -4
  14. package/dist/plugin/app/index.umd.min.js +1 -1
  15. package/dist/plugin/app/src/plugin/app/cores/app.d.ts +2 -2
  16. package/dist/plugin/app/src/plugin/app/index.d.ts +3 -3
  17. package/dist/plugin/app/src/plugin/app/types/app.d.ts +1 -1
  18. package/dist/plugin/app/src/plugin/app/types/appModule.d.ts +1 -1
  19. package/dist/plugin/app/src/plugin/app/types/index.d.ts +7 -1
  20. package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  21. package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +2 -2
  22. package/dist/plugin/app/src/plugin/platform/index.d.ts +3 -3
  23. package/dist/plugin/app/src/plugin/platform/types/index.d.ts +7 -1
  24. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +1 -1
  25. package/dist/plugin/app/src/plugin/platform/types/platformModule.d.ts +1 -1
  26. package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +1 -1
  27. package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +2 -2
  28. package/dist/plugin/app/src/plugin/theme/index.d.ts +3 -3
  29. package/dist/plugin/app/src/plugin/theme/types/index.d.ts +7 -1
  30. package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +8 -9
  31. package/dist/plugin/app/src/plugin/theme/types/themeModule.d.ts +1 -1
  32. package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +1 -1
  33. package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  34. package/dist/plugin/app/src/types/native.d.ts +10 -8
  35. package/dist/plugin/platform/index.cjs +4 -4
  36. package/dist/plugin/platform/index.d.ts +15 -7
  37. package/dist/plugin/platform/index.min.cjs +1 -1
  38. package/dist/plugin/platform/index.min.mjs +1 -1
  39. package/dist/plugin/platform/index.mjs +4 -4
  40. package/dist/plugin/platform/index.umd.js +4 -4
  41. package/dist/plugin/platform/index.umd.min.js +1 -1
  42. package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +2 -2
  43. package/dist/plugin/platform/src/plugin/app/index.d.ts +3 -3
  44. package/dist/plugin/platform/src/plugin/app/types/app.d.ts +1 -1
  45. package/dist/plugin/platform/src/plugin/app/types/appModule.d.ts +1 -1
  46. package/dist/plugin/platform/src/plugin/app/types/index.d.ts +7 -1
  47. package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  48. package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +2 -2
  49. package/dist/plugin/platform/src/plugin/platform/index.d.ts +3 -3
  50. package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +7 -1
  51. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +1 -1
  52. package/dist/plugin/platform/src/plugin/platform/types/platformModule.d.ts +1 -1
  53. package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +1 -1
  54. package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +2 -2
  55. package/dist/plugin/platform/src/plugin/theme/index.d.ts +3 -3
  56. package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +7 -1
  57. package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +8 -9
  58. package/dist/plugin/platform/src/plugin/theme/types/themeModule.d.ts +1 -1
  59. package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +1 -1
  60. package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  61. package/dist/plugin/platform/src/types/native.d.ts +10 -8
  62. package/dist/plugin/theme/index.cjs +4 -4
  63. package/dist/plugin/theme/index.d.ts +15 -7
  64. package/dist/plugin/theme/index.min.cjs +1 -1
  65. package/dist/plugin/theme/index.min.mjs +1 -1
  66. package/dist/plugin/theme/index.mjs +4 -4
  67. package/dist/plugin/theme/index.umd.js +4 -4
  68. package/dist/plugin/theme/index.umd.min.js +1 -1
  69. package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +2 -2
  70. package/dist/plugin/theme/src/plugin/app/index.d.ts +3 -3
  71. package/dist/plugin/theme/src/plugin/app/types/app.d.ts +1 -1
  72. package/dist/plugin/theme/src/plugin/app/types/appModule.d.ts +1 -1
  73. package/dist/plugin/theme/src/plugin/app/types/index.d.ts +7 -1
  74. package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  75. package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +2 -2
  76. package/dist/plugin/theme/src/plugin/platform/index.d.ts +3 -3
  77. package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +7 -1
  78. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +1 -1
  79. package/dist/plugin/theme/src/plugin/platform/types/platformModule.d.ts +1 -1
  80. package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +1 -1
  81. package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +2 -2
  82. package/dist/plugin/theme/src/plugin/theme/index.d.ts +3 -3
  83. package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +7 -1
  84. package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +8 -9
  85. package/dist/plugin/theme/src/plugin/theme/types/themeModule.d.ts +1 -1
  86. package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +1 -1
  87. package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  88. package/dist/plugin/theme/src/types/native.d.ts +10 -8
  89. package/dist/src/plugin/app/cores/app.d.ts +2 -2
  90. package/dist/src/plugin/app/index.d.ts +3 -3
  91. package/dist/src/plugin/app/types/app.d.ts +1 -1
  92. package/dist/src/plugin/app/types/appModule.d.ts +1 -1
  93. package/dist/src/plugin/app/types/index.d.ts +7 -1
  94. package/dist/src/plugin/app/utils/event-listener-utils.d.ts +1 -1
  95. package/dist/src/plugin/platform/cores/platform.d.ts +2 -2
  96. package/dist/src/plugin/platform/index.d.ts +3 -3
  97. package/dist/src/plugin/platform/types/index.d.ts +7 -1
  98. package/dist/src/plugin/platform/types/platform.d.ts +1 -1
  99. package/dist/src/plugin/platform/types/platformModule.d.ts +1 -1
  100. package/dist/src/plugin/theme/constants/theme.d.ts +1 -1
  101. package/dist/src/plugin/theme/cores/theme.d.ts +2 -2
  102. package/dist/src/plugin/theme/index.d.ts +3 -3
  103. package/dist/src/plugin/theme/types/index.d.ts +7 -1
  104. package/dist/src/plugin/theme/types/theme.d.ts +8 -9
  105. package/dist/src/plugin/theme/types/themeModule.d.ts +1 -1
  106. package/dist/src/plugin/theme/utils/parse-color.d.ts +1 -1
  107. package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
  108. package/dist/src/types/native.d.ts +10 -8
  109. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformModule {
2
+ export declare interface PlatformInstance {
3
3
  os: OS;
4
4
  device: Devices;
5
5
  engine: Engines;
@@ -1,4 +1,4 @@
1
- import type { ListenerEntry } from '../types/themeModule';
1
+ import type { ListenerEntry } from '../types';
2
2
  export declare enum Appearances {
3
3
  Unknown = "unknown",
4
4
  Light = "light",
@@ -1,3 +1,3 @@
1
- import type { ThemeModule } from '../types/themeModule';
2
- declare const Theme: ThemeModule;
1
+ import type { ThemeInstance } from '../types';
2
+ declare const Theme: ThemeInstance;
3
3
  export default Theme;
@@ -1,5 +1,5 @@
1
1
  import type { NativePlugin } from '../../types';
2
- import type { ThemeModule } from "./types";
2
+ import type { ThemeInstance } from "./types";
3
3
  export * from './types';
4
- declare const ThemePlugin: NativePlugin<ThemeModule>;
5
- export default ThemePlugin;
4
+ declare const NativeThemePlugin: NativePlugin<ThemeInstance>;
5
+ export default NativeThemePlugin;
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
- export * from './themeModule';
3
+ export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module '../../../types/native' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -1,19 +1,11 @@
1
1
  import { Appearances } from '../constants/theme';
2
- import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
- import type { Color } from '../types/color';
2
+ import type { EasingKeyword, EasingSyntax, Color } from '../types';
4
3
  export declare interface ListenerEntry {
5
4
  fn: (appearance: Appearances) => any;
6
5
  capture: boolean;
7
6
  once: boolean;
8
7
  signal?: AbortSignal;
9
8
  }
10
- export declare interface Theme {
11
- setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
12
- getThemeColor: () => Color | undefined;
13
- removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
14
- detectAppearance: () => Promise<Appearances>;
15
- onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
16
- }
17
9
  export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
18
10
  export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
19
11
  export declare interface SetThemeColorOptions {
@@ -22,3 +14,10 @@ export declare interface SetThemeColorOptions {
22
14
  easingFunction?: EasingSyntax | EasingKeyword;
23
15
  defaultColor?: string;
24
16
  }
17
+ export declare interface ThemeInstance {
18
+ setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
19
+ getThemeColor: () => Color | undefined;
20
+ removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
21
+ detectAppearance: () => Promise<Appearances>;
22
+ onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
23
+ }
@@ -15,7 +15,7 @@ export declare interface SetThemeColorOptions {
15
15
  easingFunction?: EasingSyntax | EasingKeyword;
16
16
  defaultColor?: string;
17
17
  }
18
- export declare interface ThemeModule {
18
+ export declare interface ThemeInstance {
19
19
  setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
20
20
  getThemeColor: () => Color | undefined;
21
21
  removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
@@ -1,2 +1,2 @@
1
- import type { RGBA } from '../types/color';
1
+ import type { RGBA } from '../types';
2
2
  export default function parseColor(color: string): RGBA;
@@ -1,2 +1,2 @@
1
- import type { EasingFunction, EasingKeyword, EasingSyntax } from '../types/easing-syntax';
1
+ import type { EasingFunction, EasingKeyword, EasingSyntax } from '../types';
2
2
  export default function parseEasingFunction(easingFunction: EasingSyntax | EasingKeyword): EasingFunction;
@@ -1,14 +1,16 @@
1
- export declare interface NativePlugin<T> {
1
+ export declare interface ModuleBase {
2
+ Constants: Record<string, any>;
3
+ Errors: Record<string, ErrorConstructor>;
4
+ }
5
+ export declare interface NativePlugin<T> extends ModuleBase {
2
6
  installed: boolean;
3
7
  name: string;
4
8
  module: T;
5
- constants: Record<string, any>;
6
- errors: Record<string, ErrorConstructor>;
7
9
  }
8
- export declare interface NativeBase {
10
+ export declare interface NativeBase extends ModuleBase {
9
11
  Version: string;
10
- Constants: Record<string, any>;
11
- Errors: Record<string, ErrorConstructor>;
12
- extends: <T>(plugin: NativePlugin<T>) => Native;
12
+ extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
+ }
14
+ export interface NativePlugins {
13
15
  }
14
- export declare type Native = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
16
+ export type NativeInstance = NativeBase & NativePlugins;
@@ -160,12 +160,12 @@ var Platform = {
160
160
  isStandalone: IS_STANDALONE,
161
161
  };
162
162
 
163
- var PlatformPlugin = {
163
+ var NativePlatformPlugin = {
164
164
  installed: false,
165
165
  name: 'Platform',
166
166
  module: Platform,
167
- constants: {},
168
- errors: {}
167
+ Constants: {},
168
+ Errors: {}
169
169
  };
170
170
 
171
- module.exports = PlatformPlugin;
171
+ module.exports = NativePlatformPlugin;
@@ -1,9 +1,11 @@
1
- declare interface NativePlugin<T> {
1
+ declare interface ModuleBase {
2
+ Constants: Record<string, any>;
3
+ Errors: Record<string, ErrorConstructor>;
4
+ }
5
+ declare interface NativePlugin<T> extends ModuleBase {
2
6
  installed: boolean;
3
7
  name: string;
4
8
  module: T;
5
- constants: Record<string, any>;
6
- errors: Record<string, ErrorConstructor>;
7
9
  }
8
10
 
9
11
  declare enum OS {
@@ -32,7 +34,7 @@ declare enum Engines {
32
34
  Gecko = "Gecko"
33
35
  }
34
36
 
35
- declare interface PlatformModule {
37
+ declare interface PlatformInstance {
36
38
  os: OS;
37
39
  device: Devices;
38
40
  engine: Engines;
@@ -45,7 +47,13 @@ declare interface PlatformModule {
45
47
  isDesktop: boolean;
46
48
  }
47
49
 
48
- declare const PlatformPlugin: NativePlugin<PlatformModule>;
50
+ declare module '../../../types/native' {
51
+ interface NativePlugins {
52
+ Platform: PlatformInstance;
53
+ }
54
+ }
55
+
56
+ declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
49
57
 
50
- export { PlatformPlugin as default };
51
- export type { PlatformModule };
58
+ export { NativePlatformPlugin as default };
59
+ export type { PlatformInstance };
@@ -1 +1 @@
1
- "use strict";var e,n,i,o=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(e){return void 0===e?"":e.replace(/_/g,".")}function o(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function t(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,e.Android,n.Mobile,t],[/microsoft windows (vista|xp)/i,e.Windows,n.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,e.Windows,n.Desktop,o],[/windows nt 6\.2; (arm)/i,e.Windows,n.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,e.Windows,n.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,e.Windows,n.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,n.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,e.iOS,n.Mobile,i],[/cfnetwork\/.+darwin/i,e.iOS,n.Mobile,t],[/mac os x ?([\w. ]*)/i,e.MacOS,n.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,e.MacOS,n.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=e.Unknown,s="",w=n.Unknown,d=i.Unknown,l="",k=0;k<t.length;k++){var c=(f=t[k])[0],b=f[1],m=f[2],u=f[3];if(null!==(g=o.match(c))){a=b,s=u(g[1]),w=m;break}}for(k=0;k<r.length;k++){c=(f=r[k])[0];var f,g,p=f[1];if(null!==(g=o.match(c))){d=p,l=g[1];break}}var T=function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var i=n.getExtension("WEBGL_debug_renderer_info");return null===i?n.getParameter(n.RENDERER):n.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=w===n.Mobile,M=w===n.Desktop,N=a===e.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o),E={installed:!1,name:"Platform",module:{os:a,device:w,engine:d,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},constants:{},errors:{}};module.exports=E;
1
+ "use strict";var e,n,i,o=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(e){return void 0===e?"":e.replace(/_/g,".")}function o(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function t(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,e.Android,n.Mobile,t],[/microsoft windows (vista|xp)/i,e.Windows,n.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,e.Windows,n.Desktop,o],[/windows nt 6\.2; (arm)/i,e.Windows,n.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,e.Windows,n.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,e.Windows,n.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,n.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,e.iOS,n.Mobile,i],[/cfnetwork\/.+darwin/i,e.iOS,n.Mobile,t],[/mac os x ?([\w. ]*)/i,e.MacOS,n.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,e.MacOS,n.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=e.Unknown,s="",w=n.Unknown,d=i.Unknown,l="",k=0;k<t.length;k++){var c=(f=t[k])[0],b=f[1],m=f[2],u=f[3];if(null!==(g=o.match(c))){a=b,s=u(g[1]),w=m;break}}for(k=0;k<r.length;k++){c=(f=r[k])[0];var f,g,p=f[1];if(null!==(g=o.match(c))){d=p,l=g[1];break}}var T=function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var i=n.getExtension("WEBGL_debug_renderer_info");return null===i?n.getParameter(n.RENDERER):n.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=w===n.Mobile,M=w===n.Desktop,N=a===e.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o),E={installed:!1,name:"Platform",module:{os:a,device:w,engine:d,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},Constants:{},Errors:{}};module.exports=E;
@@ -1 +1 @@
1
- var e,n,i,o=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(e){return void 0===e?"":e.replace(/_/g,".")}function o(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function t(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,e.Android,n.Mobile,t],[/microsoft windows (vista|xp)/i,e.Windows,n.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,e.Windows,n.Desktop,o],[/windows nt 6\.2; (arm)/i,e.Windows,n.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,e.Windows,n.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,e.Windows,n.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,n.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,e.iOS,n.Mobile,i],[/cfnetwork\/.+darwin/i,e.iOS,n.Mobile,t],[/mac os x ?([\w. ]*)/i,e.MacOS,n.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,e.MacOS,n.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=e.Unknown,s="",w=n.Unknown,d=i.Unknown,l="",k=0;k<t.length;k++){var c=(u=t[k])[0],b=u[1],f=u[2],m=u[3];if(null!==(g=o.match(c))){a=b,s=m(g[1]),w=f;break}}for(k=0;k<r.length;k++){c=(u=r[k])[0];var u,g,p=u[1];if(null!==(g=o.match(c))){d=p,l=g[1];break}}var T=function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var i=n.getExtension("WEBGL_debug_renderer_info");return null===i?n.getParameter(n.RENDERER):n.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=w===n.Mobile,M=w===n.Desktop,N=a===e.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o),E={installed:!1,name:"Platform",module:{os:a,device:w,engine:d,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},constants:{},errors:{}};export{E as default};
1
+ var n,e,i,o=navigator.userAgent;!function(n){n.Unknown="Unknown",n.Android="Android",n.iOS="iOS",n.Windows="Windows",n.MacOS="MacOS"}(n||(n={})),function(n){n.Unknown="Unknown",n.Mobile="Mobile",n.Desktop="Desktop"}(e||(e={})),function(n){n.Unknown="Unknown",n.EdgeHTML="EdgeHTML",n.ArkWeb="ArkWeb",n.Blink="Blink",n.Presto="Presto",n.WebKit="WebKit",n.Trident="Trident",n.NetFront="NetFront",n.KHTML="KHTML",n.Tasman="Tasman",n.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(n){return void 0===n?"":n.replace(/_/g,".")}function o(n){if(void 0===n)return"";var e={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[n];return void 0!==e?e:n}function t(n){return void 0===n?"":n}return[[/android\w*[-\/.; ]?([\d.]*)/i,n.Android,e.Mobile,t],[/microsoft windows (vista|xp)/i,n.Windows,e.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,n.Windows,e.Desktop,o],[/windows nt 6\.2; (arm)/i,n.Windows,e.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,n.Windows,e.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,n.Windows,e.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,e.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,n.iOS,e.Mobile,i],[/cfnetwork\/.+darwin/i,n.iOS,e.Mobile,t],[/mac os x ?([\w. ]*)/i,n.MacOS,e.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,n.MacOS,e.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=n.Unknown,s="",w=e.Unknown,d=i.Unknown,l="",k=0;k<t.length;k++){var c=(u=t[k])[0],b=u[1],f=u[2],m=u[3];if(null!==(g=o.match(c))){a=b,s=m(g[1]),w=f;break}}for(k=0;k<r.length;k++){c=(u=r[k])[0];var u,g,p=u[1];if(null!==(g=o.match(c))){d=p,l=g[1];break}}var T=function(){var n=document.createElement("canvas");if("function"!=typeof n.getContext)return"";var e=n.getContext("webgl2")||n.getContext("experimental-webgl")||n.getContext("webgl");if(null===e)return"";if(e instanceof WebGLRenderingContext||"getParameter"in e&&"function"==typeof e.getParameter){var i=e.getExtension("WEBGL_debug_renderer_info");return null===i?e.getParameter(e.RENDERER):e.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=w===e.Mobile,M=w===e.Desktop,N=a===n.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o),E={installed:!1,name:"Platform",module:{os:a,device:w,engine:d,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},Constants:{},Errors:{}};export{E as default};
@@ -158,12 +158,12 @@ var Platform = {
158
158
  isStandalone: IS_STANDALONE,
159
159
  };
160
160
 
161
- var PlatformPlugin = {
161
+ var NativePlatformPlugin = {
162
162
  installed: false,
163
163
  name: 'Platform',
164
164
  module: Platform,
165
- constants: {},
166
- errors: {}
165
+ Constants: {},
166
+ Errors: {}
167
167
  };
168
168
 
169
- export { PlatformPlugin as default };
169
+ export { NativePlatformPlugin as default };
@@ -164,14 +164,14 @@
164
164
  isStandalone: IS_STANDALONE,
165
165
  };
166
166
 
167
- var PlatformPlugin = {
167
+ var NativePlatformPlugin = {
168
168
  installed: false,
169
169
  name: 'Platform',
170
170
  module: Platform,
171
- constants: {},
172
- errors: {}
171
+ Constants: {},
172
+ Errors: {}
173
173
  };
174
174
 
175
- return PlatformPlugin;
175
+ return NativePlatformPlugin;
176
176
 
177
177
  }));
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Platform=n()}(this,(function(){"use strict";var e,n,i,o=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(e){return void 0===e?"":e.replace(/_/g,".")}function o(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function t(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,e.Android,n.Mobile,t],[/microsoft windows (vista|xp)/i,e.Windows,n.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,e.Windows,n.Desktop,o],[/windows nt 6\.2; (arm)/i,e.Windows,n.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,e.Windows,n.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,e.Windows,n.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,n.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,e.iOS,n.Mobile,i],[/cfnetwork\/.+darwin/i,e.iOS,n.Mobile,t],[/mac os x ?([\w. ]*)/i,e.MacOS,n.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,e.MacOS,n.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=e.Unknown,s="",d=n.Unknown,w=i.Unknown,l="",c=0;c<t.length;c++){var f=(m=t[c])[0],k=m[1],u=m[2],b=m[3];if(null!==(p=o.match(f))){a=k,s=b(p[1]),d=u;break}}for(c=0;c<r.length;c++){f=(m=r[c])[0];var m,p,g=m[1];if(null!==(p=o.match(f))){w=g,l=p[1];break}}var T=function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var i=n.getExtension("WEBGL_debug_renderer_info");return null===i?n.getParameter(n.RENDERER):n.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=d===n.Mobile,M=d===n.Desktop,N=a===e.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o);return{installed:!1,name:"Platform",module:{os:a,device:d,engine:w,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},constants:{},errors:{}}}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Platform=n()}(this,(function(){"use strict";var e,n,i,o=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(i||(i={}));for(var t=function(){function i(e){return void 0===e?"":e.replace(/_/g,".")}function o(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function t(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,e.Android,n.Mobile,t],[/microsoft windows (vista|xp)/i,e.Windows,n.Desktop,t],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,e.Windows,n.Desktop,o],[/windows nt 6\.2; (arm)/i,e.Windows,n.Desktop,o],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,e.Windows,n.Desktop,o],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,e.Windows,n.Desktop,o],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,n.Mobile,i],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,e.iOS,n.Mobile,i],[/cfnetwork\/.+darwin/i,e.iOS,n.Mobile,t],[/mac os x ?([\w. ]*)/i,e.MacOS,n.Desktop,i],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,e.MacOS,n.Desktop,i]]}(),r=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],a=e.Unknown,s="",d=n.Unknown,w=i.Unknown,l="",c=0;c<t.length;c++){var f=(m=t[c])[0],k=m[1],u=m[2],b=m[3];if(null!==(p=o.match(f))){a=k,s=b(p[1]),d=u;break}}for(c=0;c<r.length;c++){f=(m=r[c])[0];var m,p,g=m[1];if(null!==(p=o.match(f))){w=g,l=p[1];break}}var T=function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var i=n.getExtension("WEBGL_debug_renderer_info");return null===i?n.getParameter(n.RENDERER):n.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}(),v=d===n.Mobile,M=d===n.Desktop,N=a===e.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches,W=/; ?wv|applewebkit(?!.*safari)/i.test(o);return{installed:!1,name:"Platform",module:{os:a,device:d,engine:w,osVersion:s,engineVersion:l,renderer:T,isWebview:W,isMobile:v,isDesktop:M,isStandalone:N},Constants:{},Errors:{}}}));
@@ -1,3 +1,3 @@
1
- import type { AppModule } from '../types/appModule';
2
- declare const App: AppModule;
1
+ import type { AppInstance } from '../types';
2
+ declare const App: AppInstance;
3
3
  export default App;
@@ -1,5 +1,5 @@
1
1
  import type { NativePlugin } from '../../types';
2
- import type { AppModule } from "./types";
2
+ import type { AppInstance } from "./types";
3
3
  export * from './types';
4
- declare const AppPlugin: NativePlugin<AppModule>;
5
- export default AppPlugin;
4
+ declare const NativeAppPlugin: NativePlugin<AppInstance>;
5
+ export default NativeAppPlugin;
@@ -48,7 +48,7 @@ export declare type MessengerOpenOptions = {
48
48
  body?: Stringifiable;
49
49
  } | HTMLFormElement | FormData;
50
50
  export declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
51
- export declare interface App {
51
+ export declare interface AppInstance {
52
52
  open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
53
  messenger: Messenger;
54
54
  }
@@ -48,7 +48,7 @@ export declare type MessengerOpenOptions = {
48
48
  body?: Stringifiable;
49
49
  } | HTMLFormElement | FormData;
50
50
  export declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
51
- export declare interface AppModule {
51
+ export declare interface AppInstance {
52
52
  open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
53
53
  messenger: Messenger;
54
54
  }
@@ -1 +1,7 @@
1
- export * from './appModule';
1
+ export * from './app';
2
+ import type { AppInstance } from './app';
3
+ declare module '../../../types/native' {
4
+ interface NativePlugins {
5
+ App: AppInstance;
6
+ }
7
+ }
@@ -1,3 +1,3 @@
1
- import type { EventListenerUtil } from '../types/appModule';
1
+ import type { EventListenerUtil } from '../types';
2
2
  declare const EventListenerUtils: EventListenerUtil;
3
3
  export default EventListenerUtils;
@@ -1,3 +1,3 @@
1
- import type { PlatformModule } from '../types/platformModule';
2
- declare const Platform: PlatformModule;
1
+ import type { PlatformInstance } from '../types';
2
+ declare const Platform: PlatformInstance;
3
3
  export default Platform;
@@ -1,5 +1,5 @@
1
1
  import type { NativePlugin } from '../../types';
2
- import type { PlatformModule } from "./types";
2
+ import type { PlatformInstance } from "./types";
3
3
  export * from './types';
4
- declare const PlatformPlugin: NativePlugin<PlatformModule>;
5
- export default PlatformPlugin;
4
+ declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
5
+ export default NativePlatformPlugin;
@@ -1 +1,7 @@
1
- export * from './platformModule';
1
+ export * from './platform';
2
+ import type { PlatformInstance } from './platform';
3
+ declare module '../../../types/native' {
4
+ interface NativePlugins {
5
+ Platform: PlatformInstance;
6
+ }
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface Platform {
2
+ export declare interface PlatformInstance {
3
3
  os: OS;
4
4
  device: Devices;
5
5
  engine: Engines;
@@ -1,5 +1,5 @@
1
1
  import { Devices, Engines, OS } from '../../../constants/platform';
2
- export declare interface PlatformModule {
2
+ export declare interface PlatformInstance {
3
3
  os: OS;
4
4
  device: Devices;
5
5
  engine: Engines;
@@ -1,4 +1,4 @@
1
- import type { ListenerEntry } from '../types/themeModule';
1
+ import type { ListenerEntry } from '../types';
2
2
  export declare enum Appearances {
3
3
  Unknown = "unknown",
4
4
  Light = "light",
@@ -1,3 +1,3 @@
1
- import type { ThemeModule } from '../types/themeModule';
2
- declare const Theme: ThemeModule;
1
+ import type { ThemeInstance } from '../types';
2
+ declare const Theme: ThemeInstance;
3
3
  export default Theme;
@@ -1,5 +1,5 @@
1
1
  import type { NativePlugin } from '../../types';
2
- import type { ThemeModule } from "./types";
2
+ import type { ThemeInstance } from "./types";
3
3
  export * from './types';
4
- declare const ThemePlugin: NativePlugin<ThemeModule>;
5
- export default ThemePlugin;
4
+ declare const NativeThemePlugin: NativePlugin<ThemeInstance>;
5
+ export default NativeThemePlugin;
@@ -1,3 +1,9 @@
1
1
  export * from './color';
2
2
  export * from './easing-syntax';
3
- export * from './themeModule';
3
+ export * from './theme';
4
+ import type { ThemeInstance } from './theme';
5
+ declare module '../../../types/native' {
6
+ interface NativePlugins {
7
+ Theme: ThemeInstance;
8
+ }
9
+ }
@@ -1,19 +1,11 @@
1
1
  import { Appearances } from '../constants/theme';
2
- import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
3
- import type { Color } from '../types/color';
2
+ import type { EasingKeyword, EasingSyntax, Color } from '../types';
4
3
  export declare interface ListenerEntry {
5
4
  fn: (appearance: Appearances) => any;
6
5
  capture: boolean;
7
6
  once: boolean;
8
7
  signal?: AbortSignal;
9
8
  }
10
- export declare interface Theme {
11
- setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
12
- getThemeColor: () => Color | undefined;
13
- removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
14
- detectAppearance: () => Promise<Appearances>;
15
- onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
16
- }
17
9
  export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
18
10
  export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
19
11
  export declare interface SetThemeColorOptions {
@@ -22,3 +14,10 @@ export declare interface SetThemeColorOptions {
22
14
  easingFunction?: EasingSyntax | EasingKeyword;
23
15
  defaultColor?: string;
24
16
  }
17
+ export declare interface ThemeInstance {
18
+ setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
19
+ getThemeColor: () => Color | undefined;
20
+ removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
21
+ detectAppearance: () => Promise<Appearances>;
22
+ onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
23
+ }
@@ -15,7 +15,7 @@ export declare interface SetThemeColorOptions {
15
15
  easingFunction?: EasingSyntax | EasingKeyword;
16
16
  defaultColor?: string;
17
17
  }
18
- export declare interface ThemeModule {
18
+ export declare interface ThemeInstance {
19
19
  setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
20
20
  getThemeColor: () => Color | undefined;
21
21
  removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
@@ -1,2 +1,2 @@
1
- import type { RGBA } from '../types/color';
1
+ import type { RGBA } from '../types';
2
2
  export default function parseColor(color: string): RGBA;
@@ -1,2 +1,2 @@
1
- import type { EasingFunction, EasingKeyword, EasingSyntax } from '../types/easing-syntax';
1
+ import type { EasingFunction, EasingKeyword, EasingSyntax } from '../types';
2
2
  export default function parseEasingFunction(easingFunction: EasingSyntax | EasingKeyword): EasingFunction;
@@ -1,14 +1,16 @@
1
- export declare interface NativePlugin<T> {
1
+ export declare interface ModuleBase {
2
+ Constants: Record<string, any>;
3
+ Errors: Record<string, ErrorConstructor>;
4
+ }
5
+ export declare interface NativePlugin<T> extends ModuleBase {
2
6
  installed: boolean;
3
7
  name: string;
4
8
  module: T;
5
- constants: Record<string, any>;
6
- errors: Record<string, ErrorConstructor>;
7
9
  }
8
- export declare interface NativeBase {
10
+ export declare interface NativeBase extends ModuleBase {
9
11
  Version: string;
10
- Constants: Record<string, any>;
11
- Errors: Record<string, ErrorConstructor>;
12
- extends: <T>(plugin: NativePlugin<T>) => Native;
12
+ extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
13
+ }
14
+ export interface NativePlugins {
13
15
  }
14
- export declare type Native = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
16
+ export type NativeInstance = NativeBase & NativePlugins;
@@ -790,14 +790,14 @@ function onAppearanceChange(listener, options) {
790
790
  };
791
791
  }
792
792
 
793
- var ThemePlugin = {
793
+ var NativeThemePlugin = {
794
794
  installed: false,
795
795
  name: 'Theme',
796
796
  module: Theme,
797
- constants: {
797
+ Constants: {
798
798
  Appearances: Appearances
799
799
  },
800
- errors: {
800
+ Errors: {
801
801
  EasingError: EasingError,
802
802
  UnsupportedEasingFunctionError: UnsupportedEasingFunctionError,
803
803
  StepSyntaxError: StepSyntaxError,
@@ -807,4 +807,4 @@ var ThemePlugin = {
807
807
  }
808
808
  };
809
809
 
810
- module.exports = ThemePlugin;
810
+ module.exports = NativeThemePlugin;
@@ -1,9 +1,11 @@
1
- declare interface NativePlugin<T> {
1
+ declare interface ModuleBase {
2
+ Constants: Record<string, any>;
3
+ Errors: Record<string, ErrorConstructor>;
4
+ }
5
+ declare interface NativePlugin<T> extends ModuleBase {
2
6
  installed: boolean;
3
7
  name: string;
4
8
  module: T;
5
- constants: Record<string, any>;
6
- errors: Record<string, ErrorConstructor>;
7
9
  }
8
10
 
9
11
  type SystemColor = 'ActiveBorder' | 'ActiveCaption' | 'AppWorkspace' | 'Background' | 'ButtonHighlight' | 'ButtonShadow' | 'CaptionText' | 'InactiveBorder' | 'InactiveCaption' | 'InactiveCaptionText' | 'InfoBackground' | 'InfoText' | 'Menu' | 'MenuText' | 'Scrollbar' | 'ThreeDDarkShadow' | 'ThreeDFace' | 'ThreeDHighlight' | 'ThreeDLightShadow' | 'ThreeDShadow' | 'Window' | 'WindowFrame' | 'WindowText';
@@ -61,7 +63,7 @@ declare interface SetThemeColorOptions {
61
63
  easingFunction?: EasingSyntax | EasingKeyword;
62
64
  defaultColor?: string;
63
65
  }
64
- declare interface ThemeModule {
66
+ declare interface ThemeInstance {
65
67
  setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
66
68
  getThemeColor: () => Color | undefined;
67
69
  removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
@@ -69,7 +71,13 @@ declare interface ThemeModule {
69
71
  onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
70
72
  }
71
73
 
72
- declare const ThemePlugin: NativePlugin<ThemeModule>;
74
+ declare module '../../../types/native' {
75
+ interface NativePlugins {
76
+ Theme: ThemeInstance;
77
+ }
78
+ }
79
+
80
+ declare const NativeThemePlugin: NativePlugin<ThemeInstance>;
73
81
 
74
- export { ThemePlugin as default };
75
- export type { Color, CubicBezierParams, CubicBezierSyntax, DeprecatedSystemColor, EasingFunction, EasingKeyword, EasingSyntax, HEXColor, HSLAColor, HSLColor, LinearPoint, LinearSyntax, ListenerEntry, NamedColor, RGB, RGBA, RGBAColor, RGBColor, SetThemeColorOptions, StepSyntax, SystemColor, ThemeColorMetaAppearanceKeys, ThemeColorMetaGroup, ThemeModule };
82
+ export { NativeThemePlugin as default };
83
+ export type { Color, CubicBezierParams, CubicBezierSyntax, DeprecatedSystemColor, EasingFunction, EasingKeyword, EasingSyntax, HEXColor, HSLAColor, HSLColor, LinearPoint, LinearSyntax, ListenerEntry, NamedColor, RGB, RGBA, RGBAColor, RGBColor, SetThemeColorOptions, StepSyntax, SystemColor, ThemeColorMetaAppearanceKeys, ThemeColorMetaGroup, ThemeInstance };