@vielzeug/ripple 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.d.ts.map +1 -1
- package/dist/ripple.cjs +1 -1
- package/dist/ripple.cjs.map +1 -1
- package/dist/ripple.iife.js +1 -1
- package/dist/ripple.iife.js.map +1 -1
- package/dist/ripple.js +1 -1
- package/dist/ripple.js.map +1 -1
- package/dist/src/devtools.cjs.map +1 -1
- package/dist/src/devtools.js.map +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +3 -2
- package/dist/store.js.map +1 -1
- package/dist/tracking.cjs.map +1 -1
- package/dist/tracking.d.ts.map +1 -1
- package/dist/tracking.js.map +1 -1
- package/dist/utilities.cjs.map +1 -1
- package/dist/utilities.d.ts +3 -2
- package/dist/utilities.d.ts.map +1 -1
- package/dist/utilities.js.map +1 -1
- package/package.json +3 -3
package/dist/devtools.d.ts
CHANGED
|
@@ -46,5 +46,5 @@ export declare const installDevTools: (hook: RippleDevToolsHook | null) => void;
|
|
|
46
46
|
* }, { name: 'renderUser' });
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
export declare const debugEffect: (fn: EffectCallback, options?:
|
|
49
|
+
export declare const debugEffect: (fn: EffectCallback, options?: EffectOptions) => EffectHandle;
|
|
50
50
|
//# sourceMappingURL=devtools.d.ts.map
|
package/dist/devtools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAa,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQ1G,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrG;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,kBAAkB,GAAG,IAAI,KAAG,IAQjE,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,cAAc,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAa,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQ1G,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrG;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,kBAAkB,GAAG,IAAI,KAAG,IAQjE,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,cAAc,EAAE,UAAU,aAAa,KAAG,YA+CzE,CAAC"}
|
package/dist/ripple.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class e extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}static is(t){return t instanceof e}},t=class extends e{},n=class extends e{},r=class extends e{},i=class extends e{},a=class extends e{},o=class extends e{},s=e=>e instanceof Error?e:Error(`Non-Error thrown: ${String(e)}`),c=e=>{let t=[];for(let n of e)try{n()}catch(e){t.push(s(e))}return t},l=(e,t)=>{let n=c(e);if(n.length===1)throw n[0];if(n.length>0)throw AggregateError(n,t)},u=(e,t,n)=>{throw t.length===0?e:AggregateError([s(e),...t],n,{cause:s(e)})},d=null,f=()=>d,p=Symbol(`ripple.is-signal`),m=Symbol(`ripple.is-computed`),h=Symbol(`ripple.is-store`),g=Symbol(`ripple.uninitialized`),_=new FinalizationRegistry(({key:e,map:t})=>{t.delete(e)}),v=class{version=0;name;[p]=!0;computedSubs_=new Map;effectSubs_=new Set;constructor(e){this.name=e}addComputedSub(e){let t=new WeakRef(e);this.computedSubs_.set(e,t),_.register(e,{key:e,map:this.computedSubs_},t)}removeComputedSub(e){let t=this.computedSubs_.get(e);t!==void 0&&(this.computedSubs_.delete(e),_.unregister(t))}addEffectSub(e){this.effectSubs_.add(e)}removeEffectSub(e){this.effectSubs_.delete(e)}clearSubscribers(){for(let e of this.computedSubs_.values())_.unregister(e);this.computedSubs_.clear(),this.effectSubs_.clear()}hasSubscribers(){if(this.effectSubs_.size>0)return!0;for(let e of this.computedSubs_.values())if(e.deref()!==void 0)return!0;return!1}*computedSubs(){for(let[e,t]of this.computedSubs_){let n=t.deref();n===void 0?(this.computedSubs_.delete(e),_.unregister(t)):yield n}}effectSubs(){return this.effectSubs_}},y=class extends v{[m]=!0;lastPropEpoch_=0},b=class{fn_;disposed_=!1;constructor(e){this.fn_=e}get disposed(){return this.disposed_}dispose(){if(this.disposed_)return;this.disposed_=!0;let e=this.fn_;this.fn_=null,e()}[Symbol.dispose](){this.dispose()}},x=class{awaitDone_;getCurrentRun_;syncStop_;asyncDisposePromise_=null;constructor(e,t,n){this.awaitDone_=t,this.getCurrentRun_=n,this.syncStop_=e}get disposed(){return this.syncStop_.disposed}dispose(){this.syncStop_.dispose()}run(){return this.getCurrentRun_()??Promise.resolve()}[Symbol.dispose](){this.dispose()}[Symbol.asyncDispose](){return this.asyncDisposePromise_===null?(this.dispose(),this.asyncDisposePromise_=this.awaitDone_(),this.asyncDisposePromise_):this.asyncDisposePromise_}},S=0,C=()=>++S,w=()=>S,T={scheduling:{activeDirty:`a`,batchDepth:0,dirtyWithEffectSubsA:new Set,dirtyWithEffectSubsB:new Set,pendingSubscribers:new Set},scopeCleanups:null,tracking:null},E=null,D=()=>E===null?T:E.get(),O=()=>D().scheduling,ee=()=>E!==null,k=()=>D().tracking,A=(e,t)=>{if(E!==null){let n=E.get();return E.run({...n,tracking:e},t)}let n=T;T={...T,tracking:e};try{return t()}finally{T=n}},j=(e,t)=>{if(E!==null){let n=E.get();return E.run({...n,scopeCleanups:e},t)}let n=T;T={...T,scopeCleanups:e};try{return t()}finally{T=n}},M=()=>D().scopeCleanups,N=e=>{let t=k();t?.kind===`effect`?t.cleanups.push(e):M()?.push(e)},P=e=>A(null,e),F=e=>{let t=k();if(t!==null){if(t.sourceObserver?.(e),t.kind===`computed`)t.depCollector.push({source:e,version:e.version});else if(t.kind===`effect`){let n=t.effect;e.addEffectSub(n),t.subscriptions.add(()=>e.removeEffectSub(n)),t.deps.set(e,e.version)}}},te=class extends y{value_;dirty_;computing_;disposed_;deps_;compute_;equals_;maxRevision_;constructor(e,t){let{equals:n,name:r}=t??{};super(r),this.value_=g,this.dirty_=!0,this.computing_=!1,this.disposed_=!1,this.deps_=[],this.maxRevision_=-1,this.compute_=e,this.equals_=n===void 0?Object.is:(e,t)=>n(e,t)}markDirty(){return this.disposed_||this.dirty_?!1:(this.dirty_=!0,!0)}refreshIfDirty(){if(!this.dirty_)return!1;if(w()<=this.maxRevision_)return this.dirty_=!1,!1;if(this.deps_.length>0){let e=!0;for(let t of this.deps_){let n=t.source;if(`refreshIfDirty`in n&&n.refreshIfDirty(),n.version!==t.version){e=!1;break}}if(e)return this.dirty_=!1,this.maxRevision_=w(),!1}return this.recompute()}runCompute(e){try{return A({computed:this,depCollector:e,kind:`computed`},this.compute_)}catch(e){throw s(e)}}recompute(){if(this.computing_)throw new t(`computed cycle detected${this.name?` "${this.name}"`:``}`);this.computing_=!0;try{let e=[];f()?.compute?.({name:this.name});let t=this.runCompute(e);return this.dirty_=!1,this.maxRevision_=w(),this.updateDeps(e),this.value_===g||!this.equals_(this.value_,t)?(this.value_=t,this.version++,!0):!1}finally{this.computing_=!1}}updateDeps(e){let t=this.deps_;if(t.length===e.length&&t.every((t,n)=>t.source===e[n].source)){for(let n=0;n<e.length;n++)t[n].version=e[n].version;return}let n=new Set(t.map(e=>e.source)),r=new Set(e.map(e=>e.source));for(let e of t)r.has(e.source)||e.source.removeComputedSub(this);for(let t of e)n.has(t.source)||t.source.addComputedSub(this);this.deps_=e}get value(){return this.disposed_?this.value_===g?void 0:this.value_:(this.refreshIfDirty(),F(this),this.value_)}peek(){return this.disposed_?this.value_===g?void 0:this.value_:(this.refreshIfDirty(),this.value_)}subscribe=e=>{if(this.disposed_){let e=new b(()=>{});return e.dispose(),e}return this.refreshIfDirty(),this.addEffectSub(e),new b(()=>{this.removeEffectSub(e)})};get disposed(){return this.disposed_}dispose(){if(!this.disposed_){this.disposed_=!0;for(let e of this.deps_)e.source.removeComputedSub(this);this.deps_=[],this.clearSubscribers(),f()?.dispose?.({kind:`computed`,name:this.name})}}[Symbol.dispose](){this.dispose()}},I=(e,t)=>{let n=new te(e,t);return N(()=>n.dispose()),n},ne=!globalThis.__RIPPLE_PROD__;function re(e){ne&&console.warn(`[@vielzeug/ripple] ${e}`)}var L=!1,R=0,z=[],B=e=>e.activeDirty===`a`?e.dirtyWithEffectSubsA:e.dirtyWithEffectSubsB,ie=(e,t)=>{let n=++R;for(let n of t.effectSubs())e.pendingSubscribers.add(n);for(let e of t.computedSubs())z.push(e);try{for(;z.length>0;){let t=z.pop();if(t.lastPropEpoch_!==n&&(t.lastPropEpoch_=n,t.markDirty())){t.effectSubs().size>0&&B(e).add(t);for(let e of t.computedSubs())z.push(e)}}}finally{z.length=0}},ae=e=>{for(;B(e).size>0;){let t=B(e);e.activeDirty=e.activeDirty===`a`?`b`:`a`,B(e).clear();for(let n of t)if(n.hasSubscribers()&&n.refreshIfDirty()){for(let t of n.effectSubs())e.pendingSubscribers.add(t);for(let t of n.computedSubs())t.markDirty()&&t.effectSubs().size>0&&B(e).add(t)}t.clear()}},V=e=>{let t=0;for(;e.pendingSubscribers.size>0||B(e).size>0;){if(++t>100)throw new i(`infinite flush loop (> 100 iterations)`);if(B(e).size>0&&ae(e),e.pendingSubscribers.size===0)continue;let n=[...e.pendingSubscribers];e.pendingSubscribers.clear(),l(n,`subscriber errors`)}},oe=globalThis.process?.versions!=null,se=e=>{if(!e.hasSubscribers())return;!L&&oe&&!ee()&&(L=!0,re(`Signal updated in a Node.js-like environment. The module-level flush queue is shared across concurrent requests — use per-request worker isolation or the @vielzeug/ripple/ssr sub-path for request-isolated scheduling.`));let t=O();ie(t,e),t.batchDepth===0&&V(t)},H=e=>{let t=O();t.batchDepth++;let n;try{n=e()}catch(e){throw t.batchDepth--,t.batchDepth===0&&(t.pendingSubscribers.clear(),t.dirtyWithEffectSubsA.clear(),t.dirtyWithEffectSubsB.clear()),e}return t.batchDepth--,t.batchDepth===0&&V(t),n},U=class extends v{value_;equals_;disposed_;constructor(e,t,n){super(n),this.value_=e,this.equals_=t??Object.is,this.disposed_=!1}get value(){return this.disposed_||F(this),this.value_}set value(e){if(this.disposed_||this.equals_(this.value_,e))return;let t=this.value_;this.value_=e,this.version=C(),f()?.write?.({name:this.name,newValue:e,oldValue:t}),se(this)}peek(){return this.value_}subscribe=e=>{if(this.disposed_){let e=new b(()=>{});return e.dispose(),e}return this.addEffectSub(e),new b(()=>{this.removeEffectSub(e)})};get disposed(){return this.disposed_}dispose(){this.disposed_||(this.disposed_=!0,this.clearSubscribers(),f()?.dispose?.({kind:`signal`,name:this.name}))}[Symbol.dispose](){this.dispose()}},W=(e,t)=>new U(e,t?.equals,t?.name),G=e=>{if(e===`__proto__`||e===`constructor`||e===`prototype`)throw new o(`Unsafe key "${e}" rejected to prevent prototype pollution.`)},ce=(e,t)=>{let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n},K=(e,t,n)=>{if(t.length===0)return n;if(typeof e!=`object`||!e)throw new o(`Cannot write to a nested path through a null or non-object intermediate value.`);let[r,...i]=t,a=e;return{...a,[r]:K(a[r],i,n)}},q=class{[p]=!0;source_;write_;evict_;disposeSource_;name_;get name(){return this.name_??this.source_.name}constructor(e){this.source_=e.source,this.write_=e.write,this.evict_=e.evict,this.disposeSource_=e.disposeSource,this.name_=e.name}get value(){return this.source_.value}set value(e){this.write_(e)}peek(){return this.source_.peek()}subscribe(e){return this.source_.subscribe(e)}get disposed(){return this.source_.disposed}dispose(){this.evict_(),this.disposeSource_?.()}[Symbol.dispose](){this.dispose()}},le=class{[p]=!0;[h]=!0;name;current_;disposed_;initial_;lensCache_;propSignals_;readonlyProxy_;version_;constructor(e,t){this.name=t,this.current_=structuredClone(e),this.disposed_=!1,this.initial_=structuredClone(e),this.lensCache_=new Map,this.propSignals_=new Map,this.version_=new U(0,void 0,t?`${t}.version`:void 0),this.readonlyProxy_=new Proxy(this.current_,{deleteProperty(e,t){throw new o(`Direct deletion from store.value is not allowed. Use store.patch() or store.lens(). (key: "${String(t)}")`)},set(e,t){throw new o(`Direct mutation of store.value is not allowed. Use store.patch(), store.lens(), or store.replace(). (key: "${String(t)}")`)}})}propSignalFor_(e){let t=this.propSignals_.get(e);return t===void 0&&(t=new U(this.current_[e],void 0,this.name===void 0?e:`${this.name}.${e}`),this.propSignals_.set(e,t)),t}setPath_(e,t){let[n,...r]=e,i=this.current_[n],a=K(i,r,t);this.applyTopLevelChange_(n,a)}applyTopLevelChange_(e,t){G(e);let n=this.current_[e];Object.is(n,t)||(this.current_[e]=t,this.propSignalFor_(e).value=t,this.version_.value=this.version_.peek()+1)}deleteTopLevelKey_(e){Object.hasOwn(this.current_,e)&&(delete this.current_[e],this.propSignalFor_(e).value=void 0,this.version_.value=this.version_.peek()+1)}applyFullState_(e){let t=this.current_,n=new Set([...Object.keys(t),...Object.keys(e)]);for(let e of n)G(e);H(()=>{for(let t of n)Object.hasOwn(e,t)?this.applyTopLevelChange_(t,e[t]):this.deleteTopLevelKey_(t)})}get value(){return this.version_.value,this.readonlyProxy_}peek(){return Object.freeze(structuredClone(this.current_))}subscribe=e=>this.version_.subscribe(e);patch(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new o(`store.patch() requires a plain object partial.`);let t=Object.keys(e);if(t.length!==0){for(let e of t)G(e);H(()=>{for(let n of t)this.applyTopLevelChange_(n,e[n])}),f()?.mutate?.({kind:`patch`,name:this.name})}}replace(e){let t=structuredClone(this.current_),n=e(t);n!==t&&(this.applyFullState_(n),f()?.mutate?.({kind:`replace`,name:this.name}))}reset(){this.applyFullState_(this.initial_),f()?.mutate?.({kind:`reset`,name:this.name})}lens(e){let t=this.lensCache_.get(e);if(t!==void 0)return t;let n=()=>{this.lensCache_.delete(e)},r=e.split(`.`);if(r.length>32)throw new o(`Lens path exceeds maximum depth of 32 segments: "${e}".`);for(let t of r){if(t===``)throw new o(`Empty path segment in lens path "${e}". Check for consecutive dots.`);if(t===`__proto__`||t===`constructor`||t===`prototype`)throw new o(`Unsafe path segment "${t}" in lens path "${e}".`)}let i;if(r.length===1)i=new q({evict:n,source:this.propSignalFor_(r[0]),write:t=>{H(()=>this.applyTopLevelChange_(r[0],t)),f()?.mutate?.({kind:`lens`,name:this.name,path:e})}});else{let t=I(()=>ce(this.propSignalFor_(r[0]).value,r.slice(1)));i=new q({disposeSource:()=>t.dispose(),evict:n,name:this.name?`${this.name}.${e}`:e,source:t,write:n=>{let i=t.peek();Object.is(i,n)||(H(()=>this.setPath_(r,n)),f()?.mutate?.({kind:`lens`,name:this.name,path:e}))}})}return this.lensCache_.set(e,i),i}get disposed(){return this.disposed_}dispose(){if(!this.disposed_){this.disposed_=!0;for(let e of[...this.lensCache_.values()])e.dispose();this.lensCache_.clear();for(let e of this.propSignals_.values())e.dispose();this.propSignals_.clear(),this.version_.dispose(),f()?.dispose?.({kind:`store`,name:this.name})}}[Symbol.dispose](){this.dispose()}},J=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw new o(`store() requires a plain object initial state.`);for(let t of Object.keys(e))G(t);return new le(e,t?.name)},ue=(e,t)=>{if(t===`sync`||t===void 0)return e;let n=!1;return()=>{n||(n=!0,queueMicrotask(()=>{n=!1,e()}))}},Y=(e,t)=>{let n=t?.scheduler??`sync`,r=t?.name,o=[],s=new Set,d=new Map,p=!1,h=!1,g=!1,_=()=>{if(d.clear(),o.length===0&&s.size===0)return;let e=[...o,...s];o.length=0,s.clear(),l(e,`effect teardown errors`)},v=()=>{if(!g){if(p){h=!0;return}p=!0;try{let t=0;do{if(++t>100)throw new i(`infinite effect loop (> 100 iterations)${r?` in "${r}"`:``}`);h=!1,_(),f()?.run?.({name:r});let n;try{n=A({cleanups:o,deps:d,effect:y,kind:`effect`,subscriptions:s},e)}catch(e){let t=[...c(s),...c(o)];o.length=0,s.clear(),u(e,t,`effect failure with cleanup errors`)}if(n!==void 0&&typeof n!=`function`)throw new a(`effect() returned ${typeof n} — expected a cleanup function or void.`);typeof n==`function`&&o.push(n)}while(h&&!g)}finally{p=!1}}},y=ue(v,n);v();let x=new b(()=>{g||(g=!0,_(),f()?.dispose?.({kind:`effect`,name:r}))});return M()?.push(()=>x.dispose()),{dispose:()=>x.dispose(),get disposed(){return x.disposed},getDependencies(){return[...d.keys()].map(e=>({kind:m in e?`computed`:`signal`,name:e.name}))},[Symbol.dispose](){x.dispose()}}},de=(e,t)=>{let n=null,r=null,i=null,a=t?.onError??(e=>{queueMicrotask(()=>{throw e})});return new x(Y(()=>{n?.abort(),r?.(),r=null,n=new AbortController;let{signal:t}=n,o=X(),s;return i=s=(async()=>{try{let n=await e(t,o);typeof n==`function`&&(t.aborted?n():r=n)}catch(e){t.aborted||a(e)}finally{o.dispose(),i===s&&(i=null)}})(),()=>{n?.abort(),r?.(),r=null}},{name:t?.name}),async()=>{let e=i;e&&await e},()=>i)},fe=e=>{let t=k();if(t?.kind===`effect`){t.cleanups.push(e);return}let n=M();if(n!==null){n.push(e);return}throw new a(`onCleanup() must be called from within an active effect or scope.`)},X=e=>{let t=[],r=new AbortController,i=!1,a=e=>{if(i)throw new n(`Cannot register cleanup on a disposed scope.`);t.push(e)},o=e=>{if(i)throw new n(`Cannot run inside a disposed scope.`);return j(t,e)},s=()=>{i||(i=!0,r.abort(),l([...t].reverse(),`scope cleanup errors`),t.length=0)},c={add:a,get disposalSignal(){return r.signal},dispose:s,get disposed(){return i},run:o,[Symbol.dispose]:s};return e&&o(e),c};function pe(e,t,n){let r=n?.equals??Object.is,i,o=(e,n)=>{i?.(),i=void 0;let r=t(e,n);if(r!==void 0&&typeof r!=`function`)throw new a(`watch() callback returned ${typeof r} — expected a cleanup function or void.`);typeof r==`function`&&(i=r)},s;if(typeof e==`function`){let t,a=!0,c=Y(()=>{let i=e();if(a){a=!1,t=i;return}if(!r(t,i)){let e=t;t=i,o(i,e),n?.once&&s.dispose()}},{name:n?.name});s=new b(()=>{i?.(),i=void 0,c.dispose()}),n?.immediate&&(o(t,void 0),n.once&&s.dispose())}else{let t=e.peek(),a=e.subscribe(()=>{let i=e.peek();r(t,i)||(o(i,t),t=i,n?.once&&s.dispose())});s=new b(()=>{i?.(),i=void 0,a.dispose()}),n?.immediate&&(o(t,void 0),n.once&&s.dispose())}return M()?.push(()=>s.dispose()),s}var me=e=>({get disposed(){return e.disposed},[p]:!0,get name(){return e.name},peek(){return e.peek()},subscribe(t){return e.subscribe(t)},get value(){return e.value}}),Z=e=>typeof e==`object`&&!!e&&!!e[p],he=e=>Z(e)&&!e[m]&&!e[h],ge=e=>typeof e==`object`&&!!e&&!!e[m],Q=e=>typeof e==`object`&&!!e&&!!e[h],_e=(e,t)=>{let n=t?.name,r=W({data:t?.initialValue,status:`loading`},n?{name:n}:void 0),i=W(0),a=null,o=!1,s=Y(()=>{i.value,a?.abort(),a=new AbortController;let{signal:t}=a,n=r.peek(),s=`data`in n?n.data:void 0;r.value={data:s,status:`loading`},(async()=>{try{let n=await e(t);!t.aborted&&!o&&(r.value={data:n,status:`ready`})}catch(e){!t.aborted&&!o&&(r.value={data:s,error:e,status:`error`})}})()},n?{name:n}:void 0),c=()=>{o||(i.value=i.peek()+1)},l=()=>{o||(o=!0,a?.abort(),s.dispose(),r.dispose(),i.dispose())};return N(l),{dispose:l,get disposed(){return o},[m]:!0,[p]:!0,get name(){return r.name},peek:()=>r.peek(),refresh:c,subscribe:e=>r.subscribe(e),[Symbol.dispose]:l,get value(){return r.value}}},$=(e,t)=>({label:t,state:Object.freeze(structuredClone({...e}))}),ve=(e,t)=>{let n=t?.maxHistory??50,r=!Q(e),i=r?J(e,{name:t?.name}):e,a=[$(i.peek())],o=W(0,{name:t?.name?`${t.name}.cursor`:void 0}),s=!1,c=e=>{s||(a.splice(o.peek()+1),a.push($(i.peek(),e)),a.length>n&&a.splice(0,a.length-n),o.value=a.length-1)},l=()=>{s||o.peek()<=0||(o.value=o.peek()-1,i.replace(()=>a[o.peek()].state))},u=()=>{s||o.peek()>=a.length-1||(o.value=o.peek()+1,i.replace(()=>a[o.peek()].state))},d=e=>{if(!(e<0||e>=a.length))return a[e]},f=()=>{s||(s=!0,o.dispose(),r&&i.dispose())};return{get canRedo(){return o.value<a.length-1},get canUndo(){return o.value>0},dispose:f,get disposed(){return s},historyAt:d,get historyLength(){return a.length},lens:e=>i.lens(e),get name(){return i.name},patch:e=>i.patch(e),peek:()=>i.peek(),push:()=>c(),pushNamed:e=>c(e),redo:u,replace:e=>i.replace(e),reset:()=>i.reset(),get store(){return i},subscribe:e=>i.subscribe(e),[Symbol.dispose]:f,undo:l,get value(){return i.value}}};exports.RippleComputedCycleError=t,exports.RippleDisposedScopeError=n,exports.RippleEnvironmentError=r,exports.RippleError=e,exports.RippleInfiniteLoopError=i,exports.RippleInvalidCleanupError=a,exports.RippleInvalidStoreError=o,exports.batch=H,exports.computed=I,exports.effect=Y,exports.effectAsync=de,exports.getDevToolsHook=f,exports.isComputed=ge,exports.isReactive=Z,exports.isSignal=he,exports.isStore=Q,exports.onCleanup=fe,exports.readonly=me,exports.resource=_e,exports.scope=X,exports.signal=W,exports.store=J,exports.storeWithHistory=ve,exports.untrack=P,exports.watch=pe;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=class e extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}static is(t){return t instanceof e}},t=class extends e{},n=class extends e{},r=class extends e{},i=class extends e{},a=class extends e{},o=class extends e{},s=e=>e instanceof Error?e:Error(`Non-Error thrown: ${String(e)}`),c=e=>{let t=[];for(let n of e)try{n()}catch(e){t.push(s(e))}return t},l=(e,t)=>{let n=c(e);if(n.length===1)throw n[0];if(n.length>0)throw AggregateError(n,t)},u=(e,t,n)=>{throw t.length===0?e:AggregateError([s(e),...t],n,{cause:s(e)})},d=null,f=()=>d,p=Symbol(`ripple.is-signal`),m=Symbol(`ripple.is-computed`),h=Symbol(`ripple.is-store`),g=Symbol(`ripple.uninitialized`),_=new FinalizationRegistry(({key:e,map:t})=>{t.delete(e)}),v=class{version=0;name;[p]=!0;computedSubs_=new Map;effectSubs_=new Set;constructor(e){this.name=e}addComputedSub(e){let t=new WeakRef(e);this.computedSubs_.set(e,t),_.register(e,{key:e,map:this.computedSubs_},t)}removeComputedSub(e){let t=this.computedSubs_.get(e);t!==void 0&&(this.computedSubs_.delete(e),_.unregister(t))}addEffectSub(e){this.effectSubs_.add(e)}removeEffectSub(e){this.effectSubs_.delete(e)}clearSubscribers(){for(let e of this.computedSubs_.values())_.unregister(e);this.computedSubs_.clear(),this.effectSubs_.clear()}hasSubscribers(){if(this.effectSubs_.size>0)return!0;for(let e of this.computedSubs_.values())if(e.deref()!==void 0)return!0;return!1}*computedSubs(){for(let[e,t]of this.computedSubs_){let n=t.deref();n===void 0?(this.computedSubs_.delete(e),_.unregister(t)):yield n}}effectSubs(){return this.effectSubs_}},y=class extends v{[m]=!0;lastPropEpoch_=0},b=class{fn_;disposed_=!1;constructor(e){this.fn_=e}get disposed(){return this.disposed_}dispose(){if(this.disposed_)return;this.disposed_=!0;let e=this.fn_;this.fn_=null,e()}[Symbol.dispose](){this.dispose()}},x=class{awaitDone_;getCurrentRun_;syncStop_;asyncDisposePromise_=null;constructor(e,t,n){this.awaitDone_=t,this.getCurrentRun_=n,this.syncStop_=e}get disposed(){return this.syncStop_.disposed}dispose(){this.syncStop_.dispose()}run(){return this.getCurrentRun_()??Promise.resolve()}[Symbol.dispose](){this.dispose()}[Symbol.asyncDispose](){return this.asyncDisposePromise_===null?(this.dispose(),this.asyncDisposePromise_=this.awaitDone_(),this.asyncDisposePromise_):this.asyncDisposePromise_}},S=0,C=()=>++S,w=()=>S,T={scheduling:{activeDirty:`a`,batchDepth:0,dirtyWithEffectSubsA:new Set,dirtyWithEffectSubsB:new Set,pendingSubscribers:new Set},scopeCleanups:null,tracking:null},E=null,D=()=>E===null?T:E.get(),O=()=>D().scheduling,ee=()=>E!==null,k=()=>D().tracking,A=(e,t)=>{if(E!==null){let n=E.get();return E.run({...n,tracking:e},t)}let n=T;T={...T,tracking:e};try{return t()}finally{T=n}},j=(e,t)=>{if(E!==null){let n=E.get();return E.run({...n,scopeCleanups:e},t)}let n=T;T={...T,scopeCleanups:e};try{return t()}finally{T=n}},M=()=>D().scopeCleanups,N=e=>{let t=k();t?.kind===`effect`?t.cleanups.push(e):M()?.push(e)},P=e=>A(null,e),F=e=>{let t=k();if(t!==null){if(t.sourceObserver?.(e),t.kind===`computed`)t.depCollector.push({source:e,version:e.version});else if(t.kind===`effect`){let n=t.effect;e.addEffectSub(n),t.subscriptions.add(()=>e.removeEffectSub(n)),t.deps.set(e,e.version)}}},te=class extends y{value_;dirty_;computing_;disposed_;deps_;compute_;equals_;maxRevision_;constructor(e,t){let{equals:n,name:r}=t??{};super(r),this.value_=g,this.dirty_=!0,this.computing_=!1,this.disposed_=!1,this.deps_=[],this.maxRevision_=-1,this.compute_=e,this.equals_=n===void 0?Object.is:(e,t)=>n(e,t)}markDirty(){return this.disposed_||this.dirty_?!1:(this.dirty_=!0,!0)}refreshIfDirty(){if(!this.dirty_)return!1;if(w()<=this.maxRevision_)return this.dirty_=!1,!1;if(this.deps_.length>0){let e=!0;for(let t of this.deps_){let n=t.source;if(`refreshIfDirty`in n&&n.refreshIfDirty(),n.version!==t.version){e=!1;break}}if(e)return this.dirty_=!1,this.maxRevision_=w(),!1}return this.recompute()}runCompute(e){try{return A({computed:this,depCollector:e,kind:`computed`},this.compute_)}catch(e){throw s(e)}}recompute(){if(this.computing_)throw new t(`computed cycle detected${this.name?` "${this.name}"`:``}`);this.computing_=!0;try{let e=[];f()?.compute?.({name:this.name});let t=this.runCompute(e);return this.dirty_=!1,this.maxRevision_=w(),this.updateDeps(e),this.value_===g||!this.equals_(this.value_,t)?(this.value_=t,this.version++,!0):!1}finally{this.computing_=!1}}updateDeps(e){let t=this.deps_;if(t.length===e.length&&t.every((t,n)=>t.source===e[n].source)){for(let n=0;n<e.length;n++)t[n].version=e[n].version;return}let n=new Set(t.map(e=>e.source)),r=new Set(e.map(e=>e.source));for(let e of t)r.has(e.source)||e.source.removeComputedSub(this);for(let t of e)n.has(t.source)||t.source.addComputedSub(this);this.deps_=e}get value(){return this.disposed_?this.value_===g?void 0:this.value_:(this.refreshIfDirty(),F(this),this.value_)}peek(){return this.disposed_?this.value_===g?void 0:this.value_:(this.refreshIfDirty(),this.value_)}subscribe=e=>{if(this.disposed_){let e=new b(()=>{});return e.dispose(),e}return this.refreshIfDirty(),this.addEffectSub(e),new b(()=>{this.removeEffectSub(e)})};get disposed(){return this.disposed_}dispose(){if(!this.disposed_){this.disposed_=!0;for(let e of this.deps_)e.source.removeComputedSub(this);this.deps_=[],this.clearSubscribers(),f()?.dispose?.({kind:`computed`,name:this.name})}}[Symbol.dispose](){this.dispose()}},I=(e,t)=>{let n=new te(e,t);return N(()=>n.dispose()),n},ne=!globalThis.__RIPPLE_PROD__;function re(e){ne&&console.warn(`[@vielzeug/ripple] ${e}`)}var L=!1,R=0,z=[],B=e=>e.activeDirty===`a`?e.dirtyWithEffectSubsA:e.dirtyWithEffectSubsB,ie=(e,t)=>{let n=++R;for(let n of t.effectSubs())e.pendingSubscribers.add(n);for(let e of t.computedSubs())z.push(e);try{for(;z.length>0;){let t=z.pop();if(t.lastPropEpoch_!==n&&(t.lastPropEpoch_=n,t.markDirty())){t.effectSubs().size>0&&B(e).add(t);for(let e of t.computedSubs())z.push(e)}}}finally{z.length=0}},ae=e=>{for(;B(e).size>0;){let t=B(e);e.activeDirty=e.activeDirty===`a`?`b`:`a`,B(e).clear();for(let n of t)if(n.hasSubscribers()&&n.refreshIfDirty()){for(let t of n.effectSubs())e.pendingSubscribers.add(t);for(let t of n.computedSubs())t.markDirty()&&t.effectSubs().size>0&&B(e).add(t)}t.clear()}},V=e=>{let t=0;for(;e.pendingSubscribers.size>0||B(e).size>0;){if(++t>100)throw new i(`infinite flush loop (> 100 iterations)`);if(B(e).size>0&&ae(e),e.pendingSubscribers.size===0)continue;let n=[...e.pendingSubscribers];e.pendingSubscribers.clear(),l(n,`subscriber errors`)}},oe=globalThis.process?.versions!=null,se=e=>{if(!e.hasSubscribers())return;!L&&oe&&!ee()&&(L=!0,re(`Signal updated in a Node.js-like environment. The module-level flush queue is shared across concurrent requests — use per-request worker isolation or the @vielzeug/ripple/ssr sub-path for request-isolated scheduling.`));let t=O();ie(t,e),t.batchDepth===0&&V(t)},H=e=>{let t=O();t.batchDepth++;let n;try{n=e()}catch(e){throw t.batchDepth--,t.batchDepth===0&&(t.pendingSubscribers.clear(),t.dirtyWithEffectSubsA.clear(),t.dirtyWithEffectSubsB.clear()),e}return t.batchDepth--,t.batchDepth===0&&V(t),n},U=class extends v{value_;equals_;disposed_;constructor(e,t,n){super(n),this.value_=e,this.equals_=t??Object.is,this.disposed_=!1}get value(){return this.disposed_||F(this),this.value_}set value(e){if(this.disposed_||this.equals_(this.value_,e))return;let t=this.value_;this.value_=e,this.version=C(),f()?.write?.({name:this.name,newValue:e,oldValue:t}),se(this)}peek(){return this.value_}subscribe=e=>{if(this.disposed_){let e=new b(()=>{});return e.dispose(),e}return this.addEffectSub(e),new b(()=>{this.removeEffectSub(e)})};get disposed(){return this.disposed_}dispose(){this.disposed_||(this.disposed_=!0,this.clearSubscribers(),f()?.dispose?.({kind:`signal`,name:this.name}))}[Symbol.dispose](){this.dispose()}},W=(e,t)=>new U(e,t?.equals,t?.name),G=e=>{if(e===`__proto__`||e===`constructor`||e===`prototype`)throw new o(`Unsafe key "${e}" rejected to prevent prototype pollution.`)},ce=(e,t)=>{let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n},K=(e,t,n)=>{if(t.length===0)return n;if(typeof e!=`object`||!e)throw new o(`Cannot write to a nested path through a null or non-object intermediate value.`);let[r,...i]=t,a=e;return{...a,[r]:K(a[r],i,n)}},q=class{[p]=!0;source_;write_;evict_;disposeSource_;name_;disposed_=!1;get name(){return this.name_??this.source_.name}constructor(e){this.source_=e.source,this.write_=e.write,this.evict_=e.evict,this.disposeSource_=e.disposeSource,this.name_=e.name}get value(){return this.source_.value}set value(e){this.write_(e)}peek(){return this.source_.peek()}subscribe(e){return this.source_.subscribe(e)}get disposed(){return this.disposed_||this.source_.disposed}dispose(){this.disposed_=!0,this.evict_(),this.disposeSource_?.()}[Symbol.dispose](){this.dispose()}},le=class{[p]=!0;[h]=!0;name;current_;disposed_;initial_;lensCache_;propSignals_;readonlyProxy_;version_;constructor(e,t){this.name=t,this.current_=structuredClone(e),this.disposed_=!1,this.initial_=structuredClone(e),this.lensCache_=new Map,this.propSignals_=new Map,this.version_=new U(0,void 0,t?`${t}.version`:void 0),this.readonlyProxy_=new Proxy(this.current_,{deleteProperty(e,t){throw new o(`Direct deletion from store.value is not allowed. Use store.patch() or store.lens(). (key: "${String(t)}")`)},set(e,t){throw new o(`Direct mutation of store.value is not allowed. Use store.patch(), store.lens(), or store.replace(). (key: "${String(t)}")`)}})}propSignalFor_(e){let t=this.propSignals_.get(e);return t===void 0&&(t=new U(this.current_[e],void 0,this.name===void 0?e:`${this.name}.${e}`),this.propSignals_.set(e,t)),t}setPath_(e,t){let[n,...r]=e,i=this.current_[n],a=K(i,r,t);this.applyTopLevelChange_(n,a)}applyTopLevelChange_(e,t){G(e);let n=this.current_[e];Object.is(n,t)||(this.current_[e]=t,this.propSignalFor_(e).value=t,this.version_.value=this.version_.peek()+1)}deleteTopLevelKey_(e){Object.hasOwn(this.current_,e)&&(delete this.current_[e],this.propSignalFor_(e).value=void 0,this.version_.value=this.version_.peek()+1)}applyFullState_(e){let t=this.current_,n=new Set([...Object.keys(t),...Object.keys(e)]);for(let e of n)G(e);H(()=>{for(let t of n)Object.hasOwn(e,t)?this.applyTopLevelChange_(t,e[t]):this.deleteTopLevelKey_(t)})}get value(){return this.version_.value,this.readonlyProxy_}peek(){return Object.freeze(structuredClone(this.current_))}subscribe=e=>this.version_.subscribe(e);patch(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new o(`store.patch() requires a plain object partial.`);let t=Object.keys(e);if(t.length!==0){for(let e of t)G(e);H(()=>{for(let n of t)this.applyTopLevelChange_(n,e[n])}),f()?.mutate?.({kind:`patch`,name:this.name})}}replace(e){let t=structuredClone(this.current_),n=e(t);n!==t&&(this.applyFullState_(n),f()?.mutate?.({kind:`replace`,name:this.name}))}reset(){this.applyFullState_(this.initial_),f()?.mutate?.({kind:`reset`,name:this.name})}lens(e){let t=this.lensCache_.get(e);if(t!==void 0)return t;let n=()=>{this.lensCache_.delete(e)},r=e.split(`.`);if(r.length>32)throw new o(`Lens path exceeds maximum depth of 32 segments: "${e}".`);for(let t of r){if(t===``)throw new o(`Empty path segment in lens path "${e}". Check for consecutive dots.`);if(t===`__proto__`||t===`constructor`||t===`prototype`)throw new o(`Unsafe path segment "${t}" in lens path "${e}".`)}let i;if(r.length===1)i=new q({evict:n,source:this.propSignalFor_(r[0]),write:t=>{H(()=>this.applyTopLevelChange_(r[0],t)),f()?.mutate?.({kind:`lens`,name:this.name,path:e})}});else{let t=I(()=>ce(this.propSignalFor_(r[0]).value,r.slice(1)));i=new q({disposeSource:()=>t.dispose(),evict:n,name:this.name?`${this.name}.${e}`:e,source:t,write:n=>{let i=t.peek();Object.is(i,n)||(H(()=>this.setPath_(r,n)),f()?.mutate?.({kind:`lens`,name:this.name,path:e}))}})}return this.lensCache_.set(e,i),i}get disposed(){return this.disposed_}dispose(){if(!this.disposed_){this.disposed_=!0;for(let e of[...this.lensCache_.values()])e.dispose();this.lensCache_.clear();for(let e of this.propSignals_.values())e.dispose();this.propSignals_.clear(),this.version_.dispose(),f()?.dispose?.({kind:`store`,name:this.name})}}[Symbol.dispose](){this.dispose()}},J=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw new o(`store() requires a plain object initial state.`);for(let t of Object.keys(e))G(t);return new le(e,t?.name)},ue=(e,t)=>{if(t===`sync`||t===void 0)return e;let n=!1;return()=>{n||(n=!0,queueMicrotask(()=>{n=!1,e()}))}},Y=(e,t)=>{let n=t?.scheduler??`sync`,r=t?.name,o=[],s=new Set,d=new Map,p=!1,h=!1,g=!1,_=()=>{if(d.clear(),o.length===0&&s.size===0)return;let e=[...o,...s];o.length=0,s.clear(),l(e,`effect teardown errors`)},v=()=>{if(!g){if(p){h=!0;return}p=!0;try{let t=0;do{if(++t>100)throw new i(`infinite effect loop (> 100 iterations)${r?` in "${r}"`:``}`);h=!1,_(),f()?.run?.({name:r});let n;try{n=A({cleanups:o,deps:d,effect:y,kind:`effect`,subscriptions:s},e)}catch(e){let t=[...c(s),...c(o)];o.length=0,s.clear(),u(e,t,`effect failure with cleanup errors`)}if(n!==void 0&&typeof n!=`function`)throw new a(`effect() returned ${typeof n} — expected a cleanup function or void.`);typeof n==`function`&&o.push(n)}while(h&&!g)}finally{p=!1}}},y=ue(v,n);v();let x=new b(()=>{g||(g=!0,_(),f()?.dispose?.({kind:`effect`,name:r}))});return M()?.push(()=>x.dispose()),{dispose:()=>x.dispose(),get disposed(){return x.disposed},getDependencies(){return[...d.keys()].map(e=>({kind:m in e?`computed`:`signal`,name:e.name}))},[Symbol.dispose](){x.dispose()}}},de=(e,t)=>{let n=null,r=null,i=null,a=t?.onError??(e=>{queueMicrotask(()=>{throw e})});return new x(Y(()=>{n?.abort(),r?.(),r=null,n=new AbortController;let{signal:t}=n,o=X(),s;return i=s=(async()=>{try{let n=await e(t,o);typeof n==`function`&&(t.aborted?n():r=n)}catch(e){t.aborted||a(e)}finally{o.dispose(),i===s&&(i=null)}})(),()=>{n?.abort(),r?.(),r=null}},{name:t?.name}),async()=>{let e=i;e&&await e},()=>i)},fe=e=>{let t=k();if(t?.kind===`effect`){t.cleanups.push(e);return}let n=M();if(n!==null){n.push(e);return}throw new a(`onCleanup() must be called from within an active effect or scope.`)},X=e=>{let t=[],r=new AbortController,i=!1,a=e=>{if(i)throw new n(`Cannot register cleanup on a disposed scope.`);t.push(e)},o=e=>{if(i)throw new n(`Cannot run inside a disposed scope.`);return j(t,e)},s=()=>{i||(i=!0,r.abort(),l([...t].reverse(),`scope cleanup errors`),t.length=0)},c={add:a,get disposalSignal(){return r.signal},dispose:s,get disposed(){return i},run:o,[Symbol.dispose]:s};return e&&o(e),c};function pe(e,t,n){let r=n?.equals??Object.is,i,o=(e,n)=>{i?.(),i=void 0;let r=t(e,n);if(r!==void 0&&typeof r!=`function`)throw new a(`watch() callback returned ${typeof r} — expected a cleanup function or void.`);typeof r==`function`&&(i=r)},s;if(typeof e==`function`){let t,a=!0,c=Y(()=>{let i=e();if(a){a=!1,t=i;return}if(!r(t,i)){let e=t;t=i,o(i,e),n?.once&&s.dispose()}},{name:n?.name});s=new b(()=>{i?.(),i=void 0,c.dispose()}),n?.immediate&&(o(t,void 0),n.once&&s.dispose())}else{let t=e.peek(),a=e.subscribe(()=>{let i=e.peek();r(t,i)||(o(i,t),t=i,n?.once&&s.dispose())});s=new b(()=>{i?.(),i=void 0,a.dispose()}),n?.immediate&&(o(t,void 0),n.once&&s.dispose())}return M()?.push(()=>s.dispose()),s}var me=e=>({get disposed(){return e.disposed},[p]:!0,get name(){return e.name},peek(){return e.peek()},subscribe(t){return e.subscribe(t)},get value(){return e.value}}),Z=e=>typeof e==`object`&&!!e&&!!e[p],he=e=>Z(e)&&!e[m]&&!e[h],ge=e=>typeof e==`object`&&!!e&&!!e[m],Q=e=>typeof e==`object`&&!!e&&!!e[h],_e=(e,t)=>{let n=t?.name,r=W({data:t?.initialValue,status:`loading`},n?{name:n}:void 0),i=W(0),a=null,o=!1,s=Y(()=>{i.value,a?.abort(),a=new AbortController;let{signal:t}=a,n=r.peek(),s=`data`in n?n.data:void 0;r.value={data:s,status:`loading`},(async()=>{try{let n=await e(t);!t.aborted&&!o&&(r.value={data:n,status:`ready`})}catch(e){!t.aborted&&!o&&(r.value={data:s,error:e,status:`error`})}})()},n?{name:n}:void 0),c=()=>{o||(i.value=i.peek()+1)},l=()=>{o||(o=!0,a?.abort(),s.dispose(),r.dispose(),i.dispose())};return N(l),{dispose:l,get disposed(){return o},[m]:!0,[p]:!0,get name(){return r.name},peek:()=>r.peek(),refresh:c,subscribe:e=>r.subscribe(e),[Symbol.dispose]:l,get value(){return r.value}}},$=(e,t)=>({label:t,state:Object.freeze(structuredClone({...e}))}),ve=(e,t)=>{let n=t?.maxHistory??50,r=!Q(e),i=r?J(e,{name:t?.name}):e,a=[$(i.peek())],o=W(0,{name:t?.name?`${t.name}.cursor`:void 0}),s=!1,c=e=>{s||(a.splice(o.peek()+1),a.push($(i.peek(),e)),a.length>n&&a.splice(0,a.length-n),o.value=a.length-1)},l=()=>{s||o.peek()<=0||(o.value=o.peek()-1,i.replace(()=>a[o.peek()].state))},u=()=>{s||o.peek()>=a.length-1||(o.value=o.peek()+1,i.replace(()=>a[o.peek()].state))},d=e=>{if(!(e<0||e>=a.length))return a[e]},f=()=>{s||(s=!0,o.dispose(),r&&i.dispose())};return{get canRedo(){return o.value<a.length-1},get canUndo(){return o.value>0},dispose:f,get disposed(){return s},historyAt:d,get historyLength(){return a.length},lens:e=>i.lens(e),get name(){return i.name},patch:e=>i.patch(e),peek:()=>i.peek(),push:()=>c(),pushNamed:e=>c(e),redo:u,replace:e=>i.replace(e),reset:()=>i.reset(),get store(){return i},subscribe:e=>i.subscribe(e),[Symbol.dispose]:f,undo:l,get value(){return i.value}}};exports.RippleComputedCycleError=t,exports.RippleDisposedScopeError=n,exports.RippleEnvironmentError=r,exports.RippleError=e,exports.RippleInfiniteLoopError=i,exports.RippleInvalidCleanupError=a,exports.RippleInvalidStoreError=o,exports.batch=H,exports.computed=I,exports.effect=Y,exports.effectAsync=de,exports.getDevToolsHook=f,exports.isComputed=ge,exports.isReactive=Z,exports.isSignal=he,exports.isStore=Q,exports.onCleanup=fe,exports.readonly=me,exports.resource=_e,exports.scope=X,exports.signal=W,exports.store=J,exports.storeWithHistory=ve,exports.untrack=P,exports.watch=pe;
|
|
2
2
|
//# sourceMappingURL=ripple.cjs.map
|