@viewfly/platform-browser 1.0.0-alpha.15 → 1.0.0-alpha.16
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/bundles/index.d.ts +11 -11
- package/package.json +3 -3
package/bundles/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeNode,
|
|
1
|
+
import { NativeNode, ViewFlyNode, Application, Config, NativeRenderer, JSX, ClassNames } from '@viewfly/core';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -15,8 +15,8 @@ import * as CSS from 'csstype';
|
|
|
15
15
|
* app.render() // 手动更新视图
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
declare function createApp<T extends NativeNode>(root:
|
|
19
|
-
declare function createApp<T extends NativeNode>(root:
|
|
18
|
+
declare function createApp<T extends NativeNode>(root: ViewFlyNode, autoUpdate?: boolean): Application<T>;
|
|
19
|
+
declare function createApp<T extends NativeNode>(root: ViewFlyNode, config?: Partial<Omit<Config, 'root'>>): Application<T>;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* 用于创建脱离当前 DOM 树的子节点,常用于弹窗等
|
|
@@ -47,9 +47,9 @@ declare function createApp<T extends NativeNode>(root: JSXNode, config?: Partial
|
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
declare function createPortal<T extends NativeNode>(childRender: () =>
|
|
50
|
+
declare function createPortal<T extends NativeNode>(childRender: () => ViewFlyNode, host: T): {
|
|
51
51
|
$portalHost: T;
|
|
52
|
-
$render: () =>
|
|
52
|
+
$render: () => ViewFlyNode;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
declare class VDOMNode {
|
|
@@ -336,9 +336,9 @@ interface AriaAttributes {
|
|
|
336
336
|
'aria-valuetext'?: string;
|
|
337
337
|
}
|
|
338
338
|
type StyleValue = string | CSSProperties | null;
|
|
339
|
-
interface HTMLAttributes<T> extends AriaAttributes, EventHandlers<Events>,
|
|
339
|
+
interface HTMLAttributes<T> extends AriaAttributes, EventHandlers<Events>, JSX.RefAttributes<T> {
|
|
340
340
|
innerHTML?: string;
|
|
341
|
-
class?:
|
|
341
|
+
class?: ClassNames;
|
|
342
342
|
style?: StyleValue;
|
|
343
343
|
accesskey?: string;
|
|
344
344
|
contenteditable?: Booleanish | 'inherit';
|
|
@@ -756,13 +756,13 @@ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
756
756
|
useragent?: string;
|
|
757
757
|
webpreferences?: string;
|
|
758
758
|
}
|
|
759
|
-
interface SVGAttributes<T> extends AriaAttributes, EventHandlers<Events>,
|
|
759
|
+
interface SVGAttributes<T> extends AriaAttributes, EventHandlers<Events>, JSX.RefAttributes<T> {
|
|
760
760
|
innerHTML?: string;
|
|
761
761
|
/**
|
|
762
762
|
* SVG Styling Attributes
|
|
763
763
|
* @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling
|
|
764
764
|
*/
|
|
765
|
-
class?:
|
|
765
|
+
class?: ClassNames;
|
|
766
766
|
style?: string | CSSProperties;
|
|
767
767
|
color?: string;
|
|
768
768
|
height?: Numberish;
|
|
@@ -1278,8 +1278,8 @@ interface Events {
|
|
|
1278
1278
|
type EventHandlers<E> = {
|
|
1279
1279
|
[K in keyof E]?: E[K] extends (...args: any) => any ? E[K] : (payload: E[K]) => void;
|
|
1280
1280
|
};
|
|
1281
|
-
declare
|
|
1282
|
-
namespace
|
|
1281
|
+
declare module '@viewfly/core' {
|
|
1282
|
+
namespace JSX {
|
|
1283
1283
|
interface IntrinsicElements extends NativeElements {
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/platform-browser",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.16",
|
|
4
4
|
"description": "This project is used to enable the Viewfly framework to run in a browser.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"keywords": [],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@viewfly/core": "^1.0.0-alpha.
|
|
17
|
+
"@viewfly/core": "^1.0.0-alpha.16",
|
|
18
18
|
"csstype": "^3.1.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "d2c8ce1c906fd80e05e27d677e7f678ccae0e9a1"
|
|
40
40
|
}
|