@antv/g-svg 2.0.13-alpha.0 → 2.0.14

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/dist/index.esm.js CHANGED
@@ -1,4 +1,11 @@
1
- import { __rest, __awaiter, __generator, __extends, __spreadArray, __read } from 'tslib';
1
+ /*!
2
+ * @antv/g-svg
3
+ * @description A renderer implemented by SVG
4
+ * @version 2.0.14
5
+ * @date 10/23/2024, 7:15:43 AM
6
+ * @author AntVis
7
+ * @docs https://g.antv.antgroup.com/
8
+ */
2
9
  import { propertyMetadataCache, isBrowser, AbstractRendererPlugin, AbstractRenderer } from '@antv/g-lite';
3
10
  import * as DomInteraction from '@antv/g-plugin-dom-interaction';
4
11
  export { DomInteraction };
@@ -7,198 +14,241 @@ export { SVGPicker };
7
14
  import * as SVGRenderer from '@antv/g-plugin-svg-renderer';
8
15
  import { createSVGElement } from '@antv/g-plugin-svg-renderer';
9
16
  export { SVGRenderer };
17
+ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
18
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
19
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
10
20
  import { isString } from '@antv/util';
11
21
 
12
- var SVGContextService = /** @class */ (function () {
13
- function SVGContextService(context) {
14
- this.context = context;
15
- this.canvasConfig = context.config;
22
+ var _excluded = ["offset", "composite", "computedOffset", "easing"],
23
+ _excluded2 = ["offset", "composite", "computedOffset", "easing", "transformOrigin"],
24
+ _excluded3 = ["offset", "composite", "computedOffset", "easing", "transformOrigin"],
25
+ _excluded4 = ["offset", "composite", "computedOffset", "easing", "transformOrigin"];
26
+ class SVGContextService {
27
+ constructor(context) {
28
+ this.context = context;
29
+ this.canvasConfig = context.config;
30
+ }
31
+ init() {
32
+ var _this$canvasConfig = this.canvasConfig,
33
+ container = _this$canvasConfig.container,
34
+ doc = _this$canvasConfig.document,
35
+ devicePixelRatio = _this$canvasConfig.devicePixelRatio;
36
+
37
+ // create container
38
+ this.$container = isString(container) ? (doc || document).getElementById(container) : container;
39
+ if (this.$container) {
40
+ if (!this.$container.style.position) {
41
+ this.$container.style.position = 'relative';
42
+ }
43
+ var $namespace = createSVGElement('svg', doc);
44
+ $namespace.setAttribute('width', "".concat(this.canvasConfig.width));
45
+ $namespace.setAttribute('height', "".concat(this.canvasConfig.height));
46
+ this.$container.appendChild($namespace);
47
+ this.$namespace = $namespace;
16
48
  }
17
- SVGContextService.prototype.init = function () {
18
- var _a = this.canvasConfig, container = _a.container, doc = _a.document, devicePixelRatio = _a.devicePixelRatio;
19
- // create container
20
- this.$container = isString(container)
21
- ? (doc || document).getElementById(container)
22
- : container;
23
- if (this.$container) {
24
- if (!this.$container.style.position) {
25
- this.$container.style.position = 'relative';
26
- }
27
- var $namespace = createSVGElement('svg', doc);
28
- $namespace.setAttribute('width', "".concat(this.canvasConfig.width));
29
- $namespace.setAttribute('height', "".concat(this.canvasConfig.height));
30
- this.$container.appendChild($namespace);
31
- this.$namespace = $namespace;
32
- }
33
- // use user-defined dpr first
34
- var dpr = devicePixelRatio || (isBrowser && window.devicePixelRatio) || 1;
35
- dpr = dpr >= 1 ? Math.ceil(dpr) : 1;
36
- this.dpr = dpr;
37
- };
38
- // @ts-ignore
39
- SVGContextService.prototype.getDomElement = function () {
40
- return this.$namespace;
41
- };
42
- SVGContextService.prototype.getContext = function () {
43
- return this.$namespace;
44
- };
45
- SVGContextService.prototype.getDPR = function () {
46
- return this.dpr;
47
- };
48
- SVGContextService.prototype.getBoundingClientRect = function () {
49
- var _a;
50
- return (_a = this.$namespace) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
51
- };
52
- SVGContextService.prototype.destroy = function () {
53
- // destroy context
54
- if (this.$container && this.$namespace && this.$namespace.parentNode) {
55
- this.$container.removeChild(this.$namespace);
56
- }
57
- };
58
- SVGContextService.prototype.resize = function (width, height) {
59
- // SVG should ignore DPR
60
- if (this.$namespace) {
61
- this.$namespace.setAttribute('width', "".concat(width));
62
- this.$namespace.setAttribute('height', "".concat(height));
63
- }
64
- };
65
- SVGContextService.prototype.applyCursorStyle = function (cursor) {
66
- if (this.$container) {
67
- this.$container.style.cursor = cursor;
68
- }
69
- };
70
- SVGContextService.prototype.generateCSSText = function (animationName, selector, keyframes, timing, prefixes) {
71
- if (prefixes === void 0) { prefixes = {}; }
72
- var duration = timing.duration, easing = timing.easing, delay = timing.delay, direction = timing.direction, iterations = timing.iterations, fill = timing.fill;
73
- return ("@keyframes ".concat(animationName, "{").concat(keyframes
74
- .map(function (keyframe) {
75
- keyframe.offset; keyframe.composite; var computedOffset = keyframe.computedOffset; keyframe.easing; var rest = __rest(keyframe, ["offset", "composite", "computedOffset", "easing"]);
76
- var rules = Object.keys(rest)
77
- .map(function (attributeName) {
78
- return "".concat(attributeName, ":").concat(prefixes[attributeName] || '').concat(rest[attributeName], ";");
79
- })
80
- .join('');
81
- return "".concat(computedOffset * 100, "%{").concat(rules, "}");
82
- })
83
- .join(''), "}") +
84
- "".concat(selector, " {animation: ").concat(animationName, " ").concat(duration, "ms ").concat(easing, " ").concat(delay, "ms ").concat(iterations === Infinity ? 'infinite' : iterations, " ").concat(direction, " ").concat(fill, ";}"));
85
- };
86
- SVGContextService.prototype.toDataURL = function () {
87
- return __awaiter(this, arguments, void 0, function (options) {
88
- var cloneNode, doc, animationCounter, $style, svgDocType, svgDoc;
89
- var _this = this;
90
- return __generator(this, function (_a) {
91
- cloneNode = this.$namespace.cloneNode(true);
92
- doc = this.canvasConfig.document;
93
- animationCounter = 0;
94
- $style = null;
95
- this.context.renderingContext.root.forEach(function (object) {
96
- var animations = object.getAnimations();
97
- if (animations.length) {
98
- if (!$style) {
99
- // export animations to <style>, using CSS Transformation
100
- $style = (doc || document).createElement('style');
101
- cloneNode.appendChild($style);
102
- }
103
- // @ts-ignore
104
- var svgElement_1 = object.elementSVG;
105
- var selfSelector_1 = "#".concat(svgElement_1.$el.id);
106
- var groupSelector_1 = "#".concat(svgElement_1.$groupEl.id);
107
- var selfCssText_1 = '';
108
- var groupCssText_1 = '';
109
- animations.forEach(function (animation) {
110
- var keyframes = animation.effect.getKeyframes();
111
- // split attributes into self and group
112
- if (keyframes.length) {
113
- var selfAttributes_1 = [];
114
- var groupAttributes_1 = [];
115
- var _a = keyframes[0]; _a.offset; _a.composite; _a.computedOffset; _a.easing; _a.transformOrigin; var rest = __rest(_a, ["offset", "composite", "computedOffset", "easing", "transformOrigin"]);
116
- Object.keys(rest).forEach(function (attributeName) {
117
- var _a;
118
- if (attributeName === 'transform') {
119
- groupAttributes_1.push(attributeName);
120
- }
121
- var inherited = !!((_a = propertyMetadataCache[attributeName]) === null || _a === void 0 ? void 0 : _a.inh);
122
- if (inherited) {
123
- groupAttributes_1.push(attributeName);
124
- }
125
- else if (attributeName !== 'transform') {
126
- selfAttributes_1.push(attributeName);
127
- }
128
- });
129
- if (groupAttributes_1.length) {
130
- var keyframesWithGroup = keyframes.map(function (keyframe) {
131
- var offset = keyframe.offset, composite = keyframe.composite, computedOffset = keyframe.computedOffset, easing = keyframe.easing; keyframe.transformOrigin; var rest = __rest(keyframe, ["offset", "composite", "computedOffset", "easing", "transformOrigin"]);
132
- var ret = { offset: offset, composite: composite, computedOffset: computedOffset, easing: easing };
133
- Object.keys(rest).forEach(function (attributeName) {
134
- if (groupAttributes_1.includes(attributeName)) {
135
- ret[attributeName] = keyframe[attributeName];
136
- }
137
- });
138
- return ret;
139
- });
140
- groupCssText_1 += _this.generateCSSText("a".concat(animationCounter++), groupSelector_1, keyframesWithGroup, animation.effect.getComputedTiming(), { transform: svgElement_1.$groupEl.getAttribute('transform') });
141
- }
142
- if (selfAttributes_1.length) {
143
- var keyframesWithSelf = keyframes.map(function (keyframe) {
144
- var offset = keyframe.offset, composite = keyframe.composite, computedOffset = keyframe.computedOffset, easing = keyframe.easing; keyframe.transformOrigin; var rest = __rest(keyframe, ["offset", "composite", "computedOffset", "easing", "transformOrigin"]);
145
- var ret = { offset: offset, composite: composite, computedOffset: computedOffset, easing: easing };
146
- Object.keys(rest).forEach(function (attributeName) {
147
- if (selfAttributes_1.includes(attributeName)) {
148
- ret[attributeName] = keyframe[attributeName];
149
- }
150
- });
151
- return ret;
152
- });
153
- selfCssText_1 += _this.generateCSSText("a".concat(animationCounter++), selfSelector_1, keyframesWithSelf, animation.effect.getComputedTiming());
154
- }
155
- }
49
+
50
+ // use user-defined dpr first
51
+ var dpr = devicePixelRatio || isBrowser && window.devicePixelRatio || 1;
52
+ dpr = dpr >= 1 ? Math.ceil(dpr) : 1;
53
+ this.dpr = dpr;
54
+ }
55
+
56
+ // @ts-ignore
57
+ getDomElement() {
58
+ return this.$namespace;
59
+ }
60
+ getContext() {
61
+ return this.$namespace;
62
+ }
63
+ getDPR() {
64
+ return this.dpr;
65
+ }
66
+ getBoundingClientRect() {
67
+ var _this$$namespace;
68
+ return (_this$$namespace = this.$namespace) === null || _this$$namespace === void 0 ? void 0 : _this$$namespace.getBoundingClientRect();
69
+ }
70
+ destroy() {
71
+ // destroy context
72
+ if (this.$container && this.$namespace && this.$namespace.parentNode) {
73
+ this.$container.removeChild(this.$namespace);
74
+ }
75
+ }
76
+ resize(width, height) {
77
+ // SVG should ignore DPR
78
+ if (this.$namespace) {
79
+ this.$namespace.setAttribute('width', "".concat(width));
80
+ this.$namespace.setAttribute('height', "".concat(height));
81
+ }
82
+ }
83
+ applyCursorStyle(cursor) {
84
+ if (this.$container) {
85
+ this.$container.style.cursor = cursor;
86
+ }
87
+ }
88
+ generateCSSText(animationName, selector, keyframes, timing) {
89
+ var prefixes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
90
+ var duration = timing.duration,
91
+ easing = timing.easing,
92
+ delay = timing.delay,
93
+ direction = timing.direction,
94
+ iterations = timing.iterations,
95
+ fill = timing.fill;
96
+ return "@keyframes ".concat(animationName, "{").concat(keyframes.map(keyframe => {
97
+ keyframe.offset;
98
+ keyframe.composite;
99
+ var computedOffset = keyframe.computedOffset;
100
+ keyframe.easing;
101
+ var rest = _objectWithoutProperties(keyframe, _excluded);
102
+ var rules = Object.keys(rest).map(attributeName => {
103
+ return "".concat(attributeName, ":").concat(prefixes[attributeName] || '').concat(rest[attributeName], ";");
104
+ }).join('');
105
+ return "".concat(computedOffset * 100, "%{").concat(rules, "}");
106
+ }).join(''), "}") + "".concat(selector, " {animation: ").concat(animationName, " ").concat(duration, "ms ").concat(easing, " ").concat(delay, "ms ").concat(iterations === Infinity ? 'infinite' : iterations, " ").concat(direction, " ").concat(fill, ";}");
107
+ }
108
+ toDataURL() {
109
+ var _this = this;
110
+ return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
111
+ var cloneNode, doc, animationCounter, $style, svgDocType, svgDoc;
112
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
113
+ while (1) switch (_context.prev = _context.next) {
114
+ case 0:
115
+ cloneNode = _this.$namespace.cloneNode(true);
116
+ doc = _this.canvasConfig.document;
117
+ animationCounter = 0;
118
+ $style = null;
119
+ _this.context.renderingContext.root.forEach(object => {
120
+ var animations = object.getAnimations();
121
+ if (animations.length) {
122
+ if (!$style) {
123
+ // export animations to <style>, using CSS Transformation
124
+ $style = (doc || document).createElement('style');
125
+ cloneNode.appendChild($style);
126
+ }
127
+
128
+ // @ts-ignore
129
+ var svgElement = object.elementSVG;
130
+ var selfSelector = "#".concat(svgElement.$el.id);
131
+ var groupSelector = "#".concat(svgElement.$groupEl.id);
132
+ var selfCssText = '';
133
+ var groupCssText = '';
134
+ animations.forEach(animation => {
135
+ var keyframes = animation.effect.getKeyframes();
136
+
137
+ // split attributes into self and group
138
+ if (keyframes.length) {
139
+ var selfAttributes = [];
140
+ var groupAttributes = [];
141
+ var _keyframes$ = keyframes[0];
142
+ _keyframes$.offset;
143
+ _keyframes$.composite;
144
+ _keyframes$.computedOffset;
145
+ _keyframes$.easing;
146
+ _keyframes$.transformOrigin;
147
+ var rest = _objectWithoutProperties(_keyframes$, _excluded2);
148
+ Object.keys(rest).forEach(attributeName => {
149
+ var _propertyMetadataCach;
150
+ if (attributeName === 'transform') {
151
+ groupAttributes.push(attributeName);
152
+ }
153
+ var inherited = !!((_propertyMetadataCach = propertyMetadataCache[attributeName]) !== null && _propertyMetadataCach !== void 0 && _propertyMetadataCach.inh);
154
+ if (inherited) {
155
+ groupAttributes.push(attributeName);
156
+ } else if (attributeName !== 'transform') {
157
+ selfAttributes.push(attributeName);
158
+ }
159
+ });
160
+ if (groupAttributes.length) {
161
+ var keyframesWithGroup = keyframes.map(keyframe => {
162
+ var offset = keyframe.offset,
163
+ composite = keyframe.composite,
164
+ computedOffset = keyframe.computedOffset,
165
+ easing = keyframe.easing;
166
+ keyframe.transformOrigin;
167
+ var rest = _objectWithoutProperties(keyframe, _excluded3);
168
+ var ret = {
169
+ offset,
170
+ composite,
171
+ computedOffset,
172
+ easing
173
+ };
174
+ Object.keys(rest).forEach(attributeName => {
175
+ if (groupAttributes.includes(attributeName)) {
176
+ ret[attributeName] = keyframe[attributeName];
177
+ }
178
+ });
179
+ return ret;
180
+ });
181
+ groupCssText += _this.generateCSSText("a".concat(animationCounter++), groupSelector, keyframesWithGroup, animation.effect.getComputedTiming(), {
182
+ transform: svgElement.$groupEl.getAttribute('transform')
183
+ });
184
+ }
185
+ if (selfAttributes.length) {
186
+ var keyframesWithSelf = keyframes.map(keyframe => {
187
+ var offset = keyframe.offset,
188
+ composite = keyframe.composite,
189
+ computedOffset = keyframe.computedOffset,
190
+ easing = keyframe.easing;
191
+ keyframe.transformOrigin;
192
+ var rest = _objectWithoutProperties(keyframe, _excluded4);
193
+ var ret = {
194
+ offset,
195
+ composite,
196
+ computedOffset,
197
+ easing
198
+ };
199
+ Object.keys(rest).forEach(attributeName => {
200
+ if (selfAttributes.includes(attributeName)) {
201
+ ret[attributeName] = keyframe[attributeName];
202
+ }
156
203
  });
157
- $style.textContent += selfCssText_1 + groupCssText_1;
204
+ return ret;
205
+ });
206
+ selfCssText += _this.generateCSSText("a".concat(animationCounter++), selfSelector, keyframesWithSelf, animation.effect.getComputedTiming());
158
207
  }
208
+ }
159
209
  });
160
- svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');
161
- svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);
162
- svgDoc.replaceChild(cloneNode, svgDoc.documentElement);
163
- return [2 /*return*/, "data:image/svg+xml;charset=utf8,".concat(encodeURIComponent(new XMLSerializer().serializeToString(svgDoc)))];
210
+ $style.textContent += selfCssText + groupCssText;
211
+ }
164
212
  });
165
- });
166
- };
167
- return SVGContextService;
168
- }());
213
+ svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');
214
+ svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);
215
+ svgDoc.replaceChild(cloneNode, svgDoc.documentElement);
216
+ return _context.abrupt("return", "data:image/svg+xml;charset=utf8,".concat(encodeURIComponent(new XMLSerializer().serializeToString(svgDoc))));
217
+ case 10:
218
+ case "end":
219
+ return _context.stop();
220
+ }
221
+ }, _callee);
222
+ }))();
223
+ }
224
+ }
169
225
 
170
- var ContextRegisterPlugin = /** @class */ (function (_super) {
171
- __extends(ContextRegisterPlugin, _super);
172
- function ContextRegisterPlugin() {
173
- var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
174
- _this.name = 'svg-context-register';
175
- return _this;
176
- }
177
- ContextRegisterPlugin.prototype.init = function () {
178
- // @ts-ignore
179
- this.context.ContextService = SVGContextService;
180
- };
181
- ContextRegisterPlugin.prototype.destroy = function () {
182
- delete this.context.ContextService;
183
- };
184
- return ContextRegisterPlugin;
185
- }(AbstractRendererPlugin));
226
+ class ContextRegisterPlugin extends AbstractRendererPlugin {
227
+ constructor() {
228
+ super(...arguments);
229
+ this.name = 'svg-context-register';
230
+ }
231
+ init() {
232
+ // @ts-ignore
233
+ this.context.ContextService = SVGContextService;
234
+ }
235
+ destroy() {
236
+ delete this.context.ContextService;
237
+ }
238
+ }
186
239
 
187
- var Renderer = /** @class */ (function (_super) {
188
- __extends(Renderer, _super);
189
- function Renderer(config) {
190
- if (config === void 0) { config = {}; }
191
- var _this = _super.call(this, config) || this;
192
- _this.registerPlugin(new ContextRegisterPlugin());
193
- _this.registerPlugin(new SVGRenderer.Plugin({
194
- outputSVGElementId: config.outputSVGElementId,
195
- }));
196
- _this.registerPlugin(new DomInteraction.Plugin());
197
- _this.registerPlugin(new SVGPicker.Plugin());
198
- return _this;
199
- }
200
- return Renderer;
201
- }(AbstractRenderer));
240
+ class Renderer extends AbstractRenderer {
241
+ constructor() {
242
+ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
243
+ super(config);
244
+ this.registerPlugin(new ContextRegisterPlugin());
245
+ this.registerPlugin(new SVGRenderer.Plugin({
246
+ outputSVGElementId: config.outputSVGElementId
247
+ }));
248
+ this.registerPlugin(new DomInteraction.Plugin());
249
+ this.registerPlugin(new SVGPicker.Plugin());
250
+ }
251
+ }
202
252
 
203
253
  export { Renderer };
204
254
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/SVGContextService.ts","../src/ContextRegisterPlugin.ts","../src/index.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;;;;AAYA,IAAA,iBAAA,kBAAA,YAAA;AAOE,IAAA,SAAA,iBAAA,CAAmB,OAAsC,EAAA;QAAtC,IAAO,CAAA,OAAA,GAAP,OAAO,CAA+B;AACvD,QAAA,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;KACpC;AAED,IAAA,iBAAA,CAAA,SAAA,CAAA,IAAI,GAAJ,YAAA;AACQ,QAAA,IAAA,EAAiD,GAAA,IAAI,CAAC,YAAY,EAAhE,SAAS,GAAA,EAAA,CAAA,SAAA,EA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CAAC,IAAC,IAAA,CAAA;AAEd,QAAA,KAAI,CAAC,cAAc,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;AACjD,QAAA,KAAI,CAAC,cAAc,CACjB,IAAI,WAAW,CAAC,MAAM,CAAC;YACrB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;AAC9C,SAAA,CAAC,CACH,CAAC;QACF,KAAI,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;QACjD,KAAI,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;;KAC7C;IACH,OAAC,QAAA,CAAA;AAAD,CAbA,CAA8B,gBAAgB,CAa7C;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/SVGContextService.ts","../src/ContextRegisterPlugin.ts","../src/index.ts"],"sourcesContent":["import type {\n CanvasContext,\n DataURLOptions,\n GlobalRuntime,\n CanvasConfig,\n ContextService,\n DisplayObject,\n} from '@antv/g-lite';\nimport { isBrowser, propertyMetadataCache } from '@antv/g-lite';\nimport { createSVGElement } from '@antv/g-plugin-svg-renderer';\nimport { isString } from '@antv/util';\n\nexport class SVGContextService implements ContextService<SVGElement> {\n private $container: HTMLElement | null;\n private $namespace: SVGElement | null;\n private dpr: number;\n\n private canvasConfig: Partial<CanvasConfig>;\n\n constructor(public context: GlobalRuntime & CanvasContext) {\n this.canvasConfig = context.config;\n }\n\n init() {\n const { container, document: doc, devicePixelRatio } = this.canvasConfig;\n\n // create container\n this.$container = isString(container)\n ? (doc || document).getElementById(container)\n : container;\n if (this.$container) {\n if (!this.$container.style.position) {\n this.$container.style.position = 'relative';\n }\n const $namespace = createSVGElement('svg', doc);\n $namespace.setAttribute('width', `${this.canvasConfig.width}`);\n $namespace.setAttribute('height', `${this.canvasConfig.height}`);\n\n this.$container.appendChild($namespace);\n\n this.$namespace = $namespace;\n }\n\n // use user-defined dpr first\n let dpr = devicePixelRatio || (isBrowser && window.devicePixelRatio) || 1;\n dpr = dpr >= 1 ? Math.ceil(dpr) : 1;\n this.dpr = dpr;\n }\n\n // @ts-ignore\n getDomElement() {\n return this.$namespace;\n }\n\n getContext() {\n return this.$namespace;\n }\n\n getDPR() {\n return this.dpr;\n }\n\n getBoundingClientRect() {\n return this.$namespace?.getBoundingClientRect();\n }\n\n destroy() {\n // destroy context\n if (this.$container && this.$namespace && this.$namespace.parentNode) {\n this.$container.removeChild(this.$namespace);\n }\n }\n\n resize(width: number, height: number) {\n // SVG should ignore DPR\n if (this.$namespace) {\n this.$namespace.setAttribute('width', `${width}`);\n this.$namespace.setAttribute('height', `${height}`);\n }\n }\n\n applyCursorStyle(cursor: string) {\n if (this.$container) {\n this.$container.style.cursor = cursor;\n }\n }\n\n private generateCSSText(\n animationName: string,\n selector: string,\n keyframes: ComputedKeyframe[],\n timing: ComputedEffectTiming,\n prefixes: Record<string, string> = {},\n ) {\n const { duration, easing, delay, direction, iterations, fill } = timing;\n\n return (\n `@keyframes ${animationName}{${keyframes\n .map((keyframe) => {\n const { offset, composite, computedOffset, easing, ...rest } =\n keyframe;\n const rules = Object.keys(rest)\n .map((attributeName) => {\n return `${attributeName}:${prefixes[attributeName] || ''}${\n rest[attributeName]\n };`;\n })\n .join('');\n return `${computedOffset * 100}%{${rules}}`;\n })\n .join('')}}` +\n `${selector} {animation: ${animationName} ${duration}ms ${easing} ${delay}ms ${\n iterations === Infinity ? 'infinite' : iterations\n } ${direction} ${fill};}`\n );\n }\n\n async toDataURL(options: Partial<DataURLOptions> = {}) {\n const cloneNode = this.$namespace.cloneNode(true);\n\n const { document: doc } = this.canvasConfig;\n let animationCounter = 0;\n let $style: HTMLStyleElement | null = null;\n\n this.context.renderingContext.root.forEach((object: DisplayObject) => {\n const animations = object.getAnimations();\n if (animations.length) {\n if (!$style) {\n // export animations to <style>, using CSS Transformation\n $style = (doc || document).createElement('style');\n cloneNode.appendChild($style);\n }\n\n // @ts-ignore\n const svgElement = object.elementSVG;\n const selfSelector = `#${svgElement.$el.id}`;\n const groupSelector = `#${svgElement.$groupEl.id}`;\n let selfCssText = '';\n let groupCssText = '';\n\n animations.forEach((animation) => {\n const keyframes = animation.effect.getKeyframes();\n\n // split attributes into self and group\n if (keyframes.length) {\n const selfAttributes = [];\n const groupAttributes = [];\n const {\n offset,\n composite,\n computedOffset,\n easing,\n transformOrigin,\n ...rest\n } = keyframes[0];\n Object.keys(rest).forEach((attributeName) => {\n if (attributeName === 'transform') {\n groupAttributes.push(attributeName);\n }\n\n const inherited = !!propertyMetadataCache[attributeName]?.inh;\n if (inherited) {\n groupAttributes.push(attributeName);\n } else if (attributeName !== 'transform') {\n selfAttributes.push(attributeName);\n }\n });\n\n if (groupAttributes.length) {\n const keyframesWithGroup = keyframes.map((keyframe) => {\n const {\n offset,\n composite,\n computedOffset,\n easing,\n transformOrigin,\n ...rest\n } = keyframe;\n\n const ret = { offset, composite, computedOffset, easing };\n Object.keys(rest).forEach((attributeName) => {\n if (groupAttributes.includes(attributeName)) {\n ret[attributeName] = keyframe[attributeName];\n }\n });\n return ret;\n });\n groupCssText += this.generateCSSText(\n `a${animationCounter++}`,\n groupSelector,\n keyframesWithGroup,\n animation.effect.getComputedTiming(),\n { transform: svgElement.$groupEl.getAttribute('transform') },\n );\n }\n\n if (selfAttributes.length) {\n const keyframesWithSelf = keyframes.map((keyframe) => {\n const {\n offset,\n composite,\n computedOffset,\n easing,\n transformOrigin,\n ...rest\n } = keyframe;\n\n const ret = { offset, composite, computedOffset, easing };\n Object.keys(rest).forEach((attributeName) => {\n if (selfAttributes.includes(attributeName)) {\n ret[attributeName] = keyframe[attributeName];\n }\n });\n return ret;\n });\n\n selfCssText += this.generateCSSText(\n `a${animationCounter++}`,\n selfSelector,\n keyframesWithSelf,\n animation.effect.getComputedTiming(),\n );\n }\n }\n });\n\n $style.textContent += selfCssText + groupCssText;\n }\n });\n\n const svgDocType = document.implementation.createDocumentType(\n 'svg',\n '-//W3C//DTD SVG 1.1//EN',\n 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd',\n );\n const svgDoc = document.implementation.createDocument(\n 'http://www.w3.org/2000/svg',\n 'svg',\n svgDocType,\n );\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n return `data:image/svg+xml;charset=utf8,${encodeURIComponent(\n new XMLSerializer().serializeToString(svgDoc),\n )}`;\n }\n}\n","import { AbstractRendererPlugin } from '@antv/g-lite';\nimport { SVGContextService } from './SVGContextService';\n\nexport class ContextRegisterPlugin extends AbstractRendererPlugin {\n name = 'svg-context-register';\n init(): void {\n // @ts-ignore\n this.context.ContextService = SVGContextService;\n }\n destroy(): void {\n delete this.context.ContextService;\n }\n}\n","import type { RendererConfig } from '@antv/g-lite';\nimport { AbstractRenderer } from '@antv/g-lite';\nimport * as DomInteraction from '@antv/g-plugin-dom-interaction';\nimport * as SVGPicker from '@antv/g-plugin-svg-picker';\nimport * as SVGRenderer from '@antv/g-plugin-svg-renderer';\nimport { ContextRegisterPlugin } from './ContextRegisterPlugin';\n\nexport { DomInteraction, SVGPicker, SVGRenderer };\n\nexport interface SVGRendererConfig extends RendererConfig {\n /**\n * Whether to output id on SVGElement with `setAttribute` like: <circle id=\"g-circle-123\">.\n */\n outputSVGElementId: boolean;\n}\n\nexport class Renderer extends AbstractRenderer {\n constructor(config: Partial<SVGRendererConfig> = {}) {\n super(config);\n\n this.registerPlugin(new ContextRegisterPlugin());\n this.registerPlugin(\n new SVGRenderer.Plugin({\n outputSVGElementId: config.outputSVGElementId,\n }),\n );\n this.registerPlugin(new DomInteraction.Plugin());\n this.registerPlugin(new SVGPicker.Plugin());\n }\n}\n"],"names":["SVGContextService","constructor","context","canvasConfig","config","init","_this$canvasConfig","container","doc","document","devicePixelRatio","$container","isString","getElementById","style","position","$namespace","createSVGElement","setAttribute","concat","width","height","appendChild","dpr","isBrowser","window","Math","ceil","getDomElement","getContext","getDPR","getBoundingClientRect","_this$$namespace","destroy","parentNode","removeChild","resize","applyCursorStyle","cursor","generateCSSText","animationName","selector","keyframes","timing","prefixes","arguments","length","undefined","duration","easing","delay","direction","iterations","fill","map","keyframe","offset","composite","computedOffset","rest","_objectWithoutProperties","_excluded","rules","Object","keys","attributeName","join","Infinity","toDataURL","_arguments","_this","_asyncToGenerator","_regeneratorRuntime","mark","_callee","cloneNode","animationCounter","$style","svgDocType","svgDoc","wrap","_callee$","_context","prev","next","renderingContext","root","forEach","object","animations","getAnimations","createElement","svgElement","elementSVG","selfSelector","$el","id","groupSelector","$groupEl","selfCssText","groupCssText","animation","effect","getKeyframes","selfAttributes","groupAttributes","_keyframes$","transformOrigin","_excluded2","_propertyMetadataCach","push","inherited","propertyMetadataCache","inh","keyframesWithGroup","_excluded3","ret","includes","getComputedTiming","transform","getAttribute","keyframesWithSelf","_excluded4","textContent","implementation","createDocumentType","createDocument","replaceChild","documentElement","abrupt","encodeURIComponent","XMLSerializer","serializeToString","stop","ContextRegisterPlugin","AbstractRendererPlugin","name","ContextService","Renderer","AbstractRenderer","registerPlugin","SVGRenderer","Plugin","outputSVGElementId","DomInteraction","SVGPicker"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAMA,iBAAiB,CAAuC;EAOnEC,WAAWA,CAAQC,OAAsC,EAAE;IAAA,IAAxCA,CAAAA,OAAsC,GAAtCA,OAAsC,CAAA;AACvD,IAAA,IAAI,CAACC,YAAY,GAAGD,OAAO,CAACE,MAAM,CAAA;AACpC,GAAA;AAEAC,EAAAA,IAAIA,GAAG;AACL,IAAA,IAAAC,kBAAA,GAAuD,IAAI,CAACH,YAAY;MAAhEI,SAAS,GAAAD,kBAAA,CAATC,SAAS;MAAYC,GAAG,GAAAF,kBAAA,CAAbG,QAAQ;MAAOC,gBAAgB,GAAAJ,kBAAA,CAAhBI,gBAAgB,CAAA;;AAElD;AACA,IAAA,IAAI,CAACC,UAAU,GAAGC,QAAQ,CAACL,SAAS,CAAC,GACjC,CAACC,GAAG,IAAIC,QAAQ,EAAEI,cAAc,CAACN,SAAS,CAAC,GAC3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