@bendyline/docblocks-react 2.7.1 → 2.7.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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +290 -48
  3. package/dist/{AiDiagrams-LFV4YU6W.js → AiDiagrams-QE3LVYFK.js} +2 -2
  4. package/dist/{AiEditorAssistant-GN2KXKZD.js → AiEditorAssistant-YLJ5OZK2.js} +203 -164
  5. package/dist/AiStudyDialog-4TQZZGU3.js +1150 -0
  6. package/dist/{ExportDialog-IMBVGRYG.js → ExportDialog-JRVZCG3J.js} +2 -2
  7. package/dist/{ExportToolbarControls-MUM6HM3K.js → ExportToolbarControls-A2YBKUUD.js} +46 -9
  8. package/dist/KeyboardShortcutsDialog-G5OBDTNR.js +145 -0
  9. package/dist/{PresentationMaker-W2JIBHRN.js → PresentationMaker-P2JP6UUX.js} +2 -2
  10. package/dist/{Settings-DuXk6baH.d.ts → Settings-ByNImjk5.d.ts} +13 -13
  11. package/dist/{SpeechToolbarControl-OSQS7NVY.js → SpeechToolbarControl-CLU7RB2G.js} +1 -1
  12. package/dist/{TextFromNarration-XYRAB6O2.js → TextFromNarration-NITJQ4IB.js} +1 -1
  13. package/dist/{WorkspaceSearchPanel-BKZJRPMY.js → WorkspaceSearchPanel-J6BKEZQJ.js} +1 -1
  14. package/dist/{chunk-X3DDTJKR.js → chunk-3CE5RH2B.js} +255 -17
  15. package/dist/{chunk-UG4G7PJ4.js → chunk-5O5YTOXG.js} +1 -1
  16. package/dist/{chunk-VO2JYYQZ.js → chunk-6JJOGV6M.js} +5 -13
  17. package/dist/{chunk-X437UAF7.js → chunk-6MSHXQNB.js} +7 -2
  18. package/dist/{chunk-BCQZTWE5.js → chunk-6PA7QBZT.js} +107 -24
  19. package/dist/chunk-ACQF63SB.js +136 -0
  20. package/dist/chunk-DICE7VBJ.js +77 -0
  21. package/dist/{chunk-EPOLZNFD.js → chunk-EOU2JWAQ.js} +186 -71
  22. package/dist/{chunk-G4MFB3IO.js → chunk-VG434562.js} +2 -70
  23. package/dist/chunk-XNT66JC2.js +168 -0
  24. package/dist/{chunk-BD54Z5XP.js → chunk-Y5OE3HJC.js} +4 -3
  25. package/dist/{chunk-NAH52736.js → chunk-YPIVCCTB.js} +969 -98
  26. package/dist/{chunk-W55E6TE2.js → chunk-ZMCQO57Q.js} +28 -23
  27. package/dist/editor.js +7 -5
  28. package/dist/export/index.d.ts +27 -8
  29. package/dist/export/index.js +4 -4
  30. package/dist/index.d.ts +36 -8
  31. package/dist/index.js +629 -446
  32. package/dist/run-export-OHRNT2TP.js +13 -0
  33. package/dist/settings/index.d.ts +1 -1
  34. package/dist/settings/index.js +1 -1
  35. package/package.json +9 -8
  36. package/src/styles/docblocks.css +968 -329
  37. package/dist/chunk-EA4BO6E4.js +0 -73
  38. package/dist/run-export-47X5FTYZ.js +0 -11
@@ -260,7 +260,7 @@ function statusSentence(status) {
260
260
  case "connecting":
261
261
  switch (status.step) {
262
262
  case "detecting":
263
- return "Looking for Gezel\u2026";
263
+ return "Looking to see if shared AI services (Gezel) are installed; we can use bundled services if they are not available.";
264
264
  case "awaiting-approval":
265
265
  return "Waiting for approval in Gezel\u2026";
266
266
  case "preparing-model":
@@ -307,6 +307,12 @@ function formatDownloadSize(bytes) {
307
307
  if (gibibytes >= 0.95) return `${gibibytes.toFixed(gibibytes >= 10 ? 0 : 1)} GB`;
308
308
  return `${Math.max(1, Math.round(bytes / 1024 ** 2))} MB`;
309
309
  }
310
+ function downloadOptionLabel(model) {
311
+ const size = formatDownloadSize(model.downloadBytes);
312
+ const rating = model.recommended ? " \xB7 Recommended" : model.score === null ? "" : ` \xB7 ${model.score}% match`;
313
+ const slow = model.fit?.tier === "tight" ? ` \xB7 ${model.fit.label}` : "";
314
+ return `${model.label}${size ? ` \u2014 ${size}` : ""}${rating}${slow}`;
315
+ }
310
316
  function AiSettingsControls({ ai }) {
311
317
  const [status, setStatus] = useState2(null);
312
318
  const [preferences, setPreferences] = useState2(null);
@@ -551,19 +557,14 @@ function AiSettingsControls({ ai }) {
551
557
  value: downloadModelId,
552
558
  disabled: installingModel,
553
559
  onChange: (event) => setDownloadModelId(event.currentTarget.value),
554
- children: availableModels.map((model) => {
555
- const size = formatDownloadSize(model.downloadBytes);
556
- return /* @__PURE__ */ jsxs2("option", { value: model.id, children: [
557
- model.label,
558
- size ? ` \u2014 ${size}` : ""
559
- ] }, model.id);
560
- })
560
+ children: availableModels.map((model) => /* @__PURE__ */ jsx2("option", { value: model.id, children: downloadOptionLabel(model) }, model.id))
561
561
  }
562
562
  )
563
563
  ] }),
564
- selectedDownload && /* @__PURE__ */ jsxs2("p", { className: "db-settings-hint", children: [
565
- "Downloads and runs on this device",
566
- formatDownloadSize(selectedDownload.downloadBytes) ? ` \xB7 ${formatDownloadSize(selectedDownload.downloadBytes)}` : ""
564
+ selectedDownload && /* @__PURE__ */ jsxs2("p", { className: "db-settings-hint", title: selectedDownload.fit?.detail, children: [
565
+ selectedDownload.recommended ? "Recommended for this device" : "Downloads and runs on this device",
566
+ formatDownloadSize(selectedDownload.downloadBytes) ? ` \xB7 ${formatDownloadSize(selectedDownload.downloadBytes)}` : "",
567
+ selectedDownload.fit ? ` \xB7 ${selectedDownload.fit.label}` : ""
567
568
  ] }),
568
569
  /* @__PURE__ */ jsx2(
569
570
  "button",
@@ -999,7 +1000,7 @@ import {
999
1000
 
1000
1001
  // src/preferences/theme.ts
1001
1002
  var ACCENT_COLORS = [
1002
- "brown",
1003
+ "rust",
1003
1004
  "green",
1004
1005
  "blue",
1005
1006
  "purple",
@@ -1011,7 +1012,7 @@ var DB_CHROME_COLORS = {
1011
1012
  light: "#f3eede",
1012
1013
  dark: "#262219"
1013
1014
  };
1014
- var DEFAULT_INTERFACE_FONT = "system";
1015
+ var DEFAULT_INTERFACE_FONT = "fixed";
1015
1016
  var THEME_STORAGE_KEY = "docblocks:themePreference";
1016
1017
  var ACCENT_STORAGE_KEY = "docblocks:accentColor";
1017
1018
  var INTERFACE_FONT_STORAGE_KEY = "docblocks:interfaceFont";
@@ -1029,13 +1030,17 @@ function saveThemePreference(value) {
1029
1030
  } catch {
1030
1031
  }
1031
1032
  }
1033
+ var DEFAULT_ACCENT_COLOR = "rust";
1034
+ var LEGACY_ACCENT_COLORS = /* @__PURE__ */ new Map([["brown", "rust"]]);
1032
1035
  function loadAccentColor() {
1033
1036
  try {
1034
1037
  const raw = localStorage.getItem(ACCENT_STORAGE_KEY);
1038
+ const renamed = raw === null ? void 0 : LEGACY_ACCENT_COLORS.get(raw);
1039
+ if (renamed) return renamed;
1035
1040
  if (ACCENT_COLORS.some((color) => color === raw)) return raw;
1036
1041
  } catch {
1037
1042
  }
1038
- return "brown";
1043
+ return DEFAULT_ACCENT_COLOR;
1039
1044
  }
1040
1045
  function saveAccentColor(value) {
1041
1046
  try {
@@ -1189,7 +1194,7 @@ function isRecord(value) {
1189
1194
  // src/Settings/Settings.tsx
1190
1195
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1191
1196
  var ACCENT_LABELS = {
1192
- brown: "Brown",
1197
+ rust: "Rust",
1193
1198
  green: "Green",
1194
1199
  blue: "Blue",
1195
1200
  purple: "Purple",
@@ -1261,12 +1266,12 @@ function InterfaceFontSettings({
1261
1266
  {
1262
1267
  type: "radio",
1263
1268
  name,
1264
- value: "system",
1265
- checked: value !== "fixed",
1266
- onChange: () => onChange("system")
1269
+ value: "fixed",
1270
+ checked: value !== "system",
1271
+ onChange: () => onChange("fixed")
1267
1272
  }
1268
1273
  ),
1269
- "System default"
1274
+ "DocBlocks"
1270
1275
  ] }),
1271
1276
  /* @__PURE__ */ jsxs4("label", { className: "db-settings-radio db-settings-radio--inline", children: [
1272
1277
  /* @__PURE__ */ jsx4(
@@ -1274,12 +1279,12 @@ function InterfaceFontSettings({
1274
1279
  {
1275
1280
  type: "radio",
1276
1281
  name,
1277
- value: "fixed",
1278
- checked: value === "fixed",
1279
- onChange: () => onChange("fixed")
1282
+ value: "system",
1283
+ checked: value === "system",
1284
+ onChange: () => onChange("system")
1280
1285
  }
1281
1286
  ),
1282
- "Bundled"
1287
+ "System"
1283
1288
  ] })
1284
1289
  ] })
1285
1290
  ] });
package/dist/editor.js CHANGED
@@ -2,17 +2,19 @@ import {
2
2
  EMPTY_DOCUMENT_PROMPTS,
3
3
  FindButton,
4
4
  PORTRAIT_FORM_FACTOR_QUERY,
5
- findShortcutLabel,
6
5
  focusFindInput,
7
- isFindShortcut,
8
6
  pickEmptyDocumentPrompt,
9
7
  previewViewportPresetForOrientation,
10
8
  useResponsivePreviewViewportPreset
11
- } from "./chunk-G4MFB3IO.js";
9
+ } from "./chunk-VG434562.js";
10
+ import {
11
+ findShortcutLabel,
12
+ isFindShortcut
13
+ } from "./chunk-ACQF63SB.js";
12
14
  import {
13
15
  PresentationMaker
14
- } from "./chunk-EPOLZNFD.js";
15
- import "./chunk-NAH52736.js";
16
+ } from "./chunk-EOU2JWAQ.js";
17
+ import "./chunk-YPIVCCTB.js";
16
18
  import "./chunk-K4I3NJFL.js";
17
19
  import "./chunk-56KO2LYN.js";
18
20
  export {
@@ -54,13 +54,19 @@ declare const FORMAT_LABELS: Record<ExportFormat, string>;
54
54
  declare const FORMAT_EXTENSIONS: Record<ExportFormat, string>;
55
55
  declare const DEFAULT_OPTIONS: ExportOptions;
56
56
  /**
57
- * Options that populate the export dialog. Layered: built-in defaults → the
58
- * user's last-chosen options → the workspace default theme → the document's
59
- * own theme (wins). "Set a theme, then export" therefore pre-selects that
60
- * theme instead of whatever was picked for an unrelated previous document,
61
- * and documents without a theme export in their folder's default.
57
+ * Options that populate the export dialog: the user's last-chosen options
58
+ * (else the built-in defaults) for format, page size and the rest, but always
59
+ * the theme the editor previews this document in -- its own theme, else the
60
+ * workspace default, else Standard. The last export's theme belonged to some
61
+ * other document; carrying it over made the export differ from the preview.
62
62
  */
63
63
  declare function resolveExportDialogInitial(lastOptions: ExportOptions | null, docThemeId: string | null | undefined, workspaceThemeId?: string | null): ExportOptions;
64
+ /** A theme as the export dialog's Theme select lists it. */
65
+ interface ExportThemeSummary {
66
+ id: string;
67
+ name: string;
68
+ description?: string;
69
+ }
64
70
  declare function loadLastExportOptions(): ExportOptions | null;
65
71
  declare function saveExportOptions(options: ExportOptions): void;
66
72
 
@@ -76,12 +82,25 @@ interface ExportConverterOverrides {
76
82
  */
77
83
  diagramRenderer?: DiagramRasterizer;
78
84
  }
85
+ /** What an export reports beyond the saved file. */
86
+ interface ExportResult {
87
+ /**
88
+ * What the user should know about the file that was saved, such as
89
+ * characters PDF export had to replace. Empty when nothing was lost.
90
+ */
91
+ readonly warnings: readonly string[];
92
+ }
79
93
  /** Run the export and trigger a download. */
80
- declare function runExport(markdown: string, selectedFile: string | null, options: ExportOptions, mediaContainer?: ContentContainer | null, saveBlob?: ExportBlobSaver, converterOverrides?: ExportConverterOverrides): Promise<void>;
94
+ declare function runExport(markdown: string, selectedFile: string | null, options: ExportOptions, mediaContainer?: ContentContainer | null, saveBlob?: ExportBlobSaver, converterOverrides?: ExportConverterOverrides): Promise<ExportResult>;
81
95
 
82
96
  interface ExportDialogProps {
83
97
  /** Initial options (pre-populated from last export). */
84
98
  initial: ExportOptions;
99
+ /**
100
+ * Themes the document defines in its own frontmatter. Listed ahead of the
101
+ * built-ins so a document using one exports in the theme it previews in.
102
+ */
103
+ documentThemes?: readonly ExportThemeSummary[];
85
104
  /** Whether the export is currently running. */
86
105
  exporting: boolean;
87
106
  /**
@@ -110,7 +129,7 @@ interface ExportDestinationControl {
110
129
  /** A host-supplied validation error for the current destination value. */
111
130
  error?: string | null;
112
131
  }
113
- declare function ExportDialog({ initial, exporting, error, destination, onExport, onOptionsChange, actionLabel, onClose, }: ExportDialogProps): react_jsx_runtime.JSX.Element;
132
+ declare function ExportDialog({ initial, documentThemes, exporting, error, destination, onExport, onOptionsChange, actionLabel, onClose, }: ExportDialogProps): react_jsx_runtime.JSX.Element;
114
133
 
115
134
  /** Keep a user-edited target name while switching the selected export format. */
116
135
  declare function updateExportTargetExtension(targetPath: string, suggestedFilename: string): string;
@@ -139,4 +158,4 @@ type ImageSaveOutput = (blob: Blob, filename: string) => Promise<boolean | void>
139
158
  */
140
159
  declare function createImageSaveOutput<TTarget>(adapter: ImageSaveAdapter<TTarget>): ImageSaveOutput;
141
160
 
142
- export { type ImageSaveAdapter as CoverImageSaveAdapter, type ImageSaveOutput as CoverImageSaveOutput, DEFAULT_OPTIONS, type ImageSaveAdapter as DashboardImageSaveAdapter, type ImageSaveOutput as DashboardImageSaveOutput, type ExportBlobSaver, type ExportConverterOverrides, type ExportDestinationControl, ExportDialog, type ExportDialogProps, type ExportFormat, type ExportOptions, FORMAT_EXTENSIONS, FORMAT_LABELS, type HtmlBundle, type HtmlStyle, type ImageSaveAdapter, type ImageSaveOutput, buildExportFilename, createImageSaveOutput as createCoverImageSaveOutput, createImageSaveOutput as createDashboardImageSaveOutput, createImageSaveOutput, loadLastExportOptions, resolveExportDialogInitial, runExport, saveExportOptions, updateExportTargetExtension };
161
+ export { type ImageSaveAdapter as CoverImageSaveAdapter, type ImageSaveOutput as CoverImageSaveOutput, DEFAULT_OPTIONS, type ImageSaveAdapter as DashboardImageSaveAdapter, type ImageSaveOutput as DashboardImageSaveOutput, type ExportBlobSaver, type ExportConverterOverrides, type ExportDestinationControl, ExportDialog, type ExportDialogProps, type ExportFormat, type ExportOptions, type ExportResult, FORMAT_EXTENSIONS, FORMAT_LABELS, type HtmlBundle, type HtmlStyle, type ImageSaveAdapter, type ImageSaveOutput, buildExportFilename, createImageSaveOutput as createCoverImageSaveOutput, createImageSaveOutput as createDashboardImageSaveOutput, createImageSaveOutput, loadLastExportOptions, resolveExportDialogInitial, runExport, saveExportOptions, updateExportTargetExtension };
@@ -3,16 +3,16 @@ import {
3
3
  } from "../chunk-KWG6UP5O.js";
4
4
  import {
5
5
  runExport
6
- } from "../chunk-BCQZTWE5.js";
6
+ } from "../chunk-6PA7QBZT.js";
7
7
  import {
8
8
  createImageSaveOutput
9
9
  } from "../chunk-UONFWKJ7.js";
10
10
  import {
11
11
  buildExportFilename
12
- } from "../chunk-UG4G7PJ4.js";
12
+ } from "../chunk-5O5YTOXG.js";
13
13
  import {
14
14
  ExportDialog
15
- } from "../chunk-BD54Z5XP.js";
15
+ } from "../chunk-Y5OE3HJC.js";
16
16
  import "../chunk-YBEYTVU2.js";
17
17
  import {
18
18
  DEFAULT_OPTIONS,
@@ -21,7 +21,7 @@ import {
21
21
  loadLastExportOptions,
22
22
  resolveExportDialogInitial,
23
23
  saveExportOptions
24
- } from "../chunk-X437UAF7.js";
24
+ } from "../chunk-6MSHXQNB.js";
25
25
  import "../chunk-56KO2LYN.js";
26
26
  export {
27
27
  DEFAULT_OPTIONS,
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@ 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
8
  import { DocBlocksHostAiAPI, DocBlocksHostSpeechAPI } from '@bendyline/docblocks/host';
9
- import { T as ThemePreference, A as AccentColor, I as InterfaceFontPreference, q as WriteCanvasPreferences, P as ProofingPreferences } from './Settings-DuXk6baH.js';
10
- export { a as AccentColorSettings, b as AccentColorSettingsProps, c as AiSettingsControls, d as AiSettingsControlsProps, D as DEFAULT_INTERFACE_FONT, e as DEFAULT_PROOFING_PREFERENCES, f as DEFAULT_WRITE_CANVAS_FONT_SCHEME, g as InterfaceFontSettings, h as InterfaceFontSettingsProps, i as ProofingSettingsControls, j as ProofingSettingsControlsProps, S as SettingsDialog, k as SettingsDialogProps, l as ThemeSettings, m as ThemeSettingsProps, W as WRITE_CANVAS_FONT_SCHEMES, n as WriteCanvasFontScheme, o as WriteCanvasFontSchemeGroup, p as WriteCanvasFontSchemeOption, r as WriteCanvasSettingsControls, s as WriteCanvasSettingsControlsProps, t as loadInterfaceFont, u as loadProofingPreferences, v as resolveWriteCanvasFonts, w as saveInterfaceFont, x as saveProofingPreferences } from './Settings-DuXk6baH.js';
9
+ import { T as ThemePreference, A as AccentColor, I as InterfaceFontPreference, q as WriteCanvasPreferences, P as ProofingPreferences } from './Settings-ByNImjk5.js';
10
+ export { a as AccentColorSettings, b as AccentColorSettingsProps, c as AiSettingsControls, d as AiSettingsControlsProps, D as DEFAULT_INTERFACE_FONT, e as DEFAULT_PROOFING_PREFERENCES, f as DEFAULT_WRITE_CANVAS_FONT_SCHEME, g as InterfaceFontSettings, h as InterfaceFontSettingsProps, i as ProofingSettingsControls, j as ProofingSettingsControlsProps, S as SettingsDialog, k as SettingsDialogProps, l as ThemeSettings, m as ThemeSettingsProps, W as WRITE_CANVAS_FONT_SCHEMES, n as WriteCanvasFontScheme, o as WriteCanvasFontSchemeGroup, p as WriteCanvasFontSchemeOption, r as WriteCanvasSettingsControls, s as WriteCanvasSettingsControlsProps, t as loadInterfaceFont, u as loadProofingPreferences, v as resolveWriteCanvasFonts, w as saveInterfaceFont, x as saveProofingPreferences } from './Settings-ByNImjk5.js';
11
11
  import { SharedDocumentMode } from '@bendyline/docblocks/share';
12
12
  import { MediaProvider } from '@bendyline/squisq/schemas';
13
13
  import { ContentContainer } from '@bendyline/squisq/storage';
@@ -141,6 +141,11 @@ interface WorkspaceMoveDestination {
141
141
  interface FileExplorerProps {
142
142
  /** The filesystem to display. */
143
143
  provider: FileSystemProvider | null;
144
+ /**
145
+ * The host is still opening the workspace `provider` will become. Shows
146
+ * the loading state instead of "No files yet" before anything was read.
147
+ */
148
+ loading?: boolean;
144
149
  /** Changes after a non-watch provider has durably updated file metadata. */
145
150
  metadataRefreshKey?: string | number | null;
146
151
  /** Active document to select and reveal by expanding all ancestor folders. */
@@ -203,7 +208,7 @@ interface FileExplorerProps {
203
208
  /** Optional className for the root element. */
204
209
  className?: string;
205
210
  }
206
- declare function FileExplorer({ provider, metadataRefreshKey, activeFilePath, sortMode, onSortModeChange, activeWorkspaceId, pinnedDocuments, pinnedPaths, onPinnedDocumentSelect, onPinnedDocumentUnpin, onPinnedDocumentRename, onPinnedDocumentDelete, onTogglePin, onSelect, onOpenWorkspaceFolder, actionsForEntry, onTreeMutation, onTreeChange, onImportFiles, confirmDelete, moveDestinations, onMoveToWorkspace, outsideInRender, defaultNewFileFormat, onNewFileFormatUsed, onShowSearch, searchShortcutLabel, className, }: FileExplorerProps): react_jsx_runtime.JSX.Element;
211
+ declare function FileExplorer({ provider, loading, metadataRefreshKey, activeFilePath, sortMode, onSortModeChange, activeWorkspaceId, pinnedDocuments, pinnedPaths, onPinnedDocumentSelect, onPinnedDocumentUnpin, onPinnedDocumentRename, onPinnedDocumentDelete, onTogglePin, onSelect, onOpenWorkspaceFolder, actionsForEntry, onTreeMutation, onTreeChange, onImportFiles, confirmDelete, moveDestinations, onMoveToWorkspace, outsideInRender, defaultNewFileFormat, onNewFileFormatUsed, onShowSearch, searchShortcutLabel, className, }: FileExplorerProps): react_jsx_runtime.JSX.Element;
207
212
 
208
213
  /**
209
214
  * useFileTree — hook that reads from a FileSystemProvider,
@@ -282,10 +287,15 @@ interface WorkspacePickerProps {
282
287
  onRemoveWorkspace?: (descriptor: WorkspaceDescriptor) => void;
283
288
  /** Forces a list refresh after an external workspace-registry mutation. */
284
289
  refreshKey?: number;
290
+ /**
291
+ * The host is still opening its first workspace. Shown as loading rather
292
+ * than "No workspace", which read as an error on every first visit.
293
+ */
294
+ loading?: boolean;
285
295
  /** Optional className. */
286
296
  className?: string;
287
297
  }
288
- declare function WorkspacePicker({ activeWorkspaceId, onSelect, onOpenFolder, onCloneRepository, onRemoveWorkspace, refreshKey, className, }: WorkspacePickerProps): react_jsx_runtime.JSX.Element;
298
+ declare function WorkspacePicker({ activeWorkspaceId, onSelect, onOpenFolder, onCloneRepository, onRemoveWorkspace, refreshKey, loading, className, }: WorkspacePickerProps): react_jsx_runtime.JSX.Element;
289
299
 
290
300
  /**
291
301
  * Owns the active workspace's index: one per provider instance, disposed
@@ -311,12 +321,20 @@ interface DocBlocksShellProps {
311
321
  theme?: EditorColorScheme | 'auto';
312
322
  /** Optional logo image URL for the app menu. */
313
323
  logoUrl?: string;
324
+ /** The app-menu logo drawn for dark appearances (see AppMenu). */
325
+ logoDarkUrl?: string;
314
326
  /** Version and surface label included in prefilled issue reports, e.g. `1.1.2 web`. */
315
327
  issueReportVersion?: string;
316
328
  /** ISO build date shown in About, e.g. `2026-07-15`. */
317
329
  appBuildDate?: string;
318
330
  /** Self-hosted ffmpeg.wasm core. Supplying it enables Animated GIF export. */
319
331
  ffmpegWasm?: FfmpegWasmLoadConfig;
332
+ /**
333
+ * URL of the self-hosted pdf.js worker (`pdfjs-dist/legacy/build/
334
+ * pdf.worker.min.mjs`, the version Squisq's formats package pins).
335
+ * Importing a PDF fails without it.
336
+ */
337
+ pdfWorkerSrc?: string;
320
338
  /**
321
339
  * Optional spreadsheet calculation backend. DocBlocks surfaces normally
322
340
  * pass the lazy IronCalc factory from the `calculation` package subpath;
@@ -405,7 +423,7 @@ interface DocBlocksShellProps {
405
423
  */
406
424
  offlineReady?: boolean;
407
425
  }
408
- declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, calcEngineFactory, proofing, proofingDefaultEnabled, proofingIgnoreStore, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, workspaceIndex: workspaceIndexMode, showCodeCopyButton, onCopyCode, allowRecording, allowPresentationWindow, allowPresentationFullscreen, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
426
+ declare function DocBlocksShell({ theme: hostTheme, logoUrl, logoDarkUrl, issueReportVersion, appBuildDate, ffmpegWasm, pdfWorkerSrc, calcEngineFactory, proofing, proofingDefaultEnabled, proofingIgnoreStore, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, statusBarSlotRight, workspaceIndex: workspaceIndexMode, showCodeCopyButton, onCopyCode, allowRecording, allowPresentationWindow, allowPresentationFullscreen, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
409
427
 
410
428
  /**
411
429
  * Versioning preferences — global default + per-workspace resolution.
@@ -428,6 +446,11 @@ type VersioningPreference = 'on' | 'browser-only' | 'off';
428
446
  interface AppMenuProps {
429
447
  /** Optional logo image URL to display instead of the text label. */
430
448
  logoUrl?: string;
449
+ /**
450
+ * The logo drawn for dark appearances. Without it, the light logo is
451
+ * inverted in dark mode, which suits only a flat black-on-transparent mark.
452
+ */
453
+ logoDarkUrl?: string;
431
454
  /** Current theme preference. */
432
455
  themePreference?: ThemePreference;
433
456
  /** Called when the user changes the theme preference. */
@@ -454,10 +477,12 @@ interface AppMenuProps {
454
477
  /** Opens the active workspace's own settings (`.docblocks/workspace.json`). */
455
478
  onOpenWorkspaceSettings?: () => void;
456
479
  /**
457
- * Called when the user clicks "Download all workspaces". When omitted,
480
+ * Called when the user clicks "Back up all workspaces". When omitted,
458
481
  * the menu item is hidden.
459
482
  */
460
483
  onDownloadAllWorkspaces?: () => void | Promise<void>;
484
+ /** Opens the keyboard-shortcut sheet. When omitted, the menu item is hidden. */
485
+ onShowKeyboardShortcuts?: () => void;
461
486
  /**
462
487
  * Called when the user asks the browser to keep origin storage persistent.
463
488
  * When omitted, the menu item is hidden.
@@ -482,7 +507,10 @@ interface AppMenuProps {
482
507
  storagePersistent?: boolean;
483
508
  /** Human-readable version/build and delivery surface shown in About. */
484
509
  appVersion?: string;
485
- /** ISO build date shown in About. */
510
+ /**
511
+ * Build date shown in About: an ISO timestamp, shown as the viewer's local
512
+ * day, or a bare `YYYY-MM-DD`, shown as given.
513
+ */
486
514
  appBuildDate?: string;
487
515
  /**
488
516
  * The host's AI API. When present, Settings offers an AI section; when
@@ -497,7 +525,7 @@ interface AppMenuProps {
497
525
  /** Opens Settings whenever it changes to a new non-zero value. */
498
526
  settingsRequest?: number;
499
527
  }
500
- declare function AppMenu({ logoUrl, themePreference, onThemeChange, accentColor, onAccentColorChange, interfaceFont, onInterfaceFontChange, writeCanvasSettings, onWriteCanvasSettingsChange, proofingPreferences, onProofingPreferencesChange, versioningPreference, onVersioningPreferenceChange, onOpenWorkspaceSettings, onDownloadAllWorkspaces, onKeepBrowserData, onInstallApp, getStorageEstimate, storagePersistent, appVersion, appBuildDate, ai, speech, settingsRequest, }: AppMenuProps): react_jsx_runtime.JSX.Element;
528
+ declare function AppMenu({ logoUrl, logoDarkUrl, themePreference, onThemeChange, accentColor, onAccentColorChange, interfaceFont, onInterfaceFontChange, writeCanvasSettings, onWriteCanvasSettingsChange, proofingPreferences, onProofingPreferencesChange, versioningPreference, onVersioningPreferenceChange, onOpenWorkspaceSettings, onDownloadAllWorkspaces, onShowKeyboardShortcuts, onKeepBrowserData, onInstallApp, getStorageEstimate, storagePersistent, appVersion, appBuildDate, ai, speech, settingsRequest, }: AppMenuProps): react_jsx_runtime.JSX.Element;
501
529
 
502
530
  interface ExportToolbarControlsProps {
503
531
  /** Currently selected file path — used to derive the download filename. */