fluekit 2.0.2 → 2.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/README.md +24 -9
- package/dist/ActionChip.d.ts +31 -0
- package/dist/AlertDialog.d.ts +7 -0
- package/dist/AnimatedContainer.d.ts +2 -1
- package/dist/BackdropFilter.d.ts +23 -0
- package/dist/BoxDecoration.d.ts +4 -23
- package/dist/BoxFit.d.ts +12 -0
- package/dist/Button.d.ts +3 -3
- package/dist/Chip.d.ts +36 -0
- package/dist/ChoiceChip.d.ts +35 -0
- package/dist/CircleAvatar.d.ts +29 -0
- package/dist/CircularProgressIndicator.d.ts +1 -1
- package/dist/Clip.d.ts +11 -0
- package/dist/Colors.d.ts +1 -1
- package/dist/CupertinoActivityIndicator.d.ts +1 -1
- package/dist/CupertinoColors.d.ts +2 -2
- package/dist/CupertinoContextMenu.d.ts +2 -6
- package/dist/Divider.d.ts +1 -1
- package/dist/Drawer.d.ts +44 -0
- package/dist/EdgeInsets.d.ts +1 -0
- package/dist/ElevatedButton.d.ts +37 -0
- package/dist/FlueConfigProvider.d.ts +26 -0
- package/dist/IconButton.d.ts +32 -0
- package/dist/Icons.d.ts +6 -0
- package/dist/ImageFilter.d.ts +28 -0
- package/dist/ImageProvider.d.ts +16 -2
- package/dist/LinearProgressIndicator.d.ts +1 -1
- package/dist/ListView.d.ts +1 -0
- package/dist/OutlinedButton.d.ts +37 -0
- package/dist/Overlay.d.ts +33 -0
- package/dist/PopupMenuButton.d.ts +39 -0
- package/dist/RefreshIndicator.d.ts +32 -0
- package/dist/Scaffold.d.ts +18 -6
- package/dist/SlidingSegmentedControl.d.ts +25 -0
- package/dist/TabBar.d.ts +25 -0
- package/dist/TabBarView.d.ts +20 -0
- package/dist/TextButton.d.ts +37 -0
- package/dist/__tests__/px2vw_mobile.spec.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +26 -2
- package/dist/index.js +3933 -2844
- package/dist/px2vw.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,21 +60,35 @@ import { Container, Column, Row, Text, SizedBox, Alignment, MainAxisAlignment }
|
|
|
60
60
|
|
|
61
61
|
FlueKit automatically converts number values (e.g., `:width="100"`) to `vw` units based on a default design width of **750px**.
|
|
62
62
|
|
|
63
|
-
To
|
|
63
|
+
To enable this feature and configure the design width, wrap your application with `FlueConfigProvider`:
|
|
64
64
|
|
|
65
|
-
```
|
|
66
|
-
|
|
65
|
+
```vue
|
|
66
|
+
<!-- App.vue -->
|
|
67
|
+
<template>
|
|
68
|
+
<FlueConfigProvider
|
|
69
|
+
:transform="true"
|
|
70
|
+
:designWidth="750"
|
|
71
|
+
assetBaseURL="https://cdn.example.com/assets/"
|
|
72
|
+
>
|
|
73
|
+
<Root></Root>
|
|
74
|
+
</FlueConfigProvider>
|
|
75
|
+
</template>
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
<script setup>
|
|
78
|
+
import { FlueConfigProvider } from "fluekit";
|
|
79
|
+
</script>
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
|
|
82
|
+
#### Bypassing Conversion
|
|
83
|
+
|
|
84
|
+
If you want to use exact pixel values without conversion, you can explicitly use the `px` unit string:
|
|
73
85
|
|
|
74
|
-
```
|
|
75
|
-
|
|
86
|
+
```vue
|
|
87
|
+
<!-- This will be converted to vw -->
|
|
88
|
+
<Container :width="100" />
|
|
76
89
|
|
|
77
|
-
|
|
90
|
+
<!-- This will remain exactly 100px -->
|
|
91
|
+
<Container width="100px" />
|
|
78
92
|
```
|
|
79
93
|
|
|
80
94
|
## 🧩 Component Overview
|
|
@@ -98,6 +112,7 @@ setTransform(false); // Numbers will be treated as px
|
|
|
98
112
|
### Painting & Effects
|
|
99
113
|
|
|
100
114
|
- **Opacity / AnimatedOpacity**: Makes its child partially transparent.
|
|
115
|
+
- **BackdropFilter**: Applies a filter (e.g., blur) to the existing painted content.
|
|
101
116
|
- **Transform**: Applies a transformation before painting its child.
|
|
102
117
|
- **Decorations**: Rich styling support via `BoxDecoration` (borders, shadows, gradients, images).
|
|
103
118
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
avatar?: Component;
|
|
6
|
+
backgroundColor?: string | Color;
|
|
7
|
+
labelColor?: string | Color;
|
|
8
|
+
}
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
avatar?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
19
|
+
pressed: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
+
onPressed?: (() => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
backgroundColor: string | Color;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
package/dist/AlertDialog.d.ts
CHANGED
|
@@ -21,12 +21,16 @@ interface Props {
|
|
|
21
21
|
titleStyle?: TextStyle;
|
|
22
22
|
titleColor?: string;
|
|
23
23
|
titleFontSize?: number;
|
|
24
|
+
variant?: "material" | "ios";
|
|
25
|
+
okText?: string;
|
|
26
|
+
cancelText?: string;
|
|
24
27
|
}
|
|
25
28
|
declare function __VLS_template(): {
|
|
26
29
|
attrs: Partial<{}>;
|
|
27
30
|
slots: {
|
|
28
31
|
default?(_: {}): any;
|
|
29
32
|
actions?(_: {}): any;
|
|
33
|
+
actions?(_: {}): any;
|
|
30
34
|
};
|
|
31
35
|
refs: {};
|
|
32
36
|
rootEl: any;
|
|
@@ -43,9 +47,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
43
47
|
}>, {
|
|
44
48
|
alignment: Alignment;
|
|
45
49
|
visible: boolean;
|
|
50
|
+
variant: "material" | "ios";
|
|
46
51
|
barrierDismissible: boolean;
|
|
47
52
|
barrierColor: string;
|
|
48
53
|
actionsAlignment: MainAxisAlignment;
|
|
54
|
+
okText: string;
|
|
55
|
+
cancelText: string;
|
|
49
56
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
50
57
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
51
58
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import { BoxConstraints } from './BoxConstraints';
|
|
|
2
2
|
import { BoxDecoration } from './BoxDecoration';
|
|
3
3
|
import { EdgeInsets } from './EdgeInsets';
|
|
4
4
|
import { Alignment } from './FlexProps';
|
|
5
|
+
import { Color } from './Color';
|
|
5
6
|
interface Props {
|
|
6
7
|
width?: number | string;
|
|
7
8
|
height?: number | string;
|
|
@@ -9,7 +10,7 @@ interface Props {
|
|
|
9
10
|
margin?: EdgeInsets;
|
|
10
11
|
decoration?: BoxDecoration;
|
|
11
12
|
foregroundDecoration?: BoxDecoration;
|
|
12
|
-
color?: string;
|
|
13
|
+
color?: string | Color;
|
|
13
14
|
alignment?: Alignment | string;
|
|
14
15
|
clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
|
|
15
16
|
transform?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ImageFilter } from './ImageFilter';
|
|
3
|
+
interface Props {
|
|
4
|
+
filter: ImageFilter | string;
|
|
5
|
+
blendMode?: CSSProperties["mixBlendMode"];
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
package/dist/BoxDecoration.d.ts
CHANGED
|
@@ -4,19 +4,11 @@ import { Borders } from './Border';
|
|
|
4
4
|
import { BorderRadius } from './BorderRadius';
|
|
5
5
|
import { BoxShadowProps } from './BoxShadow';
|
|
6
6
|
import { Color } from './Color';
|
|
7
|
+
import { ImageFilter } from './ImageFilter';
|
|
8
|
+
import { BoxFit } from './BoxFit';
|
|
7
9
|
import { ImageProvider } from './ImageProvider';
|
|
8
10
|
export * from './Gradient';
|
|
9
|
-
|
|
10
|
-
export type BoxFit = Valueof<typeof BoxFit>;
|
|
11
|
-
export declare const BoxFit: {
|
|
12
|
-
readonly fitWidth: "fitWidth";
|
|
13
|
-
readonly fitHeight: "fitHeight";
|
|
14
|
-
readonly fill: "fill";
|
|
15
|
-
readonly contain: "contain";
|
|
16
|
-
readonly cover: "cover";
|
|
17
|
-
readonly none: "none";
|
|
18
|
-
readonly scaleDown: "scaleDown";
|
|
19
|
-
};
|
|
11
|
+
export { Clip } from './Clip';
|
|
20
12
|
export type ImageRepeat = "repeat" | "repeat-x" | "repeat-y" | "no-repeat";
|
|
21
13
|
export type Overflow = "none" | "visible" | "hidden" | "scroll" | "auto";
|
|
22
14
|
export type BoxAlignment = Alignment;
|
|
@@ -35,7 +27,6 @@ export declare enum BoxShape {
|
|
|
35
27
|
rectangle = "rectangle",
|
|
36
28
|
circle = "circle"
|
|
37
29
|
}
|
|
38
|
-
export declare function setBaseUrl(url: string): void;
|
|
39
30
|
export declare function normalizeSrc(src: string): string;
|
|
40
31
|
export interface DecorationImageProps {
|
|
41
32
|
image: ImageProvider | string;
|
|
@@ -63,6 +54,7 @@ export type BoxDecorationProps = {
|
|
|
63
54
|
overflow?: Overflow;
|
|
64
55
|
opacity?: number;
|
|
65
56
|
shape?: BoxShape;
|
|
57
|
+
backdropFilter?: ImageFilter | string;
|
|
66
58
|
};
|
|
67
59
|
export type BoxDecoration = BoxDecorationProps & {
|
|
68
60
|
[BOX_DECORATION_SYMBOL]?: true;
|
|
@@ -74,14 +66,3 @@ export declare function BoxDecoration(props?: BoxDecorationProps): BoxDecoration
|
|
|
74
66
|
* 类型守卫:检查对象是否通过 BoxDecoration 构造函数创建
|
|
75
67
|
*/
|
|
76
68
|
export declare function isBoxDecoration(value: any): value is BoxDecoration;
|
|
77
|
-
/**
|
|
78
|
-
* Clip
|
|
79
|
-
* 对应 Flutter 的 Clip
|
|
80
|
-
*/
|
|
81
|
-
export declare const Clip: {
|
|
82
|
-
readonly none: "none";
|
|
83
|
-
readonly hardEdge: "hardEdge";
|
|
84
|
-
readonly antiAlias: "antiAlias";
|
|
85
|
-
readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
|
|
86
|
-
};
|
|
87
|
-
export type Clip = keyof typeof Clip;
|
package/dist/BoxFit.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const BoxFit: {
|
|
2
|
+
readonly fitWidth: "fitWidth";
|
|
3
|
+
readonly fitHeight: "fitHeight";
|
|
4
|
+
readonly fill: "fill";
|
|
5
|
+
readonly contain: "contain";
|
|
6
|
+
readonly cover: "cover";
|
|
7
|
+
readonly none: "none";
|
|
8
|
+
readonly scaleDown: "scaleDown";
|
|
9
|
+
};
|
|
10
|
+
type Valueof<T> = T[keyof T];
|
|
11
|
+
export type BoxFit = Valueof<typeof BoxFit>;
|
|
12
|
+
export {};
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ButtonStyle } from './ButtonStyle';
|
|
2
|
-
import { Behavior } from './useGesture';
|
|
3
|
-
import { EdgeInsets } from './EdgeInsets';
|
|
4
1
|
import { BorderRadius } from './BorderRadius';
|
|
2
|
+
import { ButtonStyle } from './ButtonStyle';
|
|
5
3
|
import { Color } from './Color';
|
|
4
|
+
import { EdgeInsets } from './EdgeInsets';
|
|
5
|
+
import { Behavior } from './useGesture';
|
|
6
6
|
interface Props {
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
behavior?: Behavior;
|
package/dist/Chip.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
avatar?: Component;
|
|
6
|
+
backgroundColor?: string | Color;
|
|
7
|
+
labelColor?: string | Color;
|
|
8
|
+
deletable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
avatar?(_: {}): any;
|
|
14
|
+
deleteIcon?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
+
delete: () => any;
|
|
22
|
+
pressed: () => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
24
|
+
onDelete?: (() => any) | undefined;
|
|
25
|
+
onPressed?: (() => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
backgroundColor: string | Color;
|
|
28
|
+
labelColor: string | Color;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
avatar?: Component;
|
|
7
|
+
backgroundColor?: string | Color;
|
|
8
|
+
selectedColor?: string | Color;
|
|
9
|
+
labelColor?: string | Color;
|
|
10
|
+
}
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
avatar?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
+
selected: (value: boolean) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
23
|
+
onSelected?: ((value: boolean) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
backgroundColor: string | Color;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
selectedColor: string | Color;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
2
|
+
interface Props {
|
|
3
|
+
backgroundImage?: string;
|
|
4
|
+
backgroundColor?: string | Color;
|
|
5
|
+
foregroundColor?: string | Color;
|
|
6
|
+
radius?: number;
|
|
7
|
+
minRadius?: number;
|
|
8
|
+
maxRadius?: number;
|
|
9
|
+
}
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
20
|
+
backgroundColor: string | Color;
|
|
21
|
+
foregroundColor: string | Color;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -25,8 +25,8 @@ interface Props {
|
|
|
25
25
|
size?: number;
|
|
26
26
|
}
|
|
27
27
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
28
|
-
size: number;
|
|
29
28
|
color: string | Color;
|
|
29
|
+
size: number;
|
|
30
30
|
value: number | null;
|
|
31
31
|
strokeWidth: number;
|
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
package/dist/Clip.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clip
|
|
3
|
+
* 对应 Flutter 的 Clip
|
|
4
|
+
*/
|
|
5
|
+
export declare const Clip: {
|
|
6
|
+
readonly none: "none";
|
|
7
|
+
readonly hardEdge: "hardEdge";
|
|
8
|
+
readonly antiAlias: "antiAlias";
|
|
9
|
+
readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
|
|
10
|
+
};
|
|
11
|
+
export type Clip = keyof typeof Clip;
|
package/dist/Colors.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const Colors: {
|
|
|
6
6
|
withGreen: (color: Color | string, green: number) => Color;
|
|
7
7
|
withBlue: (color: Color | string, blue: number) => Color;
|
|
8
8
|
computeLuminance: (color: Color | string) => number;
|
|
9
|
-
lighten: (color: Color | string, amount: number) =>
|
|
9
|
+
lighten: (color: Color | string, amount: number) => string;
|
|
10
10
|
transparent: Color;
|
|
11
11
|
black: Color;
|
|
12
12
|
black87: Color;
|
|
@@ -17,7 +17,7 @@ interface Props {
|
|
|
17
17
|
}
|
|
18
18
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
19
19
|
color: string | Color;
|
|
20
|
-
radius: number;
|
|
21
20
|
animating: boolean;
|
|
21
|
+
radius: number;
|
|
22
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
23
|
export default _default;
|
|
@@ -6,8 +6,8 @@ export declare const CupertinoColors: {
|
|
|
6
6
|
withGreen: (color: Color | string, green: number) => Color;
|
|
7
7
|
withBlue: (color: Color | string, blue: number) => Color;
|
|
8
8
|
computeLuminance: (color: Color | string) => number;
|
|
9
|
-
lighten: (color: Color | string, amount: number) =>
|
|
10
|
-
darken: (color: Color | string, amount: number) =>
|
|
9
|
+
lighten: (color: Color | string, amount: number) => string;
|
|
10
|
+
darken: (color: Color | string, amount: number) => string;
|
|
11
11
|
activeBlue: Color;
|
|
12
12
|
activeGreen: Color;
|
|
13
13
|
activeOrange: Color;
|
|
@@ -13,15 +13,11 @@ declare function __VLS_template(): {
|
|
|
13
13
|
slots: {
|
|
14
14
|
default?(_: {}): any;
|
|
15
15
|
};
|
|
16
|
-
refs: {
|
|
17
|
-
anchorRef: HTMLDivElement;
|
|
18
|
-
};
|
|
16
|
+
refs: {};
|
|
19
17
|
rootEl: HTMLDivElement;
|
|
20
18
|
};
|
|
21
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
-
anchorRef: HTMLDivElement;
|
|
24
|
-
}, HTMLDivElement>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
22
|
export default _default;
|
|
27
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/Divider.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ interface Props {
|
|
|
8
8
|
vertical?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
|
-
height: number;
|
|
12
11
|
color: string | Color;
|
|
12
|
+
height: number;
|
|
13
13
|
vertical: boolean;
|
|
14
14
|
thickness: number;
|
|
15
15
|
indent: number;
|
package/dist/Drawer.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Color } from './Color';
|
|
2
|
+
interface Props {
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
backgroundColor?: string | Color;
|
|
5
|
+
elevation?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
edge?: "start" | "end";
|
|
8
|
+
overlayColor?: string | Color;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = Props;
|
|
11
|
+
declare const open: import('vue').ModelRef<boolean, string, boolean, boolean>;
|
|
12
|
+
type __VLS_PublicProps = {
|
|
13
|
+
"open"?: typeof open['value'];
|
|
14
|
+
} & __VLS_Props;
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {};
|
|
21
|
+
rootEl: any;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
"update:open": (value: boolean) => any;
|
|
26
|
+
} & {
|
|
27
|
+
close: () => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
onClose?: (() => any) | undefined;
|
|
30
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
width: number;
|
|
33
|
+
backgroundColor: string | Color;
|
|
34
|
+
elevation: number;
|
|
35
|
+
edge: "start" | "end";
|
|
36
|
+
overlayColor: string | Color;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
package/dist/EdgeInsets.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare namespace EdgeInsets {
|
|
|
30
30
|
left?: number | string;
|
|
31
31
|
}) => EdgeInsets;
|
|
32
32
|
var zero: EdgeInsets;
|
|
33
|
+
var fromLTRB: (left: number | string, top: number | string, right: number | string, bottom: number | string) => EdgeInsets;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* 类型守卫:检查对象是否通过 EdgeInsets 创建
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ButtonStyle } from './ButtonStyle';
|
|
2
|
+
interface Props {
|
|
3
|
+
style?: ButtonStyle;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
child?: any;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
+
"long-press": () => any;
|
|
18
|
+
pressed: () => any;
|
|
19
|
+
"tap-down": (payload: any) => any;
|
|
20
|
+
"tap-up": (payload: any) => any;
|
|
21
|
+
"tap-cancel": (payload: any) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
23
|
+
"onLong-press"?: (() => any) | undefined;
|
|
24
|
+
onPressed?: (() => any) | undefined;
|
|
25
|
+
"onTap-down"?: ((payload: any) => any) | undefined;
|
|
26
|
+
"onTap-up"?: ((payload: any) => any) | undefined;
|
|
27
|
+
"onTap-cancel"?: ((payload: any) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
transform?: boolean;
|
|
3
|
+
designWidth?: number;
|
|
4
|
+
assetBaseURL?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
transform: boolean;
|
|
17
|
+
designWidth: number;
|
|
18
|
+
assetBaseURL: string;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { ButtonStyle } from './ButtonStyle';
|
|
3
|
+
import { Color } from './Color';
|
|
4
|
+
import { EdgeInsets } from './EdgeInsets';
|
|
5
|
+
interface Props {
|
|
6
|
+
icon: string | Component;
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
color?: string | Color;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
padding?: EdgeInsets;
|
|
11
|
+
alignment?: any;
|
|
12
|
+
splashRadius?: number;
|
|
13
|
+
style?: ButtonStyle;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
|
+
"long-press": () => any;
|
|
17
|
+
pressed: () => any;
|
|
18
|
+
"tap-down": (payload: any) => any;
|
|
19
|
+
"tap-up": (payload: any) => any;
|
|
20
|
+
"tap-cancel": (payload: any) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
+
"onLong-press"?: (() => any) | undefined;
|
|
23
|
+
onPressed?: (() => any) | undefined;
|
|
24
|
+
"onTap-down"?: ((payload: any) => any) | undefined;
|
|
25
|
+
"onTap-up"?: ((payload: any) => any) | undefined;
|
|
26
|
+
"onTap-cancel"?: ((payload: any) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
padding: EdgeInsets;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
iconSize: number;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
export default _default;
|
package/dist/Icons.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare class ImageFilter {
|
|
2
|
+
private _value;
|
|
3
|
+
constructor(value: string);
|
|
4
|
+
toString(): string;
|
|
5
|
+
/**
|
|
6
|
+
* A filter that applies a Gaussian blur.
|
|
7
|
+
* CSS `backdrop-filter: blur(radius)` only supports a single radius.
|
|
8
|
+
* We will use `sigmaX` as the radius.
|
|
9
|
+
*/
|
|
10
|
+
static blur({ sigmaX, sigmaY }: {
|
|
11
|
+
sigmaX?: number;
|
|
12
|
+
sigmaY?: number;
|
|
13
|
+
}): ImageFilter;
|
|
14
|
+
/**
|
|
15
|
+
* A filter that applies a transformation matrix.
|
|
16
|
+
* Not fully supported in CSS filters directly as `matrix`, usually part of transform.
|
|
17
|
+
* But we can support other standard CSS filters.
|
|
18
|
+
*/
|
|
19
|
+
static brightness(amount: number): ImageFilter;
|
|
20
|
+
static contrast(amount: number): ImageFilter;
|
|
21
|
+
static grayscale(amount: number): ImageFilter;
|
|
22
|
+
static hueRotate(degrees: number): ImageFilter;
|
|
23
|
+
static invert(amount: number): ImageFilter;
|
|
24
|
+
static opacity(amount: number): ImageFilter;
|
|
25
|
+
static saturate(amount: number): ImageFilter;
|
|
26
|
+
static sepia(amount: number): ImageFilter;
|
|
27
|
+
}
|
|
28
|
+
export declare function isImageFilter(value: any): value is ImageFilter;
|
package/dist/ImageProvider.d.ts
CHANGED
|
@@ -14,9 +14,14 @@ export declare function MemoryImage(data: string | Blob): ImageProvider;
|
|
|
14
14
|
export interface AssetImageOptions {
|
|
15
15
|
package?: string;
|
|
16
16
|
bundle?: any;
|
|
17
|
+
/**
|
|
18
|
+
* Overrides the global asset base URL for this image.
|
|
19
|
+
*/
|
|
20
|
+
baseUrl?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* 设置 AssetImage 的基础路径
|
|
24
|
+
* @internal 此函数主要用于 FlueConfigProvider 内部调用。
|
|
20
25
|
* @param url 基础路径,例如 'https://cdn.example.com/assets/' 或 '/static/'
|
|
21
26
|
*/
|
|
22
27
|
export declare function setAssetBaseURL(url: string): void;
|
|
@@ -30,8 +35,17 @@ export declare function AssetImage(name: string, options?: AssetImageOptions): I
|
|
|
30
35
|
* 创建一个预设 package 的 AssetImage 工厂函数
|
|
31
36
|
*
|
|
32
37
|
* @example
|
|
33
|
-
* const MyPkgAssets =
|
|
38
|
+
* const MyPkgAssets = createAssetImageProvider({ package: 'my_pkg' });
|
|
34
39
|
* const img = MyPkgAssets('icons/logo.png'); // 相当于 AssetImage('icons/logo.png', { package: 'my_pkg' })
|
|
35
40
|
*/
|
|
36
|
-
export declare function
|
|
41
|
+
export declare function createAssetImageProvider(baseOptions: AssetImageOptions): (name: string, options?: AssetImageOptions) => ImageProvider;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a factory function for NetworkImage with a base URL.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const MyRemoteImages = createNetworkImageProvider("https://api.example.com/images/");
|
|
47
|
+
* const img = MyRemoteImages("user/avatar.png"); // -> NetworkImage("https://api.example.com/images/user/avatar.png")
|
|
48
|
+
*/
|
|
49
|
+
export declare function createNetworkImageProvider(baseUrl: string): (url: string) => ImageProvider;
|
|
50
|
+
export declare function ImageProvider(url: string): ImageProvider;
|
|
37
51
|
export {};
|