@synnaxlabs/drift 0.47.0 → 0.48.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 +3 -3
- package/dist/eslint.config.d.ts +2 -1
- package/dist/eslint.config.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{selectors-ZKSe28UL.js → selectors-DyMwTbxE.js} +1 -1
- package/dist/{selectors-BjelCGzn.cjs → selectors-KaNE81VG.cjs} +1 -1
- package/dist/src/configureStore.d.ts +13 -14
- package/dist/src/configureStore.d.ts.map +1 -1
- package/dist/state-BEtTdLcx.cjs +28 -0
- package/dist/{state-DhV1kb1g.js → state-BI4Gp9I9.js} +2509 -2384
- package/dist/tauri.cjs +1 -1
- package/dist/tauri.js +79 -70
- package/package.json +16 -23
- package/dist/debounce-BUAIXXZt.cjs +0 -1
- package/dist/debounce-DOZKRZa9.js +0 -9
- package/dist/electron.cjs +0 -1
- package/dist/electron.js +0 -249
- package/dist/src/electron/index.d.ts +0 -49
- package/dist/src/electron/index.d.ts.map +0 -1
- package/dist/state-CpvoH8kq.cjs +0 -28
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Summary
|
|
4
4
|
|
|
5
|
-
Building multi-window applications with Tauri
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Building multi-window applications with Tauri raises the challenge of synchronizing
|
|
6
|
+
state between windows. Communicating over IPC is unintuitive when used in combination
|
|
7
|
+
with stateful UI frameworks like React.
|
|
8
8
|
|
|
9
9
|
Drift is a simple Redux extension that tightly synchronizes state between windows. It
|
|
10
10
|
also allows you to create, delete, and alter windows by dispatching actions.
|
package/dist/eslint.config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;wBAG0B,MAAM,CAAC,MAAM,EAAE;AAA9E,wBAA+E"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@reduxjs/toolkit"),t=require("./state-CpvoH8kq.cjs"),f=require("./selectors-BjelCGzn.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 R=i=>[...new Set(i)],F=(i,e,s=!0)=>{const o=new Map;return i.forEach(n=>{const a=e(n);if(o.has(a)){if(s)return;o.delete(a)}o.set(a,n)}),Array.from(o.values())},V=Object.freeze(Object.defineProperty({__proto__:null,by:F,unique:R},Symbol.toStringTag,{value:"Module"})),M="DA@",E="://",j=(i,e)=>M.concat(e,E,i),Z=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:j(i.type,e)}),U=i=>{const[e,s]=Z(i.type);return{emitted:s!=null&&s.length>0,emitter:s,action:{...i,type:e}}},K=i=>{const{centerCount:e,processCount:s,focusCount:o,stage:n,key:a,prerenderLabel:c,reserved:l,minimized:d,...u}=i;return u},Q=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=V.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()}))},X=async(i,e,s,o)=>{t.log(o,"sync",i,e),s.isMain()&&await $(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.Q.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._.equals(e.minSize,i.minSize)&&n.push(["minSize",{prev:i.minSize,next:e.minSize},async()=>await s.setMinSize(e.minSize)]),e.maxSize!=null&&!t._.equals(e.maxSize,i.maxSize)&&n.push(["maxSize",{prev:i.maxSize,next:e.maxSize},async()=>await s.setMaxSize(e.maxSize)]),e.size!=null&&!t._.equals(e.size,i.size)&&n.push(["size",{prev:i.size,next:e.size},async()=>await s.setSize(e.size)]),e.position!=null&&!t._.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()}},$=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,K(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)},Y=new D,B=[t.runtimeSetWindowProps.type,t.reloadWindow.type],G=(i,e=!1)=>s=>o=>n=>{let{action:a,emitted:c,emitter:l}=U(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&&!B.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,O=t.shouldEmit(c,a.type);return Y.runExclusive(async()=>{try{w!==null&&_!==null&&await X(w,_,i,e),O&&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},H=(i,e,s=!1)=>o=>{const n=i!=null?typeof i=="function"?i(o):i:o();return[G(e,s),...n]},J=async({runtime:i,preloadedState:e,middleware:s,debug:o=!1,enablePrerender:n=!0,defaultWindowProps:a,...c})=>{await i.configure();let l;l=A.configureStore({...c,preloadedState:await x(o,i,()=>l,a,e),middleware:H(s,i,o)}),await Q(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},x=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=J,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 ee=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=ee;exports.NoopRuntime=v;exports.configureStore=W;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@reduxjs/toolkit"),t=require("./state-BEtTdLcx.cjs"),f=require("./selectors-KaNE81VG.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 R=i=>[...new Set(i)],F=(i,e,s=!0)=>{const o=new Map;return i.forEach(n=>{const a=e(n);if(o.has(a)){if(s)return;o.delete(a)}o.set(a,n)}),Array.from(o.values())},V=Object.freeze(Object.defineProperty({__proto__:null,by:F,unique:R},Symbol.toStringTag,{value:"Module"})),M="DA@",E="://",j=(i,e)=>M.concat(e,E,i),Z=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:j(i.type,e)}),U=i=>{const[e,s]=Z(i.type);return{emitted:s!=null&&s.length>0,emitter:s,action:{...i,type:e}}},K=i=>{const{centerCount:e,processCount:s,focusCount:o,stage:n,key:a,prerenderLabel:c,reserved:l,minimized:d,...u}=i;return u},Q=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=V.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()}))},X=async(i,e,s,o)=>{t.log(o,"sync",i,e),s.isMain()&&await $(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.Q.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._.equals(e.minSize,i.minSize)&&n.push(["minSize",{prev:i.minSize,next:e.minSize},async()=>await s.setMinSize(e.minSize)]),e.maxSize!=null&&!t._.equals(e.maxSize,i.maxSize)&&n.push(["maxSize",{prev:i.maxSize,next:e.maxSize},async()=>await s.setMaxSize(e.maxSize)]),e.size!=null&&!t._.equals(e.size,i.size)&&n.push(["size",{prev:i.size,next:e.size},async()=>await s.setSize(e.size)]),e.position!=null&&!t._.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()}},$=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,K(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)},Y=new D,B=[t.runtimeSetWindowProps.type,t.reloadWindow.type],G=(i,e=!1)=>s=>o=>n=>{let{action:a,emitted:c,emitter:l}=U(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&&!B.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,O=t.shouldEmit(c,a.type);return Y.runExclusive(async()=>{try{w!==null&&_!==null&&await X(w,_,i,e),O&&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},H=(i,e,s=!1)=>o=>{const n=i!=null?typeof i=="function"?i(o):i:o();return[G(e,s),...n]},J=async({runtime:i,preloadedState:e,middleware:s,debug:o=!1,enablePrerender:n=!0,defaultWindowProps:a,...c})=>{await i.configure();let l;l=A.configureStore({...c,preloadedState:await x(o,i,()=>l,a,e),middleware:H(s,i,o)}),await Q(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},x=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=J,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 ee=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=ee;exports.NoopRuntime=v;exports.configureStore=W;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { configureStore as j } from "@reduxjs/toolkit";
|
|
2
|
-
import { M as w, g, l as d, a as T, r as E, _ as y, Q as F, I as N, b as M, i as V, c as $, s as U, d as Q, e as Z, f as I, h as C, S as q, Z as K, j as X, k as B, m as Y, n as G, o as H, p as J, q as x, t as W, u as ee, v as se, w as te, x as ie, y as ae, z as oe, A as ne, B as ce, C as le, D as re, E as ue, F as fe } from "./state-
|
|
3
|
-
import { s as de, a as we, b as he, c as ye, d as pe, e as _e } from "./selectors-
|
|
2
|
+
import { M as w, g, l as d, a as T, r as E, _ as y, Q as F, I as N, b as M, i as V, c as $, s as U, d as Q, e as Z, f as I, h as C, S as q, Z as K, j as X, k as B, m as Y, n as G, o as H, p as J, q as x, t as W, u as ee, v as se, w as te, x as ie, y as ae, z as oe, A as ne, B as ce, C as le, D as re, E as ue, F as fe } from "./state-BI4Gp9I9.js";
|
|
3
|
+
import { s as de, a as we, b as he, c as ye, d as pe, e as _e } from "./selectors-DyMwTbxE.js";
|
|
4
4
|
const be = new Error("request for lock canceled");
|
|
5
5
|
var me = function(t, e, s, i) {
|
|
6
6
|
function a(o) {
|
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-
|
|
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-KaNE81VG.cjs"),i=require("./state-BEtTdLcx.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,8 +1,8 @@
|
|
|
1
1
|
import { useCallback as l, useRef as f, useEffect as m, useState as d, createElement as W } from "react";
|
|
2
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 k, e as S, c as P, b as v } from "./selectors-
|
|
5
|
-
import { o as w, j as p } from "./state-
|
|
4
|
+
import { a as k, e as S, c as P, b as v } from "./selectors-DyMwTbxE.js";
|
|
5
|
+
import { o as w, j as p } from "./state-BI4Gp9I9.js";
|
|
6
6
|
const h = (e) => u(
|
|
7
7
|
l(
|
|
8
8
|
i((r) => k(r, e)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./state-
|
|
1
|
+
"use strict";const i=require("./state-BEtTdLcx.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;
|
|
@@ -16,27 +16,26 @@ export interface ConfigureStoreOptions<S extends StoreState, A extends CoreActio
|
|
|
16
16
|
defaultWindowProps?: Omit<WindowProps, "key">;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* configureStore replaces the standard Redux Toolkit configureStore function
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* important differences.
|
|
19
|
+
* configureStore replaces the standard Redux Toolkit configureStore function with one
|
|
20
|
+
* that enables drift to synchronize state between windows. The API is identical to the
|
|
21
|
+
* standard configureStore function, except for two important differences.
|
|
23
22
|
*
|
|
24
|
-
* @param options.runtime - The core runtime of the application. This should
|
|
25
|
-
*
|
|
26
|
-
* @param options.debug - If true, drift will log debug information to the
|
|
27
|
-
*
|
|
23
|
+
* @param options.runtime - The core runtime of the application. This should be chosen
|
|
24
|
+
* based on the platform you are running on (Tauri, etc.).
|
|
25
|
+
* @param options.debug - If true, drift will log debug information to the console.
|
|
26
|
+
* @default false
|
|
28
27
|
* @param props.enablePrerender - If true, drift will create an invisible, pre-rendered
|
|
29
28
|
* window before it is needed. While it adds an additional process to your application,
|
|
30
29
|
* it also dramatically reduces the time it takes to open a new window. @default true
|
|
31
|
-
* @param props.defaultWindowProps - A partial set of window props to merge with
|
|
32
|
-
*
|
|
30
|
+
* @param props.defaultWindowProps - A partial set of window props to merge with the
|
|
31
|
+
* props passed to drift.createWindow. This is useful for setting default window
|
|
33
32
|
* properties, especially with prerendering. @default {}
|
|
34
33
|
* @param options - The standard Redux Toolkit configureStore options.
|
|
35
34
|
*
|
|
36
|
-
* @returns A !PROMISE! that resolves to a Redux store. This is necessary because
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
35
|
+
* @returns A !PROMISE! that resolves to a Redux store. This is necessary because the
|
|
36
|
+
* store must receive it's initial state from the main window, which is an asynchronous
|
|
37
|
+
* operation. The promise will resolve when the store is configured and the window is
|
|
38
|
+
* ready for use.
|
|
40
39
|
*/
|
|
41
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>>;
|
|
42
41
|
export declare const resetInitialState: <S extends StoreState>(defaultWindowProps?: Omit<WindowProps, "key">, debug?: boolean, state?: S) => S | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureStore.d.ts","sourceRoot":"","sources":["../../src/configureStore.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,MAAM,IAAI,UAAU,EAEzB,KAAK,qBAAqB,IAAI,QAAQ,EACtC,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;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