melonykit 0.15.17 → 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,
@@ -1315,9 +1315,9 @@ var q = {
1315
1315
  };
1316
1316
  //#endregion
1317
1317
  //#region src/components/_box.jsx
1318
- function bt({ type: e = "normal", className: t, width: n, height: r, children: i }) {
1318
+ function bt({ className: e, type: t = "primary", width: n, height: r, children: i }) {
1319
1319
  return /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s("div", {
1320
- className: V(xt.base, xt[e] ?? xt.normal, t),
1320
+ className: V(xt.base, xt[t] ?? xt.primary, e),
1321
1321
  style: {
1322
1322
  width: n,
1323
1323
  height: r
@@ -1328,15 +1328,16 @@ function bt({ type: e = "normal", className: t, width: n, height: r, children: i
1328
1328
  var xt = {
1329
1329
  base: H`
1330
1330
  position: relative;
1331
- border-radius: 18px;
1332
- border: solid 2px #eee;
1331
+ border: solid 1px #dce0e4;
1332
+ border-radius: 12px;
1333
1333
  padding: 1.875rem 1.25rem;
1334
- box-shadow: ${U.colors.shadow.primary};
1334
+ box-shadow: 0 1px 0 rgb(22 24 38 / .08),
1335
+ 0 4px 10px rgb(22 24 38 / .045);
1335
1336
  `,
1336
- normal: H`
1337
+ primary: H`
1337
1338
  background-color: ${U.colors.back.primary};
1338
1339
  `,
1339
- alternative: H`
1340
+ secondary: H`
1340
1341
  background-color: #fafafa;
1341
1342
  `
1342
1343
  };
@@ -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.17",
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",