@openworkbook/react 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenWorkbook contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,47 @@
1
- # Temporary Holding Version
1
+ # @openworkbook/react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React and Next.js components of [OpenWorkbook](https://openworkbook.netlify.app), an open-source (MIT) spreadsheet SDK:
4
+
5
+ - `<Spreadsheet />`: a compact, embeddable grid with a formula bar and sheet tabs;
6
+ - `<Studio />`: a complete spreadsheet editor in one component (ribbon, formula bar, grid, side panes, dialogs,
7
+ file commands), in the style of Excel for the web.
8
+
9
+ The package re-exports the engine (`@openworkbook/core`), so one import is enough.
10
+
11
+ ```bash
12
+ npm install @openworkbook/react
13
+ # optional: Excel files and PDF export
14
+ npm install @openworkbook/xlsx @openworkbook/pdf
15
+ ```
16
+
17
+ `react` and `react-dom` 18 or later are peer dependencies.
18
+
19
+ ```tsx
20
+ 'use client';
21
+
22
+ import { Studio } from '@openworkbook/react';
23
+ import * as xlsx from '@openworkbook/xlsx';
24
+
25
+ export default function Editor() {
26
+ return (
27
+ <div style={{ height: 640 }}>
28
+ <Studio fileName="Budget" xlsx={xlsx} />
29
+ </div>
30
+ );
31
+ }
32
+ ```
33
+
34
+ The Studio fills its parent, so the parent needs a definite height. There is no stylesheet to import.
35
+
36
+ ## Documentation
37
+
38
+ - [Getting started](https://openworkbook.netlify.app/getting-started)
39
+ - [Quick start: the full editor](https://openworkbook.netlify.app/quickstart-studio)
40
+ - [Next.js guide](https://openworkbook.netlify.app/frameworks/nextjs) and [React guide](https://openworkbook.netlify.app/frameworks/react)
41
+ - [Live demo](https://openworkbook.netlify.app/demo/)
42
+ - [API reference](https://openworkbook.netlify.app/reference/api-react)
43
+
44
+ ## Licence
45
+
46
+ MIT. The English spelling dictionaries (`@openworkbook/react/dictionaries/en`, `en-GB`) are built from the sources
47
+ listed in `THIRD-PARTY-NOTICES.md`.
@@ -0,0 +1,23 @@
1
+ # Third-party notices: @openworkbook/react
2
+
3
+ `@openworkbook/react` is released under the MIT licence (see `LICENSE`). Its only dependency is `@openworkbook/core`
4
+ (see the notices of that package). The optional spelling dictionaries are built from the sources below.
5
+
6
+ ## English dictionary: provenance and licence
7
+
8
+ `en-data.ts` (the word list behind `@openworkbook/react/dictionaries/en`) is generated by
9
+ `scripts/build-en-dictionary.cjs` from four inputs.
10
+
11
+ | Input | Content | Origin | Licence |
12
+ | --- | --- | --- | --- |
13
+ | `/usr/share/dict/web2` | 235,976 entries: the word list of Webster's Second New International Dictionary (1934). | Distributed with BSD systems (the FreeBSD-maintained copy shipped with macOS). Its README states that the 1934 copyright has lapsed. | Public domain. |
14
+ | `scripts/dict-en/modern.txt` | Modern words (email, website, spreadsheet...), contractions and irregular forms. | Written for OpenWorkbook. | MIT (OpenWorkbook). |
15
+ | `scripts/dict-en/exclude.txt` | 27 archaic or rare base-list entries removed because they hide common typing errors (`untill`, `wether`, `dont`...). | Written for OpenWorkbook. | MIT (OpenWorkbook). |
16
+ | `scripts/dict-en/common.txt` | About 1,180 common words in rough frequency order, used only to rank suggestions. | Written for OpenWorkbook. | MIT (OpenWorkbook). |
17
+
18
+ Entries with hyphens or digits are dropped (the spell checker checks the parts of a hyphenated word). The result,
19
+ 236,487 distinct words, is stored front-coded (`encodeWordList` of `@openworkbook/core`): 1.03 MB of text, about
20
+ 0.5 MB gzipped.
21
+
22
+ The base list predates most modern vocabulary and lacks most inflected forms (plurals, `-ed`, `-ing`...): the
23
+ English inflection rules of `createWordListSpeller` (`inflections: 'en'`) derive regular forms at check time.