native-fn 1.0.26 → 1.0.28
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 +18 -27
- 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 +86 -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/plugin/app/src/plugin/app/cores/app.d.ts +3 -0
- 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/appModule.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/plugin/app/src/plugin/platform/cores/platform.d.ts +3 -0
- 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/plugin/app/src/plugin/platform/types/platformModule.d.ts +13 -0
- package/dist/{src → plugin/app/src/plugin/theme}/constants/theme.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +3 -0
- 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/plugin/app/src/plugin/theme/types/themeModule.d.ts +24 -0
- 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 +51 -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/appModule.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/platform/types/platformModule.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/types/themeModule.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 +75 -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/appModule.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/platform/types/platformModule.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/types/themeModule.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/appModule.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/platform/types/platformModule.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/types/themeModule.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 +8 -5
- package/dist/src/cores/app.d.ts +0 -3
- package/dist/src/cores/platform.d.ts +0 -3
- package/dist/src/cores/theme.d.ts +0 -3
- 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,13 @@
|
|
|
1
|
+
import { Devices, Engines, OS } from '../../../constants/platform';
|
|
2
|
+
export declare interface PlatformModule {
|
|
3
|
+
os: OS;
|
|
4
|
+
device: Devices;
|
|
5
|
+
engine: Engines;
|
|
6
|
+
osVersion: string;
|
|
7
|
+
engineVersion: string;
|
|
8
|
+
renderer: string;
|
|
9
|
+
isWebview: boolean;
|
|
10
|
+
isStandalone: boolean;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
isDesktop: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ListenerEntry } from '../types/themeModule';
|
|
2
|
+
export declare enum Appearances {
|
|
3
|
+
Unknown = "unknown",
|
|
4
|
+
Light = "light",
|
|
5
|
+
Dark = "dark"
|
|
6
|
+
}
|
|
7
|
+
export declare const CHROME_VERSION: number;
|
|
8
|
+
export declare const MEDIA_QUERY_LIST: MediaQueryList;
|
|
9
|
+
export declare const SUPPORT_PREFERS_COLOR_SCHEME: boolean;
|
|
10
|
+
export declare const IS_FULL_SUPPORT_THEME_COLOR: boolean;
|
|
11
|
+
export declare const CONTEXT: CanvasRenderingContext2D | null;
|
|
12
|
+
export declare const SVG_PIXEL_DATA_URL: string;
|
|
13
|
+
export declare const IS_SAMSUNG: boolean;
|
|
14
|
+
export declare const IS_IE_MOBILE: boolean;
|
|
15
|
+
export declare const IS_WINDOWS_PHONE: boolean;
|
|
16
|
+
export declare const ENTRIES: ListenerEntry[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const EasingError: ErrorConstructor;
|
|
2
|
+
declare const CubicBezierSyntaxError: ErrorConstructor;
|
|
3
|
+
declare const LinearSyntaxError: ErrorConstructor;
|
|
4
|
+
declare const StepSyntaxError: ErrorConstructor;
|
|
5
|
+
declare const UnsupportedEasingFunctionError: ErrorConstructor;
|
|
6
|
+
export { EasingError, CubicBezierSyntaxError, LinearSyntaxError, StepSyntaxError, UnsupportedEasingFunctionError, };
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare interface CubicBezierParams {
|
|
2
|
+
x1: number;
|
|
3
|
+
y1: number;
|
|
4
|
+
x2: number;
|
|
5
|
+
y2: number;
|
|
6
|
+
}
|
|
7
|
+
export declare interface LinearPoint {
|
|
8
|
+
position: number;
|
|
9
|
+
value: number;
|
|
10
|
+
}
|
|
11
|
+
export declare type CubicBezierSyntax = `cubic-bezier(${string})`;
|
|
12
|
+
export declare type LinearSyntax = `linear(${string})`;
|
|
13
|
+
export declare type StepSyntax = `steps(${string})`;
|
|
14
|
+
export declare type EasingSyntax = CubicBezierSyntax | LinearSyntax | StepSyntax;
|
|
15
|
+
export declare type EasingFunction = (t: number) => number;
|
|
16
|
+
export declare type EasingKeyword = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Appearances } from '../constants/theme';
|
|
2
|
+
import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
|
|
3
|
+
import type { Color } from '../types/color';
|
|
4
|
+
export declare interface ListenerEntry {
|
|
5
|
+
fn: (appearance: Appearances) => any;
|
|
6
|
+
capture: boolean;
|
|
7
|
+
once: boolean;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}
|
|
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
|
+
export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
|
|
18
|
+
export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
|
|
19
|
+
export declare interface SetThemeColorOptions {
|
|
20
|
+
appearance?: ThemeColorMetaAppearanceKeys;
|
|
21
|
+
duration?: number;
|
|
22
|
+
easingFunction?: EasingSyntax | EasingKeyword;
|
|
23
|
+
defaultColor?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Appearances } from '../constants/theme';
|
|
2
|
+
import type { EasingKeyword, EasingSyntax } from '../types/easing-syntax';
|
|
3
|
+
import type { Color } from '../types/color';
|
|
4
|
+
export declare interface ListenerEntry {
|
|
5
|
+
fn: (appearance: Appearances) => any;
|
|
6
|
+
capture: boolean;
|
|
7
|
+
once: boolean;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}
|
|
10
|
+
export declare type ThemeColorMetaAppearanceKeys = 'default' | 'dark' | 'light';
|
|
11
|
+
export declare type ThemeColorMetaGroup = Partial<Record<ThemeColorMetaAppearanceKeys, HTMLMetaElement>>;
|
|
12
|
+
export declare interface SetThemeColorOptions {
|
|
13
|
+
appearance?: ThemeColorMetaAppearanceKeys;
|
|
14
|
+
duration?: number;
|
|
15
|
+
easingFunction?: EasingSyntax | EasingKeyword;
|
|
16
|
+
defaultColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare interface ThemeModule {
|
|
19
|
+
setThemeColor: (color: Color, options?: SetThemeColorOptions) => Promise<string | undefined>;
|
|
20
|
+
getThemeColor: () => Color | undefined;
|
|
21
|
+
removeThemeColor: (appearance?: ThemeColorMetaAppearanceKeys) => void;
|
|
22
|
+
detectAppearance: () => Promise<Appearances>;
|
|
23
|
+
onAppearanceChange: (listener: (appearance?: Appearances) => any, options?: boolean | AddEventListenerOptions) => () => void;
|
|
24
|
+
}
|
|
@@ -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,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "rollup -c"
|
|
6
|
+
"build": "rollup -c",
|
|
7
|
+
"publish": "npm publish"
|
|
7
8
|
},
|
|
8
9
|
"author": "pjy",
|
|
9
10
|
"license": "MIT",
|
|
@@ -37,9 +38,11 @@
|
|
|
37
38
|
"theme-color"
|
|
38
39
|
],
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"rollup": "^4.45.1",
|
|
41
41
|
"@rollup/plugin-json": "^6.1.0",
|
|
42
|
-
"@rollup/plugin-
|
|
43
|
-
"typescript": "^
|
|
42
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
43
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
44
|
+
"rollup": "^4.52.5",
|
|
45
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
46
|
+
"typescript": "^5.9.3"
|
|
44
47
|
}
|
|
45
48
|
}
|
package/dist/src/cores/app.d.ts
DELETED
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
|