@unovis/vue 1.6.5 → 1.6.6-beta.1

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 (125) hide show
  1. package/components/annotations/index.cjs +1 -1
  2. package/components/annotations/index.cjs.map +1 -1
  3. package/components/annotations/index.js +18 -20
  4. package/components/annotations/index.js.map +1 -1
  5. package/components/area/index.cjs +1 -1
  6. package/components/area/index.cjs.map +1 -1
  7. package/components/area/index.js +21 -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.js +23 -26
  12. package/components/axis/index.js.map +1 -1
  13. package/components/brush/index.cjs +1 -1
  14. package/components/brush/index.cjs.map +1 -1
  15. package/components/brush/index.js +22 -25
  16. package/components/brush/index.js.map +1 -1
  17. package/components/chord-diagram/index.cjs +1 -1
  18. package/components/chord-diagram/index.cjs.map +1 -1
  19. package/components/chord-diagram/index.js +21 -25
  20. package/components/chord-diagram/index.js.map +1 -1
  21. package/components/crosshair/index.cjs +1 -1
  22. package/components/crosshair/index.cjs.map +1 -1
  23. package/components/crosshair/index.js +21 -25
  24. package/components/crosshair/index.js.map +1 -1
  25. package/components/donut/index.cjs +1 -1
  26. package/components/donut/index.cjs.map +1 -1
  27. package/components/donut/index.js +21 -25
  28. package/components/donut/index.js.map +1 -1
  29. package/components/free-brush/index.cjs +1 -1
  30. package/components/free-brush/index.cjs.map +1 -1
  31. package/components/free-brush/index.js +21 -25
  32. package/components/free-brush/index.js.map +1 -1
  33. package/components/graph/index.cjs +1 -1
  34. package/components/graph/index.cjs.map +1 -1
  35. package/components/graph/index.js +21 -25
  36. package/components/graph/index.js.map +1 -1
  37. package/components/grouped-bar/index.cjs +1 -1
  38. package/components/grouped-bar/index.cjs.map +1 -1
  39. package/components/grouped-bar/index.js +20 -24
  40. package/components/grouped-bar/index.js.map +1 -1
  41. package/components/line/index.cjs +1 -1
  42. package/components/line/index.cjs.map +1 -1
  43. package/components/line/index.js +21 -25
  44. package/components/line/index.js.map +1 -1
  45. package/components/nested-donut/index.cjs +1 -1
  46. package/components/nested-donut/index.cjs.map +1 -1
  47. package/components/nested-donut/index.js +21 -25
  48. package/components/nested-donut/index.js.map +1 -1
  49. package/components/plotband/index.cjs +1 -1
  50. package/components/plotband/index.cjs.map +1 -1
  51. package/components/plotband/index.js +18 -20
  52. package/components/plotband/index.js.map +1 -1
  53. package/components/plotline/index.cjs +1 -1
  54. package/components/plotline/index.cjs.map +1 -1
  55. package/components/plotline/index.js +18 -20
  56. package/components/plotline/index.js.map +1 -1
  57. package/components/sankey/index.cjs +1 -1
  58. package/components/sankey/index.cjs.map +1 -1
  59. package/components/sankey/index.js +21 -24
  60. package/components/sankey/index.js.map +1 -1
  61. package/components/scatter/index.cjs +1 -1
  62. package/components/scatter/index.cjs.map +1 -1
  63. package/components/scatter/index.js +21 -25
  64. package/components/scatter/index.js.map +1 -1
  65. package/components/stacked-bar/index.cjs +1 -1
  66. package/components/stacked-bar/index.cjs.map +1 -1
  67. package/components/stacked-bar/index.js +21 -25
  68. package/components/stacked-bar/index.js.map +1 -1
  69. package/components/timeline/index.cjs +1 -1
  70. package/components/timeline/index.cjs.map +1 -1
  71. package/components/timeline/index.js +21 -25
  72. package/components/timeline/index.js.map +1 -1
  73. package/components/tooltip/index.cjs +1 -1
  74. package/components/tooltip/index.cjs.map +1 -1
  75. package/components/tooltip/index.js +17 -19
  76. package/components/tooltip/index.js.map +1 -1
  77. package/components/topojson-map/index.cjs +1 -1
  78. package/components/topojson-map/index.cjs.map +1 -1
  79. package/components/topojson-map/index.js +21 -25
  80. package/components/topojson-map/index.js.map +1 -1
  81. package/components/treemap/index.cjs +1 -1
  82. package/components/treemap/index.cjs.map +1 -1
  83. package/components/treemap/index.js +21 -25
  84. package/components/treemap/index.js.map +1 -1
  85. package/components/xy-labels/index.cjs +1 -1
  86. package/components/xy-labels/index.cjs.map +1 -1
  87. package/components/xy-labels/index.js +21 -25
  88. package/components/xy-labels/index.js.map +1 -1
  89. package/containers/single-container/index.cjs +1 -1
  90. package/containers/single-container/index.cjs.map +1 -1
  91. package/containers/single-container/index.js +23 -24
  92. package/containers/single-container/index.js.map +1 -1
  93. package/containers/xy-container/index.cjs +1 -1
  94. package/containers/xy-container/index.cjs.map +1 -1
  95. package/containers/xy-container/index.js +22 -29
  96. package/containers/xy-container/index.js.map +1 -1
  97. package/html-components/bullet-legend/index.cjs +1 -1
  98. package/html-components/bullet-legend/index.cjs.map +1 -1
  99. package/html-components/bullet-legend/index.js +21 -23
  100. package/html-components/bullet-legend/index.js.map +1 -1
  101. package/html-components/flow-legend/index.cjs +1 -1
  102. package/html-components/flow-legend/index.cjs.map +1 -1
  103. package/html-components/flow-legend/index.js +20 -22
  104. package/html-components/flow-legend/index.js.map +1 -1
  105. package/html-components/leaflet-flow-map/index.cjs +1 -1
  106. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  107. package/html-components/leaflet-flow-map/index.js +21 -24
  108. package/html-components/leaflet-flow-map/index.js.map +1 -1
  109. package/html-components/leaflet-map/index.cjs +1 -1
  110. package/html-components/leaflet-map/index.cjs.map +1 -1
  111. package/html-components/leaflet-map/index.js +21 -24
  112. package/html-components/leaflet-map/index.js.map +1 -1
  113. package/html-components/rolling-pin-legend/index.cjs +1 -1
  114. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  115. package/html-components/rolling-pin-legend/index.js +21 -23
  116. package/html-components/rolling-pin-legend/index.js.map +1 -1
  117. package/package.json +5 -4
  118. package/utils/context.cjs.map +1 -1
  119. package/utils/context.js +1 -1
  120. package/utils/context.js.map +1 -1
  121. package/utils/props.cjs +1 -1
  122. package/utils/props.cjs.map +1 -1
  123. package/utils/props.d.ts +1 -4
  124. package/utils/props.js +9 -9
  125. package/utils/props.js.map +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),a=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),p={"data-vis-annotations":""},v=c.Annotations.selectors,_=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:u}){const n=e.inject(d.annotationsAccessorKey),l=i,o=a.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new c.Annotations(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(o,(s,r)=>{a.arePropsEqual(s,r)||(t.value?.setConfig(o.value),t.value?.render())}),u({component:t}),(s,r)=>(e.openBlock(),e.createElementBlock("div",p))}});exports.VisAnnotationsSelectors=v;exports.default=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(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 VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,sKAxCnD,MAAMC,EAAWC,EAAAA,OAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,EAAAA,gBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CL,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,qBAA4B,MAA5BC,CAA4B"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQAgDaA,EAA0BC,EAAAA,YAAY,sKAzCnD,MAAMC,EAAWC,EAAAA,OAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,EAAAA,gBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CL,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,EAGDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA4B,MAA5BC,CAA4B"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, inject as u, ref as d, onMounted as m, nextTick as l, onUnmounted as f, watch as v, openBlock as _, createElementBlock as x } from "vue";
2
- import { Annotations as a } from "@unovis/ts";
3
- import { useForwardProps as B, arePropsEqual as y } from "../../utils/props.js";
4
- import { annotationsAccessorKey as g } from "../../utils/context.js";
5
- const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p({
1
+ import { defineComponent as i, inject as p, ref as u, onMounted as d, nextTick as l, onUnmounted as m, watch as f, openBlock as v, createElementBlock as _ } from "vue";
2
+ import { Annotations as r } from "@unovis/ts";
3
+ import { useForwardProps as x, arePropsEqual as B } from "../../utils/props.js";
4
+ import { annotationsAccessorKey as y } from "../../utils/context.js";
5
+ const g = { "data-vis-annotations": "" }, E = r.selectors, P = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {
8
8
  items: {},
@@ -12,25 +12,23 @@ const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p
12
12
  attributes: {},
13
13
  data: {}
14
14
  },
15
- setup(c, { expose: i }) {
16
- const n = u(g), t = B(c), o = d();
17
- return m(() => {
15
+ setup(a, { expose: c }) {
16
+ const t = p(y), o = x(a), e = u();
17
+ return d(() => {
18
18
  l(() => {
19
- o.value = new a(t.value), n.update(o.value);
19
+ e.value = new r(o.value), t.update(e.value);
20
20
  });
21
- }), f(() => {
22
- var e;
23
- (e = o.value) == null || e.destroy(), n.destroy();
24
- }), v(t, (e, s) => {
25
- var r;
26
- y(e, s) || (r = o.value) == null || r.setConfig(t.value);
27
- }), i({
28
- component: o
29
- }), (e, s) => (_(), x("div", h));
21
+ }), m(() => {
22
+ e.value?.destroy(), t.destroy();
23
+ }), f(o, (n, s) => {
24
+ B(n, s) || (e.value?.setConfig(o.value), e.value?.render());
25
+ }), c({
26
+ component: e
27
+ }), (n, s) => (v(), _("div", g));
30
28
  }
31
29
  });
32
30
  export {
33
- P as VisAnnotationsSelectors,
34
- T as default
31
+ E as VisAnnotationsSelectors,
32
+ P as default
35
33
  };
36
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(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 VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;;AAxCnD,UAAMC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAE9CH,EAAS,OAAOM,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAL,EAAU,UAAV,QAAAK,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CAgDaA,IAA0BC,EAAY;;;;;;;;;;;AAzCnD,UAAMC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAE9CH,EAAS,OAAOM,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBN,EAAS,QAAA;AAAA,IACX,CAAC,GAEDW,EAAMR,GAAQ,CAACS,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUH,EAAO,KAAK,GACvCG,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAGDS,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;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"),m={"data-vis-component":""},v=s.Area.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},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),u=p,a=t.computed(()=>o.data.value??u.data),r=i.useForwardProps(u),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new s.Area(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,c)=>{var l;i.arePropsEqual(e,c)||(l=n.value)==null||l.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),y({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisAreaSelectors=v;exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),d={"data-vis-component":""},v=i.Area.selectors,m=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},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(s,{expose:p}){const n=e.inject(y.componentAccessorKey),r=s,o=e.computed(()=>n.data.value??r.data),a=l.useForwardProps(r),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Area(a.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(a,(u,c)=>{l.arePropsEqual(u,c)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(u,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisAreaSelectors=v;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","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,EAAmBC,EAAAA,KAAK,qqBA3CrC,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,OAAYQ,EAAO,KAAK,GAC9CM,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/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAmBC,EAAAA,KAAK,qqBA5CrC,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,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBT,EAAS,QAAA,CACX,CAAC,EAEDc,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,8 +1,8 @@
1
- import { defineComponent as y, inject as m, computed as d, ref as v, onMounted as F, nextTick as f, onUnmounted as x, watch as u, openBlock as b, createElementBlock as g } from "vue";
2
- import { Area as i } from "@unovis/ts";
3
- import { useForwardProps as h, arePropsEqual as A } from "../../utils/props.js";
4
- import { componentAccessorKey as _ } from "../../utils/context.js";
5
- const B = { "data-vis-component": "" }, N = i.selectors, j = /* @__PURE__ */ y({
1
+ import { defineComponent as p, inject as y, computed as m, ref as d, onMounted as v, nextTick as F, onUnmounted as f, watch as l, openBlock as x, createElementBlock as b } from "vue";
2
+ import { Area as u } from "@unovis/ts";
3
+ import { useForwardProps as g, arePropsEqual as h } from "../../utils/props.js";
4
+ import { componentAccessorKey as A } from "../../utils/context.js";
5
+ const _ = { "data-vis-component": "" }, D = u.selectors, N = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: { type: [Function, String, Array, null] },
@@ -28,29 +28,25 @@ const B = { "data-vis-component": "" }, N = i.selectors, j = /* @__PURE__ */ y({
28
28
  attributes: {},
29
29
  data: {}
30
30
  },
31
- setup(s, { expose: p }) {
32
- const n = m(_), r = s, o = d(() => n.data.value ?? r.data), a = h(r), t = v();
33
- return F(() => {
34
- f(() => {
35
- var e;
36
- t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
31
+ setup(i, { expose: s }) {
32
+ const t = y(A), a = i, n = m(() => t.data.value ?? a.data), o = g(a), e = d();
33
+ return v(() => {
34
+ F(() => {
35
+ e.value = new u(o.value), e.value?.setData(n.value), t.update(e.value);
37
36
  });
38
- }), x(() => {
39
- var e;
40
- (e = t.value) == null || e.destroy(), n.destroy();
41
- }), u(a, (e, c) => {
42
- var l;
43
- A(e, c) || (l = t.value) == null || l.setConfig(a.value);
44
- }), u(o, () => {
45
- var e;
46
- (e = t.value) == null || e.setData(o.value);
47
- }), p({
48
- component: t
49
- }), (e, c) => (b(), g("div", B));
37
+ }), f(() => {
38
+ e.value?.destroy(), t.destroy();
39
+ }), l(o, (r, c) => {
40
+ h(r, c) || (e.value?.setConfig(o.value), e.value?.render());
41
+ }), l(n, () => {
42
+ e.value?.setData(n.value);
43
+ }), s({
44
+ component: e
45
+ }), (r, c) => (x(), b("div", _));
50
46
  }
51
47
  });
52
48
  export {
53
- N as VisAreaSelectors,
54
- j as default
49
+ D as VisAreaSelectors,
50
+ N as default
55
51
  };
56
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","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,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,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,EAAYQ,EAAO,KAAK,IAC9CM,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/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5CrC,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,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAA;AAAA,IACX,CAAC,GAEDc,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"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),x={"data-vis-axis":""},k=u.Axis.selectors,T=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(y.axisAccessorKey),i=p,a=t.computed(()=>n.data.value??i.data),c=r.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Axis(c.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(i.type)}),t.watch(c,(e,l)=>{var s;r.arePropsEqual(e,l)||(s=o.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",x))}});exports.VisAxisSelectors=k;exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),r=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),y={"data-vis-axis":""},x=s.Axis.selectors,k=e.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{type:[String,Function]},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},tickSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:p}){const o=e.inject(d.axisAccessorKey),n=u,i=e.computed(()=>o.data.value??n.data),a=r.useForwardProps(n),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.Axis(a.value),t.value?.setData(i.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy(n.type)}),e.watch(a,(c,l)=>{r.arePropsEqual(c,l)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(i,()=>{t.value?.setData(i.value)}),p({component:t}),(c,l)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisAxisSelectors=x;exports.default=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<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<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\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 VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,68BA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,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,OAAYQ,EAAO,KAAK,GAC9CM,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,QAAQG,EAAM,IAAI,CAC7B,CAAC,EAEDY,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,qBAAqB,MAArBC,CAAqB"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<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<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\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 VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAmDaA,EAAmBC,EAAAA,KAAK,++BA5CrC,MAAMC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,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,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBT,EAAS,QAAQG,EAAM,IAAI,CAC7B,CAAC,EAEDW,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,qBAAqB,MAArBC,CAAqB"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as y, computed as m, ref as x, onMounted as k, nextTick as T, onUnmounted as v, watch as r, openBlock as F, createElementBlock as f } from "vue";
2
- import { Axis as s } from "@unovis/ts";
3
- import { useForwardProps as B, arePropsEqual as b } from "../../utils/props.js";
4
- import { axisAccessorKey as g } from "../../utils/context.js";
5
- const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
1
+ import { defineComponent as u, inject as d, computed as y, ref as m, onMounted as x, nextTick as k, onUnmounted as T, watch as c, openBlock as v, createElementBlock as F } from "vue";
2
+ import { Axis as r } from "@unovis/ts";
3
+ import { useForwardProps as f, arePropsEqual as B } from "../../utils/props.js";
4
+ import { axisAccessorKey as b } from "../../utils/context.js";
5
+ const S = { "data-vis-axis": "" }, M = r.selectors, O = /* @__PURE__ */ u({
6
6
  __name: "index",
7
7
  props: {
8
8
  position: {},
@@ -29,11 +29,12 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
29
29
  tickTextForceWordBreak: { type: Boolean },
30
30
  tickTextTrimType: {},
31
31
  tickTextFontSize: {},
32
- tickTextAlign: {},
32
+ tickTextAlign: { type: [String, Function] },
33
33
  tickTextColor: {},
34
34
  tickTextAngle: {},
35
35
  tickTextHideOverlapping: { type: Boolean },
36
36
  tickPadding: {},
37
+ tickSize: {},
37
38
  x: { type: [Function, Number, null] },
38
39
  y: { type: [Function, Number, null, Array] },
39
40
  id: { type: Function },
@@ -46,29 +47,25 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
46
47
  attributes: {},
47
48
  data: {}
48
49
  },
49
- setup(p, { expose: u }) {
50
- const o = y(g), n = p, i = m(() => o.data.value ?? n.data), a = B(n), t = x();
51
- return k(() => {
52
- T(() => {
53
- var e;
54
- t.value = new s(a.value), (e = t.value) == null || e.setData(i.value), o.update(t.value);
50
+ setup(s, { expose: p }) {
51
+ const t = d(b), o = s, n = y(() => t.data.value ?? o.data), i = f(o), e = m();
52
+ return x(() => {
53
+ k(() => {
54
+ e.value = new r(i.value), e.value?.setData(n.value), t.update(e.value);
55
55
  });
56
- }), v(() => {
57
- var e;
58
- (e = t.value) == null || e.destroy(), o.destroy(n.type);
59
- }), r(a, (e, l) => {
60
- var c;
61
- b(e, l) || (c = t.value) == null || c.setConfig(a.value);
62
- }), r(i, () => {
63
- var e;
64
- (e = t.value) == null || e.setData(i.value);
65
- }), u({
66
- component: t
67
- }), (e, l) => (F(), f("div", S));
56
+ }), T(() => {
57
+ e.value?.destroy(), t.destroy(o.type);
58
+ }), c(i, (a, l) => {
59
+ B(a, l) || (e.value?.setConfig(i.value), e.value?.render());
60
+ }), c(n, () => {
61
+ e.value?.setData(n.value);
62
+ }), p({
63
+ component: e
64
+ }), (a, l) => (v(), F("div", S));
68
65
  }
69
66
  });
70
67
  export {
71
- O as VisAxisSelectors,
72
- C as default
68
+ M as VisAxisSelectors,
69
+ O as default
73
70
  };
74
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<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<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\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 VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAe,GAIjCC,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,EAAYQ,EAAO,KAAK,IAC9CM,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,QAAQG,EAAM,IAAI;AAAA,IAC7B,CAAC,GAEDY,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,EAAqB,OAArBC,CAAqB;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<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<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\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 VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;mCAmDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5CrC,UAAMC,IAAWC,EAAOC,CAAe,GAIjCC,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,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAQG,EAAM,IAAI;AAAA,IAC7B,CAAC,GAEDW,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,EAAqB,OAArBC,CAAqB;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":""},h=l.Brush.selectors,m=t.defineComponent({__name:"index",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(y.componentAccessorKey),a=p,u=t.computed(()=>o.data.value??a.data),c=i.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new l.Brush(c.value),(e=n.value)==null||e.setData(u.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,s)=>{var r;i.arePropsEqual(e,s)||(r=n.value)==null||r.setConfig(c.value)}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),d({component:n}),(e,s)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisBrushSelectors=h;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),s=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),y={"data-vis-component":""},v=i.Brush.selectors,h=e.defineComponent({__name:"index",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},brushHeightExtend:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:d}){const n=e.inject(p.componentAccessorKey),r=l,o=e.computed(()=>n.data.value??r.data),u=s.useForwardProps(r),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Brush(u.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(u,(a,c)=>{s.arePropsEqual(a,c)||(t.value?.setConfig(u.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),d({component:t}),(a,c)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisBrushSelectors=v;exports.default=h;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","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":"+PAkDaA,EAAoBC,EAAAA,MAAM,8iBA3CvC,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"}
1
+ {"version":3,"file":"index.cjs","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 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 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","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAoBC,EAAAA,MAAM,mkBA5CvC,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,CACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,EAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBT,EAAS,QAAA,CACX,CAAC,EAEDc,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,8 +1,8 @@
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, openBlock as B, createElementBlock as x } from "vue";
2
- import { Brush as i } from "@unovis/ts";
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({
1
+ import { defineComponent as p, inject as d, computed as m, ref as y, onMounted as v, nextTick as h, onUnmounted as F, watch as u, openBlock as f, createElementBlock as B } from "vue";
2
+ import { Brush as s } from "@unovis/ts";
3
+ import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
4
+ import { componentAccessorKey as b } from "../../utils/context.js";
5
+ const g = { "data-vis-component": "" }, w = s.selectors, A = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  onBrush: { type: Function },
@@ -14,6 +14,7 @@ const S = { "data-vis-component": "" }, C = i.selectors, D = /* @__PURE__ */ d({
14
14
  draggable: { type: Boolean },
15
15
  handlePosition: {},
16
16
  selectionMinLength: {},
17
+ brushHeightExtend: {},
17
18
  x: { type: [Function, Number, null] },
18
19
  y: { type: [Function, Number, null, Array] },
19
20
  id: { type: Function },
@@ -26,29 +27,25 @@ const S = { "data-vis-component": "" }, C = i.selectors, D = /* @__PURE__ */ d({
26
27
  attributes: {},
27
28
  data: {}
28
29
  },
29
- setup(l, { expose: p }) {
30
- const o = m(g), c = l, n = y(() => o.data.value ?? c.data), a = _(c), t = v();
31
- return h(() => {
32
- F(() => {
33
- var e;
34
- t.value = new i(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
30
+ setup(i, { expose: l }) {
31
+ const t = d(b), a = i, n = m(() => t.data.value ?? a.data), o = x(a), e = y();
32
+ return v(() => {
33
+ h(() => {
34
+ e.value = new s(o.value), e.value?.setData(n.value), t.update(e.value);
35
35
  });
36
- }), f(() => {
37
- var e;
38
- (e = t.value) == null || e.destroy(), o.destroy();
39
- }), s(a, (e, r) => {
40
- var u;
41
- b(e, r) || (u = t.value) == null || u.setConfig(a.value);
42
- }), s(n, () => {
43
- var e;
44
- (e = t.value) == null || e.setData(n.value);
45
- }), p({
46
- component: t
47
- }), (e, r) => (B(), x("div", S));
36
+ }), F(() => {
37
+ e.value?.destroy(), t.destroy();
38
+ }), u(o, (r, c) => {
39
+ _(r, c) || (e.value?.setConfig(o.value), e.value?.render());
40
+ }), u(n, () => {
41
+ e.value?.setData(n.value);
42
+ }), l({
43
+ component: e
44
+ }), (r, c) => (f(), B("div", g));
48
45
  }
49
46
  });
50
47
  export {
51
- C as VisBrushSelectors,
52
- D as default
48
+ w as VisBrushSelectors,
49
+ A as default
53
50
  };
54
51
  //# 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","_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
+ {"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 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 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","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AA5CvC,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,GAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAA;AAAA,IACX,CAAC,GAEDc,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 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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),i=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),g={"data-vis-component":""},v=s.ChordDiagram.selectors,m=e.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(c,{expose:d}){const t=e.inject(p.componentAccessorKey),r=c,o=e.computed(()=>t.data.value??r.data),a=i.useForwardProps(r),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{n.value=new s.ChordDiagram(a.value),n.value?.setData(o.value),t.update(n.value)})}),e.onUnmounted(()=>{n.value?.destroy(),t.destroy()}),e.watch(a,(l,u)=>{i.arePropsEqual(l,u)||(n.value?.setConfig(a.value),n.value?.render())}),e.watch(o,()=>{n.value?.setData(o.value)}),d({component:n}),(l,u)=>(e.openBlock(),e.createElementBlock("div",g))}});exports.VisChordDiagramSelectors=v;exports.default=m;
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","_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
+ {"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 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 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","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAA2BC,EAAAA,aAAa,kiBA5CrD,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,CACbH,EAAU,MAAQ,IAAIV,eAAmBQ,EAAO,KAAK,EACrDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBT,EAAS,QAAA,CACX,CAAC,EAEDc,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,8 +1,8 @@
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, openBlock as F, createElementBlock as _ } from "vue";
2
- import { ChordDiagram as c } from "@unovis/ts";
3
- import { useForwardProps as C, arePropsEqual as S } from "../../utils/props.js";
4
- import { componentAccessorKey as b } from "../../utils/context.js";
5
- const k = { "data-vis-component": "" }, w = c.selectors, E = /* @__PURE__ */ p({
1
+ import { defineComponent as d, inject as p, computed as m, ref as g, onMounted as v, nextTick as h, onUnmounted as y, watch as i, openBlock as f, createElementBlock as F } from "vue";
2
+ import { ChordDiagram as u } from "@unovis/ts";
3
+ import { useForwardProps as _, arePropsEqual as C } from "../../utils/props.js";
4
+ import { componentAccessorKey as S } from "../../utils/context.js";
5
+ const b = { "data-vis-component": "" }, D = u.selectors, w = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  angleRange: {},
@@ -24,29 +24,25 @@ const k = { "data-vis-component": "" }, w = c.selectors, E = /* @__PURE__ */ p({
24
24
  attributes: {},
25
25
  data: {}
26
26
  },
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
- return h(() => {
30
- y(() => {
31
- var e;
32
- n.value = new c(a.value), (e = n.value) == null || e.setData(o.value), t.update(n.value);
27
+ setup(c, { expose: s }) {
28
+ const n = p(S), a = c, t = m(() => n.data.value ?? a.data), o = _(a), e = g();
29
+ return v(() => {
30
+ h(() => {
31
+ e.value = new u(o.value), e.value?.setData(t.value), n.update(e.value);
33
32
  });
34
- }), f(() => {
35
- var e;
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
- var e;
42
- (e = n.value) == null || e.setData(o.value);
43
- }), d({
44
- component: n
45
- }), (e, l) => (F(), _("div", k));
33
+ }), y(() => {
34
+ e.value?.destroy(), n.destroy();
35
+ }), i(o, (r, l) => {
36
+ C(r, l) || (e.value?.setConfig(o.value), e.value?.render());
37
+ }), i(t, () => {
38
+ e.value?.setData(t.value);
39
+ }), s({
40
+ component: e
41
+ }), (r, l) => (f(), F("div", b));
46
42
  }
47
43
  });
48
44
  export {
49
- w as VisChordDiagramSelectors,
50
- E as default
45
+ D as VisChordDiagramSelectors,
46
+ w as default
51
47
  };
52
48
  //# 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","_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
+ {"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 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 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","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAA2BC,EAAa;;;;;;;;;;;;;;;;;;;;;;;AA5CrD,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,GACrDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAA;AAAA,IACX,CAAC,GAEDc,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 s=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),h={"data-vis-crosshair":""},_=l.Crosshair.selectors,f=s.defineComponent({__name:"index",setup(d,{expose:v}){const o=s.inject(p.crosshairAccessorKey),c=d,r=s.computed(()=>o.data.value??c.data),a=i.useForwardProps(c),t=s.ref();return s.onMounted(()=>{s.nextTick(()=>{var e;t.value=new l.Crosshair(a.value),(e=t.value)==null||e.setData(r.value),o.update(t.value)})}),s.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),o.destroy()}),s.watch(a,(e,n)=>{var u;i.arePropsEqual(e,n)||(u=t.value)==null||u.setConfig(a.value)}),s.watch(r,()=>{var e;(e=t.value)==null||e.setData(r.value)}),v({component:t}),(e,n)=>(s.openBlock(),s.createElementBlock("div",h))}});exports.VisCrosshairSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),u=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),p={"data-vis-crosshair":""},h=i.Crosshair.selectors,_=e.defineComponent({__name:"index",setup(l,{expose:d}){const t=e.inject(v.crosshairAccessorKey),a=l,o=e.computed(()=>t.data.value??a.data),r=u.useForwardProps(a),s=e.ref();return e.onMounted(()=>{e.nextTick(()=>{s.value=new i.Crosshair(r.value),s.value?.setData(o.value),t.update(s.value)})}),e.onUnmounted(()=>{s.value?.destroy(),t.destroy()}),e.watch(r,(c,n)=>{u.arePropsEqual(c,n)||(s.value?.setConfig(r.value),s.value?.render())}),e.watch(o,()=>{s.value?.setData(o.value)}),d({component:s}),(c,n)=>(e.openBlock(),e.createElementBlock("div",p))}});exports.VisCrosshairSelectors=h;exports.default=_;
2
2
  //# sourceMappingURL=index.cjs.map