@unovis/vue 1.5.0-beta.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/components/annotations/index.cjs +1 -1
  2. package/components/annotations/index.cjs.map +1 -1
  3. package/components/annotations/index.d.ts +5 -5
  4. package/components/annotations/index.js +14 -14
  5. package/components/annotations/index.js.map +1 -1
  6. package/components/area/index.cjs +1 -1
  7. package/components/area/index.cjs.map +1 -1
  8. package/components/area/index.d.ts +1 -1
  9. package/components/area/index.js +23 -23
  10. package/components/area/index.js.map +1 -1
  11. package/components/axis/index.cjs +1 -1
  12. package/components/axis/index.cjs.map +1 -1
  13. package/components/axis/index.d.ts +1 -1
  14. package/components/axis/index.js +16 -16
  15. package/components/axis/index.js.map +1 -1
  16. package/components/brush/index.cjs +1 -1
  17. package/components/brush/index.cjs.map +1 -1
  18. package/components/brush/index.d.ts +1 -1
  19. package/components/brush/index.js +17 -17
  20. package/components/brush/index.js.map +1 -1
  21. package/components/chord-diagram/index.cjs +1 -1
  22. package/components/chord-diagram/index.cjs.map +1 -1
  23. package/components/chord-diagram/index.d.ts +1 -1
  24. package/components/chord-diagram/index.js +27 -27
  25. package/components/chord-diagram/index.js.map +1 -1
  26. package/components/crosshair/index.cjs +1 -1
  27. package/components/crosshair/index.cjs.map +1 -1
  28. package/components/crosshair/index.d.ts +1 -1
  29. package/components/crosshair/index.js +1 -1
  30. package/components/crosshair/index.js.map +1 -1
  31. package/components/donut/index.cjs +1 -1
  32. package/components/donut/index.cjs.map +1 -1
  33. package/components/donut/index.d.ts +2 -2
  34. package/components/donut/index.js +14 -14
  35. package/components/donut/index.js.map +1 -1
  36. package/components/free-brush/index.cjs +1 -1
  37. package/components/free-brush/index.cjs.map +1 -1
  38. package/components/free-brush/index.d.ts +1 -1
  39. package/components/free-brush/index.js +18 -18
  40. package/components/free-brush/index.js.map +1 -1
  41. package/components/graph/index.cjs +1 -1
  42. package/components/graph/index.cjs.map +1 -1
  43. package/components/graph/index.d.ts +1 -1
  44. package/components/graph/index.js +59 -59
  45. package/components/graph/index.js.map +1 -1
  46. package/components/grouped-bar/index.cjs +1 -1
  47. package/components/grouped-bar/index.cjs.map +1 -1
  48. package/components/grouped-bar/index.d.ts +1 -1
  49. package/components/grouped-bar/index.js +25 -25
  50. package/components/grouped-bar/index.js.map +1 -1
  51. package/components/line/index.cjs +1 -1
  52. package/components/line/index.cjs.map +1 -1
  53. package/components/line/index.d.ts +1 -1
  54. package/components/line/index.js +23 -23
  55. package/components/line/index.js.map +1 -1
  56. package/components/nested-donut/index.cjs +1 -1
  57. package/components/nested-donut/index.cjs.map +1 -1
  58. package/components/nested-donut/index.d.ts +2 -2
  59. package/components/nested-donut/index.js +22 -22
  60. package/components/nested-donut/index.js.map +1 -1
  61. package/components/sankey/index.cjs +1 -1
  62. package/components/sankey/index.cjs.map +1 -1
  63. package/components/sankey/index.d.ts +1 -1
  64. package/components/sankey/index.js +35 -35
  65. package/components/sankey/index.js.map +1 -1
  66. package/components/scatter/index.cjs +1 -1
  67. package/components/scatter/index.cjs.map +1 -1
  68. package/components/scatter/index.d.ts +1 -1
  69. package/components/scatter/index.js +27 -27
  70. package/components/scatter/index.js.map +1 -1
  71. package/components/stacked-bar/index.cjs +1 -1
  72. package/components/stacked-bar/index.cjs.map +1 -1
  73. package/components/stacked-bar/index.d.ts +1 -1
  74. package/components/stacked-bar/index.js +22 -22
  75. package/components/stacked-bar/index.js.map +1 -1
  76. package/components/timeline/index.cjs +1 -1
  77. package/components/timeline/index.cjs.map +1 -1
  78. package/components/timeline/index.d.ts +2 -2
  79. package/components/timeline/index.js +1 -1
  80. package/components/timeline/index.js.map +1 -1
  81. package/components/tooltip/index.cjs +1 -1
  82. package/components/tooltip/index.cjs.map +1 -1
  83. package/components/tooltip/index.d.ts +5 -5
  84. package/components/tooltip/index.js +15 -15
  85. package/components/tooltip/index.js.map +1 -1
  86. package/components/topojson-map/index.cjs +1 -1
  87. package/components/topojson-map/index.cjs.map +1 -1
  88. package/components/topojson-map/index.d.ts +1 -1
  89. package/components/topojson-map/index.js +39 -39
  90. package/components/topojson-map/index.js.map +1 -1
  91. package/components/xy-labels/index.cjs +1 -1
  92. package/components/xy-labels/index.cjs.map +1 -1
  93. package/components/xy-labels/index.d.ts +1 -1
  94. package/components/xy-labels/index.js +38 -38
  95. package/components/xy-labels/index.js.map +1 -1
  96. package/containers/single-container/index.cjs.map +1 -1
  97. package/containers/single-container/index.d.ts +1 -1
  98. package/containers/single-container/index.js.map +1 -1
  99. package/containers/single-container/index3.cjs +1 -1
  100. package/containers/single-container/index3.js +1 -1
  101. package/containers/xy-container/index.cjs.map +1 -1
  102. package/containers/xy-container/index.d.ts +1 -1
  103. package/containers/xy-container/index.js.map +1 -1
  104. package/containers/xy-container/index3.cjs +1 -1
  105. package/containers/xy-container/index3.js +1 -1
  106. package/html-components/bullet-legend/index.cjs +1 -1
  107. package/html-components/bullet-legend/index.cjs.map +1 -1
  108. package/html-components/bullet-legend/index.d.ts +5 -5
  109. package/html-components/bullet-legend/index.js +11 -11
  110. package/html-components/bullet-legend/index.js.map +1 -1
  111. package/html-components/bullet-legend/index3.cjs +1 -1
  112. package/html-components/bullet-legend/index3.js +1 -1
  113. package/html-components/leaflet-flow-map/index.cjs +1 -1
  114. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  115. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  116. package/html-components/leaflet-flow-map/index.js +43 -43
  117. package/html-components/leaflet-flow-map/index.js.map +1 -1
  118. package/html-components/leaflet-flow-map/index3.cjs +1 -1
  119. package/html-components/leaflet-flow-map/index3.js +1 -1
  120. package/html-components/leaflet-map/index.cjs +1 -1
  121. package/html-components/leaflet-map/index.cjs.map +1 -1
  122. package/html-components/leaflet-map/index.d.ts +1 -1
  123. package/html-components/leaflet-map/index.js +32 -32
  124. package/html-components/leaflet-map/index.js.map +1 -1
  125. package/html-components/leaflet-map/index3.cjs +1 -1
  126. package/html-components/leaflet-map/index3.js +1 -1
  127. package/index.cjs +2 -2
  128. package/index.js +6 -6
  129. package/package.json +6 -6
  130. package/utils/props.cjs.map +1 -1
  131. package/utils/props.js.map +1 -1
  132. package/containers/single-container/index2.cjs +0 -2
  133. package/containers/single-container/index2.cjs.map +0 -1
  134. package/containers/single-container/index2.js +0 -5
  135. package/containers/single-container/index2.js.map +0 -1
  136. package/containers/xy-container/index2.cjs +0 -2
  137. package/containers/xy-container/index2.cjs.map +0 -1
  138. package/containers/xy-container/index2.js +0 -5
  139. package/containers/xy-container/index2.js.map +0 -1
  140. package/html-components/bullet-legend/index2.cjs +0 -2
  141. package/html-components/bullet-legend/index2.cjs.map +0 -1
  142. package/html-components/bullet-legend/index2.js +0 -5
  143. package/html-components/bullet-legend/index2.js.map +0 -1
  144. package/html-components/leaflet-flow-map/index2.cjs +0 -2
  145. package/html-components/leaflet-flow-map/index2.cjs.map +0 -1
  146. package/html-components/leaflet-flow-map/index2.js +0 -5
  147. package/html-components/leaflet-flow-map/index2.js.map +0 -1
  148. package/html-components/leaflet-map/index2.cjs +0 -2
  149. package/html-components/leaflet-map/index2.cjs.map +0 -1
  150. package/html-components/leaflet-map/index2.js +0 -5
  151. package/html-components/leaflet-map/index2.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},_=l.Timeline.selectors,f=t.defineComponent({__name:"index",props:{data:{}},setup(d,{expose:p}){const c=d,n=t.inject(v.componentAccessorKey),s=t.computed(()=>n.data.value??c.data),a=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Timeline(a.value),(e=o.value)==null||e.setData(s.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(a,(e,r)=>{var u;i.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(a.value)}),t.watch(s,()=>{var e;(e=o.value)==null||e.setData(s.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisTimelineSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},_=l.Timeline.selectors,f=t.defineComponent({__name:"index",props:{data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),c=d,s=t.computed(()=>n.data.value??c.data),a=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Timeline(a.value),(e=o.value)==null||e.setData(s.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(a,(e,r)=>{var u;i.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(a.value)}),t.watch(s,()=>{var e;(e=o.value)==null||e.setData(s.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisTimelineSelectors=_;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/timeline/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } from \"@unovis/ts\"\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport const VisTimelineSelectors = Timeline.selectors\n\ninterface Props extends /** @vue-ignore */ TimelineConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTimelineSelectors","Timeline","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"mOAGMA,EAAa,CAAE,qBAAsB,IAS9BC,EAAuBC,EAAS,SAAA,UAIjBC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAMtCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAASC,kBAAgBP,CAAK,EAG9BQ,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIb,EAAgB,SAAAW,EAAO,KAAK,GACxCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBX,EAAS,QAAQ,CAAA,CAClB,EAEKa,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,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACU,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } from \"@unovis/ts\"\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ninterface Props extends /** @vue-ignore */ TimelineConfigInterface<Datum> { }\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTimelineSelectors","Timeline","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAoDaA,EAAuBC,EAAAA,SAAS,kFA5CvC,MAAAC,EAAWC,SAAOC,sBAAoB,EAKtCC,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"}
@@ -39,9 +39,9 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
39
39
  };
40
40
  };
41
41
  data?: Datum[];
42
- length?: NumericAccessor<Datum>;
43
42
  x: NumericAccessor<Datum>;
44
43
  y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
44
+ length?: NumericAccessor<Datum>;
45
45
  onScroll?: (scrollTop: number) => void;
46
46
  color?: import("@unovis/ts").ColorAccessor<Datum>;
47
47
  cursor?: StringAccessor<Datum>;
@@ -60,7 +60,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
60
60
  alternatingRowColors?: boolean;
61
61
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
62
62
  expose(exposed: import("vue").ShallowUnwrapRef<{
63
- component: import("vue").Ref<Timeline<Datum>>;
63
+ component: import("vue").Ref<Timeline<Datum>, Timeline<Datum>>;
64
64
  }>): void;
65
65
  attrs: any;
66
66
  slots: {};
@@ -8,7 +8,7 @@ const B = { "data-vis-component": "" }, j = i.selectors, q = /* @__PURE__ */ m({
8
8
  data: {}
9
9
  },
10
10
  setup(l, { expose: p }) {
11
- const s = l, t = d(g), a = v(() => t.data.value ?? s.data), n = y(s), o = f();
11
+ const t = d(g), s = l, a = v(() => t.data.value ?? s.data), n = y(s), o = f();
12
12
  return _(() => {
13
13
  x(() => {
14
14
  var e;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } from \"@unovis/ts\"\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport const VisTimelineSelectors = Timeline.selectors\n\ninterface Props extends /** @vue-ignore */ TimelineConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTimelineSelectors","Timeline","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAS9BC,IAAuBC,EAAS,WAIjBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAMtCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAASC,EAAgBP,CAAK,GAG9BQ,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIb,EAAgBW,EAAO,KAAK,IACxCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBH,EAAA,OAAOO,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKa,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,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACU,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO5B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/timeline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Timeline, TimelineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { XYComponentConfigInterface, StringAccessor } from \"@unovis/ts\"\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\ninterface Props extends /** @vue-ignore */ TimelineConfigInterface<Datum> { }\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Timeline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Timeline<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTimelineSelectors = Timeline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTimelineSelectors","Timeline","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAoDaA,IAAuBC,EAAS;;;;;;AA5CvC,UAAAC,IAAWC,EAAOC,CAAoB,GAKtCC,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,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@unovis/ts"),l=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),v={"data-vis-tooltip":""},f=a.Tooltip.selectors,m=e.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(i,{expose:u}){const p=i,s=e.inject(d.tooltipAccessorKey),n=l.useForwardProps(p),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{o.value=new a.Tooltip(n.value),s.update(o.value)})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy(),s.destroy()}),e.watch(n,(t,r)=>{var c;l.arePropsEqual(t,r)||(c=o.value)==null||c.setConfig(n.value)}),u({component:o}),(t,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisTooltipSelectors=f;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@unovis/ts"),l=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),v={"data-vis-tooltip":""},f=a.Tooltip.selectors,m=e.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(i,{expose:u}){const s=e.inject(d.tooltipAccessorKey),p=i,n=l.useForwardProps(p),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{o.value=new a.Tooltip(n.value),s.update(o.value)})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy(),s.destroy()}),e.watch(n,(t,r)=>{var c;l.arePropsEqual(t,r)||(c=o.value)==null||c.setConfig(n.value)}),u({component:o}),(t,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisTooltipSelectors=f;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/tooltip/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-tooltip\": \"\" }\n\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\n\nexport const VisTooltipSelectors = Tooltip.selectors\n\ntype Props = TooltipConfigInterface\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n container: {},\n followCursor: { type: Boolean },\n allowHover: { type: Boolean },\n horizontalPlacement: {},\n horizontalShift: {},\n verticalPlacement: {},\n verticalShift: {},\n triggers: {},\n attributes: {},\n className: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \n\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTooltipSelectors","Tooltip","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","tooltipAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"mOAGMA,EAAa,CAAE,mBAAoB,IAQ5BC,EAAsBC,EAAQ,QAAA,UAIfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAC,EACb,UAAW,CAAC,EACZ,aAAc,CAAE,KAAM,OAAQ,EAC9B,WAAY,CAAE,KAAM,OAAQ,EAC5B,oBAAqB,CAAC,EACtB,gBAAiB,CAAC,EAClB,kBAAmB,CAAC,EACpB,cAAe,CAAC,EAChB,SAAU,CAAC,EACX,WAAY,CAAC,EACb,UAAW,CAAC,EACZ,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,kBAAkB,EAOpCC,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIX,EAAQ,QAAAS,EAAO,KAAK,EAEjCH,EAAA,OAAOK,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBV,EAAS,QAAQ,CAAA,CAClB,EAEKW,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGQL,EAAA,CACP,UAAAO,CAAA,CACD,EAEM,CAACU,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO1B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \ntype Props = TooltipConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n\n\n"],"names":["VisTooltipSelectors","Tooltip","accessor","inject","tooltipAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"6PA+CaA,EAAsBC,EAAAA,QAAQ,0RAxCrC,MAAAC,EAAWC,SAAOC,oBAAkB,EAIpCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAa,EAG/BC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,UAAQM,EAAO,KAAK,EAEjCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
@@ -1,6 +1,6 @@
1
1
  import { Tooltip } from '@unovis/ts';
2
2
  export declare const VisTooltipSelectors: typeof import("@unovis/ts/lib/components/tooltip/style");
3
- declare const _default: import("vue").DefineComponent<{
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  components: {
5
5
  type: import("vue").PropType<import("@unovis/ts").ComponentCore<unknown, import("@unovis/ts").ComponentConfigInterface>[]>;
6
6
  };
@@ -41,9 +41,9 @@ declare const _default: import("vue").DefineComponent<{
41
41
  data: {
42
42
  type: import("vue").PropType<never>;
43
43
  };
44
- }, {
45
- component: import("vue").Ref<Tooltip>;
46
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
+ }>, {
45
+ component: import("vue").Ref<Tooltip, Tooltip>;
46
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
47
47
  components: {
48
48
  type: import("vue").PropType<import("@unovis/ts").ComponentCore<unknown, import("@unovis/ts").ComponentConfigInterface>[]>;
49
49
  };
@@ -84,5 +84,5 @@ declare const _default: import("vue").DefineComponent<{
84
84
  data: {
85
85
  type: import("vue").PropType<never>;
86
86
  };
87
- }>>, {}, {}>;
87
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
88
88
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, inject as m, ref as u, onMounted as f, nextTick as d, onUnmounted as v, watch as _, openBlock as h, createElementBlock as w } from "vue";
2
- import { Tooltip as s } from "@unovis/ts";
3
- import { useForwardProps as x, arePropsEqual as y } from "../../utils/props.js";
4
- import { tooltipAccessorKey as g } from "../../utils/context.js";
5
- const B = { "data-vis-tooltip": "" }, T = s.selectors, z = /* @__PURE__ */ p({
1
+ import { defineComponent as i, inject as p, ref as m, onMounted as u, nextTick as f, onUnmounted as d, watch as v, openBlock as _, createElementBlock as h } from "vue";
2
+ import { Tooltip as a } from "@unovis/ts";
3
+ import { useForwardProps as w, arePropsEqual as x } from "../../utils/props.js";
4
+ import { tooltipAccessorKey as y } from "../../utils/context.js";
5
+ const g = { "data-vis-tooltip": "" }, T = a.selectors, z = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {
8
8
  components: {},
@@ -19,20 +19,20 @@ const B = { "data-vis-tooltip": "" }, T = s.selectors, z = /* @__PURE__ */ p({
19
19
  data: {}
20
20
  },
21
21
  setup(c, { expose: l }) {
22
- const i = c, n = m(g), t = x(i), o = u();
23
- return f(() => {
24
- d(() => {
25
- o.value = new s(t.value), n.update(o.value);
22
+ const r = p(y), t = w(c), o = m();
23
+ return u(() => {
24
+ f(() => {
25
+ o.value = new a(t.value), r.update(o.value);
26
26
  });
27
- }), v(() => {
27
+ }), d(() => {
28
28
  var e;
29
- (e = o.value) == null || e.destroy(), n.destroy();
30
- }), _(t, (e, r) => {
31
- var a;
32
- y(e, r) || (a = o.value) == null || a.setConfig(t.value);
29
+ (e = o.value) == null || e.destroy(), r.destroy();
30
+ }), v(t, (e, n) => {
31
+ var s;
32
+ x(e, n) || (s = o.value) == null || s.setConfig(t.value);
33
33
  }), l({
34
34
  component: o
35
- }), (e, r) => (h(), w("div", B));
35
+ }), (e, n) => (_(), h("div", g));
36
36
  }
37
37
  });
38
38
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-tooltip\": \"\" }\n\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\n\nexport const VisTooltipSelectors = Tooltip.selectors\n\ntype Props = TooltipConfigInterface\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n container: {},\n followCursor: { type: Boolean },\n allowHover: { type: Boolean },\n horizontalPlacement: {},\n horizontalShift: {},\n verticalPlacement: {},\n verticalShift: {},\n triggers: {},\n attributes: {},\n className: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \n\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTooltipSelectors","Tooltip","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","tooltipAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,oBAAoB,MAQ5BC,IAAsBC,EAAQ,WAIfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,CAAC;AAAA,IACb,WAAW,CAAC;AAAA,IACZ,cAAc,EAAE,MAAM,QAAQ;AAAA,IAC9B,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,qBAAqB,CAAC;AAAA,IACtB,iBAAiB,CAAC;AAAA,IAClB,mBAAmB,CAAC;AAAA,IACpB,eAAe,CAAC;AAAA,IAChB,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,WAAW,CAAC;AAAA,IACZ,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAkB,GAOpCC,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIX,EAAQS,EAAO,KAAK,GAEjCH,EAAA,OAAOK,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBV,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKW,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAGQL,EAAA;AAAA,MACP,WAAAO;AAAA,IAAA,CACD,GAEM,CAACU,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO1B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \ntype Props = TooltipConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n\n\n"],"names":["VisTooltipSelectors","Tooltip","accessor","inject","tooltipAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;sCA+CaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;AAxCrC,UAAAC,IAAWC,EAAOC,CAAkB,GAQpCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAa;AAG/B,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAQI,EAAO,KAAK,GAEjCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),p=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},F=c.TopoJSONMap.selectors,S=e.defineComponent({__name:"index",props:{projection:{type:[Function,Object]},topojson:{},mapFeatureName:{},mapFitToPoints:{type:Boolean},zoomFactor:{},disableZoom:{type:Boolean},zoomExtent:{},zoomDuration:{},linkWidth:{type:[Function,Number,null]},linkColor:{type:[Function,String,Array,null]},linkCursor:{type:[Function,String,null]},linkId:{type:[Function,String,null]},linkSource:{type:Function},linkTarget:{type:Function},areaId:{type:[Function,String,null]},areaColor:{type:[Function,String,Array,null]},areaCursor:{type:[Function,String,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointStrokeWidth:{type:[Function,Number,null]},pointCursor:{type:[Function,String,null]},longitude:{type:[Function,Number,null]},latitude:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelPosition:{},pointLabelTextBrightnessRatio:{},pointId:{type:Function},heatmapMode:{type:Boolean},heatmapModeBlurStdDeviation:{},heatmapModeZoomLevelThreshold:{},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:d}){const a=s,n=e.inject(y.componentAccessorKey),u=e.computed(()=>n.data.value??a.data),i=p.useForwardProps(a),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;o.value=new c.TopoJSONMap(i.value),(t=o.value)==null||t.setData(u.value),n.update(o.value)})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy(),n.destroy()}),e.watch(i,(t,r)=>{var l;p.arePropsEqual(t,r)||(l=o.value)==null||l.setConfig(i.value)}),e.watch(u,()=>{var t;(t=o.value)==null||t.setData(u.value)}),d({component:o}),(t,r)=>(e.openBlock(),e.createElementBlock("div",m))}});exports.VisTopoJSONMapSelectors=F;exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@unovis/ts"),u=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},h=c.TopoJSONMap.selectors,y=o.defineComponent({__name:"index",props:{projection:{type:[Function,Object]},topojson:{},mapFeatureName:{},mapFitToPoints:{type:Boolean},zoomFactor:{},disableZoom:{type:Boolean},zoomExtent:{},zoomDuration:{},linkWidth:{},linkColor:{},linkCursor:{},linkId:{},linkSource:{type:Function},linkTarget:{type:Function},areaId:{},areaColor:{},areaCursor:{},pointColor:{},pointRadius:{},pointStrokeWidth:{},pointCursor:{},longitude:{},latitude:{},pointLabel:{},pointLabelPosition:{},pointLabelTextBrightnessRatio:{},pointId:{type:Function},heatmapMode:{type:Boolean},heatmapModeBlurStdDeviation:{},heatmapModeZoomLevelThreshold:{},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:d}){const n=o.inject(m.componentAccessorKey),i=l,a=o.computed(()=>n.data.value??i.data),r=u.useForwardProps(i),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new c.TopoJSONMap(r.value),(e=t.value)==null||e.setData(a.value),n.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),n.destroy()}),o.watch(r,(e,s)=>{var p;u.arePropsEqual(e,s)||(p=t.value)==null||p.setConfig(r.value)}),o.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),d({component:t}),(e,s)=>(o.openBlock(),o.createElementBlock("div",v))}});exports.VisTopoJSONMapSelectors=h;exports.default=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/topojson-map/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\n\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n\ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n projection: { type: [Function, Object] },\n topojson: {},\n mapFeatureName: {},\n mapFitToPoints: { type: Boolean },\n zoomFactor: {},\n disableZoom: { type: Boolean },\n zoomExtent: {},\n zoomDuration: {},\n linkWidth: { type: [Function, Number, null] },\n linkColor: { type: [Function, String, Array, null] },\n linkCursor: { type: [Function, String, null] },\n linkId: { type: [Function, String, null] },\n linkSource: { type: Function },\n linkTarget: { type: Function },\n areaId: { type: [Function, String, null] },\n areaColor: { type: [Function, String, Array, null] },\n areaCursor: { type: [Function, String, null] },\n pointColor: { type: [Function, String, Array, null] },\n pointRadius: { type: [Function, Number, null] },\n pointStrokeWidth: { type: [Function, Number, null] },\n pointCursor: { type: [Function, String, null] },\n longitude: { type: [Function, Number, null] },\n latitude: { type: [Function, Number, null] },\n pointLabel: { type: [Function, String, null] },\n pointLabelPosition: {},\n pointLabelTextBrightnessRatio: {},\n pointId: { type: Function },\n heatmapMode: { type: Boolean },\n heatmapModeBlurStdDeviation: {},\n heatmapModeZoomLevelThreshold: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTopoJSONMapSelectors","TopoJSONMap","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"mOAGMA,EAAa,CAAE,qBAAsB,IAQ9BC,EAA0BC,EAAY,YAAA,UAIvBC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAE,KAAM,CAAC,SAAU,MAAM,CAAE,EACvC,SAAU,CAAC,EACX,eAAgB,CAAC,EACjB,eAAgB,CAAE,KAAM,OAAQ,EAChC,WAAY,CAAC,EACb,YAAa,CAAE,KAAM,OAAQ,EAC7B,WAAY,CAAC,EACb,aAAc,CAAC,EACf,UAAW,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC5C,UAAW,CAAE,KAAM,CAAC,SAAU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EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIb,EAA8C,YAAAW,EAAO,KAAK,GACtEM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBX,EAAS,QAAQ,CAAA,CAClB,EAEKa,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,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACU,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","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":"+PAkDaA,EAA0BC,EAAAA,YAAY,2rBA3C7C,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAmD,EAGrEC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,cAA8CQ,EAAO,KAAK,GACtEM,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"}
@@ -76,7 +76,7 @@ declare const _default: <AreaDatum, PointDatum, LinkDatum>(__VLS_props: any, __V
76
76
  heatmapModeZoomLevelThreshold?: number;
77
77
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
78
78
  expose(exposed: import("vue").ShallowUnwrapRef<{
79
- component: import("vue").Ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>;
79
+ component: import("vue").Ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>, TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>;
80
80
  }>): void;
81
81
  attrs: any;
82
82
  slots: {};
@@ -1,8 +1,8 @@
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, openBlock as b, createElementBlock 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({
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, openBlock as C, createElementBlock 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({
6
6
  __name: "index",
7
7
  props: {
8
8
  projection: { type: [Function, Object] },
@@ -13,22 +13,22 @@ const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
13
13
  disableZoom: { type: Boolean },
14
14
  zoomExtent: {},
15
15
  zoomDuration: {},
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] },
16
+ linkWidth: {},
17
+ linkColor: {},
18
+ linkCursor: {},
19
+ linkId: {},
20
20
  linkSource: { type: Function },
21
21
  linkTarget: { type: Function },
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] },
22
+ areaId: {},
23
+ areaColor: {},
24
+ areaCursor: {},
25
+ pointColor: {},
26
+ pointRadius: {},
27
+ pointStrokeWidth: {},
28
+ pointCursor: {},
29
+ longitude: {},
30
+ latitude: {},
31
+ pointLabel: {},
32
32
  pointLabelPosition: {},
33
33
  pointLabelTextBrightnessRatio: {},
34
34
  pointId: { type: Function },
@@ -40,29 +40,29 @@ const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
40
40
  attributes: {},
41
41
  data: {}
42
42
  },
43
- setup(c, { expose: s }) {
44
- const a = c, n = d(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);
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);
49
49
  });
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) => (b(), f("div", N));
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) => (C(), F("div", T));
62
62
  }
63
63
  });
64
64
  export {
65
- M as VisTopoJSONMapSelectors,
66
- j as default
65
+ j as VisTopoJSONMapSelectors,
66
+ D 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?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\n\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n\ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n projection: { type: [Function, Object] },\n topojson: {},\n mapFeatureName: {},\n mapFitToPoints: { type: Boolean },\n zoomFactor: {},\n disableZoom: { type: Boolean },\n zoomExtent: {},\n zoomDuration: {},\n linkWidth: { type: [Function, Number, null] },\n linkColor: { type: [Function, String, Array, null] },\n linkCursor: { type: [Function, String, null] },\n linkId: { type: [Function, String, null] },\n linkSource: { type: Function },\n linkTarget: { type: Function },\n areaId: { type: [Function, String, null] },\n areaColor: { type: [Function, String, Array, null] },\n areaCursor: { type: [Function, String, null] },\n pointColor: { type: [Function, String, Array, null] },\n pointRadius: { type: [Function, Number, null] },\n pointStrokeWidth: { type: [Function, Number, null] },\n pointCursor: { type: [Function, String, null] },\n longitude: { type: [Function, Number, null] },\n latitude: { type: [Function, Number, null] },\n pointLabel: { type: [Function, String, null] },\n pointLabelPosition: {},\n pointLabelTextBrightnessRatio: {},\n pointId: { type: Function },\n heatmapMode: { type: Boolean },\n heatmapModeBlurStdDeviation: {},\n heatmapModeZoomLevelThreshold: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisTopoJSONMapSelectors","TopoJSONMap","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EA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OACRC,EAAW,GAAGC,EAAoB,OAAO5B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
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,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),s=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),F={"data-vis-component":""},b=s.XYLabels.selectors,g=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},y:{type:[Function,Number,null]},xPositioning:{type:[Function,null]},yPositioning:{type:[Function,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 r=p,o=t.inject(d.componentAccessorKey),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=b;exports.default=g;
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;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\n\nexport const VisXYLabelsSelectors = XYLabels.selectors\n\ntype Props = XYLabelsConfigInterface<Datum>\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, Array, null] },\n y: { type: [Function, Number, null] },\n xPositioning: { type: [Function, null] },\n yPositioning: { type: [Function, null] },\n labelFontSize: { type: [Function, Number, null] },\n label: { type: [Function, String, null] },\n backgroundColor: { type: [Function, String, Array, null] },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n clustering: { type: Boolean },\n clusterLabel: { type: [Function, String, null] },\n clusterFontSize: { type: [Function, Number, null] },\n clusterBackgroundColor: { type: [Function, String, Array, null] },\n clusterCursor: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, Array, null] },\n x: { type: [Function, Number, null] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisXYLabelsSelectors","XYLabels","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"mOAGMA,EAAa,CAAE,qBAAsB,IAQ9BC,EAAuBC,EAAS,SAAA,UAIjBC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,aAAc,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,EACvC,aAAc,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,EACvC,cAAe,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAChD,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,gBAAiB,CA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J,EAAU,QAAV,MAAAI,EAAiB,UACjBX,EAAS,QAAQ,CAAA,CAClB,EAEKa,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,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACU,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
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"}
@@ -60,7 +60,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
60
60
  clusterLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
61
61
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
62
62
  expose(exposed: import("vue").ShallowUnwrapRef<{
63
- component: import("vue").Ref<XYLabels<Datum>>;
63
+ component: import("vue").Ref<XYLabels<Datum>, XYLabels<Datum>>;
64
64
  }>): void;
65
65
  attrs: any;
66
66
  slots: {};
@@ -1,26 +1,26 @@
1
- import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as g, nextTick as b, onUnmounted as v, watch as a, openBlock as S, createElementBlock 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({
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, openBlock as g, createElementBlock 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({
6
6
  __name: "index",
7
7
  props: {
8
- color: { type: [Function, String, Array, null] },
9
- y: { type: [Function, Number, null] },
10
- xPositioning: { type: [Function, null] },
11
- yPositioning: { type: [Function, 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] },
8
+ color: {},
9
+ y: {},
10
+ xPositioning: {},
11
+ yPositioning: {},
12
+ labelFontSize: {},
13
+ label: {},
14
+ backgroundColor: {},
15
+ cursor: {},
16
16
  labelTextBrightnessRatio: {},
17
17
  clustering: { type: Boolean },
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] },
18
+ clusterLabel: {},
19
+ clusterFontSize: {},
20
+ clusterBackgroundColor: {},
21
+ clusterCursor: {},
22
+ clusterLabelColor: {},
23
+ x: {},
24
24
  id: { type: Function },
25
25
  xScale: { type: [Object, Function] },
26
26
  yScale: { type: [Object, Function] },
@@ -30,29 +30,29 @@ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
30
30
  attributes: {},
31
31
  data: {}
32
32
  },
33
- setup(s, { expose: p }) {
34
- const u = s, n = m(C), o = d(() => n.data.value ?? u.data), l = x(u), e = F();
35
- return g(() => {
36
- b(() => {
37
- var t;
38
- e.value = new i(l.value), (t = e.value) == null || t.setData(o.value), n.update(e.value);
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);
39
39
  });
40
- }), v(() => {
41
- var t;
42
- (t = e.value) == null || t.destroy(), n.destroy();
43
- }), a(l, (t, r) => {
44
- var c;
45
- _(t, r) || (c = e.value) == null || c.setConfig(l.value);
46
- }), a(o, () => {
47
- var t;
48
- (t = e.value) == null || t.setData(o.value);
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);
49
49
  }), p({
50
- component: e
51
- }), (t, r) => (S(), f("div", B));
50
+ component: o
51
+ }), (e, r) => (g(), _("div", k));
52
52
  }
53
53
  });
54
54
  export {
55
- N as VisXYLabelsSelectors,
56
- P as default
55
+ j as VisXYLabelsSelectors,
56
+ w 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?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\n\nexport const VisXYLabelsSelectors = XYLabels.selectors\n\ntype Props = XYLabelsConfigInterface<Datum>\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, Array, null] },\n y: { type: [Function, Number, null] },\n xPositioning: { type: [Function, null] },\n yPositioning: { type: [Function, null] },\n labelFontSize: { type: [Function, Number, null] },\n label: { type: [Function, String, null] },\n backgroundColor: { type: [Function, String, Array, null] },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n clustering: { type: Boolean },\n clusterLabel: { type: [Function, String, null] },\n clusterFontSize: { type: [Function, Number, null] },\n clusterBackgroundColor: { type: [Function, String, Array, null] },\n clusterCursor: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, Array, null] },\n x: { type: [Function, Number, null] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","VisXYLabelsSelectors","XYLabels","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQ9BC,IAAuBC,EAAS,WAIjBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC/C,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACpC,cAAc,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACvC,cAAc,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACvC,eAAe,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAChD,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,iBAAiB,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACzD,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACzC,0BAA0B,CAAC;AAAA,IAC3B,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,cAAc,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC/C,iBAAiB,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAClD,wBAAwB,EAAE,MA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AM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACU,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO5B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
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;;;"}