nuxt-echarts 1.0.1 → 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/dist/module.json +2 -2
- package/dist/module.mjs +20 -2
- package/dist/runtime/components/VChart.js +3 -20
- package/dist/runtime/components/VChartClient.js +3 -20
- package/dist/runtime/components/VChartLight.d.vue.ts +9 -13
- package/dist/runtime/components/VChartLight.vue +2 -2
- package/dist/runtime/components/VChartLight.vue.d.ts +9 -13
- package/dist/runtime/components/VChartServer.vue +2 -2
- package/dist/runtime/components/method-names.d.ts +1 -0
- package/dist/runtime/components/method-names.js +30 -0
- package/package.json +24 -23
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addPlugin, addComponent, addTemplate, addTypeTemplate, addImports } from '@nuxt/kit';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const GRAPHIC_COMPONENT_NAMES = [
|
|
4
|
+
"GArc",
|
|
5
|
+
"GBezierCurve",
|
|
6
|
+
"GCircle",
|
|
7
|
+
"GEllipse",
|
|
8
|
+
"GGroup",
|
|
9
|
+
"GImage",
|
|
10
|
+
"GLine",
|
|
11
|
+
"GPolygon",
|
|
12
|
+
"GPolyline",
|
|
13
|
+
"GRect",
|
|
14
|
+
"GRing",
|
|
15
|
+
"GSector",
|
|
16
|
+
"GText"
|
|
17
|
+
];
|
|
18
|
+
const module$1 = defineNuxtModule({
|
|
4
19
|
meta: {
|
|
5
20
|
name: "nuxt-echarts",
|
|
6
21
|
configKey: "echarts",
|
|
@@ -136,7 +151,10 @@ const module = defineNuxtModule({
|
|
|
136
151
|
"UPDATE_OPTIONS_KEY",
|
|
137
152
|
"LOADING_OPTIONS_KEY"
|
|
138
153
|
].forEach((name) => addImports({ name, from: "vue-echarts" }));
|
|
154
|
+
GRAPHIC_COMPONENT_NAMES.forEach(
|
|
155
|
+
(name) => addComponent({ name, export: name, filePath: "vue-echarts/graphic" })
|
|
156
|
+
);
|
|
139
157
|
}
|
|
140
158
|
});
|
|
141
159
|
|
|
142
|
-
export { module as default };
|
|
160
|
+
export { module$1 as default };
|
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
import VChart from "vue-echarts";
|
|
2
2
|
import "#build/echarts.mjs";
|
|
3
|
-
import { defineComponent, h,
|
|
4
|
-
|
|
5
|
-
"setOption",
|
|
6
|
-
"getWidth",
|
|
7
|
-
"getHeight",
|
|
8
|
-
"getDom",
|
|
9
|
-
"getOption",
|
|
10
|
-
"resize",
|
|
11
|
-
"dispatchAction",
|
|
12
|
-
"convertToPixel",
|
|
13
|
-
"convertFromPixel",
|
|
14
|
-
"containPixel",
|
|
15
|
-
"getDataURL",
|
|
16
|
-
"getConnectedDataURL",
|
|
17
|
-
"appendData",
|
|
18
|
-
"clear",
|
|
19
|
-
"isDisposed",
|
|
20
|
-
"dispose"
|
|
21
|
-
];
|
|
3
|
+
import { defineComponent, h, shallowRef, toRef } from "vue";
|
|
4
|
+
import { METHOD_NAMES } from "./method-names.js";
|
|
22
5
|
export default defineComponent({
|
|
23
6
|
inheritAttrs: false,
|
|
24
7
|
setup(props, { attrs, slots, expose }) {
|
|
25
|
-
const root =
|
|
8
|
+
const root = shallowRef();
|
|
26
9
|
const publicMethods = Object.fromEntries(
|
|
27
10
|
METHOD_NAMES.map((name) => [
|
|
28
11
|
name,
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
import VChart from "./VChart.js";
|
|
2
|
-
import { defineComponent, h,
|
|
3
|
-
|
|
4
|
-
"setOption",
|
|
5
|
-
"getWidth",
|
|
6
|
-
"getHeight",
|
|
7
|
-
"getDom",
|
|
8
|
-
"getOption",
|
|
9
|
-
"resize",
|
|
10
|
-
"dispatchAction",
|
|
11
|
-
"convertToPixel",
|
|
12
|
-
"convertFromPixel",
|
|
13
|
-
"containPixel",
|
|
14
|
-
"getDataURL",
|
|
15
|
-
"getConnectedDataURL",
|
|
16
|
-
"appendData",
|
|
17
|
-
"clear",
|
|
18
|
-
"isDisposed",
|
|
19
|
-
"dispose"
|
|
20
|
-
];
|
|
2
|
+
import { defineComponent, h, shallowRef, toRef } from "vue";
|
|
3
|
+
import { METHOD_NAMES } from "./method-names.js";
|
|
21
4
|
export default defineComponent({
|
|
22
5
|
inheritAttrs: false,
|
|
23
6
|
setup(props, { attrs, slots, expose }) {
|
|
24
|
-
const root =
|
|
7
|
+
const root = shallowRef();
|
|
25
8
|
const publicMethods = Object.fromEntries(
|
|
26
9
|
METHOD_NAMES.map((name) => [
|
|
27
10
|
name,
|
|
@@ -2,6 +2,8 @@ import { type ECSSRClientEventParams, type ECSSREvent } from 'echarts/ssr/client
|
|
|
2
2
|
import type { InitOptions, Option, Theme } from '../types.js';
|
|
3
3
|
import { nextTick, type PropType } from 'vue';
|
|
4
4
|
type ECSSRHandler = (params: ECSSRClientEventParams) => string | undefined;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
5
7
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
8
|
option: PropType<Option>;
|
|
7
9
|
theme: {
|
|
@@ -9,7 +11,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
9
11
|
};
|
|
10
12
|
initOptions: PropType<InitOptions>;
|
|
11
13
|
}>, {
|
|
12
|
-
root: import("vue").
|
|
14
|
+
root: import("vue").ShallowRef<({
|
|
13
15
|
$: import("vue").ComponentInternalInstance;
|
|
14
16
|
$data: {};
|
|
15
17
|
$props: {
|
|
@@ -18,9 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
18
20
|
readonly initOptions?: InitOptions | undefined;
|
|
19
21
|
readonly onError?: ((error: unknown) => any) | undefined;
|
|
20
22
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
21
|
-
$attrs:
|
|
22
|
-
[x: string]: unknown;
|
|
23
|
-
};
|
|
23
|
+
$attrs: import("vue").Attrs;
|
|
24
24
|
$refs: {
|
|
25
25
|
[x: string]: unknown;
|
|
26
26
|
};
|
|
@@ -66,11 +66,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
66
66
|
initOptions?: InitOptions;
|
|
67
67
|
}> & Readonly<{
|
|
68
68
|
onError?: ((error: unknown) => any) | undefined;
|
|
69
|
-
}>, never> &
|
|
69
|
+
}>, never> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
70
70
|
$slots: {
|
|
71
71
|
fallback?: (props: {}) => any;
|
|
72
72
|
};
|
|
73
|
-
}) |
|
|
73
|
+
}) | undefined, ({
|
|
74
74
|
$: import("vue").ComponentInternalInstance;
|
|
75
75
|
$data: {};
|
|
76
76
|
$props: {
|
|
@@ -79,9 +79,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
79
79
|
readonly initOptions?: InitOptions | undefined;
|
|
80
80
|
readonly onError?: ((error: unknown) => any) | undefined;
|
|
81
81
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
82
|
-
$attrs:
|
|
83
|
-
[x: string]: unknown;
|
|
84
|
-
};
|
|
82
|
+
$attrs: import("vue").Attrs;
|
|
85
83
|
$refs: {
|
|
86
84
|
[x: string]: unknown;
|
|
87
85
|
};
|
|
@@ -127,11 +125,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
127
125
|
initOptions?: InitOptions;
|
|
128
126
|
}> & Readonly<{
|
|
129
127
|
onError?: ((error: unknown) => any) | undefined;
|
|
130
|
-
}>, never> &
|
|
128
|
+
}>, never> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
131
129
|
$slots: {
|
|
132
130
|
fallback?: (props: {}) => any;
|
|
133
131
|
};
|
|
134
|
-
}) |
|
|
132
|
+
}) | undefined>;
|
|
135
133
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<ECSSREvent, ECSSRHandler>, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
136
134
|
option: PropType<Option>;
|
|
137
135
|
theme: {
|
|
@@ -143,5 +141,3 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
143
141
|
onMouseout?: ((params: ECSSRClientEventParams) => any) | undefined;
|
|
144
142
|
onMouseover?: ((params: ECSSRClientEventParams) => any) | undefined;
|
|
145
143
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
146
|
-
declare const _default: typeof __VLS_export;
|
|
147
|
-
export default _default;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
useAttrs,
|
|
7
7
|
nextTick,
|
|
8
|
-
|
|
8
|
+
shallowRef,
|
|
9
9
|
onMounted,
|
|
10
10
|
defineComponent
|
|
11
11
|
} from "vue";
|
|
@@ -20,7 +20,7 @@ export default defineComponent({
|
|
|
20
20
|
},
|
|
21
21
|
emits: {},
|
|
22
22
|
setup() {
|
|
23
|
-
const root =
|
|
23
|
+
const root = shallowRef();
|
|
24
24
|
const attrs = useAttrs();
|
|
25
25
|
let container;
|
|
26
26
|
function hydrateChart() {
|
|
@@ -2,6 +2,8 @@ import { type ECSSRClientEventParams, type ECSSREvent } from 'echarts/ssr/client
|
|
|
2
2
|
import type { InitOptions, Option, Theme } from '../types.js';
|
|
3
3
|
import { nextTick, type PropType } from 'vue';
|
|
4
4
|
type ECSSRHandler = (params: ECSSRClientEventParams) => string | undefined;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
5
7
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
8
|
option: PropType<Option>;
|
|
7
9
|
theme: {
|
|
@@ -9,7 +11,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
9
11
|
};
|
|
10
12
|
initOptions: PropType<InitOptions>;
|
|
11
13
|
}>, {
|
|
12
|
-
root: import("vue").
|
|
14
|
+
root: import("vue").ShallowRef<({
|
|
13
15
|
$: import("vue").ComponentInternalInstance;
|
|
14
16
|
$data: {};
|
|
15
17
|
$props: {
|
|
@@ -18,9 +20,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
18
20
|
readonly initOptions?: InitOptions | undefined;
|
|
19
21
|
readonly onError?: ((error: unknown) => any) | undefined;
|
|
20
22
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
21
|
-
$attrs:
|
|
22
|
-
[x: string]: unknown;
|
|
23
|
-
};
|
|
23
|
+
$attrs: import("vue").Attrs;
|
|
24
24
|
$refs: {
|
|
25
25
|
[x: string]: unknown;
|
|
26
26
|
};
|
|
@@ -66,11 +66,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
66
66
|
initOptions?: InitOptions;
|
|
67
67
|
}> & Readonly<{
|
|
68
68
|
onError?: ((error: unknown) => any) | undefined;
|
|
69
|
-
}>, never> &
|
|
69
|
+
}>, never> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
70
70
|
$slots: {
|
|
71
71
|
fallback?: (props: {}) => any;
|
|
72
72
|
};
|
|
73
|
-
}) |
|
|
73
|
+
}) | undefined, ({
|
|
74
74
|
$: import("vue").ComponentInternalInstance;
|
|
75
75
|
$data: {};
|
|
76
76
|
$props: {
|
|
@@ -79,9 +79,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
79
79
|
readonly initOptions?: InitOptions | undefined;
|
|
80
80
|
readonly onError?: ((error: unknown) => any) | undefined;
|
|
81
81
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
82
|
-
$attrs:
|
|
83
|
-
[x: string]: unknown;
|
|
84
|
-
};
|
|
82
|
+
$attrs: import("vue").Attrs;
|
|
85
83
|
$refs: {
|
|
86
84
|
[x: string]: unknown;
|
|
87
85
|
};
|
|
@@ -127,11 +125,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
127
125
|
initOptions?: InitOptions;
|
|
128
126
|
}> & Readonly<{
|
|
129
127
|
onError?: ((error: unknown) => any) | undefined;
|
|
130
|
-
}>, never> &
|
|
128
|
+
}>, never> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
131
129
|
$slots: {
|
|
132
130
|
fallback?: (props: {}) => any;
|
|
133
131
|
};
|
|
134
|
-
}) |
|
|
132
|
+
}) | undefined>;
|
|
135
133
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<ECSSREvent, ECSSRHandler>, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
136
134
|
option: PropType<Option>;
|
|
137
135
|
theme: {
|
|
@@ -143,5 +141,3 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
143
141
|
onMouseout?: ((params: ECSSRClientEventParams) => any) | undefined;
|
|
144
142
|
onMouseover?: ((params: ECSSRClientEventParams) => any) | undefined;
|
|
145
143
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
146
|
-
declare const _default: typeof __VLS_export;
|
|
147
|
-
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, inject,
|
|
2
|
+
import { computed, inject, shallowRef, toValue } from "vue";
|
|
3
3
|
import { THEME_KEY, INIT_OPTIONS_KEY } from "vue-echarts";
|
|
4
4
|
const defaultTheme = inject(THEME_KEY, null);
|
|
5
5
|
const defaultInitOptions = inject(INIT_OPTIONS_KEY, null);
|
|
@@ -19,7 +19,7 @@ function onError(e) {
|
|
|
19
19
|
}
|
|
20
20
|
emits("error", e);
|
|
21
21
|
}
|
|
22
|
-
const root =
|
|
22
|
+
const root = shallowRef();
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
<template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const METHOD_NAMES: readonly ["setOption", "getWidth", "getHeight", "getDom", "getZr", "getId", "isSSR", "getDevicePixelRatio", "getOption", "resize", "makeActionFromEvent", "dispatchAction", "updateLabelLayout", "convertToPixel", "convertToLayout", "convertFromPixel", "containPixel", "getVisual", "renderToCanvas", "renderToSVGString", "getSvgDataURL", "getDataURL", "getConnectedDataURL", "appendData", "clear", "isDisposed", "dispose"];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const METHOD_NAMES = [
|
|
2
|
+
"setOption",
|
|
3
|
+
"getWidth",
|
|
4
|
+
"getHeight",
|
|
5
|
+
"getDom",
|
|
6
|
+
"getZr",
|
|
7
|
+
"getId",
|
|
8
|
+
"isSSR",
|
|
9
|
+
"getDevicePixelRatio",
|
|
10
|
+
"getOption",
|
|
11
|
+
"resize",
|
|
12
|
+
"makeActionFromEvent",
|
|
13
|
+
"dispatchAction",
|
|
14
|
+
"updateLabelLayout",
|
|
15
|
+
"convertToPixel",
|
|
16
|
+
"convertToLayout",
|
|
17
|
+
"convertFromPixel",
|
|
18
|
+
"containPixel",
|
|
19
|
+
"getVisual",
|
|
20
|
+
"renderToCanvas",
|
|
21
|
+
"renderToSVGString",
|
|
22
|
+
"getSvgDataURL",
|
|
23
|
+
"getDataURL",
|
|
24
|
+
"getConnectedDataURL",
|
|
25
|
+
"appendData",
|
|
26
|
+
"clear",
|
|
27
|
+
"isDisposed",
|
|
28
|
+
"dispose"
|
|
29
|
+
];
|
|
30
|
+
const _assertListedNamesExist = METHOD_NAMES;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-echarts",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Nuxt Module for Apache ECharts™",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"ssr"
|
|
12
12
|
],
|
|
13
13
|
"author": "Yue JIN <yuejin13@fudan.edu.cn>",
|
|
14
|
-
"repository":
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "kingyue737/nuxt-echarts"
|
|
17
|
+
},
|
|
15
18
|
"license": "MIT",
|
|
16
19
|
"type": "module",
|
|
17
20
|
"types": "dist/types.d.mts",
|
|
@@ -27,32 +30,30 @@
|
|
|
27
30
|
"dist"
|
|
28
31
|
],
|
|
29
32
|
"dependencies": {
|
|
30
|
-
"@nuxt/kit": "^4.
|
|
33
|
+
"@nuxt/kit": "^4.5.2"
|
|
31
34
|
},
|
|
32
35
|
"devDependencies": {
|
|
33
|
-
"@nuxt/eslint-config": "^1.
|
|
34
|
-
"@nuxt/module-builder": "^1.0.
|
|
35
|
-
"@nuxt/schema": "^4.
|
|
36
|
-
"@nuxt/test-utils": "^3.
|
|
37
|
-
"@
|
|
38
|
-
"@types/node": "^22.18.8",
|
|
36
|
+
"@nuxt/eslint-config": "^1.17.0",
|
|
37
|
+
"@nuxt/module-builder": "^1.0.3",
|
|
38
|
+
"@nuxt/schema": "^4.5.2",
|
|
39
|
+
"@nuxt/test-utils": "^4.3.2",
|
|
40
|
+
"@types/node": "^24.13.4",
|
|
39
41
|
"changelogen": "^0.6.2",
|
|
40
|
-
"echarts": "^6.
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"prettier": "^
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"vue-
|
|
50
|
-
"
|
|
51
|
-
"wrangler": "^4.42.1"
|
|
42
|
+
"echarts": "^6.1.0",
|
|
43
|
+
"eslint": "^10.10.0",
|
|
44
|
+
"nuxt": "^4.5.2",
|
|
45
|
+
"prettier": "^3.9.6",
|
|
46
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
47
|
+
"typescript": "^6.0.3",
|
|
48
|
+
"vite": "^8.3.0",
|
|
49
|
+
"vitest": "^5.0.0",
|
|
50
|
+
"vue-echarts": "^8.3.0",
|
|
51
|
+
"vue-tsc": "^3.3.11",
|
|
52
|
+
"wrangler": "^4.131.1"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
|
-
"echarts": "^6.
|
|
55
|
-
"vue-echarts": "^8.
|
|
55
|
+
"echarts": "^6.1.0",
|
|
56
|
+
"vue-echarts": "^8.3.0"
|
|
56
57
|
},
|
|
57
58
|
"stackblitz": {
|
|
58
59
|
"startCommand": "pnpm run dev:prepare && pnpm run dev"
|