@unovis/vue 1.6.6-beta.0 → 1.6.6

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 (150) hide show
  1. package/components/annotations/index.cjs +1 -1
  2. package/components/annotations/index.cjs.map +1 -1
  3. package/components/annotations/index.d.ts +1 -1
  4. package/components/annotations/index.js +18 -20
  5. package/components/annotations/index.js.map +1 -1
  6. package/components/area/index.cjs +1 -1
  7. package/components/area/index.cjs.map +1 -1
  8. package/components/area/index.d.ts +1 -1
  9. package/components/area/index.js +21 -25
  10. package/components/area/index.js.map +1 -1
  11. package/components/axis/index.cjs +1 -1
  12. package/components/axis/index.cjs.map +1 -1
  13. package/components/axis/index.d.ts +1 -1
  14. package/components/axis/index.js +21 -25
  15. package/components/axis/index.js.map +1 -1
  16. package/components/brush/index.cjs +1 -1
  17. package/components/brush/index.cjs.map +1 -1
  18. package/components/brush/index.d.ts +1 -1
  19. package/components/brush/index.js +21 -25
  20. package/components/brush/index.js.map +1 -1
  21. package/components/chord-diagram/index.cjs +1 -1
  22. package/components/chord-diagram/index.cjs.map +1 -1
  23. package/components/chord-diagram/index.d.ts +1 -1
  24. package/components/chord-diagram/index.js +21 -25
  25. package/components/chord-diagram/index.js.map +1 -1
  26. package/components/crosshair/index.cjs +1 -1
  27. package/components/crosshair/index.cjs.map +1 -1
  28. package/components/crosshair/index.d.ts +1 -1
  29. package/components/crosshair/index.js +21 -25
  30. package/components/crosshair/index.js.map +1 -1
  31. package/components/donut/index.cjs +1 -1
  32. package/components/donut/index.cjs.map +1 -1
  33. package/components/donut/index.d.ts +1 -1
  34. package/components/donut/index.js +21 -25
  35. package/components/donut/index.js.map +1 -1
  36. package/components/free-brush/index.cjs +1 -1
  37. package/components/free-brush/index.cjs.map +1 -1
  38. package/components/free-brush/index.d.ts +1 -1
  39. package/components/free-brush/index.js +21 -25
  40. package/components/free-brush/index.js.map +1 -1
  41. package/components/graph/index.cjs +1 -1
  42. package/components/graph/index.cjs.map +1 -1
  43. package/components/graph/index.js +21 -25
  44. package/components/graph/index.js.map +1 -1
  45. package/components/grouped-bar/index.cjs +1 -1
  46. package/components/grouped-bar/index.cjs.map +1 -1
  47. package/components/grouped-bar/index.d.ts +1 -1
  48. package/components/grouped-bar/index.js +21 -25
  49. package/components/grouped-bar/index.js.map +1 -1
  50. package/components/line/index.cjs +1 -1
  51. package/components/line/index.cjs.map +1 -1
  52. package/components/line/index.d.ts +1 -1
  53. package/components/line/index.js +21 -25
  54. package/components/line/index.js.map +1 -1
  55. package/components/nested-donut/index.cjs +1 -1
  56. package/components/nested-donut/index.cjs.map +1 -1
  57. package/components/nested-donut/index.d.ts +1 -1
  58. package/components/nested-donut/index.js +21 -25
  59. package/components/nested-donut/index.js.map +1 -1
  60. package/components/plotband/index.cjs +1 -1
  61. package/components/plotband/index.cjs.map +1 -1
  62. package/components/plotband/index.d.ts +1 -1
  63. package/components/plotband/index.js +18 -20
  64. package/components/plotband/index.js.map +1 -1
  65. package/components/plotline/index.cjs +1 -1
  66. package/components/plotline/index.cjs.map +1 -1
  67. package/components/plotline/index.d.ts +1 -1
  68. package/components/plotline/index.js +18 -20
  69. package/components/plotline/index.js.map +1 -1
  70. package/components/sankey/index.cjs +1 -1
  71. package/components/sankey/index.cjs.map +1 -1
  72. package/components/sankey/index.d.ts +1 -1
  73. package/components/sankey/index.js +21 -25
  74. package/components/sankey/index.js.map +1 -1
  75. package/components/scatter/index.cjs +1 -1
  76. package/components/scatter/index.cjs.map +1 -1
  77. package/components/scatter/index.d.ts +1 -1
  78. package/components/scatter/index.js +21 -25
  79. package/components/scatter/index.js.map +1 -1
  80. package/components/stacked-bar/index.cjs +1 -1
  81. package/components/stacked-bar/index.cjs.map +1 -1
  82. package/components/stacked-bar/index.d.ts +1 -1
  83. package/components/stacked-bar/index.js +21 -25
  84. package/components/stacked-bar/index.js.map +1 -1
  85. package/components/timeline/index.cjs +1 -1
  86. package/components/timeline/index.cjs.map +1 -1
  87. package/components/timeline/index.d.ts +1 -1
  88. package/components/timeline/index.js +21 -25
  89. package/components/timeline/index.js.map +1 -1
  90. package/components/tooltip/index.cjs +1 -1
  91. package/components/tooltip/index.cjs.map +1 -1
  92. package/components/tooltip/index.d.ts +1 -1
  93. package/components/tooltip/index.js +18 -20
  94. package/components/tooltip/index.js.map +1 -1
  95. package/components/topojson-map/index.cjs +1 -1
  96. package/components/topojson-map/index.cjs.map +1 -1
  97. package/components/topojson-map/index.d.ts +1 -1
  98. package/components/topojson-map/index.js +21 -25
  99. package/components/topojson-map/index.js.map +1 -1
  100. package/components/treemap/index.cjs +1 -1
  101. package/components/treemap/index.cjs.map +1 -1
  102. package/components/treemap/index.d.ts +1 -1
  103. package/components/treemap/index.js +21 -25
  104. package/components/treemap/index.js.map +1 -1
  105. package/components/xy-labels/index.cjs +1 -1
  106. package/components/xy-labels/index.cjs.map +1 -1
  107. package/components/xy-labels/index.d.ts +1 -1
  108. package/components/xy-labels/index.js +21 -25
  109. package/components/xy-labels/index.js.map +1 -1
  110. package/containers/single-container/index.cjs +1 -1
  111. package/containers/single-container/index.cjs.map +1 -1
  112. package/containers/single-container/index.js +23 -24
  113. package/containers/single-container/index.js.map +1 -1
  114. package/containers/xy-container/index.cjs +1 -1
  115. package/containers/xy-container/index.cjs.map +1 -1
  116. package/containers/xy-container/index.js +22 -29
  117. package/containers/xy-container/index.js.map +1 -1
  118. package/html-components/bullet-legend/index.cjs +1 -1
  119. package/html-components/bullet-legend/index.cjs.map +1 -1
  120. package/html-components/bullet-legend/index.d.ts +1 -1
  121. package/html-components/bullet-legend/index.js +20 -22
  122. package/html-components/bullet-legend/index.js.map +1 -1
  123. package/html-components/flow-legend/index.cjs +1 -1
  124. package/html-components/flow-legend/index.cjs.map +1 -1
  125. package/html-components/flow-legend/index.d.ts +1 -1
  126. package/html-components/flow-legend/index.js +20 -22
  127. package/html-components/flow-legend/index.js.map +1 -1
  128. package/html-components/leaflet-flow-map/index.cjs +1 -1
  129. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  130. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  131. package/html-components/leaflet-flow-map/index.js +21 -24
  132. package/html-components/leaflet-flow-map/index.js.map +1 -1
  133. package/html-components/leaflet-map/index.cjs +1 -1
  134. package/html-components/leaflet-map/index.cjs.map +1 -1
  135. package/html-components/leaflet-map/index.d.ts +1 -1
  136. package/html-components/leaflet-map/index.js +21 -24
  137. package/html-components/leaflet-map/index.js.map +1 -1
  138. package/html-components/rolling-pin-legend/index.cjs +1 -1
  139. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  140. package/html-components/rolling-pin-legend/index.d.ts +1 -1
  141. package/html-components/rolling-pin-legend/index.js +20 -22
  142. package/html-components/rolling-pin-legend/index.js.map +1 -1
  143. package/package.json +6 -5
  144. package/utils/context.cjs.map +1 -1
  145. package/utils/context.js +1 -1
  146. package/utils/context.js.map +1 -1
  147. package/utils/props.cjs +1 -1
  148. package/utils/props.cjs.map +1 -1
  149. package/utils/props.js +7 -7
  150. package/utils/props.js.map +1 -1
@@ -1,7 +1,7 @@
1
- import { defineComponent as m, computed as f, ref as p, onMounted as F, nextTick as g, onUnmounted as v, watch as c, openBlock as S, createElementBlock as M } from "vue";
2
- import { LeafletMap as s } from "@unovis/ts";
3
- import { useForwardProps as b, arePropsEqual as L } from "../../utils/props.js";
4
- const C = s.selectors, w = /* @__PURE__ */ m({
1
+ import { defineComponent as d, computed as y, ref as a, onMounted as m, nextTick as f, onUnmounted as F, watch as r, openBlock as g, createElementBlock as v } from "vue";
2
+ import { LeafletMap as p } from "@unovis/ts";
3
+ import { useForwardProps as S, arePropsEqual as M } from "../../utils/props.js";
4
+ const h = p.selectors, k = /* @__PURE__ */ d({
5
5
  __name: "index",
6
6
  props: {
7
7
  width: {},
@@ -55,32 +55,29 @@ const C = s.selectors, w = /* @__PURE__ */ m({
55
55
  attributes: {},
56
56
  data: {}
57
57
  },
58
- setup(d, { expose: y }) {
59
- const l = d, e = f(() => l.data), o = b(l), n = p(), i = p();
60
- return F(() => {
61
- g(() => {
62
- i.value && (n.value = new s(i.value, o.value, e.value));
58
+ setup(c, { expose: s }) {
59
+ const i = c, n = y(() => i.data), e = S(i), t = a(), o = a();
60
+ return m(() => {
61
+ f(() => {
62
+ o.value && (t.value = new p(o.value, e.value, n.value));
63
63
  });
64
- }), v(() => {
65
- var t;
66
- (t = n.value) == null || t.destroy();
67
- }), c(o, (t, u) => {
68
- var a, r;
69
- L(t, u) || ((a = n.value) == null || a.setConfig(o.value), (r = n.value) == null || r.render());
70
- }), c(e, () => {
71
- var t;
72
- (t = n.value) == null || t.setData(e.value);
73
- }), y({
74
- component: n
75
- }), (t, u) => (S(), M("div", {
64
+ }), F(() => {
65
+ t.value?.destroy();
66
+ }), r(e, (l, u) => {
67
+ M(l, u) || (t.value?.setConfig(e.value), t.value?.render());
68
+ }), r(n, () => {
69
+ t.value?.setData(n.value);
70
+ }), s({
71
+ component: t
72
+ }), (l, u) => (g(), v("div", {
76
73
  "data-vis-leaflet-map": "",
77
74
  ref_key: "elRef",
78
- ref: i
75
+ ref: o
79
76
  }, null, 512));
80
77
  }
81
78
  });
82
79
  export {
83
- C as VisLeafletMapSelectors,
84
- w as default
80
+ h as VisLeafletMapSelectors,
81
+ k as default
85
82
  };
86
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum extends GenericDataRecord\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { LeafletMap, LeafletMapConfigInterface, GenericDataRecord, MapLibreStyleSpecs } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = LeafletMapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<LeafletMap<Datum>>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new LeafletMap<Datum>(elRef.value, config.value, data.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n 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 VisLeafletMapSelectors = LeafletMap.selectors\n</script>\n\n<template>\n <div data-vis-leaflet-map ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-leaflet-map] {\n display:block;\n position:relative;\n }\n</style>\n"],"names":["VisLeafletMapSelectors","LeafletMap","props","__props","data","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","_b","__expose","_createElementBlock"],"mappings":";;;AAkDO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzCjD,UAAMC,IAAQC,GAERC,IAAOC,EAAS,MAAMH,EAAM,IAAI,GAEhCI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIP,EAAkBS,EAAM,OAAOJ,EAAO,OAAOF,EAAK,KAAK;AAAA,MAG/E,CAAC;AAAA,IACH,CAAC,GAEDS,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,OAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO,SAClCa,IAAAX,EAAU,UAAV,QAAAW,EAAiB;AAAA,IAErB,CAAC,GAEDJ,EAAMX,GAAM,MAAM;;AAChB,OAAAU,IAAAN,EAAU,UAAV,QAAAM,EAAiB,QAAQV,EAAK;AAAA,IAChC,CAAC,GAEDgB,EAAa;AAAA,MACX,WAAAZ;AAAA,IAAA,CACD,mBAQCa,EAAuC,OAAA;AAAA,MAAlC,wBAAA;AAAA,eAAyB;AAAA,MAAJ,KAAIX;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum extends GenericDataRecord\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { LeafletMap, LeafletMapConfigInterface, GenericDataRecord, MapLibreStyleSpecs } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = LeafletMapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<LeafletMap<Datum>>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new LeafletMap<Datum>(elRef.value, config.value, data.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n 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 VisLeafletMapSelectors = LeafletMap.selectors\n</script>\n\n<template>\n <div data-vis-leaflet-map ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-leaflet-map] {\n display:block;\n position:relative;\n }\n</style>\n"],"names":["VisLeafletMapSelectors","LeafletMap","props","__props","data","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AAkDO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzCjD,UAAMC,IAAQC,GAERC,IAAOC,EAAS,MAAMH,EAAM,IAAI,GAEhCI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIP,EAAkBS,EAAM,OAAOJ,EAAO,OAAOF,EAAK,KAAK;AAAA,MAG/E,CAAC;AAAA,IACH,CAAC,GAEDS,EAAY,MAAM;AAChB,MAAAL,EAAU,OAAO,QAAA;AAAA,IAEnB,CAAC,GAEDM,EAAMR,GAAQ,CAACS,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDM,EAAMV,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,mBAQCW,EAAuC,OAAA;AAAA,MAAlC,wBAAA;AAAA,eAAyB;AAAA,MAAJ,KAAIT;AAAA,IAAA;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),u=require("../../utils/props.cjs"),f=c.RollingPinLegend.selectors,g=e.defineComponent({__name:"index",props:{rects:{},leftLabelText:{},rightLabelText:{},labelClassName:{},labelFontSize:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(d,{expose:p}){const r=d;e.computed(()=>r.data);const t=u.useForwardProps(r),n=e.ref(),l=e.ref();return e.onMounted(()=>{e.nextTick(()=>{l.value&&(n.value=new c.RollingPinLegend(l.value,t.value))})}),e.onUnmounted(()=>{var o;(o=n.value)==null||o.destroy()}),e.watch(t,(o,s)=>{var a,i;u.arePropsEqual(o,s)||((a=n.value)==null||a.setConfig(t.value),(i=n.value)==null||i.render())}),p({component:n}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-rolling-pin-legend":"",ref_key:"elRef",ref:l},null,512))}});exports.VisRollingPinLegendSelectors=f;exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),a=require("../../utils/props.cjs"),d=i.RollingPinLegend.selectors,p=e.defineComponent({__name:"index",props:{rects:{},leftLabelText:{},rightLabelText:{},labelClassName:{},labelFontSize:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(u,{expose:c}){const l=u;e.computed(()=>l.data);const o=a.useForwardProps(l),n=e.ref(),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value&&(n.value=new i.RollingPinLegend(t.value,o.value))})}),e.onUnmounted(()=>{n.value?.destroy()}),e.watch(o,(r,s)=>{a.arePropsEqual(r,s)||(n.value?.setConfig(o.value),n.value?.render())}),c({component:n}),(r,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-rolling-pin-legend":"",ref_key:"elRef",ref:t},null,512))}});exports.VisRollingPinLegendSelectors=d;exports.default=p;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = RollingPinLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","_b","__expose","_createElementBlock"],"mappings":"8LA+CaA,EAA+BC,EAAAA,iBAAiB,0MAtC7D,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,iBAAiBQ,EAAM,MAAOJ,EAAO,KAAK,EAGlE,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAEnB,CAAC,EAEDC,EAAAA,MAAMT,EAAQ,CAACU,EAAMC,IAAS,SACvBC,EAAAA,cAAcF,EAAMC,CAAI,KAC3BH,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UAAUR,EAAO,QAClCa,EAAAX,EAAU,QAAV,MAAAW,EAAiB,SAErB,CAAC,EAGDC,EAAa,CACX,UAAAZ,CAAA,CACD,wBAQCa,EAAAA,mBAA8C,MAAA,CAAzC,8BAAA,WAAgC,QAAJ,IAAIX,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = RollingPinLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA+CaA,EAA+BC,EAAAA,iBAAiB,0MAtC7D,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,iBAAiBQ,EAAM,MAAOJ,EAAO,KAAK,EAGlE,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CAEnB,CAAC,EAEDM,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAGDU,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAA8C,MAAA,CAAzC,8BAAA,WAAgC,QAAJ,IAAIT,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { RollingPinLegend, RollingPinLegendConfigInterface } from '@unovis/ts';
2
2
 
3
- export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/dist/components/rolling-pin-legend/style");
3
+ export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/components/rolling-pin-legend/style");
4
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<RollingPinLegendConfigInterface & {
5
5
  data?: null;
6
6
  }>>, {
@@ -1,7 +1,7 @@
1
- import { defineComponent as u, computed as f, ref as i, onMounted as m, nextTick as v, onUnmounted as g, watch as x, openBlock as _, createElementBlock as P } from "vue";
2
- import { RollingPinLegend as c } from "@unovis/ts";
3
- import { useForwardProps as b, arePropsEqual as k } from "../../utils/props.js";
4
- const w = c.selectors, y = /* @__PURE__ */ u({
1
+ import { defineComponent as d, computed as p, ref as a, onMounted as u, nextTick as f, onUnmounted as m, watch as v, openBlock as g, createElementBlock as x } from "vue";
2
+ import { RollingPinLegend as s } from "@unovis/ts";
3
+ import { useForwardProps as _, arePropsEqual as P } from "../../utils/props.js";
4
+ const R = s.selectors, h = /* @__PURE__ */ d({
5
5
  __name: "index",
6
6
  props: {
7
7
  rects: {},
@@ -12,31 +12,29 @@ const w = c.selectors, y = /* @__PURE__ */ u({
12
12
  renderIntoProvidedDomNode: { type: Boolean },
13
13
  data: {}
14
14
  },
15
- setup(d, { expose: p }) {
16
- const l = d;
17
- f(() => l.data);
18
- const n = b(l), e = i(), t = i();
19
- return m(() => {
20
- v(() => {
21
- t.value && (e.value = new c(t.value, n.value));
15
+ setup(i, { expose: c }) {
16
+ const t = i;
17
+ p(() => t.data);
18
+ const o = _(t), e = a(), n = a();
19
+ return u(() => {
20
+ f(() => {
21
+ n.value && (e.value = new s(n.value, o.value));
22
22
  });
23
- }), g(() => {
24
- var o;
25
- (o = e.value) == null || o.destroy();
26
- }), x(n, (o, r) => {
27
- var a, s;
28
- k(o, r) || ((a = e.value) == null || a.setConfig(n.value), (s = e.value) == null || s.render());
29
- }), p({
23
+ }), m(() => {
24
+ e.value?.destroy();
25
+ }), v(o, (l, r) => {
26
+ P(l, r) || (e.value?.setConfig(o.value), e.value?.render());
27
+ }), c({
30
28
  component: e
31
- }), (o, r) => (_(), P("div", {
29
+ }), (l, r) => (g(), x("div", {
32
30
  "data-vis-rolling-pin-legend": "",
33
31
  ref_key: "elRef",
34
- ref: t
32
+ ref: n
35
33
  }, null, 512));
36
34
  }
37
35
  });
38
36
  export {
39
- w as VisRollingPinLegendSelectors,
40
- y as default
37
+ R as VisRollingPinLegendSelectors,
38
+ h as default
41
39
  };
42
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = RollingPinLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","_b","__expose","_createElementBlock"],"mappings":";;;AA+CO,MAAMA,IAA+BC,EAAiB;;;;;;;;;;;;AAtC7D,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAiBQ,EAAM,OAAOJ,EAAO,KAAK;AAAA,MAGlE,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,OAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO,SAClCa,IAAAX,EAAU,UAAV,QAAAW,EAAiB;AAAA,IAErB,CAAC,GAGDC,EAAa;AAAA,MACX,WAAAZ;AAAA,IAAA,CACD,mBAQCa,EAA8C,OAAA;AAAA,MAAzC,+BAAA;AAAA,eAAgC;AAAA,MAAJ,KAAIX;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = RollingPinLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA+CO,MAAMA,IAA+BC,EAAiB;;;;;;;;;;;;AAtC7D,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAiBQ,EAAM,OAAOJ,EAAO,KAAK;AAAA,MAGlE,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;AAChB,MAAAL,EAAU,OAAO,QAAA;AAAA,IAEnB,CAAC,GAEDM,EAAMR,GAAQ,CAACS,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAGDU,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,mBAQCW,EAA8C,OAAA;AAAA,MAAzC,+BAAA;AAAA,eAAgC;AAAA,MAAJ,KAAIT;AAAA,IAAA;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unovis/vue",
3
3
  "description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
4
- "version": "1.6.6-beta.0",
4
+ "version": "1.6.6",
5
5
  "packageManager": "pnpm@10.23.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -50,10 +50,11 @@
50
50
  "generate": "rollup -c ./autogen/rollup.config.js; node .autogen.cjs; rm .autogen.cjs",
51
51
  "publish:dist": "cd ./dist; npm publish",
52
52
  "build:gallery": "vite build --mode gallery",
53
- "gallery": "vite"
53
+ "gallery": "vite",
54
+ "license:check": "pnpm license-report --config=../../lic-report-config.json > licences.md"
54
55
  },
55
56
  "peerDependencies": {
56
- "@unovis/ts": "1.6.6-beta.0",
57
+ "@unovis/ts": "1.6.6",
57
58
  "vue": "^3"
58
59
  },
59
60
  "devDependencies": {
@@ -70,8 +71,8 @@
70
71
  "rollup-plugin-commonjs": "^10.1.0",
71
72
  "rollup-plugin-typescript2": "^0.31.1",
72
73
  "tslib": "^2.3.1",
73
- "typescript": "~5.6.3",
74
- "vite": "^6.2.4",
74
+ "typescript": "catalog:",
75
+ "vite": "catalog:",
75
76
  "vite-plugin-css-injected-by-js": "^3.3.0",
76
77
  "vite-plugin-dts": "^3.5.3",
77
78
  "vue": "^3.5.13",
@@ -1 +1 @@
1
- {"version":3,"file":"context.cjs","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"gFAGO,MAAMA,EAAuB,OAAO,sBAAsB,EAMpDC,EAAqB,OAAO,oBAAoB,EAMhDC,EAAuB,OAAO,sBAAsB,EAMpDC,EAAkB,OAAO,iBAAiB,EAM1CC,EAAyB,OAAO,wBAAwB"}
1
+ {"version":3,"file":"context.cjs","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"gFAGO,MAAMA,SAA8B,sBAAsB,EAMpDC,SAA4B,oBAAoB,EAMhDC,SAA8B,sBAAsB,EAMpDC,SAAyB,iBAAiB,EAM1CC,SAAgC,wBAAwB"}
package/utils/context.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = Symbol("componentAccessorKey"), s = Symbol("tooltipAccessorKey"), c = Symbol("crosshairAccessorKey"), e = Symbol("axisAccessorKey"), t = Symbol("annotationsAccessorKey");
1
+ const o = /* @__PURE__ */ Symbol("componentAccessorKey"), s = /* @__PURE__ */ Symbol("tooltipAccessorKey"), c = /* @__PURE__ */ Symbol("crosshairAccessorKey"), e = /* @__PURE__ */ Symbol("axisAccessorKey"), t = /* @__PURE__ */ Symbol("annotationsAccessorKey");
2
2
  export {
3
3
  t as annotationsAccessorKey,
4
4
  e as axisAccessorKey,
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"AAGO,MAAMA,IAAuB,OAAO,sBAAsB,GAMpDC,IAAqB,OAAO,oBAAoB,GAMhDC,IAAuB,OAAO,sBAAsB,GAMpDC,IAAkB,OAAO,iBAAiB,GAM1CC,IAAyB,OAAO,wBAAwB;"}
1
+ {"version":3,"file":"context.js","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"AAGO,MAAMA,2BAA8B,sBAAsB,GAMpDC,2BAA4B,oBAAoB,GAMhDC,2BAA8B,sBAAsB,GAMpDC,2BAAyB,iBAAiB,GAM1CC,2BAAgC,wBAAwB;"}
package/utils/props.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@unovis/ts"),r=require("vue");function a(s,e){return c.isEqual(s,e)}function i(s){const e=r.getCurrentInstance(),n=r.useAttrs();return r.computed(()=>{const t={},u=(e==null?void 0:e.vnode.props)??{};return Object.keys(u).forEach(o=>{t[r.camelize(o)]=s[r.camelize(o)]}),{...t,...n}})}exports.arePropsEqual=a;exports.useForwardProps=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@unovis/ts"),e=require("vue");function a(r,s){return c.isEqual(r,s)}function i(r){const s=e.getCurrentInstance(),n=e.useAttrs();return e.computed(()=>{const t={},u=s?.vnode.props??{};return Object.keys(u).forEach(o=>{t[e.camelize(o)]=r[e.camelize(o)]}),{...t,...n}})}exports.arePropsEqual=a;exports.useForwardProps=i;
2
2
  //# sourceMappingURL=props.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.cjs","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { camelize, computed, getCurrentInstance, useAttrs } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = useAttrs()\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","useAttrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":"+HAGO,SAASA,EAA0BC,EAAsBC,EAA+B,CAC7F,OAAOC,EAAAA,QAAQF,EAAWC,CAAS,CACrC,CAGO,SAASE,EAAgDC,EAAU,CACxE,MAAMC,EAAKC,EAAAA,mBAAA,EACLC,EAAQC,EAAAA,SAAA,EAEd,OAAOC,EAAAA,SAAS,IAAM,CACpB,MAAMC,EAAiB,CAAA,EACjBC,GAAgBN,GAAA,YAAAA,EAAI,MAAM,QAAS,CAAA,EAEzC,cAAO,KAAKM,CAAa,EAAE,QAASC,GAAQ,CAC1CF,EAAeG,EAAAA,SAASD,CAAG,CAAY,EAAIR,EAAMS,EAAAA,SAASD,CAAG,CAAC,CAChE,CAAC,EACM,CAAE,GAAGF,EAAgB,GAAGH,CAAA,CACjC,CAAC,CACH"}
1
+ {"version":3,"file":"props.cjs","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { camelize, computed, getCurrentInstance, useAttrs } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = useAttrs()\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","useAttrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":"+HAGO,SAASA,EAA0BC,EAAsBC,EAA+B,CAC7F,OAAOC,EAAAA,QAAQF,EAAWC,CAAS,CACrC,CAGO,SAASE,EAAgDC,EAAU,CACxE,MAAMC,EAAKC,EAAAA,mBAAA,EACLC,EAAQC,EAAAA,SAAA,EAEd,OAAOC,EAAAA,SAAS,IAAM,CACpB,MAAMC,EAAiB,CAAA,EACjBC,EAAgBN,GAAI,MAAM,OAAS,CAAA,EAEzC,cAAO,KAAKM,CAAa,EAAE,QAASC,GAAQ,CAC1CF,EAAeG,EAAAA,SAASD,CAAG,CAAY,EAAIR,EAAMS,EAAAA,SAASD,CAAG,CAAC,CAChE,CAAC,EACM,CAAE,GAAGF,EAAgB,GAAGH,CAAA,CACjC,CAAC,CACH"}
package/utils/props.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { isEqual as p } from "@unovis/ts";
2
2
  import { getCurrentInstance as u, useAttrs as a, computed as i, camelize as s } from "vue";
3
- function m(t, r) {
4
- return p(t, r);
3
+ function f(r, t) {
4
+ return p(r, t);
5
5
  }
6
- function P(t) {
7
- const r = u(), n = a();
6
+ function P(r) {
7
+ const t = u(), n = a();
8
8
  return i(() => {
9
- const o = {}, c = (r == null ? void 0 : r.vnode.props) ?? {};
9
+ const o = {}, c = t?.vnode.props ?? {};
10
10
  return Object.keys(c).forEach((e) => {
11
- o[s(e)] = t[s(e)];
11
+ o[s(e)] = r[s(e)];
12
12
  }), { ...o, ...n };
13
13
  });
14
14
  }
15
15
  export {
16
- m as arePropsEqual,
16
+ f as arePropsEqual,
17
17
  P as useForwardProps
18
18
  };
19
19
  //# sourceMappingURL=props.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { camelize, computed, getCurrentInstance, useAttrs } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = useAttrs()\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","useAttrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":";;AAGO,SAASA,EAA0BC,GAAsBC,GAA+B;AAC7F,SAAOC,EAAQF,GAAWC,CAAS;AACrC;AAGO,SAASE,EAAgDC,GAAU;AACxE,QAAMC,IAAKC,EAAA,GACLC,IAAQC,EAAA;AAEd,SAAOC,EAAS,MAAM;AACpB,UAAMC,IAAiB,CAAA,GACjBC,KAAgBN,KAAA,gBAAAA,EAAI,MAAM,UAAS,CAAA;AAEzC,kBAAO,KAAKM,CAAa,EAAE,QAAQ,CAACC,MAAQ;AAC1C,MAAAF,EAAeG,EAASD,CAAG,CAAY,IAAIR,EAAMS,EAASD,CAAG,CAAC;AAAA,IAChE,CAAC,GACM,EAAE,GAAGF,GAAgB,GAAGH,EAAA;AAAA,EACjC,CAAC;AACH;"}
1
+ {"version":3,"file":"props.js","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { camelize, computed, getCurrentInstance, useAttrs } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = useAttrs()\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","useAttrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":";;AAGO,SAASA,EAA0BC,GAAsBC,GAA+B;AAC7F,SAAOC,EAAQF,GAAWC,CAAS;AACrC;AAGO,SAASE,EAAgDC,GAAU;AACxE,QAAMC,IAAKC,EAAA,GACLC,IAAQC,EAAA;AAEd,SAAOC,EAAS,MAAM;AACpB,UAAMC,IAAiB,CAAA,GACjBC,IAAgBN,GAAI,MAAM,SAAS,CAAA;AAEzC,kBAAO,KAAKM,CAAa,EAAE,QAAQ,CAACC,MAAQ;AAC1C,MAAAF,EAAeG,EAASD,CAAG,CAAY,IAAIR,EAAMS,EAASD,CAAG,CAAC;AAAA,IAChE,CAAC,GACM,EAAE,GAAGF,GAAgB,GAAGH,EAAA;AAAA,EACjC,CAAC;AACH;"}