mi-html 0.6.0 → 0.6.2
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/README.md +7 -0
- package/dist/index.js +2 -2
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/package.json +3 -3
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
[![npm-badge][npm-badge]][npm]
|
|
2
|
+
![types-badge][types-badge]
|
|
3
|
+
|
|
1
4
|
# mi-html
|
|
2
5
|
|
|
3
6
|
> html template literal for building reactive web components
|
|
@@ -358,3 +361,7 @@ MIT licensed
|
|
|
358
361
|
|
|
359
362
|
[uhtml@4]: https://github.com/WebReflection/uhtml/tree/v4
|
|
360
363
|
[mi-element]: https://github.com/commenthol/mi-element/tree/main/packages/mi-element
|
|
364
|
+
|
|
365
|
+
[npm-badge]: https://badgen.net/npm/v/mi-html
|
|
366
|
+
[npm]: https://www.npmjs.com/package/mi-html
|
|
367
|
+
[types-badge]: https://badgen.net/npm/types/mi-html
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { effect } from 'mi-signal';
|
|
|
2
2
|
|
|
3
3
|
export { Computed, default as Signal, State, createSignal, effect } from 'mi-signal';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { attach } from 'uhtml/reactive';
|
|
6
6
|
|
|
7
7
|
export * from 'uhtml/reactive';
|
|
8
8
|
|
|
9
|
-
const render =
|
|
9
|
+
const render = attach(effect);
|
|
10
10
|
|
|
11
11
|
export { render };
|
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=[];class t extends EventTarget{#e;#t;constructor(e,t){super();const{equals:n}=t||{};this.#e=e,this.#t=n??((e,t)=>e===t)}get value(){return this.get()}set value(e){this.set(e)}get(){const t=e[e.length-1];return t&&t.add(this),this.#e}set(e){this.#t(this.#e,e)||(this.#e=e,this.dispatchEvent(new CustomEvent("signal")))}}const n=(e,n)=>e instanceof t?e:new t(e,n);function s(t){const n=new Set;e.push(n);try{t()}finally{e.pop()}for(const e of n)e.addEventListener("signal",t);return()=>{for(const e of n)e.removeEventListener("signal",t)}}class r{#n;constructor(e){this.#n=new t,s((
|
|
2
|
-
/*! (c) Andrea Giammarchi - MIT */const
|
|
3
|
-
/*! (c) Andrea Giammarchi - MIT */const
|
|
1
|
+
const e=[];class t extends EventTarget{#e;#t;constructor(e,t){super();const{equals:n}=t||{};this.#e=e,this.#t=n??((e,t)=>e===t)}get value(){return this.get()}set value(e){this.set(e)}get(){const t=e[e.length-1];return t&&t.add(this),this.#e}set(e){this.#t(this.#e,e)||(this.#e=e,this.dispatchEvent(new CustomEvent("signal")))}}const n=(e,n)=>e instanceof t?e:new t(e,n);function s(t){const n=new Set;e.push(n);try{t()}finally{e.pop()}for(const e of n)e.addEventListener("signal",t);return()=>{for(const e of n)e.removeEventListener("signal",t)}}class r{#n;#s;constructor(e){this.#n=new t,this.#s=s(()=>this.#n.set(e()))}get(){return this.#n.get()}unsubscribe(){this.#s()}}var l={State:t,Computed:r,createSignal:n,effect:s};const{isArray:i}=Array,{getPrototypeOf:o,getOwnPropertyDescriptor:a}=Object,c=[],u=()=>document.createRange(),h=(e,t,n)=>(e.set(t,n),n),d=(e,t)=>t.reduceRight(f,e),f=(e,t)=>e.childNodes[t],{setPrototypeOf:p}=Object;let g;var v=(e,t,n)=>(g||(g=u()),n?g.setStartAfter(e):g.setStartBefore(e),g.setEndAfter(t),g.deleteContents(),e);const b=({firstChild:e,lastChild:t},n)=>v(e,t,n);let m=!1;const w=(e,t)=>m&&11===e.nodeType?1/t<0?t?b(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,C=e=>document.createComment(e);class x extends((e=>{function t(e){return p(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#r=C("<>");#l=C("</>");#i=c;constructor(e){super(e),this.replaceChildren(this.#r,...e.childNodes,this.#l),m=!0}get firstChild(){return this.#r}get lastChild(){return this.#l}get parentNode(){return this.#r.parentNode}remove(){b(this,!1)}replaceWith(e){b(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#i===c&&(this.#i=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#i=[e];e!==t;)this.#i.push(e=e.nextSibling)}this.replaceChildren(...this.#i)}return this}}const y=(e,t,n)=>e.setAttribute(t,n),$=(e,t)=>e.removeAttribute(t);let N;const k=(e,t,n)=>{n=n.slice(1),N||(N=new WeakMap);const s=N.get(e)||h(N,e,{});let r=s[n];return r&&r[0]&&e.removeEventListener(n,...r),r=i(t)?t:[t,!1],s[n]=r,r[0]&&e.addEventListener(n,...r),t},O=(e,t)=>{const{t:n,n:s}=e;let r=!1;switch(typeof t){case"object":if(null!==t){(s||n).replaceWith(e.n=t.valueOf());break}case"undefined":r=!0;default:n.data=r?"":t,s&&(e.n=null,s.replaceWith(n))}return t},W=(e,t,n)=>e[n]=t,E=(e,t,n)=>W(e,t,n.slice(1)),M=(e,t,n)=>null==t?($(e,n),t):W(e,t,n),S=(e,t)=>("function"==typeof t?t(e):t.current=e,t),A=(e,t,n)=>(null==t?$(e,n):y(e,n,t),t),T=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),j=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,s,r)=>{const l=n.length;let i=t.length,o=l,a=0,c=0,u=null;for(;a<i||c<o;)if(i===a){const t=o<l?c?s(n[c-1],-0).nextSibling:s(n[o],0):r;for(;c<o;)e.insertBefore(s(n[c++],1),t)}else if(o===c)for(;a<i;)u&&u.has(t[a])||e.removeChild(s(t[a],-1)),a++;else if(t[a]===n[c])a++,c++;else if(t[i-1]===n[o-1])i--,o--;else if(t[a]===n[o-1]&&n[c]===t[i-1]){const r=s(t[--i],-0).nextSibling;e.insertBefore(s(n[c++],1),s(t[a++],-0).nextSibling),e.insertBefore(s(n[--o],1),r),t[i]=n[o]}else{if(!u){u=new Map;let e=c;for(;e<o;)u.set(n[e],e++)}if(u.has(t[a])){const r=u.get(t[a]);if(c<r&&r<o){let l=a,h=1;for(;++l<i&&l<o&&u.get(t[l])===r+h;)h++;if(h>r-c){const l=s(t[a],0);for(;c<r;)e.insertBefore(s(n[c++],1),l)}else e.replaceChild(s(n[c++],1),s(t[a++],-1))}else a++}else e.removeChild(s(t[a++],-1))}return n})(e.parentNode,n,t,w,e);switch(n.length){case 1:n[0].remove();case 0:break;default:v(w(n[0],0),w(n.at(-1),-0),!1)}return c},B=new Map([["aria",(e,t)=>{for(const n in t){const s=t[n],r="role"===n?n:`aria-${n}`;null==s?$(e,r):y(e,r,s)}return t}],["class",(e,t)=>M(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",S],["style",(e,t)=>null==t?M(e,t,"style"):W(e.style,t,"cssText")]]),D=(e,t,n)=>{switch(t[0]){case".":return E;case"?":return T;case"@":return k;default:return n||"ownerSVGElement"in e?"ref"===t?S:A:B.get(t)||(t in e?t.startsWith("on")?W:((e,t)=>{let n;do{n=a(e,t)}while(!n&&(e=o(e)));return n})(e,t)?.set?M:A:A)}},L=(e,t)=>(e.textContent=null==t?"":t,t),q=(e,t,n)=>({a:e,b:t,c:n}),P=(e,t,n,s)=>({v:c,u:e,t:t,n:n,c:s}),R=()=>q(null,null,c);var z=e=>(t,n)=>{const{a:s,b:r,c:l}=e(t,n),i=document.importNode(s,!0);let o=c;if(r!==c){o=[];for(let e,t,n=0;n<r.length;n++){const{a:s,b:l,c:a}=r[n],c=s===t?e:e=d(i,t=s);o[n]=P(l,c,a,l===j?[]:l===O?R():null)}}return{b:l?i.firstChild:new x(i),c:o}};const F=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Z=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,G=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,H=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,V=/[\x01\x02]/g;let _,I,J=document.createElement("template");var K=(e,t)=>{if(t)return _||(_=document.createElementNS("http://www.w3.org/2000/svg","svg"),I=u(),I.selectNodeContents(_)),I.createContextualFragment(e);J.innerHTML=e;const{content:n}=J;return J=J.cloneNode(!1),n};const Q=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},U=()=>document.createTextNode(""),X=new WeakMap,Y="isµ";var ee=e=>(t,n)=>X.get(t)||((e,t,n)=>{const s=K(((e,t,n)=>{let s=0;return e.join("").trim().replace(G,(e,t,s,r)=>`<${t}${s.replace(H,"=$2$1").trimEnd()}${r?n||Z.test(t)?" /":`></${t}`:""}>`).replace(V,e=>""===e?`\x3c!--${t+s++}--\x3e`:t+s++)})(e,Y,n),n),{length:r}=e;let l=c;if(r>1){const e=[],o=document.createTreeWalker(s,129);let a=0,c=`${Y}${a++}`;for(l=[];a<r;){const s=o.nextNode();if(8===s.nodeType){if(s.data===c){const n=i(t[a-1])?j:O;n===O&&e.push(s),l.push(q(Q(s),n,null)),c=`${Y}${a++}`}}else{let e;for(;s.hasAttribute(c);){e||(e=Q(s));const t=s.getAttribute(c);l.push(q(e,D(s,t,n),t)),$(s,c),c=`${Y}${a++}`}!n&&F.test(s.localName)&&s.textContent.trim()===`\x3c!--${c}--\x3e`&&(l.push(q(e||Q(s),L,null)),c=`${Y}${a++}`)}}for(a=0;a<e.length;a++)e[a].replaceWith(U())}const{childNodes:o}=s;let{length:a}=o;return a<1?(a=1,s.appendChild(U())):1===a&&1!==r&&1!==o[0].nodeType&&(a=0),h(X,e,q(s,l,1===a))})(t,n,e);const te=z(ee(!1)),ne=z(ee(!0)),se=(e,{s:t,t:n,v:s})=>{if(e.a!==n){const{b:r,c:l}=(t?ne:te)(n,s);e.a=n,e.b=r,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=s[n],r=t[n];switch(r.u){case j:r.v=j(r.t,re(r.c,e),r.v);break;case O:const t=e instanceof le?se(r.c||(r.c=R()),e):(r.c=null,e);t!==r.v&&(r.v=O(r,t));break;default:e!==r.v&&(r.v=r.u(r.t,e,r.n,r.v))}}return e.b},re=(e,t)=>{let n=0,{length:s}=t;for(s<e.length&&e.splice(s);n<s;n++){const s=t[n];s instanceof le?t[n]=se(e[n]||(e[n]=R()),s):e[n]=null}return t};class le{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=R()){return se(e,this)}}
|
|
2
|
+
/*! (c) Andrea Giammarchi - MIT */const ie=e=>(t,...n)=>new le(e,t,n),oe=ie(!1),ae=ie(!0),ce=new WeakMap;var ue=(e,t,n)=>{const s=ce.get(e)||h(ce,e,R()),{b:r}=s,l=t,i=l instanceof le?l.toDOM(s):l;return r!==i&&e.replaceChildren((s.b=i).valueOf()),e};
|
|
3
|
+
/*! (c) Andrea Giammarchi - MIT */const he=new WeakMap,de=e=>(t,n)=>{const s=he.get(t)||h(he,t,new Map);return s.get(n)||h(s,n,function(t,...n){return new le(e,t,n).toDOM(this)}.bind(R()))},fe=de(!1),pe=de(!0),ge=new FinalizationRegistry(([e,t,n])=>{e(t)}),ve=Object.create(null),be=new WeakMap,me=e=>e();let we=!0;const Ce=e=>(t,n)=>{if(we="function"!=typeof n,xe(t),we)return ue(t,n);we=!0;const s=new WeakRef(t),r=e(()=>{ue(s.deref(),n())});return be.set(t,r),((e,t,{debug:n,handler:s,return:r,token:l=e}=ve)=>{const i=r||new Proxy(e,s||ve),o=[i,[t,e,!!n]];return!1!==l&&o.push(l),ge.register(...o),i})(r,me,{return:t})},xe=e=>{const t=be.get(e);var n;t&&(we&&be.delete(e),n=t,ge.unregister(n),t())},ye=Ce(s);export{r as Computed,le as Hole,l as Signal,t as State,Ce as attach,B as attr,n as createSignal,xe as detach,s as effect,oe as html,fe as htmlFor,Ce as reactive,ye as render,ae as svg,pe as svgFor};
|
|
4
4
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.js","sources":["../../mi-signal/dist/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/utils.js","../../../node_modules/.pnpm/custom-function@2.0.0/node_modules/custom-function/esm/factory.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/range.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/persistent-fragment.js","../../../node_modules/.pnpm/domconstants@1.1.6/node_modules/domconstants/esm/constants.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/handler.js","../../../node_modules/.pnpm/udomdiff@1.1.2/node_modules/udomdiff/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/literals.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/creator.js","../../../node_modules/.pnpm/domconstants@1.1.6/node_modules/domconstants/esm/re.js","../../../node_modules/.pnpm/@webreflection+uparser@0.4.0/node_modules/@webreflection/uparser/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/create-content.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/parser.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/rabbit.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/render/shared.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/keyed.js","../../../node_modules/.pnpm/gc-hook@0.4.1/node_modules/gc-hook/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/render/reactive.js","../src/index.js"],"sourcesContent":["const context = [];\n\nclass State extends EventTarget {\n #value;\n #equals;\n constructor(value, options) {\n super();\n const {equals: equals} = options || {};\n this.#value = value, this.#equals = equals ?? ((value, nextValue) => value === nextValue);\n }\n get value() {\n return this.get();\n }\n set value(nextValue) {\n this.set(nextValue);\n }\n get() {\n const running = context[context.length - 1];\n return running && running.add(this), this.#value;\n }\n set(nextValue) {\n this.#equals(this.#value, nextValue) || (this.#value = nextValue, this.dispatchEvent(new CustomEvent('signal')));\n }\n}\n\nconst createSignal = (initialValue, options) => initialValue instanceof State ? initialValue : new State(initialValue, options);\n\nfunction effect(cb) {\n const running = new Set;\n context.push(running);\n try {\n cb();\n } finally {\n context.pop();\n }\n for (const dep of running) dep.addEventListener('signal', cb);\n return () => {\n for (const dep of running) dep.removeEventListener('signal', cb);\n };\n}\n\nclass Computed {\n #state;\n constructor(cb) {\n this.#state = new State, effect((() => this.#state.set(cb())));\n }\n get() {\n return this.#state.get();\n }\n}\n\nvar index = {\n State: State,\n Computed: Computed,\n createSignal: createSignal,\n effect: effect\n};\n\nexport { Computed, State, createSignal, index as default, effect };\n","const { isArray } = Array;\nconst { getPrototypeOf, getOwnPropertyDescriptor } = Object;\n\nexport { isArray };\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nexport const empty = [];\n\nexport const newRange = () => document.createRange();\n\n/**\n * Set the `key` `value` pair to the *Map* or *WeakMap* and returns the `value`\n * @template T\n * @param {Map | WeakMap} map\n * @param {any} key\n * @param {T} value\n * @returns {T}\n */\nexport const set = (map, key, value) => {\n map.set(key, value);\n return value;\n};\n\n/**\n * Return a descriptor, if any, for the referenced *Element*\n * @param {Element} ref\n * @param {string} prop\n * @returns \n */\nexport const gPD = (ref, prop) => {\n let desc;\n do { desc = getOwnPropertyDescriptor(ref, prop); }\n while(!desc && (ref = getPrototypeOf(ref)));\n return desc;\n};\n\n/* c8 ignore start */\n/**\n * @param {DocumentFragment} content\n * @param {number[]} path\n * @returns {Element}\n */\nexport const find = (content, path) => path.reduceRight(childNodesIndex, content);\nconst childNodesIndex = (node, i) => node.childNodes[i];\n/* c8 ignore stop */\n","const {setPrototypeOf} = Object;\n\n/**\n * @param {Function} Class any base class to extend without passing through it via super() call.\n * @returns {Function} an extensible class for the passed one.\n * @example\n * // creating this very same module utility\n * import custom from 'custom-function/factory';\n * const CustomFunction = custom(Function);\n * class MyFunction extends CustomFunction {}\n * const mf = new MyFunction(() => {});\n */\nexport default Class => {\n function Custom(target) {\n return setPrototypeOf(target, new.target.prototype);\n }\n Custom.prototype = Class.prototype;\n return Custom;\n};\n","import { newRange } from './utils.js';\n\nlet range;\n/**\n * @param {Node | Element} firstChild\n * @param {Node | Element} lastChild\n * @param {boolean} preserve\n * @returns\n */\nexport default (firstChild, lastChild, preserve) => {\n if (!range) range = newRange();\n /* c8 ignore start */\n if (preserve)\n range.setStartAfter(firstChild);\n else\n range.setStartBefore(firstChild);\n /* c8 ignore stop */\n range.setEndAfter(lastChild);\n range.deleteContents();\n return firstChild;\n};\n","import { DOCUMENT_FRAGMENT_NODE } from 'domconstants/constants';\nimport custom from 'custom-function/factory';\nimport drop from './range.js';\nimport { empty } from './utils.js';\n\n/**\n * @param {PersistentFragment} fragment\n * @returns {Node | Element}\n */\nconst remove = ({firstChild, lastChild}, preserve) => drop(firstChild, lastChild, preserve);\n\nlet checkType = false;\n\n/**\n * @param {Node} node\n * @param {1 | 0 | -0 | -1} operation\n * @returns {Node}\n */\nexport const diffFragment = (node, operation) => (\n checkType && node.nodeType === DOCUMENT_FRAGMENT_NODE ?\n ((1 / operation) < 0 ?\n (operation ? remove(node, true) : node.lastChild) :\n (operation ? node.valueOf() : node.firstChild)) :\n node\n);\n\nconst comment = value => document.createComment(value);\n\n/** @extends {DocumentFragment} */\nexport class PersistentFragment extends custom(DocumentFragment) {\n #firstChild = comment('<>');\n #lastChild = comment('</>');\n #nodes = empty;\n constructor(fragment) {\n super(fragment);\n this.replaceChildren(...[\n this.#firstChild,\n ...fragment.childNodes,\n this.#lastChild,\n ]);\n checkType = true;\n }\n get firstChild() { return this.#firstChild; }\n get lastChild() { return this.#lastChild; }\n get parentNode() { return this.#firstChild.parentNode; }\n remove() {\n remove(this, false);\n }\n replaceWith(node) {\n remove(this, true).replaceWith(node);\n }\n valueOf() {\n const { parentNode } = this;\n if (parentNode === this) {\n if (this.#nodes === empty)\n this.#nodes = [...this.childNodes];\n }\n else {\n /* c8 ignore start */\n // there are cases where a fragment might be just appended\n // out of the box without valueOf() invoke (first render).\n // When these are moved around and lose their parent and,\n // such parent is not the fragment itself, it's possible there\n // where changes or mutations in there to take care about.\n // This is a render-only specific issue but it's tested and\n // it's worth fixing to me to have more consistent fragments.\n if (parentNode) {\n let { firstChild, lastChild } = this;\n this.#nodes = [firstChild];\n while (firstChild !== lastChild)\n this.#nodes.push((firstChild = firstChild.nextSibling));\n }\n /* c8 ignore stop */\n this.replaceChildren(...this.#nodes);\n }\n return this;\n }\n}\n","export const ELEMENT_NODE = 1;\nexport const ATTRIBUTE_NODE = 2;\nexport const TEXT_NODE = 3;\nexport const COMMENT_NODE = 8;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_TYPE_NODE = 10;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n","import udomdiff from 'udomdiff';\nimport { empty, gPD, isArray, set } from './utils.js';\nimport { diffFragment } from './persistent-fragment.js';\nimport drop from './range.js';\n\nconst setAttribute = (element, name, value) =>\n element.setAttribute(name, value);\n\n/**\n * @param {Element} element\n * @param {string} name\n * @returns {void}\n */\nexport const removeAttribute = (element, name) =>\n element.removeAttribute(name);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const aria = (element, value) => {\n for (const key in value) {\n const $ = value[key];\n const name = key === 'role' ? key : `aria-${key}`;\n if ($ == null) removeAttribute(element, name);\n else setAttribute(element, name, $);\n }\n return value;\n};\n\nlet listeners;\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const at = (element, value, name) => {\n name = name.slice(1);\n if (!listeners) listeners = new WeakMap;\n const known = listeners.get(element) || set(listeners, element, {});\n let current = known[name];\n if (current && current[0]) element.removeEventListener(name, ...current);\n current = isArray(value) ? value : [value, false];\n known[name] = current;\n if (current[0]) element.addEventListener(name, ...current);\n return value;\n};\n\n/** @type {WeakMap<Node, Element | import(\"./persistent-fragment.js\").PersistentFragment>} */\nconst holes = new WeakMap;\n\n/**\n * @template T\n * @param {import(\"./literals.js\").Detail} detail\n * @param {T} value\n * @returns {T}\n */\nexport const hole = (detail, value) => {\n const { t: node, n: hole } = detail;\n let nullish = false;\n switch (typeof value) {\n case 'object':\n if (value !== null) {\n (hole || node).replaceWith((detail.n = value.valueOf()));\n break;\n }\n case 'undefined':\n nullish = true;\n default:\n node.data = nullish ? '' : value;\n if (hole) {\n detail.n = null;\n hole.replaceWith(node);\n }\n break;\n }\n return value;\n};\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const className = (element, value) => maybeDirect(\n element, value, value == null ? 'class' : 'className'\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const data = (element, value) => {\n const { dataset } = element;\n for (const key in value) {\n if (value[key] == null) delete dataset[key];\n else dataset[key] = value[key];\n }\n return value;\n};\n\n/**\n * @template T\n * @param {Element | CSSStyleDeclaration} ref\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const direct = (ref, value, name) => (ref[name] = value);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const dot = (element, value, name) => direct(element, value, name.slice(1));\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const maybeDirect = (element, value, name) => (\n value == null ?\n (removeAttribute(element, name), value) :\n direct(element, value, name)\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const ref = (element, value) => (\n (typeof value === 'function' ?\n value(element) : (value.current = element)),\n value\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nconst regular = (element, value, name) => (\n (value == null ?\n removeAttribute(element, name) :\n setAttribute(element, name, value)),\n value\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const style = (element, value) => (\n value == null ?\n maybeDirect(element, value, 'style') :\n direct(element.style, value, 'cssText')\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const toggle = (element, value, name) => (\n element.toggleAttribute(name.slice(1), value),\n value\n);\n\n/**\n * @param {Node} node\n * @param {Node[]} value\n * @param {string} _\n * @param {Node[]} prev\n * @returns {Node[]}\n */\nexport const array = (node, value, prev) => {\n // normal diff\n const { length } = value;\n node.data = `[${length}]`;\n if (length)\n return udomdiff(node.parentNode, prev, value, diffFragment, node);\n /* c8 ignore start */\n switch (prev.length) {\n case 1:\n prev[0].remove();\n case 0:\n break;\n default:\n drop(\n diffFragment(prev[0], 0),\n diffFragment(prev.at(-1), -0),\n false\n );\n break;\n }\n /* c8 ignore stop */\n return empty;\n};\n\nexport const attr = new Map([\n ['aria', aria],\n ['class', className],\n ['data', data],\n ['ref', ref],\n ['style', style],\n]);\n\n/**\n * @param {HTMLElement | SVGElement} element\n * @param {string} name\n * @param {boolean} svg\n * @returns\n */\nexport const attribute = (element, name, svg) => {\n switch (name[0]) {\n case '.': return dot;\n case '?': return toggle;\n case '@': return at;\n default: return (\n svg || ('ownerSVGElement' in element) ?\n (name === 'ref' ? ref : regular) :\n (attr.get(name) || (\n name in element ?\n (name.startsWith('on') ?\n direct :\n (gPD(element, name)?.set ? maybeDirect : regular)\n ) :\n regular\n )\n )\n );\n }\n};\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const text = (element, value) => (\n (element.textContent = value == null ? '' : value),\n value\n);\n","/**\n * ISC License\n *\n * Copyright (c) 2020, Andrea Giammarchi, @WebReflection\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n * PERFORMANCE OF THIS SOFTWARE.\n */\n\n/**\n * @param {Node} parentNode The container where children live\n * @param {Node[]} a The list of current/live children\n * @param {Node[]} b The list of future children\n * @param {(entry: Node, action: number) => Node} get\n * The callback invoked per each entry related DOM operation.\n * @param {Node} [before] The optional node used as anchor to insert before.\n * @returns {Node[]} The same list of future children.\n */\nexport default (parentNode, a, b, get, before) => {\n const bLength = b.length;\n let aEnd = a.length;\n let bEnd = bLength;\n let aStart = 0;\n let bStart = 0;\n let map = null;\n while (aStart < aEnd || bStart < bEnd) {\n // append head, tail, or nodes in between: fast path\n if (aEnd === aStart) {\n // we could be in a situation where the rest of nodes that\n // need to be added are not at the end, and in such case\n // the node to `insertBefore`, if the index is more than 0\n // must be retrieved, otherwise it's gonna be the first item.\n const node = bEnd < bLength ?\n (bStart ?\n (get(b[bStart - 1], -0).nextSibling) :\n get(b[bEnd], 0)) :\n before;\n while (bStart < bEnd)\n parentNode.insertBefore(get(b[bStart++], 1), node);\n }\n // remove head or tail: fast path\n else if (bEnd === bStart) {\n while (aStart < aEnd) {\n // remove the node only if it's unknown or not live\n if (!map || !map.has(a[aStart]))\n parentNode.removeChild(get(a[aStart], -1));\n aStart++;\n }\n }\n // same node: fast path\n else if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n }\n // same tail: fast path\n else if (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n }\n // The once here single last swap \"fast path\" has been removed in v1.1.0\n // https://github.com/WebReflection/udomdiff/blob/single-final-swap/esm/index.js#L69-L85\n // reverse swap: also fast path\n else if (\n a[aStart] === b[bEnd - 1] &&\n b[bStart] === a[aEnd - 1]\n ) {\n // this is a \"shrink\" operation that could happen in these cases:\n // [1, 2, 3, 4, 5]\n // [1, 4, 3, 2, 5]\n // or asymmetric too\n // [1, 2, 3, 4, 5]\n // [1, 2, 3, 5, 6, 4]\n const node = get(a[--aEnd], -0).nextSibling;\n parentNode.insertBefore(\n get(b[bStart++], 1),\n get(a[aStart++], -0).nextSibling\n );\n parentNode.insertBefore(get(b[--bEnd], 1), node);\n // mark the future index as identical (yeah, it's dirty, but cheap 👍)\n // The main reason to do this, is that when a[aEnd] will be reached,\n // the loop will likely be on the fast path, as identical to b[bEnd].\n // In the best case scenario, the next loop will skip the tail,\n // but in the worst one, this node will be considered as already\n // processed, bailing out pretty quickly from the map index check\n a[aEnd] = b[bEnd];\n }\n // map based fallback, \"slow\" path\n else {\n // the map requires an O(bEnd - bStart) operation once\n // to store all future nodes indexes for later purposes.\n // In the worst case scenario, this is a full O(N) cost,\n // and such scenario happens at least when all nodes are different,\n // but also if both first and last items of the lists are different\n if (!map) {\n map = new Map;\n let i = bStart;\n while (i < bEnd)\n map.set(b[i], i++);\n }\n // if it's a future node, hence it needs some handling\n if (map.has(a[aStart])) {\n // grab the index of such node, 'cause it might have been processed\n const index = map.get(a[aStart]);\n // if it's not already processed, look on demand for the next LCS\n if (bStart < index && index < bEnd) {\n let i = aStart;\n // counts the amount of nodes that are the same in the future\n let sequence = 1;\n while (++i < aEnd && i < bEnd && map.get(a[i]) === (index + sequence))\n sequence++;\n // effort decision here: if the sequence is longer than replaces\n // needed to reach such sequence, which would brings again this loop\n // to the fast path, prepend the difference before a sequence,\n // and move only the future list index forward, so that aStart\n // and bStart will be aligned again, hence on the fast path.\n // An example considering aStart and bStart are both 0:\n // a: [1, 2, 3, 4]\n // b: [7, 1, 2, 3, 6]\n // this would place 7 before 1 and, from that time on, 1, 2, and 3\n // will be processed at zero cost\n if (sequence > (index - bStart)) {\n const node = get(a[aStart], 0);\n while (bStart < index)\n parentNode.insertBefore(get(b[bStart++], 1), node);\n }\n // if the effort wasn't good enough, fallback to a replace,\n // moving both source and target indexes forward, hoping that some\n // similar node will be found later on, to go back to the fast path\n else {\n parentNode.replaceChild(\n get(b[bStart++], 1),\n get(a[aStart++], -1)\n );\n }\n }\n // otherwise move the source forward, 'cause there's nothing to do\n else\n aStart++;\n }\n // this node has no meaning in the future list, so it's more than safe\n // to remove it, and check the next live node out instead, meaning\n // that only the live list index should be forwarded\n else\n parentNode.removeChild(get(a[aStart++], -1));\n }\n }\n return b;\n};\n","import { empty } from './utils.js';\n\n/** @typedef {import(\"./persistent-fragment.js\").PersistentFragment} PersistentFragment */\n/** @typedef {import(\"./rabbit.js\").Hole} Hole */\n\n/** @typedef {unknown} Value */\n/** @typedef {Node | Element | PersistentFragment} Target */\n/** @typedef {null | undefined | string | number | boolean | Node | Element | PersistentFragment} DOMValue */\n/** @typedef {Hole | Node} ArrayValue */\n\nexport const abc = (a, b, c) => ({ a, b, c });\n\nexport const bc = (b, c) => ({ b, c });\n\n/**\n * @typedef {Object} Detail\n * @property {any} v the current value of the interpolation / hole\n * @property {function} u the callback to update the value\n * @property {Node} t the target comment node or element\n * @property {string | null | Node} n the attribute name, if any, or `null`\n * @property {Cache | ArrayValue[] | null} c the cache value for this detail\n */\n\n/**\n * @returns {Detail}\n */\nexport const detail = (u, t, n, c) => ({ v: empty, u, t, n, c });\n\n/**\n * @typedef {Object} Entry\n * @property {number[]} a the path to retrieve the node\n * @property {function} b the update function\n * @property {string | null} c the attribute name, if any, or `null`\n */\n\n/**\n * @typedef {Object} Cache\n * @property {null | TemplateStringsArray} a the cached template\n * @property {null | Node | PersistentFragment} b the node returned when parsing the template\n * @property {Detail[]} c the list of updates to perform\n */\n\n/**\n * @returns {Cache}\n */\nexport const cache = () => abc(null, null, empty);\n","import { PersistentFragment } from './persistent-fragment.js';\nimport { bc, detail } from './literals.js';\nimport { array, hole } from './handler.js';\nimport { empty, find } from './utils.js';\nimport { cache } from './literals.js';\n\n/** @param {(template: TemplateStringsArray, values: any[]) => import(\"./parser.js\").Resolved} parse */\nexport default parse => (\n /**\n * @param {TemplateStringsArray} template\n * @param {any[]} values\n * @returns {import(\"./literals.js\").Cache}\n */\n (template, values) => {\n const { a: fragment, b: entries, c: direct } = parse(template, values);\n const root = document.importNode(fragment, true);\n /** @type {import(\"./literals.js\").Detail[]} */\n let details = empty;\n if (entries !== empty) {\n details = [];\n for (let current, prev, i = 0; i < entries.length; i++) {\n const { a: path, b: update, c: name } = entries[i];\n const node = path === prev ? current : (current = find(root, (prev = path)));\n details[i] = detail(\n update,\n node,\n name,\n update === array ? [] : (update === hole ? cache() : null)\n );\n }\n }\n return bc(\n direct ? root.firstChild : new PersistentFragment(root),\n details,\n );\n }\n);\n","export const TEXT_ELEMENTS = /^(?:plaintext|script|style|textarea|title|xmp)$/i;\nexport const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;\n","import { VOID_ELEMENTS } from 'domconstants/re';\n\nconst elements = /<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\\/?)>/g;\nconst attributes = /([^\\s\\\\>\"'=]+)\\s*=\\s*(['\"]?)\\x01/g;\nconst holes = /[\\x01\\x02]/g;\n\n// \\x01 Node.ELEMENT_NODE\n// \\x02 Node.ATTRIBUTE_NODE\n\n/**\n * Given a template, find holes as both nodes and attributes and\n * return a string with holes as either comment nodes or named attributes.\n * @param {string[]} template a template literal tag array\n * @param {string} prefix prefix to use per each comment/attribute\n * @param {boolean} xml enforces self-closing tags\n * @returns {string} X/HTML with prefixed comments or attributes\n */\nexport default (template, prefix, xml) => {\n let i = 0;\n return template\n .join('\\x01')\n .trim()\n .replace(\n elements,\n (_, name, attrs, selfClosing) => `<${\n name\n }${\n attrs.replace(attributes, '\\x02=$2$1').trimEnd()\n }${\n selfClosing ? (\n (xml || VOID_ELEMENTS.test(name)) ? ' /' : `></${name}`\n ) : ''\n }>`\n )\n .replace(\n holes,\n hole => hole === '\\x01' ? `<!--${prefix + i++}-->` : (prefix + i++)\n )\n ;\n};\n","import { SVG_NAMESPACE, newRange } from './utils.js';\n\nlet template = document.createElement('template'), svg, range;\n\n/**\n * @param {string} text\n * @param {boolean} xml\n * @returns {DocumentFragment}\n */\nexport default (text, xml) => {\n if (xml) {\n if (!svg) {\n svg = document.createElementNS(SVG_NAMESPACE, 'svg');\n range = newRange();\n range.selectNodeContents(svg);\n }\n return range.createContextualFragment(text);\n }\n template.innerHTML = text;\n const { content } = template;\n template = template.cloneNode(false);\n return content;\n};\n","import { COMMENT_NODE, ELEMENT_NODE } from 'domconstants/constants';\nimport { TEXT_ELEMENTS } from 'domconstants/re';\nimport parser from '@webreflection/uparser';\n\nimport { empty, isArray, set } from './utils.js';\nimport { abc } from './literals.js';\n\nimport { array, attribute, hole, text, removeAttribute } from './handler.js';\nimport createContent from './create-content.js';\n\n/** @typedef {import(\"./literals.js\").Entry} Entry */\n\n/**\n * @typedef {Object} Resolved\n * @param {DocumentFragment} f content retrieved from the template\n * @param {Entry[]} e entries per each hole in the template\n * @param {boolean} d direct node to handle\n */\n\n/**\n * @param {Element} node\n * @returns {number[]}\n */\nconst createPath = node => {\n const path = [];\n let parentNode;\n while ((parentNode = node.parentNode)) {\n path.push(path.indexOf.call(parentNode.childNodes, node));\n node = parentNode;\n }\n return path;\n};\n\nconst textNode = () => document.createTextNode('');\n\n/**\n * @param {TemplateStringsArray} template\n * @param {boolean} xml\n * @returns {Resolved}\n */\nconst resolve = (template, values, xml) => {\n const content = createContent(parser(template, prefix, xml), xml);\n const { length } = template;\n let entries = empty;\n if (length > 1) {\n const replace = [];\n const tw = document.createTreeWalker(content, 1 | 128);\n let i = 0, search = `${prefix}${i++}`;\n entries = [];\n while (i < length) {\n const node = tw.nextNode();\n // these are holes or arrays\n if (node.nodeType === COMMENT_NODE) {\n if (node.data === search) {\n // ⚠️ once array, always array!\n const update = isArray(values[i - 1]) ? array : hole;\n if (update === hole) replace.push(node);\n entries.push(abc(createPath(node), update, null));\n search = `${prefix}${i++}`;\n }\n }\n else {\n let path;\n // these are attributes\n while (node.hasAttribute(search)) {\n if (!path) path = createPath(node);\n const name = node.getAttribute(search);\n entries.push(abc(path, attribute(node, name, xml), name));\n removeAttribute(node, search);\n search = `${prefix}${i++}`;\n }\n // these are special text-only nodes\n if (\n !xml &&\n TEXT_ELEMENTS.test(node.localName) &&\n node.textContent.trim() === `<!--${search}-->`\n ) {\n entries.push(abc(path || createPath(node), text, null));\n search = `${prefix}${i++}`;\n }\n }\n }\n // can't replace holes on the fly or the tree walker fails\n for (i = 0; i < replace.length; i++)\n replace[i].replaceWith(textNode());\n }\n\n // need to decide if there should be a persistent fragment\n const { childNodes } = content;\n let { length: len } = childNodes;\n\n // html`` or svg`` to signal an empty content\n // these nodes can be passed directly as never mutated\n if (len < 1) {\n len = 1;\n content.appendChild(textNode());\n }\n // html`${'b'}` or svg`${[]}` cases\n else if (\n len === 1 &&\n // ignore html`static` or svg`static` because\n // these nodes can be passed directly as never mutated\n length !== 1 &&\n childNodes[0].nodeType !== ELEMENT_NODE\n ) {\n // use a persistent fragment for these cases too\n len = 0;\n }\n\n return set(cache, template, abc(content, entries, len === 1));\n};\n\n/** @type {WeakMap<TemplateStringsArray, Resolved>} */\nconst cache = new WeakMap;\nconst prefix = 'isµ';\n\n/**\n * @param {boolean} xml\n * @returns {(template: TemplateStringsArray, values: any[]) => Resolved}\n */\nexport default xml => (template, values) => cache.get(template) || resolve(template, values, xml);\n","import { array, hole } from './handler.js';\nimport { cache } from './literals.js';\nimport create from './creator.js';\nimport parser from './parser.js';\n\nconst createHTML = create(parser(false));\nconst createSVG = create(parser(true));\n\n/**\n * @param {import(\"./literals.js\").Cache} info\n * @param {Hole} hole\n * @returns {Node}\n */\nconst unroll = (info, { s, t, v }) => {\n if (info.a !== t) {\n const { b, c } = (s ? createSVG : createHTML)(t, v);\n info.a = t;\n info.b = b;\n info.c = c;\n }\n for (let { c } = info, i = 0; i < c.length; i++) {\n const value = v[i];\n const detail = c[i];\n switch (detail.u) {\n case array:\n detail.v = array(\n detail.t,\n unrollValues(detail.c, value),\n detail.v\n );\n break;\n case hole:\n const current = value instanceof Hole ?\n unroll(detail.c || (detail.c = cache()), value) :\n (detail.c = null, value)\n ;\n if (current !== detail.v)\n detail.v = hole(detail, current);\n break;\n default:\n if (value !== detail.v)\n detail.v = detail.u(detail.t, value, detail.n, detail.v);\n break;\n }\n }\n return info.b;\n};\n\n/**\n * @param {Cache} cache\n * @param {any[]} values\n * @returns {number}\n */\nconst unrollValues = (stack, values) => {\n let i = 0, { length } = values;\n if (length < stack.length) stack.splice(length);\n for (; i < length; i++) {\n const value = values[i];\n if (value instanceof Hole)\n values[i] = unroll(stack[i] || (stack[i] = cache()), value);\n else stack[i] = null;\n }\n return values;\n};\n\n/**\n * Holds all details needed to render the content on a render.\n * @constructor\n * @param {boolean} svg The content type.\n * @param {TemplateStringsArray} template The template literals used to the define the content.\n * @param {any[]} values Zero, one, or more interpolated values to render.\n */\nexport class Hole {\n constructor(svg, template, values) {\n this.s = svg;\n this.t = template;\n this.v = values;\n }\n toDOM(info = cache()) {\n return unroll(info, this);\n }\n};\n","/*! (c) Andrea Giammarchi - MIT */\nimport { Hole } from './rabbit.js';\nimport { attr } from './handler.js';\n\nimport render from './render/hole.js';\n\n/** @typedef {import(\"./literals.js\").Value} Value */\n\nconst tag = svg => (template, ...values) => new Hole(svg, template, values);\n\n/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render HTML content. */\nexport const html = tag(false);\n\n/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render SVG content. */\nexport const svg = tag(true);\n\nexport { Hole, render, attr };\n","import { Hole } from '../rabbit.js';\nimport { cache } from '../literals.js';\nimport { set } from '../utils.js';\n\n/** @type {WeakMap<Element | DocumentFragment, import(\"../literals.js\").Cache>} */\nconst known = new WeakMap;\n\n/**\n * Render with smart updates within a generic container.\n * @template T\n * @param {T} where the DOM node where to render content\n * @param {(() => Hole) | Hole} what the hole to render\n * @param {boolean} check does a `typeof` check (internal usage).\n * @returns\n */\nexport default (where, what, check) => {\n const info = known.get(where) || set(known, where, cache());\n const { b } = info;\n const hole = (check && typeof what === 'function') ? what() : what;\n const node = hole instanceof Hole ? hole.toDOM(info) : hole;\n if (b !== node)\n where.replaceChildren((info.b = node).valueOf());\n return where;\n};\n","/*! (c) Andrea Giammarchi - MIT */\nimport { Hole } from './rabbit.js';\nimport { attr } from './handler.js';\nimport { cache } from './literals.js';\nimport { set } from './utils.js';\nimport { html, svg } from './index.js';\n\nimport render from './render/keyed.js';\n\n/** @typedef {import(\"./literals.js\").Cache} Cache */\n/** @typedef {import(\"./literals.js\").Target} Target */\n/** @typedef {import(\"./literals.js\").Value} Value */\n\n/** @typedef {(ref:Object, key:string | number) => Tag} Bound */\n\n/**\n * @callback Tag\n * @param {TemplateStringsArray} template\n * @param {...Value} values\n * @returns {Target}\n */\n\nconst keyed = new WeakMap;\nconst createRef = svg => /** @type {Bound} */ (ref, key) => {\n /** @type {Tag} */\n function tag(template, ...values) {\n return new Hole(svg, template, values).toDOM(this);\n }\n\n const memo = keyed.get(ref) || set(keyed, ref, new Map);\n return memo.get(key) || set(memo, key, tag.bind(cache()));\n};\n\n/** @type {Bound} Returns a bound tag to render HTML content. */\nexport const htmlFor = createRef(false);\n\n/** @type {Bound} Returns a bound tag to render SVG content. */\nexport const svgFor = createRef(true);\n\nexport { Hole, render, html, svg, attr };\n","// (c) Andrea Giammarchi - ISC\n\nconst registry = new FinalizationRegistry(\n ([onGarbageCollected, held, debug]) => {\n // \"%cThis is a green text\", \"color:green\"\n if (debug) console.debug(`%c${String(held)}`, 'font-weight:bold', 'collected');\n onGarbageCollected(held);\n }\n);\n\nconst nullHandler = Object.create(null);\n\n/**\n * @template {unknown} H\n * @typedef {Object} GCHookOptions\n * @prop {boolean} [debug=false] if `true`, logs values once these can get collected.\n * @prop {ProxyHandler<object>} [handler] optional proxy handler to use instead of the default one.\n * @prop {H} [return=H] if specified, overrides the returned proxy with its value.\n * @prop {unknown} [token=H] it's the held value by default, but it can be any other token except the returned value itself.\n */\n\n/**\n * @template {unknown} H\n * @param {H} hold the reference to hold behind the scene and passed along the callback once it triggers.\n * @param {(held:H) => void} onGarbageCollected the callback that will receive the held value once its wrapper or indirect reference is no longer needed.\n * @param {GCHookOptions<H>} [options] an optional configuration object to change some default behavior.\n */\nexport const create = (\n hold,\n onGarbageCollected,\n { debug, handler, return: r, token = hold } = nullHandler\n) => {\n // if no reference to return is defined,\n // create a proxy for the held one and register that instead.\n /** @type {H} */\n const target = r || new Proxy(hold, handler || nullHandler);\n const args = [target, [onGarbageCollected, hold, !!debug]];\n if (token !== false) args.push(token);\n // register the target reference in a way that\n // the `onGarbageCollected(held)` callback will eventually notify.\n registry.register(...args);\n return target;\n};\n\n/**\n * If previously registered as either `token` or `hold` value, allow explicit removal of the entry in the registry.\n * @param {unknown} token the token used during registration. If no `token` was passed, this can be the same `hold` reference.\n * @returns {boolean} `true` if successfully unregistered.\n */\nexport const drop = token => registry.unregister(token);\n","import { create, drop } from 'gc-hook';\n\nimport render from './shared.js';\n\n/** @typedef {import(\"../rabbit.js\").Hole} Hole */\n\n/** @type {WeakMap<Element | DocumentFragment, Function>} */\nconst effects = new WeakMap;\n\n/**\n * @param {Function} dispose\n * @returns {void}\n */\nconst onGC = dispose => dispose();\n\nlet remove = true;\n\n/**\n * @param {Function} effect the reactive `effect` callback provided by a 3rd party library.\n * @returns \n */\nexport const attach = effect => {\n /**\n * Render with smart updates within a generic container.\n * If the `what` is a function, it automatically create\n * an effect for the render function.\n * @template T\n * @param {T} where the DOM node where to render content\n * @param {(() => Hole) | Hole} what the hole to render\n * @returns {T}\n */\n return (where, what) => {\n remove = typeof what !== 'function';\n detach(where);\n\n if (remove) return render(where, what, false);\n remove = true;\n\n const wr = new WeakRef(where);\n const dispose = effect(() => { render(wr.deref(), what(), false) });\n effects.set(where, dispose);\n return create(dispose, onGC, { return: where });\n };\n};\n\n/**\n * Allow manual cleanup of subscribed signals.\n * @param {Element} where a reference container previously used to render signals.\n */\nexport const detach = where => {\n const dispose = effects.get(where);\n if (dispose) {\n if (remove) effects.delete(where);\n drop(dispose);\n dispose();\n }\n};\n","export {\n default as Signal,\n createSignal,\n effect,\n State,\n Computed\n} from 'mi-signal'\nexport * from 'uhtml/reactive'\nimport { effect } from 'mi-signal'\nimport { reactive } from 'uhtml/reactive'\nexport const render = reactive(effect)\n"],"names":["context","State","EventTarget","value","equals","constructor","options","super","this","nextValue","get","set","running","length","add","dispatchEvent","CustomEvent","createSignal","initialValue","effect","cb","Set","push","pop","dep","addEventListener","removeEventListener","Computed","state","index","isArray","Array","getPrototypeOf","getOwnPropertyDescriptor","Object","empty","newRange","document","createRange","map","key","find","content","path","reduceRight","childNodesIndex","node","i","childNodes","setPrototypeOf","range","drop$1","firstChild","lastChild","preserve","setStartAfter","setStartBefore","setEndAfter","deleteContents","remove","drop","checkType","diffFragment","operation","nodeType","valueOf","comment","createComment","PersistentFragment","Class","Custom","target","prototype","custom","DocumentFragment","nodes","fragment","replaceChildren","parentNode","replaceWith","nextSibling","setAttribute","element","name","removeAttribute","listeners","at","slice","WeakMap","known","current","hole","detail","t","n","nullish","data","direct","ref","dot","maybeDirect","regular","toggle","toggleAttribute","array","prev","a","b","before","bLength","aEnd","bEnd","aStart","bStart","insertBefore","has","removeChild","Map","sequence","replaceChild","udomdiff","attr","$","dataset","style","attribute","svg","startsWith","prop","desc","gPD","text","textContent","abc","c","cache","create$1","parse","template","values","entries","root","importNode","details","update","u","v","bc","TEXT_ELEMENTS","VOID_ELEMENTS","elements","attributes","holes","createElement","createContent","xml","createElementNS","selectNodeContents","createContextualFragment","innerHTML","cloneNode","createPath","indexOf","call","textNode","createTextNode","prefix","parser","join","trim","replace","_","attrs","selfClosing","trimEnd","test","tw","createTreeWalker","search","nextNode","hasAttribute","getAttribute","localName","len","appendChild","resolve","createHTML","create","createSVG","unroll","info","s","unrollValues","Hole","stack","splice","toDOM","tag","html","render$1","where","what","check","keyed","createRef","memo","bind","htmlFor","svgFor","registry","FinalizationRegistry","onGarbageCollected","held","debug","nullHandler","effects","onGC","dispose","attach","detach","render","wr","WeakRef","deref","hold","handler","return","r","token","Proxy","args","register","delete","unregister","reactive"],"mappings":"AAAA,MAAMA,EAAU,GAEhB,MAAMC,UAAcC,YAClBC,GACAC,GACA,WAAAC,CAAYF,EAAOG,GACjBC,QACA,MAAOH,OAAQA,GAAUE,GAAW,CAAA,EACpCE,MAAKL,EAASA,EAAOK,MAAKJ,EAAUA,GAAM,EAAMD,EAAOM,IAAcN,IAAUM,EACjF,CACA,SAAIN,GACF,OAAOK,KAAKE,KACd,CACA,SAAIP,CAAMM,GACRD,KAAKG,IAAIF,EACX,CACA,GAAAC,GACE,MAAME,EAAUZ,EAAQA,EAAQa,OAAS,GACzC,OAAOD,GAAWA,EAAQE,IAAIN,MAAOA,MAAKL,CAC5C,CACA,GAAAQ,CAAIF,GACFD,MAAKJ,EAAQI,MAAKL,EAAQM,KAAeD,MAAKL,EAASM,EAAWD,KAAKO,cAAc,IAAIC,YAAY,WACvG,EAGG,MAACC,EAAe,CAACC,EAAcZ,IAAYY,aAAwBjB,EAAQiB,EAAe,IAAIjB,EAAMiB,EAAcZ,GAEvH,SAASa,EAAOC,GACd,MAAMR,EAAU,IAAIS,IACpBrB,EAAQsB,KAAKV,GACb,IACEQ,GACF,CAAC,QACCpB,EAAQuB,KACV,CACA,IAAK,MAAMC,KAAOZ,EAASY,EAAIC,iBAAiB,SAAUL,GAC1D,MAAO,KACL,IAAK,MAAMI,KAAOZ,EAASY,EAAIE,oBAAoB,S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AAKnE,EAAKY,EAAUC,GAAQyD,MAAM5L,KAC/C,EAG2CsM,KAAKvE,KAAS,EAI9CwE,GAAUH,IAAU,GAGpBI,GAASJ,IAAU,GCnC1BK,GAAW,IAAIC,sBACnB,EAAEC,EAAoBC,EAAMC,MAG1BF,EAAmBC,EAAK,IAItBE,GAAcpL,OAAOyJ,OAAO,MCH5B4B,GAAU,IAAI/H,QAMdgI,GAAOC,GAAWA,IAExB,IAAI9J,IAAS,EAMD,MAAC+J,GAASvM,GAUb,CAACqL,EAAOC,KAIb,GAHA9I,GAAyB,mBAAT8I,EAChBkB,GAAOnB,GAEH7I,GAAQ,OAAOiK,GAAOpB,EAAOC,GACjC9I,IAAS,EAET,MAAMkK,EAAK,IAAIC,QAAQtB,GACjBiB,EAAUtM,GAAO,KAAQyM,GAAOC,EAAGE,QAAStB,IAAa,IAE/D,OADAc,GAAQ5M,IAAI6L,EAAOiB,GDbD,EACpBO,EACAb,GACEE,QAAOY,UAASC,OAAQC,EAAGC,QAAQJ,GAASV,MAK9C,MAAM/I,EAAS4J,GAAK,IAAIE,MAAML,EAAMC,GAAWX,IACzCgB,EAAO,CAAC/J,EAAQ,CAAC4I,EAAoBa,IAAQX,IAKnD,OAJc,IAAVe,GAAiBE,EAAKhN,KAAK8M,GAG/BnB,GAASsB,YAAYD,GACd/J,CAAM,ECAJoH,CAAO8B,EAASD,GAAM,CAAEU,OAAQ1B,GAAQ,EAQtCmB,GAASnB,IACpB,MAAMiB,EAAUF,GAAQ7M,IAAI8L,GDDV4B,MCEdX,IACE9J,IAAQ4J,GAAQiB,OAAOhC,GDHX4B,ECIXX,EDJoBR,GAASwB,WAAWL,GCK7CX,IACF,EC7CWG,GAASc,GAASvN","x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]}
|
|
1
|
+
{"version":3,"file":"index.min.js","sources":["../../mi-signal/dist/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/utils.js","../../../node_modules/.pnpm/custom-function@2.0.0/node_modules/custom-function/esm/factory.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/range.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/persistent-fragment.js","../../../node_modules/.pnpm/domconstants@1.1.6/node_modules/domconstants/esm/constants.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/handler.js","../../../node_modules/.pnpm/udomdiff@1.1.2/node_modules/udomdiff/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/literals.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/creator.js","../../../node_modules/.pnpm/domconstants@1.1.6/node_modules/domconstants/esm/re.js","../../../node_modules/.pnpm/@webreflection+uparser@0.4.0/node_modules/@webreflection/uparser/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/create-content.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/parser.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/rabbit.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/render/shared.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/keyed.js","../../../node_modules/.pnpm/gc-hook@0.4.1/node_modules/gc-hook/esm/index.js","../../../node_modules/.pnpm/uhtml@4.7.1/node_modules/uhtml/esm/render/reactive.js","../src/index.js"],"sourcesContent":["const context = [];\n\nclass State extends EventTarget {\n #value;\n #equals;\n constructor(value, options) {\n super();\n const {equals: equals} = options || {};\n this.#value = value, this.#equals = equals ?? ((value, nextValue) => value === nextValue);\n }\n get value() {\n return this.get();\n }\n set value(nextValue) {\n this.set(nextValue);\n }\n get() {\n const running = context[context.length - 1];\n return running && running.add(this), this.#value;\n }\n set(nextValue) {\n this.#equals(this.#value, nextValue) || (this.#value = nextValue, this.dispatchEvent(new CustomEvent('signal')));\n }\n}\n\nconst createSignal = (initialValue, options) => initialValue instanceof State ? initialValue : new State(initialValue, options);\n\nfunction effect(cb) {\n const running = new Set;\n context.push(running);\n try {\n cb();\n } finally {\n context.pop();\n }\n for (const dep of running) dep.addEventListener('signal', cb);\n return () => {\n for (const dep of running) dep.removeEventListener('signal', cb);\n };\n}\n\nclass Computed {\n #state;\n #unsubscribe;\n constructor(cb) {\n this.#state = new State, this.#unsubscribe = effect(() => this.#state.set(cb()));\n }\n get() {\n return this.#state.get();\n }\n unsubscribe() {\n this.#unsubscribe();\n }\n}\n\nvar index = {\n State: State,\n Computed: Computed,\n createSignal: createSignal,\n effect: effect\n};\n\nexport { Computed, State, createSignal, index as default, effect };\n","const { isArray } = Array;\nconst { getPrototypeOf, getOwnPropertyDescriptor } = Object;\n\nexport { isArray };\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nexport const empty = [];\n\nexport const newRange = () => document.createRange();\n\n/**\n * Set the `key` `value` pair to the *Map* or *WeakMap* and returns the `value`\n * @template T\n * @param {Map | WeakMap} map\n * @param {any} key\n * @param {T} value\n * @returns {T}\n */\nexport const set = (map, key, value) => {\n map.set(key, value);\n return value;\n};\n\n/**\n * Return a descriptor, if any, for the referenced *Element*\n * @param {Element} ref\n * @param {string} prop\n * @returns \n */\nexport const gPD = (ref, prop) => {\n let desc;\n do { desc = getOwnPropertyDescriptor(ref, prop); }\n while(!desc && (ref = getPrototypeOf(ref)));\n return desc;\n};\n\n/* c8 ignore start */\n/**\n * @param {DocumentFragment} content\n * @param {number[]} path\n * @returns {Element}\n */\nexport const find = (content, path) => path.reduceRight(childNodesIndex, content);\nconst childNodesIndex = (node, i) => node.childNodes[i];\n/* c8 ignore stop */\n","const {setPrototypeOf} = Object;\n\n/**\n * @param {Function} Class any base class to extend without passing through it via super() call.\n * @returns {Function} an extensible class for the passed one.\n * @example\n * // creating this very same module utility\n * import custom from 'custom-function/factory';\n * const CustomFunction = custom(Function);\n * class MyFunction extends CustomFunction {}\n * const mf = new MyFunction(() => {});\n */\nexport default Class => {\n function Custom(target) {\n return setPrototypeOf(target, new.target.prototype);\n }\n Custom.prototype = Class.prototype;\n return Custom;\n};\n","import { newRange } from './utils.js';\n\nlet range;\n/**\n * @param {Node | Element} firstChild\n * @param {Node | Element} lastChild\n * @param {boolean} preserve\n * @returns\n */\nexport default (firstChild, lastChild, preserve) => {\n if (!range) range = newRange();\n /* c8 ignore start */\n if (preserve)\n range.setStartAfter(firstChild);\n else\n range.setStartBefore(firstChild);\n /* c8 ignore stop */\n range.setEndAfter(lastChild);\n range.deleteContents();\n return firstChild;\n};\n","import { DOCUMENT_FRAGMENT_NODE } from 'domconstants/constants';\nimport custom from 'custom-function/factory';\nimport drop from './range.js';\nimport { empty } from './utils.js';\n\n/**\n * @param {PersistentFragment} fragment\n * @returns {Node | Element}\n */\nconst remove = ({firstChild, lastChild}, preserve) => drop(firstChild, lastChild, preserve);\n\nlet checkType = false;\n\n/**\n * @param {Node} node\n * @param {1 | 0 | -0 | -1} operation\n * @returns {Node}\n */\nexport const diffFragment = (node, operation) => (\n checkType && node.nodeType === DOCUMENT_FRAGMENT_NODE ?\n ((1 / operation) < 0 ?\n (operation ? remove(node, true) : node.lastChild) :\n (operation ? node.valueOf() : node.firstChild)) :\n node\n);\n\nconst comment = value => document.createComment(value);\n\n/** @extends {DocumentFragment} */\nexport class PersistentFragment extends custom(DocumentFragment) {\n #firstChild = comment('<>');\n #lastChild = comment('</>');\n #nodes = empty;\n constructor(fragment) {\n super(fragment);\n this.replaceChildren(...[\n this.#firstChild,\n ...fragment.childNodes,\n this.#lastChild,\n ]);\n checkType = true;\n }\n get firstChild() { return this.#firstChild; }\n get lastChild() { return this.#lastChild; }\n get parentNode() { return this.#firstChild.parentNode; }\n remove() {\n remove(this, false);\n }\n replaceWith(node) {\n remove(this, true).replaceWith(node);\n }\n valueOf() {\n const { parentNode } = this;\n if (parentNode === this) {\n if (this.#nodes === empty)\n this.#nodes = [...this.childNodes];\n }\n else {\n /* c8 ignore start */\n // there are cases where a fragment might be just appended\n // out of the box without valueOf() invoke (first render).\n // When these are moved around and lose their parent and,\n // such parent is not the fragment itself, it's possible there\n // where changes or mutations in there to take care about.\n // This is a render-only specific issue but it's tested and\n // it's worth fixing to me to have more consistent fragments.\n if (parentNode) {\n let { firstChild, lastChild } = this;\n this.#nodes = [firstChild];\n while (firstChild !== lastChild)\n this.#nodes.push((firstChild = firstChild.nextSibling));\n }\n /* c8 ignore stop */\n this.replaceChildren(...this.#nodes);\n }\n return this;\n }\n}\n","export const ELEMENT_NODE = 1;\nexport const ATTRIBUTE_NODE = 2;\nexport const TEXT_NODE = 3;\nexport const COMMENT_NODE = 8;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_TYPE_NODE = 10;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n","import udomdiff from 'udomdiff';\nimport { empty, gPD, isArray, set } from './utils.js';\nimport { diffFragment } from './persistent-fragment.js';\nimport drop from './range.js';\n\nconst setAttribute = (element, name, value) =>\n element.setAttribute(name, value);\n\n/**\n * @param {Element} element\n * @param {string} name\n * @returns {void}\n */\nexport const removeAttribute = (element, name) =>\n element.removeAttribute(name);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const aria = (element, value) => {\n for (const key in value) {\n const $ = value[key];\n const name = key === 'role' ? key : `aria-${key}`;\n if ($ == null) removeAttribute(element, name);\n else setAttribute(element, name, $);\n }\n return value;\n};\n\nlet listeners;\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const at = (element, value, name) => {\n name = name.slice(1);\n if (!listeners) listeners = new WeakMap;\n const known = listeners.get(element) || set(listeners, element, {});\n let current = known[name];\n if (current && current[0]) element.removeEventListener(name, ...current);\n current = isArray(value) ? value : [value, false];\n known[name] = current;\n if (current[0]) element.addEventListener(name, ...current);\n return value;\n};\n\n/** @type {WeakMap<Node, Element | import(\"./persistent-fragment.js\").PersistentFragment>} */\nconst holes = new WeakMap;\n\n/**\n * @template T\n * @param {import(\"./literals.js\").Detail} detail\n * @param {T} value\n * @returns {T}\n */\nexport const hole = (detail, value) => {\n const { t: node, n: hole } = detail;\n let nullish = false;\n switch (typeof value) {\n case 'object':\n if (value !== null) {\n (hole || node).replaceWith((detail.n = value.valueOf()));\n break;\n }\n case 'undefined':\n nullish = true;\n default:\n node.data = nullish ? '' : value;\n if (hole) {\n detail.n = null;\n hole.replaceWith(node);\n }\n break;\n }\n return value;\n};\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const className = (element, value) => maybeDirect(\n element, value, value == null ? 'class' : 'className'\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const data = (element, value) => {\n const { dataset } = element;\n for (const key in value) {\n if (value[key] == null) delete dataset[key];\n else dataset[key] = value[key];\n }\n return value;\n};\n\n/**\n * @template T\n * @param {Element | CSSStyleDeclaration} ref\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const direct = (ref, value, name) => (ref[name] = value);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const dot = (element, value, name) => direct(element, value, name.slice(1));\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const maybeDirect = (element, value, name) => (\n value == null ?\n (removeAttribute(element, name), value) :\n direct(element, value, name)\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const ref = (element, value) => (\n (typeof value === 'function' ?\n value(element) : (value.current = element)),\n value\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nconst regular = (element, value, name) => (\n (value == null ?\n removeAttribute(element, name) :\n setAttribute(element, name, value)),\n value\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const style = (element, value) => (\n value == null ?\n maybeDirect(element, value, 'style') :\n direct(element.style, value, 'cssText')\n);\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @param {string} name\n * @returns {T}\n */\nexport const toggle = (element, value, name) => (\n element.toggleAttribute(name.slice(1), value),\n value\n);\n\n/**\n * @param {Node} node\n * @param {Node[]} value\n * @param {string} _\n * @param {Node[]} prev\n * @returns {Node[]}\n */\nexport const array = (node, value, prev) => {\n // normal diff\n const { length } = value;\n node.data = `[${length}]`;\n if (length)\n return udomdiff(node.parentNode, prev, value, diffFragment, node);\n /* c8 ignore start */\n switch (prev.length) {\n case 1:\n prev[0].remove();\n case 0:\n break;\n default:\n drop(\n diffFragment(prev[0], 0),\n diffFragment(prev.at(-1), -0),\n false\n );\n break;\n }\n /* c8 ignore stop */\n return empty;\n};\n\nexport const attr = new Map([\n ['aria', aria],\n ['class', className],\n ['data', data],\n ['ref', ref],\n ['style', style],\n]);\n\n/**\n * @param {HTMLElement | SVGElement} element\n * @param {string} name\n * @param {boolean} svg\n * @returns\n */\nexport const attribute = (element, name, svg) => {\n switch (name[0]) {\n case '.': return dot;\n case '?': return toggle;\n case '@': return at;\n default: return (\n svg || ('ownerSVGElement' in element) ?\n (name === 'ref' ? ref : regular) :\n (attr.get(name) || (\n name in element ?\n (name.startsWith('on') ?\n direct :\n (gPD(element, name)?.set ? maybeDirect : regular)\n ) :\n regular\n )\n )\n );\n }\n};\n\n/**\n * @template T\n * @param {Element} element\n * @param {T} value\n * @returns {T}\n */\nexport const text = (element, value) => (\n (element.textContent = value == null ? '' : value),\n value\n);\n","/**\n * ISC License\n *\n * Copyright (c) 2020, Andrea Giammarchi, @WebReflection\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n * PERFORMANCE OF THIS SOFTWARE.\n */\n\n/**\n * @param {Node} parentNode The container where children live\n * @param {Node[]} a The list of current/live children\n * @param {Node[]} b The list of future children\n * @param {(entry: Node, action: number) => Node} get\n * The callback invoked per each entry related DOM operation.\n * @param {Node} [before] The optional node used as anchor to insert before.\n * @returns {Node[]} The same list of future children.\n */\nexport default (parentNode, a, b, get, before) => {\n const bLength = b.length;\n let aEnd = a.length;\n let bEnd = bLength;\n let aStart = 0;\n let bStart = 0;\n let map = null;\n while (aStart < aEnd || bStart < bEnd) {\n // append head, tail, or nodes in between: fast path\n if (aEnd === aStart) {\n // we could be in a situation where the rest of nodes that\n // need to be added are not at the end, and in such case\n // the node to `insertBefore`, if the index is more than 0\n // must be retrieved, otherwise it's gonna be the first item.\n const node = bEnd < bLength ?\n (bStart ?\n (get(b[bStart - 1], -0).nextSibling) :\n get(b[bEnd], 0)) :\n before;\n while (bStart < bEnd)\n parentNode.insertBefore(get(b[bStart++], 1), node);\n }\n // remove head or tail: fast path\n else if (bEnd === bStart) {\n while (aStart < aEnd) {\n // remove the node only if it's unknown or not live\n if (!map || !map.has(a[aStart]))\n parentNode.removeChild(get(a[aStart], -1));\n aStart++;\n }\n }\n // same node: fast path\n else if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n }\n // same tail: fast path\n else if (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n }\n // The once here single last swap \"fast path\" has been removed in v1.1.0\n // https://github.com/WebReflection/udomdiff/blob/single-final-swap/esm/index.js#L69-L85\n // reverse swap: also fast path\n else if (\n a[aStart] === b[bEnd - 1] &&\n b[bStart] === a[aEnd - 1]\n ) {\n // this is a \"shrink\" operation that could happen in these cases:\n // [1, 2, 3, 4, 5]\n // [1, 4, 3, 2, 5]\n // or asymmetric too\n // [1, 2, 3, 4, 5]\n // [1, 2, 3, 5, 6, 4]\n const node = get(a[--aEnd], -0).nextSibling;\n parentNode.insertBefore(\n get(b[bStart++], 1),\n get(a[aStart++], -0).nextSibling\n );\n parentNode.insertBefore(get(b[--bEnd], 1), node);\n // mark the future index as identical (yeah, it's dirty, but cheap 👍)\n // The main reason to do this, is that when a[aEnd] will be reached,\n // the loop will likely be on the fast path, as identical to b[bEnd].\n // In the best case scenario, the next loop will skip the tail,\n // but in the worst one, this node will be considered as already\n // processed, bailing out pretty quickly from the map index check\n a[aEnd] = b[bEnd];\n }\n // map based fallback, \"slow\" path\n else {\n // the map requires an O(bEnd - bStart) operation once\n // to store all future nodes indexes for later purposes.\n // In the worst case scenario, this is a full O(N) cost,\n // and such scenario happens at least when all nodes are different,\n // but also if both first and last items of the lists are different\n if (!map) {\n map = new Map;\n let i = bStart;\n while (i < bEnd)\n map.set(b[i], i++);\n }\n // if it's a future node, hence it needs some handling\n if (map.has(a[aStart])) {\n // grab the index of such node, 'cause it might have been processed\n const index = map.get(a[aStart]);\n // if it's not already processed, look on demand for the next LCS\n if (bStart < index && index < bEnd) {\n let i = aStart;\n // counts the amount of nodes that are the same in the future\n let sequence = 1;\n while (++i < aEnd && i < bEnd && map.get(a[i]) === (index + sequence))\n sequence++;\n // effort decision here: if the sequence is longer than replaces\n // needed to reach such sequence, which would brings again this loop\n // to the fast path, prepend the difference before a sequence,\n // and move only the future list index forward, so that aStart\n // and bStart will be aligned again, hence on the fast path.\n // An example considering aStart and bStart are both 0:\n // a: [1, 2, 3, 4]\n // b: [7, 1, 2, 3, 6]\n // this would place 7 before 1 and, from that time on, 1, 2, and 3\n // will be processed at zero cost\n if (sequence > (index - bStart)) {\n const node = get(a[aStart], 0);\n while (bStart < index)\n parentNode.insertBefore(get(b[bStart++], 1), node);\n }\n // if the effort wasn't good enough, fallback to a replace,\n // moving both source and target indexes forward, hoping that some\n // similar node will be found later on, to go back to the fast path\n else {\n parentNode.replaceChild(\n get(b[bStart++], 1),\n get(a[aStart++], -1)\n );\n }\n }\n // otherwise move the source forward, 'cause there's nothing to do\n else\n aStart++;\n }\n // this node has no meaning in the future list, so it's more than safe\n // to remove it, and check the next live node out instead, meaning\n // that only the live list index should be forwarded\n else\n parentNode.removeChild(get(a[aStart++], -1));\n }\n }\n return b;\n};\n","import { empty } from './utils.js';\n\n/** @typedef {import(\"./persistent-fragment.js\").PersistentFragment} PersistentFragment */\n/** @typedef {import(\"./rabbit.js\").Hole} Hole */\n\n/** @typedef {unknown} Value */\n/** @typedef {Node | Element | PersistentFragment} Target */\n/** @typedef {null | undefined | string | number | boolean | Node | Element | PersistentFragment} DOMValue */\n/** @typedef {Hole | Node} ArrayValue */\n\nexport const abc = (a, b, c) => ({ a, b, c });\n\nexport const bc = (b, c) => ({ b, c });\n\n/**\n * @typedef {Object} Detail\n * @property {any} v the current value of the interpolation / hole\n * @property {function} u the callback to update the value\n * @property {Node} t the target comment node or element\n * @property {string | null | Node} n the attribute name, if any, or `null`\n * @property {Cache | ArrayValue[] | null} c the cache value for this detail\n */\n\n/**\n * @returns {Detail}\n */\nexport const detail = (u, t, n, c) => ({ v: empty, u, t, n, c });\n\n/**\n * @typedef {Object} Entry\n * @property {number[]} a the path to retrieve the node\n * @property {function} b the update function\n * @property {string | null} c the attribute name, if any, or `null`\n */\n\n/**\n * @typedef {Object} Cache\n * @property {null | TemplateStringsArray} a the cached template\n * @property {null | Node | PersistentFragment} b the node returned when parsing the template\n * @property {Detail[]} c the list of updates to perform\n */\n\n/**\n * @returns {Cache}\n */\nexport const cache = () => abc(null, null, empty);\n","import { PersistentFragment } from './persistent-fragment.js';\nimport { bc, detail } from './literals.js';\nimport { array, hole } from './handler.js';\nimport { empty, find } from './utils.js';\nimport { cache } from './literals.js';\n\n/** @param {(template: TemplateStringsArray, values: any[]) => import(\"./parser.js\").Resolved} parse */\nexport default parse => (\n /**\n * @param {TemplateStringsArray} template\n * @param {any[]} values\n * @returns {import(\"./literals.js\").Cache}\n */\n (template, values) => {\n const { a: fragment, b: entries, c: direct } = parse(template, values);\n const root = document.importNode(fragment, true);\n /** @type {import(\"./literals.js\").Detail[]} */\n let details = empty;\n if (entries !== empty) {\n details = [];\n for (let current, prev, i = 0; i < entries.length; i++) {\n const { a: path, b: update, c: name } = entries[i];\n const node = path === prev ? current : (current = find(root, (prev = path)));\n details[i] = detail(\n update,\n node,\n name,\n update === array ? [] : (update === hole ? cache() : null)\n );\n }\n }\n return bc(\n direct ? root.firstChild : new PersistentFragment(root),\n details,\n );\n }\n);\n","export const TEXT_ELEMENTS = /^(?:plaintext|script|style|textarea|title|xmp)$/i;\nexport const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;\n","import { VOID_ELEMENTS } from 'domconstants/re';\n\nconst elements = /<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\\/?)>/g;\nconst attributes = /([^\\s\\\\>\"'=]+)\\s*=\\s*(['\"]?)\\x01/g;\nconst holes = /[\\x01\\x02]/g;\n\n// \\x01 Node.ELEMENT_NODE\n// \\x02 Node.ATTRIBUTE_NODE\n\n/**\n * Given a template, find holes as both nodes and attributes and\n * return a string with holes as either comment nodes or named attributes.\n * @param {string[]} template a template literal tag array\n * @param {string} prefix prefix to use per each comment/attribute\n * @param {boolean} xml enforces self-closing tags\n * @returns {string} X/HTML with prefixed comments or attributes\n */\nexport default (template, prefix, xml) => {\n let i = 0;\n return template\n .join('\\x01')\n .trim()\n .replace(\n elements,\n (_, name, attrs, selfClosing) => `<${\n name\n }${\n attrs.replace(attributes, '\\x02=$2$1').trimEnd()\n }${\n selfClosing ? (\n (xml || VOID_ELEMENTS.test(name)) ? ' /' : `></${name}`\n ) : ''\n }>`\n )\n .replace(\n holes,\n hole => hole === '\\x01' ? `<!--${prefix + i++}-->` : (prefix + i++)\n )\n ;\n};\n","import { SVG_NAMESPACE, newRange } from './utils.js';\n\nlet template = document.createElement('template'), svg, range;\n\n/**\n * @param {string} text\n * @param {boolean} xml\n * @returns {DocumentFragment}\n */\nexport default (text, xml) => {\n if (xml) {\n if (!svg) {\n svg = document.createElementNS(SVG_NAMESPACE, 'svg');\n range = newRange();\n range.selectNodeContents(svg);\n }\n return range.createContextualFragment(text);\n }\n template.innerHTML = text;\n const { content } = template;\n template = template.cloneNode(false);\n return content;\n};\n","import { COMMENT_NODE, ELEMENT_NODE } from 'domconstants/constants';\nimport { TEXT_ELEMENTS } from 'domconstants/re';\nimport parser from '@webreflection/uparser';\n\nimport { empty, isArray, set } from './utils.js';\nimport { abc } from './literals.js';\n\nimport { array, attribute, hole, text, removeAttribute } from './handler.js';\nimport createContent from './create-content.js';\n\n/** @typedef {import(\"./literals.js\").Entry} Entry */\n\n/**\n * @typedef {Object} Resolved\n * @param {DocumentFragment} f content retrieved from the template\n * @param {Entry[]} e entries per each hole in the template\n * @param {boolean} d direct node to handle\n */\n\n/**\n * @param {Element} node\n * @returns {number[]}\n */\nconst createPath = node => {\n const path = [];\n let parentNode;\n while ((parentNode = node.parentNode)) {\n path.push(path.indexOf.call(parentNode.childNodes, node));\n node = parentNode;\n }\n return path;\n};\n\nconst textNode = () => document.createTextNode('');\n\n/**\n * @param {TemplateStringsArray} template\n * @param {boolean} xml\n * @returns {Resolved}\n */\nconst resolve = (template, values, xml) => {\n const content = createContent(parser(template, prefix, xml), xml);\n const { length } = template;\n let entries = empty;\n if (length > 1) {\n const replace = [];\n const tw = document.createTreeWalker(content, 1 | 128);\n let i = 0, search = `${prefix}${i++}`;\n entries = [];\n while (i < length) {\n const node = tw.nextNode();\n // these are holes or arrays\n if (node.nodeType === COMMENT_NODE) {\n if (node.data === search) {\n // ⚠️ once array, always array!\n const update = isArray(values[i - 1]) ? array : hole;\n if (update === hole) replace.push(node);\n entries.push(abc(createPath(node), update, null));\n search = `${prefix}${i++}`;\n }\n }\n else {\n let path;\n // these are attributes\n while (node.hasAttribute(search)) {\n if (!path) path = createPath(node);\n const name = node.getAttribute(search);\n entries.push(abc(path, attribute(node, name, xml), name));\n removeAttribute(node, search);\n search = `${prefix}${i++}`;\n }\n // these are special text-only nodes\n if (\n !xml &&\n TEXT_ELEMENTS.test(node.localName) &&\n node.textContent.trim() === `<!--${search}-->`\n ) {\n entries.push(abc(path || createPath(node), text, null));\n search = `${prefix}${i++}`;\n }\n }\n }\n // can't replace holes on the fly or the tree walker fails\n for (i = 0; i < replace.length; i++)\n replace[i].replaceWith(textNode());\n }\n\n // need to decide if there should be a persistent fragment\n const { childNodes } = content;\n let { length: len } = childNodes;\n\n // html`` or svg`` to signal an empty content\n // these nodes can be passed directly as never mutated\n if (len < 1) {\n len = 1;\n content.appendChild(textNode());\n }\n // html`${'b'}` or svg`${[]}` cases\n else if (\n len === 1 &&\n // ignore html`static` or svg`static` because\n // these nodes can be passed directly as never mutated\n length !== 1 &&\n childNodes[0].nodeType !== ELEMENT_NODE\n ) {\n // use a persistent fragment for these cases too\n len = 0;\n }\n\n return set(cache, template, abc(content, entries, len === 1));\n};\n\n/** @type {WeakMap<TemplateStringsArray, Resolved>} */\nconst cache = new WeakMap;\nconst prefix = 'isµ';\n\n/**\n * @param {boolean} xml\n * @returns {(template: TemplateStringsArray, values: any[]) => Resolved}\n */\nexport default xml => (template, values) => cache.get(template) || resolve(template, values, xml);\n","import { array, hole } from './handler.js';\nimport { cache } from './literals.js';\nimport create from './creator.js';\nimport parser from './parser.js';\n\nconst createHTML = create(parser(false));\nconst createSVG = create(parser(true));\n\n/**\n * @param {import(\"./literals.js\").Cache} info\n * @param {Hole} hole\n * @returns {Node}\n */\nconst unroll = (info, { s, t, v }) => {\n if (info.a !== t) {\n const { b, c } = (s ? createSVG : createHTML)(t, v);\n info.a = t;\n info.b = b;\n info.c = c;\n }\n for (let { c } = info, i = 0; i < c.length; i++) {\n const value = v[i];\n const detail = c[i];\n switch (detail.u) {\n case array:\n detail.v = array(\n detail.t,\n unrollValues(detail.c, value),\n detail.v\n );\n break;\n case hole:\n const current = value instanceof Hole ?\n unroll(detail.c || (detail.c = cache()), value) :\n (detail.c = null, value)\n ;\n if (current !== detail.v)\n detail.v = hole(detail, current);\n break;\n default:\n if (value !== detail.v)\n detail.v = detail.u(detail.t, value, detail.n, detail.v);\n break;\n }\n }\n return info.b;\n};\n\n/**\n * @param {Cache} cache\n * @param {any[]} values\n * @returns {number}\n */\nconst unrollValues = (stack, values) => {\n let i = 0, { length } = values;\n if (length < stack.length) stack.splice(length);\n for (; i < length; i++) {\n const value = values[i];\n if (value instanceof Hole)\n values[i] = unroll(stack[i] || (stack[i] = cache()), value);\n else stack[i] = null;\n }\n return values;\n};\n\n/**\n * Holds all details needed to render the content on a render.\n * @constructor\n * @param {boolean} svg The content type.\n * @param {TemplateStringsArray} template The template literals used to the define the content.\n * @param {any[]} values Zero, one, or more interpolated values to render.\n */\nexport class Hole {\n constructor(svg, template, values) {\n this.s = svg;\n this.t = template;\n this.v = values;\n }\n toDOM(info = cache()) {\n return unroll(info, this);\n }\n};\n","/*! (c) Andrea Giammarchi - MIT */\nimport { Hole } from './rabbit.js';\nimport { attr } from './handler.js';\n\nimport render from './render/hole.js';\n\n/** @typedef {import(\"./literals.js\").Value} Value */\n\nconst tag = svg => (template, ...values) => new Hole(svg, template, values);\n\n/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render HTML content. */\nexport const html = tag(false);\n\n/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render SVG content. */\nexport const svg = tag(true);\n\nexport { Hole, render, attr };\n","import { Hole } from '../rabbit.js';\nimport { cache } from '../literals.js';\nimport { set } from '../utils.js';\n\n/** @type {WeakMap<Element | DocumentFragment, import(\"../literals.js\").Cache>} */\nconst known = new WeakMap;\n\n/**\n * Render with smart updates within a generic container.\n * @template T\n * @param {T} where the DOM node where to render content\n * @param {(() => Hole) | Hole} what the hole to render\n * @param {boolean} check does a `typeof` check (internal usage).\n * @returns\n */\nexport default (where, what, check) => {\n const info = known.get(where) || set(known, where, cache());\n const { b } = info;\n const hole = (check && typeof what === 'function') ? what() : what;\n const node = hole instanceof Hole ? hole.toDOM(info) : hole;\n if (b !== node)\n where.replaceChildren((info.b = node).valueOf());\n return where;\n};\n","/*! (c) Andrea Giammarchi - MIT */\nimport { Hole } from './rabbit.js';\nimport { attr } from './handler.js';\nimport { cache } from './literals.js';\nimport { set } from './utils.js';\nimport { html, svg } from './index.js';\n\nimport render from './render/keyed.js';\n\n/** @typedef {import(\"./literals.js\").Cache} Cache */\n/** @typedef {import(\"./literals.js\").Target} Target */\n/** @typedef {import(\"./literals.js\").Value} Value */\n\n/** @typedef {(ref:Object, key:string | number) => Tag} Bound */\n\n/**\n * @callback Tag\n * @param {TemplateStringsArray} template\n * @param {...Value} values\n * @returns {Target}\n */\n\nconst keyed = new WeakMap;\nconst createRef = svg => /** @type {Bound} */ (ref, key) => {\n /** @type {Tag} */\n function tag(template, ...values) {\n return new Hole(svg, template, values).toDOM(this);\n }\n\n const memo = keyed.get(ref) || set(keyed, ref, new Map);\n return memo.get(key) || set(memo, key, tag.bind(cache()));\n};\n\n/** @type {Bound} Returns a bound tag to render HTML content. */\nexport const htmlFor = createRef(false);\n\n/** @type {Bound} Returns a bound tag to render SVG content. */\nexport const svgFor = createRef(true);\n\nexport { Hole, render, html, svg, attr };\n","// (c) Andrea Giammarchi - ISC\n\nconst registry = new FinalizationRegistry(\n ([onGarbageCollected, held, debug]) => {\n // \"%cThis is a green text\", \"color:green\"\n if (debug) console.debug(`%c${String(held)}`, 'font-weight:bold', 'collected');\n onGarbageCollected(held);\n }\n);\n\nconst nullHandler = Object.create(null);\n\n/**\n * @template {unknown} H\n * @typedef {Object} GCHookOptions\n * @prop {boolean} [debug=false] if `true`, logs values once these can get collected.\n * @prop {ProxyHandler<object>} [handler] optional proxy handler to use instead of the default one.\n * @prop {H} [return=H] if specified, overrides the returned proxy with its value.\n * @prop {unknown} [token=H] it's the held value by default, but it can be any other token except the returned value itself.\n */\n\n/**\n * @template {unknown} H\n * @param {H} hold the reference to hold behind the scene and passed along the callback once it triggers.\n * @param {(held:H) => void} onGarbageCollected the callback that will receive the held value once its wrapper or indirect reference is no longer needed.\n * @param {GCHookOptions<H>} [options] an optional configuration object to change some default behavior.\n */\nexport const create = (\n hold,\n onGarbageCollected,\n { debug, handler, return: r, token = hold } = nullHandler\n) => {\n // if no reference to return is defined,\n // create a proxy for the held one and register that instead.\n /** @type {H} */\n const target = r || new Proxy(hold, handler || nullHandler);\n const args = [target, [onGarbageCollected, hold, !!debug]];\n if (token !== false) args.push(token);\n // register the target reference in a way that\n // the `onGarbageCollected(held)` callback will eventually notify.\n registry.register(...args);\n return target;\n};\n\n/**\n * If previously registered as either `token` or `hold` value, allow explicit removal of the entry in the registry.\n * @param {unknown} token the token used during registration. If no `token` was passed, this can be the same `hold` reference.\n * @returns {boolean} `true` if successfully unregistered.\n */\nexport const drop = token => registry.unregister(token);\n","import { create, drop } from 'gc-hook';\n\nimport render from './shared.js';\n\n/** @typedef {import(\"../rabbit.js\").Hole} Hole */\n\n/** @type {WeakMap<Element | DocumentFragment, Function>} */\nconst effects = new WeakMap;\n\n/**\n * @param {Function} dispose\n * @returns {void}\n */\nconst onGC = dispose => dispose();\n\nlet remove = true;\n\n/**\n * @param {Function} effect the reactive `effect` callback provided by a 3rd party library.\n * @returns \n */\nexport const attach = effect => {\n /**\n * Render with smart updates within a generic container.\n * If the `what` is a function, it automatically create\n * an effect for the render function.\n * @template T\n * @param {T} where the DOM node where to render content\n * @param {(() => Hole) | Hole} what the hole to render\n * @returns {T}\n */\n return (where, what) => {\n remove = typeof what !== 'function';\n detach(where);\n\n if (remove) return render(where, what, false);\n remove = true;\n\n const wr = new WeakRef(where);\n const dispose = effect(() => { render(wr.deref(), what(), false) });\n effects.set(where, dispose);\n return create(dispose, onGC, { return: where });\n };\n};\n\n/**\n * Allow manual cleanup of subscribed signals.\n * @param {Element} where a reference container previously used to render signals.\n */\nexport const detach = where => {\n const dispose = effects.get(where);\n if (dispose) {\n if (remove) effects.delete(where);\n drop(dispose);\n dispose();\n }\n};\n","export {\n default as Signal,\n createSignal,\n effect,\n State,\n Computed\n} from 'mi-signal'\nexport * from 'uhtml/reactive'\nimport { effect } from 'mi-signal'\nimport { attach } from 'uhtml/reactive'\nexport const render = attach(effect)\n"],"names":["context","State","EventTarget","value","equals","constructor","options","super","this","nextValue","get","set","running","length","add","dispatchEvent","CustomEvent","createSignal","initialValue","effect","cb","Set","push","pop","dep","addEventListener","removeEventListener","Computed","state","unsubscribe","index","isArray","Array","getPrototypeOf","getOwnPropertyDescriptor","Object","empty","newRange","document","createRange","map","key","find","content","path","reduceRight","childNodesIndex","node","i","childNodes","setPrototypeOf","range","drop$1","firstChild","lastChild","preserve","setStartAfter","setStartBefore","setEndAfter","deleteContents","remove","drop","checkType","diffFragment","operation","nodeType","valueOf","comment","createComment","PersistentFragment","Class","Custom","target","prototype","custom","DocumentFragment","nodes","fragment","replaceChildren","parentNode","replaceWith","nextSibling","setAttribute","element","name","removeAttribute","listeners","at","slice","WeakMap","known","current","hole","detail","t","n","nullish","data","direct","ref","dot","maybeDirect","regular","toggle","toggleAttribute","array","prev","a","b","before","bLength","aEnd","bEnd","aStart","bStart","insertBefore","has","removeChild","Map","sequence","replaceChild","udomdiff","attr","$","dataset","style","attribute","svg","startsWith","prop","desc","gPD","text","textContent","abc","c","u","v","cache","create$1","parse","template","values","entries","root","importNode","details","update","TEXT_ELEMENTS","VOID_ELEMENTS","elements","attributes","holes","createElement","createContent","xml","createElementNS","selectNodeContents","createContextualFragment","innerHTML","cloneNode","createPath","indexOf","call","textNode","createTextNode","prefix","parser","join","trim","replace","_","attrs","selfClosing","trimEnd","test","tw","createTreeWalker","search","nextNode","hasAttribute","getAttribute","localName","len","appendChild","resolve","createHTML","create","createSVG","unroll","info","s","unrollValues","Hole","stack","splice","toDOM","tag","html","render$1","where","what","check","keyed","createRef","memo","bind","htmlFor","svgFor","registry","FinalizationRegistry","onGarbageCollected","held","debug","nullHandler","effects","onGC","dispose","attach","detach","render","wr","WeakRef","deref","hold","handler","return","r","token","Proxy","args","register","delete","unregister"],"mappings":"AAAA,MAAMA,EAAU,GAEhB,MAAMC,UAAcC,YAClBC,GACAC,GACA,WAAAC,CAAYF,EAAOG,GACjBC,QACA,MAAOH,OAAQA,GAAUE,GAAW,CAAA,EACpCE,MAAKL,EAASA,EAAOK,MAAKJ,EAAUA,GAAM,EAAMD,EAAOM,IAAcN,IAAUM,EACjF,CACA,SAAIN,GACF,OAAOK,KAAKE,KACd,CACA,SAAIP,CAAMM,GACRD,KAAKG,IAAIF,EACX,CACA,GAAAC,GACE,MAAME,EAAUZ,EAAQA,EAAQa,OAAS,GACzC,OAAOD,GAAWA,EAAQE,IAAIN,MAAOA,MAAKL,CAC5C,CACA,GAAAQ,CAAIF,GACFD,MAAKJ,EAAQI,MAAKL,EAAQM,KAAeD,MAAKL,EAASM,EAAWD,KAAKO,cAAc,IAAIC,YAAY,WACvG,EAGG,MAACC,EAAe,CAACC,EAAcZ,IAAYY,aAAwBjB,EAAQiB,EAAe,IAAIjB,EAAMiB,EAAcZ,GAEvH,SAASa,EAAOC,GACd,MAAMR,EAAU,IAAIS,IACpBrB,EAAQsB,KAAKV,GACb,IACEQ,GACF,CAAC,QACCpB,EAAQuB,KACV,CACA,IAAK,MAAMC,KAAOZ,EAASY,EAAIC,iBAAiB,SAAUL,GAC1D,MAAO,KACL,IAAK,MAAMI,KAAOZ,EAASY,EAAIE,oBAAoB,SAAUN,GAEjE,CAEA,MAAMO,EACJC,GACAC,GACA,WAAAxB,CAAYe,GACVZ,MAAKoB,EAAS,IAAI3B,EAAOO,MAAKqB,EAAeV,EAAO,IAAMX,M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AAWA,IAExB,IAAI7J,IAAS,EAMD,MAAC8J,GAASvM,GAUb,CAACqL,EAAOC,KAIb,GAHA7I,GAAyB,mBAAT6I,EAChBkB,GAAOnB,GAEH5I,GAAQ,OAAOgK,GAAOpB,EAAOC,GACjC7I,IAAS,EAET,MAAMiK,EAAK,IAAIC,QAAQtB,GACjBiB,EAAUtM,EAAO,KAAQyM,GAAOC,EAAGE,QAAStB,OAElD,OADAc,GAAQ5M,IAAI6L,EAAOiB,GDbD,EACpBO,EACAb,GACEE,QAAOY,UAASC,OAAQC,EAAGC,QAAQJ,GAASV,MAK9C,MAAM9I,EAAS2J,GAAK,IAAIE,MAAML,EAAMC,GAAWX,IACzCgB,EAAO,CAAC9J,EAAQ,CAAC2I,EAAoBa,IAAQX,IAKnD,OAJc,IAAVe,GAAiBE,EAAKhN,KAAK8M,GAG/BnB,GAASsB,YAAYD,GACd9J,GCAEmH,CAAO8B,EAASD,GAAM,CAAEU,OAAQ1B,KAQ9BmB,GAASnB,IACpB,MAAMiB,EAAUF,GAAQ7M,IAAI8L,GDDV4B,MCEdX,IACE7J,IAAQ2J,GAAQiB,OAAOhC,GDHX4B,ECIXX,EDJoBR,GAASwB,WAAWL,GCK7CX,MC5CSG,GAASF,GAAOvM","x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mi-html",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Signal for reactive behavior",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"signal",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git+https://github.com/commenthol/mi-element.git",
|
|
16
|
-
"directory": "packages/mi-
|
|
16
|
+
"directory": "packages/mi-html"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "commenthol <commenthol@gmail.com>",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"playwright": "^1.54.2",
|
|
59
59
|
"prettier": "^3.6.2",
|
|
60
60
|
"rimraf": "^6.0.1",
|
|
61
|
-
"rollup": "^4.46.
|
|
61
|
+
"rollup": "^4.46.3",
|
|
62
62
|
"typescript": "^5.9.2",
|
|
63
63
|
"vite": "^7.1.2",
|
|
64
64
|
"vitest": "^3.2.4"
|
package/src/index.js
CHANGED