ziko 0.0.27 → 0.0.28
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/ziko.cjs +231 -15
- package/dist/ziko.js +12 -8
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +12 -8
- package/package.json +1 -1
- package/src/ui/elements/misc/xml-wrapper.js +11 -7
package/dist/ziko.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
Project: ziko.js
|
|
4
4
|
Author: Zakaria Elalaoui
|
|
5
|
-
Date :
|
|
5
|
+
Date : Wed Jul 23 2025 15:08:02 GMT+0100 (UTC+01:00)
|
|
6
6
|
Git-Repo : https://github.com/zakarialaoui10/ziko.js
|
|
7
7
|
Git-Wiki : https://github.com/zakarialaoui10/ziko.js/wiki
|
|
8
8
|
Released under MIT License
|
|
@@ -6020,15 +6020,19 @@ class ZikoUIXMLWrapper extends ZikoUIElement{
|
|
|
6020
6020
|
}
|
|
6021
6021
|
}
|
|
6022
6022
|
function html2dom(htmlString) {
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6023
|
+
if(globalThis?.DOMParser){
|
|
6024
|
+
const parser = new DOMParser();
|
|
6025
|
+
const doc = parser.parseFromString(`<div>${htmlString}</div>`, 'text/html');
|
|
6026
|
+
doc.body.firstChild.style.display = "contents";
|
|
6027
|
+
return doc.body.firstChild;
|
|
6028
|
+
}
|
|
6027
6029
|
}
|
|
6028
6030
|
function svg2dom(svgString) {
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6031
|
+
if(globalThis?.DOMParser){
|
|
6032
|
+
const parser = new DOMParser();
|
|
6033
|
+
const doc = parser.parseFromString(svgString.replace(/\s+/g, ' ').trim(), 'image/svg+xml');
|
|
6034
|
+
return doc.documentElement; // SVG elements are usually at the root
|
|
6035
|
+
}
|
|
6032
6036
|
}
|
|
6033
6037
|
class ZikoUIHTMLWrapper extends ZikoUIXMLWrapper{
|
|
6034
6038
|
constructor(HTMLContent){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ziko",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "a versatile javaScript framework offering a rich set of UI components, advanced mathematical utilities, reactivity, animations, client side routing and graphics capabilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"front-end",
|
|
@@ -6,15 +6,19 @@ class ZikoUIXMLWrapper extends ZikoUIElement{
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
function html2dom(htmlString) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
if(globalThis?.DOMParser){
|
|
10
|
+
const parser = new DOMParser();
|
|
11
|
+
const doc = parser.parseFromString(`<div>${htmlString}</div>`, 'text/html');
|
|
12
|
+
doc.body.firstChild.style.display = "contents"
|
|
13
|
+
return doc.body.firstChild;
|
|
14
|
+
}
|
|
13
15
|
}
|
|
14
16
|
function svg2dom(svgString) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
if(globalThis?.DOMParser){
|
|
18
|
+
const parser = new DOMParser();
|
|
19
|
+
const doc = parser.parseFromString(svgString.replace(/\s+/g, ' ').trim(), 'image/svg+xml');
|
|
20
|
+
return doc.documentElement; // SVG elements are usually at the root
|
|
21
|
+
}
|
|
18
22
|
}
|
|
19
23
|
class ZikoUIHTMLWrapper extends ZikoUIXMLWrapper{
|
|
20
24
|
constructor(HTMLContent){
|