@epam/ai-dial-share 1.2.7 → 1.2.9
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/index.js +13 -26
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import { DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, GhostButton as p, Ghost
|
|
|
4
4
|
import { IconCheck as b, IconCopy as x, IconDownload as S, IconLink as C, IconQrcode as w, IconWorld as T } from "@tabler/icons-react";
|
|
5
5
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M = Object.getOwnPropertyNames, N = Object.getPrototypeOf, P = Object.prototype.hasOwnProperty, F = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), I = (e, t, n, r) => {
|
|
7
|
+
var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M = Object.getOwnPropertyNames, N = Object.getPrototypeOf, P = Object.prototype.hasOwnProperty, F = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), I = (e, t, n, r) => {
|
|
8
8
|
if (t && typeof t == "object" || typeof t == "function") for (var i = M(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !P.call(e, s) && s !== n && A(e, s, {
|
|
9
9
|
get: ((e) => t[e]).bind(null, s),
|
|
10
10
|
enumerable: !(r = j(t, s)) || r.enumerable
|
|
11
11
|
});
|
|
12
12
|
return e;
|
|
13
|
-
}, L = (e, t, n) => (n = e == null ? {} : k(N(e)), I(t || !e || !e.__esModule ? A(n, "default", {
|
|
13
|
+
}, L = (e, t, n) => (n = e == null ? {} : k(N(e)), I(t || !e || !e.__esModule || !P.call(e, "default") ? A(n, "default", {
|
|
14
14
|
value: e,
|
|
15
15
|
enumerable: !0
|
|
16
16
|
}) : n, e)), ee = { popover: "dial-share-popover" }, R = /* @__PURE__ */ function(e) {
|
|
@@ -129,11 +129,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
129
129
|
if (o == null) throw Error("Canvas 2D context is not available.");
|
|
130
130
|
return o.fillStyle = ue, o.fillRect(0, 0, t, t), o.drawImage(i, n, n, r, r), new Promise((e, t) => {
|
|
131
131
|
a.toBlob((n) => {
|
|
132
|
-
|
|
133
|
-
t(/* @__PURE__ */ Error("Failed to encode the QR code as PNG."));
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
e(n);
|
|
132
|
+
n == null ? t(/* @__PURE__ */ Error("Failed to encode the QR code as PNG.")) : e(n);
|
|
137
133
|
}, "image/png");
|
|
138
134
|
});
|
|
139
135
|
}, fe = () => typeof navigator < "u" && typeof navigator.clipboard?.write == "function" && typeof ClipboardItem < "u", pe = (e) => {
|
|
@@ -322,7 +318,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
322
318
|
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = ee, e.isContextProvider = R, e.isElement = z, e.isForwardRef = te, e.isFragment = ne, e.isLazy = re, e.isMemo = B, e.isPortal = ie, e.isProfiler = ae, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
|
|
323
319
|
})();
|
|
324
320
|
})), U = /* @__PURE__ */ F(((e, t) => {
|
|
325
|
-
process.env.NODE_ENV === "production" ?
|
|
321
|
+
t.exports = process.env.NODE_ENV === "production" ? ge() : _e();
|
|
326
322
|
})), W = /* @__PURE__ */ F(((e, t) => {
|
|
327
323
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
328
324
|
function a(e) {
|
|
@@ -449,7 +445,8 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
449
445
|
if (t) {
|
|
450
446
|
var m = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
|
|
451
447
|
throw m.name = "Invariant Violation", m;
|
|
452
|
-
}
|
|
448
|
+
}
|
|
449
|
+
if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
453
450
|
var g = l + ":" + c;
|
|
454
451
|
!n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + d + "` prop on `" + l + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), n[g] = !0, r++);
|
|
455
452
|
}
|
|
@@ -858,7 +855,8 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
858
855
|
if (r <= t && t < i && r <= n && n < i) {
|
|
859
856
|
let i = Math.floor((t - r) / e), a = Math.floor((n - r) / e);
|
|
860
857
|
return +!c.isDark(a, i);
|
|
861
|
-
}
|
|
858
|
+
}
|
|
859
|
+
return 1;
|
|
862
860
|
});
|
|
863
861
|
}, c.createImgTag = function(e, t, n) {
|
|
864
862
|
e ||= 2, t = t === void 0 ? e * 4 : t;
|
|
@@ -882,9 +880,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
882
880
|
case "\"":
|
|
883
881
|
t += """;
|
|
884
882
|
break;
|
|
885
|
-
default:
|
|
886
|
-
t += r;
|
|
887
|
-
break;
|
|
883
|
+
default: t += r;
|
|
888
884
|
}
|
|
889
885
|
}
|
|
890
886
|
return t;
|
|
@@ -1295,7 +1291,7 @@ var J = {
|
|
|
1295
1291
|
let t = e.getModuleCount(), n = 0;
|
|
1296
1292
|
for (let r = 0; r < t; r += 1) for (let i = 0; i < t; i += 1) {
|
|
1297
1293
|
let a = 0, o = e.isDark(r, i);
|
|
1298
|
-
for (let n = -1; n <= 1; n += 1) if (!(r + n < 0 || t <= r + n)) for (let s = -1; s <= 1; s += 1) i + s < 0 || t <= i + s || n
|
|
1294
|
+
for (let n = -1; n <= 1; n += 1) if (!(r + n < 0 || t <= r + n)) for (let s = -1; s <= 1; s += 1) i + s < 0 || t <= i + s || (n != 0 || s != 0) && o == e.isDark(r + n, i + s) && (a += 1);
|
|
1299
1295
|
a > 5 && (n += 3 + a - 5);
|
|
1300
1296
|
}
|
|
1301
1297
|
for (let r = 0; r < t - 1; r += 1) for (let i = 0; i < t - 1; i += 1) {
|
|
@@ -2560,7 +2556,8 @@ var J = {
|
|
|
2560
2556
|
return n.getBuffer = function() {
|
|
2561
2557
|
return e;
|
|
2562
2558
|
}, n.getAt = function(t) {
|
|
2563
|
-
|
|
2559
|
+
let n = Math.floor(t / 8);
|
|
2560
|
+
return (e[n] >>> 7 - t % 8 & 1) == 1;
|
|
2564
2561
|
}, n.put = function(e, t) {
|
|
2565
2562
|
for (let r = 0; r < t; r += 1) n.putBit((e >>> t - r - 1 & 1) == 1);
|
|
2566
2563
|
}, n.getLengthInBits = function() {
|
|
@@ -3045,17 +3042,7 @@ var He = {
|
|
|
3045
3042
|
style: v,
|
|
3046
3043
|
className: n("flex w-96 flex-col gap-3 rounded-xl bg-layer-raised px-6 pb-6 pt-4 shadow-lg outline-none", m, ee.popover),
|
|
3047
3044
|
onKeyDownCapture: (e) => {
|
|
3048
|
-
|
|
3049
|
-
ve(e);
|
|
3050
|
-
return;
|
|
3051
|
-
}
|
|
3052
|
-
if (e.key === "Escape") {
|
|
3053
|
-
if (e.stopPropagation(), ge) {
|
|
3054
|
-
e.preventDefault(), U(!1);
|
|
3055
|
-
return;
|
|
3056
|
-
}
|
|
3057
|
-
V === z.Qr ? (e.preventDefault(), H(z.Link)) : f();
|
|
3058
|
-
}
|
|
3045
|
+
e.key === "Tab" ? ve(e) : e.key === "Escape" && (e.stopPropagation(), ge ? (e.preventDefault(), U(!1)) : V === z.Qr ? (e.preventDefault(), H(z.Link)) : f());
|
|
3059
3046
|
},
|
|
3060
3047
|
children: [
|
|
3061
3048
|
/* @__PURE__ */ D(Je, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-share",
|
|
3
3
|
"description": "Share popover UI component and share-link types for AI DIAL catalog deployments",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.9",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-qr-code": "^2.2.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@epam/ai-dial-chat-shared": "1.2.
|
|
24
|
+
"@epam/ai-dial-chat-shared": "1.2.9",
|
|
25
25
|
"react": "^19.2.8",
|
|
26
26
|
"@epam/ai-dial-ui-kit": "^0.15.4"
|
|
27
27
|
},
|