silentium 0.0.156 → 0.0.157
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 +7 -0
- package/dist/silentium.cjs +70 -42
- package/dist/silentium.cjs.map +1 -1
- package/dist/silentium.d.ts +19 -1
- package/dist/silentium.js +68 -43
- 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 +68 -43
- package/dist/silentium.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Empty.test.ts +33 -0
- package/src/components/Empty.ts +34 -0
- package/src/index.ts +1 -0
- package/src/types/EmptyType.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.157](https://github.com/silentium-lab/silentium/compare/v0.0.156...v0.0.157) (2025-11-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **main:** empty component ([e82516f](https://github.com/silentium-lab/silentium/commit/e82516fe6b8e536c475e5cbc1c560900d29cf9b8))
|
|
11
|
+
|
|
5
12
|
### [0.0.156](https://github.com/silentium-lab/silentium/compare/v0.0.155...v0.0.156) (2025-11-25)
|
|
6
13
|
|
|
7
14
|
|
package/dist/silentium.cjs
CHANGED
|
@@ -34,15 +34,15 @@ class DestroyableImpl {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
var __defProp$
|
|
38
|
-
var __defNormalProp$
|
|
39
|
-
var __publicField$
|
|
37
|
+
var __defProp$7 = Object.defineProperty;
|
|
38
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
39
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
|
|
40
40
|
function DestroyContainer() {
|
|
41
41
|
return new DestroyContainerImpl();
|
|
42
42
|
}
|
|
43
43
|
class DestroyContainerImpl {
|
|
44
44
|
constructor() {
|
|
45
|
-
__publicField$
|
|
45
|
+
__publicField$7(this, "destructors", []);
|
|
46
46
|
}
|
|
47
47
|
add(e) {
|
|
48
48
|
this.destructors.push(Destroyable(e));
|
|
@@ -55,14 +55,14 @@ class DestroyContainerImpl {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
var __defProp$
|
|
59
|
-
var __defNormalProp$
|
|
60
|
-
var __publicField$
|
|
58
|
+
var __defProp$6 = Object.defineProperty;
|
|
59
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
60
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
61
61
|
class Rejections {
|
|
62
62
|
constructor() {
|
|
63
|
-
__publicField$
|
|
64
|
-
__publicField$
|
|
65
|
-
__publicField$
|
|
63
|
+
__publicField$6(this, "catchers", []);
|
|
64
|
+
__publicField$6(this, "lastRejectReason", null);
|
|
65
|
+
__publicField$6(this, "reject", (reason) => {
|
|
66
66
|
this.lastRejectReason = reason;
|
|
67
67
|
this.catchers.forEach((catcher) => {
|
|
68
68
|
catcher(reason);
|
|
@@ -93,17 +93,17 @@ function ensureMessage(v, label) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
var __defProp$
|
|
97
|
-
var __defNormalProp$
|
|
98
|
-
var __publicField$
|
|
96
|
+
var __defProp$5 = Object.defineProperty;
|
|
97
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
98
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
99
99
|
function Message(executor) {
|
|
100
100
|
return new MessageRx(executor);
|
|
101
101
|
}
|
|
102
102
|
class MessageRx {
|
|
103
103
|
constructor(executor) {
|
|
104
104
|
this.executor = executor;
|
|
105
|
-
__publicField$
|
|
106
|
-
__publicField$
|
|
105
|
+
__publicField$5(this, "rejections", new Rejections());
|
|
106
|
+
__publicField$5(this, "dc", DestroyContainer());
|
|
107
107
|
ensureFunction(executor, "Message: executor");
|
|
108
108
|
}
|
|
109
109
|
then(resolve) {
|
|
@@ -163,16 +163,16 @@ function Local(_base) {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
var __defProp$
|
|
167
|
-
var __defNormalProp$
|
|
168
|
-
var __publicField$
|
|
166
|
+
var __defProp$4 = Object.defineProperty;
|
|
167
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
168
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
|
|
169
169
|
function MessageSource(messageExecutor, sourceExecutor) {
|
|
170
170
|
return new MessageSourceImpl(messageExecutor, sourceExecutor);
|
|
171
171
|
}
|
|
172
172
|
class MessageSourceImpl {
|
|
173
173
|
constructor(messageExecutor, sourceExecutor) {
|
|
174
174
|
this.sourceExecutor = sourceExecutor;
|
|
175
|
-
__publicField$
|
|
175
|
+
__publicField$4(this, "message");
|
|
176
176
|
this.message = Message(messageExecutor);
|
|
177
177
|
}
|
|
178
178
|
use(value) {
|
|
@@ -249,18 +249,18 @@ function AppliedDestructured($base, applier) {
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
var __defProp$
|
|
253
|
-
var __defNormalProp$
|
|
254
|
-
var __publicField$
|
|
252
|
+
var __defProp$3 = Object.defineProperty;
|
|
253
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
254
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
255
255
|
function Late(v) {
|
|
256
256
|
return new LateImpl(v);
|
|
257
257
|
}
|
|
258
258
|
class LateImpl {
|
|
259
259
|
constructor(v) {
|
|
260
260
|
this.v = v;
|
|
261
|
-
__publicField$
|
|
262
|
-
__publicField$
|
|
263
|
-
__publicField$
|
|
261
|
+
__publicField$3(this, "rejections", new Rejections());
|
|
262
|
+
__publicField$3(this, "lateR", null);
|
|
263
|
+
__publicField$3(this, "notify", () => {
|
|
264
264
|
if (isFilled(this.v) && this.lateR) {
|
|
265
265
|
try {
|
|
266
266
|
this.lateR(this.v);
|
|
@@ -361,9 +361,9 @@ function ContextChain(base) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
var __defProp$
|
|
365
|
-
var __defNormalProp$
|
|
366
|
-
var __publicField$
|
|
364
|
+
var __defProp$2 = Object.defineProperty;
|
|
365
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
366
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, key + "" , value);
|
|
367
367
|
function Primitive($base, theValue = null) {
|
|
368
368
|
return new PrimitiveImpl($base, theValue);
|
|
369
369
|
}
|
|
@@ -371,7 +371,7 @@ class PrimitiveImpl {
|
|
|
371
371
|
constructor($base, theValue = null) {
|
|
372
372
|
this.$base = $base;
|
|
373
373
|
this.theValue = theValue;
|
|
374
|
-
__publicField$
|
|
374
|
+
__publicField$2(this, "touched", false);
|
|
375
375
|
}
|
|
376
376
|
ensureTouched() {
|
|
377
377
|
if (!this.touched) {
|
|
@@ -398,24 +398,24 @@ class PrimitiveImpl {
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
var __defProp = Object.defineProperty;
|
|
402
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
403
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
401
|
+
var __defProp$1 = Object.defineProperty;
|
|
402
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
403
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
404
404
|
function Shared($base) {
|
|
405
405
|
return new SharedImpl($base);
|
|
406
406
|
}
|
|
407
407
|
class SharedImpl {
|
|
408
408
|
constructor($base) {
|
|
409
409
|
this.$base = $base;
|
|
410
|
-
__publicField(this, "resolver", (v) => {
|
|
410
|
+
__publicField$1(this, "resolver", (v) => {
|
|
411
411
|
this.lastV = v;
|
|
412
412
|
this.resolvers.forEach((r) => {
|
|
413
413
|
r(v);
|
|
414
414
|
});
|
|
415
415
|
});
|
|
416
|
-
__publicField(this, "lastV");
|
|
417
|
-
__publicField(this, "resolvers", /* @__PURE__ */ new Set());
|
|
418
|
-
__publicField(this, "source");
|
|
416
|
+
__publicField$1(this, "lastV");
|
|
417
|
+
__publicField$1(this, "resolvers", /* @__PURE__ */ new Set());
|
|
418
|
+
__publicField$1(this, "source");
|
|
419
419
|
if (isSource($base)) {
|
|
420
420
|
this.source = $base;
|
|
421
421
|
}
|
|
@@ -467,12 +467,6 @@ function ContextOf(transport) {
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
function ExecutorApplied($base, applier) {
|
|
471
|
-
return Message(function ExecutorAppliedImpl(r) {
|
|
472
|
-
$base.then(applier(r));
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
|
|
476
470
|
function Filtered(base, predicate, defaultValue) {
|
|
477
471
|
const $base = ActualMessage(base);
|
|
478
472
|
return Message(function FilteredImpl(r) {
|
|
@@ -486,6 +480,37 @@ function Filtered(base, predicate, defaultValue) {
|
|
|
486
480
|
});
|
|
487
481
|
}
|
|
488
482
|
|
|
483
|
+
var __defProp = Object.defineProperty;
|
|
484
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
485
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
486
|
+
const Nothing = Symbol("nothing");
|
|
487
|
+
function Empty($base) {
|
|
488
|
+
return new EmptyImpl($base);
|
|
489
|
+
}
|
|
490
|
+
class EmptyImpl {
|
|
491
|
+
constructor($base) {
|
|
492
|
+
this.$base = $base;
|
|
493
|
+
__publicField(this, "$empty", LateShared());
|
|
494
|
+
}
|
|
495
|
+
message() {
|
|
496
|
+
Shared(this.$base).then((v) => {
|
|
497
|
+
if (v === Nothing) {
|
|
498
|
+
this.$empty.use(true);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
return Filtered(this.$base, (v) => v !== Nothing);
|
|
502
|
+
}
|
|
503
|
+
empty() {
|
|
504
|
+
return this.$empty;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function ExecutorApplied($base, applier) {
|
|
509
|
+
return Message(function ExecutorAppliedImpl(r) {
|
|
510
|
+
$base.then(applier(r));
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
|
|
489
514
|
function FromEvent(emitter, eventName, subscribeMethod, unsubscribeMethod) {
|
|
490
515
|
const $emitter = ActualMessage(emitter);
|
|
491
516
|
const $eventName = ActualMessage(eventName);
|
|
@@ -610,6 +635,8 @@ exports.DestroyContainer = DestroyContainer;
|
|
|
610
635
|
exports.DestroyContainerImpl = DestroyContainerImpl;
|
|
611
636
|
exports.Destroyable = Destroyable;
|
|
612
637
|
exports.DestroyableImpl = DestroyableImpl;
|
|
638
|
+
exports.Empty = Empty;
|
|
639
|
+
exports.EmptyImpl = EmptyImpl;
|
|
613
640
|
exports.ExecutorApplied = ExecutorApplied;
|
|
614
641
|
exports.Filtered = Filtered;
|
|
615
642
|
exports.FromEvent = FromEvent;
|
|
@@ -623,6 +650,7 @@ exports.MessageRx = MessageRx;
|
|
|
623
650
|
exports.MessageSource = MessageSource;
|
|
624
651
|
exports.MessageSourceImpl = MessageSourceImpl;
|
|
625
652
|
exports.New = New;
|
|
653
|
+
exports.Nothing = Nothing;
|
|
626
654
|
exports.Of = Of;
|
|
627
655
|
exports.Once = Once;
|
|
628
656
|
exports.Primitive = Primitive;
|
package/dist/silentium.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"silentium.cjs","sources":["../src/helpers/guards.ts","../src/base/Destroyable.ts","../src/base/DestroyContainer.ts","../src/base/Rejections.ts","../src/helpers/ensures.ts","../src/base/Message.ts","../src/base/Of.ts","../src/base/ActualMessage.ts","../src/base/Chainable.ts","../src/base/Local.ts","../src/base/MessageSource.ts","../src/base/New.ts","../src/base/Void.ts","../src/components/All.ts","../src/components/Any.ts","../src/components/Applied.ts","../src/components/AppliedDestructured.ts","../src/components/Late.ts","../src/components/Catch.ts","../src/components/Chain.ts","../src/components/Context.ts","../src/components/ContextChain.ts","../src/components/Primitive.ts","../src/components/Shared.ts","../src/components/LateShared.ts","../src/components/ContextOf.ts","../src/components/ExecutorApplied.ts","../src/components/Filtered.ts","../src/components/FromEvent.ts","../src/components/Map.ts","../src/components/Once.ts","../src/components/Process.ts","../src/components/Sequence.ts","../src/components/Stream.ts"],"sourcesContent":["import { DestroyableType, DestroyedType } from \"types/DestroyableType\";\nimport { MessageType } from \"types/MessageType\";\nimport { SourceType } from \"types/SourceType\";\n\n/**\n * Checks that the value is neither undefined nor null\n */\nexport const isFilled = <T>(\n value?: T,\n): value is Exclude<T, null | undefined> => {\n return value !== undefined && value !== null;\n};\n\n/**\n * Checks that the object is an message\n */\nexport function isMessage(o: unknown): o is MessageType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"then\" in o &&\n typeof (o as any).then === \"function\"\n );\n}\n\n/**\n * Checks that the object is an message\n */\nexport function isSource(o: unknown): o is SourceType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"use\" in o &&\n typeof (o as any).use === \"function\"\n );\n}\n\n/**\n * Checks that the object is destroyable\n */\nexport function isDestroyable(o: unknown): o is DestroyableType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"destroy\" in o &&\n typeof (o as any).destroy === \"function\"\n );\n}\n\n/**\n * Checks that the object can indicate whether it has been destroyed or not\n */\nexport function isDestroyed(o: unknown): o is DestroyedType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"destroyed\" in o &&\n typeof (o as any).destroyed === \"function\"\n );\n}\n","import { isDestroyable } from \"helpers/guards\";\nimport { DestroyableType } from \"types/DestroyableType\";\n\n/**\n * Allows creating an object that definitely has a destructor,\n * useful to avoid creating unnecessary conditions\n */\nexport function Destroyable<T>(base: T) {\n return new DestroyableImpl(base);\n}\n\nexport class DestroyableImpl<T> implements DestroyableType {\n public constructor(private base: T) {}\n\n public destroy(): this {\n if (isDestroyable(this.base)) {\n this.base.destroy();\n }\n\n if (typeof this.base === \"function\") {\n this.base();\n }\n\n return this;\n }\n}\n","import { Destroyable } from \"base/Destroyable\";\nimport { DestroyableType } from \"types/DestroyableType\";\n\n/**\n * An object that allows collecting all disposable objects and\n * disposing them later all together\n */\nexport function DestroyContainer() {\n return new DestroyContainerImpl();\n}\n\nexport class DestroyContainerImpl implements DestroyableType {\n private destructors: DestroyableType[] = [];\n\n public add<R>(e: R): R {\n this.destructors.push(Destroyable(e));\n return e;\n }\n\n public destroy() {\n this.destructors.forEach((d) => d.destroy());\n this.destructors.length = 0;\n return this;\n }\n}\n","import { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * Handles rejections collection\n */\nexport class Rejections {\n private catchers: ConstructorType<[unknown]>[] = [];\n private lastRejectReason: unknown = null;\n\n public reject = (reason: unknown) => {\n this.lastRejectReason = reason;\n this.catchers.forEach((catcher) => {\n catcher(reason);\n });\n };\n\n public catch(rejected: ConstructorType<[unknown]>) {\n if (this.lastRejectReason !== null) {\n rejected(this.lastRejectReason);\n }\n this.catchers.push(rejected);\n return this;\n }\n\n public destroy() {\n this.catchers.length = 0;\n return this;\n }\n}\n","import { isMessage } from \"helpers/guards\";\n\nexport function ensureFunction(v: unknown, label: string) {\n if (typeof v !== \"function\") {\n throw new Error(`${label}: is not function`);\n }\n}\n\nexport function ensureMessage(v: unknown, label: string) {\n if (!isMessage(v)) {\n throw new Error(`${label}: is not message`);\n }\n}\n","import { DestroyContainer } from \"base/DestroyContainer\";\nimport { Rejections } from \"base/Rejections\";\nimport { ensureFunction } from \"helpers/ensures\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { DestroyableType } from \"types/DestroyableType\";\nimport { MessageType } from \"types/MessageType\";\n\nexport type MessageExecutorType<T> = (\n resolve: ConstructorType<[T]>,\n reject: ConstructorType<[unknown]>,\n) => MessageType | (() => void) | void;\n\n/**\n * A message created from an executor function.\n * The executor function can return a message destruction function.\n */\nexport function Message<T>(executor: MessageExecutorType<T>) {\n return new MessageRx<T>(executor);\n}\n\n/**\n * Reactive message implementation\n */\nexport class MessageRx<T> implements MessageType<T>, DestroyableType {\n private rejections = new Rejections();\n private dc = DestroyContainer();\n\n public constructor(private executor: MessageExecutorType<T>) {\n ensureFunction(executor, \"Message: executor\");\n }\n\n public then(resolve: ConstructorType<[T]>) {\n try {\n this.dc.add(this.executor(resolve, this.rejections.reject));\n } catch (e: any) {\n this.rejections.reject(e);\n }\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.rejections.catch(rejected);\n return this;\n }\n\n public destroy() {\n this.dc.destroy();\n this.rejections.destroy();\n return this;\n }\n}\n","import { Message } from \"base/Message\";\n\n/**\n * Helps convert a value into a message\n */\nexport function Of<T>(value: T) {\n return Message<T>(function OfImpl(r) {\n r(value);\n });\n}\n","import { Of } from \"base/Of\";\nimport { isMessage } from \"helpers/guards\";\nimport { MaybeMessage, MessageType } from \"types/MessageType\";\n\n/**\n * A function that helps to ensure that\n * the message is indeed a message object\n * and not just a value\n */\nexport function ActualMessage<T>(message: MaybeMessage<T>): MessageType<T> {\n return isMessage(message) ? message : Of(message);\n}\n","import { ChainableType } from \"types/ChainableType\";\nimport { MessageType } from \"types/MessageType\";\nimport { SourceType } from \"types/SourceType\";\n\n/**\n * Helps to connect Different\n * message and source\n */\nexport function Chainable<T>(src: SourceType<T>) {\n return new ChainableImpl(src);\n}\n\nexport class ChainableImpl<T> implements ChainableType<T> {\n public constructor(private src: SourceType<T>) {}\n\n public chain($m: MessageType<T>) {\n $m.then(this.src.use.bind(this.src));\n return this;\n }\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Create local copy of source what can be destroyed\n */\nexport function Local<T>(_base: MaybeMessage<T>) {\n const $base = ActualMessage(_base);\n return Message<T>(function LocalImpl(r) {\n let destroyed = false;\n $base.then((v) => {\n if (!destroyed) {\n r(v);\n }\n });\n return () => {\n destroyed = true;\n };\n });\n}\n","import { Message, MessageExecutorType, MessageRx } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageSourceType } from \"types/SourceType\";\n\n/**\n * Base message source object\n */\nexport function MessageSource<T>(\n messageExecutor: MessageExecutorType<T>,\n sourceExecutor: ConstructorType<[T]>,\n) {\n return new MessageSourceImpl(messageExecutor, sourceExecutor);\n}\n\nexport class MessageSourceImpl<T> implements MessageSourceType<T> {\n private message: MessageRx<T>;\n\n public constructor(\n messageExecutor: MessageExecutorType<T>,\n private sourceExecutor: ConstructorType<[T]>,\n ) {\n this.message = Message(messageExecutor);\n }\n\n public use(value: T): this {\n this.sourceExecutor(value);\n return this;\n }\n\n public then(resolved: ConstructorType<[T]>): this {\n this.message.then(resolved);\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>): this {\n this.message.catch(rejected);\n return this;\n }\n}\n","import { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * A component that, on each access, returns a new instance\n * of a reference type based on the constructor function\n */\nexport function New<T>(construct: ConstructorType<[], T>) {\n return Message<T>(function NewImpl(resolve) {\n resolve(construct());\n });\n}\n","/**\n * Resolver that does nothing with the passed value,\n * needed for silent message triggering\n */\nexport function Void() {\n return () => {};\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\ntype ExtractTypeS<T> = T extends MaybeMessage<infer U> ? U : never;\n\ntype ExtractTypesFromArrayS<T extends MaybeMessage<any>[]> = {\n [K in keyof T]: ExtractTypeS<T[K]>;\n};\n\nconst isAllFilled = (keysFilled: Set<string>, keysKnown: Set<string>) => {\n return keysFilled.size > 0 && keysFilled.size === keysKnown.size;\n};\n\n/**\n * A message that represents values from\n * all provided messages as an array.\n * When all messages emit their values,\n * the combined value will be returned.\n * If at least one message later emits a new\n * value, the updated array with the new value\n * will be emitted by All.\n */\nexport function All<const T extends MaybeMessage[]>(...messages: T) {\n const $messages = messages.map(ActualMessage);\n return Message<ExtractTypesFromArrayS<T>>(function AllImpl(r) {\n const known = new Set<string>(Object.keys(messages));\n const filled = new Set<string>();\n const result: unknown[] = [];\n if (known.size === 0) {\n r([] as ExtractTypesFromArrayS<T>);\n return;\n }\n $messages.map((m, key) => {\n m.then((v) => {\n filled.add(key.toString());\n result[key] = v;\n if (isAllFilled(filled, known)) {\n r(result as ExtractTypesFromArrayS<T>);\n }\n });\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * A message that emits values received from\n * any of its bound messages\n */\nexport function Any<const T>(...messages: MaybeMessage<T>[]) {\n const $messages = messages.map(ActualMessage);\n return Message<T>(function AnyImpl(r) {\n $messages.forEach((message) => {\n message.then(r);\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * An message that applies a function\n * to the value of the base message\n */\nexport function Applied<const T, R>(\n base: MaybeMessage<T>,\n applier: ConstructorType<[T], R>,\n) {\n const $base = ActualMessage(base);\n return Message<R>(function AppliedImpl(r) {\n $base.then((v) => {\n r(applier(v));\n });\n });\n}\n","import { Applied } from \"components/Applied\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Allows applying variables from an message that passes an array to a function,\n * where each element of the array will be passed as a separate argument\n */\nexport function AppliedDestructured<const T extends any[], R>(\n $base: MaybeMessage<T>,\n applier: ConstructorType<T[number][], R>,\n) {\n return Applied($base, function AppliedDestructuredImpl(args) {\n return applier(...args);\n });\n}\n","import { Rejections } from \"base/Rejections\";\nimport { isFilled } from \"helpers/guards\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageSourceType } from \"types/SourceType\";\n\n/**\n * A component that allows creating linked objects of information and its owner\n * in such a way that if a new value is assigned to the owner, this value\n * will become the value of the linked information source\n * https://silentium-lab.github.io/silentium/#/en/information/of\n */\nexport function Late<T>(v?: T) {\n return new LateImpl<T>(v);\n}\n\nexport class LateImpl<T> implements MessageSourceType<T> {\n private rejections = new Rejections();\n private lateR: ConstructorType<[T]> | null = null;\n private notify = () => {\n if (isFilled(this.v) && this.lateR) {\n try {\n this.lateR(this.v);\n } catch (e: any) {\n this.rejections.reject(e);\n }\n }\n };\n\n public constructor(private v?: T) {}\n\n public then(r: ConstructorType<[T]>): this {\n if (this.lateR) {\n throw new Error(\n \"Late component gets new resolver, when another was already connected!\",\n );\n }\n this.lateR = r;\n this.notify();\n return this;\n }\n\n public use(value: T): this {\n this.v = value;\n this.notify();\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.rejections.catch(rejected);\n return this;\n }\n}\n","import { Rejections } from \"base/Rejections\";\nimport { Late } from \"components/Late\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Message with error catched\n * inside another message\n */\nexport function Catch<T>($base: MessageType) {\n const rejections = new Rejections();\n $base.catch(rejections.reject);\n const $error = Late<T>();\n rejections.catch((e) => {\n $error.use(e as T);\n });\n\n return $error;\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MessageType, MessageTypeValue } from \"types/MessageType\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype Last<T extends readonly any[]> = T extends readonly [...infer _, infer L]\n ? L\n : never;\n\n/**\n * Chains messages together and triggers\n * the last message only when all previous messages\n * have emitted their values. The value of Chain will be the value\n * of the last message. If any messages\n * emit a value again after the overall Chain response was already returned,\n * then Chain emits again with the value of the last message.\n */\nexport function Chain<T extends readonly MessageType[]>(...messages: T) {\n const $messages = messages.map(ActualMessage);\n return Message<MessageTypeValue<Last<T>>>(function ChainImpl(r) {\n let $latest: MessageTypeValue<Last<T>> | undefined;\n const handleMessage = (index: number) => {\n const message = $messages[index] as Last<T>;\n const next = $messages[index + 1] as Last<T> | undefined;\n message.then((v) => {\n oneMessage(v as MessageTypeValue<Last<T>>, next, index);\n });\n };\n function oneMessage(\n v: MessageTypeValue<Last<T>>,\n next: Last<T> | undefined,\n index: number,\n ) {\n if (!next) {\n $latest = v as MessageTypeValue<Last<T>>;\n }\n if ($latest) {\n r($latest);\n }\n if (next && !$latest) {\n handleMessage(index + 1);\n }\n }\n handleMessage(0);\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { ContextType } from \"types/ContextType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\nContext.transport = new Map<any, ConstructorType<[ContextType]>>();\n\n/**\n * The ability to call an external system through\n * sending a message in a standardized format\n * ContextType, the list of transport should be defined via\n * the Context.transport map object\n */\nexport function Context<T>(msg: MaybeMessage<ContextType>) {\n const $msg = ActualMessage(msg);\n return Message<T>((resolve, reject) => {\n $msg.then((message) => {\n const transport = Context.transport.get(message.transport);\n if (transport === undefined) {\n throw new Error(`Context: unknown transport ${message.transport}`);\n }\n if (!message.result) {\n message.result = resolve;\n }\n if (!message.error) {\n message.error = reject;\n }\n try {\n transport(message);\n } catch (error) {\n reject(error);\n }\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { MaybeMessage } from \"types/MessageType\";\nimport { ContextType } from \"types/ContextType\";\n\n/**\n * Connects an external message to an RPC message chain\n */\nexport function ContextChain(base: MaybeMessage) {\n const $base = ActualMessage(base);\n return (context: ContextType) => {\n if (!context.result) {\n throw new Error(\"ContextChain did not find result in rpc message\");\n }\n $base.then(context.result);\n };\n}\n","import { MessageType } from \"types/MessageType\";\n\n/**\n * Helps represent an message as a primitive type, which can be useful\n * for cases when you need to always have a reference to the current value\n * without updating the shared value when the current one changes.\n * For example, this could be used when passing an authorization token.\n * It can also be useful for testing or logging purposes.\n */\nexport function Primitive<T>($base: MessageType<T>, theValue: T | null = null) {\n return new PrimitiveImpl<T>($base, theValue);\n}\n\nexport class PrimitiveImpl<T> {\n private touched = false;\n\n public constructor(\n private $base: MessageType<T>,\n private theValue: T | null = null,\n ) {}\n\n private ensureTouched() {\n if (!this.touched) {\n this.$base.then((v) => {\n this.theValue = v;\n });\n }\n this.touched = true;\n }\n\n public [Symbol.toPrimitive]() {\n this.ensureTouched();\n return this.theValue;\n }\n\n public primitive() {\n this.ensureTouched();\n return this.theValue;\n }\n\n public primitiveWithException() {\n this.ensureTouched();\n if (this.theValue === null) {\n throw new Error(\"Primitive value is null\");\n }\n return this.theValue;\n }\n}\n","import { MessageType } from \"types/MessageType\";\nimport { MessageSourceType, SourceType } from \"types/SourceType\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { isFilled, isSource } from \"helpers/guards\";\nimport { Primitive } from \"components/Primitive\";\nimport { ChainableType } from \"types/ChainableType\";\n\n/**\n * An information object that helps multiple owners access\n * a single another information object\n */\nexport function Shared<T>($base: MessageType<T> | MessageSourceType<T>) {\n return new SharedImpl<T>($base);\n}\n\nexport class SharedImpl<T> implements MessageSourceType<T>, ChainableType<T> {\n private resolver = (v: T) => {\n this.lastV = v;\n this.resolvers.forEach((r) => {\n r(v);\n });\n };\n private lastV: T | undefined;\n private resolvers = new Set<ConstructorType<[T]>>();\n private source?: SourceType<T>;\n\n public constructor(private $base: MessageType<T> | MessageSourceType<T>) {\n if (isSource($base)) {\n this.source = $base;\n }\n }\n\n public then(resolved: ConstructorType<[T]>) {\n this.resolvers.add(resolved);\n if (this.resolvers.size === 1) {\n this.$base.then(this.resolver);\n } else if (isFilled(this.lastV)) {\n resolved(this.lastV);\n }\n return this;\n }\n\n public use(value: T) {\n if (this.source) {\n this.source.use(value);\n } else {\n this.resolver(value);\n }\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.$base.catch(rejected);\n return this;\n }\n\n public destroy() {\n this.resolvers.clear();\n return this;\n }\n\n public value() {\n return Primitive(this);\n }\n\n public chain(m: MessageType<T>) {\n m.then(this.use.bind(this));\n return this;\n }\n}\n","import { Late } from \"components/Late\";\nimport { Shared } from \"components/Shared\";\n\n/**\n * An message with a value that will be set later,\n * capable of responding to many resolvers\n */\nexport function LateShared<T>(value?: T) {\n const l = Late(value);\n return Shared(l);\n}\n","import { Message } from \"base/Message\";\nimport { LateShared } from \"components/LateShared\";\nimport { Context } from \"components/Context\";\nimport { ContextType } from \"types/ContextType\";\n\n/**\n * Message for the arrival of a specific RPC message\n * for specific transport\n */\nexport function ContextOf(transport: string) {\n const $msg = LateShared<ContextType>();\n Context.transport.set(transport, $msg.use.bind($msg));\n return Message<ContextType>((t) => {\n $msg.then(t);\n });\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\ntype ExecutorApplier<T> = (executor: (v: T) => void) => (v: T) => void;\n\n/**\n * Applies a value transfer function to the resolver\n * and returns the same value transfer function for the resolver\n * Useful for applying functions like debounced or throttle\n */\nexport function ExecutorApplied<T>(\n $base: MessageType<T>,\n applier: ExecutorApplier<T>,\n) {\n return Message<T>(function ExecutorAppliedImpl(r) {\n $base.then(applier(r));\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage, MessageType } from \"types/MessageType\";\n\n/**\n * Filters values from the source message based on a predicate function,\n * optionally providing a default value when the predicate fails.\n */\nexport function Filtered<T>(\n base: MaybeMessage<T>,\n predicate: ConstructorType<[T], boolean>,\n defaultValue?: T,\n): MessageType<T> {\n const $base = ActualMessage(base);\n return Message<T>(function FilteredImpl(r) {\n $base.then((v) => {\n if (predicate(v)) {\n r(v);\n } else if (defaultValue !== undefined) {\n r(defaultValue);\n }\n });\n });\n}\n","import { MaybeMessage } from \"types/MessageType\";\nimport { All } from \"components/All\";\nimport { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * A message derived from event with a different\n * method call interface, based on callbacks.\n * Allows attaching a custom handler to an existing event source\n * and presenting it as a silentium message\n */\nexport function FromEvent<T>(\n emitter: MaybeMessage<any>,\n eventName: MaybeMessage<string>,\n subscribeMethod: MaybeMessage<string>,\n unsubscribeMethod?: MaybeMessage<string>,\n) {\n const $emitter = ActualMessage(emitter);\n const $eventName = ActualMessage(eventName);\n const $subscribeMethod = ActualMessage(subscribeMethod);\n const $unsubscribeMethod = ActualMessage(unsubscribeMethod);\n return Message<T>((r) => {\n let lastR: ConstructorType<[T]> | null = null;\n const handler = (v: T) => {\n if (lastR) {\n lastR(v);\n }\n };\n All($emitter, $eventName, $subscribeMethod).then(\n ([emitter, eventName, subscribe]) => {\n lastR = r;\n if (!emitter?.[subscribe]) {\n return;\n }\n emitter[subscribe](eventName, handler);\n },\n );\n return () => {\n lastR = null;\n if (!$unsubscribeMethod) {\n return;\n }\n All($emitter, $eventName, $unsubscribeMethod).then(\n ([emitter, eventName, unsubscribe]) => {\n emitter?.[unsubscribe as string]?.(eventName, handler);\n },\n );\n };\n });\n}\n","import { MaybeMessage, MessageType } from \"types/MessageType\";\nimport { All } from \"components/All\";\nimport { isMessage } from \"helpers/guards\";\nimport { Of } from \"base/Of\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { Message } from \"base/Message\";\nimport { ActualMessage } from \"base/ActualMessage\";\nimport { DestroyContainer } from \"base/DestroyContainer\";\n\n/**\n * Component that applies an info object constructor to each data item,\n * producing an information source with new values\n */\nexport function Map<T, TG>(\n base: MaybeMessage<T[]>,\n target: ConstructorType<[any], MessageType<TG>>,\n) {\n const $base = ActualMessage(base);\n return Message<TG[]>((r) => {\n const infos: MessageType<TG>[] = [];\n const dc = DestroyContainer();\n $base.then((v) => {\n dc.destroy();\n v.forEach((val) => {\n let $val: MessageType<T> | T = val;\n if (!isMessage($val as object)) {\n $val = Of($val);\n }\n const info = target($val);\n dc.add(info);\n infos.push(info);\n });\n All(...infos).then(r);\n });\n });\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Limits the number of values from the information source\n * to a single value - once the first value is emitted, no more\n * values are delivered from the source\n */\nexport function Once<T>($base: MessageType<T>) {\n return Message<T>((r) => {\n let isFilled = false;\n $base.then((v) => {\n if (!isFilled) {\n isFilled = true;\n r(v);\n }\n });\n });\n}\n","import { DestroyContainer } from \"base/DestroyContainer\";\nimport { Message } from \"base/Message\";\nimport { LateShared } from \"components/LateShared\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageType } from \"types/MessageType\";\n\nexport function Process<T, R = unknown>(\n $base: MessageType<T>,\n builder: ConstructorType<[T], MessageType<R>>,\n) {\n return Message<R>((resolve, reject) => {\n const $res = LateShared<R>();\n const dc = DestroyContainer();\n\n $base.then((v) => {\n dc.destroy();\n const $msg = builder(v);\n dc.add($msg);\n $res.chain($msg);\n $msg.catch(reject);\n });\n $base.catch(reject);\n $res.then(resolve);\n\n return () => {\n dc.destroy();\n };\n });\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Creates a sequence that accumulates all values from the source into an array,\n * emitting the growing array with each new value.\n */\nexport function Sequence<T>($base: MessageType<T>) {\n return Message<T[]>((r) => {\n const result: T[] = [];\n $base.then((v) => {\n result.push(v);\n r(result);\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Component that receives a data array and yields values one by one\n */\nexport function Stream<T>(base: MaybeMessage<T[]>) {\n const $base = ActualMessage(base);\n return Message<T>((r) => {\n $base.then((v) => {\n v.forEach((cv) => {\n r(cv);\n });\n });\n });\n}\n"],"names":["__publicField","emitter","eventName","Map"],"mappings":";;AAOa,MAAA,QAAA,GAAW,CACtB,KAC0C,KAAA;AAC1C,EAAO,OAAA,KAAA,KAAU,UAAa,KAAU,KAAA,IAAA;AAC1C;AAKO,SAAS,UAAU,CAA8B,EAAA;AACtD,EACE,OAAA,CAAA,KAAM,QACN,OAAO,CAAA,KAAM,YACb,MAAU,IAAA,CAAA,IACV,OAAQ,CAAA,CAAU,IAAS,KAAA,UAAA;AAE/B;AAKO,SAAS,SAAS,CAA6B,EAAA;AACpD,EACE,OAAA,CAAA,KAAM,QACN,OAAO,CAAA,KAAM,YACb,KAAS,IAAA,CAAA,IACT,OAAQ,CAAA,CAAU,GAAQ,KAAA,UAAA;AAE9B;AAKO,SAAS,cAAc,CAAkC,EAAA;AAC9D,EACE,OAAA,CAAA,KAAM,QACN,OAAO,CAAA,KAAM,YACb,SAAa,IAAA,CAAA,IACb,OAAQ,CAAA,CAAU,OAAY,KAAA,UAAA;AAElC;AAKO,SAAS,YAAY,CAAgC,EAAA;AAC1D,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CAAA;AACb,MAAA,CAAA,CAAE,MAAM,CAAA;AAAA,KACT,CAAA;AAAA,GACF,CAAA;AACH;;ACRO,SAAS,OAAU,IAAyB,EAAA;AACjD,EAAM,MAAA,KAAA,GAAQ,cAAc,IAAI,CAAA;AAChC,EAAO,OAAA,OAAA,CAAW,CAAC,CAAM,KAAA;AACvB,IAAM,KAAA,CAAA,IAAA,CAAK,CAAC,CAAM,KAAA;AAChB,MAAE,CAAA,CAAA,OAAA,CAAQ,CAAC,EAAO,KAAA;AAChB,QAAA,CAAA,CAAE,EAAE,CAAA;AAAA,OACL,CAAA;AAAA,KACF,CAAA;AAAA,GACF,CAAA;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"silentium.cjs","sources":["../src/helpers/guards.ts","../src/base/Destroyable.ts","../src/base/DestroyContainer.ts","../src/base/Rejections.ts","../src/helpers/ensures.ts","../src/base/Message.ts","../src/base/Of.ts","../src/base/ActualMessage.ts","../src/base/Chainable.ts","../src/base/Local.ts","../src/base/MessageSource.ts","../src/base/New.ts","../src/base/Void.ts","../src/components/All.ts","../src/components/Any.ts","../src/components/Applied.ts","../src/components/AppliedDestructured.ts","../src/components/Late.ts","../src/components/Catch.ts","../src/components/Chain.ts","../src/components/Context.ts","../src/components/ContextChain.ts","../src/components/Primitive.ts","../src/components/Shared.ts","../src/components/LateShared.ts","../src/components/ContextOf.ts","../src/components/Filtered.ts","../src/components/Empty.ts","../src/components/ExecutorApplied.ts","../src/components/FromEvent.ts","../src/components/Map.ts","../src/components/Once.ts","../src/components/Process.ts","../src/components/Sequence.ts","../src/components/Stream.ts"],"sourcesContent":["import { DestroyableType, DestroyedType } from \"types/DestroyableType\";\nimport { MessageType } from \"types/MessageType\";\nimport { SourceType } from \"types/SourceType\";\n\n/**\n * Checks that the value is neither undefined nor null\n */\nexport const isFilled = <T>(\n value?: T,\n): value is Exclude<T, null | undefined> => {\n return value !== undefined && value !== null;\n};\n\n/**\n * Checks that the object is an message\n */\nexport function isMessage(o: unknown): o is MessageType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"then\" in o &&\n typeof (o as any).then === \"function\"\n );\n}\n\n/**\n * Checks that the object is an message\n */\nexport function isSource(o: unknown): o is SourceType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"use\" in o &&\n typeof (o as any).use === \"function\"\n );\n}\n\n/**\n * Checks that the object is destroyable\n */\nexport function isDestroyable(o: unknown): o is DestroyableType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"destroy\" in o &&\n typeof (o as any).destroy === \"function\"\n );\n}\n\n/**\n * Checks that the object can indicate whether it has been destroyed or not\n */\nexport function isDestroyed(o: unknown): o is DestroyedType {\n return (\n o !== null &&\n typeof o === \"object\" &&\n \"destroyed\" in o &&\n typeof (o as any).destroyed === \"function\"\n );\n}\n","import { isDestroyable } from \"helpers/guards\";\nimport { DestroyableType } from \"types/DestroyableType\";\n\n/**\n * Allows creating an object that definitely has a destructor,\n * useful to avoid creating unnecessary conditions\n */\nexport function Destroyable<T>(base: T) {\n return new DestroyableImpl(base);\n}\n\nexport class DestroyableImpl<T> implements DestroyableType {\n public constructor(private base: T) {}\n\n public destroy(): this {\n if (isDestroyable(this.base)) {\n this.base.destroy();\n }\n\n if (typeof this.base === \"function\") {\n this.base();\n }\n\n return this;\n }\n}\n","import { Destroyable } from \"base/Destroyable\";\nimport { DestroyableType } from \"types/DestroyableType\";\n\n/**\n * An object that allows collecting all disposable objects and\n * disposing them later all together\n */\nexport function DestroyContainer() {\n return new DestroyContainerImpl();\n}\n\nexport class DestroyContainerImpl implements DestroyableType {\n private destructors: DestroyableType[] = [];\n\n public add<R>(e: R): R {\n this.destructors.push(Destroyable(e));\n return e;\n }\n\n public destroy() {\n this.destructors.forEach((d) => d.destroy());\n this.destructors.length = 0;\n return this;\n }\n}\n","import { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * Handles rejections collection\n */\nexport class Rejections {\n private catchers: ConstructorType<[unknown]>[] = [];\n private lastRejectReason: unknown = null;\n\n public reject = (reason: unknown) => {\n this.lastRejectReason = reason;\n this.catchers.forEach((catcher) => {\n catcher(reason);\n });\n };\n\n public catch(rejected: ConstructorType<[unknown]>) {\n if (this.lastRejectReason !== null) {\n rejected(this.lastRejectReason);\n }\n this.catchers.push(rejected);\n return this;\n }\n\n public destroy() {\n this.catchers.length = 0;\n return this;\n }\n}\n","import { isMessage } from \"helpers/guards\";\n\nexport function ensureFunction(v: unknown, label: string) {\n if (typeof v !== \"function\") {\n throw new Error(`${label}: is not function`);\n }\n}\n\nexport function ensureMessage(v: unknown, label: string) {\n if (!isMessage(v)) {\n throw new Error(`${label}: is not message`);\n }\n}\n","import { DestroyContainer } from \"base/DestroyContainer\";\nimport { Rejections } from \"base/Rejections\";\nimport { ensureFunction } from \"helpers/ensures\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { DestroyableType } from \"types/DestroyableType\";\nimport { MessageType } from \"types/MessageType\";\n\nexport type MessageExecutorType<T> = (\n resolve: ConstructorType<[T]>,\n reject: ConstructorType<[unknown]>,\n) => MessageType | (() => void) | void;\n\n/**\n * A message created from an executor function.\n * The executor function can return a message destruction function.\n */\nexport function Message<T>(executor: MessageExecutorType<T>) {\n return new MessageRx<T>(executor);\n}\n\n/**\n * Reactive message implementation\n */\nexport class MessageRx<T> implements MessageType<T>, DestroyableType {\n private rejections = new Rejections();\n private dc = DestroyContainer();\n\n public constructor(private executor: MessageExecutorType<T>) {\n ensureFunction(executor, \"Message: executor\");\n }\n\n public then(resolve: ConstructorType<[T]>) {\n try {\n this.dc.add(this.executor(resolve, this.rejections.reject));\n } catch (e: any) {\n this.rejections.reject(e);\n }\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.rejections.catch(rejected);\n return this;\n }\n\n public destroy() {\n this.dc.destroy();\n this.rejections.destroy();\n return this;\n }\n}\n","import { Message } from \"base/Message\";\n\n/**\n * Helps convert a value into a message\n */\nexport function Of<T>(value: T) {\n return Message<T>(function OfImpl(r) {\n r(value);\n });\n}\n","import { Of } from \"base/Of\";\nimport { isMessage } from \"helpers/guards\";\nimport { MaybeMessage, MessageType } from \"types/MessageType\";\n\n/**\n * A function that helps to ensure that\n * the message is indeed a message object\n * and not just a value\n */\nexport function ActualMessage<T>(message: MaybeMessage<T>): MessageType<T> {\n return isMessage(message) ? message : Of(message);\n}\n","import { ChainableType } from \"types/ChainableType\";\nimport { MessageType } from \"types/MessageType\";\nimport { SourceType } from \"types/SourceType\";\n\n/**\n * Helps to connect Different\n * message and source\n */\nexport function Chainable<T>(src: SourceType<T>) {\n return new ChainableImpl(src);\n}\n\nexport class ChainableImpl<T> implements ChainableType<T> {\n public constructor(private src: SourceType<T>) {}\n\n public chain($m: MessageType<T>) {\n $m.then(this.src.use.bind(this.src));\n return this;\n }\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Create local copy of source what can be destroyed\n */\nexport function Local<T>(_base: MaybeMessage<T>) {\n const $base = ActualMessage(_base);\n return Message<T>(function LocalImpl(r) {\n let destroyed = false;\n $base.then((v) => {\n if (!destroyed) {\n r(v);\n }\n });\n return () => {\n destroyed = true;\n };\n });\n}\n","import { Message, MessageExecutorType, MessageRx } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageSourceType } from \"types/SourceType\";\n\n/**\n * Base message source object\n */\nexport function MessageSource<T>(\n messageExecutor: MessageExecutorType<T>,\n sourceExecutor: ConstructorType<[T]>,\n) {\n return new MessageSourceImpl(messageExecutor, sourceExecutor);\n}\n\nexport class MessageSourceImpl<T> implements MessageSourceType<T> {\n private message: MessageRx<T>;\n\n public constructor(\n messageExecutor: MessageExecutorType<T>,\n private sourceExecutor: ConstructorType<[T]>,\n ) {\n this.message = Message(messageExecutor);\n }\n\n public use(value: T): this {\n this.sourceExecutor(value);\n return this;\n }\n\n public then(resolved: ConstructorType<[T]>): this {\n this.message.then(resolved);\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>): this {\n this.message.catch(rejected);\n return this;\n }\n}\n","import { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * A component that, on each access, returns a new instance\n * of a reference type based on the constructor function\n */\nexport function New<T>(construct: ConstructorType<[], T>) {\n return Message<T>(function NewImpl(resolve) {\n resolve(construct());\n });\n}\n","/**\n * Resolver that does nothing with the passed value,\n * needed for silent message triggering\n */\nexport function Void() {\n return () => {};\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\ntype ExtractTypeS<T> = T extends MaybeMessage<infer U> ? U : never;\n\ntype ExtractTypesFromArrayS<T extends MaybeMessage<any>[]> = {\n [K in keyof T]: ExtractTypeS<T[K]>;\n};\n\nconst isAllFilled = (keysFilled: Set<string>, keysKnown: Set<string>) => {\n return keysFilled.size > 0 && keysFilled.size === keysKnown.size;\n};\n\n/**\n * A message that represents values from\n * all provided messages as an array.\n * When all messages emit their values,\n * the combined value will be returned.\n * If at least one message later emits a new\n * value, the updated array with the new value\n * will be emitted by All.\n */\nexport function All<const T extends MaybeMessage[]>(...messages: T) {\n const $messages = messages.map(ActualMessage);\n return Message<ExtractTypesFromArrayS<T>>(function AllImpl(r) {\n const known = new Set<string>(Object.keys(messages));\n const filled = new Set<string>();\n const result: unknown[] = [];\n if (known.size === 0) {\n r([] as ExtractTypesFromArrayS<T>);\n return;\n }\n $messages.map((m, key) => {\n m.then((v) => {\n filled.add(key.toString());\n result[key] = v;\n if (isAllFilled(filled, known)) {\n r(result as ExtractTypesFromArrayS<T>);\n }\n });\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * A message that emits values received from\n * any of its bound messages\n */\nexport function Any<const T>(...messages: MaybeMessage<T>[]) {\n const $messages = messages.map(ActualMessage);\n return Message<T>(function AnyImpl(r) {\n $messages.forEach((message) => {\n message.then(r);\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * An message that applies a function\n * to the value of the base message\n */\nexport function Applied<const T, R>(\n base: MaybeMessage<T>,\n applier: ConstructorType<[T], R>,\n) {\n const $base = ActualMessage(base);\n return Message<R>(function AppliedImpl(r) {\n $base.then((v) => {\n r(applier(v));\n });\n });\n}\n","import { Applied } from \"components/Applied\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Allows applying variables from an message that passes an array to a function,\n * where each element of the array will be passed as a separate argument\n */\nexport function AppliedDestructured<const T extends any[], R>(\n $base: MaybeMessage<T>,\n applier: ConstructorType<T[number][], R>,\n) {\n return Applied($base, function AppliedDestructuredImpl(args) {\n return applier(...args);\n });\n}\n","import { Rejections } from \"base/Rejections\";\nimport { isFilled } from \"helpers/guards\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageSourceType } from \"types/SourceType\";\n\n/**\n * A component that allows creating linked objects of information and its owner\n * in such a way that if a new value is assigned to the owner, this value\n * will become the value of the linked information source\n * https://silentium-lab.github.io/silentium/#/en/information/of\n */\nexport function Late<T>(v?: T) {\n return new LateImpl<T>(v);\n}\n\nexport class LateImpl<T> implements MessageSourceType<T> {\n private rejections = new Rejections();\n private lateR: ConstructorType<[T]> | null = null;\n private notify = () => {\n if (isFilled(this.v) && this.lateR) {\n try {\n this.lateR(this.v);\n } catch (e: any) {\n this.rejections.reject(e);\n }\n }\n };\n\n public constructor(private v?: T) {}\n\n public then(r: ConstructorType<[T]>): this {\n if (this.lateR) {\n throw new Error(\n \"Late component gets new resolver, when another was already connected!\",\n );\n }\n this.lateR = r;\n this.notify();\n return this;\n }\n\n public use(value: T): this {\n this.v = value;\n this.notify();\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.rejections.catch(rejected);\n return this;\n }\n}\n","import { Rejections } from \"base/Rejections\";\nimport { Late } from \"components/Late\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Message with error catched\n * inside another message\n */\nexport function Catch<T>($base: MessageType) {\n const rejections = new Rejections();\n $base.catch(rejections.reject);\n const $error = Late<T>();\n rejections.catch((e) => {\n $error.use(e as T);\n });\n\n return $error;\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MessageType, MessageTypeValue } from \"types/MessageType\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype Last<T extends readonly any[]> = T extends readonly [...infer _, infer L]\n ? L\n : never;\n\n/**\n * Chains messages together and triggers\n * the last message only when all previous messages\n * have emitted their values. The value of Chain will be the value\n * of the last message. If any messages\n * emit a value again after the overall Chain response was already returned,\n * then Chain emits again with the value of the last message.\n */\nexport function Chain<T extends readonly MessageType[]>(...messages: T) {\n const $messages = messages.map(ActualMessage);\n return Message<MessageTypeValue<Last<T>>>(function ChainImpl(r) {\n let $latest: MessageTypeValue<Last<T>> | undefined;\n const handleMessage = (index: number) => {\n const message = $messages[index] as Last<T>;\n const next = $messages[index + 1] as Last<T> | undefined;\n message.then((v) => {\n oneMessage(v as MessageTypeValue<Last<T>>, next, index);\n });\n };\n function oneMessage(\n v: MessageTypeValue<Last<T>>,\n next: Last<T> | undefined,\n index: number,\n ) {\n if (!next) {\n $latest = v as MessageTypeValue<Last<T>>;\n }\n if ($latest) {\n r($latest);\n }\n if (next && !$latest) {\n handleMessage(index + 1);\n }\n }\n handleMessage(0);\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { ContextType } from \"types/ContextType\";\nimport { MaybeMessage } from \"types/MessageType\";\n\nContext.transport = new Map<any, ConstructorType<[ContextType]>>();\n\n/**\n * The ability to call an external system through\n * sending a message in a standardized format\n * ContextType, the list of transport should be defined via\n * the Context.transport map object\n */\nexport function Context<T>(msg: MaybeMessage<ContextType>) {\n const $msg = ActualMessage(msg);\n return Message<T>((resolve, reject) => {\n $msg.then((message) => {\n const transport = Context.transport.get(message.transport);\n if (transport === undefined) {\n throw new Error(`Context: unknown transport ${message.transport}`);\n }\n if (!message.result) {\n message.result = resolve;\n }\n if (!message.error) {\n message.error = reject;\n }\n try {\n transport(message);\n } catch (error) {\n reject(error);\n }\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { MaybeMessage } from \"types/MessageType\";\nimport { ContextType } from \"types/ContextType\";\n\n/**\n * Connects an external message to an RPC message chain\n */\nexport function ContextChain(base: MaybeMessage) {\n const $base = ActualMessage(base);\n return (context: ContextType) => {\n if (!context.result) {\n throw new Error(\"ContextChain did not find result in rpc message\");\n }\n $base.then(context.result);\n };\n}\n","import { MessageType } from \"types/MessageType\";\n\n/**\n * Helps represent an message as a primitive type, which can be useful\n * for cases when you need to always have a reference to the current value\n * without updating the shared value when the current one changes.\n * For example, this could be used when passing an authorization token.\n * It can also be useful for testing or logging purposes.\n */\nexport function Primitive<T>($base: MessageType<T>, theValue: T | null = null) {\n return new PrimitiveImpl<T>($base, theValue);\n}\n\nexport class PrimitiveImpl<T> {\n private touched = false;\n\n public constructor(\n private $base: MessageType<T>,\n private theValue: T | null = null,\n ) {}\n\n private ensureTouched() {\n if (!this.touched) {\n this.$base.then((v) => {\n this.theValue = v;\n });\n }\n this.touched = true;\n }\n\n public [Symbol.toPrimitive]() {\n this.ensureTouched();\n return this.theValue;\n }\n\n public primitive() {\n this.ensureTouched();\n return this.theValue;\n }\n\n public primitiveWithException() {\n this.ensureTouched();\n if (this.theValue === null) {\n throw new Error(\"Primitive value is null\");\n }\n return this.theValue;\n }\n}\n","import { MessageType } from \"types/MessageType\";\nimport { MessageSourceType, SourceType } from \"types/SourceType\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { isFilled, isSource } from \"helpers/guards\";\nimport { Primitive } from \"components/Primitive\";\nimport { ChainableType } from \"types/ChainableType\";\n\n/**\n * An information object that helps multiple owners access\n * a single another information object\n */\nexport function Shared<T>($base: MessageType<T> | MessageSourceType<T>) {\n return new SharedImpl<T>($base);\n}\n\nexport class SharedImpl<T> implements MessageSourceType<T>, ChainableType<T> {\n private resolver = (v: T) => {\n this.lastV = v;\n this.resolvers.forEach((r) => {\n r(v);\n });\n };\n private lastV: T | undefined;\n private resolvers = new Set<ConstructorType<[T]>>();\n private source?: SourceType<T>;\n\n public constructor(private $base: MessageType<T> | MessageSourceType<T>) {\n if (isSource($base)) {\n this.source = $base;\n }\n }\n\n public then(resolved: ConstructorType<[T]>) {\n this.resolvers.add(resolved);\n if (this.resolvers.size === 1) {\n this.$base.then(this.resolver);\n } else if (isFilled(this.lastV)) {\n resolved(this.lastV);\n }\n return this;\n }\n\n public use(value: T) {\n if (this.source) {\n this.source.use(value);\n } else {\n this.resolver(value);\n }\n return this;\n }\n\n public catch(rejected: ConstructorType<[unknown]>) {\n this.$base.catch(rejected);\n return this;\n }\n\n public destroy() {\n this.resolvers.clear();\n return this;\n }\n\n public value() {\n return Primitive(this);\n }\n\n public chain(m: MessageType<T>) {\n m.then(this.use.bind(this));\n return this;\n }\n}\n","import { Late } from \"components/Late\";\nimport { Shared } from \"components/Shared\";\n\n/**\n * An message with a value that will be set later,\n * capable of responding to many resolvers\n */\nexport function LateShared<T>(value?: T) {\n const l = Late(value);\n return Shared(l);\n}\n","import { Message } from \"base/Message\";\nimport { LateShared } from \"components/LateShared\";\nimport { Context } from \"components/Context\";\nimport { ContextType } from \"types/ContextType\";\n\n/**\n * Message for the arrival of a specific RPC message\n * for specific transport\n */\nexport function ContextOf(transport: string) {\n const $msg = LateShared<ContextType>();\n Context.transport.set(transport, $msg.use.bind($msg));\n return Message<ContextType>((t) => {\n $msg.then(t);\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MaybeMessage, MessageType } from \"types/MessageType\";\n\n/**\n * Filters values from the source message based on a predicate function,\n * optionally providing a default value when the predicate fails.\n */\nexport function Filtered<T>(\n base: MaybeMessage<T>,\n predicate: ConstructorType<[T], boolean>,\n defaultValue?: T,\n): MessageType<T> {\n const $base = ActualMessage(base);\n return Message<T>(function FilteredImpl(r) {\n $base.then((v) => {\n if (predicate(v)) {\n r(v);\n } else if (defaultValue !== undefined) {\n r(defaultValue);\n }\n });\n });\n}\n","import { Filtered } from \"components/Filtered\";\nimport { LateShared } from \"components/LateShared\";\nimport { Shared } from \"components/Shared\";\nimport { EmptyType } from \"types/EmptyType\";\nimport { MessageType } from \"types/MessageType\";\n\nexport const Nothing = Symbol(\"nothing\");\n\n/**\n * Helps to split message and empty\n * response\n */\nexport function Empty<T>($base: MessageType<T>) {\n return new EmptyImpl<T>($base);\n}\n\nexport class EmptyImpl<T> implements EmptyType {\n private $empty = LateShared<boolean>();\n\n public constructor(private $base: MessageType<T>) {}\n\n public message() {\n Shared(this.$base).then((v) => {\n if (v === Nothing) {\n this.$empty.use(true);\n }\n });\n return Filtered(this.$base, (v) => v !== Nothing);\n }\n\n public empty(): MessageType<boolean> {\n return this.$empty;\n }\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\ntype ExecutorApplier<T> = (executor: (v: T) => void) => (v: T) => void;\n\n/**\n * Applies a value transfer function to the resolver\n * and returns the same value transfer function for the resolver\n * Useful for applying functions like debounced or throttle\n */\nexport function ExecutorApplied<T>(\n $base: MessageType<T>,\n applier: ExecutorApplier<T>,\n) {\n return Message<T>(function ExecutorAppliedImpl(r) {\n $base.then(applier(r));\n });\n}\n","import { MaybeMessage } from \"types/MessageType\";\nimport { All } from \"components/All\";\nimport { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { ConstructorType } from \"types/ConstructorType\";\n\n/**\n * A message derived from event with a different\n * method call interface, based on callbacks.\n * Allows attaching a custom handler to an existing event source\n * and presenting it as a silentium message\n */\nexport function FromEvent<T>(\n emitter: MaybeMessage<any>,\n eventName: MaybeMessage<string>,\n subscribeMethod: MaybeMessage<string>,\n unsubscribeMethod?: MaybeMessage<string>,\n) {\n const $emitter = ActualMessage(emitter);\n const $eventName = ActualMessage(eventName);\n const $subscribeMethod = ActualMessage(subscribeMethod);\n const $unsubscribeMethod = ActualMessage(unsubscribeMethod);\n return Message<T>((r) => {\n let lastR: ConstructorType<[T]> | null = null;\n const handler = (v: T) => {\n if (lastR) {\n lastR(v);\n }\n };\n All($emitter, $eventName, $subscribeMethod).then(\n ([emitter, eventName, subscribe]) => {\n lastR = r;\n if (!emitter?.[subscribe]) {\n return;\n }\n emitter[subscribe](eventName, handler);\n },\n );\n return () => {\n lastR = null;\n if (!$unsubscribeMethod) {\n return;\n }\n All($emitter, $eventName, $unsubscribeMethod).then(\n ([emitter, eventName, unsubscribe]) => {\n emitter?.[unsubscribe as string]?.(eventName, handler);\n },\n );\n };\n });\n}\n","import { MaybeMessage, MessageType } from \"types/MessageType\";\nimport { All } from \"components/All\";\nimport { isMessage } from \"helpers/guards\";\nimport { Of } from \"base/Of\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { Message } from \"base/Message\";\nimport { ActualMessage } from \"base/ActualMessage\";\nimport { DestroyContainer } from \"base/DestroyContainer\";\n\n/**\n * Component that applies an info object constructor to each data item,\n * producing an information source with new values\n */\nexport function Map<T, TG>(\n base: MaybeMessage<T[]>,\n target: ConstructorType<[any], MessageType<TG>>,\n) {\n const $base = ActualMessage(base);\n return Message<TG[]>((r) => {\n const infos: MessageType<TG>[] = [];\n const dc = DestroyContainer();\n $base.then((v) => {\n dc.destroy();\n v.forEach((val) => {\n let $val: MessageType<T> | T = val;\n if (!isMessage($val as object)) {\n $val = Of($val);\n }\n const info = target($val);\n dc.add(info);\n infos.push(info);\n });\n All(...infos).then(r);\n });\n });\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Limits the number of values from the information source\n * to a single value - once the first value is emitted, no more\n * values are delivered from the source\n */\nexport function Once<T>($base: MessageType<T>) {\n return Message<T>((r) => {\n let isFilled = false;\n $base.then((v) => {\n if (!isFilled) {\n isFilled = true;\n r(v);\n }\n });\n });\n}\n","import { DestroyContainer } from \"base/DestroyContainer\";\nimport { Message } from \"base/Message\";\nimport { LateShared } from \"components/LateShared\";\nimport { ConstructorType } from \"types/ConstructorType\";\nimport { MessageType } from \"types/MessageType\";\n\nexport function Process<T, R = unknown>(\n $base: MessageType<T>,\n builder: ConstructorType<[T], MessageType<R>>,\n) {\n return Message<R>((resolve, reject) => {\n const $res = LateShared<R>();\n const dc = DestroyContainer();\n\n $base.then((v) => {\n dc.destroy();\n const $msg = builder(v);\n dc.add($msg);\n $res.chain($msg);\n $msg.catch(reject);\n });\n $base.catch(reject);\n $res.then(resolve);\n\n return () => {\n dc.destroy();\n };\n });\n}\n","import { Message } from \"base/Message\";\nimport { MessageType } from \"types/MessageType\";\n\n/**\n * Creates a sequence that accumulates all values from the source into an array,\n * emitting the growing array with each new value.\n */\nexport function Sequence<T>($base: MessageType<T>) {\n return Message<T[]>((r) => {\n const result: T[] = [];\n $base.then((v) => {\n result.push(v);\n r(result);\n });\n });\n}\n","import { ActualMessage } from \"base/ActualMessage\";\nimport { Message } from \"base/Message\";\nimport { MaybeMessage } from \"types/MessageType\";\n\n/**\n * Component that receives a data array and yields values one by one\n */\nexport function Stream<T>(base: MaybeMessage<T[]>) {\n const $base = ActualMessage(base);\n return Message<T>((r) => {\n $base.then((v) => {\n v.forEach((cv) => {\n r(cv);\n });\n });\n });\n}\n"],"names":["__publicField","emitter","eventName","Map"],"mappings":";;AAOa,MAAA,QAAA,GAAW,CACtB,KAC0C,KAAA;AAC1C,EAAO,OAAA,KAAA,KAAU,UAAa,KAAU,KAAA,IAAA;AAC1C;AAKO,SAAS,UAAU,CAA8B,EAA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A;AACH;;ACRO,SAAS,OAAU,IAAyB,EAAA;AACjD,EAAM,MAAA,KAAA,GAAQ,cAAc,IAAI,CAAA;AAChC,EAAO,OAAA,OAAA,CAAW,CAAC,CAAM,KAAA;AACvB,IAAM,KAAA,CAAA,IAAA,CAAK,CAAC,CAAM,KAAA;AAChB,MAAE,CAAA,CAAA,OAAA,CAAQ,CAAC,EAAO,KAAA;AAChB,QAAA,CAAA,CAAE,EAAE,CAAA;AAAA,OACL,CAAA;AAAA,KACF,CAAA;AAAA,GACF,CAAA;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/silentium.d.ts
CHANGED
|
@@ -257,6 +257,24 @@ declare function ContextChain(base: MaybeMessage): (context: ContextType) => voi
|
|
|
257
257
|
*/
|
|
258
258
|
declare function ContextOf(transport: string): MessageRx<ContextType>;
|
|
259
259
|
|
|
260
|
+
interface EmptyType {
|
|
261
|
+
empty(): MessageType<boolean>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare const Nothing: unique symbol;
|
|
265
|
+
/**
|
|
266
|
+
* Helps to split message and empty
|
|
267
|
+
* response
|
|
268
|
+
*/
|
|
269
|
+
declare function Empty<T>($base: MessageType<T>): EmptyImpl<T>;
|
|
270
|
+
declare class EmptyImpl<T> implements EmptyType {
|
|
271
|
+
private $base;
|
|
272
|
+
private $empty;
|
|
273
|
+
constructor($base: MessageType<T>);
|
|
274
|
+
message(): MessageType<T>;
|
|
275
|
+
empty(): MessageType<boolean>;
|
|
276
|
+
}
|
|
277
|
+
|
|
260
278
|
type ExecutorApplier<T> = (executor: (v: T) => void) => (v: T) => void;
|
|
261
279
|
/**
|
|
262
280
|
* Applies a value transfer function to the resolver
|
|
@@ -374,4 +392,4 @@ declare function isDestroyable(o: unknown): o is DestroyableType;
|
|
|
374
392
|
*/
|
|
375
393
|
declare function isDestroyed(o: unknown): o is DestroyedType;
|
|
376
394
|
|
|
377
|
-
export { ActualMessage, All, Any, Applied, AppliedDestructured, Catch, Chain, Chainable, ChainableImpl, type ConstructorType, Context, ContextChain, ContextOf, type ContextType, DestroyContainer, DestroyContainerImpl, Destroyable, DestroyableImpl, type DestroyableType, type DestroyedType, ExecutorApplied, Filtered, FromEvent, Late, LateImpl, LateShared, Local, Map$1 as Map, type MaybeMessage, Message, type MessageExecutorType, MessageRx, MessageSource, MessageSourceImpl, type MessageSourceType, type MessageType, type MessageTypeValue, New, Of, Once, Primitive, PrimitiveImpl, Process, Rejections, Sequence, Shared, SharedImpl, type SourceType, Stream, Void, ensureFunction, ensureMessage, isDestroyable, isDestroyed, isFilled, isMessage, isSource };
|
|
395
|
+
export { ActualMessage, All, Any, Applied, AppliedDestructured, Catch, Chain, Chainable, ChainableImpl, type ConstructorType, Context, ContextChain, ContextOf, type ContextType, DestroyContainer, DestroyContainerImpl, Destroyable, DestroyableImpl, type DestroyableType, type DestroyedType, Empty, EmptyImpl, ExecutorApplied, Filtered, FromEvent, Late, LateImpl, LateShared, Local, Map$1 as Map, type MaybeMessage, Message, type MessageExecutorType, MessageRx, MessageSource, MessageSourceImpl, type MessageSourceType, type MessageType, type MessageTypeValue, New, Nothing, Of, Once, Primitive, PrimitiveImpl, Process, Rejections, Sequence, Shared, SharedImpl, type SourceType, Stream, Void, ensureFunction, ensureMessage, isDestroyable, isDestroyed, isFilled, isMessage, isSource };
|