Clear Code, small organized
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s

This commit is contained in:
2026-04-27 10:36:18 +02:00
parent a65219759d
commit 496ad150ce
7 changed files with 38 additions and 46 deletions

17
dist/sigpro.esm.js vendored
View File

@@ -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")) {

File diff suppressed because one or more lines are too long

17
dist/sigpro.js vendored
View File

@@ -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

File diff suppressed because one or more lines are too long

View File

@@ -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")) {

View File

@@ -1,6 +1,6 @@
{
"name": "sigpro",
"version": "1.2.21",
"version": "1.2.22",
"type": "module",
"license": "MIT",
"main": "./dist/sigpro.esm.min.js",

View File

@@ -13,6 +13,10 @@ const proxyCache = new WeakMap()
const ITER = Symbol('iter')
const MOUNTED_NODES = new WeakMap()
const SVG_NS = "http://www.w3.org/2000/svg"
const XLINK_NS = "http://www.w3.org/1999/xlink"
const SVG_TAGS = new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(","))
const dispose = eff => {
if (!eff || eff._disposed) return
eff._disposed = true
@@ -97,8 +101,8 @@ const batch = fn => {
const trackUpdate = (subs, trigger = false) => {
if (!trigger && activeEffect && !activeEffect._disposed) {
subs.add(activeEffect)
; (activeEffect._deps ||= new Set()).add(subs)
subs.add(activeEffect);
(activeEffect._deps ||= new Set()).add(subs)
} else if (trigger && subs.size > 0) {
let hasQueue = false
for (const e of subs) {
@@ -142,8 +146,6 @@ const $ = (val, key = null) => {
computed._dirty = true
computed._deps = null
computed._disposed = false
computed.stop = () => { }
if (activeOwner) onUnmount(computed.stop)
return computed
}
if (key) try { val = JSON.parse(localStorage.getItem(key)) ?? val } catch (e) { }
@@ -281,24 +283,23 @@ const 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)
continue
}
if (isSVG && k.startsWith("xlink:")) {
const cleanVal = validateAttr(k.slice(6), v);
let lnk = "http://www.w3.org/1999/xlink"
const cleanVal = validateAttr(k.slice(6), v)
cleanVal == null
? el.removeAttributeNS(lnk, k.slice(6))
: el.setAttributeNS(lnk, k.slice(6), cleanVal);
continue;
? el.removeAttributeNS(XLINK_NS, k.slice(6))
: el.setAttributeNS(XLINK_NS, k.slice(6), cleanVal)
continue
}
if (k.startsWith("on")) {
const ev = k.slice(2).toLowerCase()