@thi.ng/rstream 8.2.20 → 8.2.22
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/CHANGELOG.md +1 -1
- package/README.md +8 -3
- package/api.d.ts +1 -1
- package/event.d.ts +1 -2
- package/forkjoin.d.ts +1 -2
- package/package.json +10 -10
- package/promises.d.ts +0 -1
- package/pubsub.d.ts +4 -4
- package/pubsub.js +2 -2
- package/sidechain-partition.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|

|
|
8
8
|
[](https://mastodon.thi.ng/@toxi)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> This is one of 189 standalone projects, maintained as part
|
|
12
|
+
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
13
|
+
> and anti-framework.
|
|
14
|
+
>
|
|
15
|
+
> 🚀 Help me to work full-time on these projects by [sponsoring me on
|
|
16
|
+
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
13
17
|
|
|
14
18
|
- [About](#about)
|
|
15
19
|
- [Conceptual differences to RxJS](#conceptual-differences-to-rxjs)
|
|
@@ -223,6 +227,7 @@ directory are using this package:
|
|
|
223
227
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/adaptive-threshold.png" width="240"/> | Interactive image processing (adaptive threshold) | [Demo](https://demo.thi.ng/umbrella/adaptive-threshold/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/adaptive-threshold) |
|
|
224
228
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/big-font.png" width="240"/> | Large ASCII font text generator using @thi.ng/rdom | [Demo](https://demo.thi.ng/umbrella/big-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/big-font) |
|
|
225
229
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/bitmap-font.gif" width="240"/> | Figlet-style bitmap font creation with transducers | [Demo](https://demo.thi.ng/umbrella/bitmap-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/bitmap-font) |
|
|
230
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/blurhash.jpg" width="240"/> | Interactive & reactive image blurhash generator | [Demo](https://demo.thi.ng/umbrella/blurhash/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/blurhash) |
|
|
226
231
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-dial.png" width="240"/> | Canvas based dial widget | [Demo](https://demo.thi.ng/umbrella/canvas-dial/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-dial) |
|
|
227
232
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-recorder.png" width="240"/> | Self-modifying, animated typographic grid with emergent complex patterns | [Demo](https://demo.thi.ng/umbrella/canvas-recorder/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-recorder) |
|
|
228
233
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
|
package/api.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export interface ISubscribable<A> extends IDeref<A | undefined>, IID<string> {
|
|
|
146
146
|
* Wraps given partial `sub` in a {@link Subscription} and attaches it as
|
|
147
147
|
* child subscription. If `opts` defines a transducer (via `xform` key),
|
|
148
148
|
* input values will be transformed first before reaching the child sub's
|
|
149
|
-
* {@link
|
|
149
|
+
* {@link ISubscriber.next} handler. Any further downstream subscriptions
|
|
150
150
|
* attached to the returned wrapped sub will also only receive those
|
|
151
151
|
* transformed values.
|
|
152
152
|
*
|
package/event.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommonOpts } from "./api.js";
|
|
2
2
|
import { Stream } from "./stream.js";
|
|
3
|
-
interface EventOpts<T extends Event = Event> extends CommonOpts {
|
|
3
|
+
export interface EventOpts<T extends Event = Event> extends CommonOpts {
|
|
4
4
|
/**
|
|
5
5
|
* If given, the event stream will be seeded with this (presumably
|
|
6
6
|
* compatible event-like) value.
|
|
@@ -38,5 +38,4 @@ export declare const fromEvent: (src: EventTarget, name: string, listenerOpts?:
|
|
|
38
38
|
* @param streamOpts -
|
|
39
39
|
*/
|
|
40
40
|
export declare const fromDOMEvent: <K extends keyof GlobalEventHandlersEventMap>(src: EventTarget, name: K, listenerOpts?: boolean | AddEventListenerOptions, streamOpts?: Partial<EventOpts<GlobalEventHandlersEventMap[K]>> | undefined) => Stream<GlobalEventHandlersEventMap[K]>;
|
|
41
|
-
export {};
|
|
42
41
|
//# sourceMappingURL=event.d.ts.map
|
package/forkjoin.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export interface ForkJoinOpts<IN, MSG, RES, OUT> extends Partial<CommonOpts> {
|
|
|
103
103
|
* @param opts -
|
|
104
104
|
*/
|
|
105
105
|
export declare const forkJoin: <IN, MSG, RES, OUT>(opts: ForkJoinOpts<IN, MSG, RES, OUT>) => Subscription<any, OUT>;
|
|
106
|
-
type Sliceable<T> = ArrayLike<T> & {
|
|
106
|
+
export type Sliceable<T> = ArrayLike<T> & {
|
|
107
107
|
slice(a: number, b?: number): Sliceable<T>;
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
@@ -166,5 +166,4 @@ export declare const forkBuffer: (minChunkSize?: number) => <T extends Sliceable
|
|
|
166
166
|
* @param fn -
|
|
167
167
|
*/
|
|
168
168
|
export declare const joinBuffer: <A, B>(fn?: Fn<A, ArrayLikeIterable<B>> | undefined) => (parts: A[]) => B[];
|
|
169
|
-
export {};
|
|
170
169
|
//# sourceMappingURL=forkjoin.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.22",
|
|
4
4
|
"description": "Reactive streams & subscription primitives for constructing dataflow graphs / pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"test": "bun test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.9.
|
|
43
|
-
"@thi.ng/arrays": "^2.7.
|
|
44
|
-
"@thi.ng/associative": "^6.3.
|
|
45
|
-
"@thi.ng/atom": "^5.2.
|
|
46
|
-
"@thi.ng/checks": "^3.4.
|
|
47
|
-
"@thi.ng/errors": "^2.4.
|
|
48
|
-
"@thi.ng/logger": "^2.1.
|
|
49
|
-
"@thi.ng/transducers": "^8.8.
|
|
42
|
+
"@thi.ng/api": "^8.9.19",
|
|
43
|
+
"@thi.ng/arrays": "^2.7.16",
|
|
44
|
+
"@thi.ng/associative": "^6.3.32",
|
|
45
|
+
"@thi.ng/atom": "^5.2.25",
|
|
46
|
+
"@thi.ng/checks": "^3.4.19",
|
|
47
|
+
"@thi.ng/errors": "^2.4.12",
|
|
48
|
+
"@thi.ng/logger": "^2.1.5",
|
|
49
|
+
"@thi.ng/transducers": "^8.8.23"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@microsoft/api-extractor": "^7.39.0",
|
|
@@ -214,5 +214,5 @@
|
|
|
214
214
|
],
|
|
215
215
|
"year": 2017
|
|
216
216
|
},
|
|
217
|
-
"gitHead": "
|
|
217
|
+
"gitHead": "20909ffc46f23f61ec7647e8d27ed17752ce9828\n"
|
|
218
218
|
}
|
package/promises.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import type { ISubscription, WithErrorHandlerOpts } from "./api.js";
|
|
|
7
7
|
* If any of the promises rejects, all others will do so too. In this case the
|
|
8
8
|
* stream calls {@link ISubscriber.error} in all of its subscribers.
|
|
9
9
|
*
|
|
10
|
-
* @remarks
|
|
11
10
|
* Type signature updated to use `Awaited<T>`, a new core type introduced in
|
|
12
11
|
* TypeScript 4.5.
|
|
13
12
|
*
|
package/pubsub.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ export interface PubSubOpts<A, B, T> {
|
|
|
43
43
|
* receive the transformed inputs.
|
|
44
44
|
*
|
|
45
45
|
* {@link PubSub} supports dynamic topic subscriptions and unsubscriptions via
|
|
46
|
-
* {@link PubSub.
|
|
47
|
-
*
|
|
46
|
+
* {@link PubSub.subscribeTopic} and {@link PubSub.unsubscribeTopic}. However,
|
|
47
|
+
* the standard {@link ISubscribable.subscribe} /
|
|
48
48
|
* {@link ISubscribable.unsubscribe} methods are NOT supported (since
|
|
49
49
|
* meaningless) and will throw an error! `unsubscribe()` can only be called
|
|
50
50
|
* WITHOUT argument to unsubscribe the entire `PubSub` instance (incl. all topic
|
|
@@ -61,11 +61,11 @@ export declare class PubSub<A, B = A, T = any> extends Subscription<A, B> {
|
|
|
61
61
|
topics: EquivMap<T, Subscription<B, B>>;
|
|
62
62
|
constructor(opts: PubSubOpts<A, B, T>);
|
|
63
63
|
/**
|
|
64
|
-
* Unsupported. Use {@link PubSub.
|
|
64
|
+
* Unsupported. Use {@link PubSub.subscribeTopic} instead.
|
|
65
65
|
*/
|
|
66
66
|
subscribe(): Subscription<B, any>;
|
|
67
67
|
/**
|
|
68
|
-
* Unsupported. Use {@link PubSub.
|
|
68
|
+
* Unsupported. Use {@link PubSub.subscribeTopic} instead.
|
|
69
69
|
*/
|
|
70
70
|
transform(): Subscription<B, any>;
|
|
71
71
|
subscribeTopic<C>(topicID: T, opts?: Partial<TransformableOpts<B, C>>): ISubscription<B, C>;
|
package/pubsub.js
CHANGED
|
@@ -23,13 +23,13 @@ class PubSub extends Subscription {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Unsupported. Use {@link PubSub.
|
|
26
|
+
* Unsupported. Use {@link PubSub.subscribeTopic} instead.
|
|
27
27
|
*/
|
|
28
28
|
subscribe() {
|
|
29
29
|
return unsupported(`use subscribeTopic() instead`);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Unsupported. Use {@link PubSub.
|
|
32
|
+
* Unsupported. Use {@link PubSub.subscribeTopic} instead.
|
|
33
33
|
*/
|
|
34
34
|
transform() {
|
|
35
35
|
return unsupported(`use subscribeTopic() instead`);
|
package/sidechain-partition.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface SidechainPartitionOpts<T> extends CommonOpts {
|
|
|
17
17
|
* Also see: {@link sidechainToggle}, {@link sidechainTrigger}, {@link syncRAF}.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
|
-
* ```
|
|
20
|
+
* ```ts
|
|
21
21
|
* // merge various event streams
|
|
22
22
|
* events = merge([
|
|
23
23
|
* fromEvent(document,"mousemove"),
|