canvasengine 2.0.0-beta.36 → 2.0.0-beta.37

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { h as a } from "./index--faZajmD.js";
2
- import { A as r, X as o, Y as n, q as l, v as c, r as p, C as S, d as u, U as m, W as g, ai as d, f as b, D as C, ah as h, af as T, w as j, j as w, G as D, t as f, c as v, I as E, K as O, M as k, Q as y, O as P, P as V, ag as x, R as A, z as B, S as G, g as H, e as M, B as N, y as R, J as q, L as F, T as I, x as K, b as U, H as z, N as J, V as L, ae as Q, ad as W, ab as X, k as Y, a2 as Z, a0 as _, a3 as $, l as aa, a7 as sa, ac as ea, m as ta, n as ia, Z as ra, o as oa, i as na, _ as la, p as ca, a8 as pa, a1 as Sa, a5 as ua, a4 as ma, aa as ga, $ as da, s as ba, a6 as Ca, a9 as ha, a as Ta, u as ja } from "./index--faZajmD.js";
1
+ import { h as a } from "./index-BqwprEPH.js";
2
+ import { A as r, X as o, Y as n, q as l, v as c, r as p, C as S, d as u, U as m, W as g, ai as d, f as b, D as C, ah as h, af as T, w as j, j as w, G as D, t as f, c as v, I as E, K as O, M as k, Q as y, O as P, P as V, ag as x, R as A, z as B, S as G, g as H, e as M, B as N, y as R, J as q, L as F, T as I, x as K, b as U, H as z, N as J, V as L, ae as Q, ad as W, ab as X, k as Y, a2 as Z, a0 as _, a3 as $, l as aa, a7 as sa, ac as ea, m as ta, n as ia, Z as ra, o as oa, i as na, _ as la, p as ca, a8 as pa, a1 as Sa, a5 as ua, a4 as ma, aa as ga, $ as da, s as ba, a6 as Ca, a9 as ha, a as Ta, u as ja } from "./index-BqwprEPH.js";
3
3
  const e = a.Howler;
4
4
  export {
5
5
  r as ArraySubject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvasengine",
3
- "version": "2.0.0-beta.36",
3
+ "version": "2.0.0-beta.37",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -101,7 +101,15 @@ function destroyElement(element: Element | Element[]) {
101
101
  element.componentInstance.onDestroy(element.parent as any, () => {
102
102
  element.propSubscriptions?.forEach((sub) => sub.unsubscribe());
103
103
  element.effectSubscriptions?.forEach((sub) => sub.unsubscribe());
104
- element.effectUnmounts?.forEach((fn) => fn?.());
104
+ element.effectUnmounts?.forEach((fn) => {
105
+ if (isPromise(fn)) {
106
+ (fn as unknown as Promise<any>).then((retFn) => {
107
+ retFn?.();
108
+ });
109
+ } else {
110
+ fn?.();
111
+ }
112
+ });
105
113
  });
106
114
  } else {
107
115
  // If componentInstance is undefined or doesn't have onDestroy, still clean up subscriptions