@unovis/vue 1.6.4 → 1.6.5

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 (88) 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 +1 -1
  4. package/components/annotations/index.js +10 -9
  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 +19 -14
  10. package/components/area/index.js.map +1 -1
  11. package/components/axis/index.d.ts +1 -1
  12. package/components/axis/index.js +2 -2
  13. package/components/brush/index.d.ts +1 -1
  14. package/components/brush/index.js +2 -2
  15. package/components/chord-diagram/index.d.ts +1 -1
  16. package/components/chord-diagram/index.js +2 -2
  17. package/components/crosshair/index.cjs +1 -1
  18. package/components/crosshair/index.cjs.map +1 -1
  19. package/components/crosshair/index.d.ts +1 -1
  20. package/components/crosshair/index.js +5 -8
  21. package/components/crosshair/index.js.map +1 -1
  22. package/components/donut/index.d.ts +1 -1
  23. package/components/donut/index.js +2 -2
  24. package/components/free-brush/index.d.ts +1 -1
  25. package/components/free-brush/index.js +2 -2
  26. package/components/graph/index.js +2 -2
  27. package/components/grouped-bar/index.d.ts +1 -1
  28. package/components/grouped-bar/index.js +2 -2
  29. package/components/line/index.d.ts +1 -1
  30. package/components/line/index.js +2 -2
  31. package/components/nested-donut/index.d.ts +1 -1
  32. package/components/nested-donut/index.js +2 -2
  33. package/components/plotband/index.d.ts +1 -1
  34. package/components/plotband/index.js +2 -2
  35. package/components/plotline/index.d.ts +1 -1
  36. package/components/plotline/index.js +2 -2
  37. package/components/sankey/index.cjs +1 -1
  38. package/components/sankey/index.cjs.map +1 -1
  39. package/components/sankey/index.d.ts +1 -1
  40. package/components/sankey/index.js +25 -13
  41. package/components/sankey/index.js.map +1 -1
  42. package/components/scatter/index.d.ts +1 -1
  43. package/components/scatter/index.js +2 -2
  44. package/components/stacked-bar/index.d.ts +1 -1
  45. package/components/stacked-bar/index.js +2 -2
  46. package/components/timeline/index.cjs +1 -1
  47. package/components/timeline/index.cjs.map +1 -1
  48. package/components/timeline/index.d.ts +1 -1
  49. package/components/timeline/index.js +11 -14
  50. package/components/timeline/index.js.map +1 -1
  51. package/components/tooltip/index.d.ts +1 -1
  52. package/components/tooltip/index.js +2 -2
  53. package/components/topojson-map/index.cjs +1 -1
  54. package/components/topojson-map/index.cjs.map +1 -1
  55. package/components/topojson-map/index.d.ts +1 -1
  56. package/components/topojson-map/index.js +49 -18
  57. package/components/topojson-map/index.js.map +1 -1
  58. package/components/treemap/index.cjs +1 -1
  59. package/components/treemap/index.cjs.map +1 -1
  60. package/components/treemap/index.d.ts +1 -1
  61. package/components/treemap/index.js +18 -15
  62. package/components/treemap/index.js.map +1 -1
  63. package/components/xy-labels/index.d.ts +1 -1
  64. package/components/xy-labels/index.js +2 -2
  65. package/containers/single-container/index.cjs +1 -1
  66. package/containers/single-container/index.cjs.map +1 -1
  67. package/containers/single-container/index.js +9 -8
  68. package/containers/single-container/index.js.map +1 -1
  69. package/containers/xy-container/index.cjs +1 -1
  70. package/containers/xy-container/index.cjs.map +1 -1
  71. package/containers/xy-container/index.js +9 -8
  72. package/containers/xy-container/index.js.map +1 -1
  73. package/html-components/bullet-legend/index.d.ts +1 -1
  74. package/html-components/bullet-legend/index.js +2 -2
  75. package/html-components/flow-legend/index.cjs +1 -1
  76. package/html-components/flow-legend/index.cjs.map +1 -1
  77. package/html-components/flow-legend/index.d.ts +1 -1
  78. package/html-components/flow-legend/index.js +17 -13
  79. package/html-components/flow-legend/index.js.map +1 -1
  80. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  81. package/html-components/leaflet-flow-map/index.js +2 -2
  82. package/html-components/leaflet-map/index.d.ts +1 -1
  83. package/html-components/leaflet-map/index.js +2 -2
  84. package/html-components/rolling-pin-legend/index.d.ts +1 -1
  85. package/html-components/rolling-pin-legend/index.js +2 -2
  86. package/index.cjs +2 -2
  87. package/index.js +86 -86
  88. package/package.json +5 -4
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as m, computed as f, ref as b, onMounted as v, nextTick as y, onUnmounted as F, watch as s, createElementBlock as g, openBlock as B } from "vue";
1
+ import { defineComponent as d, inject as m, computed as f, ref as y, onMounted as F, nextTick as b, onUnmounted as v, watch as s, openBlock as S, createElementBlock as B } from "vue";
2
2
  import { Treemap as c } from "@unovis/ts";
3
- import { useForwardProps as L, arePropsEqual as S } from "../../utils/props.js";
4
- import { componentAccessorKey as T } from "../../utils/context.js";
5
- const _ = { "data-vis-component": "" }, w = c.selectors, A = /* @__PURE__ */ d({
3
+ import { useForwardProps as T, arePropsEqual as g } from "../../utils/props.js";
4
+ import { componentAccessorKey as L } from "../../utils/context.js";
5
+ const _ = { "data-vis-component": "" }, k = c.selectors, A = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
@@ -11,8 +11,11 @@ const _ = { "data-vis-component": "" }, w = c.selectors, A = /* @__PURE__ */ d({
11
11
  numberFormat: { type: Function },
12
12
  tileLabel: { type: Function },
13
13
  tileColor: { type: [Function, String, Array, null] },
14
+ tileFunction: { type: Function },
15
+ tileSort: { type: [Function, null] },
14
16
  tilePadding: {},
15
17
  tilePaddingTop: {},
18
+ tileShowHtmlTooltip: { type: Boolean },
16
19
  labelInternalNodes: { type: Boolean },
17
20
  labelOffsetX: {},
18
21
  labelOffsetY: {},
@@ -34,28 +37,28 @@ const _ = { "data-vis-component": "" }, w = c.selectors, A = /* @__PURE__ */ d({
34
37
  data: {}
35
38
  },
36
39
  setup(u, { expose: p }) {
37
- const o = m(T), l = u, a = f(() => o.data.value ?? l.data), n = L(l), t = b();
38
- return v(() => {
39
- y(() => {
40
+ const o = m(L), l = u, n = f(() => o.data.value ?? l.data), a = T(l), t = y();
41
+ return F(() => {
42
+ b(() => {
40
43
  var e;
41
- t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
44
+ t.value = new c(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
42
45
  });
43
- }), F(() => {
46
+ }), v(() => {
44
47
  var e;
45
48
  (e = t.value) == null || e.destroy(), o.destroy();
46
- }), s(n, (e, i) => {
49
+ }), s(a, (e, i) => {
47
50
  var r;
48
- S(e, i) || (r = t.value) == null || r.setConfig(n.value);
49
- }), s(a, () => {
51
+ g(e, i) || (r = t.value) == null || r.setConfig(a.value);
52
+ }), s(n, () => {
50
53
  var e;
51
- (e = t.value) == null || e.setData(a.value);
54
+ (e = t.value) == null || e.setData(n.value);
52
55
  }), p({
53
56
  component: t
54
- }), (e, i) => (B(), g("div", _));
57
+ }), (e, i) => (S(), B("div", _));
55
58
  }
56
59
  });
57
60
  export {
58
- w as VisTreemapSelectors,
61
+ k as VisTreemapSelectors,
59
62
  A as default
60
63
  };
61
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACjDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACjDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,6 +1,6 @@
1
1
  import { XYLabels, XYLabelsConfigInterface } from '@unovis/ts';
2
2
 
3
- export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
3
+ export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/dist/components/xy-labels/style");
4
4
  declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (XYLabelsConfigInterface<Datum> & {
6
6
  data?: Datum[];
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as g, nextTick as b, onUnmounted as S, watch as a, createElementBlock as v, openBlock as f } from "vue";
1
+ import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as g, nextTick as b, onUnmounted as S, watch as a, openBlock as v, createElementBlock as f } from "vue";
2
2
  import { XYLabels as i } from "@unovis/ts";
3
3
  import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
4
4
  import { componentAccessorKey as C } from "../../utils/context.js";
@@ -48,7 +48,7 @@ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
48
48
  (t = n.value) == null || t.setData(o.value);
49
49
  }), p({
50
50
  component: n
51
- }), (t, u) => (f(), v("div", B));
51
+ }), (t, u) => (v(), f("div", B));
52
52
  }
53
53
  });
54
54
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),a=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:p}){const r=d,{data:i}=e.toRefs(r),l=v.useForwardProps(r);let o;const t=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),s=e.ref(),c=()=>{o||s.value&&t.component&&(o=new u.SingleContainer(s.value,{...e.toRaw(t)},i.value))};return e.watchEffect(()=>{var n;c(),(n=t.component)==null||n.config,o==null||o.updateContainer({...e.toRaw(l.value),...e.toRaw(t)})}),e.watch(i,()=>{o?o.setData(i.value,!0):c()}),e.onUnmounted(()=>o==null?void 0:o.destroy()),e.provide(a.componentAccessorKey,{data:i,update:n=>t.component=n,destroy:()=>t.component=void 0}),e.provide(a.tooltipAccessorKey,{data:i,update:n=>t.tooltip=n,destroy:()=>{t.tooltip=void 0}}),e.provide(a.annotationsAccessorKey,{data:i,update:n=>t.annotations=n,destroy:()=>{t.annotations=void 0}}),p({component:o}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:s,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),a=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:p}){const r=d,{data:i}=e.toRefs(r),l=v.useForwardProps(r);let o;const t=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),s=e.ref(),c=()=>{o||s.value&&t.component&&(o=new u.SingleContainer(s.value,{...e.toRaw(t)},i.value))};return e.watchEffect(()=>{var n;c(),(n=t.component)==null||n.config,o==null||o.updateContainer({...e.toRaw(l.value),...e.toRaw(t)})}),e.watch(i,()=>{o?o.setData(i.value,!0):c()}),e.onUnmounted(()=>o==null?void 0:o.destroy()),e.provide(a.componentAccessorKey,{data:i,update:n=>t.component=n,destroy:()=>t.component=void 0}),e.provide(a.tooltipAccessorKey,{data:i,update:n=>t.tooltip=n,destroy:()=>{t.tooltip=void 0}}),e.provide(a.annotationsAccessorKey,{data:i,update:n=>t.annotations=n,destroy:()=>{t.annotations=void 0}}),p({component:o}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:s,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: 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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a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,CACZ,wBAICoB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIjB,EAAQ,MAAM,yBAAA,GAC/CkB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: 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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"ycAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEzC,IAAIM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAA,EAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YACxBD,EAAQ,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OAChBH,EAAA,GAEUI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OAC5BT,GAAA,MAAAA,EAAO,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GACvE,CAAC,EAEDS,EAAAA,MAAMd,EAAM,IAAM,CACZI,EACFA,EAAM,QAAQJ,EAAK,MAAO,EAAI,EAE9BS,EAAA,CAEJ,CAAC,EAEDM,cAAY,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,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAU,CAAA,CACjD,EAGDkB,EAAa,CACX,UAAWnB,CAAA,CACZ,wBAICoB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIjB,EAAQ,MAAM,yBAAA,GAC/CkB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
@@ -1,13 +1,14 @@
1
- import { defineComponent as f, toRefs as m, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as w, provide as a, createElementBlock as _, openBlock as h, renderSlot as C, toRaw as s } from "vue";
2
- import { SingleContainer as R } from "@unovis/ts";
1
+ import { defineComponent as m, toRefs as f, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as w, provide as a, openBlock as _, createElementBlock as C, renderSlot as R, toRaw as s } from "vue";
2
+ import { SingleContainer as h } from "@unovis/ts";
3
3
  import { componentAccessorKey as k, tooltipAccessorKey as x, annotationsAccessorKey as A } from "../../utils/context.js";
4
4
  import { useForwardProps as K } from "../../utils/props.js";
5
- const b = /* @__PURE__ */ f({
5
+ const S = /* @__PURE__ */ m({
6
6
  __name: "index",
7
7
  props: {
8
8
  component: {},
9
9
  tooltip: {},
10
10
  annotations: {},
11
+ onRenderComplete: { type: Function },
11
12
  duration: {},
12
13
  margin: {},
13
14
  padding: {},
@@ -19,14 +20,14 @@ const b = /* @__PURE__ */ f({
19
20
  data: {}
20
21
  },
21
22
  setup(c, { expose: d }) {
22
- const r = c, { data: n } = m(r), l = K(r);
23
+ const r = c, { data: n } = f(r), l = K(r);
23
24
  let o;
24
25
  const e = u({
25
26
  component: void 0,
26
27
  tooltip: void 0,
27
28
  annotations: void 0
28
29
  }), i = v(), p = () => {
29
- o || i.value && e.component && (o = new R(i.value, { ...s(e) }, n.value));
30
+ o || i.value && e.component && (o = new h(i.value, { ...s(e) }, n.value));
30
31
  };
31
32
  return g(() => {
32
33
  var t;
@@ -51,17 +52,17 @@ const b = /* @__PURE__ */ f({
51
52
  }
52
53
  }), d({
53
54
  component: o
54
- }), (t, B) => (h(), _("div", {
55
+ }), (t, B) => (_(), C("div", {
55
56
  "data-vis-single-container": "",
56
57
  ref_key: "elRef",
57
58
  ref: i,
58
59
  class: "unovis-single-container"
59
60
  }, [
60
- C(t.$slots, "default")
61
+ R(t.$slots, "default")
61
62
  ], 512));
62
63
  }
63
64
  });
64
65
  export {
65
- b as default
66
+ S as default
66
67
  };
67
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: 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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK;AAEzC,QAAIM;AACJ,UAAMC,IAASC,EAAS;AAAA,MACtB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,aAAa;AAAA,IAAA,CACd,GACKC,IAAQC,EAAA,GAERC,IAAY,MAAM;AACtB,MAAIL,KACAG,EAAM,SAASF,EAAO,cACxBD,IAAQ,IAAIM,EAAgBH,EAAM,OAAO,EAAE,GAAGI,EAAMN,CAAM,EAAA,GAAKL,EAAK,KAAK;AAAA,IAC7E;AAEA,WAAAY,EAAY,MAAM;;AAChB,MAAAH,EAAA,IAEUI,IAAAR,EAAO,cAAP,QAAAQ,EAAkB,QAC5BT,KAAA,QAAAA,EAAO,gBAAgB,EAAE,GAAGO,EAAMT,EAAY,KAAK,GAAG,GAAGS,EAAMN,CAAM;IACvE,CAAC,GAEDS,EAAMd,GAAM,MAAM;AAChB,MAAII,IACFA,EAAM,QAAQJ,EAAK,OAAO,EAAI,IAE9BS,EAAA;AAAA,IAEJ,CAAC,GAEDM,EAAY,MAAMX,KAAA,gBAAAA,EAAO,SAAS,GAElCY,EAAQC,GAAsB;AAAA,MAC5B,MAAAjB;AAAA,MACA,QAAQ,CAACkB,MAAwBb,EAAO,YAAYa;AAAA,MACpD,SAAS,MAAMb,EAAO,YAAY;AAAA,IAAA,CACnC,GAEDW,EAAQG,GAAoB;AAAA,MAC1B,MAAAnB;AAAA,MACA,QAAQ,CAAC,MAAeK,EAAO,UAAU;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAA,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDW,EAAQI,GAAwB;AAAA,MAC9B,MAAApB;AAAA,MACA,QAAQ,CAACqB,MAAmBhB,EAAO,cAAcgB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAhB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAGDiB,EAAa;AAAA,MACX,WAAWlB;AAAA,IAAA,CACZ,mBAICmB,EAEM,OAAA;AAAA,MAFD,6BAAA;AAAA,eAA8B;AAAA,MAAJ,KAAIhB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC/CiB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: 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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK;AAEzC,QAAIM;AACJ,UAAMC,IAASC,EAAS;AAAA,MACtB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,aAAa;AAAA,IAAA,CACd,GACKC,IAAQC,EAAA,GAERC,IAAY,MAAM;AACtB,MAAIL,KACAG,EAAM,SAASF,EAAO,cACxBD,IAAQ,IAA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l=require("@unovis/ts"),i=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),y=e.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},annotations:{},clipPathExtend:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(p,{expose:d}){const c=p,{data:n}=e.toRefs(c),u=v.useForwardProps(c),a=e.ref(),t=e.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),r=e.ref();return e.watch(n,()=>{a.value&&a.value.setData(n.value,!0)}),e.watchEffect(()=>{var o;t.components.map(s=>s.config),(o=a.value)==null||o.updateContainer({...e.toRaw(u.value),...e.toRaw(t)})}),e.onMounted(()=>{r.value&&(a.value=new l.XYContainer(r.value,{...e.toRaw(t)},n.value))}),e.onUnmounted(()=>{var o;return(o=a.value)==null?void 0:o.destroy()}),e.provide(i.componentAccessorKey,{data:n,update:o=>t.components=[...t.components,o],destroy:()=>{var o;return t.components=(o=t.components)==null?void 0:o.filter(s=>!s.isDestroyed())}}),e.provide(i.axisAccessorKey,{data:n,update:o=>t[`${o.config.type}Axis`]=o,destroy:o=>{t[`${o}Axis`]=void 0}}),e.provide(i.crosshairAccessorKey,{data:n,update:o=>t.crosshair=o,destroy:()=>{t.crosshair=void 0}}),e.provide(i.tooltipAccessorKey,{data:n,update:o=>t.tooltip=o,destroy:()=>{t.tooltip=void 0}}),e.provide(i.annotationsAccessorKey,{data:n,update:o=>t.annotations=o,destroy:()=>{t.annotations=void 0}}),d({component:a}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:r,class:"unovis-xy-container"},[e.renderSlot(o.$slots,"default")],512))}});exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),l=require("@unovis/ts"),i=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),y=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},annotations:{},clipPathExtend:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(p,{expose:d}){const c=p,{data:n}=o.toRefs(c),u=v.useForwardProps(c),a=o.ref(),t=o.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),r=o.ref();return o.watch(n,()=>{a.value&&a.value.setData(n.value,!0)}),o.watchEffect(()=>{var e;t.components.map(s=>s.config),(e=a.value)==null||e.updateContainer({...o.toRaw(u.value),...o.toRaw(t)})}),o.onMounted(()=>{r.value&&(a.value=new l.XYContainer(r.value,{...o.toRaw(t)},n.value))}),o.onUnmounted(()=>{var e;return(e=a.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(s=>!s.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}}),o.provide(i.annotationsAccessorKey,{data:n,update:e=>t.annotations=e,destroy:()=>{t.annotations=void 0}}),d({component:a}),(e,s)=>(o.openBlock(),o.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:r,class:"unovis-xy-container"},[o.renderSlot(e.$slots,"default")],512))}});exports.default=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__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","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"kxBAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEnCM,EAAQC,EAAAA,IAAA,EACRC,EAASC,EAAAA,SAAS,CACtB,WAAY,CAAA,EACZ,YAAa,OACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKC,EAAQH,EAAAA,IAAA,EAEdI,OAAAA,EAAAA,MAAMT,EAAM,IAAM,CACZI,EAAM,OACRA,EAAM,MAAM,QAAQJ,EAAK,MAAO,EAAI,CAExC,CAAC,EAEDU,EAAAA,YAAY,IAAM,OAENJ,EAAO,WAAW,IAAIK,GAAKA,EAAE,MAAM,GAC7CC,EAAAR,EAAM,QAAN,MAAAQ,EAAa,gBAAgB,CAAE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wBAICuB,EAAAA,mBAEM,MAAA,CAFD,wBAAA,WAA0B,QAAJ,IAAInB,EAAQ,MAAM,qBAAA,GAC3CoB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__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","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"mzBAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEnCM,EAAQC,EAAAA,IAAA,EACRC,EAASC,EAAAA,SAAS,CACtB,WAAY,CAAA,EACZ,YAAa,OACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKC,EAAQH,EAAAA,IAAA,EAEdI,OAAAA,EAAAA,MAAMT,EAAM,IAAM,CACZI,EAAM,OACRA,EAAM,MAAM,QAAQJ,EAAK,MAAO,EAAI,CAExC,CAAC,EAEDU,EAAAA,YAAY,IAAM,OAENJ,EAAO,WAAW,IAAIK,GAAKA,EAAE,MAAM,GAC7CC,EAAAR,EAAM,QAAN,MAAAQ,EAAa,gBAAgB,CAAE,GAAGC,EAAAA,MAAMX,EAAY,KAAK,EAAG,GAAGW,QAAMP,CAAM,CAAA,EAC7E,CAAC,EAEDQ,EAAAA,UAAU,IAAM,CACVN,EAAM,QAAOJ,EAAM,MAAQ,IAAIW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
- import { defineComponent as u, toRefs as y, ref as p, reactive as v, watch as f, watchEffect as x, toRaw as r, onMounted as h, onUnmounted as D, provide as a, createElementBlock as g, openBlock as A, renderSlot as C } from "vue";
2
- import { XYContainer as w } from "@unovis/ts";
3
- import { componentAccessorKey as B, axisAccessorKey as M, crosshairAccessorKey as R, tooltipAccessorKey as _, annotationsAccessorKey as K } from "../../utils/context.js";
1
+ import { defineComponent as u, toRefs as y, ref as p, reactive as v, watch as f, watchEffect as x, toRaw as r, onMounted as h, onUnmounted as D, provide as a, openBlock as g, createElementBlock as A, renderSlot as C } from "vue";
2
+ import { XYContainer as R } from "@unovis/ts";
3
+ import { componentAccessorKey as w, axisAccessorKey as B, crosshairAccessorKey as M, tooltipAccessorKey as _, annotationsAccessorKey as K } from "../../utils/context.js";
4
4
  import { useForwardProps as E } from "../../utils/props.js";
5
5
  const S = /* @__PURE__ */ u({
6
6
  __name: "index",
@@ -26,6 +26,7 @@ const S = /* @__PURE__ */ u({
26
26
  scaleByDomain: { type: Boolean },
27
27
  annotations: {},
28
28
  clipPathExtend: {},
29
+ onRenderComplete: { type: Function },
29
30
  duration: {},
30
31
  margin: {},
31
32
  padding: {},
@@ -51,24 +52,24 @@ const S = /* @__PURE__ */ u({
51
52
  var o;
52
53
  e.components.map((i) => i.config), (o = n.value) == null || o.updateContainer({ ...r(m.value), ...r(e) });
53
54
  }), h(() => {
54
- s.value && (n.value = new w(s.value, { ...r(e) }, t.value));
55
+ s.value && (n.value = new R(s.value, { ...r(e) }, t.value));
55
56
  }), D(() => {
56
57
  var o;
57
58
  return (o = n.value) == null ? void 0 : o.destroy();
58
- }), a(B, {
59
+ }), a(w, {
59
60
  data: t,
60
61
  update: (o) => e.components = [...e.components, o],
61
62
  destroy: () => {
62
63
  var o;
63
64
  return e.components = (o = e.components) == null ? void 0 : o.filter((i) => !i.isDestroyed());
64
65
  }
65
- }), a(M, {
66
+ }), a(B, {
66
67
  data: t,
67
68
  update: (o) => e[`${o.config.type}Axis`] = o,
68
69
  destroy: (o) => {
69
70
  e[`${o}Axis`] = void 0;
70
71
  }
71
- }), a(R, {
72
+ }), a(M, {
72
73
  data: t,
73
74
  update: (o) => e.crosshair = o,
74
75
  destroy: () => {
@@ -88,7 +89,7 @@ const S = /* @__PURE__ */ u({
88
89
  }
89
90
  }), l({
90
91
  component: n
91
- }), (o, i) => (A(), g("div", {
92
+ }), (o, i) => (g(), A("div", {
92
93
  "data-vis-xy-container": "",
93
94
  ref_key: "elRef",
94
95
  ref: s,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK,GAEnCM,IAAQC,EAAA,GACRC,IAASC,EAAS;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,aAAa;AAAA,MACb,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,IAAA,CACR,GACKC,IAAQH,EAAA;AAEd,WAAAI,EAAMT,GAAM,MAAM;AAChB,MAAII,EAAM,SACRA,EAAM,MAAM,QAAQJ,EAAK,OAAO,EAAI;AAAA,IAExC,CAAC,GAEDU,EAAY,MAAM;;AAEN,M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AA,MAAU;AAAA,IAAA,CAC7C,GAEDU,EAAQO,GAAwB;AAAA,MAC9B,MAAAvB;AAAA,MACA,QAAQ,CAACwB,MAAmBlB,EAAO,cAAckB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAlB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAEDmB,EAAa;AAAA,MACX,WAAWrB;AAAA,IAAA,CACZ,mBAICsB,EAEM,OAAA;AAAA,MAFD,yBAAA;AAAA,eAA0B;AAAA,MAAJ,KAAIlB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC3CmB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\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\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK,GAEnCM,IAAQC,EAAA,GACRC,IAASC,EAAS;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,aAAa;AAAA,MACb,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,IAAA,CACR,GACKC,IAAQH,EAAA;AAEd,WAAAI,EAAMT,GAAM,MAAM;AAChB,MAAII,EAAM,SACRA,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,CAACsB,MAAehB,EAAO,UAAUgB;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAhB,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDU,EAAQO,GAAwB;AAAA,MAC9B,MAAAvB;AAAA,MACA,QAAQ,CAACwB,MAAmBlB,EAAO,cAAckB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAlB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAEDmB,EAAa;AAAA,MACX,WAAWrB;AAAA,IAAA,CACZ,mBAICsB,EAEM,OAAA;AAAA,MAFD,yBAAA;AAAA,eAA0B;AAAA,MAAJ,KAAIlB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC3CmB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
@@ -1,6 +1,6 @@
1
1
  import { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts';
2
2
 
3
- export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/components/bullet-legend/style");
3
+ export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/dist/components/bullet-legend/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BulletLegendConfigInterface & {
5
5
  data?: null;
6
6
  }>>, {
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, computed as p, ref as u, onMounted as m, nextTick as f, onUnmounted as v, watch as b, createElementBlock as g, openBlock as _ } from "vue";
1
+ import { defineComponent as c, computed as p, ref as u, onMounted as m, nextTick as f, onUnmounted as v, watch as b, openBlock as g, createElementBlock as _ } from "vue";
2
2
  import { BulletLegend as i } from "@unovis/ts";
3
3
  import { useForwardProps as x, arePropsEqual as k } from "../../utils/props.js";
4
4
  const h = i.selectors, C = /* @__PURE__ */ c({
@@ -32,7 +32,7 @@ const h = i.selectors, C = /* @__PURE__ */ c({
32
32
  k(e, a) || (r = o.value) == null || r.setConfig(t.value);
33
33
  }), s({
34
34
  component: o
35
- }), (e, a) => (_(), g("div", {
35
+ }), (e, a) => (g(), _("div", {
36
36
  "data-vis-bullet-legend": "",
37
37
  ref_key: "elRef",
38
38
  ref: n
@@ -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"),a=require("../../utils/props.cjs"),p=c.FlowLegend.selectors,f=e.defineComponent({__name:"index",props:{customWidth:{},items:{},lineColor:{},labelColor:{},labelFontSize:{},arrowSymbol:{},arrowColor:{},onLegendItemClick:{type:Function},data:{}},setup(d,{expose:i}){const l=d;e.computed(()=>l.data);const n=a.useForwardProps(l),t=e.ref(),r=e.ref();return e.onMounted(()=>{e.nextTick(()=>{r.value&&(t.value=new c.FlowLegend(r.value,{...n.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy()}),e.watch(n,(o,s)=>{var u;a.arePropsEqual(o,s)||(u=t.value)==null||u.setConfig(n.value)}),i({component:t}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-flow-legend":"",ref_key:"elRef",ref:r},null,512))}});exports.VisFlowLegendSelectors=p;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=d.FlowLegend.selectors,f=e.defineComponent({__name:"index",props:{margin:{},customWidth:{},items:{},spacing:{},lineColor:{},labelColor:{},labelFontSize:{},arrowSymbol:{},arrowColor:{},arrowSymbolYOffset:{},onLegendItemClick:{type:Function},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(u,{expose:i}){const l=u;e.computed(()=>l.data);const t=c.useForwardProps(l),n=e.ref(),r=e.ref();return e.onMounted(()=>{e.nextTick(()=>{r.value&&(n.value=new d.FlowLegend(r.value,{...t.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{var o;(o=n.value)==null||o.destroy()}),e.watch(t,(o,s)=>{var a;c.arePropsEqual(o,s)||(a=n.value)==null||a.setConfig(t.value)}),i({component:n}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-flow-legend":"",ref_key:"elRef",ref:r},null,512))}});exports.VisFlowLegendSelectors=p;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \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 VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA8CaA,EAAyBC,EAAAA,WAAW,qNArCjD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,WAAWQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGpG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAEnB,CAAC,EAEDC,EAAAA,MAAMT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UAAUR,EAAO,MAEtC,CAAC,EAGDa,EAAa,CACX,UAAAX,CAAA,CACD,wBAQCY,EAAAA,mBAAuC,MAAA,CAAlC,uBAAA,WAAyB,QAAJ,IAAIV,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \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 VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA8CaA,EAAyBC,EAAAA,WAAW,ySArCjD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,WAAWQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGpG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAEnB,CAAC,EAEDC,EAAAA,MAAMT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UAAUR,EAAO,MAEtC,CAAC,EAGDa,EAAa,CACX,UAAAX,CAAA,CACD,wBAQCY,EAAAA,mBAAuC,MAAA,CAAlC,uBAAA,WAAyB,QAAJ,IAAIV,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts';
2
2
 
3
- export declare const VisFlowLegendSelectors: any;
3
+ export declare const VisFlowLegendSelectors: typeof import("@unovis/ts/dist/components/flow-legend/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FlowLegendConfigInterface & {
5
5
  data?: null;
6
6
  }>>, {
@@ -1,44 +1,48 @@
1
- import { defineComponent as u, computed as m, ref as s, onMounted as p, nextTick as f, onUnmounted as v, watch as w, createElementBlock as _, openBlock as g } from "vue";
2
- import { FlowLegend as c } from "@unovis/ts";
3
- import { useForwardProps as C, arePropsEqual as k } from "../../utils/props.js";
4
- const b = c.selectors, h = /* @__PURE__ */ u({
1
+ import { defineComponent as m, computed as u, ref as s, onMounted as p, nextTick as f, onUnmounted as v, watch as w, openBlock as g, createElementBlock as _ } from "vue";
2
+ import { FlowLegend as d } from "@unovis/ts";
3
+ import { useForwardProps as y, arePropsEqual as C } from "../../utils/props.js";
4
+ const b = d.selectors, P = /* @__PURE__ */ m({
5
5
  __name: "index",
6
6
  props: {
7
+ margin: {},
7
8
  customWidth: {},
8
9
  items: {},
10
+ spacing: {},
9
11
  lineColor: {},
10
12
  labelColor: {},
11
13
  labelFontSize: {},
12
14
  arrowSymbol: {},
13
15
  arrowColor: {},
16
+ arrowSymbolYOffset: {},
14
17
  onLegendItemClick: { type: Function },
18
+ renderIntoProvidedDomNode: { type: Boolean },
15
19
  data: {}
16
20
  },
17
- setup(d, { expose: i }) {
18
- const r = d;
19
- m(() => r.data);
20
- const t = C(r), o = s(), n = s();
21
+ setup(c, { expose: i }) {
22
+ const r = c;
23
+ u(() => r.data);
24
+ const n = y(r), o = s(), t = s();
21
25
  return p(() => {
22
26
  f(() => {
23
- n.value && (o.value = new c(n.value, { ...t.value, renderIntoProvidedDomNode: !0 }));
27
+ t.value && (o.value = new d(t.value, { ...n.value, renderIntoProvidedDomNode: !0 }));
24
28
  });
25
29
  }), v(() => {
26
30
  var e;
27
31
  (e = o.value) == null || e.destroy();
28
- }), w(t, (e, l) => {
32
+ }), w(n, (e, l) => {
29
33
  var a;
30
- k(e, l) || (a = o.value) == null || a.setConfig(t.value);
34
+ C(e, l) || (a = o.value) == null || a.setConfig(n.value);
31
35
  }), i({
32
36
  component: o
33
37
  }), (e, l) => (g(), _("div", {
34
38
  "data-vis-flow-legend": "",
35
39
  ref_key: "elRef",
36
- ref: n
40
+ ref: t
37
41
  }, null, 512));
38
42
  }
39
43
  });
40
44
  export {
41
45
  b as VisFlowLegendSelectors,
42
- h as default
46
+ P as default
43
47
  };
44
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \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 VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA8CO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;AArCjD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAWQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MAGpG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,mBAQCY,EAAuC,OAAA;AAAA,MAAlC,wBAAA;AAAA,eAAyB;AAAA,MAAJ,KAAIV;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \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 VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA8CO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;AArCjD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAWQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MAGpG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,mBAQCY,EAAuC,OAAA;AAAA,MAAlC,wBAAA;AAAA,eAAyB;AAAA,MAAJ,KAAIV;AAAA,IAAA;;;"}
@@ -1,6 +1,6 @@
1
1
  import { LeafletFlowMap, LeafletFlowMapConfigInterface, GenericDataRecord } from '@unovis/ts';
2
2
 
3
- export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/components/leaflet-map/style");
3
+ export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/dist/components/leaflet-map/style");
4
4
  declare const _default: <PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {
6
6
  data?: {
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, computed as F, ref as a, onMounted as m, nextTick as f, onUnmounted as g, watch as c, createElementBlock as S, openBlock as b } from "vue";
1
+ import { defineComponent as d, computed as F, ref as a, onMounted as m, nextTick as f, onUnmounted as g, watch as c, openBlock as S, createElementBlock as b } from "vue";
2
2
  import { LeafletFlowMap as p } from "@unovis/ts";
3
3
  import { useForwardProps as v, arePropsEqual as L } from "../../utils/props.js";
4
4
  const P = p.selectors, C = /* @__PURE__ */ d({
@@ -85,7 +85,7 @@ const P = p.selectors, C = /* @__PURE__ */ d({
85
85
  (t = n.value) == null || t.setData(e.value);
86
86
  }), y({
87
87
  component: n
88
- }), (t, l) => (b(), S("div", {
88
+ }), (t, l) => (S(), b("div", {
89
89
  "data-vis-leaflet-flow-map": "",
90
90
  ref_key: "elRef",
91
91
  ref: u
@@ -1,6 +1,6 @@
1
1
  import { LeafletMap, LeafletMapConfigInterface, GenericDataRecord } from '@unovis/ts';
2
2
 
3
- export declare const VisLeafletMapSelectors: typeof import("@unovis/ts/components/leaflet-map/style");
3
+ export declare const VisLeafletMapSelectors: typeof import("@unovis/ts/dist/components/leaflet-map/style");
4
4
  declare const _default: <Datum extends GenericDataRecord>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (LeafletMapConfigInterface<Datum> & {
6
6
  data?: Datum[];
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, computed as m, ref as r, onMounted as f, nextTick as F, onUnmounted as g, watch as p, createElementBlock as v, openBlock as S } from "vue";
1
+ import { defineComponent as y, computed as m, ref as r, onMounted as f, nextTick as F, onUnmounted as g, watch as p, openBlock as v, createElementBlock as S } from "vue";
2
2
  import { LeafletMap as c } from "@unovis/ts";
3
3
  import { useForwardProps as M, arePropsEqual as b } from "../../utils/props.js";
4
4
  const k = c.selectors, C = /* @__PURE__ */ y({
@@ -72,7 +72,7 @@ const k = c.selectors, C = /* @__PURE__ */ y({
72
72
  (t = n.value) == null || t.setData(e.value);
73
73
  }), d({
74
74
  component: n
75
- }), (t, u) => (S(), v("div", {
75
+ }), (t, u) => (v(), S("div", {
76
76
  "data-vis-leaflet-map": "",
77
77
  ref_key: "elRef",
78
78
  ref: i
@@ -1,6 +1,6 @@
1
1
  import { RollingPinLegend, RollingPinLegendConfigInterface } from '@unovis/ts';
2
2
 
3
- export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/components/rolling-pin-legend/style");
3
+ export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/dist/components/rolling-pin-legend/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<RollingPinLegendConfigInterface & {
5
5
  data?: null;
6
6
  }>>, {
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, computed as u, ref as s, onMounted as f, nextTick as m, onUnmounted as v, watch as g, createElementBlock as x, openBlock as _ } from "vue";
1
+ import { defineComponent as p, computed as u, ref as s, onMounted as f, nextTick as m, onUnmounted as v, watch as g, openBlock as x, createElementBlock as _ } from "vue";
2
2
  import { RollingPinLegend as i } from "@unovis/ts";
3
3
  import { useForwardProps as P, arePropsEqual as b } from "../../utils/props.js";
4
4
  const h = i.selectors, w = /* @__PURE__ */ p({
@@ -28,7 +28,7 @@ const h = i.selectors, w = /* @__PURE__ */ p({
28
28
  b(e, r) || (a = o.value) == null || a.setConfig(n.value);
29
29
  }), d({
30
30
  component: o
31
- }), (e, r) => (_(), x("div", {
31
+ }), (e, r) => (x(), _("div", {
32
32
  "data-vis-rolling-pin-legend": "",
33
33
  ref_key: "elRef",
34
34
  ref: t
package/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-flow-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./containers/xy-container/index.cjs");;const M=require("./containers/single-container/index.cjs");;const e=require("./components/area/index.cjs"),t=require("./components/axis/index.cjs"),s=require("./components/brush/index.cjs"),r=require("./components/crosshair/index.cjs"),i=require("./components/free-brush/index.cjs"),_=require("./components/grouped-bar/index.cjs"),u=require("./components/line/index.cjs"),l=require("./components/scatter/index.cjs"),n=require("./components/stacked-bar/index.cjs"),o=require("./components/timeline/index.cjs"),c=require("./components/xy-labels/index.cjs"),a=require("./components/plotband/index.cjs"),p=require("./components/plotline/index.cjs"),d=require("./components/chord-diagram/index.cjs"),V=require("./components/donut/index.cjs"),S=require("./components/graph/index.cjs"),v=require("./components/nested-donut/index.cjs"),g=require("./components/sankey/index.cjs"),f=require("./components/topojson-map/index.cjs"),q=require("./components/treemap/index.cjs"),y=require("./components/tooltip/index.cjs"),x=require("./components/annotations/index.cjs"),$=require("./html-components/leaflet-map/index.cjs");;const L=require("./html-components/leaflet-flow-map/index.cjs");;const h=require("./html-components/bullet-legend/index.cjs");;const B=require("./html-components/flow-legend/index.cjs");;const T=require("./html-components/rolling-pin-legend/index.cjs");;exports.VisXYContainer=m.default;exports.VisSingleContainer=M.default;exports.VisArea=e.default;exports.VisAreaSelectors=e.VisAreaSelectors;exports.VisAxis=t.default;exports.VisAxisSelectors=t.VisAxisSelectors;exports.VisBrush=s.default;exports.VisBrushSelectors=s.VisBrushSelectors;exports.VisCrosshair=r.default;exports.VisCrosshairSelectors=r.VisCrosshairSelectors;exports.VisFreeBrush=i.default;exports.VisFreeBrushSelectors=i.VisFreeBrushSelectors;exports.VisGroupedBar=_.default;exports.VisGroupedBarSelectors=_.VisGroupedBarSelectors;exports.VisLine=u.default;exports.VisLineSelectors=u.VisLineSelectors;exports.VisScatter=l.default;exports.VisScatterSelectors=l.VisScatterSelectors;exports.VisStackedBar=n.default;exports.VisStackedBarSelectors=n.VisStackedBarSelectors;exports.VisTimeline=o.default;exports.VisTimelineSelectors=o.VisTimelineSelectors;exports.VisXYLabels=c.default;exports.VisXYLabelsSelectors=c.VisXYLabelsSelectors;exports.VisPlotband=a.default;exports.VisPlotbandSelectors=a.VisPlotbandSelectors;exports.VisPlotline=p.default;exports.VisPlotlineSelectors=p.VisPlotlineSelectors;exports.VisChordDiagram=d.default;exports.VisChordDiagramSelectors=d.VisChordDiagramSelectors;exports.VisDonut=V.default;exports.VisDonutSelectors=V.VisDonutSelectors;exports.VisGraph=S.default;exports.VisGraphSelectors=S.VisGraphSelectors;exports.VisNestedDonut=v.default;exports.VisNestedDonutSelectors=v.VisNestedDonutSelectors;exports.VisSankey=g.default;exports.VisSankeySelectors=g.VisSankeySelectors;exports.VisTopoJSONMap=f.default;exports.VisTopoJSONMapSelectors=f.VisTopoJSONMapSelectors;exports.VisTreemap=q.default;exports.VisTreemapSelectors=q.VisTreemapSelectors;exports.VisTooltip=y.default;exports.VisTooltipSelectors=y.VisTooltipSelectors;exports.VisAnnotations=x.default;exports.VisAnnotationsSelectors=x.VisAnnotationsSelectors;exports.VisLeafletMap=$.default;exports.VisLeafletMapSelectors=$.VisLeafletMapSelectors;exports.VisLeafletFlowMap=L.default;exports.VisLeafletFlowMapSelectors=L.VisLeafletFlowMapSelectors;exports.VisBulletLegend=h.default;exports.VisBulletLegendSelectors=h.VisBulletLegendSelectors;exports.VisFlowLegend=B.default;exports.VisFlowLegendSelectors=B.VisFlowLegendSelectors;exports.VisRollingPinLegend=T.default;exports.VisRollingPinLegendSelectors=T.VisRollingPinLegendSelectors;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-vis-bullet-legend],[data-vis-flow-legend]{display:block}[data-vis-leaflet-flow-map],[data-vis-leaflet-map]{display:block;position:relative}[data-vis-rolling-pin-legend]{display:block}.unovis-single-container,.unovis-xy-container{display:block;position:relative;width:100%}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/annotations/index.cjs"),t=require("./components/area/index.cjs"),s=require("./components/axis/index.cjs"),r=require("./components/brush/index.cjs"),i=require("./html-components/bullet-legend/index.cjs");;const _=require("./components/chord-diagram/index.cjs"),u=require("./components/crosshair/index.cjs"),l=require("./components/donut/index.cjs"),n=require("./html-components/flow-legend/index.cjs");;const o=require("./components/free-brush/index.cjs"),c=require("./components/graph/index.cjs"),a=require("./components/grouped-bar/index.cjs"),p=require("./html-components/leaflet-flow-map/index.cjs");;const d=require("./html-components/leaflet-map/index.cjs");;const V=require("./components/line/index.cjs"),S=require("./components/nested-donut/index.cjs"),v=require("./components/plotband/index.cjs"),g=require("./components/plotline/index.cjs"),f=require("./html-components/rolling-pin-legend/index.cjs");;const q=require("./components/sankey/index.cjs"),y=require("./components/scatter/index.cjs"),m=require("./containers/single-container/index.cjs");;const x=require("./components/stacked-bar/index.cjs"),$=require("./components/timeline/index.cjs"),L=require("./components/tooltip/index.cjs"),h=require("./components/topojson-map/index.cjs"),B=require("./components/treemap/index.cjs"),M=require("./containers/xy-container/index.cjs");;const T=require("./components/xy-labels/index.cjs");exports.VisAnnotations=e.default;exports.VisAnnotationsSelectors=e.VisAnnotationsSelectors;exports.VisArea=t.default;exports.VisAreaSelectors=t.VisAreaSelectors;exports.VisAxis=s.default;exports.VisAxisSelectors=s.VisAxisSelectors;exports.VisBrush=r.default;exports.VisBrushSelectors=r.VisBrushSelectors;exports.VisBulletLegend=i.default;exports.VisBulletLegendSelectors=i.VisBulletLegendSelectors;exports.VisChordDiagram=_.default;exports.VisChordDiagramSelectors=_.VisChordDiagramSelectors;exports.VisCrosshair=u.default;exports.VisCrosshairSelectors=u.VisCrosshairSelectors;exports.VisDonut=l.default;exports.VisDonutSelectors=l.VisDonutSelectors;exports.VisFlowLegend=n.default;exports.VisFlowLegendSelectors=n.VisFlowLegendSelectors;exports.VisFreeBrush=o.default;exports.VisFreeBrushSelectors=o.VisFreeBrushSelectors;exports.VisGraph=c.default;exports.VisGraphSelectors=c.VisGraphSelectors;exports.VisGroupedBar=a.default;exports.VisGroupedBarSelectors=a.VisGroupedBarSelectors;exports.VisLeafletFlowMap=p.default;exports.VisLeafletFlowMapSelectors=p.VisLeafletFlowMapSelectors;exports.VisLeafletMap=d.default;exports.VisLeafletMapSelectors=d.VisLeafletMapSelectors;exports.VisLine=V.default;exports.VisLineSelectors=V.VisLineSelectors;exports.VisNestedDonut=S.default;exports.VisNestedDonutSelectors=S.VisNestedDonutSelectors;exports.VisPlotband=v.default;exports.VisPlotbandSelectors=v.VisPlotbandSelectors;exports.VisPlotline=g.default;exports.VisPlotlineSelectors=g.VisPlotlineSelectors;exports.VisRollingPinLegend=f.default;exports.VisRollingPinLegendSelectors=f.VisRollingPinLegendSelectors;exports.VisSankey=q.default;exports.VisSankeySelectors=q.VisSankeySelectors;exports.VisScatter=y.default;exports.VisScatterSelectors=y.VisScatterSelectors;exports.VisSingleContainer=m.default;exports.VisStackedBar=x.default;exports.VisStackedBarSelectors=x.VisStackedBarSelectors;exports.VisTimeline=$.default;exports.VisTimelineSelectors=$.VisTimelineSelectors;exports.VisTooltip=L.default;exports.VisTooltipSelectors=L.VisTooltipSelectors;exports.VisTopoJSONMap=h.default;exports.VisTopoJSONMapSelectors=h.VisTopoJSONMapSelectors;exports.VisTreemap=B.default;exports.VisTreemapSelectors=B.VisTreemapSelectors;exports.VisXYContainer=M.default;exports.VisXYLabels=T.default;exports.VisXYLabelsSelectors=T.VisXYLabelsSelectors;
3
3
  //# sourceMappingURL=index.cjs.map