minimal-piral 1.3.1-beta.6135 → 1.3.2-beta.6156
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/app/index.d.ts +6 -0
- package/app/{index.abba5f.js → index.db81e3.js} +21 -10
- package/app/index.db81e3.js.map +1 -0
- package/app/index.html +1 -1
- package/app/index.js +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +5 -5
- package/app/index.abba5f.js.map +0 -1
package/app/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export interface EventEmitter {
|
|
|
21
21
|
* @param callback The callback to trigger.
|
|
22
22
|
*/
|
|
23
23
|
on<K extends keyof PiralEventMap>(type: K, callback: Listener<PiralEventMap[K]>): EventEmitter;
|
|
24
|
+
/**
|
|
25
|
+
* Attaches a new event listener that is removed once the event fired.
|
|
26
|
+
* @param type The type of the event to listen for.
|
|
27
|
+
* @param callback The callback to trigger.
|
|
28
|
+
*/
|
|
29
|
+
once<K extends keyof PiralEventMap>(type: K, callback: Listener<PiralEventMap[K]>): EventEmitter;
|
|
24
30
|
/**
|
|
25
31
|
* Detaches an existing event listener.
|
|
26
32
|
* @param type The type of the event to listen for.
|
|
@@ -3653,12 +3653,12 @@ function installPiralDebug(options) {
|
|
|
3653
3653
|
debug: debugApiVersion,
|
|
3654
3654
|
instance: {
|
|
3655
3655
|
name: "minimal-piral",
|
|
3656
|
-
version: "1.3.
|
|
3656
|
+
version: "1.3.2-beta.6156",
|
|
3657
3657
|
dependencies: "tslib,react,react-dom,react-router,react-router-dom"
|
|
3658
3658
|
},
|
|
3659
3659
|
build: {
|
|
3660
|
-
date: "2023-10-
|
|
3661
|
-
cli: "1.3.1
|
|
3660
|
+
date: "2023-10-20T14:53:54.334Z",
|
|
3661
|
+
cli: "1.3.1",
|
|
3662
3662
|
compat: "1"
|
|
3663
3663
|
}
|
|
3664
3664
|
};
|
|
@@ -43886,6 +43886,7 @@ function runPilet(createApi, pilet) {
|
|
|
43886
43886
|
function initializeApi(target, events) {
|
|
43887
43887
|
return {
|
|
43888
43888
|
on: events.on,
|
|
43889
|
+
once: events.once,
|
|
43889
43890
|
off: events.off,
|
|
43890
43891
|
emit: events.emit,
|
|
43891
43892
|
meta: (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, target)
|
|
@@ -44337,6 +44338,14 @@ function createListener() {
|
|
|
44337
44338
|
eventListeners.push([callback, listener]);
|
|
44338
44339
|
return this;
|
|
44339
44340
|
},
|
|
44341
|
+
once: function once(type, callback) {
|
|
44342
|
+
var _this = this;
|
|
44343
|
+
var cb = function cb(ev) {
|
|
44344
|
+
_this.off(type, cb);
|
|
44345
|
+
callback(ev);
|
|
44346
|
+
};
|
|
44347
|
+
return this.on(type, cb);
|
|
44348
|
+
},
|
|
44340
44349
|
off: function off(type, callback) {
|
|
44341
44350
|
var _eventListeners$filte = eventListeners.filter(function (m) {
|
|
44342
44351
|
return m[0] === callback;
|
|
@@ -44350,12 +44359,14 @@ function createListener() {
|
|
|
44350
44359
|
return this;
|
|
44351
44360
|
},
|
|
44352
44361
|
emit: function emit(type, arg) {
|
|
44353
|
-
|
|
44354
|
-
|
|
44355
|
-
|
|
44356
|
-
|
|
44357
|
-
|
|
44358
|
-
|
|
44362
|
+
document.body.dispatchEvent(new CustomEvent(nameOf(type), {
|
|
44363
|
+
bubbles: false,
|
|
44364
|
+
cancelable: false,
|
|
44365
|
+
detail: {
|
|
44366
|
+
arg: arg,
|
|
44367
|
+
state: state
|
|
44368
|
+
}
|
|
44369
|
+
}));
|
|
44359
44370
|
return this;
|
|
44360
44371
|
}
|
|
44361
44372
|
};
|
|
@@ -44549,4 +44560,4 @@ var instance = (0,piral_core__WEBPACK_IMPORTED_MODULE_2__.createInstance)({
|
|
|
44549
44560
|
|
|
44550
44561
|
/******/ })()
|
|
44551
44562
|
;
|
|
44552
|
-
//# sourceMappingURL=index.
|
|
44563
|
+
//# sourceMappingURL=index.db81e3.js.map
|