fluekit 1.2.0 → 1.4.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/BoxDecoration.d.ts +2 -4
- package/dist/Image.d.ts +32 -0
- package/dist/ImageProvider.d.ts +37 -0
- package/dist/InputDecoration.d.ts +35 -0
- package/dist/Stack.d.ts +1 -1
- package/dist/TextArea.d.ts +23 -0
- package/dist/TextField.d.ts +64 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +1010 -693
- package/package.json +1 -1
package/dist/BoxDecoration.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Alignment } from './Alignment';
|
|
|
3
3
|
import { Borders } from './Border';
|
|
4
4
|
import { BorderRadius } from './BorderRadius';
|
|
5
5
|
import { BoxShadowProps } from './BoxShadow';
|
|
6
|
+
import { ImageProvider } from './ImageProvider';
|
|
6
7
|
export * from './Gradient';
|
|
7
8
|
type Valueof<T> = T[keyof T];
|
|
8
9
|
export type BoxFit = Valueof<typeof BoxFit>;
|
|
@@ -35,11 +36,8 @@ export declare enum BoxShape {
|
|
|
35
36
|
}
|
|
36
37
|
export declare function setBaseUrl(url: string): void;
|
|
37
38
|
export declare function normalizeSrc(src: string): string;
|
|
38
|
-
export type ImageProvider = string;
|
|
39
|
-
export declare const NetworkImage: (url: string) => string;
|
|
40
|
-
export declare const AssetImage: (url: string) => string;
|
|
41
39
|
export interface DecorationImageProps {
|
|
42
|
-
image: ImageProvider;
|
|
40
|
+
image: ImageProvider | string;
|
|
43
41
|
fit?: BoxFit;
|
|
44
42
|
alignment?: BoxAlignment;
|
|
45
43
|
repeat?: ImageRepeat;
|
package/dist/Image.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Alignment } from './Alignment';
|
|
2
|
+
import { ImageProvider } from './ImageProvider';
|
|
3
|
+
export type BoxFit = "fill" | "contain" | "cover" | "fitWidth" | "fitHeight" | "none" | "scaleDown";
|
|
4
|
+
export type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
5
|
+
interface Props {
|
|
6
|
+
image: ImageProvider;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
color?: string;
|
|
10
|
+
colorBlendMode?: BlendMode;
|
|
11
|
+
fit?: BoxFit;
|
|
12
|
+
alignment?: Alignment;
|
|
13
|
+
repeat?: "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space";
|
|
14
|
+
opacity?: number;
|
|
15
|
+
filterQuality?: "low" | "medium" | "high";
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
19
|
+
error: (event: Event) => any;
|
|
20
|
+
load: (event: Event) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
+
onError?: ((event: Event) => any) | undefined;
|
|
23
|
+
onLoad?: ((event: Event) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
alignment: Alignment;
|
|
26
|
+
repeat: "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space";
|
|
27
|
+
opacity: number;
|
|
28
|
+
fit: BoxFit;
|
|
29
|
+
filterQuality: "low" | "medium" | "high";
|
|
30
|
+
alt: string;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const IMAGE_PROVIDER_SYMBOL: unique symbol;
|
|
2
|
+
export interface ImageProvider {
|
|
3
|
+
src: string;
|
|
4
|
+
[IMAGE_PROVIDER_SYMBOL]: true;
|
|
5
|
+
}
|
|
6
|
+
export declare function isImageProvider(value: any): value is ImageProvider;
|
|
7
|
+
export declare function NetworkImage(url: string): ImageProvider;
|
|
8
|
+
/**
|
|
9
|
+
* Creates an ImageProvider from a Base64 string or Blob.
|
|
10
|
+
*
|
|
11
|
+
* @param data Base64 string (data:image/...) or Blob object
|
|
12
|
+
*/
|
|
13
|
+
export declare function MemoryImage(data: string | Blob): ImageProvider;
|
|
14
|
+
export interface AssetImageOptions {
|
|
15
|
+
package?: string;
|
|
16
|
+
bundle?: any;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 设置 AssetImage 的基础路径
|
|
20
|
+
* @param url 基础路径,例如 'https://cdn.example.com/assets/' 或 '/static/'
|
|
21
|
+
*/
|
|
22
|
+
export declare function setAssetBaseURL(url: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* 加载本地资源图片
|
|
25
|
+
* 注意:在 Vite 环境下,通常需要使用 new URL('./path', import.meta.url).href 或 import 导入图片
|
|
26
|
+
* 这里 AssetImage 接收的 name 应该是处理后的 URL 或者是相对于 public 的路径
|
|
27
|
+
*/
|
|
28
|
+
export declare function AssetImage(name: string, options?: AssetImageOptions): ImageProvider;
|
|
29
|
+
/**
|
|
30
|
+
* 创建一个预设 package 的 AssetImage 工厂函数
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const MyPkgAssets = createAssetImage({ package: 'my_pkg' });
|
|
34
|
+
* const img = MyPkgAssets('icons/logo.png'); // 相当于 AssetImage('icons/logo.png', { package: 'my_pkg' })
|
|
35
|
+
*/
|
|
36
|
+
export declare function createAssetImage(baseOptions: AssetImageOptions): (name: string, options?: AssetImageOptions) => ImageProvider;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BorderSide } from './Border';
|
|
2
|
+
import { BorderRadius } from './BorderRadius';
|
|
3
|
+
import { TextStyle } from './TextStyle';
|
|
4
|
+
export interface InputBorder {
|
|
5
|
+
borderSide?: BorderSide;
|
|
6
|
+
borderRadius?: BorderRadius;
|
|
7
|
+
isOutline?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function OutlineInputBorder(options?: {
|
|
10
|
+
borderSide?: BorderSide;
|
|
11
|
+
borderRadius?: BorderRadius;
|
|
12
|
+
}): InputBorder;
|
|
13
|
+
export declare function UnderlineInputBorder(options?: {
|
|
14
|
+
borderSide?: BorderSide;
|
|
15
|
+
borderRadius?: BorderRadius;
|
|
16
|
+
}): InputBorder;
|
|
17
|
+
export interface InputDecoration {
|
|
18
|
+
labelText?: string;
|
|
19
|
+
hintText?: string;
|
|
20
|
+
helperText?: string;
|
|
21
|
+
errorText?: string;
|
|
22
|
+
prefixText?: string;
|
|
23
|
+
suffixText?: string;
|
|
24
|
+
border?: InputBorder;
|
|
25
|
+
enabledBorder?: InputBorder;
|
|
26
|
+
focusedBorder?: InputBorder;
|
|
27
|
+
errorBorder?: InputBorder;
|
|
28
|
+
disabledBorder?: InputBorder;
|
|
29
|
+
filled?: boolean;
|
|
30
|
+
fillColor?: string;
|
|
31
|
+
contentPadding?: number | number[];
|
|
32
|
+
labelStyle?: TextStyle;
|
|
33
|
+
hintStyle?: TextStyle;
|
|
34
|
+
errorStyle?: TextStyle;
|
|
35
|
+
}
|
package/dist/Stack.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
22
22
|
declare const __VLS_component: import('vue').DefineComponent<StackProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StackProps> & Readonly<{}>, {
|
|
23
23
|
alignment: Alignment;
|
|
24
24
|
clipBehavior: "none" | "hardEdge" | "antiAlias" | "clip";
|
|
25
|
-
textDirection: "ltr" | "rtl";
|
|
26
25
|
fit: StackFit;
|
|
26
|
+
textDirection: "ltr" | "rtl";
|
|
27
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
29
|
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
maxLines?: number;
|
|
3
|
+
}
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
prefix?(_: {}): any;
|
|
8
|
+
suffix?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
maxLines: number;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
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
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { InputDecoration } from './InputDecoration';
|
|
2
|
+
import { TextStyle } from './TextStyle';
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue?: string | number;
|
|
5
|
+
decoration?: InputDecoration;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
obscureText?: boolean;
|
|
9
|
+
maxLines?: number | null;
|
|
10
|
+
minLines?: number;
|
|
11
|
+
keyboardType?: string;
|
|
12
|
+
style?: TextStyle;
|
|
13
|
+
cursorColor?: string;
|
|
14
|
+
autofocus?: boolean;
|
|
15
|
+
autoGrow?: boolean;
|
|
16
|
+
maxLength?: number;
|
|
17
|
+
textAlign?: "left" | "center" | "right" | "justify" | "start" | "end";
|
|
18
|
+
textInputAction?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
19
|
+
textCapitalization?: "none" | "sentences" | "words" | "characters";
|
|
20
|
+
autocorrect?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare function __VLS_template(): {
|
|
23
|
+
attrs: Partial<{}>;
|
|
24
|
+
slots: {
|
|
25
|
+
prefix?(_: {}): any;
|
|
26
|
+
suffix?(_: {}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
prefixRef: HTMLDivElement;
|
|
30
|
+
inputRef: unknown;
|
|
31
|
+
};
|
|
32
|
+
rootEl: any;
|
|
33
|
+
};
|
|
34
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
35
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
36
|
+
blur: (event: FocusEvent) => any;
|
|
37
|
+
focus: (event: FocusEvent) => any;
|
|
38
|
+
submit: (value: string) => any;
|
|
39
|
+
"update:modelValue": (value: string) => any;
|
|
40
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
41
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
42
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
43
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
44
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
maxLines: number | null;
|
|
48
|
+
textAlign: "left" | "center" | "right" | "justify" | "start" | "end";
|
|
49
|
+
modelValue: string | number;
|
|
50
|
+
readOnly: boolean;
|
|
51
|
+
obscureText: boolean;
|
|
52
|
+
autoGrow: boolean;
|
|
53
|
+
autocorrect: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
55
|
+
prefixRef: HTMLDivElement;
|
|
56
|
+
inputRef: unknown;
|
|
57
|
+
}, any>;
|
|
58
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.fluekit-button[data-v-a5efef4c]{appearance:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;text-align:inherit;box-sizing:border-box;background:0 0;border:0;outline:0;margin:0;padding:0}.fluekit-button[data-v-a5efef4c]:disabled{cursor:default}.flutter-list-view[data-v-7ba20c73]{flex-direction:column;display:flex}.list-view-shrink-wrap[data-v-7ba20c73]{flex:none}.flutter-stack[data-v-aefe47c2]>*{grid-area:1/1/2/2}.flutter-transform[data-v-7e66ebaa]{box-sizing:border-box}
|
|
1
|
+
.fluekit-button[data-v-a5efef4c]{appearance:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;text-align:inherit;box-sizing:border-box;background:0 0;border:0;outline:0;margin:0;padding:0}.fluekit-button[data-v-a5efef4c]:disabled{cursor:default}.fluekit-image[data-v-9d37b792]{display:block}.flutter-list-view[data-v-7ba20c73]{flex-direction:column;display:flex}.list-view-shrink-wrap[data-v-7ba20c73]{flex:none}.flutter-stack[data-v-aefe47c2]>*{grid-area:1/1/2/2}.fluekit-text-field[data-v-40723984]{margin-top:16px;font-family:inherit;position:relative}.fluekit-input-container[data-v-40723984]{box-sizing:border-box;width:100%}.fluekit-input-element[data-v-40723984]{width:100%;color:inherit;resize:none;background:0 0;border:none;outline:none;flex:1;margin:0;padding:0;font-family:inherit;font-size:16px}.fluekit-input-label[data-v-40723984]{z-index:1}.fluekit-input-footer[data-v-40723984]{justify-content:space-between;margin-top:4px;display:flex}.fluekit-input-helper[data-v-40723984]{color:#666;font-size:12px}.fluekit-input-helper-spacer[data-v-40723984]{flex:1}.fluekit-input-counter[data-v-40723984]{color:#666;margin-left:auto;font-size:12px}.fluekit-input-helper.is-error[data-v-40723984]{color:#f44336}.flutter-transform[data-v-7e66ebaa]{box-sizing:border-box}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { default as Fixed } from './Fixed';
|
|
|
10
10
|
export { default as GestureDetector } from './GestureDetector';
|
|
11
11
|
export { default as GridView } from './GridView';
|
|
12
12
|
export { default as IgnorePointer } from './IgnorePointer';
|
|
13
|
+
export { default as Image } from './Image';
|
|
13
14
|
export { default as ListView } from './ListView';
|
|
14
15
|
export { default as Opacity } from './Opacity';
|
|
15
16
|
export { default as Padding } from './Padding';
|
|
@@ -21,6 +22,8 @@ export { default as SizedBox } from './SizedBox';
|
|
|
21
22
|
export { default as Stack } from './Stack';
|
|
22
23
|
export { default as Sticky } from './Sticky';
|
|
23
24
|
export { default as Text } from './Text';
|
|
25
|
+
export { default as TextArea } from './TextArea';
|
|
26
|
+
export { default as TextField } from './TextField';
|
|
24
27
|
export { default as Transform } from './Transform';
|
|
25
28
|
export { default as Wrap } from './Wrap';
|
|
26
29
|
export * from './Border';
|
|
@@ -30,9 +33,11 @@ export * from './BorderRadius';
|
|
|
30
33
|
export * from './BoxShadow';
|
|
31
34
|
export * from './ButtonStyle';
|
|
32
35
|
export * from './EdgeInsets';
|
|
33
|
-
export * from './FlexProps';
|
|
34
36
|
export { Alignment as Alignment } from './FlexProps';
|
|
35
37
|
export * from './Gradient';
|
|
38
|
+
export * from './ImageProvider';
|
|
39
|
+
export * from './InputDecoration';
|
|
36
40
|
export * from './Size';
|
|
37
41
|
export * from './TextStyle';
|
|
38
42
|
export { px2vw, setDefaultVW, setTransform } from './px2vw';
|
|
43
|
+
export { setAssetBaseURL, createAssetImage, MemoryImage } from './ImageProvider';
|