nuxt-echarts 0.2.5 → 0.2.6

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2024 - present, Yue JIN
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 - present, Yue JIN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -9,10 +9,6 @@
9
9
 
10
10
  Nuxt Module for Apache ECharts™
11
11
 
12
- > [!IMPORTANT]
13
- >
14
- > Nuxt ECharts SSR is based on [experimental `<NuxtIsland>`](https://nuxt.com/docs/api/components/nuxt-island). If you found any issue, design flaw, or have ideas to improve it, please open an [issue](https://github.com/kingyue737/nuxt-echarts/issues) or a [Discussion](https://github.com/kingyue737/nuxt-echarts/discussions).
15
-
16
12
  - [📖 &nbsp;Documentation](https://echarts.nuxt.dev)
17
13
 
18
14
  - [✨ &nbsp;Release Notes](/CHANGELOG.md)
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.2.0"
6
6
  },
7
- "version": "0.2.5",
7
+ "version": "0.2.6",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -99,9 +99,7 @@ const module = defineNuxtModule({
99
99
  const chartOptionNames = options.charts?.map(
100
100
  (name) => `${name.slice(0, -5)}SeriesOption`
101
101
  );
102
- const componentOptionNames = options.components?.map(
103
- (name) => `${name}Option`
104
- );
102
+ const componentOptionNames = options.components?.filter((name) => name !== "TransformComponent").map((name) => `${name}Option`);
105
103
  addTypeTemplate({
106
104
  filename: "types/nuxt-echarts.d.ts",
107
105
  getContents: () => [
@@ -1,32 +1,32 @@
1
- <script setup lang="ts">
2
- import * as echarts from 'echarts'
3
- import '#build/echarts.mjs'
4
- import { ref } from 'vue'
5
- import type { Option, InitOptions, Theme } from '../types'
6
-
7
- const props = defineProps<{
8
- option?: Option
9
- initOptions?: InitOptions
10
- theme?: Theme
11
- }>()
12
-
13
- const svgStr = ref('')
14
- const initOptions: InitOptions = echarts.util.merge(
15
- { renderer: 'svg', ssr: true } satisfies InitOptions,
16
- props.initOptions || {},
17
- )
18
- const chart = echarts.init(null, props.theme, initOptions)
19
- chart.setOption(props.option || {})
20
- svgStr.value = chart.renderToSVGString()
21
-
22
- chart.dispose()
23
-
24
- defineSlots<{ fallback: any }>()
25
- </script>
26
-
27
- <template>
28
- <div class="vue-echarts-container">
29
- <!--eslint-disable-next-line vue/no-v-html-->
30
- <div class="vue-echarts-inner" v-html="svgStr" />
31
- </div>
32
- </template>
1
+ <script setup lang="ts">
2
+ import * as echarts from 'echarts'
3
+ import '#build/echarts.mjs'
4
+ import { ref } from 'vue'
5
+ import type { Option, InitOptions, Theme } from '../types'
6
+
7
+ const props = defineProps<{
8
+ option?: Option
9
+ initOptions?: InitOptions
10
+ theme?: Theme
11
+ }>()
12
+
13
+ const svgStr = ref('')
14
+ const initOptions: InitOptions = echarts.util.merge(
15
+ { renderer: 'svg', ssr: true } satisfies InitOptions,
16
+ props.initOptions || {},
17
+ )
18
+ const chart = echarts.init(null, props.theme, initOptions)
19
+ chart.setOption(props.option || {})
20
+ svgStr.value = chart.renderToSVGString()
21
+
22
+ chart.dispose()
23
+
24
+ defineSlots<{ fallback: any }>()
25
+ </script>
26
+
27
+ <template>
28
+ <div class="vue-echarts-container">
29
+ <!--eslint-disable-next-line vue/no-v-html-->
30
+ <div class="vue-echarts-inner" v-html="svgStr" />
31
+ </div>
32
+ </template>
@@ -51,13 +51,13 @@ export default defineComponent({
51
51
  return { root };
52
52
  }
53
53
  });
54
- </script>
55
-
56
- <template>
57
- <VChartServer
58
- ref="root"
59
- :option="option"
60
- :init-options="initOptions"
61
- :theme="theme"
62
- />
63
- </template>
54
+ </script>
55
+
56
+ <template>
57
+ <VChartServer
58
+ ref="root"
59
+ :option="option"
60
+ :init-options="initOptions"
61
+ :theme="theme"
62
+ />
63
+ </template>
@@ -1,2 +1,2 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
1
+ declare const _default: any;
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-echarts",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Nuxt Module for Apache ECharts™",
5
5
  "keywords": [
6
6
  "vue",
@@ -77,4 +77,4 @@
77
77
  "stackblitz": {
78
78
  "startCommand": "pnpm run dev:prepare && pnpm run dev"
79
79
  }
80
- }
80
+ }