native-fn 1.0.36 → 1.0.37
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 +7 -9
- 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 +5 -7
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/app/src/types/native.d.ts +5 -7
- package/dist/plugin/platform/index.d.ts +3 -5
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/types/native.d.ts +5 -7
- package/dist/plugin/theme/index.d.ts +4 -6
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/types/native.d.ts +5 -7
- package/dist/src/plugin/app/types/index.d.ts +2 -2
- package/dist/src/plugin/theme/types/index.d.ts +1 -1
- package/dist/src/types/native.d.ts +5 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,20 +4,18 @@ interface NativeConstants {
|
|
|
4
4
|
}
|
|
5
5
|
interface NativeErrors {
|
|
6
6
|
}
|
|
7
|
-
declare interface
|
|
8
|
-
}
|
|
9
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
9
|
name: string;
|
|
12
10
|
module: T;
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
11
|
+
Constants: C;
|
|
12
|
+
Errors: E;
|
|
15
13
|
}
|
|
16
|
-
declare interface NativeBase
|
|
14
|
+
declare interface NativeBase {
|
|
17
15
|
Version: string;
|
|
18
16
|
Constants: NativeConstants;
|
|
19
17
|
Errors: NativeErrors;
|
|
20
|
-
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
18
|
+
extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
|
|
21
19
|
}
|
|
22
20
|
type NativeInstance = NativeBase & NativePlugins;
|
|
23
21
|
|
|
@@ -25,8 +23,8 @@ declare const Native: {
|
|
|
25
23
|
Version: string;
|
|
26
24
|
Constants: {};
|
|
27
25
|
Errors: {};
|
|
28
|
-
extends<T>(plugin: NativePlugin<T>): NativeInstance;
|
|
26
|
+
extends<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>): NativeInstance;
|
|
29
27
|
};
|
|
30
28
|
|
|
31
29
|
export { Native as default };
|
|
32
|
-
export type {
|
|
30
|
+
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.37";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.37";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.37";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<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
3
|
name: string;
|
|
6
4
|
module: T;
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
5
|
+
Constants: C;
|
|
6
|
+
Errors: E;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare enum OS {
|
|
@@ -89,8 +87,8 @@ 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;
|
|
@@ -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;
|
|
@@ -4,19 +4,17 @@ export interface NativeConstants {
|
|
|
4
4
|
}
|
|
5
5
|
export interface NativeErrors {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
9
|
name: string;
|
|
12
10
|
module: T;
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
11
|
+
Constants: C;
|
|
12
|
+
Errors: E;
|
|
15
13
|
}
|
|
16
|
-
export declare interface NativeBase
|
|
14
|
+
export declare interface NativeBase {
|
|
17
15
|
Version: string;
|
|
18
16
|
Constants: NativeConstants;
|
|
19
17
|
Errors: NativeErrors;
|
|
20
|
-
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
18
|
+
extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
|
|
21
19
|
}
|
|
22
20
|
export type NativeInstance = NativeBase & NativePlugins;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare interface
|
|
2
|
-
}
|
|
3
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
1
|
+
declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
3
|
name: string;
|
|
6
4
|
module: T;
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
5
|
+
Constants: C;
|
|
6
|
+
Errors: E;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
declare enum OS {
|
|
@@ -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;
|
|
@@ -4,19 +4,17 @@ export interface NativeConstants {
|
|
|
4
4
|
}
|
|
5
5
|
export interface NativeErrors {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
9
|
name: string;
|
|
12
10
|
module: T;
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
11
|
+
Constants: C;
|
|
12
|
+
Errors: E;
|
|
15
13
|
}
|
|
16
|
-
export declare interface NativeBase
|
|
14
|
+
export declare interface NativeBase {
|
|
17
15
|
Version: string;
|
|
18
16
|
Constants: NativeConstants;
|
|
19
17
|
Errors: NativeErrors;
|
|
20
|
-
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
18
|
+
extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
|
|
21
19
|
}
|
|
22
20
|
export type NativeInstance = NativeBase & NativePlugins;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
declare interface
|
|
2
|
-
}
|
|
3
|
-
declare interface NativePlugin<T> extends ModuleBase {
|
|
1
|
+
declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
4
2
|
installed: boolean;
|
|
5
3
|
name: string;
|
|
6
4
|
module: T;
|
|
7
|
-
Constants:
|
|
8
|
-
Errors:
|
|
5
|
+
Constants: C;
|
|
6
|
+
Errors: E;
|
|
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;
|
|
@@ -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;
|
|
@@ -4,19 +4,17 @@ export interface NativeConstants {
|
|
|
4
4
|
}
|
|
5
5
|
export interface NativeErrors {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
9
|
name: string;
|
|
12
10
|
module: T;
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
11
|
+
Constants: C;
|
|
12
|
+
Errors: E;
|
|
15
13
|
}
|
|
16
|
-
export declare interface NativeBase
|
|
14
|
+
export declare interface NativeBase {
|
|
17
15
|
Version: string;
|
|
18
16
|
Constants: NativeConstants;
|
|
19
17
|
Errors: NativeErrors;
|
|
20
|
-
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
18
|
+
extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
|
|
21
19
|
}
|
|
22
20
|
export type NativeInstance = NativeBase & NativePlugins;
|
|
@@ -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;
|
|
@@ -4,19 +4,17 @@ export interface NativeConstants {
|
|
|
4
4
|
}
|
|
5
5
|
export interface NativeErrors {
|
|
6
6
|
}
|
|
7
|
-
export declare interface
|
|
8
|
-
}
|
|
9
|
-
export declare interface NativePlugin<T> extends ModuleBase {
|
|
7
|
+
export declare interface NativePlugin<T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>> {
|
|
10
8
|
installed: boolean;
|
|
11
9
|
name: string;
|
|
12
10
|
module: T;
|
|
13
|
-
Constants:
|
|
14
|
-
Errors:
|
|
11
|
+
Constants: C;
|
|
12
|
+
Errors: E;
|
|
15
13
|
}
|
|
16
|
-
export declare interface NativeBase
|
|
14
|
+
export declare interface NativeBase {
|
|
17
15
|
Version: string;
|
|
18
16
|
Constants: NativeConstants;
|
|
19
17
|
Errors: NativeErrors;
|
|
20
|
-
extends: <T>(plugin: NativePlugin<T>) => NativeInstance;
|
|
18
|
+
extends: <T, C extends Record<string, any> = Record<string, any>, E extends Record<string, ErrorConstructor> = Record<string, ErrorConstructor>>(plugin: NativePlugin<T, C, E>) => NativeInstance;
|
|
21
19
|
}
|
|
22
20
|
export type NativeInstance = NativeBase & NativePlugins;
|