native-fn 1.0.36 → 1.0.38
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 +17 -22
- package/dist/native.cjs +1 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/native.umd.js +1 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.d.ts +13 -10
- package/dist/plugin/app/src/plugin/app/index.d.ts +8 -1
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/platform/index.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/index.d.ts +13 -1
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/app/src/types/native.d.ts +15 -15
- package/dist/plugin/platform/index.d.ts +6 -8
- package/dist/plugin/platform/src/plugin/app/index.d.ts +8 -1
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +13 -1
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/types/native.d.ts +15 -15
- package/dist/plugin/theme/index.d.ts +16 -9
- package/dist/plugin/theme/src/plugin/app/index.d.ts +8 -1
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +13 -1
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/types/native.d.ts +15 -15
- package/dist/src/plugin/app/index.d.ts +8 -1
- package/dist/src/plugin/app/types/index.d.ts +2 -2
- package/dist/src/plugin/platform/index.d.ts +1 -1
- package/dist/src/plugin/theme/index.d.ts +13 -1
- package/dist/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/src/types/native.d.ts +15 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
interface NativePlugins {
|
|
2
2
|
}
|
|
3
|
-
interface NativeConstants {
|
|
3
|
+
interface NativeConstants extends Record<string, any> {
|
|
4
4
|
}
|
|
5
|
-
interface NativeErrors {
|
|
5
|
+
interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
6
|
}
|
|
7
|
-
declare interface
|
|
8
|
-
}
|
|
9
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
|
-
name:
|
|
12
|
-
module:
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
9
|
+
name: Key;
|
|
10
|
+
module: Module;
|
|
11
|
+
Constants: Constants;
|
|
12
|
+
Errors: Errors;
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
17
15
|
Version: string;
|
|
18
|
-
Constants:
|
|
19
|
-
Errors:
|
|
20
|
-
extends: <
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Constants: AssignedConstants;
|
|
17
|
+
Errors: AssignedErrors;
|
|
18
|
+
extends: <Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(this: NativeBase<Plugins, AssignedConstants, AssignedErrors>, plugin: NativePlugin<Key, Module, Constants, Errors>) => NativeBase<Plugins & {
|
|
19
|
+
[Plugin in Key]: Module;
|
|
20
|
+
}, AssignedConstants & Constants, AssignedErrors & Errors>;
|
|
21
|
+
} & NativePlugins;
|
|
22
|
+
type NativeInstance = NativeBase<NativePlugins, NativeConstants, NativeErrors>;
|
|
23
23
|
|
|
24
|
-
declare const Native:
|
|
25
|
-
Version: string;
|
|
26
|
-
Constants: {};
|
|
27
|
-
Errors: {};
|
|
28
|
-
extends<T>(plugin: NativePlugin<T>): NativeInstance;
|
|
29
|
-
};
|
|
24
|
+
declare const Native: NativeInstance;
|
|
30
25
|
|
|
31
26
|
export { Native as default };
|
|
32
|
-
export type {
|
|
27
|
+
export type { NativeBase, NativeConstants, NativeErrors, NativeInstance, NativePlugin, NativePlugins };
|
package/dist/native.cjs
CHANGED
package/dist/native.min.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t="1.0.
|
|
1
|
+
"use strict";var t="1.0.38";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});module.exports=o;
|
package/dist/native.min.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t="1.0.
|
|
1
|
+
var t="1.0.38";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError"),o=new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}});export{o as default};
|
package/dist/native.mjs
CHANGED
package/dist/native.umd.js
CHANGED
package/dist/native.umd.min.js
CHANGED
|
@@ -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";var t="1.0.
|
|
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";var t="1.0.38";function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=Object(t[0]),o=1;o<t.length;o++){var n=t[o];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(r[a]=n[a])}return r}var r=function(t,e){function r(o){if(!(this instanceof r))return new r(o);var n=new e(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(n,r.prototype):n.__proto__=r.prototype,n.name=t,void 0!==o&&(n.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(n,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(n,r);else if(e.captureStackTrace&&"function"==typeof e.captureStackTrace)e.captureStackTrace(n,r);else try{var a=new e;a.stack&&(n.stack=a.stack)}catch(t){}return n}void 0===e&&(e=Error),r.prototype=Object.create(e.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(r.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(e){try{r.prototype.name=t}catch(t){}}try{Object.defineProperty(r,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}catch(t){}return r}("PluginNotExtendedError");return new Proxy({Version:t,Constants:{},Errors:{},extends:function(t){return t.installed||(this.Constants=e(this.Constants,t.Constants),this.Errors=e(this.Errors,t.Errors),this[t.name]=t.module,t.installed=!0),this}},{get:function(t,e,o){if(e in t)return Reflect.get(t,e,o);throw new r(e.toString()+" is not extended yet. Call Native.extends(plugin) first.")}})}));
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare interface
|
|
2
|
-
}
|
|
3
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
1
|
+
declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
|
-
name:
|
|
6
|
-
module:
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
3
|
+
name: Key;
|
|
4
|
+
module: Module;
|
|
5
|
+
Constants: Constants;
|
|
6
|
+
Errors: Errors;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare enum OS {
|
|
@@ -89,15 +87,20 @@ declare module 'native-fn' {
|
|
|
89
87
|
App: AppInstance;
|
|
90
88
|
}
|
|
91
89
|
interface NativeConstants {
|
|
92
|
-
AppOpenState: AppOpenState;
|
|
93
|
-
Messengers: Messengers;
|
|
90
|
+
AppOpenState: typeof AppOpenState;
|
|
91
|
+
Messengers: typeof Messengers;
|
|
94
92
|
}
|
|
95
93
|
interface NativeErrors {
|
|
96
94
|
URLOpenError: typeof URLOpenError;
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
declare const NativeAppPlugin: NativePlugin<AppInstance
|
|
98
|
+
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
99
|
+
AppOpenState: typeof AppOpenState;
|
|
100
|
+
Messengers: typeof Messengers;
|
|
101
|
+
}, {
|
|
102
|
+
URLOpenError: typeof URLOpenError;
|
|
103
|
+
}>;
|
|
101
104
|
|
|
102
105
|
export { NativeAppPlugin as default };
|
|
103
106
|
export type { AndroidAppInfo, AppInfo, AppInstance, AppOpenOptions, EventListenerOptions, EventListenerUtil, IOSAppInfo, MacOSAppInfo, Messenger, MessengerOpenOptions, Stringifiable, StringifiableSequence, URLCandidate, WindowsAppInfo };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { AppInstance } from "./types";
|
|
3
|
+
import { AppOpenState, Messengers } from './constants/app';
|
|
4
|
+
import { URLOpenError } from './errors/url-open-error';
|
|
3
5
|
export * from './types';
|
|
4
|
-
declare const NativeAppPlugin: NativePlugin<AppInstance
|
|
6
|
+
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
7
|
+
AppOpenState: typeof AppOpenState;
|
|
8
|
+
Messengers: typeof Messengers;
|
|
9
|
+
}, {
|
|
10
|
+
URLOpenError: typeof URLOpenError;
|
|
11
|
+
}>;
|
|
5
12
|
export default NativeAppPlugin;
|
|
@@ -7,8 +7,8 @@ declare module 'native-fn' {
|
|
|
7
7
|
App: AppInstance;
|
|
8
8
|
}
|
|
9
9
|
interface NativeConstants {
|
|
10
|
-
AppOpenState: AppOpenState;
|
|
11
|
-
Messengers: Messengers;
|
|
10
|
+
AppOpenState: typeof AppOpenState;
|
|
11
|
+
Messengers: typeof Messengers;
|
|
12
12
|
}
|
|
13
13
|
interface NativeErrors {
|
|
14
14
|
URLOpenError: typeof URLOpenError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { PlatformInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
4
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {}, {}>;
|
|
5
5
|
export default NativePlatformPlugin;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
+
import { Appearances } from './constants/theme';
|
|
4
|
+
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from './errors/easing-error';
|
|
5
|
+
import { UnsupportedColorError } from './errors/unsupported-color-error';
|
|
3
6
|
export * from './types';
|
|
4
|
-
declare const NativeThemePlugin: NativePlugin<ThemeInstance
|
|
7
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
+
Appearances: typeof Appearances;
|
|
9
|
+
}, {
|
|
10
|
+
EasingError: typeof EasingError;
|
|
11
|
+
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
+
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
+
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
+
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
+
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
+
}>;
|
|
5
17
|
export default NativeThemePlugin;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface NativePlugins {
|
|
2
2
|
}
|
|
3
|
-
export interface NativeConstants {
|
|
3
|
+
export interface NativeConstants extends Record<string, any> {
|
|
4
4
|
}
|
|
5
|
-
export interface NativeErrors {
|
|
5
|
+
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
|
-
name:
|
|
12
|
-
module:
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
9
|
+
name: Key;
|
|
10
|
+
module: Module;
|
|
11
|
+
Constants: Constants;
|
|
12
|
+
Errors: Errors;
|
|
15
13
|
}
|
|
16
|
-
export
|
|
14
|
+
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
17
15
|
Version: string;
|
|
18
|
-
Constants:
|
|
19
|
-
Errors:
|
|
20
|
-
extends: <
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Constants: AssignedConstants;
|
|
17
|
+
Errors: AssignedErrors;
|
|
18
|
+
extends: <Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(this: NativeBase<Plugins, AssignedConstants, AssignedErrors>, plugin: NativePlugin<Key, Module, Constants, Errors>) => NativeBase<Plugins & {
|
|
19
|
+
[Plugin in Key]: Module;
|
|
20
|
+
}, AssignedConstants & Constants, AssignedErrors & Errors>;
|
|
21
|
+
} & NativePlugins;
|
|
22
|
+
export type NativeInstance = NativeBase<NativePlugins, NativeConstants, NativeErrors>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare interface
|
|
2
|
-
}
|
|
3
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
1
|
+
declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
|
-
name:
|
|
6
|
-
module:
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
3
|
+
name: Key;
|
|
4
|
+
module: Module;
|
|
5
|
+
Constants: Constants;
|
|
6
|
+
Errors: Errors;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare enum OS {
|
|
@@ -53,7 +51,7 @@ declare module 'native-fn' {
|
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
54
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {}, {}>;
|
|
57
55
|
|
|
58
56
|
export { NativePlatformPlugin as default };
|
|
59
57
|
export type { PlatformInstance };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { AppInstance } from "./types";
|
|
3
|
+
import { AppOpenState, Messengers } from './constants/app';
|
|
4
|
+
import { URLOpenError } from './errors/url-open-error';
|
|
3
5
|
export * from './types';
|
|
4
|
-
declare const NativeAppPlugin: NativePlugin<AppInstance
|
|
6
|
+
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
7
|
+
AppOpenState: typeof AppOpenState;
|
|
8
|
+
Messengers: typeof Messengers;
|
|
9
|
+
}, {
|
|
10
|
+
URLOpenError: typeof URLOpenError;
|
|
11
|
+
}>;
|
|
5
12
|
export default NativeAppPlugin;
|
|
@@ -7,8 +7,8 @@ declare module 'native-fn' {
|
|
|
7
7
|
App: AppInstance;
|
|
8
8
|
}
|
|
9
9
|
interface NativeConstants {
|
|
10
|
-
AppOpenState: AppOpenState;
|
|
11
|
-
Messengers: Messengers;
|
|
10
|
+
AppOpenState: typeof AppOpenState;
|
|
11
|
+
Messengers: typeof Messengers;
|
|
12
12
|
}
|
|
13
13
|
interface NativeErrors {
|
|
14
14
|
URLOpenError: typeof URLOpenError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { PlatformInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
4
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {}, {}>;
|
|
5
5
|
export default NativePlatformPlugin;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
+
import { Appearances } from './constants/theme';
|
|
4
|
+
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from './errors/easing-error';
|
|
5
|
+
import { UnsupportedColorError } from './errors/unsupported-color-error';
|
|
3
6
|
export * from './types';
|
|
4
|
-
declare const NativeThemePlugin: NativePlugin<ThemeInstance
|
|
7
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
+
Appearances: typeof Appearances;
|
|
9
|
+
}, {
|
|
10
|
+
EasingError: typeof EasingError;
|
|
11
|
+
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
+
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
+
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
+
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
+
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
+
}>;
|
|
5
17
|
export default NativeThemePlugin;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface NativePlugins {
|
|
2
2
|
}
|
|
3
|
-
export interface NativeConstants {
|
|
3
|
+
export interface NativeConstants extends Record<string, any> {
|
|
4
4
|
}
|
|
5
|
-
export interface NativeErrors {
|
|
5
|
+
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
|
-
name:
|
|
12
|
-
module:
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
9
|
+
name: Key;
|
|
10
|
+
module: Module;
|
|
11
|
+
Constants: Constants;
|
|
12
|
+
Errors: Errors;
|
|
15
13
|
}
|
|
16
|
-
export
|
|
14
|
+
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
17
15
|
Version: string;
|
|
18
|
-
Constants:
|
|
19
|
-
Errors:
|
|
20
|
-
extends: <
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Constants: AssignedConstants;
|
|
17
|
+
Errors: AssignedErrors;
|
|
18
|
+
extends: <Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(this: NativeBase<Plugins, AssignedConstants, AssignedErrors>, plugin: NativePlugin<Key, Module, Constants, Errors>) => NativeBase<Plugins & {
|
|
19
|
+
[Plugin in Key]: Module;
|
|
20
|
+
}, AssignedConstants & Constants, AssignedErrors & Errors>;
|
|
21
|
+
} & NativePlugins;
|
|
22
|
+
export type NativeInstance = NativeBase<NativePlugins, NativeConstants, NativeErrors>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare interface
|
|
2
|
-
}
|
|
3
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
1
|
+
declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
|
-
name:
|
|
6
|
-
module:
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
3
|
+
name: Key;
|
|
4
|
+
module: Module;
|
|
5
|
+
Constants: Constants;
|
|
6
|
+
Errors: Errors;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
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';
|
|
@@ -84,7 +82,7 @@ declare module 'native-fn' {
|
|
|
84
82
|
Theme: ThemeInstance;
|
|
85
83
|
}
|
|
86
84
|
interface NativeConstants {
|
|
87
|
-
Appearances: Appearances;
|
|
85
|
+
Appearances: typeof Appearances;
|
|
88
86
|
}
|
|
89
87
|
interface NativeErrors {
|
|
90
88
|
EasingError: typeof EasingError;
|
|
@@ -96,7 +94,16 @@ declare module 'native-fn' {
|
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
declare const NativeThemePlugin: NativePlugin<ThemeInstance
|
|
97
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
98
|
+
Appearances: typeof Appearances;
|
|
99
|
+
}, {
|
|
100
|
+
EasingError: typeof EasingError;
|
|
101
|
+
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
102
|
+
StepSyntaxError: typeof StepSyntaxError;
|
|
103
|
+
LinearSyntaxError: typeof LinearSyntaxError;
|
|
104
|
+
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
105
|
+
UnsupportedColorError: typeof UnsupportedColorError;
|
|
106
|
+
}>;
|
|
100
107
|
|
|
101
108
|
export { NativeThemePlugin as default };
|
|
102
109
|
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 };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { AppInstance } from "./types";
|
|
3
|
+
import { AppOpenState, Messengers } from './constants/app';
|
|
4
|
+
import { URLOpenError } from './errors/url-open-error';
|
|
3
5
|
export * from './types';
|
|
4
|
-
declare const NativeAppPlugin: NativePlugin<AppInstance
|
|
6
|
+
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
7
|
+
AppOpenState: typeof AppOpenState;
|
|
8
|
+
Messengers: typeof Messengers;
|
|
9
|
+
}, {
|
|
10
|
+
URLOpenError: typeof URLOpenError;
|
|
11
|
+
}>;
|
|
5
12
|
export default NativeAppPlugin;
|
|
@@ -7,8 +7,8 @@ declare module 'native-fn' {
|
|
|
7
7
|
App: AppInstance;
|
|
8
8
|
}
|
|
9
9
|
interface NativeConstants {
|
|
10
|
-
AppOpenState: AppOpenState;
|
|
11
|
-
Messengers: Messengers;
|
|
10
|
+
AppOpenState: typeof AppOpenState;
|
|
11
|
+
Messengers: typeof Messengers;
|
|
12
12
|
}
|
|
13
13
|
interface NativeErrors {
|
|
14
14
|
URLOpenError: typeof URLOpenError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { PlatformInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
4
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {}, {}>;
|
|
5
5
|
export default NativePlatformPlugin;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
+
import { Appearances } from './constants/theme';
|
|
4
|
+
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from './errors/easing-error';
|
|
5
|
+
import { UnsupportedColorError } from './errors/unsupported-color-error';
|
|
3
6
|
export * from './types';
|
|
4
|
-
declare const NativeThemePlugin: NativePlugin<ThemeInstance
|
|
7
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
+
Appearances: typeof Appearances;
|
|
9
|
+
}, {
|
|
10
|
+
EasingError: typeof EasingError;
|
|
11
|
+
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
+
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
+
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
+
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
+
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
+
}>;
|
|
5
17
|
export default NativeThemePlugin;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface NativePlugins {
|
|
2
2
|
}
|
|
3
|
-
export interface NativeConstants {
|
|
3
|
+
export interface NativeConstants extends Record<string, any> {
|
|
4
4
|
}
|
|
5
|
-
export interface NativeErrors {
|
|
5
|
+
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
|
-
name:
|
|
12
|
-
module:
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
9
|
+
name: Key;
|
|
10
|
+
module: Module;
|
|
11
|
+
Constants: Constants;
|
|
12
|
+
Errors: Errors;
|
|
15
13
|
}
|
|
16
|
-
export
|
|
14
|
+
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
17
15
|
Version: string;
|
|
18
|
-
Constants:
|
|
19
|
-
Errors:
|
|
20
|
-
extends: <
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Constants: AssignedConstants;
|
|
17
|
+
Errors: AssignedErrors;
|
|
18
|
+
extends: <Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(this: NativeBase<Plugins, AssignedConstants, AssignedErrors>, plugin: NativePlugin<Key, Module, Constants, Errors>) => NativeBase<Plugins & {
|
|
19
|
+
[Plugin in Key]: Module;
|
|
20
|
+
}, AssignedConstants & Constants, AssignedErrors & Errors>;
|
|
21
|
+
} & NativePlugins;
|
|
22
|
+
export type NativeInstance = NativeBase<NativePlugins, NativeConstants, NativeErrors>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { AppInstance } from "./types";
|
|
3
|
+
import { AppOpenState, Messengers } from './constants/app';
|
|
4
|
+
import { URLOpenError } from './errors/url-open-error';
|
|
3
5
|
export * from './types';
|
|
4
|
-
declare const NativeAppPlugin: NativePlugin<AppInstance
|
|
6
|
+
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
7
|
+
AppOpenState: typeof AppOpenState;
|
|
8
|
+
Messengers: typeof Messengers;
|
|
9
|
+
}, {
|
|
10
|
+
URLOpenError: typeof URLOpenError;
|
|
11
|
+
}>;
|
|
5
12
|
export default NativeAppPlugin;
|
|
@@ -7,8 +7,8 @@ declare module 'native-fn' {
|
|
|
7
7
|
App: AppInstance;
|
|
8
8
|
}
|
|
9
9
|
interface NativeConstants {
|
|
10
|
-
AppOpenState: AppOpenState;
|
|
11
|
-
Messengers: Messengers;
|
|
10
|
+
AppOpenState: typeof AppOpenState;
|
|
11
|
+
Messengers: typeof Messengers;
|
|
12
12
|
}
|
|
13
13
|
interface NativeErrors {
|
|
14
14
|
URLOpenError: typeof URLOpenError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { PlatformInstance } from "./types";
|
|
3
3
|
export * from './types';
|
|
4
|
-
declare const NativePlatformPlugin: NativePlugin<PlatformInstance>;
|
|
4
|
+
declare const NativePlatformPlugin: NativePlugin<'Platform', PlatformInstance, {}, {}>;
|
|
5
5
|
export default NativePlatformPlugin;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { NativePlugin } from '../../types';
|
|
2
2
|
import type { ThemeInstance } from "./types";
|
|
3
|
+
import { Appearances } from './constants/theme';
|
|
4
|
+
import { EasingError, UnsupportedEasingFunctionError, StepSyntaxError, LinearSyntaxError, CubicBezierSyntaxError } from './errors/easing-error';
|
|
5
|
+
import { UnsupportedColorError } from './errors/unsupported-color-error';
|
|
3
6
|
export * from './types';
|
|
4
|
-
declare const NativeThemePlugin: NativePlugin<ThemeInstance
|
|
7
|
+
declare const NativeThemePlugin: NativePlugin<'Theme', ThemeInstance, {
|
|
8
|
+
Appearances: typeof Appearances;
|
|
9
|
+
}, {
|
|
10
|
+
EasingError: typeof EasingError;
|
|
11
|
+
UnsupportedEasingFunctionError: typeof UnsupportedEasingFunctionError;
|
|
12
|
+
StepSyntaxError: typeof StepSyntaxError;
|
|
13
|
+
LinearSyntaxError: typeof LinearSyntaxError;
|
|
14
|
+
CubicBezierSyntaxError: typeof CubicBezierSyntaxError;
|
|
15
|
+
UnsupportedColorError: typeof UnsupportedColorError;
|
|
16
|
+
}>;
|
|
5
17
|
export default NativeThemePlugin;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface NativePlugins {
|
|
2
2
|
}
|
|
3
|
-
export interface NativeConstants {
|
|
3
|
+
export interface NativeConstants extends Record<string, any> {
|
|
4
4
|
}
|
|
5
|
-
export interface NativeErrors {
|
|
5
|
+
export interface NativeErrors extends Record<string, ErrorConstructor> {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
|
-
name:
|
|
12
|
-
module:
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
9
|
+
name: Key;
|
|
10
|
+
module: Module;
|
|
11
|
+
Constants: Constants;
|
|
12
|
+
Errors: Errors;
|
|
15
13
|
}
|
|
16
|
-
export
|
|
14
|
+
export type NativeBase<Plugins, AssignedConstants extends Record<string, any> = Record<string, any>, AssignedErrors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> = {
|
|
17
15
|
Version: string;
|
|
18
|
-
Constants:
|
|
19
|
-
Errors:
|
|
20
|
-
extends: <
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Constants: AssignedConstants;
|
|
17
|
+
Errors: AssignedErrors;
|
|
18
|
+
extends: <Key extends string, Module, Constants extends Record<string, any> = Record<string, any>, Errors extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(this: NativeBase<Plugins, AssignedConstants, AssignedErrors>, plugin: NativePlugin<Key, Module, Constants, Errors>) => NativeBase<Plugins & {
|
|
19
|
+
[Plugin in Key]: Module;
|
|
20
|
+
}, AssignedConstants & Constants, AssignedErrors & Errors>;
|
|
21
|
+
} & NativePlugins;
|
|
22
|
+
export type NativeInstance = NativeBase<NativePlugins, NativeConstants, NativeErrors>;
|