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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/components/area/index.cjs +1 -1
  2. package/components/area/index.cjs.map +1 -1
  3. package/components/area/index.d.ts +53 -6
  4. package/components/area/index.js +20 -17
  5. package/components/area/index.js.map +1 -1
  6. package/components/axis/index.cjs +1 -1
  7. package/components/axis/index.cjs.map +1 -1
  8. package/components/axis/index.d.ts +71 -6
  9. package/components/axis/index.js +20 -17
  10. package/components/axis/index.js.map +1 -1
  11. package/components/brush/index.cjs +1 -1
  12. package/components/brush/index.cjs.map +1 -1
  13. package/components/brush/index.d.ts +57 -6
  14. package/components/brush/index.js +19 -16
  15. package/components/brush/index.js.map +1 -1
  16. package/components/chord-diagram/index.cjs +1 -1
  17. package/components/chord-diagram/index.cjs.map +1 -1
  18. package/components/chord-diagram/index.d.ts +55 -6
  19. package/components/chord-diagram/index.js +20 -17
  20. package/components/chord-diagram/index.js.map +1 -1
  21. package/components/crosshair/index.cjs +1 -1
  22. package/components/crosshair/index.cjs.map +1 -1
  23. package/components/crosshair/index.d.ts +56 -6
  24. package/components/crosshair/index.js +20 -35
  25. package/components/crosshair/index.js.map +1 -1
  26. package/components/donut/index.cjs +1 -1
  27. package/components/donut/index.cjs.map +1 -1
  28. package/components/donut/index.d.ts +57 -6
  29. package/components/donut/index.js +21 -18
  30. package/components/donut/index.js.map +1 -1
  31. package/components/free-brush/index.cjs +1 -1
  32. package/components/free-brush/index.cjs.map +1 -1
  33. package/components/free-brush/index.d.ts +57 -6
  34. package/components/free-brush/index.js +21 -18
  35. package/components/free-brush/index.js.map +1 -1
  36. package/components/graph/index.cjs +1 -1
  37. package/components/graph/index.cjs.map +1 -1
  38. package/components/graph/index.d.ts +106 -6
  39. package/components/graph/index.js +24 -21
  40. package/components/graph/index.js.map +1 -1
  41. package/components/grouped-bar/index.cjs +1 -1
  42. package/components/grouped-bar/index.cjs.map +1 -1
  43. package/components/grouped-bar/index.d.ts +57 -6
  44. package/components/grouped-bar/index.js +21 -18
  45. package/components/grouped-bar/index.js.map +1 -1
  46. package/components/line/index.cjs +1 -1
  47. package/components/line/index.cjs.map +1 -1
  48. package/components/line/index.d.ts +54 -6
  49. package/components/line/index.js +20 -17
  50. package/components/line/index.js.map +1 -1
  51. package/components/nested-donut/index.cjs +1 -1
  52. package/components/nested-donut/index.cjs.map +1 -1
  53. package/components/nested-donut/index.d.ts +59 -6
  54. package/components/nested-donut/index.js +22 -19
  55. package/components/nested-donut/index.js.map +1 -1
  56. package/components/sankey/index.cjs +1 -1
  57. package/components/sankey/index.cjs.map +1 -1
  58. package/components/sankey/index.d.ts +90 -6
  59. package/components/sankey/index.js +28 -25
  60. package/components/sankey/index.js.map +1 -1
  61. package/components/scatter/index.cjs +1 -1
  62. package/components/scatter/index.cjs.map +1 -1
  63. package/components/scatter/index.d.ts +60 -6
  64. package/components/scatter/index.js +22 -19
  65. package/components/scatter/index.js.map +1 -1
  66. package/components/stacked-bar/index.cjs +1 -1
  67. package/components/stacked-bar/index.cjs.map +1 -1
  68. package/components/stacked-bar/index.d.ts +57 -6
  69. package/components/stacked-bar/index.js +22 -19
  70. package/components/stacked-bar/index.js.map +1 -1
  71. package/components/timeline/index.cjs +1 -1
  72. package/components/timeline/index.cjs.map +1 -1
  73. package/components/timeline/index.d.ts +54 -12
  74. package/components/timeline/index.js +22 -41
  75. package/components/timeline/index.js.map +1 -1
  76. package/components/tooltip/index.cjs +1 -1
  77. package/components/tooltip/index.cjs.map +1 -1
  78. package/components/tooltip/index.d.ts +2 -2
  79. package/components/tooltip/index.js +18 -18
  80. package/components/tooltip/index.js.map +1 -1
  81. package/components/topojson-map/index.cjs +1 -1
  82. package/components/topojson-map/index.cjs.map +1 -1
  83. package/components/topojson-map/index.d.ts +73 -6
  84. package/components/topojson-map/index.js +22 -19
  85. package/components/topojson-map/index.js.map +1 -1
  86. package/components/xy-labels/index.cjs +1 -1
  87. package/components/xy-labels/index.cjs.map +1 -1
  88. package/components/xy-labels/index.d.ts +61 -6
  89. package/components/xy-labels/index.js +27 -24
  90. package/components/xy-labels/index.js.map +1 -1
  91. package/containers/single-container/index.cjs +1 -1
  92. package/containers/single-container/index.cjs.map +1 -1
  93. package/containers/single-container/index.d.ts +21 -8
  94. package/containers/single-container/index.js +28 -29
  95. package/containers/single-container/index.js.map +1 -1
  96. package/containers/xy-container/index.cjs +1 -1
  97. package/containers/xy-container/index.cjs.map +1 -1
  98. package/containers/xy-container/index.d.ts +38 -8
  99. package/containers/xy-container/index.js +33 -33
  100. package/containers/xy-container/index.js.map +1 -1
  101. package/html-components/bullet-legend/index.cjs +1 -1
  102. package/html-components/bullet-legend/index.cjs.map +1 -1
  103. package/html-components/bullet-legend/index.d.ts +6 -0
  104. package/html-components/bullet-legend/index.js +19 -18
  105. package/html-components/bullet-legend/index.js.map +1 -1
  106. package/html-components/leaflet-flow-map/index.cjs +1 -1
  107. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  108. package/html-components/leaflet-flow-map/index.d.ts +107 -6
  109. package/html-components/leaflet-flow-map/index.js +18 -18
  110. package/html-components/leaflet-flow-map/index.js.map +1 -1
  111. package/html-components/leaflet-map/index.cjs +1 -1
  112. package/html-components/leaflet-map/index.cjs.map +1 -1
  113. package/html-components/leaflet-map/index.d.ts +94 -6
  114. package/html-components/leaflet-map/index.js +17 -17
  115. package/html-components/leaflet-map/index.js.map +1 -1
  116. package/index.cjs +1 -1
  117. package/index.js +1 -1
  118. package/package.json +5 -5
  119. package/utils/props.cjs +1 -1
  120. package/utils/props.cjs.map +1 -1
  121. package/utils/props.d.ts +3 -0
  122. package/utils/props.js +14 -11
  123. package/utils/props.js.map +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),d=require("@unovis/ts"),s=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},x=e.defineComponent({__name:"index",props:{curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{type:Boolean},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(i,{expose:l}){const u=i,o=e.inject(m.componentAccessorKey),p=e.computed(()=>o.data.value??u.data),y=e.getCurrentInstance(),c=e.computed(()=>s.parseProps({...u},y)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new d.Area(c.value),(t=n.value)==null||t.setData(p.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(c,(t,a)=>{var r;s.arePropsEqual(t,a)||(r=n.value)==null||r.setConfig(c.value)}),l({component:n}),(t,a)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=x;
1
+ "use strict";const t=require("vue"),d=require("@unovis/ts"),i=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},v=t.defineComponent({__name:"index",props:{color:{type:[Function,String,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{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(l,{expose:p}){const a=l,o=t.inject(y.componentAccessorKey),c=t.computed(()=>o.data.value??a.data),u=i.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.Area(u.value),(e=n.value)==null||e.setData(c.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(u,(e,r)=>{var s;i.arePropsEqual(e,r)||(s=n.value)==null||s.setConfig(u.value)}),t.watch(c,()=>{var e;(e=n.value)==null||e.setData(c.value)}),p({component:n}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});module.exports=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n curveType: {},\n baseline: { type: [Function, Number, null] },\n opacity: { type: [Function, Number, null] },\n cursor: { type: [Function, String, null] },\n minHeight1Px: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Area","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,UAAW,CAAC,EACZ,SAAU,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC3C,QAAS,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC1C,OAAQ,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACzC,aAAc,CAAE,KAAM,OAAQ,EAC9B,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAItCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAAWC,EAAAA,qBACXC,EAASH,WAAS,IAAMI,EAAA,WAAW,CAAE,GAAGT,CAAS,EAAAM,CAAQ,CAAC,EAG1DI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAY,KAAAN,EAAO,KAAK,GACpCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBd,EAAS,QAAQ,CAAA,CAClB,EAEKgB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEQT,EAAA,CACP,UAAAW,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO7B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { 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\ninterface Props extends AreaConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n curveType: {},\n baseline: { type: [Function, Number, null] },\n opacity: { type: [Function, Number, null] },\n cursor: { type: [Function, String, null] },\n minHeight1Px: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Area","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,UAAW,CAAC,EACZ,SAAU,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC3C,QAAS,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC1C,OAAQ,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACzC,aAAc,CAAE,KAAM,OAAQ,EAC9B,E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AO3B,CAAU,EAE7D,CAEA,CAAC"}
@@ -1,11 +1,58 @@
1
- import { Area, AreaConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: AreaConfigInterface<Datum> & {
1
+ import { Area, NumericAccessor } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ color?: import("@unovis/ts").ColorAccessor<Datum[]>;
9
+ curveType?: import("@unovis/ts").CurveType;
10
+ baseline?: NumericAccessor<Datum>;
11
+ opacity?: NumericAccessor<Datum[]>;
12
+ cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
13
+ minHeight1Px?: boolean;
14
+ x: NumericAccessor<Datum>;
15
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
16
+ id?: (d: Datum, i: number, ...any: any[]) => string;
17
+ xScale?: import("@unovis/ts").ContinuousScale;
18
+ yScale?: import("@unovis/ts").ContinuousScale;
19
+ excludeFromDomainCalculation?: boolean;
20
+ duration?: number;
21
+ events?: {
22
+ [selector: string]: {
23
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
24
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
25
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
26
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
27
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
28
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
29
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
30
+ click?: import("@unovis/ts").VisEventCallback<any>;
31
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
32
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
33
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
34
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
35
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
36
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
37
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
38
+ select?: import("@unovis/ts").VisEventCallback<any>;
39
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
40
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
41
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
42
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
43
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
44
+ };
45
+ };
46
+ attributes?: {
47
+ [selector: string]: {
48
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
49
+ };
50
+ };
4
51
  data?: Datum[];
5
- };
6
- expose(exposed: {
52
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
53
+ expose(exposed: import("vue").ShallowUnwrapRef<{
7
54
  component: import("vue").Ref<Area<Datum>>;
8
- }): void;
55
+ }>): void;
9
56
  attrs: any;
10
57
  slots: {};
11
58
  emit: any;
@@ -1,10 +1,11 @@
1
- import { defineComponent as m, inject as y, computed as u, getCurrentInstance as d, ref as v, onMounted as f, nextTick as F, onUnmounted as x, watch as b, openBlock as _, createElementBlock as g } from "vue";
2
- import { Area as h } from "@unovis/ts";
3
- import { parseProps as A, arePropsEqual as B } from "../../utils/props.js";
4
- import { componentAccessorKey as C } from "../../utils/context.js";
5
- const N = { "data-vis-component": "" }, w = /* @__PURE__ */ m({
1
+ import { defineComponent as s, inject as m, computed as d, ref as y, onMounted as v, nextTick as f, onUnmounted as F, watch as l, openBlock as x, createElementBlock as b } from "vue";
2
+ import { Area as _ } from "@unovis/ts";
3
+ import { useForwardProps as g, arePropsEqual as h } from "../../utils/props.js";
4
+ import { componentAccessorKey as B } from "../../utils/context.js";
5
+ const N = { "data-vis-component": "" }, A = /* @__PURE__ */ s({
6
6
  __name: "index",
7
7
  props: {
8
+ color: { type: [Function, String, null] },
8
9
  curveType: {},
9
10
  baseline: { type: [Function, Number, null] },
10
11
  opacity: { type: [Function, Number, null] },
@@ -13,7 +14,6 @@ const N = { "data-vis-component": "" }, w = /* @__PURE__ */ m({
13
14
  x: { type: [Function, Number, null] },
14
15
  y: { type: [Function, Number, null, Array] },
15
16
  id: { type: Function },
16
- color: { type: [Function, String, Array, null] },
17
17
  xScale: { type: [Object, Function] },
18
18
  yScale: { type: [Object, Function] },
19
19
  excludeFromDomainCalculation: { type: Boolean },
@@ -22,25 +22,28 @@ const N = { "data-vis-component": "" }, w = /* @__PURE__ */ m({
22
22
  attributes: {},
23
23
  data: {}
24
24
  },
25
- setup(i, { expose: l }) {
26
- const a = i, n = y(C), p = u(() => n.data.value ?? a.data), s = d(), o = u(() => A({ ...a }, s)), t = v();
27
- return f(() => {
28
- F(() => {
25
+ setup(i, { expose: p }) {
26
+ const u = i, n = m(B), o = d(() => n.data.value ?? u.data), a = g(u), t = y();
27
+ return v(() => {
28
+ f(() => {
29
29
  var e;
30
- t.value = new h(o.value), (e = t.value) == null || e.setData(p.value), n.update(t.value);
30
+ t.value = new _(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
31
31
  });
32
- }), x(() => {
32
+ }), F(() => {
33
33
  var e;
34
34
  (e = t.value) == null || e.destroy(), n.destroy();
35
- }), b(o, (e, c) => {
35
+ }), l(a, (e, c) => {
36
36
  var r;
37
- B(e, c) || (r = t.value) == null || r.setConfig(o.value);
38
- }), l({
37
+ h(e, c) || (r = t.value) == null || r.setConfig(a.value);
38
+ }), l(o, () => {
39
+ var e;
40
+ (e = t.value) == null || e.setData(o.value);
41
+ }), p({
39
42
  component: t
40
- }), (e, c) => (_(), g("div", N));
43
+ }), (e, c) => (x(), b("div", N));
41
44
  }
42
45
  });
43
46
  export {
44
- w as default
47
+ A as default
45
48
  };
46
49
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n curveType: {},\n baseline: { type: [Function, Number, null] },\n opacity: { type: [Function, Number, null] },\n cursor: { type: [Function, String, null] },\n minHeight1Px: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Area","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC3C,SAAS,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC1C,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACzC,cAAc,EAAE,MAAM,QAAQ;AAAA,IAC9B,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACpC,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,MAAM,KAAK,EAAE;AAAA,IAC3C,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC/C,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,8BAA8B,EAAE,MAAM,QAAQ;AAAA,IAC9C,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAW,EAAE,GAAGT,EAAS,GAAAM,CAAQ,CAAC,GAG1DI,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAYN,EAAO,KAAK,IACpCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { 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\ninterface Props extends AreaConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n curveType: {},\n baseline: { type: [Function, Number, null] },\n opacity: { type: [Function, Number, null] },\n cursor: { type: [Function, String, null] },\n minHeight1Px: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Area","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC3C,SAAS,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC1C,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACzC,cAAc,EAAE,MAAM,QAAQ;AAAA,IAC9B,GAAG,EAAE,MA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EM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),y=require("@unovis/ts"),l=require("../../utils/props.cjs"),x=require("../../utils/context.cjs"),k={"data-vis-axis":""},m=e.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},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(s,{expose:u}){const o=s,a=e.inject(x.axisAccessorKey),p=e.computed(()=>a.data.value??o.data),d=e.getCurrentInstance(),i=e.computed(()=>l.parseProps({...o},d)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new y.Axis(i.value),(t=n.value)==null||t.setData(p.value),a.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),a.destroy(o.type)}),e.watch(i,(t,c)=>{var r;l.arePropsEqual(t,c)||(r=n.value)==null||r.setConfig(i.value)}),u({component:n}),(t,c)=>(e.openBlock(),e.createElementBlock("div",k))}});module.exports=m;
1
+ "use strict";const t=require("vue"),d=require("@unovis/ts"),u=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),x={"data-vis-axis":""},k=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const n=s,a=t.inject(y.axisAccessorKey),i=t.computed(()=>a.data.value??n.data),c=u.useForwardProps(n),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new d.Axis(c.value),(e=o.value)==null||e.setData(i.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy(n.type)}),t.watch(c,(e,l)=>{var r;u.arePropsEqual(e,l)||(r=o.value)==null||r.setConfig(c.value)}),t.watch(i,()=>{var e;(e=o.value)==null||e.setData(i.value)}),p({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",x))}});module.exports=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-axis\": \"\" }\n\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n position: {},\n type: {},\n fullSize: { type: Boolean },\n label: {},\n labelFontSize: {},\n labelMargin: {},\n labelColor: {},\n gridLine: { type: Boolean },\n tickLine: { type: Boolean },\n domainLine: { type: Boolean },\n minMaxTicksOnly: { type: Boolean },\n tickFormat: { type: Function },\n tickValues: {},\n numTicks: {},\n tickTextFitMode: {},\n tickTextWidth: {},\n tickTextSeparator: {},\n tickTextForceWordBreak: { type: Boolean },\n tickTextTrimType: {},\n tickTextFontSize: {},\n tickTextAlign: {},\n tickTextColor: {},\n tickPadding: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(axisAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","axisAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Axis","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,gBAAiB,IAQVC,EAA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CAAC,EAG1DI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAY,KAAAN,EAAO,KAAK,GACpCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACRd,EAAA,QAAQD,EAAM,IAAI,CAAA,CAC5B,EAEKiB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEQT,EAAA,CACP,UAAAW,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO7B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-axis\": \"\" }\n\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\ninterface Props extends AxisConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n position: {},\n type: {},\n fullSize: { type: Boolean },\n label: {},\n labelFontSize: {},\n labelMargin: {},\n labelColor: {},\n gridLine: { type: Boolean },\n tickLine: { type: Boolean },\n domainLine: { type: Boolean },\n minMaxTicksOnly: { type: Boolean },\n tickFormat: { type: Function },\n tickValues: {},\n numTicks: {},\n tickTextFitMode: {},\n tickTextWidth: {},\n tickTextSeparator: {},\n tickTextForceWordBreak: { type: Boolean },\n tickTextTrimType: {},\n tickTextFontSize: {},\n tickTextAlign: {},\n tickTextColor: {},\n tickPadding: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","axisAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Axis","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,gBAAiB,IASVC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,SAAU,CAAC,EACX,KAAM,CAAC,EACP,SAAU,CAAE,KAAM,OAAQ,EAC1B,MAAO,CAAC,EACR,cAAe,CAAC,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AAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACRZ,EAAA,QAAQD,EAAM,IAAI,CAAA,CAC5B,EAEKe,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
@@ -1,11 +1,76 @@
1
- import { Axis, AxisConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: AxisConfigInterface<Datum> & {
1
+ import { Axis } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ color?: string | ((d: Datum, i: number, ...any: any[]) => string) | ((d: Datum[], i: number, ...any: any[]) => string);
9
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
10
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
+ id?: (d: Datum, i: number, ...any: any[]) => string;
12
+ xScale?: import("@unovis/ts").ContinuousScale;
13
+ yScale?: import("@unovis/ts").ContinuousScale;
14
+ excludeFromDomainCalculation?: boolean;
15
+ duration?: number;
16
+ events?: {
17
+ [selector: string]: {
18
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
19
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
20
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
21
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
22
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
23
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
24
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
25
+ click?: import("@unovis/ts").VisEventCallback<any>;
26
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
27
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
28
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
29
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
30
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
31
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
32
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
33
+ select?: import("@unovis/ts").VisEventCallback<any>;
34
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
35
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
36
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
37
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
38
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
39
+ };
40
+ };
41
+ attributes?: {
42
+ [selector: string]: {
43
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
44
+ };
45
+ };
4
46
  data?: Datum[];
5
- };
6
- expose(exposed: {
47
+ label?: string;
48
+ position?: string;
49
+ type?: string;
50
+ fullSize?: boolean;
51
+ labelFontSize?: string;
52
+ labelMargin?: number;
53
+ labelColor?: string;
54
+ gridLine?: boolean;
55
+ tickLine?: boolean;
56
+ domainLine?: boolean;
57
+ minMaxTicksOnly?: boolean;
58
+ tickFormat?: (tick: number, i: number, ticks: number[] | Date[]) => string;
59
+ tickValues?: number[];
60
+ numTicks?: number;
61
+ tickTextFitMode?: string;
62
+ tickTextWidth?: number;
63
+ tickTextSeparator?: string | string[];
64
+ tickTextForceWordBreak?: boolean;
65
+ tickTextTrimType?: string;
66
+ tickTextFontSize?: string;
67
+ tickTextAlign?: string;
68
+ tickTextColor?: string;
69
+ tickPadding?: number;
70
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
71
+ expose(exposed: import("vue").ShallowUnwrapRef<{
7
72
  component: import("vue").Ref<Axis<Datum>>;
8
- }): void;
73
+ }>): void;
9
74
  attrs: any;
10
75
  slots: {};
11
76
  emit: any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as y, computed as r, getCurrentInstance as m, ref as x, onMounted as k, nextTick as F, onUnmounted as T, watch as f, openBlock as v, createElementBlock as B } from "vue";
2
- import { Axis as b } from "@unovis/ts";
3
- import { parseProps as g, arePropsEqual as _ } from "../../utils/props.js";
4
- import { axisAccessorKey as S } from "../../utils/context.js";
5
- const C = { "data-vis-axis": "" }, z = /* @__PURE__ */ d({
1
+ import { defineComponent as s, inject as d, computed as m, ref as y, onMounted as x, nextTick as k, onUnmounted as v, watch as r, openBlock as F, createElementBlock as T } from "vue";
2
+ import { Axis as f } from "@unovis/ts";
3
+ import { useForwardProps as B, arePropsEqual as b } from "../../utils/props.js";
4
+ import { axisAccessorKey as _ } from "../../utils/context.js";
5
+ const g = { "data-vis-axis": "" }, M = /* @__PURE__ */ s({
6
6
  __name: "index",
7
7
  props: {
8
8
  position: {},
@@ -31,7 +31,7 @@ const C = { "data-vis-axis": "" }, z = /* @__PURE__ */ d({
31
31
  x: { type: [Function, Number, null] },
32
32
  y: { type: [Function, Number, null, Array] },
33
33
  id: { type: Function },
34
- color: { type: [Function, String, Array, null] },
34
+ color: { type: [Function, String, null] },
35
35
  xScale: { type: [Object, Function] },
36
36
  yScale: { type: [Object, Function] },
37
37
  excludeFromDomainCalculation: { type: Boolean },
@@ -40,25 +40,28 @@ const C = { "data-vis-axis": "" }, z = /* @__PURE__ */ d({
40
40
  attributes: {},
41
41
  data: {}
42
42
  },
43
- setup(l, { expose: p }) {
44
- const o = l, n = y(S), s = r(() => n.data.value ?? o.data), u = m(), a = r(() => g({ ...o }, u)), t = x();
45
- return k(() => {
46
- F(() => {
43
+ setup(u, { expose: p }) {
44
+ const o = u, n = d(_), a = m(() => n.data.value ?? o.data), i = B(o), t = y();
45
+ return x(() => {
46
+ k(() => {
47
47
  var e;
48
- t.value = new b(a.value), (e = t.value) == null || e.setData(s.value), n.update(t.value);
48
+ t.value = new f(i.value), (e = t.value) == null || e.setData(a.value), n.update(t.value);
49
49
  });
50
- }), T(() => {
50
+ }), v(() => {
51
51
  var e;
52
52
  (e = t.value) == null || e.destroy(), n.destroy(o.type);
53
- }), f(a, (e, i) => {
54
- var c;
55
- _(e, i) || (c = t.value) == null || c.setConfig(a.value);
53
+ }), r(i, (e, c) => {
54
+ var l;
55
+ b(e, c) || (l = t.value) == null || l.setConfig(i.value);
56
+ }), r(a, () => {
57
+ var e;
58
+ (e = t.value) == null || e.setData(a.value);
56
59
  }), p({
57
60
  component: t
58
- }), (e, i) => (v(), B("div", C));
61
+ }), (e, c) => (F(), T("div", g));
59
62
  }
60
63
  });
61
64
  export {
62
- z as default
65
+ M as default
63
66
  };
64
67
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-axis\": \"\" }\n\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n position: {},\n type: {},\n fullSize: { type: Boolean },\n label: {},\n labelFontSize: {},\n labelMargin: {},\n labelColor: {},\n gridLine: { type: Boolean },\n tickLine: { type: Boolean },\n domainLine: { type: Boolean },\n minMaxTicksOnly: { type: Boolean },\n tickFormat: { type: Function },\n tickValues: {},\n numTicks: {},\n tickTextFitMode: {},\n tickTextWidth: {},\n tickTextSeparator: {},\n tickTextForceWordBreak: { type: Boolean },\n tickTextTrimType: {},\n tickTextFontSize: {},\n tickTextAlign: {},\n tickTextColor: {},\n tickPadding: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(axisAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","axisAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Axis","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,iBAAiB,MAQVC,IAAiBC,gBAA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C,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAe,GAIjCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAW,EAAE,GAAGT,EAAS,GAAAM,CAAQ,CAAC,GAG1DI,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAYN,EAAO,KAAK,IACpCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACRd,EAAA,QAAQD,EAAM,IAAI;AAAA,IAAA,CAC5B,GAEKiB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-axis\": \"\" }\n\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\ninterface Props extends AxisConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n position: {},\n type: {},\n fullSize: { type: Boolean },\n label: {},\n labelFontSize: {},\n labelMargin: {},\n labelColor: {},\n gridLine: { type: Boolean },\n tickLine: { type: Boolean },\n domainLine: { type: Boolean },\n minMaxTicksOnly: { type: Boolean },\n tickFormat: { type: Function },\n tickValues: {},\n numTicks: {},\n tickTextFitMode: {},\n tickTextWidth: {},\n tickTextSeparator: {},\n tickTextForceWordBreak: { type: Boolean },\n tickTextTrimType: {},\n tickTextFontSize: {},\n tickTextAlign: {},\n tickTextColor: {},\n tickPadding: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","axisAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Axis","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_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AY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAe,GAKjCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAASC,EAAgBP,CAAK,GAG9BQ,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAYN,EAAO,KAAK,IACpCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK,QACrBH,EAAA,OAAOO,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACRZ,EAAA,QAAQD,EAAM,IAAI;AAAA,IAAA,CAC5B,GAEKe,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEDS,EAAMX,GAAM,MAAM;;AACN,OAAAS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),y=require("@unovis/ts"),s=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},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:{},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(i,{expose:l}){const a=i,o=e.inject(m.componentAccessorKey),p=e.computed(()=>o.data.value??a.data),d=e.getCurrentInstance(),c=e.computed(()=>s.parseProps({...a},d)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new y.Brush(c.value),(t=n.value)==null||t.setData(p.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(c,(t,u)=>{var r;s.arePropsEqual(t,u)||(r=n.value)==null||r.setConfig(c.value)}),l({component:n}),(t,u)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=h;
1
+ "use strict";const t=require("vue"),d=require("@unovis/ts"),i=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},h=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,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:p}){const u=l,o=t.inject(y.componentAccessorKey),c=t.computed(()=>o.data.value??u.data),a=i.useForwardProps(u),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.Brush(a.value),(e=n.value)==null||e.setData(c.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(a,(e,s)=>{var r;i.arePropsEqual(e,s)||(r=n.value)==null||r.setConfig(a.value)}),t.watch(c,()=>{var e;(e=n.value)==null||e.setData(c.value)}),p({component:n}),(e,s)=>(t.openBlock(),t.createElementBlock("div",v))}});module.exports=h;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n draggable: { type: Boolean },\n handlePosition: {},\n selectionMinLength: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Brush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,QAAS,CAAE,KAAM,QAAS,EAC1B,aAAc,CAAE,KAAM,QAAS,EAC/B,YAAa,CAAE,KAAM,QAAS,EAC9B,WAAY,CAAE,KAAM,QAAS,EAC7B,YAAa,CAAC,EACd,UAAW,CAAC,EACZ,UAAW,CAAE,KAAM,OAAQ,EAC3B,eAAgB,CAAC,EACjB,mBAAoB,CAAC,EACrB,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAItCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAAWC,EAAAA,qBACXC,EAASH,WAAS,IAAMI,EAAA,WAAW,CAAE,GAAGT,CAAS,EAAAM,CAAQ,CAAC,EAG1DI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAa,MAAAN,EAAO,KAAK,GACrCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBd,EAAS,QAAQ,CAAA,CAClB,EAEKgB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEQT,EAAA,CACP,UAAAW,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO7B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { 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\ninterface Props extends BrushConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n draggable: { type: Boolean },\n handlePosition: {},\n selectionMinLength: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Brush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,QAAS,CAAE,KAAM,QAAS,EAC1B,aAAc,CAAE,KAAM,QAAS,EAC/B,YAAa,CAAE,KAAM,QAAS,EAC9B,WAAY,CAAE,KAAM,QAAS,EAC7B,YAAa,CAAC,EACd,UAAW,CAAC,EACZ,UAAW,CAAE,KAAM,OAAQ,EAC3B,eAAgB,CAAC,EACjB,mBAAoB,CAAC,EACrB,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,I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EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
@@ -1,11 +1,62 @@
1
- import { Brush, BrushConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: BrushConfigInterface<Datum> & {
1
+ import { Brush } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ color?: string | ((d: Datum, i: number, ...any: any[]) => string) | ((d: Datum[], i: number, ...any: any[]) => string);
9
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
10
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
+ id?: (d: Datum, i: number, ...any: any[]) => string;
12
+ xScale?: import("@unovis/ts").ContinuousScale;
13
+ yScale?: import("@unovis/ts").ContinuousScale;
14
+ excludeFromDomainCalculation?: boolean;
15
+ duration?: number;
16
+ events?: {
17
+ [selector: string]: {
18
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
19
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
20
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
21
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
22
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
23
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
24
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
25
+ click?: import("@unovis/ts").VisEventCallback<any>;
26
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
27
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
28
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
29
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
30
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
31
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
32
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
33
+ select?: import("@unovis/ts").VisEventCallback<any>;
34
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
35
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
36
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
37
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
38
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
39
+ };
40
+ };
41
+ attributes?: {
42
+ [selector: string]: {
43
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
44
+ };
45
+ };
4
46
  data?: Datum[];
5
- };
6
- expose(exposed: {
47
+ onBrush?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
48
+ onBrushStart?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
49
+ onBrushMove?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
50
+ onBrushEnd?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
51
+ handleWidth?: number;
52
+ selection?: [number, number];
53
+ draggable?: boolean;
54
+ handlePosition?: string;
55
+ selectionMinLength?: number;
56
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
57
+ expose(exposed: import("vue").ShallowUnwrapRef<{
7
58
  component: import("vue").Ref<Brush<Datum>>;
8
- }): void;
59
+ }>): void;
9
60
  attrs: any;
10
61
  slots: {};
11
62
  emit: any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as m, computed as u, getCurrentInstance as y, ref as v, onMounted as h, nextTick as f, onUnmounted as F, watch as B, openBlock as x, createElementBlock as _ } from "vue";
2
- import { Brush as g } from "@unovis/ts";
3
- import { parseProps as b, arePropsEqual as C } from "../../utils/props.js";
4
- import { componentAccessorKey as S } from "../../utils/context.js";
5
- const j = { "data-vis-component": "" }, P = /* @__PURE__ */ d({
1
+ import { defineComponent as p, inject as d, computed as m, ref as y, onMounted as v, nextTick as h, onUnmounted as F, watch as i, openBlock as f, createElementBlock as B } from "vue";
2
+ import { Brush as x } from "@unovis/ts";
3
+ import { useForwardProps as _, arePropsEqual as b } from "../../utils/props.js";
4
+ import { componentAccessorKey as g } from "../../utils/context.js";
5
+ const S = { "data-vis-component": "" }, D = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  onBrush: { type: Function },
@@ -17,7 +17,7 @@ const j = { "data-vis-component": "" }, P = /* @__PURE__ */ d({
17
17
  x: { type: [Function, Number, null] },
18
18
  y: { type: [Function, Number, null, Array] },
19
19
  id: { type: Function },
20
- color: { type: [Function, String, Array, null] },
20
+ color: { type: [Function, String, null] },
21
21
  xScale: { type: [Object, Function] },
22
22
  yScale: { type: [Object, Function] },
23
23
  excludeFromDomainCalculation: { type: Boolean },
@@ -26,25 +26,28 @@ const j = { "data-vis-component": "" }, P = /* @__PURE__ */ d({
26
26
  attributes: {},
27
27
  data: {}
28
28
  },
29
- setup(s, { expose: i }) {
30
- const a = s, n = m(S), l = u(() => n.data.value ?? a.data), p = y(), o = u(() => b({ ...a }, p)), t = v();
31
- return h(() => {
32
- f(() => {
29
+ setup(s, { expose: l }) {
30
+ const c = s, n = d(g), o = m(() => n.data.value ?? c.data), a = _(c), t = y();
31
+ return v(() => {
32
+ h(() => {
33
33
  var e;
34
- t.value = new g(o.value), (e = t.value) == null || e.setData(l.value), n.update(t.value);
34
+ t.value = new x(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
35
35
  });
36
36
  }), F(() => {
37
37
  var e;
38
38
  (e = t.value) == null || e.destroy(), n.destroy();
39
- }), B(o, (e, c) => {
39
+ }), i(a, (e, u) => {
40
40
  var r;
41
- C(e, c) || (r = t.value) == null || r.setConfig(o.value);
42
- }), i({
41
+ b(e, u) || (r = t.value) == null || r.setConfig(a.value);
42
+ }), i(o, () => {
43
+ var e;
44
+ (e = t.value) == null || e.setData(o.value);
45
+ }), l({
43
46
  component: t
44
- }), (e, c) => (x(), _("div", j));
47
+ }), (e, u) => (f(), B("div", S));
45
48
  }
46
49
  });
47
50
  export {
48
- P as default
51
+ D as default
49
52
  };
50
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Brush, BrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n draggable: { type: Boolean },\n handlePosition: {},\n selectionMinLength: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Brush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,SAAS,EAAE,MAAM,SAAS;AAAA,IAC1B,cAAc,EAAE,MAAM,SAAS;AAAA,IAC/B,aAAa,EAAE,MAAM,SAAS;AAAA,IAC9B,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,aAAa,CAAC;AAAA,IACd,WAAW,CAAC;AAAA,IACZ,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,gBAAgB,CAAC;AAAA,IACjB,oBAAoB,CAAC;AAAA,IACrB,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACpC,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,MAAM,KAAK,EAAE;AAAA,IAC3C,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC/C,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,8BAA8B,EAAE,MAAM,QAAQ;AAAA,IAC9C,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAW,EAAE,GAAGT,EAAS,GAAAM,CAAQ,CAAC,GAG1DI,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAaN,EAAO,KAAK,IACrCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { 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\ninterface Props extends BrushConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n draggable: { type: Boolean },\n handlePosition: {},\n selectionMinLength: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Brush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO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