@lytjs/renderer 4.2.0 → 5.0.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/dist/dom.cjs +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/miniapp.cjs +21 -5
- package/dist/miniapp.mjs +21 -5
- package/dist/native.cjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/ssr.cjs +1 -1
- package/dist/ssr.mjs +1 -1
- package/dist/types/dom/dom-ops.d.ts.map +1 -1
- package/dist/types/dom/dom-renderer.d.ts +3 -3
- package/dist/types/dom/dom-renderer.d.ts.map +1 -1
- package/dist/types/dom/patch-props.d.ts +2 -32
- package/dist/types/dom/patch-props.d.ts.map +1 -1
- package/dist/types/miniapp/index.d.ts +8 -0
- package/dist/types/miniapp/index.d.ts.map +1 -1
- package/dist/types/miniapp/miniapp-compiler.d.ts +269 -0
- package/dist/types/miniapp/miniapp-compiler.d.ts.map +1 -0
- package/dist/types/miniapp/miniapp-event-bridge.d.ts +255 -0
- package/dist/types/miniapp/miniapp-event-bridge.d.ts.map +1 -0
- package/dist/types/miniapp/miniapp-lifecycle.d.ts +224 -0
- package/dist/types/miniapp/miniapp-lifecycle.d.ts.map +1 -0
- package/dist/types/miniapp/miniapp-renderer.d.ts.map +1 -1
- package/dist/types/miniapp/miniapp-utils.d.ts +168 -0
- package/dist/types/miniapp/miniapp-utils.d.ts.map +1 -0
- package/dist/types/miniapp/shared-constants.d.ts +28 -0
- package/dist/types/miniapp/shared-constants.d.ts.map +1 -0
- package/dist/types/native/native-renderer.d.ts.map +1 -1
- package/dist/types/renderer-interfaces.d.ts +19 -19
- package/dist/types/renderer-interfaces.d.ts.map +1 -1
- package/dist/types/shared/abstract-renderer.d.ts +74 -0
- package/dist/types/shared/abstract-renderer.d.ts.map +1 -0
- package/dist/types/ssr/hydration.d.ts +1 -16
- package/dist/types/ssr/hydration.d.ts.map +1 -1
- package/dist/types/ssr/ssr-renderer.d.ts +9 -24
- package/dist/types/ssr/ssr-renderer.d.ts.map +1 -1
- package/dist/types/vapor/index.d.ts +1 -1
- package/dist/types/vapor/index.d.ts.map +1 -1
- package/dist/types/vapor/vapor-compiler.d.ts +9 -0
- package/dist/types/vapor/vapor-compiler.d.ts.map +1 -1
- package/dist/types/vapor/vapor-component.d.ts +8 -1
- package/dist/types/vapor/vapor-component.d.ts.map +1 -1
- package/dist/types/vapor/vapor-reactive.d.ts +27 -4
- package/dist/types/vapor/vapor-reactive.d.ts.map +1 -1
- package/dist/types/vapor/vapor-renderer.d.ts +4 -2
- package/dist/types/vapor/vapor-renderer.d.ts.map +1 -1
- package/dist/types/vnode.d.ts +76 -7
- package/dist/types/vnode.d.ts.map +1 -1
- package/dist/vapor.cjs +1 -1
- package/dist/vapor.mjs +1 -1
- package/package.json +4 -3
package/dist/vapor.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerDOMOperations as ye}from"@lytjs/vdom";var N=(s=>(s[s.ELEMENT=1]="ELEMENT",s[s.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",s[s.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",s[s.TEXT_CHILDREN=8]="TEXT_CHILDREN",s[s.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",s[s.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",s))(N||{}),w=(d=>(d[d.TEXT=1]="TEXT",d[d.CLASS=2]="CLASS",d[d.STYLE=4]="STYLE",d[d.PROPS=8]="PROPS",d[d.FULL_PROPS=16]="FULL_PROPS",d[d.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",d[d.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",d[d.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",d[d.NEED_PATCH=256]="NEED_PATCH",d[d.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",d[d.HOISTED=-1]="HOISTED",d[d.BAIL=-2]="BAIL",d))(w||{}),K=Symbol("Fragment"),Y=Symbol("Text"),$=Symbol("Comment");function h(e){return e.type===K}function E(e){return e.type===Y}function T(e){return e.type===$}function z(e,r){return e.type===r.type&&e.key===r.key}function k(e){return Array.isArray(e.dynamicChildren)}function X(e,r,o,t){if(o==="class")e.setClass(r,t);else if(o==="style")e.setStyle(r,t);else if(o.startsWith("on")||o.startsWith("@")){let n=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();e.addEventListener(r,n,t)}else o==="key"||o==="ref"||e.setAttribute(r,o,t)}function _(e,r,o,t,n){if(o==="class")e.setClass(r,t);else if(o==="style")e.setStyle(r,t||{});else if(o.startsWith("on")||o.startsWith("@")){let i=o.startsWith("@")?o.slice(1).toLowerCase():o.slice(2).toLowerCase();n&&e.removeEventListener(r,i,n),t&&e.addEventListener(r,i,t)}else e.setAttribute(r,o,t)}function M(e,r,o,t){for(let n in t){if(n==="key"||n==="ref")continue;let i=o[n],s=t[n];s!==i&&_(e,r,n,s,i)}for(let n in o)if(!(n==="key"||n==="ref")&&!(n in t))if(n==="class")e.setClass(r,"");else if(n==="style")e.setStyle(r,{});else if(n.startsWith("on")||n.startsWith("@")){let i=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();e.removeEventListener(r,i,o[n])}else e.removeAttribute(r,n)}function D(e,r,o,t,n,i){let{shapeFlag:s}=o;if(h(o)){se(e,r,o,t,n,i);return}if(E(o)){let a=e.createText(o.children);o.el=a,e.insert(t,a,n);return}if(T(o)){let a=e.createComment(o.children);o.el=a,e.insert(t,a,n);return}if(s&1){ie(e,r,o,t,n,i);return}if(s&6){ae(r,o,t,n,i);return}}function ie(e,r,o,t,n,i){let s=o.type,a=e.createElement(s);if(o.el=a,o.props)for(let p in o.props){let f=o.props[p];X(e,a,p,f)}let{shapeFlag:l,children:c}=o;l&8?a.textContent=c:l&16&&R(r,c,a,null,i),e.insert(t,a,n)}function R(e,r,o,t,n){for(let i=0;i<r.length;i++)e(null,r[i],o,t,n)}function se(e,r,o,t,n,i){let{children:s}=o,a=e.createComment("");e.insert(t,a,n),Array.isArray(s)&&s.length>0&&R(r,s,t,a,i),o.el=a,o.anchor=a}function ae(e,r,o,t,n){let i=r.component;i&&i.update&&i.update(),i&&i.subTree&&(e(null,i.subTree,o,t,i),r.el=i.subTree.el)}function Z(e,r,o,t){let{shapeFlag:n,children:i}=o;if(h(o)){if(Array.isArray(i))for(let s=0;s<i.length;s++)r(i[s],t);o.anchor&&o.anchor.parentNode&&e.remove(o.anchor);return}if(n&6){o.component&&o.component.subTree&&r(o.component.subTree,t);return}o.el&&e.remove(o.el)}function b(e,r){for(let o=0;o<r.length;o++)e(r[o])}import{patchKeyedChildren as le,patchUnkeyedChildren as pe}from"@lytjs/vdom";function A(e,r,o,t,n,i=null,s=null){if(t==null){o&&r(o,n);return}if(o===null){D(e,I(e,r),t,n,i,s);return}if(k(t)&&k(o)){ue(e,r,o,t,n,s);return}if(!z(o,t)){r(o,n),D(e,I(e,r),t,n,i,s);return}t.el=o.el,t.anchor=o.anchor;let{shapeFlag:a}=t;if(h(t)){fe(e,r,o,t,n,i,s);return}if(E(t)){t.children!==o.children&&(t.el.nodeValue=t.children);return}if(T(t)){t.children!==o.children&&(t.el.nodeValue=t.children);return}if(a&1){ce(e,r,o,t,s);return}if(a&6){me(o,t,s);return}}function I(e,r){return(o,t,n,i,s)=>{A(e,r,o,t,n,i,s)}}function ce(e,r,o,t,n=null){let i=t.el=o.el,s=o.props||{},a=t.props||{},{patchFlag:l,dynamicProps:c}=t;if(l&&l>0){if(l&1&&o.children!==t.children&&(i.textContent=t.children),l&2&&s.class!==a.class&&e.setClass(i,a.class),l&4&&s.style!==a.style&&e.setStyle(i,a.style||{}),l&8&&c)for(let p=0;p<c.length;p++){let f=c[p],d=s[f],u=a[f];u!==d&&_(e,i,f,u,d)}l&16&&M(e,i,s,a)}else M(e,i,s,a);(!l||!(l&1))&&G(e,r,o,t,i,null,n)}function G(e,r,o,t,n,i,s){let a=o.shapeFlag,l=t.shapeFlag,c=o.children,p=t.children;if(l&8){a&16&&b(r,c),c!==p&&(n.textContent=p);return}if(l&16){a&16?de(e,r,c,p,n,i,s):(a&8&&(n.textContent=""),R(I(e,r),p,n,i,s));return}p==null&&(a&8?n.textContent="":a&16&&b(r,c))}function de(e,r,o,t,n,i,s){t.every(l=>l.key!==null&&l.key!==void 0)&&o.every(l=>l.key!==null&&l.key!==void 0)?le(o,t,n,i,s,null,!1):pe(o,t,n,i,s,null,!1)}function fe(e,r,o,t,n,i,s){let a=o.children,l=t.children;Array.isArray(l)&&l.length>0?(G(e,r,o,t,n,i,s),t.el=l[0].el,t.anchor=l[l.length-1].el?e.nextSibling(l[l.length-1].el):i):Array.isArray(a)&&a.length>0&&l===null?(b(r,a),t.el=o.el,t.anchor=o.anchor):(t.el=o.el,t.anchor=o.anchor)}function ue(e,r,o,t,n,i){let s=o.dynamicChildren,a=t.dynamicChildren;for(let l=0;l<a.length;l++)A(e,r,s[l],a[l],n,null,i)}function me(e,r,o){r.component=e.component,r.el=e.el,r.component&&r.component.update&&r.component.update()}function ge(e){function r(n,i){Z(e,r,n,i)}ye({insert(n,i,s){e.insert(i,n,s)},createElement(n){return e.createElement(n)},createText(n){return e.createText(n)},setText(n,i){n.nodeValue=i},setElementText(n,i){n.textContent=i},remove(n){e.remove(n)},createComment(n){return e.createComment(n)},mount(n,i,s,a,l,c,p){t(null,n,i,s,a)},patch(n,i,s,a,l,c,p,f){t(n,i,s,a,l)},unmount(n,i,s,a){r(n)},move(n,i,s){e.insert(i,n.el,s)}});function t(n,i,s,a,l){A(e,r,n,i,s,a,l)}return{mount(n,i){i.nodeType===1&&(i.textContent=""),t(null,n,i,null,null)},patch(n,i,s){var a;t(n,i,s||((a=n.el)==null?void 0:a.parentNode),null,null)},unmount(n,i){r(n,i)}}}import{effect as V}from"@lytjs/reactivity/signal";function B(e,r){return V(()=>{let t=r();e.textContent=t==null?"":String(t)})}function L(e,r,o){return V(()=>{let n=o();e[r]=n})}function j(e,r,o){return V(()=>{let n=o();n==null||n===!1?e.removeAttribute(r):e.setAttribute(r,n===!0?"":String(n))})}function F(e,r){return V(()=>{let t=r();if(typeof t=="string")e.className=t;else if(Array.isArray(t))e.className=t.filter(Boolean).join(" ");else if(typeof t=="object"&&t!==null){let n=[],i=t;for(let s of Object.keys(i))i[s]&&n.push(s);e.className=n.join(" ")}else e.className=""})}function P(e,r,o){return e.addEventListener(r,o),()=>{e.removeEventListener(r,o)}}function q(e,r){return V(()=>{let t=r(),n=e;t?(n.style=n.style||{},n.style.display==="none"&&(n.style.display=""),n.hidden=!1):(n.style=n.style||{},n.style.display="none",n.hidden=!0)})}function J(e,r,o,t){let n=[],i=[],s=new Map,a=V(()=>{let l=r();if(!Array.isArray(l))return;let c=l.map((p,f)=>t?t(p,f):f);if(c.length===i.length){let p=!0;for(let f=0;f<c.length;f++)if(c[f]!==i[f]){p=!1;break}if(p){for(let f=0;f<l.length;f++){let d=o(l[f],f),u=n[f];u&&u.parentNode===e&&e.replaceChild(d,u),n[f]=d}return}}for(let p of n)p.parentNode===e&&e.removeChild(p);s.clear(),n=[],i=[];for(let p=0;p<l.length;p++){let f=o(l[p],p);e.appendChild(f),n.push(f),i.push(c[p]),s.set(c[p],f)}});return()=>{a();for(let l of n)l.parentNode===e&&e.removeChild(l);n=[],i=[],s.clear()}}var S=e=>{if(typeof document!="undefined")return document.createElement(e);throw new Error("[lyt:vapor] \u672A\u8BBE\u7F6E DOM \u5DE5\u5382\u51FD\u6570\u3002\u5728\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u4E2D\u8BF7\u8C03\u7528 setVaporDOMFactory()")};function he(e){S=e}function v(){return S}function ee(e,r,...o){let t={tag:e,children:[],props:{},events:{},bindings:[]};if(r)for(let[n,i]of Object.entries(r))if(n.startsWith("on")&&typeof i=="function"&&!Q(i)){let s=n.slice(2).toLowerCase();t.events[s]=i}else Q(i)?n==="textContent"||n==="text"?t.bindings.push({type:"text",target:"textContent",signal:i}):n==="className"||n==="class"?t.bindings.push({type:"class",target:"className",signal:i}):n==="style"?t.bindings.push({type:"style",target:"style",signal:i}):t.bindings.push({type:"prop",target:n,signal:i}):t.props[n]=i;for(let n of o)typeof n=="string"?t.children.push({tag:"#text",children:[],props:{},events:{},bindings:[],text:n}):t.children.push(n);return t}function Q(e){if(typeof e!="function")return!1;let r=e;return!!(r._subscribe||r.set)&&!e.toString().startsWith("class")}function m(e){if(e.tag==="#text"){let t=S("#text");return t.textContent=e.text||"",t.nodeType=3,t}let r=S(e.tag);e.el=r;let o=r;for(let[t,n]of Object.entries(e.props))if(t==="style"&&typeof n=="object"&&n!==null)for(let[i,s]of Object.entries(n))o.style[i]=s;else t==="className"||t==="class"?r.className=String(n):o[t]=n;for(let t of e.bindings)t.signal&&(t.type==="text"?B(r,t.signal):t.type==="prop"?L(r,t.target,t.signal):t.type==="attr"?j(r,t.target,t.signal):t.type==="class"?F(r,t.signal):t.type==="style"&&L(r,"style",t.signal));for(let[t,n]of Object.entries(e.events))P(r,t,n);for(let t of e.children){let n=m(t);r.appendChild(n)}return r}function te(e,r,o){if(e.tag!==r.tag){let s=m(r);e.el&&e.el.parentNode===o&&o.removeChild(e.el),o.appendChild(s);return}let t=e.el||m(e);r.el=t;let n=t;for(let[s,a]of Object.entries(r.props))if(s==="style"&&typeof a=="object"&&a!==null)for(let[l,c]of Object.entries(a))n.style[l]=c;else s==="className"||s==="class"?t.className=String(a):n[s]=a;r.text!==void 0&&(t.textContent=r.text);for(let[s,a]of Object.entries(e.events))r.events[s]||t.removeEventListener(s,a);for(let[s,a]of Object.entries(r.events))e.events[s]!==a&&(e.events[s]&&t.removeEventListener(s,e.events[s]),t.addEventListener(s,a));let i=Math.max(e.children.length,r.children.length);for(let s=0;s<i;s++){let a=e.children[s],l=r.children[s];if(!a&&l){let c=m(l);t.appendChild(c)}else a&&!l?a.el&&a.el.parentNode===t&&t.removeChild(a.el):a&&l&&te(a,l,t)}}function U(e,r){let o=r.setup?r.setup():{};r.beforeMount&&r.beforeMount();let t;if(r.render){let i=r.render(o,ee);t=Array.isArray(i)?i:[i]}else t=[];let n=[];for(let i of t){let s=m(i);e.appendChild(s),n.push(s)}return r.mounted&&r.mounted(),()=>{r.beforeUnmount&&r.beforeUnmount();for(let i of n)e.removeChild(i);r.unmounted&&r.unmounted()}}function H(e){var t,n,i,s,a;let r={type:"fragment",children:[]},o=e.trim();for(;o.length>0;){let l=o.match(/^<([a-zA-Z][a-zA-Z0-9-]*)([\s\S]*?)(\/?)>/);if(l){let c=l[1],p=l[2],f=l[3]==="/",{props:d,events:u,directives:g}=Ne(p),y={type:"element",tag:c,props:d,events:u,directives:g,children:[]};if(o=o.slice(l[0].length),f){((t=r.children)!=null?t:[]).push(y);continue}let ne=`</${c}>`,O=Ve(o,c);if(O===-1)throw new Error(`[lyt:vapor:compiler] \u672A\u627E\u5230\u95ED\u5408\u6807\u7B7E: </${c}>`);let oe=o.slice(0,O);o=o.slice(O+ne.length);let re=H(oe);y.children=re.children||[],((n=r.children)!=null?n:[]).push(y)}else{let c=o.indexOf("<"),p;if(c===-1?(p=o,o=""):(p=o.slice(0,c),o=o.slice(c)),p.trim())if(p.includes("{{")){let f=ve(p);for(let d of f)d.type==="text"?((i=r.children)!=null?i:[]).push({type:"text",text:d.value}):((s=r.children)!=null?s:[]).push({type:"interpolation",expression:d.value})}else((a=r.children)!=null?a:[]).push({type:"text",text:p})}}return r}function Ve(e,r){let o=1,t=0,n=`<${r}`,i=`</${r}>`;for(;t<e.length&&o>0;){let s=e.indexOf(n,t),a=e.indexOf(i,t);if(a===-1)return-1;if(s!==-1&&s<a){let l=e[s+n.length];l===">"||l===" "||l==="/"?(o++,t=s+n.length):(t=a+i.length,o--)}else t=a+i.length,o--}return o===0?t-i.length:-1}function Ne(e){let r={},o={},t={},n=/([a-zA-Z@:][a-zA-Z0-9@:.-]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,i;for(;(i=n.exec(e))!==null;){let s=i[1],a=i[2]||i[3];if(s.startsWith("on:")){let l=s.slice(3);o[l]=a}else if(s.startsWith(":")){let l=s.slice(1);r[l]=a}else if(s==="v-if")t.if=a;else if(s==="v-each"){let l=a.match(/^\s*(\w+)\s+in\s+(.+)\s*$/);l&&(t.each={item:l[1],expression:l[2]})}else r[s]=a}return{props:r,events:o,directives:t}}function ve(e){let r=[],o=/\{\{([\s\S]*?)\}\}/g,t=0,n;for(;(n=o.exec(e))!==null;)n.index>t&&r.push({type:"text",value:e.slice(t,n.index)}),r.push({type:"interpolation",value:n[1].trim()}),t=n.index+n[0].length;return t<e.length&&r.push({type:"text",value:e.slice(t)}),r}function W(e){let r=H(e);return{render:xe(r),ast:r}}function xe(e){return function(o){let t=v();return C(e,o,t)}}function C(e,r,o){var t,n;if(e.type==="fragment"){if(e.children&&e.children.length===1)return C(e.children[0],r,o);let i=o("div");if(i.nodeType=11,i.childNodes=i.childNodes||[],e.children)for(let s of e.children){let a=C(s,r,o);i.appendChild?i.appendChild(a):i.childNodes.push(a)}return i}if(e.type==="text"){let i=o("#text");return i.textContent=e.text||"",i.nodeType=3,i}if(e.type==="interpolation"){let i=o("span"),s=e.expression||"",a=x(r,s);return i.textContent=a!=null?String(a):"",i}if(e.type==="element"){if((t=e.directives)!=null&&t.each){let{item:a,expression:l}=e.directives.each,c=x(r,l),p=o("#fragment");if(p.childNodes=[],p.nodeType=11,Array.isArray(c))for(let f=0;f<c.length;f++){let d={...r,[a]:c[f],index:f},u=o(e.tag||"div");if(e.props)for(let[g,y]of Object.entries(e.props))g==="class"||g==="className"?u.className=y:u[g]=y;if(e.children)for(let g of e.children){let y=C(g,d,o);u.appendChild(y)}p.appendChild(u)}return p}let i=o(e.tag||"div"),s=i;if((n=e.directives)!=null&&n.if&&(x(r,e.directives.if)||(s.style=s.style||{},s.style.display="none",s.hidden=!0)),e.props)for(let[a,l]of Object.entries(e.props))if(a.startsWith(":")){let c=a.slice(1),p=x(r,l);s[c]=p}else a==="class"||a==="className"?i.className=l:s[a]=l;if(e.events)for(let[a,l]of Object.entries(e.events)){let c=x(r,l);typeof c=="function"&&i.addEventListener(a,c)}if(e.children)for(let a of e.children){let l=C(a,r,o);if(l.nodeType===11&&l.childNodes)for(let c of l.childNodes)i.appendChild(c);else i.appendChild(l)}return i}return o("div")}function x(e,r){let o=r.trim();if(/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(o)){let i=e[o];return typeof i=="function"&&!i.prototype?i():i}let t=o.split("."),n=e;for(let i of t){if(n==null)return;n=n[i],typeof n=="function"&&!n.prototype&&t.indexOf(i)<t.length-1&&(n=n())}return n}function Ce(e){return e}function Ee(e){let r=!1,o=null,t=null;return{mount(n){if(!r){if(typeof n=="string")if(typeof document!="undefined"){let i=document.querySelector(n);if(!i)throw new Error(`[lyt:vapor] \u672A\u627E\u5230\u6302\u8F7D\u76EE\u6807: ${n}`);t=i}else throw new Error("[lyt:vapor] \u5728\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u4E2D\uFF0C\u8BF7\u76F4\u63A5\u4F20\u5165\u5BB9\u5668\u5143\u7D20");else t=n;o=U(t,e),r=!0}},unmount(){r&&(o&&(o(),o=null),r=!1,t=null)}}}function Te(e){let r=e.setup?e.setup():{};e.beforeMount&&e.beforeMount();let o;if(e.template){let{render:t}=W(e.template);o=t(r)}else if(e.render){let t=e.render(r,Re),n=Array.isArray(t)?t:[t];if(n.length===1)o=m(n[0]);else{o=v()("div");for(let s of n)o.appendChild(m(s))}}else throw new Error("[lyt:vapor] \u7EC4\u4EF6\u5FC5\u987B\u63D0\u4F9B template \u6216 render \u51FD\u6570");return e.mounted&&e.mounted(),o}function Re(e,r,...o){let t={tag:e,children:[],props:r||{},events:{},bindings:[]};for(let n of o)typeof n=="string"?t.children.push({tag:"#text",children:[],props:{},events:{},bindings:[],text:n}):t.children.push(n);return t}export{$ as Comment,K as Fragment,w as PatchFlags,N as ShapeFlags,Y as Text,j as bindAttr,F as bindClass,J as bindEach,P as bindEvent,q as bindIf,L as bindProp,B as bindText,W as compileToVapor,ge as createRenderer,Ee as createVaporApp,ee as createVaporElement,Ce as defineVaporComponent,v as getVaporDOMFactory,H as parseTemplate,Te as renderVaporComponent,m as renderVaporNode,he as setVaporDOMFactory,U as vaporMount,te as vaporPatch};
|
|
1
|
+
import{registerDOMOperations as Ne}from"@lytjs/vdom";var R=(l=>(l[l.ELEMENT=1]="ELEMENT",l[l.FUNCTIONAL_COMPONENT=2]="FUNCTIONAL_COMPONENT",l[l.STATEFUL_COMPONENT=4]="STATEFUL_COMPONENT",l[l.TEXT_CHILDREN=8]="TEXT_CHILDREN",l[l.ARRAY_CHILDREN=16]="ARRAY_CHILDREN",l[l.SLOTS_CHILDREN=32]="SLOTS_CHILDREN",l))(R||{}),U=(c=>(c[c.TEXT=1]="TEXT",c[c.CLASS=2]="CLASS",c[c.STYLE=4]="STYLE",c[c.PROPS=8]="PROPS",c[c.FULL_PROPS=16]="FULL_PROPS",c[c.STABLE_FRAGMENT=32]="STABLE_FRAGMENT",c[c.KEYED_FRAGMENT=64]="KEYED_FRAGMENT",c[c.UNKEYED_FRAGMENT=128]="UNKEYED_FRAGMENT",c[c.NEED_PATCH=256]="NEED_PATCH",c[c.DYNAMIC_SLOTS=512]="DYNAMIC_SLOTS",c[c.HOISTED=-1]="HOISTED",c[c.BAIL=-2]="BAIL",c))(U||{}),J=Symbol("Fragment"),Q=Symbol("Text"),ee=Symbol("Comment");function v(e){return e.type===J}function w(e){return e.type===Q}function k(e){return e.type===ee}function ne(e,r){return e.type===r.type&&e.key===r.key}function K(e){return Array.isArray(e.dynamicChildren)}function te(e,r,t,o){if(t==="class")e.setClass(r,o);else if(t==="style")e.setStyle(r,o);else if(t.startsWith("on")||t.startsWith("@")){let n=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();e.addEventListener(r,n,o)}else t==="key"||t==="ref"||e.setAttribute(r,t,o)}function W(e,r,t,o,n){if(t==="class")e.setClass(r,o);else if(t==="style")e.setStyle(r,o||{});else if(t.startsWith("on")||t.startsWith("@")){let i=t.startsWith("@")?t.slice(1).toLowerCase():t.slice(2).toLowerCase();n&&e.removeEventListener(r,i,n),o&&e.addEventListener(r,i,o)}else e.setAttribute(r,t,o)}function Y(e,r,t,o){for(let n in o){if(n==="key"||n==="ref")continue;let i=t[n],l=o[n];l!==i&&W(e,r,n,l,i)}for(let n in t)if(!(n==="key"||n==="ref")&&!(n in o))if(n==="class")e.setClass(r,"");else if(n==="style")e.setStyle(r,{});else if(n.startsWith("on")||n.startsWith("@")){let i=n.startsWith("@")?n.slice(1).toLowerCase():n.slice(2).toLowerCase();e.removeEventListener(r,i,t[n])}else e.removeAttribute(r,n)}function $(e,r,t,o,n,i){let{shapeFlag:l}=t;if(v(t)){ue(e,r,t,o,n,i);return}if(w(t)){let s=e.createText(t.children);t.el=s,e.insert(o,s,n);return}if(k(t)){let s=e.createComment(t.children);t.el=s,e.insert(o,s,n);return}if(l&1){de(e,r,t,o,n,i);return}if(l&6){fe(r,t,o,n,i);return}}function de(e,r,t,o,n,i){let l=t.type,s=e.createElement(l);if(t.el=s,t.props)for(let d in t.props){let g=t.props[d];te(e,s,d,g)}let{shapeFlag:a,children:p}=t;a&8?s.textContent=p:a&16&&A(r,p,s,null,i),e.insert(o,s,n)}function A(e,r,t,o,n){for(let i=0;i<r.length;i++)e(null,r[i],t,o,n)}function ue(e,r,t,o,n,i){let{children:l}=t,s=e.createComment("");e.insert(o,s,n),Array.isArray(l)&&l.length>0&&A(r,l,o,s,i),t.el=s,t.anchor=s}function fe(e,r,t,o,n){let i=r.component;i&&i.update&&i.update(),i&&i.subTree&&(e(null,i.subTree,t,o,i),r.el=i.subTree.el)}function oe(e,r,t,o){let{shapeFlag:n,children:i}=t;if(v(t)){if(Array.isArray(i))for(let l=0;l<i.length;l++)r(i[l],o);t.anchor&&t.anchor.parentNode&&e.remove(t.anchor);return}if(n&6){t.component&&t.component.subTree&&r(t.component.subTree,o);return}t.el&&e.remove(t.el)}function S(e,r){for(let t=0;t<r.length;t++)e(r[t])}import{patchKeyedChildren as me,patchUnkeyedChildren as ge}from"@lytjs/vdom";function L(e,r,t,o,n,i=null,l=null){if(o==null){t&&r(t,n);return}if(t===null){$(e,z(e,r),o,n,i,l);return}if(K(o)&&K(t)){Ce(e,r,t,o,n,l);return}if(!ne(t,o)){r(t,n),$(e,z(e,r),o,n,i,l);return}o.el=t.el,o.anchor=t.anchor;let{shapeFlag:s}=o;if(v(o)){Ve(e,r,t,o,n,i,l);return}if(w(o)){o.children!==t.children&&(o.el.nodeValue=o.children);return}if(k(o)){o.children!==t.children&&(o.el.nodeValue=o.children);return}if(s&1){ye(e,r,t,o,l);return}if(s&6){Ee(t,o,l);return}}function z(e,r){return(t,o,n,i,l)=>{L(e,r,t,o,n,i,l)}}function ye(e,r,t,o,n=null){let i=o.el=t.el,l=t.props||{},s=o.props||{},{patchFlag:a,dynamicProps:p}=o;if(a&&a>0){if(a&1&&t.children!==o.children&&(i.textContent=o.children),a&2&&l.class!==s.class&&e.setClass(i,s.class),a&4&&l.style!==s.style&&e.setStyle(i,s.style||{}),a&8&&p)for(let d=0;d<p.length;d++){let g=p[d],c=l[g],f=s[g];f!==c&&W(e,i,g,f,c)}a&16&&Y(e,i,l,s)}else Y(e,i,l,s);(!a||!(a&1))&&re(e,r,t,o,i,null,n)}function re(e,r,t,o,n,i,l){let s=t.shapeFlag,a=o.shapeFlag,p=t.children,d=o.children;if(a&8){s&16&&S(r,p),p!==d&&(n.textContent=d);return}if(a&16){s&16?he(e,r,p,d,n,i,l):(s&8&&(n.textContent=""),A(z(e,r),d,n,i,l));return}d==null&&(s&8?n.textContent="":s&16&&S(r,p))}function he(e,r,t,o,n,i,l){o.every(a=>a.key!==null&&a.key!==void 0)&&t.every(a=>a.key!==null&&a.key!==void 0)?me(t,o,n,i,l,null,!1):ge(t,o,n,i,l,null,!1)}function Ve(e,r,t,o,n,i,l){let s=t.children,a=o.children;Array.isArray(a)&&a.length>0?(re(e,r,t,o,n,i,l),o.el=a[0].el,o.anchor=a[a.length-1].el?e.nextSibling(a[a.length-1].el):i):Array.isArray(s)&&s.length>0&&a===null?(S(r,s),o.el=t.el,o.anchor=t.anchor):(o.el=t.el,o.anchor=t.anchor)}function Ce(e,r,t,o,n,i){let l=t.dynamicChildren,s=o.dynamicChildren;for(let a=0;a<s.length;a++)L(e,r,l[a],s[a],n,null,i)}function Ee(e,r,t){r.component=e.component,r.el=e.el,r.component&&r.component.update&&r.component.update()}function ve(e){function r(n,i){oe(e,r,n,i)}Ne({insert(n,i,l){e.insert(i,n,l)},createElement(n){return e.createElement(n)},createText(n){return e.createText(n)},setText(n,i){n.nodeValue=i},setElementText(n,i){n.textContent=i},remove(n){e.remove(n)},createComment(n){return e.createComment(n)},mount(n,i,l,s,a,p,d){o(null,n,i,l,s)},patch(n,i,l,s,a,p,d,g){o(n,i,l,s,a)},unmount(n,i,l,s){r(n)},move(n,i,l){e.insert(i,n.el,l)}});function o(n,i,l,s,a){L(e,r,n,i,l,s,a)}return{mount(n,i){i.nodeType===1&&(i.textContent=""),o(null,n,i,null,null)},patch(n,i,l){var s;o(n,i,l||((s=n.el)==null?void 0:s.parentNode),null,null)},unmount(n,i){r(n,i)}}}import{effect as C}from"@lytjs/reactivity/signal";function O(e,r){return C(()=>{let o=r();e.textContent=o==null?"":String(o)})}function _(e,r,t){return C(()=>{let n=t();e[r]=n})}function M(e,r,t){return C(()=>{let n=t();n==null||n===!1?e.removeAttribute(r):e.setAttribute(r,n===!0?"":String(n))})}function B(e,r){return C(()=>{let o=r();if(typeof o=="string")e.className=o;else if(Array.isArray(o))e.className=o.filter(Boolean).join(" ");else if(typeof o=="object"&&o!==null){let n=[],i=o;for(let l of Object.keys(i))i[l]&&n.push(l);e.className=n.join(" ")}else e.className=""})}function X(e,r,t){return e.addEventListener(r,t),()=>{e.removeEventListener(r,t)}}function I(e,r){return C(()=>{let o=r();if(typeof o=="string")e.style=o;else if(typeof o=="object"&&o!==null){let n=e.style;for(let i of Object.keys(n))n[i]="";for(let[i,l]of Object.entries(o))n[i]=l}else e.style=""})}function ie(e,r){return C(()=>{let o=r(),n=o==null?"":String(o);e.innerHTML!==n&&(e.innerHTML=n)})}function D(e,r,t){let o=e.parentNode!==null,n=t||null;!n&&e.parentNode&&(n=e.parentNode);let i=C(()=>{r()?o||(n&&n.parentNode?n.parentNode.insertBefore(e,n.nextSibling):n&&n.appendChild(e),o=!0):o&&e.parentNode&&(e.parentNode.removeChild(e),o=!1)});return()=>{i(),o&&e.parentNode&&e.parentNode.removeChild(e)}}function j(e,r,t,o){let n=[],i=[],l=new Map,s=C(()=>{let a=r();if(!Array.isArray(a))return;let p=a.map((f,u)=>o?o(f,u):u);if(p.length===i.length){let f=!0;for(let u=0;u<p.length;u++)if(p[u]!==i[u]){f=!1;break}if(f){for(let u=0;u<a.length;u++){let m=t(a[u],u),y=n[u];y&&y.parentNode===e&&e.replaceChild(m,y),n[u]=m,l.set(p[u],m)}return}}let d=new Set(i),g=new Set(p),c=new Map;for(let f=0;f<a.length;f++){let u=p[f];if(d.has(u)&&l.has(u)){let m=l.get(u);c.set(u,m),l.delete(u)}else{let m=t(a[f],f);c.set(u,m)}}for(let[f,u]of l)!g.has(f)&&u.parentNode===e&&e.removeChild(u);for(let f of n)f.parentNode===e&&e.removeChild(f);n=[],i=[];for(let f=0;f<a.length;f++){let u=p[f],m=c.get(u);e.appendChild(m),n.push(m),i.push(u)}l.clear();for(let[f,u]of c)l.set(f,u)});return()=>{s();for(let a of n)a.parentNode===e&&e.removeChild(a);n=[],i=[],l.clear()}}import{LytError as xe}from"@lytjs/common";var H=e=>{if(typeof document!="undefined")return document.createElement(e);throw new xe("LYT_RENDERER_VAPOR_ERROR","\u672A\u8BBE\u7F6E DOM \u5DE5\u5382\u51FD\u6570\u3002\u5728\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u4E2D\u8BF7\u8C03\u7528 setVaporDOMFactory()")};function Re(e){H=e}function T(){return H}function P(e,r,...t){let o={tag:e,children:[],props:{},events:{},bindings:[]};if(r)for(let[n,i]of Object.entries(r))if(n.startsWith("on")&&typeof i=="function"&&!se(i)){let l=n.slice(2).toLowerCase();o.events[l]=i}else se(i)?n==="textContent"||n==="text"?o.bindings.push({type:"text",target:"textContent",signal:i}):n==="className"||n==="class"?o.bindings.push({type:"class",target:"className",signal:i}):n==="style"?o.bindings.push({type:"style",target:"style",signal:i}):o.bindings.push({type:"prop",target:n,signal:i}):o.props[n]=i;for(let n of t)typeof n=="string"?o.children.push({tag:"#text",children:[],props:{},events:{},bindings:[],text:n}):o.children.push(n);return o}function se(e){if(typeof e!="function")return!1;let r=e;return!!r._subscribe||!!(r.set&&r._subscribe)}function h(e){if(e.tag==="#text"){let n=H("#text");return n.textContent=e.text||"",n.nodeType=3,n}let r=H(e.tag);e.el=r;let t=r;for(let[n,i]of Object.entries(e.props))if(n==="style"&&typeof i=="object"&&i!==null)for(let[l,s]of Object.entries(i))t.style[l]=s;else n==="className"||n==="class"?r.className=String(i):t[n]=i;let o=[];for(let n of e.bindings){if(!n.signal)continue;let i;if(n.type==="text")i=O(r,n.signal);else if(n.type==="prop")i=_(r,n.target,n.signal);else if(n.type==="attr")i=M(r,n.target,n.signal);else if(n.type==="class")i=B(r,n.signal);else if(n.type==="style")i=I(r,n.signal);else continue;o.push(i)}e._bindingCleanups=o;for(let[n,i]of Object.entries(e.events))X(r,n,i);for(let n of e.children){let i=h(n);r.appendChild(i)}return r}function le(e,r,t){if(e.tag!==r.tag){let s=h(r);e.el&&e.el.parentNode===t&&t.removeChild(e.el),t.appendChild(s);return}let o=e.el||h(e);r.el=o;let n=o;if(e._bindingCleanups)for(let s of e._bindingCleanups)s();let i=[];for(let s of r.bindings){if(!s.signal)continue;let a;if(s.type==="text")a=O(o,s.signal);else if(s.type==="prop")a=_(o,s.target,s.signal);else if(s.type==="attr")a=M(o,s.target,s.signal);else if(s.type==="class")a=B(o,s.signal);else if(s.type==="style")a=I(o,s.signal);else continue;i.push(a)}r._bindingCleanups=i;for(let[s,a]of Object.entries(r.props))if(s==="style"&&typeof a=="object"&&a!==null)for(let[p,d]of Object.entries(a))n.style[p]=d;else s==="className"||s==="class"?o.className=String(a):n[s]=a;r.text!==void 0&&(o.textContent=r.text);for(let[s,a]of Object.entries(e.events))r.events[s]||o.removeEventListener(s,a);for(let[s,a]of Object.entries(r.events))e.events[s]!==a&&(e.events[s]&&o.removeEventListener(s,e.events[s]),o.addEventListener(s,a));let l=Math.max(e.children.length,r.children.length);for(let s=0;s<l;s++){let a=e.children[s],p=r.children[s];if(!a&&p){let d=h(p);o.appendChild(d)}else a&&!p?a.el&&a.el.parentNode===o&&o.removeChild(a.el):a&&p&&le(a,p,o)}}function Z(e,r){let t=r.setup?r.setup():{};r.beforeMount&&r.beforeMount();let o;if(r.render){let l=r.render(t,P);o=Array.isArray(l)?l:[l]}else o=[];let n=[],i=[];for(let l of o){let s=h(l);e.appendChild(s),n.push(s),ae(l,i)}return r.mounted&&r.mounted(),()=>{r.beforeUnmount&&r.beforeUnmount();for(let l of i)l();for(let l of n)(l.parentNode===e||e===l.parentNode)&&e.removeChild(l);r.unmounted&&r.unmounted()}}function ae(e,r){e._bindingCleanups&&r.push(...e._bindingCleanups);for(let t of e.children)ae(t,r)}import{effect as pe}from"@lytjs/reactivity/signal";import{LytError as Te}from"@lytjs/common";function G(e){var o,n,i,l,s;let r={type:"fragment",children:[]},t=e.trim();for(;t.length>0;){let a=t.match(/^<([a-zA-Z][a-zA-Z0-9-]*)([\s\S]*?)(\/?)>/);if(a){let p=a[1],d=a[2],g=a[3]==="/",{props:c,events:f,directives:u}=we(d),m={type:"element",tag:p,props:c,events:f,directives:u,children:[]};if(t=t.slice(a[0].length),g){((o=r.children)!=null?o:[]).push(m);continue}let y=`</${p}>`,V=be(t,p);if(V===-1)throw new Te("LYT_RENDERER_VAPOR_COMPILER_ERROR",`\u672A\u627E\u5230\u95ED\u5408\u6807\u7B7E: </${p}>`);let E=t.slice(0,V);t=t.slice(V+y.length);let N=G(E);m.children=N.children||[],((n=r.children)!=null?n:[]).push(m)}else{let p=t.indexOf("<"),d;if(p===-1?(d=t,t=""):(d=t.slice(0,p),t=t.slice(p)),d.trim())if(d.includes("{{")){let g=ke(d);for(let c of g)c.type==="text"?((i=r.children)!=null?i:[]).push({type:"text",text:c.value}):((l=r.children)!=null?l:[]).push({type:"interpolation",expression:c.value})}else((s=r.children)!=null?s:[]).push({type:"text",text:d})}}return r}function be(e,r){let t=1,o=0,n=`<${r}`,i=`</${r}>`;for(;o<e.length&&t>0;){let l=e.indexOf(n,o),s=e.indexOf(i,o);if(s===-1)return-1;if(l!==-1&&l<s){let a=e[l+n.length];a===">"||a===" "||a==="/"?(t++,o=l+n.length):(o=s+i.length,t--)}else o=s+i.length,t--}return t===0?o-i.length:-1}function we(e){let r={},t={},o={},n=/([a-zA-Z@:][a-zA-Z0-9@:.-]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,i;for(;(i=n.exec(e))!==null;){let l=i[1],s=i[2]||i[3];if(l.startsWith("on:")){let a=l.slice(3);t[a]=s}else if(l.startsWith(":")){let a=l.slice(1);r[a]=s}else if(l==="v-if")o.if=s;else if(l==="v-each"){let a=s.match(/^\s*(\w+)\s+in\s+(.+)\s*$/);a&&(o.each={item:a[1],expression:a[2]})}else r[l]=s}return{props:r,events:t,directives:o}}function ke(e){let r=[],t=/\{\{([\s\S]*?)\}\}/g,o=0,n;for(;(n=t.exec(e))!==null;)n.index>o&&r.push({type:"text",value:e.slice(o,n.index)}),r.push({type:"interpolation",value:n[1].trim()}),o=n.index+n[0].length;return o<e.length&&r.push({type:"text",value:e.slice(o)}),r}function q(e){let r=G(e);return{render:Ae(r),ast:r}}function Ae(e){return function(t){let o=T();return x(e,t,o)}}function x(e,r,t){var o,n;if(e.type==="fragment"){if(e.children&&e.children.length===1)return x(e.children[0],r,t);let i=t("div");if(i.nodeType=11,i.childNodes=i.childNodes||[],e.children)for(let l of e.children){let s=x(l,r,t);i.appendChild?i.appendChild(s):i.childNodes.push(s)}return i}if(e.type==="text"){let i=t("#text");return i.textContent=e.text||"",i.nodeType=3,i}if(e.type==="interpolation"){let i=t("span"),l=e.expression||"",s=b(r,l);if(F(s)){let a=s,p=t("#text");p.nodeType=3,p.textContent=String(a());let d=pe(()=>{p.textContent=a()===null||a()===void 0?"":String(a())});i.appendChild(p),i._bindingCleanup=d,ce(i,d)}else i.textContent=s!=null?String(s):"";return i}if(e.type==="element"){if((o=e.directives)!=null&&o.each){let{item:s,expression:a}=e.directives.each,p=b(r,a);if(F(p)){let c=t("#fragment");c.childNodes=[],c.nodeType=11;let f=c;return j(f,p,(u,m)=>{let y={...r,[s]:u,index:m},V=t(e.tag||"div");if(e.props)for(let[E,N]of Object.entries(e.props))E==="class"||E==="className"?V.className=N:V[E]=N;if(e.children)for(let E of e.children){let N=x(E,y,t);V.appendChild(N)}return V}),f}let d=Array.isArray(p)?p:[],g=t("#fragment");if(g.childNodes=[],g.nodeType=11,d.length>0)for(let c=0;c<d.length;c++){let f={...r,[s]:d[c],index:c},u=t(e.tag||"div");if(e.props)for(let[m,y]of Object.entries(e.props))m==="class"||m==="className"?u.className=y:u[m]=y;if(e.children)for(let m of e.children){let y=x(m,f,t);u.appendChild(y)}g.appendChild(u)}return g}let i=t(e.tag||"div"),l=i;if((n=e.directives)!=null&&n.if){let s=b(r,e.directives.if);F(s)?D(i,s):s||(l.style=l.style||{},l.style.display="none",l.hidden=!0)}if(e.props)for(let[s,a]of Object.entries(e.props))if(s.startsWith(":")){let p=s.slice(1),d=b(r,a);if(F(d)){let g=d,c=pe(()=>{l[p]=g()});i._propBindingCleanup=c,ce(i,c)}else l[p]=d}else s==="class"||s==="className"?i.className=a:l[s]=a;if(e.events)for(let[s,a]of Object.entries(e.events)){let p=b(r,a);typeof p=="function"&&i.addEventListener(s,p)}if(e.children)for(let s of e.children){let a=x(s,r,t);if(a.nodeType===11&&a.childNodes)for(let p of a.childNodes)i.appendChild(p);else i.appendChild(a)}return i}return t("div")}function b(e,r){let t=r.trim();if(/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(t))return e[t];let o=t.split("."),n=e;for(let i of o){if(n==null)return;n=n[i]}return n}function F(e){return typeof e!="function"?!1:!!e._subscribe}function ce(e,r){let t=e;t._cleanupEffects||(t._cleanupEffects=[]),t._cleanupEffects.push(r)}function Se(e){return e.__vapor__=!0,e}function Le(e){let r=!1,t=null,o=null;return{mount(n){if(!r){if(typeof n=="string")if(typeof document!="undefined"){let i=document.querySelector(n);if(!i)throw new Error(`[lyt:vapor] \u672A\u627E\u5230\u6302\u8F7D\u76EE\u6807: ${n}`);o=i}else throw new Error("[lyt:vapor] \u5728\u975E\u6D4F\u89C8\u5668\u73AF\u5883\u4E2D\uFF0C\u8BF7\u76F4\u63A5\u4F20\u5165\u5BB9\u5668\u5143\u7D20");else o=n;t=Z(o,e),r=!0}},unmount(){r&&(t&&(t(),t=null),r=!1,o=null)}}}function Oe(e,r){let t=e.setup?{...e.setup(),...r}:{...r};e.beforeMount&&e.beforeMount();let o;if(e.template){let{render:n}=q(e.template);o=n(t)}else if(e.render){let n=e.render(t,P),i=Array.isArray(n)?n:[n];if(i.length===1)o=h(i[0]);else{o=T()("div");for(let s of i)o.appendChild(h(s))}}else throw new Error("[lyt:vapor] \u7EC4\u4EF6\u5FC5\u987B\u63D0\u4F9B template \u6216 render \u51FD\u6570");return e.mounted&&e.mounted(),o}export{ee as Comment,J as Fragment,U as PatchFlags,R as ShapeFlags,Q as Text,M as bindAttr,B as bindClass,j as bindEach,X as bindEvent,ie as bindHTML,D as bindIf,_ as bindProp,I as bindStyle,O as bindText,q as compileToVapor,ve as createRenderer,Le as createVaporApp,P as createVaporElement,Se as defineVaporComponent,T as getVaporDOMFactory,G as parseTemplate,Oe as renderVaporComponent,h as renderVaporNode,Re as setVaporDOMFactory,Z as vaporMount,le as vaporPatch};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lytjs/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Lyt.js 渲染器 - 多平台渲染抽象层(DOM/SSR/Native/MiniApp)",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -68,8 +68,9 @@
|
|
|
68
68
|
"ssr"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@lytjs/
|
|
72
|
-
"@lytjs/
|
|
71
|
+
"@lytjs/common": "^5.0.0",
|
|
72
|
+
"@lytjs/reactivity": "^5.0.0",
|
|
73
|
+
"@lytjs/vdom": "^5.0.0"
|
|
73
74
|
},
|
|
74
75
|
"engines": {
|
|
75
76
|
"node": ">=18.0.0"
|