@8sheets/react 1.2.2 → 1.4.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.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 8sheets npm Package Licence
2
2
 
3
- > Version 1.0, 17 November 2026. It covers the packages published on npm (`8sheets`, `@8sheets/core`, `@8sheets/react`, `@8sheets/vue`, `@8sheets/angular`). The full terms of the paid licence, the 8sheets Source Licence, are at https://8sheets.com/docs/licence/; prices are at https://8sheets.com/pricing/.
3
+ > Version 1.0, 17 November 2026. It covers the packages published on npm: 8sheets Spreadsheet (`8sheets`, `@8sheets/core`, `@8sheets/react`, `@8sheets/vue`, `@8sheets/angular`) and 8sheets Data Grid (`@8sheets/data-grid`, `@8sheets/data-grid-react`, `@8sheets/data-grid-vue`, `@8sheets/data-grid-angular`). One paid licence covers both products. The full terms of the paid licence, the 8sheets Source Licence, are at https://8sheets.com/licence/; prices are at https://8sheets.com/pricing/.
4
4
 
5
5
  Copyright (c) 2026 8cells Jarosław Kaczmarski. All rights reserved. This is commercial software. It is not open source.
6
6
 
@@ -16,7 +16,7 @@ Any other use needs a paid licence, bought at https://8sheets.com/pricing/. This
16
16
  - **SaaS / OEM** (2,999 USD, once per company): your product is offered to people outside your company.
17
17
  - **Enterprise** (priced in a separate agreement): any use, under that agreement.
18
18
 
19
- Each licence covers every developer and every deployment of the company that holds it. There is no licence key. Once you hold a licence, the 8sheets Source Licence (https://8sheets.com/docs/licence/) governs your use of this package and replaces sections 1 and 3 of this file.
19
+ Each licence covers every developer and every deployment of the company that holds it. There is no licence key. Once you hold a licence, the 8sheets Source Licence (https://8sheets.com/licence/) governs your use of this package and replaces sections 1 and 3 of this file.
20
20
 
21
21
  ## 3. Restrictions
22
22
 
@@ -29,7 +29,7 @@ Without a licence that allows it, you may not:
29
29
 
30
30
  ## 4. Third-party components
31
31
 
32
- The package includes data and artwork under their own licences (icons, map data, dictionaries and thesauri). Their notices are in the files next to that data (`*.NOTICE.txt`, `*.LICENSE.txt`, `charts/geo/NOTICE`) and listed at https://8sheets.com/docs/notices/. Those terms apply to those parts.
32
+ The package includes data and artwork under their own licences (icons, map data, dictionaries and thesauri). Their notices are in the files next to that data (`*.NOTICE.txt`, `*.LICENSE.txt`, `charts/geo/NOTICE`) and listed at https://8sheets.com/notices/. Those terms apply to those parts.
33
33
 
34
34
  ## 5. No warranty
35
35
 
package/README.md CHANGED
@@ -60,4 +60,4 @@ The Workers are ES modules. `optimizeDeps.exclude` is needed only before Vite 8:
60
60
 
61
61
  ## Licence
62
62
 
63
- 8sheets is commercial software, not open source. You may install it and try it for free, to evaluate it. Using it in a product, or deploying it for your users or your own staff, needs a licence from [8sheets.com/pricing](https://8sheets.com/pricing/): **Internal** 999 USD or **SaaS / OEM** 2,999 USD, each paid once per company and covering every developer and every deployment, or **Enterprise**, quoted. There is no licence key and nothing in the package checks for one. The terms are in `LICENSE.md` and, once you hold a licence, the [8sheets Source Licence](https://8sheets.com/docs/licence/).
63
+ 8sheets is commercial software, not open source. You may install it and try it for free, to evaluate it. Using it in a product, or deploying it for your users or your own staff, needs a licence from [8sheets.com/pricing](https://8sheets.com/pricing/): **Internal** 999 USD or **SaaS / OEM** 2,999 USD, each paid once per company and covering every developer and every deployment, or **Enterprise**, quoted. There is no licence key and nothing in the package checks for one. The terms are in `LICENSE.md` and, once you hold a licence, the [8sheets Source Licence](https://8sheets.com/licence/).
package/index.d.ts CHANGED
@@ -132,7 +132,11 @@ export interface SheetEventProps {
132
132
  onObjectSelected?: SheetEventHandler;
133
133
  /** `menu-opening` (cancellable): A context menu is about to open. `items` can be edited in place. Fields: area, items, x, y, hit. */
134
134
  onMenuOpening?: SheetEventHandler;
135
- /** `command-executed`: A named command ran. Fields: name, args, result. */
135
+ /** `before-command` (cancellable): A command is about to run, through `commands.execute` (`source: 'api'`) or as a built-in ribbon button, menu row or shortcut the user used (`ribbon`, `menu`, `key`). Cancel it to stop it; for `api`, set `args` to change what it gets. Fields: name, args, source. */
136
+ onBeforeCommand?: SheetEventHandler;
137
+ /** `after-command`: A command ran, through `execute` or as a built-in control the user used. Fields: name, args, result, source. */
138
+ onAfterCommand?: SheetEventHandler;
139
+ /** `command-executed`: A named command ran through `commands.execute`. Built-in controls the user uses fire `after-command` instead. Fields: name, args, result, source. */
136
140
  onCommandExecuted?: SheetEventHandler;
137
141
  /** `invalid-operation`: An action was refused, for example by protection or a listener. Fields: action, reason. */
138
142
  onInvalidOperation?: SheetEventHandler;
@@ -168,8 +172,8 @@ export interface SheetProps extends SheetEventProps {
168
172
  export interface SheetRef {
169
173
  /** The mounted workbook, or null before onReady and after unmount. */
170
174
  readonly workbook: SheetsWorkbook | null;
171
- /** `workbook.openFile`: opens an xlsx or csv file. Throws before mount. */
172
- openFile(file: File | Blob): Promise<void>;
175
+ /** `workbook.openFile`: opens an xlsx or csv file; a nameless Blob is sniffed, or named by `options.name`. Throws before mount. */
176
+ openFile(file: File | Blob, options?: { name?: string }): Promise<void>;
173
177
  /** `workbook.saveXlsx`: writes the workbook as xlsx to a sink. Throws before mount. */
174
178
  saveXlsx(sink: { write: (bytes: Uint8Array) => Promise<any> }): Promise<void>;
175
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8sheets/react",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "homepage": "https://8sheets.com",
6
6
  "author": "8cells",
@@ -40,6 +40,6 @@
40
40
  ],
41
41
  "peerDependencies": {
42
42
  "react": ">=18",
43
- "@8sheets/core": "1.2.2"
43
+ "@8sheets/core": "1.4.0"
44
44
  }
45
45
  }
package/sheet.js CHANGED
@@ -169,7 +169,7 @@ export const Sheet = forwardRef(function Sheet(props, ref) {
169
169
  get workbook() {
170
170
  return wbRef.current;
171
171
  },
172
- openFile: (file) => need().openFile(file),
172
+ openFile: (file, options) => need().openFile(file, options),
173
173
  saveXlsx: (sink) => need().saveXlsx(sink),
174
174
  };
175
175
  }, []);