reifyui 0.6.0 → 0.6.2
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 +32 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Carousel.jsx +10 -3
- package/src/sheet/SheetGrid.jsx +16 -0
- package/styles/chat.css +5 -1
- package/styles/sheet.css +4 -1
package/dist/index.cjs
CHANGED
|
@@ -2795,6 +2795,34 @@ function SheetGrid({
|
|
|
2795
2795
|
},
|
|
2796
2796
|
title: c.error || "",
|
|
2797
2797
|
children: [
|
|
2798
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
2799
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2800
|
+
"span",
|
|
2801
|
+
{
|
|
2802
|
+
className: "shg-resize-col shg-resize-in-cell",
|
|
2803
|
+
onClick: (e) => e.stopPropagation(),
|
|
2804
|
+
onMouseDown: (e) => startResize(
|
|
2805
|
+
e,
|
|
2806
|
+
"col",
|
|
2807
|
+
col.id,
|
|
2808
|
+
colWidth(col) || e.currentTarget.closest("td").offsetWidth
|
|
2809
|
+
)
|
|
2810
|
+
}
|
|
2811
|
+
),
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2813
|
+
"span",
|
|
2814
|
+
{
|
|
2815
|
+
className: "shg-resize-row shg-resize-in-cell",
|
|
2816
|
+
onClick: (e) => e.stopPropagation(),
|
|
2817
|
+
onMouseDown: (e) => startResize(
|
|
2818
|
+
e,
|
|
2819
|
+
"row",
|
|
2820
|
+
row.id,
|
|
2821
|
+
rowHeight(row) || e.currentTarget.closest("tr").offsetHeight
|
|
2822
|
+
)
|
|
2823
|
+
}
|
|
2824
|
+
)
|
|
2825
|
+
] }),
|
|
2798
2826
|
peer && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "shg-peer-flag", style: { background: peer.color }, children: peer.name }),
|
|
2799
2827
|
isEditing ? renderEditor(col) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2800
2828
|
"div",
|
|
@@ -3066,6 +3094,7 @@ function sheetToAoA(sheet, { cellText = defaultCellValue } = {}) {
|
|
|
3066
3094
|
// src/components/Carousel.jsx
|
|
3067
3095
|
var import_react16 = __toESM(require("react"), 1);
|
|
3068
3096
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3097
|
+
var EDGE = 2;
|
|
3069
3098
|
function Carousel(props) {
|
|
3070
3099
|
const { label, step, children, classNames = {} } = props;
|
|
3071
3100
|
const ref = (0, import_react16.useRef)(null);
|
|
@@ -3073,11 +3102,11 @@ function Carousel(props) {
|
|
|
3073
3102
|
const measure = (0, import_react16.useCallback)(() => {
|
|
3074
3103
|
const el = ref.current;
|
|
3075
3104
|
if (!el) return;
|
|
3076
|
-
const overflow = el.scrollWidth - el.clientWidth >
|
|
3105
|
+
const overflow = el.scrollWidth - el.clientWidth > EDGE;
|
|
3077
3106
|
setEdges({
|
|
3078
3107
|
overflow,
|
|
3079
|
-
start: el.scrollLeft <=
|
|
3080
|
-
end: el.scrollLeft >= el.scrollWidth - el.clientWidth -
|
|
3108
|
+
start: el.scrollLeft <= EDGE,
|
|
3109
|
+
end: el.scrollLeft >= el.scrollWidth - el.clientWidth - EDGE
|
|
3081
3110
|
});
|
|
3082
3111
|
}, []);
|
|
3083
3112
|
(0, import_react16.useEffect)(() => {
|