@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.
Files changed (59) hide show
  1. package/components/routes-menu-content/index.d.ts +4 -0
  2. package/components/routes-menu-content/index.mjs +305 -0
  3. package/components/routes-menu-content/src/ctx.d.ts +17 -0
  4. package/components/routes-menu-content/src/index.vue.d.ts +350 -0
  5. package/components/routes-menu-content/src/item/core/ctx.d.ts +18 -0
  6. package/components/routes-menu-content/src/item/core/index.vue.d.ts +185 -0
  7. package/components/routes-menu-content/src/item/ctx.d.ts +14 -0
  8. package/components/routes-menu-content/src/item/index.vue.d.ts +316 -0
  9. package/components/routes-menu-content/src/types.d.ts +1 -0
  10. package/components/table-columns/src/el-ctx.d.ts +1 -1
  11. package/components/table-columns/src/index.vue.d.ts +3 -3
  12. package/components/tables-v1/index.css +7 -0
  13. package/components/tables-v1/index.d.ts +5 -0
  14. package/components/tables-v1/index.mjs +431 -0
  15. package/components/tables-v1/src/ctx.d.ts +283 -0
  16. package/components/tables-v1/src/el-ctx.d.ts +272 -0
  17. package/components/tables-v1/src/index.vue.d.ts +2997 -0
  18. package/components/tables-v1/src/types.d.ts +4 -0
  19. package/components/tables-v1-checkbox/index.d.ts +4 -0
  20. package/components/tables-v1-checkbox/index.mjs +4092 -0
  21. package/components/tables-v1-checkbox/src/ctx.d.ts +274 -0
  22. package/components/tables-v1-checkbox/src/index.vue.d.ts +3723 -0
  23. package/components/tables-v1-checkbox/src/types.d.ts +1 -0
  24. package/components/typing-markdown/index.mjs +12 -1
  25. package/components/typing-markdown/src/ctx.d.ts +9 -0
  26. package/components/typing-markdown/src/index.vue.d.ts +10 -1
  27. package/composables/index.d.ts +18 -0
  28. package/composables/index.mjs +18 -0
  29. package/fetch/PlusFetch/index.d.ts +14 -0
  30. package/fetch/PlusFetch/index.mjs +638 -0
  31. package/fetch/PlusFetch/types.d.ts +54 -0
  32. package/fetch/index.d.ts +1 -0
  33. package/fetch/index.mjs +5 -0
  34. package/index.css +8 -0
  35. package/package.json +25 -42
  36. package/api/index.d.ts +0 -0
  37. package/api/index.mjs +0 -1
  38. package/api/user/index.d.ts +0 -3
  39. package/api/user/index.mjs +0 -18
  40. package/api/user/types.d.ts +0 -5
  41. package/shared/chatgpt/index.d.ts +0 -1
  42. package/shared/chatgpt/index.mjs +0 -3
  43. package/shared/chatgpt/response/enum.d.ts +0 -6
  44. package/shared/chatgpt/response/index.d.ts +0 -6
  45. package/shared/chatgpt/response/index.mjs +0 -16
  46. package/shared/chatgpt/response/sse/index.d.ts +0 -2
  47. package/shared/chatgpt/response/sse/index.mjs +0 -1
  48. package/shared/chatgpt/response/sse/message/index.d.ts +0 -4
  49. package/shared/chatgpt/response/sse/message/index.mjs +0 -8
  50. package/shared/chatgpt/response/sse/message/types.d.ts +0 -15
  51. package/shared/chatgpt/response/sse/types.d.ts +0 -6
  52. package/shared/fetch/base/index.d.ts +0 -9
  53. package/shared/fetch/base/index.mjs +0 -17
  54. package/shared/fetch/ssr/index.d.ts +0 -3
  55. package/shared/fetch/ssr/index.mjs +0 -11
  56. package/stores/index.d.ts +0 -0
  57. package/stores/index.mjs +0 -1
  58. package/theme/index.d.ts +0 -0
  59. 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 markdownItPromise;
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;
@@ -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
+ };
@@ -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
+ }