@vielzeug/flux 2.2.0 → 2.3.1
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 +1 -1
- package/dist/adapters/pulse.cjs +1 -1
- package/dist/adapters/pulse.cjs.map +1 -1
- package/dist/adapters/pulse.d.ts +3 -3
- package/dist/adapters/pulse.d.ts.map +1 -1
- package/dist/adapters/pulse.js +3 -3
- package/dist/adapters/pulse.js.map +1 -1
- package/dist/pulse.cjs +1 -1
- package/dist/pulse.d.ts +1 -1
- package/dist/pulse.d.ts.map +1 -1
- package/dist/pulse.js +2 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ events.dispose();
|
|
|
38
38
|
```ts
|
|
39
39
|
import { fromQuery } from '@vielzeug/flux/courier';
|
|
40
40
|
import { fromBus } from '@vielzeug/flux/herald';
|
|
41
|
-
import {
|
|
41
|
+
import { fromRoomPresence } from '@vielzeug/flux/pulse';
|
|
42
42
|
import { fromSignal, toSignal } from '@vielzeug/flux/ripple';
|
|
43
43
|
```
|
|
44
44
|
|
package/dist/adapters/pulse.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../core.cjs");function t(t,n){return e.stream(e=>t.on(n,t=>e.next(t)))}function n(t){return e.stream(e=>{e.next(t.
|
|
1
|
+
const e=require("../core.cjs");function t(t,n){return e.stream(e=>t.on(n,t=>e.next(t)))}function n(t){return e.stream(e=>{e.next(t.presence.value);let n=t.onJoin(()=>e.next(t.presence.value)),r=t.onLeave(()=>e.next(t.presence.value));return()=>{n(),r()}})}exports.fromPulse=t,exports.fromRoomPresence=n;
|
|
2
2
|
//# sourceMappingURL=pulse.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse.cjs","names":[],"sources":["../../src/adapters/pulse.ts"],"sourcesContent":["import type { EventKey,
|
|
1
|
+
{"version":3,"file":"pulse.cjs","names":[],"sources":["../../src/adapters/pulse.ts"],"sourcesContent":["import type { EventKey, PresenceRoomScope, Pulse, PulseSchema, ServerEvents } from '@vielzeug/pulse';\nimport { stream } from '../core';\nimport type { Stream } from '../types';\n\nexport function fromPulse<S extends PulseSchema, K extends EventKey<ServerEvents<S>>>(\n pulse: Pulse<S>,\n event: K,\n): Stream<ServerEvents<S>[K]> {\n return stream((sink) => pulse.on(event, (payload) => sink.next(payload)));\n}\n\nexport function fromRoomPresence<T>(room: PresenceRoomScope<T>): Stream<ReadonlyMap<string, T>> {\n return stream((sink) => {\n sink.next(room.presence.value);\n\n const stopJoin = room.onJoin(() => sink.next(room.presence.value));\n const stopLeave = room.onLeave(() => sink.next(room.presence.value));\n\n return () => {\n stopJoin();\n stopLeave();\n };\n });\n}\n"],"mappings":"+BAIA,SAAgB,EACd,EACA,EAC4B,CAC5B,OAAO,EAAA,OAAQ,GAAS,EAAM,GAAG,EAAQ,GAAY,EAAK,KAAK,CAAO,CAAC,CAAC,CAC1E,CAEA,SAAgB,EAAoB,EAA4D,CAC9F,OAAO,EAAA,OAAQ,GAAS,CACtB,EAAK,KAAK,EAAK,SAAS,KAAK,EAE7B,IAAM,EAAW,EAAK,WAAa,EAAK,KAAK,EAAK,SAAS,KAAK,CAAC,EAC3D,EAAY,EAAK,YAAc,EAAK,KAAK,EAAK,SAAS,KAAK,CAAC,EAEnE,UAAa,CACX,EAAS,EACT,EAAU,CACZ,CACF,CAAC,CACH"}
|
package/dist/adapters/pulse.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EventKey,
|
|
1
|
+
import type { EventKey, PresenceRoomScope, Pulse, PulseSchema, ServerEvents } from '@vielzeug/pulse';
|
|
2
2
|
import type { Stream } from '../types';
|
|
3
|
-
export declare function fromPulse<
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function fromPulse<S extends PulseSchema, K extends EventKey<ServerEvents<S>>>(pulse: Pulse<S>, event: K): Stream<ServerEvents<S>[K]>;
|
|
4
|
+
export declare function fromRoomPresence<T>(room: PresenceRoomScope<T>): Stream<ReadonlyMap<string, T>>;
|
|
5
5
|
//# sourceMappingURL=pulse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../../src/adapters/pulse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../../src/adapters/pulse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,SAAS,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAClF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,KAAK,EAAE,CAAC,GACP,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAE5B;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAY9F"}
|
package/dist/adapters/pulse.js
CHANGED
|
@@ -5,14 +5,14 @@ function t(t, n) {
|
|
|
5
5
|
}
|
|
6
6
|
function n(t) {
|
|
7
7
|
return e((e) => {
|
|
8
|
-
e.next(t.
|
|
9
|
-
let n = t.onJoin(() => e.next(t.
|
|
8
|
+
e.next(t.presence.value);
|
|
9
|
+
let n = t.onJoin(() => e.next(t.presence.value)), r = t.onLeave(() => e.next(t.presence.value));
|
|
10
10
|
return () => {
|
|
11
11
|
n(), r();
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { t as fromPulse, n as fromRoomPresence };
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=pulse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse.js","names":[],"sources":["../../src/adapters/pulse.ts"],"sourcesContent":["import type { EventKey,
|
|
1
|
+
{"version":3,"file":"pulse.js","names":[],"sources":["../../src/adapters/pulse.ts"],"sourcesContent":["import type { EventKey, PresenceRoomScope, Pulse, PulseSchema, ServerEvents } from '@vielzeug/pulse';\nimport { stream } from '../core';\nimport type { Stream } from '../types';\n\nexport function fromPulse<S extends PulseSchema, K extends EventKey<ServerEvents<S>>>(\n pulse: Pulse<S>,\n event: K,\n): Stream<ServerEvents<S>[K]> {\n return stream((sink) => pulse.on(event, (payload) => sink.next(payload)));\n}\n\nexport function fromRoomPresence<T>(room: PresenceRoomScope<T>): Stream<ReadonlyMap<string, T>> {\n return stream((sink) => {\n sink.next(room.presence.value);\n\n const stopJoin = room.onJoin(() => sink.next(room.presence.value));\n const stopLeave = room.onLeave(() => sink.next(room.presence.value));\n\n return () => {\n stopJoin();\n stopLeave();\n };\n });\n}\n"],"mappings":";;AAIA,SAAgB,EACd,GACA,GAC4B;CAC5B,OAAO,GAAQ,MAAS,EAAM,GAAG,IAAQ,MAAY,EAAK,KAAK,CAAO,CAAC,CAAC;AAC1E;AAEA,SAAgB,EAAoB,GAA4D;CAC9F,OAAO,GAAQ,MAAS;EACtB,EAAK,KAAK,EAAK,SAAS,KAAK;EAE7B,IAAM,IAAW,EAAK,aAAa,EAAK,KAAK,EAAK,SAAS,KAAK,CAAC,GAC3D,IAAY,EAAK,cAAc,EAAK,KAAK,EAAK,SAAS,KAAK,CAAC;EAEnE,aAAa;GAEX,AADA,EAAS,GACT,EAAU;EACZ;CACF,CAAC;AACH"}
|
package/dist/pulse.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./adapters/pulse.cjs");exports.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./adapters/pulse.cjs");exports.fromPulse=e.fromPulse,exports.fromRoomPresence=e.fromRoomPresence;
|
package/dist/pulse.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { fromPulse, fromRoomPresence } from './adapters/pulse';
|
|
2
2
|
//# sourceMappingURL=pulse.d.ts.map
|
package/dist/pulse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../src/pulse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pulse.d.ts","sourceRoot":"","sources":["../src/pulse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/pulse.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as
|
|
1
|
+
import { fromPulse as e, fromRoomPresence as t } from "./adapters/pulse.js";
|
|
2
|
+
export { e as fromPulse, t as fromRoomPresence };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vielzeug/flux",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Minimal push streams with explicit ownership, buffering, and ecosystem adapters",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"verify:exports": "node scripts/verify-exports.mjs && node scripts/verify-package-exports.mjs"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@vielzeug/courier": "2.2.
|
|
95
|
-
"@vielzeug/herald": "2.
|
|
96
|
-
"@vielzeug/pulse": "2.1
|
|
97
|
-
"@vielzeug/ripple": "2.2.
|
|
94
|
+
"@vielzeug/courier": "2.2.1",
|
|
95
|
+
"@vielzeug/herald": "2.1.0",
|
|
96
|
+
"@vielzeug/pulse": "2.2.1",
|
|
97
|
+
"@vielzeug/ripple": "2.2.2"
|
|
98
98
|
},
|
|
99
99
|
"peerDependenciesMeta": {
|
|
100
100
|
"@vielzeug/courier": {
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@types/node": "^26.2.0",
|
|
115
|
-
"@vielzeug/courier": "2.2.
|
|
116
|
-
"@vielzeug/herald": "2.
|
|
117
|
-
"@vielzeug/pulse": "2.1
|
|
118
|
-
"@vielzeug/ripple": "2.2.
|
|
115
|
+
"@vielzeug/courier": "2.2.1",
|
|
116
|
+
"@vielzeug/herald": "2.1.0",
|
|
117
|
+
"@vielzeug/pulse": "2.2.1",
|
|
118
|
+
"@vielzeug/ripple": "2.2.2",
|
|
119
119
|
"typescript": "^6.0.3",
|
|
120
120
|
"vite": "^8.2.1",
|
|
121
121
|
"vitest": "^4.1.10"
|