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.
- package/dist/index.d.ts +13 -11
- package/dist/native.cjs +5 -5
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +5 -5
- package/dist/native.umd.js +5 -5
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +4 -4
- package/dist/plugin/app/index.d.ts +15 -7
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +4 -4
- package/dist/plugin/app/index.umd.js +4 -4
- package/dist/plugin/app/index.umd.min.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/app.d.ts +1 -1
- package/dist/plugin/app/src/plugin/app/types/appModule.d.ts +1 -1
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +7 -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 +7 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +1 -1
- package/dist/plugin/app/src/plugin/platform/types/platformModule.d.ts +1 -1
- 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 +7 -1
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +8 -9
- package/dist/plugin/app/src/plugin/theme/types/themeModule.d.ts +1 -1
- 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/app/src/types/native.d.ts +10 -8
- package/dist/plugin/platform/index.cjs +4 -4
- package/dist/plugin/platform/index.d.ts +15 -7
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +4 -4
- package/dist/plugin/platform/index.umd.js +4 -4
- package/dist/plugin/platform/index.umd.min.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/app.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/types/appModule.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +7 -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 +7 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/platform/types/platformModule.d.ts +1 -1
- 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 +7 -1
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +8 -9
- package/dist/plugin/platform/src/plugin/theme/types/themeModule.d.ts +1 -1
- 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/platform/src/types/native.d.ts +10 -8
- package/dist/plugin/theme/index.cjs +4 -4
- package/dist/plugin/theme/index.d.ts +15 -7
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +4 -4
- package/dist/plugin/theme/index.umd.js +4 -4
- package/dist/plugin/theme/index.umd.min.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/app.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/app/types/appModule.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +7 -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 +7 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/platform/types/platformModule.d.ts +1 -1
- 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 +7 -1
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +8 -9
- package/dist/plugin/theme/src/plugin/theme/types/themeModule.d.ts +1 -1
- 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/plugin/theme/src/types/native.d.ts +10 -8
- 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/app.d.ts +1 -1
- package/dist/src/plugin/app/types/appModule.d.ts +1 -1
- package/dist/src/plugin/app/types/index.d.ts +7 -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 +7 -1
- package/dist/src/plugin/platform/types/platform.d.ts +1 -1
- package/dist/src/plugin/platform/types/platformModule.d.ts +1 -1
- 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 +7 -1
- package/dist/src/plugin/theme/types/theme.d.ts +8 -9
- package/dist/src/plugin/theme/types/themeModule.d.ts +1 -1
- 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/dist/src/types/native.d.ts +10 -8
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const Theme:
|
|
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 {
|
|
2
|
+
import type { ThemeInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
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 './
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
13
|
+
}
|
|
14
|
+
export interface NativePlugins {
|
|
13
15
|
}
|
|
14
|
-
export
|
|
16
|
+
export type NativeInstance = NativeBase & NativePlugins;
|
|
@@ -160,12 +160,12 @@ var Platform = {
|
|
|
160
160
|
isStandalone: IS_STANDALONE,
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
var
|
|
163
|
+
var NativePlatformPlugin = {
|
|
164
164
|
installed: false,
|
|
165
165
|
name: 'Platform',
|
|
166
166
|
module: Platform,
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
Constants: {},
|
|
168
|
+
Errors: {}
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
module.exports =
|
|
171
|
+
module.exports = NativePlatformPlugin;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
declare interface
|
|
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
|
|
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
|
|
50
|
+
declare module '../../../types/native' {
|
|
51
|
+
interface NativePlugins {
|
|
52
|
+
Platform: PlatformInstance;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
49
57
|
|
|
50
|
-
export {
|
|
51
|
-
export type {
|
|
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},
|
|
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,
|
|
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
|
|
161
|
+
var NativePlatformPlugin = {
|
|
162
162
|
installed: false,
|
|
163
163
|
name: 'Platform',
|
|
164
164
|
module: Platform,
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
Constants: {},
|
|
166
|
+
Errors: {}
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
export {
|
|
169
|
+
export { NativePlatformPlugin as default };
|
|
@@ -164,14 +164,14 @@
|
|
|
164
164
|
isStandalone: IS_STANDALONE,
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
var
|
|
167
|
+
var NativePlatformPlugin = {
|
|
168
168
|
installed: false,
|
|
169
169
|
name: 'Platform',
|
|
170
170
|
module: Platform,
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
Constants: {},
|
|
172
|
+
Errors: {}
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
-
return
|
|
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},
|
|
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 {
|
|
2
|
-
declare const App:
|
|
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 {
|
|
2
|
+
import type { AppInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
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
|
|
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
|
|
51
|
+
export declare interface AppInstance {
|
|
52
52
|
open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
|
|
53
53
|
messenger: Messenger;
|
|
54
54
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const Platform:
|
|
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 {
|
|
2
|
+
import type { PlatformInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
5
|
+
export default NativePlatformPlugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const Theme:
|
|
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 {
|
|
2
|
+
import type { ThemeInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
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 './
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
13
|
+
}
|
|
14
|
+
export interface NativePlugins {
|
|
13
15
|
}
|
|
14
|
-
export
|
|
16
|
+
export type NativeInstance = NativeBase & NativePlugins;
|
|
@@ -790,14 +790,14 @@ function onAppearanceChange(listener, options) {
|
|
|
790
790
|
};
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
-
var
|
|
793
|
+
var NativeThemePlugin = {
|
|
794
794
|
installed: false,
|
|
795
795
|
name: 'Theme',
|
|
796
796
|
module: Theme,
|
|
797
|
-
|
|
797
|
+
Constants: {
|
|
798
798
|
Appearances: Appearances
|
|
799
799
|
},
|
|
800
|
-
|
|
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 =
|
|
810
|
+
module.exports = NativeThemePlugin;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
declare interface
|
|
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
|
|
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
|
|
74
|
+
declare module '../../../types/native' {
|
|
75
|
+
interface NativePlugins {
|
|
76
|
+
Theme: ThemeInstance;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const NativeThemePlugin: NativePlugin<ThemeInstance>;
|
|
73
81
|
|
|
74
|
-
export {
|
|
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,
|
|
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 };
|