@ricsam/react-spreadsheets 0.0.13 → 0.0.15
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 +22 -1
- package/dist/cjs/lib.cjs +673 -482
- package/dist/cjs/lib.cjs.map +6 -5
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/lib.mjs +665 -474
- package/dist/mjs/lib.mjs.map +6 -5
- package/dist/mjs/package.json +1 -1
- package/dist/styles.css +201 -32
- package/dist/types/spreadsheet/spreadsheet.d.ts +3 -0
- package/dist/types/workbook/sheet-navigation.d.ts +15 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -22,6 +22,22 @@ bun add @ricsam/formula-engine
|
|
|
22
22
|
|
|
23
23
|
`react`, `react-dom` and `@ricsam/selection-manager` are peer dependencies.
|
|
24
24
|
|
|
25
|
+
## Formula rendering and imported defaults
|
|
26
|
+
|
|
27
|
+
`FormulaSheet` shares engine style reads between its cell container and content,
|
|
28
|
+
with a bounded cache invalidated on **every engine update**, including changes to
|
|
29
|
+
other sheets, styles, metadata, undo and redo. Selection-only changes leave
|
|
30
|
+
unchanged cells alone. Consumer style/render callbacks still receive current
|
|
31
|
+
`isSelected` and `isBeingEdited` values; keep callback identities stable (for
|
|
32
|
+
example with `useCallback`) to avoid invalidating all visible cells unnecessarily.
|
|
33
|
+
|
|
34
|
+
Workbook metadata may contain `defaultCellStyle` (a `CellStyle`, optionally with
|
|
35
|
+
`fontFamily: string`). These imported defaults are applied beneath explicit
|
|
36
|
+
engine cell styles. Font sizes use the engine's CSS-pixel convention. False
|
|
37
|
+
bold/italic/underline values override defaults. Without this metadata the existing
|
|
38
|
+
CSS/application defaults remain unchanged; fonts are never inferred from nearby
|
|
39
|
+
cells. Existing saved imports need reimporting to recover missing source defaults.
|
|
40
|
+
|
|
25
41
|
## Usage
|
|
26
42
|
|
|
27
43
|
Import the stylesheet once, near your app root:
|
|
@@ -84,7 +100,12 @@ export function Demo() {
|
|
|
84
100
|
```
|
|
85
101
|
|
|
86
102
|
`FormulaWorkbook` adds Excel-style sheet tabs, renaming, deletion and zoom on
|
|
87
|
-
top of `FormulaSheet`.
|
|
103
|
+
top of `FormulaSheet`. Focus a sheet tab and use Left/Right or Home/End to switch
|
|
104
|
+
sheets. F2, double-click, or the **Sheet actions** menu starts renaming; Save/Enter
|
|
105
|
+
commits and Cancel/Escape discards. Blank/duplicate names and engine errors stay
|
|
106
|
+
visible without losing the draft. Deletion asks for confirmation and is disabled
|
|
107
|
+
for the last sheet. Add and sheet actions remain outside the scrolling tab strip;
|
|
108
|
+
the zoom percentage resets zoom to 100% when clicked.
|
|
88
109
|
|
|
89
110
|
### Formula reference highlights
|
|
90
111
|
|