native-fn 1.0.26 → 1.0.27
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/README.md +22 -192
- package/dist/index.d.ts +4 -28
- package/dist/native.cjs +27 -1400
- package/dist/native.min.cjs +1 -0
- package/dist/native.min.mjs +1 -0
- package/dist/native.mjs +27 -1400
- package/dist/native.umd.js +27 -1400
- package/dist/native.umd.min.js +1 -0
- package/dist/plugin/app/index.cjs +1025 -0
- package/dist/plugin/app/index.d.ts +4 -0
- package/dist/plugin/app/index.min.cjs +1 -0
- package/dist/plugin/app/index.min.mjs +1 -0
- package/dist/plugin/app/index.mjs +1023 -0
- package/dist/plugin/app/index.umd.js +1031 -0
- package/dist/plugin/app/index.umd.min.js +1 -0
- package/dist/plugin/app/src/constants/platform.d.ts +35 -0
- package/dist/plugin/app/src/constants/user-agent.d.ts +1 -0
- package/dist/{src → plugin/app/src/plugin/app}/cores/app.d.ts +1 -1
- package/dist/plugin/app/src/plugin/app/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +54 -0
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +1 -0
- package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +3 -0
- package/dist/{src → plugin/app/src/plugin/platform}/cores/platform.d.ts +1 -1
- package/dist/plugin/app/src/plugin/platform/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +1 -0
- package/dist/{src → plugin/app/src/plugin/platform}/types/platform.d.ts +1 -1
- package/dist/{src → plugin/app/src/plugin/theme}/constants/theme.d.ts +1 -1
- package/dist/{src → plugin/app/src/plugin/theme}/cores/theme.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/{src → plugin/app/src/plugin/theme}/types/easing-syntax.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +3 -0
- package/dist/{src → plugin/app/src/plugin/theme}/types/theme.d.ts +4 -4
- package/dist/{src → plugin/app/src/plugin/theme}/utils/parse-color.d.ts +1 -1
- package/dist/{src → plugin/app/src/plugin/theme}/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/app/src/types/index.d.ts +1 -0
- package/dist/plugin/app/src/types/native.d.ts +14 -0
- package/dist/plugin/app/src/utils/assign.d.ts +1 -0
- package/dist/plugin/app/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/platform/index.cjs +171 -0
- package/dist/plugin/platform/index.d.ts +4 -0
- package/dist/plugin/platform/index.min.cjs +1 -0
- package/dist/plugin/platform/index.min.mjs +1 -0
- package/dist/plugin/platform/index.mjs +169 -0
- package/dist/plugin/platform/index.umd.js +177 -0
- package/dist/plugin/platform/index.umd.min.js +1 -0
- package/dist/plugin/platform/src/constants/platform.d.ts +35 -0
- package/dist/plugin/platform/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/app/constants/app.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/app/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +54 -0
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +16 -0
- package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/platform/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/platform/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +24 -0
- package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/platform/src/types/index.d.ts +1 -0
- package/dist/plugin/platform/src/types/native.d.ts +14 -0
- package/dist/plugin/platform/src/utils/assign.d.ts +1 -0
- package/dist/plugin/platform/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/theme/index.cjs +810 -0
- package/dist/plugin/theme/index.d.ts +4 -0
- package/dist/plugin/theme/index.min.cjs +1 -0
- package/dist/plugin/theme/index.min.mjs +1 -0
- package/dist/plugin/theme/index.mjs +808 -0
- package/dist/plugin/theme/index.umd.js +816 -0
- package/dist/plugin/theme/index.umd.min.js +1 -0
- package/dist/plugin/theme/src/constants/platform.d.ts +35 -0
- package/dist/plugin/theme/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/app/constants/app.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/app/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +54 -0
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +16 -0
- package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/theme/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/theme/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +24 -0
- package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/theme/src/types/index.d.ts +1 -0
- package/dist/plugin/theme/src/types/native.d.ts +14 -0
- package/dist/plugin/theme/src/utils/assign.d.ts +1 -0
- package/dist/plugin/theme/src/utils/create-custom-error.d.ts +1 -0
- package/dist/src/plugin/app/constants/app.d.ts +13 -0
- package/dist/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/src/plugin/app/index.d.ts +5 -0
- package/dist/src/plugin/app/types/app.d.ts +54 -0
- package/dist/src/plugin/app/types/index.d.ts +1 -0
- package/dist/src/plugin/app/utils/event-listener-utils.d.ts +3 -0
- package/dist/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/src/plugin/platform/index.d.ts +5 -0
- package/dist/src/plugin/platform/types/index.d.ts +1 -0
- package/dist/src/plugin/platform/types/platform.d.ts +13 -0
- package/dist/src/plugin/theme/constants/theme.d.ts +16 -0
- package/dist/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/src/plugin/theme/index.d.ts +5 -0
- package/dist/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/src/plugin/theme/types/index.d.ts +3 -0
- package/dist/src/plugin/theme/types/theme.d.ts +24 -0
- package/dist/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/src/types/index.d.ts +1 -5
- package/dist/src/types/native.d.ts +14 -0
- package/dist/src/utils/assign.d.ts +1 -0
- package/package.json +3 -2
- package/dist/src/types/app.d.ts +0 -44
- package/dist/src/types/color.d.ts +0 -17
- package/dist/src/utils/freeze-deep.d.ts +0 -1
- /package/dist/{src → plugin/app/src/plugin/app}/constants/app.d.ts +0 -0
- /package/dist/{src → plugin/app/src/plugin/app}/errors/url-open-error.d.ts +0 -0
- /package/dist/{src → plugin/app/src/plugin/app}/utils/try-open-url.d.ts +0 -0
- /package/dist/{src → plugin/app/src/plugin/theme}/errors/easing-error.d.ts +0 -0
- /package/dist/{src → plugin/app/src/plugin/theme}/errors/unsupported-color-error.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare interface NativePlugin<T> {
|
|
2
|
+
installed: boolean;
|
|
3
|
+
name: string;
|
|
4
|
+
module: T;
|
|
5
|
+
constants: Record<string, any>;
|
|
6
|
+
errors: Record<string, ErrorConstructor>;
|
|
7
|
+
}
|
|
8
|
+
export declare interface NativeBase {
|
|
9
|
+
Version: string;
|
|
10
|
+
Constants: Record<string, any>;
|
|
11
|
+
Errors: Record<string, ErrorConstructor>;
|
|
12
|
+
extends: <T>(plugin: NativePlugin<T>) => Native;
|
|
13
|
+
}
|
|
14
|
+
export declare type Native = NativeBase & Record<Exclude<string, keyof NativeBase>, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function assign(...args: any[]): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rollup -c"
|
|
@@ -37,9 +37,10 @@
|
|
|
37
37
|
"theme-color"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"rollup": "^4.45.1",
|
|
41
40
|
"@rollup/plugin-json": "^6.1.0",
|
|
41
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
42
42
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
43
|
+
"rollup": "^4.45.1",
|
|
43
44
|
"typescript": "^5.4.5"
|
|
44
45
|
}
|
|
45
46
|
}
|
package/dist/src/types/app.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { OS } from "../constants/platform";
|
|
2
|
-
import { AppOpenState, Messengers } from "../constants/app";
|
|
3
|
-
export declare interface AppInfo {
|
|
4
|
-
scheme?: string;
|
|
5
|
-
fallback?: string;
|
|
6
|
-
timeout?: number;
|
|
7
|
-
allowWebStore?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare interface AndroidAppInfo extends AppInfo {
|
|
10
|
-
packageName?: string;
|
|
11
|
-
intent?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare interface IOSAppInfo extends AppInfo {
|
|
14
|
-
packageName?: string;
|
|
15
|
-
trackId?: string;
|
|
16
|
-
universal?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare interface WindowsAppInfo extends AppInfo {
|
|
19
|
-
productId?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare interface MacOSAppInfo extends AppInfo {
|
|
22
|
-
packageName?: string;
|
|
23
|
-
trackId?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare interface AppOpenOptions {
|
|
26
|
-
[OS.Android]?: AndroidAppInfo;
|
|
27
|
-
[OS.iOS]?: IOSAppInfo;
|
|
28
|
-
[OS.Windows]?: WindowsAppInfo;
|
|
29
|
-
[OS.MacOS]?: MacOSAppInfo;
|
|
30
|
-
}
|
|
31
|
-
export declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
|
|
32
|
-
export declare type StringifiableList = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
|
|
33
|
-
export declare type MessengerOpenOptions = {
|
|
34
|
-
to?: Stringifiable | StringifiableList;
|
|
35
|
-
cc?: Stringifiable | StringifiableList;
|
|
36
|
-
bcc?: Stringifiable | StringifiableList;
|
|
37
|
-
subject?: Stringifiable;
|
|
38
|
-
body?: Stringifiable;
|
|
39
|
-
} | HTMLFormElement | FormData;
|
|
40
|
-
export declare type Messenger = Record<Messengers, (options: MessengerOpenOptions, self?: WindowProxy) => Promise<void>>;
|
|
41
|
-
export declare interface App {
|
|
42
|
-
open: (options: AppOpenOptions, target?: WindowProxy) => Promise<AppOpenState>;
|
|
43
|
-
messenger: Messenger;
|
|
44
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export 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";
|
|
2
|
-
export type DeprecatedSystemColor = "ActiveText" | "ButtonBorder" | "ButtonFace" | "ButtonText" | "Canvas" | "CanvasText" | "Field" | "FieldText" | "GrayText" | "Highlight" | "HighlightText" | "LinkText" | "Mark" | "MarkText" | "SelectedItem" | "SelectedItemText" | "VisitedText";
|
|
3
|
-
export type NamedColor = "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
|
|
4
|
-
export type RGBColor = `rgb(${string})`;
|
|
5
|
-
export type RGBAColor = `rgba(${string})`;
|
|
6
|
-
export type HSLColor = `hsl(${string})`;
|
|
7
|
-
export type HSLAColor = `hsla(${string})`;
|
|
8
|
-
export type HEXColor = `#${string}`;
|
|
9
|
-
export type Color = "currentColor" | "transparent" | SystemColor | DeprecatedSystemColor | NamedColor | RGBColor | RGBAColor | HSLColor | HSLAColor | HEXColor | string;
|
|
10
|
-
export declare interface RGB {
|
|
11
|
-
red: number;
|
|
12
|
-
green: number;
|
|
13
|
-
blue: number;
|
|
14
|
-
}
|
|
15
|
-
export declare interface RGBA extends RGB {
|
|
16
|
-
alpha: number;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function freezeDeep<T>(o: T): T;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|