@oiij/naive-ui 0.0.70 → 0.0.71

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 (42) hide show
  1. package/dist/components/config-providers/ConfigProviders.js +0 -2
  2. package/dist/components/config-providers/ConfigProviders.vue.d.ts +2 -2
  3. package/dist/components/copy-button/CopyButton.vue.d.ts +4 -4
  4. package/dist/components/data-table-plus/DataTablePlus.js +0 -1
  5. package/dist/components/loading-provider/LoadingProvider.js +0 -1
  6. package/dist/components/loading-provider/LoadingProvider.vue.d.ts +2 -2
  7. package/dist/components/loading-provider/loading-provider.cssr.js +0 -1
  8. package/dist/components/preset-form/PresetForm.js +0 -1
  9. package/dist/components/preset-form/PresetForm.vue.d.ts +14 -14
  10. package/dist/components/preset-input/PresetInput.js +0 -1
  11. package/dist/components/preset-input/PresetInput.vue.d.ts +3 -3
  12. package/dist/components/preset-picker/PresetPicker.vue.d.ts +4 -4
  13. package/dist/components/preset-select/PresetSelect.vue.d.ts +4 -4
  14. package/dist/components/remote-request/RemoteRequest.vue.d.ts +9 -9
  15. package/dist/components/search-input/SearchInput.vue.d.ts +4 -4
  16. package/dist/components/toggle-input/ToggleInput.vue.d.ts +4 -4
  17. package/dist/components/tooltip-button/TooltipButton.vue.d.ts +4 -4
  18. package/dist/components/transition/BaseTransition.vue.d.ts +2 -2
  19. package/dist/components/type-writer/TypeWriter.js +0 -1
  20. package/dist/components/type-writer/type-writer.cssr.js +0 -1
  21. package/dist/components.js +0 -1
  22. package/dist/composables/_helper.js +18 -9
  23. package/dist/composables/use-naive-theme.d.ts +1 -2
  24. package/dist/composables/use-naive-theme.js +17 -3
  25. package/dist/index.js +0 -1
  26. package/package.json +5 -5
  27. package/dist/components/_utils/index.js +0 -2
  28. package/dist/components/config-providers/index.js +0 -1
  29. package/dist/components/copy-button/index.js +0 -1
  30. package/dist/components/data-table-plus/index.js +0 -1
  31. package/dist/components/index.js +0 -28
  32. package/dist/components/preset-form/index.js +0 -1
  33. package/dist/components/preset-input/index.js +0 -1
  34. package/dist/components/preset-picker/index.js +0 -1
  35. package/dist/components/preset-select/index.js +0 -1
  36. package/dist/components/remote-request/index.js +0 -1
  37. package/dist/components/search-input/index.js +0 -1
  38. package/dist/components/toggle-input/index.js +0 -1
  39. package/dist/components/tooltip-button/index.js +0 -1
  40. package/dist/components/transition/index.js +0 -1
  41. package/dist/components/type-writer/index.js +0 -1
  42. package/dist/composables/index.js +0 -4
@@ -1,7 +1,5 @@
1
1
  import LoadingProvider_default from "../loading-provider/LoadingProvider.js";
2
- import "../loading-provider/index.js";
3
2
  import { useLoading } from "../../composables/use-loading.js";
4
- import "../../composables/index.js";
5
3
  import { createBlock, createCommentVNode, createVNode, defineComponent, guardReactiveProps, normalizeProps, onMounted, openBlock, renderSlot, unref, withCtx } from "vue";
6
4
  import { NConfigProvider, NDialogProvider, NGlobalStyle, NLoadingBarProvider, NMessageProvider, NModalProvider, NNotificationProvider, useDialog, useLoadingBar, useMessage, useModal, useNotification } from "naive-ui";
7
5
 
@@ -1,12 +1,12 @@
1
1
  import { ConfigProvidersProps } from "./index.js";
2
- import * as vue21 from "vue";
2
+ import * as vue18 from "vue";
3
3
 
4
4
  //#region src/components/config-providers/ConfigProviders.vue.d.ts
5
5
  declare var __VLS_44: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_44) => any;
8
8
  };
9
- declare const __VLS_base: vue21.DefineComponent<ConfigProvidersProps, {}, {}, {}, {}, vue21.ComponentOptionsMixin, vue21.ComponentOptionsMixin, {}, string, vue21.PublicProps, Readonly<ConfigProvidersProps> & Readonly<{}>, {}, {}, {}, {}, string, vue21.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue18.DefineComponent<ConfigProvidersProps, {}, {}, {}, {}, vue18.ComponentOptionsMixin, vue18.ComponentOptionsMixin, {}, string, vue18.PublicProps, Readonly<ConfigProvidersProps> & Readonly<{}>, {}, {}, {}, {}, string, vue18.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { CopyButtonProps } from "./index.js";
2
- import * as vue55 from "vue";
2
+ import * as vue28 from "vue";
3
3
 
4
4
  //#region src/components/copy-button/CopyButton.vue.d.ts
5
5
  declare var __VLS_9: {}, __VLS_18: {}, __VLS_25: {};
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
10
10
  } & {
11
11
  tooltip?: (props: typeof __VLS_25) => any;
12
12
  };
13
- declare const __VLS_base: vue55.DefineComponent<CopyButtonProps, {}, {}, {}, {}, vue55.ComponentOptionsMixin, vue55.ComponentOptionsMixin, {} & {
13
+ declare const __VLS_base: vue28.DefineComponent<CopyButtonProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {} & {
14
14
  copied: (v: string | undefined) => any;
15
- }, string, vue55.PublicProps, Readonly<CopyButtonProps> & Readonly<{
15
+ }, string, vue28.PublicProps, Readonly<CopyButtonProps> & Readonly<{
16
16
  onCopied?: ((v: string | undefined) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, vue55.ComponentProvideOptions, false, {}, any>;
17
+ }>, {}, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  type __VLS_WithSlots<T, S> = T & {
@@ -1,7 +1,6 @@
1
1
  import { useDataRequest } from "../../composables/use-data-request.js";
2
2
  import MageArrowUp_default from "../icons/MageArrowUp.js";
3
3
  import SearchInput_default from "../search-input/SearchInput.js";
4
- import "../search-input/index.js";
5
4
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, reactive, ref, renderSlot, toDisplayString, toRaw, toValue, unref, useTemplateRef, withCtx } from "vue";
6
5
  import { NButton, NDataTable, NFlex, NPagination } from "naive-ui";
7
6
 
@@ -1,5 +1,4 @@
1
1
  import BaseTransition_default from "../transition/BaseTransition.js";
2
- import "../transition/index.js";
3
2
  import { cName, loadingProviderCssr } from "./loading-provider.cssr.js";
4
3
  import { loadingProviderInjectionKey } from "./index.js";
5
4
  import { Fragment, Teleport, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, ref, renderSlot, unref, watchEffect, withCtx } from "vue";
@@ -1,5 +1,5 @@
1
1
  import { LoadingProviderProps } from "./index.js";
2
- import * as vue35 from "vue";
2
+ import * as vue23 from "vue";
3
3
 
4
4
  //#region src/components/loading-provider/LoadingProvider.vue.d.ts
5
5
  declare var __VLS_26: {}, __VLS_29: {}, __VLS_31: {};
@@ -10,7 +10,7 @@ type __VLS_Slots = {} & {
10
10
  } & {
11
11
  default?: (props: typeof __VLS_31) => any;
12
12
  };
13
- declare const __VLS_base: vue35.DefineComponent<LoadingProviderProps, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {}, string, vue35.PublicProps, Readonly<LoadingProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_base: vue23.DefineComponent<LoadingProviderProps, {}, {}, {}, {}, vue23.ComponentOptionsMixin, vue23.ComponentOptionsMixin, {}, string, vue23.PublicProps, Readonly<LoadingProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue23.ComponentProvideOptions, false, {}, any>;
14
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
15
  declare const _default: typeof __VLS_export;
16
16
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,4 @@
1
1
  import { cssr, namespace, plugin } from "../_utils/cssr-bem.js";
2
- import "../_utils/index.js";
3
2
  import { cM } from "naive-ui";
4
3
 
5
4
  //#region src/components/loading-provider/loading-provider.cssr.ts
@@ -1,6 +1,5 @@
1
1
  import { useNaiveForm } from "../../composables/use-naive-form.js";
2
2
  import PresetInput_default from "../preset-input/PresetInput.js";
3
- import "../preset-input/index.js";
4
3
  import { mergeRule } from "./_utils.js";
5
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toValue, unref, useTemplateRef, withCtx } from "vue";
6
5
  import { NButton, NCollapseTransition, NDivider, NForm, NFormItem, NGi, NGrid } from "naive-ui";
@@ -1,19 +1,19 @@
1
1
  import { DataObject } from "../../composables/use-data-request.js";
2
2
  import { PresetFormExpose, PresetFormProps } from "./index.js";
3
- import * as _vueuse_core8 from "@vueuse/core";
4
- import * as vue26 from "vue";
3
+ import * as _vueuse_core4 from "@vueuse/core";
4
+ import * as vue33 from "vue";
5
5
  import * as naive_ui0 from "naive-ui";
6
6
  import { FormInst } from "naive-ui";
7
7
  import * as async_validator0 from "async-validator";
8
8
 
9
9
  //#region src/components/preset-form/PresetForm.vue.d.ts
10
10
  declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
11
- props: vue26.PublicProps & __VLS_PrettifyLocal<PresetFormProps<V> & {
11
+ props: vue33.PublicProps & __VLS_PrettifyLocal<PresetFormProps<V> & {
12
12
  onValidated?: ((val: V) => any) | undefined;
13
13
  }> & (typeof globalThis extends {
14
14
  __VLS_PROPS_FALLBACK: infer P;
15
15
  } ? P : {});
16
- expose: (exposed: vue26.ShallowUnwrapRef<PresetFormExpose<V>>) => void;
16
+ expose: (exposed: vue33.ShallowUnwrapRef<PresetFormExpose<V>>) => void;
17
17
  attrs: any;
18
18
  slots: {
19
19
  header?: (props: {
@@ -21,8 +21,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
21
21
  formValue: V;
22
22
  formRules: Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
23
23
  formProps: {
24
- model: vue26.Reactive<V>;
25
- rules: vue26.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
24
+ model: vue33.Reactive<V>;
25
+ rules: vue33.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
26
26
  };
27
27
  setValue: (_value: Partial<V>) => void;
28
28
  validate: () => Promise<{
@@ -32,7 +32,7 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
32
32
  resetForm: () => void;
33
33
  reset: () => void;
34
34
  clear: () => void;
35
- onValidated: _vueuse_core8.EventHookOn<[V]>;
35
+ onValidated: _vueuse_core4.EventHookOn<[V]>;
36
36
  }) => any;
37
37
  } & {
38
38
  default?: (props: {
@@ -40,8 +40,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
40
40
  formValue: V;
41
41
  formRules: Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
42
42
  formProps: {
43
- model: vue26.Reactive<V>;
44
- rules: vue26.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
43
+ model: vue33.Reactive<V>;
44
+ rules: vue33.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
45
45
  };
46
46
  setValue: (_value: Partial<V>) => void;
47
47
  validate: () => Promise<{
@@ -51,7 +51,7 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
51
51
  resetForm: () => void;
52
52
  reset: () => void;
53
53
  clear: () => void;
54
- onValidated: _vueuse_core8.EventHookOn<[V]>;
54
+ onValidated: _vueuse_core4.EventHookOn<[V]>;
55
55
  }) => any;
56
56
  } & {
57
57
  footer?: (props: {
@@ -59,8 +59,8 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
59
59
  formValue: V;
60
60
  formRules: Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
61
61
  formProps: {
62
- model: vue26.Reactive<V>;
63
- rules: vue26.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
62
+ model: vue33.Reactive<V>;
63
+ rules: vue33.Reactive<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
64
64
  };
65
65
  setValue: (_value: Partial<V>) => void;
66
66
  validate: () => Promise<{
@@ -70,11 +70,11 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
70
70
  resetForm: () => void;
71
71
  reset: () => void;
72
72
  clear: () => void;
73
- onValidated: _vueuse_core8.EventHookOn<[V]>;
73
+ onValidated: _vueuse_core4.EventHookOn<[V]>;
74
74
  }) => any;
75
75
  };
76
76
  emit: (e: "validated", val: V) => void;
77
- }>) => vue26.VNode & {
77
+ }>) => vue33.VNode & {
78
78
  __ctx?: Awaited<typeof __VLS_setup>;
79
79
  };
80
80
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,4 @@
1
1
  import SearchInput_default from "../search-input/SearchInput.js";
2
- import "../search-input/index.js";
3
2
  import { createBlock, defineComponent, h, openBlock, resolveDynamicComponent } from "vue";
4
3
  import { NButton, NCheckbox, NCheckboxGroup, NColorPicker, NDatePicker, NDivider, NDynamicTags, NInput, NInputNumber, NRadio, NRadioGroup, NRate, NSelect, NSlider, NSwitch, NTimePicker } from "naive-ui";
5
4
 
@@ -1,9 +1,9 @@
1
1
  import { PresetInputProps } from "./index.js";
2
- import * as vue40 from "vue";
2
+ import * as vue52 from "vue";
3
3
 
4
4
  //#region src/components/preset-input/PresetInput.vue.d.ts
5
5
  declare const __VLS_export: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
- props: vue40.PublicProps & __VLS_PrettifyLocal<PresetInputProps<V> & {
6
+ props: vue52.PublicProps & __VLS_PrettifyLocal<PresetInputProps<V> & {
7
7
  "onUpdate:value"?: ((val?: V | undefined) => any) | undefined;
8
8
  }> & (typeof globalThis extends {
9
9
  __VLS_PROPS_FALLBACK: infer P;
@@ -12,7 +12,7 @@ declare const __VLS_export: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
12
12
  attrs: any;
13
13
  slots: {};
14
14
  emit: (e: "update:value", val?: V) => void;
15
- }>) => vue40.VNode & {
15
+ }>) => vue52.VNode & {
16
16
  __ctx?: Awaited<typeof __VLS_setup>;
17
17
  };
18
18
  declare const _default: typeof __VLS_export;
@@ -1,11 +1,11 @@
1
1
  import { DataObject } from "../../composables/use-data-request.js";
2
2
  import { PresetPickerEmits, PresetPickerExpose, PresetPickerProps, PresetPickerValue } from "./index.js";
3
- import * as vue60 from "vue";
3
+ import * as vue57 from "vue";
4
4
  import { DataTableColumns } from "naive-ui";
5
5
 
6
6
  //#region src/components/preset-picker/PresetPicker.vue.d.ts
7
7
  declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
- props: vue60.PublicProps & __VLS_PrettifyLocal<PresetPickerProps<V, R> & {
8
+ props: vue57.PublicProps & __VLS_PrettifyLocal<PresetPickerProps<V, R> & {
9
9
  onClose?: (() => any) | undefined;
10
10
  "onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
11
11
  onAfterEnter?: (() => any) | undefined;
@@ -18,7 +18,7 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
18
18
  }> & (typeof globalThis extends {
19
19
  __VLS_PROPS_FALLBACK: infer P;
20
20
  } ? P : {});
21
- expose: (exposed: vue60.ShallowUnwrapRef<PresetPickerExpose<R>>) => void;
21
+ expose: (exposed: vue57.ShallowUnwrapRef<PresetPickerExpose<R>>) => void;
22
22
  attrs: any;
23
23
  slots: {
24
24
  'button-icon'?: (props: {}) => any;
@@ -54,7 +54,7 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
54
54
  'modal-close'?: (props: {}) => any;
55
55
  };
56
56
  emit: PresetPickerEmits<V, R>;
57
- }>) => vue60.VNode & {
57
+ }>) => vue57.VNode & {
58
58
  __ctx?: Awaited<typeof __VLS_setup>;
59
59
  };
60
60
  declare const _default: typeof __VLS_export;
@@ -1,12 +1,12 @@
1
1
  import { DataObject, UseDataRequestPagination } from "../../composables/use-data-request.js";
2
2
  import { PresetSelectEmits, PresetSelectExpose, PresetSelectProps, PresetSelectValue } from "./index.js";
3
3
  import * as _vueuse_core11 from "@vueuse/core";
4
- import * as vue42 from "vue";
4
+ import * as vue60 from "vue";
5
5
  import { SelectInst, SelectOption } from "naive-ui";
6
6
 
7
7
  //#region src/components/preset-select/PresetSelect.vue.d.ts
8
8
  declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject, D extends DataObject, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
- props: vue42.PublicProps & __VLS_PrettifyLocal<PresetSelectProps<V, P, D, R> & {
9
+ props: vue60.PublicProps & __VLS_PrettifyLocal<PresetSelectProps<V, P, D, R> & {
10
10
  onSuccess?: ((data: D, params: P[]) => any) | undefined;
11
11
  onError?: ((err: Error, params: P[]) => any) | undefined;
12
12
  onClear?: (() => any) | undefined;
@@ -23,7 +23,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
23
23
  }> & (typeof globalThis extends {
24
24
  __VLS_PROPS_FALLBACK: infer P_1;
25
25
  } ? P_1 : {});
26
- expose: (exposed: vue42.ShallowUnwrapRef<PresetSelectExpose<P, D, R>>) => void;
26
+ expose: (exposed: vue60.ShallowUnwrapRef<PresetSelectExpose<P, D, R>>) => void;
27
27
  attrs: any;
28
28
  slots: {
29
29
  header?: (props: {
@@ -162,7 +162,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
162
162
  }) => any;
163
163
  };
164
164
  emit: PresetSelectEmits<V, P, D, R>;
165
- }>) => vue42.VNode & {
165
+ }>) => vue60.VNode & {
166
166
  __ctx?: Awaited<typeof __VLS_setup>;
167
167
  };
168
168
  declare const _default: typeof __VLS_export;
@@ -1,11 +1,11 @@
1
1
  import { DataObject, UseDataRequestPagination } from "../../composables/use-data-request.js";
2
2
  import { RemoteRequestEmits, RemoteRequestExpose, RemoteRequestProps } from "./index.js";
3
- import * as _vueuse_core4 from "@vueuse/core";
4
- import * as vue18 from "vue";
3
+ import * as _vueuse_core7 from "@vueuse/core";
4
+ import * as vue54 from "vue";
5
5
 
6
6
  //#region src/components/remote-request/RemoteRequest.vue.d.ts
7
7
  declare const __VLS_export: <P extends DataObject, D extends DataObject, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
- props: vue18.PublicProps & __VLS_PrettifyLocal<RemoteRequestProps<P, D> & {
8
+ props: vue54.PublicProps & __VLS_PrettifyLocal<RemoteRequestProps<P, D> & {
9
9
  onSuccess?: ((data: D, params: P[]) => any) | undefined;
10
10
  onError?: ((err: Error, params: P[]) => any) | undefined;
11
11
  onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
@@ -13,7 +13,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
13
13
  }> & (typeof globalThis extends {
14
14
  __VLS_PROPS_FALLBACK: infer P_1;
15
15
  } ? P_1 : {});
16
- expose: (exposed: vue18.ShallowUnwrapRef<RemoteRequestExpose<P, D, R>>) => void;
16
+ expose: (exposed: vue54.ShallowUnwrapRef<RemoteRequestExpose<P, D, R>>) => void;
17
17
  attrs: any;
18
18
  slots: {
19
19
  default?: (props: {
@@ -36,14 +36,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
36
36
  setParams: (_params: Partial<P>) => void;
37
37
  runParams: (_params: Partial<P>) => void;
38
38
  runParamsAsync: (_params: Partial<P>) => Promise<D>;
39
- onBefore: _vueuse_core4.EventHookOn<[P[]]>;
40
- onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
41
- onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
42
- onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
39
+ onBefore: _vueuse_core7.EventHookOn<[P[]]>;
40
+ onSuccess: _vueuse_core7.EventHookOn<[D, P[]]>;
41
+ onError: _vueuse_core7.EventHookOn<[Error, P[]]>;
42
+ onFinally: _vueuse_core7.EventHookOn<[P[], D | undefined, Error | undefined]>;
43
43
  }) => any;
44
44
  };
45
45
  emit: RemoteRequestEmits<P, D>;
46
- }>) => vue18.VNode & {
46
+ }>) => vue54.VNode & {
47
47
  __ctx?: Awaited<typeof __VLS_setup>;
48
48
  };
49
49
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,5 @@
1
1
  import { SearchInputProps } from "./index.js";
2
- import * as vue50 from "vue";
2
+ import * as vue42 from "vue";
3
3
 
4
4
  //#region src/components/search-input/SearchInput.vue.d.ts
5
5
  declare var __VLS_19: {}, __VLS_21: {}, __VLS_28: {
@@ -15,11 +15,11 @@ type __VLS_Slots = {} & {
15
15
  } & {
16
16
  'button-icon'?: (props: typeof __VLS_39) => any;
17
17
  };
18
- declare const __VLS_base: vue50.DefineComponent<SearchInputProps, {}, {}, {}, {}, vue50.ComponentOptionsMixin, vue50.ComponentOptionsMixin, {} & {
18
+ declare const __VLS_base: vue42.DefineComponent<SearchInputProps, {}, {}, {}, {}, vue42.ComponentOptionsMixin, vue42.ComponentOptionsMixin, {} & {
19
19
  "update:value": (v: string | null | undefined) => any;
20
- }, string, vue50.PublicProps, Readonly<SearchInputProps> & Readonly<{
20
+ }, string, vue42.PublicProps, Readonly<SearchInputProps> & Readonly<{
21
21
  "onUpdate:value"?: ((v: string | null | undefined) => any) | undefined;
22
- }>, {}, {}, {}, {}, string, vue50.ComponentProvideOptions, false, {}, any>;
22
+ }>, {}, {}, {}, {}, string, vue42.ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
24
  declare const _default: typeof __VLS_export;
25
25
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { ClassStyle } from "../data-table-plus/index.js";
2
- import * as vue13 from "vue";
2
+ import * as vue8 from "vue";
3
3
  import { InputProps } from "naive-ui";
4
4
 
5
5
  //#region src/components/toggle-input/ToggleInput.vue.d.ts
@@ -27,14 +27,14 @@ type __VLS_Slots = {} & {
27
27
  } & {
28
28
  default?: (props: typeof __VLS_13) => any;
29
29
  };
30
- declare const __VLS_base: vue13.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, vue13.ComponentOptionsMixin, vue13.ComponentOptionsMixin, {
30
+ declare const __VLS_base: vue8.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, vue8.ComponentOptionsMixin, vue8.ComponentOptionsMixin, {
31
31
  "update:value": (value: string | number | undefined) => any;
32
32
  } & {
33
33
  trigger: () => any;
34
- }, string, vue13.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
34
+ }, string, vue8.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
35
35
  "onUpdate:value"?: ((value: string | number | undefined) => any) | undefined;
36
36
  onTrigger?: (() => any) | undefined;
37
- }>, {}, {}, {}, {}, string, vue13.ComponentProvideOptions, false, {}, any>;
37
+ }>, {}, {}, {}, {}, string, vue8.ComponentProvideOptions, false, {}, any>;
38
38
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
39
  declare const _default: typeof __VLS_export;
40
40
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { TooltipButtonProps } from "./index.js";
2
- import * as vue8 from "vue";
2
+ import * as vue13 from "vue";
3
3
 
4
4
  //#region src/components/tooltip-button/TooltipButton.vue.d.ts
5
5
  declare var __VLS_17: {}, __VLS_20: {}, __VLS_22: {};
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
10
10
  } & {
11
11
  tooltip?: (props: typeof __VLS_22) => any;
12
12
  };
13
- declare const __VLS_base: vue8.DefineComponent<TooltipButtonProps, {}, {}, {}, {}, vue8.ComponentOptionsMixin, vue8.ComponentOptionsMixin, {} & {
13
+ declare const __VLS_base: vue13.DefineComponent<TooltipButtonProps, {}, {}, {}, {}, vue13.ComponentOptionsMixin, vue13.ComponentOptionsMixin, {} & {
14
14
  click: (ev: MouseEvent) => any;
15
- }, string, vue8.PublicProps, Readonly<TooltipButtonProps> & Readonly<{
15
+ }, string, vue13.PublicProps, Readonly<TooltipButtonProps> & Readonly<{
16
16
  onClick?: ((ev: MouseEvent) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, vue8.ComponentProvideOptions, false, {}, any>;
17
+ }>, {}, {}, {}, {}, string, vue13.ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  type __VLS_WithSlots<T, S> = T & {
@@ -1,12 +1,12 @@
1
1
  import { TransitionProps as TransitionProps$1 } from "./index.js";
2
- import * as vue45 from "vue";
2
+ import * as vue47 from "vue";
3
3
 
4
4
  //#region src/components/transition/BaseTransition.vue.d.ts
5
5
  declare var __VLS_7: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_7) => any;
8
8
  };
9
- declare const __VLS_base: vue45.DefineComponent<TransitionProps$1, {}, {}, {}, {}, vue45.ComponentOptionsMixin, vue45.ComponentOptionsMixin, {}, string, vue45.PublicProps, Readonly<TransitionProps$1> & Readonly<{}>, {}, {}, {}, {}, string, vue45.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue47.DefineComponent<TransitionProps$1, {}, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<TransitionProps$1> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,4 @@
1
1
  import { highlight } from "../_utils/prismjs.js";
2
- import "../_utils/index.js";
3
2
  import { cName, typeWriterCssr } from "./type-writer.cssr.js";
4
3
  import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, unref, withCtx } from "vue";
5
4
  import { useStyle } from "@oiij/css-render";
@@ -1,5 +1,4 @@
1
1
  import { cssr, namespace, plugin } from "../_utils/cssr-bem.js";
2
- import "../_utils/index.js";
3
2
 
4
3
  //#region src/components/type-writer/type-writer.cssr.ts
5
4
  const prismjsDark = `
@@ -13,7 +13,6 @@ import RemoteRequest_default from "./components/remote-request/RemoteRequest.js"
13
13
  import ToggleInput_default from "./components/toggle-input/ToggleInput.js";
14
14
  import TooltipButton_default from "./components/tooltip-button/TooltipButton.js";
15
15
  import TypeWriter_default from "./components/type-writer/TypeWriter.js";
16
- import "./components/index.js";
17
16
  import { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots } from "vue-component-type-helpers";
18
17
 
19
18
  export { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots, ConfigProviders_default as NConfigProviders, CopyButton_default as NCopyButton, DataTablePlus_default as NDataTablePlus, LoadingProvider_default as NLoadingProvider, PresetForm_default as NPresetForm, PresetInput_default as NPresetInput, PresetPicker_default as NPresetPicker, PresetSelect_default as NPresetSelect, RemoteRequest_default as NRemoteRequest, SearchInput_default as NSearchInput, ToggleInput_default as NToggleInput, TooltipButton_default as NTooltipButton, BaseTransition_default as NTransition, TypeWriter_default as NTypeWriter, loadingProviderInjectionKey };
@@ -3,19 +3,28 @@ import { colord } from "colord";
3
3
  //#region src/composables/_helper.ts
4
4
  function getDarkColor(color) {
5
5
  if (!color) return void 0;
6
- const baseColor = colord(color);
7
- if (!baseColor.isValid()) return void 0;
8
- return baseColor.lighten(.2).toHex();
6
+ const colorInst = colord(color);
7
+ if (!colorInst.isValid()) return void 0;
8
+ return colorInst.lighten(.1).toHex();
9
+ }
10
+ function getDarkColors(colors) {
11
+ return {
12
+ primary: getDarkColor(colors.primary),
13
+ info: getDarkColor(colors.info),
14
+ success: getDarkColor(colors.success),
15
+ warning: getDarkColor(colors.warning),
16
+ error: getDarkColor(colors.error)
17
+ };
9
18
  }
10
19
  function getStatusColor(color) {
11
20
  if (!color) return void 0;
12
- const baseColor = colord(color);
13
- if (!baseColor.isValid()) return void 0;
21
+ const colorInst = colord(color);
22
+ if (!colorInst.isValid()) return void 0;
14
23
  return {
15
24
  color,
16
- hover: baseColor.lighten(.1).toHex(),
17
- pressed: baseColor.darken(.1).toHex(),
18
- suppl: baseColor.lighten(.1).toHex()
25
+ hover: colorInst.lighten(.1).toHex(),
26
+ pressed: colorInst.darken(.1).toHex(),
27
+ suppl: colorInst.lighten(.1).toHex()
19
28
  };
20
29
  }
21
30
  function getColors(colors) {
@@ -30,4 +39,4 @@ function getColors(colors) {
30
39
  }
31
40
 
32
41
  //#endregion
33
- export { getColors, getDarkColor };
42
+ export { getColors, getDarkColors };
@@ -15,6 +15,7 @@ type NaiveThemeOptions<T extends string> = {
15
15
  colors?: Colors;
16
16
  globalThemeOverrides?: GlobalThemeOverrides;
17
17
  locales?: Partial<Locales<T>>;
18
+ darkColors?: Colors | ((colors: Colors) => Colors);
18
19
  };
19
20
  declare function useNaiveTheme<T extends string>(options?: NaiveThemeOptions<T>): {
20
21
  language: Ref<T, T>;
@@ -39,8 +40,6 @@ declare function useNaiveTheme<T extends string>(options?: NaiveThemeOptions<T>)
39
40
  success?: string | undefined;
40
41
  warning?: string | undefined;
41
42
  error?: string | undefined;
42
- } | {
43
- [k: string]: string | undefined;
44
43
  }>;
45
44
  themeOverrides: ComputedRef<GlobalThemeOverrides>;
46
45
  locales: Locales<T>;
@@ -1,4 +1,4 @@
1
- import { getColors, getDarkColor } from "./_helper.js";
1
+ import { getColors, getDarkColors } from "./_helper.js";
2
2
  import { computed, ref, toValue, watchEffect } from "vue";
3
3
  import { darkTheme, dateEnUS, dateZhCN, enUS, zhCN } from "naive-ui";
4
4
 
@@ -16,7 +16,7 @@ const naiveLocaleMap = {
16
16
  }
17
17
  };
18
18
  function useNaiveTheme(options) {
19
- const { language = "zh-CN", darkMode, colors, globalThemeOverrides, locales } = options ?? {};
19
+ const { language = "zh-CN", darkMode, colors, globalThemeOverrides, locales, darkColors } = options ?? {};
20
20
  const languageRef = ref(toValue(language));
21
21
  watchEffect(() => {
22
22
  languageRef.value = toValue(language);
@@ -28,7 +28,21 @@ function useNaiveTheme(options) {
28
28
  const { common, ...extra } = globalThemeOverrides ?? {};
29
29
  const colorsRef = ref({ ...colors });
30
30
  const themeColorsRef = computed(() => {
31
- return darkModeRef.value ? Object.fromEntries(Object.entries(colorsRef.value).map(([k, v]) => [k, getDarkColor(v)])) : colorsRef.value;
31
+ if (darkModeRef.value) {
32
+ if (typeof darkColors === "function") {
33
+ const darkColorsResult = darkColors(colorsRef.value);
34
+ return {
35
+ ...colorsRef.value,
36
+ ...darkColorsResult
37
+ };
38
+ }
39
+ if (typeof darkColors === "object") return {
40
+ ...colorsRef.value,
41
+ ...darkColors
42
+ };
43
+ return getDarkColors(colorsRef.value);
44
+ }
45
+ return colorsRef.value;
32
46
  });
33
47
  function setColor(v) {
34
48
  colorsRef.value = {
package/dist/index.js CHANGED
@@ -2,6 +2,5 @@ import { useDataRequest } from "./composables/use-data-request.js";
2
2
  import { useLoading } from "./composables/use-loading.js";
3
3
  import { useNaiveForm } from "./composables/use-naive-form.js";
4
4
  import { useNaiveTheme } from "./composables/use-naive-theme.js";
5
- import "./composables/index.js";
6
5
 
7
6
  export { useDataRequest, useLoading, useNaiveForm, useNaiveTheme };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oiij/naive-ui",
3
3
  "type": "module",
4
- "version": "0.0.70",
4
+ "version": "0.0.71",
5
5
  "description": "Some Composable Functions And Components for Vue 3",
6
6
  "author": "oiij",
7
7
  "license": "MIT",
@@ -45,9 +45,9 @@
45
45
  "vue": "^3.5.26",
46
46
  "vue-component-type-helpers": "^3.2.1",
47
47
  "vue-hooks-plus": "^2.4.1",
48
+ "@oiij/markdown-it": "0.0.10",
48
49
  "@oiij/css-render": "0.0.9",
49
- "@oiij/use": "0.0.37",
50
- "@oiij/markdown-it": "0.0.10"
50
+ "@oiij/use": "0.0.37"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/prismjs": "^1.26.5",
@@ -61,8 +61,8 @@
61
61
  "vue-component-type-helpers": "^3.2.1",
62
62
  "vue-hooks-plus": "^2.4.1",
63
63
  "@oiij/css-render": "0.0.9",
64
- "@oiij/use": "0.0.37",
65
- "@oiij/markdown-it": "0.0.10"
64
+ "@oiij/markdown-it": "0.0.10",
65
+ "@oiij/use": "0.0.37"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"
@@ -1,2 +0,0 @@
1
- import { cssr, namespace, plugin } from "./cssr-bem.js";
2
- import { highlight } from "./prismjs.js";
@@ -1 +0,0 @@
1
- import ConfigProviders_default from "./ConfigProviders.js";
@@ -1 +0,0 @@
1
- import CopyButton_default from "./CopyButton.js";
@@ -1 +0,0 @@
1
- import DataTablePlus_default from "./DataTablePlus.js";
@@ -1,28 +0,0 @@
1
- import BaseTransition_default from "./transition/BaseTransition.js";
2
- import "./transition/index.js";
3
- import LoadingProvider_default from "./loading-provider/LoadingProvider.js";
4
- import { loadingProviderInjectionKey } from "./loading-provider/index.js";
5
- import ConfigProviders_default from "./config-providers/ConfigProviders.js";
6
- import "./config-providers/index.js";
7
- import CopyButton_default from "./copy-button/CopyButton.js";
8
- import "./copy-button/index.js";
9
- import SearchInput_default from "./search-input/SearchInput.js";
10
- import "./search-input/index.js";
11
- import DataTablePlus_default from "./data-table-plus/DataTablePlus.js";
12
- import "./data-table-plus/index.js";
13
- import PresetInput_default from "./preset-input/PresetInput.js";
14
- import "./preset-input/index.js";
15
- import PresetForm_default from "./preset-form/PresetForm.js";
16
- import "./preset-form/index.js";
17
- import PresetPicker_default from "./preset-picker/PresetPicker.js";
18
- import "./preset-picker/index.js";
19
- import PresetSelect_default from "./preset-select/PresetSelect.js";
20
- import "./preset-select/index.js";
21
- import RemoteRequest_default from "./remote-request/RemoteRequest.js";
22
- import "./remote-request/index.js";
23
- import ToggleInput_default from "./toggle-input/ToggleInput.js";
24
- import "./toggle-input/index.js";
25
- import TooltipButton_default from "./tooltip-button/TooltipButton.js";
26
- import "./tooltip-button/index.js";
27
- import TypeWriter_default from "./type-writer/TypeWriter.js";
28
- import "./type-writer/index.js";
@@ -1 +0,0 @@
1
- import PresetForm_default from "./PresetForm.js";
@@ -1 +0,0 @@
1
- import PresetInput_default from "./PresetInput.js";
@@ -1 +0,0 @@
1
- import PresetPicker_default from "./PresetPicker.js";
@@ -1 +0,0 @@
1
- import PresetSelect_default from "./PresetSelect.js";
@@ -1 +0,0 @@
1
- import RemoteRequest_default from "./RemoteRequest.js";
@@ -1 +0,0 @@
1
- import SearchInput_default from "./SearchInput.js";
@@ -1 +0,0 @@
1
- import ToggleInput_default from "./ToggleInput.js";
@@ -1 +0,0 @@
1
- import TooltipButton_default from "./TooltipButton.js";
@@ -1 +0,0 @@
1
- import BaseTransition_default from "./BaseTransition.js";
@@ -1 +0,0 @@
1
- import TypeWriter_default from "./TypeWriter.js";
@@ -1,4 +0,0 @@
1
- import { useDataRequest } from "./use-data-request.js";
2
- import { useLoading } from "./use-loading.js";
3
- import { useNaiveForm } from "./use-naive-form.js";
4
- import { useNaiveTheme } from "./use-naive-theme.js";