zrender-nightly 6.0.1-dev.20251203 → 6.0.1-dev.20251205

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.
package/lib/svg/helper.js CHANGED
@@ -1,6 +1,5 @@
1
- import { RADIAN_TO_DEGREE, retrieve2, logError, isFunction } from '../core/util.js';
1
+ import { RADIAN_TO_DEGREE, retrieve2, logError } from '../core/util.js';
2
2
  import { parse } from '../tool/color.js';
3
- import env from '../core/env.js';
4
3
  var mathRound = Math.round;
5
4
  export function normalizeColor(color) {
6
5
  var opacity;
@@ -134,14 +133,14 @@ export function getSRTTransformString(transform) {
134
133
  return res.join(' ');
135
134
  }
136
135
  export var encodeBase64 = (function () {
137
- if (env.hasGlobalWindow && isFunction(window.btoa)) {
136
+ if (typeof Buffer !== 'undefined' && typeof Buffer.from === 'function') {
138
137
  return function (str) {
139
- return window.btoa(unescape(encodeURIComponent(str)));
138
+ return Buffer.from(str).toString('base64');
140
139
  };
141
140
  }
142
- if (typeof Buffer !== 'undefined') {
141
+ if (typeof btoa === 'function' && typeof unescape === 'function' && typeof encodeURIComponent === 'function') {
143
142
  return function (str) {
144
- return Buffer.from(str).toString('base64');
143
+ return btoa(unescape(encodeURIComponent(str)));
145
144
  };
146
145
  }
147
146
  return function (str) {
package/lib/zrender.d.ts CHANGED
@@ -90,7 +90,7 @@ export declare type ElementSSRData = zrUtil.HashMap<unknown>;
90
90
  export declare type ElementSSRDataGetter<T> = (el: Element) => zrUtil.HashMap<T>;
91
91
  export declare function getElementSSRData(el: Element): ElementSSRData;
92
92
  export declare function registerSSRDataGetter<T>(getter: ElementSSRDataGetter<T>): void;
93
- export declare const version = "6.0.1-dev.20251203";
93
+ export declare const version = "6.0.1-dev.20251205";
94
94
  export interface ZRenderType extends ZRender {
95
95
  }
96
96
  export {};
package/lib/zrender.js CHANGED
@@ -324,5 +324,5 @@ export function getElementSSRData(el) {
324
324
  export function registerSSRDataGetter(getter) {
325
325
  ssrDataGetter = getter;
326
326
  }
327
- export var version = '6.0.1-dev.20251203';
327
+ export var version = '6.0.1-dev.20251205';
328
328
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zrender-nightly",
3
- "version": "6.0.1-dev.20251203",
3
+ "version": "6.0.1-dev.20251205",
4
4
  "description": "A lightweight graphic library providing 2d draw for Apache ECharts",
5
5
  "keywords": [
6
6
  "canvas",
package/src/svg/helper.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { MatrixArray } from '../core/matrix';
4
4
  import Transformable, { TransformProp } from '../core/Transformable';
5
- import { RADIAN_TO_DEGREE, retrieve2, logError, isFunction } from '../core/util';
5
+ import { RADIAN_TO_DEGREE, retrieve2, logError } from '../core/util';
6
6
  import Displayable from '../graphic/Displayable';
7
7
  import { GradientObject } from '../graphic/Gradient';
8
8
  import { LinearGradientObject } from '../graphic/LinearGradient';
@@ -10,7 +10,6 @@ import Path from '../graphic/Path';
10
10
  import { ImagePatternObject, PatternObject, SVGPatternObject } from '../graphic/Pattern';
11
11
  import { RadialGradientObject } from '../graphic/RadialGradient';
12
12
  import { parse } from '../tool/color';
13
- import env from '../core/env';
14
13
 
15
14
  const mathRound = Math.round;
16
15
 
@@ -173,14 +172,14 @@ export function getSRTTransformString(
173
172
  }
174
173
 
175
174
  export const encodeBase64 = (function () {
176
- if (env.hasGlobalWindow && isFunction(window.btoa)) {
175
+ if (typeof Buffer !== 'undefined' && typeof Buffer.from === 'function') {
177
176
  return function (str: string) {
178
- return window.btoa(unescape(encodeURIComponent(str)));
177
+ return Buffer.from(str).toString('base64');
179
178
  };
180
179
  }
181
- if (typeof Buffer !== 'undefined') {
180
+ if (typeof btoa === 'function' && typeof unescape === 'function' && typeof encodeURIComponent === 'function') {
182
181
  return function (str: string) {
183
- return Buffer.from(str).toString('base64');
182
+ return btoa(unescape(encodeURIComponent(str)));
184
183
  };
185
184
  }
186
185
  return function (str: string): string {
package/src/zrender.ts CHANGED
@@ -556,7 +556,7 @@ export function registerSSRDataGetter<T>(getter: ElementSSRDataGetter<T>) {
556
556
  /**
557
557
  * @type {string}
558
558
  */
559
- export const version = '6.0.1-dev.20251203';
559
+ export const version = '6.0.1-dev.20251205';
560
560
 
561
561
 
562
562
  export interface ZRenderType extends ZRender {};