nuxt-charts 2.2.1-beta.0 → 2.2.2
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 +1 -1
- package/dist/module.d.mts +13 -0
- package/dist/module.json +4 -4
- package/dist/module.mjs +28 -14
- package/dist/runtime/types.d.ts +11 -0
- package/dist/runtime/types.js +0 -0
- package/package.json +27 -8
package/LICENSE
CHANGED
package/dist/module.d.mts
CHANGED
|
@@ -21,6 +21,19 @@ interface ModuleOptions {
|
|
|
21
21
|
* @default []
|
|
22
22
|
*/
|
|
23
23
|
include?: string[];
|
|
24
|
+
/**
|
|
25
|
+
* Auto-import the shared enums/types (CurveType, LegendPosition, Orientation,
|
|
26
|
+
* DonutType, BulletLegendItemInterface, MarkerConfig, CrosshairConfig,
|
|
27
|
+
* AxisConfig, TooltipConfig).
|
|
28
|
+
*
|
|
29
|
+
* Set to `false` when running this module alongside `nuxt-charts-next` so the
|
|
30
|
+
* v3 module owns those names (avoids duplicate auto-imports and nominal enum
|
|
31
|
+
* type clashes). Map-specific helpers (getMap, getPin, geoMercator, the
|
|
32
|
+
* TopoJSON constants, MapRegion, MapPin) are always auto-imported when
|
|
33
|
+
* `autoImports` is enabled.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
sharedImports?: boolean;
|
|
24
37
|
}
|
|
25
38
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
26
39
|
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "nuxt-charts",
|
|
3
|
-
"configKey": "
|
|
2
|
+
"name": "nuxt-charts-legacy",
|
|
3
|
+
"configKey": "nuxtChartsLegacy",
|
|
4
4
|
"compatibility": {
|
|
5
5
|
"nuxt": ">=3"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.2.
|
|
7
|
+
"version": "2.2.2",
|
|
8
8
|
"builder": {
|
|
9
9
|
"@nuxt/module-builder": "1.0.2",
|
|
10
|
-
"unbuild": "
|
|
10
|
+
"unbuild": "unknown"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
|
-
import { addComponent, addImportsSources, defineNuxtModule
|
|
3
|
+
import { addComponent, createResolver, addImportsSources, defineNuxtModule } from '@nuxt/kit';
|
|
4
4
|
|
|
5
5
|
const resolveComponents = (config, filePath) => {
|
|
6
6
|
const { prefix, include, global } = config;
|
|
@@ -33,18 +33,27 @@ const resolveImports = (config, filePath) => {
|
|
|
33
33
|
if (!config.autoImports) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const { resolve } = createResolver(filePath);
|
|
37
|
+
const typesFrom = resolve("./runtime/types");
|
|
38
|
+
const mapTypes = ["MapRegion", "MapPin"];
|
|
39
|
+
const sharedTypes = ["BulletLegendItemInterface", "MarkerConfig", "CrosshairConfig", "AxisConfig", "TooltipConfig"];
|
|
37
40
|
addImportsSources({
|
|
38
|
-
from:
|
|
41
|
+
from: typesFrom,
|
|
39
42
|
type: true,
|
|
40
|
-
imports: [...
|
|
43
|
+
imports: config.sharedImports === false ? [...mapTypes] : [...sharedTypes, ...mapTypes]
|
|
41
44
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (config.sharedImports !== false) {
|
|
46
|
+
const enumImports = ["CurveType", "LegendPosition", "Orientation"];
|
|
47
|
+
addImportsSources({
|
|
48
|
+
from: "vue-chrts/enums",
|
|
49
|
+
imports: [...enumImports]
|
|
50
|
+
});
|
|
51
|
+
addImportsSources({
|
|
52
|
+
from: "vue-chrts",
|
|
53
|
+
imports: ["DonutType"]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const runtimeImports = ["getMap", "getPin"];
|
|
48
57
|
addImportsSources({
|
|
49
58
|
from: "vue-chrts",
|
|
50
59
|
imports: [...runtimeImports]
|
|
@@ -82,8 +91,8 @@ function resolvePackageDir(packageName, fromPackage) {
|
|
|
82
91
|
}
|
|
83
92
|
const module$1 = defineNuxtModule({
|
|
84
93
|
meta: {
|
|
85
|
-
name: "nuxt-charts",
|
|
86
|
-
configKey: "
|
|
94
|
+
name: "nuxt-charts-legacy",
|
|
95
|
+
configKey: "nuxtChartsLegacy",
|
|
87
96
|
compatibility: {
|
|
88
97
|
nuxt: ">=3"
|
|
89
98
|
}
|
|
@@ -92,7 +101,8 @@ const module$1 = defineNuxtModule({
|
|
|
92
101
|
prefix: "",
|
|
93
102
|
global: true,
|
|
94
103
|
autoImports: true,
|
|
95
|
-
include: []
|
|
104
|
+
include: [],
|
|
105
|
+
sharedImports: true
|
|
96
106
|
},
|
|
97
107
|
async setup(options, nuxt) {
|
|
98
108
|
nuxt.hook("modules:done", () => {
|
|
@@ -126,8 +136,12 @@ const module$1 = defineNuxtModule({
|
|
|
126
136
|
});
|
|
127
137
|
const { resolve } = createResolver(import.meta.url);
|
|
128
138
|
const runtimePath = resolve("./runtime/vue-chrts");
|
|
129
|
-
resolveImports(options);
|
|
139
|
+
resolveImports(options, import.meta.url);
|
|
130
140
|
resolveComponents(options, runtimePath);
|
|
141
|
+
const vueChrtsDir = resolvePackageDir("vue-chrts");
|
|
142
|
+
if (vueChrtsDir) {
|
|
143
|
+
nuxt.options.alias["vue-chrts"] = vueChrtsDir;
|
|
144
|
+
}
|
|
131
145
|
}
|
|
132
146
|
});
|
|
133
147
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-only re-exports for Nuxt auto-imports.
|
|
3
|
+
*
|
|
4
|
+
* Nuxt's `addImportsSources({ type: true })` emits `import('…')` statements that
|
|
5
|
+
* Vite must resolve at transform time. The published `vue-chrts/types` export is
|
|
6
|
+
* types-only (no `import`/`default` condition), so bare `vue-chrts/types`
|
|
7
|
+
* imports fail under Vite. Re-exporting through this local module keeps the
|
|
8
|
+
* import graph resolvable.
|
|
9
|
+
*/
|
|
10
|
+
export type { BulletLegendItemInterface, MarkerConfig, CrosshairConfig, AxisConfig, TooltipConfig, } from "vue-chrts";
|
|
11
|
+
export type { MapRegion, MapPin } from "vue-chrts";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-charts",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "Nuxt module
|
|
3
|
+
"version": "2.2.2",
|
|
4
|
+
"description": "Legacy Nuxt Charts module (Unovis / vue-chrts). Prefer nuxt-charts v3.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"author": "Dennis Adriaansen <adriaansendennis@gmail.com>",
|
|
7
|
+
"homepage": "https://nuxtcharts.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/dennisadriaans/vue-chrts.git",
|
|
11
|
+
"directory": "packages/nuxt-charts"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/dennisadriaans/vue-chrts/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"nuxt",
|
|
18
|
+
"nuxt-module",
|
|
19
|
+
"vue",
|
|
20
|
+
"charts",
|
|
21
|
+
"chart",
|
|
22
|
+
"dataviz",
|
|
23
|
+
"visualization",
|
|
24
|
+
"unovis"
|
|
25
|
+
],
|
|
6
26
|
"type": "module",
|
|
7
27
|
"exports": {
|
|
8
28
|
".": {
|
|
@@ -17,7 +37,7 @@
|
|
|
17
37
|
"dist"
|
|
18
38
|
],
|
|
19
39
|
"dependencies": {
|
|
20
|
-
"vue-chrts": "2.2.
|
|
40
|
+
"vue-chrts": "2.2.2"
|
|
21
41
|
},
|
|
22
42
|
"devDependencies": {
|
|
23
43
|
"@nuxt/devtools": "^3.1.1",
|
|
@@ -26,12 +46,10 @@
|
|
|
26
46
|
"@nuxt/kit": "^4.3.0",
|
|
27
47
|
"@nuxt/module-builder": "^1.0.2",
|
|
28
48
|
"@nuxt/schema": "^4.3.0",
|
|
29
|
-
"@nuxt/test-utils": "^
|
|
49
|
+
"@nuxt/test-utils": "^4.2.0",
|
|
30
50
|
"@playwright/test": "^1.61.1",
|
|
31
51
|
"@tailwindcss/vite": "^4.2.2",
|
|
32
52
|
"@types/node": "latest",
|
|
33
|
-
"changelogen": "^0.6.2",
|
|
34
|
-
"commit-and-tag-version": "^12.5.1",
|
|
35
53
|
"eslint": "^9.39.2",
|
|
36
54
|
"nuxt": "^4.3.0",
|
|
37
55
|
"tailwindcss": "^4.2.2",
|
|
@@ -41,9 +59,10 @@
|
|
|
41
59
|
},
|
|
42
60
|
"scripts": {
|
|
43
61
|
"dev": "nuxi dev playground",
|
|
44
|
-
"build": "
|
|
62
|
+
"build": "nuxt-module-build build",
|
|
63
|
+
"build:playground": "nuxi build playground",
|
|
45
64
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
46
|
-
"release": "
|
|
65
|
+
"release": "node ../../tools/release.mjs --package nuxt-charts-legacy",
|
|
47
66
|
"lint": "eslint .",
|
|
48
67
|
"typecheck": "pnpm run test:types",
|
|
49
68
|
"test": "vitest run",
|