@trismegisto/charts 2.0.0 → 2.0.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.
@@ -31619,7 +31619,10 @@ function getCachePerECFullUpdate(ecModel) {
31619
31619
  */
31620
31620
  let wmUniqueIndex = Math.round(Math.random() * 9);
31621
31621
  const supportDefineProperty = typeof Object.defineProperty === 'function';
31622
- class WeakMap {
31622
+ // Nome próprio de propósito: no bundle achatado do pacote, uma classe de topo chamada `WeakMap` sombreia o global, e o
31623
+ // código rebaixado por quem consome (campos `#privados` viram `new WeakMap()` no pré-bundle do Vite) quebrava com
31624
+ // "WeakMap is not a constructor".
31625
+ class ZrWeakMap {
31623
31626
  constructor() {
31624
31627
  this._id = '__ec_inner_' + wmUniqueIndex++;
31625
31628
  }
@@ -31864,7 +31867,7 @@ const symbolBuildProxies = {};
31864
31867
  each$9(symbolCtors, function (Ctor, name) {
31865
31868
  symbolBuildProxies[name] = new Ctor();
31866
31869
  });
31867
- const SymbolClz = Path.extend({
31870
+ const SymbolClz$1 = Path.extend({
31868
31871
  type: 'symbol',
31869
31872
  shape: {
31870
31873
  symbolType: '',
@@ -31933,7 +31936,7 @@ keepAspect) {
31933
31936
  symbolPath = makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');
31934
31937
  }
31935
31938
  else {
31936
- symbolPath = new SymbolClz({
31939
+ symbolPath = new SymbolClz$1({
31937
31940
  shape: {
31938
31941
  symbolType: symbolType,
31939
31942
  x: x,
@@ -31988,7 +31991,7 @@ function normalizeSymbolOffset(symbolOffset, symbolSize) {
31988
31991
  * specific language governing permissions and limitations
31989
31992
  * under the License.
31990
31993
  */
31991
- const decalMap = new WeakMap();
31994
+ const decalMap = new ZrWeakMap();
31992
31995
  const decalCache = new LRU(100);
31993
31996
  const decalKeys = [
31994
31997
  'symbol', 'symbolSize', 'symbolKeepAspect',
@@ -46396,7 +46399,8 @@ class LineSeriesModel extends SeriesModel {
46396
46399
  * specific language governing permissions and limitations
46397
46400
  * under the License.
46398
46401
  */
46399
- class Symbol extends Group$3 {
46402
+ // `SymbolClz`, não `Symbol`: uma classe de topo com esse nome sombreia o `Symbol` global no bundle achatado.
46403
+ class SymbolClz extends Group$3 {
46400
46404
  constructor(data, idx, seriesScope, opts) {
46401
46405
  super();
46402
46406
  this.updateData(data, idx, seriesScope, opts);
@@ -46477,8 +46481,8 @@ class Symbol extends Group$3 {
46477
46481
  this.silent = false;
46478
46482
  const symbolType = data.getItemVisual(idx, 'symbol') || 'circle';
46479
46483
  const seriesModel = data.hostModel;
46480
- const symbolSize = Symbol.getSymbolSize(data, idx);
46481
- const z2 = Symbol.getSymbolZ2(data, idx);
46484
+ const symbolSize = SymbolClz.getSymbolSize(data, idx);
46485
+ const z2 = SymbolClz.getSymbolZ2(data, idx);
46482
46486
  const isInit = symbolType !== this._symbolType;
46483
46487
  const disableAnimation = opts && opts.disableAnimation;
46484
46488
  if (isInit) {
@@ -46740,7 +46744,7 @@ function createEl(SymbolCtor, data, newIdx, seriesScope, symbolUpdateOpt, point,
46740
46744
  class SymbolDraw {
46741
46745
  constructor(SymbolCtor) {
46742
46746
  this.group = new Group$3();
46743
- this._SymbolCtor = SymbolCtor || Symbol;
46747
+ this._SymbolCtor = SymbolCtor || SymbolClz;
46744
46748
  }
46745
46749
  /**
46746
46750
  * Update symbols draw by new data
@@ -47958,7 +47962,7 @@ function canShowAllSymbolForCategory(categoryAxis, data) {
47958
47962
  const dataLen = data.count();
47959
47963
  const step = Math.max(1, Math.round(dataLen / 5));
47960
47964
  for (let dataIndex = 0; dataIndex < dataLen; dataIndex += step) {
47961
- if (Symbol.getSymbolSize(data, dataIndex
47965
+ if (SymbolClz.getSymbolSize(data, dataIndex
47962
47966
  // Only for cartesian, where `isHorizontal` exists.
47963
47967
  )[categoryAxis.isHorizontal() ? 1 : 0]
47964
47968
  // Empirical number
@@ -48351,7 +48355,7 @@ class LineView extends ChartView {
48351
48355
  }
48352
48356
  const zlevel = seriesModel.get('zlevel') || 0;
48353
48357
  const z = seriesModel.get('z') || 0;
48354
- symbol = new Symbol(data, dataIndex);
48358
+ symbol = new SymbolClz(data, dataIndex);
48355
48359
  symbol.x = x;
48356
48360
  symbol.y = y;
48357
48361
  symbol.setZ(zlevel, z);