lithent 1.2.7 → 1.3.0
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 +10 -10
- package/dist/lithent.mjs +47 -32
- package/dist/lithent.mjs.map +1 -1
- package/dist/lithent.umd.js +1 -1
- package/dist/lithent.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/examples/dist/assets/index-fa0f770b.js +2 -0
- package/examples/dist/assets/index-fa0f770b.js.map +1 -0
- package/examples/dist/index.html +1 -1
- package/helper/dist/hook/store.d.ts +1 -1
- package/helper/dist/lithentHelper.mjs +6 -6
- package/helper/dist/lithentHelper.mjs.map +1 -1
- package/helper/dist/lithentHelper.umd.js +1 -1
- package/helper/dist/lithentHelper.umd.js.map +1 -1
- package/helper/src/hook/store.ts +5 -3
- package/package.json +1 -1
- package/src/diff.ts +28 -2
- package/src/render.ts +33 -35
- package/src/types/index.ts +1 -0
- package/examples/dist/assets/index-b112434c.js +0 -2
- package/examples/dist/assets/index-b112434c.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lithentHelper.umd.js","sources":["../src/hook/state.ts","../src/hook/computed.ts","../src/hook/effect.ts","../src/hook/store.ts","../src/hook/nextTickRender.ts"],"sourcesContent":["export const state = <T>(\n value: T,\n renew: () => boolean\n): {\n value: T;\n v: T;\n} => {\n let result = value;\n\n return {\n get value() {\n return result;\n },\n get v() {\n return result;\n },\n set value(newValue: T) {\n result = newValue;\n renew();\n },\n set v(newValue: T) {\n result = newValue;\n renew();\n },\n };\n};\n","export const computed = <T>(\n value: () => T\n): {\n value: T;\n v: T;\n} => {\n let result = value;\n\n return {\n get value() {\n return result();\n },\n get v() {\n return result();\n },\n set value(_newValue: T) {\n throw new Error(`You can't change 'computed'`);\n },\n set v(_newValue: T) {\n throw new Error(`You can't change 'computed'`);\n },\n };\n};\n","import { updateCallback, mountCallback } from 'lithent';\n\nexport const effect = (\n forward: () => (() => void) | void,\n backward: () => (() => void) | void = () => {},\n dependencies: () => any[] = () => []\n) => {\n mountCallback(() => {\n forward();\n\n return backward;\n });\n\n updateCallback(() => {\n if (backward) {\n backward();\n }\n\n return forward;\n }, dependencies);\n};\n","/**\n * DataStore\n */\nconst storeGroup = new Map<string | symbol, unknown>();\nconst storeRenderList: {\n [key: string | symbol]: (() => boolean)[];\n} = {};\n\nexport const store = <T extends {}>(value: T) => {\n const storeKey = Symbol();\n storeGroup.set(storeKey, value);\n\n return (renew
|
|
1
|
+
{"version":3,"file":"lithentHelper.umd.js","sources":["../src/hook/state.ts","../src/hook/computed.ts","../src/hook/effect.ts","../src/hook/store.ts","../src/hook/nextTickRender.ts"],"sourcesContent":["export const state = <T>(\n value: T,\n renew: () => boolean\n): {\n value: T;\n v: T;\n} => {\n let result = value;\n\n return {\n get value() {\n return result;\n },\n get v() {\n return result;\n },\n set value(newValue: T) {\n result = newValue;\n renew();\n },\n set v(newValue: T) {\n result = newValue;\n renew();\n },\n };\n};\n","export const computed = <T>(\n value: () => T\n): {\n value: T;\n v: T;\n} => {\n let result = value;\n\n return {\n get value() {\n return result();\n },\n get v() {\n return result();\n },\n set value(_newValue: T) {\n throw new Error(`You can't change 'computed'`);\n },\n set v(_newValue: T) {\n throw new Error(`You can't change 'computed'`);\n },\n };\n};\n","import { updateCallback, mountCallback } from 'lithent';\n\nexport const effect = (\n forward: () => (() => void) | void,\n backward: () => (() => void) | void = () => {},\n dependencies: () => any[] = () => []\n) => {\n mountCallback(() => {\n forward();\n\n return backward;\n });\n\n updateCallback(() => {\n if (backward) {\n backward();\n }\n\n return forward;\n }, dependencies);\n};\n","/**\n * DataStore\n */\nconst storeGroup = new Map<string | symbol, unknown>();\nconst storeRenderList: {\n [key: string | symbol]: (() => boolean)[];\n} = {};\n\nexport const store = <T extends {}>(value: T) => {\n const storeKey = Symbol();\n storeGroup.set(storeKey, value);\n\n return (renew?: () => boolean) => {\n if (renew) {\n storeRenderList[storeKey] ??= [];\n storeRenderList[storeKey].push(renew);\n }\n\n return updater<T>(storeKey);\n };\n};\n\nconst updater = <T extends { [key: string | symbol]: unknown }>(\n storeKey: string | symbol\n) =>\n new Proxy(storeGroup.get(storeKey) as T, {\n get(target: T, prop: string) {\n return target[prop];\n },\n set(target, prop: keyof T, value) {\n target[prop] = value;\n const renderList = storeRenderList[storeKey];\n const trashCollections: (() => boolean)[] = [];\n\n renderList.forEach(renew => {\n if (!renew()) {\n trashCollections.push(renew);\n }\n });\n\n trashCollections.forEach(deleteTarget =>\n renderList.splice(renderList.indexOf(deleteTarget), 1)\n );\n\n return true;\n },\n });\n","import { render, WDom, nextTick } from 'lithent';\n\nexport const nextTickRender = (\n wDomMaker: () => WDom,\n wrapElement: HTMLElement | null,\n afterElement?: HTMLElement | null\n) => {\n let destroy = () => {};\n\n nextTick().then(() => {\n destroy = render(wDomMaker(), wrapElement, afterElement);\n });\n\n return () => destroy();\n};\n"],"names":["state","value","renew","result","newValue","computed","_newValue","effect","forward","backward","dependencies","mountCallback","updateCallback","storeGroup","storeRenderList","store","storeKey","updater","target","prop","renderList","trashCollections","deleteTarget","nextTickRender","wDomMaker","wrapElement","afterElement","destroy","nextTick","render"],"mappings":"8QAAa,MAAAA,EAAQ,CACnBC,EACAC,IAIG,CACH,IAAIC,EAASF,EAEN,MAAA,CACL,IAAI,OAAQ,CACH,OAAAE,CACT,EACA,IAAI,GAAI,CACC,OAAAA,CACT,EACA,IAAI,MAAMC,EAAa,CACZD,EAAAC,EACHF,GACR,EACA,IAAI,EAAEE,EAAa,CACRD,EAAAC,EACHF,GACR,CAAA,CAEJ,ECzBaG,EACXJ,GAIG,CACH,IAAIE,EAASF,EAEN,MAAA,CACL,IAAI,OAAQ,CACV,OAAOE,EAAO,CAChB,EACA,IAAI,GAAI,CACN,OAAOA,EAAO,CAChB,EACA,IAAI,MAAMG,EAAc,CAChB,MAAA,IAAI,MAAM,6BAA6B,CAC/C,EACA,IAAI,EAAEA,EAAc,CACZ,MAAA,IAAI,MAAM,6BAA6B,CAC/C,CAAA,CAEJ,ECpBaC,EAAS,CACpBC,EACAC,EAAsC,IAAM,CAAC,EAC7CC,EAA4B,IAAM,KAC/B,CACHC,EAAAA,cAAc,KACJH,IAEDC,EACR,EAEDG,EAAAA,eAAe,KACTH,GACOA,IAGJD,GACNE,CAAY,CACjB,ECjBMG,MAAiB,IACjBC,EAEF,CAAA,EAESC,EAAuBd,GAAa,CAC/C,MAAMe,EAAW,SACN,OAAAH,EAAA,IAAIG,EAAUf,CAAK,EAEtBC,IACFA,IACcY,EAAAE,KAAAF,EAAAE,GAAc,IACdF,EAAAE,CAAQ,EAAE,KAAKd,CAAK,GAG/Be,EAAWD,CAAQ,EAE9B,EAEMC,EACJD,GAEA,IAAI,MAAMH,EAAW,IAAIG,CAAQ,EAAQ,CACvC,IAAIE,EAAWC,EAAc,CAC3B,OAAOD,EAAOC,CAAI,CACpB,EACA,IAAID,EAAQC,EAAelB,EAAO,CAChCiB,EAAOC,CAAI,EAAIlB,EACT,MAAAmB,EAAaN,EAAgBE,CAAQ,EACrCK,EAAsC,CAAA,EAE5C,OAAAD,EAAW,QAAiBlB,GAAA,CACrBA,KACHmB,EAAiB,KAAKnB,CAAK,CAC7B,CACD,EAEgBmB,EAAA,WACfD,EAAW,OAAOA,EAAW,QAAQE,CAAY,EAAG,CAAC,CAAA,EAGhD,EACT,CACF,CAAC,EC5CUC,EAAiB,CAC5BC,EACAC,EACAC,IACG,CACH,IAAIC,EAAU,IAAM,CAAA,EAEXC,OAAAA,EAAA,SAAA,EAAE,KAAK,IAAM,CACpBD,EAAUE,EAAAA,OAAOL,EAAa,EAAAC,EAAaC,CAAY,CAAA,CACxD,EAEM,IAAMC,EAAQ,CACvB"}
|
package/helper/src/hook/store.ts
CHANGED
|
@@ -10,9 +10,11 @@ export const store = <T extends {}>(value: T) => {
|
|
|
10
10
|
const storeKey = Symbol();
|
|
11
11
|
storeGroup.set(storeKey, value);
|
|
12
12
|
|
|
13
|
-
return (renew
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return (renew?: () => boolean) => {
|
|
14
|
+
if (renew) {
|
|
15
|
+
storeRenderList[storeKey] ??= [];
|
|
16
|
+
storeRenderList[storeKey].push(renew);
|
|
17
|
+
}
|
|
16
18
|
|
|
17
19
|
return updater<T>(storeKey);
|
|
18
20
|
};
|
package/package.json
CHANGED
package/src/diff.ts
CHANGED
|
@@ -71,8 +71,8 @@ const addReRenderTypeProperty = (
|
|
|
71
71
|
const existOriginalWDom = originalWDom && originalWDom.type;
|
|
72
72
|
const isEmptyElement = checkEmptyElement(newWDom);
|
|
73
73
|
const isRoot = newWDom.isRoot;
|
|
74
|
-
const
|
|
75
|
-
|
|
74
|
+
const originalParentWDom = originalWDom && getParent(originalWDom);
|
|
75
|
+
const origParentType = !isRoot && originalParentWDom?.type;
|
|
76
76
|
const key = getKey(newWDom);
|
|
77
77
|
const isKeyCheckedWDom = origParentType === 'loop' && checkExisty(key);
|
|
78
78
|
const isSameText =
|
|
@@ -93,9 +93,35 @@ const addReRenderTypeProperty = (
|
|
|
93
93
|
result = isKeyCheckedWDom ? 'SR' : 'R';
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
if (
|
|
97
|
+
newWDom.type === 'loop' &&
|
|
98
|
+
result === 'U' &&
|
|
99
|
+
originalWDom &&
|
|
100
|
+
chkDiffLoopOrder(newWDom, originalWDom)
|
|
101
|
+
) {
|
|
102
|
+
result = 'CNSU';
|
|
103
|
+
}
|
|
104
|
+
|
|
96
105
|
return result;
|
|
97
106
|
};
|
|
98
107
|
|
|
108
|
+
const chkDiffLoopOrder = (newWDom: WDom, originalWDom: WDom) => {
|
|
109
|
+
const origChildren = [...(originalWDom?.children || [])];
|
|
110
|
+
const newChildren = [...(newWDom?.children || [])];
|
|
111
|
+
const filteredChildren = origChildren.filter(item =>
|
|
112
|
+
newChildren.find(newItem => getKey(item) === getKey(newItem))
|
|
113
|
+
);
|
|
114
|
+
let isSame = filteredChildren.length === newChildren.length;
|
|
115
|
+
|
|
116
|
+
if (isSame) {
|
|
117
|
+
isSame = filteredChildren.every(
|
|
118
|
+
(item, index) => getKey(item) === getKey(newChildren[index])
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return isSame;
|
|
123
|
+
};
|
|
124
|
+
|
|
99
125
|
const updateProps = (props: Props, infoProps: Props) => {
|
|
100
126
|
if (props && infoProps !== props) {
|
|
101
127
|
keys(props).forEach(key => delete props[key]);
|
package/src/render.ts
CHANGED
|
@@ -63,6 +63,7 @@ export const wDomUpdate = (newWDomTree: WDom) => {
|
|
|
63
63
|
D: typeDelete,
|
|
64
64
|
R: typeReplace,
|
|
65
65
|
U: typeUpdate,
|
|
66
|
+
CNSU: typeUpdate,
|
|
66
67
|
SR: typeSortedReplace,
|
|
67
68
|
SU: typeSortedUpdate,
|
|
68
69
|
})[needRerender](newWDomTree);
|
|
@@ -124,19 +125,21 @@ const typeSortedReplace = (newWDom: WDom) => {
|
|
|
124
125
|
const typeSortedUpdate = (newWDom: WDom) => {
|
|
125
126
|
typeUpdate(newWDom);
|
|
126
127
|
|
|
127
|
-
const newElement = getElementFromFragment(newWDom);
|
|
128
128
|
const parentWDom = getParent(newWDom);
|
|
129
|
-
if (parentWDom.
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
if (parentWDom.needRerender !== 'CNSU') {
|
|
130
|
+
const newElement = getElementFromFragment(newWDom);
|
|
131
|
+
if (parentWDom.type) {
|
|
132
|
+
const parentEl = findRealParentElement(parentWDom);
|
|
133
|
+
const nextEl = parentWDom.needRerender
|
|
134
|
+
? startFindNextBrotherElement(parentWDom, getParent(parentWDom))
|
|
135
|
+
: startFindNextBrotherElement(newWDom, parentWDom);
|
|
136
|
+
|
|
137
|
+
if (newElement && parentEl) {
|
|
138
|
+
if (nextEl) {
|
|
139
|
+
parentEl.insertBefore(newElement, nextEl);
|
|
140
|
+
} else {
|
|
141
|
+
parentEl.appendChild(newElement);
|
|
142
|
+
}
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
}
|
|
@@ -336,14 +339,11 @@ const updateProps = (
|
|
|
336
339
|
[chkRemoveProp, dataValue] = makeAttrDataValue(dataValue);
|
|
337
340
|
|
|
338
341
|
if (chkRemoveProp) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
} else {
|
|
345
|
-
setAttr(newDataKey, element as HTMLElement, dataValue as string);
|
|
346
|
-
}
|
|
342
|
+
setAttr(
|
|
343
|
+
getAttrKey(dataKey),
|
|
344
|
+
element as HTMLElement,
|
|
345
|
+
dataValue as string
|
|
346
|
+
);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
|
|
@@ -457,21 +457,19 @@ const updateStyle = (
|
|
|
457
457
|
oldStyle: Record<string, string>,
|
|
458
458
|
element?: HTMLElement | Element | DocumentFragment | Text
|
|
459
459
|
) => {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
});
|
|
460
|
+
const originalStyle = { ...oldStyle };
|
|
461
|
+
const elementStyle = (element as HTMLElement)?.style;
|
|
462
|
+
|
|
463
|
+
if (elementStyle) {
|
|
464
|
+
entries(style).forEach(([styleKey, dataValue]) => {
|
|
465
|
+
(elementStyle as any)[styleKey] = dataValue;
|
|
466
|
+
delete originalStyle[styleKey];
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
entries(originalStyle).forEach(
|
|
470
|
+
([styleKey]) => ((elementStyle as any)[styleKey] = '')
|
|
471
|
+
);
|
|
472
|
+
}
|
|
475
473
|
};
|
|
476
474
|
|
|
477
475
|
const findRealParentElement = (
|
package/src/types/index.ts
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const s of c)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(c){const s={};return c.integrity&&(s.integrity=c.integrity),c.referrerPolicy&&(s.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?s.credentials="include":c.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(c){if(c.ep)return;c.ep=!0;const s=n(c);fetch(c.href,s)}})();const k=e=>typeof e=="object"&&!("resolve"in e),x=(e,t)=>k(e)&&e.type===t,xe=(e,t)=>"ctor"in e?e.ctor===(t==null?void 0:t.ctor):e===(t==null?void 0:t.ctor),be=(e,t)=>{var n,o;return k(e)&&(t==null?void 0:t.type)==="fragment"&&((n=t==null?void 0:t.children)==null?void 0:n.length)===((o=e==null?void 0:e.children)==null?void 0:o.length)},Se=(e,t)=>{var n,o;return k(e)&&(t==null?void 0:t.type)==="element"&&(t==null?void 0:t.tag)===e.tag&&((n=t==null?void 0:t.children)==null?void 0:n.length)===((o=e==null?void 0:e.children)==null?void 0:o.length)},B=(e,t)=>k(e)&&(t==null?void 0:t.type)===e.type&&(e.type!=="loop"||e.type==="loop"&&E(h((e.children||[])[0]))&&E(h((t.children||[])[0]))),h=e=>{var t,n;return((t=e==null?void 0:e.compProps)==null?void 0:t.key)??((n=e==null?void 0:e.props)==null?void 0:n.key)},y=e=>e&&["fragment","loop"].includes(e),N=e=>typeof e=="function"&&!Z(e)||typeof e=="object"&&"resolve"in e,Z=e=>typeof e=="function"&&e===M,K=e=>k(e)&&!e.type,E=e=>e!=null,J=(e,t)=>e==="style"&&typeof t=="object",Te=(e,t)=>e==="ref"&&typeof t=="object",Ne=e=>e.nodeType===1&&e.tagName==="OPTION",Fe=e=>e.nodeType===1&&e.tagName==="TEXTAREA",Ue=e=>e.nodeType===1&&["radio","checkbox"].includes(e.type),_e=e=>{let t="et";return N(e)?t="c":x(e,"fragment")?t="f":x(e,"element")?t="e":x(e,"loop")?t="l":x(e,"text")?t="t":K(e)&&(t="et"),t},Ae={c:xe,l:B,t:B,e:Se,f:be,et:B},v=e=>e.getParent&&e.getParent(),g=Object.entries,w=Object.keys,F=Object.assign,C={value:""},R={value:{}},Q={value:!1},i=new WeakMap,Oe=e=>{i.set(e,{vd:{value:null},up:()=>{},upR:[],upS:{value:0},upD:[],upCB:[],mts:[],umts:[]})},m=()=>R.value,D=(e,t)=>i.get(e)[t],Me=e=>R.value=e,Le=e=>{R.value=e,Oe(e)},Ie=e=>{i.get(m()).umts.push(e)},U=e=>{const{compKey:t}=e;t&&Be(t),W(e)},W=e=>{(e.children||[]).forEach(t=>{t.compKey?U(t):W(t)})},Be=e=>{const t=i.get(e);t&&(t.umts.forEach(n=>n()),t.umts=[],i.delete(e))};let q=[];const Y=()=>{q.forEach(e=>qe(e)),q=[]},Qe=e=>{e.compKey&&q.push(e)},ee=e=>i.get(m()).mts.push(e),qe=e=>{const{compKey:t}=e;if(t){const n=i.get(t),o=n==null?void 0:n.mts,c=n==null?void 0:n.upS;R.value=t,c&&(c.value=0),o&&(n.mts=[],o.forEach(s=>{const r=s();r&&Ie(r)}))}},X=(e,t=()=>[])=>{const n=i.get(m()),{upD:o,upS:c}=n,s=o[c.value];if(s&&je(s,t())){const r=e();r&&n.upCB.push(r)}o[c.value]=t(),c.value+=1},Ve=e=>{const{compKey:t}=e;if(t){const n=i.get(t),o=n==null?void 0:n.upCB,c=n==null?void 0:n.upS;R.value=t,c&&(c.value=0),e.ctor&&o&&(n.upCB=[],o.forEach(s=>s()))}},je=(e,t)=>e.length?e.some((n,o)=>n!==t[o]):!0,Ye=e=>e==="className"?"class":e,te=e=>e.replace(/^on(.*)/,(t,n)=>n.toLowerCase()),z=()=>new DocumentFragment,$=e=>document.createElement(e),ze=(e,t,n)=>{t??(t=document.body),e.isRoot=!0,e.wrapElement=t;const o=A(e);return n?(e.afterElement=n,t.insertBefore(o,n)):t.appendChild(o),Y(),()=>{var c;const s=(c=i.get(e.compProps||{}))==null?void 0:c.vd.value;s&&(U(s),_(s),Ge(s))}},ne=e=>{const{needRerender:t}=e;t&&t!=="N"&&({A:le,D:G,R:Xe,U:de,SR:se,SU:Je}[t](e),delete e.needRerender)},_=e=>{e.props&&e.el&&ie(e.props,e.el),(e.children||[]).forEach(t=>{_(t)})},Ge=e=>{oe(e,e.wrapElement)},G=e=>{e.oldProps&&e.el&&ie(e.oldProps,e.el),oe(e,P(v(e)))},oe=(e,t)=>{var n,o;t&&e.el&&(((n=e.el)==null?void 0:n.nodeType)===1?t.removeChild(e.el):((o=e.el)==null?void 0:o.nodeType)===11&&ce(e,t),delete e.el)},ce=(e,t)=>{((e==null?void 0:e.oldChildren)||(e==null?void 0:e.children)||[]).forEach(n=>{var o,c;((o=n.el)==null?void 0:o.nodeType)===1?t.removeChild(n==null?void 0:n.el):((c=n.el)==null?void 0:c.nodeType)===11&&ce(n,t)})},se=e=>{G(e),le(e)},Je=e=>{de(e);const t=re(e),n=v(e);if(n.type){const o=P(n),c=n.needRerender?T(n,v(n)):T(e,n);t&&o&&(c?o.insertBefore(t,c):o.appendChild(t))}},re=e=>y(e.type)?((e==null?void 0:e.children)||[]).reduce((t,n)=>{const o=re(n);return o&&t.appendChild(o),t},z()):e.el,le=e=>{const t=A(e),n=v(e);if(n.type){const o=P(n),c=T(e,n);o&&(c?o.insertBefore(t,c):o.appendChild(t),Y())}},T=(e,t)=>{const n=t.children||[],c=n.indexOf(e)+1,s=n.slice(c),r=ue(s),u=t.type||"";if(r)return r;if(!t.isRoot&&y(u))return T(t,v(t));if(t.isRoot&&y(u)&&t.afterElement)return t.afterElement},ue=e=>e.reduce((t,n)=>{const o=n.type,c=n.el,s=o&&y(o);return t||(s?ue(n.children||[]):c&&c.nodeType!==11?c:t)},void 0),Xe=e=>{const t=v(e),n=e.el;if(t.type&&n)if(n.nodeType===11)se(e);else{const o=P(t),c=A(e);o&&o.replaceChild(c,n),Y()}},ie=(e,t)=>{g(e||{}).forEach(([n,o])=>{n.match(/^on/)&&t.removeEventListener(te(n),o)})},de=e=>{var t;const n=e.el;if(e.type==="text"){$e(e);return}if(n){const{oldProps:o,props:c}=e;fe(c,n,o),delete e.oldProps,e.tag==="input"&&(n.value=String(((t=e==null?void 0:e.props)==null?void 0:t.value)||""))}(e.children||[]).forEach(o=>ne(o)),Ve(e)},$e=e=>{const t=e.el;t&&(t.nodeValue=String(e.text))},fe=(e,t,n)=>{const o={...n};g(e||{}).forEach(([c,s])=>{let r=!0;if(c!=="key"){if(c==="innerHTML"&&typeof s=="string")t.innerHTML=s;else if(J(c,s))we(s,J(c,o.style)?o.style:{},t);else if(Te(c,s))s.value=t;else if(c.match(/^on/))Ke(t,c,s,o[c]);else if(Ue(t)&&c==="checked")t.checked=!!s;else if(Fe(t)&&c==="value")t.value=s;else if(Ne(t)&&c==="selected")t.selected=!!s;else if(c&&([r,s]=He(s),r)){const u=Ye(c);u==="class"?setTimeout(()=>{H(u,t,s)}):H(u,t,s)}}r&&delete o[c]}),w(o).forEach(c=>t.removeAttribute(c))},H=(e,t,n)=>{C.value&&e!=="xmlns"?t.setAttributeNS(null,e,n):t.setAttribute(e,n)},He=e=>{let t=!0;return typeof e=="boolean"&&(e||(t=!1),e=""),[t,String(e)]},A=e=>{let t;const{type:n,tag:o,text:c,props:s,children:r=[]}=e,u=y(n);return o==="svg"&&(C.value=String(s==null?void 0:s.xmlns)),u?t=z():n==="element"&&o?t=C.value?document.createElementNS(C.value,o):$(o):n==="text"&&E(c)?t=document.createTextNode(String(c)):t=$("e"),Ze(r,t),fe(s,t),e.el=t,Qe(e),o==="svg"&&(C.value=""),t},Ze=(e,t)=>{const n=e.reduce((o,c)=>(c.type&&o.appendChild(A(c)),o),z());t&&n.hasChildNodes()&&t.appendChild(n)},Ke=(e,t,n,o)=>{const c=te(t);o!==n&&(o&&e.removeEventListener(c,o),n&&e.addEventListener(c,n))},we=(e,t,n)=>{setTimeout(()=>{const o={...t},c=n==null?void 0:n.style;c&&(g(e).forEach(([s,r])=>{c[s]=r,delete o[s]}),g(o).forEach(([s])=>c[s]=""))})},P=e=>{const t=y(e.type);return e.isRoot&&t?e.wrapElement:t?P(v(e)):e.el},O=(e,t)=>De(e,Ae[_e(e)](e,t),t),De=(e,t,n)=>{const o=ct(e,t,n),c=[o,t,n],s=et(...c);return o.children=st(...c),o.needRerender=s,We(o,n,s),o},We=(e,t,n)=>{n!=="A"&&t&&(e.el=t.el),n&&["D","R","SR"].includes(n)&&(t!=null&&t.compKey&&(U(t),_(t)),e.oldChildren=t==null?void 0:t.children),e.oldProps=t==null?void 0:t.props},et=(e,t,n)=>{var o;const c=n&&n.type,s=K(e),u=!e.isRoot&&n&&((o=v(n))==null?void 0:o.type),f=h(e),d=u==="loop"&&E(f),p=e.type==="text"&&t&&e.text===(n==null?void 0:n.text);let a;return s?a="D":p?a="N":c?t?a=d?"SU":"U":a=d?"SR":"R":a="A",a},tt=(e,t)=>{e&&t!==e&&(w(e).forEach(n=>delete e[n]),g(t||{}).forEach(([n,o])=>e[n]=o))},nt=(e,t)=>{e&&t!==e&&(e.splice(0,e.length),t&&t.forEach(n=>e.push(n)))},ot=(e,t)=>{const{compProps:n,compChild:o}=e,{props:c,children:s}=t;return n&&tt(n,c),o&&nt(o,s),e.reRender&&e.reRender()},ct=(e,t,n)=>N(e)?t&&n?ot(n,e):e.resolve():e,st=(e,t,n)=>t&&n?lt(e,n):rt(e),rt=e=>(e.children||[]).map(t=>F(O(t),{getParent:()=>e})),lt=(e,t)=>e.type==="loop"&&E(h((e.children||[])[0]))?ut(e,t):(e.children||[]).map((n,o)=>F(O(n,(t.children||[])[o]),{getParent:()=>e})),ut=(e,t)=>{const[n,o]=it(e,t);return o.map(c=>{U(c),_(c),G(c)}),n},it=(e,t)=>{const n=[...e.children||[]],o=[...t.children||[]];return[n.map(s=>{const r=dt(s,o),u=O(s,r);return r&&o.splice(o.indexOf(r),1),u.getParent=()=>e,u}),o]},dt=(e,t)=>t.find(n=>h(n)===h(e));let b=[],V=!1;const ae=(e,t)=>{i.get(e).up=()=>{b.push({compKey:e,exec:t}),V||(V=!0,queueMicrotask(at))}},ft=e=>()=>{var t;const n=(t=i.get(e))==null?void 0:t.up;let o=!1;return n&&(n(),o=!0),o},pe=(e,t)=>{(e.children||[]).forEach(n=>{const o=n.compKey;o&&t.push(o),pe(n,t)})},at=()=>{let e=[];b.forEach(o=>{var c,s;const r=(s=(c=i.get(o.compKey))==null?void 0:c.vd)==null?void 0:s.value;r&&pe(r,e)});const t=[],n=b.reduce((o,c)=>{const{compKey:s}=c;return e.includes(s)||t.includes(s)||(t.push(s),o.push(c)),o},[]);for(;n.length;){const o=n.shift();o&&o.exec()}b=[],V=!1},ve=(e,t=()=>[])=>{i.get(m()).upR.push(()=>X(e,t)),X(e,t)},pt=()=>{var e;const t=(e=i.get(m()))==null?void 0:e.upR;t!=null&&t.length&&t.forEach(n=>n())},M=(e,...t)=>({type:"fragment",children:t}),l=(e,t,...n)=>{const o={value:void 0},c=t||{},s=ge(o,n),r=Ct(e,c,s);return N(r)||(o.value=r),r},he=e=>(t,n)=>e,ye=(e,t,n,o)=>{var c;Q.value=!0;const s=Ce(e,t,n),r=O(s,o),{isRoot:u,getParent:f,wrapElement:d,afterElement:p}=o;if(r.getParent=f,!u&&f){const a=((c=f())==null?void 0:c.children)||[],L=a.indexOf(o);a.splice(L,1,r)}else r.isRoot=!0,r.wrapElement=d,r.afterElement=p;Q.value=!1,ne(r)},Ce=(e,t,n)=>({tagName:e.name,ctor:e,props:t,children:n,resolve:(r=t)=>{Le(r);const f=e(t,n)(ft(r),t,n),d=vt(f,r,e,t,n),p=d;return ae(r,()=>ye(e,t,n,p)),D(r,"vd").value=d,d}}),vt=(e,t,n,o,c)=>{const s=e(o);if(s.reRender)throw new Error('Avoid the case where the first element of a component is a component. Instead of "mount(()=>()=><Component />)" replace it with something like "mount(()=>()=><Fragment><Component /></Fragment>)".');return Ee(s,t,n,o,c,ht(e,t,n,o,c)),s},ht=(e,t,n,o,c)=>{const s=()=>yt(e,t,n,o,c,s);return s},yt=(e,t,n,o,c,s)=>{Me(t),pt();const r=e(o);return ae(t,()=>ye(n,o,c,r)),Ee(r,t,n,o,c,s),D(t,"vd").value=r,r},Ee=(e,t,n,o,c,s)=>{F(e,{compProps:o,compChild:c,ctor:n,tagName:n.name,compKey:t,reRender:s})},Ct=(e,t,n)=>{if(Z(e))return M(t,...n);if(N(e)){const o=Ce(e,t,n);return Q.value?o:o.resolve()}return{type:"element",tag:e,props:t,children:n}},ge=(e,t)=>t.map(n=>F(Et(n),{getParent:()=>e.value})),Et=e=>{if(e==null||e===!1)return{type:null};if(Array.isArray(e)){const t={value:void 0},o={type:"loop",children:ge(t,e)};return t.value=o,o}else if(typeof e=="string"||typeof e=="number")return{type:"text",text:e};return e},gt=e=>({value:e}),j=(e,t)=>{let n=e;return{get value(){return n},get v(){return n},set value(o){n=o,t()},set v(o){n=o,t()}}},kt=e=>{let t=e;return{get value(){return t()},get v(){return t()},set value(n){throw new Error("You can't change 'computed'")},set v(n){throw new Error("You can't change 'computed'")}}},Rt=(e,t=()=>{},n=()=>[])=>{ee(()=>(e(),t)),ve(()=>(t&&t(),e),n)},ke=new Map,S={},mt=e=>{const t=Symbol();return ke.set(t,e),n=>(S[t]??(S[t]=[]),S[t].push(n),Pt(t))},Pt=e=>new Proxy(ke.get(e),{get(t,n){return t[n]},set(t,n,o){t[n]=o;const c=S[e],s=[];return c.forEach(r=>{r()||s.push(r)}),s.forEach(r=>c.splice(c.indexOf(r),1)),!0}}),xt=he((e,t,n)=>{const o=j(1,e),c=j('"destructuring" the "props" value directly from the mount function will cause referencing issues, so if you want to use it, you need to "destructuring" it from the internal function (updater).',e),s=()=>t.parentValue,r=t.parentValue,u=kt(()=>o.v+d+t.parentValue),f=mt({text:"s",count:0})(e);let d=t.parentValue;const p=gt(null),a=()=>{o.v=o.v+1,d+=1},L=I=>{c.v=I.target.value},Re=()=>{f.count+=1,f.text+="1"},me=()=>(console.log("MOUNTED",p),()=>console.log("UNMOUNT")),Pe=()=>(console.log("UPDATE - parentValue"),()=>console.log("UPDATED"));return ee(me),ve(Pe,()=>[t.parentValue]),Rt(()=>console.log("INJECT"),()=>console.log("CLEAN_UP"),()=>[o.v]),({parentValue:I})=>l(M,null,l("div",null,l("textarea",{value:c.v,onInput:L,style:{width:"300px",height:"100px"}})),l("div",null,c.v),l("div",null,l("div",{style:{color:"blue"}},"parentValueFromRef: ",t.parentValue," (working)"),l("div",{style:{color:"blue"}},"parentValueFromFunction: ",s()," (working)"),l("div",{style:{color:"blue"}},"parentValueFromUpdaterDestructuring: ",I," (working)"),l("div",{style:{color:"red"}},"parentValueFromMounterDestructuring: ",r," (not working)")),l("div",null,l("div",{ref:p},"count: ",o.v),l("div",null,"sum: ",o.v+d+t.parentValue),l("div",null,"sum(computed): ",u.v),l("div",null,"notRefValue: ",d),l("div",null,"localStore(text): ",f.text),l("div",null,"localStore(count): ",f.count)),l("button",{onClick:a},"Increase"),l("button",{onClick:Re},"localStoreUpdate"),n)}),bt=he(e=>{const t=j(7,e),n=()=>{t.v=t.v+1},o=()=>{t.v=t.v-1};return()=>l(M,null,l(xt,{parentValue:t.v},l("button",{onClick:n},"Increase - Parent")),l("button",{onClick:o},"Decrease - Parent"))}),St=l(bt,null);ze(St,document.getElementById("root"));
|
|
2
|
-
//# sourceMappingURL=index-b112434c.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-b112434c.js","sources":["../../../dist/lithent.mjs","../../../helper/dist/lithentHelper.mjs","../../src/index.tsx"],"sourcesContent":["const checkPlainWDomType = (wDom) => typeof wDom === \"object\" && !(\"resolve\" in wDom);\nconst checkPlainType = (wDom, typeName) => checkPlainWDomType(wDom) && wDom.type === typeName;\nconst checkSameCustomComponent = (newWDom, originalWDom) => \"ctor\" in newWDom ? newWDom.ctor === (originalWDom == null ? void 0 : originalWDom.ctor) : newWDom === (originalWDom == null ? void 0 : originalWDom.ctor);\nconst checkSameFragment = (newWDom, originalWDom) => {\n var _a, _b;\n return checkPlainWDomType(newWDom) && (originalWDom == null ? void 0 : originalWDom.type) === \"fragment\" && ((_a = originalWDom == null ? void 0 : originalWDom.children) == null ? void 0 : _a.length) === ((_b = newWDom == null ? void 0 : newWDom.children) == null ? void 0 : _b.length);\n};\nconst checkSameTagElement = (newWDom, originalWDom) => {\n var _a, _b;\n return checkPlainWDomType(newWDom) && (originalWDom == null ? void 0 : originalWDom.type) === \"element\" && (originalWDom == null ? void 0 : originalWDom.tag) === newWDom.tag && ((_a = originalWDom == null ? void 0 : originalWDom.children) == null ? void 0 : _a.length) === ((_b = newWDom == null ? void 0 : newWDom.children) == null ? void 0 : _b.length);\n};\nconst checkNormalTypeElement = (newWDom, originalWDom) => checkPlainWDomType(newWDom) && (originalWDom == null ? void 0 : originalWDom.type) === newWDom.type && (newWDom.type !== \"loop\" || newWDom.type === \"loop\" && checkExisty(getKey((newWDom.children || [])[0])) && checkExisty(getKey((originalWDom.children || [])[0])));\nconst getKey = (target) => {\n var _a, _b;\n return ((_a = target == null ? void 0 : target.compProps) == null ? void 0 : _a.key) ?? ((_b = target == null ? void 0 : target.props) == null ? void 0 : _b.key);\n};\nconst checkVirtualType = (type) => type && [\"fragment\", \"loop\"].includes(type);\nconst checkCustemComponentFunction = (target) => typeof target === \"function\" && !checkFragmentFunction(target) || typeof target === \"object\" && \"resolve\" in target;\nconst checkFragmentFunction = (target) => typeof target === \"function\" && target === Fragment;\nconst checkEmptyElement = (wDom) => checkPlainWDomType(wDom) && !wDom.type;\nconst checkExisty = (value) => value !== null && value !== void 0;\nconst checkStyleData = (dataKey, dataValue) => dataKey === \"style\" && typeof dataValue === \"object\";\nconst checkRefData = (dataKey, dataValue) => dataKey === \"ref\" && typeof dataValue === \"object\";\nconst checkOptionElement = (element) => element.nodeType === 1 && element.tagName === \"OPTION\";\nconst checkTextareaElement = (element) => element.nodeType === 1 && element.tagName === \"TEXTAREA\";\nconst checkCheckableElement = (element) => element.nodeType === 1 && [\"radio\", \"checkbox\"].includes(element.type);\nconst getWDomType = (wDom) => {\n let result = \"et\";\n if (checkCustemComponentFunction(wDom)) {\n result = \"c\";\n } else if (checkPlainType(wDom, \"fragment\")) {\n result = \"f\";\n } else if (checkPlainType(wDom, \"element\")) {\n result = \"e\";\n } else if (checkPlainType(wDom, \"loop\")) {\n result = \"l\";\n } else if (checkPlainType(wDom, \"text\")) {\n result = \"t\";\n } else if (checkEmptyElement(wDom)) {\n result = \"et\";\n }\n return result;\n};\nconst checkSameWDomWithOriginal = {\n c: checkSameCustomComponent,\n l: checkNormalTypeElement,\n t: checkNormalTypeElement,\n e: checkSameTagElement,\n f: checkSameFragment,\n et: checkNormalTypeElement\n};\nconst getParent = (vDom) => vDom.getParent && vDom.getParent();\nconst entries = Object.entries;\nconst keys = Object.keys;\nconst assign = Object.assign;\nconst xmlnsRef = { value: \"\" };\nconst compKeyRef = { value: {} };\nconst needDiffRef = { value: false };\nconst componentRef = /* @__PURE__ */ new WeakMap();\nconst setComponetRef = (compKey) => {\n componentRef.set(compKey, {\n vd: { value: null },\n up: () => {\n },\n upR: [],\n upS: { value: 0 },\n upD: [],\n upCB: [],\n mts: [],\n umts: []\n });\n};\nconst getComponentKey = () => compKeyRef.value;\nconst getComponentSubInfo = (compKey, subKey) => componentRef.get(compKey)[subKey];\nconst initUpdateHookState = (compKey) => compKeyRef.value = compKey;\nconst initMountHookState = (compKey) => {\n compKeyRef.value = compKey;\n setComponetRef(compKey);\n};\nconst unmount = (effectAction) => {\n componentRef.get(getComponentKey()).umts.push(effectAction);\n};\nconst runUnmountQueueFromWDom = (newWDom) => {\n const { compKey } = newWDom;\n if (compKey) {\n removeItem(compKey);\n }\n recursiveRunUnmount(newWDom);\n};\nconst recursiveRunUnmount = (wDom) => {\n (wDom.children || []).forEach((item) => {\n const childComKey = item.compKey;\n if (childComKey) {\n runUnmountQueueFromWDom(item);\n } else {\n recursiveRunUnmount(item);\n }\n });\n};\nconst removeItem = (compKey) => {\n const subInfo = componentRef.get(compKey);\n if (subInfo) {\n subInfo.umts.forEach((effect) => effect());\n subInfo.umts = [];\n componentRef.delete(compKey);\n }\n};\nlet mountedQueue = [];\nconst execMountedQueue = () => {\n mountedQueue.forEach((item) => runMountedQueueFromWDom(item));\n mountedQueue = [];\n};\nconst addMountedQueue = (wDom) => {\n if (wDom.compKey) {\n mountedQueue.push(wDom);\n }\n};\nconst mountCallback = (effectAction) => componentRef.get(getComponentKey()).mts.push(effectAction);\nconst runMountedQueueFromWDom = (newWDom) => {\n const { compKey } = newWDom;\n if (compKey) {\n const component = componentRef.get(compKey);\n const queue = component == null ? void 0 : component.mts;\n const sequence = component == null ? void 0 : component.upS;\n compKeyRef.value = compKey;\n if (sequence) {\n sequence.value = 0;\n }\n if (queue) {\n component.mts = [];\n queue.forEach((effect) => {\n const callback = effect();\n if (callback) {\n unmount(callback);\n }\n });\n }\n }\n};\nconst useUpdated = (effectAction, dependencies = () => []) => {\n const component = componentRef.get(getComponentKey());\n const { upD, upS } = component;\n const def = upD[upS.value];\n if (def && checkNeedPushQueue(def, dependencies())) {\n const callback = effectAction();\n if (callback) {\n component.upCB.push(callback);\n }\n }\n upD[upS.value] = dependencies();\n upS.value += 1;\n};\nconst runUpdatedQueueFromWDom = (newWDom) => {\n const { compKey } = newWDom;\n if (compKey) {\n const component = componentRef.get(compKey);\n const queue = component == null ? void 0 : component.upCB;\n const sequence = component == null ? void 0 : component.upS;\n compKeyRef.value = compKey;\n if (sequence) {\n sequence.value = 0;\n }\n if (newWDom.ctor && queue) {\n component.upCB = [];\n queue.forEach((effect) => effect());\n }\n }\n};\nconst checkNeedPushQueue = (originalDefs, newDefs) => !originalDefs.length ? true : originalDefs.some((def, index) => def !== newDefs[index]);\nconst getAttrKey = (keyName) => keyName === \"className\" ? \"class\" : keyName;\nconst getEventName = (eventKey) => eventKey.replace(/^on(.*)/, (_match, p1) => p1.toLowerCase());\nconst DF = () => new DocumentFragment();\nconst CE = (t) => document.createElement(t);\nconst render = (wDom, wrapElement, afterElement) => {\n wrapElement ?? (wrapElement = document.body);\n wDom.isRoot = true;\n wDom.wrapElement = wrapElement;\n const Dom = wDomToDom(wDom);\n if (afterElement) {\n wDom.afterElement = afterElement;\n wrapElement.insertBefore(Dom, afterElement);\n } else {\n wrapElement.appendChild(Dom);\n }\n execMountedQueue();\n return () => {\n var _a;\n const component = (_a = componentRef.get(wDom.compProps || {})) == null ? void 0 : _a.vd.value;\n if (component) {\n runUnmountQueueFromWDom(component);\n recursiveRemoveEvent(component);\n rootDelete(component);\n }\n };\n};\nconst wDomUpdate = (newWDomTree) => {\n const { needRerender } = newWDomTree;\n if (needRerender && needRerender !== \"N\") {\n ({\n A: typeAdd,\n D: typeDelete,\n R: typeReplace,\n U: typeUpdate,\n SR: typeSortedReplace,\n SU: typeSortedUpdate\n })[needRerender](newWDomTree);\n delete newWDomTree.needRerender;\n }\n};\nconst recursiveRemoveEvent = (originalWDom) => {\n if (originalWDom.props && originalWDom.el) {\n removeEvent(originalWDom.props, originalWDom.el);\n }\n (originalWDom.children || []).forEach((childItem) => {\n recursiveRemoveEvent(childItem);\n });\n};\nconst rootDelete = (newWDom) => {\n deleteRealDom(newWDom, newWDom.wrapElement);\n};\nconst typeDelete = (newWDom) => {\n if (newWDom.oldProps && newWDom.el) {\n removeEvent(newWDom.oldProps, newWDom.el);\n }\n deleteRealDom(\n newWDom,\n findRealParentElement(getParent(newWDom))\n );\n};\nconst deleteRealDom = (newWDom, parent) => {\n var _a, _b;\n if (parent && newWDom.el) {\n if (((_a = newWDom.el) == null ? void 0 : _a.nodeType) === 1) {\n parent.removeChild(newWDom.el);\n } else if (((_b = newWDom.el) == null ? void 0 : _b.nodeType) === 11) {\n findChildWithRemoveElement(newWDom, parent);\n }\n delete newWDom.el;\n }\n};\nconst findChildWithRemoveElement = (newWDom, parent) => {\n ((newWDom == null ? void 0 : newWDom.oldChildren) || (newWDom == null ? void 0 : newWDom.children) || []).forEach((item) => {\n var _a, _b;\n if (((_a = item.el) == null ? void 0 : _a.nodeType) === 1) {\n parent.removeChild(item == null ? void 0 : item.el);\n } else if (((_b = item.el) == null ? void 0 : _b.nodeType) === 11) {\n findChildWithRemoveElement(item, parent);\n }\n });\n};\nconst typeSortedReplace = (newWDom) => {\n typeDelete(newWDom);\n typeAdd(newWDom);\n};\nconst typeSortedUpdate = (newWDom) => {\n typeUpdate(newWDom);\n const newElement = getElementFromFragment(newWDom);\n const parentWDom = getParent(newWDom);\n if (parentWDom.type) {\n const parentEl = findRealParentElement(parentWDom);\n const nextEl = parentWDom.needRerender ? startFindNextBrotherElement(parentWDom, getParent(parentWDom)) : startFindNextBrotherElement(newWDom, parentWDom);\n if (newElement && parentEl) {\n if (nextEl) {\n parentEl.insertBefore(newElement, nextEl);\n } else {\n parentEl.appendChild(newElement);\n }\n }\n }\n};\nconst getElementFromFragment = (newWDom) => {\n if (checkVirtualType(newWDom.type)) {\n return ((newWDom == null ? void 0 : newWDom.children) || []).reduce((acc, item) => {\n const element = getElementFromFragment(item);\n if (element) {\n acc.appendChild(element);\n }\n return acc;\n }, DF());\n }\n return newWDom.el;\n};\nconst typeAdd = (newWDom) => {\n const newElement = wDomToDom(newWDom);\n const parentWDom = getParent(newWDom);\n if (parentWDom.type) {\n const parentEl = findRealParentElement(parentWDom);\n const nextEl = startFindNextBrotherElement(newWDom, parentWDom);\n if (parentEl) {\n if (nextEl) {\n parentEl.insertBefore(newElement, nextEl);\n } else {\n parentEl.appendChild(newElement);\n }\n execMountedQueue();\n }\n }\n};\nconst startFindNextBrotherElement = (wDom, parentWDom) => {\n const brothers = parentWDom.children || [];\n const index = brothers.indexOf(wDom);\n const nextIndex = index + 1;\n const candidiateBrothers = brothers.slice(nextIndex);\n const finedNextEl = findChildFragmentNextElement(candidiateBrothers);\n const parentType = parentWDom.type || \"\";\n if (finedNextEl) {\n return finedNextEl;\n }\n if (!parentWDom.isRoot && checkVirtualType(parentType)) {\n return startFindNextBrotherElement(parentWDom, getParent(parentWDom));\n } else if (parentWDom.isRoot && checkVirtualType(parentType) && parentWDom.afterElement) {\n return parentWDom.afterElement;\n }\n return void 0;\n};\nconst findChildFragmentNextElement = (candidiateBrothers) => candidiateBrothers.reduce(\n (targetEl, bItem) => {\n const type = bItem.type;\n const el = bItem.el;\n const isFragment = type && checkVirtualType(type);\n if (targetEl) {\n return targetEl;\n } else if (isFragment) {\n return findChildFragmentNextElement(bItem.children || []);\n } else if (el && el.nodeType !== 11) {\n return el;\n }\n return targetEl;\n },\n void 0\n);\nconst typeReplace = (newWDom) => {\n const parentWDom = getParent(newWDom);\n const orignalElement = newWDom.el;\n if (parentWDom.type && orignalElement) {\n if (orignalElement.nodeType === 11) {\n typeSortedReplace(newWDom);\n } else {\n const parentElement = findRealParentElement(parentWDom);\n const newElement = wDomToDom(newWDom);\n if (parentElement) {\n parentElement.replaceChild(newElement, orignalElement);\n }\n execMountedQueue();\n }\n }\n};\nconst removeEvent = (oldProps, element) => {\n entries(oldProps || {}).forEach(([dataKey, dataValue]) => {\n if (dataKey.match(/^on/)) {\n element.removeEventListener(\n getEventName(dataKey),\n dataValue\n );\n }\n });\n};\nconst typeUpdate = (newWDom) => {\n var _a;\n const element = newWDom.el;\n if (newWDom.type === \"text\") {\n updateText(newWDom);\n return;\n }\n if (element) {\n const { oldProps, props } = newWDom;\n updateProps$1(props, element, oldProps);\n delete newWDom.oldProps;\n if (newWDom.tag === \"input\") {\n element.value = String(((_a = newWDom == null ? void 0 : newWDom.props) == null ? void 0 : _a.value) || \"\");\n }\n }\n (newWDom.children || []).forEach((childItem) => wDomUpdate(childItem));\n runUpdatedQueueFromWDom(newWDom);\n};\nconst updateText = (newWDom) => {\n const element = newWDom.el;\n if (element) {\n element.nodeValue = String(newWDom.text);\n }\n};\nconst updateProps$1 = (props, element, oldProps) => {\n const originalProps = { ...oldProps };\n entries(props || {}).forEach(([dataKey, dataValue]) => {\n let chkRemoveProp = true;\n if (dataKey === \"key\")\n ;\n else if (dataKey === \"innerHTML\" && typeof dataValue === \"string\") {\n element.innerHTML = dataValue;\n } else if (checkStyleData(dataKey, dataValue)) {\n updateStyle(\n dataValue,\n checkStyleData(dataKey, originalProps.style) ? originalProps.style : {},\n element\n );\n } else if (checkRefData(dataKey, dataValue)) {\n dataValue.value = element;\n } else if (dataKey.match(/^on/)) {\n updateEvent(\n element,\n dataKey,\n dataValue,\n originalProps[dataKey]\n );\n } else if (checkCheckableElement(element) && dataKey === \"checked\") {\n element.checked = !!dataValue;\n } else if (checkTextareaElement(element) && dataKey === \"value\") {\n element.value = dataValue;\n } else if (checkOptionElement(element) && dataKey === \"selected\") {\n element.selected = !!dataValue;\n } else if (dataKey) {\n [chkRemoveProp, dataValue] = makeAttrDataValue(dataValue);\n if (chkRemoveProp) {\n const newDataKey = getAttrKey(dataKey);\n if (newDataKey === \"class\") {\n setTimeout(() => {\n setAttr(newDataKey, element, dataValue);\n });\n } else {\n setAttr(newDataKey, element, dataValue);\n }\n }\n }\n if (chkRemoveProp) {\n delete originalProps[dataKey];\n }\n });\n keys(originalProps).forEach(\n (dataKey) => element.removeAttribute(dataKey)\n );\n};\nconst setAttr = (dataKey, element, dataValue) => {\n if (xmlnsRef.value && dataKey !== \"xmlns\") {\n element.setAttributeNS(null, dataKey, dataValue);\n } else {\n element.setAttribute(dataKey, dataValue);\n }\n};\nconst makeAttrDataValue = (dataValue) => {\n let allowSetAttr = true;\n if (typeof dataValue === \"boolean\") {\n if (!dataValue) {\n allowSetAttr = false;\n }\n dataValue = \"\";\n }\n return [allowSetAttr, String(dataValue)];\n};\nconst wDomToDom = (wDom) => {\n let element;\n const { type, tag, text, props, children = [] } = wDom;\n const isVirtualType = checkVirtualType(type);\n if (tag === \"svg\") {\n xmlnsRef.value = String(props == null ? void 0 : props.xmlns);\n }\n if (isVirtualType) {\n element = DF();\n } else if (type === \"element\" && tag) {\n element = xmlnsRef.value ? document.createElementNS(xmlnsRef.value, tag) : CE(tag);\n } else if (type === \"text\" && checkExisty(text)) {\n element = document.createTextNode(String(text));\n } else {\n element = CE(\"e\");\n }\n wDomChildrenToDom(children, element);\n updateProps$1(props, element);\n wDom.el = element;\n addMountedQueue(wDom);\n if (tag === \"svg\") {\n xmlnsRef.value = \"\";\n }\n return element;\n};\nconst wDomChildrenToDom = (children, parentElement) => {\n const elementChildren = children.reduce(\n (acc, childItem) => {\n if (childItem.type) {\n acc.appendChild(wDomToDom(childItem));\n }\n return acc;\n },\n DF()\n );\n if (parentElement && elementChildren.hasChildNodes()) {\n parentElement.appendChild(elementChildren);\n }\n};\nconst updateEvent = (element, eventKey, newEventHandler, oldEventHandler) => {\n const eventName = getEventName(eventKey);\n if (oldEventHandler !== newEventHandler) {\n if (oldEventHandler) {\n element.removeEventListener(eventName, oldEventHandler);\n }\n if (newEventHandler) {\n element.addEventListener(eventName, newEventHandler);\n }\n }\n};\nconst updateStyle = (style, oldStyle, element) => {\n setTimeout(() => {\n const originalStyle = { ...oldStyle };\n const elementStyle = element == null ? void 0 : element.style;\n if (elementStyle) {\n entries(style).forEach(([styleKey, dataValue]) => {\n elementStyle[styleKey] = dataValue;\n delete originalStyle[styleKey];\n });\n entries(originalStyle).forEach(\n ([styleKey]) => elementStyle[styleKey] = \"\"\n );\n }\n });\n};\nconst findRealParentElement = (vDom) => {\n const isVirtualType = checkVirtualType(vDom.type);\n if (vDom.isRoot && isVirtualType) {\n return vDom.wrapElement;\n }\n if (!isVirtualType) {\n return vDom.el;\n }\n return findRealParentElement(getParent(vDom));\n};\nconst makeNewWDomTree = (newWDom, originalWDom) => remakeNewWDom(\n newWDom,\n checkSameWDomWithOriginal[getWDomType(newWDom)](newWDom, originalWDom),\n originalWDom\n);\nconst remakeNewWDom = (newWDom, isSameType, originalWDom) => {\n const remakeWDom = generalize(newWDom, isSameType, originalWDom);\n const param = [\n remakeWDom,\n isSameType,\n originalWDom\n ];\n const needRerender = addReRenderTypeProperty(...param);\n remakeWDom.children = remakeChildrenForDiff(...param);\n remakeWDom.needRerender = needRerender;\n inheritPropForRender(remakeWDom, originalWDom, needRerender);\n return remakeWDom;\n};\nconst inheritPropForRender = (remakeWDom, originalWDom, needRerender) => {\n if (needRerender !== \"A\" && originalWDom) {\n remakeWDom.el = originalWDom.el;\n }\n if (needRerender && [\"D\", \"R\", \"SR\"].includes(needRerender)) {\n if (originalWDom == null ? void 0 : originalWDom.compKey) {\n runUnmountQueueFromWDom(originalWDom);\n recursiveRemoveEvent(originalWDom);\n }\n remakeWDom.oldChildren = originalWDom == null ? void 0 : originalWDom.children;\n }\n remakeWDom.oldProps = originalWDom == null ? void 0 : originalWDom.props;\n};\nconst addReRenderTypeProperty = (newWDom, isSameType, originalWDom) => {\n var _a;\n const existOriginalWDom = originalWDom && originalWDom.type;\n const isEmptyElement = checkEmptyElement(newWDom);\n const isRoot = newWDom.isRoot;\n const origParentType = !isRoot && originalWDom && ((_a = getParent(originalWDom)) == null ? void 0 : _a.type);\n const key = getKey(newWDom);\n const isKeyCheckedWDom = origParentType === \"loop\" && checkExisty(key);\n const isSameText = newWDom.type === \"text\" && isSameType && newWDom.text === (originalWDom == null ? void 0 : originalWDom.text);\n let result;\n if (isEmptyElement) {\n result = \"D\";\n } else if (isSameText) {\n result = \"N\";\n } else if (!existOriginalWDom) {\n result = \"A\";\n } else if (isSameType) {\n result = isKeyCheckedWDom ? \"SU\" : \"U\";\n } else {\n result = isKeyCheckedWDom ? \"SR\" : \"R\";\n }\n return result;\n};\nconst updateProps = (props, infoProps) => {\n if (props && infoProps !== props) {\n keys(props).forEach((key) => delete props[key]);\n entries(infoProps || {}).forEach(([key, value]) => props[key] = value);\n }\n};\nconst updateChildren = (children, infoChidren) => {\n if (children && infoChidren !== children) {\n children.splice(0, children.length);\n if (infoChidren) {\n infoChidren.forEach((childrenItem) => children.push(childrenItem));\n }\n }\n};\nconst runUpdate = (vDom, infoVdom) => {\n const { compProps: props, compChild: children } = vDom;\n const { props: infoProps, children: infoChidren } = infoVdom;\n if (props) {\n updateProps(props, infoProps);\n }\n if (children) {\n updateChildren(children, infoChidren);\n }\n const newVDom = vDom.reRender && vDom.reRender();\n return newVDom;\n};\nconst generalize = (newWDom, isSameType, originalWDom) => {\n if (checkCustemComponentFunction(newWDom)) {\n return isSameType && originalWDom ? runUpdate(originalWDom, newWDom) : newWDom.resolve();\n }\n return newWDom;\n};\nconst remakeChildrenForDiff = (newWDom, isSameType, originalWDom) => isSameType && originalWDom ? remakeChildrenForUpdate(newWDom, originalWDom) : remakeChildrenForAdd(newWDom);\nconst remakeChildrenForAdd = (newWDom) => (newWDom.children || []).map(\n (item) => assign(makeNewWDomTree(item), { getParent: () => newWDom })\n);\nconst remakeChildrenForUpdate = (newWDom, originalWDom) => newWDom.type === \"loop\" && checkExisty(getKey((newWDom.children || [])[0])) ? remakeChildrenForLoopUpdate(newWDom, originalWDom) : (newWDom.children || []).map(\n (item, index) => assign(makeNewWDomTree(item, (originalWDom.children || [])[index]), {\n getParent: () => newWDom\n })\n);\nconst remakeChildrenForLoopUpdate = (newWDom, originalWDom) => {\n const [remakedChildren, unUsedChildren] = diffLoopChildren(\n newWDom,\n originalWDom\n );\n unUsedChildren.map((unusedItem) => {\n runUnmountQueueFromWDom(unusedItem);\n recursiveRemoveEvent(unusedItem);\n typeDelete(unusedItem);\n });\n return remakedChildren;\n};\nconst diffLoopChildren = (newWDom, originalWDom) => {\n const newChildren = [...newWDom.children || []];\n const originalChildren = [...originalWDom.children || []];\n const remakedChildren = newChildren.map((item) => {\n const originalItem = findSameKeyOriginalItem(item, originalChildren);\n const childItem = makeNewWDomTree(item, originalItem);\n if (originalItem) {\n originalChildren.splice(originalChildren.indexOf(originalItem), 1);\n }\n childItem.getParent = () => newWDom;\n return childItem;\n });\n return [remakedChildren, originalChildren];\n};\nconst findSameKeyOriginalItem = (item, originalChildren) => originalChildren.find(\n (orignalChildItem) => getKey(orignalChildItem) === getKey(item)\n);\nlet redrawQueue = [];\nlet redrawQueueTimeout = false;\nconst setRedrawAction = (compKey, exec) => {\n componentRef.get(compKey).up = () => {\n redrawQueue.push({\n compKey,\n exec\n });\n if (!redrawQueueTimeout) {\n redrawQueueTimeout = true;\n queueMicrotask(execRedrawQueue);\n }\n };\n};\nconst componentUpdate = (compKey) => () => {\n var _a;\n const up = (_a = componentRef.get(compKey)) == null ? void 0 : _a.up;\n let result = false;\n if (up) {\n up();\n result = true;\n }\n return result;\n};\nconst recursiveGetChildKeys = (wDom, result) => {\n (wDom.children || []).forEach((item) => {\n const childComKey = item.compKey;\n if (childComKey) {\n result.push(childComKey);\n }\n recursiveGetChildKeys(item, result);\n });\n};\nconst execRedrawQueue = () => {\n let childItemList = [];\n redrawQueue.forEach((item) => {\n var _a, _b;\n const childVd = (_b = (_a = componentRef.get(item.compKey)) == null ? void 0 : _a.vd) == null ? void 0 : _b.value;\n if (childVd) {\n recursiveGetChildKeys(childVd, childItemList);\n }\n });\n const addedKey = [];\n const result = redrawQueue.reduce((acc, item) => {\n const { compKey } = item;\n if (childItemList.includes(compKey) || addedKey.includes(compKey)) {\n return acc;\n }\n addedKey.push(compKey);\n acc.push(item);\n return acc;\n }, []);\n while (result.length) {\n const action = result.shift();\n if (action) {\n action.exec();\n }\n }\n redrawQueue = [];\n redrawQueueTimeout = false;\n};\nconst updateCallback = (effectAction, dependencies = () => []) => {\n const updateReqs = componentRef.get(getComponentKey()).upR;\n updateReqs.push(() => useUpdated(effectAction, dependencies));\n useUpdated(effectAction, dependencies);\n};\nconst runUpdateCallback = () => {\n var _a;\n const updateReqs = (_a = componentRef.get(getComponentKey())) == null ? void 0 : _a.upR;\n if (updateReqs == null ? void 0 : updateReqs.length) {\n updateReqs.forEach((callback) => callback());\n }\n};\nconst Fragment = (_props, ...children) => ({\n type: \"fragment\",\n children\n});\nconst h = (tag, props, ...children) => {\n const nodeParentPointer = { value: void 0 };\n const newProps = props || {};\n const newChildren = remakeChildren(nodeParentPointer, children);\n const node = makeNode(tag, newProps, newChildren);\n if (!checkCustemComponentFunction(node)) {\n nodeParentPointer.value = node;\n }\n return node;\n};\nconst mount = (component) => (_props, _children) => component;\nconst reRenderCustomComponent = (tag, props, children, originalWDom) => {\n var _a;\n needDiffRef.value = true;\n const newWDom = makeWDomResolver(tag, props, children);\n const newWDomTree = makeNewWDomTree(newWDom, originalWDom);\n const { isRoot, getParent: getParent2, wrapElement, afterElement } = originalWDom;\n newWDomTree.getParent = getParent2;\n if (!isRoot && getParent2) {\n const brothers = ((_a = getParent2()) == null ? void 0 : _a.children) || [];\n const index = brothers.indexOf(originalWDom);\n brothers.splice(index, 1, newWDomTree);\n } else {\n newWDomTree.isRoot = true;\n newWDomTree.wrapElement = wrapElement;\n newWDomTree.afterElement = afterElement;\n }\n needDiffRef.value = false;\n wDomUpdate(newWDomTree);\n};\nconst makeWDomResolver = (tag, props, children) => {\n const tagName = tag.name;\n const ctor = tag;\n const resolve = (compKey = props) => {\n initMountHookState(compKey);\n const component = tag(props, children);\n const componentMaker = component(componentUpdate(compKey), props, children);\n const customNode = makeCustomNode(\n componentMaker,\n compKey,\n tag,\n props,\n children\n );\n const originalWDom = customNode;\n setRedrawAction(\n compKey,\n () => reRenderCustomComponent(tag, props, children, originalWDom)\n );\n getComponentSubInfo(compKey, \"vd\").value = customNode;\n return customNode;\n };\n return { tagName, ctor, props, children, resolve };\n};\nconst makeCustomNode = (componentMaker, compKey, tag, props, children) => {\n const customNode = componentMaker(props);\n if (customNode.reRender) {\n throw new Error(\n 'Avoid the case where the first element of a component is a component. Instead of \"mount(()=>()=><Component />)\" replace it with something like \"mount(()=>()=><Fragment><Component /></Fragment>)\".'\n );\n }\n addComponentProps(\n customNode,\n compKey,\n tag,\n props,\n children,\n makeReRender(componentMaker, compKey, tag, props, children)\n );\n return customNode;\n};\nconst makeReRender = (componentMaker, compKey, tag, props, children) => {\n const reRender = () => wDomMaker(componentMaker, compKey, tag, props, children, reRender);\n return reRender;\n};\nconst wDomMaker = (componentMaker, compKey, tag, props, children, reRender) => {\n initUpdateHookState(compKey);\n runUpdateCallback();\n const originalWDom = componentMaker(props);\n setRedrawAction(\n compKey,\n () => reRenderCustomComponent(tag, props, children, originalWDom)\n );\n addComponentProps(originalWDom, compKey, tag, props, children, reRender);\n getComponentSubInfo(compKey, \"vd\").value = originalWDom;\n return originalWDom;\n};\nconst addComponentProps = (wDom, compKey, tag, props, children, reRender) => {\n assign(wDom, {\n compProps: props,\n compChild: children,\n ctor: tag,\n tagName: tag.name,\n compKey,\n reRender\n });\n};\nconst makeNode = (tag, props, children) => {\n if (checkFragmentFunction(tag)) {\n return Fragment(props, ...children);\n } else if (checkCustemComponentFunction(tag)) {\n const componetMakeResolver = makeWDomResolver(tag, props, children);\n return needDiffRef.value ? componetMakeResolver : componetMakeResolver.resolve();\n }\n return {\n type: \"element\",\n tag,\n props,\n children\n };\n};\nconst remakeChildren = (nodeParentPointer, children) => children.map(\n (item) => assign(makeChildrenItem(item), { getParent: () => nodeParentPointer.value })\n);\nconst makeChildrenItem = (item) => {\n if (item === null || item === void 0 || item === false) {\n return { type: null };\n } else if (Array.isArray(item)) {\n const nodeParentPointer = { value: void 0 };\n const children = remakeChildren(nodeParentPointer, item);\n const node = {\n type: \"loop\",\n children\n };\n nodeParentPointer.value = node;\n return node;\n } else if (typeof item === \"string\" || typeof item === \"number\") {\n return { type: \"text\", text: item };\n }\n return item;\n};\nconst ref = (initValue) => ({ value: initValue });\nconst nextTick = () => Promise.resolve();\nexport {\n Fragment,\n h,\n mount,\n mountCallback,\n nextTick,\n ref,\n render,\n updateCallback\n};\n//# sourceMappingURL=lithent.mjs.map\n","import { mountCallback as a, updateCallback as p, nextTick as h, render as g } from \"lithent\";\nconst f = (r, t) => {\n let e = r;\n return {\n get value() {\n return e;\n },\n get v() {\n return e;\n },\n set value(n) {\n e = n, t();\n },\n set v(n) {\n e = n, t();\n }\n };\n}, m = (r) => {\n let t = r;\n return {\n get value() {\n return t();\n },\n get v() {\n return t();\n },\n set value(e) {\n throw new Error(\"You can't change 'computed'\");\n },\n set v(e) {\n throw new Error(\"You can't change 'computed'\");\n }\n };\n}, d = (r, t = () => {\n}, e = () => []) => {\n a(() => (r(), t)), p(() => (t && t(), r), e);\n}, l = /* @__PURE__ */ new Map(), u = {}, x = (r) => {\n const t = Symbol();\n return l.set(t, r), (e) => (u[t] ?? (u[t] = []), u[t].push(e), i(t));\n}, i = (r) => new Proxy(l.get(r), {\n get(t, e) {\n return t[e];\n },\n set(t, e, n) {\n t[e] = n;\n const c = u[r], s = [];\n return c.forEach((o) => {\n o() || s.push(o);\n }), s.forEach(\n (o) => c.splice(c.indexOf(o), 1)\n ), !0;\n }\n}), E = (r, t, e) => {\n let n = () => {\n };\n return h().then(() => {\n n = g(r(), t, e);\n }), () => n();\n};\nexport {\n m as computed,\n d as effect,\n E as nextTickRender,\n f as state,\n x as store\n};\n//# sourceMappingURL=lithentHelper.mjs.map\n","// example.jsx\nimport {\n h,\n Fragment,\n render,\n ref,\n mountCallback,\n updateCallback,\n mount,\n} from 'lithent';\nimport { state, computed, effect, store } from 'lithent/helper';\n\n// This is the \"mount\" function.\n// This function is only executed on mount, and on update, only updates `props` and then executes the internal return function.\n// childen is passed as the second argument.\nconst ChildComponent = mount<{ parentValue: number }>(\n (renew, props, children) => {\n // The value is used as a \"getter\" to make it easy to get and write to in the higher-order functions it returns\n const count = state<number>(1, renew);\n const text = state<string>(\n '\"destructuring\" the \"props\" value directly from the mount function will cause referencing issues, so if you want to use it, you need to \"destructuring\" it from the internal function (updater).',\n renew\n );\n const getParentValue = () => props.parentValue;\n const parentValueFromMount = props.parentValue;\n const summ = computed<number>(\n () => count.v + notRefValue + props.parentValue\n );\n\n const localStore = store<{ text: string; count: number }>({\n text: 's',\n count: 0,\n })(renew);\n /*\n // To share a store, make it externally and use `asign`.\n const asignStore = store<{ text: string; count: number }>({ text: 's', count: 0 });\n\n const sharedStore = asignStore(nenew);\n */\n\n // Even if you don't use a ref, the private value is always maintained as a regular variable.\n let notRefValue = props.parentValue;\n\n // Ref is only used to reference the DOM.\n const domRef = ref(null);\n\n const increase = () => {\n count.v = count.v + 1;\n notRefValue += 1;\n };\n\n const handleInputChane = (event: InputEvent) => {\n text.v = (event.target as HTMLInputElement).value;\n };\n\n const localStoreUpdate = () => {\n localStore.count += 1;\n localStore.text += '1';\n };\n\n const handleMounted = () => {\n console.log('MOUNTED', domRef);\n\n return () => console.log('UNMOUNT');\n };\n const handleUpdated = () => {\n console.log('UPDATE - parentValue');\n\n return () => console.log('UPDATED');\n };\n\n mountCallback(handleMounted);\n updateCallback(handleUpdated, () => [props.parentValue]); // Only Defs Updated (using a closure to update a value)\n\n // Behaves like `react`'s `useEffect`\n effect(\n () => console.log('INJECT'),\n () => console.log('CLEAN_UP'),\n () => [count.v]\n );\n\n // Wrap in a function and return (using a closure to hold the value)\n // This is the \"update\" function.\n return ({ parentValue }) => (\n <Fragment>\n {/* Note that the event is onInput (we use the native event name to avoid confusion). */}\n <div>\n <textarea\n value={text.v}\n onInput={handleInputChane}\n style={{ width: '300px', height: '100px' }}\n />\n </div>\n <div>{text.v}</div>\n <div>\n <div style={{ color: 'blue' }}>\n parentValueFromRef: {props.parentValue} (working)\n </div>\n <div style={{ color: 'blue' }}>\n parentValueFromFunction: {getParentValue()} (working)\n </div>\n <div style={{ color: 'blue' }}>\n parentValueFromUpdaterDestructuring: {parentValue} (working)\n </div>\n <div style={{ color: 'red' }}>\n parentValueFromMounterDestructuring: {parentValueFromMount} (not\n working)\n </div>\n </div>\n <div>\n <div ref={domRef}>count: {count.v}</div>\n <div>sum: {count.v + notRefValue + props.parentValue}</div>\n <div>sum(computed): {summ.v}</div>\n {/* It doesn't pull it out from under the reference, it uses the value directly, so you can just use it. */}\n <div>notRefValue: {notRefValue}</div>\n <div>localStore(text): {localStore.text}</div>\n <div>localStore(count): {localStore.count}</div>\n </div>\n <button onClick={increase}>Increase</button>\n <button onClick={localStoreUpdate}>localStoreUpdate</button>\n {children}\n </Fragment>\n );\n }\n);\n\nconst Root = mount(renew => {\n const parentNumber = state<number>(7, renew);\n\n const increaseParent = () => {\n parentNumber.v = parentNumber.v + 1;\n };\n\n const decreaseParent = () => {\n parentNumber.v = parentNumber.v - 1;\n };\n\n return () => (\n <Fragment>\n <ChildComponent parentValue={parentNumber.v}>\n <button onClick={increaseParent}>Increase - Parent</button>\n </ChildComponent>\n <button onClick={decreaseParent}>Decrease - Parent</button>\n </Fragment>\n );\n});\nconst root = <Root />;\n\nrender(root, document.getElementById('root'));\n"],"names":["checkPlainWDomType","wDom","checkPlainType","typeName","checkSameCustomComponent","newWDom","originalWDom","checkSameFragment","_a","_b","checkSameTagElement","checkNormalTypeElement","checkExisty","getKey","target","checkVirtualType","type","checkCustemComponentFunction","checkFragmentFunction","Fragment","checkEmptyElement","value","checkStyleData","dataKey","dataValue","checkRefData","checkOptionElement","element","checkTextareaElement","checkCheckableElement","getWDomType","result","checkSameWDomWithOriginal","getParent","vDom","entries","keys","assign","xmlnsRef","compKeyRef","needDiffRef","componentRef","setComponetRef","compKey","getComponentKey","getComponentSubInfo","subKey","initUpdateHookState","initMountHookState","unmount","effectAction","runUnmountQueueFromWDom","removeItem","recursiveRunUnmount","item","subInfo","effect","mountedQueue","execMountedQueue","runMountedQueueFromWDom","addMountedQueue","mountCallback","component","queue","sequence","callback","useUpdated","dependencies","upD","upS","def","checkNeedPushQueue","runUpdatedQueueFromWDom","originalDefs","newDefs","index","getAttrKey","keyName","getEventName","eventKey","_match","p1","DF","CE","t","render","wrapElement","afterElement","Dom","wDomToDom","recursiveRemoveEvent","rootDelete","wDomUpdate","newWDomTree","needRerender","typeAdd","typeDelete","typeReplace","typeUpdate","typeSortedReplace","typeSortedUpdate","removeEvent","childItem","deleteRealDom","findRealParentElement","parent","findChildWithRemoveElement","newElement","getElementFromFragment","parentWDom","parentEl","nextEl","startFindNextBrotherElement","acc","brothers","nextIndex","candidiateBrothers","finedNextEl","findChildFragmentNextElement","parentType","targetEl","bItem","el","isFragment","orignalElement","parentElement","oldProps","updateText","props","updateProps$1","originalProps","chkRemoveProp","updateStyle","updateEvent","makeAttrDataValue","newDataKey","setAttr","allowSetAttr","tag","text","children","isVirtualType","wDomChildrenToDom","elementChildren","newEventHandler","oldEventHandler","eventName","style","oldStyle","originalStyle","elementStyle","styleKey","makeNewWDomTree","remakeNewWDom","isSameType","remakeWDom","generalize","param","addReRenderTypeProperty","remakeChildrenForDiff","inheritPropForRender","existOriginalWDom","isEmptyElement","origParentType","key","isKeyCheckedWDom","isSameText","updateProps","infoProps","updateChildren","infoChidren","childrenItem","runUpdate","infoVdom","remakeChildrenForUpdate","remakeChildrenForAdd","remakeChildrenForLoopUpdate","remakedChildren","unUsedChildren","diffLoopChildren","unusedItem","newChildren","originalChildren","originalItem","findSameKeyOriginalItem","orignalChildItem","redrawQueue","redrawQueueTimeout","setRedrawAction","exec","execRedrawQueue","componentUpdate","up","recursiveGetChildKeys","childComKey","childItemList","childVd","addedKey","action","updateCallback","runUpdateCallback","updateReqs","_props","h","nodeParentPointer","newProps","remakeChildren","node","makeNode","mount","_children","reRenderCustomComponent","makeWDomResolver","isRoot","getParent2","componentMaker","customNode","makeCustomNode","addComponentProps","makeReRender","reRender","wDomMaker","componetMakeResolver","makeChildrenItem","ref","initValue","f","r","e","n","m","d","a","p","l","u","x","i","o","ChildComponent","renew","count","state","getParentValue","parentValueFromMount","summ","computed","notRefValue","localStore","store","domRef","increase","handleInputChane","event","localStoreUpdate","handleMounted","handleUpdated","parentValue","Root","parentNumber","increaseParent","decreaseParent","root"],"mappings":"ssBAAA,MAAMA,EAAsBC,GAAS,OAAOA,GAAS,UAAY,EAAE,YAAaA,GAC1EC,EAAiB,CAACD,EAAME,IAAaH,EAAmBC,CAAI,GAAKA,EAAK,OAASE,EAC/EC,GAA2B,CAACC,EAASC,IAAiB,SAAUD,EAAUA,EAAQ,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