@proveanything/smartlinks-utils-ui 0.12.17 → 0.12.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/{chunk-2IQEDRSZ.js → chunk-ZTUZPAHD.js} +250 -134
- package/dist/chunk-ZTUZPAHD.js.map +1 -0
- package/dist/components/AssetPicker/index.css +6 -0
- package/dist/components/AssetPicker/index.css.map +1 -1
- package/dist/components/AssetPicker/index.js +1 -1
- package/dist/components/ConditionsEditor/index.css +6 -0
- package/dist/components/ConditionsEditor/index.css.map +1 -1
- package/dist/components/FontPicker/index.css +6 -0
- package/dist/components/FontPicker/index.css.map +1 -1
- package/dist/components/IconPicker/index.css +6 -0
- package/dist/components/IconPicker/index.css.map +1 -1
- package/dist/components/LinkPicker/index.css +6 -0
- package/dist/components/LinkPicker/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.css +6 -0
- package/dist/components/RecordsAdmin/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.js +17 -9
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2IQEDRSZ.js.map +0 -1
|
@@ -8842,11 +8842,16 @@ function PreviewReopenPill({
|
|
|
8842
8842
|
}) {
|
|
8843
8843
|
const [pos, setPos] = useState(null);
|
|
8844
8844
|
const rafRef = useRef(null);
|
|
8845
|
+
const getViewportCenterY = () => {
|
|
8846
|
+
if (typeof window === "undefined") return 200;
|
|
8847
|
+
const vv = window.visualViewport;
|
|
8848
|
+
return vv ? vv.offsetTop + vv.height / 2 : window.innerHeight / 2;
|
|
8849
|
+
};
|
|
8845
8850
|
useLayoutEffect(() => {
|
|
8846
8851
|
const el = anchorRef.current;
|
|
8847
8852
|
if (typeof window === "undefined") return;
|
|
8848
|
-
const TOP_INSET =
|
|
8849
|
-
const fallbackTop = () => vAlign === "top" ? TOP_INSET : vAlign === "bottom" ? Math.max(0, window.innerHeight - TOP_INSET) :
|
|
8853
|
+
const TOP_INSET = 0;
|
|
8854
|
+
const fallbackTop = () => vAlign === "top" ? TOP_INSET : vAlign === "bottom" ? Math.max(0, window.innerHeight - TOP_INSET) : getViewportCenterY();
|
|
8850
8855
|
if (!el) {
|
|
8851
8856
|
setPos({ top: fallbackTop(), right: 8, left: 8 });
|
|
8852
8857
|
return;
|
|
@@ -8858,7 +8863,7 @@ function PreviewReopenPill({
|
|
|
8858
8863
|
if (rect.width === 0 && rect.height === 0) {
|
|
8859
8864
|
return;
|
|
8860
8865
|
}
|
|
8861
|
-
const top = vAlign === "top" ? rect.top + TOP_INSET : vAlign === "bottom" ? rect.bottom - TOP_INSET :
|
|
8866
|
+
const top = vAlign === "top" ? rect.top + TOP_INSET : vAlign === "bottom" ? rect.bottom - TOP_INSET : getViewportCenterY();
|
|
8862
8867
|
setPos({
|
|
8863
8868
|
top,
|
|
8864
8869
|
right: Math.max(0, window.innerWidth - rect.right),
|
|
@@ -8872,16 +8877,20 @@ function PreviewReopenPill({
|
|
|
8872
8877
|
ro.observe(document.body);
|
|
8873
8878
|
window.addEventListener("resize", measure);
|
|
8874
8879
|
window.addEventListener("scroll", measure, true);
|
|
8880
|
+
window.visualViewport?.addEventListener("resize", measure);
|
|
8881
|
+
window.visualViewport?.addEventListener("scroll", measure);
|
|
8875
8882
|
return () => {
|
|
8876
8883
|
ro.disconnect();
|
|
8877
8884
|
window.removeEventListener("resize", measure);
|
|
8878
8885
|
window.removeEventListener("scroll", measure, true);
|
|
8886
|
+
window.visualViewport?.removeEventListener("resize", measure);
|
|
8887
|
+
window.visualViewport?.removeEventListener("scroll", measure);
|
|
8879
8888
|
if (rafRef.current != null) cancelAnimationFrame(rafRef.current);
|
|
8880
8889
|
};
|
|
8881
8890
|
}, [anchorRef, vAlign]);
|
|
8882
8891
|
if (typeof document === "undefined") return null;
|
|
8883
8892
|
const effectivePos = pos ?? {
|
|
8884
|
-
top: typeof window !== "undefined" ? vAlign === "top" ? 14 : vAlign === "bottom" ? window.innerHeight - 14 :
|
|
8893
|
+
top: typeof window !== "undefined" ? vAlign === "top" ? 14 : vAlign === "bottom" ? window.innerHeight - 14 : getViewportCenterY() : 200,
|
|
8885
8894
|
right: 8,
|
|
8886
8895
|
left: 8
|
|
8887
8896
|
};
|
|
@@ -11123,13 +11132,13 @@ function RecordsAdminShellInner(props) {
|
|
|
11123
11132
|
/* @__PURE__ */ jsxs(
|
|
11124
11133
|
"div",
|
|
11125
11134
|
{
|
|
11126
|
-
className: "flex-1 grid border-t overflow-
|
|
11135
|
+
className: "flex-1 grid border-t overflow-visible relative",
|
|
11127
11136
|
style: {
|
|
11128
11137
|
gridTemplateColumns: railHidden || !railOpen ? "1fr" : "minmax(260px, 320px) 1fr",
|
|
11129
11138
|
borderColor: "hsl(var(--ra-border))"
|
|
11130
11139
|
},
|
|
11131
11140
|
children: [
|
|
11132
|
-
!railHidden && railOpen && /* @__PURE__ */ jsxs("aside", { className: "border-r overflow-hidden flex flex-col relative", style: { borderColor: "hsl(var(--ra-border))", background: "hsl(var(--ra-surface))" }, children: [
|
|
11141
|
+
!railHidden && railOpen && /* @__PURE__ */ jsxs("aside", { className: "border-r overflow-hidden flex flex-col relative h-full", style: { borderColor: "hsl(var(--ra-border))", background: "hsl(var(--ra-surface))" }, children: [
|
|
11133
11142
|
/* @__PURE__ */ jsx(
|
|
11134
11143
|
"button",
|
|
11135
11144
|
{
|
|
@@ -11137,8 +11146,8 @@ function RecordsAdminShellInner(props) {
|
|
|
11137
11146
|
onClick: () => setRailOpen(false),
|
|
11138
11147
|
"aria-label": i18n.closeList,
|
|
11139
11148
|
title: i18n.closeList,
|
|
11140
|
-
className: "absolute top-
|
|
11141
|
-
style: { color: "hsl(var(--ra-muted-text))" },
|
|
11149
|
+
className: "absolute top-0 right-0 z-20 leading-none hover:bg-[hsl(var(--ra-muted))]",
|
|
11150
|
+
style: { color: "hsl(var(--ra-muted-text))", padding: 2 },
|
|
11142
11151
|
children: /* @__PURE__ */ jsx(PanelLeftClose, { className: "w-3.5 h-3.5" })
|
|
11143
11152
|
}
|
|
11144
11153
|
),
|
|
@@ -11459,7 +11468,6 @@ function RecordsAdminShellInner(props) {
|
|
|
11459
11468
|
{
|
|
11460
11469
|
anchorRef: railReopenAnchorRef,
|
|
11461
11470
|
side: "left",
|
|
11462
|
-
vAlign: "top",
|
|
11463
11471
|
onClick: () => setRailOpen(true),
|
|
11464
11472
|
ariaLabel: i18n.openList,
|
|
11465
11473
|
title: i18n.openList,
|