@versini/ui-bubble 5.0.8 → 6.0.1

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,25 +1,124 @@
1
- import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
- import { ButtonIcon as C } from "@versini/ui-button";
3
- import { IconCopied as E, IconCopy as N } from "@versini/ui-icons";
4
- import { useState as $, useEffect as z } from "react";
5
- import l from "clsx";
6
- const c = "av-bubble", O = ({ kind: e, noMaxWidth: r }) => l("px-4 py-2", {
7
- "max-w-xs sm:max-w-md md:max-w-2xl": !r,
8
- "lg:max-w-3xl": e === "left" && !r
9
- }), T = ({ kind: e }) => l({
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import { ButtonIcon as I } from "@versini/ui-button";
3
+ import { useState as y, useEffect as C } from "react";
4
+ import c from "clsx";
5
+ const p = "av-bubble", v = ({
6
+ children: e,
7
+ fill: t,
8
+ viewBox: o,
9
+ className: i,
10
+ defaultViewBox: r,
11
+ size: n,
12
+ title: l,
13
+ semantic: b = !1,
14
+ ...f
15
+ }) => {
16
+ const h = c(n, i);
17
+ return /* @__PURE__ */ d(
18
+ "svg",
19
+ {
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ className: h,
22
+ viewBox: o || r,
23
+ fill: t || "currentColor",
24
+ role: "img",
25
+ "aria-hidden": !b,
26
+ focusable: !1,
27
+ ...f,
28
+ children: [
29
+ l && b && /* @__PURE__ */ s("title", { children: l }),
30
+ e
31
+ ]
32
+ }
33
+ );
34
+ };
35
+ /*!
36
+ @versini/ui-svgicon v4.2.1
37
+ © 2025 gizmette.com
38
+ */
39
+ try {
40
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
41
+ version: "4.2.1",
42
+ buildTime: "08/27/2025 08:27 AM EDT",
43
+ homepage: "https://github.com/aversini/ui-components",
44
+ license: "MIT"
45
+ });
46
+ } catch {
47
+ }
48
+ const E = ({
49
+ className: e,
50
+ viewBox: t,
51
+ title: o,
52
+ monotone: i,
53
+ ...r
54
+ }) => /* @__PURE__ */ d(
55
+ v,
56
+ {
57
+ defaultViewBox: "0 0 448 512",
58
+ size: "size-5",
59
+ viewBox: t,
60
+ className: e,
61
+ title: o || "Copied",
62
+ ...r,
63
+ children: [
64
+ /* @__PURE__ */ s(
65
+ "path",
66
+ {
67
+ d: "M0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96m104 160c0-6.1 2.3-12.3 7-17 9.4-9.4 24.6-9.4 33.9 0l47 47 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9.6 1.5 1 2.9 1.3 4.4.2 1.1.3 2.2.3 2.2.1 1.2.1 1.2.1 2.5-.1 1.5-.1 1.9-.1 2.3-.1.7-.2 1.5-.3 2.2-.3 1.5-.7 3-1.3 4.4-1.2 2.9-2.9 5.6-5.3 7.9l-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7l-64-64c-4.7-4.7-7-10.8-7-17z",
68
+ opacity: ".4"
69
+ }
70
+ ),
71
+ /* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
72
+ ]
73
+ }
74
+ ), V = ({
75
+ className: e,
76
+ viewBox: t,
77
+ title: o,
78
+ monotone: i,
79
+ ...r
80
+ }) => /* @__PURE__ */ s(
81
+ v,
82
+ {
83
+ defaultViewBox: "0 0 512 512",
84
+ size: "size-5",
85
+ viewBox: t,
86
+ className: e,
87
+ title: o || "Copy",
88
+ ...r,
89
+ children: /* @__PURE__ */ s("path", { d: "M64 464h224c8.8 0 16-7.2 16-16v-64h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m160-160h224c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m-64-16V64c0-35.3 28.7-64 64-64h224c35.3 0 64 28.7 64 64v224c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64" })
90
+ }
91
+ );
92
+ /*!
93
+ @versini/ui-icons v4.11.0
94
+ © 2025 gizmette.com
95
+ */
96
+ try {
97
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
98
+ version: "4.11.0",
99
+ buildTime: "08/27/2025 08:28 AM EDT",
100
+ homepage: "https://github.com/aversini/ui-components",
101
+ license: "MIT"
102
+ });
103
+ } catch {
104
+ }
105
+ const z = ({ kind: e, noMaxWidth: t }) => c("px-4 py-2", {
106
+ "max-w-xs sm:max-w-md md:max-w-2xl": !t,
107
+ "lg:max-w-3xl": e === "left" && !t
108
+ }), S = ({ kind: e }) => c({
10
109
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
11
110
  "bg-surface-accent": e === "right"
12
- }), I = ({ kind: e }) => l(
111
+ }), T = ({ kind: e }) => c(
13
112
  "prose prose-dark dark:prose-lighter",
14
113
  "prose-blockquote:my-1",
15
114
  "prose-ol:my-1 prose-ul:my-1",
16
115
  {
17
116
  "text-copy-lighter": e === "right"
18
117
  }
19
- ), S = ({ kind: e, tail: r }) => {
20
- if (r)
21
- return l(
22
- `${c}-${e}-tail`,
118
+ ), M = ({ kind: e, tail: t }) => {
119
+ if (t)
120
+ return c(
121
+ `${p}-${e}-tail`,
23
122
  "rounded-3xl",
24
123
  "relative",
25
124
  "before:content-['']",
@@ -32,106 +131,106 @@ const c = "av-bubble", O = ({ kind: e, noMaxWidth: r }) => l("px-4 py-2", {
32
131
  "last-bubble-left:before:left-[2px] last-bubble-left:before:border-r-[8px] last-bubble-left:before:border-r-surface-lighter last-bubble-left:dark:before:border-r-surface-dark last-bubble-left:before:rounded-br-[100%]": e === "left"
33
132
  }
34
133
  );
35
- if (!r)
36
- return l("rounded-b-xl", {
134
+ if (!t)
135
+ return c("rounded-b-xl", {
37
136
  "rounded-tr-xl": e === "left",
38
137
  "rounded-tl-xl": e === "right"
39
138
  });
40
- }, _ = ({
139
+ }, O = ({
41
140
  kind: e,
42
- className: r,
43
- contentClassName: u,
141
+ className: t,
142
+ contentClassName: o,
44
143
  noMaxWidth: i,
45
- tail: t
144
+ tail: r
46
145
  }) => {
47
- const n = l(
48
- c,
49
- `${c}-${e}`,
146
+ const n = c(
147
+ p,
148
+ `${p}-${e}`,
50
149
  "flex items-start",
51
150
  {
52
151
  "flex-row-reverse": e === "right"
53
152
  },
54
- r
55
- ), s = l(
56
- `${c}-content`,
153
+ t
154
+ ), l = c(
155
+ `${p}-content`,
57
156
  "flex flex-col empty:hidden",
58
- O({ kind: e, noMaxWidth: i }),
59
- I({ kind: e }),
157
+ z({ kind: e, noMaxWidth: i }),
60
158
  T({ kind: e }),
61
- S({ kind: e, tail: t }),
62
- u
63
- ), m = "pr-2 pt-1 text-end text-xs text-copy-light", p = l("flex flex-col-reverse sm:flex-row", {
64
- "ml-2": e === "left" && !t,
65
- "mr-2": e === "right" && !t,
66
- "ml-1": e === "left" && t,
67
- "mr-1": e === "right" && t
159
+ S({ kind: e }),
160
+ M({ kind: e, tail: r }),
161
+ o
162
+ ), b = "pr-2 pt-1 text-end text-xs text-copy-light", f = c("flex flex-col-reverse sm:flex-row", {
163
+ "ml-2": e === "left" && !r,
164
+ "mr-2": e === "right" && !r,
165
+ "ml-1": e === "left" && r,
166
+ "mr-1": e === "right" && r
68
167
  });
69
168
  return {
70
169
  wrapper: n,
71
- main: s,
72
- footer: m,
73
- copyButton: p
170
+ main: l,
171
+ footer: b,
172
+ copyButton: f
74
173
  };
75
- }, j = "FOOTER_EMPTY", U = ({
174
+ }, $ = "FOOTER_EMPTY", A = ({
76
175
  children: e,
77
- kind: r = "left",
78
- className: u,
176
+ kind: t = "left",
177
+ className: o,
79
178
  contentClassName: i,
80
- footer: t,
179
+ footer: r,
81
180
  rawFooter: n,
82
- copyToClipboard: s,
83
- copyToClipboardFocusMode: m = "system",
84
- copyToClipboardMode: p = "system",
85
- noMaxWidth: B = !1,
86
- tail: y = !1
181
+ copyToClipboard: l,
182
+ copyToClipboardFocusMode: b = "system",
183
+ copyToClipboardMode: f = "system",
184
+ noMaxWidth: h = !1,
185
+ tail: B = !1
87
186
  }) => {
88
- const [a, x] = $(!1), f = _({
89
- kind: r,
90
- className: u,
187
+ const [u, x] = y(!1), m = O({
188
+ kind: t,
189
+ className: o,
91
190
  contentClassName: i,
92
- noMaxWidth: B,
93
- tail: y
94
- }), v = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), w = () => {
95
- x(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
191
+ noMaxWidth: h,
192
+ tail: B
193
+ }), _ = !!l && (typeof l == "function" || typeof l == "string" || typeof e == "string"), N = () => {
194
+ x(!0), typeof l == "function" ? l(e) : typeof l == "string" ? navigator.clipboard.writeText(l) : typeof e == "string" && navigator.clipboard.writeText(e);
96
195
  };
97
- return z(() => {
98
- let b;
99
- return a && (b = window.setTimeout(() => {
196
+ return C(() => {
197
+ let a;
198
+ return u && (a = window.setTimeout(() => {
100
199
  x(!1);
101
200
  }, 3e3)), () => {
102
- clearTimeout(b);
201
+ clearTimeout(a);
103
202
  };
104
- }, [a]), /* @__PURE__ */ g("div", { className: f.wrapper, children: [
105
- /* @__PURE__ */ g("div", { children: [
106
- /* @__PURE__ */ o("div", { className: f.main, children: e }),
107
- t && Object.keys(t).map((b, h) => {
108
- const d = t[b];
109
- return d === j ? /* @__PURE__ */ o("div", { className: "prose-p:m-0", children: /* @__PURE__ */ o("p", { className: f.footer, "aria-hidden": "true", children: /* @__PURE__ */ o("span", { className: "invisible", children: " " }) }) }, `${b}-${h}`) : d ? /* @__PURE__ */ o("div", { className: "prose-p:m-0", children: /* @__PURE__ */ g("p", { className: f.footer, children: [
110
- b,
203
+ }, [u]), /* @__PURE__ */ d("div", { className: m.wrapper, children: [
204
+ /* @__PURE__ */ d("div", { children: [
205
+ /* @__PURE__ */ s("div", { className: m.main, children: e }),
206
+ r && Object.keys(r).map((a, w) => {
207
+ const g = r[a];
208
+ return g === $ ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ s("p", { className: m.footer, "aria-hidden": "true", children: /* @__PURE__ */ s("span", { className: "invisible", children: " " }) }) }, `${a}-${w}`) : g ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ d("p", { className: m.footer, children: [
209
+ a,
111
210
  ": ",
112
- d
113
- ] }) }, `${b}-${h}`) : null;
211
+ g
212
+ ] }) }, `${a}-${w}`) : null;
114
213
  }),
115
214
  n && n
116
215
  ] }),
117
- v && /* @__PURE__ */ o("div", { className: f.copyButton, children: /* @__PURE__ */ o(
118
- C,
216
+ _ && /* @__PURE__ */ s("div", { className: m.copyButton, children: /* @__PURE__ */ s(
217
+ I,
119
218
  {
120
219
  noBorder: !0,
121
220
  noBackground: !0,
122
221
  size: "small",
123
- mode: p,
124
- focusMode: m,
125
- label: a ? "Copied to clipboard" : "Copy to clipboard",
126
- onClick: w,
127
- disabled: a,
128
- children: a ? /* @__PURE__ */ o(E, { size: "size-3" }) : /* @__PURE__ */ o(N, { size: "size-3" })
222
+ mode: f,
223
+ focusMode: b,
224
+ label: u ? "Copied to clipboard" : "Copy to clipboard",
225
+ onClick: N,
226
+ disabled: u,
227
+ children: u ? /* @__PURE__ */ s(E, { size: "size-3" }) : /* @__PURE__ */ s(V, { size: "size-3" })
129
228
  }
130
229
  ) })
131
230
  ] });
132
231
  };
133
232
  export {
134
- c as BUBBLE_CLASSNAME,
135
- j as BUBBLE_FOOTER_EMPTY,
136
- U as Bubble
233
+ p as BUBBLE_CLASSNAME,
234
+ $ as BUBBLE_FOOTER_EMPTY,
235
+ A as Bubble
137
236
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { BUBBLE_CLASSNAME as i, BUBBLE_FOOTER_EMPTY as o, Bubble as E } from "./components/Bubble/Bubble.js";
2
2
  /*!
3
- @versini/ui-bubble v5.0.8
3
+ @versini/ui-bubble v6.0.1
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
8
- version: "5.0.8",
9
- buildTime: "09/01/2025 02:20 PM EDT",
8
+ version: "6.0.1",
9
+ buildTime: "09/01/2025 04:02 PM EDT",
10
10
  homepage: "https://github.com/aversini/ui-components",
11
11
  license: "MIT"
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-bubble",
3
- "version": "5.0.8",
3
+ "version": "6.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -37,22 +37,22 @@
37
37
  "test": "vitest run"
38
38
  },
39
39
  "peerDependencies": {
40
- "react": "^18.3.1 || ^19.0.0",
41
- "react-dom": "^18.3.1 || ^19.0.0"
40
+ "react": "^19.1.0",
41
+ "react-dom": "^19.1.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@testing-library/jest-dom": "6.8.0",
45
- "@versini/ui-types": "5.0.7"
45
+ "@versini/ui-types": "6.0.1"
46
46
  },
47
47
  "dependencies": {
48
48
  "@tailwindcss/typography": "0.5.16",
49
- "@versini/ui-button": "7.1.6",
50
- "@versini/ui-icons": "4.10.0",
49
+ "@versini/ui-button": "8.0.1",
50
+ "@versini/ui-icons": "4.11.0",
51
51
  "clsx": "2.1.1",
52
52
  "tailwindcss": "4.1.12"
53
53
  },
54
54
  "sideEffects": [
55
55
  "**/*.css"
56
56
  ],
57
- "gitHead": "c577149643ec36cad454587166e62410a77aed38"
57
+ "gitHead": "dcc216644c8c3e7d43a49ea655a22aed21fa4b83"
58
58
  }