@d3plus/export 3.0.14 → 3.0.15
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
@d3plus/export v3.0.
|
|
2
|
+
@d3plus/export v3.0.15
|
|
3
3
|
Export methods for transforming and downloading SVG.
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2026 D3plus - https://d3plus.org
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
7
|
(e=>{"function"==typeof define&&define.amd?define(e):e()})(function(){if("undefined"!=typeof window){try{if("undefined"==typeof SVGElement||Boolean(SVGElement.prototype.innerHTML))return}catch(e){return}function n(e){switch(e.nodeType){case 1:var t=e,r="";return r+="<"+t.tagName,t.hasAttributes()&&[].forEach.call(t.attributes,function(e){r+=" "+e.name+'="'+e.value+'"'}),r+=">",t.hasChildNodes()&&[].forEach.call(t.childNodes,function(e){r+=n(e)}),r+="</"+t.tagName+">";case 3:return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");case 8:return"\x3c!--"+e.nodeValue+"--\x3e"}}Object.defineProperty(SVGElement.prototype,"innerHTML",{get:function(){var t="";return[].forEach.call(this.childNodes,function(e){t+=n(e)}),t},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser,r=(t.async=!1,"<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>"+e+"</svg>"),n=t.parseFromString(r,"text/xml").documentElement;[].forEach.call(n.childNodes,function(e){this.appendChild(this.ownerDocument.importNode(e,!0))}.bind(this))}catch(e){throw new Error("Error parsing markup string")}}}),Object.defineProperty(SVGElement.prototype,"innerSVG",{get:function(){return this.innerHTML},set:function(e){this.innerHTML=e}})}}),((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@d3plus/export",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).d3plus={})})(this,function(e){let i=(()=>{
|
package/umd/d3plus-export.js
CHANGED
package/umd/d3plus-export.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
@d3plus/export v3.0.
|
|
2
|
+
@d3plus/export v3.0.15
|
|
3
3
|
Export methods for transforming and downloading SVG.
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2026 D3plus - https://d3plus.org
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
7
|
(e=>{"function"==typeof define&&define.amd?define(e):e()})(function(){if("undefined"!=typeof window){try{if("undefined"==typeof SVGElement||Boolean(SVGElement.prototype.innerHTML))return}catch(e){return}function o(e){switch(e.nodeType){case 1:var t=e,n="";return n+="<"+t.tagName,t.hasAttributes()&&[].forEach.call(t.attributes,function(e){n+=" "+e.name+'="'+e.value+'"'}),n+=">",t.hasChildNodes()&&[].forEach.call(t.childNodes,function(e){n+=o(e)}),n+="</"+t.tagName+">";case 3:return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");case 8:return"\x3c!--"+e.nodeValue+"--\x3e"}}Object.defineProperty(SVGElement.prototype,"innerHTML",{get:function(){var t="";return[].forEach.call(this.childNodes,function(e){t+=o(e)}),t},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser,n=(t.async=!1,"<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>"+e+"</svg>"),o=t.parseFromString(n,"text/xml").documentElement;[].forEach.call(o.childNodes,function(e){this.appendChild(this.ownerDocument.importNode(e,!0))}.bind(this))}catch(e){throw new Error("Error parsing markup string")}}}),Object.defineProperty(SVGElement.prototype,"innerSVG",{get:function(){return this.innerHTML},set:function(e){this.innerHTML=e}})}}),((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("html-to-image"),require("file-saver")):"function"==typeof define&&define.amd?define("@d3plus/export",["exports","html-to-image","file-saver"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).d3plus={},e.htmlToImage,e.fileSaver)})(this,function(e,r,i){let a={filename:"download",type:"png"};
|