fluekit 2.7.1 → 2.8.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.
@@ -1,10 +1,10 @@
1
1
  import { Alignment } from './Alignment';
2
- import { EdgeInsets } from './EdgeInsets';
3
- import { BoxDecoration } from './BoxDecoration';
4
2
  import { BoxConstraints } from './BoxConstraints';
3
+ import { BoxDecoration } from './BoxDecoration';
4
+ import { EdgeInsets } from './EdgeInsets';
5
+ import { MainAxisAlignment } from './FlexProps';
5
6
  import { Size } from './Size';
6
7
  import { TextStyle } from './TextStyle';
7
- import { MainAxisAlignment } from './FlexProps';
8
8
  interface Props {
9
9
  visible: boolean;
10
10
  title?: string;
@@ -0,0 +1,3 @@
1
+ import { ComputedRef, CSSProperties } from 'vue';
2
+ export declare function injectTransition(): ComputedRef<CSSProperties>;
3
+ export declare function provideTransiationStyle(style: ComputedRef<CSSProperties>): void;
@@ -1,21 +1,5 @@
1
- import { BoxConstraints } from './BoxConstraints';
2
- import { BoxDecoration } from './BoxDecoration';
3
- import { EdgeInsets } from './EdgeInsets';
4
- import { Alignment } from './FlexProps';
5
- import { Color } from './Color';
6
- interface Props {
7
- width?: number | string;
8
- height?: number | string;
9
- padding?: EdgeInsets;
10
- margin?: EdgeInsets;
11
- decoration?: BoxDecoration;
12
- foregroundDecoration?: BoxDecoration;
13
- color?: string | Color;
14
- alignment?: Alignment | string;
15
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
16
- transform?: string;
17
- transformAlignment?: Alignment | string;
18
- constraints?: BoxConstraints;
1
+ import { ContainerProps } from './ContainerProps';
2
+ interface Props extends ContainerProps {
19
3
  duration?: number;
20
4
  curve?: string;
21
5
  }
@@ -29,7 +13,6 @@ declare function __VLS_template(): {
29
13
  };
30
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
15
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
32
- clipBehavior: "none" | "hardEdge" | "antiAlias" | string;
33
16
  duration: number;
34
17
  curve: string;
35
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,31 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ export declare const Opacity: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ /**
3
+ * 透明度值,范围 0.0 到 1.0
4
+ * 0.0 表示完全透明(不可见)
5
+ * 1.0 表示完全不透明(完全可见)
6
+ * @default 1.0
7
+ */
8
+ opacity: {
9
+ type: NumberConstructor;
10
+ default: undefined;
11
+ };
12
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
13
+ [key: string]: any;
14
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ /**
16
+ * 透明度值,范围 0.0 到 1.0
17
+ * 0.0 表示完全透明(不可见)
18
+ * 1.0 表示完全不透明(完全可见)
19
+ * @default 1.0
20
+ */
21
+ opacity: {
22
+ type: NumberConstructor;
23
+ default: undefined;
24
+ };
25
+ }>> & Readonly<{}>, {
26
+ opacity: number;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
28
+ export declare const AnimatedOpacity: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
29
  opacity: {
3
30
  type: NumberConstructor;
4
31
  required: true;
@@ -30,4 +57,3 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
30
57
  duration: number;
31
58
  curve: string;
32
59
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
- export default _default;
package/dist/Box.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BoxShape } from './BoxDecoration';
1
+ import { BoxShape, Clip } from './BoxDecoration';
2
2
  import { BoxConstraints } from './BoxConstraints';
3
3
  import { Alignment } from './Alignment';
4
4
  import { EdgeInsets } from './EdgeInsets';
@@ -15,7 +15,7 @@ interface Props {
15
15
  transform?: string;
16
16
  transformAlignment?: Alignment;
17
17
  constraints?: BoxConstraints;
18
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
18
+ clipBehavior?: Clip;
19
19
  color?: string | Color;
20
20
  border?: Borders;
21
21
  borderRadius?: BorderRadius;
@@ -35,7 +35,7 @@ declare function __VLS_template(): {
35
35
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
36
36
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
37
37
  shape: BoxShape;
38
- clipBehavior: "none" | "hardEdge" | "antiAlias" | string;
38
+ clipBehavior: Clip;
39
39
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
40
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
41
  export default _default;
@@ -5,6 +5,7 @@ import { BorderRadius } from './BorderRadius';
5
5
  import { BoxShadowProps } from './BoxShadow';
6
6
  import { Color } from './Color';
7
7
  import { ImageFilter } from './ImageFilter';
8
+ import { PropsWithCopyWith } from './utils';
8
9
  import { BoxFit } from './BoxFit';
9
10
  import { ImageProvider } from './ImageProvider';
10
11
  export * from './Gradient';
@@ -44,23 +45,22 @@ export declare function DecorationImage(props: DecorationImageProps): Decoration
44
45
  * BoxDecoration接口定义
45
46
  */
46
47
  declare const BOX_DECORATION_SYMBOL: unique symbol;
47
- export type BoxDecorationProps = {
48
+ export interface BoxDecorationProps {
48
49
  color?: string | Color;
49
50
  border?: Borders;
50
51
  borderRadius?: BorderRadius;
51
52
  boxShadow?: BoxShadowProps | BoxShadowProps[];
52
53
  gradient?: string;
53
54
  image?: DecorationImageProps;
54
- overflow?: Overflow;
55
55
  opacity?: number;
56
56
  shape?: BoxShape;
57
57
  backdropFilter?: ImageFilter | string;
58
- };
59
- export type BoxDecoration = BoxDecorationProps & {
60
- [BOX_DECORATION_SYMBOL]?: true;
61
- };
58
+ }
59
+ export interface BoxDecoration extends PropsWithCopyWith<BoxDecoration>, BoxDecorationProps {
60
+ [BOX_DECORATION_SYMBOL]: true;
61
+ }
62
62
  export declare function decorationImageToStyle(di: DecorationImageProps): CSSProperties;
63
- export declare function boxDecorationToStyle(decoration?: BoxDecorationProps): CSSProperties;
63
+ export declare function boxDecorationToStyle(decoration: BoxDecoration): CSSProperties;
64
64
  export declare function BoxDecoration(props?: BoxDecorationProps): BoxDecoration;
65
65
  /**
66
66
  * 类型守卫:检查对象是否通过 BoxDecoration 构造函数创建
@@ -6,7 +6,9 @@ import { EdgeInsets } from './EdgeInsets';
6
6
  import { SizeType } from './Size';
7
7
  import { TextAlign, TextStyle } from './TextStyle';
8
8
  import { Color } from './Color';
9
- export interface ButtonStyle {
9
+ import { PropsWithCopyWith } from './utils';
10
+ declare const STYLE_SYMBOL: unique symbol;
11
+ export interface ButtonStyleProps {
10
12
  textStyle?: TextStyle;
11
13
  backgroundColor?: string | Color;
12
14
  foregroundColor?: string | Color;
@@ -24,5 +26,9 @@ export interface ButtonStyle {
24
26
  flex?: number | string;
25
27
  textAlign?: TextAlign;
26
28
  }
27
- export declare const ButtonStyle: (style: ButtonStyle) => ButtonStyle;
28
- export declare function buttonStyleToStyle(style?: ButtonStyle): CSSProperties;
29
+ export interface ButtonStyle extends PropsWithCopyWith<ButtonStyle>, ButtonStyleProps {
30
+ [STYLE_SYMBOL]: true;
31
+ }
32
+ export declare function ButtonStyle(style: ButtonStyleProps): ButtonStyle;
33
+ export declare function buttonStyleToStyle(style?: Omit<ButtonStyle, "copyWith">): CSSProperties;
34
+ export {};
package/dist/Card.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Clip } from './BoxDecoration';
1
2
  import { BorderRadius } from './BorderRadius';
2
3
  import { EdgeInsets } from './EdgeInsets';
3
4
  import { Color } from './Color';
@@ -7,7 +8,7 @@ interface Props {
7
8
  elevation?: number;
8
9
  shape?: BorderRadius;
9
10
  margin?: EdgeInsets;
10
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
11
+ clipBehavior?: Clip;
11
12
  borderOnForeground?: boolean;
12
13
  variant?: "material" | "ios";
13
14
  }
@@ -23,10 +24,10 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
24
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
24
25
  color: string | Color;
25
26
  margin: EdgeInsets;
26
- clipBehavior: "none" | "hardEdge" | "antiAlias" | string;
27
+ clipBehavior: Clip;
28
+ shadowColor: string | Color;
27
29
  elevation: number;
28
30
  variant: "material" | "ios";
29
- shadowColor: string | Color;
30
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
32
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
33
  export default _default;
package/dist/Clip.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- /**
2
- * Clip
3
- * 对应 Flutter 的 Clip
4
- */
1
+ import { CSSProperties } from 'vue';
5
2
  export declare const Clip: {
6
3
  readonly none: "none";
7
4
  readonly hardEdge: "hardEdge";
@@ -9,3 +6,4 @@ export declare const Clip: {
9
6
  readonly antiAliasWithSaveLayer: "antiAliasWithSaveLayer";
10
7
  };
11
8
  export type Clip = keyof typeof Clip;
9
+ export declare function clipBehaviorToStyle(clipBehavior: Clip): CSSProperties;
@@ -1,5 +1,6 @@
1
+ import { Clip } from './BoxDecoration';
1
2
  interface Props {
2
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | "antiAliasWithSaveLayer";
3
+ clipBehavior?: Clip;
3
4
  }
4
5
  declare function __VLS_template(): {
5
6
  attrs: Partial<{}>;
@@ -11,7 +12,7 @@ declare function __VLS_template(): {
11
12
  };
12
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
14
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
14
- clipBehavior: "none" | "hardEdge" | "antiAlias" | "antiAliasWithSaveLayer";
15
+ clipBehavior: Clip;
15
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
17
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
18
  export default _default;
@@ -1,7 +1,8 @@
1
1
  import { BorderRadius } from './BorderRadius';
2
+ import { Clip } from './BoxDecoration';
2
3
  interface Props {
3
4
  borderRadius?: BorderRadius;
4
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | "antiAliasWithSaveLayer";
5
+ clipBehavior?: Clip;
5
6
  }
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
@@ -13,7 +14,7 @@ declare function __VLS_template(): {
13
14
  };
14
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
16
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
16
- clipBehavior: "none" | "hardEdge" | "antiAlias" | "antiAliasWithSaveLayer";
17
+ clipBehavior: Clip;
17
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
20
  export default _default;
@@ -1,23 +1,5 @@
1
- import { BoxConstraints } from './BoxConstraints';
2
- import { Alignment } from './Alignment';
3
- import { BoxDecoration } from './BoxDecoration';
4
- import { EdgeInsets } from './EdgeInsets';
5
- import { Color } from './Color';
6
- interface Props {
7
- width?: number | string;
8
- height?: number | string;
9
- padding?: EdgeInsets;
10
- margin?: EdgeInsets;
11
- decoration?: BoxDecoration;
12
- foregroundDecoration?: BoxDecoration;
13
- color?: string | Color;
14
- alignment?: Alignment;
15
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | string;
16
- transform?: string;
17
- transformAlignment?: Alignment;
18
- constraints?: BoxConstraints;
19
- flex?: number | string;
20
- }
1
+ import { Clip } from './BoxDecoration';
2
+ import { ContainerProps } from './ContainerProps';
21
3
  declare function __VLS_template(): {
22
4
  attrs: Partial<{}>;
23
5
  slots: {
@@ -27,8 +9,8 @@ declare function __VLS_template(): {
27
9
  rootEl: any;
28
10
  };
29
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
30
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
31
- clipBehavior: "none" | "hardEdge" | "antiAlias" | string;
12
+ declare const __VLS_component: import('vue').DefineComponent<ContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContainerProps> & Readonly<{}>, {
13
+ clipBehavior: Clip;
32
14
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
15
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
16
  export default _default;
@@ -0,0 +1,20 @@
1
+ import { BoxConstraints } from './BoxConstraints';
2
+ import { Alignment } from './Alignment';
3
+ import { BoxDecoration, Clip } from './BoxDecoration';
4
+ import { Color } from './Color';
5
+ import { EdgeInsets } from './EdgeInsets';
6
+ export interface ContainerProps {
7
+ width?: number | string;
8
+ height?: number | string;
9
+ padding?: EdgeInsets;
10
+ margin?: EdgeInsets;
11
+ decoration?: BoxDecoration;
12
+ foregroundDecoration?: BoxDecoration;
13
+ color?: string | Color;
14
+ alignment?: Alignment;
15
+ clipBehavior?: Clip;
16
+ transform?: string;
17
+ transformAlignment?: Alignment;
18
+ constraints?: BoxConstraints;
19
+ flex?: number | string;
20
+ }
package/dist/Drawer.d.ts CHANGED
@@ -31,9 +31,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
31
31
  }>, {
32
32
  width: number;
33
33
  backgroundColor: string | Color;
34
+ overlayColor: string | Color;
34
35
  elevation: number;
35
36
  edge: "start" | "end";
36
- overlayColor: string | Color;
37
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
39
  export default _default;
@@ -0,0 +1,57 @@
1
+ import { Color } from './Color';
2
+ import { Offset } from './Offset';
3
+ interface DropdownItem {
4
+ label: string;
5
+ value: any;
6
+ }
7
+ interface Props {
8
+ modelValue?: any;
9
+ items: (DropdownItem | string)[];
10
+ variant?: "material" | "ios";
11
+ placeholder?: string;
12
+ expanded?: boolean;
13
+ multiple?: boolean;
14
+ icon?: any;
15
+ iconColor?: string | Color;
16
+ textColor?: string | Color;
17
+ color?: string | Color;
18
+ menuColor?: string | Color;
19
+ elevation?: number;
20
+ offset?: Offset;
21
+ }
22
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ change: (...args: any[]) => void;
24
+ "update:modelValue": (...args: any[]) => void;
25
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
26
+ onChange?: ((...args: any[]) => any) | undefined;
27
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
28
+ }>, {
29
+ color: string | Color;
30
+ expanded: boolean;
31
+ multiple: boolean;
32
+ placeholder: string;
33
+ offset: Offset;
34
+ elevation: number;
35
+ variant: "material" | "ios";
36
+ items: (DropdownItem | string)[];
37
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
38
+ triggerRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./Stack').StackProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
39
+ alignment: import('./Alignment').Alignment;
40
+ clipBehavior: import('./Clip').Clip;
41
+ fit: import('./FlexProps').StackFit;
42
+ textDirection: "ltr" | "rtl";
43
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
44
+ P: {};
45
+ B: {};
46
+ D: {};
47
+ C: {};
48
+ M: {};
49
+ Defaults: {};
50
+ }, Readonly<import('./Stack').StackProps> & Readonly<{}>, {}, {}, {}, {}, {
51
+ alignment: import('./Alignment').Alignment;
52
+ clipBehavior: import('./Clip').Clip;
53
+ fit: import('./FlexProps').StackFit;
54
+ textDirection: "ltr" | "rtl";
55
+ }> | null;
56
+ }, any>;
57
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'vue';
1
2
  import { BoxConstraintsProps } from './BoxConstraints';
2
3
  export { Alignment, alignmentToStyle, alignmentToOrigin, alignmentToFlex } from './Alignment';
3
4
  type Valueof<T> = T[keyof T];
@@ -60,3 +61,4 @@ export declare const StackFit: {
60
61
  readonly passthrough: "passthrough";
61
62
  };
62
63
  export type StackFit = Valueof<typeof StackFit>;
64
+ export declare function flexBoxToStyle(props: FlexBoxProps): CSSProperties;
@@ -4,6 +4,7 @@ export interface FlueConfigsProps {
4
4
  designWidth?: number;
5
5
  assetBaseURL?: string;
6
6
  toastCount?: number;
7
+ lineHeight?: number | string;
7
8
  }
8
9
  export declare const FlueConfigInjectionKey: InjectionKey<FlueConfigsProps>;
9
10
  export declare const useFlueConfig: () => FlueConfigsProps | undefined;
@@ -5,7 +5,7 @@ declare function __VLS_template(): {
5
5
  default?(_: {}): any;
6
6
  };
7
7
  refs: {};
8
- rootEl: any;
8
+ rootEl: HTMLDivElement;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<FlueConfigsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FlueConfigsProps> & Readonly<{}>, {
@@ -13,7 +13,7 @@ declare const __VLS_component: import('vue').DefineComponent<FlueConfigsProps, {
13
13
  designWidth: number;
14
14
  assetBaseURL: string;
15
15
  toastCount: number;
16
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
17
17
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
18
  export default _default;
19
19
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,3 +1,4 @@
1
+ import { Clip } from './Clip';
1
2
  import { GridViewProps } from './Scrollable';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
@@ -12,7 +13,7 @@ declare function __VLS_template(): {
12
13
  };
13
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
15
  declare const __VLS_component: import('vue').DefineComponent<GridViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GridViewProps> & Readonly<{}>, {
15
- clipBehavior: import('./Clip').Clip;
16
+ clipBehavior: Clip;
16
17
  crossAxisCount: number;
17
18
  mainAxisSpacing: number;
18
19
  crossAxisSpacing: number;
@@ -2,14 +2,19 @@ import { Component } from 'vue';
2
2
  import { BorderSide } from './Border';
3
3
  import { BorderRadius } from './BorderRadius';
4
4
  import { Color } from './Color';
5
- import { EdgeInsetsProps } from './EdgeInsets';
5
+ import { EdgeInsets } from './EdgeInsets';
6
6
  import { TextStyle } from './TextStyle';
7
7
  import { BoxConstraints } from './BoxConstraints';
8
+ import { PropsWithCopyWith } from './utils';
8
9
  export interface InputBorder {
9
10
  borderSide?: BorderSide;
10
11
  borderRadius?: BorderRadius;
11
12
  isOutline?: boolean;
12
13
  }
14
+ export declare const InputBorder: {
15
+ none: InputBorder;
16
+ };
17
+ export declare function NoInputBorder(): InputBorder;
13
18
  export declare function OutlineInputBorder(options?: {
14
19
  borderSide?: BorderSide;
15
20
  borderRadius?: BorderRadius;
@@ -36,7 +41,8 @@ export declare const FloatingLabelBehavior: {
36
41
  */
37
42
  readonly never: "never";
38
43
  };
39
- export interface InputDecoration {
44
+ declare const INPUI_DECORATION_SYMBOL: unique symbol;
45
+ interface InputDecorationProps {
40
46
  labelText?: string;
41
47
  hintText?: string;
42
48
  helperText?: string;
@@ -60,7 +66,7 @@ export interface InputDecoration {
60
66
  disabledBorder?: InputBorder;
61
67
  filled?: boolean;
62
68
  fillColor?: string | Color;
63
- contentPadding?: number | number[] | EdgeInsetsProps;
69
+ contentPadding?: EdgeInsets;
64
70
  isDense?: boolean;
65
71
  isCollapsed?: boolean;
66
72
  constraints?: BoxConstraints;
@@ -84,4 +90,12 @@ export interface InputDecoration {
84
90
  */
85
91
  alwaysShowError?: boolean;
86
92
  }
87
- export declare function InputDecoration(options?: InputDecoration): InputDecoration;
93
+ export interface InputDecoration extends PropsWithCopyWith<InputDecoration>, InputDecorationProps {
94
+ [INPUI_DECORATION_SYMBOL]: true;
95
+ }
96
+ export declare function InputDecoration(props: InputDecorationProps): InputDecoration;
97
+ /**
98
+ * 类型守卫:检查对象是否通过 BoxDecoration 构造函数创建
99
+ */
100
+ export declare function isInputDecoration(value: any): value is InputDecoration;
101
+ export {};
package/dist/Modal.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Alignment } from './Alignment';
2
- interface Props {
2
+ interface ModalProps {
3
3
  barrierDismissible?: boolean;
4
4
  barrierColor?: string;
5
5
  alignment?: Alignment;
6
6
  zIndex?: number;
7
7
  }
8
8
  declare const visible: import('vue').ModelRef<boolean, string, boolean, boolean>;
9
- type __VLS_Props = Props;
9
+ type __VLS_Props = ModalProps;
10
10
  type __VLS_PublicProps = {
11
11
  "visible"?: typeof visible['value'];
12
12
  } & __VLS_Props;
@@ -0,0 +1,52 @@
1
+ export interface OffsetBase {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ export interface Offset extends OffsetBase {
6
+ /**
7
+ * Returns the sum of two offsets.
8
+ */
9
+ add(other: OffsetBase): Offset;
10
+ /**
11
+ * Returns the difference between two offsets.
12
+ */
13
+ subtract(other: OffsetBase): Offset;
14
+ /**
15
+ * Returns the offset scaled by the given operand.
16
+ */
17
+ multiply(operand: number): Offset;
18
+ /**
19
+ * Returns the offset divided by the given operand.
20
+ */
21
+ divide(operand: number): Offset;
22
+ /**
23
+ * Returns the negation of the offset.
24
+ */
25
+ negate(): Offset;
26
+ /**
27
+ * The magnitude of the offset.
28
+ */
29
+ readonly distance: number;
30
+ /**
31
+ * The square of the magnitude of the offset.
32
+ */
33
+ readonly distanceSquared: number;
34
+ /**
35
+ * The angle of this offset as a vector in radians.
36
+ */
37
+ readonly direction: number;
38
+ /**
39
+ * Compares two offsets for equality.
40
+ */
41
+ equals(other: OffsetBase): boolean;
42
+ toString(): string;
43
+ }
44
+ /**
45
+ * Creates an Offset.
46
+ * If y is omitted, x is used for both x and y.
47
+ */
48
+ export declare function Offset(x: number, y?: number): Offset;
49
+ export declare namespace Offset {
50
+ const zero: Offset;
51
+ const infinite: Offset;
52
+ }
@@ -1,14 +1,13 @@
1
1
  import { Color } from './Color';
2
+ import { Offset } from './Offset';
2
3
  interface Props {
3
4
  icon?: any;
4
5
  iconSize?: number;
5
6
  iconColor?: string | Color;
6
7
  color?: string | Color;
7
8
  elevation?: number;
8
- offset?: {
9
- x: number;
10
- y: number;
11
- };
9
+ offset?: Offset;
10
+ variant?: "material" | "ios";
12
11
  }
13
12
  declare function __VLS_template(): {
14
13
  attrs: Partial<{}>;
@@ -23,11 +22,9 @@ declare function __VLS_template(): {
23
22
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
23
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
25
24
  color: string | Color;
26
- offset: {
27
- x: number;
28
- y: number;
29
- };
25
+ offset: Offset;
30
26
  elevation: number;
27
+ variant: "material" | "ios";
31
28
  iconSize: number;
32
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -18,9 +18,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
18
18
  onChange?: ((value: RangeValues) => any) | undefined;
19
19
  "onUpdate:value"?: ((value: RangeValues) => any) | undefined;
20
20
  }>, {
21
+ variant: "material" | "ios";
21
22
  min: number;
22
23
  max: number;
23
- variant: "material" | "ios";
24
24
  activeColor: string;
25
25
  inactiveColor: string;
26
26
  thumbColor: string;
@@ -1,4 +1,5 @@
1
1
  import { ScrollableProps } from './Scrollable';
2
+ import { Clip } from './Clip';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
4
5
  slots: {
@@ -33,7 +34,7 @@ declare const __VLS_component: import('vue').DefineComponent<ScrollableProps, {
33
34
  onScrollEnd?: (() => any) | undefined;
34
35
  }>, {
35
36
  reverse: boolean;
36
- clipBehavior: import('./Clip').Clip;
37
+ clipBehavior: Clip;
37
38
  scrollDirection: "vertical" | "horizontal";
38
39
  physics: import('./Scrollable').ScrollablePhysics;
39
40
  shrinkWrap: boolean;
package/dist/Slider.d.ts CHANGED
@@ -15,9 +15,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
15
15
  onChange?: ((value: number) => any) | undefined;
16
16
  "onUpdate:value"?: ((value: number) => any) | undefined;
17
17
  }>, {
18
+ variant: "material" | "ios";
18
19
  min: number;
19
20
  max: number;
20
- variant: "material" | "ios";
21
21
  activeColor: string | Color;
22
22
  inactiveColor: string | Color;
23
23
  thumbColor: string | Color;
package/dist/Stack.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { Alignment } from './Alignment';
2
2
  import { StackFit } from './FlexProps';
3
- interface StackProps {
3
+ import { Clip } from './Clip';
4
+ export interface StackProps {
4
5
  /** 对齐方式 */
5
6
  alignment?: Alignment;
6
7
  /** 裁剪行为 */
7
- clipBehavior?: "none" | "hardEdge" | "antiAlias" | "clip";
8
+ clipBehavior?: Clip;
8
9
  /** 文本方向 */
9
10
  textDirection?: "ltr" | "rtl";
10
11
  /** 堆叠方式 */
@@ -12,7 +13,7 @@ interface StackProps {
12
13
  }
13
14
  declare const _default: import('vue').DefineComponent<StackProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StackProps> & Readonly<{}>, {
14
15
  alignment: Alignment;
15
- clipBehavior: "none" | "hardEdge" | "antiAlias" | "clip";
16
+ clipBehavior: Clip;
16
17
  fit: StackFit;
17
18
  textDirection: "ltr" | "rtl";
18
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;