@unovis/vue 1.6.6-beta.0 → 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 (124) 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 +21 -25
  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 +21 -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 +21 -25
  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 -25
  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 +18 -20
  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 +20 -22
  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 +20 -22
  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.js +7 -7
  124. 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"),u=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),_={"data-vis-annotations":""},f=u.Annotations.selectors,m=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:d}){const s=e.inject(v.annotationsAccessorKey),p=l,n=i.useForwardProps(p),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new u.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;i.arePropsEqual(o,r)||((a=t.value)==null||a.setConfig(n.value),(c=t.value)==null||c.render())}),d({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",_))}});exports.VisAnnotationsSelectors=f;exports.default=m;
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 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","_a","watch","curr","prev","arePropsEqual","_b","__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,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAA,CACX,CAAC,EAEDa,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BH,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UAAUP,EAAO,QAClCY,EAAAV,EAAU,QAAV,MAAAU,EAAiB,SAErB,CAAC,EAGDC,EAAa,CACX,UAAAX,CAAA,CACD,UAQCY,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 u, inject as d, ref as l, onMounted as m, nextTick as f, onUnmounted as v, watch as _, openBlock as x, createElementBlock as B } from "vue";
2
- import { Annotations as c } from "@unovis/ts";
3
- import { useForwardProps as y, arePropsEqual as g } from "../../utils/props.js";
4
- import { annotationsAccessorKey as h } from "../../utils/context.js";
5
- const k = { "data-vis-annotations": "" }, T = c.selectors, b = /* @__PURE__ */ u({
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 k = { "data-vis-annotations": "" }, T = c.selectors, b = /* @__PURE__ */ u
12
12
  attributes: {},
13
13
  data: {}
14
14
  },
15
- setup(i, { expose: p }) {
16
- const n = d(h), t = y(i), e = l();
17
- return m(() => {
18
- f(() => {
19
- e.value = new c(t.value), n.update(e.value);
15
+ setup(a, { expose: c }) {
16
+ const t = p(y), o = x(a), e = u();
17
+ return d(() => {
18
+ l(() => {
19
+ e.value = new r(o.value), t.update(e.value);
20
20
  });
21
- }), v(() => {
22
- var o;
23
- (o = e.value) == null || o.destroy(), n.destroy();
24
- }), _(t, (o, s) => {
25
- var r, a;
26
- g(o, s) || ((r = e.value) == null || r.setConfig(t.value), (a = e.value) == null || a.render());
27
- }), p({
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({
28
26
  component: e
29
- }), (o, s) => (x(), B("div", k));
27
+ }), (n, s) => (v(), _("div", g));
30
28
  }
31
29
  });
32
30
  export {
33
- T as VisAnnotationsSelectors,
34
- b 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 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","_a","watch","curr","prev","arePropsEqual","_b","__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,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,OAC3BH,IAAAL,EAAU,UAAV,QAAAK,EAAiB,UAAUR,EAAO,SAClCa,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,IAErB,CAAC,GAGDC,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,cAQCY,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"),p=require("@unovis/ts"),s=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},F=p.Area.selectors,b=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(y,{expose:d}){const o=t.inject(v.componentAccessorKey),u=y,a=t.computed(()=>o.data.value??u.data),r=s.useForwardProps(u),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new p.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;s.arePropsEqual(e,c)||((l=n.value)==null||l.setConfig(r.value),(i=n.value)==null||i.render())}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),d({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisAreaSelectors=F;exports.default=b;
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,QAClCY,EAAAV,EAAU,QAAV,MAAAU,EAAiB,SAErB,CAAC,EAEDJ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDe,EAAa,CACX,UAAAX,CAAA,CACD,UAQCY,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 m, inject as d, computed as v, ref as F, onMounted as f, nextTick as x, onUnmounted as b, watch as i, openBlock as g, createElementBlock as h } from "vue";
2
- import { Area as s } from "@unovis/ts";
3
- import { useForwardProps as A, arePropsEqual as _ } from "../../utils/props.js";
4
- import { componentAccessorKey as B } from "../../utils/context.js";
5
- const S = { "data-vis-component": "" }, j = s.selectors, w = /* @__PURE__ */ m({
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 S = { "data-vis-component": "" }, j = s.selectors, w = /* @__PURE__ */ m({
28
28
  attributes: {},
29
29
  data: {}
30
30
  },
31
- setup(p, { expose: y }) {
32
- const n = d(B), r = p, o = v(() => n.data.value ?? r.data), a = A(r), t = F();
33
- return f(() => {
34
- x(() => {
35
- var e;
36
- t.value = new s(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
- }), b(() => {
39
- var e;
40
- (e = t.value) == null || e.destroy(), n.destroy();
41
- }), i(a, (e, c) => {
42
- var l, u;
43
- _(e, c) || ((l = t.value) == null || l.setConfig(a.value), (u = t.value) == null || u.render());
44
- }), i(o, () => {
45
- var e;
46
- (e = t.value) == null || e.setData(o.value);
47
- }), y({
48
- component: t
49
- }), (e, c) => (g(), h("div", S));
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
- j as VisAreaSelectors,
54
- w 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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,OAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO,SAClCY,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,IAErB,CAAC,GAEDJ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDe,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,cAQCY,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"),p=require("@unovis/ts"),u=require("../../utils/props.cjs"),x=require("../../utils/context.cjs"),k={"data-vis-axis":""},T=p.Axis.selectors,m=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:{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(d,{expose:y}){const n=t.inject(x.axisAccessorKey),i=d,a=t.computed(()=>n.data.value??i.data),c=u.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new p.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 r,s;u.arePropsEqual(e,l)||((r=o.value)==null||r.setConfig(c.value),(s=o.value)==null||s.render())}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),y({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",k))}});exports.VisAxisSelectors=T;exports.default=m;
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,QAClCY,EAAAV,EAAU,QAAV,MAAAU,EAAiB,SAErB,CAAC,EAEDJ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDe,EAAa,CACX,UAAAX,CAAA,CACD,UAQCY,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 y, inject as m, computed as x, ref as k, onMounted as T, nextTick as v, onUnmounted as F, watch as s, openBlock as f, createElementBlock as B } from "vue";
2
- import { Axis as p } from "@unovis/ts";
3
- import { useForwardProps as b, arePropsEqual as S } from "../../utils/props.js";
4
- import { axisAccessorKey as g } from "../../utils/context.js";
5
- const _ = { "data-vis-axis": "" }, C = p.selectors, L = /* @__PURE__ */ y({
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: {},
@@ -47,29 +47,25 @@ const _ = { "data-vis-axis": "" }, C = p.selectors, L = /* @__PURE__ */ y({
47
47
  attributes: {},
48
48
  data: {}
49
49
  },
50
- setup(u, { expose: d }) {
51
- const o = m(g), n = u, i = x(() => o.data.value ?? n.data), a = b(n), t = k();
52
- return T(() => {
53
- v(() => {
54
- var e;
55
- t.value = new p(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);
56
55
  });
57
- }), F(() => {
58
- var e;
59
- (e = t.value) == null || e.destroy(), o.destroy(n.type);
60
- }), s(a, (e, l) => {
61
- var c, r;
62
- S(e, l) || ((c = t.value) == null || c.setConfig(a.value), (r = t.value) == null || r.render());
63
- }), s(i, () => {
64
- var e;
65
- (e = t.value) == null || e.setData(i.value);
66
- }), d({
67
- component: t
68
- }), (e, l) => (f(), B("div", _));
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));
69
65
  }
70
66
  });
71
67
  export {
72
- C as VisAxisSelectors,
73
- L as default
68
+ M as VisAxisSelectors,
69
+ O as default
74
70
  };
75
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,OAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO,SAClCY,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,IAErB,CAAC,GAEDJ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDe,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,cAQCY,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"),d=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),h={"data-vis-component":""},m=d.Brush.selectors,B=t.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(p,{expose:y}){const o=t.inject(v.componentAccessorKey),a=p,u=t.computed(()=>o.data.value??a.data),r=l.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.Brush(r.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(r,(e,c)=>{var s,i;l.arePropsEqual(e,c)||((s=n.value)==null||s.setConfig(r.value),(i=n.value)==null||i.render())}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),y({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",h))}});exports.VisBrushSelectors=m;exports.default=B;
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,QAClCY,EAAAV,EAAU,QAAV,MAAAU,EAAiB,SAErB,CAAC,EAEDJ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDe,EAAa,CACX,UAAAX,CAAA,CACD,UAQCY,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 m, inject as y, computed as v, ref as h, onMounted as F, nextTick as f, onUnmounted as B, watch as i, openBlock as x, createElementBlock as _ } from "vue";
2
- import { Brush as l } from "@unovis/ts";
3
- import { useForwardProps as b, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as S } from "../../utils/context.js";
5
- const E = { "data-vis-component": "" }, C = l.selectors, D = /* @__PURE__ */ m({
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 },
@@ -27,29 +27,25 @@ const E = { "data-vis-component": "" }, C = l.selectors, D = /* @__PURE__ */ m({
27
27
  attributes: {},
28
28
  data: {}
29
29
  },
30
- setup(p, { expose: d }) {
31
- const n = y(S), r = p, o = v(() => n.data.value ?? r.data), a = b(r), t = h();
32
- return F(() => {
33
- f(() => {
34
- var e;
35
- t.value = new l(a.value), (e = t.value) == null || e.setData(o.value), n.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);
36
35
  });
37
- }), B(() => {
38
- var e;
39
- (e = t.value) == null || e.destroy(), n.destroy();
40
- }), i(a, (e, c) => {
41
- var u, s;
42
- g(e, c) || ((u = t.value) == null || u.setConfig(a.value), (s = t.value) == null || s.render());
43
- }), i(o, () => {
44
- var e;
45
- (e = t.value) == null || e.setData(o.value);
46
- }), d({
47
- component: t
48
- }), (e, c) => (x(), _("div", E));
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));
49
45
  }
50
46
  });
51
47
  export {
52
- C as VisBrushSelectors,
53
- D as default
48
+ w as VisBrushSelectors,
49
+ A as default
54
50
  };
55
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,OAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO,SAClCY,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,IAErB,CAAC,GAEDJ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDe,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,cAQCY,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"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},h=d.ChordDiagram.selectors,y=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(p,{expose:g}){const o=n.inject(v.componentAccessorKey),l=p,a=n.computed(()=>o.data.value??l.data),r=c.useForwardProps(l),t=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var e;t.value=new d.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;c.arePropsEqual(e,u)||((i=t.value)==null||i.setConfig(r.value),(s=t.value)==null||s.render())}),n.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),g({component:t}),(e,u)=>(n.openBlock(),n.createElementBlock("div",m))}});exports.VisChordDiagramSelectors=h;exports.default=y;
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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,QAClCY,EAAAV,EAAU,QAAV,MAAAU,EAAiB,SAErB,CAAC,EAEDJ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDe,EAAa,CACX,UAAAX,CAAA,CACD,UAQCY,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 m, inject as g, computed as v, ref as h, onMounted as y, nextTick as f, onUnmounted as F, watch as c, openBlock as _, createElementBlock as C } from "vue";
2
- import { ChordDiagram as s } from "@unovis/ts";
3
- import { useForwardProps as S, arePropsEqual as b } from "../../utils/props.js";
4
- import { componentAccessorKey as k } from "../../utils/context.js";
5
- const x = { "data-vis-component": "" }, E = s.selectors, N = /* @__PURE__ */ m({
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 x = { "data-vis-component": "" }, E = s.selectors, N = /* @__PURE__ */ m({
24
24
  attributes: {},
25
25
  data: {}
26
26
  },
27
- setup(d, { expose: p }) {
28
- const t = g(k), r = d, o = v(() => t.data.value ?? r.data), a = S(r), n = h();
29
- return y(() => {
30
- f(() => {
31
- var e;
32
- n.value = new s(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
- }), c(a, (e, l) => {
38
- var i, u;
39
- b(e, l) || ((i = n.value) == null || i.setConfig(a.value), (u = n.value) == null || u.render());
40
- }), c(o, () => {
41
- var e;
42
- (e = n.value) == null || e.setData(o.value);
43
- }), p({
44
- component: n
45
- }), (e, l) => (_(), C("div", x));
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
- E as VisChordDiagramSelectors,
50
- N 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 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","_a","onUnmounted","watch","curr","prev","arePropsEqual","_b","__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,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,OAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO,SAClCY,IAAAV,EAAU,UAAV,QAAAU,EAAiB;AAAA,IAErB,CAAC,GAEDJ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDe,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,cAQCY,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"),d=require("@unovis/ts"),l=require("../../utils/props.cjs"),h=require("../../utils/context.cjs"),_={"data-vis-crosshair":""},f=d.Crosshair.selectors,m=s.defineComponent({__name:"index",setup(v,{expose:p}){const o=s.inject(h.crosshairAccessorKey),c=v,r=s.computed(()=>o.data.value??c.data),a=l.useForwardProps(c),t=s.ref();return s.onMounted(()=>{s.nextTick(()=>{var e;t.value=new d.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;l.arePropsEqual(e,n)||((u=t.value)==null||u.setConfig(a.value),(i=t.value)==null||i.render())}),s.watch(r,()=>{var e;(e=t.value)==null||e.setData(r.value)}),p({component:t}),(e,n)=>(s.openBlock(),s.createElementBlock("div",_))}});exports.VisCrosshairSelectors=f;exports.default=m;
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