1.2.11
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s

This commit is contained in:
2026-05-02 23:49:41 +02:00
parent 17b7e52063
commit 46d80d3014
5 changed files with 33 additions and 45 deletions

View File

@@ -1,14 +1,25 @@
import * as All from './sigpro-ui.js';
export const Components = { ...All };
import { $, $$, watch, batch, h, Fragment, mount, when, each, router, onUnmount, isArr, isFunc, isObj } from "./sigpro.js"
if (typeof window !== 'undefined') {
Object.entries({ ...Components}).forEach(([name, value]) => {
Object.defineProperty(window, name, {
value,
writable: false,
configurable: true,
enumerable: true
if (typeof window !== "undefined") {
Object.assign(window, { $, $$, watch, h, Fragment, when, each, router, mount, batch, onUnmount, isArr, isFunc, isObj })
"a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video"
.split(" ")
.forEach(tag => { window[tag] = (props, children) => h(tag, props, children) })
// Asignar todos los componentes al scope global
Object.entries(All).forEach(([name, value]) => {
Object.defineProperty(window, name, {
value,
writable: false,
configurable: true,
enumerable: true
});
});
});
}
// También asignar Components como respaldo
if (typeof window !== 'undefined') {
window.Components = { ...All };
}