vvplot 0.3.0 → 0.4.1

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.
@@ -1698,6 +1698,15 @@ var VVPlot = (function(exports, vue) {
1698
1698
  }
1699
1699
  throw new Error(`Invalid level values: ${x2}`);
1700
1700
  }
1701
+ /**
1702
+ * Check if two GEnumLevel are equal, i.e. they have the same labels in the same order
1703
+ * @param {string[]} level
1704
+ */
1705
+ static isEqual(a, b) {
1706
+ if (a instanceof this && b instanceof this) {
1707
+ return a.length === b.length && Array(a.length).fill().every((_, i) => a[i].label === b[i].label);
1708
+ }
1709
+ }
1701
1710
  /**
1702
1711
  * build a GEnumLevel
1703
1712
  * @param {string[]} level
@@ -2651,7 +2660,7 @@ var VVPlot = (function(exports, vue) {
2651
2660
  result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
2652
2661
  }
2653
2662
  return result;
2654
- }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2663
+ }, { core_attrs: ["x", "y", "width", "height", "xnudge", "ynudge"] });
2655
2664
  const curve = Object.assign(function(data) {
2656
2665
  if (data.points != null) return data;
2657
2666
  let missingAes = ["x", "y"].filter((a) => data[a] == null);
@@ -6119,6 +6128,7 @@ var VVPlot = (function(exports, vue) {
6119
6128
  c = 100,
6120
6129
  l = 65,
6121
6130
  h_start = 0,
6131
+ alpha: alpha2 = 1,
6122
6132
  direction = 1,
6123
6133
  limits,
6124
6134
  oob: oob2 = oob_censor,
@@ -6133,7 +6143,7 @@ var VVPlot = (function(exports, vue) {
6133
6143
  v = this.oob(v, { min: scale_min, max: scale_max });
6134
6144
  if (v === null) return null_value;
6135
6145
  if (isNaN(v)) return na_value;
6136
- return hcl(h_start + h_min + h_interval * (v - scale_min) / scale_interval * direction, c, l).toString();
6146
+ return hcl(h_start + h_min + h_interval * (v - scale_min) / scale_interval * direction, c, l, alpha2).toString();
6137
6147
  });
6138
6148
  };
6139
6149
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
@@ -6225,12 +6235,13 @@ var VVPlot = (function(exports, vue) {
6225
6235
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
6226
6236
  }
6227
6237
  function palette_scale_auto({
6238
+ alpha: alpha2,
6228
6239
  limits,
6229
6240
  oob: oob2 = oob_censor,
6230
6241
  title,
6231
6242
  ...etc
6232
6243
  } = {}) {
6233
- let scale_hue = palette_scale_hue(), scale_gradient = palette_scale_gradient();
6244
+ let scale_hue = palette_scale_hue({ alpha: alpha2 }), scale_gradient = palette_scale_gradient();
6234
6245
  let fn = function(arr) {
6235
6246
  if (arr.level != null) {
6236
6247
  return scale_hue.call(this, arr);
@@ -6241,15 +6252,13 @@ var VVPlot = (function(exports, vue) {
6241
6252
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
6242
6253
  }
6243
6254
  function palette_scale_dynamic({
6244
- discrete,
6245
- continuous: continuous2,
6255
+ discrete = palette_scale_hue(),
6256
+ continuous: continuous2 = palette_scale_gradient(),
6246
6257
  limits,
6247
6258
  oob: oob2 = oob_censor,
6248
6259
  title,
6249
6260
  ...etc
6250
6261
  } = {}) {
6251
- discrete ??= palette_scale_hue();
6252
- continuous2 ??= palette_scale_gradient();
6253
6262
  let fn = function(arr) {
6254
6263
  if (arr.level != null) {
6255
6264
  return discrete.call(this, arr);
@@ -6260,7 +6269,7 @@ var VVPlot = (function(exports, vue) {
6260
6269
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
6261
6270
  }
6262
6271
  function shape_scale_discrete({ title, ...etc } = {}) {
6263
- let shapes = ["circle", "square", "triangle", "diamond", "plus"];
6272
+ let shapes = ["circle", "square", "triangle", "diamond", "plus", "cross"];
6264
6273
  let fn = function(arr) {
6265
6274
  return arr.map((v) => shapes[+v]);
6266
6275
  };
@@ -6601,6 +6610,9 @@ var VVPlot = (function(exports, vue) {
6601
6610
  if (obj == null) return {};
6602
6611
  return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, expr(k, v)]));
6603
6612
  }
6613
+ function is_categorical(v) {
6614
+ return typeof v === "string" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "object" && typeof v.valueOf() !== "number" && typeof v.valueOf() !== "bigint";
6615
+ }
6604
6616
  class GLayer {
6605
6617
  /**
6606
6618
  * Create a graphic layer from schema
@@ -6657,9 +6669,9 @@ var VVPlot = (function(exports, vue) {
6657
6669
  if ($$data == null) $$data = $data;
6658
6670
  $$aes = { ...$aes, ...$$aes };
6659
6671
  let data = {};
6660
- let fns = {};
6672
+ this.$fnames = {};
6661
6673
  for (const aes in $$aes) {
6662
- fns[aes] = String($$aes[aes]);
6674
+ this.$fnames[aes] = String($$aes[aes]);
6663
6675
  data[aes] = $$data.map($$aes[aes]);
6664
6676
  }
6665
6677
  data.$raw = $$data;
@@ -6699,21 +6711,18 @@ var VVPlot = (function(exports, vue) {
6699
6711
  ...vvgeom[$$geom]?.scale_attrs ?? []
6700
6712
  ]);
6701
6713
  this.$data = data;
6702
- this.$fns = fns;
6703
6714
  this.data = { ...data };
6704
6715
  for (const aes in data) {
6705
6716
  if ($$scales[aes] != null) {
6706
6717
  let scale = new Scale($$scales[aes]);
6707
6718
  scale.aesthetics = aes;
6708
- if (scale.title === void 0) {
6709
- scale.title = fns[aes];
6710
- }
6719
+ scale._title = this.$fnames[aes];
6711
6720
  let values = this.$data[aes];
6712
6721
  if (!values?.length) continue;
6713
6722
  if (!scale.asis) {
6714
6723
  if ($$levels?.[aes] != null) {
6715
6724
  scale.level = $$levels[aes];
6716
- } else if (values.some((v) => typeof v === "string")) {
6725
+ } else if (values.some(is_categorical)) {
6717
6726
  scale.level = GEnumLevel.from(values);
6718
6727
  } else {
6719
6728
  scale.extent = numutils.extent(values);
@@ -6780,15 +6789,13 @@ var VVPlot = (function(exports, vue) {
6780
6789
  if (!scale.asis) {
6781
6790
  if (levels?.[aes] != null) {
6782
6791
  scale.level = levels[aes];
6783
- } else if (values.some((v) => typeof v === "string")) {
6792
+ } else if (values.some(is_categorical)) {
6784
6793
  scale.level = GEnumLevel.from(values);
6785
6794
  } else {
6786
6795
  scale.extent = numutils.extent(values);
6787
6796
  }
6788
6797
  }
6789
- if (scale.title == null) {
6790
- scale.title = this.layers.map((layer) => layer.$fns?.[aes]).find((s) => s != null);
6791
- }
6798
+ scale._title = this.layers.reduce((v, layer) => v ?? layer.$fnames?.[aes], null);
6792
6799
  for (const layer of this.layers) {
6793
6800
  if (!layer.localScales.has(aes)) {
6794
6801
  layer.applyScale(aes, scale);
@@ -6823,7 +6830,7 @@ var VVPlot = (function(exports, vue) {
6823
6830
  let fn = vvgeom[layer.geom].get_values ?? vvgeom[layer.geom].get_range;
6824
6831
  return fn?.(layer.$data, aes);
6825
6832
  });
6826
- if (values.some((v) => typeof v === "string")) {
6833
+ if (values.some(is_categorical)) {
6827
6834
  this.levels[aes] = GEnumLevel.from(values);
6828
6835
  } else {
6829
6836
  values = this.layers.flatMap((layer) => vvgeom[layer.geom].get_range?.(layer.$data, aes)).filter((v) => !isNaN(v));
@@ -6934,6 +6941,9 @@ var VVPlot = (function(exports, vue) {
6934
6941
  let min = this.$limits?.min ?? (this.level ? 0 : this._limits?.min), max = this.$limits?.max ?? this.level?.length ?? this._limits?.max;
6935
6942
  return { 0: min, 1: max, length: 2, min, max };
6936
6943
  }
6944
+ toString() {
6945
+ return this.title ?? String(this._fn);
6946
+ }
6937
6947
  }
6938
6948
  class DiscreteCoordScale extends Function {
6939
6949
  constructor(level, { min, max } = {}) {
@@ -7087,6 +7097,7 @@ var VVPlot = (function(exports, vue) {
7087
7097
  return {
7088
7098
  x: __props.x,
7089
7099
  y: __props.y,
7100
+ color: __props.color || null,
7090
7101
  fill: __props.color || null,
7091
7102
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
7092
7103
  stroke: __props.stroke || null,
@@ -14338,6 +14349,7 @@ var VVPlot = (function(exports, vue) {
14338
14349
  return {
14339
14350
  x: __props.x,
14340
14351
  y: __props.y,
14352
+ color: __props.color || null,
14341
14353
  fill: __props.color || null,
14342
14354
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
14343
14355
  stroke: __props.stroke || null,
@@ -14583,7 +14595,9 @@ var VVPlot = (function(exports, vue) {
14583
14595
  const iRef = vue.useTemplateRef("i");
14584
14596
  function getPosition(event) {
14585
14597
  let rect2 = iRef.value.getBoundingClientRect();
14586
- let l = Math.trunc(event.clientX) - rect2.left - __props.layout.left, r = rect2.left + __props.layout.left + __props.layout.width - Math.trunc(event.clientX);
14598
+ let scaleX = rect2.width / iRef.value.getBBox().width;
14599
+ let offsetX = event.clientX - rect2.left;
14600
+ let l = offsetX / scaleX - __props.layout.left, r = __props.layout.left + __props.layout.width - offsetX / scaleX;
14587
14601
  let result = { l, r };
14588
14602
  let { x: x2, y: y2 } = __props.pos2coord({ h: l });
14589
14603
  if (x2) result.x = x2;
@@ -14618,11 +14632,13 @@ var VVPlot = (function(exports, vue) {
14618
14632
  moveTimer = clearTimeout(moveTimer);
14619
14633
  let hmin0 = 0, hmax0 = __props.layout.width;
14620
14634
  let boundary = __props.coord2pos(act);
14635
+ let rect2 = iRef.value.getBoundingClientRect();
14636
+ let scaleX = rect2.width / iRef.value.getBBox().width;
14621
14637
  e.target.setPointerCapture(e.pointerId);
14622
14638
  e.target.onpointermove = (ev) => {
14623
14639
  movementX += ev.movementX;
14624
14640
  if (!pointerMoved) return;
14625
- let dh = oob_squish_any(-movementX, { min: boundary.hmin - hmin0, max: boundary.hmax - hmax0 });
14641
+ let dh = oob_squish_any(-movementX / scaleX, { min: boundary.hmin - hmin0, max: boundary.hmax - hmax0 });
14626
14642
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({ hmin: hmin0 + dh, hmax: hmax0 + dh });
14627
14643
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
14628
14644
  };
@@ -14649,12 +14665,14 @@ var VVPlot = (function(exports, vue) {
14649
14665
  min: __props.coord2pos(act).hmin,
14650
14666
  max: __props.coord2pos({ hmin: coord0.hmax - mrh, hmax: coord0.hmin + mrh }).hmin
14651
14667
  };
14668
+ let rect2 = iRef.value.getBoundingClientRect();
14669
+ let scaleX = rect2.width / iRef.value.getBBox().width;
14652
14670
  let movementX2 = 0;
14653
14671
  e.target.setPointerCapture(e.pointerId);
14654
14672
  e.target.onpointermove = (ev) => {
14655
14673
  movementX2 += ev.movementX;
14656
14674
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({
14657
- hmin: oob_squish_any(hmax - (hmax - hmin) * position.r / Math.max(position.r - movementX2, 1), boundary),
14675
+ hmin: oob_squish_any(hmax - (hmax - hmin) * position.r / Math.max(position.r - movementX2 / scaleX, 1), boundary),
14658
14676
  hmax
14659
14677
  });
14660
14678
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
@@ -14677,6 +14695,8 @@ var VVPlot = (function(exports, vue) {
14677
14695
  min: __props.coord2pos({ hmin: coord0.hmax - mrh, hmax: coord0.hmin + mrh }).hmax,
14678
14696
  max: __props.coord2pos(act).hmax
14679
14697
  };
14698
+ let rect2 = iRef.value.getBoundingClientRect();
14699
+ rect2.width / iRef.value.getBBox().width;
14680
14700
  let movementX2 = 0;
14681
14701
  e.target.setPointerCapture(e.pointerId);
14682
14702
  e.target.onpointermove = (ev) => {
@@ -15002,7 +15022,9 @@ var VVPlot = (function(exports, vue) {
15002
15022
  const iRef = vue.useTemplateRef("i");
15003
15023
  function getPosition(event) {
15004
15024
  let rect2 = iRef.value.getBoundingClientRect();
15005
- let t = Math.trunc(event.clientY) - rect2.top - __props.layout.top, b = rect2.top + __props.layout.top + __props.layout.height - Math.trunc(event.clientY);
15025
+ let scaleY = rect2.height / iRef.value.getBBox().height;
15026
+ let offsetY = event.clientY - rect2.top;
15027
+ let t = offsetY / scaleY - __props.layout.top, b = __props.layout.top + __props.layout.height - offsetY / scaleY;
15006
15028
  let result = { t, b };
15007
15029
  let { x: x2, y: y2 } = __props.pos2coord({ v: t });
15008
15030
  if (x2) result.x = x2;
@@ -15037,11 +15059,13 @@ var VVPlot = (function(exports, vue) {
15037
15059
  moveTimer = clearTimeout(moveTimer);
15038
15060
  let vmin0 = 0, vmax0 = __props.layout.height;
15039
15061
  let boundary = __props.coord2pos(act);
15062
+ let rect2 = iRef.value.getBoundingClientRect();
15063
+ let scaleY = rect2.height / iRef.value.getBBox().height;
15040
15064
  e.target.setPointerCapture(e.pointerId);
15041
15065
  e.target.onpointermove = (ev) => {
15042
15066
  movementY += ev.movementY;
15043
15067
  if (!pointerMoved) return;
15044
- let dv = oob_squish_any(-movementY, { min: boundary.vmin - vmin0, max: boundary.vmax - vmax0 });
15068
+ let dv = oob_squish_any(-movementY / scaleY, { min: boundary.vmin - vmin0, max: boundary.vmax - vmax0 });
15045
15069
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({ vmin: vmin0 + dv, vmax: vmax0 + dv });
15046
15070
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15047
15071
  };
@@ -15068,12 +15092,14 @@ var VVPlot = (function(exports, vue) {
15068
15092
  min: __props.coord2pos(act).vmin,
15069
15093
  max: __props.coord2pos({ vmin: coord0.vmax - mrv, vmax: coord0.vmin + mrv }).vmin
15070
15094
  };
15095
+ let rect2 = iRef.value.getBoundingClientRect();
15096
+ let scaleY = rect2.height / iRef.value.getBBox().height;
15071
15097
  let movementY2 = 0;
15072
15098
  e.target.setPointerCapture(e.pointerId);
15073
15099
  e.target.onpointermove = (ev) => {
15074
15100
  movementY2 += ev.movementY;
15075
15101
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({
15076
- vmin: oob_squish_any(vmax - (vmax - vmin) * position.b / Math.max(position.b - movementY2, 1), boundary),
15102
+ vmin: oob_squish_any(vmax - (vmax - vmin) * position.b / Math.max(position.b - movementY2 / scaleY, 1), boundary),
15077
15103
  vmax
15078
15104
  });
15079
15105
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
@@ -15096,13 +15122,15 @@ var VVPlot = (function(exports, vue) {
15096
15122
  min: __props.coord2pos({ vmin: coord0.vmax - mrv, vmax: coord0.vmin + mrv }).vmax,
15097
15123
  max: __props.coord2pos(act).vmax
15098
15124
  };
15125
+ let rect2 = iRef.value.getBoundingClientRect();
15126
+ let scaleY = rect2.height / iRef.value.getBBox().height;
15099
15127
  let movementY2 = 0;
15100
15128
  e.target.setPointerCapture(e.pointerId);
15101
15129
  e.target.onpointermove = (ev) => {
15102
15130
  movementY2 += ev.movementY;
15103
15131
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({
15104
15132
  vmin,
15105
- vmax: oob_squish_any(vmin + (vmax - vmin) * position.t / Math.max(position.t + movementY2, 1), boundary)
15133
+ vmax: oob_squish_any(vmin + (vmax - vmin) * position.t / Math.max(position.t + movementY2 / scaleY, 1), boundary)
15106
15134
  });
15107
15135
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15108
15136
  };
@@ -15549,8 +15577,8 @@ var VVPlot = (function(exports, vue) {
15549
15577
  canvas2.addEventListener(evt, function(e) {
15550
15578
  if (e._vhandled) return;
15551
15579
  const rect2 = canvas2.getBoundingClientRect();
15552
- const x2 = e.clientX - rect2.left;
15553
- const y2 = e.clientY - rect2.top;
15580
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
15581
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
15554
15582
  for (const [path2, data] of path_data) {
15555
15583
  if (ctx.isPointInPath(path2, x2, y2)) {
15556
15584
  emit(evt, e, __props.getCoord(e), data);
@@ -15617,7 +15645,7 @@ var VVPlot = (function(exports, vue) {
15617
15645
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
15618
15646
  if (points.length === 0) continue;
15619
15647
  const path2d = new Path2D();
15620
- let interpolatorFn = interpolators[interpolate2] ?? natural$1;
15648
+ let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
15621
15649
  let interpolator = interpolatorFn(path2d);
15622
15650
  interpolator.lineStart();
15623
15651
  for (let i = 0; i < points.length; i++) {
@@ -15645,8 +15673,8 @@ var VVPlot = (function(exports, vue) {
15645
15673
  canvas2.addEventListener(evt, function(e) {
15646
15674
  if (e._vhandled) return;
15647
15675
  const rect2 = canvas2.getBoundingClientRect();
15648
- const x2 = e.clientX - rect2.left;
15649
- const y2 = e.clientY - rect2.top;
15676
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
15677
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
15650
15678
  for (const [path2, data] of path_data) {
15651
15679
  if (ctx.isPointInPath(path2, x2, y2)) {
15652
15680
  emit(evt, e, __props.getCoord(e), data);
@@ -15752,8 +15780,8 @@ var VVPlot = (function(exports, vue) {
15752
15780
  canvas2.addEventListener(evt, function(e) {
15753
15781
  if (e._vhandled) return;
15754
15782
  const rect2 = canvas2.getBoundingClientRect();
15755
- const x2 = e.clientX - rect2.left;
15756
- const y2 = e.clientY - rect2.top;
15783
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
15784
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
15757
15785
  for (const [path2, data] of path_data) {
15758
15786
  if (ctx.isPointInPath(path2, x2, y2)) {
15759
15787
  emit(evt, e, __props.getCoord(e), data);
@@ -15841,8 +15869,8 @@ var VVPlot = (function(exports, vue) {
15841
15869
  canvas2.addEventListener(evt, function(e) {
15842
15870
  if (e._vhandled) return;
15843
15871
  const rect2 = canvas2.getBoundingClientRect();
15844
- const x2 = e.clientX - rect2.left;
15845
- const y2 = e.clientY - rect2.top;
15872
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
15873
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
15846
15874
  for (const [path2, data] of path_data) {
15847
15875
  if (ctx.isPointInPath(path2, x2, y2)) {
15848
15876
  emit(evt, e, __props.getCoord(e), data);
@@ -15952,8 +15980,8 @@ var VVPlot = (function(exports, vue) {
15952
15980
  canvas2.addEventListener(evt, function(e) {
15953
15981
  if (e._vhandled) return;
15954
15982
  const rect2 = canvas2.getBoundingClientRect();
15955
- const x2 = e.clientX - rect2.left;
15956
- const y2 = e.clientY - rect2.top;
15983
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
15984
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
15957
15985
  for (const [path2, data] of path_data) {
15958
15986
  if (ctx.isPointInPath(path2, x2, y2)) {
15959
15987
  emit(evt, e, __props.getCoord(e), data);
@@ -16045,8 +16073,8 @@ var VVPlot = (function(exports, vue) {
16045
16073
  canvas2.addEventListener(evt, function(e) {
16046
16074
  if (e._vhandled) return;
16047
16075
  const rect2 = canvas2.getBoundingClientRect();
16048
- const x2 = e.clientX - rect2.left;
16049
- const y2 = e.clientY - rect2.top;
16076
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
16077
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
16050
16078
  for (const [path2, data] of path_data) {
16051
16079
  if (ctx.isPointInPath(path2, x2, y2)) {
16052
16080
  emit(evt, e, __props.getCoord(e), data);
@@ -16136,8 +16164,8 @@ var VVPlot = (function(exports, vue) {
16136
16164
  canvas2.addEventListener(evt, function(e) {
16137
16165
  if (e._vhandled) return;
16138
16166
  const rect2 = canvas2.getBoundingClientRect();
16139
- const x2 = e.clientX - rect2.left;
16140
- const y2 = e.clientY - rect2.top;
16167
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
16168
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
16141
16169
  for (const [path2, data] of path_data) {
16142
16170
  if (ctx.isPointInPath(path2, x2, y2)) {
16143
16171
  emit(evt, e, __props.getCoord(e), data);
@@ -16262,8 +16290,8 @@ var VVPlot = (function(exports, vue) {
16262
16290
  canvas2.addEventListener(evt, function(e) {
16263
16291
  if (e._vhandled) return;
16264
16292
  const rect2 = canvas2.getBoundingClientRect();
16265
- const x2 = e.clientX - rect2.left;
16266
- const y2 = e.clientY - rect2.top;
16293
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
16294
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
16267
16295
  for (const [path2, data] of path_data) {
16268
16296
  if (ctx.isPointInPath(path2, x2, y2)) {
16269
16297
  emit(evt, e, __props.getCoord(e), data);
@@ -16416,8 +16444,8 @@ var VVPlot = (function(exports, vue) {
16416
16444
  canvas2.addEventListener(evt, function(e) {
16417
16445
  if (e._vhandled) return;
16418
16446
  const rect2 = canvas2.getBoundingClientRect();
16419
- const x2 = e.clientX - rect2.left;
16420
- const y2 = e.clientY - rect2.top;
16447
+ const x2 = (e.clientX - rect2.left) * canvas2.width / rect2.width;
16448
+ const y2 = (e.clientY - rect2.top) * canvas2.height / rect2.height;
16421
16449
  for (const [path2, data] of path_data) {
16422
16450
  if (ctx.isPointInPath(path2, x2, y2)) {
16423
16451
  emit(evt, e, __props.getCoord(e), data);
@@ -16507,6 +16535,7 @@ var VVPlot = (function(exports, vue) {
16507
16535
  y: __props.y - __props.height / 2,
16508
16536
  width: __props.width,
16509
16537
  height: __props.height,
16538
+ color: __props.color || null,
16510
16539
  fill: __props.fill || null,
16511
16540
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16512
16541
  stroke: __props.color || null,
@@ -16544,6 +16573,7 @@ var VVPlot = (function(exports, vue) {
16544
16573
  },
16545
16574
  setup(__props) {
16546
16575
  const paths = {
16576
+ circle: "M0-0.5A0.5,0.5,0,1,1,0,0.5A0.5,0.5,0,1,1,0-0.5Z",
16547
16577
  square: "M-0.5-0.5H0.5V0.5H-0.5Z",
16548
16578
  triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
16549
16579
  diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
@@ -16553,6 +16583,7 @@ var VVPlot = (function(exports, vue) {
16553
16583
  const binds = vue.computed(() => {
16554
16584
  let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
16555
16585
  let result = {
16586
+ color: __props.color || null,
16556
16587
  fill: __props.color || null,
16557
16588
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16558
16589
  stroke: __props.stroke || null,
@@ -16561,10 +16592,11 @@ var VVPlot = (function(exports, vue) {
16561
16592
  "stroke-dasharray": parseLinetype(__props.linetype).join(" ") || null
16562
16593
  };
16563
16594
  if (d != null) {
16564
- let transform = `translate(${__props.x + __props.translateX},${__props.y + __props.translateY})`;
16565
- if (__props.size != 1) transform += `scale(${__props.size})`;
16566
- if (__props.angle) transform += `rotate(${__props.angle})`;
16567
- Object.assign(result, { d, transform });
16595
+ let transform = [], tslX = __props.x + __props.translateX, tslY = __props.y + __props.translateY;
16596
+ if (tslX !== 0 || tslY !== 0) transform.push(`translate(${tslX},${tslY})`);
16597
+ if (__props.size != 1) transform.push(`scale(${__props.size})`);
16598
+ if (__props.angle) transform.push(`rotate(${__props.angle})`);
16599
+ Object.assign(result, { d, transform: transform.join(" ") || null });
16568
16600
  } else {
16569
16601
  let transform = __props.translateX || __props.translateY ? `translate(${__props.translateX}, ${__props.translateY})` : null;
16570
16602
  Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform });
@@ -16604,6 +16636,7 @@ var VVPlot = (function(exports, vue) {
16604
16636
  x2: __props.x2,
16605
16637
  y1: __props.y1,
16606
16638
  y2: __props.y2,
16639
+ color: __props.color || null,
16607
16640
  stroke: __props.color || null,
16608
16641
  "stroke-width": __props.linewidth,
16609
16642
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16626,7 +16659,9 @@ var VVPlot = (function(exports, vue) {
16626
16659
  data: Object,
16627
16660
  coord2pos: Function,
16628
16661
  getCoord: Function,
16629
- layout: Object
16662
+ layout: Object,
16663
+ groupClass: null,
16664
+ groupStyle: null
16630
16665
  },
16631
16666
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16632
16667
  setup(__props, { emit: __emit }) {
@@ -16659,6 +16694,8 @@ var VVPlot = (function(exports, vue) {
16659
16694
  title,
16660
16695
  "translate-x": translateX = 0,
16661
16696
  "translate-y": translateY = 0,
16697
+ class: className,
16698
+ style,
16662
16699
  $raw
16663
16700
  }) => {
16664
16701
  const { hmin: x1, hmax: x22, vmin: y1, vmax: y22 } = __props.coord2pos({ xmin: $xmin, xmax: $xmax, ymin: $ymin, ymax: $ymax });
@@ -16685,7 +16722,9 @@ var VVPlot = (function(exports, vue) {
16685
16722
  alpha: alpha2,
16686
16723
  title,
16687
16724
  translateX,
16688
- translateY
16725
+ translateY,
16726
+ class: className,
16727
+ style
16689
16728
  },
16690
16729
  line: {
16691
16730
  x1: lx1,
@@ -16697,7 +16736,9 @@ var VVPlot = (function(exports, vue) {
16697
16736
  linewidth,
16698
16737
  alpha: alpha2,
16699
16738
  translateX,
16700
- translateY
16739
+ translateY,
16740
+ class: className,
16741
+ style
16701
16742
  },
16702
16743
  midline: {
16703
16744
  x1: mx1,
@@ -16709,7 +16750,9 @@ var VVPlot = (function(exports, vue) {
16709
16750
  linewidth: (linewidth ?? 1) * 2,
16710
16751
  alpha: alpha2,
16711
16752
  translateX,
16712
- translateY
16753
+ translateY,
16754
+ class: className,
16755
+ style
16713
16756
  },
16714
16757
  uwisker: {
16715
16758
  x1: uwx1,
@@ -16721,7 +16764,9 @@ var VVPlot = (function(exports, vue) {
16721
16764
  linewidth,
16722
16765
  alpha: alpha2,
16723
16766
  translateX,
16724
- translateY
16767
+ translateY,
16768
+ class: className,
16769
+ style
16725
16770
  },
16726
16771
  lwisker: {
16727
16772
  x1: lwx1,
@@ -16733,7 +16778,9 @@ var VVPlot = (function(exports, vue) {
16733
16778
  linewidth,
16734
16779
  alpha: alpha2,
16735
16780
  translateX,
16736
- translateY
16781
+ translateY,
16782
+ class: className,
16783
+ style
16737
16784
  },
16738
16785
  outliers: outliers?.map(({ x: x3, y: y3, $raw: $raw2 }) => {
16739
16786
  const { h: cx, v: cy } = __props.coord2pos({ x: x3, y: y3 });
@@ -16745,7 +16792,9 @@ var VVPlot = (function(exports, vue) {
16745
16792
  color: color2,
16746
16793
  alpha: alpha2,
16747
16794
  translateX,
16748
- translateY
16795
+ translateY,
16796
+ class: className,
16797
+ style
16749
16798
  };
16750
16799
  let von2 = Object.fromEntries(
16751
16800
  events.map((evt) => [evt, (e) => emit(evt, e, $raw2)])
@@ -16762,7 +16811,7 @@ var VVPlot = (function(exports, vue) {
16762
16811
  return (_ctx, _cache) => {
16763
16812
  return vue.openBlock(), vue.createElementBlock("g", null, [
16764
16813
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
16765
- return vue.openBlock(), vue.createElementBlock("g", null, [
16814
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16766
16815
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
16767
16816
  return vue.openBlock(), vue.createElementBlock("g", null, [
16768
16817
  vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
@@ -16780,7 +16829,7 @@ var VVPlot = (function(exports, vue) {
16780
16829
  }), 256))
16781
16830
  ]);
16782
16831
  }), 256))
16783
- ]);
16832
+ ], 16);
16784
16833
  }), 256))
16785
16834
  ]);
16786
16835
  };
@@ -16804,10 +16853,12 @@ var VVPlot = (function(exports, vue) {
16804
16853
  },
16805
16854
  setup(__props) {
16806
16855
  const binds = vue.computed(() => {
16807
- let interpolatorFn = interpolators[__props.interpolate] ?? natural$1;
16856
+ let interpolatorFn = typeof __props.interpolate == "function" ? __props.interpolate : interpolators[__props.interpolate] ?? natural$1;
16808
16857
  return {
16809
16858
  d: line().curve(interpolatorFn)(__props.points.map((p) => [p.x, p.y])),
16859
+ color: __props.color || null,
16810
16860
  fill: __props.fill || null,
16861
+ "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16811
16862
  stroke: __props.color || null,
16812
16863
  "stroke-width": __props.linewidth,
16813
16864
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16836,7 +16887,9 @@ var VVPlot = (function(exports, vue) {
16836
16887
  data: Object,
16837
16888
  coord2pos: Function,
16838
16889
  getCoord: Function,
16839
- layout: Object
16890
+ layout: Object,
16891
+ groupClass: null,
16892
+ groupStyle: null
16840
16893
  },
16841
16894
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16842
16895
  setup(__props, { emit: __emit }) {
@@ -16854,6 +16907,8 @@ var VVPlot = (function(exports, vue) {
16854
16907
  title,
16855
16908
  "translate-x": translateX = 0,
16856
16909
  "translate-y": translateY = 0,
16910
+ class: className,
16911
+ style,
16857
16912
  $raw,
16858
16913
  interpolate: interpolate2
16859
16914
  }) => {
@@ -16869,6 +16924,8 @@ var VVPlot = (function(exports, vue) {
16869
16924
  title,
16870
16925
  translateX,
16871
16926
  translateY,
16927
+ class: className,
16928
+ style,
16872
16929
  interpolate: interpolate2
16873
16930
  };
16874
16931
  let von = Object.fromEntries(
@@ -16880,11 +16937,11 @@ var VVPlot = (function(exports, vue) {
16880
16937
  return (_ctx, _cache) => {
16881
16938
  return vue.openBlock(), vue.createElementBlock("g", null, [
16882
16939
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
16883
- return vue.openBlock(), vue.createElementBlock("g", null, [
16940
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16884
16941
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
16885
16942
  return vue.openBlock(), vue.createBlock(_sfc_main$K, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
16886
16943
  }), 256))
16887
- ]);
16944
+ ], 16);
16888
16945
  }), 256))
16889
16946
  ]);
16890
16947
  };
@@ -16918,6 +16975,7 @@ var VVPlot = (function(exports, vue) {
16918
16975
  cy: __props.cy,
16919
16976
  rx: __props.rx,
16920
16977
  ry: __props.ry,
16978
+ color: __props.color || null,
16921
16979
  fill: __props.fill || null,
16922
16980
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16923
16981
  stroke: __props.color || null,
@@ -16943,7 +17001,9 @@ var VVPlot = (function(exports, vue) {
16943
17001
  data: Object,
16944
17002
  coord2pos: Function,
16945
17003
  getCoord: Function,
16946
- layout: Object
17004
+ layout: Object,
17005
+ groupClass: null,
17006
+ groupStyle: null
16947
17007
  },
16948
17008
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16949
17009
  setup(__props, { emit: __emit }) {
@@ -16965,6 +17025,8 @@ var VVPlot = (function(exports, vue) {
16965
17025
  title,
16966
17026
  "translate-x": translateX = 0,
16967
17027
  "translate-y": translateY = 0,
17028
+ class: className,
17029
+ style,
16968
17030
  $raw
16969
17031
  }) => {
16970
17032
  let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
@@ -16980,9 +17042,9 @@ var VVPlot = (function(exports, vue) {
16980
17042
  let vbind = {
16981
17043
  cx: ch,
16982
17044
  cy: cv,
16983
- rx: 1 / Math.sqrt(tr / 2 + disc),
16984
- ry: 1 / Math.sqrt(tr / 2 - disc),
16985
- angle: -Math.atan2(2 * B, A - C) / 2 * 180 / Math.PI,
17045
+ rx: 1 / Math.sqrt(tr / 2 + disc) || 0,
17046
+ ry: 1 / Math.sqrt(tr / 2 - disc) || 0,
17047
+ angle: -Math.atan2(2 * B, A - C) / 2 * 180 / Math.PI || 0,
16986
17048
  fill,
16987
17049
  color: color2,
16988
17050
  linetype,
@@ -16990,7 +17052,9 @@ var VVPlot = (function(exports, vue) {
16990
17052
  alpha: alpha2,
16991
17053
  title,
16992
17054
  translateX,
16993
- translateY
17055
+ translateY,
17056
+ class: className,
17057
+ style
16994
17058
  };
16995
17059
  let von = Object.fromEntries(
16996
17060
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17001,11 +17065,11 @@ var VVPlot = (function(exports, vue) {
17001
17065
  return (_ctx, _cache) => {
17002
17066
  return vue.openBlock(), vue.createElementBlock("g", null, [
17003
17067
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17004
- return vue.openBlock(), vue.createElementBlock("g", null, [
17068
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17005
17069
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17006
17070
  return vue.openBlock(), vue.createBlock(_sfc_main$I, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17007
17071
  }), 256))
17008
- ]);
17072
+ ], 16);
17009
17073
  }), 256))
17010
17074
  ]);
17011
17075
  };
@@ -17019,7 +17083,9 @@ var VVPlot = (function(exports, vue) {
17019
17083
  data: Object,
17020
17084
  coord2pos: Function,
17021
17085
  getCoord: Function,
17022
- layout: Object
17086
+ layout: Object,
17087
+ groupClass: null,
17088
+ groupStyle: null
17023
17089
  },
17024
17090
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17025
17091
  setup(__props, { emit: __emit }) {
@@ -17039,6 +17105,8 @@ var VVPlot = (function(exports, vue) {
17039
17105
  title,
17040
17106
  "translate-x": translateX = 0,
17041
17107
  "translate-y": translateY = 0,
17108
+ class: className,
17109
+ style,
17042
17110
  $raw
17043
17111
  }) => {
17044
17112
  const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
@@ -17055,7 +17123,9 @@ var VVPlot = (function(exports, vue) {
17055
17123
  alpha: alpha2,
17056
17124
  title,
17057
17125
  translateX,
17058
- translateY
17126
+ translateY,
17127
+ class: className,
17128
+ style
17059
17129
  };
17060
17130
  let von = Object.fromEntries(
17061
17131
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17066,11 +17136,11 @@ var VVPlot = (function(exports, vue) {
17066
17136
  return (_ctx, _cache) => {
17067
17137
  return vue.openBlock(), vue.createElementBlock("g", null, [
17068
17138
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17069
- return vue.openBlock(), vue.createElementBlock("g", null, [
17139
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17070
17140
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17071
17141
  return vue.openBlock(), vue.createBlock(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17072
17142
  }), 256))
17073
- ]);
17143
+ ], 16);
17074
17144
  }), 256))
17075
17145
  ]);
17076
17146
  };
@@ -17084,7 +17154,9 @@ var VVPlot = (function(exports, vue) {
17084
17154
  data: Object,
17085
17155
  coord2pos: Function,
17086
17156
  getCoord: Function,
17087
- layout: Object
17157
+ layout: Object,
17158
+ groupClass: null,
17159
+ groupStyle: null
17088
17160
  },
17089
17161
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17090
17162
  setup(__props, { emit: __emit }) {
@@ -17113,6 +17185,8 @@ var VVPlot = (function(exports, vue) {
17113
17185
  "text-length": textLength,
17114
17186
  "font-family": fontFamily = "sans-serif",
17115
17187
  "text-anchor": textAnchor,
17188
+ class: className,
17189
+ style,
17116
17190
  $raw
17117
17191
  }) => {
17118
17192
  if (label == null) return null;
@@ -17137,6 +17211,8 @@ var VVPlot = (function(exports, vue) {
17137
17211
  angle: angle2,
17138
17212
  translateX,
17139
17213
  translateY,
17214
+ class: className,
17215
+ style,
17140
17216
  anchorX,
17141
17217
  anchorY,
17142
17218
  dockX,
@@ -17154,11 +17230,11 @@ var VVPlot = (function(exports, vue) {
17154
17230
  return (_ctx, _cache) => {
17155
17231
  return vue.openBlock(), vue.createElementBlock("g", null, [
17156
17232
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17157
- return vue.openBlock(), vue.createElementBlock("g", null, [
17233
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17158
17234
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17159
17235
  return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17160
17236
  }), 256))
17161
- ]);
17237
+ ], 16);
17162
17238
  }), 256))
17163
17239
  ]);
17164
17240
  };
@@ -17172,7 +17248,9 @@ var VVPlot = (function(exports, vue) {
17172
17248
  data: Object,
17173
17249
  coord2pos: Function,
17174
17250
  getCoord: Function,
17175
- layout: Object
17251
+ layout: Object,
17252
+ groupClass: null,
17253
+ groupStyle: null
17176
17254
  },
17177
17255
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17178
17256
  setup(__props, { emit: __emit }) {
@@ -17198,6 +17276,8 @@ var VVPlot = (function(exports, vue) {
17198
17276
  "font-family": fontFamily = "sans-serif",
17199
17277
  "text-align": textAlign = "start",
17200
17278
  inset = 0,
17279
+ class: className,
17280
+ style,
17201
17281
  $raw
17202
17282
  }) => {
17203
17283
  if (label == null) return null;
@@ -17206,14 +17286,17 @@ var VVPlot = (function(exports, vue) {
17206
17286
  if (x1 < xlim_min && x22 < xlim_min || x1 > xlim_max && x22 > xlim_max || y1 < ylim_min && y22 < ylim_min || y1 > ylim_max && y22 > ylim_max) return null;
17207
17287
  let radian = Math.atan2(y22 - y1, x22 - x1);
17208
17288
  let vbind = {
17209
- fill: color2,
17289
+ color: color2 || null,
17290
+ fill: color2 || null,
17291
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17210
17292
  "font-size": size * 4,
17211
- stroke,
17293
+ stroke: stroke || null,
17212
17294
  "stroke-width": linewidth,
17213
17295
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17214
- "fill-opacity": alpha2,
17215
- "stroke-opacity": alpha2,
17216
- "font-family": fontFamily
17296
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17297
+ "font-family": fontFamily,
17298
+ class: className,
17299
+ style
17217
17300
  };
17218
17301
  let von = Object.fromEntries(
17219
17302
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17328,7 +17411,7 @@ var VVPlot = (function(exports, vue) {
17328
17411
  return (_ctx, _cache) => {
17329
17412
  return vue.openBlock(), vue.createElementBlock("g", null, [
17330
17413
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17331
- return vue.openBlock(), vue.createElementBlock("g", null, [
17414
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17332
17415
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von, textFragments, title]) => {
17333
17416
  return vue.openBlock(), vue.createElementBlock("text", vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von, true)), [
17334
17417
  vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
@@ -17338,7 +17421,7 @@ var VVPlot = (function(exports, vue) {
17338
17421
  }), 256))
17339
17422
  ], 16);
17340
17423
  }), 256))
17341
- ]);
17424
+ ], 16);
17342
17425
  }), 256))
17343
17426
  ]);
17344
17427
  };
@@ -17352,7 +17435,9 @@ var VVPlot = (function(exports, vue) {
17352
17435
  data: Object,
17353
17436
  coord2pos: Function,
17354
17437
  getCoord: Function,
17355
- layout: Object
17438
+ layout: Object,
17439
+ groupClass: null,
17440
+ groupStyle: null
17356
17441
  },
17357
17442
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17358
17443
  setup(__props, { emit: __emit }) {
@@ -17374,6 +17459,8 @@ var VVPlot = (function(exports, vue) {
17374
17459
  "translate-x": translateX = 0,
17375
17460
  "translate-y": translateY = 0,
17376
17461
  angle: angle2,
17462
+ class: className,
17463
+ style,
17377
17464
  $raw
17378
17465
  }) => {
17379
17466
  const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
@@ -17391,7 +17478,9 @@ var VVPlot = (function(exports, vue) {
17391
17478
  title,
17392
17479
  angle: angle2,
17393
17480
  translateX,
17394
- translateY
17481
+ translateY,
17482
+ class: className,
17483
+ style
17395
17484
  };
17396
17485
  let von = Object.fromEntries(
17397
17486
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17402,11 +17491,11 @@ var VVPlot = (function(exports, vue) {
17402
17491
  return (_ctx, _cache) => {
17403
17492
  return vue.openBlock(), vue.createElementBlock("g", null, [
17404
17493
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17405
- return vue.openBlock(), vue.createElementBlock("g", null, [
17494
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17406
17495
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17407
17496
  return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17408
17497
  }), 256))
17409
- ]);
17498
+ ], 16);
17410
17499
  }), 256))
17411
17500
  ]);
17412
17501
  };
@@ -17430,6 +17519,7 @@ var VVPlot = (function(exports, vue) {
17430
17519
  const binds = vue.computed(() => {
17431
17520
  return {
17432
17521
  points: __props.points.map((p) => `${p.x},${p.y}`).join(" "),
17522
+ color: __props.color || null,
17433
17523
  fill: __props.fill || null,
17434
17524
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
17435
17525
  stroke: __props.color || null,
@@ -17454,7 +17544,9 @@ var VVPlot = (function(exports, vue) {
17454
17544
  data: Object,
17455
17545
  coord2pos: Function,
17456
17546
  getCoord: Function,
17457
- layout: Object
17547
+ layout: Object,
17548
+ groupClass: null,
17549
+ groupStyle: null
17458
17550
  },
17459
17551
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17460
17552
  setup(__props, { emit: __emit }) {
@@ -17472,6 +17564,8 @@ var VVPlot = (function(exports, vue) {
17472
17564
  title,
17473
17565
  "translate-x": translateX = 0,
17474
17566
  "translate-y": translateY = 0,
17567
+ class: className,
17568
+ style,
17475
17569
  $raw
17476
17570
  }) => {
17477
17571
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p)));
@@ -17485,7 +17579,9 @@ var VVPlot = (function(exports, vue) {
17485
17579
  alpha: alpha2,
17486
17580
  title,
17487
17581
  translateX,
17488
- translateY
17582
+ translateY,
17583
+ class: className,
17584
+ style
17489
17585
  };
17490
17586
  let von = Object.fromEntries(
17491
17587
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17496,11 +17592,11 @@ var VVPlot = (function(exports, vue) {
17496
17592
  return (_ctx, _cache) => {
17497
17593
  return vue.openBlock(), vue.createElementBlock("g", null, [
17498
17594
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17499
- return vue.openBlock(), vue.createElementBlock("g", null, [
17595
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17500
17596
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17501
17597
  return vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17502
17598
  }), 256))
17503
- ]);
17599
+ ], 16);
17504
17600
  }), 256))
17505
17601
  ]);
17506
17602
  };
@@ -17514,7 +17610,9 @@ var VVPlot = (function(exports, vue) {
17514
17610
  data: Object,
17515
17611
  coord2pos: Function,
17516
17612
  getCoord: Function,
17517
- layout: Object
17613
+ layout: Object,
17614
+ groupClass: null,
17615
+ groupStyle: null
17518
17616
  },
17519
17617
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17520
17618
  setup(__props, { emit: __emit }) {
@@ -17535,6 +17633,8 @@ var VVPlot = (function(exports, vue) {
17535
17633
  title,
17536
17634
  "translate-x": translateX = 0,
17537
17635
  "translate-y": translateY = 0,
17636
+ class: className,
17637
+ style,
17538
17638
  $raw
17539
17639
  }) => {
17540
17640
  const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
@@ -17551,7 +17651,9 @@ var VVPlot = (function(exports, vue) {
17551
17651
  alpha: alpha2,
17552
17652
  title,
17553
17653
  translateX,
17554
- translateY
17654
+ translateY,
17655
+ class: className,
17656
+ style
17555
17657
  };
17556
17658
  let von = Object.fromEntries(
17557
17659
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17562,11 +17664,11 @@ var VVPlot = (function(exports, vue) {
17562
17664
  return (_ctx, _cache) => {
17563
17665
  return vue.openBlock(), vue.createElementBlock("g", null, [
17564
17666
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17565
- return vue.openBlock(), vue.createElementBlock("g", null, [
17667
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17566
17668
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17567
17669
  return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17568
17670
  }), 256))
17569
- ]);
17671
+ ], 16);
17570
17672
  }), 256))
17571
17673
  ]);
17572
17674
  };
@@ -17580,7 +17682,9 @@ var VVPlot = (function(exports, vue) {
17580
17682
  data: Object,
17581
17683
  coord2pos: Function,
17582
17684
  getCoord: Function,
17583
- layout: Object
17685
+ layout: Object,
17686
+ groupClass: null,
17687
+ groupStyle: null
17584
17688
  },
17585
17689
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17586
17690
  setup(__props, { emit: __emit }) {
@@ -17609,6 +17713,8 @@ var VVPlot = (function(exports, vue) {
17609
17713
  "text-length": textLength,
17610
17714
  "font-family": fontFamily,
17611
17715
  "text-anchor": textAnchor,
17716
+ class: className,
17717
+ style,
17612
17718
  $raw
17613
17719
  }) => {
17614
17720
  if (label == null) return null;
@@ -17633,6 +17739,8 @@ var VVPlot = (function(exports, vue) {
17633
17739
  angle: angle2,
17634
17740
  translateX,
17635
17741
  translateY,
17742
+ class: className,
17743
+ style,
17636
17744
  anchorX,
17637
17745
  anchorY,
17638
17746
  dockX,
@@ -17650,11 +17758,11 @@ var VVPlot = (function(exports, vue) {
17650
17758
  return (_ctx, _cache) => {
17651
17759
  return vue.openBlock(), vue.createElementBlock("g", null, [
17652
17760
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17653
- return vue.openBlock(), vue.createElementBlock("g", null, [
17761
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17654
17762
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17655
17763
  return vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17656
17764
  }), 256))
17657
- ]);
17765
+ ], 16);
17658
17766
  }), 256))
17659
17767
  ]);
17660
17768
  };
@@ -17668,7 +17776,9 @@ var VVPlot = (function(exports, vue) {
17668
17776
  data: Object,
17669
17777
  coord2pos: Function,
17670
17778
  getCoord: Function,
17671
- layout: Object
17779
+ layout: Object,
17780
+ groupClass: null,
17781
+ groupStyle: null
17672
17782
  },
17673
17783
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17674
17784
  setup(__props, { emit: __emit }) {
@@ -17695,6 +17805,8 @@ var VVPlot = (function(exports, vue) {
17695
17805
  "text-align": textAlign = "justify",
17696
17806
  angle: angle2 = "auto",
17697
17807
  inset = 0,
17808
+ class: className,
17809
+ style,
17698
17810
  $raw
17699
17811
  }) => {
17700
17812
  if (label == null) return null;
@@ -17702,14 +17814,17 @@ var VVPlot = (function(exports, vue) {
17702
17814
  const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
17703
17815
  if (x1 < xlim_min && x22 < xlim_min || x1 > xlim_max && x22 > xlim_max || y1 < ylim_min && y22 < ylim_min || y1 > ylim_max && y22 > ylim_max) return null;
17704
17816
  let vbind = {
17705
- fill: color2,
17817
+ color: color2 || null,
17818
+ fill: color2 || null,
17819
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17706
17820
  "font-size": size * 4,
17707
- stroke,
17821
+ stroke: stroke || null,
17708
17822
  "stroke-width": linewidth,
17709
17823
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17710
- "fill-opacity": alpha2,
17711
- "stroke-opacity": alpha2,
17712
- "font-family": fontFamily
17824
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17825
+ "font-family": fontFamily,
17826
+ class: className,
17827
+ style
17713
17828
  };
17714
17829
  let von = Object.fromEntries(
17715
17830
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17807,7 +17922,7 @@ var VVPlot = (function(exports, vue) {
17807
17922
  return (_ctx, _cache) => {
17808
17923
  return vue.openBlock(), vue.createElementBlock("g", null, [
17809
17924
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17810
- return vue.openBlock(), vue.createElementBlock("g", null, [
17925
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17811
17926
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von, content, title]) => {
17812
17927
  return vue.openBlock(), vue.createElementBlock("text", vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von, true)), [
17813
17928
  vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
@@ -17824,7 +17939,7 @@ var VVPlot = (function(exports, vue) {
17824
17939
  }), 256))
17825
17940
  ], 16);
17826
17941
  }), 256))
17827
- ]);
17942
+ ], 16);
17828
17943
  }), 256))
17829
17944
  ]);
17830
17945
  };
@@ -18234,18 +18349,23 @@ var VVPlot = (function(exports, vue) {
18234
18349
  }));
18235
18350
  let binds = categorize(keys.map((v) => v.bind));
18236
18351
  let group = Map.groupBy(keys.map((v) => v.label), (v, i) => binds.categories[binds[i]]);
18237
- return Array.from(group).map(([bind, labels]) => ({
18238
- bind,
18239
- label: labels.join("; ")
18240
- }));
18352
+ return Array.from(group).map(([$bind, labels]) => {
18353
+ let bind = { tile: {}, line: {}, point: {}, text: {} };
18354
+ for (let geom in bind) {
18355
+ for (let prop2 of Object.keys(element[geom].props)) {
18356
+ if ($bind[prop2]) bind[geom][prop2] = $bind[prop2];
18357
+ }
18358
+ }
18359
+ return { bind, label: labels.join("; ") };
18360
+ });
18241
18361
  });
18242
18362
  const geoms = vue.computed(() => {
18243
18363
  let { text: text2, line: line2, point: point2, tile: tile2 } = __props.appearances;
18244
18364
  let result = {};
18245
- if (text2 != null) result.text = { size: 4, text: "a", ...text2 };
18365
+ if (tile2 != null) result.tile = { width: 10, height: 10, fill: "transparent", ...tile2 };
18246
18366
  if (line2 != null) result.line = { x1: -5, x2: 5, color: "black", ...line2 };
18247
18367
  if (point2 != null) result.point = { size: 6, ...point2 };
18248
- if (tile2 != null) result.tile = { width: 10, height: 10, fill: "transparent", ...tile2 };
18368
+ if (text2 != null) result.text = { size: 4, text: "a", ...text2 };
18249
18369
  return result;
18250
18370
  });
18251
18371
  const width = vue.ref(0);
@@ -18268,7 +18388,7 @@ var VVPlot = (function(exports, vue) {
18268
18388
  }, [
18269
18389
  vue.createElementVNode("g", _hoisted_3$1, [
18270
18390
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(geoms.value, (bind, geom) => {
18271
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element[geom]), vue.mergeProps({ ref_for: true }, { ...bind, ...v.bind }), null, 16);
18391
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element[geom]), vue.mergeProps({ ref_for: true }, { ...bind, ...v.bind[geom] }), null, 16);
18272
18392
  }), 256))
18273
18393
  ]),
18274
18394
  _cache[0] || (_cache[0] = vue.createTextVNode()),
@@ -18291,7 +18411,7 @@ var VVPlot = (function(exports, vue) {
18291
18411
  gradientbar: _sfc_main$v
18292
18412
  };
18293
18413
  const title = vue.computed(() => {
18294
- return __props.scales.map(([s]) => s.title).find((v) => v != null);
18414
+ return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
18295
18415
  });
18296
18416
  const breaks = vue.computed(() => {
18297
18417
  let scale_funcs = __props.scales.map(([s]) => s);
@@ -18310,10 +18430,10 @@ var VVPlot = (function(exports, vue) {
18310
18430
  let result = { scales: __props.scales.map(([s]) => s) };
18311
18431
  if (__props.type == "legendkey") {
18312
18432
  result.appearances = {
18313
- text: obj_merge(...__props.scales.flatMap(([s, a]) => [a.text, a.markdown])),
18433
+ tile: obj_merge(...__props.scales.flatMap(([s, a]) => [a.rect, a.tile, a.polygon, a.ellipse])),
18314
18434
  line: obj_merge(...__props.scales.flatMap(([s, a]) => [a.line, a.linerange, a.curve])),
18315
18435
  point: obj_merge(...__props.scales.flatMap(([s, a]) => [a.point])),
18316
- tile: obj_merge(...__props.scales.flatMap(([s, a]) => [a.rect, a.tile, a.polygon, a.ellipse]))
18436
+ text: obj_merge(...__props.scales.flatMap(([s, a]) => [a.text, a.markdown]))
18317
18437
  };
18318
18438
  } else if (__props.type == "gradientbar") {
18319
18439
  let max = __props.scales.map(([s]) => s.limits?.max).filter((v) => v != null).reduce((a, b) => Math.min(a, b), Infinity);
@@ -18340,15 +18460,13 @@ var VVPlot = (function(exports, vue) {
18340
18460
  },
18341
18461
  setup(__props) {
18342
18462
  const guides = vue.computed(() => {
18343
- let guide_scales = new Map(
18344
- Array.from(__props.scales).filter(([fn]) => fn.legend !== false)
18345
- );
18463
+ let guide_scales = new Map(Array.from(__props.scales).filter(([fn]) => fn.legend !== false));
18346
18464
  let scale_fns = Array.from(guide_scales.keys());
18347
18465
  let keys = scale_fns.map((s) => s.key);
18348
- let j = 1;
18349
- for (let i in keys) {
18350
- while (keys.includes("_guide_" + j)) j++;
18351
- if (keys[i] == null) keys[i] = "_guide_" + j;
18466
+ let n = 1;
18467
+ for (let i = 0; i < keys.length; i++) {
18468
+ while (keys.includes("_guide_" + n)) n++;
18469
+ keys[i] ??= keys.find((_, j) => keys[j] != null && GEnumLevel.isEqual(scale_fns[j].level, scale_fns[i].level)) ?? "_guide_" + n;
18352
18470
  }
18353
18471
  let types = scale_fns.map((s) => getGuideType(s));
18354
18472
  let groups = interaction(keys, types);
@@ -18660,13 +18778,16 @@ var VVPlot = (function(exports, vue) {
18660
18778
  }
18661
18779
  function getCoord(event) {
18662
18780
  let rect2 = svgRef.value.getBoundingClientRect();
18663
- let l = Math.trunc(event.clientX) - (rect2.left + panel.left + innerRect.left), t = Math.trunc(event.clientY) - (rect2.top + panel.top + innerRect.top), r = rect2.left + panel.left + innerRect.right - Math.trunc(event.clientX), b = rect2.top + panel.top + innerRect.bottom - Math.trunc(event.clientY);
18781
+ let scaleX = rect2.width / svgRef.value.clientWidth, scaleY = rect2.height / svgRef.value.clientHeight;
18782
+ let offsetX = event.clientX - rect2.left, offsetY = event.clientY - rect2.top;
18783
+ let l = offsetX / scaleX - (panel.left + innerRect.left), t = offsetY / scaleY - (panel.top + innerRect.top), r = panel.left + innerRect.right - offsetX / scaleX, b = panel.top + innerRect.bottom - offsetY / scaleY;
18664
18784
  let { x: x2, y: y2 } = pos2coord({ h: l, v: t });
18665
18785
  return { l, t, r, b, x: x2, y: y2 };
18666
18786
  }
18667
18787
  function isInPlot(event) {
18668
18788
  let rect2 = svgRef.value.getBoundingClientRect();
18669
- return event.clientX > rect2.left + panel.l && event.clientX < rect2.right - panel.r && event.clientY > rect2.top + panel.t && event.clientY < rect2.bottom - panel.b;
18789
+ let scaleX = rect2.width / svgRef.value.clientWidth, scaleY = rect2.height / svgRef.value.clientHeight;
18790
+ return event.clientX - rect2.left > panel.l * scaleX && rect2.right - event.clientX > panel.r * scaleX && event.clientY - rect2.top > panel.t * scaleY && rect2.bottom - event.clientY > panel.b * scaleY;
18670
18791
  }
18671
18792
  function dispatchPointerEvent(e) {
18672
18793
  if (!layers.value || e._vhandled || !isInPlot(e)) return e;
@@ -18790,6 +18911,8 @@ var VVPlot = (function(exports, vue) {
18790
18911
  }
18791
18912
  let act = props.action.find((a) => a.action == "move" && ["buttons", "ctrlKey", "shiftKey", "altKey", "metaKey"].every((k) => a[k] == e[k]));
18792
18913
  if (act) {
18914
+ let rect2 = svgRef.value.getBoundingClientRect();
18915
+ let scaleX = rect2.width / svgRef.value.clientWidth, scaleY = rect2.height / svgRef.value.clientHeight;
18793
18916
  e.target.setPointerCapture(e.pointerId);
18794
18917
  svg2.style.userSelect = "none";
18795
18918
  moveTimer = clearTimeout(moveTimer);
@@ -18800,13 +18923,13 @@ var VVPlot = (function(exports, vue) {
18800
18923
  let [h, v] = __props.flip ? [y2, x2] : [x2, y2];
18801
18924
  if (h) {
18802
18925
  movementX += ev.movementX;
18803
- let dh = oob_squish_any(-movementX, { min: boundary.hmin - hmin0, max: boundary.hmax - hmax0 });
18926
+ let dh = oob_squish_any(-movementX / scaleX, { min: boundary.hmin - hmin0, max: boundary.hmax - hmax0 });
18804
18927
  h1 = hmin0 + dh;
18805
18928
  h2 = hmax0 + dh;
18806
18929
  }
18807
18930
  if (v) {
18808
18931
  movementY += ev.movementY;
18809
- let dv = oob_squish_any(-movementY, { min: boundary.vmin - vmin0, max: boundary.vmax - vmax0 });
18932
+ let dv = oob_squish_any(-movementY / scaleY, { min: boundary.vmin - vmin0, max: boundary.vmax - vmax0 });
18810
18933
  v1 = vmin0 + dv;
18811
18934
  v2 = vmax0 + dv;
18812
18935
  }
@@ -19213,7 +19336,8 @@ var VVPlot = (function(exports, vue) {
19213
19336
  geom: "curve",
19214
19337
  stat: "curve"
19215
19338
  },
19216
- $_type: "layer"
19339
+ $_type: "layer",
19340
+ $_attrnames: ["interpolate"]
19217
19341
  };
19218
19342
  const _sfc_main$k = {
19219
19343
  $_props: {
@@ -19569,19 +19693,28 @@ var VVPlot = (function(exports, vue) {
19569
19693
  return vlayer.value.map((layer) => {
19570
19694
  let { geom, stat, scales, data, "extend-x": extendX, "extend-y": extendY, ...etc } = { ...layer.type.$_props, ...layer.props };
19571
19695
  let argnames = layer.type.$_argnames || [];
19696
+ let attrnames = layer.type.$_attrnames || [];
19572
19697
  let aes = {}, args = {}, attrs2 = {};
19573
19698
  let vBind2 = {};
19574
19699
  for (let key in etc) {
19575
19700
  if (key == "key") continue;
19576
19701
  if (argnames.includes(key)) {
19577
19702
  args[key] = etc[key];
19703
+ } else if (attrnames.includes(key)) {
19704
+ attrs2[key] = etc[key];
19578
19705
  } else if (key.startsWith("on")) {
19579
19706
  vBind2[key] = etc[key];
19580
19707
  } else if (typeof etc[key] === "function") {
19581
- aes[key] = etc[key];
19708
+ if (["item-class", "item-style"].includes(key)) {
19709
+ aes[key.slice(5)] = etc[key];
19710
+ } else {
19711
+ aes[key] = etc[key];
19712
+ }
19582
19713
  } else {
19583
- if (["class", "style", "render"].includes(key)) {
19714
+ if (["class", "style", "group-class", "group-style", "render"].includes(key)) {
19584
19715
  vBind2[key] = etc[key];
19716
+ } else if (["item-class", "item-style"].includes(key)) {
19717
+ attrs2[key.slice(5)] = etc[key];
19585
19718
  } else {
19586
19719
  attrs2[key] = etc[key];
19587
19720
  }