fluekit 1.0.1 → 1.1.0
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/Align.d.ts +1 -1
- package/dist/Alignment.d.ts +38 -0
- package/dist/AnimatedContainer.d.ts +2 -2
- package/dist/AnimatedOpacity.d.ts +29 -21
- package/dist/Border.d.ts +35 -4
- package/dist/BorderRadius.d.ts +37 -5
- package/dist/BoxConstraints.d.ts +24 -2
- package/dist/BoxDecoration.d.ts +29 -32
- package/dist/BoxShadow.d.ts +28 -0
- package/dist/Container.d.ts +5 -5
- package/dist/EdgeInsets.d.ts +36 -9
- package/dist/Expanded.d.ts +2 -2
- package/dist/Fixed.d.ts +1 -1
- package/dist/FlexBox.d.ts +1 -1
- package/dist/FlexItem.d.ts +3 -3
- package/dist/FlexProps.d.ts +2 -81
- package/dist/Gradient.d.ts +26 -0
- package/dist/GridView.d.ts +4 -4
- package/dist/IgnorePointer.d.ts +3 -1
- package/dist/ListView.d.ts +1 -1
- package/dist/Opacity.d.ts +19 -19
- package/dist/Size.d.ts +10 -3
- package/dist/SizedBox.d.ts +2 -2
- package/dist/Stack.d.ts +6 -4
- package/dist/Sticky.d.ts +1 -1
- package/dist/StyleProvider.d.ts +26 -0
- package/dist/TextStyle.d.ts +14 -6
- package/dist/Wrap.d.ts +4 -4
- package/dist/__tests__/IgnorePointerGesture.spec.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +480 -296
- package/dist/useGesture.d.ts +2 -0
- package/dist/usePosition.d.ts +7 -7
- package/dist/utils.d.ts +11 -0
- package/package.json +1 -1
- package/dist/useOpacity.d.ts +0 -4
package/dist/Align.d.ts
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Alignment Geometry
|
|
4
|
+
* 对应 Flutter 的 Alignment 常量
|
|
5
|
+
*/
|
|
6
|
+
export declare const Alignment: {
|
|
7
|
+
readonly topLeft: "topLeft";
|
|
8
|
+
readonly topCenter: "topCenter";
|
|
9
|
+
readonly topRight: "topRight";
|
|
10
|
+
readonly centerLeft: "centerLeft";
|
|
11
|
+
readonly center: "center";
|
|
12
|
+
readonly centerRight: "centerRight";
|
|
13
|
+
readonly bottomLeft: "bottomLeft";
|
|
14
|
+
readonly bottomCenter: "bottomCenter";
|
|
15
|
+
readonly bottomRight: "bottomRight";
|
|
16
|
+
};
|
|
17
|
+
export type Alignment = keyof typeof Alignment | string;
|
|
18
|
+
/**
|
|
19
|
+
* 将 Alignment 转换为 Flexbox 样式
|
|
20
|
+
* @param alignment
|
|
21
|
+
* @param direction "row" (default) or "column"
|
|
22
|
+
*/
|
|
23
|
+
export declare function alignmentToFlex(alignment: Alignment, direction?: "row" | "column"): CSSProperties;
|
|
24
|
+
export declare const alignmentToStyle: typeof alignmentToFlex;
|
|
25
|
+
/**
|
|
26
|
+
* 将 Alignment 转换为 CSS background-position / object-position 字符串
|
|
27
|
+
* e.g. "left top", "center", "right bottom"
|
|
28
|
+
*/
|
|
29
|
+
export declare function alignmentToCssPosition(alignment: Alignment): string;
|
|
30
|
+
/**
|
|
31
|
+
* 将 Alignment 转换为 CSS transform-origin
|
|
32
|
+
*/
|
|
33
|
+
export declare function alignmentToOrigin(alignment: Alignment): string;
|
|
34
|
+
/**
|
|
35
|
+
* 将 Alignment 转换为 Grid Alignment (justify-items / align-items)
|
|
36
|
+
* 用于 Stack
|
|
37
|
+
*/
|
|
38
|
+
export declare function alignmentToGrid(alignment: Alignment): CSSProperties;
|
|
@@ -3,8 +3,8 @@ import { BoxDecoration } from './BoxDecoration';
|
|
|
3
3
|
import { EdgeInsets } from './EdgeInsets';
|
|
4
4
|
import { Alignment } from './FlexProps';
|
|
5
5
|
interface Props {
|
|
6
|
-
width?: number
|
|
7
|
-
height?: number
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
8
|
padding?: EdgeInsets;
|
|
9
9
|
margin?: EdgeInsets;
|
|
10
10
|
decoration?: BoxDecoration;
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
opacity:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare function __VLS_template(): {
|
|
7
|
-
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
default?(_: {}): any;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
opacity: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
required: true;
|
|
10
5
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
duration: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
curve: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
opacity: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
duration: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
curve: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
16
30
|
duration: number;
|
|
17
31
|
curve: string;
|
|
18
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions,
|
|
19
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
33
|
export default _default;
|
|
21
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
-
new (): {
|
|
23
|
-
$slots: S;
|
|
24
|
-
};
|
|
25
|
-
};
|
package/dist/Border.d.ts
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
2
|
export type BorderStyleType = "none" | "solid" | "dashed" | "dotted" | "double";
|
|
3
|
+
declare const BORDER_SIDE_SYMBOL: unique symbol;
|
|
4
|
+
declare const BORDERS_SYMBOL: unique symbol;
|
|
3
5
|
export type BorderSide = {
|
|
4
|
-
width?: number
|
|
6
|
+
width?: number;
|
|
5
7
|
color?: string;
|
|
6
8
|
style?: BorderStyleType;
|
|
9
|
+
[BORDER_SIDE_SYMBOL]?: true;
|
|
7
10
|
};
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export interface Borders {
|
|
12
|
+
left?: BorderSide;
|
|
13
|
+
top?: BorderSide;
|
|
14
|
+
right?: BorderSide;
|
|
15
|
+
bottom?: BorderSide;
|
|
16
|
+
[BORDERS_SYMBOL]?: true;
|
|
17
|
+
}
|
|
18
|
+
export declare function Border(side: Omit<BorderSide, typeof BORDER_SIDE_SYMBOL>): BorderSide;
|
|
19
|
+
export declare namespace Border {
|
|
20
|
+
var all: ({ color, width, style, }?: {
|
|
21
|
+
color?: string;
|
|
22
|
+
width?: number;
|
|
23
|
+
style?: BorderStyleType;
|
|
24
|
+
}) => {
|
|
25
|
+
top: BorderSide;
|
|
26
|
+
bottom: BorderSide;
|
|
27
|
+
left: BorderSide;
|
|
28
|
+
right: BorderSide;
|
|
29
|
+
[BORDERS_SYMBOL]: true;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 类型守卫:检查对象是否通过 Border 构造函数创建(单个边框边)
|
|
34
|
+
*/
|
|
35
|
+
export declare function isBorderSide(value: any): value is BorderSide;
|
|
36
|
+
/**
|
|
37
|
+
* 类型守卫:检查对象是否通过 Border.all 创建(完整边框)
|
|
38
|
+
*/
|
|
39
|
+
export declare function isBorders(value: any): value is Borders;
|
|
40
|
+
export interface Borders {
|
|
11
41
|
left?: BorderSide;
|
|
12
42
|
top?: BorderSide;
|
|
13
43
|
right?: BorderSide;
|
|
14
44
|
bottom?: BorderSide;
|
|
15
45
|
}
|
|
16
46
|
export declare function borderToStyle(border: Borders): CSSProperties;
|
|
47
|
+
export {};
|
package/dist/BorderRadius.d.ts
CHANGED
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
-
export type BorderRadiusValue = number
|
|
3
|
-
export
|
|
2
|
+
export type BorderRadiusValue = number;
|
|
3
|
+
export interface BorderRadiusProps {
|
|
4
4
|
topLeft?: BorderRadiusValue;
|
|
5
5
|
bottom?: BorderRadiusValue;
|
|
6
6
|
topRight?: BorderRadiusValue;
|
|
7
7
|
bottomLeft?: BorderRadiusValue;
|
|
8
8
|
bottomRight?: BorderRadiusValue;
|
|
9
|
-
|
|
9
|
+
}
|
|
10
|
+
declare const BORDER_RADIUS_SYMBOL: unique symbol;
|
|
11
|
+
export type BorderRadius = BorderRadiusProps & {
|
|
12
|
+
[BORDER_RADIUS_SYMBOL]?: true;
|
|
10
13
|
};
|
|
11
|
-
export
|
|
12
|
-
export declare function
|
|
14
|
+
export type BorderRadiusType = BorderRadius;
|
|
15
|
+
export declare function BorderRadius(borderRadius: BorderRadiusProps): BorderRadius;
|
|
16
|
+
export declare namespace BorderRadius {
|
|
17
|
+
var all: (radius: BorderRadiusValue) => {
|
|
18
|
+
topLeft: number;
|
|
19
|
+
topRight: number;
|
|
20
|
+
bottomLeft: number;
|
|
21
|
+
bottomRight: number;
|
|
22
|
+
[BORDER_RADIUS_SYMBOL]: true;
|
|
23
|
+
};
|
|
24
|
+
var circular: (radius: BorderRadiusValue) => {
|
|
25
|
+
topLeft: number;
|
|
26
|
+
topRight: number;
|
|
27
|
+
bottomLeft: number;
|
|
28
|
+
bottomRight: number;
|
|
29
|
+
[BORDER_RADIUS_SYMBOL]: true;
|
|
30
|
+
};
|
|
31
|
+
var only: ({ topLeft, topRight, bottomLeft, bottomRight, }: {
|
|
32
|
+
topLeft?: BorderRadiusValue;
|
|
33
|
+
topRight?: BorderRadiusValue;
|
|
34
|
+
bottomLeft?: BorderRadiusValue;
|
|
35
|
+
bottomRight?: BorderRadiusValue;
|
|
36
|
+
}) => BorderRadius;
|
|
37
|
+
var zero: BorderRadius;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 类型守卫:检查对象是否通过 BorderRadius 构造函数创建
|
|
41
|
+
*/
|
|
42
|
+
export declare function isBorderRadius(value: any): value is BorderRadius;
|
|
43
|
+
export declare function borderRadiusToStyle(props?: BorderRadiusProps): CSSProperties;
|
|
44
|
+
export {};
|
package/dist/BoxConstraints.d.ts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
declare const BOX_CONSTRAINTS_SYMBOL: unique symbol;
|
|
2
3
|
export interface BoxConstraintsProps {
|
|
3
4
|
minWidth?: number;
|
|
4
5
|
maxWidth?: number;
|
|
5
6
|
minHeight?: number;
|
|
6
7
|
maxHeight?: number;
|
|
7
8
|
}
|
|
8
|
-
export type BoxConstraints = BoxConstraintsProps
|
|
9
|
-
|
|
9
|
+
export type BoxConstraints = BoxConstraintsProps & {
|
|
10
|
+
[BOX_CONSTRAINTS_SYMBOL]?: true;
|
|
11
|
+
};
|
|
12
|
+
export declare function BoxConstraints(props?: BoxConstraintsProps): BoxConstraints;
|
|
13
|
+
export declare namespace BoxConstraints {
|
|
14
|
+
var tight: (size: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}) => BoxConstraints;
|
|
18
|
+
var loose: (size: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}) => BoxConstraints;
|
|
22
|
+
var expand: ({ width, height, }?: {
|
|
23
|
+
width?: number;
|
|
24
|
+
height?: number;
|
|
25
|
+
}) => BoxConstraints;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 类型守卫:检查对象是否通过 BoxConstraints 创建
|
|
29
|
+
*/
|
|
30
|
+
export declare function isBoxConstraints(value: any): value is BoxConstraints;
|
|
10
31
|
export declare function boxConstraintsToStyle(constraints?: BoxConstraintsProps): CSSProperties;
|
|
32
|
+
export {};
|
package/dist/BoxDecoration.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { BorderRadiusType } from './BorderRadius';
|
|
2
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
import { Alignment } from './Alignment';
|
|
3
3
|
import { Borders } from './Border';
|
|
4
|
+
import { BorderRadius } from './BorderRadius';
|
|
5
|
+
import { BoxShadowProps } from './BoxShadow';
|
|
6
|
+
export * from './Gradient';
|
|
4
7
|
type Valueof<T> = T[keyof T];
|
|
5
8
|
export type BoxFit = Valueof<typeof BoxFit>;
|
|
6
9
|
export declare const BoxFit: {
|
|
@@ -13,25 +16,23 @@ export declare const BoxFit: {
|
|
|
13
16
|
readonly scaleDown: "scaleDown";
|
|
14
17
|
};
|
|
15
18
|
export type ImageRepeat = "repeat" | "repeat-x" | "repeat-y" | "no-repeat";
|
|
16
|
-
export type BorderRadiusValue = number | string;
|
|
17
|
-
export type BorderRadius = BorderRadiusType;
|
|
18
19
|
export type Overflow = "none" | "visible" | "hidden" | "scroll" | "auto";
|
|
19
|
-
export type BoxAlignment =
|
|
20
|
+
export type BoxAlignment = Alignment;
|
|
20
21
|
export declare const BoxAlignment: {
|
|
22
|
+
readonly topLeft: "topLeft";
|
|
23
|
+
readonly topCenter: "topCenter";
|
|
24
|
+
readonly topRight: "topRight";
|
|
25
|
+
readonly centerLeft: "centerLeft";
|
|
21
26
|
readonly center: "center";
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly topLeft: "left top";
|
|
27
|
-
readonly topCenter: "center top";
|
|
28
|
-
readonly topRight: "right top";
|
|
29
|
-
readonly centerLeft: "left center";
|
|
30
|
-
readonly centerRight: "right center";
|
|
31
|
-
readonly bottomLeft: "left bottom";
|
|
32
|
-
readonly bottomCenter: "center bottom";
|
|
33
|
-
readonly bottomRight: "right bottom";
|
|
27
|
+
readonly centerRight: "centerRight";
|
|
28
|
+
readonly bottomLeft: "bottomLeft";
|
|
29
|
+
readonly bottomCenter: "bottomCenter";
|
|
30
|
+
readonly bottomRight: "bottomRight";
|
|
34
31
|
};
|
|
32
|
+
export declare enum BoxShape {
|
|
33
|
+
rectangle = "rectangle",
|
|
34
|
+
circle = "circle"
|
|
35
|
+
}
|
|
35
36
|
export declare function setBaseUrl(url: string): void;
|
|
36
37
|
export declare function normalizeSrc(src: string): string;
|
|
37
38
|
export type ImageProvider = string;
|
|
@@ -52,31 +53,28 @@ export declare function DecorationImage(props: DecorationImageProps): Decoration
|
|
|
52
53
|
/**
|
|
53
54
|
* BoxDecoration接口定义
|
|
54
55
|
*/
|
|
56
|
+
declare const BOX_DECORATION_SYMBOL: unique symbol;
|
|
55
57
|
export type BoxDecorationProps = {
|
|
56
58
|
color?: string;
|
|
57
59
|
border?: Borders;
|
|
58
60
|
borderRadius?: BorderRadius;
|
|
59
|
-
boxShadow?:
|
|
61
|
+
boxShadow?: BoxShadowProps | BoxShadowProps[];
|
|
60
62
|
gradient?: string;
|
|
61
63
|
image?: DecorationImageProps;
|
|
62
64
|
overflow?: Overflow;
|
|
63
|
-
opacity?: number
|
|
65
|
+
opacity?: number;
|
|
66
|
+
shape?: BoxShape;
|
|
67
|
+
};
|
|
68
|
+
export type BoxDecoration = BoxDecorationProps & {
|
|
69
|
+
[BOX_DECORATION_SYMBOL]?: true;
|
|
64
70
|
};
|
|
65
|
-
export type BoxDecoration = BoxDecorationProps;
|
|
66
|
-
export interface BoxShadow {
|
|
67
|
-
color?: string;
|
|
68
|
-
offset?: {
|
|
69
|
-
x: number;
|
|
70
|
-
y: number;
|
|
71
|
-
};
|
|
72
|
-
blurRadius?: number;
|
|
73
|
-
spreadRadius?: number;
|
|
74
|
-
inset?: boolean;
|
|
75
|
-
}
|
|
76
71
|
export declare function decorationImageToStyle(di: DecorationImageProps): CSSProperties;
|
|
77
72
|
export declare function boxDecorationToStyle(decoration?: BoxDecorationProps): CSSProperties;
|
|
78
|
-
export declare function BoxDecoration(props?: BoxDecorationProps):
|
|
79
|
-
|
|
73
|
+
export declare function BoxDecoration(props?: BoxDecorationProps): BoxDecoration;
|
|
74
|
+
/**
|
|
75
|
+
* 类型守卫:检查对象是否通过 BoxDecoration 构造函数创建
|
|
76
|
+
*/
|
|
77
|
+
export declare function isBoxDecoration(value: any): value is BoxDecoration;
|
|
80
78
|
/**
|
|
81
79
|
* Clip
|
|
82
80
|
* 对应 Flutter 的 Clip
|
|
@@ -88,4 +86,3 @@ export declare const Clip: {
|
|
|
88
86
|
readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
|
|
89
87
|
};
|
|
90
88
|
export type Clip = keyof typeof Clip;
|
|
91
|
-
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Offset {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare enum BlurStyle {
|
|
6
|
+
normal = "normal",
|
|
7
|
+
solid = "solid",
|
|
8
|
+
outer = "outer",
|
|
9
|
+
inner = "inner"
|
|
10
|
+
}
|
|
11
|
+
export interface BoxShadowProps {
|
|
12
|
+
color?: string;
|
|
13
|
+
offset?: Offset;
|
|
14
|
+
blurRadius?: number;
|
|
15
|
+
spreadRadius?: number;
|
|
16
|
+
blurStyle?: BlurStyle;
|
|
17
|
+
}
|
|
18
|
+
declare const BOX_SHADOW_SYMBOL: unique symbol;
|
|
19
|
+
export type BoxShadow = BoxShadowProps & {
|
|
20
|
+
[BOX_SHADOW_SYMBOL]?: true;
|
|
21
|
+
};
|
|
22
|
+
export declare function BoxShadow(props?: BoxShadowProps): BoxShadow;
|
|
23
|
+
/**
|
|
24
|
+
* 类型守卫:检查对象是否通过 BoxShadow 构造函数创建
|
|
25
|
+
*/
|
|
26
|
+
export declare function isBoxShadow(value: any): value is BoxShadow;
|
|
27
|
+
export declare function boxShadowToCSS(shadow: BoxShadowProps): string;
|
|
28
|
+
export {};
|
package/dist/Container.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { BoxConstraints } from './BoxConstraints';
|
|
2
|
+
import { Alignment } from './Alignment';
|
|
2
3
|
import { BoxDecoration } from './BoxDecoration';
|
|
3
4
|
import { EdgeInsets } from './EdgeInsets';
|
|
4
|
-
import { Alignment } from './FlexProps';
|
|
5
5
|
interface Props {
|
|
6
|
-
width?: number
|
|
7
|
-
height?: number
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
8
|
padding?: EdgeInsets;
|
|
9
9
|
margin?: EdgeInsets;
|
|
10
10
|
decoration?: BoxDecoration;
|
|
11
11
|
foregroundDecoration?: BoxDecoration;
|
|
12
12
|
color?: string;
|
|
13
|
-
alignment?: Alignment
|
|
13
|
+
alignment?: Alignment;
|
|
14
14
|
clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
|
|
15
15
|
transform?: string;
|
|
16
|
-
transformAlignment?: Alignment
|
|
16
|
+
transformAlignment?: Alignment;
|
|
17
17
|
constraints?: BoxConstraints;
|
|
18
18
|
}
|
|
19
19
|
declare function __VLS_template(): {
|
package/dist/EdgeInsets.d.ts
CHANGED
|
@@ -1,14 +1,40 @@
|
|
|
1
|
+
declare const EDGE_INSETS_SYMBOL: unique symbol;
|
|
1
2
|
export interface EdgeInsetsProps {
|
|
2
|
-
top?: number
|
|
3
|
-
right?: number
|
|
4
|
-
bottom?: number
|
|
5
|
-
left?: number
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
vertical?: number | string;
|
|
3
|
+
top?: number;
|
|
4
|
+
right?: number;
|
|
5
|
+
bottom?: number;
|
|
6
|
+
left?: number;
|
|
7
|
+
horizontal?: number;
|
|
8
|
+
vertical?: number;
|
|
9
9
|
}
|
|
10
|
-
export type EdgeInsets = EdgeInsetsProps
|
|
11
|
-
|
|
10
|
+
export type EdgeInsets = EdgeInsetsProps & {
|
|
11
|
+
[EDGE_INSETS_SYMBOL]?: true;
|
|
12
|
+
};
|
|
13
|
+
export declare function EdgeInsets(edgeInsets: EdgeInsetsProps): EdgeInsets;
|
|
14
|
+
export declare namespace EdgeInsets {
|
|
15
|
+
var all: (value: number) => {
|
|
16
|
+
top: number;
|
|
17
|
+
right: number;
|
|
18
|
+
bottom: number;
|
|
19
|
+
left: number;
|
|
20
|
+
[EDGE_INSETS_SYMBOL]: true;
|
|
21
|
+
};
|
|
22
|
+
var symmetric: ({ vertical, horizontal }: {
|
|
23
|
+
vertical?: number;
|
|
24
|
+
horizontal?: number;
|
|
25
|
+
}) => EdgeInsets;
|
|
26
|
+
var only: ({ top, right, bottom, left, }: {
|
|
27
|
+
top?: number;
|
|
28
|
+
right?: number;
|
|
29
|
+
bottom?: number;
|
|
30
|
+
left?: number;
|
|
31
|
+
}) => EdgeInsets;
|
|
32
|
+
var zero: EdgeInsets;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 类型守卫:检查对象是否通过 EdgeInsets 创建
|
|
36
|
+
*/
|
|
37
|
+
export declare function isEdgeInsets(value: any): value is EdgeInsets;
|
|
12
38
|
export declare function edgeInsetsToStyle(type: "margin" | "padding", edgeInsets: EdgeInsetsProps | undefined): {
|
|
13
39
|
[x: string]: string;
|
|
14
40
|
};
|
|
@@ -18,3 +44,4 @@ export declare const paddingToStyle: (value?: EdgeInsetsProps) => {
|
|
|
18
44
|
export declare const marginToStyle: (value?: EdgeInsetsProps) => {
|
|
19
45
|
[x: string]: string;
|
|
20
46
|
};
|
|
47
|
+
export {};
|
package/dist/Expanded.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
flex?: number;
|
|
3
3
|
alignSelf?: "auto" | "start" | "end" | "center" | "stretch" | "baseline";
|
|
4
|
-
minSize?: number
|
|
5
|
-
maxSize?: number
|
|
4
|
+
minSize?: number;
|
|
5
|
+
maxSize?: number;
|
|
6
6
|
}
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
8
|
attrs: Partial<{}>;
|
package/dist/Fixed.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
|
|
|
9
9
|
};
|
|
10
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
11
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
-
zIndex: number
|
|
12
|
+
zIndex: number;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
15
|
export default _default;
|
package/dist/FlexBox.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ declare const __VLS_component: import('vue').DefineComponent<FlexBoxProps, {}, {
|
|
|
12
12
|
wrap: boolean;
|
|
13
13
|
expanded: boolean;
|
|
14
14
|
direction: "row" | "column" | "row-reverse" | "column-reverse" | string;
|
|
15
|
+
gap: number;
|
|
15
16
|
mainAxisAlignment: MainAxisAlignment;
|
|
16
17
|
crossAxisAlignment: CrossAxisAlignment;
|
|
17
|
-
gap: number | string;
|
|
18
18
|
as: string;
|
|
19
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/dist/FlexItem.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ interface Props {
|
|
|
3
3
|
expanded?: boolean;
|
|
4
4
|
flexible?: boolean;
|
|
5
5
|
alignSelf?: "auto" | "start" | "end" | "center" | "stretch" | "baseline";
|
|
6
|
-
minSize?: number
|
|
7
|
-
maxSize?: number
|
|
6
|
+
minSize?: number;
|
|
7
|
+
maxSize?: number;
|
|
8
8
|
}
|
|
9
9
|
declare function __VLS_template(): {
|
|
10
10
|
attrs: Partial<{}>;
|
|
@@ -18,8 +18,8 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
18
18
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
19
|
flex: number;
|
|
20
20
|
expanded: boolean;
|
|
21
|
-
flexible: boolean;
|
|
22
21
|
alignSelf: "auto" | "start" | "end" | "center" | "stretch" | "baseline";
|
|
22
|
+
flexible: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
25
|
export default _default;
|
package/dist/FlexProps.d.ts
CHANGED
|
@@ -1,83 +1,5 @@
|
|
|
1
1
|
import { BoxConstraintsProps } from './BoxConstraints';
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* FlexAlignment 定义
|
|
5
|
-
* 对应 Flutter 的 Alignment 常量
|
|
6
|
-
* 用于 Container 等组件的 alignment 属性
|
|
7
|
-
*/
|
|
8
|
-
export declare const Alignment: {
|
|
9
|
-
readonly center: {
|
|
10
|
-
readonly justifyContent: "center";
|
|
11
|
-
readonly alignItems: "center";
|
|
12
|
-
};
|
|
13
|
-
readonly topLeft: {
|
|
14
|
-
readonly justifyContent: "flex-start";
|
|
15
|
-
readonly alignItems: "flex-start";
|
|
16
|
-
};
|
|
17
|
-
readonly topCenter: {
|
|
18
|
-
readonly justifyContent: "center";
|
|
19
|
-
readonly alignItems: "flex-start";
|
|
20
|
-
};
|
|
21
|
-
readonly topRight: {
|
|
22
|
-
readonly justifyContent: "flex-end";
|
|
23
|
-
readonly alignItems: "flex-start";
|
|
24
|
-
};
|
|
25
|
-
readonly centerLeft: {
|
|
26
|
-
readonly justifyContent: "flex-start";
|
|
27
|
-
readonly alignItems: "center";
|
|
28
|
-
};
|
|
29
|
-
readonly centerRight: {
|
|
30
|
-
readonly justifyContent: "flex-end";
|
|
31
|
-
readonly alignItems: "center";
|
|
32
|
-
};
|
|
33
|
-
readonly bottomLeft: {
|
|
34
|
-
readonly justifyContent: "flex-start";
|
|
35
|
-
readonly alignItems: "flex-end";
|
|
36
|
-
};
|
|
37
|
-
readonly bottomCenter: {
|
|
38
|
-
readonly justifyContent: "center";
|
|
39
|
-
readonly alignItems: "flex-end";
|
|
40
|
-
};
|
|
41
|
-
readonly bottomRight: {
|
|
42
|
-
readonly justifyContent: "flex-end";
|
|
43
|
-
readonly alignItems: "flex-end";
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export declare function alignmentToStyle(alignment: Alignment, direction?: "row" | "column"): {
|
|
47
|
-
readonly justifyContent: "center";
|
|
48
|
-
readonly alignItems: "center";
|
|
49
|
-
} | {
|
|
50
|
-
readonly justifyContent: "flex-start";
|
|
51
|
-
readonly alignItems: "flex-start";
|
|
52
|
-
} | {
|
|
53
|
-
readonly justifyContent: "center";
|
|
54
|
-
readonly alignItems: "flex-start";
|
|
55
|
-
} | {
|
|
56
|
-
readonly justifyContent: "flex-end";
|
|
57
|
-
readonly alignItems: "flex-start";
|
|
58
|
-
} | {
|
|
59
|
-
readonly justifyContent: "flex-start";
|
|
60
|
-
readonly alignItems: "center";
|
|
61
|
-
} | {
|
|
62
|
-
readonly justifyContent: "flex-end";
|
|
63
|
-
readonly alignItems: "center";
|
|
64
|
-
} | {
|
|
65
|
-
readonly justifyContent: "flex-start";
|
|
66
|
-
readonly alignItems: "flex-end";
|
|
67
|
-
} | {
|
|
68
|
-
readonly justifyContent: "center";
|
|
69
|
-
readonly alignItems: "flex-end";
|
|
70
|
-
} | {
|
|
71
|
-
readonly justifyContent: "flex-end";
|
|
72
|
-
readonly alignItems: "flex-end";
|
|
73
|
-
} | {
|
|
74
|
-
justifyContent?: undefined;
|
|
75
|
-
alignItems?: undefined;
|
|
76
|
-
} | {
|
|
77
|
-
justifyContent: "center" | "flex-start" | "flex-end";
|
|
78
|
-
alignItems: "center" | "flex-start" | "flex-end";
|
|
79
|
-
};
|
|
80
|
-
export declare function alignmentToOrigin(alignment: Alignment): string | undefined;
|
|
2
|
+
export { Alignment, alignmentToStyle, alignmentToOrigin, alignmentToFlex } from './Alignment';
|
|
81
3
|
type Valueof<T> = T[keyof T];
|
|
82
4
|
/**
|
|
83
5
|
* CrossAxisAlignment
|
|
@@ -110,7 +32,7 @@ export type FlexBoxProps = {
|
|
|
110
32
|
mainAxisAlignment?: MainAxisAlignment;
|
|
111
33
|
crossAxisAlignment?: CrossAxisAlignment;
|
|
112
34
|
wrap?: boolean;
|
|
113
|
-
gap?: number
|
|
35
|
+
gap?: number;
|
|
114
36
|
expanded?: boolean;
|
|
115
37
|
as?: string;
|
|
116
38
|
constraints?: BoxConstraintsProps;
|
|
@@ -128,4 +50,3 @@ export declare const StackFit: {
|
|
|
128
50
|
readonly passthrough: "passthrough";
|
|
129
51
|
};
|
|
130
52
|
export type StackFit = Valueof<typeof StackFit>;
|
|
131
|
-
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Alignment } from './Alignment';
|
|
2
|
+
export declare enum TileMode {
|
|
3
|
+
clamp = "clamp",
|
|
4
|
+
repeated = "repeated",
|
|
5
|
+
mirror = "mirror",
|
|
6
|
+
decal = "decal"
|
|
7
|
+
}
|
|
8
|
+
export interface GradientTransform {
|
|
9
|
+
transform?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GradientProps {
|
|
12
|
+
colors: string[];
|
|
13
|
+
stops?: number[];
|
|
14
|
+
transform?: GradientTransform;
|
|
15
|
+
tileMode?: TileMode;
|
|
16
|
+
}
|
|
17
|
+
export interface LinearGradientProps extends GradientProps {
|
|
18
|
+
begin?: Alignment;
|
|
19
|
+
end?: Alignment;
|
|
20
|
+
}
|
|
21
|
+
export interface RadialGradientProps extends GradientProps {
|
|
22
|
+
center?: Alignment;
|
|
23
|
+
radius?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function LinearGradient(props: LinearGradientProps): string;
|
|
26
|
+
export declare function RadialGradient(props: RadialGradientProps): string;
|
package/dist/GridView.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ interface Props {
|
|
|
6
6
|
shrinkWrap?: boolean;
|
|
7
7
|
clipBehavior?: "none" | "hardEdge" | "antiAlias";
|
|
8
8
|
crossAxisCount?: number;
|
|
9
|
-
mainAxisSpacing?: number
|
|
10
|
-
crossAxisSpacing?: number
|
|
9
|
+
mainAxisSpacing?: number;
|
|
10
|
+
crossAxisSpacing?: number;
|
|
11
11
|
childAspectRatio?: number;
|
|
12
12
|
itemCount?: number;
|
|
13
13
|
}
|
|
@@ -29,8 +29,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
29
29
|
physics: "bouncing" | "clamping" | "never" | "always";
|
|
30
30
|
shrinkWrap: boolean;
|
|
31
31
|
crossAxisCount: number;
|
|
32
|
-
mainAxisSpacing: number
|
|
33
|
-
crossAxisSpacing: number
|
|
32
|
+
mainAxisSpacing: number;
|
|
33
|
+
crossAxisSpacing: number;
|
|
34
34
|
childAspectRatio: number;
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|