melonykit 0.15.18 → 0.15.19

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
@@ -1271,10 +1271,10 @@ var q = {
1271
1271
  font-family: ${U.fontFamily}, sans-serif;
1272
1272
  `,
1273
1273
  left: H`
1274
- right: calc(100% + 1rem);
1274
+ right: calc(100% + .5rem);
1275
1275
  `,
1276
1276
  right: H`
1277
- left: calc(100% + 1rem);
1277
+ left: calc(100% + .5rem);
1278
1278
  `
1279
1279
  }, yt = ({ type: e = "normal", width: t = "100%", value: n = 0 }) => /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s("div", {
1280
1280
  className: J.base,
@@ -30,10 +30,20 @@ export async function invoke(invocationName, data) {
30
30
  return Promise.resolve().then(() => handler(data));
31
31
  };
32
32
 
33
- export function subscribe(eventName, listener) {
34
- emitter.on(eventName, listener);
33
+ export function subscribe(eventNames, listener) {
34
+ const names = [...new Set(
35
+ Array.isArray(eventNames) ? eventNames : [eventNames]
36
+ )];
35
37
 
36
- return () => emitter.off(eventName, listener);
38
+ for (const eventName of names) {
39
+ emitter.on(eventName, listener);
40
+ }
41
+
42
+ return () => {
43
+ for (const eventName of names) {
44
+ emitter.off(eventName, listener);
45
+ }
46
+ };
37
47
  };
38
48
 
39
49
  export async function publish(eventName, data) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Vadim Hermann",
3
3
  "name": "melonykit",
4
- "version": "0.15.18",
4
+ "version": "0.15.19",
5
5
  "type": "module",
6
6
  "description": "Preact based ui and utility functions toolkit",
7
7
  "main": "./dist/index.js",