vue-chrts 2.1.0-beta-6 → 2.1.0-beta-8

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/AreaChart/AreaChart.js +95 -116
  2. package/dist/components/AreaChart/types.d.ts +1 -205
  3. package/dist/components/BarChart/BarChart.js +9 -9
  4. package/dist/components/BarChart/types.d.ts +1 -191
  5. package/dist/components/BubbleChart/BubbleChart.js +4 -4
  6. package/dist/components/BubbleChart/types.d.ts +1 -172
  7. package/dist/components/DagreGraph/DagreGraph.js +65 -62
  8. package/dist/components/DagreGraph/types.d.ts +1 -1
  9. package/dist/components/DonutChart/DonutChart.js +5 -5
  10. package/dist/components/DonutChart/types.d.ts +2 -68
  11. package/dist/components/DualChart/DualChart.js +125 -122
  12. package/dist/components/DualChart/types.d.ts +1 -1
  13. package/dist/components/GanttChart/GanttChart.js +6 -6
  14. package/dist/components/GanttChart/types.d.ts +1 -124
  15. package/dist/components/LineChart/LineChart.js +7 -12
  16. package/dist/components/LineChart/types.d.ts +1 -2
  17. package/dist/components/Maps/DottedMap/DottedMap.js +66 -79
  18. package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +0 -1
  19. package/dist/components/Maps/DottedMap/core.js +2 -2
  20. package/dist/components/Maps/DottedMap/core.vue.d.ts +1 -1
  21. package/dist/components/Maps/DottedMap/mapUtils.js +1 -1
  22. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +54 -56
  23. package/dist/components/Maps/TopoJSONMap/types.d.ts +5 -1
  24. package/dist/components/Maps/types.d.ts +0 -1
  25. package/dist/components/SankeyChart/SankeyChart.js +59 -56
  26. package/dist/components/SankeyChart/types.d.ts +1 -1
  27. package/dist/components/Tooltip.js +5 -5
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +2 -2
  30. package/dist/node_modules/.pnpm/{@turf_boolean-point-in-polygon@7.3.1 → @turf_boolean-point-in-polygon@7.3.2}/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +1 -1
  31. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +1 -1
  32. package/dist/packages/shared/dist/donut-chart.js +7 -0
  33. package/dist/packages/shared/dist/index.js +19 -0
  34. package/dist/types.d.ts +7 -101
  35. package/package.json +8 -2
  36. package/dist/components/DonutChart/types.js +0 -4
  37. package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +0 -6
  38. package/dist/components/Maps/DottedMap/MapZoomControls.js +0 -44
  39. package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +0 -13
  40. package/dist/components/Maps/DottedMap/MapZoomControls2.js +0 -4
  41. package/dist/types.js +0 -6
  42. /package/dist/node_modules/.pnpm/{@turf_invariant@7.3.1 → @turf_invariant@7.3.2}/node_modules/@turf/invariant/dist/esm/index.js +0 -0
@@ -1,4 +1,4 @@
1
- import { BulletLegendItemInterface, LegendPosition, TooltipConfig } from '../../types';
1
+ import { BulletLegendItemInterface, TooltipConfig, LegendPosition } from '../../../../shared/dist/index.d.ts';
2
2
  import { SankeyInputNode, SankeyInputLink, SankeyNodeAlign } from '@unovis/ts';
3
3
  export type SankeyChartProps<N extends SankeyInputNode, L extends SankeyInputLink> = {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, computed as l, createElementBlock as a, openBlock as n, createElementVNode as s, createCommentVNode as k, normalizeStyle as d, toDisplayString as m, Fragment as g, renderList as B } from "vue";
1
+ import { defineComponent as w, computed as l, openBlock as a, createElementBlock as n, createElementVNode as s, normalizeStyle as d, toDisplayString as m, Fragment as g, renderList as k, createCommentVNode as B } from "vue";
2
2
  import { getFirstPropertyValue as C } from "../utils.js";
3
3
  const _ = /* @__PURE__ */ w({
4
4
  __name: "Tooltip",
@@ -55,22 +55,22 @@ const _ = /* @__PURE__ */ w({
55
55
  backgroundColor: typeof ((o = t.categories[e]) == null ? void 0 : o.color) == "string" && ((i = t.categories[e]) != null && i.color) ? t.categories[e].color : `var(--vis-color${v})`
56
56
  };
57
57
  };
58
- return (e, v) => (n(), a("div", { style: y }, [
58
+ return (e, v) => (a(), n("div", { style: y }, [
59
59
  s("div", {
60
60
  style: d(h.value)
61
61
  }, m(u.value), 5),
62
- c.value ? (n(), a("div", {
62
+ c.value ? (a(), n("div", {
63
63
  key: 0,
64
64
  style: b
65
65
  }, [
66
- (n(!0), a(g, null, B(p.value, ([o, i], z) => (n(), a(g, { key: o }, [
66
+ (a(!0), n(g, null, k(p.value, ([o, i], z) => (a(), n(g, { key: o }, [
67
67
  s("span", {
68
68
  style: d(F(o, z))
69
69
  }, null, 4),
70
70
  s("span", { style: x }, m(r.categories[o].name), 1),
71
71
  s("span", { style: S }, m(r.yFormatter ? r.yFormatter(i) : i), 1)
72
72
  ], 64))), 128))
73
- ])) : k("", !0)
73
+ ])) : B("", !0)
74
74
  ]));
75
75
  }
76
76
  });
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import { default as DualChart } from './components/DualChart/DualChart.vue';
9
9
  import { default as SankeyChart } from './components/SankeyChart/SankeyChart.vue';
10
10
  import { default as TopoJSONMap } from './components/Maps/TopoJSONMap/TopoJSONMap.vue';
11
11
  import { default as DottedMap } from './components/Maps/DottedMap/DottedMap.vue';
12
- import { LegendPosition, CurveType, Orientation, MarkerConfig, CrosshairConfig, DonutType, BulletLegendItemInterface } from './types';
13
12
  export { getMap, getPin } from './components/Maps/DottedMap/mapUtils';
14
- export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, GanttChart, DagreGraph, DualChart, SankeyChart, TopoJSONMap, DottedMap, Orientation, CurveType, LegendPosition, DonutType };
15
- export type { BulletLegendItemInterface, MarkerConfig, CrosshairConfig };
13
+ export { LegendPosition, CurveType, Orientation, DonutType, } from './types';
14
+ export type { BulletLegendItemInterface, AreaChartProps, BarChartProps, BarChartPropsBase, ValueLabel, LineChartProps, DonutChartProps, BubbleChartProps, SizeOptions, GanttChartProps, axisFormatter, AxisConfig, MarkerConfig, CrosshairConfig, TooltipConfig, DagreGraphProps, GraphNodeDatum, GraphLinkDatum, GraphData, DagreLayoutSettings, DagreRankDir, DagreAlign, DagreRanker, NodeShape, LinkArrowPosition, SankeyChartProps, DualChartProps, MapsData, DottedMapProps, } from './types';
15
+ export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, GanttChart, DagreGraph, DualChart, SankeyChart, TopoJSONMap, DottedMap, };
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ import { default as g } from "./components/SankeyChart/SankeyChart.js";
10
10
  import { default as M } from "./components/Maps/TopoJSONMap/TopoJSONMap.js";
11
11
  import { default as b } from "./components/Maps/DottedMap/DottedMap.js";
12
12
  import { getMap as G, getPin as L } from "./components/Maps/DottedMap/mapUtils.js";
13
- import { CurveType as P, LegendPosition as S, Orientation as k } from "./types.js";
14
- import { DonutType as A } from "./components/DonutChart/types.js";
13
+ import { CurveType as P, LegendPosition as S, Orientation as k } from "./packages/shared/dist/index.js";
14
+ import { DonutType as A } from "./packages/shared/dist/donut-chart.js";
15
15
  export {
16
16
  a as AreaChart,
17
17
  p as BarChart,
@@ -1,5 +1,5 @@
1
1
  import c from "../../../../../../point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js";
2
- import { getCoord as d, getGeom as g } from "../../../../../../@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js";
2
+ import { getCoord as d, getGeom as g } from "../../../../../../@turf_invariant@7.3.2/node_modules/@turf/invariant/dist/esm/index.js";
3
3
  function y(o, e, u = {}) {
4
4
  if (!o)
5
5
  throw new Error("point is required");
@@ -1,4 +1,4 @@
1
- import { epsilon as k, vec as J, estimate as S, resulterrbound as T, splitter as f, sum as K } from "./util.js";
1
+ import { epsilon as k, estimate as S, resulterrbound as T, splitter as f, sum as K, vec as J } from "./util.js";
2
2
  const U = (3 + 16 * k) * k, V = (2 + 12 * k) * k, W = (9 + 64 * k) * k * k, G = J(4), L = J(8), N = J(12), O = J(16), h = J(4);
3
3
  function X(q, z, E, F, j, A, H) {
4
4
  let p, C, m, M, t, n, e, s, r, c, o, i, u, l, a, d, w, b;
@@ -0,0 +1,7 @@
1
+ var f;
2
+ (function(l) {
3
+ l.Half = "half", l.Full = "full";
4
+ })(f || (f = {}));
5
+ export {
6
+ f as DonutType
7
+ };
@@ -0,0 +1,19 @@
1
+ import { DonutType as i } from "./donut-chart.js";
2
+ var o;
3
+ (function(t) {
4
+ t.TopLeft = "top-left", t.TopCenter = "top-center", t.TopRight = "top-right", t.BottomLeft = "bottom-left", t.BottomCenter = "bottom-center", t.BottomRight = "bottom-right";
5
+ })(o || (o = {}));
6
+ var a;
7
+ (function(t) {
8
+ t.Basis = "basis", t.BasisClosed = "basisClosed", t.BasisOpen = "basisOpen", t.Bundle = "bundle", t.Cardinal = "cardinal", t.CardinalClosed = "cardinalClosed", t.CardinalOpen = "cardinalOpen", t.CatmullRom = "catmullRom", t.CatmullRomClosed = "catmullRomClosed", t.CatmullRomOpen = "catmullRomOpen", t.Linear = "linear", t.LinearClosed = "linearClosed", t.MonotoneX = "monotoneX", t.MonotoneY = "monotoneY", t.Natural = "natural", t.Step = "step", t.StepAfter = "stepAfter", t.StepBefore = "stepBefore";
9
+ })(a || (a = {}));
10
+ var l;
11
+ (function(t) {
12
+ t.Horizontal = "horizontal", t.Vertical = "vertical";
13
+ })(l || (l = {}));
14
+ export {
15
+ a as CurveType,
16
+ i as DonutType,
17
+ o as LegendPosition,
18
+ l as Orientation
19
+ };
package/dist/types.d.ts CHANGED
@@ -1,101 +1,7 @@
1
- import { AreaChartProps } from './components/AreaChart/types';
2
- import { BarChartProps } from './components/BarChart/types';
3
- import { LineChartProps } from './components/LineChart/types';
4
- import { DonutChartProps, DonutType } from './components/DonutChart/types';
5
- import { BubbleChartProps } from './components/BubbleChart/types';
6
- import { GanttChartProps } from './components/GanttChart/types';
7
- import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum, GraphData, DagreLayoutSettings, DagreRankDir, DagreAlign, DagreRanker, NodeShape, LinkArrowPosition } from './components/DagreGraph/types';
8
- import { SankeyChartProps } from './components/SankeyChart/types';
9
- declare enum LegendPosition {
10
- TopLeft = "top-left",
11
- TopCenter = "top-center",
12
- TopRight = "top-right",
13
- BottomLeft = "bottom-left",
14
- BottomCenter = "bottom-center",
15
- BottomRight = "bottom-right"
16
- }
17
- declare enum CurveType {
18
- Basis = "basis",
19
- BasisClosed = "basisClosed",
20
- BasisOpen = "basisOpen",
21
- Bundle = "bundle",
22
- Cardinal = "cardinal",
23
- CardinalClosed = "cardinalClosed",
24
- CardinalOpen = "cardinalOpen",
25
- CatmullRom = "catmullRom",
26
- CatmullRomClosed = "catmullRomClosed",
27
- CatmullRomOpen = "catmullRomOpen",
28
- Linear = "linear",
29
- LinearClosed = "linearClosed",
30
- MonotoneX = "monotoneX",
31
- MonotoneY = "monotoneY",
32
- Natural = "natural",
33
- Step = "step",
34
- StepAfter = "stepAfter",
35
- StepBefore = "stepBefore"
36
- }
37
- interface BulletLegendItemInterface {
38
- name: string | number;
39
- color?: string | Array<string>;
40
- className?: string;
41
- inactive?: boolean;
42
- hidden?: boolean;
43
- pointer?: boolean;
44
- }
45
- declare enum Orientation {
46
- Horizontal = "horizontal",
47
- Vertical = "vertical"
48
- }
49
- export { LegendPosition, CurveType, Orientation, DonutType, type AreaChartProps, type BarChartProps, type LineChartProps, type DonutChartProps, type BulletLegendItemInterface, type BubbleChartProps, type GanttChartProps, type DagreGraphProps, type GraphNodeDatum, type GraphLinkDatum, type GraphData, type DagreLayoutSettings, type DagreRankDir, type DagreAlign, type DagreRanker, type NodeShape, type LinkArrowPosition, type SankeyChartProps, };
50
- export type axisFormatter = ((tick: number, i?: number, ticks?: number[]) => string) | ((tick: Date, i?: number, ticks?: Date[]) => string);
51
- export interface AxisConfig {
52
- tickLine?: boolean;
53
- tickTextFontSize?: string;
54
- tickTextColor?: string;
55
- tickFormat?: axisFormatter;
56
- tickTextAlign?: "left" | "right" | "center";
57
- tickTextAngle?: number;
58
- tickTextWidth?: number;
59
- tickTextFitMode?: "wrap" | "trim";
60
- tickTextTrimType?: "start" | "middle" | "end";
61
- tickTextForceWordBreak?: boolean;
62
- tickTextSeparator?: string | readonly string[];
63
- minMaxTicksOnly?: boolean;
64
- minMaxTicksOnlyShowGridLines?: boolean;
65
- tickValues?: readonly number[] | readonly Date[];
66
- /**
67
- * Animation duration in milliseconds.
68
- */
69
- duration?: number;
70
- }
71
- export type MarkerConfig = {
72
- id: string;
73
- config: {
74
- [key: string]: {
75
- type?: "circle" | "square" | "triangle" | "diamond";
76
- size?: number;
77
- strokeWidth?: number;
78
- color?: string;
79
- strokeColor?: string;
80
- };
81
- };
82
- };
83
- export interface CrosshairConfig {
84
- color?: string;
85
- strokeColor?: string;
86
- strokeWidth?: number;
87
- }
88
- export interface TooltipConfig {
89
- /**
90
- * Hide delay in milliseconds. Default: undefined
91
- */
92
- hideDelay?: number;
93
- /**
94
- * Show delay in milliseconds. Default: undefined
95
- */
96
- showDelay?: number;
97
- /**
98
- * If `true`, the tooltip will follow the cursor.
99
- */
100
- followCursor?: boolean;
101
- }
1
+ export { LegendPosition, CurveType, Orientation, DonutType, } from '../../shared/dist/index.d.ts';
2
+ export type { BulletLegendItemInterface, axisFormatter, AxisConfig, MarkerConfig, CrosshairConfig, TooltipConfig, AreaChartProps, BarChartProps, BarChartPropsBase, ValueLabel, LineChartProps, DonutChartProps, BubbleChartProps, SizeOptions, GanttChartProps, } from '../../shared/dist/index.d.ts';
3
+ export type { DagreGraphProps, GraphNodeDatum, GraphLinkDatum, GraphData, DagreLayoutSettings, DagreRankDir, DagreAlign, DagreRanker, NodeShape, LinkArrowPosition, } from './components/DagreGraph/types';
4
+ export type { SankeyChartProps } from './components/SankeyChart/types';
5
+ export type { DualChartProps } from './components/DualChart/types';
6
+ export type { MapsData } from './components/Maps/TopoJSONMap/types';
7
+ export type { DottedMapProps } from './components/Maps/DottedMap/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-chrts",
3
- "version": "2.1.0-beta-6",
3
+ "version": "2.1.0-beta-8",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -10,8 +10,13 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/index.d.ts",
13
14
  "import": "./dist/index.js",
14
15
  "require": "./dist/index.umd.cjs"
16
+ },
17
+ "./types": {
18
+ "types": "./dist/types.d.ts",
19
+ "import": "./dist/types.js"
15
20
  }
16
21
  },
17
22
  "peerDependencies": {
@@ -41,7 +46,8 @@
41
46
  "vue-tsc": "^2.2.4"
42
47
  },
43
48
  "dependencies": {
44
- "@turf/boolean-point-in-polygon": "^7.3.1"
49
+ "@turf/boolean-point-in-polygon": "^7.3.1",
50
+ "@vue-chrts/shared": "^1.0.0"
45
51
  },
46
52
  "scripts": {
47
53
  "dev": "vite",
@@ -1,4 +0,0 @@
1
- var r = /* @__PURE__ */ ((l) => (l.Half = "half", l.Full = "full", l))(r || {});
2
- export {
3
- r as DonutType
4
- };
@@ -1,6 +0,0 @@
1
- import { MapLegendItem } from './types';
2
- type __VLS_Props = {
3
- items: MapLegendItem[];
4
- };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
- export default _default;
@@ -1,44 +0,0 @@
1
- import { defineComponent as a, resolveComponent as m, createElementBlock as c, openBlock as s, createVNode as i, createBlock as u, createCommentVNode as p } from "vue";
2
- const d = { class: "flex gap-2" }, k = /* @__PURE__ */ a({
3
- __name: "MapZoomControls",
4
- props: {
5
- showReset: { type: Boolean }
6
- },
7
- emits: ["zoomIn", "zoomOut", "reset"],
8
- setup(r, { emit: l }) {
9
- const o = l;
10
- return (v, e) => {
11
- const t = m("UButton");
12
- return s(), c("div", d, [
13
- i(t, {
14
- icon: "i-lucide-plus",
15
- color: "neutral",
16
- variant: "ghost",
17
- size: "sm",
18
- "aria-label": "Zoom in",
19
- onClick: e[0] || (e[0] = (n) => o("zoomIn"))
20
- }),
21
- i(t, {
22
- icon: "i-lucide-minus",
23
- color: "neutral",
24
- variant: "ghost",
25
- size: "sm",
26
- "aria-label": "Zoom out",
27
- onClick: e[1] || (e[1] = (n) => o("zoomOut"))
28
- }),
29
- r.showReset !== !1 ? (s(), u(t, {
30
- key: 0,
31
- icon: "i-lucide-refresh-cw",
32
- color: "neutral",
33
- variant: "ghost",
34
- size: "sm",
35
- "aria-label": "Reset view",
36
- onClick: e[2] || (e[2] = (n) => o("reset"))
37
- })) : p("", !0)
38
- ]);
39
- };
40
- }
41
- });
42
- export {
43
- k as default
44
- };
@@ -1,13 +0,0 @@
1
- type __VLS_Props = {
2
- showReset?: boolean;
3
- };
4
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- reset: () => any;
6
- zoomIn: () => any;
7
- zoomOut: () => any;
8
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onReset?: (() => any) | undefined;
10
- onZoomIn?: (() => any) | undefined;
11
- onZoomOut?: (() => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
- export default _default;
@@ -1,4 +0,0 @@
1
- import f from "./MapZoomControls.js";
2
- export {
3
- f as default
4
- };
package/dist/types.js DELETED
@@ -1,6 +0,0 @@
1
- var o = /* @__PURE__ */ ((t) => (t.TopLeft = "top-left", t.TopCenter = "top-center", t.TopRight = "top-right", t.BottomLeft = "bottom-left", t.BottomCenter = "bottom-center", t.BottomRight = "bottom-right", t))(o || {}), a = /* @__PURE__ */ ((t) => (t.Basis = "basis", t.BasisClosed = "basisClosed", t.BasisOpen = "basisOpen", t.Bundle = "bundle", t.Cardinal = "cardinal", t.CardinalClosed = "cardinalClosed", t.CardinalOpen = "cardinalOpen", t.CatmullRom = "catmullRom", t.CatmullRomClosed = "catmullRomClosed", t.CatmullRomOpen = "catmullRomOpen", t.Linear = "linear", t.LinearClosed = "linearClosed", t.MonotoneX = "monotoneX", t.MonotoneY = "monotoneY", t.Natural = "natural", t.Step = "step", t.StepAfter = "stepAfter", t.StepBefore = "stepBefore", t))(a || {}), l = /* @__PURE__ */ ((t) => (t.Horizontal = "horizontal", t.Vertical = "vertical", t))(l || {});
2
- export {
3
- a as CurveType,
4
- o as LegendPosition,
5
- l as Orientation
6
- };