nuclo 0.2.30 → 0.2.31
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/package.json +1 -1
- package/dist/Element-C3mU75-a.mjs +0 -2
- package/dist/Element-C3mU75-a.mjs.map +0 -1
- package/dist/bootstrap.d.ts +0 -5
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/element/attributes.d.ts +0 -6
- package/dist/element/attributes.d.ts.map +0 -1
- package/dist/element/class-name.d.ts +0 -6
- package/dist/element/class-name.d.ts.map +0 -1
- package/dist/element/event-attributes.d.ts +0 -5
- package/dist/element/event-attributes.d.ts.map +0 -1
- package/dist/element/events.d.ts +0 -35
- package/dist/element/events.d.ts.map +0 -1
- package/dist/element/factory-meta.d.ts +0 -25
- package/dist/element/factory-meta.d.ts.map +0 -1
- package/dist/element/factory.d.ts +0 -32
- package/dist/element/factory.d.ts.map +0 -1
- package/dist/element/inline-style.d.ts +0 -9
- package/dist/element/inline-style.d.ts.map +0 -1
- package/dist/element/modifiers.d.ts +0 -11
- package/dist/element/modifiers.d.ts.map +0 -1
- package/dist/element/tags.d.ts +0 -5
- package/dist/element/tags.d.ts.map +0 -1
- package/dist/hydration.d.ts +0 -73
- package/dist/hydration.d.ts.map +0 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +0 -1
- package/dist/list/index.d.ts +0 -7
- package/dist/list/index.d.ts.map +0 -1
- package/dist/list/runtime.d.ts +0 -6
- package/dist/list/runtime.d.ts.map +0 -1
- package/dist/list/template.d.ts +0 -113
- package/dist/list/template.d.ts.map +0 -1
- package/dist/list/types.d.ts +0 -57
- package/dist/list/types.d.ts.map +0 -1
- package/dist/nuclo.cjs +0 -2
- package/dist/nuclo.cjs.map +0 -1
- package/dist/nuclo.mjs +0 -2
- package/dist/nuclo.mjs.map +0 -1
- package/dist/nuclo.umd.js +0 -2
- package/dist/nuclo.umd.js.map +0 -1
- package/dist/polyfill/Document.d.ts +0 -19
- package/dist/polyfill/Document.d.ts.map +0 -1
- package/dist/polyfill/Element.d.ts +0 -48
- package/dist/polyfill/Element.d.ts.map +0 -1
- package/dist/polyfill/Event.d.ts +0 -43
- package/dist/polyfill/Event.d.ts.map +0 -1
- package/dist/polyfill/Node.d.ts +0 -13
- package/dist/polyfill/Node.d.ts.map +0 -1
- package/dist/polyfill/Text.d.ts +0 -11
- package/dist/polyfill/Text.d.ts.map +0 -1
- package/dist/polyfill/index.d.ts +0 -24
- package/dist/polyfill/index.d.ts.map +0 -1
- package/dist/polyfill/nuclo.polyfill.mjs +0 -2
- package/dist/polyfill/nuclo.polyfill.mjs.map +0 -1
- package/dist/render.d.ts +0 -33
- package/dist/render.d.ts.map +0 -1
- package/dist/shared/conditions.d.ts +0 -4
- package/dist/shared/conditions.d.ts.map +0 -1
- package/dist/shared/dom.d.ts +0 -69
- package/dist/shared/dom.d.ts.map +0 -1
- package/dist/shared/environment.d.ts +0 -5
- package/dist/shared/environment.d.ts.map +0 -1
- package/dist/shared/errors.d.ts +0 -2
- package/dist/shared/errors.d.ts.map +0 -1
- package/dist/shared/renderables.d.ts +0 -4
- package/dist/shared/renderables.d.ts.map +0 -1
- package/dist/shared/strings.d.ts +0 -19
- package/dist/shared/strings.d.ts.map +0 -1
- package/dist/shared/type-guards.d.ts +0 -16
- package/dist/shared/type-guards.d.ts.map +0 -1
- package/dist/ssr/index.d.ts +0 -19
- package/dist/ssr/index.d.ts.map +0 -1
- package/dist/ssr/nuclo.ssr.mjs +0 -2
- package/dist/ssr/nuclo.ssr.mjs.map +0 -1
- package/dist/ssr/render-to-string.d.ts +0 -41
- package/dist/ssr/render-to-string.d.ts.map +0 -1
- package/dist/style/css.d.ts +0 -26
- package/dist/style/css.d.ts.map +0 -1
- package/dist/style/engine.d.ts +0 -74
- package/dist/style/engine.d.ts.map +0 -1
- package/dist/style/index.d.ts +0 -3
- package/dist/style/index.d.ts.map +0 -1
- package/dist/update/conditional.d.ts +0 -3
- package/dist/update/conditional.d.ts.map +0 -1
- package/dist/update/reactive-attributes.d.ts +0 -45
- package/dist/update/reactive-attributes.d.ts.map +0 -1
- package/dist/update/reactive-text.d.ts +0 -38
- package/dist/update/reactive-text.d.ts.map +0 -1
- package/dist/update/registry.d.ts +0 -116
- package/dist/update/registry.d.ts.map +0 -1
- package/dist/update/scope.d.ts +0 -7
- package/dist/update/scope.d.ts.map +0 -1
- package/dist/update/update.d.ts +0 -4
- package/dist/update/update.d.ts.map +0 -1
- package/dist/when/builder.d.ts +0 -16
- package/dist/when/builder.d.ts.map +0 -1
- package/dist/when/index.d.ts +0 -44
- package/dist/when/index.d.ts.map +0 -1
- package/dist/when/runtime.d.ts +0 -59
- package/dist/when/runtime.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuclo",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.31",
|
|
5
5
|
"description": "Lightweight, type-safe DOM library with plain mutable state and explicit updates — global tag builders, SSR, hydration, and typed CSS, no virtual DOM, no compiler.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Danilo Celestino de Castro (https://github.com/dan2dev)",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=typeof window<`u`&&typeof document<`u`;var t=class{nodeType=1;nodeName=``;nodeValue=null;parentNode=null;_childNodes=null;textContent=``;get childNodes(){let e=this._childNodes??[];return{...e,length:e.length,item:t=>e[t]||null,[Symbol.iterator]:function*(){for(let t of e)yield t},forEach:t=>{for(let n=0;n<e.length;n++)t(e[n],n,this.childNodes)},entries:function*(){for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){for(let t=0;t<e.length;t++)yield t},values:function*(){for(let t of e)yield t}}}},n=class{get cssText(){let e=Object.entries(this);return e.length===0?``:e.map(([e,t])=>`${e}: ${t}`).join(`; `)}setProperty(e,t){this[e]=t}getPropertyValue(e){return this[e]||``}},r=class{_el;constructor(e){this._el=e}add(...e){let t=this._el.className?this._el.className.split(` `).filter(Boolean):[];for(let n of e)n&&!t.includes(n)&&t.push(n);this._el.className=t.join(` `)}remove(...e){this._el.className&&(this._el.className=this._el.className.split(` `).filter(t=>t&&!e.includes(t)).join(` `))}contains(e){return!!this._el.className&&this._el.className.split(` `).includes(e)}toggle(e,t){let n=this.contains(e);return t===void 0?n?(this.remove(e),!1):(this.add(e),!0):t?(this.add(e),!0):(this.remove(e),!1)}replace(e,t){return this.contains(e)?(this.remove(e),this.add(t),!0):!1}item(e){return this._el.className.split(` `).filter(Boolean)[e]??null}get length(){return this._el.className?this._el.className.split(` `).filter(Boolean).length:0}get value(){return this._el.className}set value(e){this._el.className=e}toString(){return this._el.className}supports(e){return!1}forEach(e){let t=this._el.className.split(` `).filter(Boolean);for(let n=0;n<t.length;n++)e(t[n],n,this)}[Symbol.iterator](){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:e[t++],done:!1}:{value:``,done:!0}}}}entries(){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:[t,e[t++]],done:!1}:{value:[0,``],done:!0}}}}keys(){let e=this.length,t=0;return{next(){return t<e?{value:t++,done:!1}:{value:0,done:!0}}}}values(){return this[Symbol.iterator]()}};function i(e){return typeof e==`object`&&!!e&&`tagName`in e}function a(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===3}function o(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===8}var s=class extends t{tagName;children;className=``;textContent=``;_innerHTML=``;parentNode=null;rawMods;mods;id=``;namespaceURI;sheet;_listeners;_style;_classList;_attributes;get attributes(){return this._attributes??=new Map}set attributes(e){this._attributes=e}get style(){return this._style??=new n}set style(e){this._style=e}get classList(){return this._classList??=new r(this)}set classList(e){this._classList=e}get innerHTML(){return this.serializeChildren()}set innerHTML(e){this._innerHTML=e}serializeChildren(){let e=``;for(let t of this.children)i(t)?e+=this.serializeElement(t):a(t)?e+=t.textContent||``:o(t)&&(e+=`<!--${t.data||``}-->`);return e}serializeElement(e){let t=e.tagName.toLowerCase(),n=`<${t}`;if(e.id&&(n+=` id="${e.id}"`),e.className&&(n+=` class="${e.className}"`),e._attributes)for(let[t,r]of e._attributes)t!==`id`&&t!==`class`&&(n+=` ${t}="${r}"`);if(n+=`>`,e.children&&e.children.length>0)for(let t of e.children)i(t)?n+=this.serializeElement(t):a(t)?n+=t.textContent||``:o(t)&&(n+=`<!--${t.data||``}-->`);return n+=`</${t}>`,n}constructor(t){if(super(),this.tagName=t.toLowerCase(),this.nodeType=1,this.nodeName=t.toUpperCase(),this.children=[],!e)this._listeners=null;else{this._listeners=new Map;let e={};if(this.style=new Proxy({},{get:(t,n)=>n===`setProperty`?(t,n)=>{e[t]=n}:n===`getPropertyValue`?t=>e[t]||``:n===`cssText`?Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `):e[n],set:(t,n,r)=>(e[n]=r,!0)}),this.tagName===`style`){let e=[];this.sheet={cssRules:e,insertRule:(t,n)=>{let r=n??e.length,i;if(t.trim().startsWith(`@`)){let e=[],n=t.replace(/^@\w+\s+/,``).replace(/\s*\{[\s\S]*\}$/,``).trim();i={cssText:t,conditionText:n,media:{mediaText:n},cssRules:e,insertRule:(t,n)=>{let r=n??e.length;return e.splice(r,0,{cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1}),r},deleteRule:t=>{e.splice(t,1)},type:4}}else i={cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1};return e.splice(r,0,i),r},deleteRule:t=>{e.splice(t,1)}}}this.classList=c(this)}}appendChild(t){if(t?.nodeType===11){let e=t.childNodes;t.childNodes=[],t.children&&=[];for(let t=0;t<e.length;t++)this.appendChild(e[t]);return t}return this.children.push(t),e&&this._childNodes&&this._childNodes.push(t),typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),t}setAttribute(e,t){(this._attributes??=new Map).set(e,t),e===`class`?this.className=t:e===`id`&&(this.id=t)}getAttribute(e){return this._attributes?.get(e)??null}removeAttribute(e){this._attributes?.delete(e),e===`class`&&(this.className=``)}hasAttribute(e){return this._attributes?.has(e)??!1}insertBefore(t,n){if(n===null)return this.appendChild(t);if(t?.nodeType===11){let e=t.childNodes;t.childNodes=[],t.children&&=[];for(let t=0;t<e.length;t++)this.insertBefore(e[t],n);return t}let r=this.children.indexOf(n);if(r!==-1){if(this.children.splice(r,0,t),e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&this._childNodes.splice(e,0,t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this)}return t}removeChild(t){let n=this.children.indexOf(t);if(n!==-1){if(this.children.splice(n,1),e&&this._childNodes){let e=this._childNodes.indexOf(t);e!==-1&&this._childNodes.splice(e,1)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=null)}return t}replaceChild(t,n){let r=this.children.indexOf(n);if(r!==-1){if(this.children[r]=t,e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&(this._childNodes[e]=t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),typeof n==`object`&&n&&`parentNode`in n&&(n.parentNode=null)}return n}addEventListener(e,t){this._listeners&&(this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t))}removeEventListener(e,t){let n=this._listeners?.get(e);n&&n.delete(t)}dispatchEvent(e){let t=this._listeners?.get(e.type);if(t)for(let n of t)try{n(e)}catch(e){console.error(`Error in event listener:`,e)}return e.bubbles&&this.parentNode&&typeof this.parentNode==`object`&&`dispatchEvent`in this.parentNode&&typeof this.parentNode.dispatchEvent==`function`&&this.parentNode.dispatchEvent(e),!0}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);return this.querySelectorById(t)}if(e.startsWith(`.`)){let t=e.slice(1);return this.querySelectorByClass(t)}return this.querySelectorByTag(e)}querySelectorById(e){if(this.id===e)return this;for(let t of this.children)if(i(t)){if(t.id===e)return t;let n=t.querySelector(`#${e}`);if(n)return n}return null}querySelectorByClass(e){if(this.classList.contains(e))return this;for(let t of this.children)if(i(t)){if(t.classList?.contains(e))return t;let n=t.querySelector(`.${e}`);if(n)return n}return null}querySelectorByTag(e){let t=e.toLowerCase();if(this.tagName.toLowerCase()===t)return this;for(let n of this.children)if(i(n)){if(n.tagName.toLowerCase()===t)return n;let r=n.querySelector(e);if(r)return r}return null}querySelectorAll(e){let t=[];if(e.startsWith(`#`)){let n=this.querySelector(e);n&&t.push(n)}else if(e.startsWith(`.`)){let n=e.slice(1);this.querySelectorAllByClass(n,t)}else{let n=e.toLowerCase();this.querySelectorAllByTag(n,t)}return t}querySelectorAllByClass(e,t){this.classList.contains(e)&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByClass(e,t)}querySelectorAllByTag(e,t){this.tagName.toLowerCase()===e&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByTag(e,t)}};function c(e){let t=()=>e.className.split(` `).filter(e=>e),n=t=>{e.className=t.join(` `)},r={add:(...e)=>{let r=t();for(let t of e)t&&!r.includes(t)&&r.push(t);n(r)},remove:(...e)=>{e.length!==0&&n(t().filter(t=>!e.includes(t)))},toggle:(e,t)=>{let n=r.contains(e);return t===void 0?n?(r.remove(e),!1):(r.add(e),!0):t?(r.add(e),!0):(r.remove(e),!1)},contains:e=>t().includes(e),replace:(e,r)=>{let i=t(),a=i.indexOf(e);return a!==-1&&(i[a]=r,n(i),!0)},item:e=>t()[e]||null,get length(){return t().length},toString:()=>e.className,[Symbol.iterator]:function*(){yield*t()},forEach:e=>{let n=t();for(let t=0;t<n.length;t++)e(n[t],t,r)},entries:function*(){let e=t();for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){let e=t();for(let t=0;t<e.length;t++)yield t},values:function*(){yield*t()},get value(){return e.className},set value(t){e.className=t},supports:e=>!1};return r}export{t as n,s as t};
|
|
2
|
-
//# sourceMappingURL=Element-C3mU75-a.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Element-C3mU75-a.mjs","names":[],"sources":["../src/shared/environment.ts","../src/polyfill/Node.ts","../src/polyfill/Element.ts"],"sourcesContent":["/**\n * Simplified environment detection - minimal overhead for smaller bundle size\n */\n\n// Basic environment detection - no complex caching or edge cases\nexport const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Base Node class for instanceof checks in Node.js polyfill\n */\nexport class NucloNode {\n nodeType: number = 1; // ELEMENT_NODE\n nodeName: string = '';\n nodeValue: string | null = null;\n parentNode: unknown = null;\n _childNodes: Node[] | null = null;\n textContent: string = '';\n\n get childNodes(): NodeListOf<ChildNode> {\n const nodes = this._childNodes ?? [];\n return {\n ...nodes,\n length: nodes.length,\n item: (index: number) => (nodes[index] as ChildNode) || null,\n [Symbol.iterator]: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n },\n forEach: (callback: (value: ChildNode, key: number, parent: NodeListOf<ChildNode>) => void) => {\n for (let i = 0; i < nodes.length; i++) {\n callback(nodes[i] as ChildNode, i, this.childNodes);\n }\n },\n entries: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield [i, nodes[i] as ChildNode] as [number, ChildNode];\n }\n },\n keys: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n }\n } as unknown as NodeListOf<ChildNode>;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NucloNode } from './Node';\nimport { isBrowser } from '../shared/environment';\n\n/**\n * Lightweight style object for SSR — prototype methods instead of Object.defineProperty per element.\n * Stores CSS properties as own properties and provides cssText/setProperty/getPropertyValue via prototype.\n */\nclass SSRStyle {\n [key: string]: unknown;\n\n get cssText(): string {\n const entries = Object.entries(this);\n if (entries.length === 0) return '';\n return entries.map(([k, v]) => `${k}: ${v}`).join('; ');\n }\n\n setProperty(name: string, value: string): void {\n (this as Record<string, unknown>)[name] = value;\n }\n\n getPropertyValue(name: string): string {\n return ((this as Record<string, unknown>)[name] as string) || '';\n }\n}\n\n// Lightweight classList for SSR — prototype methods instead of per-element closures\nclass SSRClassList {\n private _el: NucloElement;\n constructor(el: NucloElement) { this._el = el; }\n\n add(...tokens: string[]): void {\n const classes = this._el.className ? this._el.className.split(' ').filter(Boolean) : [];\n for (const t of tokens) if (t && !classes.includes(t)) classes.push(t);\n this._el.className = classes.join(' ');\n }\n remove(...tokens: string[]): void {\n if (!this._el.className) return;\n this._el.className = this._el.className.split(' ').filter(c => c && !tokens.includes(c)).join(' ');\n }\n contains(token: string): boolean {\n return !!this._el.className && this._el.className.split(' ').includes(token);\n }\n toggle(token: string, force?: boolean): boolean {\n const has = this.contains(token);\n if (force === undefined) { if (has) { this.remove(token); return false; } this.add(token); return true; }\n if (force) { this.add(token); return true; }\n this.remove(token); return false;\n }\n replace(oldToken: string, newToken: string): boolean {\n if (!this.contains(oldToken)) return false;\n this.remove(oldToken); this.add(newToken); return true;\n }\n item(index: number): string | null { return (this._el.className.split(' ').filter(Boolean)[index]) ?? null; }\n get length(): number { return this._el.className ? this._el.className.split(' ').filter(Boolean).length : 0; }\n get value(): string { return this._el.className; }\n set value(v: string) { this._el.className = v; }\n toString(): string { return this._el.className; }\n supports(_token: string): boolean { return false; }\n forEach(cb: (value: string, key: number, parent: DOMTokenList) => void): void {\n const classes = this._el.className.split(' ').filter(Boolean);\n for (let i = 0; i < classes.length; i++) cb(classes[i], i, this as unknown as DOMTokenList);\n }\n [Symbol.iterator](): Iterator<string> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<string> { return i < classes.length ? { value: classes[i++], done: false } : { value: '', done: true }; } };\n }\n entries(): Iterator<[number, string]> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<[number, string]> { return i < classes.length ? { value: [i, classes[i++]], done: false } : { value: [0, ''], done: true }; } };\n }\n keys(): Iterator<number> {\n const len = this.length; let i = 0;\n return { next(): IteratorResult<number> { return i < len ? { value: i++, done: false } : { value: 0, done: true }; } };\n }\n values(): Iterator<string> { return this[Symbol.iterator](); }\n}\n\ninterface TextNode {\n nodeType: 3;\n textContent: string;\n}\n\ninterface CommentNode {\n nodeType: 8;\n data: string;\n}\n\nfunction isElementNode(node: unknown): node is NucloElement {\n return typeof node === 'object' && node !== null && 'tagName' in node;\n}\n\nfunction isTextNode(node: unknown): node is TextNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 3;\n}\n\nfunction isCommentNode(node: unknown): node is CommentNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 8;\n}\n\nexport class NucloElement extends NucloNode {\n tagName: string;\n children: unknown[];\n className: string = '';\n textContent: string = '';\n private _innerHTML: string = '';\n parentNode: unknown = null;\n rawMods?: unknown[];\n mods?: unknown[];\n id: string = '';\n namespaceURI?: string;\n sheet?: CSSStyleSheet | null;\n private _listeners: Map<string, Set<EventListener>> | null;\n\n // style/classList are allocated lazily: the vast majority of SSR elements\n // never touch either (className is stored on the .className string, and the\n // serializer reads the backing field directly), so eagerly constructing an\n // SSRStyle + SSRClassList per element was pure allocation churn. The browser\n // path assigns these in the constructor, so its getter never lazy-allocates.\n private _style?: CSSStyleDeclaration;\n private _classList?: DOMTokenList;\n\n // attributes is allocated lazily too — most elements carry their identity on\n // .className/.id (separate string fields) and never call setAttribute. Reads\n // short-circuit on the undefined backing map without allocating; the\n // serializer reads _attributes directly. The public getter still lazily\n // materializes a Map for any external `el.attributes` consumer.\n private _attributes?: Map<string, string>;\n\n get attributes(): Map<string, string> {\n return (this._attributes ??= new Map<string, string>());\n }\n set attributes(value: Map<string, string>) {\n this._attributes = value;\n }\n\n get style(): CSSStyleDeclaration {\n return (this._style ??= new SSRStyle() as unknown as CSSStyleDeclaration);\n }\n set style(value: CSSStyleDeclaration) {\n this._style = value;\n }\n\n get classList(): DOMTokenList {\n return (this._classList ??= new SSRClassList(this) as unknown as DOMTokenList);\n }\n set classList(value: DOMTokenList) {\n this._classList = value;\n }\n\n get innerHTML(): string {\n return this.serializeChildren();\n }\n\n set innerHTML(value: string) {\n this._innerHTML = value;\n }\n \n private serializeChildren(): string {\n let html = '';\n for (const child of this.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n return html;\n }\n \n private serializeElement(element: NucloElement): string {\n const tag = element.tagName.toLowerCase();\n let html = `<${tag}`;\n \n // Add attributes\n if (element.id) {\n html += ` id=\"${element.id}\"`;\n }\n if (element.className) {\n html += ` class=\"${element.className}\"`;\n }\n if (element._attributes) {\n for (const [name, value] of element._attributes) {\n if (name !== 'id' && name !== 'class') {\n html += ` ${name}=\"${value}\"`;\n }\n }\n }\n \n html += '>';\n \n // Add children\n if (element.children && element.children.length > 0) {\n for (const child of element.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n }\n \n html += `</${tag}>`;\n return html;\n }\n \n constructor(tagName: string) {\n super();\n this.tagName = tagName.toLowerCase();\n this.nodeType = 1; // ELEMENT_NODE\n this.nodeName = tagName.toUpperCase();\n this.children = [];\n\n if (!isBrowser) {\n // ── SSR path: minimal allocations, no Proxy, no event listeners ──\n // style and classList stay unallocated until first access (see getters).\n this._listeners = null;\n } else {\n // ── Browser path: full-featured Proxy style + DOMTokenList ──\n this._listeners = new Map();\n\n const styleProps: Record<string, string> = {};\n this.style = new Proxy({} as CSSStyleDeclaration, {\n get: (_target, prop: string) => {\n if (prop === 'setProperty') return (name: string, value: string) => { styleProps[name] = value; };\n if (prop === 'getPropertyValue') return (name: string) => styleProps[name] || '';\n if (prop === 'cssText') return Object.entries(styleProps).map(([k, v]) => `${k}: ${v}`).join('; ');\n return styleProps[prop];\n },\n set: (_target, prop: string, value: string) => { styleProps[prop] = value; return true; },\n });\n\n // CSSStyleSheet mock for style elements (browser only)\n if (this.tagName === 'style') {\n const cssRules: CSSRule[] = [];\n this.sheet = {\n cssRules: cssRules as unknown as CSSRuleList,\n insertRule: (rule: string, index?: number) => {\n const idx = index ?? cssRules.length;\n let mockRule: CSSRule;\n if (rule.trim().startsWith('@')) {\n const innerRules: CSSRule[] = [];\n const conditionText = rule.replace(/^@\\w+\\s+/, '').replace(/\\s*\\{[\\s\\S]*\\}$/, '').trim();\n mockRule = {\n cssText: rule, conditionText,\n media: { mediaText: conditionText } as MediaList,\n cssRules: innerRules as unknown as CSSRuleList,\n insertRule: (innerRule: string, innerIndex?: number) => {\n const innerIdx = innerIndex ?? innerRules.length;\n innerRules.splice(innerIdx, 0, { cssText: innerRule, selectorText: innerRule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule);\n return innerIdx;\n },\n deleteRule: (i: number) => { innerRules.splice(i, 1); },\n type: 4,\n } as unknown as CSSRule;\n } else {\n mockRule = { cssText: rule, selectorText: rule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule;\n }\n cssRules.splice(idx, 0, mockRule);\n return idx;\n },\n deleteRule: (index: number) => { cssRules.splice(index, 1); },\n } as unknown as CSSStyleSheet;\n }\n\n this.classList = createClassList(this);\n }\n }\n \n appendChild<T extends Node>(child: T): T {\n // Spec behaviour: appending a DocumentFragment moves its children into this\n // node and leaves the fragment empty. The list runtime relies on this to\n // batch row insertions.\n if ((child as any)?.nodeType === 11) {\n // Detach the fragment's backing array before iterating (instead of\n // slicing it) — the fragment is emptied either way, and reassigning\n // first means the loop never has to allocate a copy just to guard\n // against the array it's about to discard.\n const kids = (child as any).childNodes as Node[];\n (child as any).childNodes = [];\n if ((child as any).children) (child as any).children = [];\n for (let i = 0; i < kids.length; i++) this.appendChild(kids[i]);\n return child;\n }\n this.children.push(child);\n if (isBrowser && (this as any)['_childNodes']) {\n (this as any)['_childNodes'].push(child);\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = this;\n }\n return child;\n }\n \n setAttribute(name: string, value: string): void {\n (this._attributes ??= new Map<string, string>()).set(name, value);\n if (name === 'class') {\n this.className = value;\n } else if (name === 'id') {\n this.id = value;\n }\n }\n\n getAttribute(name: string): string | null {\n return this._attributes?.get(name) ?? null;\n }\n\n removeAttribute(name: string): void {\n this._attributes?.delete(name);\n if (name === 'class') {\n this.className = '';\n }\n }\n\n hasAttribute(name: string): boolean {\n return this._attributes?.has(name) ?? false;\n }\n \n insertBefore<T extends Node>(newNode: T, referenceNode: Node | null): T {\n if (referenceNode === null) {\n return this.appendChild(newNode);\n }\n // Spec behaviour: inserting a DocumentFragment moves its children (in order)\n // before the reference node and empties the fragment.\n if ((newNode as any)?.nodeType === 11) {\n const kids = (newNode as any).childNodes as Node[];\n (newNode as any).childNodes = [];\n if ((newNode as any).children) (newNode as any).children = [];\n for (let i = 0; i < kids.length; i++) this.insertBefore(kids[i], referenceNode);\n return newNode;\n }\n const index = this.children.indexOf(referenceNode);\n if (index !== -1) {\n this.children.splice(index, 0, newNode);\n if (isBrowser && (this as any)['_childNodes']) {\n const childNodesIndex = (this as any)['_childNodes'].indexOf(referenceNode);\n if (childNodesIndex !== -1) {\n (this as any)['_childNodes'].splice(childNodesIndex, 0, newNode);\n }\n }\n if (typeof newNode === 'object' && newNode !== null && 'parentNode' in newNode) {\n (newNode as { parentNode: unknown }).parentNode = this;\n }\n }\n return newNode;\n }\n \n removeChild<T extends Node>(child: T): T {\n const index = this.children.indexOf(child);\n if (index !== -1) {\n this.children.splice(index, 1);\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(child);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'].splice(cnIndex, 1);\n }\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = null;\n }\n }\n return child;\n }\n\n replaceChild<T extends Node>(newChild: Node, oldChild: T): T {\n const index = this.children.indexOf(oldChild);\n if (index !== -1) {\n this.children[index] = newChild;\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(oldChild);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'][cnIndex] = newChild;\n }\n }\n if (typeof newChild === 'object' && newChild !== null && 'parentNode' in newChild) {\n (newChild as { parentNode: unknown }).parentNode = this;\n }\n if (typeof oldChild === 'object' && oldChild !== null && 'parentNode' in oldChild) {\n (oldChild as { parentNode: unknown }).parentNode = null;\n }\n }\n return oldChild;\n }\n \n addEventListener(type: string, listener: EventListener): void {\n if (!this._listeners) return;\n if (!this._listeners.has(type)) {\n this._listeners.set(type, new Set());\n }\n this._listeners.get(type)!.add(listener);\n }\n\n removeEventListener(type: string, listener: EventListener): void {\n const listeners = this._listeners?.get(type);\n if (listeners) {\n listeners.delete(listener);\n }\n }\n\n dispatchEvent(event: Event): boolean {\n const listeners = this._listeners?.get(event.type);\n if (listeners) {\n for (const listener of listeners) {\n try {\n listener(event);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error in event listener:', error);\n }\n }\n }\n if (event.bubbles && this.parentNode && typeof this.parentNode === 'object' && 'dispatchEvent' in this.parentNode && typeof this.parentNode.dispatchEvent === 'function') {\n this.parentNode.dispatchEvent(event);\n }\n return true;\n }\n \n querySelector(selector: string): Element | null {\n // Simple implementation - supports basic selectors\n // #id, .class, tagName\n if (selector.startsWith('#')) {\n const id = selector.slice(1);\n return this.querySelectorById(id);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n return this.querySelectorByClass(className);\n } else {\n // Tag name selector\n return this.querySelectorByTag(selector);\n }\n }\n \n private querySelectorById(id: string): Element | null {\n // Check self\n if (this.id === id) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.id === id) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`#${id}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByClass(className: string): Element | null {\n // Check self\n if (this.classList.contains(className)) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.classList?.contains(className)) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`.${className}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByTag(tagName: string): Element | null {\n const lowerTag = tagName.toLowerCase();\n // Check self\n if (this.tagName.toLowerCase() === lowerTag) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.tagName.toLowerCase() === lowerTag) {\n return child as unknown as Element;\n }\n const found = child.querySelector(tagName);\n if (found) return found;\n }\n }\n return null;\n }\n \n querySelectorAll(selector: string): NodeListOf<Element> {\n const results: Element[] = [];\n \n if (selector.startsWith('#')) {\n const found = this.querySelector(selector);\n if (found) results.push(found);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n this.querySelectorAllByClass(className, results);\n } else {\n const tagName = selector.toLowerCase();\n this.querySelectorAllByTag(tagName, results);\n }\n \n return results as unknown as NodeListOf<Element>;\n }\n \n private querySelectorAllByClass(className: string, results: Element[]): void {\n if (this.classList.contains(className)) {\n results.push(this as unknown as Element);\n }\n // Recursion alone collects matching descendants — checking the child here\n // as well would push direct children twice.\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByClass(className, results);\n }\n }\n }\n\n private querySelectorAllByTag(tagName: string, results: Element[]): void {\n if (this.tagName.toLowerCase() === tagName) {\n results.push(this as unknown as Element);\n }\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByTag(tagName, results);\n }\n }\n }\n}\n\nfunction createClassList(owner: NucloElement): DOMTokenList {\n const getClasses = () => owner.className.split(' ').filter((c) => c);\n const setClasses = (classes: string[]) => {\n owner.className = classes.join(' ');\n };\n\n const classList = {\n add: (...tokens: string[]) => {\n const classes = getClasses();\n for (const token of tokens) {\n if (token && !classes.includes(token)) {\n classes.push(token);\n }\n }\n setClasses(classes);\n },\n remove: (...tokens: string[]) => {\n if (tokens.length === 0) return;\n setClasses(getClasses().filter((c) => !tokens.includes(c)));\n },\n toggle: (token: string, force?: boolean) => {\n const hasClass = classList.contains(token);\n if (force === undefined) {\n if (hasClass) {\n classList.remove(token);\n return false;\n }\n classList.add(token);\n return true;\n }\n if (force) {\n classList.add(token);\n return true;\n }\n classList.remove(token);\n return false;\n },\n contains: (token: string) => getClasses().includes(token),\n replace: (oldToken: string, newToken: string) => {\n const classes = getClasses();\n const index = classes.indexOf(oldToken);\n if (index === -1) return false;\n classes[index] = newToken;\n setClasses(classes);\n return true;\n },\n item: (index: number) => getClasses()[index] || null,\n get length() {\n return getClasses().length;\n },\n toString: () => owner.className,\n [Symbol.iterator]: function* () {\n yield* getClasses();\n },\n forEach: (callback: (value: string, key: number, parent: DOMTokenList) => void) => {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n callback(classes[i], i, classList as unknown as DOMTokenList);\n }\n },\n entries: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield [i, classes[i]] as [number, string];\n }\n },\n keys: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n yield* getClasses();\n },\n get value() {\n return owner.className;\n },\n set value(value: string) {\n owner.className = value;\n },\n supports: (_token: string) => false\n };\n\n return classList as unknown as DOMTokenList;\n}\n"],"mappings":"AAKA,MAAa,EAAY,OAAO,OAAW,KAAe,OAAO,SAAa,ICF9E,IAAa,EAAb,KAAuB,CACrB,SAAmB,EACnB,SAAmB,GACnB,UAA2B,KAC3B,WAAsB,KACtB,YAA6B,KAC7B,YAAsB,GAEtB,IAAI,YAAoC,CACtC,IAAM,EAAQ,KAAK,aAAe,CAAC,EACnC,MAAO,CACL,GAAG,EACH,OAAQ,EAAM,OACd,KAAO,GAAmB,EAAM,IAAwB,KACxD,CAA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Q,IAClC,MAAM,CAEV,EACA,OAAQ,WAAa,CACnB,MAAO,EAAW,CACpB,EACA,IAAI,OAAQ,CACV,OAAO,EAAM,SACf,EACA,IAAI,MAAM,EAAe,CACvB,EAAM,UAAY,CACpB,EACA,SAAW,GAAmB,EAChC,EAEA,OAAO,CACT"}
|
package/dist/bootstrap.d.ts
DELETED
package/dist/bootstrap.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AASA;;GAEG;AAEH,wBAAgB,iBAAiB,IAAI,IAAI,CAoBxC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type AttributeKey<TTagName extends ElementTagName> = keyof ExpandedElementAttributes<TTagName>;
|
|
2
|
-
type AttributeCandidate<TTagName extends ElementTagName> = ExpandedElementAttributes<TTagName>[AttributeKey<TTagName>];
|
|
3
|
-
export declare function applySingleAttribute<TTagName extends ElementTagName>(el: ExpandedElement<TTagName>, key: AttributeKey<TTagName>, raw: AttributeCandidate<TTagName> | undefined, shouldMergeClassName?: boolean): void;
|
|
4
|
-
export declare function applyAttributes<TTagName extends ElementTagName>(element: ExpandedElement<TTagName>, attributes: ExpandedElementAttributes<TTagName>, mergeClassName?: boolean): void;
|
|
5
|
-
export { createReactiveTextNode } from "../update/reactive-text";
|
|
6
|
-
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/element/attributes.ts"],"names":[],"mappings":"AAaA,KAAK,YAAY,CAAC,QAAQ,SAAS,cAAc,IAAI,MAAM,yBAAyB,CAAC,QAAQ,CAAC,CAAC;AAC/F,KAAK,kBAAkB,CAAC,QAAQ,SAAS,cAAc,IACrD,yBAAyB,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;AA0C9D,wBAAgB,oBAAoB,CAAC,QAAQ,SAAS,cAAc,EAClE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC7B,GAAG,EAAE,YAAY,CAAC,QAAQ,CAAC,EAC3B,GAAG,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,SAAS,EAC7C,oBAAoB,UAAQ,GAC3B,IAAI,CAsEN;AAED,wBAAgB,eAAe,CAAC,QAAQ,SAAS,cAAc,EAC7D,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,UAAU,EAAE,yBAAyB,CAAC,QAAQ,CAAC,EAC/C,cAAc,UAAO,GACpB,IAAI,CAYN;AAED,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function initReactiveClassName(el: HTMLElement): void;
|
|
2
|
-
export declare function hasReactiveClassName(el: HTMLElement): boolean;
|
|
3
|
-
export declare function addStaticClasses(el: HTMLElement, className: string): void;
|
|
4
|
-
export declare function mergeReactiveClassName(el: HTMLElement, reactiveClassName: string): void;
|
|
5
|
-
export declare function mergeStaticClassName(el: HTMLElement, newClassName: string): void;
|
|
6
|
-
//# sourceMappingURL=class-name.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class-name.d.ts","sourceRoot":"","sources":["../../src/element/class-name.ts"],"names":[],"mappings":"AAoCA,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAO3D;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAE7D;AAGD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAQzE;AAGD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CA+BvF;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAWhF"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Converts a public camel-cased event attribute to its native IDL property. */
|
|
2
|
-
export declare function eventAttributeToProperty(attribute: string): string | null;
|
|
3
|
-
/** Assigns an event attribute, falling back when the IDL property is absent. */
|
|
4
|
-
export declare function setEventAttribute(element: HTMLElement, property: string, listener: EventListener): void;
|
|
5
|
-
//# sourceMappingURL=event-attributes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-attributes.d.ts","sourceRoot":"","sources":["../../src/element/event-attributes.ts"],"names":[],"mappings":"AAMA,gFAAgF;AAChF,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBzE;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,aAAa,GACtB,IAAI,CA2BN"}
|
package/dist/element/events.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed event listener helper.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* button(
|
|
6
|
-
* "Click",
|
|
7
|
-
* on("click", (e) => {
|
|
8
|
-
* // e and currentTarget are inferred from the native event map
|
|
9
|
-
* })
|
|
10
|
-
* )
|
|
11
|
-
*
|
|
12
|
-
* Design notes:
|
|
13
|
-
* - Returns a NodeModFn so it can be used like any other modifier.
|
|
14
|
-
* - Produces no child node (returns void in the modifier body).
|
|
15
|
-
* - Provides strong typing of the event object based on the DOM event name.
|
|
16
|
-
* - Stores listener references in a WeakMap to prevent memory leaks.
|
|
17
|
-
* - Listeners are automatically cleaned up when elements are garbage collected.
|
|
18
|
-
*/
|
|
19
|
-
type EventListenerOptions = boolean | AddEventListenerOptions;
|
|
20
|
-
/**
|
|
21
|
-
* Remove all listeners of a specific type from an element.
|
|
22
|
-
*/
|
|
23
|
-
export declare function removeAllListeners(element: HTMLElement, type?: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* Overload for standard HTMLElement events (strongly typed via lib.dom.d.ts)
|
|
26
|
-
*/
|
|
27
|
-
export declare function on<K extends NucloHTMLElementEventName, TTagName extends NucloHTMLElementTagNameForEvent<K> = NucloHTMLElementTagNameForEvent<K>>(type: K, listener: TypedEventListener<HTMLElementTagNameMap[TTagName], NucloHTMLElementEventForName<K>>, options?: EventListenerOptions): NodeModFn<TTagName>;
|
|
28
|
-
/**
|
|
29
|
-
* Fallback / custom event overload (arbitrary event names or custom event types).
|
|
30
|
-
* Specify a custom event type with the E generic if needed:
|
|
31
|
-
* on<"my-event", CustomEvent<MyDetail>>("my-event", e => { ... })
|
|
32
|
-
*/
|
|
33
|
-
export declare function on<K extends string, E extends Event = Event, TTagName extends ElementTagName = ElementTagName>(type: K, listener: TypedEventListener<HTMLElementTagNameMap[TTagName], E>, options?: EventListenerOptions): NodeModFn<TTagName>;
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/element/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,KAAK,oBAAoB,GAAG,OAAO,GAAG,uBAAuB,CAAC;AAiD9D;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAyCN;AAwBD;;GAEG;AACH,wBAAgB,EAAE,CAChB,CAAC,SAAS,yBAAyB,EACnC,QAAQ,SAAS,+BAA+B,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC,CAAC,EAExF,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,kBAAkB,CAC1B,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,4BAA4B,CAAC,CAAC,CAAC,CAChC,EACD,OAAO,CAAC,EAAE,oBAAoB,GAC7B,SAAS,CAAC,QAAQ,CAAC,CAAC;AAEvB;;;;GAIG;AACH,wBAAgB,EAAE,CAChB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,KAAK,GAAG,KAAK,EACvB,QAAQ,SAAS,cAAc,GAAG,cAAc,EAEhD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAChE,OAAO,CAAC,EAAE,oBAAoB,GAC7B,SAAS,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal factory metadata.
|
|
3
|
-
*
|
|
4
|
-
* Tag builders return opaque factory closures; the list() template engine
|
|
5
|
-
* needs to see through them (tag name + modifier list) to decide whether a
|
|
6
|
-
* row can be built by cloning a skeleton instead of running the factory.
|
|
7
|
-
* The metadata is attached under symbols so nothing leaks into the public
|
|
8
|
-
* API surface or enumerable properties.
|
|
9
|
-
*/
|
|
10
|
-
export declare const FACTORY_TAG: unique symbol;
|
|
11
|
-
export declare const FACTORY_MODS: unique symbol;
|
|
12
|
-
export declare function acquireMetadataOnlyFactory(): () => null;
|
|
13
|
-
export declare function setFactoryMeta(factory: unknown, tag: string, mods: readonly unknown[]): void;
|
|
14
|
-
/** Returns the modifier list of a tag-builder factory, or undefined. */
|
|
15
|
-
export declare function getFactoryMods(fn: unknown): readonly unknown[] | undefined;
|
|
16
|
-
/** Returns the tag name of a tag-builder factory, or undefined. */
|
|
17
|
-
export declare function getFactoryTag(fn: unknown): string | undefined;
|
|
18
|
-
export declare function isMetadataOnlyFactoryMode(): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Takes the render function and its two args directly (rather than a `() =>`
|
|
21
|
-
* thunk) so the hot per-row call in list/runtime.ts doesn't allocate a
|
|
22
|
-
* closure just to defer a single call.
|
|
23
|
-
*/
|
|
24
|
-
export declare function withMetadataOnlyFactories<TItem, T>(fn: (item: TItem, index: number) => T, item: TItem, index: number): T;
|
|
25
|
-
//# sourceMappingURL=factory-meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory-meta.d.ts","sourceRoot":"","sources":["../../src/element/factory-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,WAAW,eAA8B,CAAC;AACvD,eAAO,MAAM,YAAY,eAA+B,CAAC;AAiBzD,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAKvD;AAOD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,OAAO,EAAE,GACvB,IAAI,CAGN;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,CAE1E;AAED,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE7D;AAED,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CASxH"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Element creation: builds HTML/SVG elements and applies the modifier list
|
|
3
|
-
* that was passed to a tag builder (children, attributes, text, on(), ...).
|
|
4
|
-
*/
|
|
5
|
-
import { type NodeModifier } from "./modifiers";
|
|
6
|
-
export type { NodeModifier };
|
|
7
|
-
/**
|
|
8
|
-
* Applies modifiers to an element, appending newly produced Nodes while avoiding
|
|
9
|
-
* duplicate DOM insertions (i.e. only appends if parentNode differs).
|
|
10
|
-
*
|
|
11
|
-
* `localIndex` advances once per appended child so each reactive/static text
|
|
12
|
-
* modifier gets a unique `text-N` marker; it is internal bookkeeping only and
|
|
13
|
-
* is not returned (no production caller consumed the previous result object).
|
|
14
|
-
*/
|
|
15
|
-
export declare function applyModifiers<TTagName extends ElementTagName>(element: ExpandedElement<TTagName>, modifiers: ReadonlyArray<NodeModifier<TTagName>>, startIndex?: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Creates an HTML element with the specified tag name and applies modifiers to it.
|
|
18
|
-
*/
|
|
19
|
-
export declare function createHtmlElementWithModifiers<TTagName extends ElementTagName>(tagName: TTagName, modifiers: ReadonlyArray<NodeModifier<TTagName>>): ExpandedElement<TTagName>;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an SVG element with the specified tag name and applies modifiers to it.
|
|
22
|
-
*/
|
|
23
|
-
export declare function createSvgElementWithModifiers<TTagName extends keyof SVGElementTagNameMap>(tagName: TTagName, modifiers: ReadonlyArray<unknown>): SVGElementTagNameMap[TTagName];
|
|
24
|
-
/**
|
|
25
|
-
* Creates an HTML tag builder function.
|
|
26
|
-
*/
|
|
27
|
-
export declare function createHtmlTagBuilder<TTagName extends ElementTagName>(tagName: TTagName): ExpandedElementBuilder<TTagName>;
|
|
28
|
-
/**
|
|
29
|
-
* Creates an SVG tag builder function.
|
|
30
|
-
*/
|
|
31
|
-
export declare function createSvgTagBuilder<TTagName extends keyof SVGElementTagNameMap>(tagName: TTagName): ExpandedSVGElementBuilder<TTagName>;
|
|
32
|
-
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/element/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAKnE,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,SAAS,cAAc,EAC5D,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAChD,UAAU,SAAI,GACb,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,SAAS,cAAc,EAC5E,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,GAC/C,eAAe,CAAC,QAAQ,CAAC,CAO3B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,SAAS,MAAM,oBAAoB,EACvF,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,GAChC,oBAAoB,CAAC,QAAQ,CAAC,CAOhC;AAmED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAS,cAAc,EAClE,OAAO,EAAE,QAAQ,GAChB,sBAAsB,CAAC,QAAQ,CAAC,CAElC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,oBAAoB,EAC7E,OAAO,EAAE,QAAQ,GAChB,yBAAyB,CAAC,QAAQ,CAAC,CAErC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type StyleAssignment = CSSStyleObject;
|
|
2
|
-
type StyleResolver = () => StyleAssignment | null | undefined;
|
|
3
|
-
/**
|
|
4
|
-
* Simplified style management - basic functionality with minimal overhead
|
|
5
|
-
*/
|
|
6
|
-
export declare function assignInlineStyles<TTagName extends ElementTagName>(element: ExpandedElement<TTagName>, styles: StyleAssignment | null | undefined): void;
|
|
7
|
-
export declare function applyStyleAttribute<TTagName extends ElementTagName>(element: ExpandedElement<TTagName>, styleValue: StyleAssignment | StyleResolver | null | undefined): void;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=inline-style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inline-style.d.ts","sourceRoot":"","sources":["../../src/element/inline-style.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG,cAAc,CAAC;AACtC,KAAK,aAAa,GAAG,MAAM,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAS,cAAc,EAChE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GACzC,IAAI,CAeN;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,cAAc,EACjE,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,EAClC,UAAU,EAAE,eAAe,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,GAC7D,IAAI,CAUN"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Caches the probe result of zero-arity function modifiers so the same
|
|
3
|
-
* function is not re-invoked when it reappears during re-renders.
|
|
4
|
-
*/
|
|
5
|
-
export declare const modifierProbeCache: WeakMap<() => unknown, {
|
|
6
|
-
value: unknown;
|
|
7
|
-
error: boolean;
|
|
8
|
-
}>;
|
|
9
|
-
export type NodeModifier<TTagName extends ElementTagName = ElementTagName> = NodeMod<TTagName> | NodeModFn<TTagName> | AnyParentNodeModifier;
|
|
10
|
-
export declare function applyNodeModifier<TTagName extends ElementTagName>(parent: ExpandedElement<TTagName>, modifier: NodeModifier<TTagName>, index: number): Node | null;
|
|
11
|
-
//# sourceMappingURL=modifiers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../src/element/modifiers.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,gBAAqB,OAAO;WAAW,OAAO;WAAS,OAAO;EAAK,CAAC;AAEnG,MAAM,MAAM,YAAY,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,IACtE,OAAO,CAAC,QAAQ,CAAC,GACjB,SAAS,CAAC,QAAQ,CAAC,GACnB,qBAAqB,CAAC;AAqDzB,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,cAAc,EAChE,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,EAChC,KAAK,EAAE,MAAM,GACX,IAAI,GAAG,IAAI,CAsFb"}
|
package/dist/element/tags.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const HTML_TAGS: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "menu", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "search", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr"];
|
|
2
|
-
export declare const SVG_TAGS: readonly ["a", "animate", "animateMotion", "animateTransform", "circle", "clipPath", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "script", "set", "stop", "style", "svg", "switch", "symbol", "text", "textPath", "title", "tspan", "use", "view"];
|
|
3
|
-
export declare const SELF_CLOSING_TAGS: readonly ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "source", "track", "wbr"];
|
|
4
|
-
export declare function registerGlobalTagBuilders(target?: Record<string, unknown>): void;
|
|
5
|
-
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/element/tags.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,g7BAc4B,CAAC;AAEnD,eAAO,MAAM,QAAQ,4wBAWyC,CAAC;AAE/D,eAAO,MAAM,iBAAiB,iHAGoB,CAAC;AAkDnD,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAc,GAAG,IAAI,CAe5F"}
|
package/dist/hydration.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hydration context — tracks global hydration state and per-parent cursor positions.
|
|
3
|
-
*
|
|
4
|
-
* During hydration the component tree is built against an existing DOM tree
|
|
5
|
-
* (produced by SSR). Instead of creating new nodes, factories claim existing
|
|
6
|
-
* children from their parent element by advancing a cursor.
|
|
7
|
-
*
|
|
8
|
-
* The cursor is a *node pointer* (the next unclaimed child), not an index.
|
|
9
|
-
* Indexed childNodes access is O(n) after any tree/attribute mutation in
|
|
10
|
-
* jsdom (live NodeList re-materialization) which made hydration O(n²);
|
|
11
|
-
* firstChild/nextSibling pointers are O(1) in every DOM implementation.
|
|
12
|
-
*/
|
|
13
|
-
export declare function isHydrating(): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* True while a tree is being built for SSR serialization (inside
|
|
16
|
-
* renderToString). Text children must keep their `<!-- text-N -->` markers in
|
|
17
|
-
* this mode so the emitted HTML stays hydratable — even when `isBrowser` is
|
|
18
|
-
* true (SSR running under jsdom, or an isomorphic worker that provides a DOM).
|
|
19
|
-
* A pure client render leaves this false and skips the markers.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isSerializing(): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Runs `fn` with serialization mode enabled, restoring the previous state
|
|
24
|
-
* afterwards (so nested/re-entrant renderToString calls behave correctly).
|
|
25
|
-
*/
|
|
26
|
-
export declare function runSerializing<T>(fn: () => T): T;
|
|
27
|
-
export declare function startHydration(): void;
|
|
28
|
-
export declare function endHydration(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Runs a callback with hydration temporarily disabled, restoring the previous
|
|
31
|
-
* state afterwards. Used when a server/client mismatch forces a subtree to be
|
|
32
|
-
* rendered fresh in the middle of a hydration pass — fresh rendering must not
|
|
33
|
-
* claim nodes from the surrounding SSR DOM.
|
|
34
|
-
*/
|
|
35
|
-
export declare function runWithoutHydration<T>(fn: () => T): T;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the next unclaimed child of a parent node (or null at the end)
|
|
38
|
-
* without advancing the cursor.
|
|
39
|
-
*/
|
|
40
|
-
export declare function peekChild(parent: Node): Node | null;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the cursor to a specific child node (or null for "past the end").
|
|
43
|
-
*/
|
|
44
|
-
export declare function setCursor(parent: Node, node: Node | null): void;
|
|
45
|
-
/**
|
|
46
|
-
* Advances the cursor past whitespace-only text nodes.
|
|
47
|
-
*
|
|
48
|
-
* Nuclo's own SSR output never produces bare whitespace text nodes (text
|
|
49
|
-
* children are always preceded by a `<!-- text-N -->` marker), so unmarked
|
|
50
|
-
* whitespace comes from the surrounding template or an HTML
|
|
51
|
-
* formatter/minifier. Skipping (without removing) keeps the cursor aligned
|
|
52
|
-
* while leaving the document's visual whitespace untouched.
|
|
53
|
-
*/
|
|
54
|
-
export declare function skipWhitespaceText(parent: Node): void;
|
|
55
|
-
/**
|
|
56
|
-
* Claims the next child node from parent at the current cursor position.
|
|
57
|
-
* Advances the cursor by one.
|
|
58
|
-
*/
|
|
59
|
-
export declare function claimChild(parent: Node): Node | null;
|
|
60
|
-
/**
|
|
61
|
-
* Attempts to claim an existing element from the parent during hydration.
|
|
62
|
-
* Returns the claimed element if the next child matches the expected tag, or null.
|
|
63
|
-
*/
|
|
64
|
-
export declare function claimElement(parent: Node, tagName: string): Element | null;
|
|
65
|
-
/**
|
|
66
|
-
* Removes unclaimed SSR children from a hydrated element.
|
|
67
|
-
* Must be called after modifiers have been applied to a claimed element.
|
|
68
|
-
* Removes nodes from the cursor through `lastOriginalChild` (the element's
|
|
69
|
-
* last child before modifiers ran) — nodes appended by modifiers come after
|
|
70
|
-
* that boundary and are preserved.
|
|
71
|
-
*/
|
|
72
|
-
export declare function cleanupUnclaimedChildren(node: Node, lastOriginalChild: Node | null): void;
|
|
73
|
-
//# sourceMappingURL=hydration.d.ts.map
|
package/dist/hydration.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../src/hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQhD;AAED,wBAAgB,cAAc,IAAI,IAAI,CAMrC;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQrD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAGnD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/D;AAMD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAUrD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAMpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAQ1E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CASzF"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { initializeRuntime } from "./bootstrap";
|
|
2
|
-
export { registerGlobalTagBuilders, HTML_TAGS, SVG_TAGS, SELF_CLOSING_TAGS } from "./element/tags";
|
|
3
|
-
export { createHtmlTagBuilder, createSvgTagBuilder, createHtmlElementWithModifiers, createSvgElementWithModifiers, } from "./element/factory";
|
|
4
|
-
export { applyNodeModifier } from "./element/modifiers";
|
|
5
|
-
export { applyAttributes } from "./element/attributes";
|
|
6
|
-
export { on } from "./element/events";
|
|
7
|
-
export { update } from "./update/update";
|
|
8
|
-
export { scope } from "./update/scope";
|
|
9
|
-
export { list } from "./list";
|
|
10
|
-
export { when } from "./when";
|
|
11
|
-
export { render, hydrate } from "./render";
|
|
12
|
-
export * from "./style";
|
|
13
|
-
export { appendChildren, createComment, createConditionalComment, replaceNodeSafely } from "./shared/dom";
|
|
14
|
-
export { isBoolean, isFunction, isNode, isObject, isPrimitive, isTagLike, isZeroArityFunction } from "./shared/type-guards";
|
|
15
|
-
export { isBrowser } from "./shared/environment";
|
|
16
|
-
import "./bootstrap";
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAG3C,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC5H,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,aAAa,CAAC"}
|
package/dist/list/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ListRenderer, ListItemsProvider } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Maps items to DOM elements, keeping them in sync with changes.
|
|
4
|
-
* Returns a function compatible with both HTML and SVG contexts.
|
|
5
|
-
*/
|
|
6
|
-
export declare function list<TItem, TTagName extends ElementTagName = ElementTagName>(itemsProvider: ListItemsProvider<TItem>, render: ListRenderer<TItem, TTagName>): ListModifier<TTagName>;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/list/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/list/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,GAAG,cAAc,EAC1E,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACvC,MAAM,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,GACpC,YAAY,CAAC,QAAQ,CAAC,CAOxB"}
|
package/dist/list/runtime.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ListRenderer, ListRuntime, ListItemsProvider } from "./types";
|
|
2
|
-
import type { UpdateScope } from "../update/scope";
|
|
3
|
-
export declare function sync<TItem, TTagName extends ElementTagName>(runtime: ListRuntime<TItem, TTagName>): void;
|
|
4
|
-
export declare function createListRuntime<TItem, TTagName extends ElementTagName = ElementTagName>(itemsProvider: ListItemsProvider<TItem>, renderItem: ListRenderer<TItem, TTagName>, host: ExpandedElement<TTagName>, index: number): ListRuntime<TItem, TTagName>;
|
|
5
|
-
export declare function updateListRuntimes(scope?: UpdateScope): void;
|
|
6
|
-
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/list/runtime.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAkC,iBAAiB,EAAmB,MAAM,SAAS,CAAC;AAC7H,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAwRnD,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,EACzD,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,GACpC,IAAI,CA0ON;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,GAAG,cAAc,EACvF,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACvC,UAAU,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,EACzC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAM9B;AAoKD,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAuD5D"}
|
package/dist/list/template.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Row-template cloning for list().
|
|
3
|
-
*
|
|
4
|
-
* Building a row through the normal pipeline costs one createElement + a full
|
|
5
|
-
* modifier pass per element. For a keyed list every row comes from the same
|
|
6
|
-
* render function, so the structure is identical across rows and only the
|
|
7
|
-
* leaves differ (text values, event handlers, reactive resolvers, and —
|
|
8
|
-
* rarely — static attribute values). This module:
|
|
9
|
-
*
|
|
10
|
-
* 1. analyzes the first row's factory tree (via the internal factory
|
|
11
|
-
* metadata symbols) and, when every modifier falls into a supported
|
|
12
|
-
* shape, records a slot program for the row;
|
|
13
|
-
* 2. clones the first row's built element as a skeleton (cloneNode does not
|
|
14
|
-
* copy property-assigned `on*` handlers or reactive registrations, and
|
|
15
|
-
* reactive classNames are scrubbed so a selected first row can't leak
|
|
16
|
-
* its state into the skeleton);
|
|
17
|
-
* 3. builds every other row as skeleton.cloneNode(true) + a patch pass that
|
|
18
|
-
* walks the new factory tree in lockstep with the slot program.
|
|
19
|
-
*
|
|
20
|
-
* Any construct outside the supported shape (style objects, on() modifiers,
|
|
21
|
-
* nested list()/when(), node children, resolvers returning non-primitives,
|
|
22
|
-
* multiple className sources per element, SVG) bails to the normal build
|
|
23
|
-
* path — the template is per-list state, so unsupported lists simply never
|
|
24
|
-
* activate it. A per-row shape mismatch (heterogeneous render output)
|
|
25
|
-
* deactivates the template for that list and rebuilds the row normally.
|
|
26
|
-
*/
|
|
27
|
-
export declare const LEAF_TEXT = 0;
|
|
28
|
-
export declare const LEAF_CLASSNAME = 1;
|
|
29
|
-
/**
|
|
30
|
-
* A clone's dynamic leaf, owned by its list record instead of the global
|
|
31
|
-
* reactive registries: template rows have a known lifetime (they live and die
|
|
32
|
-
* with their record), so update() can flush them with a tight array walk —
|
|
33
|
-
* no WeakRef/WeakMap bookkeeping per row, nothing for the GC sweeps to prune.
|
|
34
|
-
*/
|
|
35
|
-
export interface RowLeaf {
|
|
36
|
-
kind: number;
|
|
37
|
-
node: Text | HTMLElement;
|
|
38
|
-
fn: () => unknown;
|
|
39
|
-
last: string;
|
|
40
|
-
}
|
|
41
|
-
export declare const SLOT_ATTRS = 0;
|
|
42
|
-
export declare const SLOT_TEXT = 1;
|
|
43
|
-
export declare const SLOT_REACTIVE_TEXT = 2;
|
|
44
|
-
export declare const SLOT_CHILD = 3;
|
|
45
|
-
export declare const SLOT_NULL = 4;
|
|
46
|
-
export declare const ATTR_STATIC = 0;
|
|
47
|
-
export declare const ATTR_EVENT = 1;
|
|
48
|
-
export declare const ATTR_REACTIVE_CLASSNAME = 2;
|
|
49
|
-
export declare const ATTR_NULL = 3;
|
|
50
|
-
export interface AttrSpec {
|
|
51
|
-
key: string;
|
|
52
|
-
kind: number;
|
|
53
|
-
/** Static attrs: element exposes the key as a property (filled from the skeleton). */
|
|
54
|
-
prop: boolean;
|
|
55
|
-
/** Static attrs: first-row value. Events: normalized native property name. */
|
|
56
|
-
value?: unknown;
|
|
57
|
-
}
|
|
58
|
-
export type TemplateSlot = {
|
|
59
|
-
kind: typeof SLOT_ATTRS;
|
|
60
|
-
keys: AttrSpec[];
|
|
61
|
-
} | {
|
|
62
|
-
kind: typeof SLOT_TEXT;
|
|
63
|
-
} | {
|
|
64
|
-
kind: typeof SLOT_REACTIVE_TEXT;
|
|
65
|
-
} | {
|
|
66
|
-
kind: typeof SLOT_CHILD;
|
|
67
|
-
child: TemplateNode;
|
|
68
|
-
} | {
|
|
69
|
-
kind: typeof SLOT_NULL;
|
|
70
|
-
};
|
|
71
|
-
export interface TemplateNode {
|
|
72
|
-
tag: string;
|
|
73
|
-
slots: TemplateSlot[];
|
|
74
|
-
}
|
|
75
|
-
export interface ListTemplate {
|
|
76
|
-
tmpl: TemplateNode;
|
|
77
|
-
skeleton: Element;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Classifies a factory's modifier tree into a slot program, or returns null
|
|
81
|
-
* when any modifier falls outside the supported shape.
|
|
82
|
-
*/
|
|
83
|
-
export declare function analyzeFactory(tag: string, mods: readonly unknown[]): TemplateNode | null;
|
|
84
|
-
/**
|
|
85
|
-
* One-time skeleton pass: fills each static attr's property-vs-attribute
|
|
86
|
-
* flag and scrubs reactive classNames (the first row may have rendered with
|
|
87
|
-
* row-specific state, e.g. a selected row's "danger" class).
|
|
88
|
-
*/
|
|
89
|
-
export declare function prepareSkeleton(tmpl: TemplateNode, skeleton: Element): void;
|
|
90
|
-
/**
|
|
91
|
-
* Patches a skeleton clone from a fresh factory tree. Returns false on any
|
|
92
|
-
* shape mismatch — the caller then rebuilds the row through the normal path
|
|
93
|
-
* (a partially patched clone is safe to abandon: its reactive registrations
|
|
94
|
-
* are weak and disconnected, so the next update() sweeps them).
|
|
95
|
-
*/
|
|
96
|
-
export declare function instantiateTemplate(tmpl: TemplateNode, mods: readonly unknown[], el: Element, leaves: RowLeaf[]): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Converts the normally-built first row of a compatible template into the same
|
|
99
|
-
* record-owned dynamic leaf representation used by skeleton clones.
|
|
100
|
-
*
|
|
101
|
-
* The normal builder has already registered reactive text/className leaves in
|
|
102
|
-
* the global registries. Template rows have a tighter lifetime through their
|
|
103
|
-
* list record, so unregister those first-row leaves and let updateListRuntimes()
|
|
104
|
-
* flush them with the rest of the templated rows.
|
|
105
|
-
*/
|
|
106
|
-
export declare function adoptTemplateLeaves(tmpl: TemplateNode, mods: readonly unknown[], el: Element, leaves: RowLeaf[]): boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Flushes a template row's dynamic leaves: re-evaluates each resolver and
|
|
109
|
-
* writes the DOM only on change. Resolver errors leave the previous value in
|
|
110
|
-
* place (matching the notify passes' error tolerance).
|
|
111
|
-
*/
|
|
112
|
-
export declare function flushRowLeaves(leaves: RowLeaf[]): void;
|
|
113
|
-
//# sourceMappingURL=template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/list/template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,WAAW,CAAC;IACzB,EAAE,EAAE,MAAM,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,e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