@unovis/vue 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/components/annotations/index.cjs.map +1 -1
  2. package/components/annotations/index.d.ts +18 -94
  3. package/components/annotations/index.js.map +1 -1
  4. package/components/area/index.cjs +1 -1
  5. package/components/area/index.cjs.map +1 -1
  6. package/components/area/index.d.ts +12 -59
  7. package/components/area/index.js +25 -25
  8. package/components/area/index.js.map +1 -1
  9. package/components/axis/index.cjs +1 -1
  10. package/components/axis/index.cjs.map +1 -1
  11. package/components/axis/index.d.ts +12 -82
  12. package/components/axis/index.js +16 -16
  13. package/components/axis/index.js.map +1 -1
  14. package/components/brush/index.cjs +1 -1
  15. package/components/brush/index.cjs.map +1 -1
  16. package/components/brush/index.d.ts +12 -62
  17. package/components/brush/index.js +17 -17
  18. package/components/brush/index.js.map +1 -1
  19. package/components/chord-diagram/index.cjs +1 -1
  20. package/components/chord-diagram/index.cjs.map +1 -1
  21. package/components/chord-diagram/index.d.ts +12 -60
  22. package/components/chord-diagram/index.js +26 -26
  23. package/components/chord-diagram/index.js.map +1 -1
  24. package/components/crosshair/index.cjs.map +1 -1
  25. package/components/crosshair/index.d.ts +12 -66
  26. package/components/crosshair/index.js.map +1 -1
  27. package/components/donut/index.cjs +1 -1
  28. package/components/donut/index.cjs.map +1 -1
  29. package/components/donut/index.d.ts +12 -64
  30. package/components/donut/index.js +17 -17
  31. package/components/donut/index.js.map +1 -1
  32. package/components/free-brush/index.cjs +1 -1
  33. package/components/free-brush/index.cjs.map +1 -1
  34. package/components/free-brush/index.d.ts +12 -62
  35. package/components/free-brush/index.js +18 -18
  36. package/components/free-brush/index.js.map +1 -1
  37. package/components/graph/index.cjs +1 -1
  38. package/components/graph/index.cjs.map +1 -1
  39. package/components/graph/index.d.ts +10 -134
  40. package/components/graph/index.js +66 -66
  41. package/components/graph/index.js.map +1 -1
  42. package/components/grouped-bar/index.cjs +1 -1
  43. package/components/grouped-bar/index.cjs.map +1 -1
  44. package/components/grouped-bar/index.d.ts +12 -62
  45. package/components/grouped-bar/index.js +25 -25
  46. package/components/grouped-bar/index.js.map +1 -1
  47. package/components/line/index.cjs +1 -1
  48. package/components/line/index.cjs.map +1 -1
  49. package/components/line/index.d.ts +12 -60
  50. package/components/line/index.js +24 -24
  51. package/components/line/index.js.map +1 -1
  52. package/components/nested-donut/index.cjs +1 -1
  53. package/components/nested-donut/index.cjs.map +1 -1
  54. package/components/nested-donut/index.d.ts +12 -65
  55. package/components/nested-donut/index.js +22 -22
  56. package/components/nested-donut/index.js.map +1 -1
  57. package/components/plotband/index.cjs +1 -1
  58. package/components/plotband/index.cjs.map +1 -1
  59. package/components/plotband/index.d.ts +12 -63
  60. package/components/plotband/index.js +12 -12
  61. package/components/plotband/index.js.map +1 -1
  62. package/components/plotline/index.cjs +1 -1
  63. package/components/plotline/index.cjs.map +1 -1
  64. package/components/plotline/index.d.ts +12 -64
  65. package/components/plotline/index.js +9 -9
  66. package/components/plotline/index.js.map +1 -1
  67. package/components/sankey/index.cjs +1 -1
  68. package/components/sankey/index.cjs.map +1 -1
  69. package/components/sankey/index.d.ts +12 -95
  70. package/components/sankey/index.js +35 -35
  71. package/components/sankey/index.js.map +1 -1
  72. package/components/scatter/index.cjs +1 -1
  73. package/components/scatter/index.cjs.map +1 -1
  74. package/components/scatter/index.d.ts +12 -65
  75. package/components/scatter/index.js +27 -27
  76. package/components/scatter/index.js.map +1 -1
  77. package/components/stacked-bar/index.cjs +1 -1
  78. package/components/stacked-bar/index.cjs.map +1 -1
  79. package/components/stacked-bar/index.d.ts +12 -62
  80. package/components/stacked-bar/index.js +22 -22
  81. package/components/stacked-bar/index.js.map +1 -1
  82. package/components/timeline/index.cjs.map +1 -1
  83. package/components/timeline/index.d.ts +12 -88
  84. package/components/timeline/index.js.map +1 -1
  85. package/components/tooltip/index.cjs.map +1 -1
  86. package/components/tooltip/index.d.ts +19 -99
  87. package/components/tooltip/index.js.map +1 -1
  88. package/components/topojson-map/index.cjs +1 -1
  89. package/components/topojson-map/index.cjs.map +1 -1
  90. package/components/topojson-map/index.d.ts +12 -78
  91. package/components/topojson-map/index.js +39 -39
  92. package/components/topojson-map/index.js.map +1 -1
  93. package/components/treemap/index.cjs +1 -1
  94. package/components/treemap/index.cjs.map +1 -1
  95. package/components/treemap/index.d.ts +12 -69
  96. package/components/treemap/index.js +14 -14
  97. package/components/treemap/index.js.map +1 -1
  98. package/components/xy-labels/index.cjs +1 -1
  99. package/components/xy-labels/index.cjs.map +1 -1
  100. package/components/xy-labels/index.d.ts +12 -66
  101. package/components/xy-labels/index.js +38 -38
  102. package/components/xy-labels/index.js.map +1 -1
  103. package/components.d.ts +27 -26
  104. package/containers/single-container/index.cjs.map +1 -1
  105. package/containers/single-container/index.d.ts +11 -25
  106. package/containers/single-container/index.js.map +1 -1
  107. package/containers/xy-container/index.cjs.map +1 -1
  108. package/containers/xy-container/index.d.ts +12 -44
  109. package/containers/xy-container/index.js.map +1 -1
  110. package/containers.d.ts +2 -2
  111. package/html-components/bullet-legend/index.cjs +1 -1
  112. package/html-components/bullet-legend/index.cjs.map +1 -1
  113. package/html-components/bullet-legend/index.d.ts +18 -74
  114. package/html-components/bullet-legend/index.js +12 -12
  115. package/html-components/bullet-legend/index.js.map +1 -1
  116. package/html-components/flow-legend/index.cjs +2 -0
  117. package/html-components/flow-legend/index.cjs.map +1 -0
  118. package/html-components/flow-legend/index.d.ts +20 -0
  119. package/html-components/flow-legend/index.js +44 -0
  120. package/html-components/flow-legend/index.js.map +1 -0
  121. package/html-components/flow-legend/index3.cjs +2 -0
  122. package/html-components/flow-legend/index3.cjs.map +1 -0
  123. package/html-components/flow-legend/index3.js +8 -0
  124. package/html-components/flow-legend/index3.js.map +1 -0
  125. package/html-components/leaflet-flow-map/index.cjs +1 -1
  126. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  127. package/html-components/leaflet-flow-map/index.d.ts +12 -112
  128. package/html-components/leaflet-flow-map/index.js +47 -47
  129. package/html-components/leaflet-flow-map/index.js.map +1 -1
  130. package/html-components/leaflet-map/index.cjs +1 -1
  131. package/html-components/leaflet-map/index.cjs.map +1 -1
  132. package/html-components/leaflet-map/index.d.ts +12 -99
  133. package/html-components/leaflet-map/index.js +38 -38
  134. package/html-components/leaflet-map/index.js.map +1 -1
  135. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  136. package/html-components/rolling-pin-legend/index.d.ts +18 -50
  137. package/html-components/rolling-pin-legend/index.js.map +1 -1
  138. package/index.cjs +2 -2
  139. package/index.js +79 -75
  140. package/index.js.map +1 -1
  141. package/package.json +6 -4
  142. package/utils/context.cjs.map +1 -1
  143. package/utils/context.d.ts +1 -0
  144. package/utils/context.js.map +1 -1
  145. package/utils/props.cjs.map +1 -1
  146. package/utils/props.d.ts +2 -1
  147. package/utils/props.js.map +1 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as m, computed as v, ref as f, onMounted as h, nextTick as k, onUnmounted as y, watch as s, createElementBlock as C, openBlock as F } from "vue";
2
- import { TopoJSONMap as l } from "@unovis/ts";
3
- import { useForwardProps as _, arePropsEqual as x } from "../../utils/props.js";
4
- import { componentAccessorKey as B } from "../../utils/context.js";
5
- const T = { "data-vis-component": "" }, j = l.selectors, D = /* @__PURE__ */ d({
1
+ import { defineComponent as m, inject as d, computed as y, ref as F, onMounted as v, nextTick as S, onUnmounted as g, watch as l, createElementBlock as b, openBlock as f } from "vue";
2
+ import { TopoJSONMap as p } from "@unovis/ts";
3
+ import { useForwardProps as h, arePropsEqual as k } from "../../utils/props.js";
4
+ import { componentAccessorKey as C } from "../../utils/context.js";
5
+ const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
6
6
  __name: "index",
7
7
  props: {
8
8
  projection: { type: [Function, Object] },
@@ -13,22 +13,22 @@ const T = { "data-vis-component": "" }, j = l.selectors, D = /* @__PURE__ */ d({
13
13
  disableZoom: { type: Boolean },
14
14
  zoomExtent: {},
15
15
  zoomDuration: {},
16
- linkWidth: {},
17
- linkColor: {},
18
- linkCursor: {},
19
- linkId: {},
16
+ linkWidth: { type: [Function, Number, null] },
17
+ linkColor: { type: [Function, String, Array, null] },
18
+ linkCursor: { type: [Function, String, null] },
19
+ linkId: { type: [Function, String, null] },
20
20
  linkSource: { type: Function },
21
21
  linkTarget: { type: Function },
22
- areaId: {},
23
- areaColor: {},
24
- areaCursor: {},
25
- pointColor: {},
26
- pointRadius: {},
27
- pointStrokeWidth: {},
28
- pointCursor: {},
29
- longitude: {},
30
- latitude: {},
31
- pointLabel: {},
22
+ areaId: { type: [Function, String, null] },
23
+ areaColor: { type: [Function, String, Array, null] },
24
+ areaCursor: { type: [Function, String, null] },
25
+ pointColor: { type: [Function, String, Array, null] },
26
+ pointRadius: { type: [Function, Number, null] },
27
+ pointStrokeWidth: { type: [Function, Number, null] },
28
+ pointCursor: { type: [Function, String, null] },
29
+ longitude: { type: [Function, Number, null] },
30
+ latitude: { type: [Function, Number, null] },
31
+ pointLabel: { type: [Function, String, null] },
32
32
  pointLabelPosition: {},
33
33
  pointLabelTextBrightnessRatio: {},
34
34
  pointId: { type: Function },
@@ -40,29 +40,29 @@ const T = { "data-vis-component": "" }, j = l.selectors, D = /* @__PURE__ */ d({
40
40
  attributes: {},
41
41
  data: {}
42
42
  },
43
- setup(c, { expose: u }) {
44
- const t = m(B), i = c, a = v(() => t.data.value ?? i.data), n = _(i), e = f();
45
- return h(() => {
46
- k(() => {
47
- var o;
48
- e.value = new l(n.value), (o = e.value) == null || o.setData(a.value), t.update(e.value);
43
+ setup(c, { expose: s }) {
44
+ const n = d(C), a = c, e = y(() => n.data.value ?? a.data), i = h(a), o = F();
45
+ return v(() => {
46
+ S(() => {
47
+ var t;
48
+ o.value = new p(i.value), (t = o.value) == null || t.setData(e.value), n.update(o.value);
49
49
  });
50
- }), y(() => {
51
- var o;
52
- (o = e.value) == null || o.destroy(), t.destroy();
53
- }), s(n, (o, r) => {
54
- var p;
55
- x(o, r) || (p = e.value) == null || p.setConfig(n.value);
56
- }), s(a, () => {
57
- var o;
58
- (o = e.value) == null || o.setData(a.value);
59
- }), u({
60
- component: e
61
- }), (o, r) => (F(), C("div", T));
50
+ }), g(() => {
51
+ var t;
52
+ (t = o.value) == null || t.destroy(), n.destroy();
53
+ }), l(i, (t, r) => {
54
+ var u;
55
+ k(t, r) || (u = o.value) == null || u.setConfig(i.value);
56
+ }), l(e, () => {
57
+ var t;
58
+ (t = o.value) == null || t.setData(e.value);
59
+ }), s({
60
+ component: o
61
+ }), (t, r) => (f(), b("div", N));
62
62
  }
63
63
  });
64
64
  export {
65
- j as VisTopoJSONMapSelectors,
66
- D as default
65
+ M as VisTopoJSONMapSelectors,
66
+ j as default
67
67
  };
68
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"AreaDatum,PointDatum,LinkDatum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { TopoJSONMap, TopoJSONMapConfigInterface } 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 = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\nconst props = defineProps<Props & { data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]} }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(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 VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAmD;AAGrE,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAA8CQ,EAAO,KAAK,IACtEM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"AreaDatum,PointDatum,LinkDatum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { TopoJSONMap, TopoJSONMapConfigInterface } 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 = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\nconst props = defineProps<Props & { data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]} }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(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 VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","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,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnD,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,EAA8CQ,EAAO,KAAK,IAChFM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},b=u.Treemap.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},layers:{},numberFormat:{type:Function},tileLabel:{type:Function},tileColor:{},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},labelFit:{},labelTrimMode:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const a=t.inject(m.componentAccessorKey),i=d,n=t.computed(()=>a.data.value??i.data),l=c.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Treemap(l.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(l,(e,r)=>{var s;c.arePropsEqual(e,r)||(s=o.value)==null||s.setConfig(l.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisTreemapSelectors=b;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("@unovis/ts"),u=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),b={"data-vis-component":""},v=c.Treemap.selectors,y=t.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},layers:{},numberFormat:{type:Function},tileLabel:{type:Function},tileColor:{type:[Function,String,Array,null]},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},labelFit:{},labelTrimMode:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const a=t.inject(m.componentAccessorKey),i=d,n=t.computed(()=>a.data.value??i.data),l=u.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new c.Treemap(l.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(l,(e,r)=>{var s;u.arePropsEqual(e,r)||(s=o.value)==null||s.setConfig(l.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",b))}});exports.VisTreemapSelectors=v;exports.default=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<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 VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,8oBA3CrC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAoB,EAGtCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACvCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<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 VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,0sBA3C3C,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACjDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,76 +1,19 @@
1
- import { Treemap, StringAccessor } from '@unovis/ts';
2
- export declare const VisTreemapSelectors: typeof import("@unovis/ts/dist/components/treemap/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { Treemap, TreemapConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisTreemapSelectors: typeof import("@unovis/ts/components/treemap/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (TreemapConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- id?: (d: Datum, i: number) => string | number;
42
- value?: import("@unovis/ts").NumericAccessor<Datum>;
43
- layers: StringAccessor<Datum>[];
44
- labelOffsetX?: number;
45
- labelOffsetY?: number;
46
- labelFit?: import("@unovis/ts").FitMode;
47
- labelTrimMode?: import("@unovis/ts").TrimMode;
48
- numberFormat?: (value: number) => string;
49
- tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
50
- tileColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").TreemapNode<Datum>>;
51
- tilePadding?: number;
52
- tilePaddingTop?: number;
53
- labelInternalNodes?: boolean;
54
- tileBorderRadius?: number;
55
- tileBorderRadiusFactor?: number;
56
- enableLightnessVariance?: boolean;
57
- enableTileLabelFontSizeVariation?: boolean;
58
- tileLabelSmallFontSize?: number;
59
- tileLabelMediumFontSize?: number;
60
- tileLabelLargeFontSize?: number;
61
- showTileClickAffordance?: boolean;
62
- lightnessVariationAmount?: number;
63
- minTileSizeForLabel?: number;
64
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
65
- expose(exposed: import("vue").ShallowUnwrapRef<{
66
- component: import("vue").Ref<Treemap<Datum>, Treemap<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Treemap<Datum>, Treemap<Datum>>;
67
10
  }>): void;
68
11
  attrs: any;
69
- slots: {};
70
- emit: any;
71
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
72
15
  [key: string]: any;
73
16
  }> & {
74
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
75
18
  };
76
19
  export default _default;
@@ -1,16 +1,16 @@
1
- import { defineComponent as p, inject as m, computed as f, ref as b, onMounted as v, nextTick as F, onUnmounted as y, watch as s, createElementBlock as B, openBlock as L } from "vue";
1
+ import { defineComponent as d, inject as m, computed as f, ref as b, onMounted as v, nextTick as y, onUnmounted as F, watch as s, createElementBlock as g, openBlock as B } from "vue";
2
2
  import { Treemap as c } from "@unovis/ts";
3
- import { useForwardProps as T, arePropsEqual as _ } from "../../utils/props.js";
4
- import { componentAccessorKey as g } from "../../utils/context.js";
5
- const S = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
3
+ import { useForwardProps as L, arePropsEqual as S } from "../../utils/props.js";
4
+ import { componentAccessorKey as T } from "../../utils/context.js";
5
+ const _ = { "data-vis-component": "" }, w = c.selectors, A = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
9
- value: {},
9
+ value: { type: [Function, Number, null] },
10
10
  layers: {},
11
11
  numberFormat: { type: Function },
12
12
  tileLabel: { type: Function },
13
- tileColor: {},
13
+ tileColor: { type: [Function, String, Array, null] },
14
14
  tilePadding: {},
15
15
  tilePaddingTop: {},
16
16
  labelInternalNodes: { type: Boolean },
@@ -33,29 +33,29 @@ const S = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
33
33
  attributes: {},
34
34
  data: {}
35
35
  },
36
- setup(u, { expose: d }) {
37
- const o = m(g), l = u, a = f(() => o.data.value ?? l.data), n = T(l), t = b();
36
+ setup(u, { expose: p }) {
37
+ const o = m(T), l = u, a = f(() => o.data.value ?? l.data), n = L(l), t = b();
38
38
  return v(() => {
39
- F(() => {
39
+ y(() => {
40
40
  var e;
41
41
  t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
42
42
  });
43
- }), y(() => {
43
+ }), F(() => {
44
44
  var e;
45
45
  (e = t.value) == null || e.destroy(), o.destroy();
46
46
  }), s(n, (e, i) => {
47
47
  var r;
48
- _(e, i) || (r = t.value) == null || r.setConfig(n.value);
48
+ S(e, i) || (r = t.value) == null || r.setConfig(n.value);
49
49
  }), s(a, () => {
50
50
  var e;
51
51
  (e = t.value) == null || e.setData(a.value);
52
- }), d({
52
+ }), p({
53
53
  component: t
54
- }), (e, i) => (L(), B("div", S));
54
+ }), (e, i) => (B(), g("div", _));
55
55
  }
56
56
  });
57
57
  export {
58
58
  w as VisTreemapSelectors,
59
- C as default
59
+ A as default
60
60
  };
61
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<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 VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAoB;AAGtC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACvCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<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 VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACjDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),u=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),b={"data-vis-component":""},m=i.XYLabels.selectors,y=t.defineComponent({__name:"index",props:{color:{},y:{},xPositioning:{},yPositioning:{},labelFontSize:{},label:{},backgroundColor:{},cursor:{},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{},clusterFontSize:{},clusterBackgroundColor:{},clusterCursor:{},clusterLabelColor:{},x:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),c=d,a=t.computed(()=>n.data.value??c.data),s=u.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new i.XYLabels(s.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(s,(e,r)=>{var l;u.arePropsEqual(e,r)||(l=o.value)==null||l.setConfig(s.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",b))}});exports.VisXYLabelsSelectors=m;exports.default=y;
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"),F={"data-vis-component":""},g=s.XYLabels.selectors,b=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},y:{type:[Function,Number,null]},xPositioning:{type:[Function,String,null]},yPositioning:{type:[Function,String,null]},labelFontSize:{type:[Function,Number,null]},label:{type:[Function,String,null]},backgroundColor:{type:[Function,String,Array,null]},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{type:[Function,String,null]},clusterFontSize:{type:[Function,Number,null]},clusterBackgroundColor:{type:[Function,String,Array,null]},clusterCursor:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,Array,null]},x:{type:[Function,Number,null]},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),r=p,l=t.computed(()=>o.data.value??r.data),u=i.useForwardProps(r),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new s.XYLabels(u.value),(e=n.value)==null||e.setData(l.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(u,(e,c)=>{var a;i.arePropsEqual(e,c)||(a=n.value)==null||a.setConfig(u.value)}),t.watch(l,()=>{var e;(e=n.value)==null||e.setData(l.value)}),y({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",F))}});exports.VisXYLabelsSelectors=g;exports.default=b;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAuBC,EAAAA,SAAS,wfA3CvC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAqB,EAGvCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,WAAgBQ,EAAO,KAAK,GACxCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","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,EAAuBC,EAAAA,SAAS,04BA3C7C,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,WAAgBQ,EAAO,KAAK,GAClDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,73 +1,19 @@
1
- import { XYLabels, NumericAccessor } from '@unovis/ts';
2
- export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/dist/components/xy-labels/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { XYLabels, XYLabelsConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (XYLabelsConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x: NumericAccessor<Datum>;
42
- y: NumericAccessor<Datum>;
43
- label?: import("@unovis/ts").StringAccessor<Datum>;
44
- color?: import("@unovis/ts").ColorAccessor<Datum>;
45
- cursor?: import("@unovis/ts").StringAccessor<Datum>;
46
- id?: (d: Datum, i: number, ...any: any[]) => string;
47
- xScale?: import("@unovis/ts").ContinuousScale;
48
- yScale?: import("@unovis/ts").ContinuousScale;
49
- excludeFromDomainCalculation?: boolean;
50
- labelFontSize?: NumericAccessor<Datum>;
51
- labelTextBrightnessRatio?: number;
52
- xPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
53
- yPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
54
- backgroundColor?: import("@unovis/ts").ColorAccessor<Datum>;
55
- clustering?: boolean;
56
- clusterLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
57
- clusterFontSize?: NumericAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
58
- clusterBackgroundColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
59
- clusterCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
60
- clusterLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
61
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
62
- expose(exposed: import("vue").ShallowUnwrapRef<{
63
- component: import("vue").Ref<XYLabels<Datum>, XYLabels<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<XYLabels<Datum>, XYLabels<Datum>>;
64
10
  }>): void;
65
11
  attrs: any;
66
- slots: {};
67
- emit: any;
68
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
69
15
  [key: string]: any;
70
16
  }> & {
71
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
72
18
  };
73
19
  export default _default;
@@ -1,26 +1,26 @@
1
- import { defineComponent as d, inject as m, computed as v, ref as b, onMounted as f, nextTick as y, onUnmounted as x, watch as l, createElementBlock as g, openBlock as _ } from "vue";
2
- import { XYLabels as u } from "@unovis/ts";
3
- import { useForwardProps as C, arePropsEqual as F } from "../../utils/props.js";
4
- import { componentAccessorKey as B } from "../../utils/context.js";
5
- const k = { "data-vis-component": "" }, j = u.selectors, w = /* @__PURE__ */ d({
1
+ import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as g, nextTick as b, onUnmounted as S, watch as a, createElementBlock as v, openBlock as f } from "vue";
2
+ import { XYLabels as i } from "@unovis/ts";
3
+ import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
4
+ import { componentAccessorKey as C } from "../../utils/context.js";
5
+ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
6
6
  __name: "index",
7
7
  props: {
8
- color: {},
9
- y: {},
10
- xPositioning: {},
11
- yPositioning: {},
12
- labelFontSize: {},
13
- label: {},
14
- backgroundColor: {},
15
- cursor: {},
8
+ color: { type: [Function, String, Array, null] },
9
+ y: { type: [Function, Number, null] },
10
+ xPositioning: { type: [Function, String, null] },
11
+ yPositioning: { type: [Function, String, null] },
12
+ labelFontSize: { type: [Function, Number, null] },
13
+ label: { type: [Function, String, null] },
14
+ backgroundColor: { type: [Function, String, Array, null] },
15
+ cursor: { type: [Function, String, null] },
16
16
  labelTextBrightnessRatio: {},
17
17
  clustering: { type: Boolean },
18
- clusterLabel: {},
19
- clusterFontSize: {},
20
- clusterBackgroundColor: {},
21
- clusterCursor: {},
22
- clusterLabelColor: {},
23
- x: {},
18
+ clusterLabel: { type: [Function, String, null] },
19
+ clusterFontSize: { type: [Function, Number, null] },
20
+ clusterBackgroundColor: { type: [Function, String, Array, null] },
21
+ clusterCursor: { type: [Function, String, null] },
22
+ clusterLabelColor: { type: [Function, String, Array, null] },
23
+ x: { type: [Function, Number, null] },
24
24
  id: { type: Function },
25
25
  xScale: { type: [Object, Function] },
26
26
  yScale: { type: [Object, Function] },
@@ -30,29 +30,29 @@ const k = { "data-vis-component": "" }, j = u.selectors, w = /* @__PURE__ */ d({
30
30
  attributes: {},
31
31
  data: {}
32
32
  },
33
- setup(i, { expose: p }) {
34
- const t = m(B), c = i, a = v(() => t.data.value ?? c.data), n = C(c), o = b();
35
- return f(() => {
36
- y(() => {
37
- var e;
38
- o.value = new u(n.value), (e = o.value) == null || e.setData(a.value), t.update(o.value);
33
+ setup(s, { expose: p }) {
34
+ const e = m(C), r = s, o = d(() => e.data.value ?? r.data), l = x(r), n = F();
35
+ return g(() => {
36
+ b(() => {
37
+ var t;
38
+ n.value = new i(l.value), (t = n.value) == null || t.setData(o.value), e.update(n.value);
39
39
  });
40
- }), x(() => {
41
- var e;
42
- (e = o.value) == null || e.destroy(), t.destroy();
43
- }), l(n, (e, r) => {
44
- var s;
45
- F(e, r) || (s = o.value) == null || s.setConfig(n.value);
46
- }), l(a, () => {
47
- var e;
48
- (e = o.value) == null || e.setData(a.value);
40
+ }), S(() => {
41
+ var t;
42
+ (t = n.value) == null || t.destroy(), e.destroy();
43
+ }), a(l, (t, u) => {
44
+ var c;
45
+ _(t, u) || (c = n.value) == null || c.setConfig(l.value);
46
+ }), a(o, () => {
47
+ var t;
48
+ (t = n.value) == null || t.setData(o.value);
49
49
  }), p({
50
- component: o
51
- }), (e, r) => (_(), g("div", k));
50
+ component: n
51
+ }), (t, u) => (f(), v("div", B));
52
52
  }
53
53
  });
54
54
  export {
55
- j as VisXYLabelsSelectors,
56
- w as default
55
+ N as VisXYLabelsSelectors,
56
+ P as default
57
57
  };
58
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAqB;AAGvC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAgBQ,EAAO,KAAK,IACxCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","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,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,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,EAAgBQ,EAAO,KAAK,IAClDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}