@vunk/plus 0.1.0 → 1.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/components/routes-menu-content/index.d.ts +4 -0
- package/components/routes-menu-content/index.mjs +305 -0
- package/components/routes-menu-content/src/ctx.d.ts +17 -0
- package/components/routes-menu-content/src/index.vue.d.ts +350 -0
- package/components/routes-menu-content/src/item/core/ctx.d.ts +18 -0
- package/components/routes-menu-content/src/item/core/index.vue.d.ts +185 -0
- package/components/routes-menu-content/src/item/ctx.d.ts +14 -0
- package/components/routes-menu-content/src/item/index.vue.d.ts +316 -0
- package/components/routes-menu-content/src/types.d.ts +1 -0
- package/components/table-columns/src/el-ctx.d.ts +1 -1
- package/components/table-columns/src/index.vue.d.ts +3 -3
- package/components/tables-v1/index.css +7 -0
- package/components/tables-v1/index.d.ts +5 -0
- package/components/tables-v1/index.mjs +431 -0
- package/components/tables-v1/src/ctx.d.ts +283 -0
- package/components/tables-v1/src/el-ctx.d.ts +272 -0
- package/components/tables-v1/src/index.vue.d.ts +2997 -0
- package/components/tables-v1/src/types.d.ts +4 -0
- package/components/tables-v1-checkbox/index.d.ts +4 -0
- package/components/tables-v1-checkbox/index.mjs +4092 -0
- package/components/tables-v1-checkbox/src/ctx.d.ts +274 -0
- package/components/tables-v1-checkbox/src/index.vue.d.ts +3723 -0
- package/components/tables-v1-checkbox/src/types.d.ts +1 -0
- package/components/typing-markdown/index.mjs +12 -1
- package/components/typing-markdown/src/ctx.d.ts +9 -0
- package/components/typing-markdown/src/index.vue.d.ts +10 -1
- package/composables/index.d.ts +18 -0
- package/composables/index.mjs +18 -0
- package/fetch/PlusFetch/index.d.ts +14 -0
- package/fetch/PlusFetch/index.mjs +638 -0
- package/fetch/PlusFetch/types.d.ts +54 -0
- package/fetch/index.d.ts +1 -0
- package/fetch/index.mjs +5 -0
- package/index.css +8 -0
- package/package.json +25 -42
- package/api/index.d.ts +0 -0
- package/api/index.mjs +0 -1
- package/api/user/index.d.ts +0 -3
- package/api/user/index.mjs +0 -18
- package/api/user/types.d.ts +0 -5
- package/shared/chatgpt/index.d.ts +0 -1
- package/shared/chatgpt/index.mjs +0 -3
- package/shared/chatgpt/response/enum.d.ts +0 -6
- package/shared/chatgpt/response/index.d.ts +0 -6
- package/shared/chatgpt/response/index.mjs +0 -16
- package/shared/chatgpt/response/sse/index.d.ts +0 -2
- package/shared/chatgpt/response/sse/index.mjs +0 -1
- package/shared/chatgpt/response/sse/message/index.d.ts +0 -4
- package/shared/chatgpt/response/sse/message/index.mjs +0 -8
- package/shared/chatgpt/response/sse/message/types.d.ts +0 -15
- package/shared/chatgpt/response/sse/types.d.ts +0 -6
- package/shared/fetch/base/index.d.ts +0 -9
- package/shared/fetch/base/index.mjs +0 -17
- package/shared/fetch/ssr/index.d.ts +0 -3
- package/shared/fetch/ssr/index.mjs +0 -11
- package/stores/index.d.ts +0 -0
- package/stores/index.mjs +0 -1
- package/theme/index.d.ts +0 -0
- package/theme/index.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -24,6 +24,13 @@ const props = {
|
|
|
24
24
|
disabled: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: false
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @description markdown-it 配置
|
|
30
|
+
*/
|
|
31
|
+
markdownItSetup: {
|
|
32
|
+
type: Function,
|
|
33
|
+
default: null
|
|
27
34
|
}
|
|
28
35
|
};
|
|
29
36
|
const emits = {
|
|
@@ -71,9 +78,13 @@ var _sfc_main = defineComponent({
|
|
|
71
78
|
}
|
|
72
79
|
return props2.source.substring(0, currentIndex.value);
|
|
73
80
|
});
|
|
81
|
+
const theMarkdownIt = markdownItPromise.then((md) => {
|
|
82
|
+
props2.markdownItSetup?.(md);
|
|
83
|
+
return md;
|
|
84
|
+
});
|
|
74
85
|
const htmlText = computedAsync(async () => {
|
|
75
86
|
currentText.value;
|
|
76
|
-
const md = await
|
|
87
|
+
const md = await theMarkdownIt;
|
|
77
88
|
return md.render(currentText.value);
|
|
78
89
|
}, "");
|
|
79
90
|
const isTyping = computed(() => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type MarkdownIt from "markdown-it";
|
|
2
|
+
import { PropType } from "vue";
|
|
1
3
|
export declare const props: {
|
|
2
4
|
source: {
|
|
3
5
|
type: StringConstructor;
|
|
@@ -18,6 +20,13 @@ export declare const props: {
|
|
|
18
20
|
type: BooleanConstructor;
|
|
19
21
|
default: boolean;
|
|
20
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* @description markdown-it 配置
|
|
25
|
+
*/
|
|
26
|
+
markdownItSetup: {
|
|
27
|
+
type: PropType<(md: MarkdownIt) => void>;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
21
30
|
};
|
|
22
31
|
export declare const emits: {
|
|
23
32
|
typing: any;
|
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
+
markdownItSetup: {
|
|
19
|
+
type: import("vue").PropType<(md: import("markdown-it")) => void>;
|
|
20
|
+
default: any;
|
|
21
|
+
};
|
|
18
22
|
}>, {
|
|
19
23
|
htmlText: import("vue").Ref<string, string>;
|
|
20
24
|
isDebouncedTyping: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
@@ -37,12 +41,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
37
41
|
type: BooleanConstructor;
|
|
38
42
|
default: boolean;
|
|
39
43
|
};
|
|
44
|
+
markdownItSetup: {
|
|
45
|
+
type: import("vue").PropType<(md: import("markdown-it")) => void>;
|
|
46
|
+
default: any;
|
|
47
|
+
};
|
|
40
48
|
}>> & Readonly<{
|
|
41
49
|
onTyping?: (...args: any[] | unknown[]) => any;
|
|
42
50
|
}>, {
|
|
43
|
-
source: string;
|
|
44
51
|
disabled: boolean;
|
|
52
|
+
source: string;
|
|
45
53
|
pause: boolean;
|
|
46
54
|
delay: number;
|
|
55
|
+
markdownItSetup: (md: import("markdown-it")) => void;
|
|
47
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
57
|
export default _default;
|
package/composables/index.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const useElBreakpoints: () => {
|
|
2
|
+
breakpoints: Record<"sm" | "md" | "lg" | "xl", import("vue").Ref<boolean, boolean>> & {
|
|
3
|
+
greaterOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
4
|
+
smallerOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
5
|
+
greater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
6
|
+
smaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
7
|
+
between(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
8
|
+
isGreater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
9
|
+
isGreaterOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
10
|
+
isSmaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
11
|
+
isSmallerOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
12
|
+
isInBetween(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
13
|
+
current: () => import("vue").ComputedRef<string[]>;
|
|
14
|
+
active(): import("vue").ComputedRef<string>;
|
|
15
|
+
};
|
|
16
|
+
isMobile: import("vue").Ref<boolean, boolean>;
|
|
17
|
+
isDesktop: import("vue").Ref<boolean, boolean>;
|
|
18
|
+
};
|
package/composables/index.mjs
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
+
import { useBreakpoints } from '@vueuse/core';
|
|
1
2
|
|
|
3
|
+
const useElBreakpoints = () => {
|
|
4
|
+
const breakpoints = useBreakpoints({
|
|
5
|
+
sm: 768,
|
|
6
|
+
md: 992,
|
|
7
|
+
lg: 1200,
|
|
8
|
+
xl: 1920
|
|
9
|
+
});
|
|
10
|
+
const isMobile = breakpoints.smaller("lg");
|
|
11
|
+
const isDesktop = breakpoints.greaterOrEqual("lg");
|
|
12
|
+
return {
|
|
13
|
+
breakpoints,
|
|
14
|
+
isMobile,
|
|
15
|
+
isDesktop
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { useElBreakpoints };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RestFetch, RestFetchRequestOptions } from '@vunk/shared/fetch';
|
|
2
|
+
import { AnyFunc } from '@vunk/shared';
|
|
3
|
+
import { Onerror, PlusFetchConstructorOptions, RequestInitOptions } from './types';
|
|
4
|
+
export declare const defaultOnerror: import("lodash").DebouncedFuncLeading<(err: any) => void>;
|
|
5
|
+
/**
|
|
6
|
+
* 基于 "@vunk/shared": RestFetch
|
|
7
|
+
* 扩展了 loading、error、message
|
|
8
|
+
*/
|
|
9
|
+
export declare class PlusFetch extends RestFetch {
|
|
10
|
+
onerror: Onerror;
|
|
11
|
+
customOk: AnyFunc;
|
|
12
|
+
constructor(...args: [PlusFetchConstructorOptions]);
|
|
13
|
+
request(options: RestFetchRequestOptions, init?: RequestInitOptions, requestInit?: RequestInit): Promise<any>;
|
|
14
|
+
}
|