@fluixi/reactive 1.0.0-alpha.82 → 1.0.0-alpha.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/cdn/reactive.cjs +1 -1
- package/dist/cdn/reactive.global.js +1 -1
- package/dist/cdn/reactive.mjs +1 -1
- package/dist/cdn/signal.cjs +1 -1
- package/dist/cdn/signal.global.js +1 -1
- package/dist/cdn/signal.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/signal/api.cjs +1 -1
- package/dist/lib/signal/api.mjs +1 -1
- package/dist/lib/signal/cached-resource.cjs +1 -1
- package/dist/lib/signal/cached-resource.mjs +1 -1
- package/dist/lib/signal/graph/children.cjs +1 -1
- package/dist/lib/signal/graph/children.mjs +1 -1
- package/dist/lib/signal/graph/compat.cjs +1 -1
- package/dist/lib/signal/graph/compat.d.ts.map +1 -1
- package/dist/lib/signal/graph/compat.js +19 -2
- package/dist/lib/signal/graph/compat.mjs +1 -1
- package/dist/lib/signal/graph/core.cjs +1 -1
- package/dist/lib/signal/graph/core.d.ts.map +1 -1
- package/dist/lib/signal/graph/core.js +7 -0
- package/dist/lib/signal/graph/core.mjs +1 -1
- package/dist/lib/signal/graph/debounced.cjs +1 -1
- package/dist/lib/signal/graph/debounced.mjs +1 -1
- package/dist/lib/signal/graph/derived.cjs +1 -1
- package/dist/lib/signal/graph/derived.mjs +1 -1
- package/dist/lib/signal/graph/error-boundary.cjs +1 -1
- package/dist/lib/signal/graph/error-boundary.mjs +1 -1
- package/dist/lib/signal/graph/index.cjs +1 -1
- package/dist/lib/signal/graph/index.mjs +1 -1
- package/dist/lib/signal/graph/observe.cjs +1 -0
- package/dist/lib/signal/graph/observe.d.ts +141 -0
- package/dist/lib/signal/graph/observe.d.ts.map +1 -0
- package/dist/lib/signal/graph/observe.js +149 -0
- package/dist/lib/signal/graph/observe.mjs +1 -0
- package/dist/lib/signal/graph/resource.cjs +1 -1
- package/dist/lib/signal/graph/resource.mjs +1 -1
- package/dist/lib/signal/graph/runtime.cjs +1 -1
- package/dist/lib/signal/graph/runtime.d.ts +2 -2
- package/dist/lib/signal/graph/runtime.d.ts.map +1 -1
- package/dist/lib/signal/graph/runtime.js +22 -7
- package/dist/lib/signal/graph/runtime.mjs +1 -1
- package/dist/lib/signal/graph/signal-next.cjs +1 -1
- package/dist/lib/signal/graph/signal-next.mjs +1 -1
- package/dist/lib/signal/graph/state.cjs +1 -1
- package/dist/lib/signal/graph/state.d.ts +2 -0
- package/dist/lib/signal/graph/state.d.ts.map +1 -1
- package/dist/lib/signal/graph/state.js +1 -0
- package/dist/lib/signal/graph/state.mjs +1 -1
- package/dist/lib/signal/graph/suspense.cjs +1 -1
- package/dist/lib/signal/graph/suspense.mjs +1 -1
- package/dist/lib/signal/index-legacy.cjs +1 -1
- package/dist/lib/signal/index-legacy.mjs +1 -1
- package/dist/lib/signal/index.cjs +1 -1
- package/dist/lib/signal/index.d.ts +2 -0
- package/dist/lib/signal/index.d.ts.map +1 -1
- package/dist/lib/signal/index.js +2 -0
- package/dist/lib/signal/index.mjs +1 -1
- package/dist/lib/signal/list.cjs +1 -1
- package/dist/lib/signal/list.js +5 -5
- package/dist/lib/signal/list.mjs +1 -1
- package/dist/lib/signal/resource-api.cjs +1 -1
- package/dist/lib/signal/resource-api.mjs +1 -1
- package/dist/lib/signal/signal.cjs +1 -1
- package/dist/lib/signal/signal.mjs +1 -1
- package/dist/lib/signal/utilities.cjs +1 -1
- package/dist/lib/signal/utilities.mjs +1 -1
- package/dist/lib/store/api.cjs +1 -1
- package/dist/lib/store/api.mjs +1 -1
- package/dist/lib/store/index.cjs +1 -1
- package/dist/lib/store/index.mjs +1 -1
- package/dist/lib/store/store.cjs +1 -1
- package/dist/lib/store/store.d.ts.map +1 -1
- package/dist/lib/store/store.js +148 -8
- package/dist/lib/store/store.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/version.generated.cjs +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/version.generated.mjs +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var V=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var xe=Object.prototype.hasOwnProperty;var Re=(e,n)=>{for(var t in n)V(e,t,{get:n[t],enumerable:!0})},Se=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of ke(n))!xe.call(e,s)&&s!==t&&V(e,s,{get:()=>n[s],enumerable:!(o=ge(n,s))||o.enumerable});return e};var Oe=e=>Se(V({},"__esModule",{value:!0}),e);var Ge={};Re(Ge,{createDebouncedResource:()=>Fe,createDebouncedSignal:()=>we});module.exports=Oe(Ge);var _e="__fluixi_signal_next_state__",De=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[_e]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:De,onSuspend:null,onError:null,observer:null};var U="1.0.0-alpha.83";function Ce(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var j=[],Pe;function C(e){let n=r.observer;n&&n.created(e.parents===void 0?{...e,parents:j,origin:e.origin??Pe}:e)}function $(e){return r.observer?(j.push(e),!0):!1}function Q(){j.pop()}function B(e){r.observer?.ran?.(e)}function X(e,n){r.observer?.wrote?.(e,n)}function P(e){r.observer?.disposed?.(e)}var qe="__FLUIXI_DEVTOOLS_HOOK__",Y=globalThis[qe];if(typeof Y?.inject=="function")try{Y.inject({observeReactiveNodes:Ce,version:U})}catch{}function J(){return r.observer!=null}var Z=0,ee=1,k=2,q=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let n=r.consumer;n&&((this.observers??=new Set).add(n),(n.sources??=new Set).add(this))}},N=class extends q{constructor(n,t){super(),this._value=n,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(n){if(!this._equals(this._value,n)){if(this._value=n,this.version++,X(this,r.consumer),this.observers)for(let t of[...this.observers])t.markDirty(k);M(this)}}peek(){return this._value}},x=class extends q{constructor(t,o){super();this._threw=!1;this._initialized=!1;this.state=k;this.sources=null;this._fn=t,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===ee&&this.sources){for(let t of this.sources)if(t.updateIfNecessary(),this.state===k)break}(this.state===k||!this._initialized)&&this.recompute(),this.state=Z}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let t=r.consumer,o=r.untracked,s=$(this);r.consumer=this,r.untracked=!1;let u,i=!1,c;try{u=this._fn()}catch(a){i=!0,c=a,u=this._value}finally{r.consumer=t,r.untracked=o,s&&Q()}let l=!this._initialized||this._threw!==i||(i?c!==this._error:!this._equals(this._value,u));if(this._initialized=!0,this._threw=i,this._error=c,this._value=u,B(this),l){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(k);M(this)}}markDirty(t){if(this.state>=t)return;let o=this.state===Z;if(this.state=t,o){if(this.observers)for(let s of[...this.observers])s.markDirty(ee);M(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function M(e){if(e.watchers)for(let n of[...e.watchers])n._notify(e)}var A=class{constructor(n){this._watched=new Set;this._pending=new Set;this._notifyFn=n}watch(...n){for(let t of n)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...n){for(let t of n)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let n=[...this._pending];return this._pending.clear(),n}_notify(n){if(!this._watched.has(n)||this._pending.has(n))return;let t=this._pending.size===0;this._pending.add(n),t&&this._notifyFn()}};function ne(e){if(r.untracked)return e();r.untracked=!0;try{return e()}finally{r.untracked=!1}}function Ne(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function W(e,n){let t=r.owner;r.owner=e;try{return n()}finally{r.owner=t}}function m(e){if(r.owner){if(r.owner.disposed){e();return}(r.owner.cleanups??=[]).push(e)}}function F(e,n=!0){if(!e.disposed){if(e.owned){for(let t=e.owned.length-1;t>=0;t--)F(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}n&&(e.disposed=!0)}}function te(e){r.hostSchedule=e??(n=>{Promise.resolve().then(n)})}function Ae(e){e.queued||(e.queued=!0,r.queue.push(e),!r.scheduled&&r.batchDepth===0&&(r.scheduled=!0,r.hostSchedule(E)))}function E(){if(r.scheduled=!1,r.flushing)return;r.flushing=!0;let e=0;try{for(;r.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let n=r.queue;r.queue=[];for(let t of n)t.queued=!1,t.disposed||t.run()}}finally{r.flushing=!1}}function re(){r.batchDepth===0&&E()}function oe(e){r.batchDepth++;try{return e()}finally{--r.batchDepth===0&&E()}}var G=class{constructor(n,t=!1){this.queued=!1;this.disposed=!1;this.owner=Ne(r.owner),r.owner&&(r.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new x(()=>{F(this.owner,!1),W(this.owner,()=>{let o=n();typeof o=="function"&&(this.owner.cleanups??=[]).push(o)})}),C({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new A(()=>Ae(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(n){if(n&&typeof n.then=="function"&&r.onSuspend){r.onSuspend(n,this.owner);return}if(r.onError&&r.onError(n,this.owner))return;throw n}}}dispose(){this.disposed||(this.disposed=!0,P(this.computed),this.watcher.unwatch(this.computed),F(this.owner))}};function se(e,n=!1){let t=new G(e,n);return()=>t.dispose()}te(()=>{});var Ie=Symbol.for("signal");var Ve=Symbol.for("signal-node");function p(e,n){let t=new N(e,{equals:n?.equals}),o=(()=>t.get()),s=(u=>{let i=typeof u=="function"?u(t.peek()):u;return t.set(i),re(),i});return Object.defineProperty(o,Ie,{value:!0,enumerable:!0}),Object.defineProperty(o,Ve,{value:{get value(){return t.peek()},get version(){return t.version}},enumerable:!1}),C({kind:"signal",node:t,handle:o,name:n?.name,set:s}),J()&&m(()=>P(t)),[o,s]}function ie(e,n){let t=n;return se(()=>{t=e(t)},!0)}function b(e){return oe(e)}function g(e){return ne(e)}var ue=null;function de(e){ue&&ue(e)}var ae=null;function fe(e){return ae?ae(e):void 0}var ce=null;function pe(){return ce?ce():void 0}var le=null;function ve(e,n){le&&le(e,n)}function je(e){return!!e&&typeof e.then=="function"}var H=Symbol();function he(e,n,t={}){let o,s;typeof n=="function"?(o=typeof e=="function"?e:()=>e,s=n):(o=()=>!0,s=e,n&&typeof n=="object"&&(t=n));let u=t.transport===!1?void 0:pe(),i=u!==void 0?fe(u):void 0,c=i!==void 0,[l,a]=p(i!==void 0?i.value:t.initialValue,{equals:!1}),[w,h]=p(void 0,{equals:!1}),[f,v]=p(i!==void 0||t.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[Te,y]=p(void 0,{equals:!1}),[me,be]=p(void 0,{equals:!1}),R=H,I=!1;ie(()=>{let d=o();if(me(),d===!1||d===null||d===void 0){R=H,b(()=>{v("unresolved"),y(void 0),h(void 0)});return}let O=I;if(I=!1,R!==H&&d===R&&!O)return;if(R=d,c){c=!1;return}let _=!1;m(()=>_=!0);let z=g(f),ye=g(l),L=z==="ready"||z==="refreshing";b(()=>{v(L?"refreshing":"pending"),h(void 0)});try{let T=s(d,{value:ye,refetching:L});je(T)?(y(T),de(T),T.then(D=>{_||(u!==void 0&&ve(u,D),b(()=>{a(()=>D),v("ready"),y(void 0)}))},D=>{_||b(()=>{h(D),v("errored"),y(void 0)})})):b(()=>{a(()=>T),v("ready"),y(void 0)})}catch(T){if(_)return;b(()=>{h(T),v("errored"),y(void 0)})}});let K=()=>{let d=f();return d==="pending"||d==="refreshing"},S=(()=>{let d=w();if(d)throw d;if(K()){let O=Te();if(O)throw O}return l()});return Object.defineProperties(S,{state:{get:f},loading:{get:K},error:{get:w},latest:{get:l}}),Object.defineProperty(S,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(S,Symbol.for("signal"),{value:!0,enumerable:!0}),[S,{mutate:a,refetch:()=>{I=!0,be(void 0)}}]}function we(e,n=300){let[t,o]=p(e),[s,u]=p(e),[i,c]=p(!1),l,a=()=>{l!==void 0&&(clearTimeout(l),l=void 0)},w=()=>{a();let f=g(t);return u(()=>f),c(!1),f},h=(f=>{let v=typeof f=="function"?f(g(t)):f;return o(()=>v),c(!0),a(),l=setTimeout(w,n),v});return m(a),[s,h,{immediate:t,pending:i,flush:w,cancel:()=>{a(),c(!1)}}]}function Me(e){return e!=null&&e!==""}function Fe(e,n,t={}){let{delay:o=300,initialValue:s,shouldFetch:u=Me}=t,[i,c,l]=we(e,o),a=()=>u(i())?i():!1,[w,{refetch:h}]=he(a,n,s===void 0?{}:{initialValue:s});return[w,{...l,query:i,setQuery:c,refetch:h}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var be="__fluixi_signal_next_state__",ye=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[be]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ye,onSuspend:null,onError:null,observer:null};var L="1.0.0-alpha.83";function ge(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var V=[],ke;function C(e){let n=r.observer;n&&n.created(e.parents===void 0?{...e,parents:V,origin:e.origin??ke}:e)}function Y(e){return r.observer?(V.push(e),!0):!1}function $(){V.pop()}function Q(e){r.observer?.ran?.(e)}function B(e,n){r.observer?.wrote?.(e,n)}function P(e){r.observer?.disposed?.(e)}var xe="__FLUIXI_DEVTOOLS_HOOK__",U=globalThis[xe];if(typeof U?.inject=="function")try{U.inject({observeReactiveNodes:ge,version:L})}catch{}function X(){return r.observer!=null}var J=0,Z=1,k=2,q=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let n=r.consumer;n&&((this.observers??=new Set).add(n),(n.sources??=new Set).add(this))}},N=class extends q{constructor(n,t){super(),this._value=n,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(n){if(!this._equals(this._value,n)){if(this._value=n,this.version++,B(this,r.consumer),this.observers)for(let t of[...this.observers])t.markDirty(k);j(this)}}peek(){return this._value}},x=class extends q{constructor(t,o){super();this._threw=!1;this._initialized=!1;this.state=k;this.sources=null;this._fn=t,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Z&&this.sources){for(let t of this.sources)if(t.updateIfNecessary(),this.state===k)break}(this.state===k||!this._initialized)&&this.recompute(),this.state=J}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let t=r.consumer,o=r.untracked,a=Y(this);r.consumer=this,r.untracked=!1;let i,s=!1,c;try{i=this._fn()}catch(u){s=!0,c=u,i=this._value}finally{r.consumer=t,r.untracked=o,a&&$()}let l=!this._initialized||this._threw!==s||(s?c!==this._error:!this._equals(this._value,i));if(this._initialized=!0,this._threw=s,this._error=c,this._value=i,Q(this),l){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(k);j(this)}}markDirty(t){if(this.state>=t)return;let o=this.state===J;if(this.state=t,o){if(this.observers)for(let a of[...this.observers])a.markDirty(Z);j(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function j(e){if(e.watchers)for(let n of[...e.watchers])n._notify(e)}var A=class{constructor(n){this._watched=new Set;this._pending=new Set;this._notifyFn=n}watch(...n){for(let t of n)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...n){for(let t of n)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let n=[...this._pending];return this._pending.clear(),n}_notify(n){if(!this._watched.has(n)||this._pending.has(n))return;let t=this._pending.size===0;this._pending.add(n),t&&this._notifyFn()}};function ee(e){if(r.untracked)return e();r.untracked=!0;try{return e()}finally{r.untracked=!1}}function Re(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function G(e,n){let t=r.owner;r.owner=e;try{return n()}finally{r.owner=t}}function m(e){if(r.owner){if(r.owner.disposed){e();return}(r.owner.cleanups??=[]).push(e)}}function M(e,n=!0){if(!e.disposed){if(e.owned){for(let t=e.owned.length-1;t>=0;t--)M(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}n&&(e.disposed=!0)}}function ne(e){r.hostSchedule=e??(n=>{Promise.resolve().then(n)})}function Se(e){e.queued||(e.queued=!0,r.queue.push(e),!r.scheduled&&r.batchDepth===0&&(r.scheduled=!0,r.hostSchedule(E)))}function E(){if(r.scheduled=!1,r.flushing)return;r.flushing=!0;let e=0;try{for(;r.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let n=r.queue;r.queue=[];for(let t of n)t.queued=!1,t.disposed||t.run()}}finally{r.flushing=!1}}function te(){r.batchDepth===0&&E()}function re(e){r.batchDepth++;try{return e()}finally{--r.batchDepth===0&&E()}}var F=class{constructor(n,t=!1){this.queued=!1;this.disposed=!1;this.owner=Re(r.owner),r.owner&&(r.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new x(()=>{M(this.owner,!1),G(this.owner,()=>{let o=n();typeof o=="function"&&(this.owner.cleanups??=[]).push(o)})}),C({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new A(()=>Se(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(n){if(n&&typeof n.then=="function"&&r.onSuspend){r.onSuspend(n,this.owner);return}if(r.onError&&r.onError(n,this.owner))return;throw n}}}dispose(){this.disposed||(this.disposed=!0,P(this.computed),this.watcher.unwatch(this.computed),M(this.owner))}};function oe(e,n=!1){let t=new F(e,n);return()=>t.dispose()}ne(()=>{});var _e=Symbol.for("signal");var De=Symbol.for("signal-node");function p(e,n){let t=new N(e,{equals:n?.equals}),o=(()=>t.get()),a=(i=>{let s=typeof i=="function"?i(t.peek()):i;return t.set(s),te(),s});return Object.defineProperty(o,_e,{value:!0,enumerable:!0}),Object.defineProperty(o,De,{value:{get value(){return t.peek()},get version(){return t.version}},enumerable:!1}),C({kind:"signal",node:t,handle:o,name:n?.name,set:a}),X()&&m(()=>P(t)),[o,a]}function se(e,n){let t=n;return oe(()=>{t=e(t)},!0)}function b(e){return re(e)}function g(e){return ee(e)}var ie=null;function le(e){ie&&ie(e)}var ue=null;function de(e){return ue?ue(e):void 0}var ae=null;function fe(){return ae?ae():void 0}var ce=null;function pe(e,n){ce&&ce(e,n)}function Ce(e){return!!e&&typeof e.then=="function"}var W=Symbol();function ve(e,n,t={}){let o,a;typeof n=="function"?(o=typeof e=="function"?e:()=>e,a=n):(o=()=>!0,a=e,n&&typeof n=="object"&&(t=n));let i=t.transport===!1?void 0:fe(),s=i!==void 0?de(i):void 0,c=s!==void 0,[l,u]=p(s!==void 0?s.value:t.initialValue,{equals:!1}),[w,h]=p(void 0,{equals:!1}),[f,v]=p(s!==void 0||t.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[he,y]=p(void 0,{equals:!1}),[we,Te]=p(void 0,{equals:!1}),R=W,I=!1;se(()=>{let d=o();if(we(),d===!1||d===null||d===void 0){R=W,b(()=>{v("unresolved"),y(void 0),h(void 0)});return}let O=I;if(I=!1,R!==W&&d===R&&!O)return;if(R=d,c){c=!1;return}let _=!1;m(()=>_=!0);let K=g(f),me=g(l),z=K==="ready"||K==="refreshing";b(()=>{v(z?"refreshing":"pending"),h(void 0)});try{let T=a(d,{value:me,refetching:z});Ce(T)?(y(T),le(T),T.then(D=>{_||(i!==void 0&&pe(i,D),b(()=>{u(()=>D),v("ready"),y(void 0)}))},D=>{_||b(()=>{h(D),v("errored"),y(void 0)})})):b(()=>{u(()=>T),v("ready"),y(void 0)})}catch(T){if(_)return;b(()=>{h(T),v("errored"),y(void 0)})}});let H=()=>{let d=f();return d==="pending"||d==="refreshing"},S=(()=>{let d=w();if(d)throw d;if(H()){let O=he();if(O)throw O}return l()});return Object.defineProperties(S,{state:{get:f},loading:{get:H},error:{get:w},latest:{get:l}}),Object.defineProperty(S,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(S,Symbol.for("signal"),{value:!0,enumerable:!0}),[S,{mutate:u,refetch:()=>{I=!0,Te(void 0)}}]}function Pe(e,n=300){let[t,o]=p(e),[a,i]=p(e),[s,c]=p(!1),l,u=()=>{l!==void 0&&(clearTimeout(l),l=void 0)},w=()=>{u();let f=g(t);return i(()=>f),c(!1),f},h=(f=>{let v=typeof f=="function"?f(g(t)):f;return o(()=>v),c(!0),u(),l=setTimeout(w,n),v});return m(u),[a,h,{immediate:t,pending:s,flush:w,cancel:()=>{u(),c(!1)}}]}function qe(e){return e!=null&&e!==""}function un(e,n,t={}){let{delay:o=300,initialValue:a,shouldFetch:i=qe}=t,[s,c,l]=Pe(e,o),u=()=>i(s())?s():!1,[w,{refetch:h}]=ve(u,n,a===void 0?{}:{initialValue:a});return[w,{...l,query:s,setQuery:c,refetch:h}]}export{un as createDebouncedResource,Pe as createDebouncedSignal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var F=(e,t)=>{for(var n in t)m(e,n,{get:t[n],enumerable:!0})},K=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of H(t))!z.call(e,s)&&s!==n&&m(e,s,{get:()=>t[s],enumerable:!(o=G(t,s))||o.enumerable});return e};var U=e=>K(m({},"__esModule",{value:!0}),e);var se={};F(se,{createDebounce:()=>oe,createDeferred:()=>re,createSelector:()=>te});module.exports=U(se);var L="__fluixi_signal_next_state__",Y=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[L]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Y,onSuspend:null,onError:null,observer:null};var C="1.0.0-alpha.83";function $(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var y=[],B;function v(e){let t=r.observer;t&&t.created(e.parents===void 0?{...e,parents:y,origin:e.origin??B}:e)}function D(e){return r.observer?(y.push(e),!0):!1}function N(){y.pop()}function E(e){r.observer?.ran?.(e)}function P(e,t){r.observer?.wrote?.(e,t)}function h(e){r.observer?.disposed?.(e)}var X="__FLUIXI_DEVTOOLS_HOOK__",q=globalThis[X];if(typeof q?.inject=="function")try{q.inject({observeReactiveNodes:$,version:C})}catch{}function A(){return r.observer!=null}var I=0,M=1,l=2,w=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let t=r.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},T=class extends w{constructor(t,n){super(),this._value=t,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,P(this,r.consumer),this.observers)for(let n of[...this.observers])n.markDirty(l);k(this)}}peek(){return this._value}},d=class extends w{constructor(n,o){super();this._threw=!1;this._initialized=!1;this.state=l;this.sources=null;this._fn=n,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===M&&this.sources){for(let n of this.sources)if(n.updateIfNecessary(),this.state===l)break}(this.state===l||!this._initialized)&&this.recompute(),this.state=I}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let n=r.consumer,o=r.untracked,s=D(this);r.consumer=this,r.untracked=!1;let i,u=!1,a;try{i=this._fn()}catch(c){u=!0,a=c,i=this._value}finally{r.consumer=n,r.untracked=o,s&&N()}let p=!this._initialized||this._threw!==u||(u?a!==this._error:!this._equals(this._value,i));if(this._initialized=!0,this._threw=u,this._error=a,this._value=i,E(this),p){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(l);k(this)}}markDirty(n){if(this.state>=n)return;let o=this.state===I;if(this.state=n,o){if(this.observers)for(let s of[...this.observers])s.markDirty(M);k(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function k(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var b=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let n of t)this._watched.add(n),(n.watchers??=new Set).add(this)}unwatch(...t){for(let n of t)this._watched.delete(n),n.watchers?.delete(this),this._pending.delete(n)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let n=this._pending.size===0;this._pending.add(t),n&&this._notifyFn()}};function J(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function R(e,t){let n=r.owner;r.owner=e;try{return t()}finally{r.owner=n}}function f(e){if(r.owner){if(r.owner.disposed){e();return}(r.owner.cleanups??=[]).push(e)}}function g(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)g(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function j(e){r.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Q(e){e.queued||(e.queued=!0,r.queue.push(e),!r.scheduled&&r.batchDepth===0&&(r.scheduled=!0,r.hostSchedule(S)))}function S(){if(r.scheduled=!1,r.flushing)return;r.flushing=!0;let e=0;try{for(;r.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=r.queue;r.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{r.flushing=!1}}function W(){r.batchDepth===0&&S()}var x=class{constructor(t,n=!1){this.queued=!1;this.disposed=!1;this.owner=J(r.owner),r.owner&&(r.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new d(()=>{g(this.owner,!1),R(this.owner,()=>{let o=t();typeof o=="function"&&(this.owner.cleanups??=[]).push(o)})}),v({kind:"effect",node:this.computed,handle:this,internal:!n}),this.watcher=new b(()=>Q(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(t){if(t&&typeof t.then=="function"&&r.onSuspend){r.onSuspend(t,this.owner);return}if(r.onError&&r.onError(t,this.owner))return;throw t}}}dispose(){this.disposed||(this.disposed=!0,h(this.computed),this.watcher.unwatch(this.computed),g(this.owner))}};function V(e,t=!1){let n=new x(e,t);return()=>n.dispose()}j(()=>{});var ee=Symbol.for("signal");var ne=Symbol.for("signal-node");function O(e,t){let n=new T(e,{equals:t?.equals}),o=(()=>n.get()),s=(i=>{let u=typeof i=="function"?i(n.peek()):i;return n.set(u),W(),u});return Object.defineProperty(o,ee,{value:!0,enumerable:!0}),Object.defineProperty(o,ne,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),v({kind:"signal",node:n,handle:o,name:t?.name,set:s}),A()&&f(()=>h(n)),[o,s]}function _(e,t){let n=t;return V(()=>{n=e(n)},!0)}function te(e,t=(n,o)=>n===o){let n=new Map;return _(()=>{let o=e();for(let[s,i]of n){let[u,a]=i,p=t(s,o);u()!==p&&a(p)}}),o=>{let s=n.get(o);if(!s){let[i,u]=O(!1);s=[i,u],n.set(o,s);let a=e();u(t(o,a))}return s[0]()}}function re(e,t){let[n,o]=O(e(),t);return _(()=>{let s=e();t?.timeoutMs?setTimeout(()=>o(()=>s),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>o(()=>s)):Promise.resolve().then(()=>o(()=>s))}),n}function oe(e,t){let n,o=(...s)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...s)},t)};return f(()=>{n!==void 0&&clearTimeout(n)}),o}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var V="__fluixi_signal_next_state__",G=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[V]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:G,onSuspend:null,onError:null,observer:null};var _="1.0.0-alpha.83";function H(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var m=[],z;function v(e){let t=r.observer;t&&t.created(e.parents===void 0?{...e,parents:m,origin:e.origin??z}:e)}function q(e){return r.observer?(m.push(e),!0):!1}function D(){m.pop()}function N(e){r.observer?.ran?.(e)}function E(e,t){r.observer?.wrote?.(e,t)}function h(e){r.observer?.disposed?.(e)}var F="__FLUIXI_DEVTOOLS_HOOK__",C=globalThis[F];if(typeof C?.inject=="function")try{C.inject({observeReactiveNodes:H,version:_})}catch{}function P(){return r.observer!=null}var A=0,I=1,l=2,w=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let t=r.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},T=class extends w{constructor(t,n){super(),this._value=t,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,E(this,r.consumer),this.observers)for(let n of[...this.observers])n.markDirty(l);y(this)}}peek(){return this._value}},d=class extends w{constructor(n,o){super();this._threw=!1;this._initialized=!1;this.state=l;this.sources=null;this._fn=n,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===I&&this.sources){for(let n of this.sources)if(n.updateIfNecessary(),this.state===l)break}(this.state===l||!this._initialized)&&this.recompute(),this.state=A}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let n=r.consumer,o=r.untracked,s=q(this);r.consumer=this,r.untracked=!1;let i,u=!1,a;try{i=this._fn()}catch(c){u=!0,a=c,i=this._value}finally{r.consumer=n,r.untracked=o,s&&D()}let p=!this._initialized||this._threw!==u||(u?a!==this._error:!this._equals(this._value,i));if(this._initialized=!0,this._threw=u,this._error=a,this._value=i,N(this),p){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(l);y(this)}}markDirty(n){if(this.state>=n)return;let o=this.state===A;if(this.state=n,o){if(this.observers)for(let s of[...this.observers])s.markDirty(I);y(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function y(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var b=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let n of t)this._watched.add(n),(n.watchers??=new Set).add(this)}unwatch(...t){for(let n of t)this._watched.delete(n),n.watchers?.delete(this),this._pending.delete(n)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let n=this._pending.size===0;this._pending.add(t),n&&this._notifyFn()}};function K(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function x(e,t){let n=r.owner;r.owner=e;try{return t()}finally{r.owner=n}}function f(e){if(r.owner){if(r.owner.disposed){e();return}(r.owner.cleanups??=[]).push(e)}}function k(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)k(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function M(e){r.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function U(e){e.queued||(e.queued=!0,r.queue.push(e),!r.scheduled&&r.batchDepth===0&&(r.scheduled=!0,r.hostSchedule(R)))}function R(){if(r.scheduled=!1,r.flushing)return;r.flushing=!0;let e=0;try{for(;r.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=r.queue;r.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{r.flushing=!1}}function j(){r.batchDepth===0&&R()}var g=class{constructor(t,n=!1){this.queued=!1;this.disposed=!1;this.owner=K(r.owner),r.owner&&(r.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new d(()=>{k(this.owner,!1),x(this.owner,()=>{let o=t();typeof o=="function"&&(this.owner.cleanups??=[]).push(o)})}),v({kind:"effect",node:this.computed,handle:this,internal:!n}),this.watcher=new b(()=>U(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(t){if(t&&typeof t.then=="function"&&r.onSuspend){r.onSuspend(t,this.owner);return}if(r.onError&&r.onError(t,this.owner))return;throw t}}}dispose(){this.disposed||(this.disposed=!0,h(this.computed),this.watcher.unwatch(this.computed),k(this.owner))}};function W(e,t=!1){let n=new g(e,t);return()=>n.dispose()}M(()=>{});var Y=Symbol.for("signal");var $=Symbol.for("signal-node");function S(e,t){let n=new T(e,{equals:t?.equals}),o=(()=>n.get()),s=(i=>{let u=typeof i=="function"?i(n.peek()):i;return n.set(u),j(),u});return Object.defineProperty(o,Y,{value:!0,enumerable:!0}),Object.defineProperty(o,$,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),v({kind:"signal",node:n,handle:o,name:t?.name,set:s}),P()&&f(()=>h(n)),[o,s]}function O(e,t){let n=t;return W(()=>{n=e(n)},!0)}function ye(e,t=(n,o)=>n===o){let n=new Map;return O(()=>{let o=e();for(let[s,i]of n){let[u,a]=i,p=t(s,o);u()!==p&&a(p)}}),o=>{let s=n.get(o);if(!s){let[i,u]=S(!1);s=[i,u],n.set(o,s);let a=e();u(t(o,a))}return s[0]()}}function ke(e,t){let[n,o]=S(e(),t);return O(()=>{let s=e();t?.timeoutMs?setTimeout(()=>o(()=>s),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>o(()=>s)):Promise.resolve().then(()=>o(()=>s))}),n}function ge(e,t){let n,o=(...s)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...s)},t)};return f(()=>{n!==void 0&&clearTimeout(n)}),o}export{ge as createDebounce,ke as createDeferred,ye as createSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var A=(e,n)=>{for(var r in n)l(e,r,{get:n[r],enumerable:!0})},I=(e,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of N(n))!P.call(e,i)&&i!==r&&l(e,i,{get:()=>n[i],enumerable:!(o=D(n,i))||o.enumerable});return e};var B=e=>I(l({},"__esModule",{value:!0}),e);var $={};A($,{ErrorContext:()=>v,createErrorBoundary:()=>L,provideErrorBoundary:()=>Y});module.exports=B($);var M="__fluixi_signal_next_state__",W=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},t=globalThis[M]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:W,onSuspend:null,onError:null,observer:null};var h="1.0.0-alpha.83";function j(e){return t.observer=e,()=>{t.observer===e&&(t.observer=null)}}var a=[],H;function d(e){let n=t.observer;n&&n.created(e.parents===void 0?{...e,parents:a,origin:e.origin??H}:e)}function b(e,n){t.observer?.wrote?.(e,n)}function T(e){t.observer?.contextCreated?.(e)}function m(e,n,r){let o=t.observer;!o?.context||!a.length||o.context(a[a.length-1],e,n,r)}function f(e){t.observer?.disposed?.(e)}var V="__FLUIXI_DEVTOOLS_HOOK__",w=globalThis[V];if(typeof w?.inject=="function")try{w.inject({observeReactiveNodes:j,version:h})}catch{}function y(){return t.observer!=null}var G=2,p=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(t.untracked)return;let n=t.consumer;n&&((this.observers??=new Set).add(n),(n.sources??=new Set).add(this))}},c=class extends p{constructor(n,r){super(),this._value=n,this._equals=r?.equals===!1?()=>!1:r?.equals??Object.is}get(){return this.track(),this._value}set(n){if(!this._equals(this._value,n)){if(this._value=n,this.version++,b(this,t.consumer),this.observers)for(let r of[...this.observers])r.markDirty(G);z(this)}}peek(){return this._value}};function z(e){if(e.watchers)for(let n of[...e.watchers])n._notify(e)}function k(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function x(e,n){let r=Symbol(n??"context");return T(r),{id:r,defaultValue:e,Provider:i=>{m(r,"provide",i.value);let s=t.owner,u=k(s);(u.contexts=new Map).set(r,i.value),s&&(s.owned??=[]).push(u),t.owner=u;try{return i.children}finally{t.owner=s}}}}function g(e,n){let r=e;for(;r;){if(r.contexts&&r.contexts.has(n.id))return r.contexts.get(n.id);r=r.parent}return n.defaultValue}function R(e,n,r){let o=k(t.owner);(o.contexts=new Map).set(e.id,n),t.owner&&(t.owner.owned??=[]).push(o);let i=t.owner;t.owner=o;try{return r()}finally{t.owner=i}}function O(e){t.onError=e}function S(e){if(t.owner){if(t.owner.disposed){e();return}(t.owner.cleanups??=[]).push(e)}}function _(e){t.hostSchedule=e??(n=>{Promise.resolve().then(n)})}function C(){if(t.scheduled=!1,t.flushing)return;t.flushing=!0;let e=0;try{for(;t.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let n=t.queue;t.queue=[];for(let r of n)r.queued=!1,r.disposed||r.run()}}finally{t.flushing=!1}}function E(){t.batchDepth===0&&C()}_(()=>{});var K=Symbol.for("signal");var F=Symbol.for("signal-node");function q(e,n){let r=new c(e,{equals:n?.equals}),o=(()=>r.get()),i=(s=>{let u=typeof s=="function"?s(r.peek()):s;return r.set(u),E(),u});return Object.defineProperty(o,K,{value:!0,enumerable:!0}),Object.defineProperty(o,F,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),d({kind:"signal",node:r,handle:o,name:n?.name,set:i}),y()&&S(()=>f(r)),[o,i]}var v=x();O((e,n)=>{let r=g(n,v);return r?(r.setError(e),!0):!1});function L(){let[e,n]=q(void 0,{equals:!1});return{error:e,reset:()=>n(()=>{}),setError:o=>n(()=>o)}}function Y(e,n){return R(v,e,n)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var q="__fluixi_signal_next_state__",D=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[q]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:D,onSuspend:null,onError:null,observer:null};var p="1.0.0-alpha.83";function N(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var a=[],P;function l(e){let n=r.observer;n&&n.created(e.parents===void 0?{...e,parents:a,origin:e.origin??P}:e)}function h(e,n){r.observer?.wrote?.(e,n)}function w(e){r.observer?.contextCreated?.(e)}function b(e,n,t){let o=r.observer;!o?.context||!a.length||o.context(a[a.length-1],e,n,t)}function d(e){r.observer?.disposed?.(e)}var A="__FLUIXI_DEVTOOLS_HOOK__",v=globalThis[A];if(typeof v?.inject=="function")try{v.inject({observeReactiveNodes:N,version:p})}catch{}function T(){return r.observer!=null}var I=2,f=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let n=r.consumer;n&&((this.observers??=new Set).add(n),(n.sources??=new Set).add(this))}},c=class extends f{constructor(n,t){super(),this._value=n,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(n){if(!this._equals(this._value,n)){if(this._value=n,this.version++,h(this,r.consumer),this.observers)for(let t of[...this.observers])t.markDirty(I);B(this)}}peek(){return this._value}};function B(e){if(e.watchers)for(let n of[...e.watchers])n._notify(e)}function m(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function y(e,n){let t=Symbol(n??"context");return w(t),{id:t,defaultValue:e,Provider:i=>{b(t,"provide",i.value);let s=r.owner,u=m(s);(u.contexts=new Map).set(t,i.value),s&&(s.owned??=[]).push(u),r.owner=u;try{return i.children}finally{r.owner=s}}}}function k(e,n){let t=e;for(;t;){if(t.contexts&&t.contexts.has(n.id))return t.contexts.get(n.id);t=t.parent}return n.defaultValue}function x(e,n,t){let o=m(r.owner);(o.contexts=new Map).set(e.id,n),r.owner&&(r.owner.owned??=[]).push(o);let i=r.owner;r.owner=o;try{return t()}finally{r.owner=i}}function g(e){r.onError=e}function R(e){if(r.owner){if(r.owner.disposed){e();return}(r.owner.cleanups??=[]).push(e)}}function O(e){r.hostSchedule=e??(n=>{Promise.resolve().then(n)})}function S(){if(r.scheduled=!1,r.flushing)return;r.flushing=!0;let e=0;try{for(;r.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let n=r.queue;r.queue=[];for(let t of n)t.queued=!1,t.disposed||t.run()}}finally{r.flushing=!1}}function _(){r.batchDepth===0&&S()}O(()=>{});var M=Symbol.for("signal");var W=Symbol.for("signal-node");function C(e,n){let t=new c(e,{equals:n?.equals}),o=(()=>t.get()),i=(s=>{let u=typeof s=="function"?s(t.peek()):s;return t.set(u),_(),u});return Object.defineProperty(o,M,{value:!0,enumerable:!0}),Object.defineProperty(o,W,{value:{get value(){return t.peek()},get version(){return t.version}},enumerable:!1}),l({kind:"signal",node:t,handle:o,name:n?.name,set:i}),T()&&R(()=>d(t)),[o,i]}var E=y();g((e,n)=>{let t=k(n,E);return t?(t.setError(e),!0):!1});function fe(){let[e,n]=C(void 0,{equals:!1});return{error:e,reset:()=>n(()=>{}),setError:o=>n(()=>o)}}function pe(e,n){return x(E,e,n)}export{E as ErrorContext,fe as createErrorBoundary,pe as provideErrorBoundary};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},z=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of D(t))!E.call(e,s)&&s!==n&&p(e,s,{get:()=>t[s],enumerable:!(o=q(t,s))||o.enumerable});return e};var K=e=>z(p({},"__esModule",{value:!0}),e);var L={};I(L,{Computed:()=>a,Signal:()=>F,State:()=>i,Watcher:()=>u});module.exports=K(L);var G="__fluixi_signal_next_state__",H=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[G]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:H,onSuspend:null,onError:null,observer:null};var w="1.0.0-alpha.83";function j(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var _=[];function m(e){return r.observer?(_.push(e),!0):!1}function g(){_.pop()}function R(e){r.observer?.ran?.(e)}function y(e,t){r.observer?.wrote?.(e,t)}var W="__FLUIXI_DEVTOOLS_HOOK__",k=globalThis[W];if(typeof k?.inject=="function")try{k.inject({observeReactiveNodes:j,version:w})}catch{}var x=0,S=1,v=2,h=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let t=r.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},i=class extends h{constructor(t,n){super(),this._value=t,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,y(this,r.consumer),this.observers)for(let n of[...this.observers])n.markDirty(v);b(this)}}peek(){return this._value}},a=class extends h{constructor(n,o){super();this._threw=!1;this._initialized=!1;this.state=v;this.sources=null;this._fn=n,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===S&&this.sources){for(let n of this.sources)if(n.updateIfNecessary(),this.state===v)break}(this.state===v||!this._initialized)&&this.recompute(),this.state=x}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let n=r.consumer,o=r.untracked,s=m(this);r.consumer=this,r.untracked=!1;let d,l=!1,f;try{d=this._fn()}catch(c){l=!0,f=c,d=this._value}finally{r.consumer=n,r.untracked=o,s&&g()}let C=!this._initialized||this._threw!==l||(l?f!==this._error:!this._equals(this._value,d));if(this._initialized=!0,this._threw=l,this._error=f,this._value=d,R(this),C){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(v);b(this)}}markDirty(n){if(this.state>=n)return;let o=this.state===x;if(this.state=n,o){if(this.observers)for(let s of[...this.observers])s.markDirty(S);b(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function b(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var u=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let n of t)this._watched.add(n),(n.watchers??=new Set).add(this)}unwatch(...t){for(let n of t)this._watched.delete(n),n.watchers?.delete(this),this._pending.delete(n)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let n=this._pending.size===0;this._pending.add(t),n&&this._notifyFn()}};function T(e){if(r.untracked)return e();r.untracked=!0;try{return e()}finally{r.untracked=!1}}function O(){return r.consumer}function N(e){return!!(e.observers&&e.observers.size)||!!(e.watchers&&e.watchers.size)}var F={State:i,Computed:a,subtle:{Watcher:u,untrack:T,currentComputed:O,hasSinks:N}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C="__fluixi_signal_next_state__",q=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},r=globalThis[C]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:q,onSuspend:null,onError:null,observer:null};var b="1.0.0-alpha.83";function D(e){return r.observer=e,()=>{r.observer===e&&(r.observer=null)}}var k=[];function _(e){return r.observer?(k.push(e),!0):!1}function m(){k.pop()}function g(e){r.observer?.ran?.(e)}function R(e,t){r.observer?.wrote?.(e,t)}var E="__FLUIXI_DEVTOOLS_HOOK__",w=globalThis[E];if(typeof w?.inject=="function")try{w.inject({observeReactiveNodes:D,version:b})}catch{}var y=0,x=1,i=2,l=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(r.untracked)return;let t=r.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},a=class extends l{constructor(t,n){super(),this._value=t,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,R(this,r.consumer),this.observers)for(let n of[...this.observers])n.markDirty(i);p(this)}}peek(){return this._value}},u=class extends l{constructor(n,o){super();this._threw=!1;this._initialized=!1;this.state=i;this.sources=null;this._fn=n,this._equals=o?.equals===!1?()=>!1:o?.equals??Object.is}get(){if(r.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===x&&this.sources){for(let n of this.sources)if(n.updateIfNecessary(),this.state===i)break}(this.state===i||!this._initialized)&&this.recompute(),this.state=y}recompute(){if(this.sources){for(let s of this.sources)s.observers?.delete(this);this.sources.clear()}let n=r.consumer,o=r.untracked,h=_(this);r.consumer=this,r.untracked=!1;let v,d=!1,f;try{v=this._fn()}catch(s){d=!0,f=s,v=this._value}finally{r.consumer=n,r.untracked=o,h&&m()}let N=!this._initialized||this._threw!==d||(d?f!==this._error:!this._equals(this._value,v));if(this._initialized=!0,this._threw=d,this._error=f,this._value=v,g(this),N){if(this.version++,this.observers)for(let s of[...this.observers])s.markDirty(i);p(this)}}markDirty(n){if(this.state>=n)return;let o=this.state===y;if(this.state=n,o){if(this.observers)for(let h of[...this.observers])h.markDirty(x);p(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function p(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var c=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let n of t)this._watched.add(n),(n.watchers??=new Set).add(this)}unwatch(...t){for(let n of t)this._watched.delete(n),n.watchers?.delete(this),this._pending.delete(n)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let n=this._pending.size===0;this._pending.add(t),n&&this._notifyFn()}};function S(e){if(r.untracked)return e();r.untracked=!0;try{return e()}finally{r.untracked=!1}}function T(){return r.consumer}function O(e){return!!(e.observers&&e.observers.size)||!!(e.watchers&&e.watchers.size)}var P={State:a,Computed:u,subtle:{Watcher:c,untrack:S,currentComputed:T,hasSinks:O}};export{u as Computed,P as Signal,a as State,c as Watcher};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var k=(e,n)=>{for(var t in n)v(e,t,{get:n[t],enumerable:!0})},f=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of p(n))!b.call(e,i)&&i!==t&&v(e,i,{get:()=>n[i],enumerable:!(s=l(n,i))||s.enumerable});return e};var w=e=>f(v({},"__esModule",{value:!0}),e);var H={};k(H,{enterReactiveRun:()=>m,exitReactiveRun:()=>O,isObserved:()=>K,observeReactiveNodes:()=>d,reportReactiveBinding:()=>N,reportReactiveContext:()=>T,reportReactiveContextCreated:()=>E,reportReactiveDirective:()=>D,reportReactiveDispose:()=>C,reportReactiveMove:()=>q,reportReactiveNode:()=>x,reportReactiveProps:()=>S,reportReactiveRun:()=>y,reportReactiveWrite:()=>_,withReactiveOrigin:()=>h});module.exports=w(H);var R="__fluixi_signal_next_state__",g=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},o=globalThis[R]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:g,onSuspend:null,onError:null,observer:null};var a="1.0.0-alpha.83";function d(e){return o.observer=e,()=>{o.observer===e&&(o.observer=null)}}var r=[],u;function h(e,n){if(!o.observer)return n();let t=u;u=e;try{return n()}finally{u=t}}function x(e){let n=o.observer;n&&n.created(e.parents===void 0?{...e,parents:r,origin:e.origin??u}:e)}function m(e){return o.observer?(r.push(e),!0):!1}function O(){r.pop()}function y(e){o.observer?.ran?.(e)}function _(e,n){o.observer?.wrote?.(e,n)}function N(e,n,t,s){let i=o.observer;!i?.bound||!r.length||i.bound(r[r.length-1],e,n,t,s)}function S(e){let n=o.observer;!n?.props||!r.length||!e||n.props(r[r.length-1],e)}function D(e,n,t,s){let i=o.observer;!i?.directive||!r.length||i.directive(r[r.length-1],e,n,t,s)}function E(e){o.observer?.contextCreated?.(e)}function T(e,n,t){let s=o.observer;!s?.context||!r.length||s.context(r[r.length-1],e,n,t)}function q(e,n,t){o.observer?.moved?.(e,n,t)}function C(e){o.observer?.disposed?.(e)}var G="__FLUIXI_DEVTOOLS_HOOK__",c=globalThis[G];if(typeof c?.inject=="function")try{c.inject({observeReactiveNodes:d,version:a})}catch{}function K(){return o.observer!=null}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export type ReactiveNodeKind = 'signal' | 'memo' | 'effect' | 'store' | 'resource';
|
|
2
|
+
export interface ReactiveNodeReport {
|
|
3
|
+
kind: ReactiveNodeKind;
|
|
4
|
+
/** The core node. Edges hang off this, and it is the identity later reports use. */
|
|
5
|
+
node: unknown;
|
|
6
|
+
/** What the caller was handed, when that is a different object from the node. */
|
|
7
|
+
handle?: unknown;
|
|
8
|
+
/** The name the call site gave, if it gave one. */
|
|
9
|
+
name?: string;
|
|
10
|
+
/**
|
|
11
|
+
* How to write it, for a signal. A watcher setting the value through this goes through
|
|
12
|
+
* the same path the application does — writing the node directly marks its readers dirty
|
|
13
|
+
* without ever flushing them, so the page keeps whatever it last rendered.
|
|
14
|
+
*/
|
|
15
|
+
set?: (value: unknown) => void;
|
|
16
|
+
/**
|
|
17
|
+
* The node this one was built for. A store creates a signal per key, lazily, wherever it
|
|
18
|
+
* is first read — the useful location is the store's, not the reader's.
|
|
19
|
+
*/
|
|
20
|
+
origin?: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* The node is the framework's own plumbing — a render effect, one per dom binding. A graph
|
|
23
|
+
* does not show these, but it needs to know they exist: a row added to a list is created
|
|
24
|
+
* inside one, and without it the row has no ancestor it can be attached to.
|
|
25
|
+
*/
|
|
26
|
+
internal?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The computations running when this node was made, outermost first. A component's wrapper
|
|
29
|
+
* memo reads nothing itself, so what it created is the only thing tying it to the graph —
|
|
30
|
+
* and the whole chain is given because the nearest one is often a render effect, which no
|
|
31
|
+
* graph shows.
|
|
32
|
+
*
|
|
33
|
+
* Live and reused: read it during the call, do not keep it.
|
|
34
|
+
*/
|
|
35
|
+
parents?: readonly unknown[];
|
|
36
|
+
}
|
|
37
|
+
export interface ReactiveObserver {
|
|
38
|
+
created(report: ReactiveNodeReport): void;
|
|
39
|
+
/** A computation recomputed. Effects have no value to diff, so this is their only signal. */
|
|
40
|
+
ran?(node: unknown): void;
|
|
41
|
+
/** An effect was disposed. Memos and signals go with their owner and are not reported. */
|
|
42
|
+
disposed?(node: unknown): void;
|
|
43
|
+
/**
|
|
44
|
+
* A signal was written, and by which computation — nothing, when the write came from an
|
|
45
|
+
* event handler, which is where most of them come from.
|
|
46
|
+
*/
|
|
47
|
+
wrote?(node: unknown, by: unknown): void;
|
|
48
|
+
/**
|
|
49
|
+
* A node now belongs somewhere else, and is called something else.
|
|
50
|
+
*
|
|
51
|
+
* A store write replaces the object that held a value — `set({ items: [...items, one] })`
|
|
52
|
+
* builds a new array — and the signals underneath it are the same signals in a new place.
|
|
53
|
+
* Without this they keep pointing at a node that no longer exists.
|
|
54
|
+
*/
|
|
55
|
+
moved?(node: unknown, origin: unknown, name?: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* A computation writes to this piece of the document. Only the dom layer knows a reader is
|
|
58
|
+
* the text of an `<li>` and not a `class`, and only as it wires the binding up.
|
|
59
|
+
*
|
|
60
|
+
* `node` is the render effect doing it. `accessor` is the function it reads, which the
|
|
61
|
+
* compiler may have stamped with the hole's position.
|
|
62
|
+
*/
|
|
63
|
+
bound?(node: unknown, target: unknown, kind: string, name?: string, accessor?: unknown): void;
|
|
64
|
+
/**
|
|
65
|
+
* The props a component was handed.
|
|
66
|
+
*
|
|
67
|
+
* `node` is the computation the component was created inside, which is the node a watcher
|
|
68
|
+
* draws it as. The object is kept rather than read: every prop is a getter over whatever
|
|
69
|
+
* the caller passed, so reading one here would subscribe the wrong computation to it.
|
|
70
|
+
*/
|
|
71
|
+
props?(node: unknown, props: unknown): void;
|
|
72
|
+
/**
|
|
73
|
+
* A directive applied to an element: `use:`, `class:`, `style:`, `bind:`.
|
|
74
|
+
*
|
|
75
|
+
* `bound` says a value writes to a class or a style but not which key, so two `class:`
|
|
76
|
+
* directives on one element both report as `class`. This carries the key too.
|
|
77
|
+
*/
|
|
78
|
+
directive?(node: unknown, target: unknown, kind: string, name: string, accessor?: unknown): void;
|
|
79
|
+
/**
|
|
80
|
+
* A context provided or read.
|
|
81
|
+
*
|
|
82
|
+
* Nothing else in the graph records it: a provider stamps a value on the owner chain and a
|
|
83
|
+
* reader walks up looking for it, so neither is a dependency and no edge is ever made.
|
|
84
|
+
*/
|
|
85
|
+
context?(node: unknown, id: symbol, kind: 'provide' | 'read', value?: unknown): void;
|
|
86
|
+
/**
|
|
87
|
+
* A context was created. Separate from providing it, because a context is usually made at
|
|
88
|
+
* module scope with nothing running, and the line it was written on is the one worth
|
|
89
|
+
* showing. The watcher reads its own stack for that.
|
|
90
|
+
*/
|
|
91
|
+
contextCreated?(id: symbol): void;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Watch the graph. Returns a function that stops watching.
|
|
95
|
+
*
|
|
96
|
+
* One observer at a time — the last to register wins. Two tools watching one page at once is
|
|
97
|
+
* not a case worth carrying state for.
|
|
98
|
+
*/
|
|
99
|
+
export declare function observeReactiveNodes(next: ReactiveObserver): () => void;
|
|
100
|
+
/** Attribute everything `fn` creates to `owner`. Free when nobody is watching. */
|
|
101
|
+
export declare function withReactiveOrigin<T>(owner: unknown, fn: () => T): T;
|
|
102
|
+
/** Called by the primitives. Not part of the public surface. */
|
|
103
|
+
export declare function reportReactiveNode(report: ReactiveNodeReport): void;
|
|
104
|
+
/** Called around a recompute, so a node can say what it was created inside. */
|
|
105
|
+
export declare function enterReactiveRun(node: unknown): boolean;
|
|
106
|
+
export declare function exitReactiveRun(): void;
|
|
107
|
+
/** Called from the recompute path, so it stays a property read when nobody is watching. */
|
|
108
|
+
export declare function reportReactiveRun(node: unknown): void;
|
|
109
|
+
/** Called from the write path, so it stays a property read when nobody is watching. */
|
|
110
|
+
export declare function reportReactiveWrite(node: unknown, by: unknown): void;
|
|
111
|
+
/**
|
|
112
|
+
* The node is whatever is running: a binding is set up inside its own render effect. Nothing
|
|
113
|
+
* is pushed when no one is watching, so this stays a property read on the hot path.
|
|
114
|
+
*/
|
|
115
|
+
export declare function reportReactiveBinding(target: unknown, kind: string, name?: string, accessor?: unknown): void;
|
|
116
|
+
/**
|
|
117
|
+
* A component's props, reported where it is created so the running computation is the one
|
|
118
|
+
* the props belong to. Nothing is read: the caller keeps the object and reads it untracked
|
|
119
|
+
* when someone asks.
|
|
120
|
+
*/
|
|
121
|
+
export declare function reportReactiveProps(props: unknown): void;
|
|
122
|
+
/**
|
|
123
|
+
* As `reportReactiveBinding`: the node is whatever is running, since a directive is applied
|
|
124
|
+
* while its element is being built. A property read when nobody is watching.
|
|
125
|
+
*/
|
|
126
|
+
export declare function reportReactiveDirective(target: unknown, kind: string, name: string, accessor?: unknown): void;
|
|
127
|
+
/** Called where the context is made, so a watcher can take the line from its own stack. */
|
|
128
|
+
export declare function reportReactiveContextCreated(id: symbol): void;
|
|
129
|
+
/** As the others: the node is whatever is running, and nothing happens without a watcher. */
|
|
130
|
+
export declare function reportReactiveContext(id: symbol, kind: 'provide' | 'read', value?: unknown): void;
|
|
131
|
+
export declare function reportReactiveMove(node: unknown, origin: unknown, name?: string): void;
|
|
132
|
+
export declare function reportReactiveDispose(node: unknown): void;
|
|
133
|
+
export interface DevtoolsHook {
|
|
134
|
+
inject?(runtime: {
|
|
135
|
+
observeReactiveNodes: typeof observeReactiveNodes;
|
|
136
|
+
version: string;
|
|
137
|
+
}): void;
|
|
138
|
+
}
|
|
139
|
+
/** Whether anything is watching, for a caller that would otherwise do work to report. */
|
|
140
|
+
export declare function isObserved(): boolean;
|
|
141
|
+
//# sourceMappingURL=observe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../../../src/lib/signal/graph/observe.ts"],"names":[],"mappings":"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"}
|