@ricsam/react-spreadsheets 0.0.10 → 0.0.11
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/README.md +5 -0
- package/dist/cjs/lib.cjs +9 -1
- package/dist/cjs/lib.cjs.map +3 -3
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/lib.mjs +9 -1
- package/dist/mjs/lib.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,6 +339,11 @@ Per-cell styling is done in JS:
|
|
|
339
339
|
| `selection` | Selection state, navigation model, and `effects(selectionManager)` for copy/paste/fill/reference hooks. |
|
|
340
340
|
| `components` + `overlayChildren` | Floating overlays anchored to the grid, optionally snapped to cell edges. |
|
|
341
341
|
|
|
342
|
+
Wheel input over the grid remains available when its cell selection is blurred.
|
|
343
|
+
Wheel events originating inside a floating overlay are left to that overlay, so
|
|
344
|
+
scrollable editors and other interactive overlay content keep their native
|
|
345
|
+
scroll behavior.
|
|
346
|
+
|
|
342
347
|
## Development
|
|
343
348
|
|
|
344
349
|
```bash
|
package/dist/cjs/lib.cjs
CHANGED
|
@@ -1434,6 +1434,7 @@ var resizeCellSnapAnchorToNearestEdges = (anchor, rect, handle, columnWidths, ro
|
|
|
1434
1434
|
|
|
1435
1435
|
// src/spreadsheet/spreadsheet.tsx
|
|
1436
1436
|
var jsx_runtime3 = require("react/jsx-runtime");
|
|
1437
|
+
var SPREADSHEET_OVERLAY_SELECTOR = "[data-rsp-overlay]";
|
|
1437
1438
|
var resolveGridLineColor = (probe, colorScheme) => {
|
|
1438
1439
|
const fallback = colorScheme === "dark" ? "#232c3d" : "#e8ebf1";
|
|
1439
1440
|
if (!probe || typeof getComputedStyle !== "function") {
|
|
@@ -2394,6 +2395,12 @@ var Spreadsheet = import_react4.forwardRef(({
|
|
|
2394
2395
|
});
|
|
2395
2396
|
}, [selectionManager, clipboardManager, disableClipboard]);
|
|
2396
2397
|
const handleWheel = import_react4.useCallback((e) => {
|
|
2398
|
+
const target = e.target;
|
|
2399
|
+
const currentTarget = e.currentTarget;
|
|
2400
|
+
const overlay = target instanceof Element ? target.closest(SPREADSHEET_OVERLAY_SELECTOR) : null;
|
|
2401
|
+
if (overlay && currentTarget instanceof Node && currentTarget.contains(overlay)) {
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2397
2404
|
e.preventDefault();
|
|
2398
2405
|
e.stopPropagation();
|
|
2399
2406
|
setViewport((previous) => ({
|
|
@@ -3119,6 +3126,7 @@ var Spreadsheet = import_react4.forwardRef(({
|
|
|
3119
3126
|
const isTextBox = child.component === "RichText";
|
|
3120
3127
|
const isMinimized = Boolean(child.minimized && !isTextBox);
|
|
3121
3128
|
return /* @__PURE__ */ jsx_runtime3.jsxs("div", {
|
|
3129
|
+
"data-rsp-overlay": child.id,
|
|
3122
3130
|
style: {
|
|
3123
3131
|
position: "absolute",
|
|
3124
3132
|
width: child.width,
|
|
@@ -4553,4 +4561,4 @@ var useClickAway = (ref, callback) => {
|
|
|
4553
4561
|
}, [ref, callback]);
|
|
4554
4562
|
};
|
|
4555
4563
|
|
|
4556
|
-
//# debugId=
|
|
4564
|
+
//# debugId=64201658718498BD64756E2164756E21
|