@unovis/vue 1.3.0-alpha.3 → 1.3.0-beta.2

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 (123) hide show
  1. package/components/area/index.cjs +1 -1
  2. package/components/area/index.cjs.map +1 -1
  3. package/components/area/index.d.ts +53 -6
  4. package/components/area/index.js +20 -17
  5. package/components/area/index.js.map +1 -1
  6. package/components/axis/index.cjs +1 -1
  7. package/components/axis/index.cjs.map +1 -1
  8. package/components/axis/index.d.ts +71 -6
  9. package/components/axis/index.js +20 -17
  10. package/components/axis/index.js.map +1 -1
  11. package/components/brush/index.cjs +1 -1
  12. package/components/brush/index.cjs.map +1 -1
  13. package/components/brush/index.d.ts +57 -6
  14. package/components/brush/index.js +19 -16
  15. package/components/brush/index.js.map +1 -1
  16. package/components/chord-diagram/index.cjs +1 -1
  17. package/components/chord-diagram/index.cjs.map +1 -1
  18. package/components/chord-diagram/index.d.ts +55 -6
  19. package/components/chord-diagram/index.js +20 -17
  20. package/components/chord-diagram/index.js.map +1 -1
  21. package/components/crosshair/index.cjs +1 -1
  22. package/components/crosshair/index.cjs.map +1 -1
  23. package/components/crosshair/index.d.ts +56 -6
  24. package/components/crosshair/index.js +20 -35
  25. package/components/crosshair/index.js.map +1 -1
  26. package/components/donut/index.cjs +1 -1
  27. package/components/donut/index.cjs.map +1 -1
  28. package/components/donut/index.d.ts +57 -6
  29. package/components/donut/index.js +21 -18
  30. package/components/donut/index.js.map +1 -1
  31. package/components/free-brush/index.cjs +1 -1
  32. package/components/free-brush/index.cjs.map +1 -1
  33. package/components/free-brush/index.d.ts +57 -6
  34. package/components/free-brush/index.js +21 -18
  35. package/components/free-brush/index.js.map +1 -1
  36. package/components/graph/index.cjs +1 -1
  37. package/components/graph/index.cjs.map +1 -1
  38. package/components/graph/index.d.ts +106 -6
  39. package/components/graph/index.js +24 -21
  40. package/components/graph/index.js.map +1 -1
  41. package/components/grouped-bar/index.cjs +1 -1
  42. package/components/grouped-bar/index.cjs.map +1 -1
  43. package/components/grouped-bar/index.d.ts +57 -6
  44. package/components/grouped-bar/index.js +21 -18
  45. package/components/grouped-bar/index.js.map +1 -1
  46. package/components/line/index.cjs +1 -1
  47. package/components/line/index.cjs.map +1 -1
  48. package/components/line/index.d.ts +54 -6
  49. package/components/line/index.js +20 -17
  50. package/components/line/index.js.map +1 -1
  51. package/components/nested-donut/index.cjs +1 -1
  52. package/components/nested-donut/index.cjs.map +1 -1
  53. package/components/nested-donut/index.d.ts +59 -6
  54. package/components/nested-donut/index.js +22 -19
  55. package/components/nested-donut/index.js.map +1 -1
  56. package/components/sankey/index.cjs +1 -1
  57. package/components/sankey/index.cjs.map +1 -1
  58. package/components/sankey/index.d.ts +90 -6
  59. package/components/sankey/index.js +28 -25
  60. package/components/sankey/index.js.map +1 -1
  61. package/components/scatter/index.cjs +1 -1
  62. package/components/scatter/index.cjs.map +1 -1
  63. package/components/scatter/index.d.ts +60 -6
  64. package/components/scatter/index.js +22 -19
  65. package/components/scatter/index.js.map +1 -1
  66. package/components/stacked-bar/index.cjs +1 -1
  67. package/components/stacked-bar/index.cjs.map +1 -1
  68. package/components/stacked-bar/index.d.ts +57 -6
  69. package/components/stacked-bar/index.js +22 -19
  70. package/components/stacked-bar/index.js.map +1 -1
  71. package/components/timeline/index.cjs +1 -1
  72. package/components/timeline/index.cjs.map +1 -1
  73. package/components/timeline/index.d.ts +54 -12
  74. package/components/timeline/index.js +22 -41
  75. package/components/timeline/index.js.map +1 -1
  76. package/components/tooltip/index.cjs +1 -1
  77. package/components/tooltip/index.cjs.map +1 -1
  78. package/components/tooltip/index.d.ts +2 -2
  79. package/components/tooltip/index.js +18 -18
  80. package/components/tooltip/index.js.map +1 -1
  81. package/components/topojson-map/index.cjs +1 -1
  82. package/components/topojson-map/index.cjs.map +1 -1
  83. package/components/topojson-map/index.d.ts +73 -6
  84. package/components/topojson-map/index.js +22 -19
  85. package/components/topojson-map/index.js.map +1 -1
  86. package/components/xy-labels/index.cjs +1 -1
  87. package/components/xy-labels/index.cjs.map +1 -1
  88. package/components/xy-labels/index.d.ts +61 -6
  89. package/components/xy-labels/index.js +27 -24
  90. package/components/xy-labels/index.js.map +1 -1
  91. package/containers/single-container/index.cjs +1 -1
  92. package/containers/single-container/index.cjs.map +1 -1
  93. package/containers/single-container/index.d.ts +21 -8
  94. package/containers/single-container/index.js +28 -29
  95. package/containers/single-container/index.js.map +1 -1
  96. package/containers/xy-container/index.cjs +1 -1
  97. package/containers/xy-container/index.cjs.map +1 -1
  98. package/containers/xy-container/index.d.ts +38 -8
  99. package/containers/xy-container/index.js +33 -33
  100. package/containers/xy-container/index.js.map +1 -1
  101. package/html-components/bullet-legend/index.cjs +1 -1
  102. package/html-components/bullet-legend/index.cjs.map +1 -1
  103. package/html-components/bullet-legend/index.d.ts +6 -0
  104. package/html-components/bullet-legend/index.js +19 -18
  105. package/html-components/bullet-legend/index.js.map +1 -1
  106. package/html-components/leaflet-flow-map/index.cjs +1 -1
  107. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  108. package/html-components/leaflet-flow-map/index.d.ts +107 -6
  109. package/html-components/leaflet-flow-map/index.js +18 -18
  110. package/html-components/leaflet-flow-map/index.js.map +1 -1
  111. package/html-components/leaflet-map/index.cjs +1 -1
  112. package/html-components/leaflet-map/index.cjs.map +1 -1
  113. package/html-components/leaflet-map/index.d.ts +94 -6
  114. package/html-components/leaflet-map/index.js +17 -17
  115. package/html-components/leaflet-map/index.js.map +1 -1
  116. package/index.cjs +1 -1
  117. package/index.js +1 -1
  118. package/package.json +5 -5
  119. package/utils/props.cjs +1 -1
  120. package/utils/props.cjs.map +1 -1
  121. package/utils/props.d.ts +3 -0
  122. package/utils/props.js +14 -11
  123. package/utils/props.js.map +1 -1
@@ -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, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\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\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\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\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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","TopoJSONMap","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,CAAC,UAAU,MAAM,EAAE;AAAA,IACvC,UAAU,CAAC;AAAA,IACX,gBAAgB,CAAC;AAAA,IACjB,gBAAgB,EAAE,MAAM,QAAQ;AAAA,IAChC,YAAY,CAAC;AAAA,IACb,aAAa,EAAE,MAAM,QAAQ;AAAA,IAC7B,YAAY,CAAC;AAAA,IACb,cAAc,CAAC;AAAA,IACf,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC5C,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACnD,YAAY,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC7C,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACzC,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAA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AAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
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\ninterface Props extends 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, 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, null] },\n areaCursor: { type: [Function, String, null] },\n pointColor: { type: [Function, String, 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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","TopoJSONMap","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AA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require("@unovis/ts"),i=require("../../utils/props.cjs"),F=require("../../utils/context.cjs"),g={"data-vis-component":""},m=n.defineComponent({__name:"index",props:{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},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(a,{expose:s}){const c=a,o=n.inject(F.componentAccessorKey),p=n.computed(()=>o.data.value??c.data),y=n.getCurrentInstance(),u=n.computed(()=>i.parseProps({...c},y)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.XYLabels(u.value),(t=e.value)==null||t.setData(p.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(u,(t,r)=>{var l;i.arePropsEqual(t,r)||(l=e.value)==null||l.setConfig(u.value)}),s({component:e}),(t,r)=>(n.openBlock(),n.createElementBlock("div",g))}});module.exports=m;
1
+ "use strict";const e=require("vue"),y=require("@unovis/ts"),a=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),F={"data-vis-component":""},g=e.defineComponent({__name:"index",props:{color:{type:[Function,String,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,null]},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{type:[Function,String,null]},clusterFontSize:{type:[Function,Number,null]},clusterBackgroundColor:{type:[Function,String,null]},clusterCursor:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,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(s,{expose:p}){const c=s,o=e.inject(d.componentAccessorKey),u=e.computed(()=>o.data.value??c.data),l=a.useForwardProps(c),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new y.XYLabels(l.value),(t=n.value)==null||t.setData(u.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(l,(t,r)=>{var i;a.arePropsEqual(t,r)||(i=n.value)==null||i.setConfig(l.value)}),e.watch(u,()=>{var t;(t=n.value)==null||t.setData(u.value)}),p({component:n}),(t,r)=>(e.openBlock(),e.createElementBlock("div",F))}});module.exports=g;
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, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\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 color: { type: [Function, String, Array, null] },\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\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\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\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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","XYLabels","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,aAAc,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,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S,EAAAM,CAAQ,CAAC,EAG1DI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAgB,SAAAN,EAAO,KAAK,GACxCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBd,EAAS,QAAQ,CAAA,CAClB,EAEKgB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEQT,EAAA,CACP,UAAAW,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO7B,CAAU,EAE7D,CAEA,CAAC"}
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\ninterface Props extends XYLabelsConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, 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, 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, null] },\n clusterCursor: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, 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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","XYLabels","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAA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SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAgB,SAAAN,EAAO,KAAK,GACxCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKc,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
@@ -1,11 +1,66 @@
1
- import { XYLabels, XYLabelsConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: XYLabelsConfigInterface<Datum> & {
1
+ import { XYLabels, NumericAccessor } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
9
+ cursor?: import("@unovis/ts").StringAccessor<Datum>;
10
+ x: NumericAccessor<Datum>;
11
+ y: NumericAccessor<Datum>;
12
+ id?: (d: Datum, i: number, ...any: any[]) => string;
13
+ xScale?: import("@unovis/ts").ContinuousScale;
14
+ yScale?: import("@unovis/ts").ContinuousScale;
15
+ excludeFromDomainCalculation?: boolean;
16
+ duration?: number;
17
+ events?: {
18
+ [selector: string]: {
19
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
20
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
21
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
22
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
23
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
24
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
25
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
26
+ click?: import("@unovis/ts").VisEventCallback<any>;
27
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
28
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
29
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
30
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
31
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
32
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
33
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
34
+ select?: import("@unovis/ts").VisEventCallback<any>;
35
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
36
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
37
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
38
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
39
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
40
+ };
41
+ };
42
+ attributes?: {
43
+ [selector: string]: {
44
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
45
+ };
46
+ };
4
47
  data?: Datum[];
5
- };
6
- expose(exposed: {
48
+ label?: import("@unovis/ts").StringAccessor<Datum>;
49
+ labelFontSize?: NumericAccessor<Datum>;
50
+ labelTextBrightnessRatio?: number;
51
+ xPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
52
+ yPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
53
+ backgroundColor?: import("@unovis/ts").ColorAccessor<Datum>;
54
+ clustering?: boolean;
55
+ clusterLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
56
+ clusterFontSize?: NumericAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
57
+ clusterBackgroundColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
58
+ clusterCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
59
+ clusterLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
60
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
61
+ expose(exposed: import("vue").ShallowUnwrapRef<{
7
62
  component: import("vue").Ref<XYLabels<Datum>>;
8
- }): void;
63
+ }>): void;
9
64
  attrs: any;
10
65
  slots: {};
11
66
  emit: any;
@@ -1,27 +1,27 @@
1
- import { defineComponent as y, inject as m, computed as c, getCurrentInstance as d, ref as F, onMounted as g, nextTick as b, onUnmounted as v, watch as S, openBlock as f, createElementBlock as x } from "vue";
2
- import { XYLabels as C } from "@unovis/ts";
3
- import { parseProps as _, arePropsEqual as B } from "../../utils/props.js";
4
- import { componentAccessorKey as k } from "../../utils/context.js";
5
- const A = { "data-vis-component": "" }, L = /* @__PURE__ */ y({
1
+ import { defineComponent as p, inject as y, computed as m, ref as d, onMounted as F, nextTick as g, onUnmounted as b, watch as i, openBlock as v, createElementBlock as S } from "vue";
2
+ import { XYLabels as f } 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": "" }, j = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
+ color: { type: [Function, String, null] },
8
9
  y: { type: [Function, Number, null] },
9
10
  xPositioning: { type: [Function, null] },
10
11
  yPositioning: { type: [Function, null] },
11
12
  labelFontSize: { type: [Function, Number, null] },
12
13
  label: { type: [Function, String, null] },
13
- backgroundColor: { type: [Function, String, Array, null] },
14
+ backgroundColor: { type: [Function, String, null] },
14
15
  cursor: { type: [Function, String, null] },
15
16
  labelTextBrightnessRatio: {},
16
17
  clustering: { type: Boolean },
17
18
  clusterLabel: { type: [Function, String, null] },
18
19
  clusterFontSize: { type: [Function, Number, null] },
19
- clusterBackgroundColor: { type: [Function, String, Array, null] },
20
+ clusterBackgroundColor: { type: [Function, String, null] },
20
21
  clusterCursor: { type: [Function, String, null] },
21
- clusterLabelColor: { type: [Function, String, Array, null] },
22
+ clusterLabelColor: { type: [Function, String, null] },
22
23
  x: { type: [Function, Number, null] },
23
24
  id: { type: Function },
24
- color: { type: [Function, String, Array, null] },
25
25
  xScale: { type: [Object, Function] },
26
26
  yScale: { type: [Object, Function] },
27
27
  excludeFromDomainCalculation: { type: Boolean },
@@ -30,25 +30,28 @@ const A = { "data-vis-component": "" }, L = /* @__PURE__ */ y({
30
30
  attributes: {},
31
31
  data: {}
32
32
  },
33
- setup(a, { expose: i }) {
34
- const l = a, e = m(k), s = c(() => e.data.value ?? l.data), p = d(), o = c(() => _({ ...l }, p)), t = F();
35
- return g(() => {
36
- b(() => {
37
- var n;
38
- t.value = new C(o.value), (n = t.value) == null || n.setData(s.value), e.update(t.value);
33
+ setup(a, { expose: s }) {
34
+ const u = a, e = y(C), o = m(() => e.data.value ?? u.data), l = x(u), n = d();
35
+ return F(() => {
36
+ g(() => {
37
+ var t;
38
+ n.value = new f(l.value), (t = n.value) == null || t.setData(o.value), e.update(n.value);
39
39
  });
40
- }), v(() => {
41
- var n;
42
- (n = t.value) == null || n.destroy(), e.destroy();
43
- }), S(o, (n, u) => {
40
+ }), b(() => {
41
+ var t;
42
+ (t = n.value) == null || t.destroy(), e.destroy();
43
+ }), i(l, (t, c) => {
44
44
  var r;
45
- B(n, u) || (r = t.value) == null || r.setConfig(o.value);
46
- }), i({
47
- component: t
48
- }), (n, u) => (f(), x("div", A));
45
+ _(t, c) || (r = n.value) == null || r.setConfig(l.value);
46
+ }), i(o, () => {
47
+ var t;
48
+ (t = n.value) == null || t.setData(o.value);
49
+ }), s({
50
+ component: n
51
+ }), (t, c) => (v(), S("div", B));
49
52
  }
50
53
  });
51
54
  export {
52
- L as default
55
+ j as default
53
56
  };
54
57
  //# 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, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\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 color: { type: [Function, String, Array, null] },\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\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\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\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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","XYLabels","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,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,C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AAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
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\ninterface Props extends XYLabelsConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, 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, 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, null] },\n clusterCursor: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, 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","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","XYLabels","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,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,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AOO,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBZ,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKc,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEDS,EAAMX,GAAM,MAAM;;AACN,OAAAS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),d=require("@unovis/ts"),c=require("../../utils/context.cjs"),f=require("../../utils/props.cjs"),m=e.defineComponent({__name:"index",props:{component:{},tooltip:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(u,{expose:l}){const s=u,{data:a}=e.toRefs(s),p=e.getCurrentInstance(),v=e.computed(()=>f.parseProps({...s},p)),o=e.ref(),n=e.ref({component:void 0,tooltip:void 0}),r=e.ref(),i=()=>{o.value||r.value&&n.value.component&&(o.value=new d.SingleContainer(r.value,n.value,a.value))};return e.watchEffect(()=>{var t;i(),(t=o.value)==null||t.updateContainer({...v.value,...n.value})}),e.watch(a,()=>{o.value?o.value.setData(a.value,!0):i()}),e.onUnmounted(()=>{var t;return(t=o.value)==null?void 0:t.destroy()}),e.provide(c.componentAccessorKey,{data:a,update:t=>n.value.component=t,destroy:()=>n.value.component=void 0}),e.provide(c.tooltipAccessorKey,{data:a,update:t=>n.value.tooltip=t,destroy:()=>{n.value.tooltip=void 0}}),l({component:o}),(t,g)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:r,class:"unovis-single-container"},[e.renderSlot(t.$slots,"default")],512))}});module.exports=m;
1
+ "use strict";const e=require("vue"),u=require("@unovis/ts"),c=require("../../utils/context.cjs"),f=require("../../utils/props.cjs"),v=e.defineComponent({__name:"index",props:{component:{},tooltip:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(p,{expose:d}){const r=p,{data:s}=e.toRefs(r),l=f.useForwardProps(r);let o;const t=e.reactive({component:void 0,tooltip:void 0}),i=e.ref(),a=()=>{o||i.value&&t.component&&(o=new u.SingleContainer(i.value,{...e.toRaw(t)},s.value))};return e.watchEffect(()=>{var n;a(),(n=t.component)==null||n.config,o==null||o.updateContainer({...e.toRaw(l.value),...e.toRaw(t)})}),e.watch(s,()=>{o?o.setData(s.value,!0):a()}),e.onUnmounted(()=>o==null?void 0:o.destroy()),e.provide(c.componentAccessorKey,{data:s,update:n=>t.component=n,destroy:()=>t.component=void 0}),e.provide(c.tooltipAccessorKey,{data:s,update:n=>t.tooltip=n,destroy:()=>{t.tooltip=void 0}}),d({component:o}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:i,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});module.exports=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, watchEffect, Ref, onMounted } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<SingleContainer<T> | undefined>()\nconst config = ref({\n component: undefined,\n tooltip: undefined,\n}) as Ref<SingleContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart.value) return\n if (elRef.value && config.value.component)\n chart.value = new SingleContainer(elRef.value, config.value, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.value.component = c,\n destroy: () => config.value.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-single-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-single-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","initChart","SingleContainer","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":"oI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ApB,EACA,OAAS,GAAeS,EAAO,MAAM,QAAU,EAC/C,QAAS,IAAM,CAAEA,EAAO,MAAM,QAAU,MAAU,CAAA,CACnD,EAEQX,EAAA,CACP,UAAWS,CAAA,CACZ,EAEM,CAACc,EAAUC,KACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,4BAA6B,GAC7B,QAAS,QACT,IAAKd,EACL,MAAO,yBAAA,EACN,CACDe,aAAYJ,EAAK,OAAQ,SAAS,GACjC,GAAG,EAER,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-single-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-single-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":"oIAS4BA,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,UAAW,CAAC,EACZ,QAAS,CAAC,EACV,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,QAAS,CAAC,EACV,OAAQ,CAAC,EACT,MAAO,CAAC,EACR,OAAQ,CAAC,EACT,QAAS,CAAC,EACV,UAAW,CAAC,EACZ,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGR,CAAE,KAAAG,CAAA,EAASC,EAAA,OAAOF,CAAK,EACvBG,EAAcC,kBAAgBJ,CAAK,EAErC,IAAAK,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,MAAA,CACV,EACKC,EAAQC,EAAAA,MAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YAChBD,EAAA,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAAA,EAG7EY,OAAAA,EAAAA,YAAY,IAAM,OACNH,KAEAI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OACrBT,GAAA,MAAAA,EAAA,gBAAgB,CAAE,GAAGO,EAAAA,MAAMT,EAAY,KAAK,EAAG,GAAGS,EAAA,MAAMN,CAAM,CAAA,EAAG,CACzE,EAEDS,EAAA,MAAMd,EAAM,IAAM,CACZI,EACIA,EAAA,QAAQJ,EAAK,MAAO,EAAI,EAEpBS,GACZ,CACD,EAEWM,EAAAA,YAAA,IAAMX,GAAA,YAAAA,EAAO,SAAS,EAElCY,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAjB,EACA,OAASkB,GAAwBb,EAAO,UAAYa,EACpD,QAAS,IAAMb,EAAO,UAAY,MAAA,CACnC,EAEDW,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAnB,EACA,OAASoB,GAAef,EAAO,QAAUe,EACzC,QAAS,IAAM,CAAEf,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEQP,EAAA,CACP,UAAWM,CAAA,CACZ,EAEM,CAACiB,EAAUC,KACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,4BAA6B,GAC7B,QAAS,QACT,IAAKjB,EACL,MAAO,yBAAA,EACN,CACDkB,aAAYJ,EAAK,OAAQ,SAAS,GACjC,GAAG,EAER,CAEA,CAAC"}
@@ -1,12 +1,25 @@
1
- import { SingleContainer, SingleContainerConfigInterface } from '@unovis/ts';
2
- import { Ref } from 'vue';
3
- declare const _default: <T>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
4
- props: SingleContainerConfigInterface<T> & {
1
+ import { SingleContainer, ComponentCore, Tooltip } from '@unovis/ts';
2
+ declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ duration?: number;
5
9
  data?: T;
6
- };
7
- expose(exposed: {
8
- component: Ref<SingleContainer<T>>;
9
- }): void;
10
+ tooltip?: Tooltip;
11
+ component?: ComponentCore<T, import("@unovis/ts").ComponentConfigInterface>;
12
+ margin?: import("@unovis/ts").Spacing;
13
+ padding?: import("@unovis/ts").Spacing;
14
+ sizing?: string;
15
+ width?: string | number;
16
+ height?: string | number;
17
+ svgDefs?: string;
18
+ ariaLabel?: string;
19
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
20
+ expose(exposed: import("vue").ShallowUnwrapRef<{
21
+ component: SingleContainer<T>;
22
+ }>): void;
10
23
  attrs: any;
11
24
  slots: {
12
25
  default?(_: {}): any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as v, toRefs as m, getCurrentInstance as f, computed as g, ref as r, watchEffect as h, watch as y, onUnmounted as _, provide as l, openBlock as C, createElementBlock as w, renderSlot as k } from "vue";
2
- import { SingleContainer as x } from "@unovis/ts";
3
- import { componentAccessorKey as R, tooltipAccessorKey as A } from "../../utils/context.js";
4
- import { parseProps as B } from "../../utils/props.js";
5
- const b = /* @__PURE__ */ v({
1
+ import { defineComponent as f, toRefs as m, reactive as u, ref as v, watchEffect as g, watch as w, onUnmounted as y, provide as p, openBlock as _, createElementBlock as h, renderSlot as C, toRaw as r } from "vue";
2
+ import { SingleContainer as R } from "@unovis/ts";
3
+ import { componentAccessorKey as k, tooltipAccessorKey as x } from "../../utils/context.js";
4
+ import { useForwardProps as A } from "../../utils/props.js";
5
+ const S = /* @__PURE__ */ f({
6
6
  __name: "index",
7
7
  props: {
8
8
  component: {},
@@ -17,44 +17,43 @@ const b = /* @__PURE__ */ v({
17
17
  ariaLabel: {},
18
18
  data: {}
19
19
  },
20
- setup(c, { expose: p }) {
21
- const i = c, { data: n } = m(i), u = f(), d = g(() => B({ ...i }, u)), o = r(), t = r({
20
+ setup(c, { expose: d }) {
21
+ const a = c, { data: n } = m(a), l = A(a);
22
+ let e;
23
+ const o = u({
22
24
  component: void 0,
23
25
  tooltip: void 0
24
- }), a = r(), s = () => {
25
- o.value || a.value && t.value.component && (o.value = new x(a.value, t.value, n.value));
26
+ }), i = v(), s = () => {
27
+ e || i.value && o.component && (e = new R(i.value, { ...r(o) }, n.value));
26
28
  };
27
- return h(() => {
28
- var e;
29
- s(), (e = o.value) == null || e.updateContainer({ ...d.value, ...t.value });
30
- }), y(n, () => {
31
- o.value ? o.value.setData(n.value, !0) : s();
32
- }), _(() => {
33
- var e;
34
- return (e = o.value) == null ? void 0 : e.destroy();
35
- }), l(R, {
29
+ return g(() => {
30
+ var t;
31
+ s(), (t = o.component) == null || t.config, e == null || e.updateContainer({ ...r(l.value), ...r(o) });
32
+ }), w(n, () => {
33
+ e ? e.setData(n.value, !0) : s();
34
+ }), y(() => e == null ? void 0 : e.destroy()), p(k, {
36
35
  data: n,
37
- update: (e) => t.value.component = e,
38
- destroy: () => t.value.component = void 0
39
- }), l(A, {
36
+ update: (t) => o.component = t,
37
+ destroy: () => o.component = void 0
38
+ }), p(x, {
40
39
  data: n,
41
- update: (e) => t.value.tooltip = e,
40
+ update: (t) => o.tooltip = t,
42
41
  destroy: () => {
43
- t.value.tooltip = void 0;
42
+ o.tooltip = void 0;
44
43
  }
45
- }), p({
46
- component: o
47
- }), (e, D) => (C(), w("div", {
44
+ }), d({
45
+ component: e
46
+ }), (t, B) => (_(), h("div", {
48
47
  "data-vis-single-container": "",
49
48
  ref_key: "elRef",
50
- ref: a,
49
+ ref: i,
51
50
  class: "unovis-single-container"
52
51
  }, [
53
- k(e.$slots, "default")
52
+ C(t.$slots, "default")
54
53
  ], 512));
55
54
  }
56
55
  });
57
56
  export {
58
- b as default
57
+ S as default
59
58
  };
60
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, watchEffect, Ref, onMounted } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<SingleContainer<T> | undefined>()\nconst config = ref({\n component: undefined,\n tooltip: undefined,\n}) as Ref<SingleContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart.value) return\n if (elRef.value && config.value.component)\n chart.value = new SingleContainer(elRef.value, config.value, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.value.component = c,\n destroy: () => config.value.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-single-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-single-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","initChart","SingleContainer","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":";;;;AASA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,CAAC;AAAA,IACV,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,SAAS,CAAC;AAAA,IACV,QAAQ,CAAC;AAAA,IACT,OAAO,CAAC;AAAA,IACR,QAAQ,CAAC;AAAA,IACT,SAAS,CAAC;AAAA,IACV,WAAW,CAAC;AAAA,IACZ,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGR,EAAE,MAAAG,EAAA,IAASC,EAAOF,CAAK,GACvBG,IAAWC,KACXC,IAAcC,EAAS,MAAMC,EAAW,EAAE,GAAGP,EAAS,GAAAG,CAAQ,CAAC,GAE/DK,IAAQC,KACRC,IAASD,EAAI;AAAA,MACjB,WAAW;AAAA,MACX,SAAS;AAAA,IAAA,CACV,GACKE,IAAQF,KAERG,IAAY,MAAM;AACtB,MAAIJ,EAAM,SACNG,EAAM,SAASD,EAAO,MAAM,cACxBF,EAAA,QAAQ,IAAIK,EAAgBF,EAAM,OAAOD,EAAO,OAAOT,EAAK,KAAK;AAAA,IAAA;AAG3E,WAAAa,EAAY,MAAM;;AACN,MAAAF,MACJG,IAAAP,EAAA,UAAA,QAAAO,EAAO,gBAAgB,EAAE,GAAGV,EAAY,OAAO,GAAGK,EAAO,MAAA;AAAA,IAAO,CACvE,GAEDM,EAAMf,GAAM,MAAM;AAChB,MAAIO,EAAM,QACRA,EAAM,MAAM,QAAQP,EAAK,OAAO,EAAI,IAE1BW;IACZ,CACD,GAEDK,EAAY,MAAA;;AAAM,cAAAF,IAAAP,EAAM,UAAN,gBAAAO,EAAa;AAAA,KAAS,GAExCG,EAAQC,GAAsB;AAAA,MAC5B,MAAAlB;AAAA,MACA,QAAQ,CAACmB,MAAwBV,EAAO,MAAM,YAAYU;AAAA,MAC1D,SAAS,MAAMV,EAAO,MAAM,YAAY;AAAA,IAAA,CACzC,GAEDQ,EAAQG,GAAoB;AAAA,MAC1B,MAAApB;AAAA,MACA,QAAQ,CAACqB,MAAeZ,EAAO,MAAM,UAAUY;AAAA,MAC/C,SAAS,MAAM;AAAE,QAAAZ,EAAO,MAAM,UAAU;AAAA,MAAU;AAAA,IAAA,CACnD,GAEQX,EAAA;AAAA,MACP,WAAWS;AAAA,IAAA,CACZ,GAEM,CAACe,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,6BAA6B;AAAA,MAC7B,SAAS;AAAA,MACT,KAAKf;AAAA,MACL,OAAO;AAAA,IAAA,GACN;AAAA,MACDgB,EAAYJ,EAAK,QAAQ,SAAS;AAAA,OACjC,GAAG;AAAA,EAER;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-single-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-single-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":";;;;AASA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,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AE,QAAAA,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEQP,EAAA;AAAA,MACP,WAAWM;AAAA,IAAA,CACZ,GAEM,CAACgB,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,6BAA6B;AAAA,MAC7B,SAAS;AAAA,MACT,KAAKhB;AAAA,MACL,OAAO;AAAA,IAAA,GACN;AAAA,MACDiB,EAAYJ,EAAK,QAAQ,SAAS;AAAA,OACjC,GAAG;AAAA,EAER;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const o=require("vue"),d=require("@unovis/ts"),s=require("../../utils/context.cjs"),y=require("../../utils/props.cjs"),m=o.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(u,{expose:p}){const r=u,{data:n}=o.toRefs(r),l=o.getCurrentInstance(),v=o.computed(()=>y.parseProps({...r},l)),a=o.ref(),t=o.ref({components:[],crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),i=o.ref();return o.watch(n,()=>{a.value&&a.value.setData(n.value,!0)}),o.watchEffect(()=>{var e;(e=a.value)==null||e.updateContainer({...v.value,...t.value})}),o.onMounted(()=>{i.value&&(a.value=new d.XYContainer(i.value,t.value,n.value))}),o.onUnmounted(()=>{var e;return(e=a.value)==null?void 0:e.destroy()}),o.provide(s.componentAccessorKey,{data:n,update:e=>t.value.components=[...t.value.components,e],destroy:()=>{var e;return t.value.components=(e=t.value.components)==null?void 0:e.filter(c=>!c.isDestroyed())}}),o.provide(s.axisAccessorKey,{data:n,update:e=>t.value[`${e.config.type}Axis`]=e,destroy:e=>{t.value[`${e}Axis`]=void 0}}),o.provide(s.crosshairAccessorKey,{data:n,update:e=>t.value.crosshair=e,destroy:()=>{t.value.crosshair=void 0}}),o.provide(s.tooltipAccessorKey,{data:n,update:e=>t.value.tooltip=e,destroy:()=>{t.value.tooltip=void 0}}),p({component:a}),(e,c)=>(o.openBlock(),o.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:i,class:"unovis-xy-container"},[o.renderSlot(e.$slots,"default")],512))}});module.exports=m;
1
+ "use strict";const o=require("vue"),l=require("@unovis/ts"),i=require("../../utils/context.cjs"),y=require("../../utils/props.cjs"),v=o.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(p,{expose:d}){const c=p,{data:n}=o.toRefs(c),u=y.useForwardProps(c),s=o.ref(),t=o.reactive({components:[],crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),r=o.ref();return o.watch(n,()=>{s.value&&s.value.setData(n.value,!0)}),o.watchEffect(()=>{var e;t.components.map(a=>a.config),(e=s.value)==null||e.updateContainer({...o.toRaw(u.value),...o.toRaw(t)})}),o.onMounted(()=>{r.value&&(s.value=new l.XYContainer(r.value,{...o.toRaw(t)},n.value))}),o.onUnmounted(()=>{var e;return(e=s.value)==null?void 0:e.destroy()}),o.provide(i.componentAccessorKey,{data:n,update:e=>t.components=[...t.components,e],destroy:()=>{var e;return t.components=(e=t.components)==null?void 0:e.filter(a=>!a.isDestroyed())}}),o.provide(i.axisAccessorKey,{data:n,update:e=>t[`${e.config.type}Axis`]=e,destroy:e=>{t[`${e}Axis`]=void 0}}),o.provide(i.crosshairAccessorKey,{data:n,update:e=>t.crosshair=e,destroy:()=>{t.crosshair=void 0}}),o.provide(i.tooltipAccessorKey,{data:n,update:e=>t.tooltip=e,destroy:()=>{t.tooltip=void 0}}),d({component:s}),(e,a)=>(o.openBlock(),o.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:r,class:"unovis-xy-container"},[o.renderSlot(e.$slots,"default")],512))}});module.exports=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, reactive, watchEffect, shallowRef, Ref } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = ref({\n components: [],\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as Ref<XYContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, config.value, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.value.components = [...config.value.components!, c],\n destroy: () => config.value.components = config.value.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config.value[`${c.config.type}Axis`] = c,\n destroy: (c) => { config.value[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.value.crosshair = c,\n destroy: () => { config.value.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-xy-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-xy-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","watch","watchEffect","_a","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAcc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S,QACT,IAAKjB,EACL,MAAO,qBAAA,EACN,CACDkB,aAAYJ,EAAK,OAAQ,SAAS,GACjC,GAAG,EAER,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n // watch deep changes in components config\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-xy-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-xy-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","i","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":"oIAS4BA,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAC,EACb,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,QAAS,CAAC,EACV,qBAAsB,CAAC,EACvB,qBAAsB,CAAC,EACvB,OAAQ,CAAC,EACT,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ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,YAAY,IAAA,OAAM,OAAAJ,EAAAR,EAAM,QAAN,YAAAQ,EAAa,UAAS,EAExCK,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAlB,EACA,OAASmB,GAA0Bb,EAAO,WAAa,CAAC,GAAGA,EAAO,WAAaa,CAAC,EAChF,QAAS,IAAM,OAAA,OAAAb,EAAO,YAAaM,EAAAN,EAAO,aAAP,YAAAM,EAAmB,OAAYO,GAAA,CAACA,EAAE,YAAA,GAAa,CACnF,EAEDF,EAAAA,QAAQG,EAAAA,gBAAiB,CACvB,KAAApB,EACA,OAASmB,GAAeb,EAAO,GAAGa,EAAE,OAAO,IAAI,MAAM,EAAIA,EACzD,QAAUA,GAAM,CAASb,EAAA,GAAGa,CAAC,MAAM,EAAI,MAAU,CAAA,CAClD,EAEDF,EAAAA,QAAQI,EAAAA,qBAAsB,CAC5B,KAAArB,EACA,OAASmB,GAAoBb,EAAO,UAAYa,EAChD,QAAS,IAAM,CAAEb,EAAO,UAAY,MAAU,CAAA,CAC/C,EAEDW,EAAAA,QAAQK,EAAAA,mBAAoB,CAC1B,KAAAtB,EACA,OAASuB,GAAejB,EAAO,QAAUiB,EACzC,QAAS,IAAM,CAAEjB,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEQR,EAAA,CACP,UAAWM,CAAA,CACZ,EAEM,CAACoB,EAAUC,KACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,wBAAyB,GACzB,QAAS,QACT,IAAKnB,EACL,MAAO,qBAAA,EACN,CACDoB,aAAYJ,EAAK,OAAQ,SAAS,GACjC,GAAG,EAER,CAEA,CAAC"}
@@ -1,12 +1,42 @@
1
- import { XYContainer, XYContainerConfigInterface } from '@unovis/ts';
2
- import { Ref } from 'vue';
3
- declare const _default: <T>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
4
- props: XYContainerConfigInterface<T> & {
1
+ import { XYContainer, XYComponentCore, Tooltip, Crosshair, Axis } from '@unovis/ts';
2
+ declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ xScale?: import("@unovis/ts").ContinuousScale;
9
+ yScale?: import("@unovis/ts").ContinuousScale;
10
+ duration?: number;
5
11
  data?: T[];
6
- };
7
- expose(exposed: {
8
- component: Ref<XYContainer<T>>;
9
- }): void;
12
+ tooltip?: Tooltip;
13
+ components?: XYComponentCore<T, Partial<import("@unovis/ts").XYComponentConfigInterface<T>>>[];
14
+ margin?: import("@unovis/ts").Spacing;
15
+ padding?: import("@unovis/ts").Spacing;
16
+ sizing?: string;
17
+ width?: string | number;
18
+ height?: string | number;
19
+ svgDefs?: string;
20
+ ariaLabel?: string;
21
+ xDomain?: [number, number];
22
+ xDomainMinConstraint?: [number, number];
23
+ xDomainMaxConstraint?: [number, number];
24
+ xRange?: [number, number];
25
+ yDomain?: [number, number];
26
+ yDomainMinConstraint?: [number, number];
27
+ yDomainMaxConstraint?: [number, number];
28
+ yRange?: [number, number];
29
+ yDirection?: string;
30
+ xAxis?: Axis<T>;
31
+ yAxis?: Axis<T>;
32
+ autoMargin?: boolean;
33
+ crosshair?: Crosshair<T>;
34
+ preventEmptyDomain?: boolean;
35
+ scaleByDomain?: boolean;
36
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
37
+ expose(exposed: import("vue").ShallowUnwrapRef<{
38
+ component: import("vue").Ref<XYContainer<T>>;
39
+ }>): void;
10
40
  attrs: any;
11
41
  slots: {
12
42
  default?(_: {}): any;