@sesionario/blocks 1.21.0 → 1.22.0
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.cjs +65 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +66 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1686,13 +1686,13 @@ function TenantAvatar({
|
|
|
1686
1686
|
logo,
|
|
1687
1687
|
size = "md"
|
|
1688
1688
|
}) {
|
|
1689
|
-
const sizeClass = size === "sm" ? "size-6
|
|
1689
|
+
const sizeClass = size === "sm" ? "size-6" : "size-8";
|
|
1690
1690
|
const textClass = size === "sm" ? "text-xs" : "text-sm";
|
|
1691
1691
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1692
1692
|
"div",
|
|
1693
1693
|
{
|
|
1694
1694
|
className: cn(
|
|
1695
|
-
"flex shrink-0 items-center justify-center overflow-hidden font-medium",
|
|
1695
|
+
"flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium",
|
|
1696
1696
|
sizeClass
|
|
1697
1697
|
),
|
|
1698
1698
|
style: logo ? void 0 : avatarFallbackStyle(name),
|
|
@@ -1713,7 +1713,7 @@ function SwitcherSkeleton({
|
|
|
1713
1713
|
"pointer-events-none flex size-8 items-center justify-center rounded-md",
|
|
1714
1714
|
className
|
|
1715
1715
|
),
|
|
1716
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-
|
|
1716
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-full bg-muted" })
|
|
1717
1717
|
}
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
@@ -1726,7 +1726,7 @@ function SwitcherSkeleton({
|
|
|
1726
1726
|
className
|
|
1727
1727
|
),
|
|
1728
1728
|
children: [
|
|
1729
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-
|
|
1729
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
1730
1730
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
1731
1731
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1732
1732
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 w-16 animate-pulse rounded bg-muted" })
|
|
@@ -1769,7 +1769,7 @@ function OrgSwitcher({
|
|
|
1769
1769
|
triggerClassNameProp
|
|
1770
1770
|
),
|
|
1771
1771
|
children: [
|
|
1772
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-
|
|
1772
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4 text-muted-foreground" }) }),
|
|
1773
1773
|
!collapsed ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-w-0 flex-1 text-left leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: labels.empty }) }) : null
|
|
1774
1774
|
]
|
|
1775
1775
|
}
|
|
@@ -1786,7 +1786,7 @@ function OrgSwitcher({
|
|
|
1786
1786
|
className
|
|
1787
1787
|
),
|
|
1788
1788
|
children: [
|
|
1789
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-
|
|
1789
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4 text-muted-foreground" }) }),
|
|
1790
1790
|
!collapsed ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-w-0 flex-1 text-left leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-muted-foreground", children: labels.empty }) }) : null
|
|
1791
1791
|
]
|
|
1792
1792
|
}
|
|
@@ -2672,8 +2672,6 @@ function AvatarEditor({
|
|
|
2672
2672
|
canvas.width = displaySize;
|
|
2673
2673
|
canvas.height = displaySize;
|
|
2674
2674
|
ctx.clearRect(0, 0, displaySize, displaySize);
|
|
2675
|
-
ctx.fillStyle = "#1a1a2e";
|
|
2676
|
-
ctx.fillRect(0, 0, displaySize, displaySize);
|
|
2677
2675
|
ctx.save();
|
|
2678
2676
|
ctx.translate(displaySize / 2, displaySize / 2);
|
|
2679
2677
|
ctx.rotate(rotation * Math.PI / 180);
|
|
@@ -2695,28 +2693,6 @@ function AvatarEditor({
|
|
|
2695
2693
|
drawHeight
|
|
2696
2694
|
);
|
|
2697
2695
|
ctx.restore();
|
|
2698
|
-
ctx.globalCompositeOperation = "destination-in";
|
|
2699
|
-
ctx.beginPath();
|
|
2700
|
-
ctx.arc(
|
|
2701
|
-
displaySize / 2,
|
|
2702
|
-
displaySize / 2,
|
|
2703
|
-
displaySize / 2 - 4,
|
|
2704
|
-
0,
|
|
2705
|
-
Math.PI * 2
|
|
2706
|
-
);
|
|
2707
|
-
ctx.fill();
|
|
2708
|
-
ctx.globalCompositeOperation = "source-over";
|
|
2709
|
-
ctx.strokeStyle = "hsl(var(--primary))";
|
|
2710
|
-
ctx.lineWidth = 3;
|
|
2711
|
-
ctx.beginPath();
|
|
2712
|
-
ctx.arc(
|
|
2713
|
-
displaySize / 2,
|
|
2714
|
-
displaySize / 2,
|
|
2715
|
-
displaySize / 2 - 2,
|
|
2716
|
-
0,
|
|
2717
|
-
Math.PI * 2
|
|
2718
|
-
);
|
|
2719
|
-
ctx.stroke();
|
|
2720
2696
|
const dataUrl = generateOutput();
|
|
2721
2697
|
if (dataUrl) {
|
|
2722
2698
|
onChange?.(dataUrl);
|
|
@@ -2822,6 +2798,8 @@ function AvatarEditor({
|
|
|
2822
2798
|
const gapSize = isLarge ? "gap-6" : "gap-4";
|
|
2823
2799
|
const controlGap = isLarge ? "gap-3" : "gap-2";
|
|
2824
2800
|
const sliderHeight = isLarge ? "[&_[role=slider]]:h-6 [&_[role=slider]]:w-6" : "";
|
|
2801
|
+
const guideRadius = size / 2 - 2;
|
|
2802
|
+
const guideCenter = size / 2;
|
|
2825
2803
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2826
2804
|
"div",
|
|
2827
2805
|
{
|
|
@@ -2885,6 +2863,36 @@ function AvatarEditor({
|
|
|
2885
2863
|
onTouchEnd: handleMouseUp
|
|
2886
2864
|
}
|
|
2887
2865
|
),
|
|
2866
|
+
imageLoaded && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2867
|
+
"svg",
|
|
2868
|
+
{
|
|
2869
|
+
width: size,
|
|
2870
|
+
height: size,
|
|
2871
|
+
className: "pointer-events-none absolute inset-0",
|
|
2872
|
+
"aria-hidden": "true",
|
|
2873
|
+
children: [
|
|
2874
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2875
|
+
"path",
|
|
2876
|
+
{
|
|
2877
|
+
d: `M0 0H${size}V${size}H0Z M${guideCenter - guideRadius} ${guideCenter}a${guideRadius} ${guideRadius} 0 1 0 ${guideRadius * 2} 0a${guideRadius} ${guideRadius} 0 1 0 ${-guideRadius * 2} 0`,
|
|
2878
|
+
fill: "rgb(0 0 0 / 0.45)",
|
|
2879
|
+
fillRule: "evenodd"
|
|
2880
|
+
}
|
|
2881
|
+
),
|
|
2882
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2883
|
+
"circle",
|
|
2884
|
+
{
|
|
2885
|
+
cx: guideCenter,
|
|
2886
|
+
cy: guideCenter,
|
|
2887
|
+
r: guideRadius,
|
|
2888
|
+
fill: "none",
|
|
2889
|
+
stroke: "hsl(var(--primary))",
|
|
2890
|
+
strokeWidth: "3"
|
|
2891
|
+
}
|
|
2892
|
+
)
|
|
2893
|
+
]
|
|
2894
|
+
}
|
|
2895
|
+
),
|
|
2888
2896
|
showGrid && imageLoaded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2889
2897
|
"div",
|
|
2890
2898
|
{
|
|
@@ -7332,6 +7340,32 @@ function PaymentIcon({
|
|
|
7332
7340
|
}
|
|
7333
7341
|
);
|
|
7334
7342
|
}
|
|
7343
|
+
var BrandX = React7.forwardRef(function BrandX2({
|
|
7344
|
+
className,
|
|
7345
|
+
size = 24,
|
|
7346
|
+
"aria-label": ariaLabel,
|
|
7347
|
+
"aria-labelledby": ariaLabelledby,
|
|
7348
|
+
...props
|
|
7349
|
+
}, ref) {
|
|
7350
|
+
const labelled = Boolean(ariaLabel || ariaLabelledby);
|
|
7351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7352
|
+
"svg",
|
|
7353
|
+
{
|
|
7354
|
+
ref,
|
|
7355
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7356
|
+
viewBox: "0 0 24 24",
|
|
7357
|
+
fill: "currentColor",
|
|
7358
|
+
...props,
|
|
7359
|
+
"aria-label": ariaLabel,
|
|
7360
|
+
"aria-labelledby": ariaLabelledby,
|
|
7361
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
7362
|
+
width: size,
|
|
7363
|
+
height: size,
|
|
7364
|
+
className: cn("shrink-0", className),
|
|
7365
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" })
|
|
7366
|
+
}
|
|
7367
|
+
);
|
|
7368
|
+
});
|
|
7335
7369
|
function MessageGroup({ className, ...props }) {
|
|
7336
7370
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7337
7371
|
"div",
|
|
@@ -8676,6 +8710,7 @@ Object.defineProperty(exports, "useMessageScrollerVisibility", {
|
|
|
8676
8710
|
});
|
|
8677
8711
|
exports.AvatarEditor = AvatarEditor;
|
|
8678
8712
|
exports.AvatarEditorDialog = AvatarEditorDialog;
|
|
8713
|
+
exports.BrandX = BrandX;
|
|
8679
8714
|
exports.Bubble = Bubble;
|
|
8680
8715
|
exports.BubbleContent = BubbleContent;
|
|
8681
8716
|
exports.BubbleGroup = BubbleGroup;
|