@lytjs/component 4.0.5 → 4.1.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/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/define-component.d.ts +49 -37
- package/dist/types/define-component.d.ts.map +1 -1
- package/dist/types/emit.d.ts +13 -0
- package/dist/types/emit.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var j=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var xe=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Oe=(e,t)=>{for(var n in t)j(e,n,{get:t[n],enumerable:!0})},Pe=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of xe(t))!ke.call(e,r)&&r!==n&&j(e,r,{get:()=>t[r],enumerable:!(o=be(t,r))||o.enumerable});return e};var Ce=e=>Pe(j({},"__esModule",{value:!0}),e);var Fe={};Oe(Fe,{LifecycleHook:()=>w,callLifecycleHook:()=>m,camelizeToHyphen:()=>C,compositionOnBeforeMount:()=>pe,compositionOnBeforeUnmount:()=>ae,compositionOnMounted:()=>ie,compositionOnUnmounted:()=>se,compositionOnUpdated:()=>le,createComponentInstance:()=>de,createLifecycleHook:()=>g,createSignalState:()=>N,createSignalStateProxy:()=>U,currentInstance:()=>h,defineComponent:()=>ye,disposeSignalState:()=>G,emit:()=>L,getCurrentInstance:()=>fe,getPropDefaultValue:()=>A,getSignalStateSnapshot:()=>Z,hasSlot:()=>re,hyphenToCamel:()=>J,initProps:()=>P,initSlots:()=>F,inject:()=>ce,mountComponent:()=>ge,normalizeEmits:()=>H,normalizePropsOptions:()=>T,normalizeSlotValue:()=>k,onBeforeUnmount:()=>te,onBeforeUpdate:()=>Y,onInit:()=>Q,onMounted:()=>X,onUnmounted:()=>ne,onUpdated:()=>ee,patchSignalState:()=>R,provide:()=>ue,renderSlot:()=>oe,runSetup:()=>v,setCurrentInstance:()=>E,setupComponent:()=>me,setupFunctionComponent:()=>K,setupStatefulComponent:()=>V,unmountComponent:()=>W,updateComponent:()=>Se,validateProp:()=>_});module.exports=Ce(Fe);var S=require("@lytjs/reactivity"),M=require("@lytjs/reactivity/signal");var q=require("@lytjs/reactivity/signal");function N(e){let t={},n=Object.keys(e);for(let o=0;o<n.length;o++){let r=n[o];t[r]=(0,q.signal)(e[r])}return t}function b(e){return typeof e=="function"&&e!==null&&"set"in e}function U(e){return new Proxy(e,{get(t,n){if(typeof n=="symbol")return t[n];let o=t[n];return b(o)?o():t[n]},set(t,n,o){if(typeof n=="symbol")return t[n]=o,!0;let r=t[n];return b(r)?r.set(o):t[n]=o,!0},has(t,n){return n in t},ownKeys(t){return Object.keys(t)},getOwnPropertyDescriptor(t,n){if(typeof n=="string"&&n in t)return{configurable:!0,enumerable:!0,get:()=>{let o=t[n];return b(o)?o():o},set:o=>{let r=t[n];b(r)?r.set(o):t[n]=o}}}})}function Z(e){let t={},n=Object.keys(e);for(let o=0;o<n.length;o++){let r=n[o],l=e[r];t[r]=b(l)?l():l}return t}function R(e,t){let n=Object.keys(t);for(let o=0;o<n.length;o++){let r=n[o],l=e[r];b(l)&&l.set(t[r])}}function G(e){}function he(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function D(e){return typeof e=="function"}function Ee(e){return typeof e=="string"}function Ie(e){return typeof e=="boolean"}function Ne(e){return typeof e=="number"&&!isNaN(e)}function x(e){return Array.isArray(e)}function Ue(e){return e!==null&&typeof e=="object"}function Re(e){return e===String?"String":e===Number?"Number":e===Boolean?"Boolean":e===Array?"Array":e===Object?"Object":e===Function?"Function":"unknown"}function T(e){if(!e)return{options:{},keys:[]};if(x(e)){let r={},l=[];for(let i=0;i<e.length;i++){let s=e[i];r[s]={type:null},l.push(s)}return{options:r,keys:l}}let t={},n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){let l=o[r],i=e[l];i==null?t[l]={type:null}:i===String||i===Number||i===Boolean||i===Array||i===Object||i===Function?t[l]={type:i}:he(i)?t[l]={...i}:x(i)?t[l]={type:i}:t[l]={type:null},n.push(l)}return{options:t,keys:n}}function _(e,t,n){let{type:o,required:r,validator:l}=t;if(n==null)return!r;if(o!=null){let i=x(o)?o:[o],s=!1;for(let p=0;p<i.length;p++){let a=i[p],u=!1;if(a===String?u=Ee(n):a===Number?u=Ne(n):a===Boolean?u=Ie(n):a===Function?u=D(n):a===Array?u=x(n):a===Object&&(u=Ue(n)),u){s=!0;break}}if(!s){let p=i.map(Re).join(" | ");return!1}}if(l&&D(l))try{if(!l(n))return!1}catch(i){return!1}return!0}function A(e,t){let{default:n}=e;if(n!==void 0){if(D(n)){let o=e.type;if(!(o===Function||x(o)&&o.indexOf(Function)!==-1))return n()}return n}}function P(e,t){let{options:n,keys:o}=e.propsOptions,r={};for(let l=0;l<o.length;l++){let i=o[l],s=n[i],p=t?t[i]:void 0;p===void 0&&(p=A(s,i)),s.type!==null&&s.type!==void 0&&(x(s.type)?s.type:[s.type]).indexOf(Boolean)!==-1&&p===void 0&&(p=!1),_(i,s,p),r[i]=p}return e.props=r,r}function C(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function J(e){return e.replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function $(e){return typeof e=="function"}function Te(e){return Array.isArray(e)}function H(e){if(!e)return{keys:[],validators:{}};let t=[],n={};if(Te(e)){for(let r=0;r<e.length;r++){let l=C(e[r]);t.push(l),n[l]=null}return{keys:t,validators:n}}let o=Object.keys(e);for(let r=0;r<o.length;r++){let l=o[r],i=C(l),s=e[l];t.push(i),$(s)?n[i]=s:n[i]=null}return{keys:t,validators:n}}function L(e,t,...n){let o=C(t),r=e.emitsOptions;if(r&&r.keys.length>0){let a=r.keys.indexOf(o)!==-1,u=r.validators[o];if($(u))try{if(!u(...n))return!1}catch(y){return!1}}let l="on"+o.charAt(0).toUpperCase()+o.slice(1),i=l.replace(/-([a-z])/g,(a,u)=>u.toUpperCase()),s=e.props||{},p=s[i]||s[l];return $(p)?(p(...n),!0):!1}var w=(i=>(i.INIT="init",i.MOUNTED="mounted",i.BEFORE_UPDATE="beforeUpdate",i.UPDATED="updated",i.BEFORE_UNMOUNT="beforeUnmount",i.UNMOUNTED="unmounted",i))(w||{}),h=null;function He(e){return typeof e=="function"}function E(e){let t=h;return h=e,t}function g(e){return function(n,o){if(!He(n))return;let r=o||h;r&&(r[e]||(r[e]=[]),r[e].push(n))}}function m(e,t,...n){let o=e[t];if(!(!o||o.length===0))for(let r=0;r<o.length;r++)try{o[r](...n)}catch(l){}}var Q=g("init"),X=g("mounted"),Y=g("beforeUpdate"),ee=g("updated"),te=g("beforeUnmount"),ne=g("unmounted");function z(e){return typeof e=="function"}function Le(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function k(e){return e==null?null:z(e)?e:Array.isArray(e)?e.length>0?e:null:e}function F(e,t){let n={};if(t==null)return e.slots=n,n;if(z(t)||Array.isArray(t))return n.default=k(t),e.slots=n,n;if(Le(t)){let o=Object.keys(t);for(let r=0;r<o.length;r++){let l=o[r],i=t[l];i!==void 0&&(n[l]=k(i))}return e.slots=n,n}return n.default=k(t),e.slots=n,n}function oe(e,t="default",n){let o=e[t];return o==null?null:z(o)?o(n):o}function re(e,t="default"){let n=e[t];return n!=null}var c=null;function ie(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.mounted||(t.mounted=[])).push(e)}}function se(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.unmounted||(t.unmounted=[])).push(e)}}function le(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.updated||(t.updated=[])).push(e)}}function pe(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.beforeMount||(t.beforeMount=[])).push(e)}}function ae(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.beforeUnmount||(t.beforeUnmount=[])).push(e)}}var B=new WeakMap;function ue(e,t){if(c){let n=B.get(c);n||(n=new Map,B.set(c,n)),n.set(e,t)}}function ce(e,t){if(c){let n=c;for(;n;){let o=B.get(n);if(o&&o.has(e))return o.get(e);n=n._parent}}return t}function v(e,t,n,o){c=t;try{return e(n,o)}finally{c=null}}function fe(){return c}var f=require("@lytjs/common");function ye(e){return{name:e.name,options:e,_isComponentDefine:!0}}function de(e){let t=e.options,n=T(t.props),o=H(t.emits),r={_isComponent:!0,type:t,name:e.name||t.name,propsOptions:n,emitsOptions:o,props:{},state:{},setupState:{},computedRefs:{},subTree:null,isMounted:!1,isUnmounted:!1,slots:{},watchStopHandles:[],renderProxy:null,emit:null};return r.emit=(l,...i)=>L(r,l,...i),r.renderProxy=we(r),r}function we(e){return{get $name(){return e.name},get $props(){return e.props},get $state(){return e.state},get $slots(){return e.slots},get $isMounted(){return e.isMounted},$emit:e.emit,$forceUpdate(){e.update&&e.update()},$unmount(){W(e)},$setState(n){e._signalState?R(e._signalState,n):(0,f.mergeObjects)(e.state,n),e.update&&e.update()}}}function me(e,t,n){P(e,t||null),F(e,n||null);let o=e.type;(0,f.isFunction)(o)&&!o._isComponentDefine?K(e):V(e)}function V(e){let{type:t}=e,n=t.reactivityMode==="signal",o=E(e);try{if((0,f.isFunction)(t.setup)){let i={attrs:e.props,slots:e.slots,emit:e.emit},s=v(t.setup,e,e.props,i);if((0,f.isFunction)(s))t.render=s;else if((0,f.isPlainObject)(s)){e.setupState={...s};let p=Object.keys(s);for(let a=0;a<p.length;a++)Object.defineProperty(e.renderProxy,p[a],{get(){return e.setupState[p[a]]},set(u){e.setupState[p[a]]=u},enumerable:!0})}}if((0,f.isFunction)(t.state)){let i=t.state();if((0,f.isPlainObject)(i))if(n){let s=N(i);e._signalState=s,e.state=U(s)}else e.state=(0,S.shallowReactive)({...i})}if(t.computed){let i=Object.keys(t.computed);for(let s=0;s<i.length;s++){let p=i[s],a=t.computed[p],u=typeof a=="function"?()=>a.call(e.renderProxy):()=>a.get.call(e.renderProxy),y=typeof a=="function"?void 0:O=>a.set.call(e.renderProxy,O),d;n?d=(0,M.computed)(u):y?d=(0,S.computed)({get:u,set:y}):d=(0,S.computed)(u),e.computedRefs[p]=d}}let r=t.methods;if((0,f.isPlainObject)(r)){let i=Object.keys(r);for(let s=0;s<i.length;s++){let p=i[s],a=r[p];(0,f.isFunction)(a)&&(e.renderProxy[p]=a.bind(e.renderProxy))}}if((0,f.isFunction)(t.init)){let i=t.init.call(e.renderProxy,e.props,e.state);if((0,f.isPlainObject)(i)){e.setupState={...e.setupState,...i};let s=Object.keys(i);for(let p=0;p<s.length;p++)Object.defineProperty(e.renderProxy,s[p],{get(){return e.setupState[s[p]]},set(a){e.setupState[s[p]]=a},enumerable:!0})}}let l=Object.keys(e.state);for(let i=0;i<l.length;i++){let s=l[i];Object.defineProperty(e.renderProxy,s,{get(){return e.state[s]},set(p){e.state[s]=p},enumerable:!0})}if(t.computed){let i=Object.keys(t.computed);for(let s=0;s<i.length;s++){let p=i[s],a=e.computedRefs[p];n?Object.defineProperty(e.renderProxy,p,{get(){return a()},enumerable:!0}):Object.defineProperty(e.renderProxy,p,{get(){return a.value},set(u){a.value=u},enumerable:!0})}}if(t.watch){let i=Object.keys(t.watch);for(let s=0;s<i.length;s++){let p=i[s],a=t.watch[p],u=()=>{let y=e.state[p];if(y!==void 0)return y;let d=e.props[p];return d!==void 0?d:e.renderProxy[p]};if(n){let y=(0,M.effect)(d=>{let O=u();a.handler.call(e.renderProxy,O,void 0)});e.watchStopHandles.push(y)}else{let y=(0,S.watch)(u,(d,O)=>{a.handler.call(e.renderProxy,d,O)},{immediate:!!a.immediate,deep:!!a.deep});e.watchStopHandles.push(y)}}}m(e,"init")}finally{E(o)}}function K(e){let t=e.type,n={slots:e.slots,emit:e.emit},o=t(e.props,n);e.subTree=o}function I(e,t){let n=e._lifecycleHooks;if(!n||!n[t])return;let o=n[t];for(let r=0;r<o.length;r++)try{o[r]()}catch(l){}}function ge(e,t){if(e.isMounted)return;I(e,"beforeMount");let{type:n}=e;(0,f.isFunction)(n.render)&&t&&(e.subTree=n.render.call(e.renderProxy,t,e)),e.isMounted=!0,m(e,"mounted"),I(e,"mounted")}function Se(e,t,n){if(e.isUnmounted)return;n&&P(e,n),m(e,"beforeUpdate");let{type:o}=e;(0,f.isFunction)(o.render)&&t&&(e.subTree=o.render.call(e.renderProxy,t,e)),m(e,"updated"),I(e,"updated")}function W(e){if(e.isUnmounted)return;m(e,"beforeUnmount"),I(e,"beforeUnmount"),e.isUnmounted=!0,e.isMounted=!1,e.subTree=null;for(let n of e.watchStopHandles)n();e.watchStopHandles=[],m(e,"unmounted"),I(e,"unmounted");let t=["init","mounted","beforeUpdate","updated","beforeUnmount","unmounted"];for(let n=0;n<t.length;n++)e[t[n]]=void 0;e._lifecycleHooks=void 0}
|
|
1
|
+
var j=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var Ce=(e,t)=>{for(var n in t)j(e,n,{get:t[n],enumerable:!0})},he=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Oe(t))!Pe.call(e,r)&&r!==n&&j(e,r,{get:()=>t[r],enumerable:!(o=ke(t,r))||o.enumerable});return e};var Ee=e=>he(j({},"__esModule",{value:!0}),e);var Me={};Ce(Me,{LifecycleHook:()=>v,callLifecycleHook:()=>m,camelizeToHyphen:()=>C,compositionOnBeforeMount:()=>pe,compositionOnBeforeUnmount:()=>ue,compositionOnMounted:()=>se,compositionOnUnmounted:()=>le,compositionOnUpdated:()=>ae,createComponentInstance:()=>ge,createLifecycleHook:()=>g,createSignalState:()=>N,createSignalStateProxy:()=>U,currentInstance:()=>h,defineComponent:()=>de,defineEmits:()=>J,defineFunctionalComponent:()=>me,disposeSignalState:()=>G,emit:()=>L,getCurrentInstance:()=>ye,getPropDefaultValue:()=>_,getSignalStateSnapshot:()=>Z,hasSlot:()=>ie,hyphenToCamel:()=>Q,initProps:()=>P,initSlots:()=>F,inject:()=>fe,mountComponent:()=>xe,normalizeEmits:()=>H,normalizePropsOptions:()=>T,normalizeSlotValue:()=>k,onBeforeUnmount:()=>ne,onBeforeUpdate:()=>ee,onInit:()=>X,onMounted:()=>Y,onUnmounted:()=>oe,onUpdated:()=>te,patchSignalState:()=>R,provide:()=>ce,renderSlot:()=>re,runSetup:()=>w,setCurrentInstance:()=>E,setupComponent:()=>Se,setupFunctionComponent:()=>K,setupStatefulComponent:()=>V,unmountComponent:()=>W,updateComponent:()=>be,validateProp:()=>A});module.exports=Ee(Me);var S=require("@lytjs/reactivity"),M=require("@lytjs/reactivity/signal");var q=require("@lytjs/reactivity/signal");function N(e){let t={},n=Object.keys(e);for(let o=0;o<n.length;o++){let r=n[o];t[r]=(0,q.signal)(e[r])}return t}function x(e){return typeof e=="function"&&e!==null&&"set"in e}function U(e){return new Proxy(e,{get(t,n){if(typeof n=="symbol")return t[n];let o=t[n];return x(o)?o():t[n]},set(t,n,o){if(typeof n=="symbol")return t[n]=o,!0;let r=t[n];return x(r)?r.set(o):t[n]=o,!0},has(t,n){return n in t},ownKeys(t){return Object.keys(t)},getOwnPropertyDescriptor(t,n){if(typeof n=="string"&&n in t)return{configurable:!0,enumerable:!0,get:()=>{let o=t[n];return x(o)?o():o},set:o=>{let r=t[n];x(r)?r.set(o):t[n]=o}}}})}function Z(e){let t={},n=Object.keys(e);for(let o=0;o<n.length;o++){let r=n[o],l=e[r];t[r]=x(l)?l():l}return t}function R(e,t){let n=Object.keys(t);for(let o=0;o<n.length;o++){let r=n[o],l=e[r];x(l)&&l.set(t[r])}}function G(e){}function Ie(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function D(e){return typeof e=="function"}function Ne(e){return typeof e=="string"}function Ue(e){return typeof e=="boolean"}function Re(e){return typeof e=="number"&&!isNaN(e)}function b(e){return Array.isArray(e)}function Te(e){return e!==null&&typeof e=="object"}function He(e){return e===String?"String":e===Number?"Number":e===Boolean?"Boolean":e===Array?"Array":e===Object?"Object":e===Function?"Function":"unknown"}function T(e){if(!e)return{options:{},keys:[]};if(b(e)){let r={},l=[];for(let i=0;i<e.length;i++){let s=e[i];r[s]={type:null},l.push(s)}return{options:r,keys:l}}let t={},n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){let l=o[r],i=e[l];i==null?t[l]={type:null}:i===String||i===Number||i===Boolean||i===Array||i===Object||i===Function?t[l]={type:i}:Ie(i)?t[l]={...i}:b(i)?t[l]={type:i}:t[l]={type:null},n.push(l)}return{options:t,keys:n}}function A(e,t,n){let{type:o,required:r,validator:l}=t;if(n==null)return!r;if(o!=null){let i=b(o)?o:[o],s=!1;for(let a=0;a<i.length;a++){let p=i[a],u=!1;if(p===String?u=Ne(n):p===Number?u=Re(n):p===Boolean?u=Ue(n):p===Function?u=D(n):p===Array?u=b(n):p===Object&&(u=Te(n)),u){s=!0;break}}if(!s){let a=i.map(He).join(" | ");return!1}}if(l&&D(l))try{if(!l(n))return!1}catch(i){return!1}return!0}function _(e,t){let{default:n}=e;if(n!==void 0){if(D(n)){let o=e.type;if(!(o===Function||b(o)&&o.indexOf(Function)!==-1))return n()}return n}}function P(e,t){let{options:n,keys:o}=e.propsOptions,r={};for(let l=0;l<o.length;l++){let i=o[l],s=n[i],a=t?t[i]:void 0;a===void 0&&(a=_(s,i)),s.type!==null&&s.type!==void 0&&(b(s.type)?s.type:[s.type]).indexOf(Boolean)!==-1&&a===void 0&&(a=!1),A(i,s,a),r[i]=a}return e.props=r,r}function J(e){return e}function C(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Q(e){return e.replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function $(e){return typeof e=="function"}function Le(e){return Array.isArray(e)}function H(e){if(!e)return{keys:[],validators:{}};let t=[],n={};if(Le(e)){for(let r=0;r<e.length;r++){let l=C(e[r]);t.push(l),n[l]=null}return{keys:t,validators:n}}let o=Object.keys(e);for(let r=0;r<o.length;r++){let l=o[r],i=C(l),s=e[l];t.push(i),$(s)?n[i]=s:n[i]=null}return{keys:t,validators:n}}function L(e,t,...n){let o=C(t),r=e.emitsOptions;if(r&&r.keys.length>0){let p=r.keys.indexOf(o)!==-1,u=r.validators[o];if($(u))try{if(!u(...n))return!1}catch(y){return!1}}let l="on"+o.charAt(0).toUpperCase()+o.slice(1),i=l.replace(/-([a-z])/g,(p,u)=>u.toUpperCase()),s=e.props||{},a=s[i]||s[l];return $(a)?(a(...n),!0):!1}var v=(i=>(i.INIT="init",i.MOUNTED="mounted",i.BEFORE_UPDATE="beforeUpdate",i.UPDATED="updated",i.BEFORE_UNMOUNT="beforeUnmount",i.UNMOUNTED="unmounted",i))(v||{}),h=null;function ve(e){return typeof e=="function"}function E(e){let t=h;return h=e,t}function g(e){return function(n,o){if(!ve(n))return;let r=o||h;r&&(r[e]||(r[e]=[]),r[e].push(n))}}function m(e,t,...n){let o=e[t];if(!(!o||o.length===0))for(let r=0;r<o.length;r++)try{o[r](...n)}catch(l){}}var X=g("init"),Y=g("mounted"),ee=g("beforeUpdate"),te=g("updated"),ne=g("beforeUnmount"),oe=g("unmounted");function z(e){return typeof e=="function"}function Fe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function k(e){return e==null?null:z(e)?e:Array.isArray(e)?e.length>0?e:null:e}function F(e,t){let n={};if(t==null)return e.slots=n,n;if(z(t)||Array.isArray(t))return n.default=k(t),e.slots=n,n;if(Fe(t)){let o=Object.keys(t);for(let r=0;r<o.length;r++){let l=o[r],i=t[l];i!==void 0&&(n[l]=k(i))}return e.slots=n,n}return n.default=k(t),e.slots=n,n}function re(e,t="default",n){let o=e[t];return o==null?null:z(o)?o(n):o}function ie(e,t="default"){let n=e[t];return n!=null}var c=null;function se(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.mounted||(t.mounted=[])).push(e)}}function le(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.unmounted||(t.unmounted=[])).push(e)}}function ae(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.updated||(t.updated=[])).push(e)}}function pe(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.beforeMount||(t.beforeMount=[])).push(e)}}function ue(e){if(c){let t=c._lifecycleHooks||(c._lifecycleHooks={});(t.beforeUnmount||(t.beforeUnmount=[])).push(e)}}var B=new WeakMap;function ce(e,t){if(c){let n=B.get(c);n||(n=new Map,B.set(c,n)),n.set(e,t)}}function fe(e,t){if(c){let n=c;for(;n;){let o=B.get(n);if(o&&o.has(e))return o.get(e);n=n._parent}}return t}function w(e,t,n,o){c=t;try{return e(n,o)}finally{c=null}}function ye(){return c}var f=require("@lytjs/common");function de(e){return{name:e.name,options:e,_isComponentDefine:!0}}function me(e){return{options:e,_isComponentDefine:!0}}function ge(e){let t=e.options,n=T(t.props),o=H(t.emits),r={_isComponent:!0,type:t,name:e.name||t.name,propsOptions:n,emitsOptions:o,props:{},state:{},setupState:{},computedRefs:{},subTree:null,isMounted:!1,isUnmounted:!1,slots:{},watchStopHandles:[],renderProxy:null,emit:null};return r.emit=(l,...i)=>L(r,l,...i),r.renderProxy=we(r),r}function we(e){return{get $name(){return e.name},get $props(){return e.props},get $state(){return e.state},get $slots(){return e.slots},get $isMounted(){return e.isMounted},$emit:e.emit,$forceUpdate(){e.update&&e.update()},$unmount(){W(e)},$setState(n){e._signalState?R(e._signalState,n):(0,f.mergeObjects)(e.state,n),e.update&&e.update()}}}function Se(e,t,n){P(e,t||null),F(e,n||null);let o=e.type;(0,f.isFunction)(o)&&!o._isComponentDefine?K(e):V(e)}function V(e){let{type:t}=e,n=t.reactivityMode==="signal",o=E(e);try{if((0,f.isFunction)(t.setup)){let i={attrs:e.props,slots:e.slots,emit:e.emit},s=w(t.setup,e,e.props,i);if((0,f.isFunction)(s))t.render=s;else if((0,f.isPlainObject)(s)){e.setupState={...s};let a=Object.keys(s);for(let p=0;p<a.length;p++)Object.defineProperty(e.renderProxy,a[p],{get(){return e.setupState[a[p]]},set(u){e.setupState[a[p]]=u},enumerable:!0})}}if((0,f.isFunction)(t.state)){let i=t.state();if((0,f.isPlainObject)(i))if(n){let s=N(i);e._signalState=s,e.state=U(s)}else e.state=(0,S.shallowReactive)({...i})}if(t.computed){let i=Object.keys(t.computed);for(let s=0;s<i.length;s++){let a=i[s],p=t.computed[a],u=typeof p=="function"?()=>p.call(e.renderProxy):()=>p.get.call(e.renderProxy),y=typeof p=="function"?void 0:O=>p.set.call(e.renderProxy,O),d;n?d=(0,M.computed)(u):y?d=(0,S.computed)({get:u,set:y}):d=(0,S.computed)(u),e.computedRefs[a]=d}}let r=t.methods;if((0,f.isPlainObject)(r)){let i=Object.keys(r);for(let s=0;s<i.length;s++){let a=i[s],p=r[a];(0,f.isFunction)(p)&&(e.renderProxy[a]=p.bind(e.renderProxy))}}if((0,f.isFunction)(t.init)){let i=t.init.call(e.renderProxy,e.props,e.state);if((0,f.isPlainObject)(i)){e.setupState={...e.setupState,...i};let s=Object.keys(i);for(let a=0;a<s.length;a++)Object.defineProperty(e.renderProxy,s[a],{get(){return e.setupState[s[a]]},set(p){e.setupState[s[a]]=p},enumerable:!0})}}let l=Object.keys(e.state);for(let i=0;i<l.length;i++){let s=l[i];Object.defineProperty(e.renderProxy,s,{get(){return e.state[s]},set(a){e.state[s]=a},enumerable:!0})}if(t.computed){let i=Object.keys(t.computed);for(let s=0;s<i.length;s++){let a=i[s],p=e.computedRefs[a];n?Object.defineProperty(e.renderProxy,a,{get(){return p()},enumerable:!0}):Object.defineProperty(e.renderProxy,a,{get(){return p.value},set(u){p.value=u},enumerable:!0})}}if(t.watch){let i=Object.keys(t.watch);for(let s=0;s<i.length;s++){let a=i[s],p=t.watch[a],u=()=>{let y=e.state[a];if(y!==void 0)return y;let d=e.props[a];return d!==void 0?d:e.renderProxy[a]};if(n){let y=(0,M.effect)(d=>{let O=u();p.handler.call(e.renderProxy,O,void 0)});e.watchStopHandles.push(y)}else{let y=(0,S.watch)(u,(d,O)=>{p.handler.call(e.renderProxy,d,O)},{immediate:!!p.immediate,deep:!!p.deep});e.watchStopHandles.push(y)}}}m(e,"init")}finally{E(o)}}function K(e){let t=e.type,n={slots:e.slots,emit:e.emit},o=t(e.props,n);e.subTree=o}function I(e,t){let n=e._lifecycleHooks;if(!n||!n[t])return;let o=n[t];for(let r=0;r<o.length;r++)try{o[r]()}catch(l){}}function xe(e,t){if(e.isMounted)return;I(e,"beforeMount");let{type:n}=e;(0,f.isFunction)(n.render)&&t&&(e.subTree=n.render.call(e.renderProxy,t,e)),e.isMounted=!0,m(e,"mounted"),I(e,"mounted")}function be(e,t,n){if(e.isUnmounted)return;n&&P(e,n),m(e,"beforeUpdate");let{type:o}=e;(0,f.isFunction)(o.render)&&t&&(e.subTree=o.render.call(e.renderProxy,t,e)),m(e,"updated"),I(e,"updated")}function W(e){if(e.isUnmounted)return;m(e,"beforeUnmount"),I(e,"beforeUnmount"),e.isUnmounted=!0,e.isMounted=!1,e.subTree=null;for(let n of e.watchStopHandles)n();e.watchStopHandles=[],m(e,"unmounted"),I(e,"unmounted");let t=["init","mounted","beforeUpdate","updated","beforeUnmount","unmounted"];for(let n=0;n<t.length;n++)e[t[n]]=void 0;e._lifecycleHooks=void 0}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shallowReactive as Oe,computed as z,watch as Pe}from"@lytjs/reactivity";import{computed as Ce,effect as he}from"@lytjs/reactivity/signal";import{signal as W}from"@lytjs/reactivity/signal";function N(e){let n={},t=Object.keys(e);for(let o=0;o<t.length;o++){let i=t[o];n[i]=W(e[i])}return n}function S(e){return typeof e=="function"&&e!==null&&"set"in e}function U(e){return new Proxy(e,{get(n,t){if(typeof t=="symbol")return n[t];let o=n[t];return S(o)?o():n[t]},set(n,t,o){if(typeof t=="symbol")return n[t]=o,!0;let i=n[t];return S(i)?i.set(o):n[t]=o,!0},has(n,t){return t in n},ownKeys(n){return Object.keys(n)},getOwnPropertyDescriptor(n,t){if(typeof t=="string"&&t in n)return{configurable:!0,enumerable:!0,get:()=>{let o=n[t];return S(o)?o():o},set:o=>{let i=n[t];S(i)?i.set(o):n[t]=o}}}})}function q(e){let n={},t=Object.keys(e);for(let o=0;o<t.length;o++){let i=t[o],l=e[i];n[i]=S(l)?l():l}return n}function R(e,n){let t=Object.keys(n);for(let o=0;o<t.length;o++){let i=t[o],l=e[i];S(l)&&l.set(n[i])}}function Z(e){}function G(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function T(e){return typeof e=="function"}function J(e){return typeof e=="string"}function Q(e){return typeof e=="boolean"}function X(e){return typeof e=="number"&&!isNaN(e)}function b(e){return Array.isArray(e)}function Y(e){return e!==null&&typeof e=="object"}function ee(e){return e===String?"String":e===Number?"Number":e===Boolean?"Boolean":e===Array?"Array":e===Object?"Object":e===Function?"Function":"unknown"}function H(e){if(!e)return{options:{},keys:[]};if(b(e)){let i={},l=[];for(let r=0;r<e.length;r++){let s=e[r];i[s]={type:null},l.push(s)}return{options:i,keys:l}}let n={},t=[],o=Object.keys(e);for(let i=0;i<o.length;i++){let l=o[i],r=e[l];r==null?n[l]={type:null}:r===String||r===Number||r===Boolean||r===Array||r===Object||r===Function?n[l]={type:r}:G(r)?n[l]={...r}:b(r)?n[l]={type:r}:n[l]={type:null},t.push(l)}return{options:n,keys:t}}function A(e,n,t){let{type:o,required:i,validator:l}=n;if(t==null)return!i;if(o!=null){let r=b(o)?o:[o],s=!1;for(let p=0;p<r.length;p++){let a=r[p],u=!1;if(a===String?u=J(t):a===Number?u=X(t):a===Boolean?u=Q(t):a===Function?u=T(t):a===Array?u=b(t):a===Object&&(u=Y(t)),u){s=!0;break}}if(!s){let p=r.map(ee).join(" | ");return!1}}if(l&&T(l))try{if(!l(t))return!1}catch(r){return!1}return!0}function $(e,n){let{default:t}=e;if(t!==void 0){if(T(t)){let o=e.type;if(!(o===Function||b(o)&&o.indexOf(Function)!==-1))return t()}return t}}function P(e,n){let{options:t,keys:o}=e.propsOptions,i={};for(let l=0;l<o.length;l++){let r=o[l],s=t[r],p=n?n[r]:void 0;p===void 0&&(p=$(s,r)),s.type!==null&&s.type!==void 0&&(b(s.type)?s.type:[s.type]).indexOf(Boolean)!==-1&&p===void 0&&(p=!1),A(r,s,p),i[r]=p}return e.props=i,i}function C(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function te(e){return e.replace(/-(\w)/g,(n,t)=>t.toUpperCase())}function L(e){return typeof e=="function"}function ne(e){return Array.isArray(e)}function w(e){if(!e)return{keys:[],validators:{}};let n=[],t={};if(ne(e)){for(let i=0;i<e.length;i++){let l=C(e[i]);n.push(l),t[l]=null}return{keys:n,validators:t}}let o=Object.keys(e);for(let i=0;i<o.length;i++){let l=o[i],r=C(l),s=e[l];n.push(r),L(s)?t[r]=s:t[r]=null}return{keys:n,validators:t}}function F(e,n,...t){let o=C(n),i=e.emitsOptions;if(i&&i.keys.length>0){let a=i.keys.indexOf(o)!==-1,u=i.validators[o];if(L(u))try{if(!u(...t))return!1}catch(f){return!1}}let l="on"+o.charAt(0).toUpperCase()+o.slice(1),r=l.replace(/-([a-z])/g,(a,u)=>u.toUpperCase()),s=e.props||{},p=s[r]||s[l];return L(p)?(p(...t),!0):!1}var v=(r=>(r.INIT="init",r.MOUNTED="mounted",r.BEFORE_UPDATE="beforeUpdate",r.UPDATED="updated",r.BEFORE_UNMOUNT="beforeUnmount",r.UNMOUNTED="unmounted",r))(v||{}),h=null;function oe(e){return typeof e=="function"}function E(e){let n=h;return h=e,n}function g(e){return function(t,o){if(!oe(t))return;let i=o||h;i&&(i[e]||(i[e]=[]),i[e].push(t))}}function d(e,n,...t){let o=e[n];if(!(!o||o.length===0))for(let i=0;i<o.length;i++)try{o[i](...t)}catch(l){}}var re=g("init"),ie=g("mounted"),se=g("beforeUpdate"),le=g("updated"),pe=g("beforeUnmount"),ae=g("unmounted");function M(e){return typeof e=="function"}function ue(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function k(e){return e==null?null:M(e)?e:Array.isArray(e)?e.length>0?e:null:e}function j(e,n){let t={};if(n==null)return e.slots=t,t;if(M(n)||Array.isArray(n))return t.default=k(n),e.slots=t,t;if(ue(n)){let o=Object.keys(n);for(let i=0;i<o.length;i++){let l=o[i],r=n[l];r!==void 0&&(t[l]=k(r))}return e.slots=t,t}return t.default=k(n),e.slots=t,t}function ce(e,n="default",t){let o=e[n];return o==null?null:M(o)?o(t):o}function fe(e,n="default"){let t=e[n];return t!=null}var c=null;function ye(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.mounted||(n.mounted=[])).push(e)}}function de(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.unmounted||(n.unmounted=[])).push(e)}}function me(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.updated||(n.updated=[])).push(e)}}function ge(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.beforeMount||(n.beforeMount=[])).push(e)}}function Se(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.beforeUnmount||(n.beforeUnmount=[])).push(e)}}var D=new WeakMap;function be(e,n){if(c){let t=D.get(c);t||(t=new Map,D.set(c,t)),t.set(e,n)}}function xe(e,n){if(c){let t=c;for(;t;){let o=D.get(t);if(o&&o.has(e))return o.get(e);t=t._parent}}return n}function _(e,n,t,o){c=n;try{return e(t,o)}finally{c=null}}function ke(){return c}import{isFunction as m,isPlainObject as I,mergeObjects as Ee}from"@lytjs/common";function Ie(e){return{name:e.name,options:e,_isComponentDefine:!0}}function Ne(e){let n=e.options,t=H(n.props),o=w(n.emits),i={_isComponent:!0,type:n,name:e.name||n.name,propsOptions:t,emitsOptions:o,props:{},state:{},setupState:{},computedRefs:{},subTree:null,isMounted:!1,isUnmounted:!1,slots:{},watchStopHandles:[],renderProxy:null,emit:null};return i.emit=(l,...r)=>F(i,l,...r),i.renderProxy=Ue(i),i}function Ue(e){return{get $name(){return e.name},get $props(){return e.props},get $state(){return e.state},get $slots(){return e.slots},get $isMounted(){return e.isMounted},$emit:e.emit,$forceUpdate(){e.update&&e.update()},$unmount(){K(e)},$setState(t){e._signalState?R(e._signalState,t):Ee(e.state,t),e.update&&e.update()}}}function Re(e,n,t){P(e,n||null),j(e,t||null);let o=e.type;m(o)&&!o._isComponentDefine?V(e):B(e)}function B(e){let{type:n}=e,t=n.reactivityMode==="signal",o=E(e);try{if(m(n.setup)){let r={attrs:e.props,slots:e.slots,emit:e.emit},s=_(n.setup,e,e.props,r);if(m(s))n.render=s;else if(I(s)){e.setupState={...s};let p=Object.keys(s);for(let a=0;a<p.length;a++)Object.defineProperty(e.renderProxy,p[a],{get(){return e.setupState[p[a]]},set(u){e.setupState[p[a]]=u},enumerable:!0})}}if(m(n.state)){let r=n.state();if(I(r))if(t){let s=N(r);e._signalState=s,e.state=U(s)}else e.state=Oe({...r})}if(n.computed){let r=Object.keys(n.computed);for(let s=0;s<r.length;s++){let p=r[s],a=n.computed[p],u=typeof a=="function"?()=>a.call(e.renderProxy):()=>a.get.call(e.renderProxy),f=typeof a=="function"?void 0:x=>a.set.call(e.renderProxy,x),y;t?y=Ce(u):f?y=z({get:u,set:f}):y=z(u),e.computedRefs[p]=y}}let i=n.methods;if(I(i)){let r=Object.keys(i);for(let s=0;s<r.length;s++){let p=r[s],a=i[p];m(a)&&(e.renderProxy[p]=a.bind(e.renderProxy))}}if(m(n.init)){let r=n.init.call(e.renderProxy,e.props,e.state);if(I(r)){e.setupState={...e.setupState,...r};let s=Object.keys(r);for(let p=0;p<s.length;p++)Object.defineProperty(e.renderProxy,s[p],{get(){return e.setupState[s[p]]},set(a){e.setupState[s[p]]=a},enumerable:!0})}}let l=Object.keys(e.state);for(let r=0;r<l.length;r++){let s=l[r];Object.defineProperty(e.renderProxy,s,{get(){return e.state[s]},set(p){e.state[s]=p},enumerable:!0})}if(n.computed){let r=Object.keys(n.computed);for(let s=0;s<r.length;s++){let p=r[s],a=e.computedRefs[p];t?Object.defineProperty(e.renderProxy,p,{get(){return a()},enumerable:!0}):Object.defineProperty(e.renderProxy,p,{get(){return a.value},set(u){a.value=u},enumerable:!0})}}if(n.watch){let r=Object.keys(n.watch);for(let s=0;s<r.length;s++){let p=r[s],a=n.watch[p],u=()=>{let f=e.state[p];if(f!==void 0)return f;let y=e.props[p];return y!==void 0?y:e.renderProxy[p]};if(t){let f=he(y=>{let x=u();a.handler.call(e.renderProxy,x,void 0)});e.watchStopHandles.push(f)}else{let f=Pe(u,(y,x)=>{a.handler.call(e.renderProxy,y,x)},{immediate:!!a.immediate,deep:!!a.deep});e.watchStopHandles.push(f)}}}d(e,"init")}finally{E(o)}}function V(e){let n=e.type,t={slots:e.slots,emit:e.emit},o=n(e.props,t);e.subTree=o}function O(e,n){let t=e._lifecycleHooks;if(!t||!t[n])return;let o=t[n];for(let i=0;i<o.length;i++)try{o[i]()}catch(l){}}function Te(e,n){if(e.isMounted)return;O(e,"beforeMount");let{type:t}=e;m(t.render)&&n&&(e.subTree=t.render.call(e.renderProxy,n,e)),e.isMounted=!0,d(e,"mounted"),O(e,"mounted")}function He(e,n,t){if(e.isUnmounted)return;t&&P(e,t),d(e,"beforeUpdate");let{type:o}=e;m(o.render)&&n&&(e.subTree=o.render.call(e.renderProxy,n,e)),d(e,"updated"),O(e,"updated")}function K(e){if(e.isUnmounted)return;d(e,"beforeUnmount"),O(e,"beforeUnmount"),e.isUnmounted=!0,e.isMounted=!1,e.subTree=null;for(let t of e.watchStopHandles)t();e.watchStopHandles=[],d(e,"unmounted"),O(e,"unmounted");let n=["init","mounted","beforeUpdate","updated","beforeUnmount","unmounted"];for(let t=0;t<n.length;t++)e[n[t]]=void 0;e._lifecycleHooks=void 0}export{v as LifecycleHook,d as callLifecycleHook,C as camelizeToHyphen,ge as compositionOnBeforeMount,Se as compositionOnBeforeUnmount,ye as compositionOnMounted,de as compositionOnUnmounted,me as compositionOnUpdated,Ne as createComponentInstance,g as createLifecycleHook,N as createSignalState,U as createSignalStateProxy,h as currentInstance,Ie as defineComponent,Z as disposeSignalState,F as emit,ke as getCurrentInstance,$ as getPropDefaultValue,q as getSignalStateSnapshot,fe as hasSlot,te as hyphenToCamel,P as initProps,j as initSlots,xe as inject,Te as mountComponent,w as normalizeEmits,H as normalizePropsOptions,k as normalizeSlotValue,pe as onBeforeUnmount,se as onBeforeUpdate,re as onInit,ie as onMounted,ae as onUnmounted,le as onUpdated,R as patchSignalState,be as provide,ce as renderSlot,_ as runSetup,E as setCurrentInstance,Re as setupComponent,V as setupFunctionComponent,B as setupStatefulComponent,K as unmountComponent,He as updateComponent,A as validateProp};
|
|
1
|
+
import{shallowReactive as Pe,computed as z,watch as Ce}from"@lytjs/reactivity";import{computed as he,effect as Ee}from"@lytjs/reactivity/signal";import{signal as W}from"@lytjs/reactivity/signal";function N(e){let n={},t=Object.keys(e);for(let o=0;o<t.length;o++){let i=t[o];n[i]=W(e[i])}return n}function S(e){return typeof e=="function"&&e!==null&&"set"in e}function U(e){return new Proxy(e,{get(n,t){if(typeof t=="symbol")return n[t];let o=n[t];return S(o)?o():n[t]},set(n,t,o){if(typeof t=="symbol")return n[t]=o,!0;let i=n[t];return S(i)?i.set(o):n[t]=o,!0},has(n,t){return t in n},ownKeys(n){return Object.keys(n)},getOwnPropertyDescriptor(n,t){if(typeof t=="string"&&t in n)return{configurable:!0,enumerable:!0,get:()=>{let o=n[t];return S(o)?o():o},set:o=>{let i=n[t];S(i)?i.set(o):n[t]=o}}}})}function q(e){let n={},t=Object.keys(e);for(let o=0;o<t.length;o++){let i=t[o],l=e[i];n[i]=S(l)?l():l}return n}function R(e,n){let t=Object.keys(n);for(let o=0;o<t.length;o++){let i=t[o],l=e[i];S(l)&&l.set(n[i])}}function Z(e){}function G(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function T(e){return typeof e=="function"}function J(e){return typeof e=="string"}function Q(e){return typeof e=="boolean"}function X(e){return typeof e=="number"&&!isNaN(e)}function x(e){return Array.isArray(e)}function Y(e){return e!==null&&typeof e=="object"}function ee(e){return e===String?"String":e===Number?"Number":e===Boolean?"Boolean":e===Array?"Array":e===Object?"Object":e===Function?"Function":"unknown"}function H(e){if(!e)return{options:{},keys:[]};if(x(e)){let i={},l=[];for(let r=0;r<e.length;r++){let s=e[r];i[s]={type:null},l.push(s)}return{options:i,keys:l}}let n={},t=[],o=Object.keys(e);for(let i=0;i<o.length;i++){let l=o[i],r=e[l];r==null?n[l]={type:null}:r===String||r===Number||r===Boolean||r===Array||r===Object||r===Function?n[l]={type:r}:G(r)?n[l]={...r}:x(r)?n[l]={type:r}:n[l]={type:null},t.push(l)}return{options:n,keys:t}}function _(e,n,t){let{type:o,required:i,validator:l}=n;if(t==null)return!i;if(o!=null){let r=x(o)?o:[o],s=!1;for(let a=0;a<r.length;a++){let p=r[a],u=!1;if(p===String?u=J(t):p===Number?u=X(t):p===Boolean?u=Q(t):p===Function?u=T(t):p===Array?u=x(t):p===Object&&(u=Y(t)),u){s=!0;break}}if(!s){let a=r.map(ee).join(" | ");return!1}}if(l&&T(l))try{if(!l(t))return!1}catch(r){return!1}return!0}function $(e,n){let{default:t}=e;if(t!==void 0){if(T(t)){let o=e.type;if(!(o===Function||x(o)&&o.indexOf(Function)!==-1))return t()}return t}}function P(e,n){let{options:t,keys:o}=e.propsOptions,i={};for(let l=0;l<o.length;l++){let r=o[l],s=t[r],a=n?n[r]:void 0;a===void 0&&(a=$(s,r)),s.type!==null&&s.type!==void 0&&(x(s.type)?s.type:[s.type]).indexOf(Boolean)!==-1&&a===void 0&&(a=!1),_(r,s,a),i[r]=a}return e.props=i,i}function te(e){return e}function C(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function ne(e){return e.replace(/-(\w)/g,(n,t)=>t.toUpperCase())}function L(e){return typeof e=="function"}function oe(e){return Array.isArray(e)}function v(e){if(!e)return{keys:[],validators:{}};let n=[],t={};if(oe(e)){for(let i=0;i<e.length;i++){let l=C(e[i]);n.push(l),t[l]=null}return{keys:n,validators:t}}let o=Object.keys(e);for(let i=0;i<o.length;i++){let l=o[i],r=C(l),s=e[l];n.push(r),L(s)?t[r]=s:t[r]=null}return{keys:n,validators:t}}function F(e,n,...t){let o=C(n),i=e.emitsOptions;if(i&&i.keys.length>0){let p=i.keys.indexOf(o)!==-1,u=i.validators[o];if(L(u))try{if(!u(...t))return!1}catch(f){return!1}}let l="on"+o.charAt(0).toUpperCase()+o.slice(1),r=l.replace(/-([a-z])/g,(p,u)=>u.toUpperCase()),s=e.props||{},a=s[r]||s[l];return L(a)?(a(...t),!0):!1}var w=(r=>(r.INIT="init",r.MOUNTED="mounted",r.BEFORE_UPDATE="beforeUpdate",r.UPDATED="updated",r.BEFORE_UNMOUNT="beforeUnmount",r.UNMOUNTED="unmounted",r))(w||{}),h=null;function re(e){return typeof e=="function"}function E(e){let n=h;return h=e,n}function g(e){return function(t,o){if(!re(t))return;let i=o||h;i&&(i[e]||(i[e]=[]),i[e].push(t))}}function d(e,n,...t){let o=e[n];if(!(!o||o.length===0))for(let i=0;i<o.length;i++)try{o[i](...t)}catch(l){}}var ie=g("init"),se=g("mounted"),le=g("beforeUpdate"),ae=g("updated"),pe=g("beforeUnmount"),ue=g("unmounted");function M(e){return typeof e=="function"}function ce(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function k(e){return e==null?null:M(e)?e:Array.isArray(e)?e.length>0?e:null:e}function j(e,n){let t={};if(n==null)return e.slots=t,t;if(M(n)||Array.isArray(n))return t.default=k(n),e.slots=t,t;if(ce(n)){let o=Object.keys(n);for(let i=0;i<o.length;i++){let l=o[i],r=n[l];r!==void 0&&(t[l]=k(r))}return e.slots=t,t}return t.default=k(n),e.slots=t,t}function fe(e,n="default",t){let o=e[n];return o==null?null:M(o)?o(t):o}function ye(e,n="default"){let t=e[n];return t!=null}var c=null;function de(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.mounted||(n.mounted=[])).push(e)}}function me(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.unmounted||(n.unmounted=[])).push(e)}}function ge(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.updated||(n.updated=[])).push(e)}}function Se(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.beforeMount||(n.beforeMount=[])).push(e)}}function xe(e){if(c){let n=c._lifecycleHooks||(c._lifecycleHooks={});(n.beforeUnmount||(n.beforeUnmount=[])).push(e)}}var D=new WeakMap;function be(e,n){if(c){let t=D.get(c);t||(t=new Map,D.set(c,t)),t.set(e,n)}}function ke(e,n){if(c){let t=c;for(;t;){let o=D.get(t);if(o&&o.has(e))return o.get(e);t=t._parent}}return n}function A(e,n,t,o){c=n;try{return e(t,o)}finally{c=null}}function Oe(){return c}import{isFunction as m,isPlainObject as I,mergeObjects as Ie}from"@lytjs/common";function Ne(e){return{name:e.name,options:e,_isComponentDefine:!0}}function Ue(e){return{options:e,_isComponentDefine:!0}}function Re(e){let n=e.options,t=H(n.props),o=v(n.emits),i={_isComponent:!0,type:n,name:e.name||n.name,propsOptions:t,emitsOptions:o,props:{},state:{},setupState:{},computedRefs:{},subTree:null,isMounted:!1,isUnmounted:!1,slots:{},watchStopHandles:[],renderProxy:null,emit:null};return i.emit=(l,...r)=>F(i,l,...r),i.renderProxy=Te(i),i}function Te(e){return{get $name(){return e.name},get $props(){return e.props},get $state(){return e.state},get $slots(){return e.slots},get $isMounted(){return e.isMounted},$emit:e.emit,$forceUpdate(){e.update&&e.update()},$unmount(){K(e)},$setState(t){e._signalState?R(e._signalState,t):Ie(e.state,t),e.update&&e.update()}}}function He(e,n,t){P(e,n||null),j(e,t||null);let o=e.type;m(o)&&!o._isComponentDefine?V(e):B(e)}function B(e){let{type:n}=e,t=n.reactivityMode==="signal",o=E(e);try{if(m(n.setup)){let r={attrs:e.props,slots:e.slots,emit:e.emit},s=A(n.setup,e,e.props,r);if(m(s))n.render=s;else if(I(s)){e.setupState={...s};let a=Object.keys(s);for(let p=0;p<a.length;p++)Object.defineProperty(e.renderProxy,a[p],{get(){return e.setupState[a[p]]},set(u){e.setupState[a[p]]=u},enumerable:!0})}}if(m(n.state)){let r=n.state();if(I(r))if(t){let s=N(r);e._signalState=s,e.state=U(s)}else e.state=Pe({...r})}if(n.computed){let r=Object.keys(n.computed);for(let s=0;s<r.length;s++){let a=r[s],p=n.computed[a],u=typeof p=="function"?()=>p.call(e.renderProxy):()=>p.get.call(e.renderProxy),f=typeof p=="function"?void 0:b=>p.set.call(e.renderProxy,b),y;t?y=he(u):f?y=z({get:u,set:f}):y=z(u),e.computedRefs[a]=y}}let i=n.methods;if(I(i)){let r=Object.keys(i);for(let s=0;s<r.length;s++){let a=r[s],p=i[a];m(p)&&(e.renderProxy[a]=p.bind(e.renderProxy))}}if(m(n.init)){let r=n.init.call(e.renderProxy,e.props,e.state);if(I(r)){e.setupState={...e.setupState,...r};let s=Object.keys(r);for(let a=0;a<s.length;a++)Object.defineProperty(e.renderProxy,s[a],{get(){return e.setupState[s[a]]},set(p){e.setupState[s[a]]=p},enumerable:!0})}}let l=Object.keys(e.state);for(let r=0;r<l.length;r++){let s=l[r];Object.defineProperty(e.renderProxy,s,{get(){return e.state[s]},set(a){e.state[s]=a},enumerable:!0})}if(n.computed){let r=Object.keys(n.computed);for(let s=0;s<r.length;s++){let a=r[s],p=e.computedRefs[a];t?Object.defineProperty(e.renderProxy,a,{get(){return p()},enumerable:!0}):Object.defineProperty(e.renderProxy,a,{get(){return p.value},set(u){p.value=u},enumerable:!0})}}if(n.watch){let r=Object.keys(n.watch);for(let s=0;s<r.length;s++){let a=r[s],p=n.watch[a],u=()=>{let f=e.state[a];if(f!==void 0)return f;let y=e.props[a];return y!==void 0?y:e.renderProxy[a]};if(t){let f=Ee(y=>{let b=u();p.handler.call(e.renderProxy,b,void 0)});e.watchStopHandles.push(f)}else{let f=Ce(u,(y,b)=>{p.handler.call(e.renderProxy,y,b)},{immediate:!!p.immediate,deep:!!p.deep});e.watchStopHandles.push(f)}}}d(e,"init")}finally{E(o)}}function V(e){let n=e.type,t={slots:e.slots,emit:e.emit},o=n(e.props,t);e.subTree=o}function O(e,n){let t=e._lifecycleHooks;if(!t||!t[n])return;let o=t[n];for(let i=0;i<o.length;i++)try{o[i]()}catch(l){}}function Le(e,n){if(e.isMounted)return;O(e,"beforeMount");let{type:t}=e;m(t.render)&&n&&(e.subTree=t.render.call(e.renderProxy,n,e)),e.isMounted=!0,d(e,"mounted"),O(e,"mounted")}function ve(e,n,t){if(e.isUnmounted)return;t&&P(e,t),d(e,"beforeUpdate");let{type:o}=e;m(o.render)&&n&&(e.subTree=o.render.call(e.renderProxy,n,e)),d(e,"updated"),O(e,"updated")}function K(e){if(e.isUnmounted)return;d(e,"beforeUnmount"),O(e,"beforeUnmount"),e.isUnmounted=!0,e.isMounted=!1,e.subTree=null;for(let t of e.watchStopHandles)t();e.watchStopHandles=[],d(e,"unmounted"),O(e,"unmounted");let n=["init","mounted","beforeUpdate","updated","beforeUnmount","unmounted"];for(let t=0;t<n.length;t++)e[n[t]]=void 0;e._lifecycleHooks=void 0}export{w as LifecycleHook,d as callLifecycleHook,C as camelizeToHyphen,Se as compositionOnBeforeMount,xe as compositionOnBeforeUnmount,de as compositionOnMounted,me as compositionOnUnmounted,ge as compositionOnUpdated,Re as createComponentInstance,g as createLifecycleHook,N as createSignalState,U as createSignalStateProxy,h as currentInstance,Ne as defineComponent,te as defineEmits,Ue as defineFunctionalComponent,Z as disposeSignalState,F as emit,Oe as getCurrentInstance,$ as getPropDefaultValue,q as getSignalStateSnapshot,ye as hasSlot,ne as hyphenToCamel,P as initProps,j as initSlots,ke as inject,Le as mountComponent,v as normalizeEmits,H as normalizePropsOptions,k as normalizeSlotValue,pe as onBeforeUnmount,le as onBeforeUpdate,ie as onInit,se as onMounted,ue as onUnmounted,ae as onUpdated,R as patchSignalState,be as provide,fe as renderSlot,A as runSetup,E as setCurrentInstance,He as setupComponent,V as setupFunctionComponent,B as setupStatefulComponent,K as unmountComponent,ve as updateComponent,_ as validateProp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.full.d.ts","../../reactivity/dist/types/effect.d.ts","../../reactivity/dist/types/reactive.d.ts","../../reactivity/dist/types/ref.d.ts","../../reactivity/dist/types/computed.d.ts","../../reactivity/dist/types/watch.d.ts","../../reactivity/dist/types/signal.d.ts","../../reactivity/dist/types/signal-component.d.ts","../../reactivity/dist/types/index.d.ts","../src/signal-state.ts","../src/props.ts","../src/emit.ts","../src/lifecycle.ts","../src/slots.ts","../src/composition-api.ts","../../common/dist/types/is.d.ts","../../common/dist/types/object.d.ts","../../common/dist/types/string.d.ts","../../common/dist/types/path.d.ts","../../common/dist/types/emitter.d.ts","../../common/dist/types/subscription.d.ts","../../common/dist/types/cache.d.ts","../../common/dist/types/timing.d.ts","../../common/dist/types/scheduler.d.ts","../../common/dist/types/error-codes.d.ts","../../common/dist/types/lyt-error.d.ts","../../common/dist/types/warn.d.ts","../../common/dist/types/algorithm.d.ts","../../common/dist/types/index.d.ts","../src/define-component.ts","../src/builtins/transition.ts","../src/builtins/transition-group.ts","../src/builtins/keep-alive.ts","../src/builtins/suspense.ts","../src/builtins/error-boundary.ts","../src/builtins/async-component.ts","../src/builtins/index.ts","../src/builtins-entry.ts","../src/index.ts"],"fileIdsList":[[78,79,80,81,82,83,84,85,86,87,88,89,90],[87],[99],[92],[93,94,95,96,97,98],[73,75,92],[92,93],[69,71,72,73,74,75,76,77,91],[72,73,74,75,76,77,92],[69],[66],[64,65,66,67,68,69,70]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"01a30f9e8582b369075c0808df71121e6855cb06fd8d3d39511d9ebb66405205","impliedFormat":1},"a931971a0aed3a04be8ef1ef78e4bdd05af6d408bec44f846d3a0794dda5d708","f39120ae19c79ceffa561da071bbf53b5cf418f3ad9c186e895fa55c3c42ae31","5fe944eec62fa00578c1b68dd15a46847218f15c35eca212f86caed1469108e9","1bb4fc70e4d98ca7ef67079adde1ee3bfa3b3829ae948cf2ce5b7a332430ee65","132b0d4b346da8f6d6004dc9eb4bfc09c0d292e9325aff621b2332a12973199f","ecd41394ecea0650d670ed4cdba72fac8f219fdfa1cdcbfdcdeb79413d712d15","fe965a8da8781e4e6cef466ccccd5430dc040ae5f17615301f4203434701237c","5142c441d5148e0b3d8aaa232af01166540bc049913ded34fe2065e0ebe2cf16",{"version":"d9f56073db3b309b746416944adfa56721a5351650ac763c9156a5f5a5ce2249","signature":"2234975d1fcdcb753e30d293166f907c926ef9d11af56b6e1050c45bd9975908"},{"version":"f10ff4d4c13cf45821a3cee06783bf062cf11d264790e64d7e798eab21405602","signature":"d8719f09ad5f2c84672042d065d7a6093f1112a777846773045796d065abaef1"},{"version":"3b10342898825f76e1725903d0a0fa6f50d0835d2be52e9f909ae8faa586519c","signature":"93c1e1ffeda376466dd6ddb1f61bd1f82ee4083349eff033a9f4cd443f2abe04"},{"version":"72bf5fe51e6d6bc5a1f7c1445af8c6122fb8ab8c1871cf3be314d344af28908f","signature":"bccc98e1e0a3a3b3a992843d3b7e1a86902f0d3e40eeb7d2d36fcadf1dd96a6c"},{"version":"3237b67d952fd2be0357f8f100234717d667a71b95f182796a8825b68c71b49f","signature":"20266ce07b679d16d991e0ea49a3b8699b5ed6c6d7962d1bfed43273543bc380"},{"version":"5fe313c3b49351301ae0920dfd7a8364812b81980e0e46afd3a0a3200d3e9d9c","signature":"0c593fcd916773a7926a4d2e8b6f8b15fd2adeeb61ecd5639569e402ba72fb43"},"0242b74c149e317117aa6c97acce4ad116212ebfd963ae50bcfe8bb4fa6410d2","8220087127ce86b259fdbc78efac6cf14064a970393dd72047205a559a67a4cd","a0c71b9e3689601665669b5ad5a43d6adb2310947a3ca8e63a8bea9bf0602c95","525e3e3f106504c4e62d3564c5fea77ab17d72725981f45042ce51e9f6ae0220","66558f40fbf300cbba390965583590c6e9a874c6f95f42549fe6bf10f2ec35dd","4addbf2b9b6fcad145efc10233ce211a220cbc6a35b069d0a0467dd10ec5d855","5ef34083e9d734dfc751b5a45e046219bc29d4d9b97c51b2fad58f4305b52d7f","290759e0e7e335e470cb0b8fb085232ba92bbf53e3a6d7dfdc65423a4baf644c","0db5120e2a3e67bc5892e63f1bcf4a3d933755d5ac15fb7e1c989deb34fafd61","df3112eeed1593533b757b55fba51326c3984752f79699bc3a9c919c6556e901","1e74c319ebca519283c6be7486b2f44f2bc180f4394b8191801294081169e459","5679cb7e73eb8c28182e6455e3146ec797942cdaa0b52ece0559f1997a1dc420","9555e351c5d92cadc1e3bee2ed9735874050d48f1ab0d2f9339ab6d83865566e","df0f6ffe3276b650678e05f472d35c46ef581bc2d402dcf2c3e452a8b773b7c9",{"version":"b5b780409e75dc96efb0accd2c0deab7a920f8bbf290e950445fff81bcb1a588","signature":"56bfb70b6d817e80fdea255c24f956e5791e8a1e988513c5e2221c23acfbedae"},{"version":"583734e7310fe3ff71000d5727dfb251e20b27230e447cd487312e91f87800e7","signature":"86a4a0ee05a108a315a5b869b0396c66ec56c82596b53c8d8475743242de05ad"},{"version":"107cc98b10da8b040dbbd4f08f5c38bd6804b9aff06f0f039009928e23ee369c","signature":"fe595745aaace134026fb7695f49f9419af2dae7e57e39197f2899e68935265e"},{"version":"9df9f459914de5ac2728b0079cf536cc3c9d0bbe9bcb9fff80fe3d9f031b7668","signature":"f52af506dde3b0453f19c4ee2fed56784419b7616b4fc9e9062deb13de7c4539"},{"version":"db56d8568b31bf68c4e5eded4d7d01dba19d938c9524ff42f616b695d16c86c7","signature":"0d8d961f530331e3cef3fc2c77a30be7c3d0fd8a08fc2bf65357ef24a1a730ee"},{"version":"7b54474af06589e73ddec27e1f07c0bd80e9184702f48894a0d7eae998982942","signature":"c0e1fbd8fa49875760094cb76f32061d522da3dee6350f58518e0909220b5525"},{"version":"a5c60472f36fe81bc4f94655a5d492477f52510d7acd7cce0becbb82a9e6dac7","signature":"256b6a104a868d608ee17b10be77591670eb175ce0af087728ef524754e48096"},{"version":"73abdf7319cea30f182e6e603f7d3abed5c0c86cdb743061f62fcac149a8b0c1","signature":"f7bbc280bdfc8c45d1891f35cb053cd7136c7aff397847163532f99fc3241dc6"},{"version":"16f94abbed78dd44cda016ca04c744370ebdf01ad9be71a8aa129603da2b92a5","signature":"4a07d312b1cb867fb58bc7e925d14434f0e039e5de1db15187c678acf9d64918"},{"version":"c877743c3b75a56b614ec3587f4aea4525afa6d9178b7527a305f1e4b9ed2cb9","signature":"282c0998963e10c93a89a53a618c76c9f34b33c3ddfe22b4b860d10f2fe07ab7"}],"root":[[72,77],[92,101]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noEmitOnError":false,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[91,1],[88,2],[100,3],[98,4],[97,4],[99,5],[95,6],[96,4],[94,7],[93,4],[92,8],[101,9],[72,10],[67,11],[71,12],[70,10],[68,11]],"semanticDiagnosticsPerFile":[[72,[{"start":179,"length":14,"messageText":"'signalComputed' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":207,"length":12,"messageText":"'signalEffect' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":251,"length":6,"messageText":"'Signal' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":1236,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":1263,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":3598,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":3616,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":3997,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4049,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4237,"length":11,"messageText":"'signalState' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]],[73,[{"start":2114,"length":9,"messageText":"'toBoolean' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":3775,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":3814,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":4135,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4233,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4470,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4611,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4734,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4821,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":4865,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":7186,"length":8,"messageText":"'propName' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":8398,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":8440,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":8552,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":8907,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":8957,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538}]],[74,[{"start":1711,"length":13,"messageText":"'isPlainObject' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":2605,"length":8,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":2872,"length":6,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":2909,"length":6,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538}]],[75,[{"start":3622,"length":12,"messageText":"Cannot invoke an object which is possibly 'undefined'.","category":1,"code":2722}]],[76,[{"start":2901,"length":4,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":2956,"length":4,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538}]],[92,[{"start":234,"length":8,"messageText":"'nextTick' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":823,"length":15,"messageText":"'currentInstance' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":873,"length":21,"messageText":"'LifecycleHookCallback' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":6039,"length":6,"code":2375,"category":1,"messageText":{"messageText":"Type '{ name: string | undefined; options: ComponentOptions; _isComponentDefine: true; }' is not assignable to type 'ComponentDefine' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.","category":1,"code":2375,"next":[{"messageText":"Types of property 'name' are incompatible.","category":1,"code":2326,"next":[{"messageText":"Type 'string | undefined' is not assignable to type 'string'.","category":1,"code":2322,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}],"canonicalHead":{"code":2375,"messageText":"Type '{ name: string | undefined; options: ComponentOptions; _isComponentDefine: true; }' is not assignable to type 'ComponentDefine' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."}}]}]}},{"start":6529,"length":8,"code":2375,"category":1,"messageText":{"messageText":"Type '{ _isComponent: true; type: ComponentOptions; name: string | undefined; propsOptions: NormalizedProps; emitsOptions: NormalizedEmitsOptions; ... 10 more ...; emit: any; }' is not assignable to type 'ComponentInternalInstance' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.","category":1,"code":2375,"next":[{"messageText":"Types of property 'name' are incompatible.","category":1,"code":2326,"next":[{"messageText":"Type 'string | undefined' is not assignable to type 'string'.","category":1,"code":2322,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}],"canonicalHead":{"code":2375,"messageText":"Type '{ _isComponent: true; type: ComponentOptions; name: string | undefined; propsOptions: NormalizedProps; emitsOptions: NormalizedEmitsOptions; ... 10 more ...; emit: any; }' is not assignable to type 'ComponentInternalInstance' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."}}]}]}},{"start":7416,"length":5,"code":2375,"category":1,"messageText":{"messageText":"Type '{ readonly $name: string | undefined; readonly $props: Record<string, any>; readonly $state: Record<string, any>; readonly $slots: Slots; readonly $isMounted: boolean; $emit: EmitFunction; $forceUpdate(): void; $unmount(): void; $setState(partial: Record<string, any>): void; }' is not assignable to type 'ComponentPublicInstance' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.","category":1,"code":2375,"next":[{"messageText":"Types of property '$name' are incompatible.","category":1,"code":2326,"next":[{"messageText":"Type 'string | undefined' is not assignable to type 'string'.","category":1,"code":2322,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}],"canonicalHead":{"code":2375,"messageText":"Type '{ readonly $name: string | undefined; readonly $props: Record<string, any>; readonly $state: Record<string, any>; readonly $slots: Slots; readonly $isMounted: boolean; $emit: EmitFunction; $forceUpdate(): void; $unmount(): void; $setState(partial: Record<string, any>): void; }' is not assignable to type 'ComponentPublicInstance' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."}}]}]}},{"start":10414,"length":12,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'PropertyKey'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'PropertyKey'.","category":1,"code":2322}]}},{"start":10491,"length":12,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":10583,"length":12,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":11508,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":12379,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":12662,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":12788,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":13397,"length":12,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'PropertyKey'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'PropertyKey'.","category":1,"code":2322}]}},{"start":13474,"length":12,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":13566,"length":12,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":13889,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'PropertyKey'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'PropertyKey'.","category":1,"code":2322}]}},{"start":13944,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":14010,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":14342,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":14487,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'PropertyKey'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'PropertyKey'.","category":1,"code":2322}]}},{"start":14780,"length":3,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'PropertyKey'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'PropertyKey'.","category":1,"code":2322}]}},{"start":15272,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":15404,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":15506,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":15612,"length":3,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":15737,"length":9,"messageText":"'onCleanup' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":20431,"length":11,"messageText":"Type 'undefined' cannot be used as an index type.","category":1,"code":2538},{"start":20495,"length":24,"code":2412,"category":1,"messageText":"Type 'undefined' is not assignable to type 'Record<string, Function[]>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."}]],[93,[{"start":215,"length":16,"messageText":"'ComponentOptions' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":1963,"length":13,"messageText":"'isPlainObject' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":4992,"length":9,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":5030,"length":12,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":5412,"length":8,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}},{"start":7792,"length":13,"messageText":"'_performEnter' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":9360,"length":13,"messageText":"'_performLeave' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":12199,"length":5,"messageText":"'props' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":12311,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]],[94,[{"start":1074,"length":11,"messageText":"'_isFunction' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":1189,"length":14,"messageText":"'_isPlainObject' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":1582,"length":12,"messageText":"'_performFLIP' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":1708,"length":4,"messageText":"Property 'rect' does not exist on type 'FLIPPosition | undefined'.","category":1,"code":2339},{"start":1723,"length":2,"messageText":"Property 'el' does not exist on type 'FLIPPosition | undefined'.","category":1,"code":2339},{"start":4367,"length":5,"messageText":"'props' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":4538,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]],[95,[{"start":1691,"length":10,"messageText":"'isFunction' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":2575,"length":10,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | RegExp | undefined' is not assignable to parameter of type 'string | RegExp | (string | RegExp)[]'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string | RegExp | (string | RegExp)[]'.","category":1,"code":2322}]}},{"start":6079,"length":5,"messageText":"'props' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":6167,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":12154,"length":15,"code":2345,"category":1,"messageText":{"messageText":"Argument of type 'string | undefined' is not assignable to parameter of type 'string'.","category":1,"code":2345,"next":[{"messageText":"Type 'undefined' is not assignable to type 'string'.","category":1,"code":2322}]}}]],[96,[{"start":1606,"length":14,"messageText":"'_isPlainObject' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":4217,"length":5,"messageText":"'props' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":4469,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]],[97,[{"start":4263,"length":6,"code":2322,"category":1,"messageText":{"messageText":"Type '{ error?: Error; vm?: any; info?: string; timestamp?: number; }' is not assignable to type 'ErrorEntry'.","category":1,"code":2322,"next":[{"messageText":"Property 'error' is optional in type '{ error?: Error; vm?: any; info?: string; timestamp?: number; }' but required in type 'ErrorEntry'.","category":1,"code":2327}]}}]],[98,[{"start":2616,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":7219,"length":5,"messageText":"'props' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true},{"start":7319,"length":1,"messageText":"'h' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./types/index.d.ts","version":"6.0.2"}
|
|
@@ -11,7 +11,6 @@ import { type NormalizedProps, type PropOptions, type PropType } from './props';
|
|
|
11
11
|
import { type NormalizedEmitsOptions, type EmitsOptions } from './emit';
|
|
12
12
|
import { type LifecycleInstance } from './lifecycle';
|
|
13
13
|
import { type Slots, type SlotChildren } from './slots';
|
|
14
|
-
import { type SetupFunction } from './composition-api';
|
|
15
14
|
/** 组件渲染函数类型 */
|
|
16
15
|
export type RenderFunction = (h: CreateElement, instance: ComponentInternalInstance) => any;
|
|
17
16
|
/** 简易 createElement 函数类型 */
|
|
@@ -38,7 +37,7 @@ export interface WatchOptions {
|
|
|
38
37
|
}
|
|
39
38
|
/** 响应式模式 */
|
|
40
39
|
export type ReactivityMode = 'proxy' | 'signal';
|
|
41
|
-
/**
|
|
40
|
+
/** 组件选项类型(保持向后兼容) */
|
|
42
41
|
export interface ComponentOptions {
|
|
43
42
|
/** 组件名称 */
|
|
44
43
|
name?: string;
|
|
@@ -59,7 +58,11 @@ export interface ComponentOptions {
|
|
|
59
58
|
/** 初始化函数(setup 阶段调用) */
|
|
60
59
|
init?: (this: ComponentPublicInstance, props: Record<string, any>, state: Record<string, any>) => void | Record<string, any>;
|
|
61
60
|
/** Composition API setup 函数 */
|
|
62
|
-
setup?:
|
|
61
|
+
setup?: (props: Record<string, any>, ctx: {
|
|
62
|
+
attrs: Record<string, any>;
|
|
63
|
+
slots: Slots;
|
|
64
|
+
emit: (event: string, ...args: any[]) => void;
|
|
65
|
+
}) => any;
|
|
63
66
|
/** Emits 声明 */
|
|
64
67
|
emits?: EmitsOptions;
|
|
65
68
|
/** 默认插槽内容(由父组件传入) */
|
|
@@ -69,14 +72,14 @@ export interface ComponentOptions {
|
|
|
69
72
|
/** 组件样式字符串 */
|
|
70
73
|
styles?: string;
|
|
71
74
|
}
|
|
72
|
-
/**
|
|
75
|
+
/** 函数组件类型(保持简单,向后兼容) */
|
|
73
76
|
export type FunctionalComponent = (props: Record<string, any>, context: {
|
|
74
77
|
slots: Slots;
|
|
75
|
-
emit:
|
|
78
|
+
emit: (event: string, ...args: any[]) => void;
|
|
76
79
|
}) => any;
|
|
77
80
|
/** emit 函数类型 */
|
|
78
81
|
export type EmitFunction = (event: string, ...args: any[]) => boolean;
|
|
79
|
-
/**
|
|
82
|
+
/** 组件公共实例(保持简单,向后兼容) */
|
|
80
83
|
export interface ComponentPublicInstance {
|
|
81
84
|
/** 组件名称 */
|
|
82
85
|
$name?: string;
|
|
@@ -96,6 +99,8 @@ export interface ComponentPublicInstance {
|
|
|
96
99
|
$unmount: () => void;
|
|
97
100
|
/** 设置状态 */
|
|
98
101
|
$setState: (partial: Record<string, any>) => void;
|
|
102
|
+
/** 允许访问其他属性 */
|
|
103
|
+
[key: string]: any;
|
|
99
104
|
}
|
|
100
105
|
/** 组件内部实例(框架内部使用) */
|
|
101
106
|
export interface ComponentInternalInstance extends LifecycleInstance {
|
|
@@ -140,7 +145,7 @@ export interface ComponentInternalInstance extends LifecycleInstance {
|
|
|
140
145
|
/** Composition API 生命周期钩子 */
|
|
141
146
|
_lifecycleHooks?: Record<string, Function[]>;
|
|
142
147
|
}
|
|
143
|
-
/** defineComponent
|
|
148
|
+
/** defineComponent 的返回类型(保持简单,向后兼容) */
|
|
144
149
|
export interface ComponentDefine {
|
|
145
150
|
/** 组件名称 */
|
|
146
151
|
name?: string;
|
|
@@ -156,44 +161,51 @@ export interface ComponentDefine {
|
|
|
156
161
|
*
|
|
157
162
|
* 接收组件选项对象,返回标准化的组件定义。
|
|
158
163
|
* 支持的选项:
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
164
|
+
* - name: 组件名称
|
|
165
|
+
* - props: 属性声明(数组或对象形式)
|
|
166
|
+
* - state: 响应式数据工厂函数
|
|
167
|
+
* - computed: 计算属性
|
|
168
|
+
* - watch: 侦听器
|
|
169
|
+
* - methods: 方法
|
|
170
|
+
* - template: 模板字符串
|
|
171
|
+
* - render: 渲染函数
|
|
172
|
+
* - init: 初始化函数
|
|
173
|
+
* - emits: 事件声明
|
|
174
|
+
* - slots: 默认插槽
|
|
170
175
|
*
|
|
171
176
|
* @param options - 组件选项
|
|
172
177
|
* @returns 组件定义对象
|
|
173
178
|
*
|
|
174
179
|
* @example
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
180
|
+
* ```ts
|
|
181
|
+
* const MyComponent = defineComponent({
|
|
182
|
+
* name: 'MyComponent',
|
|
183
|
+
* props: {
|
|
184
|
+
* title: { type: String, default: 'Hello' },
|
|
185
|
+
* count: { type: Number, required: true }
|
|
186
|
+
* },
|
|
187
|
+
* state() {
|
|
188
|
+
* return { inner: 0 };
|
|
189
|
+
* },
|
|
190
|
+
* methods: {
|
|
191
|
+
* increment() {
|
|
192
|
+
* this.$setState({ inner: this.$state.inner + 1 });
|
|
193
|
+
* }
|
|
194
|
+
* },
|
|
195
|
+
* init(props, state) {
|
|
196
|
+
* console.log('组件初始化', props.title);
|
|
188
197
|
* }
|
|
189
|
-
* }
|
|
190
|
-
*
|
|
191
|
-
* console.log('组件初始化', props.title);
|
|
192
|
-
* }
|
|
193
|
-
* });
|
|
194
|
-
* ```
|
|
198
|
+
* });
|
|
199
|
+
* ```
|
|
195
200
|
*/
|
|
196
201
|
export declare function defineComponent(options: ComponentOptions): ComponentDefine;
|
|
202
|
+
/**
|
|
203
|
+
* 定义函数组件
|
|
204
|
+
*
|
|
205
|
+
* @param fn - 函数组件
|
|
206
|
+
* @returns 组件定义对象
|
|
207
|
+
*/
|
|
208
|
+
export declare function defineFunctionalComponent(fn: FunctionalComponent): ComponentDefine;
|
|
197
209
|
/**
|
|
198
210
|
* 创建组件内部实例
|
|
199
211
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-component.d.ts","sourceRoot":"","sources":["../../src/define-component.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"define-component.d.ts","sourceRoot":"","sources":["../../src/define-component.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAiBjB,eAAe;AACf,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,QA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DD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,yBAAyB,EACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EACrC,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,GAC7B,IAAI,CAiBN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CA8NN;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CAYN;AA0BD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,yBAAyB,EACnC,CAAC,CAAC,EAAE,aAAa,GAChB,IAAI,CAsBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,yBAAyB,EACnC,CAAC,CAAC,EAAE,aAAa,EACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,IAAI,CAyBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CA2CN"}
|
package/dist/types/emit.d.ts
CHANGED
|
@@ -21,6 +21,19 @@ export interface EmitInstance {
|
|
|
21
21
|
/** 组件注册的事件处理函数映射(key 为短横线形式) */
|
|
22
22
|
props?: Record<string, any>;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 从事件处理器类型提取事件类型
|
|
26
|
+
* 例如:
|
|
27
|
+
* - { onClick: (e: MouseEvent) => void } → { click: (e: MouseEvent) => void }
|
|
28
|
+
*/
|
|
29
|
+
export type ExtractEmitsFromHandlers<Handlers> = {
|
|
30
|
+
[K in keyof Handlers as K extends `on${infer E}` ? Uncapitalize<E> : never]: Handlers[K] extends (...args: infer Args) => any ? (...args: Args) => void : never;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 定义 emits 类型的工具函数
|
|
34
|
+
* 用于类型安全的事件声明
|
|
35
|
+
*/
|
|
36
|
+
export declare function defineEmits<T extends EmitsOptions>(emits: T): T;
|
|
24
37
|
/**
|
|
25
38
|
* 将驼峰命名转为短横线命名
|
|
26
39
|
*
|
package/dist/types/emit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/emit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,+BAA+B;AAC/B,MAAM,MAAM,YAAY,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AAE3F,qBAAqB;AACrB,MAAM,WAAW,sBAAsB;IACrC,uBAAuB;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;CAClE;AAED,wBAAwB;AACxB,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AA2BD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,GACrC,sBAAsB,CAmCxB;AAED;;;;;;;;;;;;;;;;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AAG,CAAC,CAE/D;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AA2BD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,GACrC,sBAAsB,CAmCxB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAClB,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,MAAM,EACb,GAAG,IAAI,EAAE,GAAG,EAAE,GACb,OAAO,CAqDT"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* 导出所有公共 API 和类型定义。
|
|
5
5
|
* 纯原生实现,零外部依赖。
|
|
6
6
|
*/
|
|
7
|
-
export { defineComponent, createComponentInstance, setupComponent, setupStatefulComponent, setupFunctionComponent, mountComponent, updateComponent, unmountComponent, } from './define-component';
|
|
7
|
+
export { defineComponent, defineFunctionalComponent, createComponentInstance, setupComponent, setupStatefulComponent, setupFunctionComponent, mountComponent, updateComponent, unmountComponent, } from './define-component';
|
|
8
8
|
export type { ComponentOptions, ComponentDefine, ComponentPublicInstance, ComponentInternalInstance, RenderFunction, CreateElement, ComputedOptions, WatchOptions, FunctionalComponent, EmitFunction, ReactivityMode, } from './define-component';
|
|
9
9
|
export { normalizePropsOptions, validateProp, initProps, getPropDefaultValue, } from './props';
|
|
10
10
|
export type { PropType, PropOptions, NormalizedPropsOptions, NormalizedProps, } from './props';
|
|
11
|
-
export { emit, normalizeEmits, camelizeToHyphen, hyphenToCamel, } from './emit';
|
|
12
|
-
export type { EmitsOptions, NormalizedEmitsOptions, EmitInstance, } from './emit';
|
|
11
|
+
export { emit, normalizeEmits, camelizeToHyphen, hyphenToCamel, defineEmits, } from './emit';
|
|
12
|
+
export type { EmitsOptions, NormalizedEmitsOptions, EmitInstance, ExtractEmitsFromHandlers, } from './emit';
|
|
13
13
|
export { LifecycleHook, createLifecycleHook, callLifecycleHook, setCurrentInstance, onInit, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted, currentInstance, } from './lifecycle';
|
|
14
14
|
export type { LifecycleHookCallback, LifecycleInstance, } from './lifecycle';
|
|
15
15
|
export { initSlots, normalizeSlotValue, renderSlot, hasSlot, } from './slots';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,QAAQ,EACR,WAAW,EACX,sBAAsB,EACtB,eAAe,GAChB,MAAM,SAAS,CAAC;AAMjB,OAAO,EACL,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,gBAAg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ACtB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lytjs/component",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Lyt.js 组件系统 - defineComponent、生命周期、插槽、KeepAlive、Suspense",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"defineComponent"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@lytjs/common": "^4.0
|
|
47
|
-
"@lytjs/reactivity": "^4.0
|
|
46
|
+
"@lytjs/common": "^4.1.0",
|
|
47
|
+
"@lytjs/reactivity": "^4.1.0"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=18.0.0"
|