@sheetxl/react 0.8.0-beta.4 → 0.8.0-beta.5
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 +11 -11
- package/browser/esm/{DlcxLIcj0AOi11oL.mjs → DnLe2b-bkbmyx9f1.mjs} +1 -1
- package/browser/esm/index.mjs +1772 -1768
- package/node/esm/{BNfJsRdVZSz2923x.mjs → Dwqmv542iuwb2y2A.mjs} +1 -1
- package/node/esm/index.mjs +1497 -1493
- package/package.json +6 -6
- package/types/src/theme/ThemeState.d.ts +13 -0
- package/types/src/theme/useGridColorScheme.d.ts +1 -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.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.5",
|
|
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.8.0-beta.
|
|
52
|
-
"@sheetxl/io": "^0.8.0-beta.
|
|
53
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
54
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
55
|
-
"@sheetxl/utils-react": "^0.8.0-beta.
|
|
51
|
+
"@sheetxl/grid-react": "^0.8.0-beta.5",
|
|
52
|
+
"@sheetxl/io": "^0.8.0-beta.5",
|
|
53
|
+
"@sheetxl/sdk": "^0.8.0-beta.5",
|
|
54
|
+
"@sheetxl/utils": "^0.8.0-beta.5",
|
|
55
|
+
"@sheetxl/utils-react": "^0.8.0-beta.5",
|
|
56
56
|
"clsx": "^2.1.1",
|
|
57
57
|
"react-merge-refs": "^3.0.2",
|
|
58
58
|
"react-moveable": "^0.56.0",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThemeMode } from '@sheetxl/utils-react';
|
|
1
2
|
/**
|
|
2
3
|
* Persistence keys for the spreadsheet's self-managed appearance state.
|
|
3
4
|
*
|
|
@@ -7,6 +8,9 @@
|
|
|
7
8
|
* its editor theme) does so with the same key, or by supplying its own provider/store. They are
|
|
8
9
|
* intentionally not component props — appearance is *state*, theme customization is *config* (see
|
|
9
10
|
* `Studio.theme`).
|
|
11
|
+
*
|
|
12
|
+
* A host changes the starting value of any of these with `PersistenceStateProvider`'s `defaultValues`;
|
|
13
|
+
* the user's own choice still wins.
|
|
10
14
|
*/
|
|
11
15
|
export declare const ThemeStateKey: {
|
|
12
16
|
/** The user's light/dark override (`null` = follow system). */
|
|
@@ -16,4 +20,13 @@ export declare const ThemeStateKey: {
|
|
|
16
20
|
/** Whether images invert in a dark grid. */
|
|
17
21
|
readonly DarkImages: "enableDarkImages";
|
|
18
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The shipped defaults for {@link ThemeStateKey}, used when neither the store nor the provider's
|
|
25
|
+
* `defaultValues` has a value. They match Excel: follow the system mode, light grid, images unchanged.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ThemeStateDefaults: {
|
|
28
|
+
readonly themeMode: ThemeMode | null;
|
|
29
|
+
readonly enableDarkGrid: false;
|
|
30
|
+
readonly enableDarkImages: false;
|
|
31
|
+
};
|
|
19
32
|
//# sourceMappingURL=ThemeState.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { ThemeMode } from '@sheetxl/utils-react';
|
|
|
4
4
|
*
|
|
5
5
|
* Derived from the shared appearance preference: the user's light/dark override
|
|
6
6
|
* (`ThemeStateKey.Mode`, resolved via `prefers-color-scheme` when unset), gated by *Enable Dark Grid*
|
|
7
|
-
* (`ThemeStateKey.DarkGrid`,
|
|
7
|
+
* (`ThemeStateKey.DarkGrid`, off unless a host or the user turns it on) so the grid stays light in a dark app unless opted in.
|
|
8
8
|
*
|
|
9
9
|
* Because it reads the shared (module-singleton) preference store, every caller — the grid surface
|
|
10
10
|
* (`SheetElement`) **and** chrome that must match the grid but renders outside its DOM (the table-style
|