fluekit 2.6.8 → 2.7.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.
@@ -22,15 +22,15 @@ export type Alignment = keyof typeof Alignment | string;
22
22
  */
23
23
  export declare function alignmentToFlex(alignment: Alignment, direction?: "row" | "column"): CSSProperties;
24
24
  export declare const alignmentToStyle: typeof alignmentToFlex;
25
+ /**
26
+ * Alignment to CSS transform-origin
27
+ */
28
+ export declare const alignmentToOrigin: typeof alignmentToCssPosition;
25
29
  /**
26
30
  * 将 Alignment 转换为 CSS background-position / object-position 字符串
27
31
  * e.g. "left top", "center", "right bottom"
28
32
  */
29
33
  export declare function alignmentToCssPosition(alignment: Alignment): string;
30
- /**
31
- * 将 Alignment 转换为 CSS transform-origin
32
- */
33
- export declare function alignmentToOrigin(alignment: Alignment): string;
34
34
  /**
35
35
  * 将 Alignment 转换为 Grid Alignment (justify-items / align-items)
36
36
  * 用于 Stack
package/dist/Button.d.ts CHANGED
@@ -14,6 +14,7 @@ interface Props {
14
14
  pressedOpacity?: number;
15
15
  padding?: EdgeInsets;
16
16
  borderRadius?: BorderRadius;
17
+ type?: HTMLButtonElement["type"];
17
18
  }
18
19
  declare function __VLS_template(): {
19
20
  attrs: Partial<{}>;
@@ -25,12 +26,14 @@ declare function __VLS_template(): {
25
26
  };
26
27
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
28
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ click: (payload: Event) => any;
28
30
  "long-press": () => any;
29
31
  pressed: () => any;
30
32
  "tap-down": (payload: any) => any;
31
33
  "tap-up": (payload: any) => any;
32
34
  "tap-cancel": (payload: any) => any;
33
35
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
36
+ onClick?: ((payload: Event) => any) | undefined;
34
37
  "onLong-press"?: (() => any) | undefined;
35
38
  onPressed?: (() => any) | undefined;
36
39
  "onTap-down"?: ((payload: any) => any) | undefined;
package/dist/Divider.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Color } from './Color';
2
2
  interface Props {
3
- height?: number;
4
3
  thickness?: number;
5
4
  indent?: number;
6
5
  endIndent?: number;
@@ -9,7 +8,6 @@ interface Props {
9
8
  }
10
9
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
11
10
  color: string | Color;
12
- height: number;
13
11
  vertical: boolean;
14
12
  thickness: number;
15
13
  indent: number;
@@ -0,0 +1,10 @@
1
+ import { InjectionKey } from 'vue';
2
+ export interface FlueConfigsProps {
3
+ transform?: boolean;
4
+ designWidth?: number;
5
+ assetBaseURL?: string;
6
+ toastCount?: number;
7
+ }
8
+ export declare const FlueConfigInjectionKey: InjectionKey<FlueConfigsProps>;
9
+ export declare const useFlueConfig: () => FlueConfigsProps | undefined;
10
+ export declare const provideFlueConfig: (config: FlueConfigsProps) => void;
@@ -1,8 +1,4 @@
1
- interface Props {
2
- transform?: boolean;
3
- designWidth?: number;
4
- assetBaseURL?: string;
5
- }
1
+ import { FlueConfigsProps } from './FlueConfig';
6
2
  declare function __VLS_template(): {
7
3
  attrs: Partial<{}>;
8
4
  slots: {
@@ -12,10 +8,11 @@ declare function __VLS_template(): {
12
8
  rootEl: any;
13
9
  };
14
10
  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<{}>, {
11
+ declare const __VLS_component: import('vue').DefineComponent<FlueConfigsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FlueConfigsProps> & Readonly<{}>, {
16
12
  transform: boolean;
17
13
  designWidth: number;
18
14
  assetBaseURL: string;
15
+ toastCount: number;
19
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
17
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
18
  export default _default;
@@ -1,16 +1,4 @@
1
- import { EdgeInsets } from './EdgeInsets';
2
- interface Props {
3
- scrollDirection?: "vertical" | "horizontal";
4
- padding?: EdgeInsets;
5
- physics?: "bouncing" | "clamping" | "never" | "always";
6
- shrinkWrap?: boolean;
7
- clipBehavior?: "none" | "hardEdge" | "antiAlias";
8
- crossAxisCount?: number;
9
- mainAxisSpacing?: number;
10
- crossAxisSpacing?: number;
11
- childAspectRatio?: number;
12
- itemCount?: number;
13
- }
1
+ import { GridViewProps } from './Scrollable';
14
2
  declare function __VLS_template(): {
15
3
  attrs: Partial<{}>;
16
4
  slots: {
@@ -23,15 +11,15 @@ declare function __VLS_template(): {
23
11
  rootEl: any;
24
12
  };
25
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
27
- clipBehavior: "none" | "hardEdge" | "antiAlias";
28
- scrollDirection: "vertical" | "horizontal";
29
- physics: "bouncing" | "clamping" | "never" | "always";
30
- shrinkWrap: boolean;
14
+ 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;
31
16
  crossAxisCount: number;
32
17
  mainAxisSpacing: number;
33
18
  crossAxisSpacing: number;
34
19
  childAspectRatio: number;
20
+ scrollDirection: "vertical" | "horizontal";
21
+ physics: import('./Scrollable').ScrollablePhysics;
22
+ shrinkWrap: boolean;
35
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
25
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { Alignment } from './Alignment';
1
2
  export type LiquidGlassDialogActionStyle = "default" | "primary";
2
3
  export interface LiquidGlassDialogAction {
3
4
  title: string;
@@ -18,6 +19,7 @@ export interface LiquidGlassDialogProps {
18
19
  title?: string;
19
20
  message?: string;
20
21
  actions: LiquidGlassDialogAction[];
22
+ alignment?: Alignment;
21
23
  }
22
24
  declare const _default: import('vue').DefineComponent<LiquidGlassDialogProps, {
23
25
  close: () => void;
@@ -33,6 +35,7 @@ declare const _default: import('vue').DefineComponent<LiquidGlassDialogProps, {
33
35
  onAfterClose?: (() => any) | undefined;
34
36
  }>, {
35
37
  title: string;
38
+ alignment: Alignment;
36
39
  message: string;
37
40
  actions: LiquidGlassDialogAction[];
38
41
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,15 +1,5 @@
1
- import { EdgeInsets } from './EdgeInsets';
2
- interface Props {
3
- scrollDirection?: "vertical" | "horizontal";
4
- padding?: EdgeInsets;
5
- physics?: "bouncing" | "clamping" | "never" | "always";
6
- shrinkWrap?: boolean;
7
- itemCount?: number;
8
- itemExtent?: number;
9
- separator?: boolean;
10
- clipBehavior?: "none" | "hardEdge" | "antiAlias";
11
- onRefresh?: () => Promise<void>;
12
- }
1
+ import { ListViewProps } from './Scrollable';
2
+ import { Clip } from './Clip';
13
3
  declare function __VLS_template(): {
14
4
  attrs: Partial<{}>;
15
5
  slots: {
@@ -25,11 +15,11 @@ declare function __VLS_template(): {
25
15
  rootEl: any;
26
16
  };
27
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
18
+ declare const __VLS_component: import('vue').DefineComponent<ListViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ListViewProps> & Readonly<{}>, {
29
19
  separator: boolean;
30
- clipBehavior: "none" | "hardEdge" | "antiAlias";
20
+ clipBehavior: Clip;
31
21
  scrollDirection: "vertical" | "horizontal";
32
- physics: "bouncing" | "clamping" | "never" | "always";
22
+ physics: import('./Scrollable').ScrollablePhysics;
33
23
  shrinkWrap: boolean;
34
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,18 +1,4 @@
1
- import { EdgeInsets } from './EdgeInsets';
2
- interface Props {
3
- /** 滚动方向 */
4
- scrollDirection?: "vertical" | "horizontal";
5
- /** 内边距 */
6
- padding?: EdgeInsets;
7
- /** 物理滚动效果模拟(主要影响 CSS overflow 行为) */
8
- physics?: "bouncing" | "clamping" | "never" | "always";
9
- /** 裁剪行为 */
10
- clipBehavior?: "none" | "hardEdge" | "antiAlias";
11
- /** 是否反向滚动 (暂未完全实现,预留接口) */
12
- reverse?: boolean;
13
- /** 是否根据内容收缩 */
14
- shrinkWrap?: boolean;
15
- }
1
+ import { ScrollableProps } from './Scrollable';
16
2
  declare function __VLS_template(): {
17
3
  attrs: Partial<{}>;
18
4
  slots: {
@@ -24,7 +10,7 @@ declare function __VLS_template(): {
24
10
  rootEl: any;
25
11
  };
26
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
- declare const __VLS_component: import('vue').DefineComponent<Props, {
13
+ declare const __VLS_component: import('vue').DefineComponent<ScrollableProps, {
28
14
  scrollRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
29
15
  scrollTo: (options: ScrollToOptions) => void;
30
16
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -36,7 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
36
22
  }) => any;
37
23
  scrollStart: () => any;
38
24
  scrollEnd: () => any;
39
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
25
+ }, string, import('vue').PublicProps, Readonly<ScrollableProps> & Readonly<{
40
26
  onScroll?: ((payload: {
41
27
  scrollTop: number;
42
28
  scrollLeft: number;
@@ -47,9 +33,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
47
33
  onScrollEnd?: (() => any) | undefined;
48
34
  }>, {
49
35
  reverse: boolean;
50
- clipBehavior: "none" | "hardEdge" | "antiAlias";
36
+ clipBehavior: import('./Clip').Clip;
51
37
  scrollDirection: "vertical" | "horizontal";
52
- physics: "bouncing" | "clamping" | "never" | "always";
38
+ physics: import('./Scrollable').ScrollablePhysics;
53
39
  shrinkWrap: boolean;
54
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
55
41
  scrollRef: HTMLDivElement;
@@ -0,0 +1,31 @@
1
+ import { EdgeInsets } from './EdgeInsets';
2
+ import { Clip } from './Clip';
3
+ export type ScrollablePhysics = "bouncing" | "clamping" | "never" | "always";
4
+ export interface ScrollableProps {
5
+ /** 滚动方向 */
6
+ scrollDirection?: "vertical" | "horizontal";
7
+ /** 内边距 */
8
+ padding?: EdgeInsets;
9
+ /** 物理滚动效果模拟(主要影响 CSS overflow 行为) */
10
+ physics?: ScrollablePhysics;
11
+ /** 裁剪行为 */
12
+ clipBehavior?: Clip;
13
+ /** 是否反向滚动 (暂未完全实现,预留接口) */
14
+ reverse?: boolean;
15
+ /** 是否根据内容收缩 */
16
+ shrinkWrap?: boolean;
17
+ }
18
+ export interface ListViewProps extends ScrollableProps {
19
+ shrinkWrap?: boolean;
20
+ itemCount?: number;
21
+ itemExtent?: number;
22
+ separator?: boolean;
23
+ onRefresh?: () => Promise<void>;
24
+ }
25
+ export interface GridViewProps extends ScrollableProps {
26
+ crossAxisCount?: number;
27
+ mainAxisSpacing?: number;
28
+ crossAxisSpacing?: number;
29
+ childAspectRatio?: number;
30
+ itemCount?: number;
31
+ }
package/dist/Toast.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export type ToastPosition = "center" | "top-center" | "bottom-center" | "top-left" | "bottom-left" | "top-right" | "bottom-right" | "center-left" | "center-right";
2
- export type ToastType = "success" | "failed" | "error" | "loading" | "info" | "warning";
3
- export interface ToastOptions {
4
- message: string;
5
- duration?: number;
6
- position?: ToastPosition;
7
- type?: ToastType;
8
- icon?: string;
9
- zIndex?: number;
10
- backgroundColor?: string;
11
- textColor?: string;
12
- single?: boolean;
1
+ import { ToastOptions } from './ToastComponent';
2
+ export declare let toastCount: number;
3
+ export declare function setVisibleToasts(count: number): void;
4
+ export interface ToastInstance {
5
+ hide: () => void;
13
6
  }
14
- declare const _default: import('vue').DefineComponent<{}, {
15
- add: (options: ToastOptions) => number;
16
- remove: (id: number) => void;
17
- removeLast: () => void;
18
- clear: () => void;
19
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
- export default _default;
7
+ export declare function hideToast(all?: boolean): void;
8
+ export declare function showToast(message: string, options?: Omit<ToastOptions, "message">): ToastInstance;
9
+ export declare const Toast: {
10
+ show: typeof showToast;
11
+ success(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
12
+ failed(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
13
+ error(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
14
+ info(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
15
+ warning(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
16
+ loading(message: string, options?: Omit<ToastOptions, "message" | "type">): ToastInstance;
17
+ hide: typeof hideToast;
18
+ };
19
+ export type Toast = typeof Toast;
20
+ export { Toast as toast };
@@ -0,0 +1,25 @@
1
+ export type ToastPosition = "center" | "top-center" | "bottom-center" | "top-left" | "bottom-left" | "top-right" | "bottom-right" | "center-left" | "center-right";
2
+ export type ToastType = "success" | "failed" | "error" | "loading" | "info" | "warning";
3
+ export interface ToastOptions {
4
+ message: string;
5
+ duration?: number;
6
+ position?: ToastPosition;
7
+ type?: ToastType;
8
+ icon?: string;
9
+ zIndex?: number;
10
+ backgroundColor?: string;
11
+ textColor?: string;
12
+ single?: boolean;
13
+ }
14
+ declare function remove(id: number): void;
15
+ declare function removeLast(): void;
16
+ declare function clear(): void;
17
+ declare function setVisibleToasts(count: number): void;
18
+ declare const _default: import('vue').DefineComponent<{}, {
19
+ add: (options: ToastOptions) => number;
20
+ remove: typeof remove;
21
+ removeLast: typeof removeLast;
22
+ clear: typeof clear;
23
+ setVisibleToasts: typeof setVisibleToasts;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -12,11 +12,6 @@ interface Props {
12
12
  * 对应 Flutter 的 alignment
13
13
  */
14
14
  alignment?: Alignment;
15
- /**
16
- * 具体的原点偏移 (CSS transform-origin)
17
- * 如果提供了 alignment,origin 会被忽略或合并(取决于实现,这里优先 alignment)
18
- */
19
- origin?: string;
20
15
  }
21
16
  declare function __VLS_template(): {
22
17
  attrs: Partial<{}>;
@@ -0,0 +1 @@
1
+ export {};
package/dist/device.d.ts CHANGED
@@ -7,3 +7,8 @@ export declare const isIOS: boolean;
7
7
  export declare const isMacOS: boolean;
8
8
  export declare const checkMobile: () => boolean;
9
9
  export declare const isMobile: boolean;
10
+ export type DeviceType = "phone" | "tablet" | "desktop";
11
+ export declare function getDeviceType(): DeviceType;
12
+ export declare const isPhone: boolean;
13
+ export declare const isTablet: boolean;
14
+ export declare const isDesktop: boolean;
package/dist/index.d.ts CHANGED
@@ -33,8 +33,8 @@ export { default as TextArea } from './TextArea';
33
33
  export { default as LiquidGlassDialog, type LiquidGlassDialogAction, type LiquidGlassDialogProps, type LiquidGlassDialogActionPayload, type LiquidGlassDialogActionStyle, } from './LiquidGlassDialog';
34
34
  export * from './showLiquidGlassDialog';
35
35
  export { default as TextField } from './TextField';
36
- export { Toast } from './Toast';
37
- export type { ToastType, ToastOptions, ToastPosition } from './Toast';
36
+ export { Toast, toast, showToast, hideToast } from './Toast';
37
+ export type { ToastType, ToastOptions, ToastPosition } from './ToastComponent';
38
38
  export { default as Transform } from './Transform';
39
39
  export { default as Wrap } from './Wrap';
40
40
  export { default as Divider } from './Divider';