@bendyline/docblocks 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.
@@ -14,7 +14,7 @@ This notice is included in the published npm tarball. Transitive packages instal
14
14
 
15
15
  | Package | Version | License | Source |
16
16
  | --- | --- | --- | --- |
17
- | @bendyline/squisq | 2.8.0 | MIT | https://github.com/bendyline/squisq |
17
+ | @bendyline/squisq | 2.11.1 | MIT | https://github.com/bendyline/squisq |
18
18
  | @types/debug | 4.1.12 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
19
19
  | @types/hast | 3.0.4 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
20
20
  | @types/katex | 0.16.8 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
@@ -132,7 +132,7 @@ This notice is included in the published npm tarball. Transitive packages instal
132
132
  Package-local license, copying, and notice files are reproduced below. Where a published package omits its repository license, the reviewed aggregate or README identified in `Source files` supplies the retained material.
133
133
 
134
134
  ==============================================================================
135
- Components: @bendyline/squisq@2.8.0
135
+ Components: @bendyline/squisq@2.11.1
136
136
  Source files: node_modules/@bendyline/squisq/LICENSE
137
137
  ==============================================================================
138
138
  MIT License
@@ -158,7 +158,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
158
158
  SOFTWARE.
159
159
 
160
160
  ==============================================================================
161
- Components: @bendyline/squisq@2.8.0
161
+ Components: @bendyline/squisq@2.11.1
162
162
  Source files: node_modules/@bendyline/squisq/NOTICE.md
163
163
  ==============================================================================
164
164
  # Third-Party Notices for @bendyline/squisq
@@ -189,7 +189,7 @@ third-party license texts for bundled code and data are shipped in
189
189
  THIRD_PARTY_LICENSES.txt.
190
190
 
191
191
  ==============================================================================
192
- Components: @bendyline/squisq@2.8.0
192
+ Components: @bendyline/squisq@2.11.1
193
193
  Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
194
194
  ==============================================================================
195
195
  THIRD-PARTY LICENSES FOR @bendyline/squisq
@@ -1,7 +1,7 @@
1
1
  import { s as FileSystemProviderV2, r as FileSystemProviderCapabilities, k as FileSystemEntrySnapshot, m as FileSystemFileRead, K as FileSystemWriteOptions, n as FileSystemFileSnapshot, g as FileSystemCreateDirectoryOptions, h as FileSystemDirectorySnapshot, u as FileSystemRemoveOptions, v as FileSystemRemoveResult, o as FileSystemMoveOptions, w as FileSystemSnapshot, C as FileSystemWatchEvent, H as FileSystemWatchOptions, I as FileSystemWatchSubscription, q as FileSystemProvider, F as FileCommitResult, j as FileSystemEntry, b as FileMeta } from '../types-Bb3yccTH.js';
2
2
  import { a as WorkspacePath } from '../workspace-path-CWVrcuPL.js';
3
3
  export { isElectronHost } from '../host/index.js';
4
- import '../types-ZU8tTM7T.js';
4
+ import '../types-DBYraXxE.js';
5
5
 
6
6
  /** Pure renderer-side client for the typed Electron filesystem v2 transport. */
7
7
  declare class ElectronFileSystemProviderV2 implements FileSystemProviderV2 {
@@ -10,7 +10,7 @@ import { MediaProvider } from '@bendyline/squisq/schemas';
10
10
  export { NativeFileSystemMovePathState, NativeFileSystemMoveRecoveryError, NativeFileSystemMoveRecoveryState, NativeFileSystemProvider, NativeFileSystemProviderV2, isNativeFileSystemSupported, loadDirectoryHandle, openNativeFolder, removeDirectoryHandle, restoreNativeFolder, storeDirectoryHandle } from './native.js';
11
11
  export { ElectronFileSystemProvider, ElectronFileSystemProviderV2 } from './electron.js';
12
12
  export { isElectronHost } from '../host/index.js';
13
- import '../types-ZU8tTM7T.js';
13
+ import '../types-DBYraXxE.js';
14
14
 
15
15
  interface DecodeUtf8TextOptions {
16
16
  /** User-facing description of the payload being decoded. */
@@ -1,5 +1,5 @@
1
- import { Q as OpenRequest, M as HostPinnedDocument, D as DocBlocksHostAPI } from '../types-ZU8tTM7T.js';
2
- export { a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, F as HostEnvironment, I as HostExportTargetGrant, J as HostFileSystemV2OpenRequest, K as HostFileSystemV2Result, L as HostFileSystemV2WatchMessage, N as HostPrepareCloseRequest, O as HostPrepareCloseResult, P as MenuCommand, U as UpdateCheckResult, R as UpdateInstallResult, S as UpdaterStatus } from '../types-ZU8tTM7T.js';
1
+ import { Q as OpenRequest, M as HostPinnedDocument, D as DocBlocksHostAPI } from '../types-DBYraXxE.js';
2
+ export { a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, F as HostEnvironment, I as HostExportTargetGrant, J as HostFileSystemV2OpenRequest, K as HostFileSystemV2Result, L as HostFileSystemV2WatchMessage, N as HostPrepareCloseRequest, O as HostPrepareCloseResult, P as MenuCommand, U as UpdateCheckResult, R as UpdateInstallResult, S as UpdaterStatus } from '../types-DBYraXxE.js';
3
3
  import '../types-Bb3yccTH.js';
4
4
  import '../workspace-path-CWVrcuPL.js';
5
5
 
package/dist/index.d.ts CHANGED
@@ -9,6 +9,6 @@ export { DOCUMENT_RECOVERY_JOURNAL_SCHEMA_VERSION, DOCUMENT_RECOVERY_JOURNAL_STO
9
9
  export { ElectronWorkspaceReconciliation, TransientOrigin, WorkspaceDescriptor, ensureDefaultWorkspace, getTransientWorkspace, getWorkspace, listWorkspaces, parsePersistedWorkspaceList, reconcileElectronWorkspaceDescriptors, registerTransientWorkspace, removeWorkspace, saveWorkspace, touchWorkspace, unregisterTransientWorkspace } from './workspace/index.js';
10
10
  export { HOST_WIRE_LIMITS, MAX_HOST_PINNED_DOCUMENTS, getDocBlocksHost, isBoundedBytePayload, isBoundedString, isElectronHost, isTrustedRendererUrl, maybeGetDocBlocksHost, parseExternalHttpUrl, parseOpenRequest, parsePinnedMenuDocuments } from './host/index.js';
11
11
  export { SHARED_DOCUMENT_LIMITS, SharedDocumentHashParseResult, SharedDocumentMode, SharedDocumentPayload, createSharedDocumentHash, createSharedDocumentUrl, parseSharedDocumentHash } from './share/index.js';
12
- export { D as DocBlocksHostAPI, a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, F as HostEnvironment, I as HostExportTargetGrant, J as HostFileSystemV2OpenRequest, K as HostFileSystemV2Result, L as HostFileSystemV2WatchMessage, M as HostPinnedDocument, N as HostPrepareCloseRequest, O as HostPrepareCloseResult, P as MenuCommand, Q as OpenRequest, U as UpdateCheckResult, R as UpdateInstallResult, S as UpdaterStatus } from './types-ZU8tTM7T.js';
12
+ export { D as DocBlocksHostAPI, a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, F as HostEnvironment, I as HostExportTargetGrant, J as HostFileSystemV2OpenRequest, K as HostFileSystemV2Result, L as HostFileSystemV2WatchMessage, M as HostPinnedDocument, N as HostPrepareCloseRequest, O as HostPrepareCloseResult, P as MenuCommand, Q as OpenRequest, U as UpdateCheckResult, R as UpdateInstallResult, S as UpdaterStatus } from './types-DBYraXxE.js';
13
13
  import '@bendyline/squisq/storage';
14
14
  import '@bendyline/squisq/schemas';
@@ -87,10 +87,16 @@ interface GitRepoDetection {
87
87
  isRepo: boolean;
88
88
  /** False when the workspace root is a subdirectory of a larger repo. */
89
89
  rootIsToplevel?: boolean;
90
- /** Main-owned repository authority; absent when expanded access was declined. */
90
+ /** Main-owned repository authority; absent while expanded access is ungranted. */
91
91
  repositoryId?: string;
92
92
  /** True when Git metadata or the work tree extends beyond the workspace grant. */
93
93
  requiresExpandedGrant?: boolean;
94
+ /**
95
+ * Display path of the enclosing repository root. Present only alongside
96
+ * `requiresExpandedGrant` so the in-app consent surface can name what the
97
+ * user would be granting access to.
98
+ */
99
+ repositoryRoot?: string;
94
100
  }
95
101
  type GitFileStatusCode = 'added' | 'modified' | 'deleted' | 'renamed' | 'copied' | 'type-changed' | 'untracked' | 'ignored' | 'unmerged';
96
102
  interface GitFileChange {
@@ -198,8 +204,22 @@ interface GitCloneHandle {
198
204
  }
199
205
  interface DocBlocksHostGitAPI {
200
206
  capabilities(): Promise<GitCapabilities>;
201
- /** Detect a persisted workspace by opaque workspace id and mint repository authority. */
207
+ /**
208
+ * Detect a persisted workspace by opaque workspace id and mint repository
209
+ * authority. Never prompts: a workspace inside a larger repository comes
210
+ * back with `requiresExpandedGrant` and no `repositoryId` until the user
211
+ * opts in through `grantExpandedRepo`.
212
+ */
202
213
  detectRepo(workspaceId: string): Promise<GitResult<GitRepoDetection>>;
214
+ /**
215
+ * Grant expanded access to the repository enclosing the workspace and mint
216
+ * repository authority. Must be called from an explicit user gesture. The
217
+ * choice is remembered for that repository; `always` remembers it for every
218
+ * repository opened from a subfolder.
219
+ */
220
+ grantExpandedRepo(workspaceId: string, opts?: {
221
+ always?: boolean;
222
+ }): Promise<GitResult<GitRepoDetection>>;
203
223
  init(workspaceId: string): Promise<GitResult<void>>;
204
224
  status(repositoryId: string): Promise<GitResult<GitStatus>>;
205
225
  stage(repositoryId: string, paths: string[]): Promise<GitResult<void>>;
@@ -1,6 +1,19 @@
1
1
  /**
2
2
  * Typed message protocol between the extension host and webview.
3
3
  */
4
+ /**
5
+ * Bounds for host-persisted proofing state.
6
+ *
7
+ * Both payloads are written by the webview and stored in extension-host state,
8
+ * which is memory-resident and serialized on every VS Code shutdown, so neither
9
+ * may grow without limit. The ignore payload is the engine's opaque export —
10
+ * a list of context hashes — and grows only with dismissals in one document.
11
+ */
12
+ declare const PROOF_STATE_LIMITS: Readonly<{
13
+ dictionaryWords: 5000;
14
+ wordCharacters: 128;
15
+ ignoredJsonCharacters: number;
16
+ }>;
4
17
  type DocumentSessionMessageStatus = 'idle' | 'saved' | 'dirty' | 'saving' | 'error' | 'conflict' | 'closed';
5
18
  type DocumentConflictChoice = 'use-local' | 'use-external';
6
19
  /** Host-observed details that help a user distinguish two text branches. */
@@ -40,10 +53,21 @@ interface VscodeWriteCanvasSettings {
40
53
  fontScheme: DocBlocksWriteCanvasFontScheme;
41
54
  }
42
55
  declare const DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS: Readonly<VscodeWriteCanvasSettings>;
56
+ /**
57
+ * Which inline proofing squiggles the editor draws. Two switches, not
58
+ * one: harper's grammar rules are English-only, so a writer working in
59
+ * another language wants spelling alone. Both off means no engine loads.
60
+ */
61
+ interface VscodeProofingSettings {
62
+ spelling: boolean;
63
+ grammar: boolean;
64
+ }
65
+ declare const DEFAULT_VSCODE_PROOFING_SETTINGS: Readonly<VscodeProofingSettings>;
43
66
  interface VscodeEditorSettings {
44
67
  autoSave: boolean;
45
68
  accentColor: DocBlocksAccentColor;
46
69
  writeCanvasSettings: VscodeWriteCanvasSettings;
70
+ proofingSettings: VscodeProofingSettings;
47
71
  }
48
72
  /**
49
73
  * An opaque, one-shot authority to write one host-owned export target.
@@ -144,6 +168,18 @@ type ExtensionToWebviewMessage = {
144
168
  type: 'workspaceFileError';
145
169
  requestId: number;
146
170
  message: string;
171
+ } | {
172
+ type: 'proofDictionaryLoaded';
173
+ requestId: number;
174
+ words: string[];
175
+ } | {
176
+ type: 'proofIgnoresLoaded';
177
+ requestId: number;
178
+ ignoredJson: string | null;
179
+ } | {
180
+ type: 'proofStateError';
181
+ requestId: number;
182
+ message: string;
147
183
  };
148
184
  /** Messages sent from the webview to the extension host. */
149
185
  type WebviewToExtensionMessage = {
@@ -157,6 +193,9 @@ type WebviewToExtensionMessage = {
157
193
  } | {
158
194
  type: 'setWriteCanvasSettings';
159
195
  settings: VscodeWriteCanvasSettings;
196
+ } | {
197
+ type: 'setProofingSettings';
198
+ settings: VscodeProofingSettings;
160
199
  } | {
161
200
  type: 'openLink';
162
201
  href: string;
@@ -219,6 +258,18 @@ type WebviewToExtensionMessage = {
219
258
  type: 'readWorkspaceFile';
220
259
  requestId: number;
221
260
  path: string;
261
+ } | {
262
+ type: 'loadProofDictionary';
263
+ requestId: number;
264
+ } | {
265
+ type: 'addProofDictionaryWord';
266
+ word: string;
267
+ } | {
268
+ type: 'loadProofIgnores';
269
+ requestId: number;
270
+ } | {
271
+ type: 'saveProofIgnores';
272
+ ignoredJson: string;
222
273
  };
223
274
  interface MediaEntryMessage {
224
275
  name: string;
@@ -255,4 +306,4 @@ declare function isSafeMimeType(value: unknown): value is string;
255
306
  */
256
307
  declare function hasSubstantiveTextChange(baseline: string, candidate: string): boolean;
257
308
 
258
- export { DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS, DOCBLOCKS_ACCENT_COLORS, DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MAX, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MIN, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MAX, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MIN, type DocBlocksAccentColor, type DocBlocksWriteCanvasFontScheme, type DocumentConflictChoice, type DocumentConflictDetailsMessage, type DocumentSessionMessageStatus, type ExportTargetGrantMessage, type ExtensionToWebviewMessage, type MediaEntryMessage, type VscodeEditorSettings, type VscodeWriteCanvasSettings, type WebviewToExtensionMessage, hasSubstantiveTextChange, isDocBlocksAccentColor, isDocBlocksWriteCanvasFontScheme, isDocBlocksWriteCanvasLineSpacing, isDocBlocksWriteCanvasTextSize, isSafeExportFilename, isSafeMimeType, parseExtensionToWebviewMessage, parseWebviewToExtensionMessage };
309
+ export { DEFAULT_VSCODE_PROOFING_SETTINGS, DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS, DOCBLOCKS_ACCENT_COLORS, DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MAX, DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MIN, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MAX, DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MIN, type DocBlocksAccentColor, type DocBlocksWriteCanvasFontScheme, type DocumentConflictChoice, type DocumentConflictDetailsMessage, type DocumentSessionMessageStatus, type ExportTargetGrantMessage, type ExtensionToWebviewMessage, type MediaEntryMessage, PROOF_STATE_LIMITS, type VscodeEditorSettings, type VscodeProofingSettings, type VscodeWriteCanvasSettings, type WebviewToExtensionMessage, hasSubstantiveTextChange, isDocBlocksAccentColor, isDocBlocksWriteCanvasFontScheme, isDocBlocksWriteCanvasLineSpacing, isDocBlocksWriteCanvasTextSize, isSafeExportFilename, isSafeMimeType, parseExtensionToWebviewMessage, parseWebviewToExtensionMessage };
@@ -5,6 +5,11 @@ import {
5
5
 
6
6
  // src/vscode/messages.ts
7
7
  var MAX_REQUEST_ID = 2147483647;
8
+ var PROOF_STATE_LIMITS = Object.freeze({
9
+ dictionaryWords: 5e3,
10
+ wordCharacters: 128,
11
+ ignoredJsonCharacters: 64 * 1024
12
+ });
8
13
  var DOCBLOCKS_ACCENT_COLORS = [
9
14
  "brown",
10
15
  "green",
@@ -35,6 +40,10 @@ var DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS = {
35
40
  lineSpacing: 1.7,
36
41
  fontScheme: "theme"
37
42
  };
43
+ var DEFAULT_VSCODE_PROOFING_SETTINGS = {
44
+ spelling: true,
45
+ grammar: true
46
+ };
38
47
  function parseWebviewToExtensionMessage(value) {
39
48
  if (!isRecord(value) || typeof value.type !== "string") return null;
40
49
  switch (value.type) {
@@ -49,6 +58,11 @@ function parseWebviewToExtensionMessage(value) {
49
58
  const settings = parseVscodeWriteCanvasSettings(value.settings);
50
59
  return settings ? { type: "setWriteCanvasSettings", settings } : null;
51
60
  }
61
+ case "setProofingSettings": {
62
+ if (!hasOnlyKeys(value, ["type", "settings"])) return null;
63
+ const settings = parseVscodeProofingSettings(value.settings);
64
+ return settings ? { type: "setProofingSettings", settings } : null;
65
+ }
52
66
  case "openLink":
53
67
  return hasOnlyKeys(value, ["type", "href"]) && hasBoundedString(value, "href", HOST_WIRE_LIMITS.urlCharacters, 1) ? { type: "openLink", href: value.href } : null;
54
68
  case "copyCode":
@@ -126,6 +140,13 @@ function parseWebviewToExtensionMessage(value) {
126
140
  } : null;
127
141
  case "readWorkspaceFile":
128
142
  return hasOnlyKeys(value, ["type", "requestId", "path"]) && hasRequestId(value) && hasBoundedString(value, "path", HOST_WIRE_LIMITS.pathCharacters, 1) ? { type: "readWorkspaceFile", requestId: value.requestId, path: value.path } : null;
143
+ case "loadProofDictionary":
144
+ case "loadProofIgnores":
145
+ return hasOnlyKeys(value, ["type", "requestId"]) && hasRequestId(value) ? { type: value.type, requestId: value.requestId } : null;
146
+ case "addProofDictionaryWord":
147
+ return hasOnlyKeys(value, ["type", "word"]) && hasBoundedString(value, "word", PROOF_STATE_LIMITS.wordCharacters, 1) ? { type: "addProofDictionaryWord", word: value.word } : null;
148
+ case "saveProofIgnores":
149
+ return hasOnlyKeys(value, ["type", "ignoredJson"]) && hasBoundedString(value, "ignoredJson", PROOF_STATE_LIMITS.ignoredJsonCharacters) ? { type: "saveProofIgnores", ignoredJson: value.ignoredJson } : null;
129
150
  default:
130
151
  return null;
131
152
  }
@@ -241,8 +262,20 @@ function parseExtensionToWebviewMessage(value) {
241
262
  return hasOnlyKeys(value, ["type", "requestId", "path"]) && hasRequestId(value) && hasBoundedString(value, "path", HOST_WIRE_LIMITS.pathCharacters, 1) ? { type: "mediaAdded", requestId: value.requestId, path: value.path } : null;
242
263
  case "mediaRemoved":
243
264
  return hasOnlyKeys(value, ["type", "requestId"]) && hasRequestId(value) ? { type: "mediaRemoved", requestId: value.requestId } : null;
265
+ case "proofDictionaryLoaded": {
266
+ if (!hasOnlyKeys(value, ["type", "requestId", "words"]) || !hasRequestId(value)) return null;
267
+ const words = parseProofDictionaryWords(value.words);
268
+ return words ? { type: "proofDictionaryLoaded", requestId: value.requestId, words } : null;
269
+ }
270
+ case "proofIgnoresLoaded":
271
+ return hasOnlyKeys(value, ["type", "requestId", "ignoredJson"]) && hasRequestId(value) && hasNullableBoundedString(value, "ignoredJson", PROOF_STATE_LIMITS.ignoredJsonCharacters) ? {
272
+ type: "proofIgnoresLoaded",
273
+ requestId: value.requestId,
274
+ ignoredJson: value.ignoredJson
275
+ } : null;
244
276
  case "mediaError":
245
277
  case "exportError":
278
+ case "proofStateError":
246
279
  case "workspaceFileError":
247
280
  return hasOnlyKeys(value, ["type", "requestId", "message"]) && hasRequestId(value) && hasBoundedString(value, "message", HOST_WIRE_LIMITS.messageCharacters, 1) ? { type: value.type, requestId: value.requestId, message: value.message } : null;
248
281
  case "exportSaved":
@@ -260,6 +293,15 @@ function parseExtensionToWebviewMessage(value) {
260
293
  return null;
261
294
  }
262
295
  }
296
+ function parseProofDictionaryWords(value) {
297
+ if (!Array.isArray(value) || value.length > PROOF_STATE_LIMITS.dictionaryWords) return null;
298
+ const words = [];
299
+ for (const entry of value) {
300
+ if (!isBoundedString(entry, PROOF_STATE_LIMITS.wordCharacters, 1)) return null;
301
+ words.push(entry);
302
+ }
303
+ return words;
304
+ }
263
305
  function parseExportTargetGrant(value) {
264
306
  if (value === null) return null;
265
307
  if (!isRecord(value) || !hasOnlyKeys(value, ["grantId", "displayLabel"]) || !hasBoundedString(value, "grantId", HOST_WIRE_LIMITS.identifierCharacters, 1) || !hasBoundedString(value, "displayLabel", HOST_WIRE_LIMITS.pathCharacters, 1)) {
@@ -291,11 +333,20 @@ function parseDocumentConflictDetails(value) {
291
333
  };
292
334
  }
293
335
  function parseVscodeEditorSettings(value) {
294
- if (!isRecord(value) || !hasOnlyKeys(value, ["autoSave", "accentColor", "writeCanvasSettings"]) || typeof value.autoSave !== "boolean" || !isDocBlocksAccentColor(value.accentColor)) {
336
+ if (!isRecord(value) || !hasOnlyKeys(value, ["autoSave", "accentColor", "writeCanvasSettings", "proofingSettings"]) || typeof value.autoSave !== "boolean" || !isDocBlocksAccentColor(value.accentColor)) {
295
337
  return null;
296
338
  }
297
339
  const writeCanvasSettings = parseVscodeWriteCanvasSettings(value.writeCanvasSettings);
298
- return writeCanvasSettings ? { autoSave: value.autoSave, accentColor: value.accentColor, writeCanvasSettings } : null;
340
+ const proofingSettings = parseVscodeProofingSettings(value.proofingSettings);
341
+ return writeCanvasSettings && proofingSettings ? {
342
+ autoSave: value.autoSave,
343
+ accentColor: value.accentColor,
344
+ writeCanvasSettings,
345
+ proofingSettings
346
+ } : null;
347
+ }
348
+ function parseVscodeProofingSettings(value) {
349
+ return isRecord(value) && hasOnlyKeys(value, ["spelling", "grammar"]) && typeof value.spelling === "boolean" && typeof value.grammar === "boolean" ? { spelling: value.spelling, grammar: value.grammar } : null;
299
350
  }
300
351
  function isDocBlocksAccentColor(value) {
301
352
  return DOCBLOCKS_ACCENT_COLORS.some((color) => color === value);
@@ -417,6 +468,7 @@ function skipWhitespace(value, start) {
417
468
  return index;
418
469
  }
419
470
  export {
471
+ DEFAULT_VSCODE_PROOFING_SETTINGS,
420
472
  DEFAULT_VSCODE_WRITE_CANVAS_SETTINGS,
421
473
  DOCBLOCKS_ACCENT_COLORS,
422
474
  DOCBLOCKS_WRITE_CANVAS_FONT_SCHEMES,
@@ -424,6 +476,7 @@ export {
424
476
  DOCBLOCKS_WRITE_CANVAS_LINE_SPACING_MIN,
425
477
  DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MAX,
426
478
  DOCBLOCKS_WRITE_CANVAS_TEXT_SIZE_MIN,
479
+ PROOF_STATE_LIMITS,
427
480
  hasSubstantiveTextChange,
428
481
  isDocBlocksAccentColor,
429
482
  isDocBlocksWriteCanvasFontScheme,
@@ -1,5 +1,5 @@
1
1
  import { q as FileSystemProvider } from '../types-Bb3yccTH.js';
2
- import { m as ElectronWorkspaceInfo, F as HostEnvironment } from '../types-ZU8tTM7T.js';
2
+ import { m as ElectronWorkspaceInfo, F as HostEnvironment } from '../types-DBYraXxE.js';
3
3
  import '../workspace-path-CWVrcuPL.js';
4
4
 
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/docblocks",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Core data structures and filesystem abstractions for DocBlocks",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -20,7 +20,7 @@
20
20
  "access": "public"
21
21
  },
22
22
  "engines": {
23
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
23
+ "node": "^24.18.0 || >=26.0.0"
24
24
  },
25
25
  "type": "module",
26
26
  "main": "./dist/index.js",
@@ -106,7 +106,7 @@
106
106
  "typecheck": "tsc --noEmit"
107
107
  },
108
108
  "dependencies": {
109
- "@bendyline/squisq": "2.9.0",
109
+ "@bendyline/squisq": "2.11.1",
110
110
  "zod": "3.25.76"
111
111
  }
112
112
  }