@unovis/vue 1.7.0-pre.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +4 -0
  2. package/components/annotations/index.cjs +1 -1
  3. package/components/annotations/index.cjs.map +1 -1
  4. package/components/annotations/index.d.ts +1 -1
  5. package/components/annotations/index.js +18 -20
  6. package/components/annotations/index.js.map +1 -1
  7. package/components/area/index.cjs +1 -1
  8. package/components/area/index.cjs.map +1 -1
  9. package/components/area/index.d.ts +1 -1
  10. package/components/area/index.js +22 -23
  11. package/components/area/index.js.map +1 -1
  12. package/components/axis/index.cjs +1 -1
  13. package/components/axis/index.cjs.map +1 -1
  14. package/components/axis/index.d.ts +1 -1
  15. package/components/axis/index.js +26 -25
  16. package/components/axis/index.js.map +1 -1
  17. package/components/boxplot/index.cjs +2 -0
  18. package/components/boxplot/index.cjs.map +1 -0
  19. package/components/boxplot/index.d.ts +19 -0
  20. package/components/boxplot/index.js +31 -0
  21. package/components/boxplot/index.js.map +1 -0
  22. package/components/boxplot/index2.cjs +2 -0
  23. package/components/boxplot/index2.cjs.map +1 -0
  24. package/components/boxplot/index2.js +7 -0
  25. package/components/boxplot/index2.js.map +1 -0
  26. package/components/brush/index.cjs +1 -1
  27. package/components/brush/index.cjs.map +1 -1
  28. package/components/brush/index.d.ts +1 -1
  29. package/components/brush/index.js +22 -24
  30. package/components/brush/index.js.map +1 -1
  31. package/components/chord-diagram/index.cjs +1 -1
  32. package/components/chord-diagram/index.cjs.map +1 -1
  33. package/components/chord-diagram/index.d.ts +1 -1
  34. package/components/chord-diagram/index.js +22 -24
  35. package/components/chord-diagram/index.js.map +1 -1
  36. package/components/crosshair/index.cjs +1 -1
  37. package/components/crosshair/index.cjs.map +1 -1
  38. package/components/crosshair/index.d.ts +3 -3
  39. package/components/crosshair/index.js +20 -24
  40. package/components/crosshair/index.js.map +1 -1
  41. package/components/donut/index.cjs +1 -1
  42. package/components/donut/index.cjs.map +1 -1
  43. package/components/donut/index.d.ts +1 -1
  44. package/components/donut/index.js +22 -24
  45. package/components/donut/index.js.map +1 -1
  46. package/components/free-brush/index.cjs +1 -1
  47. package/components/free-brush/index.cjs.map +1 -1
  48. package/components/free-brush/index.d.ts +1 -1
  49. package/components/free-brush/index.js +21 -24
  50. package/components/free-brush/index.js.map +1 -1
  51. package/components/graph/index.cjs +1 -1
  52. package/components/graph/index.cjs.map +1 -1
  53. package/components/graph/index.d.ts +1 -1
  54. package/components/graph/index.js +26 -22
  55. package/components/graph/index.js.map +1 -1
  56. package/components/grouped-bar/index.cjs +1 -1
  57. package/components/grouped-bar/index.cjs.map +1 -1
  58. package/components/grouped-bar/index.d.ts +1 -1
  59. package/components/grouped-bar/index.js +24 -25
  60. package/components/grouped-bar/index.js.map +1 -1
  61. package/components/heatmap/index.cjs +2 -0
  62. package/components/heatmap/index.cjs.map +1 -0
  63. package/components/heatmap/index.d.ts +19 -0
  64. package/components/heatmap/index.js +49 -0
  65. package/components/heatmap/index.js.map +1 -0
  66. package/components/heatmap/index2.cjs +2 -0
  67. package/components/heatmap/index2.cjs.map +1 -0
  68. package/components/heatmap/index2.js +7 -0
  69. package/components/heatmap/index2.js.map +1 -0
  70. package/components/line/index.cjs +1 -1
  71. package/components/line/index.cjs.map +1 -1
  72. package/components/line/index.d.ts +1 -1
  73. package/components/line/index.js +22 -24
  74. package/components/line/index.js.map +1 -1
  75. package/components/nested-donut/index.cjs +1 -1
  76. package/components/nested-donut/index.cjs.map +1 -1
  77. package/components/nested-donut/index.d.ts +1 -1
  78. package/components/nested-donut/index.js +22 -25
  79. package/components/nested-donut/index.js.map +1 -1
  80. package/components/plotband/index.cjs +1 -1
  81. package/components/plotband/index.cjs.map +1 -1
  82. package/components/plotband/index.d.ts +1 -1
  83. package/components/plotband/index.js +16 -17
  84. package/components/plotband/index.js.map +1 -1
  85. package/components/plotline/index.cjs +1 -1
  86. package/components/plotline/index.cjs.map +1 -1
  87. package/components/plotline/index.d.ts +1 -1
  88. package/components/plotline/index.js +16 -17
  89. package/components/plotline/index.js.map +1 -1
  90. package/components/radial-bar/index.cjs +2 -0
  91. package/components/radial-bar/index.cjs.map +1 -0
  92. package/components/radial-bar/index.d.ts +19 -0
  93. package/components/radial-bar/index.js +54 -0
  94. package/components/radial-bar/index.js.map +1 -0
  95. package/components/radial-bar/index2.cjs +2 -0
  96. package/components/radial-bar/index2.cjs.map +1 -0
  97. package/components/radial-bar/index2.js +7 -0
  98. package/components/radial-bar/index2.js.map +1 -0
  99. package/components/sankey/index.cjs +1 -1
  100. package/components/sankey/index.cjs.map +1 -1
  101. package/components/sankey/index.d.ts +1 -1
  102. package/components/sankey/index.js +24 -23
  103. package/components/sankey/index.js.map +1 -1
  104. package/components/scatter/index.cjs +1 -1
  105. package/components/scatter/index.cjs.map +1 -1
  106. package/components/scatter/index.d.ts +1 -1
  107. package/components/scatter/index.js +22 -24
  108. package/components/scatter/index.js.map +1 -1
  109. package/components/stacked-bar/index.cjs +1 -1
  110. package/components/stacked-bar/index.cjs.map +1 -1
  111. package/components/stacked-bar/index.d.ts +1 -1
  112. package/components/stacked-bar/index.js +23 -23
  113. package/components/stacked-bar/index.js.map +1 -1
  114. package/components/timeline/index.cjs +1 -1
  115. package/components/timeline/index.cjs.map +1 -1
  116. package/components/timeline/index.d.ts +3 -3
  117. package/components/timeline/index.js +20 -24
  118. package/components/timeline/index.js.map +1 -1
  119. package/components/tooltip/index.cjs +1 -1
  120. package/components/tooltip/index.cjs.map +1 -1
  121. package/components/tooltip/index.d.ts +1 -1
  122. package/components/tooltip/index.js +15 -17
  123. package/components/tooltip/index.js.map +1 -1
  124. package/components/topojson-map/index.cjs +1 -1
  125. package/components/topojson-map/index.cjs.map +1 -1
  126. package/components/topojson-map/index.d.ts +1 -1
  127. package/components/topojson-map/index.js +52 -25
  128. package/components/topojson-map/index.js.map +1 -1
  129. package/components/treemap/index.cjs +1 -1
  130. package/components/treemap/index.cjs.map +1 -1
  131. package/components/treemap/index.d.ts +1 -1
  132. package/components/treemap/index.js +22 -24
  133. package/components/treemap/index.js.map +1 -1
  134. package/components/xy-labels/index.cjs +1 -1
  135. package/components/xy-labels/index.cjs.map +1 -1
  136. package/components/xy-labels/index.d.ts +1 -1
  137. package/components/xy-labels/index.js +21 -24
  138. package/components/xy-labels/index.js.map +1 -1
  139. package/components.d.ts +3 -0
  140. package/containers/single-container/index.cjs +1 -1
  141. package/containers/single-container/index.cjs.map +1 -1
  142. package/containers/single-container/index.js +26 -26
  143. package/containers/single-container/index.js.map +1 -1
  144. package/containers/xy-container/index.cjs +1 -1
  145. package/containers/xy-container/index.cjs.map +1 -1
  146. package/containers/xy-container/index.js +25 -30
  147. package/containers/xy-container/index.js.map +1 -1
  148. package/html-components/bullet-legend/index.cjs +1 -1
  149. package/html-components/bullet-legend/index.cjs.map +1 -1
  150. package/html-components/bullet-legend/index.d.ts +1 -1
  151. package/html-components/bullet-legend/index.js +23 -24
  152. package/html-components/bullet-legend/index.js.map +1 -1
  153. package/html-components/flow-legend/index.cjs +1 -1
  154. package/html-components/flow-legend/index.cjs.map +1 -1
  155. package/html-components/flow-legend/index.d.ts +1 -1
  156. package/html-components/flow-legend/index.js +21 -23
  157. package/html-components/flow-legend/index.js.map +1 -1
  158. package/html-components/leaflet-flow-map/index.cjs +1 -1
  159. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  160. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  161. package/html-components/leaflet-flow-map/index.js +22 -24
  162. package/html-components/leaflet-flow-map/index.js.map +1 -1
  163. package/html-components/leaflet-map/index.cjs +1 -1
  164. package/html-components/leaflet-map/index.cjs.map +1 -1
  165. package/html-components/leaflet-map/index.d.ts +1 -1
  166. package/html-components/leaflet-map/index.js +22 -24
  167. package/html-components/leaflet-map/index.js.map +1 -1
  168. package/html-components/rolling-pin-legend/index.cjs +1 -1
  169. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  170. package/html-components/rolling-pin-legend/index.d.ts +1 -1
  171. package/html-components/rolling-pin-legend/index.js +22 -24
  172. package/html-components/rolling-pin-legend/index.js.map +1 -1
  173. package/index.cjs +2 -2
  174. package/index.js +95 -86
  175. package/index.js.map +1 -1
  176. package/package.json +12 -12
  177. package/utils/context.cjs.map +1 -1
  178. package/utils/context.js +1 -1
  179. package/utils/context.js.map +1 -1
  180. package/utils/props.cjs +1 -1
  181. package/utils/props.cjs.map +1 -1
  182. package/utils/props.d.ts +1 -4
  183. package/utils/props.js +9 -9
  184. package/utils/props.js.map +1 -1
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ![cover](https://user-images.githubusercontent.com/755708/194946760-13db0396-c429-4abb-8324-a5efae0455e2.png)
2
2
 
3
+ <a href="https://npmx.dev/package/@unovis/vue"><img src="https://npmx.dev/api/registry/badge/version/@unovis/vue" alt="Version"></a>
4
+ <a href="https://npmx.dev/package/@unovis/vue"><img src="https://npmx.dev/api/registry/badge/downloads/@unovis/vue" alt="Downloads"></a>
5
+ <a href="https://github.com/f5/unovis/blob/main/LICENSE"><img src="https://img.shields.io/github/license/f5/unovis" alt="License"></a>
6
+
3
7
  🟨 **Unovis** is a modular data visualization framework for React, Angular, Svelte, Vue and vanilla TypeScript or JavaScript.
4
8
 
5
9
  `@unovis/vue` provides Vue components for `@unovis/ts`, which makes Unovis integration into a Vue
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),d=require("../../utils/context.cjs"),a=require("../../utils/props.cjs"),p={"data-vis-annotations":""},v=c.Annotations.selectors,_=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:u}){const l=i,n=e.inject(d.annotationsAccessorKey),o=a.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new c.Annotations(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(o,(s,r)=>{a.arePropsEqual(s,r)||(t.value?.setConfig(o.value),t.value?.render())}),u({component:t}),(s,r)=>(e.openBlock(),e.createElementBlock("div",p))}});exports.VisAnnotationsSelectors=v;exports.default=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,sKAxCnD,MAAMC,EAAWC,EAAAA,OAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,EAAAA,gBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CL,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAA,CACX,CAAC,EAEDa,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UAAUP,EAAO,MAEtC,CAAC,EAGDY,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA4B,MAA5BC,CAA4B"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AnnotationsConfigInterface } from '@unovis/ts'\nimport { Annotations } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { annotationsAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props\ntype Props = AnnotationsConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n"],"names":["VisAnnotationsSelectors","Annotations","props","__props","accessor","inject","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQA8CaA,EAA0BC,EAAAA,YAAY,sKAtCnD,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,wBAAsB,EAKxCC,EAASC,EAAAA,gBAAgBN,CAAK,EAG9BO,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CH,EAAS,OAAOK,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBL,EAAS,QAAA,CACX,CAAC,EAEDU,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA4B,MAA5BC,CAA4B"}
@@ -1,4 +1,4 @@
1
- import { Annotations, AnnotationsConfigInterface } from '@unovis/ts';
1
+ import { AnnotationsConfigInterface, Annotations } from '@unovis/ts';
2
2
 
3
3
  export declare const VisAnnotationsSelectors: typeof import("@unovis/ts/components/annotations/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AnnotationsConfigInterface & {
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, inject as u, ref as d, onMounted as m, nextTick as l, onUnmounted as f, watch as v, createElementBlock as _, openBlock as x } from "vue";
2
- import { Annotations as a } from "@unovis/ts";
3
- import { useForwardProps as B, arePropsEqual as y } from "../../utils/props.js";
4
- import { annotationsAccessorKey as g } from "../../utils/context.js";
5
- const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p({
1
+ import { defineComponent as u, inject as p, ref as d, onMounted as l, nextTick as m, onUnmounted as f, watch as v, openBlock as _, createElementBlock as x } from "vue";
2
+ import { Annotations as r } from "@unovis/ts";
3
+ import { annotationsAccessorKey as B } from "../../utils/context.js";
4
+ import { useForwardProps as y, arePropsEqual as g } from "../../utils/props.js";
5
+ const h = { "data-vis-annotations": "" }, E = r.selectors, P = /* @__PURE__ */ u({
6
6
  __name: "index",
7
7
  props: {
8
8
  items: {},
@@ -12,25 +12,23 @@ const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p
12
12
  attributes: {},
13
13
  data: {}
14
14
  },
15
- setup(c, { expose: i }) {
16
- const n = u(g), t = B(c), o = d();
17
- return m(() => {
18
- l(() => {
19
- o.value = new a(t.value), n.update(o.value);
15
+ setup(a, { expose: c }) {
16
+ const i = a, t = p(B), o = y(i), e = d();
17
+ return l(() => {
18
+ m(() => {
19
+ e.value = new r(o.value), t.update(e.value);
20
20
  });
21
21
  }), f(() => {
22
- var e;
23
- (e = o.value) == null || e.destroy(), n.destroy();
24
- }), v(t, (e, s) => {
25
- var r;
26
- y(e, s) || (r = o.value) == null || r.setConfig(t.value);
27
- }), i({
28
- component: o
29
- }), (e, s) => (x(), _("div", h));
22
+ e.value?.destroy(), t.destroy();
23
+ }), v(o, (n, s) => {
24
+ g(n, s) || (e.value?.setConfig(o.value), e.value?.render());
25
+ }), c({
26
+ component: e
27
+ }), (n, s) => (_(), x("div", h));
30
28
  }
31
29
  });
32
30
  export {
33
- P as VisAnnotationsSelectors,
34
- T as default
31
+ E as VisAnnotationsSelectors,
32
+ P as default
35
33
  };
36
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;;AAxCnD,UAAMC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAE9CH,EAAS,OAAOM,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAL,EAAU,UAAV,QAAAK,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AnnotationsConfigInterface } from '@unovis/ts'\nimport { Annotations } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { annotationsAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props\ntype Props = AnnotationsConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n"],"names":["VisAnnotationsSelectors","Annotations","props","__props","accessor","inject","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CA8CaA,IAA0BC,EAAY;;;;;;;;;;;AAtCnD,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAsB,GAKxCC,IAASC,EAAgBN,CAAK,GAG9BO,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIR,EAAYM,EAAO,KAAK,GAE9CH,EAAS,OAAOK,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBL,EAAS,QAAA;AAAA,IACX,CAAC,GAEDU,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDS,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),s=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),m={"data-vis-component":""},v=s.Area.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:y}){const o=t.inject(d.componentAccessorKey),u=p,a=t.computed(()=>o.data.value??u.data),r=i.useForwardProps(u),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new s.Area(r.value),(e=n.value)==null||e.setData(a.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(r,(e,c)=>{var l;i.arePropsEqual(e,c)||(l=n.value)==null||l.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),y({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisAreaSelectors=v;exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),y=require("../../utils/context.cjs"),l=require("../../utils/props.cjs"),d={"data-vis-component":""},v=i.Area.selectors,m=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},linePattern:{type:[Function,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const a=s,n=e.inject(y.componentAccessorKey),o=e.computed(()=>n.data.value??a.data),r=l.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Area(r.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(r,(u,c)=>{l.arePropsEqual(u,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(u,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisAreaSelectors=v;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,qqBA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GAC9CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AreaConfigInterface } from '@unovis/ts'\nimport { Area } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = AreaConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisAreaSelectors","Area","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAmBC,EAAAA,KAAK,ovBA3CrC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { Area, AreaConfigInterface } from '@unovis/ts';
1
+ import { AreaConfigInterface, Area } from '@unovis/ts';
2
2
 
3
3
  export declare const VisAreaSelectors: typeof import("@unovis/ts/components/area/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<{
@@ -1,11 +1,12 @@
1
- import { defineComponent as y, inject as m, computed as d, ref as v, onMounted as F, nextTick as f, onUnmounted as x, watch as u, createElementBlock as b, openBlock as g } from "vue";
2
- import { Area as i } from "@unovis/ts";
1
+ import { defineComponent as s, inject as y, computed as m, ref as d, onMounted as v, nextTick as F, onUnmounted as f, watch as u, openBlock as x, createElementBlock as b } from "vue";
2
+ import { Area as c } from "@unovis/ts";
3
+ import { componentAccessorKey as g } from "../../utils/context.js";
3
4
  import { useForwardProps as h, arePropsEqual as A } from "../../utils/props.js";
4
- import { componentAccessorKey as _ } from "../../utils/context.js";
5
- const B = { "data-vis-component": "" }, N = i.selectors, j = /* @__PURE__ */ y({
5
+ const _ = { "data-vis-component": "" }, D = c.selectors, N = /* @__PURE__ */ s({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: { type: [Function, String, Array, null] },
9
+ pattern: { type: [Function, null] },
9
10
  curveType: {},
10
11
  baseline: { type: [Function, Number, null] },
11
12
  opacity: { type: [Function, Number, null] },
@@ -14,12 +15,14 @@ const B = { "data-vis-component": "" }, N = i.selectors, j = /* @__PURE__ */ y({
14
15
  lineColor: { type: [Function, String, Array, null] },
15
16
  lineWidth: {},
16
17
  lineDashArray: { type: [Function, Array, null] },
18
+ linePattern: { type: [Function, null] },
17
19
  minHeight1Px: { type: Boolean },
18
20
  minHeight: {},
19
21
  stackMinHeight: { type: Boolean },
20
22
  x: { type: [Function, Number, null] },
21
23
  y: { type: [Function, Number, null, Array] },
22
24
  id: { type: Function },
25
+ colorKeys: {},
23
26
  xScale: { type: [Object, Function] },
24
27
  yScale: { type: [Object, Function] },
25
28
  excludeFromDomainCalculation: { type: Boolean },
@@ -28,29 +31,25 @@ const B = { "data-vis-component": "" }, N = i.selectors, j = /* @__PURE__ */ y({
28
31
  attributes: {},
29
32
  data: {}
30
33
  },
31
- setup(s, { expose: p }) {
32
- const n = m(_), r = s, o = d(() => n.data.value ?? r.data), a = h(r), t = v();
33
- return F(() => {
34
- f(() => {
35
- var e;
36
- t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
34
+ setup(i, { expose: p }) {
35
+ const a = i, t = y(g), n = m(() => t.data.value ?? a.data), o = h(a), e = d();
36
+ return v(() => {
37
+ F(() => {
38
+ e.value = new c(o.value), e.value?.setData(n.value), t.update(e.value);
37
39
  });
38
- }), x(() => {
39
- var e;
40
- (e = t.value) == null || e.destroy(), n.destroy();
41
- }), u(a, (e, c) => {
42
- var l;
43
- A(e, c) || (l = t.value) == null || l.setConfig(a.value);
44
- }), u(o, () => {
45
- var e;
46
- (e = t.value) == null || e.setData(o.value);
40
+ }), f(() => {
41
+ e.value?.destroy(), t.destroy();
42
+ }), u(o, (r, l) => {
43
+ A(r, l) || (e.value?.setConfig(o.value), e.value?.render());
44
+ }), u(n, () => {
45
+ e.value?.setData(n.value);
47
46
  }), p({
48
- component: t
49
- }), (e, c) => (g(), b("div", B));
47
+ component: e
48
+ }), (r, l) => (x(), b("div", _));
50
49
  }
51
50
  });
52
51
  export {
53
- N as VisAreaSelectors,
54
- j as default
52
+ D as VisAreaSelectors,
53
+ N as default
55
54
  };
56
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,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/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AreaConfigInterface } from '@unovis/ts'\nimport { Area } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = AreaConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisAreaSelectors","Area","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),x={"data-vis-axis":""},k=u.Axis.selectors,T=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(y.axisAccessorKey),i=p,a=t.computed(()=>n.data.value??i.data),c=r.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Axis(c.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy(i.type)}),t.watch(c,(e,l)=>{var s;r.arePropsEqual(e,l)||(s=o.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",x))}});exports.VisAxisSelectors=k;exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),d=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),y={"data-vis-axis":""},x=s.Axis.selectors,k=e.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelTextSeparator:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickSpacing:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{type:[String,Function]},tickTextColor:{},tickTextAngle:{},tickTextAdaptiveSets:{type:Boolean},tickTextHideOverlapping:{type:Boolean},tickPadding:{},tickSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:p}){const o=u,n=e.inject(d.axisAccessorKey),i=e.computed(()=>n.data.value??o.data),a=r.useForwardProps(o),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.Axis(a.value),t.value?.setData(i.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy(o.type)}),e.watch(a,(c,l)=>{r.arePropsEqual(c,l)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(i,()=>{t.value?.setData(i.value)}),p({component:t}),(c,l)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisAxisSelectors=x;exports.default=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,68BA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GAC9CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQG,EAAM,IAAI,CAC7B,CAAC,EAEDY,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAAqB,MAArBC,CAAqB"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AxisConfigInterface } from '@unovis/ts'\nimport { Axis } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { axisAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props\ntype Props = AxisConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n"],"names":["VisAxisSelectors","Axis","props","__props","accessor","inject","axisAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAmDaA,EAAmBC,EAAAA,KAAK,qkCA3CrC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAQF,EAAM,IAAI,CAC7B,CAAC,EAEDc,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAAqB,MAArBC,CAAqB"}
@@ -1,4 +1,4 @@
1
- import { Axis, AxisConfigInterface } from '@unovis/ts';
1
+ import { AxisConfigInterface, Axis } from '@unovis/ts';
2
2
 
3
3
  export declare const VisAxisSelectors: typeof import("@unovis/ts/components/axis/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<{
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as y, computed as m, ref as x, onMounted as k, nextTick as T, onUnmounted as v, watch as r, createElementBlock as F, openBlock as f } from "vue";
2
- import { Axis as s } from "@unovis/ts";
1
+ import { defineComponent as u, inject as d, computed as y, ref as x, onMounted as m, nextTick as k, onUnmounted as T, watch as c, openBlock as v, createElementBlock as F } from "vue";
2
+ import { Axis as r } from "@unovis/ts";
3
+ import { axisAccessorKey as S } from "../../utils/context.js";
3
4
  import { useForwardProps as B, arePropsEqual as b } from "../../utils/props.js";
4
- import { axisAccessorKey as g } from "../../utils/context.js";
5
- const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
5
+ const f = { "data-vis-axis": "" }, M = r.selectors, O = /* @__PURE__ */ u({
6
6
  __name: "index",
7
7
  props: {
8
8
  position: {},
@@ -13,6 +13,7 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
13
13
  labelMargin: {},
14
14
  labelTextFitMode: {},
15
15
  labelTextTrimType: {},
16
+ labelTextSeparator: {},
16
17
  labelColor: {},
17
18
  gridLine: { type: Boolean },
18
19
  tickLine: { type: Boolean },
@@ -23,21 +24,25 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
23
24
  tickFormat: { type: Function },
24
25
  tickValues: {},
25
26
  numTicks: {},
27
+ tickSpacing: {},
26
28
  tickTextFitMode: {},
27
29
  tickTextWidth: {},
28
30
  tickTextSeparator: {},
29
31
  tickTextForceWordBreak: { type: Boolean },
30
32
  tickTextTrimType: {},
31
33
  tickTextFontSize: {},
32
- tickTextAlign: {},
34
+ tickTextAlign: { type: [String, Function] },
33
35
  tickTextColor: {},
34
36
  tickTextAngle: {},
37
+ tickTextAdaptiveSets: { type: Boolean },
35
38
  tickTextHideOverlapping: { type: Boolean },
36
39
  tickPadding: {},
40
+ tickSize: {},
37
41
  x: { type: [Function, Number, null] },
38
42
  y: { type: [Function, Number, null, Array] },
39
43
  id: { type: Function },
40
44
  color: { type: [Function, String, Array, null] },
45
+ colorKeys: {},
41
46
  xScale: { type: [Object, Function] },
42
47
  yScale: { type: [Object, Function] },
43
48
  excludeFromDomainCalculation: { type: Boolean },
@@ -46,29 +51,25 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
46
51
  attributes: {},
47
52
  data: {}
48
53
  },
49
- setup(p, { expose: u }) {
50
- const o = y(g), n = p, i = m(() => o.data.value ?? n.data), a = B(n), t = x();
51
- return k(() => {
52
- T(() => {
53
- var e;
54
- t.value = new s(a.value), (e = t.value) == null || e.setData(i.value), o.update(t.value);
54
+ setup(s, { expose: p }) {
55
+ const t = s, o = d(S), n = y(() => o.data.value ?? t.data), i = B(t), e = x();
56
+ return m(() => {
57
+ k(() => {
58
+ e.value = new r(i.value), e.value?.setData(n.value), o.update(e.value);
55
59
  });
56
- }), v(() => {
57
- var e;
58
- (e = t.value) == null || e.destroy(), o.destroy(n.type);
59
- }), r(a, (e, l) => {
60
- var c;
61
- b(e, l) || (c = t.value) == null || c.setConfig(a.value);
62
- }), r(i, () => {
63
- var e;
64
- (e = t.value) == null || e.setData(i.value);
65
- }), u({
66
- component: t
67
- }), (e, l) => (f(), F("div", S));
60
+ }), T(() => {
61
+ e.value?.destroy(), o.destroy(t.type);
62
+ }), c(i, (a, l) => {
63
+ b(a, l) || (e.value?.setConfig(i.value), e.value?.render());
64
+ }), c(n, () => {
65
+ e.value?.setData(n.value);
66
+ }), p({
67
+ component: e
68
+ }), (a, l) => (v(), F("div", f));
68
69
  }
69
70
  });
70
71
  export {
71
- O as VisAxisSelectors,
72
- C as default
72
+ M as VisAxisSelectors,
73
+ O as default
73
74
  };
74
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAe,GAIjCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQG,EAAM,IAAI;AAAA,IAC7B,CAAC,GAEDY,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,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,EAAqB,OAArBC,CAAqB;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { AxisConfigInterface } from '@unovis/ts'\nimport { Axis } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { axisAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props\ntype Props = AxisConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n"],"names":["VisAxisSelectors","Axis","props","__props","accessor","inject","axisAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;mCAmDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAe,GAIjCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAQF,EAAM,IAAI;AAAA,IAC7B,CAAC,GAEDc,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAAqB,OAArBC,CAAqB;AAAA;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),i=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),v={"data-vis-component":""},m=l.Boxplot.selectors,_=e.defineComponent({__name:"index",props:{data:{}},setup(p,{expose:d}){const a=p,o=e.inject(i.componentAccessorKey),s=e.computed(()=>o.data.value??a.data),n=u.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new l.Boxplot(n.value),t.value?.setData(s.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy()}),e.watch(n,(c,r)=>{u.arePropsEqual(c,r)||(t.value?.setConfig(n.value),t.value?.render())}),e.watch(s,()=>{t.value?.setData(s.value)}),d({component:t}),(c,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisBoxplotSelectors=m;exports.default=_;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/boxplot/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { BoxplotConfigInterface } from '@unovis/ts'\nimport { Boxplot } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\nconst props = defineProps<{ data?: Datum[] } & /** @vue-ignore */ BoxplotConfigInterface<Datum>>()\n\nconst accessor = inject(componentAccessorKey)\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Boxplot<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Boxplot<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBoxplotSelectors = Boxplot.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisBoxplotSelectors","Boxplot","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAsBC,EAAAA,QAAQ,kFAzC3C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAEtCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,EACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -0,0 +1,19 @@
1
+ import { BoxplotConfigInterface, Boxplot } from '@unovis/ts';
2
+
3
+ export declare const VisBoxplotSelectors: typeof import("@unovis/ts/components/boxplot/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & ({
6
+ data?: Datum[];
7
+ } & BoxplotConfigInterface<Datum>), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Boxplot<Datum>, Boxplot<Datum>>;
10
+ }>): void;
11
+ attrs: any;
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
15
+ [key: string]: any;
16
+ }> & {
17
+ __ctx?: Awaited<typeof __VLS_setup>;
18
+ };
19
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { defineComponent as d, inject as m, computed as i, ref as v, onMounted as f, nextTick as _, onUnmounted as x, watch as c, openBlock as B, createElementBlock as h } from "vue";
2
+ import { Boxplot as p } from "@unovis/ts";
3
+ import { componentAccessorKey as k } from "../../utils/context.js";
4
+ import { useForwardProps as w, arePropsEqual as y } from "../../utils/props.js";
5
+ const g = { "data-vis-component": "" }, j = p.selectors, q = /* @__PURE__ */ d({
6
+ __name: "index",
7
+ props: {
8
+ data: {}
9
+ },
10
+ setup(u, { expose: l }) {
11
+ const n = u, o = m(k), t = i(() => o.data.value ?? n.data), a = w(n), e = v();
12
+ return f(() => {
13
+ _(() => {
14
+ e.value = new p(a.value), e.value?.setData(t.value), o.update(e.value);
15
+ });
16
+ }), x(() => {
17
+ e.value?.destroy(), o.destroy();
18
+ }), c(a, (s, r) => {
19
+ y(s, r) || (e.value?.setConfig(a.value), e.value?.render());
20
+ }), c(t, () => {
21
+ e.value?.setData(t.value);
22
+ }), l({
23
+ component: e
24
+ }), (s, r) => (B(), h("div", g));
25
+ }
26
+ });
27
+ export {
28
+ j as VisBoxplotSelectors,
29
+ q as default
30
+ };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/boxplot/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { BoxplotConfigInterface } from '@unovis/ts'\nimport { Boxplot } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\n// !!! temporary solution to ignore complex type. related issue: https://github.com/vuejs/core/issues/8412\nconst props = defineProps<{ data?: Datum[] } & /** @vue-ignore */ BoxplotConfigInterface<Datum>>()\n\nconst accessor = inject(componentAccessorKey)\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Boxplot<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Boxplot<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBoxplotSelectors = Boxplot.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisBoxplotSelectors","Boxplot","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAsBC,EAAQ;;;;;;AAzC3C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAEtCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,GACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.cjs");exports.VisBoxplotSelectors=e.VisBoxplotSelectors;exports.default=e.default;
2
+ //# sourceMappingURL=index2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import r from "./index.js";
2
+ import { VisBoxplotSelectors as f } from "./index.js";
3
+ export {
4
+ f as VisBoxplotSelectors,
5
+ r as default
6
+ };
7
+ //# sourceMappingURL=index2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},h=l.Brush.selectors,m=t.defineComponent({__name:"index",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(y.componentAccessorKey),a=p,u=t.computed(()=>o.data.value??a.data),c=i.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new l.Brush(c.value),(e=n.value)==null||e.setData(u.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,s)=>{var r;i.arePropsEqual(e,s)||(r=n.value)==null||r.setConfig(c.value)}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),d({component:n}),(e,s)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisBrushSelectors=h;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),p=require("../../utils/context.cjs"),a=require("../../utils/props.cjs"),y={"data-vis-component":""},v=l.Brush.selectors,h=e.defineComponent({__name:"index",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},brushHeightExtend:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:d}){const r=i,n=e.inject(p.componentAccessorKey),o=e.computed(()=>n.data.value??r.data),u=a.useForwardProps(r),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new l.Brush(u.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(u,(c,s)=>{a.arePropsEqual(c,s)||(t.value?.setConfig(u.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),d({component:t}),(c,s)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisBrushSelectors=v;exports.default=h;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = BrushConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Brush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisBrushSelectors","Brush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,8iBA3CvC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,GAC/CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { BrushConfigInterface } from '@unovis/ts'\nimport { Brush } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = BrushConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Brush<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisBrushSelectors","Brush","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAoBC,EAAAA,MAAM,glBA3CvC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,EAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { Brush, BrushConfigInterface } from '@unovis/ts';
1
+ import { BrushConfigInterface, Brush } from '@unovis/ts';
2
2
 
3
3
  export declare const VisBrushSelectors: typeof import("@unovis/ts/components/brush/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<{