silentium 0.0.121 → 0.0.122
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 +9 -0
- package/check-reexports.mjs +0 -3
- package/dist/silentium.cjs +162 -159
- package/dist/silentium.cjs.map +1 -1
- package/dist/silentium.d.ts +128 -115
- package/dist/silentium.js +162 -160
- package/dist/silentium.js.map +1 -1
- package/dist/silentium.min.js +1 -1
- package/dist/silentium.min.mjs +1 -1
- package/dist/silentium.min.mjs.map +1 -1
- package/dist/silentium.mjs +162 -160
- package/dist/silentium.mjs.map +1 -1
- package/eslint.config.mjs +4 -1
- package/package.json +2 -1
- package/rollup.config.js +39 -5
- package/src/base/Component.test.ts +6 -4
- package/src/base/Component.ts +2 -6
- package/src/base/ComponentClass.test.ts +7 -9
- package/src/base/ComponentClass.ts +2 -6
- package/src/base/DestroyContainer.test.ts +3 -3
- package/src/base/DestroyContainer.ts +1 -1
- package/src/base/Event.ts +3 -2
- package/src/base/Local.test.ts +3 -3
- package/src/base/Local.ts +4 -3
- package/src/base/Of.ts +2 -1
- package/src/base/Transport.ts +3 -2
- package/src/base/Void.ts +1 -1
- package/src/components/All.test.ts +3 -3
- package/src/components/All.ts +4 -3
- package/src/components/Any.test.ts +4 -4
- package/src/components/Any.ts +3 -2
- package/src/components/Applied.test.ts +3 -2
- package/src/components/Applied.ts +5 -3
- package/src/components/Catch.test.ts +4 -2
- package/src/components/Catch.ts +3 -2
- package/src/components/Chain.test.ts +3 -3
- package/src/components/Chain.ts +3 -3
- package/src/components/ExecutorApplied.test.ts +4 -4
- package/src/components/ExecutorApplied.ts +4 -3
- package/src/components/Filtered.test.ts +3 -2
- package/src/components/Filtered.ts +4 -2
- package/src/components/FromEvent.test.ts +3 -2
- package/src/components/FromEvent.ts +4 -4
- package/src/components/FromPromise.test.ts +4 -4
- package/src/components/FromPromise.ts +2 -1
- package/src/components/Late.test.ts +2 -2
- package/src/components/Late.ts +3 -2
- package/src/components/LateShared.test.ts +2 -2
- package/src/components/LateShared.ts +5 -4
- package/src/components/Map.test.ts +9 -5
- package/src/components/Map.ts +6 -4
- package/src/components/Once.test.ts +3 -3
- package/src/components/Once.ts +3 -2
- package/src/components/Primitive.test.ts +4 -4
- package/src/components/Primitive.ts +2 -2
- package/src/components/Sequence.test.ts +4 -4
- package/src/components/Sequence.ts +3 -2
- package/src/components/Shared.test.ts +4 -4
- package/src/components/Shared.ts +8 -5
- package/src/components/SharedSource.test.ts +5 -5
- package/src/components/SharedSource.ts +3 -2
- package/src/components/Stream.test.ts +4 -4
- package/src/components/Stream.ts +3 -2
- package/src/components/TransportApplied.test.ts +5 -4
- package/src/components/TransportApplied.ts +3 -1
- package/src/components/TransportArgs.test.ts +3 -2
- package/src/components/TransportArgs.ts +2 -1
- package/src/components/TransportDestroyable.test.ts +3 -2
- package/src/components/TransportDestroyable.ts +3 -2
- package/src/helpers/OwnerPool.ts +2 -2
- package/src/helpers/ensures.ts +1 -1
- package/src/helpers/guards.ts +2 -1
- package/src/helpers/isFilled.test.ts +1 -1
- package/src/index.ts +37 -4
- package/src/testing/Diagram.ts +2 -2
- package/src/types/EventType.ts +1 -1
- package/src/types/RPCType.ts +16 -0
- package/src/types/SourceType.ts +2 -2
- package/tsconfig.json +7 -0
- package/vitest.config.js +13 -0
- package/src/base/index.ts +0 -8
- package/src/components/index.ts +0 -21
- package/src/helpers/index.ts +0 -3
- package/src/testing/index.ts +0 -2
- package/src/types/index.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.122](https://github.com/silentium-lab/silentium/compare/v0.0.121...v0.0.122) (2025-11-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **main:** circular deps fix ([bbe0620](https://github.com/silentium-lab/silentium/commit/bbe0620b8b26ffecb2548d55f65f810acf197e21))
|
|
11
|
+
* **main:** exports aliases ([f636127](https://github.com/silentium-lab/silentium/commit/f63612726b3dbb4034f9c84bfbf5cdcb8ad3ae4d))
|
|
12
|
+
* **main:** test fixes ([58544d5](https://github.com/silentium-lab/silentium/commit/58544d5b0848bc0b8d2116156de26aa9208b55da))
|
|
13
|
+
|
|
5
14
|
### [0.0.121](https://github.com/silentium-lab/silentium/compare/v0.0.120...v0.0.121) (2025-11-02)
|
|
6
15
|
|
|
7
16
|
|
package/check-reexports.mjs
CHANGED
package/dist/silentium.cjs
CHANGED
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const isFilled = (value) => {
|
|
4
|
-
return value !== void 0 && value !== null;
|
|
5
|
-
};
|
|
6
|
-
function isEvent(o) {
|
|
7
|
-
return o !== null && typeof o === "object" && "event" in o && typeof o.event === "function";
|
|
8
|
-
}
|
|
9
|
-
function isDestroyable(o) {
|
|
10
|
-
return o !== null && typeof o === "object" && "destroy" in o && typeof o.destroy === "function";
|
|
11
|
-
}
|
|
12
|
-
function isTransport(o) {
|
|
13
|
-
return o !== null && typeof o === "object" && "use" in o && typeof o.use === "function";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function ensureFunction(v, label) {
|
|
17
|
-
if (typeof v !== "function") {
|
|
18
|
-
throw new Error(`${label}: is not function`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function ensureEvent(v, label) {
|
|
22
|
-
if (!isEvent(v)) {
|
|
23
|
-
throw new Error(`${label}: is not event`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function ensureTransport(v, label) {
|
|
27
|
-
if (!isTransport(v)) {
|
|
28
|
-
throw new Error(`${label}: is not transport`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
3
|
function Component(executor) {
|
|
33
4
|
return (...args) => {
|
|
34
5
|
let destructor;
|
|
@@ -71,6 +42,35 @@ class DestroyContainerImpl {
|
|
|
71
42
|
}
|
|
72
43
|
}
|
|
73
44
|
|
|
45
|
+
const isFilled = (value) => {
|
|
46
|
+
return value !== void 0 && value !== null;
|
|
47
|
+
};
|
|
48
|
+
function isEvent(o) {
|
|
49
|
+
return o !== null && typeof o === "object" && "event" in o && typeof o.event === "function";
|
|
50
|
+
}
|
|
51
|
+
function isDestroyable(o) {
|
|
52
|
+
return o !== null && typeof o === "object" && "destroy" in o && typeof o.destroy === "function";
|
|
53
|
+
}
|
|
54
|
+
function isTransport(o) {
|
|
55
|
+
return o !== null && typeof o === "object" && "use" in o && typeof o.use === "function";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function ensureFunction(v, label) {
|
|
59
|
+
if (typeof v !== "function") {
|
|
60
|
+
throw new Error(`${label}: is not function`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function ensureEvent(v, label) {
|
|
64
|
+
if (!isEvent(v)) {
|
|
65
|
+
throw new Error(`${label}: is not event`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function ensureTransport(v, label) {
|
|
69
|
+
if (!isTransport(v)) {
|
|
70
|
+
throw new Error(`${label}: is not transport`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
74
|
var __defProp$i = Object.defineProperty;
|
|
75
75
|
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
76
76
|
var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
|
|
@@ -95,93 +95,6 @@ class EventImpl {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
var __defProp$h = Object.defineProperty;
|
|
99
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
100
|
-
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
101
|
-
function Local($base) {
|
|
102
|
-
return new LocalEvent($base);
|
|
103
|
-
}
|
|
104
|
-
class LocalEvent {
|
|
105
|
-
constructor($base) {
|
|
106
|
-
this.$base = $base;
|
|
107
|
-
__publicField$h(this, "destroyed", false);
|
|
108
|
-
__publicField$h(this, "transport", TransportParent(function(v, child) {
|
|
109
|
-
if (!child.destroyed) {
|
|
110
|
-
this.use(v);
|
|
111
|
-
}
|
|
112
|
-
}, this));
|
|
113
|
-
ensureEvent($base, "Local: $base");
|
|
114
|
-
}
|
|
115
|
-
event(transport) {
|
|
116
|
-
this.$base.event(this.transport.child(transport));
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
destroy() {
|
|
120
|
-
return this;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function Of(value) {
|
|
125
|
-
return new OfEvent(value);
|
|
126
|
-
}
|
|
127
|
-
class OfEvent {
|
|
128
|
-
constructor(value) {
|
|
129
|
-
this.value = value;
|
|
130
|
-
}
|
|
131
|
-
event(transport) {
|
|
132
|
-
transport.use(this.value);
|
|
133
|
-
return this;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function Void() {
|
|
138
|
-
return new VoidImpl();
|
|
139
|
-
}
|
|
140
|
-
class VoidImpl {
|
|
141
|
-
use() {
|
|
142
|
-
return this;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
var __defProp$g = Object.defineProperty;
|
|
147
|
-
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
148
|
-
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
149
|
-
class OwnerPool {
|
|
150
|
-
constructor() {
|
|
151
|
-
__publicField$g(this, "owners");
|
|
152
|
-
__publicField$g(this, "innerOwner");
|
|
153
|
-
this.owners = /* @__PURE__ */ new Set();
|
|
154
|
-
this.innerOwner = Transport((v) => {
|
|
155
|
-
this.owners.forEach((g) => {
|
|
156
|
-
g.use(v);
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
owner() {
|
|
161
|
-
return this.innerOwner;
|
|
162
|
-
}
|
|
163
|
-
size() {
|
|
164
|
-
return this.owners.size;
|
|
165
|
-
}
|
|
166
|
-
has(owner) {
|
|
167
|
-
return this.owners.has(owner);
|
|
168
|
-
}
|
|
169
|
-
add(owner) {
|
|
170
|
-
this.owners.add(owner);
|
|
171
|
-
return this;
|
|
172
|
-
}
|
|
173
|
-
remove(g) {
|
|
174
|
-
this.owners.delete(g);
|
|
175
|
-
return this;
|
|
176
|
-
}
|
|
177
|
-
destroy() {
|
|
178
|
-
this.owners.forEach((g) => {
|
|
179
|
-
this.remove(g);
|
|
180
|
-
});
|
|
181
|
-
return this;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
98
|
function Transport(transportExecutor) {
|
|
186
99
|
return new TransportImpl(transportExecutor);
|
|
187
100
|
}
|
|
@@ -233,9 +146,57 @@ class TransportParentImpl {
|
|
|
233
146
|
}
|
|
234
147
|
}
|
|
235
148
|
|
|
236
|
-
var __defProp$
|
|
237
|
-
var __defNormalProp$
|
|
238
|
-
var __publicField$
|
|
149
|
+
var __defProp$h = Object.defineProperty;
|
|
150
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
151
|
+
var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
152
|
+
function Local($base) {
|
|
153
|
+
return new LocalEvent($base);
|
|
154
|
+
}
|
|
155
|
+
class LocalEvent {
|
|
156
|
+
constructor($base) {
|
|
157
|
+
this.$base = $base;
|
|
158
|
+
__publicField$h(this, "destroyed", false);
|
|
159
|
+
__publicField$h(this, "transport", TransportParent(function(v, child) {
|
|
160
|
+
if (!child.destroyed) {
|
|
161
|
+
this.use(v);
|
|
162
|
+
}
|
|
163
|
+
}, this));
|
|
164
|
+
ensureEvent($base, "Local: $base");
|
|
165
|
+
}
|
|
166
|
+
event(transport) {
|
|
167
|
+
this.$base.event(this.transport.child(transport));
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
destroy() {
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function Of(value) {
|
|
176
|
+
return new OfEvent(value);
|
|
177
|
+
}
|
|
178
|
+
class OfEvent {
|
|
179
|
+
constructor(value) {
|
|
180
|
+
this.value = value;
|
|
181
|
+
}
|
|
182
|
+
event(transport) {
|
|
183
|
+
transport.use(this.value);
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function Void() {
|
|
189
|
+
return new VoidImpl();
|
|
190
|
+
}
|
|
191
|
+
class VoidImpl {
|
|
192
|
+
use() {
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var __defProp$g = Object.defineProperty;
|
|
198
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
199
|
+
var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
239
200
|
const isAllFilled = (keysFilled, keysKnown) => {
|
|
240
201
|
return keysFilled.size > 0 && keysFilled.size === keysKnown.size;
|
|
241
202
|
};
|
|
@@ -244,11 +205,11 @@ function All(...events) {
|
|
|
244
205
|
}
|
|
245
206
|
class AllEvent {
|
|
246
207
|
constructor(...events) {
|
|
247
|
-
__publicField$
|
|
248
|
-
__publicField$
|
|
249
|
-
__publicField$
|
|
250
|
-
__publicField$
|
|
251
|
-
__publicField$
|
|
208
|
+
__publicField$g(this, "known");
|
|
209
|
+
__publicField$g(this, "filled", /* @__PURE__ */ new Set());
|
|
210
|
+
__publicField$g(this, "$events");
|
|
211
|
+
__publicField$g(this, "result", []);
|
|
212
|
+
__publicField$g(this, "transport", TransportParent(function(v, child, key) {
|
|
252
213
|
child.filled.add(key);
|
|
253
214
|
child.result[parseInt(key)] = v;
|
|
254
215
|
if (isAllFilled(child.filled, child.known)) {
|
|
@@ -270,15 +231,15 @@ class AllEvent {
|
|
|
270
231
|
}
|
|
271
232
|
}
|
|
272
233
|
|
|
273
|
-
var __defProp$
|
|
274
|
-
var __defNormalProp$
|
|
275
|
-
var __publicField$
|
|
234
|
+
var __defProp$f = Object.defineProperty;
|
|
235
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
236
|
+
var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
|
|
276
237
|
function Any(...events) {
|
|
277
238
|
return new AnyEvent(...events);
|
|
278
239
|
}
|
|
279
240
|
class AnyEvent {
|
|
280
241
|
constructor(...events) {
|
|
281
|
-
__publicField$
|
|
242
|
+
__publicField$f(this, "$events");
|
|
282
243
|
this.$events = events;
|
|
283
244
|
}
|
|
284
245
|
event(transport) {
|
|
@@ -290,9 +251,9 @@ class AnyEvent {
|
|
|
290
251
|
}
|
|
291
252
|
}
|
|
292
253
|
|
|
293
|
-
var __defProp$
|
|
294
|
-
var __defNormalProp$
|
|
295
|
-
var __publicField$
|
|
254
|
+
var __defProp$e = Object.defineProperty;
|
|
255
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
256
|
+
var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
|
|
296
257
|
function Applied($base, applier) {
|
|
297
258
|
return new AppliedEvent($base, applier);
|
|
298
259
|
}
|
|
@@ -300,7 +261,7 @@ class AppliedEvent {
|
|
|
300
261
|
constructor($base, applier) {
|
|
301
262
|
this.$base = $base;
|
|
302
263
|
this.applier = applier;
|
|
303
|
-
__publicField$
|
|
264
|
+
__publicField$e(this, "transport", TransportParent(function(v, child) {
|
|
304
265
|
this.use(child.applier(v));
|
|
305
266
|
}, this));
|
|
306
267
|
ensureEvent($base, "Applied: base");
|
|
@@ -342,22 +303,22 @@ class CatchEvent {
|
|
|
342
303
|
}
|
|
343
304
|
}
|
|
344
305
|
|
|
345
|
-
var __defProp$
|
|
346
|
-
var __defNormalProp$
|
|
347
|
-
var __publicField$
|
|
306
|
+
var __defProp$d = Object.defineProperty;
|
|
307
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
308
|
+
var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
348
309
|
function Chain(...events) {
|
|
349
310
|
return new ChainEvent(...events);
|
|
350
311
|
}
|
|
351
312
|
class ChainEvent {
|
|
352
313
|
constructor(...events) {
|
|
353
|
-
__publicField$
|
|
354
|
-
__publicField$
|
|
355
|
-
__publicField$
|
|
314
|
+
__publicField$d(this, "$events");
|
|
315
|
+
__publicField$d(this, "$latest");
|
|
316
|
+
__publicField$d(this, "handleEvent", (index, transport) => {
|
|
356
317
|
const event = this.$events[index];
|
|
357
318
|
const next = this.$events[index + 1];
|
|
358
319
|
event.event(this.oneEventTransport.child(transport, next, index));
|
|
359
320
|
});
|
|
360
|
-
__publicField$
|
|
321
|
+
__publicField$d(this, "oneEventTransport", TransportParent(function(v, child, next, index) {
|
|
361
322
|
if (!next) {
|
|
362
323
|
child.$latest = v;
|
|
363
324
|
}
|
|
@@ -394,9 +355,9 @@ class ExecutorAppliedEvent {
|
|
|
394
355
|
}
|
|
395
356
|
}
|
|
396
357
|
|
|
397
|
-
var __defProp$
|
|
398
|
-
var __defNormalProp$
|
|
399
|
-
var __publicField$
|
|
358
|
+
var __defProp$c = Object.defineProperty;
|
|
359
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
360
|
+
var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
|
|
400
361
|
function Filtered($base, predicate, defaultValue) {
|
|
401
362
|
return new FilteredEvent($base, predicate, defaultValue);
|
|
402
363
|
}
|
|
@@ -405,7 +366,7 @@ class FilteredEvent {
|
|
|
405
366
|
this.$base = $base;
|
|
406
367
|
this.predicate = predicate;
|
|
407
368
|
this.defaultValue = defaultValue;
|
|
408
|
-
__publicField$
|
|
369
|
+
__publicField$c(this, "parent", TransportParent(function(v, child) {
|
|
409
370
|
if (child.predicate(v)) {
|
|
410
371
|
this.use(v);
|
|
411
372
|
} else if (child.defaultValue !== void 0) {
|
|
@@ -419,9 +380,9 @@ class FilteredEvent {
|
|
|
419
380
|
}
|
|
420
381
|
}
|
|
421
382
|
|
|
422
|
-
var __defProp$
|
|
423
|
-
var __defNormalProp$
|
|
424
|
-
var __publicField$
|
|
383
|
+
var __defProp$b = Object.defineProperty;
|
|
384
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
385
|
+
var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
425
386
|
function FromEvent($emitter, $eventName, $subscribeMethod, $unsubscribeMethod) {
|
|
426
387
|
return new FromEventAdapter(
|
|
427
388
|
$emitter,
|
|
@@ -436,13 +397,13 @@ class FromEventAdapter {
|
|
|
436
397
|
this.$eventName = $eventName;
|
|
437
398
|
this.$subscribeMethod = $subscribeMethod;
|
|
438
399
|
this.$unsubscribeMethod = $unsubscribeMethod;
|
|
439
|
-
__publicField$
|
|
440
|
-
__publicField$
|
|
400
|
+
__publicField$b(this, "lastTransport", null);
|
|
401
|
+
__publicField$b(this, "handler", (v) => {
|
|
441
402
|
if (this.lastTransport) {
|
|
442
403
|
this.lastTransport.use(v);
|
|
443
404
|
}
|
|
444
405
|
});
|
|
445
|
-
__publicField$
|
|
406
|
+
__publicField$b(this, "parent", TransportParent(function([emitter, eventName, subscribe], child) {
|
|
446
407
|
child.lastTransport = this;
|
|
447
408
|
if (!emitter?.[subscribe]) {
|
|
448
409
|
return;
|
|
@@ -488,17 +449,17 @@ class FromPromiseEvent {
|
|
|
488
449
|
}
|
|
489
450
|
}
|
|
490
451
|
|
|
491
|
-
var __defProp$
|
|
492
|
-
var __defNormalProp$
|
|
493
|
-
var __publicField$
|
|
452
|
+
var __defProp$a = Object.defineProperty;
|
|
453
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
454
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
494
455
|
function Late(v) {
|
|
495
456
|
return new LateEvent(v);
|
|
496
457
|
}
|
|
497
458
|
class LateEvent {
|
|
498
459
|
constructor(v) {
|
|
499
460
|
this.v = v;
|
|
500
|
-
__publicField$
|
|
501
|
-
__publicField$
|
|
461
|
+
__publicField$a(this, "lateTransport", null);
|
|
462
|
+
__publicField$a(this, "notify", (v) => {
|
|
502
463
|
if (isFilled(v) && this.lateTransport) {
|
|
503
464
|
this.lateTransport.use(v);
|
|
504
465
|
}
|
|
@@ -520,17 +481,17 @@ class LateEvent {
|
|
|
520
481
|
}
|
|
521
482
|
}
|
|
522
483
|
|
|
523
|
-
var __defProp$
|
|
524
|
-
var __defNormalProp$
|
|
525
|
-
var __publicField$
|
|
484
|
+
var __defProp$9 = Object.defineProperty;
|
|
485
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
486
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
526
487
|
function Once($base) {
|
|
527
488
|
return new OnceEvent($base);
|
|
528
489
|
}
|
|
529
490
|
class OnceEvent {
|
|
530
491
|
constructor($base) {
|
|
531
492
|
this.$base = $base;
|
|
532
|
-
__publicField$
|
|
533
|
-
__publicField$
|
|
493
|
+
__publicField$9(this, "isFilled", false);
|
|
494
|
+
__publicField$9(this, "parent", TransportParent(function(v, child) {
|
|
534
495
|
if (!child.isFilled) {
|
|
535
496
|
child.isFilled = true;
|
|
536
497
|
this.use(v);
|
|
@@ -543,6 +504,45 @@ class OnceEvent {
|
|
|
543
504
|
}
|
|
544
505
|
}
|
|
545
506
|
|
|
507
|
+
var __defProp$8 = Object.defineProperty;
|
|
508
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
509
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
510
|
+
class OwnerPool {
|
|
511
|
+
constructor() {
|
|
512
|
+
__publicField$8(this, "owners");
|
|
513
|
+
__publicField$8(this, "innerOwner");
|
|
514
|
+
this.owners = /* @__PURE__ */ new Set();
|
|
515
|
+
this.innerOwner = Transport((v) => {
|
|
516
|
+
this.owners.forEach((g) => {
|
|
517
|
+
g.use(v);
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
owner() {
|
|
522
|
+
return this.innerOwner;
|
|
523
|
+
}
|
|
524
|
+
size() {
|
|
525
|
+
return this.owners.size;
|
|
526
|
+
}
|
|
527
|
+
has(owner) {
|
|
528
|
+
return this.owners.has(owner);
|
|
529
|
+
}
|
|
530
|
+
add(owner) {
|
|
531
|
+
this.owners.add(owner);
|
|
532
|
+
return this;
|
|
533
|
+
}
|
|
534
|
+
remove(g) {
|
|
535
|
+
this.owners.delete(g);
|
|
536
|
+
return this;
|
|
537
|
+
}
|
|
538
|
+
destroy() {
|
|
539
|
+
this.owners.forEach((g) => {
|
|
540
|
+
this.remove(g);
|
|
541
|
+
});
|
|
542
|
+
return this;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
546
|
var __defProp$7 = Object.defineProperty;
|
|
547
547
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
548
548
|
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -803,6 +803,9 @@ class TransportDestroyableEvent {
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
|
|
806
|
+
const $rpc = LateShared();
|
|
807
|
+
|
|
808
|
+
exports.$rpc = $rpc;
|
|
806
809
|
exports.All = All;
|
|
807
810
|
exports.Any = Any;
|
|
808
811
|
exports.Applied = Applied;
|