@unovis/vue 1.6.2 → 1.6.4

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 (147) hide show
  1. package/components/annotations/index.cjs.map +1 -1
  2. package/components/annotations/index.d.ts +18 -94
  3. package/components/annotations/index.js.map +1 -1
  4. package/components/area/index.cjs +1 -1
  5. package/components/area/index.cjs.map +1 -1
  6. package/components/area/index.d.ts +12 -59
  7. package/components/area/index.js +25 -25
  8. package/components/area/index.js.map +1 -1
  9. package/components/axis/index.cjs +1 -1
  10. package/components/axis/index.cjs.map +1 -1
  11. package/components/axis/index.d.ts +12 -82
  12. package/components/axis/index.js +16 -16
  13. package/components/axis/index.js.map +1 -1
  14. package/components/brush/index.cjs +1 -1
  15. package/components/brush/index.cjs.map +1 -1
  16. package/components/brush/index.d.ts +12 -62
  17. package/components/brush/index.js +17 -17
  18. package/components/brush/index.js.map +1 -1
  19. package/components/chord-diagram/index.cjs +1 -1
  20. package/components/chord-diagram/index.cjs.map +1 -1
  21. package/components/chord-diagram/index.d.ts +12 -60
  22. package/components/chord-diagram/index.js +26 -26
  23. package/components/chord-diagram/index.js.map +1 -1
  24. package/components/crosshair/index.cjs.map +1 -1
  25. package/components/crosshair/index.d.ts +12 -66
  26. package/components/crosshair/index.js.map +1 -1
  27. package/components/donut/index.cjs +1 -1
  28. package/components/donut/index.cjs.map +1 -1
  29. package/components/donut/index.d.ts +12 -64
  30. package/components/donut/index.js +17 -17
  31. package/components/donut/index.js.map +1 -1
  32. package/components/free-brush/index.cjs +1 -1
  33. package/components/free-brush/index.cjs.map +1 -1
  34. package/components/free-brush/index.d.ts +12 -62
  35. package/components/free-brush/index.js +18 -18
  36. package/components/free-brush/index.js.map +1 -1
  37. package/components/graph/index.cjs +1 -1
  38. package/components/graph/index.cjs.map +1 -1
  39. package/components/graph/index.d.ts +10 -134
  40. package/components/graph/index.js +66 -66
  41. package/components/graph/index.js.map +1 -1
  42. package/components/grouped-bar/index.cjs +1 -1
  43. package/components/grouped-bar/index.cjs.map +1 -1
  44. package/components/grouped-bar/index.d.ts +12 -62
  45. package/components/grouped-bar/index.js +25 -25
  46. package/components/grouped-bar/index.js.map +1 -1
  47. package/components/line/index.cjs +1 -1
  48. package/components/line/index.cjs.map +1 -1
  49. package/components/line/index.d.ts +12 -60
  50. package/components/line/index.js +24 -24
  51. package/components/line/index.js.map +1 -1
  52. package/components/nested-donut/index.cjs +1 -1
  53. package/components/nested-donut/index.cjs.map +1 -1
  54. package/components/nested-donut/index.d.ts +12 -65
  55. package/components/nested-donut/index.js +22 -22
  56. package/components/nested-donut/index.js.map +1 -1
  57. package/components/plotband/index.cjs +1 -1
  58. package/components/plotband/index.cjs.map +1 -1
  59. package/components/plotband/index.d.ts +12 -63
  60. package/components/plotband/index.js +12 -12
  61. package/components/plotband/index.js.map +1 -1
  62. package/components/plotline/index.cjs +1 -1
  63. package/components/plotline/index.cjs.map +1 -1
  64. package/components/plotline/index.d.ts +12 -64
  65. package/components/plotline/index.js +9 -9
  66. package/components/plotline/index.js.map +1 -1
  67. package/components/sankey/index.cjs +1 -1
  68. package/components/sankey/index.cjs.map +1 -1
  69. package/components/sankey/index.d.ts +12 -95
  70. package/components/sankey/index.js +35 -35
  71. package/components/sankey/index.js.map +1 -1
  72. package/components/scatter/index.cjs +1 -1
  73. package/components/scatter/index.cjs.map +1 -1
  74. package/components/scatter/index.d.ts +12 -65
  75. package/components/scatter/index.js +27 -27
  76. package/components/scatter/index.js.map +1 -1
  77. package/components/stacked-bar/index.cjs +1 -1
  78. package/components/stacked-bar/index.cjs.map +1 -1
  79. package/components/stacked-bar/index.d.ts +12 -62
  80. package/components/stacked-bar/index.js +22 -22
  81. package/components/stacked-bar/index.js.map +1 -1
  82. package/components/timeline/index.cjs.map +1 -1
  83. package/components/timeline/index.d.ts +12 -88
  84. package/components/timeline/index.js.map +1 -1
  85. package/components/tooltip/index.cjs.map +1 -1
  86. package/components/tooltip/index.d.ts +19 -99
  87. package/components/tooltip/index.js.map +1 -1
  88. package/components/topojson-map/index.cjs +1 -1
  89. package/components/topojson-map/index.cjs.map +1 -1
  90. package/components/topojson-map/index.d.ts +12 -78
  91. package/components/topojson-map/index.js +39 -39
  92. package/components/topojson-map/index.js.map +1 -1
  93. package/components/treemap/index.cjs +1 -1
  94. package/components/treemap/index.cjs.map +1 -1
  95. package/components/treemap/index.d.ts +12 -69
  96. package/components/treemap/index.js +14 -14
  97. package/components/treemap/index.js.map +1 -1
  98. package/components/xy-labels/index.cjs +1 -1
  99. package/components/xy-labels/index.cjs.map +1 -1
  100. package/components/xy-labels/index.d.ts +12 -66
  101. package/components/xy-labels/index.js +38 -38
  102. package/components/xy-labels/index.js.map +1 -1
  103. package/components.d.ts +27 -26
  104. package/containers/single-container/index.cjs.map +1 -1
  105. package/containers/single-container/index.d.ts +11 -25
  106. package/containers/single-container/index.js.map +1 -1
  107. package/containers/xy-container/index.cjs.map +1 -1
  108. package/containers/xy-container/index.d.ts +12 -44
  109. package/containers/xy-container/index.js.map +1 -1
  110. package/containers.d.ts +2 -2
  111. package/html-components/bullet-legend/index.cjs +1 -1
  112. package/html-components/bullet-legend/index.cjs.map +1 -1
  113. package/html-components/bullet-legend/index.d.ts +18 -74
  114. package/html-components/bullet-legend/index.js +12 -12
  115. package/html-components/bullet-legend/index.js.map +1 -1
  116. package/html-components/flow-legend/index.cjs +2 -0
  117. package/html-components/flow-legend/index.cjs.map +1 -0
  118. package/html-components/flow-legend/index.d.ts +20 -0
  119. package/html-components/flow-legend/index.js +44 -0
  120. package/html-components/flow-legend/index.js.map +1 -0
  121. package/html-components/flow-legend/index3.cjs +2 -0
  122. package/html-components/flow-legend/index3.cjs.map +1 -0
  123. package/html-components/flow-legend/index3.js +8 -0
  124. package/html-components/flow-legend/index3.js.map +1 -0
  125. package/html-components/leaflet-flow-map/index.cjs +1 -1
  126. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  127. package/html-components/leaflet-flow-map/index.d.ts +12 -112
  128. package/html-components/leaflet-flow-map/index.js +47 -47
  129. package/html-components/leaflet-flow-map/index.js.map +1 -1
  130. package/html-components/leaflet-map/index.cjs +1 -1
  131. package/html-components/leaflet-map/index.cjs.map +1 -1
  132. package/html-components/leaflet-map/index.d.ts +12 -99
  133. package/html-components/leaflet-map/index.js +38 -38
  134. package/html-components/leaflet-map/index.js.map +1 -1
  135. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  136. package/html-components/rolling-pin-legend/index.d.ts +18 -50
  137. package/html-components/rolling-pin-legend/index.js.map +1 -1
  138. package/index.cjs +2 -2
  139. package/index.js +79 -75
  140. package/index.js.map +1 -1
  141. package/package.json +6 -4
  142. package/utils/context.cjs.map +1 -1
  143. package/utils/context.d.ts +1 -0
  144. package/utils/context.js.map +1 -1
  145. package/utils/props.cjs.map +1 -1
  146. package/utils/props.d.ts +2 -1
  147. package/utils/props.js.map +1 -1
@@ -1,69 +1,19 @@
1
- import { Brush } from '@unovis/ts';
2
- export declare const VisBrushSelectors: typeof import("@unovis/ts/dist/components/brush/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { Brush, BrushConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisBrushSelectors: typeof import("@unovis/ts/components/brush/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (BrushConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x?: import("@unovis/ts").NumericAccessor<Datum>;
42
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
- color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
44
- id?: (d: Datum, i: number, ...any: any[]) => string;
45
- xScale?: import("@unovis/ts").ContinuousScale;
46
- yScale?: import("@unovis/ts").ContinuousScale;
47
- excludeFromDomainCalculation?: boolean;
48
- onBrush?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
49
- onBrushStart?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
50
- onBrushMove?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
51
- onBrushEnd?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
52
- handleWidth?: number;
53
- selection?: [number, number];
54
- draggable?: boolean;
55
- handlePosition?: string;
56
- selectionMinLength?: number;
57
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
58
- expose(exposed: import("vue").ShallowUnwrapRef<{
59
- component: import("vue").Ref<Brush<Datum>, Brush<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Brush<Datum>, Brush<Datum>>;
60
10
  }>): void;
61
11
  attrs: any;
62
- slots: {};
63
- emit: any;
64
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
65
15
  [key: string]: any;
66
16
  }> & {
67
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
68
18
  };
69
19
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as h, nextTick as f, onUnmounted as B, watch as u, createElementBlock as F, openBlock as x } from "vue";
1
+ import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as h, nextTick as F, onUnmounted as f, watch as s, createElementBlock as B, openBlock as x } from "vue";
2
2
  import { Brush as i } from "@unovis/ts";
3
- import { useForwardProps as _, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as b } from "../../utils/context.js";
5
- const S = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
3
+ import { useForwardProps as _, arePropsEqual as b } from "../../utils/props.js";
4
+ import { componentAccessorKey as g } from "../../utils/context.js";
5
+ const S = { "data-vis-component": "" }, C = i.selectors, D = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  onBrush: { type: Function },
@@ -14,10 +14,10 @@ const S = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
14
14
  draggable: { type: Boolean },
15
15
  handlePosition: {},
16
16
  selectionMinLength: {},
17
- x: {},
18
- y: {},
17
+ x: { type: [Function, Number, null] },
18
+ y: { type: [Function, Number, null, Array] },
19
19
  id: { type: Function },
20
- color: {},
20
+ color: { type: [Function, String, Array, null] },
21
21
  xScale: { type: [Object, Function] },
22
22
  yScale: { type: [Object, Function] },
23
23
  excludeFromDomainCalculation: { type: Boolean },
@@ -27,28 +27,28 @@ const S = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
27
27
  data: {}
28
28
  },
29
29
  setup(l, { expose: p }) {
30
- const o = m(b), c = l, n = v(() => o.data.value ?? c.data), a = _(c), t = y();
30
+ const o = m(g), c = l, n = y(() => o.data.value ?? c.data), a = _(c), t = v();
31
31
  return h(() => {
32
- f(() => {
32
+ F(() => {
33
33
  var e;
34
34
  t.value = new i(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
35
35
  });
36
- }), B(() => {
36
+ }), f(() => {
37
37
  var e;
38
38
  (e = t.value) == null || e.destroy(), o.destroy();
39
- }), u(a, (e, s) => {
40
- var r;
41
- g(e, s) || (r = t.value) == null || r.setConfig(a.value);
42
- }), u(n, () => {
39
+ }), s(a, (e, r) => {
40
+ var u;
41
+ b(e, r) || (u = t.value) == null || u.setConfig(a.value);
42
+ }), s(n, () => {
43
43
  var e;
44
44
  (e = t.value) == null || e.setData(n.value);
45
45
  }), p({
46
46
  component: t
47
- }), (e, s) => (x(), F("div", S));
47
+ }), (e, r) => (x(), B("div", S));
48
48
  }
49
49
  });
50
50
  export {
51
- D as VisBrushSelectors,
52
- E as default
51
+ C as VisBrushSelectors,
52
+ D as default
53
53
  };
54
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = BrushConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Brush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisBrushSelectors","Brush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAkB;AAGpC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,IACrCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = BrushConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Brush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisBrushSelectors","Brush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,IAC/CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),g={"data-vis-component":""},h=i.ChordDiagram.selectors,m=o.defineComponent({__name:"index",props:{angleRange:{},cornerRadius:{},highlightedNodeId:{},highlightedLinkIds:{},linkColor:{},linkValue:{},nodeLevels:{},nodeWidth:{},nodeColor:{},nodeLabel:{},nodeLabelColor:{},nodeLabelAlignment:{},padAngle:{},radiusScaleExponent:{},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:p}){const a=o.inject(v.componentAccessorKey),s=u,n=o.computed(()=>a.data.value??s.data),r=l.useForwardProps(s),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new i.ChordDiagram(r.value),(e=t.value)==null||e.setData(n.value),a.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),a.destroy()}),o.watch(r,(e,c)=>{var d;l.arePropsEqual(e,c)||(d=t.value)==null||d.setConfig(r.value)}),o.watch(n,()=>{var e;(e=t.value)==null||e.setData(n.value)}),p({component:t}),(e,c)=>(o.openBlock(),o.createElementBlock("div",g))}});exports.VisChordDiagramSelectors=h;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),c=require("@unovis/ts"),s=require("../../utils/props.cjs"),g=require("../../utils/context.cjs"),v={"data-vis-component":""},m=c.ChordDiagram.selectors,h=n.defineComponent({__name:"index",props:{angleRange:{},cornerRadius:{type:[Function,Number,null]},highlightedNodeId:{},highlightedLinkIds:{},linkColor:{type:[Function,String,Array,null]},linkValue:{type:[Function,Number,null]},nodeLevels:{},nodeWidth:{},nodeColor:{type:[Function,String,Array,null]},nodeLabel:{type:[Function,String,null]},nodeLabelColor:{type:[Function,String,null]},nodeLabelAlignment:{type:[Function,String,null]},padAngle:{},radiusScaleExponent:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const o=n.inject(g.componentAccessorKey),l=d,a=n.computed(()=>o.data.value??l.data),r=s.useForwardProps(l),t=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var e;t.value=new c.ChordDiagram(r.value),(e=t.value)==null||e.setData(a.value),o.update(t.value)})}),n.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),o.destroy()}),n.watch(r,(e,u)=>{var i;s.arePropsEqual(e,u)||(i=t.value)==null||i.setConfig(r.value)}),n.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),p({component:t}),(e,u)=>(n.openBlock(),n.createElementBlock("div",v))}});exports.VisChordDiagramSelectors=m;exports.default=h;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/chord-diagram/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends ChordInputNode,L extends ChordInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = ChordDiagramConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisChordDiagramSelectors = ChordDiagram.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisChordDiagramSelectors","ChordDiagram","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAA2BC,EAAAA,aAAa,yVA3C/C,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAwB,EAG1CC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,eAAmBQ,EAAO,KAAK,GAC3CM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/chord-diagram/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends ChordInputNode,L extends ChordInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = ChordDiagramConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisChordDiagramSelectors = ChordDiagram.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisChordDiagramSelectors","ChordDiagram","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAA2BC,EAAAA,aAAa,kiBA3CrD,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,eAAmBQ,EAAO,KAAK,GACrDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,70 +1,22 @@
1
- import { ChordDiagram, ChordInputNode, ChordInputLink } from '@unovis/ts';
2
- export declare const VisChordDiagramSelectors: typeof import("@unovis/ts/dist/components/chord-diagram/style");
3
- declare const _default: <N extends ChordInputNode, L extends ChordInputLink>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts';
2
+
3
+ export declare const VisChordDiagramSelectors: typeof import("@unovis/ts/components/chord-diagram/style");
4
+ declare const _default: <N extends ChordInputNode, L extends ChordInputLink>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (ChordDiagramConfigInterface<N, L> & {
40
6
  data?: {
41
7
  nodes: N[];
42
8
  links?: L[];
43
9
  };
44
- angleRange?: [number, number];
45
- cornerRadius?: import("@unovis/ts").NumericAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
46
- highlightedNodeId?: string | number;
47
- highlightedLinkIds?: (string | number)[];
48
- linkColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").ChordLinkDatum<N, L>>;
49
- linkValue?: import("@unovis/ts").NumericAccessor<import("@unovis/ts").ChordLinkDatum<N, L>>;
50
- nodeLevels?: string[];
51
- nodeWidth?: number;
52
- nodeColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
53
- nodeLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
54
- nodeLabelColor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
55
- nodeLabelAlignment?: import("@unovis/ts").GenericAccessor<string, import("@unovis/ts").ChordNodeDatum<N>>;
56
- padAngle?: number;
57
- radiusScaleExponent?: number;
58
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
59
- expose(exposed: import("vue").ShallowUnwrapRef<{
60
- component: import("vue").Ref<ChordDiagram<N, L>, ChordDiagram<N, L>>;
10
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
11
+ expose(exposed: import('vue').ShallowUnwrapRef<{
12
+ component: import('vue').Ref<ChordDiagram<N, L>, ChordDiagram<N, L>>;
61
13
  }>): void;
62
14
  attrs: any;
63
- slots: {};
64
- emit: any;
65
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
15
+ slots: ReturnType<() => {}>;
16
+ emit: typeof __VLS_emit;
17
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
66
18
  [key: string]: any;
67
19
  }> & {
68
- __ctx?: any;
20
+ __ctx?: Awaited<typeof __VLS_setup>;
69
21
  };
70
22
  export default _default;
@@ -1,22 +1,22 @@
1
- import { defineComponent as p, inject as m, computed as v, ref as g, onMounted as h, nextTick as f, onUnmounted as _, watch as l, createElementBlock as C, openBlock as k } from "vue";
1
+ import { defineComponent as p, inject as m, computed as g, ref as v, onMounted as h, nextTick as y, onUnmounted as f, watch as u, createElementBlock as F, openBlock as _ } from "vue";
2
2
  import { ChordDiagram as c } from "@unovis/ts";
3
- import { useForwardProps as x, arePropsEqual as L } from "../../utils/props.js";
3
+ import { useForwardProps as C, arePropsEqual as S } from "../../utils/props.js";
4
4
  import { componentAccessorKey as b } from "../../utils/context.js";
5
- const D = { "data-vis-component": "" }, B = c.selectors, I = /* @__PURE__ */ p({
5
+ const k = { "data-vis-component": "" }, w = c.selectors, E = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  angleRange: {},
9
- cornerRadius: {},
9
+ cornerRadius: { type: [Function, Number, null] },
10
10
  highlightedNodeId: {},
11
11
  highlightedLinkIds: {},
12
- linkColor: {},
13
- linkValue: {},
12
+ linkColor: { type: [Function, String, Array, null] },
13
+ linkValue: { type: [Function, Number, null] },
14
14
  nodeLevels: {},
15
15
  nodeWidth: {},
16
- nodeColor: {},
17
- nodeLabel: {},
18
- nodeLabelColor: {},
19
- nodeLabelAlignment: {},
16
+ nodeColor: { type: [Function, String, Array, null] },
17
+ nodeLabel: { type: [Function, String, null] },
18
+ nodeLabelColor: { type: [Function, String, null] },
19
+ nodeLabelAlignment: { type: [Function, String, null] },
20
20
  padAngle: {},
21
21
  radiusScaleExponent: {},
22
22
  duration: {},
@@ -24,29 +24,29 @@ const D = { "data-vis-component": "" }, B = c.selectors, I = /* @__PURE__ */ p({
24
24
  attributes: {},
25
25
  data: {}
26
26
  },
27
- setup(i, { expose: u }) {
28
- const t = m(b), r = i, a = v(() => t.data.value ?? r.data), n = x(r), o = g();
27
+ setup(s, { expose: d }) {
28
+ const t = m(b), r = s, o = g(() => t.data.value ?? r.data), a = C(r), n = v();
29
29
  return h(() => {
30
- f(() => {
30
+ y(() => {
31
31
  var e;
32
- o.value = new c(n.value), (e = o.value) == null || e.setData(a.value), t.update(o.value);
32
+ n.value = new c(a.value), (e = n.value) == null || e.setData(o.value), t.update(n.value);
33
33
  });
34
- }), _(() => {
34
+ }), f(() => {
35
35
  var e;
36
- (e = o.value) == null || e.destroy(), t.destroy();
37
- }), l(n, (e, s) => {
38
- var d;
39
- L(e, s) || (d = o.value) == null || d.setConfig(n.value);
40
- }), l(a, () => {
36
+ (e = n.value) == null || e.destroy(), t.destroy();
37
+ }), u(a, (e, l) => {
38
+ var i;
39
+ S(e, l) || (i = n.value) == null || i.setConfig(a.value);
40
+ }), u(o, () => {
41
41
  var e;
42
- (e = o.value) == null || e.setData(a.value);
43
- }), u({
44
- component: o
45
- }), (e, s) => (k(), C("div", D));
42
+ (e = n.value) == null || e.setData(o.value);
43
+ }), d({
44
+ component: n
45
+ }), (e, l) => (_(), F("div", k));
46
46
  }
47
47
  });
48
48
  export {
49
- B as VisChordDiagramSelectors,
50
- I as default
49
+ w as VisChordDiagramSelectors,
50
+ E as default
51
51
  };
52
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/chord-diagram/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends ChordInputNode,L extends ChordInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = ChordDiagramConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisChordDiagramSelectors = ChordDiagram.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisChordDiagramSelectors","ChordDiagram","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAA2BC,EAAa;;;;;;;;;;;;;;;;;;;;;;;AA3C/C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAwB;AAG1C,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAmBQ,EAAO,KAAK,IAC3CM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/chord-diagram/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends ChordInputNode,L extends ChordInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = ChordDiagramConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisChordDiagramSelectors = ChordDiagram.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisChordDiagramSelectors","ChordDiagram","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAA2BC,EAAa;;;;;;;;;;;;;;;;;;;;;;;AA3CrD,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAmBQ,EAAO,KAAK,IACrDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/crosshair/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Crosshair, CrosshairConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ninterface Props extends /** @vue-ignore */ CrosshairConfigInterface<Datum> { }\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisCrosshairSelectors = Crosshair.selectors\n</script>\n\n<template>\n <div data-vis-crosshair />\n</template>\n\n\n"],"names":["VisCrosshairSelectors","Crosshair","accessor","inject","crosshairAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAmDaA,EAAwBC,EAAAA,UAAU,kFA5CzC,MAAAC,EAAWC,SAAOC,sBAAoB,EAKtCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAsB,EAGxCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,YAAiBQ,EAAO,KAAK,GACzCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/crosshair/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Crosshair, CrosshairConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ntype Props = /** @vue-ignore */ CrosshairConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisCrosshairSelectors = Crosshair.selectors\n</script>\n\n<template>\n <div data-vis-crosshair />\n</template>\n\n\n"],"names":["VisCrosshairSelectors","Crosshair","accessor","inject","crosshairAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAwBC,EAAAA,UAAU,kFA5C/C,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAKtCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,YAAiBQ,EAAO,KAAK,GACnDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,73 +1,19 @@
1
- import { Crosshair, NumericAccessor } from '@unovis/ts';
2
- export declare const VisCrosshairSelectors: typeof import("@unovis/ts/dist/components/crosshair/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { Crosshair, CrosshairConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisCrosshairSelectors: typeof import("@unovis/ts/components/crosshair/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (CrosshairConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x?: NumericAccessor<Datum>;
42
- y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
43
- template?: (datum: Datum, x: number | Date, data?: Datum[], leftNearestDatumIndex?: number) => string | HTMLElement;
44
- color?: import("@unovis/ts").ColorAccessor<Datum>;
45
- baseline?: NumericAccessor<Datum>;
46
- id?: (d: Datum, i: number, ...any: any[]) => string;
47
- xScale?: import("@unovis/ts").ContinuousScale;
48
- yScale?: import("@unovis/ts").ContinuousScale;
49
- excludeFromDomainCalculation?: boolean;
50
- strokeColor?: import("@unovis/ts").ColorAccessor<Datum>;
51
- strokeWidth?: NumericAccessor<Datum>;
52
- yStacked?: NumericAccessor<Datum>[];
53
- tooltip?: import("@unovis/ts").Tooltip;
54
- hideWhenFarFromPointer?: boolean;
55
- hideWhenFarFromPointerDistance?: number;
56
- snapToData?: boolean;
57
- getCircles?: (x: number | Date, data: Datum[], yScale: import("@unovis/ts").ContinuousScale, leftNearestDatumIndex?: number) => import("@unovis/ts").CrosshairCircle[];
58
- onCrosshairMove?: (x?: number | Date, datum?: Datum, datumIndex?: number, event?: MouseEvent | WheelEvent) => void;
59
- forceShowAt?: number | Date;
60
- skipRangeCheck?: boolean;
61
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
62
- expose(exposed: import("vue").ShallowUnwrapRef<{
63
- component: import("vue").Ref<Crosshair<Datum>, Crosshair<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Crosshair<Datum>, Crosshair<Datum>>;
64
10
  }>): void;
65
11
  attrs: any;
66
- slots: {};
67
- emit: any;
68
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
69
15
  [key: string]: any;
70
16
  }> & {
71
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
72
18
  };
73
19
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Crosshair, CrosshairConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ninterface Props extends /** @vue-ignore */ CrosshairConfigInterface<Datum> { }\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisCrosshairSelectors = Crosshair.selectors\n</script>\n\n<template>\n <div data-vis-crosshair />\n</template>\n\n\n"],"names":["VisCrosshairSelectors","Crosshair","accessor","inject","crosshairAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAmDaA,IAAwBC,EAAU;;;;;;AA5CzC,UAAAC,IAAWC,EAAOC,CAAoB,GAKtCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAsB;AAGxC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAiBQ,EAAO,KAAK,IACzCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Crosshair, CrosshairConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ntype Props = /** @vue-ignore */ CrosshairConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisCrosshairSelectors = Crosshair.selectors\n</script>\n\n<template>\n <div data-vis-crosshair />\n</template>\n\n\n"],"names":["VisCrosshairSelectors","Crosshair","accessor","inject","crosshairAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAwBC,EAAU;;;;;;AA5C/C,UAAMC,IAAWC,EAAOC,CAAoB,GAKtCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAiBQ,EAAO,KAAK,IACnDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),g={"data-vis-component":""},m=i.Donut.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},centralLabelOffsetX:{},centralLabelOffsetY:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),c=d,a=t.computed(()=>n.data.value??c.data),s=l.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new i.Donut(s.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(s,(e,r)=>{var u;l.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(s.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",g))}});exports.VisDonutSelectors=m;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),g={"data-vis-component":""},m=i.Donut.selectors,y=t.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},centralLabelOffsetX:{},centralLabelOffsetY:{},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(v.componentAccessorKey),c=p,a=t.computed(()=>o.data.value??c.data),r=l.useForwardProps(c),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new i.Donut(r.value),(e=n.value)==null||e.setData(a.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(r,(e,s)=>{var u;l.arePropsEqual(e,s)||(u=n.value)==null||u.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),d({component:n}),(e,s)=>(t.openBlock(),t.createElementBlock("div",g))}});exports.VisDonutSelectors=m;exports.default=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,wdA3CjC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAkB,EAGpCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,GACrCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,ohBA3CvC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,GAC/CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}