@gjsify/effect-platform 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/lib/esm/gtk/scope.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Effect as e,Exit as t,Scope as n}from"effect";const signalScope=(
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Effect as e,Exit as t,Scope as n}from"effect";import r from"gi://GObject?version=2.0";const signalScope=(i,a)=>{let o=n.makeUnsafe(`sequential`),s=!1,c=[],disconnect=()=>{for(let e of c)i.disconnect(e);c=[]},close=()=>{if(s)return;s=!0,disconnect();let r=n.closeUnsafe(o,t.void);r!==void 0&&e.runFork(r)};return c=a.map(e=>r.signal_connect(i,e,()=>(close(),!1))),{scope:o,close}},widgetScope=e=>signalScope(e,[`destroy`]),windowScope=e=>signalScope(e,[`close-request`,`destroy`]),runInScope=(t,n)=>e.runSync(e.forkIn(n,t));export{runInScope,signalScope,widgetScope,windowScope};
|
package/lib/esm/gtk/signal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Effect as e,Stream as t}from"effect";import*as n from"effect/Queue";const signalStream=(
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Effect as e,Stream as t}from"effect";import*as n from"effect/Queue";import r from"gi://GObject?version=2.0";const signalStream=(i,a,o={})=>t.callback(t=>e.gen(function*(){let o=r.signal_connect(i,a,(e,...r)=>{n.offerUnsafe(t,r)});yield*e.addFinalizer(()=>e.sync(()=>i.disconnect(o)))}),{bufferSize:o.bufferSize??16,strategy:o.strategy??`sliding`}),propertyStream=(e,n,r,i={})=>t.concat(t.sync(r),t.map(signalStream(e,`notify::${n}`,i),r));export{propertyStream,signalStream};
|
package/lib/types/gtk/scope.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/effect-platform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "Effect's platform services over GNOME: effect/FileSystem on Gio.File with cancellation that reaches GIO, effect/Path on GLib, GError mapped onto Effect's normalized platform errors, and a /gtk subpath binding GObject lifetimes to Effect Scopes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"effect",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@girs/gio-2.0": "
|
|
63
|
-
"@girs/gjs": "
|
|
64
|
-
"@girs/glib-2.0": "
|
|
65
|
-
"@girs/gobject-2.0": "
|
|
66
|
-
"@girs/gtk-4.0": "
|
|
62
|
+
"@girs/gio-2.0": "5.0.0",
|
|
63
|
+
"@girs/gjs": "5.0.0",
|
|
64
|
+
"@girs/glib-2.0": "5.0.0",
|
|
65
|
+
"@girs/gobject-2.0": "5.0.0",
|
|
66
|
+
"@girs/gtk-4.0": "5.0.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"effect": "4.0.0-rc.112"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@gjsify/cli": "^0.
|
|
73
|
-
"@gjsify/unit": "^0.
|
|
72
|
+
"@gjsify/cli": "^0.50.0",
|
|
73
|
+
"@gjsify/unit": "^0.50.0",
|
|
74
74
|
"@types/node": "^25.9.2",
|
|
75
75
|
"effect": "4.0.0-rc.112",
|
|
76
76
|
"typescript": "^6.0.3"
|