@sheetxl/react 0.7.28-beta.2 → 0.7.28-beta.3
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/browser/cjs/index.cjs +7 -7
- package/browser/esm/{BPJdKxa9KFZWhw7o.mjs → DOpVczcEx-CkZUxD.mjs} +1 -1
- package/browser/esm/index.mjs +1327 -1296
- package/node/esm/{CUEW3f18r-pU7F0q.mjs → CZvaQUM2sezrZ_Yy.mjs} +1 -1
- package/node/esm/index.mjs +849 -818
- package/package.json +6 -6
- package/types/src/workbook/resolveWorkbookInput.d.ts +5 -3
- package/types/src/workbook/useResolvedWorkbook.d.ts +6 -0
- package/types/src/workbook/useWorkbookApp.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/react",
|
|
3
3
|
"description": "React - React components needed to build advanced grid and spreadsheet UIs.",
|
|
4
|
-
"version": "0.7.28-beta.
|
|
4
|
+
"version": "0.7.28-beta.3",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
49
49
|
"@dnd-kit/sortable": "^10.0.0",
|
|
50
50
|
"@dnd-kit/utilities": "^3.2.2",
|
|
51
|
-
"@sheetxl/grid-react": "^0.7.28-beta.
|
|
52
|
-
"@sheetxl/io": "^0.7.28-beta.
|
|
53
|
-
"@sheetxl/sdk": "^0.7.28-beta.
|
|
54
|
-
"@sheetxl/utils": "^0.7.28-beta.
|
|
55
|
-
"@sheetxl/utils-react": "^0.7.28-beta.
|
|
51
|
+
"@sheetxl/grid-react": "^0.7.28-beta.3",
|
|
52
|
+
"@sheetxl/io": "^0.7.28-beta.3",
|
|
53
|
+
"@sheetxl/sdk": "^0.7.28-beta.3",
|
|
54
|
+
"@sheetxl/utils": "^0.7.28-beta.3",
|
|
55
|
+
"@sheetxl/utils-react": "^0.7.28-beta.3",
|
|
56
56
|
"clsx": "^2.1.1",
|
|
57
57
|
"react-merge-refs": "^3.0.2",
|
|
58
58
|
"react-moveable": "^0.56.0",
|
|
@@ -20,8 +20,10 @@ export interface ResolveWorkbookOptions {
|
|
|
20
20
|
* - {@link IWorkbookIO.ReadOptions} (a `source`) is read via the `io`; the workbook carries the
|
|
21
21
|
* origin minted by the read
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* @returns The workbook, or `null` when the user DECLINED to open one — a dismissed open picker or
|
|
24
|
+
* a cancelled password prompt. This mirrors {@link IWorkbookIO.read}, which reserves `null` for
|
|
25
|
+
* exactly that; a source that genuinely cannot be read throws instead, so a caller can tell a
|
|
26
|
+
* deliberate cancel apart from a failure and surface an error state only for the latter.
|
|
25
27
|
*/
|
|
26
|
-
export declare const resolveWorkbookInput: (input: WorkbookInput | null | undefined, options?: ResolveWorkbookOptions) => Promise<IWorkbook>;
|
|
28
|
+
export declare const resolveWorkbookInput: (input: WorkbookInput | null | undefined, options?: ResolveWorkbookOptions) => Promise<IWorkbook | null>;
|
|
27
29
|
//# sourceMappingURL=resolveWorkbookInput.d.ts.map
|
|
@@ -26,6 +26,12 @@ export interface UseResolvedWorkbookOptions extends ResolveWorkbookOptions {
|
|
|
26
26
|
* `io` / `defaultTheme` are resolve-time config (read live), NOT reactive triggers — only `input`
|
|
27
27
|
* (and an explicit {@link UseResolvedWorkbookOptions.reloadKey}) re-resolve, so a changing theme/io
|
|
28
28
|
* identity never forces a re-read of the same source.
|
|
29
|
+
*
|
|
30
|
+
* A DECLINED open (a dismissed picker, a cancelled password prompt — `resolveWorkbookInput`
|
|
31
|
+
* resolving `null`) is not an `error`: the user asked for nothing to happen, so nothing does. A
|
|
32
|
+
* workbook already on screen stays exactly as it is, and a decline on the very first resolve — where
|
|
33
|
+
* there is nothing to keep — lands on the same blank workbook an empty input would have produced,
|
|
34
|
+
* so the surface comes up usable rather than on an error panel for a file nobody tried to open.
|
|
29
35
|
*/
|
|
30
36
|
export declare const useResolvedWorkbook: (input: WorkbookInput | null | undefined, options?: UseResolvedWorkbookOptions) => ResolvedWorkbookState;
|
|
31
37
|
//# sourceMappingURL=useResolvedWorkbook.d.ts.map
|
|
@@ -35,7 +35,9 @@ export interface WorkbookAppOptions extends WindowChromeOptions {
|
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
37
|
* For apps that own the whole window — NOT for embedding a workbook as a widget. Read failures
|
|
38
|
-
* reject the returned promise (so the view's error panel shows) rather than yielding a null
|
|
38
|
+
* reject the returned promise (so the view's error panel shows) rather than yielding a null
|
|
39
|
+
* workbook; a DECLINED open — a dismissed picker or a cancelled password prompt — is not a failure
|
|
40
|
+
* and yields the same blank workbook a session with no source gets.
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
41
43
|
* ```tsx
|