This commit is contained in:
2026-04-06 18:07:39 +02:00
parent 294547fc56
commit 071a215393
80 changed files with 593 additions and 2085 deletions

View File

@@ -1,21 +1,56 @@
// index.js
import './src/sigpro.js';
// import './src/sigpro.js';
import { $, $$, Render, Watch, Tag, If, For, Router, Mount } from './src/sigpro.js';
import * as Components from './src/components/index.js';
import * as Utils from './src/core/utils.js';
import { tt } from './src/core/i18n.js';
export * from './src/components/index.js';
export * from './src/core/utils.js';
export { tt };
export { $, $$, Render, Watch, Tag, If, For, Router, Mount, tt };
if (typeof window !== 'undefined') {
// const CoreAPI = { $, $$, Render, Watch, Tag, If, For, Router, Mount } = SigPro;
// Object.entries(CoreAPI).forEach(([name, fn]) => {
// Object.defineProperty(window, name, {
// value: fn,
// writable: false,
// configurable: false,
// enumerable: true
// });
// });
Object.entries(Components).forEach(([name, component]) => {
window[name] = component;
Object.defineProperty(window, name, {
value: component,
writable: false,
configurable: true,
enumerable: true
});
});
window.Utils = Utils;
window.tt = tt;
window.SigProUI = { ...Components, Utils, tt };
Object.entries(Utils).forEach(([name, fn]) => {
Object.defineProperty(window, name, {
value: fn,
writable: false,
configurable: true,
enumerable: true
});
});
Object.defineProperty(window, 'tt', {
value: tt,
writable: false,
configurable: true,
enumerable: true
});
Object.defineProperty(window, 'SigProUI', {
value: { ...Components, Utils, tt },
writable: false,
configurable: true,
enumerable: true
});
console.log("🎨 SigProUI ready");
}