quirk-ui 0.0.13 → 0.0.15

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.
@@ -1,8 +1,6 @@
1
- import { jsxs as y, jsx as g } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as p } from "react/jsx-runtime";
2
2
  import { createContext as x, useState as h, useCallback as U, useContext as w } from "react";
3
- import '../../assets/index.css';/* empty css */
4
3
  import { NotificationContainer as b } from "../../components/NotificationContainer/index.js";
5
- import "../../components/Tabs/index.js";
6
4
  const o = [];
7
5
  for (let t = 0; t < 256; ++t)
8
6
  o.push((t + 256).toString(16).slice(1));
@@ -21,43 +19,43 @@ function C() {
21
19
  }
22
20
  const f = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), m = { randomUUID: f };
23
21
  function D(t, n, c) {
24
- var e;
22
+ var i;
25
23
  if (m.randomUUID && !t)
26
24
  return m.randomUUID();
27
25
  t = t || {};
28
- const i = t.random ?? ((e = t.rng) == null ? void 0 : e.call(t)) ?? C();
29
- if (i.length < 16)
26
+ const e = t.random ?? ((i = t.rng) == null ? void 0 : i.call(t)) ?? C();
27
+ if (e.length < 16)
30
28
  throw new Error("Random bytes length must be >= 16");
31
- return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, N(i);
29
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, N(e);
32
30
  }
33
31
  const l = x(
34
32
  void 0
35
- ), E = ({
33
+ ), V = ({
36
34
  children: t
37
35
  }) => {
38
- const [n, c] = h([]), i = U(
36
+ const [n, c] = h([]), e = U(
39
37
  (r, u = "info", d = 3e3) => {
40
38
  const s = D();
41
- c((p) => [
42
- ...p,
39
+ c((y) => [
40
+ ...y,
43
41
  {
44
42
  id: s,
45
43
  message: r,
46
44
  variant: u,
47
45
  duration: d,
48
- onClose: () => e(s)
46
+ onClose: () => i(s)
49
47
  }
50
48
  ]);
51
49
  },
52
50
  []
53
- ), e = (r) => {
51
+ ), i = (r) => {
54
52
  c((u) => u.filter((d) => d.id !== r));
55
53
  };
56
- return /* @__PURE__ */ y(l.Provider, { value: { showNotification: i }, children: [
54
+ return /* @__PURE__ */ g(l.Provider, { value: { showNotification: e }, children: [
57
55
  t,
58
- /* @__PURE__ */ g(b, { notifications: n })
56
+ /* @__PURE__ */ p(b, { notifications: n })
59
57
  ] });
60
- }, M = () => {
58
+ }, j = () => {
61
59
  const t = w(l);
62
60
  if (!t)
63
61
  throw new Error(
@@ -66,6 +64,6 @@ const l = x(
66
64
  return t;
67
65
  };
68
66
  export {
69
- E as NotificationManager,
70
- M as useNotifications
67
+ V as NotificationManager,
68
+ j as useNotifications
71
69
  };
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.13",
4
+ "version": "0.0.15",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/lib/main.d.ts",
9
- "style": "./dist/assets/index.css",
10
9
  "default": "./dist/main.js"
10
+ },
11
+ "./tokens.css": {
12
+ "default": "./dist/assets/index.css"
11
13
  }
12
14
  },
13
15
  "main": "dist/main.js",