@sheetxl/react 0.8.0-beta.4 → 0.8.0-beta.6

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.
Files changed (33) hide show
  1. package/browser/cjs/index.cjs +16 -15
  2. package/browser/esm/{DlcxLIcj0AOi11oL.mjs → CFCvoIa_w1ERjvMW.mjs} +1 -1
  3. package/browser/esm/index.mjs +3333 -2770
  4. package/node/esm/{BNfJsRdVZSz2923x.mjs → B9g0FgUjU-KLHkGu.mjs} +1 -1
  5. package/node/esm/index.mjs +3012 -2444
  6. package/package.json +6 -6
  7. package/resources/locales/de/sheet.cmd.json +35 -7
  8. package/resources/locales/de/ui.msg.json +6 -1
  9. package/resources/locales/en/sheet.cmd.json +36 -8
  10. package/resources/locales/en/ui.msg.json +6 -1
  11. package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
  12. package/types/src/checklist/ValueChecklist.d.ts +1 -1
  13. package/types/src/comment/NoteEditor.d.ts +20 -0
  14. package/types/src/comment/index.d.ts +2 -0
  15. package/types/src/editor/FunctionPreviewPanel.d.ts +1 -1
  16. package/types/src/editor/SheetCellEditorLayer.d.ts +0 -8
  17. package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
  18. package/types/src/editor/index.d.ts +1 -0
  19. package/types/src/editor/useFormulaInput.d.ts +9 -0
  20. package/types/src/index.d.ts +2 -0
  21. package/types/src/layer/CommentsLayer.d.ts +35 -0
  22. package/types/src/layer/index.d.ts +1 -0
  23. package/types/src/movable/IMovableArea.d.ts +20 -0
  24. package/types/src/movable/MovableEdit.d.ts +22 -0
  25. package/types/src/movable/MovableFrame.d.ts +2 -0
  26. package/types/src/movable/TextBox.d.ts +34 -0
  27. package/types/src/movable/index.d.ts +2 -0
  28. package/types/src/richText/RichTextEditor.d.ts +41 -0
  29. package/types/src/richText/index.d.ts +2 -0
  30. package/types/src/sheet/SheetCommands.d.ts +2 -2
  31. package/types/src/theme/ThemeState.d.ts +14 -1
  32. package/types/src/theme/useGridColorScheme.d.ts +1 -1
  33. package/types/src/workbook/WorkbookCommands.d.ts +2 -2
@@ -1,12 +1,16 @@
1
+ import { ThemeMode } from '@sheetxl/utils-react';
1
2
  /**
2
3
  * Persistence keys for the spreadsheet's self-managed appearance state.
3
4
  *
4
5
  * @remarks
5
- * Owned via `usePersistenceState` against the surrounding `PersistenceStateProvider` (Studio, or a
6
+ * Owned via `usePersistentState` against the surrounding `PersistentStateProvider` (Studio, or a
6
7
  * standalone host). A consumer that wants to read or set them (e.g. a VS Code host driving the mode from
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 `PersistentStateProvider`'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`, default off) so the grid stays light in a dark app unless opted in.
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
@@ -45,7 +45,7 @@ export interface FindMemory {
45
45
  scope?: CommandContext.FindScopeOptions;
46
46
  }
47
47
  /**
48
- * The last-search memory handle — **live getter/setter** over the bridge's `usePersistenceState`, exactly
48
+ * The last-search memory handle — **live getter/setter** over the bridge's `usePersistentState`, exactly
49
49
  * like {@link PickerMemory} for the style pickers. A getter (not the value) so recording a search doesn't
50
50
  * change the `data` identity and re-run this whole contributor.
51
51
  */
@@ -77,7 +77,7 @@ export interface ContributeWorkbookCommandsOptions {
77
77
  */
78
78
  editable?: SheetEditable | null;
79
79
  /**
80
- * Persisted last-search memory (`workbook.lastFind`), owned by the bridge's `usePersistenceState`. Feeds
80
+ * Persisted last-search memory (`workbook.lastFind`), owned by the bridge's `usePersistentState`. Feeds
81
81
  * `findNext` / `findPrevious` and the find window's seed. Omit ⇒ those two stay disabled and the window
82
82
  * always seeds from the active cell.
83
83
  */