@bendyline/docblocks-react 2.5.0 → 2.6.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.
@@ -4,12 +4,14 @@ import {
4
4
  BADGE_LABELS,
5
5
  badgeKindFor,
6
6
  formatAheadBehind,
7
- summarizeDirty,
8
- useGitContext
9
- } from "./chunk-HFYPTTCH.js";
7
+ summarizeDirty
8
+ } from "./chunk-V2ENBGUA.js";
10
9
  import {
11
10
  useMenuKeyboard
12
11
  } from "./chunk-MRUK56JS.js";
12
+ import {
13
+ useGitContext
14
+ } from "./chunk-6E635KCJ.js";
13
15
  import {
14
16
  Dialog
15
17
  } from "./chunk-LG6HAWCK.js";
@@ -1094,20 +1096,71 @@ function GitConflictsDialog({
1094
1096
  );
1095
1097
  }
1096
1098
 
1097
- // src/Git/GitUI.tsx
1099
+ // src/Git/GitExpandedGrantDialog.tsx
1100
+ import { useState as useState7 } from "react";
1098
1101
  import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1102
+ function GitExpandedGrantDialog({ onClose }) {
1103
+ const git = useGitContext();
1104
+ const [always, setAlways] = useState7(false);
1105
+ if (!git) return null;
1106
+ const repositoryRoot = git.pendingGrant?.repositoryRoot ?? null;
1107
+ return /* @__PURE__ */ jsxs10(
1108
+ Dialog,
1109
+ {
1110
+ title: "Enable Git for this folder?",
1111
+ onClose,
1112
+ footer: /* @__PURE__ */ jsxs10(Fragment7, { children: [
1113
+ /* @__PURE__ */ jsx10("button", { type: "button", className: "db-git-secondary-btn", onClick: onClose, children: "Not now" }),
1114
+ /* @__PURE__ */ jsx10(
1115
+ "button",
1116
+ {
1117
+ type: "button",
1118
+ className: "db-git-primary-btn",
1119
+ disabled: git.grantBusy,
1120
+ onClick: () => {
1121
+ void git.enableExpandedRepo({ always }).then(() => onClose());
1122
+ },
1123
+ children: git.grantBusy ? "Enabling\u2026" : "Enable Git"
1124
+ }
1125
+ )
1126
+ ] }),
1127
+ children: [
1128
+ /* @__PURE__ */ jsx10("p", { className: "db-settings-hint", children: "This folder is part of a larger Git repository. Git operations such as pull, branch switching, and commit can change files outside the folder you opened." }),
1129
+ repositoryRoot && /* @__PURE__ */ jsxs10("p", { className: "db-git-hint", children: [
1130
+ "Repository: ",
1131
+ /* @__PURE__ */ jsx10("code", { children: repositoryRoot })
1132
+ ] }),
1133
+ /* @__PURE__ */ jsxs10("label", { className: "db-git-grant-remember", children: [
1134
+ /* @__PURE__ */ jsx10(
1135
+ "input",
1136
+ {
1137
+ type: "checkbox",
1138
+ checked: always,
1139
+ onChange: (event) => setAlways(event.target.checked)
1140
+ }
1141
+ ),
1142
+ /* @__PURE__ */ jsx10("span", { children: "Enable Git for every folder inside a repository, without asking" })
1143
+ ] }),
1144
+ /* @__PURE__ */ jsx10("p", { className: "db-settings-hint", children: "DocBlocks remembers this repository either way. You can turn the choice back off by removing it from the desktop settings file." })
1145
+ ]
1146
+ }
1147
+ );
1148
+ }
1149
+
1150
+ // src/Git/GitUI.tsx
1151
+ import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1099
1152
  function GitUI({ onOpenFile, onWorkspaceCloned }) {
1100
1153
  const git = useGitContext();
1101
1154
  if (!git || !git.available) return null;
1102
1155
  const { dialog, closeDialog } = git;
1103
- return /* @__PURE__ */ jsxs10(Fragment7, { children: [
1104
- /* @__PURE__ */ jsx10(GitStatusBar, {}),
1105
- git.repo && /* @__PURE__ */ jsx10("span", { className: "db-git-inline-status", role: "status", "aria-live": "polite", children: git.lastResult?.message ?? "" }),
1106
- dialog.kind === "commit" && /* @__PURE__ */ jsx10(GitCommitDialog, { onClose: closeDialog }),
1107
- dialog.kind === "branches" && /* @__PURE__ */ jsx10(GitBranchesDialog, { createFocus: dialog.createFocus, onClose: closeDialog }),
1108
- dialog.kind === "history" && /* @__PURE__ */ jsx10(GitHistoryDialog, { path: dialog.path, onClose: closeDialog }),
1109
- dialog.kind === "diff" && /* @__PURE__ */ jsx10(GitDiffDialog, { path: dialog.path, revision: dialog.revision, onClose: closeDialog }),
1110
- dialog.kind === "clone" && /* @__PURE__ */ jsx10(
1156
+ return /* @__PURE__ */ jsxs11(Fragment8, { children: [
1157
+ /* @__PURE__ */ jsx11(GitStatusBar, {}),
1158
+ git.repo && /* @__PURE__ */ jsx11("span", { className: "db-git-inline-status", role: "status", "aria-live": "polite", children: git.lastResult?.message ?? "" }),
1159
+ dialog.kind === "commit" && /* @__PURE__ */ jsx11(GitCommitDialog, { onClose: closeDialog }),
1160
+ dialog.kind === "branches" && /* @__PURE__ */ jsx11(GitBranchesDialog, { createFocus: dialog.createFocus, onClose: closeDialog }),
1161
+ dialog.kind === "history" && /* @__PURE__ */ jsx11(GitHistoryDialog, { path: dialog.path, onClose: closeDialog }),
1162
+ dialog.kind === "diff" && /* @__PURE__ */ jsx11(GitDiffDialog, { path: dialog.path, revision: dialog.revision, onClose: closeDialog }),
1163
+ dialog.kind === "clone" && /* @__PURE__ */ jsx11(
1111
1164
  GitCloneDialog,
1112
1165
  {
1113
1166
  onClose: closeDialog,
@@ -1117,7 +1170,7 @@ function GitUI({ onOpenFile, onWorkspaceCloned }) {
1117
1170
  }
1118
1171
  }
1119
1172
  ),
1120
- dialog.kind === "auth-guidance" && /* @__PURE__ */ jsx10(
1173
+ dialog.kind === "auth-guidance" && /* @__PURE__ */ jsx11(
1121
1174
  GitAuthGuidanceDialog,
1122
1175
  {
1123
1176
  operation: dialog.operation,
@@ -1125,7 +1178,8 @@ function GitUI({ onOpenFile, onWorkspaceCloned }) {
1125
1178
  onClose: closeDialog
1126
1179
  }
1127
1180
  ),
1128
- dialog.kind === "conflicts" && /* @__PURE__ */ jsx10(GitConflictsDialog, { paths: dialog.paths, onOpenFile, onClose: closeDialog })
1181
+ dialog.kind === "expanded-grant" && /* @__PURE__ */ jsx11(GitExpandedGrantDialog, { onClose: closeDialog }),
1182
+ dialog.kind === "conflicts" && /* @__PURE__ */ jsx11(GitConflictsDialog, { paths: dialog.paths, onOpenFile, onClose: closeDialog })
1129
1183
  ] });
1130
1184
  }
1131
1185
  export {
@@ -0,0 +1,27 @@
1
+ import { CalcEngineFactory } from '@bendyline/squisq-editor-react';
2
+
3
+ /**
4
+ * Host wiring for Squisq's optional IronCalc spreadsheet engine.
5
+ *
6
+ * Creating the factory imports no engine code and downloads no bytes. Squisq
7
+ * calls it only when a formula session opens, at which point the IronCalc
8
+ * adapter and the surface's same-origin WASM asset load asynchronously. If the
9
+ * factory rejects, Squisq falls back to its in-house calculation tier.
10
+ */
11
+
12
+ interface DocBlocksCalculationOptions {
13
+ /**
14
+ * `@ironcalc/wasm` binary source. Browser hosts normally pass the stable
15
+ * same-origin URL they publish; tests and non-browser hosts may pass bytes
16
+ * or a compiled module instead.
17
+ */
18
+ wasmSource: string | URL | Response | BufferSource | WebAssembly.Module;
19
+ /** IronCalc workbook locale. Defaults to `en`. */
20
+ locale?: string;
21
+ /** IronCalc workbook timezone. Defaults to `UTC`. */
22
+ timezone?: string;
23
+ }
24
+ /** Create the lazy IronCalc factory a DocBlocks surface passes to its shell. */
25
+ declare function createDocBlocksCalcEngineFactory(options: DocBlocksCalculationOptions): CalcEngineFactory;
26
+
27
+ export { type DocBlocksCalculationOptions, createDocBlocksCalcEngineFactory };
@@ -0,0 +1,16 @@
1
+ // src/Calculation/public-api.ts
2
+ function createDocBlocksCalcEngineFactory(options) {
3
+ const { wasmSource, locale, timezone } = options;
4
+ return async (config) => {
5
+ const { createIronCalcEngine } = await import("@bendyline/squisq-calc/ironcalc");
6
+ return createIronCalcEngine({
7
+ ...config,
8
+ wasmSource,
9
+ locale,
10
+ timezone
11
+ });
12
+ };
13
+ }
14
+ export {
15
+ createDocBlocksCalcEngineFactory
16
+ };
@@ -0,0 +1,11 @@
1
+ // src/Git/GitContext.tsx
2
+ import { createContext, useContext } from "react";
3
+ var GitContext = createContext(null);
4
+ function useGitContext() {
5
+ return useContext(GitContext);
6
+ }
7
+
8
+ export {
9
+ GitContext,
10
+ useGitContext
11
+ };
@@ -0,0 +1,83 @@
1
+ // src/Proofing/proofing-ignores.ts
2
+ var STORAGE_KEY = "docblocks:proofingIgnores";
3
+ var MAX_ENTRY_CHARACTERS = 64 * 1024;
4
+ var MAX_DOCUMENTS = 200;
5
+ function resolveStorage() {
6
+ try {
7
+ const candidate = Reflect.get(globalThis, "localStorage");
8
+ if (typeof candidate !== "object" || candidate === null || typeof Reflect.get(candidate, "getItem") !== "function" || typeof Reflect.get(candidate, "setItem") !== "function") {
9
+ return null;
10
+ }
11
+ return candidate;
12
+ } catch {
13
+ return null;
14
+ }
15
+ }
16
+ function proofingIgnoreKey(workspaceId, documentPath) {
17
+ return `${workspaceId}\0${documentPath}`;
18
+ }
19
+ function readAll(storage) {
20
+ try {
21
+ const raw = storage.getItem(STORAGE_KEY);
22
+ if (!raw) return {};
23
+ const parsed = JSON.parse(raw);
24
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return {};
25
+ const entries = {};
26
+ for (const [key, value] of Object.entries(parsed)) {
27
+ if (typeof value !== "object" || value === null) continue;
28
+ const json = Reflect.get(value, "json");
29
+ const savedAt = Reflect.get(value, "savedAt");
30
+ if (typeof json !== "string" || json.length > MAX_ENTRY_CHARACTERS) continue;
31
+ entries[key] = { json, savedAt: typeof savedAt === "number" ? savedAt : 0 };
32
+ }
33
+ return entries;
34
+ } catch {
35
+ return {};
36
+ }
37
+ }
38
+ function writeAll(storage, entries) {
39
+ const keys = Object.keys(entries);
40
+ if (keys.length > MAX_DOCUMENTS) {
41
+ const ordered = keys.sort((a, b) => (entries[a]?.savedAt ?? 0) - (entries[b]?.savedAt ?? 0));
42
+ for (const key of ordered.slice(0, keys.length - MAX_DOCUMENTS)) delete entries[key];
43
+ }
44
+ try {
45
+ storage.setItem(STORAGE_KEY, JSON.stringify(entries));
46
+ } catch {
47
+ }
48
+ }
49
+ function createLocalProofingIgnoreStore(resolveWorkspaceId, storageOverride) {
50
+ const storage = storageOverride ?? resolveStorage();
51
+ const keyFor = (document) => {
52
+ const workspaceId = resolveWorkspaceId();
53
+ if (!workspaceId) return null;
54
+ const documentPath = document.fileName ?? document.articleId;
55
+ if (!documentPath) return null;
56
+ return proofingIgnoreKey(workspaceId, documentPath);
57
+ };
58
+ return {
59
+ load(document) {
60
+ if (!storage) return void 0;
61
+ const key = keyFor(document);
62
+ if (!key) return void 0;
63
+ return readAll(storage)[key]?.json;
64
+ },
65
+ save(document, ignoredJson) {
66
+ if (!storage) return;
67
+ const key = keyFor(document);
68
+ if (!key) return;
69
+ const entries = readAll(storage);
70
+ if (ignoredJson.length > MAX_ENTRY_CHARACTERS) {
71
+ delete entries[key];
72
+ } else {
73
+ entries[key] = { json: ignoredJson, savedAt: Date.now() };
74
+ }
75
+ writeAll(storage, entries);
76
+ }
77
+ };
78
+ }
79
+
80
+ export {
81
+ proofingIgnoreKey,
82
+ createLocalProofingIgnoreStore
83
+ };
@@ -283,6 +283,35 @@ function AccentColorSettings({
283
283
  )) })
284
284
  ] });
285
285
  }
286
+ function ProofingSettingsControls({ value, onChange }) {
287
+ return /* @__PURE__ */ jsxs("fieldset", { className: "db-settings-fieldset", children: [
288
+ /* @__PURE__ */ jsx("legend", { className: "db-settings-legend", children: "Spelling and grammar" }),
289
+ /* @__PURE__ */ jsx("p", { className: "db-settings-hint", children: "Checking runs on this device \u2014 nothing you write is sent anywhere." }),
290
+ /* @__PURE__ */ jsxs("label", { className: "db-settings-checkbox", children: [
291
+ /* @__PURE__ */ jsx(
292
+ "input",
293
+ {
294
+ type: "checkbox",
295
+ checked: value.spelling,
296
+ onChange: (event) => onChange({ ...value, spelling: event.currentTarget.checked })
297
+ }
298
+ ),
299
+ "Show inline spell checking"
300
+ ] }),
301
+ /* @__PURE__ */ jsxs("label", { className: "db-settings-checkbox", children: [
302
+ /* @__PURE__ */ jsx(
303
+ "input",
304
+ {
305
+ type: "checkbox",
306
+ checked: value.grammar,
307
+ onChange: (event) => onChange({ ...value, grammar: event.currentTarget.checked })
308
+ }
309
+ ),
310
+ "Show inline grammar checking"
311
+ ] }),
312
+ /* @__PURE__ */ jsx("p", { className: "db-settings-hint", children: "(Grammar checking is currently only available for English)" })
313
+ ] });
314
+ }
286
315
  function WriteCanvasSettingsControls({ value, onChange }) {
287
316
  return /* @__PURE__ */ jsxs("fieldset", { className: "db-settings-fieldset", children: [
288
317
  /* @__PURE__ */ jsx("legend", { className: "db-settings-legend", children: "Write canvas" }),
@@ -587,6 +616,36 @@ function formatLineSpacing(value) {
587
616
  return `${value.toFixed(1).replace(/\.0$/, "")}\xD7`;
588
617
  }
589
618
 
619
+ // src/preferences/proofing.ts
620
+ var DEFAULT_PROOFING_PREFERENCES = {
621
+ spelling: true,
622
+ grammar: true
623
+ };
624
+ var STORAGE_KEY = "docblocks:proofingPreferences";
625
+ function loadProofingPreferences() {
626
+ try {
627
+ const raw = localStorage.getItem(STORAGE_KEY);
628
+ if (!raw) return { ...DEFAULT_PROOFING_PREFERENCES };
629
+ const stored = JSON.parse(raw);
630
+ if (typeof stored !== "object" || stored === null) {
631
+ return { ...DEFAULT_PROOFING_PREFERENCES };
632
+ }
633
+ const record = stored;
634
+ return {
635
+ spelling: typeof record.spelling === "boolean" ? record.spelling : DEFAULT_PROOFING_PREFERENCES.spelling,
636
+ grammar: typeof record.grammar === "boolean" ? record.grammar : DEFAULT_PROOFING_PREFERENCES.grammar
637
+ };
638
+ } catch {
639
+ }
640
+ return { ...DEFAULT_PROOFING_PREFERENCES };
641
+ }
642
+ function saveProofingPreferences(value) {
643
+ try {
644
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(value));
645
+ } catch {
646
+ }
647
+ }
648
+
590
649
  export {
591
650
  WRITE_CANVAS_FONT_SCHEMES,
592
651
  DEFAULT_WRITE_CANVAS_FONT_SCHEME,
@@ -594,6 +653,9 @@ export {
594
653
  DEFAULT_WRITE_CANVAS_PREFERENCES,
595
654
  loadWriteCanvasPreferences,
596
655
  saveWriteCanvasPreferences,
656
+ DEFAULT_PROOFING_PREFERENCES,
657
+ loadProofingPreferences,
658
+ saveProofingPreferences,
597
659
  DB_CHROME_COLORS,
598
660
  loadThemePreference,
599
661
  saveThemePreference,
@@ -602,5 +664,6 @@ export {
602
664
  SettingsDialog,
603
665
  ThemeSettings,
604
666
  AccentColorSettings,
667
+ ProofingSettingsControls,
605
668
  WriteCanvasSettingsControls
606
669
  };
@@ -1,10 +1,3 @@
1
- // src/Git/GitContext.tsx
2
- import { createContext, useContext } from "react";
3
- var GitContext = createContext(null);
4
- function useGitContext() {
5
- return useContext(GitContext);
6
- }
7
-
8
1
  // src/Git/git-status.ts
9
2
  var BADGE_GLYPHS = {
10
3
  modified: "M",
@@ -83,8 +76,6 @@ function summarizeDirty(status) {
83
76
  }
84
77
 
85
78
  export {
86
- GitContext,
87
- useGitContext,
88
79
  BADGE_GLYPHS,
89
80
  BADGE_LABELS,
90
81
  badgeKindFor,
@@ -2,17 +2,16 @@ import {
2
2
  createImageSaveOutput,
3
3
  updateExportTargetExtension
4
4
  } from "../chunk-FNSRCCBC.js";
5
- import {
6
- ExportDialog
7
- } from "../chunk-SIIEGOHY.js";
8
5
  import {
9
6
  runExport
10
7
  } from "../chunk-ODYNOPC3.js";
11
- import "../chunk-YBEYTVU2.js";
12
- import "../chunk-LG6HAWCK.js";
13
8
  import {
14
9
  buildExportFilename
15
10
  } from "../chunk-M5Y5WO7Z.js";
11
+ import {
12
+ ExportDialog
13
+ } from "../chunk-FMDLZ4ZG.js";
14
+ import "../chunk-YBEYTVU2.js";
16
15
  import {
17
16
  DEFAULT_OPTIONS,
18
17
  FORMAT_EXTENSIONS,
@@ -20,6 +19,7 @@ import {
20
19
  loadLastExportOptions,
21
20
  saveExportOptions
22
21
  } from "../chunk-EBWYGTN7.js";
22
+ import "../chunk-LG6HAWCK.js";
23
23
  export {
24
24
  DEFAULT_OPTIONS,
25
25
  ExportDialog,
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { FileSystemEntry, FileSystemProvider, FsErrorCode } from '@bendyline/docblocks/filesystem';
3
3
  import { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
4
- import { EditorColorScheme } from '@bendyline/squisq-editor-react';
4
+ import { EditorColorScheme, CalcEngineFactory, ProofingCapability, ProofingIgnoreStore } from '@bendyline/squisq-editor-react';
5
5
  import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
6
6
  import { FfmpegWasmLoadConfig } from '@bendyline/squisq-video';
7
7
  import { PrunePolicy, SaveVersionResult, DocumentVersionManager } from '@bendyline/squisq/versions';
8
- import { ThemePreference, AccentColor, WriteCanvasPreferences } from './settings/index.js';
9
- export { AccentColorSettings, AccentColorSettingsProps, DEFAULT_WRITE_CANVAS_FONT_SCHEME, SettingsDialog, SettingsDialogProps, ThemeSettings, ThemeSettingsProps, WRITE_CANVAS_FONT_SCHEMES, WriteCanvasFontScheme, WriteCanvasFontSchemeGroup, WriteCanvasFontSchemeOption, WriteCanvasSettingsControls, WriteCanvasSettingsControlsProps, resolveWriteCanvasFonts } from './settings/index.js';
8
+ import { ThemePreference, AccentColor, WriteCanvasPreferences, ProofingPreferences } from './settings/index.js';
9
+ export { AccentColorSettings, AccentColorSettingsProps, DEFAULT_PROOFING_PREFERENCES, DEFAULT_WRITE_CANVAS_FONT_SCHEME, ProofingSettingsControls, ProofingSettingsControlsProps, SettingsDialog, SettingsDialogProps, ThemeSettings, ThemeSettingsProps, WRITE_CANVAS_FONT_SCHEMES, WriteCanvasFontScheme, WriteCanvasFontSchemeGroup, WriteCanvasFontSchemeOption, WriteCanvasSettingsControls, WriteCanvasSettingsControlsProps, loadProofingPreferences, resolveWriteCanvasFonts, saveProofingPreferences } from './settings/index.js';
10
10
  import { SharedDocumentMode } from '@bendyline/docblocks/share';
11
11
  import { MediaProvider } from '@bendyline/squisq/schemas';
12
12
  import { ContentContainer } from '@bendyline/squisq/storage';
@@ -98,6 +98,7 @@ interface PinnedDocumentListItem extends PinnedDocument {
98
98
 
99
99
  type FileExplorerSortMode = 'name' | 'last-modified';
100
100
 
101
+ type NewFileFormat = 'markdown' | 'docx' | 'xlsx' | 'pdf' | 'web-interactive' | 'web-static';
101
102
  type FileTreeChange = {
102
103
  type: 'create';
103
104
  path: string;
@@ -157,7 +158,7 @@ interface FileExplorerProps {
157
158
  onTreeMutation?: FileTreeMutationHandler;
158
159
  /** Called after any mutation, with move details when paths change. */
159
160
  onTreeChange?: (change?: FileTreeChange) => void;
160
- /** Called when supported files are dropped onto the explorer. */
161
+ /** Called with every external file dropped onto the explorer. */
161
162
  onImportFiles?: (files: File[]) => void;
162
163
  /**
163
164
  * Ask the user to confirm an irreversible delete. Resolve `false` to abort.
@@ -265,6 +266,36 @@ interface DocBlocksShellProps {
265
266
  appBuildDate?: string;
266
267
  /** Self-hosted ffmpeg.wasm core. Supplying it enables Animated GIF export. */
267
268
  ffmpegWasm?: FfmpegWasmLoadConfig;
269
+ /**
270
+ * Optional spreadsheet calculation backend. DocBlocks surfaces normally
271
+ * pass the lazy IronCalc factory from the `calculation` package subpath;
272
+ * omitting it keeps Squisq's in-house calculation tier.
273
+ */
274
+ calcEngineFactory?: CalcEngineFactory;
275
+ /**
276
+ * Grammar and spellcheck engine, normally a harper-backed provider pointed
277
+ * at the surface's self-hosted WASM. Omit it and no proofing UI renders and
278
+ * no engine bytes are ever fetched. Pass an *instance* to keep one warm
279
+ * engine alive across shell remounts; pass a factory to let the editor own
280
+ * its lifetime and dispose it on unmount.
281
+ */
282
+ proofing?: ProofingCapability | null;
283
+ /**
284
+ * Whether proofing checks documents by default once the capability is
285
+ * present (default `true`). The user's session toggle and a document's
286
+ * `squisq-proofing` frontmatter both outrank this.
287
+ */
288
+ proofingDefaultEnabled?: boolean;
289
+ /**
290
+ * Where dismissed ("Ignore") findings persist. Squisq never writes them into
291
+ * the document, so without a store they last only for the session.
292
+ *
293
+ * Omit it and the shell keeps them in browser-local storage, scoped by
294
+ * workspace and path like every other per-document preference. Pass `null`
295
+ * to deliberately make dismissals session-only, or a store of your own to
296
+ * put them somewhere else.
297
+ */
298
+ proofingIgnoreStore?: ProofingIgnoreStore | null;
268
299
  /** Stable host title used before a document opens and for the optional home document. */
269
300
  homeDocumentTitle?: string;
270
301
  /** Document path that represents the host's indexable home experience. */
@@ -317,7 +348,7 @@ interface DocBlocksShellProps {
317
348
  */
318
349
  offlineReady?: boolean;
319
350
  }
320
- declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, showCodeCopyButton, onCopyCode, allowRecording, allowPresentationWindow, allowPresentationFullscreen, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
351
+ declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, calcEngineFactory, proofing, proofingDefaultEnabled, proofingIgnoreStore, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, showCodeCopyButton, onCopyCode, allowRecording, allowPresentationWindow, allowPresentationFullscreen, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
321
352
 
322
353
  /**
323
354
  * Versioning preferences — global default + per-workspace resolution.
@@ -349,6 +380,10 @@ interface AppMenuProps {
349
380
  writeCanvasSettings?: WriteCanvasPreferences;
350
381
  /** Called when the user changes the Write canvas typography. */
351
382
  onWriteCanvasSettingsChange?: (settings: WriteCanvasPreferences) => void;
383
+ /** Current inline spelling/grammar checking preferences. */
384
+ proofingPreferences?: ProofingPreferences;
385
+ /** Called when the user toggles inline spelling or grammar checking. */
386
+ onProofingPreferencesChange?: (settings: ProofingPreferences) => void;
352
387
  /** Current global versioning preference. */
353
388
  versioningPreference?: VersioningPreference;
354
389
  /** Called when the user changes the global versioning preference. */
@@ -385,7 +420,7 @@ interface AppMenuProps {
385
420
  /** ISO build date shown in About. */
386
421
  appBuildDate?: string;
387
422
  }
388
- declare function AppMenu({ logoUrl, themePreference, onThemeChange, accentColor, onAccentColorChange, writeCanvasSettings, onWriteCanvasSettingsChange, versioningPreference, onVersioningPreferenceChange, onDownloadAllWorkspaces, onKeepBrowserData, onInstallApp, getStorageEstimate, storagePersistent, appVersion, appBuildDate, }: AppMenuProps): react_jsx_runtime.JSX.Element;
423
+ declare function AppMenu({ logoUrl, themePreference, onThemeChange, accentColor, onAccentColorChange, writeCanvasSettings, onWriteCanvasSettingsChange, proofingPreferences, onProofingPreferencesChange, versioningPreference, onVersioningPreferenceChange, onDownloadAllWorkspaces, onKeepBrowserData, onInstallApp, getStorageEstimate, storagePersistent, appVersion, appBuildDate, }: AppMenuProps): react_jsx_runtime.JSX.Element;
389
424
 
390
425
  interface ExportToolbarControlsProps {
391
426
  /** Currently selected file path — used to derive the download filename. */
@@ -453,4 +488,4 @@ interface UseDocumentSessionResult {
453
488
  */
454
489
  declare function useDocumentSession(autoSaveDelayMs?: number): UseDocumentSessionResult;
455
490
 
456
- export { AccentColor, AppMenu, type AppMenuProps, DocBlocksShell, type DocBlocksShellProps, ExportBlobSaver, type ExportDestinationAdapter, type ExportDestinationTarget, ExportToolbarControls, type ExportToolbarControlsProps, FileExplorer, type FileExplorerProps, type FileExplorerSortMode, type FileTreeActions, type FileTreeChange, type FileTreeMutationHandler, FileTreeNode, type FileTreeNodeProps, type FileTreeReadIssue, type FileTreeState, ThemePreference, type UseDocumentSessionResult, WorkspacePicker, type WorkspacePickerProps, WriteCanvasPreferences, useDocumentSession, useFileTree };
491
+ export { AccentColor, AppMenu, type AppMenuProps, DocBlocksShell, type DocBlocksShellProps, ExportBlobSaver, type ExportDestinationAdapter, type ExportDestinationTarget, ExportToolbarControls, type ExportToolbarControlsProps, FileExplorer, type FileExplorerProps, type FileExplorerSortMode, type FileTreeActions, type FileTreeChange, type FileTreeMutationHandler, FileTreeNode, type FileTreeNodeProps, type FileTreeReadIssue, type FileTreeState, type NewFileFormat, ProofingPreferences, ThemePreference, type UseDocumentSessionResult, WorkspacePicker, type WorkspacePickerProps, WriteCanvasPreferences, useDocumentSession, useFileTree };