@oiij/naive-ui 0.0.63 → 0.0.65
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/dist/_virtual/_/plugin-vue/export-helper.js +9 -0
- package/dist/components/_utils/cssr-bem.js +7 -0
- package/dist/components/_utils/prismjs.js +16 -0
- package/dist/components/bubble/Bubble.js +67 -0
- package/dist/components/bubble/Bubble.vue.d.ts +51 -46
- package/dist/components/bubble/bubble.cssr.js +23 -0
- package/dist/components/bubble/index.d.ts +19 -15
- package/dist/components/config-providers/ConfigProviders.js +78 -0
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +37 -33
- package/dist/components/config-providers/index.d.ts +28 -24
- package/dist/components/copy-button/CopyButton.js +50 -0
- package/dist/components/copy-button/CopyButton.vue.d.ts +36 -30
- package/dist/components/copy-button/index.d.ts +13 -9
- package/dist/components/data-table-plus/DataTablePlus.js +374 -0
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +365 -260
- package/dist/components/data-table-plus/index.d.ts +54 -48
- package/dist/components/full-loading/FullLoading.js +70 -0
- package/dist/components/full-loading/FullLoading.vue.d.ts +36 -32
- package/dist/components/full-loading/full-loading.cssr.js +22 -0
- package/dist/components/full-loading/index.d.ts +16 -12
- package/dist/components/icons/MageArrowUp.js +29 -0
- package/dist/components/icons/MageCopyFill.js +21 -0
- package/dist/components/icons/MageMultiplyCircleFill.js +21 -0
- package/dist/components/icons/MageSearch.js +25 -0
- package/dist/components/index.d.ts +31 -15
- package/dist/components/preset-form/PresetForm.js +176 -0
- package/dist/components/preset-form/PresetForm.vue.d.ts +82 -74
- package/dist/components/preset-form/_utils.js +16 -0
- package/dist/components/preset-form/index.d.ts +34 -29
- package/dist/components/preset-input/PresetInput.js +87 -0
- package/dist/components/preset-input/PresetInput.vue.d.ts +20 -15
- package/dist/components/preset-input/index.d.ts +147 -145
- package/dist/components/preset-picker/PresetPicker.js +209 -0
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +62 -49
- package/dist/components/preset-picker/index.d.ts +55 -49
- package/dist/components/preset-select/PresetSelect.js +274 -0
- package/dist/components/preset-select/PresetSelect.vue.d.ts +190 -180
- package/dist/components/preset-select/index.d.ts +44 -38
- package/dist/components/remote-request/RemoteRequest.js +90 -0
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +55 -49
- package/dist/components/remote-request/index.d.ts +23 -17
- package/dist/components/search-input/SearchInput.js +85 -0
- package/dist/components/search-input/SearchInput.vue.d.ts +48 -2332
- package/dist/components/search-input/index.d.ts +16 -12
- package/dist/components/toggle-editor/ToggleEditor.js +44 -0
- package/dist/components/toggle-editor/ToggleEditor.vue.d.ts +18 -1157
- package/dist/components/toggle-editor/index.d.ts +1 -1
- package/dist/components/tooltip-button/TooltipButton.js +31 -0
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +33 -28
- package/dist/components/tooltip-button/index.d.ts +11 -7
- package/dist/components/transition/BaseTransition.js +30 -0
- package/dist/components/transition/BaseTransition.vue.d.ts +23 -21
- package/dist/components/transition/index.d.ts +10 -6
- package/dist/components/transition/transition.cssr.js +20 -0
- package/dist/components/type-writer/TypeWriter.js +72 -0
- package/dist/components/type-writer/TypeWriter.vue.d.ts +34 -29
- package/dist/components/type-writer/index.d.ts +12 -8
- package/dist/components/type-writer/type-writer.cssr.js +27 -0
- package/dist/components.d.ts +33 -1
- package/dist/components.js +18 -7910
- package/dist/composables/useDataRequest.d.ts +1 -1
- package/dist/composables/useNaiveForm.d.ts +3 -4
- package/dist/composables/useNaiveForm.js +1 -3
- package/dist/composables/useNaiveTheme.js +1 -1
- package/package.json +20 -22
- package/dist/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/components/_utils/cssr-bem.d.ts +0 -1
- package/dist/components/_utils/index.d.ts +0 -2
- package/dist/components/_utils/prismjs.d.ts +0 -1
- package/dist/components/bubble/bubble.cssr.d.ts +0 -2
- package/dist/components/full-loading/full-loading.cssr.d.ts +0 -2
- package/dist/components/icons/MageArrowUp.vue.d.ts +0 -2
- package/dist/components/icons/MageCopyFill.vue.d.ts +0 -2
- package/dist/components/icons/MageMultiplyCircleFill.vue.d.ts +0 -2
- package/dist/components/icons/MageSearch.vue.d.ts +0 -2
- package/dist/components/preset-form/_utils.d.ts +0 -8
- package/dist/components/transition/transition.cssr.d.ts +0 -13
- package/dist/components/type-writer/type-writer.cssr.d.ts +0 -2
- package/dist/components.cjs +0 -42
- package/dist/components.umd.cjs +0 -42
- package/dist/composables/_helper.cjs +0 -29
- package/dist/composables/_helper.d.cts +0 -10
- package/dist/composables/useDataRequest.cjs +0 -105
- package/dist/composables/useDataRequest.d.cts +0 -61
- package/dist/composables/useNaiveForm.cjs +0 -92
- package/dist/composables/useNaiveForm.d.cts +0 -40
- package/dist/composables/useNaiveTheme.cjs +0 -89
- package/dist/composables/useNaiveTheme.d.cts +0 -171
- package/dist/index.cjs +0 -7
- package/dist/index.d.cts +0 -4
|
@@ -27,7 +27,7 @@ declare function useDataRequest<P extends DataObject = DataObject, D extends Dat
|
|
|
27
27
|
loading: Readonly<vue0.Ref<boolean, boolean>>;
|
|
28
28
|
data: Readonly<vue0.Ref<D | undefined, D | undefined>>;
|
|
29
29
|
error: Readonly<vue0.Ref<Error | undefined, Error | undefined>>;
|
|
30
|
-
params: Readonly<vue0.Ref<
|
|
30
|
+
params: Readonly<vue0.Ref<[] | P[], [] | P[]>>;
|
|
31
31
|
list: vue0.ComputedRef<R[]>;
|
|
32
32
|
pagination: vue0.Ref<{
|
|
33
33
|
page: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataObject } from "./useDataRequest.js";
|
|
2
2
|
import * as _vueuse_core3 from "@vueuse/core";
|
|
3
3
|
import * as vue5 from "vue";
|
|
4
|
-
import { Ref } from "vue";
|
|
4
|
+
import { Ref, TemplateRef } from "vue";
|
|
5
5
|
import { FormInst, FormItemRule, FormRules } from "naive-ui";
|
|
6
6
|
import { ValidateError } from "async-validator";
|
|
7
7
|
|
|
@@ -16,12 +16,11 @@ type NaiveFormOptions<T extends DataObject> = {
|
|
|
16
16
|
rules?: NaiveFormRules<T> | Ref<NaiveFormRules<T>>;
|
|
17
17
|
clearRules?: NaiveFormClearRules;
|
|
18
18
|
};
|
|
19
|
-
declare function useNaiveForm<T extends DataObject = DataObject>(value?: T | Ref<T>, options?: NaiveFormOptions<T>): {
|
|
20
|
-
formRef:
|
|
19
|
+
declare function useNaiveForm<T extends DataObject = DataObject>(formRef: TemplateRef<FormInst>, value?: T | Ref<T>, options?: NaiveFormOptions<T>): {
|
|
20
|
+
formRef: Readonly<vue5.ShallowRef<FormInst | null>>;
|
|
21
21
|
formValue: Ref<T, T>;
|
|
22
22
|
formRules: Ref<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>, Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
23
23
|
formProps: {
|
|
24
|
-
ref: Ref<FormInst | undefined, FormInst | undefined>;
|
|
25
24
|
model: vue5.Reactive<T>;
|
|
26
25
|
rules: vue5.Reactive<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
27
26
|
};
|
|
@@ -30,14 +30,12 @@ function deepMerge(target = {}, source = {}) {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
}
|
|
33
|
-
function useNaiveForm(value, options) {
|
|
33
|
+
function useNaiveForm(formRef, value, options) {
|
|
34
34
|
const { rules, clearRules } = options ?? {};
|
|
35
35
|
const cacheValue = cloneDeep(toValue(value));
|
|
36
36
|
const formValue = ref(toValue(value ?? {}));
|
|
37
37
|
const formRules = ref(toValue(rules) ?? {});
|
|
38
|
-
const formRef = ref();
|
|
39
38
|
const formProps = {
|
|
40
|
-
ref: formRef,
|
|
41
39
|
model: reactive(formValue.value),
|
|
42
40
|
rules: reactive(formRules.value)
|
|
43
41
|
};
|
|
@@ -25,7 +25,7 @@ function useNaiveTheme(options) {
|
|
|
25
25
|
watchEffect(() => {
|
|
26
26
|
darkModeRef.value = toValue(darkMode);
|
|
27
27
|
});
|
|
28
|
-
const { common
|
|
28
|
+
const { common, ...extra } = globalThemeOverrides ?? {};
|
|
29
29
|
const colorRef = ref({ ...colors });
|
|
30
30
|
function setColor(v) {
|
|
31
31
|
colorRef.value = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oiij/naive-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.65",
|
|
5
5
|
"description": "Some Composable Functions And Components for Vue 3",
|
|
6
6
|
"author": "oiij",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,13 +19,11 @@
|
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"import": "./dist/index.js"
|
|
23
|
-
"require": "./dist/index.cjs"
|
|
22
|
+
"import": "./dist/index.js"
|
|
24
23
|
},
|
|
25
24
|
"./components": {
|
|
26
25
|
"types": "./dist/components.d.ts",
|
|
27
|
-
"import": "./dist/components.js"
|
|
28
|
-
"require": "./dist/components.cjs"
|
|
26
|
+
"import": "./dist/components.js"
|
|
29
27
|
}
|
|
30
28
|
},
|
|
31
29
|
"main": "./dist/index.js",
|
|
@@ -38,40 +36,40 @@
|
|
|
38
36
|
"package.json"
|
|
39
37
|
],
|
|
40
38
|
"peerDependencies": {
|
|
41
|
-
"@vueuse/core": "^14.
|
|
39
|
+
"@vueuse/core": "^14.1.0",
|
|
42
40
|
"async-validator": "^4.2.5",
|
|
43
41
|
"colord": "^2.9.3",
|
|
44
|
-
"es-toolkit": "^1.
|
|
45
|
-
"naive-ui": "^2.43.
|
|
42
|
+
"es-toolkit": "^1.43.0",
|
|
43
|
+
"naive-ui": "^2.43.2",
|
|
46
44
|
"prismjs": "^1.30.0",
|
|
47
|
-
"vue": "^3.5.
|
|
45
|
+
"vue": "^3.5.25",
|
|
46
|
+
"vue-component-type-helpers": "^3.1.8",
|
|
48
47
|
"vue-hooks-plus": "^2.4.1",
|
|
49
|
-
"@oiij/css-render": "0.0.
|
|
50
|
-
"@oiij/
|
|
51
|
-
"@oiij/
|
|
48
|
+
"@oiij/css-render": "0.0.7",
|
|
49
|
+
"@oiij/use": "0.0.28",
|
|
50
|
+
"@oiij/markdown-it": "0.0.9"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@types/prismjs": "^1.26.5",
|
|
55
|
-
"@vueuse/core": "^14.
|
|
54
|
+
"@vueuse/core": "^14.1.0",
|
|
56
55
|
"async-validator": "^4.2.5",
|
|
57
56
|
"colord": "^2.9.3",
|
|
58
|
-
"es-toolkit": "^1.
|
|
59
|
-
"naive-ui": "^2.43.
|
|
57
|
+
"es-toolkit": "^1.43.0",
|
|
58
|
+
"naive-ui": "^2.43.2",
|
|
60
59
|
"prismjs": "^1.30.0",
|
|
61
|
-
"vue": "^3.5.
|
|
62
|
-
"vue-component-type-helpers": "^3.1.
|
|
60
|
+
"vue": "^3.5.25",
|
|
61
|
+
"vue-component-type-helpers": "^3.1.8",
|
|
63
62
|
"vue-hooks-plus": "^2.4.1",
|
|
64
|
-
"@oiij/css-render": "0.0.
|
|
65
|
-
"@oiij/markdown-it": "0.0.
|
|
66
|
-
"@oiij/use": "0.0.
|
|
63
|
+
"@oiij/css-render": "0.0.7",
|
|
64
|
+
"@oiij/markdown-it": "0.0.9",
|
|
65
|
+
"@oiij/use": "0.0.28"
|
|
67
66
|
},
|
|
68
67
|
"publishConfig": {
|
|
69
68
|
"access": "public"
|
|
70
69
|
},
|
|
71
70
|
"scripts": {
|
|
72
71
|
"dev": "tsdown --watch",
|
|
73
|
-
"
|
|
74
|
-
"build": "vue-tsc --noEmit && tsdown && vite build",
|
|
72
|
+
"build": "vue-tsc --noEmit && tsdown",
|
|
75
73
|
"bumpp": "bumpp --no-push"
|
|
76
74
|
}
|
|
77
75
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
|
|
25
|
-
exports.__toESM = __toESM;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cssr: import('@oiij/css-render').CssRenderInstance, plugin: import('@oiij/css-render').CssRenderBemPlugin, namespace: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function highlight(code: string, lang: string): string;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FormItemRule } from 'naive-ui';
|
|
2
|
-
import { DataObject } from '../../composables/index';
|
|
3
|
-
export declare function mergeRule<D extends DataObject = DataObject>(option?: {
|
|
4
|
-
key?: keyof D;
|
|
5
|
-
label?: string | (() => string);
|
|
6
|
-
required?: boolean | (() => boolean);
|
|
7
|
-
rule?: FormItemRule | FormItemRule[];
|
|
8
|
-
}): FormItemRule | FormItemRule[] | undefined;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CNode } from '@oiij/css-render';
|
|
2
|
-
import { namespace } from '../_utils/cssr-bem';
|
|
3
|
-
interface FadeInTransitionOptions {
|
|
4
|
-
name?: string;
|
|
5
|
-
enterDuration?: string;
|
|
6
|
-
leaveDuration?: string;
|
|
7
|
-
enterCubicBezier?: string;
|
|
8
|
-
leaveCubicBezier?: string;
|
|
9
|
-
}
|
|
10
|
-
export { namespace };
|
|
11
|
-
export declare const cName: string;
|
|
12
|
-
export declare function fadeTransition({ name, enterDuration, leaveDuration, enterCubicBezier, leaveCubicBezier, }?: FadeInTransitionOptions): CNode[];
|
|
13
|
-
export declare function transitionCssr(): CNode;
|