@peektravel/app-utilities 0.7.3 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/index.cjs CHANGED
@@ -291,11 +291,20 @@ function addReactSafeSetters(ctor) {
291
291
  proto = Object.getPrototypeOf(proto);
292
292
  }
293
293
  }
294
+ var registered = [];
294
295
  function define(tag, ctor) {
295
296
  if (typeof customElements === "undefined") return;
296
297
  if (customElements.get(tag)) return;
297
298
  addReactSafeSetters(ctor);
298
299
  customElements.define(tag, ctor);
300
+ registered.push(tag);
301
+ }
302
+ function registeredTags() {
303
+ return registered.slice();
304
+ }
305
+ function whenOdysseyReady() {
306
+ if (typeof customElements === "undefined") return Promise.resolve();
307
+ return Promise.all(registered.map((tag) => customElements.whenDefined(tag))).then(() => void 0);
299
308
  }
300
309
 
301
310
  // src/ui/icons-data.ts
@@ -4458,8 +4467,10 @@ exports.portal = portal;
4458
4467
  exports.position = position;
4459
4468
  exports.registerIcon = registerIcon;
4460
4469
  exports.registerTranslation = registerTranslation;
4470
+ exports.registeredTags = registeredTags;
4461
4471
  exports.removePortal = removePortal;
4462
4472
  exports.renderIconSvg = renderIconSvg;
4463
4473
  exports.toast = toast;
4474
+ exports.whenOdysseyReady = whenOdysseyReady;
4464
4475
  //# sourceMappingURL=index.cjs.map
4465
4476
  //# sourceMappingURL=index.cjs.map