comfy-tool 1.0.2 → 1.0.4

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.
Files changed (41) hide show
  1. package/@types/components/global.d.ts +3 -0
  2. package/@types/components/index.d.ts +4 -3
  3. package/@types/components/layout/Column/Column.d.ts +9 -0
  4. package/@types/components/layout/Column/index.d.ts +14 -0
  5. package/@types/components/layout/{Expended.vue.d.ts → Expended/Expended.d.ts} +16 -13
  6. package/@types/components/layout/Expended/index.d.ts +38 -0
  7. package/@types/components/layout/Row/Row.d.ts +9 -0
  8. package/@types/components/layout/Row/index.d.ts +14 -0
  9. package/@types/components/utils/layer/Component.d.ts +9 -9
  10. package/@types/components/utils/layer/index.d.ts +1 -1
  11. package/@types/components/utils/layer/layer.d.ts +13 -20
  12. package/@types/constants/library.d.ts +3 -0
  13. package/@types/demo/App.vue.d.ts +3 -0
  14. package/@types/demo/components/AppDialog.vue.d.ts +23 -0
  15. package/@types/demo/components/Child.vue.d.ts +5 -0
  16. package/@types/demo/components/Child2.vue.d.ts +5 -0
  17. package/@types/demo/components/Dialog.vue.d.ts +20 -0
  18. package/@types/demo/components/TestWorld.vue.d.ts +5 -0
  19. package/@types/demo/hooks/use-layer.d.ts +5 -0
  20. package/@types/globals.d.ts +3 -9
  21. package/@types/index.d.ts +2 -3
  22. package/@types/shims-vue.d.ts +2 -1
  23. package/@types/utils/app/installer.d.ts +8 -0
  24. package/@types/utils/tools.d.ts +11 -0
  25. package/@types/utils/ui/index.d.ts +3 -0
  26. package/@types/utils/util/basic.d.ts +2 -6
  27. package/@types/utils/util/date.d.ts +1 -1
  28. package/@types/utils/util/index.d.ts +5 -10
  29. package/@types/utils/util/url.d.ts +21 -2
  30. package/LICENSE +1 -1
  31. package/README.md +76 -24
  32. package/dist/index.css +1 -1
  33. package/dist/index.min.js +1 -1
  34. package/es/index.mjs +381 -767
  35. package/es/utils.mjs +484 -0
  36. package/lib/index.js +1 -1
  37. package/lib/utils.js +1 -0
  38. package/package.json +32 -15
  39. package/web-types.json +1 -0
  40. package/@types/components/layout/Column.vue.d.ts +0 -26
  41. package/@types/components/layout/Row.vue.d.ts +0 -26
@@ -0,0 +1,3 @@
1
+ import '../css/index.scss';
2
+ import type { App } from 'vue';
3
+ export default function useGlobalComponents(app: App): void;
@@ -1,3 +1,4 @@
1
- import type { App } from 'vue';
2
- import '../css/index.scss';
3
- export default function useGlobalComponents(app: App): void;
1
+ export * from './layout/Column';
2
+ export * from './layout/Row';
3
+ export * from './layout/Expended';
4
+ export * from './utils/layer';
@@ -0,0 +1,9 @@
1
+ import './index.scss';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ reverse: BooleanConstructor;
4
+ }>, import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5
+ reverse: BooleanConstructor;
6
+ }>> & Readonly<{}>, {
7
+ reverse: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import _Column from './Column';
2
+ export declare const Column: import("../../../utils/app/component").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ reverse: BooleanConstructor;
4
+ }>, import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5
+ reverse: BooleanConstructor;
6
+ }>> & Readonly<{}>, {
7
+ reverse: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
9
+ export default Column;
10
+ declare module 'vue' {
11
+ interface GlobalComponents {
12
+ column: typeof _Column;
13
+ }
14
+ }
@@ -1,14 +1,7 @@
1
+ import './index.scss';
1
2
  import { PropType } from "vue";
2
- type _style = {
3
- flex: string | number;
4
- width?: string;
5
- height?: string;
6
- minWidth?: string;
7
- minHeight?: string;
8
- maxWidth?: string;
9
- maxHeight?: string;
10
- };
11
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /** 当需要设定宽高时可能需要设置为 `-`;需要撑满容器时设置为 `100%` */
12
5
  flex: {
13
6
  type: PropType<"-" | "100%" | number>;
14
7
  default: number;
@@ -18,13 +11,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
18
11
  minWidth: (StringConstructor | NumberConstructor)[];
19
12
  minHeight: (StringConstructor | NumberConstructor)[];
20
13
  maxWidth: (StringConstructor | NumberConstructor)[];
14
+ /**
15
+ * @description 最大高度
16
+ * @default 'none'
17
+ */
21
18
  maxHeight: (StringConstructor | NumberConstructor)[];
19
+ /** 启用flexbox横向布局 */
22
20
  row: BooleanConstructor;
21
+ /** 启用flexbox纵向布局 */
23
22
  column: BooleanConstructor;
24
- }>, {
25
- style: _style;
26
- className: string[];
27
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ /** 当需要设定宽高时可能需要设置为 `-`;需要撑满容器时设置为 `100%` */
28
25
  flex: {
29
26
  type: PropType<"-" | "100%" | number>;
30
27
  default: number;
@@ -34,8 +31,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
34
31
  minWidth: (StringConstructor | NumberConstructor)[];
35
32
  minHeight: (StringConstructor | NumberConstructor)[];
36
33
  maxWidth: (StringConstructor | NumberConstructor)[];
34
+ /**
35
+ * @description 最大高度
36
+ * @default 'none'
37
+ */
37
38
  maxHeight: (StringConstructor | NumberConstructor)[];
39
+ /** 启用flexbox横向布局 */
38
40
  row: BooleanConstructor;
41
+ /** 启用flexbox纵向布局 */
39
42
  column: BooleanConstructor;
40
43
  }>> & Readonly<{}>, {
41
44
  column: boolean;
@@ -0,0 +1,38 @@
1
+ import _Expended from './Expended';
2
+ export declare const Expended: import("../../../utils/app/component").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ flex: {
4
+ type: import("vue").PropType<"-" | "100%" | number>;
5
+ default: number;
6
+ };
7
+ width: (StringConstructor | NumberConstructor)[];
8
+ height: (StringConstructor | NumberConstructor)[];
9
+ minWidth: (StringConstructor | NumberConstructor)[];
10
+ minHeight: (StringConstructor | NumberConstructor)[];
11
+ maxWidth: (StringConstructor | NumberConstructor)[];
12
+ maxHeight: (StringConstructor | NumberConstructor)[];
13
+ row: BooleanConstructor;
14
+ column: BooleanConstructor;
15
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ flex: {
17
+ type: import("vue").PropType<"-" | "100%" | number>;
18
+ default: number;
19
+ };
20
+ width: (StringConstructor | NumberConstructor)[];
21
+ height: (StringConstructor | NumberConstructor)[];
22
+ minWidth: (StringConstructor | NumberConstructor)[];
23
+ minHeight: (StringConstructor | NumberConstructor)[];
24
+ maxWidth: (StringConstructor | NumberConstructor)[];
25
+ maxHeight: (StringConstructor | NumberConstructor)[];
26
+ row: BooleanConstructor;
27
+ column: BooleanConstructor;
28
+ }>> & Readonly<{}>, {
29
+ column: boolean;
30
+ row: boolean;
31
+ flex: number | "-" | "100%";
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
33
+ export default Expended;
34
+ declare module 'vue' {
35
+ interface GlobalComponents {
36
+ expended: typeof _Expended;
37
+ }
38
+ }
@@ -0,0 +1,9 @@
1
+ import './index.scss';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ reverse: BooleanConstructor;
4
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5
+ reverse: BooleanConstructor;
6
+ }>> & Readonly<{}>, {
7
+ reverse: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import _Row from './Row';
2
+ export declare const Row: import("../../../utils/app/component").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ reverse: BooleanConstructor;
4
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5
+ reverse: BooleanConstructor;
6
+ }>> & Readonly<{}>, {
7
+ reverse: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
9
+ export default Row;
10
+ declare module 'vue' {
11
+ interface GlobalComponents {
12
+ row: typeof _Row;
13
+ }
14
+ }
@@ -1,13 +1,12 @@
1
1
  import type { Ref, CSSProperties } from "vue";
2
2
  import { LayerOptions } from "./layer";
3
- declare const VanDialog: VueComponentConstructor;
4
- type noReadonly<T> = {
5
- -readonly [P in keyof T]: T[P];
6
- };
7
3
  type GetVueProps<T> = {
8
4
  [P in keyof T]: T[P] | Ref<T[P]>;
9
5
  };
10
- export type VueComponentConstructor = abstract new (...args: any) => any;
6
+ type VueComponentConstructor = (abstract new (...args: any) => any);
7
+ type GetComponentProps<C extends VueComponentConstructor> = GetVueProps<InstanceType<C>['$props']>;
8
+ export type LayerComponent = VueComponentConstructor;
9
+ export type LayerComponentProps<C extends VueComponentConstructor> = GetComponentProps<C>;
11
10
  export type LayerControler<T, C extends VueComponentConstructor, B extends VueComponentConstructor> = {
12
11
  init(options?: Partial<LayerState<C, B> & LayerOptions<T>>, _defaultOptions?: Partial<LayerState<C, B>>): void;
13
12
  open(options?: Partial<LayerState<C, B>>): void;
@@ -15,8 +14,9 @@ export type LayerControler<T, C extends VueComponentConstructor, B extends VueCo
15
14
  close(action?: 'complete' | 'cancel'): void;
16
15
  cancel(): void;
17
16
  };
18
- type ElDialogProps = noReadonly<GetVueProps<InstanceType<typeof VanDialog>['$props']>>;
19
- export interface LayerProps extends ElDialogProps {
17
+ export interface LayerProps {
18
+ width?: string | number;
19
+ height?: string | number;
20
20
  class?: string;
21
21
  style?: CSSProperties;
22
22
  onClose?(action?: 'complete' | 'cancel'): void;
@@ -25,9 +25,9 @@ export interface LayerState<C extends VueComponentConstructor, B extends VueComp
25
25
  show: boolean;
26
26
  keepAlive: boolean;
27
27
  baseContent?: B;
28
- baseContentProps?: GetVueProps<InstanceType<B>['$props']>;
28
+ baseContentProps?: GetComponentProps<B>;
29
29
  content: C;
30
- contentProps?: GetVueProps<InstanceType<C>['$props']>;
30
+ contentProps?: GetComponentProps<C>;
31
31
  }
32
32
  declare const _default: import("vue").DefineComponent<{}, () => "" | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
33
  [key: string]: any;
@@ -1,2 +1,2 @@
1
1
  export { Layer } from './layer';
2
- export type { LayerProps, LayerInstance, LayerOptions, LayerState, LayerControler, VueComponentConstructor } from './layer';
2
+ export type { LayerProps, LayerInstance, LayerOptions, LayerState, LayerControler, LayerComponent, LayerComponentProps } from './layer';
@@ -1,31 +1,24 @@
1
1
  import { PopupCreator, VueComponent } from '../../../plugins/PopupCreator';
2
- import { LayerState, LayerProps, VueComponentConstructor } from './Component';
3
- export type { LayerState, LayerProps, LayerControler, VueComponentConstructor } from './Component';
4
- export type LayerOptions<T = any, C extends VueComponentConstructor = any, B extends VueComponentConstructor = any> = Partial<LayerState<C, B>> & {
2
+ import { LayerState, LayerProps, LayerComponent } from './Component';
3
+ export type { LayerState, LayerProps, LayerControler, LayerComponent, LayerComponentProps } from './Component';
4
+ export type LayerOptions<T = any, C extends LayerComponent = any, B extends LayerComponent = any> = Partial<LayerState<C, B>> & {
5
5
  onConfirm?: (data: T, close: (action?: 'complete' | 'cancel') => void) => void | boolean;
6
6
  onClose?(action?: 'complete' | 'cancel'): void;
7
7
  };
8
- export type LayerInstance<T, C extends VueComponentConstructor, B extends VueComponentConstructor> = _Layer<T, C, B>;
9
- declare class _Layer<T, C extends VueComponentConstructor, B extends VueComponentConstructor> extends PopupCreator<LayerProps, LayerState<C, B>> {
8
+ export type LayerInstance<T, C extends LayerComponent, B extends LayerComponent> = _Layer<T, C, B>;
9
+ declare class _Layer<T, C extends LayerComponent, B extends LayerComponent> extends PopupCreator<LayerProps, LayerState<C, B>> {
10
10
  constructor(component: VueComponent, props: Partial<LayerProps>);
11
11
  open(options: LayerOptions<T, C>): any;
12
- static create<T, C extends VueComponentConstructor, B extends VueComponentConstructor>(props?: Partial<LayerProps>, isNew?: boolean): _Layer<T, C, B>;
12
+ static create<T, C extends LayerComponent, B extends LayerComponent>(props?: Partial<LayerProps>, isNew?: boolean): _Layer<T, C, B>;
13
13
  }
14
- export declare function Layer<T, C extends VueComponentConstructor = any, B extends VueComponentConstructor = any>(options: RequiredOf<LayerOptions<T, C, B>, 'content'>, isNew?: boolean): Promise<T>;
14
+ /**
15
+ * 创建并打开一个弹层组件
16
+ * @param options 图层配置选项,必须包含content属性
17
+ * @param isNew 是否为新弹层,默认为false
18
+ * @returns 返回一个Promise,成功时resolve弹层数据,失败时reject关闭操作
19
+ */
20
+ export declare function Layer<T, C extends LayerComponent = any, B extends LayerComponent = any>(options: RequiredOf<LayerOptions<T, C, B>, 'content'>, isNew?: boolean): Promise<T>;
15
21
  export declare namespace Layer {
16
22
  var create: typeof _Layer.create;
17
23
  var close: () => void;
18
- var Component: import("vue").DefineComponent<{}, () => "" | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
19
- [key: string]: any;
20
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "close" | "confirm")[], "cancel" | "close" | "confirm", import("vue").PublicProps, Readonly<{}> & Readonly<{
21
- onCancel?: ((...args: any[]) => any) | undefined;
22
- onClose?: ((...args: any[]) => any) | undefined;
23
- onConfirm?: ((...args: any[]) => any) | undefined;
24
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any> | import("../../../utils/app/component").WithInstall<import("vue").DefineComponent<{}, () => "" | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
25
- [key: string]: any;
26
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "close" | "confirm")[], "cancel" | "close" | "confirm", import("vue").PublicProps, Readonly<{}> & Readonly<{
27
- onCancel?: ((...args: any[]) => any) | undefined;
28
- onClose?: ((...args: any[]) => any) | undefined;
29
- onConfirm?: ((...args: any[]) => any) | undefined;
30
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
31
24
  }
@@ -0,0 +1,3 @@
1
+ export declare const ORDER_EN: string[];
2
+ export declare const ORDER_CN: string[];
3
+ export declare const WEEK_TEXT: string[][];
@@ -0,0 +1,3 @@
1
+ import 'element-plus/dist/index.css';
2
+ declare const _default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ show: boolean;
3
+ };
4
+ declare var __VLS_11: string | number, __VLS_12: {}, __VLS_15: {}, __VLS_17: {};
5
+ type __VLS_Slots = {} & {
6
+ [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
7
+ } & {
8
+ title?: (props: typeof __VLS_15) => any;
9
+ } & {
10
+ header?: (props: typeof __VLS_17) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:show": (...args: any[]) => void;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ childMessage?: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ childMessage?: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ show?: boolean;
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:show": (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Layer, LayerComponent, LayerComponentProps } from '../../index';
2
+ export declare function elLayer<C extends LayerComponent>(options: {
3
+ content: C;
4
+ contentProps: LayerComponentProps<C>;
5
+ } & Parameters<typeof Layer>[0]): void;
@@ -1,7 +1,5 @@
1
+ import type { LayerControler, LayerComponent } from '.';
1
2
  import type { Ref } from "vue";
2
- import type Column from './components/layout/Column.vue.d.ts';
3
- import type Row from './components/layout/Row.vue.d.ts';
4
- import type Expended from './components/layout/Expended.vue.d.ts';
5
3
  declare global {
6
4
  interface Window {
7
5
 
@@ -51,11 +49,7 @@ declare global {
51
49
  beforeScroll?(next:()=>void, options:ScrollToOptions, container:HTMLElement):void
52
50
  }
53
51
  }
54
- declare module '@vue/runtime-core' {
55
- export interface GlobalComponents {
56
- column: typeof Column,
57
- row: typeof Row,
58
- expended: typeof Expended,
59
- }
52
+ declare module 'vue' {
53
+ export function inject<T, C extends LayerComponent=any>(key:'Layer', d?: LayerControler<T, C>):LayerControler<T, C>|undefined;
60
54
  }
61
55
  export {};
package/@types/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import type { App } from 'vue';
2
2
  import { Util } from './utils/index';
3
- export { configComfyTool } from './utils/ui/install';
3
+ export * from './components';
4
+ export * from './utils/app/installer';
4
5
  export { resourceLoader } from './utils/index';
5
- export * from './components/utils/layer';
6
6
  export { version } from './constants/version';
7
7
  export declare const ComfyTool: typeof Util;
8
- export declare function useComfyTool(app: App): void;
9
8
  declare const installer: {
10
9
  install(app: App): void;
11
10
  };
@@ -2,4 +2,5 @@ declare module '*.vue' {
2
2
  import { DefineComponent } from 'vue';
3
3
  const component: DefineComponent<{}, {}, any>;
4
4
  export default component;
5
- }
5
+ }
6
+
@@ -0,0 +1,8 @@
1
+ import type { App } from 'vue';
2
+ export { configComfyTool } from '../ui/install';
3
+ /**
4
+ * 全量安装 ComfyTool
5
+ * @export
6
+ * @param {App} app
7
+ */
8
+ export declare function useComfyTool(app: App): void;
@@ -0,0 +1,11 @@
1
+ /** 通用函数在此导入 */
2
+ export * from './util/url';
3
+ export * from './util/cloneObject';
4
+ export * from './util/formate';
5
+ export * from './util/basic';
6
+ export * from './util/array';
7
+ export * from './util/number';
8
+ export * from './util/date';
9
+ export * from './util/week';
10
+ export * from './util/function';
11
+ export * from './util/string';
@@ -1,3 +1,6 @@
1
+ export declare function noop(): void;
2
+ export declare function noopCatch(err: any): void;
3
+ export declare function errorCatch(err: string): void;
1
4
  export declare function $toast(msg: string): void;
2
5
  export declare function $alert(msg: string): void;
3
6
  export declare const $loading: {
@@ -1,8 +1,4 @@
1
- import { Util } from "..";
2
1
  type ObjectType = 'Object' | 'Array' | 'FormData' | 'Undefined' | 'Null' | 'Number' | 'String' | 'Function' | 'Boolnean' | 'Error' | 'Promise';
3
- export declare function noop(): void;
4
- export declare function noopCatch(err: any): void;
5
- export declare function errorCatch(err: string): void;
6
2
  export declare const extend: {
7
3
  <T extends {}, U>(target: T, source: U): T & U;
8
4
  <T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
@@ -26,7 +22,7 @@ export type Writeable<T> = {
26
22
  * @param {boolean} [ignoreUndefined=false]
27
23
  * @return {*}
28
24
  */
29
- export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>, ignoreUndefined?: boolean): Util.Writeable<Pick<T, U>>;
25
+ export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>, ignoreUndefined?: boolean): Writeable<Pick<T, U>>;
30
26
  /**
31
27
  * 从对象中取出非指定属性
32
28
  *
@@ -38,7 +34,7 @@ export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U
38
34
  * @param {boolean} [ignoreUndefined=false]
39
35
  * @return {*}
40
36
  */
41
- export declare function pickEx<T extends Object, U extends keyof T>(obj: T, keys: Array<U>, ignoreUndefined?: boolean): Util.Writeable<PickEx<T, U>>;
37
+ export declare function pickEx<T extends Object, U extends keyof T>(obj: T, keys: Array<U>, ignoreUndefined?: boolean): Writeable<PickEx<T, U>>;
42
38
  /**
43
39
  * 类型判断
44
40
  *
@@ -13,7 +13,7 @@ interface configDate<T> {
13
13
  *
14
14
  * @export
15
15
  * @param {(Date|number)} date
16
- * @param {string} [format] YYYY-MM-DD HH:mm:SS
16
+ * @param {string} [format] YYYY-MM-DD HH:mm:SS 或 YYYY-MM-DD HH:mm:ss
17
17
  * @return {*} {string}
18
18
  */
19
19
  export declare function formatDate(date: Date | number | string, format?: string): string;
@@ -1,13 +1,8 @@
1
- export * from './url';
2
- export * from './cloneObject';
3
- export * from './formate';
4
- export * from './basic';
5
- export * from './array';
6
- export * from './number';
7
- export * from './date';
8
- export * from './week';
9
- export * from './function';
10
- export * from './string';
1
+ /**
2
+ * 基础工具(不包含Dom、UI,属于通用工具包)
3
+ * 通用工具包应该放在 '../tools.ts' 中,防止部分没有浏览器环境(Node环境)的使用报错(如:document不存在)
4
+ */
5
+ export * from '../tools';
11
6
  export * from './dom';
12
7
  export * from './other';
13
8
  export * from '../ui/index';
@@ -1,3 +1,17 @@
1
+ /**
2
+ * 安全地解码URI字符串
3
+ *
4
+ * @param uri - 需要解码的URI字符串
5
+ * @returns 解码后的URI字符串,如果解码失败则返回原始字符串
6
+ */
7
+ export declare function decodeURISafe(uri: string): string;
8
+ /**
9
+ * 安全地解码URI Component字符串
10
+ *
11
+ * @param uri - 需要解码的URI字符串
12
+ * @returns 解码后的URI字符串,如果解码失败则返回原始字符串
13
+ */
14
+ export declare function decodeURIComponentSafe(uri: string): string;
1
15
  /**
2
16
  * 获取唯一参数
3
17
  *
@@ -22,7 +36,13 @@ export declare function queryParse<T = any>(urlSearch: string, options?: {
22
36
  repeat?: boolean;
23
37
  allParam?: boolean;
24
38
  }): T | null;
25
- export declare function queryStringify(obj: any, options?: GetArguments<typeof _stringify>[1]): string;
39
+ /**
40
+ * 将对象转换为query字符串格式
41
+ * @param obj - 需要转换为查询字符串的对象
42
+ * @param options - 可选的字符串化选项配置
43
+ * @returns 返回格式化后的查询字符串
44
+ */
45
+ export declare function queryStringify(obj: any, options?: StringifyOptions): string;
26
46
  /**
27
47
  * 为Url拼接query参数(hash模式参数只会添加到#后面)
28
48
  *
@@ -40,5 +60,4 @@ export declare function parseUrl(url: string): readonly [string, string, string]
40
60
  interface StringifyOptions {
41
61
  sort?: (a: string, b: string) => number;
42
62
  }
43
- declare function _stringify(obj: Record<string, string | number | boolean | Array<string | number | boolean>>, options?: StringifyOptions): string;
44
63
  export {};
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 libai
3
+ Copyright (c) 2025 DongShen (Dsir) Li
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal