@synnaxlabs/drift 0.49.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,7 +37,7 @@ With Yarn:
37
37
  yarn add @synnaxlabs/drift
38
38
  ```
39
39
 
40
- With PNPM:
40
+ With pnpm:
41
41
 
42
42
  ```bash
43
43
  pnpm add @synnaxlabs/drift
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@reduxjs/toolkit"),t=require("./state-B6GRS-m8.cjs"),f=require("./selectors-C-yu1uR2.cjs"),N=new Error("request for lock canceled");var P=function(i,e,s,o){function n(a){return a instanceof s?a:new s(function(c){c(a)})}return new(s||(s=Promise))(function(a,c){function l(r){try{u(o.next(r))}catch(w){c(w)}}function d(r){try{u(o.throw(r))}catch(w){c(w)}}function u(r){r.done?a(r.value):n(r.value).then(l,d)}u((o=o.apply(i,e||[])).next())})};class C{constructor(e,s=N){this._value=e,this._cancelError=s,this._queue=[],this._weightedWaiters=[]}acquire(e=1,s=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((o,n)=>{const a={resolve:o,reject:n,weight:e,priority:s},c=M(this._queue,l=>s<=l.priority);c===-1&&e<=this._value?this._dispatchItem(a):this._queue.splice(c+1,0,a)})}runExclusive(e){return P(this,arguments,void 0,function*(s,o=1,n=0){const[a,c]=yield this.acquire(o,n);try{return yield s(a)}finally{c()}})}waitForUnlock(e=1,s=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,s)?Promise.resolve():new Promise(o=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),L(this._weightedWaiters[e-1],{resolve:o,priority:s})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const s=this._value;this._value-=e.weight,e.resolve([s,this._newReleaser(e.weight)])}_newReleaser(e){let s=!1;return()=>{s||(s=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const s=this._weightedWaiters[e-1];s&&(s.forEach(o=>o.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let s=this._value;s>0;s--){const o=this._weightedWaiters[s-1];if(!o)continue;const n=o.findIndex(a=>a.priority<=e);(n===-1?o:o.splice(0,n)).forEach((a=>a.resolve()))}}}_couldLockImmediately(e,s){return(this._queue.length===0||this._queue[0].priority<s)&&e<=this._value}}function L(i,e){const s=M(i,o=>e.priority<=o.priority);i.splice(s+1,0,e)}function M(i,e){for(let s=i.length-1;s>=0;s--)if(e(i[s]))return s;return-1}var q=function(i,e,s,o){function n(a){return a instanceof s?a:new s(function(c){c(a)})}return new(s||(s=Promise))(function(a,c){function l(r){try{u(o.next(r))}catch(w){c(w)}}function d(r){try{u(o.throw(r))}catch(w){c(w)}}function u(r){r.done?a(r.value):n(r.value).then(l,d)}u((o=o.apply(i,e||[])).next())})};class D{constructor(e){this._semaphore=new C(1,e)}acquire(){return q(this,arguments,void 0,function*(e=0){const[,s]=yield this._semaphore.acquire(1,e);return s})}runExclusive(e,s=0){return this._semaphore.runExclusive(()=>e(),1,s)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const T="DA@",E="://",R=(i,e)=>T.concat(e,E,i),F=i=>{const[e,s]=i.split(E);if(s==null)return[i,""];const[,o]=e.split(T);return[s,o]},b=(i,e)=>({...i,type:R(i.type,e)}),V=i=>{const[e,s]=F(i.type);return{emitted:s!=null&&s.length>0,emitter:s,action:{...i,type:e}}},j=i=>{const{centerCount:e,processCount:s,focusCount:o,stage:n,key:a,prerenderLabel:c,reserved:l,minimized:d,...u}=i;return u},Z=async(i,e,s,o)=>{const n=(await s.listLabels()).filter(r=>r!==t.MAIN_WINDOW),a=Object.keys(i.windows).filter(r=>r!==t.MAIN_WINDOW);t.group(o,"syncInitial"),t.log(o,"existing windows in runtime",n.sort()),t.log(o,"non-main windows in state",a.sort()),t.groupEnd(o);const c=t.yu.unique([...n,...a]);for(const r of c)!n.includes(r)&&s.isMain()?(t.log(o,"state window not in runtime, creating",r),await k(s,r,i.windows[r],o)):a.includes(r)||(t.log(o,"runtime window not in state, closing",r),await y(s,r,o));const l=s.label(),d=i.windows[l];if(d==null)return;const u={...t.INITIAL_WINDOW_STATE};await I(u,d,s,o),e(t.runtimeSetWindowProps({label:s.label(),...await s.getProps()}))},U=async(i,e,s,o)=>{t.log(o,"sync",i,e),s.isMain()&&await K(i,e,s,o);const n=i.windows[s.label()],a=e.windows[s.label()];n==null||a==null||await I(n,a,s,o)},I=async(i,e,s,o)=>{const n=[];e.title!=null&&e.title!==i.title&&n.push(["title",{prev:i.title,next:e.title},async()=>s.setTitle(e.title)]);const a=e.visible!=null&&e.visible!==i.visible,c=e.visible===!1,l=()=>n.push(["visible",{prev:i.visible,next:e.visible},async()=>{if(await s.setVisible(e.visible),e.visible===!1)return;let d=e.position;d??=(await s.getProps()).position,d!=null&&(await s.setPosition(t.Nu.translate(d,{x:1,y:1})),await s.setPosition(d))}]);if(a&&c&&l(),e.skipTaskbar!=null&&e.skipTaskbar!==i.skipTaskbar&&n.push(["skipTaskbar",{prev:i.skipTaskbar,next:e.skipTaskbar},async()=>await s.setSkipTaskbar(e.skipTaskbar)]),e.maximized!=null&&e.maximized!==i.maximized&&n.push(["maximized",{prev:i.maximized,next:e.maximized},async()=>await s.setMaximized(e.maximized)]),e.fullscreen!=null&&e.fullscreen!==i.fullscreen&&n.push(["fullscreen",{prev:i.fullscreen,next:e.fullscreen},async()=>await s.setFullscreen(e.fullscreen)]),e.centerCount!==i.centerCount&&n.push(["center",{prev:i.centerCount,next:e.centerCount},async()=>s.center()]),e.minimized!=null&&e.minimized!==i.minimized&&n.push(["minimized",{prev:i.minimized,next:e.minimized},async()=>await s.setMinimized(e.minimized)]),e.resizable!=null&&e.resizable!==i.resizable&&n.push(["resizable",{prev:i.resizable,next:e.resizable},async()=>await s.setResizable(e.resizable)]),e.minSize!=null&&!t.Mu.equals(e.minSize,i.minSize)&&n.push(["minSize",{prev:i.minSize,next:e.minSize},async()=>await s.setMinSize(e.minSize)]),e.maxSize!=null&&!t.Mu.equals(e.maxSize,i.maxSize)&&n.push(["maxSize",{prev:i.maxSize,next:e.maxSize},async()=>await s.setMaxSize(e.maxSize)]),e.size!=null&&!t.Mu.equals(e.size,i.size)&&n.push(["size",{prev:i.size,next:e.size},async()=>await s.setSize(e.size)]),e.position!=null&&!t.Mu.equals(e.position,i.position)&&n.push(["position",{prev:i.position,next:e.position},async()=>await s.setPosition(e.position)]),e.focusCount!==i.focusCount&&n.push(["setVisible",{prev:i.visible,next:e.visible},async()=>await s.setVisible(!0)],["focus",{prev:i.focusCount,next:e.focusCount},async()=>await s.focus()]),e.decorations!=null&&e.decorations!==i.decorations&&n.push(["decorations",{prev:i.decorations,next:e.decorations},async()=>await s.setDecorations(e.decorations)]),e.alwaysOnTop!=null&&e.alwaysOnTop!==i.alwaysOnTop&&n.push(["alwaysOnTop",{prev:i.alwaysOnTop,next:e.alwaysOnTop},async()=>await s.setAlwaysOnTop(e.alwaysOnTop)]),a&&!c&&l(),n.length!==0){t.group(o,`syncCurrent, label: ${s.label()}, key: ${e.key}`);for(const[d,{prev:u,next:r}]of n)t.log(o,d,u,"->",r);t.groupEnd(o);for(const[,,d]of n)await d()}},K=async(i,e,s,o)=>{const n=Object.keys(i.windows).filter(l=>!(l in e.windows)),a=Object.keys(e.windows).filter(l=>!(l in i.windows)),c=s.isMain();if(c&&n.length>0)for(const l of n)t.log(o,"syncMain","closing",l),l===t.MAIN_WINDOW&&await Promise.all(Object.keys(e.windows).filter(d=>d!==t.MAIN_WINDOW).map(async d=>await y(s,d,o))),await y(s,l,o);if(c&&a.length>0)for(const l of a)await k(s,l,e.windows[l],o)},k=async(i,e,s,o)=>(t.log(o,"createWindow",s),await i.create(e,j(s))),y=async(i,e,s)=>(t.log(s,"closeWindow",e),await i.close(e)),z="[drift] - unexpected undefined action",m="[drift] - unexpected undefined action type",p=i=>{if(i.emitted??=!1,i.action==null)throw console.warn(z,i),new Error(z);if(i.action.type==null||i.action.type.length===0)throw console.warn(m,i),new Error(m)},Q=new D,X=[t.runtimeSetWindowProps.type,t.reloadWindow.type],$=(i,e=!1)=>s=>o=>n=>{let{action:a,emitted:c,emitter:l}=V(n);const d=i.label();p({action:n,emitted:c,emitter:l});const u=t.isDriftAction(a.type);if(u&&t.log(e,"[drift] - middleware",{action:a,emitted:c,emitter:l,host:d}),l===i.label())return;const r=u&&!X.includes(a.type);let w=null;u&&(w=s.getState().drift,a=t.assignLabel(a,w));const h=o(a),_=r?s.getState().drift:null,A=t.shouldEmit(c,a.type);return Q.runExclusive(async()=>{try{w!==null&&_!==null&&await U(w,_,i,e),A&&await i.emit({action:a})}catch(S){t.log(e,"[drift] - ERROR",{error:S.message,action:a,emitted:c,emitter:l,host:d}),s.dispatch(t.setWindowError({key:d,message:S.message}))}}),h},Y=(i,e,s=!1)=>o=>{const n=i!=null?typeof i=="function"?i(o):i:o();return[$(e,s),...n]},B=async({runtime:i,preloadedState:e,middleware:s,debug:o=!1,enablePrerender:n=!0,defaultWindowProps:a,...c})=>{await i.configure();let l;l=O.configureStore({...c,preloadedState:await G(o,i,()=>l,a,e),middleware:Y(s,i,o)}),await Z(l.getState().drift,l.dispatch,i,o);const d=i.label();return l.dispatch(t.internalSetInitial({enablePrerender:n,defaultWindowProps:a,debug:o,label:d})),l.dispatch(t.setWindowStage({stage:"created"})),i.onCloseRequested(()=>l?.dispatch(t.closeWindow({}))),l},G=async(i,e,s,o,n)=>e.isMain()?(await e.subscribe(({action:c,emitter:l,sendState:d})=>{const u=s();if(u==null)return;if(c!=null){p({action:c,emitter:l}),u.dispatch(b(c,l));return}const r=u.getState();d===!0&&e.emit({state:r},l)}),typeof n=="function"?g(o,i,await n()):g(o,i,n)):await new Promise((c,l)=>{(async()=>{try{await e.subscribe(({action:u,emitter:r,state:w})=>{const h=s();if(h==null)return w!=null?c(w):void 0;u!=null&&(p({action:u,emitter:r}),h.dispatch(b(u,r)))}),await e.emit({sendState:!0},t.MAIN_WINDOW)}catch(u){l(u)}})()}),W=B,g=(i,e,s)=>{if(s==null)return s;const o=s[t.SLICE_NAME];return o.config.debug=e??o.config.debug,o.windows=Object.fromEntries(Object.entries(o.windows).filter(([,n])=>n.reserved).map(([n,a])=>(i?.visible!=null&&(a.visible=i.visible),a.focusCount=0,a.centerCount=0,a.processCount=0,[n,a]))),s};class v{async emit(){}async subscribe(){}isMain(){return!0}label(){return t.MAIN_WINDOW}onCloseRequested(){}async listLabels(){return[]}async getProps(){return{}}async create(){}async close(){}async focus(){}async setMinimized(){}async setMaximized(){}async setVisible(){}async setFullscreen(){}async center(){}async setPosition(){}async setSize(){}async setMinSize(){}async setMaxSize(){}async setResizable(){}async setSkipTaskbar(){}async setAlwaysOnTop(){}async setDecorations(){}async setTitle(){}async configure(){}}const H=Object.freeze(Object.defineProperty({__proto__:null,MAIN_WINDOW:t.MAIN_WINDOW,NoopRuntime:v,SLICE_NAME:t.SLICE_NAME,ZERO_SLICE_STATE:t.ZERO_SLICE_STATE,closeWindow:t.closeWindow,completeProcess:t.completeProcess,configureStore:W,createWindow:t.createWindow,focusWindow:t.focusWindow,reducer:t.reducer,registerProcess:t.registerProcess,reloadWindow:t.reloadWindow,selectSliceState:f.selectSliceState,selectWindow:f.selectWindow,selectWindowAttribute:f.selectWindowAttribute,selectWindowKey:f.selectWindowKey,selectWindowLabel:f.selectWindowLabel,selectWindows:f.selectWindows,setWindowAlwaysOnTop:t.setWindowAlwaysOnTop,setWindowDecorations:t.setWindowDecorations,setWindowFullscreen:t.setWindowFullscreen,setWindowMaxSize:t.setWindowMaxSize,setWindowMaximized:t.setWindowMaximized,setWindowMinSize:t.setWindowMinSize,setWindowMinimized:t.setWindowMinimized,setWindowPosition:t.setWindowPosition,setWindowProps:t.setWindowProps,setWindowResizable:t.setWindowResizable,setWindowSize:t.setWindowSize,setWindowSkipTaskbar:t.setWindowSkipTaskbar,setWindowStage:t.setWindowStage,setWindowTitle:t.setWindowTitle,setWindowVisible:t.setWindowVisible,windowPropsZ:t.windowPropsZ},Symbol.toStringTag,{value:"Module"}));exports.MAIN_WINDOW=t.MAIN_WINDOW;exports.SLICE_NAME=t.SLICE_NAME;exports.ZERO_SLICE_STATE=t.ZERO_SLICE_STATE;exports.closeWindow=t.closeWindow;exports.completeProcess=t.completeProcess;exports.createWindow=t.createWindow;exports.focusWindow=t.focusWindow;exports.reducer=t.reducer;exports.registerProcess=t.registerProcess;exports.reloadWindow=t.reloadWindow;exports.setWindowAlwaysOnTop=t.setWindowAlwaysOnTop;exports.setWindowDecorations=t.setWindowDecorations;exports.setWindowFullscreen=t.setWindowFullscreen;exports.setWindowMaxSize=t.setWindowMaxSize;exports.setWindowMaximized=t.setWindowMaximized;exports.setWindowMinSize=t.setWindowMinSize;exports.setWindowMinimized=t.setWindowMinimized;exports.setWindowPosition=t.setWindowPosition;exports.setWindowProps=t.setWindowProps;exports.setWindowResizable=t.setWindowResizable;exports.setWindowSize=t.setWindowSize;exports.setWindowSkipTaskbar=t.setWindowSkipTaskbar;exports.setWindowStage=t.setWindowStage;exports.setWindowTitle=t.setWindowTitle;exports.setWindowVisible=t.setWindowVisible;exports.windowPropsZ=t.windowPropsZ;exports.selectSliceState=f.selectSliceState;exports.selectWindow=f.selectWindow;exports.selectWindowAttribute=f.selectWindowAttribute;exports.selectWindowKey=f.selectWindowKey;exports.selectWindowLabel=f.selectWindowLabel;exports.selectWindows=f.selectWindows;exports.Drift=H;exports.NoopRuntime=v;exports.configureStore=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@reduxjs/toolkit"),t=require("./state-BghdRGsQ.cjs"),f=require("./selectors-D_YiyoK6.cjs"),P=new Error("request for lock canceled");var N=function(i,e,s,o){function n(a){return a instanceof s?a:new s(function(c){c(a)})}return new(s||(s=Promise))(function(a,c){function l(r){try{u(o.next(r))}catch(w){c(w)}}function d(r){try{u(o.throw(r))}catch(w){c(w)}}function u(r){r.done?a(r.value):n(r.value).then(l,d)}u((o=o.apply(i,e||[])).next())})};class C{constructor(e,s=P){this._value=e,this._cancelError=s,this._queue=[],this._weightedWaiters=[]}acquire(e=1,s=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((o,n)=>{const a={resolve:o,reject:n,weight:e,priority:s},c=T(this._queue,l=>s<=l.priority);c===-1&&e<=this._value?this._dispatchItem(a):this._queue.splice(c+1,0,a)})}runExclusive(e){return N(this,arguments,void 0,function*(s,o=1,n=0){const[a,c]=yield this.acquire(o,n);try{return yield s(a)}finally{c()}})}waitForUnlock(e=1,s=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,s)?Promise.resolve():new Promise(o=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),L(this._weightedWaiters[e-1],{resolve:o,priority:s})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const s=this._value;this._value-=e.weight,e.resolve([s,this._newReleaser(e.weight)])}_newReleaser(e){let s=!1;return()=>{s||(s=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const s=this._weightedWaiters[e-1];s&&(s.forEach(o=>o.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let s=this._value;s>0;s--){const o=this._weightedWaiters[s-1];if(!o)continue;const n=o.findIndex(a=>a.priority<=e);(n===-1?o:o.splice(0,n)).forEach((a=>a.resolve()))}}}_couldLockImmediately(e,s){return(this._queue.length===0||this._queue[0].priority<s)&&e<=this._value}}function L(i,e){const s=T(i,o=>e.priority<=o.priority);i.splice(s+1,0,e)}function T(i,e){for(let s=i.length-1;s>=0;s--)if(e(i[s]))return s;return-1}var q=function(i,e,s,o){function n(a){return a instanceof s?a:new s(function(c){c(a)})}return new(s||(s=Promise))(function(a,c){function l(r){try{u(o.next(r))}catch(w){c(w)}}function d(r){try{u(o.throw(r))}catch(w){c(w)}}function u(r){r.done?a(r.value):n(r.value).then(l,d)}u((o=o.apply(i,e||[])).next())})};class D{constructor(e){this._semaphore=new C(1,e)}acquire(){return q(this,arguments,void 0,function*(e=0){const[,s]=yield this._semaphore.acquire(1,e);return s})}runExclusive(e,s=0){return this._semaphore.runExclusive(()=>e(),1,s)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const M="DA@",E="://",R=(i,e)=>M.concat(e,E,i),F=i=>{const[e,s]=i.split(E);if(s==null)return[i,""];const[,o]=e.split(M);return[s,o]},b=(i,e)=>({...i,type:R(i.type,e)}),V=i=>{const[e,s]=F(i.type);return{emitted:s!=null&&s.length>0,emitter:s,action:{...i,type:e}}},j=i=>{const{centerCount:e,processCount:s,focusCount:o,stage:n,key:a,prerenderLabel:c,reserved:l,minimized:d,...u}=i;return u},Z=async(i,e,s,o)=>{const n=(await s.listLabels()).filter(r=>r!==t.MAIN_WINDOW),a=Object.keys(i.windows).filter(r=>r!==t.MAIN_WINDOW);t.group(o,"syncInitial"),t.log(o,"existing windows in runtime",n.sort()),t.log(o,"non-main windows in state",a.sort()),t.groupEnd(o);const c=t.bu.unique([...n,...a]);for(const r of c)!n.includes(r)&&s.isMain()?(t.log(o,"state window not in runtime, creating",r),await k(s,r,i.windows[r],o)):a.includes(r)||(t.log(o,"runtime window not in state, closing",r),await p(s,r,o));const l=s.label(),d=i.windows[l];if(d==null)return;const u={...t.INITIAL_WINDOW_STATE};await I(u,d,s,o),e(t.runtimeSetWindowProps({label:s.label(),...await s.getProps()}))},U=async(i,e,s,o)=>{t.log(o,"sync",i,e),s.isMain()&&await K(i,e,s,o);const n=i.windows[s.label()],a=e.windows[s.label()];n==null||a==null||await I(n,a,s,o)},I=async(i,e,s,o)=>{const n=[];e.title!=null&&e.title!==i.title&&n.push(["title",{prev:i.title,next:e.title},async()=>s.setTitle(e.title)]);const a=e.visible!=null&&e.visible!==i.visible,c=e.visible===!1,l=()=>n.push(["visible",{prev:i.visible,next:e.visible},async()=>{if(await s.setVisible(e.visible),e.visible===!1)return;let d=e.position;d??=(await s.getProps()).position,d!=null&&(await s.setPosition(t.Au.translate(d,{x:1,y:1})),await s.setPosition(d))}]);if(a&&c&&l(),e.skipTaskbar!=null&&e.skipTaskbar!==i.skipTaskbar&&n.push(["skipTaskbar",{prev:i.skipTaskbar,next:e.skipTaskbar},async()=>await s.setSkipTaskbar(e.skipTaskbar)]),e.maximized!=null&&e.maximized!==i.maximized&&n.push(["maximized",{prev:i.maximized,next:e.maximized},async()=>await s.setMaximized(e.maximized)]),e.fullscreen!=null&&e.fullscreen!==i.fullscreen&&n.push(["fullscreen",{prev:i.fullscreen,next:e.fullscreen},async()=>await s.setFullscreen(e.fullscreen)]),e.centerCount!==i.centerCount&&n.push(["center",{prev:i.centerCount,next:e.centerCount},async()=>s.center()]),e.minimized!=null&&e.minimized!==i.minimized&&n.push(["minimized",{prev:i.minimized,next:e.minimized},async()=>await s.setMinimized(e.minimized)]),e.resizable!=null&&e.resizable!==i.resizable&&n.push(["resizable",{prev:i.resizable,next:e.resizable},async()=>await s.setResizable(e.resizable)]),e.minSize!=null&&!t.Su.equals(e.minSize,i.minSize)&&n.push(["minSize",{prev:i.minSize,next:e.minSize},async()=>await s.setMinSize(e.minSize)]),e.maxSize!=null&&!t.Su.equals(e.maxSize,i.maxSize)&&n.push(["maxSize",{prev:i.maxSize,next:e.maxSize},async()=>await s.setMaxSize(e.maxSize)]),e.size!=null&&!t.Su.equals(e.size,i.size)&&n.push(["size",{prev:i.size,next:e.size},async()=>await s.setSize(e.size)]),e.position!=null&&!t.Su.equals(e.position,i.position)&&n.push(["position",{prev:i.position,next:e.position},async()=>await s.setPosition(e.position)]),e.focusCount!==i.focusCount&&n.push(["setVisible",{prev:i.visible,next:e.visible},async()=>await s.setVisible(!0)],["focus",{prev:i.focusCount,next:e.focusCount},async()=>await s.focus()]),e.decorations!=null&&e.decorations!==i.decorations&&n.push(["decorations",{prev:i.decorations,next:e.decorations},async()=>await s.setDecorations(e.decorations)]),e.alwaysOnTop!=null&&e.alwaysOnTop!==i.alwaysOnTop&&n.push(["alwaysOnTop",{prev:i.alwaysOnTop,next:e.alwaysOnTop},async()=>await s.setAlwaysOnTop(e.alwaysOnTop)]),a&&!c&&l(),n.length!==0){t.group(o,`syncCurrent, label: ${s.label()}, key: ${e.key}`);for(const[d,{prev:u,next:r}]of n)t.log(o,d,u,"->",r);t.groupEnd(o);for(const[,,d]of n)await d()}},K=async(i,e,s,o)=>{const n=Object.keys(i.windows).filter(l=>!(l in e.windows)),a=Object.keys(e.windows).filter(l=>!(l in i.windows)),c=s.isMain();if(c&&n.length>0)for(const l of n)t.log(o,"syncMain","closing",l),l===t.MAIN_WINDOW&&await Promise.all(Object.keys(e.windows).filter(d=>d!==t.MAIN_WINDOW).map(async d=>await p(s,d,o))),await p(s,l,o);if(c&&a.length>0)for(const l of a)await k(s,l,e.windows[l],o)},k=async(i,e,s,o)=>(t.log(o,"createWindow",s),await i.create(e,j(s))),p=async(i,e,s)=>(t.log(s,"closeWindow",e),await i.close(e)),z="[drift] - unexpected undefined action",m="[drift] - unexpected undefined action type",y=i=>{if(i.emitted??=!1,i.action==null)throw console.warn(z,i),new Error(z);if(i.action.type==null||i.action.type.length===0)throw console.warn(m,i),new Error(m)},Q=new D,X=[t.runtimeSetWindowProps.type,t.reloadWindow.type],$=(i,e=!1)=>s=>o=>n=>{let{action:a,emitted:c,emitter:l}=V(n);const d=i.label();y({action:n,emitted:c,emitter:l});const u=t.isDriftAction(a.type);if(u&&t.log(e,"[drift] - middleware",{action:a,emitted:c,emitter:l,host:d}),l===i.label())return;const r=u&&!X.includes(a.type);let w=null;u&&(w=s.getState().drift,a=t.assignLabel(a,w));const h=o(a),_=r?s.getState().drift:null,v=t.shouldEmit(c,a.type);return Q.runExclusive(async()=>{try{w!==null&&_!==null&&await U(w,_,i,e),v&&await i.emit({action:a})}catch(S){t.log(e,"[drift] - ERROR",{error:S.message,action:a,emitted:c,emitter:l,host:d}),s.dispatch(t.setWindowError({key:d,message:S.message}))}}),h},Y=(i,e,s=!1)=>o=>{const n=i!=null?typeof i=="function"?i(o):i:o();return[$(e,s),...n]},B=async({runtime:i,preloadedState:e,middleware:s,debug:o=!1,enablePrerender:n=!0,defaultWindowProps:a,...c})=>{await i.configure();let l;l=O.configureStore({...c,preloadedState:await G(o,i,()=>l,a,e),middleware:Y(s,i,o)}),await Z(l.getState().drift,l.dispatch,i,o);const d=i.label();return l.dispatch(t.internalSetInitial({enablePrerender:n,defaultWindowProps:a,debug:o,label:d})),l.dispatch(t.setWindowStage({stage:"created"})),i.onCloseRequested(()=>l?.dispatch(t.closeWindow({}))),l},G=async(i,e,s,o,n)=>e.isMain()?(await e.subscribe(({action:c,emitter:l,sendState:d})=>{const u=s();if(u==null)return;if(c!=null){y({action:c,emitter:l}),u.dispatch(b(c,l));return}const r=u.getState();d===!0&&e.emit({state:r},l)}),typeof n=="function"?g(o,i,await n()):g(o,i,n)):await new Promise((c,l)=>{(async()=>{try{await e.subscribe(({action:u,emitter:r,state:w})=>{const h=s();if(h==null)return w!=null?c(w):void 0;u!=null&&(y({action:u,emitter:r}),h.dispatch(b(u,r)))}),await e.emit({sendState:!0},t.MAIN_WINDOW)}catch(u){l(u)}})()}),W=B,g=(i,e,s)=>{if(s==null)return s;const o=s[t.SLICE_NAME];return o.config.debug=e??o.config.debug,o.windows=Object.fromEntries(Object.entries(o.windows).filter(([,n])=>n.reserved).map(([n,a])=>(i?.visible!=null&&(a.visible=i.visible),a.focusCount=0,a.centerCount=0,a.processCount=0,[n,a]))),s};class A{async emit(){}async subscribe(){}isMain(){return!0}label(){return t.MAIN_WINDOW}onCloseRequested(){}async listLabels(){return[]}async getProps(){return{}}async create(){}async close(){}async focus(){}async setMinimized(){}async setMaximized(){}async setVisible(){}async setFullscreen(){}async center(){}async setPosition(){}async setSize(){}async setMinSize(){}async setMaxSize(){}async setResizable(){}async setSkipTaskbar(){}async setAlwaysOnTop(){}async setDecorations(){}async setTitle(){}async configure(){}}const H=Object.freeze(Object.defineProperty({__proto__:null,MAIN_WINDOW:t.MAIN_WINDOW,NoopRuntime:A,SLICE_NAME:t.SLICE_NAME,ZERO_SLICE_STATE:t.ZERO_SLICE_STATE,closeWindow:t.closeWindow,completeProcess:t.completeProcess,configureStore:W,createWindow:t.createWindow,focusWindow:t.focusWindow,reducer:t.reducer,registerProcess:t.registerProcess,reloadWindow:t.reloadWindow,selectSliceState:f.selectSliceState,selectWindow:f.selectWindow,selectWindowAttribute:f.selectWindowAttribute,selectWindowKey:f.selectWindowKey,selectWindowLabel:f.selectWindowLabel,selectWindows:f.selectWindows,setWindowAlwaysOnTop:t.setWindowAlwaysOnTop,setWindowDecorations:t.setWindowDecorations,setWindowFullscreen:t.setWindowFullscreen,setWindowMaxSize:t.setWindowMaxSize,setWindowMaximized:t.setWindowMaximized,setWindowMinSize:t.setWindowMinSize,setWindowMinimized:t.setWindowMinimized,setWindowPosition:t.setWindowPosition,setWindowProps:t.setWindowProps,setWindowResizable:t.setWindowResizable,setWindowSize:t.setWindowSize,setWindowSkipTaskbar:t.setWindowSkipTaskbar,setWindowStage:t.setWindowStage,setWindowTitle:t.setWindowTitle,setWindowVisible:t.setWindowVisible,windowPropsZ:t.windowPropsZ},Symbol.toStringTag,{value:"Module"}));exports.MAIN_WINDOW=t.MAIN_WINDOW;exports.SLICE_NAME=t.SLICE_NAME;exports.ZERO_SLICE_STATE=t.ZERO_SLICE_STATE;exports.closeWindow=t.closeWindow;exports.completeProcess=t.completeProcess;exports.createWindow=t.createWindow;exports.focusWindow=t.focusWindow;exports.reducer=t.reducer;exports.registerProcess=t.registerProcess;exports.reloadWindow=t.reloadWindow;exports.setWindowAlwaysOnTop=t.setWindowAlwaysOnTop;exports.setWindowDecorations=t.setWindowDecorations;exports.setWindowFullscreen=t.setWindowFullscreen;exports.setWindowMaxSize=t.setWindowMaxSize;exports.setWindowMaximized=t.setWindowMaximized;exports.setWindowMinSize=t.setWindowMinSize;exports.setWindowMinimized=t.setWindowMinimized;exports.setWindowPosition=t.setWindowPosition;exports.setWindowProps=t.setWindowProps;exports.setWindowResizable=t.setWindowResizable;exports.setWindowSize=t.setWindowSize;exports.setWindowSkipTaskbar=t.setWindowSkipTaskbar;exports.setWindowStage=t.setWindowStage;exports.setWindowTitle=t.setWindowTitle;exports.setWindowVisible=t.setWindowVisible;exports.windowPropsZ=t.windowPropsZ;exports.selectSliceState=f.selectSliceState;exports.selectWindow=f.selectWindow;exports.selectWindowAttribute=f.selectWindowAttribute;exports.selectWindowKey=f.selectWindowKey;exports.selectWindowLabel=f.selectWindowLabel;exports.selectWindows=f.selectWindows;exports.Drift=H;exports.NoopRuntime=A;exports.configureStore=W;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { configureStore as N } from "@reduxjs/toolkit";
2
- import { M as w, g as T, l as f, a as g, y as F, r as E, b as y, N as V, I as j, c as M, i as $, d as U, s as Q, e as Z, f as K, h as I, j as C, S as q, Z as X, k as B, m as G, n as H, o as Y, p as J, q as x, t as W, u as ee, v as se, w as ie, x as te, z as ae, A as oe, B as ne, C as ce, D as le, E as re, F as ue, G as de, H as fe } from "./state-D-AHxNXX.js";
3
- import { s as we, a as he, b as ye, c as pe, d as _e, e as be } from "./selectors-UsB3Nvlx.js";
1
+ import { configureStore as F } from "@reduxjs/toolkit";
2
+ import { M as w, g as T, l as f, a as g, b as N, r as E, S as y, A as V, I as j, c as I, i as $, d as U, s as Q, e as Z, f as K, h as M, j as C, k as q, Z as X, m as B, n as G, o as H, p as J, q as Y, t as x, u as W, v as ee, w as se, x as ie, y as te, z as ae, B as oe, C as ne, D as ce, E as le, F as re, G as ue, H as de, J as fe } from "./state-CBo_n6oW.js";
3
+ import { s as we, a as he, b as ye, c as pe, d as _e, e as be } from "./selectors-ChqABRVM.js";
4
4
  const me = new Error("request for lock canceled");
5
5
  var ze = function(i, e, s, t) {
6
6
  function a(o) {
@@ -181,14 +181,14 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
181
181
  }, z = (i, e) => ({
182
182
  ...i,
183
183
  type: ge(i.type, e)
184
- }), Me = (i) => {
184
+ }), Ie = (i) => {
185
185
  const [e, s] = Ee(i.type);
186
186
  return {
187
187
  emitted: s != null && s.length > 0,
188
188
  emitter: s,
189
189
  action: { ...i, type: e }
190
190
  };
191
- }, Ie = (i) => {
191
+ }, Me = (i) => {
192
192
  const {
193
193
  centerCount: e,
194
194
  processCount: s,
@@ -206,7 +206,7 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
206
206
  (l) => l !== w
207
207
  ), o = Object.keys(i.windows).filter((l) => l !== w);
208
208
  T(t, "syncInitial"), f(t, "existing windows in runtime", a.sort()), f(t, "non-main windows in state", o.sort()), g(t);
209
- const c = F.unique([...a, ...o]);
209
+ const c = N.unique([...a, ...o]);
210
210
  for (const l of c)
211
211
  !a.includes(l) && s.isMain() ? (f(t, "state window not in runtime, creating", l), await R(s, l, i.windows[l], t)) : o.includes(l) || (f(t, "runtime window not in state, closing", l), await p(s, l, t));
212
212
  const n = s.label(), r = i.windows[n];
@@ -310,13 +310,13 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
310
310
  if (c && o.length > 0)
311
311
  for (const n of o)
312
312
  await R(s, n, e.windows[n], t);
313
- }, R = async (i, e, s, t) => (f(t, "createWindow", s), await i.create(e, Ie(s))), p = async (i, e, s) => (f(s, "closeWindow", e), await i.close(e)), S = "[drift] - unexpected undefined action", k = "[drift] - unexpected undefined action type", _ = (i) => {
313
+ }, R = async (i, e, s, t) => (f(t, "createWindow", s), await i.create(e, Me(s))), p = async (i, e, s) => (f(s, "closeWindow", e), await i.close(e)), S = "[drift] - unexpected undefined action", k = "[drift] - unexpected undefined action type", _ = (i) => {
314
314
  if (i.emitted ??= !1, i.action == null)
315
315
  throw console.warn(S, i), new Error(S);
316
316
  if (i.action.type == null || i.action.type.length === 0)
317
317
  throw console.warn(k, i), new Error(k);
318
- }, Le = new Te(), Ae = [E.type, M.type], Pe = (i, e = !1) => (s) => (t) => (a) => {
319
- let { action: o, emitted: c, emitter: n } = Me(a);
318
+ }, Le = new Te(), Ae = [E.type, I.type], Pe = (i, e = !1) => (s) => (t) => (a) => {
319
+ let { action: o, emitted: c, emitter: n } = Ie(a);
320
320
  const r = i.label();
321
321
  _({ action: a, emitted: c, emitter: n });
322
322
  const u = $(o.type);
@@ -360,9 +360,9 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
360
360
  }) => {
361
361
  await i.configure();
362
362
  let n;
363
- n = N({
363
+ n = F({
364
364
  ...c,
365
- preloadedState: await Ne(
365
+ preloadedState: await Fe(
366
366
  t,
367
367
  i,
368
368
  () => n,
@@ -374,8 +374,8 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
374
374
  const r = i.label();
375
375
  return n.dispatch(
376
376
  K({ enablePrerender: a, defaultWindowProps: o, debug: t, label: r })
377
- ), n.dispatch(I({ stage: "created" })), i.onCloseRequested(() => n?.dispatch(C({}))), n;
378
- }, Ne = async (i, e, s, t, a) => e.isMain() ? (await e.subscribe(({ action: c, emitter: n, sendState: r }) => {
377
+ ), n.dispatch(M({ stage: "created" })), i.onCloseRequested(() => n?.dispatch(C({}))), n;
378
+ }, Fe = async (i, e, s, t, a) => e.isMain() ? (await e.subscribe(({ action: c, emitter: n, sendState: r }) => {
379
379
  const u = s();
380
380
  if (u == null) return;
381
381
  if (c != null) {
@@ -397,7 +397,7 @@ const L = "DA@", A = "://", ge = (i, e) => L.concat(e, A, i), Ee = (i) => {
397
397
  n(u);
398
398
  }
399
399
  })();
400
- }), Fe = De, v = (i, e, s) => {
400
+ }), Ne = De, v = (i, e, s) => {
401
401
  if (s == null) return s;
402
402
  const t = s[q];
403
403
  return t.config.debug = e ?? t.config.debug, t.windows = Object.fromEntries(
@@ -468,12 +468,12 @@ const Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
468
468
  ZERO_SLICE_STATE: X,
469
469
  closeWindow: C,
470
470
  completeProcess: B,
471
- configureStore: Fe,
471
+ configureStore: Ne,
472
472
  createWindow: G,
473
473
  focusWindow: H,
474
- reducer: Y,
475
- registerProcess: J,
476
- reloadWindow: M,
474
+ reducer: J,
475
+ registerProcess: Y,
476
+ reloadWindow: I,
477
477
  selectSliceState: we,
478
478
  selectWindow: he,
479
479
  selectWindowAttribute: ye,
@@ -492,7 +492,7 @@ const Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
492
492
  setWindowResizable: ce,
493
493
  setWindowSize: le,
494
494
  setWindowSkipTaskbar: re,
495
- setWindowStage: I,
495
+ setWindowStage: M,
496
496
  setWindowTitle: ue,
497
497
  setWindowVisible: de,
498
498
  windowPropsZ: fe
@@ -505,12 +505,12 @@ export {
505
505
  X as ZERO_SLICE_STATE,
506
506
  C as closeWindow,
507
507
  B as completeProcess,
508
- Fe as configureStore,
508
+ Ne as configureStore,
509
509
  G as createWindow,
510
510
  H as focusWindow,
511
- Y as reducer,
512
- J as registerProcess,
513
- M as reloadWindow,
511
+ J as reducer,
512
+ Y as registerProcess,
513
+ I as reloadWindow,
514
514
  we as selectSliceState,
515
515
  he as selectWindow,
516
516
  ye as selectWindowAttribute,
@@ -529,7 +529,7 @@ export {
529
529
  ce as setWindowResizable,
530
530
  le as setWindowSize,
531
531
  re as setWindowSkipTaskbar,
532
- I as setWindowStage,
532
+ M as setWindowStage,
533
533
  ue as setWindowTitle,
534
534
  de as setWindowVisible,
535
535
  fe as windowPropsZ
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("react-redux"),a=require("proxy-memoize"),d=require("./selectors-C-yu1uR2.cjs"),i=require("./state-B6GRS-m8.cjs"),y=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindow(s,e)),[e])),w=()=>u.useSelector(n.useCallback(a.memoize(d.selectWindows),[])),S=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindowKey(s,e)),[e])),W=(e,s)=>u.useSelector(n.useCallback(a.memoize(t=>d.selectWindowAttribute(t,e,s)),[e,s])),m=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null);n.useEffect(()=>{if(t==null)return;const{stage:r}=t;if(r==="created"&&c.current==null){const l=e();l!=null&&(c.current=l),o(i.registerProcess({key:t.key}))}else(r==="closing"||r==="reloading")&&c.current!=null&&(c.current(),c.current=null,o(i.completeProcess({key:t.key})))},[t])},h=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null),r=n.useRef(!1);n.useEffect(()=>{if(t==null)return;const{stage:l}=t;if(l==="created"&&c.current==null)r.current=!0,e().then(f=>{c.current=f??(async()=>{}),o(i.registerProcess({key:t.key}))}).catch(console.error).finally(()=>{r.current=!1});else if((l==="closing"||l==="reloading")&&c.current!=null){const f=c.current;c.current=null,f().then(()=>{c.current=null}).catch(console.error).finally(()=>{o(i.completeProcess({key:t.key}))})}},[t])},g=({store:e,emptyContent:s=null,children:t})=>{const[o,c]=n.useState(null),[r,l]=n.useState(null);if(r!=null)throw l(null),r;return o==null?(e instanceof Promise?e.then(c).catch(l):c(e),s):n.createElement(u.Provider,{store:o},t)};exports.Provider=g;exports.useAsyncWindowLifecycle=h;exports.useSelectWindow=y;exports.useSelectWindowAttribute=W;exports.useSelectWindowKey=S;exports.useSelectWindows=w;exports.useWindowLifecycle=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("react-redux"),a=require("proxy-memoize"),d=require("./selectors-D_YiyoK6.cjs"),i=require("./state-BghdRGsQ.cjs"),y=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindow(s,e)),[e])),w=()=>u.useSelector(n.useCallback(a.memoize(d.selectWindows),[])),S=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindowKey(s,e)),[e])),W=(e,s)=>u.useSelector(n.useCallback(a.memoize(t=>d.selectWindowAttribute(t,e,s)),[e,s])),m=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null);n.useEffect(()=>{if(t==null)return;const{stage:r}=t;if(r==="created"&&c.current==null){const l=e();l!=null&&(c.current=l),o(i.registerProcess({key:t.key}))}else(r==="closing"||r==="reloading")&&c.current!=null&&(c.current(),c.current=null,o(i.completeProcess({key:t.key})))},[t])},h=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null),r=n.useRef(!1);n.useEffect(()=>{if(t==null)return;const{stage:l}=t;if(l==="created"&&c.current==null)r.current=!0,e().then(f=>{c.current=f??(async()=>{}),o(i.registerProcess({key:t.key}))}).catch(console.error).finally(()=>{r.current=!1});else if((l==="closing"||l==="reloading")&&c.current!=null){const f=c.current;c.current=null,f().then(()=>{c.current=null}).catch(console.error).finally(()=>{o(i.completeProcess({key:t.key}))})}},[t])},g=({store:e,emptyContent:s=null,children:t})=>{const[o,c]=n.useState(null),[r,l]=n.useState(null);if(r!=null)throw l(null),r;return o==null?(e instanceof Promise?e.then(c).catch(l):c(e),s):n.createElement(u.Provider,{store:o},t)};exports.Provider=g;exports.useAsyncWindowLifecycle=h;exports.useSelectWindow=y;exports.useSelectWindowAttribute=W;exports.useSelectWindowKey=S;exports.useSelectWindows=w;exports.useWindowLifecycle=m;
package/dist/react.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import { useCallback as l, useRef as f, useEffect as m, useState as d, createElement as W } from "react";
2
- import { useSelector as u, useDispatch as y, Provider as k } from "react-redux";
2
+ import { useSelector as u, useDispatch as y, Provider as g } from "react-redux";
3
3
  import { memoize as i } from "proxy-memoize";
4
- import { a as g, e as S, c as P, b as v } from "./selectors-UsB3Nvlx.js";
5
- import { p as w, k as p } from "./state-D-AHxNXX.js";
4
+ import { a as k, e as S, c as P, b as v } from "./selectors-ChqABRVM.js";
5
+ import { q as w, m as p } from "./state-CBo_n6oW.js";
6
6
  const h = (e) => u(
7
7
  l(
8
- i((r) => g(r, e)),
8
+ i((r) => k(r, e)),
9
9
  [e]
10
10
  )
11
- ), x = () => u(l(i(S), [])), z = (e) => u(
11
+ ), q = () => u(l(i(S), [])), x = (e) => u(
12
12
  l(
13
13
  i((r) => P(r, e)),
14
14
  [e]
15
15
  )
16
- ), C = (e, r) => u(
16
+ ), z = (e, r) => u(
17
17
  l(
18
18
  i((t) => v(t, e, r)),
19
19
  [e, r]
20
20
  )
21
- ), L = (e, r) => {
21
+ ), C = (e, r) => {
22
22
  const t = h(r), o = y(), n = f(null);
23
23
  m(() => {
24
24
  if (t == null) return;
@@ -28,7 +28,7 @@ const h = (e) => u(
28
28
  s != null && (n.current = s), o(w({ key: t.key }));
29
29
  } else (c === "closing" || c === "reloading") && n.current != null && (n.current(), n.current = null, o(p({ key: t.key })));
30
30
  }, [t]);
31
- }, R = (e, r) => {
31
+ }, L = (e, r) => {
32
32
  const t = h(r), o = y(), n = f(null), c = f(!1);
33
33
  m(() => {
34
34
  if (t == null) return;
@@ -49,7 +49,7 @@ const h = (e) => u(
49
49
  });
50
50
  }
51
51
  }, [t]);
52
- }, j = ({
52
+ }, R = ({
53
53
  store: e,
54
54
  emptyContent: r = null,
55
55
  children: t
@@ -57,14 +57,14 @@ const h = (e) => u(
57
57
  const [o, n] = d(null), [c, s] = d(null);
58
58
  if (c != null)
59
59
  throw s(null), c;
60
- return o == null ? (e instanceof Promise ? e.then(n).catch(s) : n(e), r) : W(k, { store: o }, t);
60
+ return o == null ? (e instanceof Promise ? e.then(n).catch(s) : n(e), r) : W(g, { store: o }, t);
61
61
  };
62
62
  export {
63
- j as Provider,
64
- R as useAsyncWindowLifecycle,
63
+ R as Provider,
64
+ L as useAsyncWindowLifecycle,
65
65
  h as useSelectWindow,
66
- C as useSelectWindowAttribute,
67
- z as useSelectWindowKey,
68
- x as useSelectWindows,
69
- L as useWindowLifecycle
66
+ z as useSelectWindowAttribute,
67
+ x as useSelectWindowKey,
68
+ q as useSelectWindows,
69
+ C as useWindowLifecycle
70
70
  };
@@ -1,4 +1,4 @@
1
- import { M as i } from "./state-D-AHxNXX.js";
1
+ import { M as i } from "./state-CBo_n6oW.js";
2
2
  const l = (n) => n.drift, a = (n) => Object.values(l(n).windows), r = (n, e) => {
3
3
  const t = l(n);
4
4
  if (e == null) return t.windows[t.label];
@@ -1 +1 @@
1
- "use strict";const i=require("./state-B6GRS-m8.cjs"),s=n=>n.drift,r=n=>Object.values(s(n).windows),c=(n,e)=>{const t=s(n);if(e==null)return t.windows[t.label];let l=t.windows[e];if(l!=null)return l;const o=t.keyLabels[e];return l=t.windows[o],l==null&&e!=null?null:l??t.windows[t.label]},u=(n,e)=>{const t=s(n);if(e==null)return t.labelKeys[t.label];const l=t.labelKeys[e];return l==null&&e==i.MAIN_WINDOW?i.MAIN_WINDOW:l},w=(n,e,t)=>c(n,e)?.[t]??null,d=(n,e)=>s(n).keyLabels[e];exports.selectSliceState=s;exports.selectWindow=c;exports.selectWindowAttribute=w;exports.selectWindowKey=u;exports.selectWindowLabel=d;exports.selectWindows=r;
1
+ "use strict";const i=require("./state-BghdRGsQ.cjs"),s=n=>n.drift,r=n=>Object.values(s(n).windows),c=(n,e)=>{const t=s(n);if(e==null)return t.windows[t.label];let l=t.windows[e];if(l!=null)return l;const o=t.keyLabels[e];return l=t.windows[o],l==null&&e!=null?null:l??t.windows[t.label]},u=(n,e)=>{const t=s(n);if(e==null)return t.labelKeys[t.label];const l=t.labelKeys[e];return l==null&&e==i.MAIN_WINDOW?i.MAIN_WINDOW:l},w=(n,e,t)=>c(n,e)?.[t]??null,d=(n,e)=>s(n).keyLabels[e];exports.selectSliceState=s;exports.selectWindow=c;exports.selectWindowAttribute=w;exports.selectWindowKey=u;exports.selectWindowLabel=d;exports.selectWindows=r;
@@ -1,4 +1,4 @@
1
- import { Action as CoreAction, ConfigureStoreOptions as BaseOpts, EnhancedStore, StoreEnhancer, Tuple, UnknownAction } from '@reduxjs/toolkit';
1
+ import { Action as BaseAction, ConfigureStoreOptions as BaseOpts, EnhancedStore, StoreEnhancer, Tuple, UnknownAction } from '@reduxjs/toolkit';
2
2
  import { Middlewares } from './middleware';
3
3
  import { Runtime } from './runtime';
4
4
  import { Action, StoreState } from './state';
@@ -8,7 +8,7 @@ export type Enhancers = readonly StoreEnhancer[];
8
8
  * Extends the default configureStore options to add a runtime argument.
9
9
  * See configureStore for more details.
10
10
  */
11
- export interface ConfigureStoreOptions<S extends StoreState, A extends CoreAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>, E extends Tuple<Enhancers> = Tuple<Enhancers>> extends Omit<BaseOpts<S, A, M, E>, "preloadedState"> {
11
+ export interface ConfigureStoreOptions<S extends StoreState, A extends BaseAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>, E extends Tuple<Enhancers> = Tuple<Enhancers>> extends Omit<BaseOpts<S, A, M, E>, "preloadedState"> {
12
12
  runtime: Runtime<S, A | Action>;
13
13
  debug?: boolean;
14
14
  preloadedState?: S | (() => Promise<S | undefined>);
@@ -20,7 +20,7 @@ export interface ConfigureStoreOptions<S extends StoreState, A extends CoreActio
20
20
  * that enables drift to synchronize state between windows. The API is identical to the
21
21
  * standard configureStore function, except for two important differences.
22
22
  *
23
- * @param options.runtime - The core runtime of the application. This should be chosen
23
+ * @param options.runtime - The main runtime of the application. This should be chosen
24
24
  * based on the platform you are running on (Tauri, etc.).
25
25
  * @param options.debug - If true, drift will log debug information to the console.
26
26
  * @default false
@@ -37,6 +37,6 @@ export interface ConfigureStoreOptions<S extends StoreState, A extends CoreActio
37
37
  * operation. The promise will resolve when the store is configured and the window is
38
38
  * ready for use.
39
39
  */
40
- export declare const configureStore: <S extends StoreState, A extends CoreAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>, E extends Tuple<Enhancers> = Tuple<Enhancers>>(options: ConfigureStoreOptions<S, A, M, E>) => Promise<EnhancedStore<S, A | Action>>;
40
+ export declare const configureStore: <S extends StoreState, A extends BaseAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>, E extends Tuple<Enhancers> = Tuple<Enhancers>>(options: ConfigureStoreOptions<S, A, M, E>) => Promise<EnhancedStore<S, A | Action>>;
41
41
  export declare const resetInitialState: <S extends StoreState>(defaultWindowProps?: Omit<WindowProps, "key">, debug?: boolean, state?: S) => S | undefined;
42
42
  //# sourceMappingURL=configureStore.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Action as CoreAction, configureStore, Dispatch, Middleware, Tuple, UnknownAction } from '@reduxjs/toolkit';
1
+ import { Action as BaseAction, configureStore, Dispatch, Middleware, Tuple, UnknownAction } from '@reduxjs/toolkit';
2
2
  import { Runtime } from './runtime';
3
3
  import { Action, StoreState } from './state';
4
4
  export type Middlewares<S> = ReadonlyArray<Middleware<{}, S>>;
@@ -11,7 +11,7 @@ export type Middlewares<S> = ReadonlyArray<Middleware<{}, S>>;
11
11
  * @param runtime - The runtime of the current application window.
12
12
  * @returns a Redux middleware.
13
13
  */
14
- export declare const middleware: <S extends StoreState, A extends CoreAction = UnknownAction>(runtime: Runtime<S, A | Action>, debug?: boolean) => Middleware<Dispatch<A | Action>, S, Dispatch<A | Action>>;
14
+ export declare const middleware: <S extends StoreState, A extends BaseAction = UnknownAction>(runtime: Runtime<S, A | Action>, debug?: boolean) => Middleware<Dispatch<A | Action>, S, Dispatch<A | Action>>;
15
15
  /**
16
16
  * Configures the Redux middleware for the current window's store.
17
17
  *
@@ -19,9 +19,9 @@ export declare const middleware: <S extends StoreState, A extends CoreAction = U
19
19
  * @param runtime - The runtime of the current window.
20
20
  * @returns a middleware function to be passed to `configureStore`.
21
21
  */
22
- export declare const configureMiddleware: <S extends StoreState, A extends CoreAction = UnknownAction, M extends Middlewares<S> = Middlewares<S>>(mw: M | ((def: GetDefaultMiddleware<S>) => M) | undefined, runtime: Runtime<S, A | Action>, debug?: boolean) => ((def: GetDefaultMiddleware<S>) => M);
23
- type ConfigureStoreOptions<S extends StoreState, A extends CoreAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>> = Parameters<typeof configureStore<S, A, M>>[0];
24
- type MW<S extends StoreState, A extends CoreAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>> = NonNullable<ConfigureStoreOptions<S, A, M>["middleware"]>;
22
+ export declare const configureMiddleware: <S extends StoreState, A extends BaseAction = UnknownAction, M extends Middlewares<S> = Middlewares<S>>(mw: M | ((def: GetDefaultMiddleware<S>) => M) | undefined, runtime: Runtime<S, A | Action>, debug?: boolean) => ((def: GetDefaultMiddleware<S>) => M);
23
+ type ConfigureStoreOptions<S extends StoreState, A extends BaseAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>> = Parameters<typeof configureStore<S, A, M>>[0];
24
+ type MW<S extends StoreState, A extends BaseAction = UnknownAction, M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>> = NonNullable<ConfigureStoreOptions<S, A, M>["middleware"]>;
25
25
  export type GetDefaultMiddleware<S extends StoreState> = Parameters<MW<S>>[0];
26
26
  export {};
27
27
  //# sourceMappingURL=middleware.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/mock/runtime.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,WAAW,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,GAAG,aAAa,CAC7E,YAAW,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAExB,OAAO,UAAS;IAChB,MAAM,SAAU;IAChB,WAAW,UAAS;IACpB,SAAS,EAAE,MAAM,EAAE,CAAM;IACzB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAM;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAM;IAC1D,iBAAiB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAY;IAC3D,cAAc,EAAE,MAAM,IAAI,CAAY;IACtC,KAAK,EAAE,WAAW,CAAC;gBAEP,MAAM,EAAE,OAAO,EAAE,YAAY,GAAE,WAA6B;IAMlE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAEh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E/B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAE/B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAE/B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAEzB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CACjC"}
@@ -91,8 +91,8 @@ export interface Manager {
91
91
  configure(): Promise<void>;
92
92
  }
93
93
  /**
94
- * An interface that represents the core runtime of the application.
95
- * Drift uses this runtime to manage windows and communicate between them.
94
+ * An interface that represents the main runtime of the application. Drift uses this
95
+ * runtime to manage windows and communicate between them.
96
96
  */
97
97
  export interface Runtime<S extends StoreState, A extends Action = UnknownAction> extends Communicator<S, A>, Properties, Manager {
98
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,GAAG,aAAa;IAC3E,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,6EAA6E;IAC7E,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,GAAG,aAAa;IAC5E;;;;OAIG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC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, UnknownAction } from '@reduxjs/toolkit';
1
+ import { Action as BaseAction, UnknownAction } from '@reduxjs/toolkit';
2
2
  import { Action } from './state';
3
3
  /**
4
4
  * Sugars an action, embedding the window key in the type.
@@ -6,7 +6,7 @@ import { Action } from './state';
6
6
  * @param emitter - The window key to embed.
7
7
  * @returns - The sugared action.
8
8
  */
9
- export declare const sugar: <A extends CoreAction = UnknownAction>(action: A, emitter: string) => A;
9
+ export declare const sugar: <A extends BaseAction = UnknownAction>(action: A, emitter: string) => A;
10
10
  /**
11
11
  * Desugars an action, extracting the window key from the type.
12
12
  * @param action - The action to desugar.
@@ -16,7 +16,7 @@ export declare const sugar: <A extends CoreAction = UnknownAction>(action: A, em
16
16
  * action: The desugared action.
17
17
  * }
18
18
  */
19
- export declare const desugar: <A extends CoreAction = UnknownAction>(action: A | Action) => {
19
+ export declare const desugar: <A extends BaseAction = UnknownAction>(action: A | Action) => {
20
20
  emitted: boolean;
21
21
  emitter: string;
22
22
  action: A | Action;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tauri/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAIL,UAAU,EAGV,EAAE,EACH,MAAM,eAAe,CAAC;AAQvB,OAAO,EAGL,aAAa,EACd,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAgDzD;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,GAAG,aAAa,CAC9E,YAAW,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAExB,OAAO,CAAC,QAAQ,C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