@unovis/vue 1.7.0-pre.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +4 -0
  2. package/components/annotations/index.cjs +1 -1
  3. package/components/annotations/index.cjs.map +1 -1
  4. package/components/annotations/index.d.ts +1 -1
  5. package/components/annotations/index.js +18 -20
  6. package/components/annotations/index.js.map +1 -1
  7. package/components/area/index.cjs +1 -1
  8. package/components/area/index.cjs.map +1 -1
  9. package/components/area/index.d.ts +1 -1
  10. package/components/area/index.js +22 -23
  11. package/components/area/index.js.map +1 -1
  12. package/components/axis/index.cjs +1 -1
  13. package/components/axis/index.cjs.map +1 -1
  14. package/components/axis/index.d.ts +1 -1
  15. package/components/axis/index.js +26 -25
  16. package/components/axis/index.js.map +1 -1
  17. package/components/boxplot/index.cjs +2 -0
  18. package/components/boxplot/index.cjs.map +1 -0
  19. package/components/boxplot/index.d.ts +19 -0
  20. package/components/boxplot/index.js +31 -0
  21. package/components/boxplot/index.js.map +1 -0
  22. package/components/boxplot/index2.cjs +2 -0
  23. package/components/boxplot/index2.cjs.map +1 -0
  24. package/components/boxplot/index2.js +7 -0
  25. package/components/boxplot/index2.js.map +1 -0
  26. package/components/brush/index.cjs +1 -1
  27. package/components/brush/index.cjs.map +1 -1
  28. package/components/brush/index.d.ts +1 -1
  29. package/components/brush/index.js +22 -24
  30. package/components/brush/index.js.map +1 -1
  31. package/components/chord-diagram/index.cjs +1 -1
  32. package/components/chord-diagram/index.cjs.map +1 -1
  33. package/components/chord-diagram/index.d.ts +1 -1
  34. package/components/chord-diagram/index.js +22 -24
  35. package/components/chord-diagram/index.js.map +1 -1
  36. package/components/crosshair/index.cjs +1 -1
  37. package/components/crosshair/index.cjs.map +1 -1
  38. package/components/crosshair/index.d.ts +3 -3
  39. package/components/crosshair/index.js +20 -24
  40. package/components/crosshair/index.js.map +1 -1
  41. package/components/donut/index.cjs +1 -1
  42. package/components/donut/index.cjs.map +1 -1
  43. package/components/donut/index.d.ts +1 -1
  44. package/components/donut/index.js +22 -24
  45. package/components/donut/index.js.map +1 -1
  46. package/components/free-brush/index.cjs +1 -1
  47. package/components/free-brush/index.cjs.map +1 -1
  48. package/components/free-brush/index.d.ts +1 -1
  49. package/components/free-brush/index.js +21 -24
  50. package/components/free-brush/index.js.map +1 -1
  51. package/components/graph/index.cjs +1 -1
  52. package/components/graph/index.cjs.map +1 -1
  53. package/components/graph/index.d.ts +1 -1
  54. package/components/graph/index.js +26 -22
  55. package/components/graph/index.js.map +1 -1
  56. package/components/grouped-bar/index.cjs +1 -1
  57. package/components/grouped-bar/index.cjs.map +1 -1
  58. package/components/grouped-bar/index.d.ts +1 -1
  59. package/components/grouped-bar/index.js +24 -25
  60. package/components/grouped-bar/index.js.map +1 -1
  61. package/components/heatmap/index.cjs +2 -0
  62. package/components/heatmap/index.cjs.map +1 -0
  63. package/components/heatmap/index.d.ts +19 -0
  64. package/components/heatmap/index.js +49 -0
  65. package/components/heatmap/index.js.map +1 -0
  66. package/components/heatmap/index2.cjs +2 -0
  67. package/components/heatmap/index2.cjs.map +1 -0
  68. package/components/heatmap/index2.js +7 -0
  69. package/components/heatmap/index2.js.map +1 -0
  70. package/components/line/index.cjs +1 -1
  71. package/components/line/index.cjs.map +1 -1
  72. package/components/line/index.d.ts +1 -1
  73. package/components/line/index.js +22 -24
  74. package/components/line/index.js.map +1 -1
  75. package/components/nested-donut/index.cjs +1 -1
  76. package/components/nested-donut/index.cjs.map +1 -1
  77. package/components/nested-donut/index.d.ts +1 -1
  78. package/components/nested-donut/index.js +22 -25
  79. package/components/nested-donut/index.js.map +1 -1
  80. package/components/plotband/index.cjs +1 -1
  81. package/components/plotband/index.cjs.map +1 -1
  82. package/components/plotband/index.d.ts +1 -1
  83. package/components/plotband/index.js +16 -17
  84. package/components/plotband/index.js.map +1 -1
  85. package/components/plotline/index.cjs +1 -1
  86. package/components/plotline/index.cjs.map +1 -1
  87. package/components/plotline/index.d.ts +1 -1
  88. package/components/plotline/index.js +16 -17
  89. package/components/plotline/index.js.map +1 -1
  90. package/components/radial-bar/index.cjs +2 -0
  91. package/components/radial-bar/index.cjs.map +1 -0
  92. package/components/radial-bar/index.d.ts +19 -0
  93. package/components/radial-bar/index.js +54 -0
  94. package/components/radial-bar/index.js.map +1 -0
  95. package/components/radial-bar/index2.cjs +2 -0
  96. package/components/radial-bar/index2.cjs.map +1 -0
  97. package/components/radial-bar/index2.js +7 -0
  98. package/components/radial-bar/index2.js.map +1 -0
  99. package/components/sankey/index.cjs +1 -1
  100. package/components/sankey/index.cjs.map +1 -1
  101. package/components/sankey/index.d.ts +1 -1
  102. package/components/sankey/index.js +24 -23
  103. package/components/sankey/index.js.map +1 -1
  104. package/components/scatter/index.cjs +1 -1
  105. package/components/scatter/index.cjs.map +1 -1
  106. package/components/scatter/index.d.ts +1 -1
  107. package/components/scatter/index.js +22 -24
  108. package/components/scatter/index.js.map +1 -1
  109. package/components/stacked-bar/index.cjs +1 -1
  110. package/components/stacked-bar/index.cjs.map +1 -1
  111. package/components/stacked-bar/index.d.ts +1 -1
  112. package/components/stacked-bar/index.js +23 -23
  113. package/components/stacked-bar/index.js.map +1 -1
  114. package/components/timeline/index.cjs +1 -1
  115. package/components/timeline/index.cjs.map +1 -1
  116. package/components/timeline/index.d.ts +3 -3
  117. package/components/timeline/index.js +20 -24
  118. package/components/timeline/index.js.map +1 -1
  119. package/components/tooltip/index.cjs +1 -1
  120. package/components/tooltip/index.cjs.map +1 -1
  121. package/components/tooltip/index.d.ts +1 -1
  122. package/components/tooltip/index.js +15 -17
  123. package/components/tooltip/index.js.map +1 -1
  124. package/components/topojson-map/index.cjs +1 -1
  125. package/components/topojson-map/index.cjs.map +1 -1
  126. package/components/topojson-map/index.d.ts +1 -1
  127. package/components/topojson-map/index.js +52 -25
  128. package/components/topojson-map/index.js.map +1 -1
  129. package/components/treemap/index.cjs +1 -1
  130. package/components/treemap/index.cjs.map +1 -1
  131. package/components/treemap/index.d.ts +1 -1
  132. package/components/treemap/index.js +22 -24
  133. package/components/treemap/index.js.map +1 -1
  134. package/components/xy-labels/index.cjs +1 -1
  135. package/components/xy-labels/index.cjs.map +1 -1
  136. package/components/xy-labels/index.d.ts +1 -1
  137. package/components/xy-labels/index.js +21 -24
  138. package/components/xy-labels/index.js.map +1 -1
  139. package/components.d.ts +3 -0
  140. package/containers/single-container/index.cjs +1 -1
  141. package/containers/single-container/index.cjs.map +1 -1
  142. package/containers/single-container/index.js +26 -26
  143. package/containers/single-container/index.js.map +1 -1
  144. package/containers/xy-container/index.cjs +1 -1
  145. package/containers/xy-container/index.cjs.map +1 -1
  146. package/containers/xy-container/index.js +25 -30
  147. package/containers/xy-container/index.js.map +1 -1
  148. package/html-components/bullet-legend/index.cjs +1 -1
  149. package/html-components/bullet-legend/index.cjs.map +1 -1
  150. package/html-components/bullet-legend/index.d.ts +1 -1
  151. package/html-components/bullet-legend/index.js +23 -24
  152. package/html-components/bullet-legend/index.js.map +1 -1
  153. package/html-components/flow-legend/index.cjs +1 -1
  154. package/html-components/flow-legend/index.cjs.map +1 -1
  155. package/html-components/flow-legend/index.d.ts +1 -1
  156. package/html-components/flow-legend/index.js +21 -23
  157. package/html-components/flow-legend/index.js.map +1 -1
  158. package/html-components/leaflet-flow-map/index.cjs +1 -1
  159. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  160. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  161. package/html-components/leaflet-flow-map/index.js +22 -24
  162. package/html-components/leaflet-flow-map/index.js.map +1 -1
  163. package/html-components/leaflet-map/index.cjs +1 -1
  164. package/html-components/leaflet-map/index.cjs.map +1 -1
  165. package/html-components/leaflet-map/index.d.ts +1 -1
  166. package/html-components/leaflet-map/index.js +22 -24
  167. package/html-components/leaflet-map/index.js.map +1 -1
  168. package/html-components/rolling-pin-legend/index.cjs +1 -1
  169. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  170. package/html-components/rolling-pin-legend/index.d.ts +1 -1
  171. package/html-components/rolling-pin-legend/index.js +22 -24
  172. package/html-components/rolling-pin-legend/index.js.map +1 -1
  173. package/index.cjs +2 -2
  174. package/index.js +95 -86
  175. package/index.js.map +1 -1
  176. package/package.json +12 -12
  177. package/utils/context.cjs.map +1 -1
  178. package/utils/context.js +1 -1
  179. package/utils/context.js.map +1 -1
  180. package/utils/props.cjs +1 -1
  181. package/utils/props.cjs.map +1 -1
  182. package/utils/props.d.ts +1 -4
  183. package/utils/props.js +9 -9
  184. package/utils/props.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<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<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","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,EAAqBC,EAAAA,OAAO,ksDA3CzC,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,SAAaQ,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"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode, L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { SankeyConfigInterface, SankeyInputLink, SankeyInputNode } from '@unovis/ts'\nimport { Sankey } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = SankeyConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 component.value?.render()\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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisSankeySelectors","Sankey","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAqBC,EAAAA,OAAO,q3DA3CzC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,SAAaQ,EAAO,KAAK,EAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts';
1
+ import { SankeyConfigInterface, SankeyInputLink, SankeyInputNode, Sankey } from '@unovis/ts';
2
2
 
3
3
  export declare const VisSankeySelectors: typeof import("@unovis/ts/components/sankey/style");
4
4
  declare const _default: <N extends SankeyInputNode, L extends SankeyInputLink>(__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<{
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as y, computed as b, ref as g, onMounted as m, nextTick as S, onUnmounted as F, watch as u, createElementBlock as h, openBlock as v } from "vue";
2
- import { Sankey as c } from "@unovis/ts";
3
- import { useForwardProps as x, arePropsEqual as T } from "../../utils/props.js";
4
- import { componentAccessorKey as f } from "../../utils/context.js";
5
- const k = { "data-vis-component": "" }, M = c.selectors, _ = /* @__PURE__ */ d({
1
+ import { defineComponent as d, inject as s, computed as y, ref as b, onMounted as g, nextTick as m, onUnmounted as F, watch as r, openBlock as S, createElementBlock as h } from "vue";
2
+ import { Sankey as u } from "@unovis/ts";
3
+ import { componentAccessorKey as v } from "../../utils/context.js";
4
+ import { useForwardProps as x, arePropsEqual as f } from "../../utils/props.js";
5
+ const k = { "data-vis-component": "" }, M = u.selectors, P = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
@@ -12,6 +12,7 @@ const k = { "data-vis-component": "" }, M = c.selectors, _ = /* @__PURE__ */ d({
12
12
  enableZoom: { type: Boolean },
13
13
  zoomExtent: {},
14
14
  zoomMode: {},
15
+ disableZoomModifierKeys: { type: Boolean },
15
16
  exitTransitionType: {},
16
17
  enterTransitionType: {},
17
18
  highlightSubtreeOnHover: { type: Boolean },
@@ -26,13 +27,16 @@ const k = { "data-vis-component": "" }, M = c.selectors, _ = /* @__PURE__ */ d({
26
27
  nodeMinHeight: {},
27
28
  nodeMaxHeight: {},
28
29
  nodePadding: {},
30
+ nodeAdaptivePadding: { type: Boolean },
29
31
  showSingleNode: { type: Boolean },
30
32
  nodeCursor: { type: [Function, String, null] },
31
33
  nodeIcon: { type: [Function, String, null] },
32
34
  nodeColor: { type: [Function, String, Array, null] },
35
+ nodePattern: { type: [Function, null] },
33
36
  nodeFixedValue: { type: [Function, Number, null] },
34
37
  nodeIconColor: { type: [Function, String, Array, null] },
35
38
  linkColor: { type: [Function, String, null] },
39
+ linkPattern: { type: [Function, null] },
36
40
  linkValue: { type: [Function, Number, null] },
37
41
  linkCursor: { type: [Function, String, null] },
38
42
  label: { type: [Function, String, null] },
@@ -59,35 +63,32 @@ const k = { "data-vis-component": "" }, M = c.selectors, _ = /* @__PURE__ */ d({
59
63
  subLabelTextDecoration: { type: [Function, String, null] },
60
64
  subLabelToLabelInlineWidthRatio: {},
61
65
  onZoom: { type: Function },
66
+ onLayoutCalculated: { type: Function },
62
67
  selectedNodeIds: {},
63
68
  duration: {},
64
69
  events: {},
65
70
  attributes: {},
66
71
  data: {}
67
72
  },
68
- setup(p, { expose: s }) {
69
- const o = y(f), a = p, t = b(() => o.data.value ?? a.data), l = x(a), n = g();
70
- return m(() => {
71
- S(() => {
72
- var e;
73
- n.value = new c(l.value), (e = n.value) == null || e.setData(t.value), o.update(n.value);
73
+ setup(c, { expose: p }) {
74
+ const l = c, n = s(v), o = y(() => n.data.value ?? l.data), t = x(l), e = b();
75
+ return g(() => {
76
+ m(() => {
77
+ e.value = new u(t.value), e.value?.setData(o.value), n.update(e.value);
74
78
  });
75
79
  }), F(() => {
76
- var e;
77
- (e = n.value) == null || e.destroy(), o.destroy();
78
- }), u(l, (e, i) => {
79
- var r;
80
- T(e, i) || (r = n.value) == null || r.setConfig(l.value);
81
- }), u(t, () => {
82
- var e;
83
- (e = n.value) == null || e.setData(t.value);
84
- }), s({
85
- component: n
86
- }), (e, i) => (v(), h("div", k));
80
+ e.value?.destroy(), n.destroy();
81
+ }), r(t, (a, i) => {
82
+ f(a, i) || (e.value?.setConfig(t.value), e.value?.render());
83
+ }), r(o, () => {
84
+ e.value?.setData(o.value);
85
+ }), p({
86
+ component: e
87
+ }), (a, i) => (S(), h("div", k));
87
88
  }
88
89
  });
89
90
  export {
90
91
  M as VisSankeySelectors,
91
- _ as default
92
+ P as default
92
93
  };
93
94
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<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<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","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,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CzC,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
+ {"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode, L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { SankeyConfigInterface, SankeyInputLink, SankeyInputNode } from '@unovis/ts'\nimport { Sankey } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = SankeyConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 component.value?.render()\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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisSankeySelectors","Sankey","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CzC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,GAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,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"),s=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),v={"data-vis-component":""},S=s.Scatter.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,Array,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,String,null]},strokeColor:{type:[Function,String,Array,null]},strokeWidth:{type:[Function,Number,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:y}){const o=t.inject(d.componentAccessorKey),c=p,r=t.computed(()=>o.data.value??c.data),a=i.useForwardProps(c),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new s.Scatter(a.value),(e=n.value)==null||e.setData(r.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(a,(e,l)=>{var u;i.arePropsEqual(e,l)||(u=n.value)==null||u.setConfig(a.value)}),t.watch(r,()=>{var e;(e=n.value)==null||e.setData(r.value)}),y({component:n}),(e,l)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisScatterSelectors=S;exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),y=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),d={"data-vis-component":""},v=i.Scatter.selectors,F=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,Array,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,String,null]},strokeColor:{type:[Function,String,Array,null]},strokeWidth:{type:[Function,Number,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const l=s,n=e.inject(y.componentAccessorKey),o=e.computed(()=>n.data.value??l.data),r=u.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Scatter(r.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(r,(a,c)=>{u.arePropsEqual(a,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(a,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisScatterSelectors=v;exports.default=F;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Scatter, ScatterConfigInterface, 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 = ScatterConfigInterface<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<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisScatterSelectors","Scatter","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,EAAsBC,EAAAA,QAAQ,qxBA3C3C,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,UAAeQ,EAAO,KAAK,GACjDM,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
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { ScatterConfigInterface } from '@unovis/ts'\nimport { Scatter } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = ScatterConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 component.value?.render()\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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisScatterSelectors","Scatter","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAsBC,EAAAA,QAAQ,i0BA3C3C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,EACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { Scatter, ScatterConfigInterface } from '@unovis/ts';
1
+ import { ScatterConfigInterface, Scatter } from '@unovis/ts';
2
2
 
3
3
  export declare const VisScatterSelectors: typeof import("@unovis/ts/components/scatter/style");
4
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<{
@@ -1,11 +1,12 @@
1
- import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as v, nextTick as b, onUnmounted as S, watch as u, createElementBlock as g, openBlock as f } from "vue";
2
- import { Scatter as i } from "@unovis/ts";
1
+ import { defineComponent as p, inject as y, computed as d, ref as m, onMounted as F, nextTick as v, onUnmounted as b, watch as c, openBlock as S, createElementBlock as g } from "vue";
2
+ import { Scatter as u } from "@unovis/ts";
3
+ import { componentAccessorKey as f } from "../../utils/context.js";
3
4
  import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
4
- import { componentAccessorKey as h } from "../../utils/context.js";
5
- const k = { "data-vis-component": "" }, N = i.selectors, O = /* @__PURE__ */ y({
5
+ const h = { "data-vis-component": "" }, j = u.selectors, N = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: { type: [Function, String, Array, null] },
9
+ pattern: { type: [Function, null] },
9
10
  size: { type: [Function, Number, null] },
10
11
  sizeScale: { type: [Object, Function] },
11
12
  sizeRange: {},
@@ -21,6 +22,7 @@ const k = { "data-vis-component": "" }, N = i.selectors, O = /* @__PURE__ */ y({
21
22
  x: { type: [Function, Number, null] },
22
23
  y: { type: [Function, Number, null, Array] },
23
24
  id: { type: Function },
25
+ colorKeys: {},
24
26
  xScale: { type: [Object, Function] },
25
27
  yScale: { type: [Object, Function] },
26
28
  excludeFromDomainCalculation: { type: Boolean },
@@ -29,29 +31,25 @@ const k = { "data-vis-component": "" }, N = i.selectors, O = /* @__PURE__ */ y({
29
31
  attributes: {},
30
32
  data: {}
31
33
  },
32
- setup(s, { expose: p }) {
33
- const n = m(h), r = s, o = d(() => n.data.value ?? r.data), a = x(r), t = F();
34
- return v(() => {
35
- b(() => {
36
- var e;
37
- t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
34
+ setup(i, { expose: s }) {
35
+ const r = i, t = y(f), n = d(() => t.data.value ?? r.data), o = x(r), e = m();
36
+ return F(() => {
37
+ v(() => {
38
+ e.value = new u(o.value), e.value?.setData(n.value), t.update(e.value);
38
39
  });
39
- }), S(() => {
40
- var e;
41
- (e = t.value) == null || e.destroy(), n.destroy();
42
- }), u(a, (e, l) => {
43
- var c;
44
- _(e, l) || (c = t.value) == null || c.setConfig(a.value);
45
- }), u(o, () => {
46
- var e;
47
- (e = t.value) == null || e.setData(o.value);
48
- }), p({
49
- component: t
50
- }), (e, l) => (f(), g("div", k));
40
+ }), b(() => {
41
+ e.value?.destroy(), t.destroy();
42
+ }), c(o, (a, l) => {
43
+ _(a, l) || (e.value?.setConfig(o.value), e.value?.render());
44
+ }), c(n, () => {
45
+ e.value?.setData(n.value);
46
+ }), s({
47
+ component: e
48
+ }), (a, l) => (S(), g("div", h));
51
49
  }
52
50
  });
53
51
  export {
54
- N as VisScatterSelectors,
55
- O as default
52
+ j as VisScatterSelectors,
53
+ N as default
56
54
  };
57
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Scatter, ScatterConfigInterface, 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 = ScatterConfigInterface<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<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisScatterSelectors","Scatter","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,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,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,EAAeQ,EAAO,KAAK,IACjDM,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
+ {"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { ScatterConfigInterface } from '@unovis/ts'\nimport { Scatter } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = ScatterConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 component.value?.render()\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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisScatterSelectors","Scatter","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,GACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,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"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},m=l.StackedBar.selectors,b=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=t.inject(y.componentAccessorKey),c=d,a=t.computed(()=>n.data.value??c.data),r=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.StackedBar(r.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(r,(e,u)=>{var s;i.arePropsEqual(e,u)||(s=o.value)==null||s.setConfig(r.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),p({component:o}),(e,u)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisStackedBarSelectors=m;exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),p=require("../../utils/context.cjs"),l=require("../../utils/props.cjs"),y={"data-vis-component":""},v=s.StackedBar.selectors,b=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},barStyle:{type:[Function,null]},baseline:{type:[Function,Number,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:d}){const r=i,n=e.inject(p.componentAccessorKey),o=e.computed(()=>n.data.value??r.data),a=l.useForwardProps(r),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.StackedBar(a.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(a,(c,u)=>{l.arePropsEqual(c,u)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),d({component:t}),(c,u)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisStackedBarSelectors=v;exports.default=b;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { StackedBar, StackedBarConfigInterface, 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 = StackedBarConfigInterface<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<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisStackedBarSelectors","StackedBar","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,EAAyBC,EAAAA,WAAW,6iBA3CjD,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,aAAkBQ,EAAO,KAAK,GACpDM,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
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { StackedBarConfigInterface } from '@unovis/ts'\nimport { StackedBar } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = StackedBarConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<StackedBar<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 component.value?.render()\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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisStackedBarSelectors","StackedBar","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAyBC,EAAAA,WAAW,gqBA3CjD,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,aAAkBQ,EAAO,KAAK,EACpDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { StackedBar, StackedBarConfigInterface } from '@unovis/ts';
1
+ import { StackedBarConfigInterface, StackedBar } from '@unovis/ts';
2
2
 
3
3
  export declare const VisStackedBarSelectors: typeof import("@unovis/ts/components/stacked-bar/style");
4
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<{
@@ -1,11 +1,14 @@
1
- import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as b, nextTick as f, onUnmounted as x, watch as i, createElementBlock as F, openBlock as S } from "vue";
1
+ import { defineComponent as p, inject as d, computed as m, ref as y, onMounted as v, nextTick as b, onUnmounted as F, watch as u, openBlock as f, createElementBlock as x } from "vue";
2
2
  import { StackedBar as l } from "@unovis/ts";
3
+ import { componentAccessorKey as S } from "../../utils/context.js";
3
4
  import { useForwardProps as _, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as h } from "../../utils/context.js";
5
- const B = { "data-vis-component": "" }, j = l.selectors, w = /* @__PURE__ */ d({
5
+ const h = { "data-vis-component": "" }, N = l.selectors, P = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: { type: [Function, String, Array, null] },
9
+ pattern: { type: [Function, null] },
10
+ barStyle: { type: [Function, null] },
11
+ baseline: { type: [Function, Number, null] },
9
12
  barWidth: {},
10
13
  barMaxWidth: {},
11
14
  dataStep: {},
@@ -18,6 +21,7 @@ const B = { "data-vis-component": "" }, j = l.selectors, w = /* @__PURE__ */ d({
18
21
  x: { type: [Function, Number, null] },
19
22
  y: { type: [Function, Number, null, Array] },
20
23
  id: { type: Function },
24
+ colorKeys: {},
21
25
  xScale: { type: [Object, Function] },
22
26
  yScale: { type: [Object, Function] },
23
27
  excludeFromDomainCalculation: { type: Boolean },
@@ -26,29 +30,25 @@ const B = { "data-vis-component": "" }, j = l.selectors, w = /* @__PURE__ */ d({
26
30
  attributes: {},
27
31
  data: {}
28
32
  },
29
- setup(s, { expose: p }) {
30
- const o = m(h), r = s, n = y(() => o.data.value ?? r.data), a = _(r), t = v();
31
- return b(() => {
32
- f(() => {
33
- var e;
34
- t.value = new l(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
33
+ setup(i, { expose: s }) {
34
+ const a = i, t = d(S), n = m(() => t.data.value ?? a.data), o = _(a), e = y();
35
+ return v(() => {
36
+ b(() => {
37
+ e.value = new l(o.value), e.value?.setData(n.value), t.update(e.value);
35
38
  });
36
- }), x(() => {
37
- var e;
38
- (e = t.value) == null || e.destroy(), o.destroy();
39
- }), i(a, (e, c) => {
40
- var u;
41
- g(e, c) || (u = t.value) == null || u.setConfig(a.value);
42
- }), i(n, () => {
43
- var e;
44
- (e = t.value) == null || e.setData(n.value);
45
- }), p({
46
- component: t
47
- }), (e, c) => (S(), F("div", B));
39
+ }), F(() => {
40
+ e.value?.destroy(), t.destroy();
41
+ }), u(o, (r, c) => {
42
+ g(r, c) || (e.value?.setConfig(o.value), e.value?.render());
43
+ }), u(n, () => {
44
+ e.value?.setData(n.value);
45
+ }), s({
46
+ component: e
47
+ }), (r, c) => (f(), x("div", h));
48
48
  }
49
49
  });
50
50
  export {
51
- j as VisStackedBarSelectors,
52
- w as default
51
+ N as VisStackedBarSelectors,
52
+ P as default
53
53
  };
54
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { StackedBar, StackedBarConfigInterface, 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 = StackedBarConfigInterface<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<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisStackedBarSelectors","StackedBar","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,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjD,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,EAAkBQ,EAAO,KAAK,IACpDM,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
+ {"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { StackedBarConfigInterface } from '@unovis/ts'\nimport { StackedBar } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = StackedBarConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<StackedBar<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 component.value?.render()\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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisStackedBarSelectors","StackedBar","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjD,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAkBQ,EAAO,KAAK,GACpDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,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"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},_=l.Timeline.selectors,f=t.defineComponent({__name:"index",props:{data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),c=d,s=t.computed(()=>n.data.value??c.data),a=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Timeline(a.value),(e=o.value)==null||e.setData(s.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(a,(e,r)=>{var u;i.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(a.value)}),t.watch(s,()=>{var e;(e=o.value)==null||e.setData(s.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisTimelineSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),p=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),v={"data-vis-component":""},m=i.Timeline.selectors,_=e.defineComponent({__name:"index",props:{data:{}},setup(l,{expose:d}){const a=l,o=e.inject(p.componentAccessorKey),n=e.computed(()=>o.data.value??a.data),s=u.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Timeline(s.value),t.value?.setData(n.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy()}),e.watch(s,(c,r)=>{u.arePropsEqual(c,r)||(t.value?.setConfig(s.value),t.value?.render())}),e.watch(n,()=>{t.value?.setData(n.value)}),d({component:t}),(c,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisTimelineSelectors=m;exports.default=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } 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 \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ntype Props = /** @vue-ignore */ TimelineConfigInterface<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<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<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 VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTimelineSelectors","Timeline","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":"+PAoDaA,EAAuBC,EAAAA,SAAS,kFA5C7C,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,WAAgBQ,EAAO,KAAK,GAClDM,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
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { TimelineConfigInterface } from '@unovis/ts'\nimport { Timeline } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\nconst props = defineProps<{ data?: Datum[] } & /** @vue-ignore */ TimelineConfigInterface<Datum>>()\n\nconst accessor = inject(componentAccessorKey)\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<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 component.value?.render()\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 VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTimelineSelectors","Timeline","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAuBC,EAAAA,SAAS,kFAzC7C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAEtCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,WAAgBQ,EAAO,KAAK,EAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,10 +1,10 @@
1
- import { Timeline, TimelineConfigInterface } from '@unovis/ts';
1
+ import { TimelineConfigInterface, Timeline } from '@unovis/ts';
2
2
 
3
3
  export declare const VisTimelineSelectors: typeof import("@unovis/ts/components/timeline/style");
4
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>) & (TimelineConfigInterface<Datum> & {
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & ({
6
6
  data?: Datum[];
7
- }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
7
+ } & TimelineConfigInterface<Datum>), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
8
  expose(exposed: import('vue').ShallowUnwrapRef<{
9
9
  component: import('vue').Ref<Timeline<Datum>, Timeline<Datum>>;
10
10
  }>): void;
@@ -1,35 +1,31 @@
1
- import { defineComponent as m, inject as d, computed as v, ref as f, onMounted as _, nextTick as x, onUnmounted as h, watch as u, createElementBlock as k, openBlock as w } from "vue";
2
- import { Timeline as i } from "@unovis/ts";
1
+ import { defineComponent as p, inject as m, computed as d, ref as v, onMounted as f, nextTick as _, onUnmounted as x, watch as c, openBlock as h, createElementBlock as k } from "vue";
2
+ import { Timeline as u } from "@unovis/ts";
3
+ import { componentAccessorKey as w } from "../../utils/context.js";
3
4
  import { useForwardProps as y, arePropsEqual as T } from "../../utils/props.js";
4
- import { componentAccessorKey as g } from "../../utils/context.js";
5
- const B = { "data-vis-component": "" }, j = i.selectors, q = /* @__PURE__ */ m({
5
+ const g = { "data-vis-component": "" }, P = u.selectors, j = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  data: {}
9
9
  },
10
- setup(l, { expose: p }) {
11
- const t = d(g), s = l, a = v(() => t.data.value ?? s.data), n = y(s), o = f();
12
- return _(() => {
13
- x(() => {
14
- var e;
15
- o.value = new i(n.value), (e = o.value) == null || e.setData(a.value), t.update(o.value);
10
+ setup(l, { expose: i }) {
11
+ const n = l, o = m(w), t = d(() => o.data.value ?? n.data), a = y(n), e = v();
12
+ return f(() => {
13
+ _(() => {
14
+ e.value = new u(a.value), e.value?.setData(t.value), o.update(e.value);
16
15
  });
17
- }), h(() => {
18
- var e;
19
- (e = o.value) == null || e.destroy(), t.destroy();
20
- }), u(n, (e, c) => {
21
- var r;
22
- T(e, c) || (r = o.value) == null || r.setConfig(n.value);
23
- }), u(a, () => {
24
- var e;
25
- (e = o.value) == null || e.setData(a.value);
26
- }), p({
27
- component: o
28
- }), (e, c) => (w(), k("div", B));
16
+ }), x(() => {
17
+ e.value?.destroy(), o.destroy();
18
+ }), c(a, (s, r) => {
19
+ T(s, r) || (e.value?.setConfig(a.value), e.value?.render());
20
+ }), c(t, () => {
21
+ e.value?.setData(t.value);
22
+ }), i({
23
+ component: e
24
+ }), (s, r) => (h(), k("div", g));
29
25
  }
30
26
  });
31
27
  export {
32
- j as VisTimelineSelectors,
33
- q as default
28
+ P as VisTimelineSelectors,
29
+ j as default
34
30
  };
35
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } 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 \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ntype Props = /** @vue-ignore */ TimelineConfigInterface<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<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<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 VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTimelineSelectors","Timeline","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":";;;;wCAoDaA,IAAuBC,EAAS;;;;;;AA5C7C,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,EAAgBQ,EAAO,KAAK,IAClDM,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
+ {"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { TimelineConfigInterface } from '@unovis/ts'\nimport { Timeline } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\nconst props = defineProps<{ data?: Datum[] } & /** @vue-ignore */ TimelineConfigInterface<Datum>>()\n\nconst accessor = inject(componentAccessorKey)\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<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 component.value?.render()\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 VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTimelineSelectors","Timeline","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAuBC,EAAS;;;;;;AAzC7C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAEtCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAgBQ,EAAO,KAAK,GAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@unovis/ts"),l=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),v={"data-vis-tooltip":""},f=a.Tooltip.selectors,m=e.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(i,{expose:u}){const n=e.inject(d.tooltipAccessorKey),p=i,s=l.useForwardProps(p),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{o.value=new a.Tooltip(s.value),n.update(o.value)})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy(),n.destroy()}),e.watch(s,(t,r)=>{var c;l.arePropsEqual(t,r)||(c=o.value)==null||c.setConfig(s.value)}),u({component:o}),(t,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisTooltipSelectors=f;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@unovis/ts"),p=require("../../utils/context.cjs"),l=require("../../utils/props.cjs"),d={"data-vis-tooltip":""},v=a.Tooltip.selectors,f=e.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(c,{expose:i}){const u=c,n=e.inject(p.tooltipAccessorKey),t=l.useForwardProps(u),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{o.value=new a.Tooltip(t.value),n.update(o.value)})}),e.onUnmounted(()=>{o.value?.destroy(),n.destroy()}),e.watch(t,(r,s)=>{l.arePropsEqual(r,s)||(o.value?.setConfig(t.value),o.value?.render())}),i({component:o}),(r,s)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisTooltipSelectors=v;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \ntype Props = TooltipConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n \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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n\n\n"],"names":["VisTooltipSelectors","Tooltip","accessor","inject","tooltipAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"6PA+CaA,EAAsBC,EAAAA,QAAQ,oTAxC3C,MAAMC,EAAWC,EAAAA,OAAOC,oBAAkB,EAIpCC,EAAQC,EAIRC,EAASC,EAAAA,gBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,UAAQM,EAAO,KAAK,EAE1CL,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAA,CACX,CAAC,EAEDa,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UAAUP,EAAO,MAEtC,CAAC,EAGDY,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAAwB,MAAxBC,CAAwB"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { TooltipConfigInterface } from '@unovis/ts'\nimport { Tooltip } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { tooltipAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props\ntype Props = TooltipConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n\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 component.value?.render()\n }\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n"],"names":["VisTooltipSelectors","Tooltip","props","__props","accessor","inject","tooltipAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"6PA8CaA,EAAsBC,EAAAA,QAAQ,oTAtC3C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,oBAAkB,EAKpCC,EAASC,EAAAA,gBAAgBN,CAAK,EAG9BO,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,UAAQM,EAAO,KAAK,EAE1CH,EAAS,OAAOK,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBL,EAAS,QAAA,CACX,CAAC,EAEDU,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAAwB,MAAxBC,CAAwB"}
@@ -1,4 +1,4 @@
1
- import { Tooltip, TooltipConfigInterface } from '@unovis/ts';
1
+ import { TooltipConfigInterface, Tooltip } from '@unovis/ts';
2
2
 
3
3
  export declare const VisTooltipSelectors: typeof import("@unovis/ts/components/tooltip/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TooltipConfigInterface & {