cereb 0.1.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/browser/dom-event/dom-event.d.ts +3 -0
- package/dist/browser/dom-event/dom-event.d.ts.map +1 -0
- package/dist/browser/dom-event/index.d.ts +5 -0
- package/dist/browser/dom-event/index.d.ts.map +1 -0
- package/dist/browser/dom-event/mouse-events.d.ts +3 -0
- package/dist/browser/dom-event/mouse-events.d.ts.map +1 -0
- package/dist/browser/dom-event/pointer-events.d.ts +3 -0
- package/dist/browser/dom-event/pointer-events.d.ts.map +1 -0
- package/dist/browser/dom-event/touch-events.d.ts +3 -0
- package/dist/browser/dom-event/touch-events.d.ts.map +1 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/single-pointer/index.d.ts +5 -0
- package/dist/browser/single-pointer/index.d.ts.map +1 -0
- package/dist/browser/single-pointer/mouse-emitter.d.ts +15 -0
- package/dist/browser/single-pointer/mouse-emitter.d.ts.map +1 -0
- package/dist/browser/single-pointer/mouse.d.ts +4 -0
- package/dist/browser/single-pointer/mouse.d.ts.map +1 -0
- package/dist/browser/single-pointer/pointer-emitter.d.ts +19 -0
- package/dist/browser/single-pointer/pointer-emitter.d.ts.map +1 -0
- package/dist/browser/single-pointer/pointer.d.ts +4 -0
- package/dist/browser/single-pointer/pointer.d.ts.map +1 -0
- package/dist/browser/single-pointer/pool.d.ts +4 -0
- package/dist/browser/single-pointer/pool.d.ts.map +1 -0
- package/dist/browser/single-pointer/single-pointer.d.ts +22 -0
- package/dist/browser/single-pointer/single-pointer.d.ts.map +1 -0
- package/dist/browser/single-pointer/touch-emitter.d.ts +15 -0
- package/dist/browser/single-pointer/touch-emitter.d.ts.map +1 -0
- package/dist/browser/single-pointer/touch.d.ts +4 -0
- package/dist/browser/single-pointer/touch.d.ts.map +1 -0
- package/dist/browser/single-pointer/types.d.ts +5 -0
- package/dist/browser/single-pointer/types.d.ts.map +1 -0
- package/dist/factory/defer.d.ts +3 -0
- package/dist/factory/defer.d.ts.map +1 -0
- package/dist/factory/empty.d.ts +3 -0
- package/dist/factory/empty.d.ts.map +1 -0
- package/dist/factory/from-promise.d.ts +3 -0
- package/dist/factory/from-promise.d.ts.map +1 -0
- package/dist/factory/from.d.ts +3 -0
- package/dist/factory/from.d.ts.map +1 -0
- package/dist/factory/index.d.ts +10 -0
- package/dist/factory/index.d.ts.map +1 -0
- package/dist/factory/interval.d.ts +3 -0
- package/dist/factory/interval.d.ts.map +1 -0
- package/dist/factory/never.d.ts +3 -0
- package/dist/factory/never.d.ts.map +1 -0
- package/dist/factory/of.d.ts +3 -0
- package/dist/factory/of.d.ts.map +1 -0
- package/dist/factory/throw-error.d.ts +3 -0
- package/dist/factory/throw-error.d.ts.map +1 -0
- package/dist/factory/timer.d.ts +3 -0
- package/dist/factory/timer.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/object-pool.d.ts +15 -0
- package/dist/internal/object-pool.d.ts.map +1 -0
- package/dist/internal/subject.d.ts +17 -0
- package/dist/internal/subject.d.ts.map +1 -0
- package/dist/ochestrations/compose.d.ts +8 -0
- package/dist/ochestrations/compose.d.ts.map +1 -0
- package/dist/ochestrations/index.d.ts +3 -0
- package/dist/ochestrations/index.d.ts.map +1 -0
- package/dist/ochestrations/pipe.d.ts +12 -0
- package/dist/ochestrations/pipe.d.ts.map +1 -0
- package/dist/operators/buffer.d.ts +5 -0
- package/dist/operators/buffer.d.ts.map +1 -0
- package/dist/operators/combine.d.ts +8 -0
- package/dist/operators/combine.d.ts.map +1 -0
- package/dist/operators/debounce.d.ts +3 -0
- package/dist/operators/debounce.d.ts.map +1 -0
- package/dist/operators/distinct.d.ts +48 -0
- package/dist/operators/distinct.d.ts.map +1 -0
- package/dist/operators/filter.d.ts +3 -0
- package/dist/operators/filter.d.ts.map +1 -0
- package/dist/operators/index.d.ts +13 -0
- package/dist/operators/index.d.ts.map +1 -0
- package/dist/operators/map.d.ts +3 -0
- package/dist/operators/map.d.ts.map +1 -0
- package/dist/operators/merge.d.ts +4 -0
- package/dist/operators/merge.d.ts.map +1 -0
- package/dist/operators/share.d.ts +4 -0
- package/dist/operators/share.d.ts.map +1 -0
- package/dist/operators/skip.d.ts +5 -0
- package/dist/operators/skip.d.ts.map +1 -0
- package/dist/operators/spy.d.ts +29 -0
- package/dist/operators/spy.d.ts.map +1 -0
- package/dist/operators/take.d.ts +27 -0
- package/dist/operators/take.d.ts.map +1 -0
- package/dist/operators/throttle.d.ts +4 -0
- package/dist/operators/throttle.d.ts.map +1 -0
- package/dist/operators.cjs +2 -0
- package/dist/operators.cjs.map +1 -0
- package/dist/operators.d.ts +2 -0
- package/dist/operators.d.ts.map +1 -0
- package/dist/operators.js +444 -0
- package/dist/operators.js.map +1 -0
- package/dist/pointer-CX9qwBVm.cjs +2 -0
- package/dist/pointer-CX9qwBVm.cjs.map +1 -0
- package/dist/pointer-Cq2B2vwv.js +111 -0
- package/dist/pointer-Cq2B2vwv.js.map +1 -0
- package/dist/pool-CM9teIjt.js +42 -0
- package/dist/pool-CM9teIjt.js.map +1 -0
- package/dist/pool-Dr67Mz_1.cjs +2 -0
- package/dist/pool-Dr67Mz_1.cjs.map +1 -0
- package/dist/single-pointer/mouse.cjs +2 -0
- package/dist/single-pointer/mouse.cjs.map +1 -0
- package/dist/single-pointer/mouse.d.ts +2 -0
- package/dist/single-pointer/mouse.js +74 -0
- package/dist/single-pointer/mouse.js.map +1 -0
- package/dist/single-pointer/pointer.cjs +2 -0
- package/dist/single-pointer/pointer.cjs.map +1 -0
- package/dist/single-pointer/pointer.d.ts +2 -0
- package/dist/single-pointer/pointer.js +7 -0
- package/dist/single-pointer/pointer.js.map +1 -0
- package/dist/single-pointer/touch.cjs +2 -0
- package/dist/single-pointer/touch.cjs.map +1 -0
- package/dist/single-pointer/touch.d.ts +2 -0
- package/dist/single-pointer/touch.js +79 -0
- package/dist/single-pointer/touch.js.map +1 -0
- package/dist/stream/stream.d.ts +28 -0
- package/dist/stream/stream.d.ts.map +1 -0
- package/dist/stream-CDK0RZPi.js +33 -0
- package/dist/stream-CDK0RZPi.js.map +1 -0
- package/dist/stream-Cp6eCZs2.cjs +2 -0
- package/dist/stream-Cp6eCZs2.cjs.map +1 -0
- package/dist/types-Ccnqx90M.js +22 -0
- package/dist/types-Ccnqx90M.js.map +1 -0
- package/dist/types-DkXpfiI3.cjs +2 -0
- package/dist/types-DkXpfiI3.cjs.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { c as o, t as a } from "./stream-CDK0RZPi.js";
|
|
2
|
+
function h(l) {
|
|
3
|
+
return (r) => o((t) => {
|
|
4
|
+
let e = [];
|
|
5
|
+
return r.subscribe({
|
|
6
|
+
next(n) {
|
|
7
|
+
e.push(n), e.length >= l && (t.next(e), e = []);
|
|
8
|
+
},
|
|
9
|
+
error: t.error?.bind(t),
|
|
10
|
+
complete() {
|
|
11
|
+
e.length > 0 && t.next(e), t.complete?.();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function g(l) {
|
|
17
|
+
return (r) => o((t) => {
|
|
18
|
+
let e = [];
|
|
19
|
+
const n = setInterval(() => {
|
|
20
|
+
e.length > 0 && (t.next(e), e = []);
|
|
21
|
+
}, l), u = r.subscribe({
|
|
22
|
+
next(c) {
|
|
23
|
+
e.push(c);
|
|
24
|
+
},
|
|
25
|
+
error: t.error?.bind(t),
|
|
26
|
+
complete() {
|
|
27
|
+
clearInterval(n), e.length > 0 && t.next(e), t.complete?.();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return () => {
|
|
31
|
+
clearInterval(n), u();
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function k(l) {
|
|
36
|
+
return (r) => o((t) => {
|
|
37
|
+
let e = [];
|
|
38
|
+
const n = l.subscribe(() => {
|
|
39
|
+
e.length > 0 && (t.next(e), e = []);
|
|
40
|
+
}), u = r.subscribe({
|
|
41
|
+
next(c) {
|
|
42
|
+
e.push(c);
|
|
43
|
+
},
|
|
44
|
+
error: t.error?.bind(t),
|
|
45
|
+
complete() {
|
|
46
|
+
n(), e.length > 0 && t.next(e), t.complete?.();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return () => {
|
|
50
|
+
n(), u();
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function y(...l) {
|
|
55
|
+
return o((r) => {
|
|
56
|
+
const t = new Array(l.length), e = new Array(l.length).fill(!1);
|
|
57
|
+
let n = 0;
|
|
58
|
+
const u = l.map(
|
|
59
|
+
(c, i) => c.subscribe({
|
|
60
|
+
next(f) {
|
|
61
|
+
t[i] = f, e[i] = !0, e.every(Boolean) && r.next([...t]);
|
|
62
|
+
},
|
|
63
|
+
error: r.error?.bind(r),
|
|
64
|
+
complete() {
|
|
65
|
+
n++, n === l.length && r.complete?.();
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
return () => {
|
|
70
|
+
for (const c of u)
|
|
71
|
+
c();
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function U(...l) {
|
|
76
|
+
return o((r) => {
|
|
77
|
+
const t = new Array(l.length), e = new Array(l.length).fill(!1);
|
|
78
|
+
let n = 0;
|
|
79
|
+
const u = l.map(
|
|
80
|
+
(c, i) => c.subscribe({
|
|
81
|
+
next(f) {
|
|
82
|
+
t[i] = f, e[i] = !0;
|
|
83
|
+
},
|
|
84
|
+
error: r.error?.bind(r),
|
|
85
|
+
complete() {
|
|
86
|
+
n++, n === l.length && (e.every(Boolean) && r.next([...t]), r.complete?.());
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
return () => {
|
|
91
|
+
for (const c of u)
|
|
92
|
+
c();
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function T(l) {
|
|
97
|
+
return (r) => o((t) => {
|
|
98
|
+
let e = null;
|
|
99
|
+
const n = r.subscribe({
|
|
100
|
+
next(u) {
|
|
101
|
+
e !== null && clearTimeout(e), e = setTimeout(() => {
|
|
102
|
+
e = null, t.next(u);
|
|
103
|
+
}, l);
|
|
104
|
+
},
|
|
105
|
+
error: t.error?.bind(t),
|
|
106
|
+
complete() {
|
|
107
|
+
e !== null && clearTimeout(e), t.complete?.();
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return () => {
|
|
111
|
+
e !== null && clearTimeout(e), n();
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function w(l) {
|
|
116
|
+
const r = l ?? ((t, e) => t === e);
|
|
117
|
+
return (t) => o((e) => {
|
|
118
|
+
let n = !1, u;
|
|
119
|
+
return t.subscribe({
|
|
120
|
+
next(c) {
|
|
121
|
+
(!n || !r(u, c)) && (n = !0, u = c, e.next(c));
|
|
122
|
+
},
|
|
123
|
+
error: e.error?.bind(e),
|
|
124
|
+
complete: e.complete?.bind(e)
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function C(l, r) {
|
|
129
|
+
const t = r ?? ((e, n) => e === n);
|
|
130
|
+
return (e) => o((n) => {
|
|
131
|
+
let u = !1, c;
|
|
132
|
+
return e.subscribe({
|
|
133
|
+
next(i) {
|
|
134
|
+
const f = l(i);
|
|
135
|
+
(!u || !t(c, f)) && (u = !0, c = f, n.next(i));
|
|
136
|
+
},
|
|
137
|
+
error: n.error?.bind(n),
|
|
138
|
+
complete: n.complete?.bind(n)
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function I(l) {
|
|
143
|
+
return (r) => o((t) => r.subscribe({
|
|
144
|
+
next(e) {
|
|
145
|
+
try {
|
|
146
|
+
l(e) && t.next(e);
|
|
147
|
+
} catch (n) {
|
|
148
|
+
t.error?.(n);
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
error: t.error?.bind(t),
|
|
152
|
+
complete: t.complete?.bind(t)
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
function V(l) {
|
|
156
|
+
return (r) => o((t) => r.subscribe({
|
|
157
|
+
next(e) {
|
|
158
|
+
try {
|
|
159
|
+
t.next(l(e));
|
|
160
|
+
} catch (n) {
|
|
161
|
+
t.error?.(n);
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
error: t.error?.bind(t),
|
|
165
|
+
complete: t.complete?.bind(t)
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
function z(l) {
|
|
169
|
+
return (r) => o((t) => {
|
|
170
|
+
let e = 0;
|
|
171
|
+
const n = () => {
|
|
172
|
+
e++, e === 2 && t.complete?.();
|
|
173
|
+
}, u = r.subscribe({
|
|
174
|
+
next: (i) => t.next(i),
|
|
175
|
+
error: t.error?.bind(t),
|
|
176
|
+
complete: n
|
|
177
|
+
}), c = l.subscribe({
|
|
178
|
+
next: (i) => t.next(i),
|
|
179
|
+
error: t.error?.bind(t),
|
|
180
|
+
complete: n
|
|
181
|
+
});
|
|
182
|
+
return () => {
|
|
183
|
+
u(), c();
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function A(...l) {
|
|
188
|
+
return o((r) => {
|
|
189
|
+
let t = 0;
|
|
190
|
+
const e = l.map(
|
|
191
|
+
(n) => n.subscribe({
|
|
192
|
+
next: (u) => r.next(u),
|
|
193
|
+
error: r.error?.bind(r),
|
|
194
|
+
complete: () => {
|
|
195
|
+
t++, t === l.length && r.complete?.();
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
);
|
|
199
|
+
return () => {
|
|
200
|
+
for (const n of e)
|
|
201
|
+
n();
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function B() {
|
|
206
|
+
return (l) => {
|
|
207
|
+
const r = /* @__PURE__ */ new Set();
|
|
208
|
+
let t = null, e = !1;
|
|
209
|
+
return {
|
|
210
|
+
get isBlocked() {
|
|
211
|
+
return e;
|
|
212
|
+
},
|
|
213
|
+
block() {
|
|
214
|
+
e = !0;
|
|
215
|
+
},
|
|
216
|
+
unblock() {
|
|
217
|
+
e = !1;
|
|
218
|
+
},
|
|
219
|
+
subscribe(n) {
|
|
220
|
+
const u = a(n);
|
|
221
|
+
return r.add(u), r.size === 1 && (t = l.subscribe({
|
|
222
|
+
next(c) {
|
|
223
|
+
if (!e)
|
|
224
|
+
for (const i of r)
|
|
225
|
+
i.next(c);
|
|
226
|
+
},
|
|
227
|
+
error(c) {
|
|
228
|
+
for (const i of r)
|
|
229
|
+
i.error?.(c);
|
|
230
|
+
},
|
|
231
|
+
complete() {
|
|
232
|
+
for (const c of r)
|
|
233
|
+
c.complete?.();
|
|
234
|
+
r.clear(), t = null;
|
|
235
|
+
}
|
|
236
|
+
})), () => {
|
|
237
|
+
r.delete(u), r.size === 0 && t && (t(), t = null);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function L(l = 1) {
|
|
244
|
+
return (r) => {
|
|
245
|
+
const t = [], e = /* @__PURE__ */ new Set();
|
|
246
|
+
let n = null, u = !1, c = !1, i, f = !1;
|
|
247
|
+
return {
|
|
248
|
+
get isBlocked() {
|
|
249
|
+
return f;
|
|
250
|
+
},
|
|
251
|
+
block() {
|
|
252
|
+
f = !0;
|
|
253
|
+
},
|
|
254
|
+
unblock() {
|
|
255
|
+
f = !1;
|
|
256
|
+
},
|
|
257
|
+
subscribe(d) {
|
|
258
|
+
const p = a(d);
|
|
259
|
+
for (const s of t)
|
|
260
|
+
p.next(s);
|
|
261
|
+
return u ? (p.complete?.(), () => {
|
|
262
|
+
}) : c ? (p.error?.(i), () => {
|
|
263
|
+
}) : (e.add(p), e.size === 1 && !n && (n = r.subscribe({
|
|
264
|
+
next(s) {
|
|
265
|
+
if (t.push(s), t.length > l && t.shift(), !f)
|
|
266
|
+
for (const m of e)
|
|
267
|
+
m.next(s);
|
|
268
|
+
},
|
|
269
|
+
error(s) {
|
|
270
|
+
c = !0, i = s;
|
|
271
|
+
for (const m of e)
|
|
272
|
+
m.error?.(s);
|
|
273
|
+
e.clear(), n = null;
|
|
274
|
+
},
|
|
275
|
+
complete() {
|
|
276
|
+
u = !0;
|
|
277
|
+
for (const s of e)
|
|
278
|
+
s.complete?.();
|
|
279
|
+
e.clear(), n = null;
|
|
280
|
+
}
|
|
281
|
+
})), () => {
|
|
282
|
+
e.delete(p), e.size === 0 && n && !u && !c && (n(), n = null);
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
function W(l) {
|
|
289
|
+
return (r) => o((t) => {
|
|
290
|
+
let e = 0;
|
|
291
|
+
return r.subscribe({
|
|
292
|
+
next(n) {
|
|
293
|
+
e < l ? e++ : t.next(n);
|
|
294
|
+
},
|
|
295
|
+
error: t.error?.bind(t),
|
|
296
|
+
complete: t.complete?.bind(t)
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
function E(l) {
|
|
301
|
+
return (r) => o((t) => {
|
|
302
|
+
let e = !0;
|
|
303
|
+
return r.subscribe({
|
|
304
|
+
next(n) {
|
|
305
|
+
e && !l(n) && (e = !1), e || t.next(n);
|
|
306
|
+
},
|
|
307
|
+
error: t.error?.bind(t),
|
|
308
|
+
complete: t.complete?.bind(t)
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
function S(l) {
|
|
313
|
+
return (r) => o((t) => {
|
|
314
|
+
let e = !0;
|
|
315
|
+
const n = l.subscribe(() => {
|
|
316
|
+
e = !1, n();
|
|
317
|
+
}), u = r.subscribe({
|
|
318
|
+
next(c) {
|
|
319
|
+
e || t.next(c);
|
|
320
|
+
},
|
|
321
|
+
error: t.error?.bind(t),
|
|
322
|
+
complete: t.complete?.bind(t)
|
|
323
|
+
});
|
|
324
|
+
return () => {
|
|
325
|
+
n(), u();
|
|
326
|
+
};
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function x(l) {
|
|
330
|
+
return (r) => o((t) => r.subscribe({
|
|
331
|
+
next(e) {
|
|
332
|
+
try {
|
|
333
|
+
l(e), t.next(e);
|
|
334
|
+
} catch (n) {
|
|
335
|
+
t.error?.(n);
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
error: t.error?.bind(t),
|
|
339
|
+
complete: t.complete?.bind(t)
|
|
340
|
+
}));
|
|
341
|
+
}
|
|
342
|
+
const q = x;
|
|
343
|
+
function K(l) {
|
|
344
|
+
return (r) => o((t) => {
|
|
345
|
+
let e = 0, n;
|
|
346
|
+
return n = r.subscribe({
|
|
347
|
+
next(u) {
|
|
348
|
+
e < l && (e++, t.next(u), e >= l && (t.complete?.(), n?.()));
|
|
349
|
+
},
|
|
350
|
+
error: t.error?.bind(t),
|
|
351
|
+
complete: t.complete?.bind(t)
|
|
352
|
+
}), () => n?.();
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function J(l) {
|
|
356
|
+
return (r) => o((t) => {
|
|
357
|
+
let e;
|
|
358
|
+
return e = r.subscribe({
|
|
359
|
+
next(n) {
|
|
360
|
+
l(n) ? t.next(n) : (t.complete?.(), e?.());
|
|
361
|
+
},
|
|
362
|
+
error: t.error?.bind(t),
|
|
363
|
+
complete: t.complete?.bind(t)
|
|
364
|
+
}), () => e?.();
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function O(l) {
|
|
368
|
+
return (r) => o((t) => {
|
|
369
|
+
let e = !1;
|
|
370
|
+
const n = l.subscribe(() => {
|
|
371
|
+
e || (e = !0, t.complete?.(), c());
|
|
372
|
+
}), u = r.subscribe({
|
|
373
|
+
next(i) {
|
|
374
|
+
e || t.next(i);
|
|
375
|
+
},
|
|
376
|
+
error: t.error?.bind(t),
|
|
377
|
+
complete() {
|
|
378
|
+
e || (e = !0, t.complete?.());
|
|
379
|
+
}
|
|
380
|
+
}), c = () => {
|
|
381
|
+
n(), u();
|
|
382
|
+
};
|
|
383
|
+
return c;
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
function R(l) {
|
|
387
|
+
return (r) => o((t) => {
|
|
388
|
+
let e = null;
|
|
389
|
+
return r.subscribe({
|
|
390
|
+
next(n) {
|
|
391
|
+
const u = performance.now();
|
|
392
|
+
(e === null || u - e >= l) && (e = u, t.next(n));
|
|
393
|
+
},
|
|
394
|
+
error: t.error?.bind(t),
|
|
395
|
+
complete: t.complete?.bind(t)
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
function j(l) {
|
|
400
|
+
return (r) => o((t) => {
|
|
401
|
+
let e, n = !1, u = null;
|
|
402
|
+
const c = r.subscribe({
|
|
403
|
+
next(i) {
|
|
404
|
+
e = i, n = !0, u === null && (u = setTimeout(() => {
|
|
405
|
+
n && (t.next(e), n = !1), u = null;
|
|
406
|
+
}, l));
|
|
407
|
+
},
|
|
408
|
+
error: t.error?.bind(t),
|
|
409
|
+
complete() {
|
|
410
|
+
u !== null && (clearTimeout(u), n && t.next(e)), t.complete?.();
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
return () => {
|
|
414
|
+
u !== null && clearTimeout(u), c();
|
|
415
|
+
};
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
export {
|
|
419
|
+
h as buffer,
|
|
420
|
+
g as bufferTime,
|
|
421
|
+
k as bufferWhen,
|
|
422
|
+
y as combineLatest,
|
|
423
|
+
T as debounce,
|
|
424
|
+
w as distinctUntilChanged,
|
|
425
|
+
C as distinctUntilKeyChanged,
|
|
426
|
+
I as filter,
|
|
427
|
+
U as forkJoin,
|
|
428
|
+
V as map,
|
|
429
|
+
A as merge,
|
|
430
|
+
z as mergeWith,
|
|
431
|
+
B as share,
|
|
432
|
+
L as shareReplay,
|
|
433
|
+
W as skip,
|
|
434
|
+
S as skipUntil,
|
|
435
|
+
E as skipWhile,
|
|
436
|
+
x as spy,
|
|
437
|
+
K as take,
|
|
438
|
+
O as takeUntil,
|
|
439
|
+
J as takeWhile,
|
|
440
|
+
q as tap,
|
|
441
|
+
R as throttle,
|
|
442
|
+
j as throttleLast
|
|
443
|
+
};
|
|
444
|
+
//# sourceMappingURL=operators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.js","sources":["../src/operators/buffer.ts","../src/operators/combine.ts","../src/operators/debounce.ts","../src/operators/distinct.ts","../src/operators/filter.ts","../src/operators/map.ts","../src/operators/merge.ts","../src/operators/share.ts","../src/operators/skip.ts","../src/operators/spy.ts","../src/operators/take.ts","../src/operators/throttle.ts"],"sourcesContent":["import type { Operator, Stream } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function buffer<T>(count: number): Operator<T, T[]> {\n return (source) =>\n createStream((observer) => {\n let buffer: T[] = [];\n\n return source.subscribe({\n next(value) {\n buffer.push(value);\n if (buffer.length >= count) {\n observer.next(buffer);\n buffer = [];\n }\n },\n error: observer.error?.bind(observer),\n complete() {\n if (buffer.length > 0) {\n observer.next(buffer);\n }\n observer.complete?.();\n },\n });\n });\n}\n\nexport function bufferTime<T>(ms: number): Operator<T, T[]> {\n return (source) =>\n createStream((observer) => {\n let buffer: T[] = [];\n\n const intervalId = setInterval(() => {\n if (buffer.length > 0) {\n observer.next(buffer);\n buffer = [];\n }\n }, ms);\n\n const unsub = source.subscribe({\n next(value) {\n buffer.push(value);\n },\n error: observer.error?.bind(observer),\n complete() {\n clearInterval(intervalId);\n if (buffer.length > 0) {\n observer.next(buffer);\n }\n observer.complete?.();\n },\n });\n\n return () => {\n clearInterval(intervalId);\n unsub();\n };\n });\n}\n\nexport function bufferWhen<T>(notifier: Stream<unknown>): Operator<T, T[]> {\n return (source) =>\n createStream((observer) => {\n let buffer: T[] = [];\n\n const notifierUnsub = notifier.subscribe(() => {\n if (buffer.length > 0) {\n observer.next(buffer);\n buffer = [];\n }\n });\n\n const sourceUnsub = source.subscribe({\n next(value) {\n buffer.push(value);\n },\n error: observer.error?.bind(observer),\n complete() {\n notifierUnsub();\n if (buffer.length > 0) {\n observer.next(buffer);\n }\n observer.complete?.();\n },\n });\n\n return () => {\n notifierUnsub();\n sourceUnsub();\n };\n });\n}\n","import type { Stream } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function combineLatest<T extends unknown[]>(\n ...sources: { [K in keyof T]: Stream<T[K]> }\n): Stream<T> {\n return createStream((observer) => {\n const values: unknown[] = new Array(sources.length);\n const hasValue: boolean[] = new Array(sources.length).fill(false);\n let completedCount = 0;\n\n const unsubs = sources.map((source, i) =>\n source.subscribe({\n next(value) {\n values[i] = value;\n hasValue[i] = true;\n\n if (hasValue.every(Boolean)) {\n observer.next([...values] as T);\n }\n },\n error: observer.error?.bind(observer),\n complete() {\n completedCount++;\n if (completedCount === sources.length) {\n observer.complete?.();\n }\n },\n }),\n );\n\n return () => {\n for (const unsub of unsubs) {\n unsub();\n }\n };\n });\n}\n\nexport function forkJoin<T extends unknown[]>(\n ...sources: { [K in keyof T]: Stream<T[K]> }\n): Stream<T> {\n return createStream((observer) => {\n const values: unknown[] = new Array(sources.length);\n const hasValue: boolean[] = new Array(sources.length).fill(false);\n let completedCount = 0;\n\n const unsubs = sources.map((source, i) =>\n source.subscribe({\n next(value) {\n values[i] = value;\n hasValue[i] = true;\n },\n error: observer.error?.bind(observer),\n complete() {\n completedCount++;\n if (completedCount === sources.length) {\n if (hasValue.every(Boolean)) {\n observer.next([...values] as T);\n }\n observer.complete?.();\n }\n },\n }),\n );\n\n return () => {\n for (const unsub of unsubs) {\n unsub();\n }\n };\n });\n}\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function debounce<T>(ms: number): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n const unsub = source.subscribe({\n next(value) {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = null;\n observer.next(value);\n }, ms);\n },\n error: observer.error?.bind(observer),\n complete() {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n observer.complete?.();\n },\n });\n\n return () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n unsub();\n };\n });\n}\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\n/**\n * Emits values only when they differ from the previous emitted value.\n *\n * In event/gesture pipelines, this is useful when you only want to react to\n * meaningful changes (e.g. pointer coordinates changed, delta changed, a state transition happened).\n *\n * The default comparison is `===`. For objects/arrays, provide `compare` to avoid\n * treating freshly-created but equivalent values as \"changed\".\n *\n * @example\n * ```typescript\n * import { eventSource } from \"../../source/event-source-factory.js\";\n * import { pipe } from \"../pipe.js\";\n * import { map } from \"./map.js\";\n *\n * // Only emit when the pointer position actually changes\n * pipe(\n * eventSource<PointerEvent>(element, \"pointermove\"),\n * map((e) => ({ x: e.clientX, y: e.clientY })),\n * distinctUntilChanged((a, b) => a.x === b.x && a.y === b.y),\n * ).subscribe(({ x, y }) => {\n * // Called only when (x, y) changes\n * });\n * ```\n */\nexport function distinctUntilChanged<T>(compare?: (prev: T, curr: T) => boolean): Operator<T, T> {\n const isEqual = compare ?? ((a: T, b: T) => a === b);\n\n return (source) =>\n createStream((observer) => {\n let hasLast = false;\n let lastValue: T;\n\n return source.subscribe({\n next(value) {\n if (!hasLast || !isEqual(lastValue, value)) {\n hasLast = true;\n lastValue = value;\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n\n/**\n * Like `distinctUntilChanged`, but compares a derived key instead of the entire value.\n *\n * This is convenient for gesture events when reacting to state transitions,\n * such as changes in `phase`.\n *\n * @example\n * ```typescript\n * import { pipe } from \"../pipe.js\";\n *\n * // Emit only when the gesture phase changes (start/change/end/cancel)\n * pipe(\n * pan(element),\n * distinctUntilKeyChanged((e) => e.phase),\n * ).subscribe((e) => {\n * // Consecutive identical phases are skipped; only transitions arrive here\n * });\n * ```\n */\nexport function distinctUntilKeyChanged<T, K>(\n keySelector: (value: T) => K,\n compare?: (prev: K, curr: K) => boolean,\n): Operator<T, T> {\n const isEqual = compare ?? ((a: K, b: K) => a === b);\n\n return (source) =>\n createStream((observer) => {\n let hasLast = false;\n let lastKey: K;\n\n return source.subscribe({\n next(value) {\n const key = keySelector(value);\n if (!hasLast || !isEqual(lastKey, key)) {\n hasLast = true;\n lastKey = key;\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function filter<T>(predicate: (value: T) => boolean): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n return source.subscribe({\n next(value) {\n try {\n if (predicate(value)) {\n observer.next(value);\n }\n } catch (err) {\n observer.error?.(err);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function map<T, R>(transform: (value: T) => R): Operator<T, R> {\n return (source) =>\n createStream((observer) => {\n return source.subscribe({\n next(value) {\n try {\n observer.next(transform(value));\n } catch (err) {\n observer.error?.(err);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n","import type { Operator, Stream } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function mergeWith<T, R>(other: Stream<R>): Operator<T, T | R> {\n return (source) =>\n createStream((observer) => {\n let completedCount = 0;\n\n const checkComplete = () => {\n completedCount++;\n if (completedCount === 2) {\n observer.complete?.();\n }\n };\n\n const unsub1 = source.subscribe({\n next: (value) => observer.next(value),\n error: observer.error?.bind(observer),\n complete: checkComplete,\n });\n\n const unsub2 = other.subscribe({\n next: (value) => observer.next(value),\n error: observer.error?.bind(observer),\n complete: checkComplete,\n });\n\n return () => {\n unsub1();\n unsub2();\n };\n });\n}\n\nexport function merge<T>(...sources: Stream<T>[]): Stream<T> {\n return createStream((observer) => {\n let completedCount = 0;\n\n const unsubs = sources.map((source) =>\n source.subscribe({\n next: (value) => observer.next(value),\n error: observer.error?.bind(observer),\n complete: () => {\n completedCount++;\n if (completedCount === sources.length) {\n observer.complete?.();\n }\n },\n }),\n );\n\n return () => {\n for (const unsub of unsubs) {\n unsub();\n }\n };\n });\n}\n","import type { Observer, Operator, Stream, Unsubscribe } from \"../stream/stream.js\";\nimport { toObserver } from \"../stream/stream.js\";\n\nexport function share<T>(): Operator<T, T> {\n return (source): Stream<T> => {\n const observers = new Set<Observer<T>>();\n let sourceUnsub: Unsubscribe | null = null;\n let blocked = false;\n\n return {\n get isBlocked() {\n return blocked;\n },\n\n block() {\n blocked = true;\n },\n\n unblock() {\n blocked = false;\n },\n\n subscribe(observerOrNext) {\n const observer = toObserver(observerOrNext);\n observers.add(observer);\n\n if (observers.size === 1) {\n sourceUnsub = source.subscribe({\n next(value) {\n if (blocked) return;\n for (const obs of observers) {\n obs.next(value);\n }\n },\n error(err) {\n for (const obs of observers) {\n obs.error?.(err);\n }\n },\n complete() {\n for (const obs of observers) {\n obs.complete?.();\n }\n observers.clear();\n sourceUnsub = null;\n },\n });\n }\n\n return () => {\n observers.delete(observer);\n if (observers.size === 0 && sourceUnsub) {\n sourceUnsub();\n sourceUnsub = null;\n }\n };\n },\n };\n };\n}\n\nexport function shareReplay<T>(bufferSize = 1): Operator<T, T> {\n return (source): Stream<T> => {\n const buffer: T[] = [];\n const observers = new Set<Observer<T>>();\n let sourceUnsub: Unsubscribe | null = null;\n let completed = false;\n let hasError = false;\n let errorValue: unknown;\n let blocked = false;\n\n return {\n get isBlocked() {\n return blocked;\n },\n\n block() {\n blocked = true;\n },\n\n unblock() {\n blocked = false;\n },\n\n subscribe(observerOrNext) {\n const observer = toObserver(observerOrNext);\n\n for (const value of buffer) {\n observer.next(value);\n }\n\n if (completed) {\n observer.complete?.();\n return () => {};\n }\n if (hasError) {\n observer.error?.(errorValue);\n return () => {};\n }\n\n observers.add(observer);\n\n if (observers.size === 1 && !sourceUnsub) {\n sourceUnsub = source.subscribe({\n next(value) {\n buffer.push(value);\n if (buffer.length > bufferSize) {\n buffer.shift();\n }\n if (blocked) return;\n for (const obs of observers) {\n obs.next(value);\n }\n },\n error(err) {\n hasError = true;\n errorValue = err;\n for (const obs of observers) {\n obs.error?.(err);\n }\n observers.clear();\n sourceUnsub = null;\n },\n complete() {\n completed = true;\n for (const obs of observers) {\n obs.complete?.();\n }\n observers.clear();\n sourceUnsub = null;\n },\n });\n }\n\n return () => {\n observers.delete(observer);\n if (observers.size === 0 && sourceUnsub && !completed && !hasError) {\n sourceUnsub();\n sourceUnsub = null;\n }\n };\n },\n };\n };\n}\n","import type { Operator, Stream } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function skip<T>(count: number): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let skipped = 0;\n\n return source.subscribe({\n next(value) {\n if (skipped < count) {\n skipped++;\n } else {\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n\nexport function skipWhile<T>(predicate: (value: T) => boolean): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let skipping = true;\n\n return source.subscribe({\n next(value) {\n if (skipping && !predicate(value)) {\n skipping = false;\n }\n if (!skipping) {\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n\nexport function skipUntil<T>(notifier: Stream<unknown>): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let skipping = true;\n\n const notifierUnsub = notifier.subscribe(() => {\n skipping = false;\n notifierUnsub();\n });\n\n const sourceUnsub = source.subscribe({\n next(value) {\n if (!skipping) {\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n\n return () => {\n notifierUnsub();\n sourceUnsub();\n };\n });\n}\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\n/**\n * Operator that passes values through unchanged while running a side-effect.\n *\n * In event/gesture pipelines, this is commonly used for:\n * - Debug logging (coordinates, phases, state transitions)\n * - Tracing/metrics (timing, counters)\n * - Applying flags on events (e.g. calling `event.prevent()`), then filtering later (e.g. with `excludePrevented()`)\n *\n * If `fn` throws, the error is forwarded to the downstream `error` handler.\n *\n * @example\n * ```typescript\n * import { eventSource } from \"../../source/event-source-factory.js\";\n * import { pipe } from \"../pipe.js\";\n *\n * pipe(\n * eventSource<PointerEvent>(element, \"pointermove\"),\n * spy((e) => {\n * // Observe without modifying the stream values\n * console.log(e.clientX, e.clientY);\n * }),\n * ).subscribe();\n * ```\n */\nexport function spy<T>(fn: (value: T) => void): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n return source.subscribe({\n next(value) {\n try {\n fn(value);\n observer.next(value);\n } catch (err) {\n observer.error?.(err);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n\n/** Alias for spy - RxJS-compatible naming */\nexport const tap = spy;\n","import type { Operator, Stream } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\n/**\n * Operators for ending a subscription based on count, a predicate, or a notifier.\n *\n * This is intentionally about **subscription lifecycle** (\"when should this pipeline stop?\"),\n * not about destroying the underlying event source (which may be shared by other subscribers).\n *\n * Common event/gesture patterns:\n * - One-shot trigger: `take(1)`\n * - While a condition holds: `takeWhile(predicate)`\n * - Until an explicit end signal: `takeUntil(end$)` (e.g. move until up/cancel)\n */\nexport function take<T>(count: number): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let taken = 0;\n let unsub: (() => void) | undefined;\n\n unsub = source.subscribe({\n next(value) {\n if (taken < count) {\n taken++;\n observer.next(value);\n if (taken >= count) {\n observer.complete?.();\n unsub?.();\n }\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n\n return () => unsub?.();\n });\n}\n\n/**\n * Emits only the first `count` values, then completes and unsubscribes.\n * `take(1)` is especially useful for one-shot triggers.\n */\nexport function takeWhile<T>(predicate: (value: T) => boolean): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let unsub: (() => void) | undefined;\n\n unsub = source.subscribe({\n next(value) {\n if (predicate(value)) {\n observer.next(value);\n } else {\n observer.complete?.();\n unsub?.();\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n\n return () => unsub?.();\n });\n}\n\n/**\n * Emits values while `predicate(value)` is true, then completes and unsubscribes.\n */\nexport function takeUntil<T>(notifier: Stream<unknown>): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let completed = false;\n\n const notifierUnsub = notifier.subscribe(() => {\n if (!completed) {\n completed = true;\n observer.complete?.();\n cleanup();\n }\n });\n\n const sourceUnsub = source.subscribe({\n next(value) {\n if (!completed) {\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete() {\n if (!completed) {\n completed = true;\n observer.complete?.();\n }\n },\n });\n\n const cleanup = () => {\n notifierUnsub();\n sourceUnsub();\n };\n\n return cleanup;\n });\n}\n\n/**\n * Completes the source subscription when `notifier` emits, and unsubscribes from both.\n * This is the go-to shape for \"observe from start until end\" event flows.\n */\n","import type { Operator } from \"../stream/stream.js\";\nimport { createStream } from \"../stream/stream.js\";\n\nexport function throttle<T>(ms: number): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let lastTime: number | null = null;\n\n return source.subscribe({\n next(value) {\n const now = performance.now();\n if (lastTime === null || now - lastTime >= ms) {\n lastTime = now;\n observer.next(value);\n }\n },\n error: observer.error?.bind(observer),\n complete: observer.complete?.bind(observer),\n });\n });\n}\n\nexport function throttleLast<T>(ms: number): Operator<T, T> {\n return (source) =>\n createStream((observer) => {\n let lastValue: T | undefined;\n let hasValue = false;\n let timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n const unsub = source.subscribe({\n next(value) {\n lastValue = value;\n hasValue = true;\n\n if (timeoutId === null) {\n timeoutId = setTimeout(() => {\n if (hasValue) {\n observer.next(lastValue!);\n hasValue = false;\n }\n timeoutId = null;\n }, ms);\n }\n },\n error: observer.error?.bind(observer),\n complete() {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n if (hasValue) {\n observer.next(lastValue!);\n }\n }\n observer.complete?.();\n },\n });\n\n return () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n unsub();\n };\n });\n}\n"],"names":["buffer","count","source","createStream","observer","value","bufferTime","ms","intervalId","unsub","bufferWhen","notifier","notifierUnsub","sourceUnsub","combineLatest","sources","values","hasValue","completedCount","unsubs","forkJoin","debounce","timeoutId","distinctUntilChanged","compare","isEqual","a","b","hasLast","lastValue","distinctUntilKeyChanged","keySelector","lastKey","key","filter","predicate","err","map","transform","mergeWith","other","checkComplete","unsub1","unsub2","merge","share","observers","blocked","observerOrNext","toObserver","obs","shareReplay","bufferSize","completed","hasError","errorValue","skip","skipped","skipWhile","skipping","skipUntil","spy","fn","tap","take","taken","takeWhile","takeUntil","cleanup","throttle","lastTime","now","throttleLast"],"mappings":";AAGO,SAASA,EAAUC,GAAiC;AACzD,SAAO,CAACC,MACNC,EAAa,CAACC,MAAa;AACzB,QAAIJ,IAAc,CAAA;AAElB,WAAOE,EAAO,UAAU;AAAA,MACtB,KAAKG,GAAO;AACVL,QAAAA,EAAO,KAAKK,CAAK,GACbL,EAAO,UAAUC,MACnBG,EAAS,KAAKJ,CAAM,GACpBA,IAAS,CAAA;AAAA,MAEb;AAAA,MACA,OAAOI,EA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"),m=require("./types-DkXpfiI3.cjs"),d=["pointerdown","pointermove","pointerup","pointercancel"];function P(o,s){return f.createStream(i=>{const e=t=>{i.next(t)};for(const t of d)o.addEventListener(t,e,s);return()=>{for(const t of d)o.removeEventListener(t,e,s)}})}function g(o={}){const{deviceId:s,pooling:i=!1}=o;let e=null,t=s??"";function c(){return i?l.singlePointerPool.acquire():{phase:"move",x:0,y:0,pageX:0,pageY:0,pointerType:"unknown",button:"none",pressure:.5,timestamp:0,deviceId:""}}function u(){e&&i&&l.singlePointerPool.release(e),e=null}return{process(n){if(!n.isPrimary)return e;let p,a;switch(n.type){case"pointerdown":p="start",a=m.toPointerButton(n.button);break;case"pointerup":p="end",a=m.toPointerButton(n.button);break;case"pointercancel":p="cancel",a="none";break;default:p="move",a="none"}const r=c();return r.timestamp=performance.now(),r.deviceId=t||(t=`${n.pointerType}-${n.pointerId}`),r.phase=p,r.x=n.clientX,r.y=n.clientY,r.pageX=n.pageX,r.pageY=n.pageY,r.pointerType=h(n.pointerType),r.button=a,r.pressure=n.pressure,u(),e=r,r},get isActive(){return e!==null},reset(){u(),t=s??""},dispose(){this.reset()}}}function y(o={}){return s=>f.createStream(i=>{const e=g(o),t=s.subscribe({next(c){const u=e.process(c);u&&i.next(u)},error(c){i.error?.(c)},complete(){i.complete?.()}});return()=>{t(),e.dispose()}})}function b(o,s={}){const{listenerOptions:i,...e}=s,t=P(o,i);return y(e)(t)}function h(o){switch(o){case"mouse":return"mouse";case"touch":return"touch";case"pen":return"pen";default:return"unknown"}}exports.createPointerEmitter=g;exports.pointerEvents=P;exports.singlePointer=b;exports.toSinglePointer=y;
|
|
2
|
+
//# sourceMappingURL=pointer-CX9qwBVm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer-CX9qwBVm.cjs","sources":["../src/browser/dom-event/pointer-events.ts","../src/browser/single-pointer/pointer-emitter.ts"],"sourcesContent":["import { createStream, type Stream } from \"../../stream/stream.js\";\n\nconst POINTER_EVENTS = [\"pointerdown\", \"pointermove\", \"pointerup\", \"pointercancel\"] as const;\n\nexport function pointerEvents(\n target: EventTarget,\n options?: AddEventListenerOptions,\n): Stream<PointerEvent> {\n return createStream((observer) => {\n const handler = (event: Event) => {\n observer.next(event as PointerEvent);\n };\n\n for (const eventName of POINTER_EVENTS) {\n target.addEventListener(eventName, handler, options);\n }\n\n return () => {\n for (const eventName of POINTER_EVENTS) {\n target.removeEventListener(eventName, handler, options);\n }\n };\n });\n}\n","import type { Operator, Stream } from \"../../stream/stream.js\";\nimport { createStream } from \"../../stream/stream.js\";\nimport { pointerEvents } from \"../dom-event/pointer-events.js\";\nimport { singlePointerPool } from \"./pool.js\";\nimport type { SinglePointer } from \"./single-pointer.js\";\nimport type { PointerButton, PointerPhase, PointerType } from \"./types.js\";\nimport { toPointerButton } from \"./types.js\";\n\nexport interface PointerEmitterOptions {\n deviceId?: string;\n pooling?: boolean;\n}\n\nexport interface PointerEmitter {\n process(event: PointerEvent): SinglePointer | null;\n readonly isActive: boolean;\n reset(): void;\n dispose(): void;\n}\n\nexport function createPointerEmitter(options: PointerEmitterOptions = {}): PointerEmitter {\n const { deviceId: customDeviceId, pooling = false } = options;\n let current: SinglePointer | null = null;\n let resolvedDeviceId = customDeviceId ?? \"\";\n\n function acquirePointer(): SinglePointer {\n if (pooling) {\n return singlePointerPool.acquire();\n }\n return {\n phase: \"move\",\n x: 0,\n y: 0,\n pageX: 0,\n pageY: 0,\n pointerType: \"unknown\",\n button: \"none\",\n pressure: 0.5,\n timestamp: 0,\n deviceId: \"\",\n };\n }\n\n function releaseCurrentPointer(): void {\n if (current && pooling) {\n singlePointerPool.release(current);\n }\n current = null;\n }\n\n return {\n process(event: PointerEvent): SinglePointer | null {\n if (!event.isPrimary) {\n return current;\n }\n\n let phase: PointerPhase;\n let button: PointerButton;\n switch (event.type) {\n case \"pointerdown\":\n phase = \"start\";\n button = toPointerButton(event.button);\n break;\n case \"pointerup\":\n phase = \"end\";\n button = toPointerButton(event.button);\n break;\n case \"pointercancel\":\n phase = \"cancel\";\n button = \"none\";\n break;\n default:\n phase = \"move\";\n button = \"none\";\n }\n\n const pointer = acquirePointer();\n\n pointer.timestamp = performance.now();\n pointer.deviceId =\n resolvedDeviceId || (resolvedDeviceId = `${event.pointerType}-${event.pointerId}`);\n pointer.phase = phase;\n pointer.x = event.clientX;\n pointer.y = event.clientY;\n pointer.pageX = event.pageX;\n pointer.pageY = event.pageY;\n pointer.pointerType = normalizePointerType(event.pointerType);\n pointer.button = button;\n pointer.pressure = event.pressure;\n\n releaseCurrentPointer();\n current = pointer;\n return pointer;\n },\n\n get isActive(): boolean {\n return current !== null;\n },\n\n reset(): void {\n releaseCurrentPointer();\n resolvedDeviceId = customDeviceId ?? \"\";\n },\n\n dispose(): void {\n this.reset();\n },\n };\n}\n\nexport function toSinglePointer(\n options: PointerEmitterOptions = {},\n): Operator<PointerEvent, SinglePointer> {\n return (source) =>\n createStream((observer) => {\n const emitter = createPointerEmitter(options);\n\n const unsub = source.subscribe({\n next(event) {\n const pointer = emitter.process(event);\n if (pointer) {\n observer.next(pointer);\n }\n },\n error(err) {\n observer.error?.(err);\n },\n complete() {\n observer.complete?.();\n },\n });\n\n return () => {\n unsub();\n emitter.dispose();\n };\n });\n}\n\nexport interface SinglePointerOptions extends PointerEmitterOptions {\n listenerOptions?: AddEventListenerOptions;\n}\n\nexport function singlePointer(\n target: EventTarget,\n options: SinglePointerOptions = {},\n): Stream<SinglePointer> {\n const { listenerOptions, ...emitterOptions } = options;\n const source = pointerEvents(target, listenerOptions);\n return toSinglePointer(emitterOptions)(source);\n}\n\nfunction normalizePointerType(type: string): PointerType {\n switch (type) {\n case \"mouse\":\n return \"mouse\";\n case \"touch\":\n return \"touch\";\n case \"pen\":\n return \"pen\";\n default:\n return \"unknown\";\n }\n}\n"],"names":["POINTER_EVENTS","pointerEvents","target","options","createStream","observer","handler","event","eventName","createPointerEmitter","customDeviceId","pooling","current","resolvedDeviceId","acquirePointer","singlePointerPool","releaseCurrentPointer","phase","button","toPointerButton","pointer","normalizePointerType","toSinglePointer","source","emitter","unsub","err","singlePointer","listenerOptions","emitterOptions","type"],"mappings":"yHAEMA,EAAiB,CAAC,cAAe,cAAe,YAAa,eAAe,EAE3E,SAASC,EACdC,EACAC,EACsB,CACtB,OAAOC,EAAAA,aAAcC,GAAa,CAChC,MAAMC,EAAWC,GAAiB,CAChCF,EAAS,KAAKE,CAAqB,CACrC,EAEA,UAAWC,KAAaR,EACtBE,EAAO,iBAAiBM,EAAWF,EAASH,CAAO,EAGrD,MAAO,IAAM,CACX,UAAWK,KAAaR,EACtBE,EAAO,oBAAoBM,EAAWF,EAASH,CAAO,CAE1D,CACF,CAAC,CACH,CCHO,SAASM,EAAqBN,EAAiC,GAAoB,CACxF,KAAM,CAAE,SAAUO,EAAgB,QAAAC,EAAU,IAAUR,EACtD,IAAIS,EAAgC,KAChCC,EAAmBH,GAAkB,GAEzC,SAASI,GAAgC,CACvC,OAAIH,EACKI,EAAAA,kBAAkB,QAAA,EAEpB,CACL,MAAO,OACP,EAAG,EACH,EAAG,EACH,MAAO,EACP,MAAO,EACP,YAAa,UACb,OAAQ,OACR,SAAU,GACV,UAAW,EACX,SAAU,EAAA,CAEd,CAEA,SAASC,GAA8B,CACjCJ,GAAWD,GACbI,EAAAA,kBAAkB,QAAQH,CAAO,EAEnCA,EAAU,IACZ,CAEA,MAAO,CACL,QAAQL,EAA2C,CACjD,GAAI,CAACA,EAAM,UACT,OAAOK,EAGT,IAAIK,EACAC,EACJ,OAAQX,EAAM,KAAA,CACZ,IAAK,cACHU,EAAQ,QACRC,EAASC,EAAAA,gBAAgBZ,EAAM,MAAM,EACrC,MACF,IAAK,YACHU,EAAQ,MACRC,EAASC,EAAAA,gBAAgBZ,EAAM,MAAM,EACrC,MACF,IAAK,gBACHU,EAAQ,SACRC,EAAS,OACT,MACF,QACED,EAAQ,OACRC,EAAS,MAAA,CAGb,MAAME,EAAUN,EAAA,EAEhB,OAAAM,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|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { c as d } from "./stream-CDK0RZPi.js";
|
|
2
|
+
import { s as l } from "./pool-CM9teIjt.js";
|
|
3
|
+
import { t as m } from "./types-Ccnqx90M.js";
|
|
4
|
+
const f = ["pointerdown", "pointermove", "pointerup", "pointercancel"];
|
|
5
|
+
function P(o, s) {
|
|
6
|
+
return d((i) => {
|
|
7
|
+
const e = (t) => {
|
|
8
|
+
i.next(t);
|
|
9
|
+
};
|
|
10
|
+
for (const t of f)
|
|
11
|
+
o.addEventListener(t, e, s);
|
|
12
|
+
return () => {
|
|
13
|
+
for (const t of f)
|
|
14
|
+
o.removeEventListener(t, e, s);
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function g(o = {}) {
|
|
19
|
+
const { deviceId: s, pooling: i = !1 } = o;
|
|
20
|
+
let e = null, t = s ?? "";
|
|
21
|
+
function c() {
|
|
22
|
+
return i ? l.acquire() : {
|
|
23
|
+
phase: "move",
|
|
24
|
+
x: 0,
|
|
25
|
+
y: 0,
|
|
26
|
+
pageX: 0,
|
|
27
|
+
pageY: 0,
|
|
28
|
+
pointerType: "unknown",
|
|
29
|
+
button: "none",
|
|
30
|
+
pressure: 0.5,
|
|
31
|
+
timestamp: 0,
|
|
32
|
+
deviceId: ""
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function p() {
|
|
36
|
+
e && i && l.release(e), e = null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
process(n) {
|
|
40
|
+
if (!n.isPrimary)
|
|
41
|
+
return e;
|
|
42
|
+
let u, a;
|
|
43
|
+
switch (n.type) {
|
|
44
|
+
case "pointerdown":
|
|
45
|
+
u = "start", a = m(n.button);
|
|
46
|
+
break;
|
|
47
|
+
case "pointerup":
|
|
48
|
+
u = "end", a = m(n.button);
|
|
49
|
+
break;
|
|
50
|
+
case "pointercancel":
|
|
51
|
+
u = "cancel", a = "none";
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
u = "move", a = "none";
|
|
55
|
+
}
|
|
56
|
+
const r = c();
|
|
57
|
+
return r.timestamp = performance.now(), r.deviceId = t || (t = `${n.pointerType}-${n.pointerId}`), r.phase = u, r.x = n.clientX, r.y = n.clientY, r.pageX = n.pageX, r.pageY = n.pageY, r.pointerType = h(n.pointerType), r.button = a, r.pressure = n.pressure, p(), e = r, r;
|
|
58
|
+
},
|
|
59
|
+
get isActive() {
|
|
60
|
+
return e !== null;
|
|
61
|
+
},
|
|
62
|
+
reset() {
|
|
63
|
+
p(), t = s ?? "";
|
|
64
|
+
},
|
|
65
|
+
dispose() {
|
|
66
|
+
this.reset();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function b(o = {}) {
|
|
71
|
+
return (s) => d((i) => {
|
|
72
|
+
const e = g(o), t = s.subscribe({
|
|
73
|
+
next(c) {
|
|
74
|
+
const p = e.process(c);
|
|
75
|
+
p && i.next(p);
|
|
76
|
+
},
|
|
77
|
+
error(c) {
|
|
78
|
+
i.error?.(c);
|
|
79
|
+
},
|
|
80
|
+
complete() {
|
|
81
|
+
i.complete?.();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return () => {
|
|
85
|
+
t(), e.dispose();
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function I(o, s = {}) {
|
|
90
|
+
const { listenerOptions: i, ...e } = s, t = P(o, i);
|
|
91
|
+
return b(e)(t);
|
|
92
|
+
}
|
|
93
|
+
function h(o) {
|
|
94
|
+
switch (o) {
|
|
95
|
+
case "mouse":
|
|
96
|
+
return "mouse";
|
|
97
|
+
case "touch":
|
|
98
|
+
return "touch";
|
|
99
|
+
case "pen":
|
|
100
|
+
return "pen";
|
|
101
|
+
default:
|
|
102
|
+
return "unknown";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
g as c,
|
|
107
|
+
P as p,
|
|
108
|
+
I as s,
|
|
109
|
+
b as t
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=pointer-Cq2B2vwv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer-Cq2B2vwv.js","sources":["../src/browser/dom-event/pointer-events.ts","../src/browser/single-pointer/pointer-emitter.ts"],"sourcesContent":["import { createStream, type Stream } from \"../../stream/stream.js\";\n\nconst POINTER_EVENTS = [\"pointerdown\", \"pointermove\", \"pointerup\", \"pointercancel\"] as const;\n\nexport function pointerEvents(\n target: EventTarget,\n options?: AddEventListenerOptions,\n): Stream<PointerEvent> {\n return createStream((observer) => {\n const handler = (event: Event) => {\n observer.next(event as PointerEvent);\n };\n\n for (const eventName of POINTER_EVENTS) {\n target.addEventListener(eventName, handler, options);\n }\n\n return () => {\n for (const eventName of POINTER_EVENTS) {\n target.removeEventListener(eventName, handler, options);\n }\n };\n });\n}\n","import type { Operator, Stream } from \"../../stream/stream.js\";\nimport { createStream } from \"../../stream/stream.js\";\nimport { pointerEvents } from \"../dom-event/pointer-events.js\";\nimport { singlePointerPool } from \"./pool.js\";\nimport type { SinglePointer } from \"./single-pointer.js\";\nimport type { PointerButton, PointerPhase, PointerType } from \"./types.js\";\nimport { toPointerButton } from \"./types.js\";\n\nexport interface PointerEmitterOptions {\n deviceId?: string;\n pooling?: boolean;\n}\n\nexport interface PointerEmitter {\n process(event: PointerEvent): SinglePointer | null;\n readonly isActive: boolean;\n reset(): void;\n dispose(): void;\n}\n\nexport function createPointerEmitter(options: PointerEmitterOptions = {}): PointerEmitter {\n const { deviceId: customDeviceId, pooling = false } = options;\n let current: SinglePointer | null = null;\n let resolvedDeviceId = customDeviceId ?? \"\";\n\n function acquirePointer(): SinglePointer {\n if (pooling) {\n return singlePointerPool.acquire();\n }\n return {\n phase: \"move\",\n x: 0,\n y: 0,\n pageX: 0,\n pageY: 0,\n pointerType: \"unknown\",\n button: \"none\",\n pressure: 0.5,\n timestamp: 0,\n deviceId: \"\",\n };\n }\n\n function releaseCurrentPointer(): void {\n if (current && pooling) {\n singlePointerPool.release(current);\n }\n current = null;\n }\n\n return {\n process(event: PointerEvent): SinglePointer | null {\n if (!event.isPrimary) {\n return current;\n }\n\n let phase: PointerPhase;\n let button: PointerButton;\n switch (event.type) {\n case \"pointerdown\":\n phase = \"start\";\n button = toPointerButton(event.button);\n break;\n case \"pointerup\":\n phase = \"end\";\n button = toPointerButton(event.button);\n break;\n case \"pointercancel\":\n phase = \"cancel\";\n button = \"none\";\n break;\n default:\n phase = \"move\";\n button = \"none\";\n }\n\n const pointer = acquirePointer();\n\n pointer.timestamp = performance.now();\n pointer.deviceId =\n resolvedDeviceId || (resolvedDeviceId = `${event.pointerType}-${event.pointerId}`);\n pointer.phase = phase;\n pointer.x = event.clientX;\n pointer.y = event.clientY;\n pointer.pageX = event.pageX;\n pointer.pageY = event.pageY;\n pointer.pointerType = normalizePointerType(event.pointerType);\n pointer.button = button;\n pointer.pressure = event.pressure;\n\n releaseCurrentPointer();\n current = pointer;\n return pointer;\n },\n\n get isActive(): boolean {\n return current !== null;\n },\n\n reset(): void {\n releaseCurrentPointer();\n resolvedDeviceId = customDeviceId ?? \"\";\n },\n\n dispose(): void {\n this.reset();\n },\n };\n}\n\nexport function toSinglePointer(\n options: PointerEmitterOptions = {},\n): Operator<PointerEvent, SinglePointer> {\n return (source) =>\n createStream((observer) => {\n const emitter = createPointerEmitter(options);\n\n const unsub = source.subscribe({\n next(event) {\n const pointer = emitter.process(event);\n if (pointer) {\n observer.next(pointer);\n }\n },\n error(err) {\n observer.error?.(err);\n },\n complete() {\n observer.complete?.();\n },\n });\n\n return () => {\n unsub();\n emitter.dispose();\n };\n });\n}\n\nexport interface SinglePointerOptions extends PointerEmitterOptions {\n listenerOptions?: AddEventListenerOptions;\n}\n\nexport function singlePointer(\n target: EventTarget,\n options: SinglePointerOptions = {},\n): Stream<SinglePointer> {\n const { listenerOptions, ...emitterOptions } = options;\n const source = pointerEvents(target, listenerOptions);\n return toSinglePointer(emitterOptions)(source);\n}\n\nfunction normalizePointerType(type: string): PointerType {\n switch (type) {\n case \"mouse\":\n return \"mouse\";\n case \"touch\":\n return \"touch\";\n case \"pen\":\n return \"pen\";\n default:\n return \"unknown\";\n }\n}\n"],"names":["POINTER_EVENTS","pointerEvents","target","options","createStream","observer","handler","event","eventName","createPointerEmitter","customDeviceId","pooling","current","resolvedDeviceId","acquirePointer","singlePointerPool","releaseCurrentPointer","phase","button","toPointerButton","pointer","normalizePointerType","toSinglePointer","source","emitter","unsub","err","singlePointer","listenerOptions","emitterOptions","type"],"mappings":";;;AAEA,MAAMA,IAAiB,CAAC,eAAe,eAAe,aAAa,eAAe;AAE3E,SAASC,EACdC,GACAC,GACsB;AACtB,SAAOC,EAAa,CAACC,MAAa;AAChC,UAAMC,IAAU,CAACC,MAAiB;AAChC,MAAAF,EAAS,KAAKE,CAAqB;AAAA,IACrC;AAEA,eAAWC,KAAaR;AACtB,MAAAE,EAAO,iBAAiBM,GAAWF,GAASH,CAAO;AAGrD,WAAO,MAAM;AACX,iBAAWK,KAAaR;AACtB,QAAAE,EAAO,oBAAoBM,GAAWF,GAASH,CAAO;AAAA,IAE1D;AAAA,EACF,CAAC;AACH;ACHO,SAASM,EAAqBN,IAAiC,IAAoB;AACxF,QAAM,EAAE,UAAUO,GAAgB,SAAAC,IAAU,OAAUR;AACtD,MAAIS,IAAgC,MAChCC,IAAmBH,KAAkB;AAEzC,WAASI,IAAgC;AACvC,WAAIH,IACKI,EAAkB,QAAA,IAEpB;AAAA,MACL,OAAO;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,MACH,OAAO;AAAA,MACP,OAAO;AAAA,MACP,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,IAAA;AAAA,EAEd;AAEA,WAASC,IAA8B;AACrC,IAAIJ,KAAWD,KACbI,EAAkB,QAAQH,CAAO,GAEnCA,IAAU;AAAA,E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