Clear Code, small organized
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
This commit is contained in:
17
dist/sigpro.esm.js
vendored
17
dist/sigpro.esm.js
vendored
@@ -12,6 +12,9 @@ var effectQueue = new Set;
|
||||
var proxyCache = new WeakMap;
|
||||
var ITER = Symbol("iter");
|
||||
var MOUNTED_NODES = new WeakMap;
|
||||
var SVG_NS = "http://www.w3.org/2000/svg";
|
||||
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
||||
var SVG_TAGS = new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(","));
|
||||
var dispose = (eff) => {
|
||||
if (!eff || eff._disposed)
|
||||
return;
|
||||
@@ -149,9 +152,6 @@ var $ = (val, key = null) => {
|
||||
computed._dirty = true;
|
||||
computed._deps = null;
|
||||
computed._disposed = false;
|
||||
computed.stop = () => {};
|
||||
if (activeOwner)
|
||||
onUnmount(computed.stop);
|
||||
return computed;
|
||||
}
|
||||
if (key)
|
||||
@@ -287,12 +287,10 @@ var h = (tag, props = {}, children = []) => {
|
||||
isArr(node) ? node.forEach(attach) : attach(node);
|
||||
return node;
|
||||
}
|
||||
const isSVG = /^(svg|path|circle|rect|line|poly(line|gon)|g|defs|text(path)?|tspan|use|symbol|image|marker|ellipse)$/i.test(tag);
|
||||
const el = isSVG ? doc.createElementNS("http://www.w3.org/2000/svg", tag) : doc.createElement(tag);
|
||||
const isSVG = SVG_TAGS.has(tag);
|
||||
const el = isSVG ? doc.createElementNS(SVG_NS, tag) : doc.createElement(tag);
|
||||
el._cleanups = new Set;
|
||||
for (let k in props) {
|
||||
if (!props.hasOwnProperty(k))
|
||||
continue;
|
||||
for (const k of Object.keys(props)) {
|
||||
let v = props[k];
|
||||
if (k === "ref") {
|
||||
isFunc(v) ? v(el) : v.current = el;
|
||||
@@ -300,8 +298,7 @@ var h = (tag, props = {}, children = []) => {
|
||||
}
|
||||
if (isSVG && k.startsWith("xlink:")) {
|
||||
const cleanVal = validateAttr(k.slice(6), v);
|
||||
let lnk = "http://www.w3.org/1999/xlink";
|
||||
cleanVal == null ? el.removeAttributeNS(lnk, k.slice(6)) : el.setAttributeNS(lnk, k.slice(6), cleanVal);
|
||||
cleanVal == null ? el.removeAttributeNS(XLINK_NS, k.slice(6)) : el.setAttributeNS(XLINK_NS, k.slice(6), cleanVal);
|
||||
continue;
|
||||
}
|
||||
if (k.startsWith("on")) {
|
||||
|
||||
2
dist/sigpro.esm.min.js
vendored
2
dist/sigpro.esm.min.js
vendored
File diff suppressed because one or more lines are too long
17
dist/sigpro.js
vendored
17
dist/sigpro.js
vendored
@@ -68,6 +68,9 @@
|
||||
var proxyCache = new WeakMap;
|
||||
var ITER = Symbol("iter");
|
||||
var MOUNTED_NODES = new WeakMap;
|
||||
var SVG_NS = "http://www.w3.org/2000/svg";
|
||||
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
||||
var SVG_TAGS = new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(","));
|
||||
var dispose = (eff) => {
|
||||
if (!eff || eff._disposed)
|
||||
return;
|
||||
@@ -205,9 +208,6 @@
|
||||
computed._dirty = true;
|
||||
computed._deps = null;
|
||||
computed._disposed = false;
|
||||
computed.stop = () => {};
|
||||
if (activeOwner)
|
||||
onUnmount(computed.stop);
|
||||
return computed;
|
||||
}
|
||||
if (key)
|
||||
@@ -343,12 +343,10 @@
|
||||
isArr(node) ? node.forEach(attach) : attach(node);
|
||||
return node;
|
||||
}
|
||||
const isSVG = /^(svg|path|circle|rect|line|poly(line|gon)|g|defs|text(path)?|tspan|use|symbol|image|marker|ellipse)$/i.test(tag);
|
||||
const el = isSVG ? doc.createElementNS("http://www.w3.org/2000/svg", tag) : doc.createElement(tag);
|
||||
const isSVG = SVG_TAGS.has(tag);
|
||||
const el = isSVG ? doc.createElementNS(SVG_NS, tag) : doc.createElement(tag);
|
||||
el._cleanups = new Set;
|
||||
for (let k in props) {
|
||||
if (!props.hasOwnProperty(k))
|
||||
continue;
|
||||
for (const k of Object.keys(props)) {
|
||||
let v = props[k];
|
||||
if (k === "ref") {
|
||||
isFunc(v) ? v(el) : v.current = el;
|
||||
@@ -356,8 +354,7 @@
|
||||
}
|
||||
if (isSVG && k.startsWith("xlink:")) {
|
||||
const cleanVal = validateAttr(k.slice(6), v);
|
||||
let lnk = "http://www.w3.org/1999/xlink";
|
||||
cleanVal == null ? el.removeAttributeNS(lnk, k.slice(6)) : el.setAttributeNS(lnk, k.slice(6), cleanVal);
|
||||
cleanVal == null ? el.removeAttributeNS(XLINK_NS, k.slice(6)) : el.setAttributeNS(XLINK_NS, k.slice(6), cleanVal);
|
||||
continue;
|
||||
}
|
||||
if (k.startsWith("on")) {
|
||||
|
||||
2
dist/sigpro.min.js
vendored
2
dist/sigpro.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user