minimal-piral 1.3.1 → 1.3.2-beta.6173

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.
@@ -3653,12 +3653,12 @@ function installPiralDebug(options) {
3653
3653
  debug: debugApiVersion,
3654
3654
  instance: {
3655
3655
  name: "minimal-piral",
3656
- version: "1.3.1",
3656
+ version: "1.3.2-beta.6173",
3657
3657
  dependencies: "tslib,react,react-dom,react-router,react-router-dom"
3658
3658
  },
3659
3659
  build: {
3660
- date: "2023-10-19T19:24:01.410Z",
3661
- cli: "1.3.1",
3660
+ date: "2023-10-20T20:41:51.582Z",
3661
+ cli: "1.3.2-beta.6173",
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
- var ce = document.createEvent("CustomEvent");
44354
- ce.initCustomEvent(nameOf(type), false, false, {
44355
- arg: arg,
44356
- state: state
44357
- });
44358
- document.body.dispatchEvent(ce);
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.ba7269.js.map
44563
+ //# sourceMappingURL=index.035685.js.map