@bendyline/docblocks-react 2.1.0 → 2.1.1

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 (48) hide show
  1. package/README.md +12 -3
  2. package/dist/ExportDialog-VYATD5UC.js +9 -0
  3. package/dist/{ExportToolbarControls-GHAOJMH6.js → ExportToolbarControls-5HUE3LSX.js} +69 -40
  4. package/dist/{GitToolbarControl-GNMRVKWQ.js → GitToolbarControl-FW3BZFXV.js} +2 -3
  5. package/dist/{GitUI-VHOBQY43.js → GitUI-GMH3PAYL.js} +3 -4
  6. package/dist/{LazyEditorShell-EF2BWRXU.js → LazyEditorShell-RF54B5UD.js} +0 -1
  7. package/dist/{ShareDialog-63ENBEDZ.js → ShareDialog-PAMOQQFB.js} +0 -1
  8. package/dist/{chunk-UNYZQXWR.js → chunk-3CZ27FOA.js} +45 -10
  9. package/dist/{chunk-FEWQUQML.js → chunk-3QSZY74C.js} +1 -2
  10. package/dist/chunk-BI7NVU6T.js +31 -0
  11. package/dist/{chunk-VHDP4IPL.js → chunk-BPGEBGAN.js} +0 -1
  12. package/dist/{chunk-DD4VFJQI.js → chunk-EBWYGTN7.js} +2 -1
  13. package/dist/{chunk-ZI56BNB7.js → chunk-GHQ4X7KM.js} +27 -7
  14. package/dist/{chunk-5A4KEWKT.js → chunk-HFYPTTCH.js} +0 -1
  15. package/dist/{chunk-FMGTHSTX.js → chunk-LG6HAWCK.js} +0 -1
  16. package/dist/{chunk-57ZJJOC5.js → chunk-TFMO7EVO.js} +0 -1
  17. package/dist/{chunk-4XXSWN3T.js → chunk-YBEYTVU2.js} +0 -1
  18. package/dist/editor.js +1 -2
  19. package/dist/export/index.d.ts +18 -8
  20. package/dist/export/index.js +10 -7
  21. package/dist/index.d.ts +16 -7
  22. package/dist/index.js +346 -97
  23. package/dist/run-export-Z5BVFLIR.js +9 -0
  24. package/dist/settings/index.js +2 -3
  25. package/package.json +8 -8
  26. package/src/styles/docblocks.css +448 -9
  27. package/dist/ExportDialog-7LDIXJZ3.js +0 -10
  28. package/dist/ExportDialog-7LDIXJZ3.js.map +0 -1
  29. package/dist/ExportToolbarControls-GHAOJMH6.js.map +0 -1
  30. package/dist/GitToolbarControl-GNMRVKWQ.js.map +0 -1
  31. package/dist/GitUI-VHOBQY43.js.map +0 -1
  32. package/dist/LazyEditorShell-EF2BWRXU.js.map +0 -1
  33. package/dist/ShareDialog-63ENBEDZ.js.map +0 -1
  34. package/dist/chunk-4XXSWN3T.js.map +0 -1
  35. package/dist/chunk-57ZJJOC5.js.map +0 -1
  36. package/dist/chunk-5A4KEWKT.js.map +0 -1
  37. package/dist/chunk-DD4VFJQI.js.map +0 -1
  38. package/dist/chunk-FEWQUQML.js.map +0 -1
  39. package/dist/chunk-FMGTHSTX.js.map +0 -1
  40. package/dist/chunk-UNYZQXWR.js.map +0 -1
  41. package/dist/chunk-VHDP4IPL.js.map +0 -1
  42. package/dist/chunk-ZI56BNB7.js.map +0 -1
  43. package/dist/editor.js.map +0 -1
  44. package/dist/export/index.js.map +0 -1
  45. package/dist/index.js.map +0 -1
  46. package/dist/run-export-ICTZITXC.js +0 -10
  47. package/dist/run-export-ICTZITXC.js.map +0 -1
  48. package/dist/settings/index.js.map +0 -1
@@ -1,10 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as _bendyline_squisq_formats_pptx from '@bendyline/squisq-formats/pptx';
2
3
  import { ContentContainer } from '@bendyline/squisq/storage';
3
4
 
4
5
  /**
5
6
  * Export option types and localStorage persistence for quick-export.
6
7
  */
7
- type ExportFormat = 'docx' | 'pdf' | 'pptx' | 'md' | 'html';
8
+ type ExportFormat = 'docx' | 'pdf' | 'pptx' | 'epub' | 'md' | 'html';
8
9
  /** Visual style for HTML export. */
9
10
  type HtmlStyle =
10
11
  /** Render via SquisqPlayer (themed, embeds player bundle). */
@@ -54,14 +55,14 @@ declare const DEFAULT_OPTIONS: ExportOptions;
54
55
  declare function loadLastExportOptions(): ExportOptions | null;
55
56
  declare function saveExportOptions(options: ExportOptions): void;
56
57
 
57
- /**
58
- * Execute an export using @bendyline/squisq-formats.
59
- */
60
-
61
58
  type ExportBlobSaver = (blob: Blob, filename: string) => Promise<void> | void;
59
+ /** Host-provided converters that must be loaded before an export begins. */
60
+ interface ExportConverterOverrides {
61
+ docToPptx?: (typeof _bendyline_squisq_formats_pptx)['docToPptx'];
62
+ }
62
63
  declare function buildExportFilename(selectedFile: string | null, options: ExportOptions): string;
63
64
  /** Run the export and trigger a download. */
64
- declare function runExport(markdown: string, selectedFile: string | null, options: ExportOptions, mediaContainer?: ContentContainer | null, saveBlob?: ExportBlobSaver): Promise<void>;
65
+ declare function runExport(markdown: string, selectedFile: string | null, options: ExportOptions, mediaContainer?: ContentContainer | null, saveBlob?: ExportBlobSaver, converterOverrides?: ExportConverterOverrides): Promise<void>;
65
66
 
66
67
  interface ExportDialogProps {
67
68
  /** Initial options (pre-populated from last export). */
@@ -80,14 +81,23 @@ interface ExportDialogProps {
80
81
  onExport: (options: ExportOptions) => void;
81
82
  /** Called whenever the currently selected options change. */
82
83
  onOptionsChange?: (options: ExportOptions) => void;
84
+ /** Opens the richer animated-GIF export flow when the host supports ffmpeg.wasm. */
85
+ onAnimatedGifExport?: () => void;
83
86
  /** Called when the dialog is dismissed. */
84
87
  onClose: () => void;
85
88
  }
86
89
  interface ExportDestinationControl {
87
90
  value: string;
91
+ /** Enables host-validated edits. Omit to render the destination as read-only. */
92
+ onChange?: (value: string, options: ExportOptions) => void;
88
93
  onPick: (options: ExportOptions) => void | Promise<void>;
89
94
  hint?: string;
95
+ /** A host-supplied validation error for the current destination value. */
96
+ error?: string | null;
90
97
  }
91
- declare function ExportDialog({ initial, exporting, error, destination, onExport, onOptionsChange, onClose, }: ExportDialogProps): react_jsx_runtime.JSX.Element;
98
+ declare function ExportDialog({ initial, exporting, error, destination, onExport, onOptionsChange, onAnimatedGifExport, onClose, }: ExportDialogProps): react_jsx_runtime.JSX.Element;
99
+
100
+ /** Keep a user-edited target name while switching the selected export format. */
101
+ declare function updateExportTargetExtension(targetPath: string, suggestedFilename: string): string;
92
102
 
93
- export { DEFAULT_OPTIONS, type ExportBlobSaver, type ExportDestinationControl, ExportDialog, type ExportDialogProps, type ExportFormat, type ExportOptions, FORMAT_EXTENSIONS, FORMAT_LABELS, type HtmlBundle, type HtmlStyle, buildExportFilename, loadLastExportOptions, runExport, saveExportOptions };
103
+ export { DEFAULT_OPTIONS, type ExportBlobSaver, type ExportConverterOverrides, type ExportDestinationControl, ExportDialog, type ExportDialogProps, type ExportFormat, type ExportOptions, FORMAT_EXTENSIONS, FORMAT_LABELS, type HtmlBundle, type HtmlStyle, buildExportFilename, loadLastExportOptions, runExport, saveExportOptions, updateExportTargetExtension };
@@ -1,19 +1,22 @@
1
+ import {
2
+ updateExportTargetExtension
3
+ } from "../chunk-BI7NVU6T.js";
1
4
  import {
2
5
  ExportDialog
3
- } from "../chunk-UNYZQXWR.js";
6
+ } from "../chunk-3CZ27FOA.js";
4
7
  import {
5
8
  buildExportFilename,
6
9
  runExport
7
- } from "../chunk-ZI56BNB7.js";
8
- import "../chunk-4XXSWN3T.js";
9
- import "../chunk-FMGTHSTX.js";
10
+ } from "../chunk-GHQ4X7KM.js";
11
+ import "../chunk-YBEYTVU2.js";
12
+ import "../chunk-LG6HAWCK.js";
10
13
  import {
11
14
  DEFAULT_OPTIONS,
12
15
  FORMAT_EXTENSIONS,
13
16
  FORMAT_LABELS,
14
17
  loadLastExportOptions,
15
18
  saveExportOptions
16
- } from "../chunk-DD4VFJQI.js";
19
+ } from "../chunk-EBWYGTN7.js";
17
20
  export {
18
21
  DEFAULT_OPTIONS,
19
22
  ExportDialog,
@@ -22,6 +25,6 @@ export {
22
25
  buildExportFilename,
23
26
  loadLastExportOptions,
24
27
  runExport,
25
- saveExportOptions
28
+ saveExportOptions,
29
+ updateExportTargetExtension
26
30
  };
27
- //# sourceMappingURL=index.js.map
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { FileSystemProvider, FileSystemEntry } from '@bendyline/docblocks/filesystem';
3
3
  import { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
4
4
  import { EditorColorScheme } from '@bendyline/squisq-editor-react';
5
+ import { FfmpegWasmLoadConfig } from '@bendyline/squisq-video';
5
6
  import { PrunePolicy, SaveVersionResult, DocumentVersionManager } from '@bendyline/squisq/versions';
6
7
  import { ThemePreference, AccentColor, WriteCanvasPreferences } from './settings/index.js';
7
8
  export { AccentColorSettings, AccentColorSettingsProps, SettingsDialog, SettingsDialogProps, ThemeSettings, ThemeSettingsProps, WriteCanvasSettingsControls, WriteCanvasSettingsControlsProps } from './settings/index.js';
@@ -9,9 +10,10 @@ import { SharedDocumentMode } from '@bendyline/docblocks/share';
9
10
  import { ContentContainer } from '@bendyline/squisq/storage';
10
11
  import { VideoExportModalProps } from '@bendyline/squisq-video-react';
11
12
  import { ExportBlobSaver } from './export/index.js';
12
- export { DEFAULT_OPTIONS, ExportDestinationControl, ExportDialog, ExportDialogProps, ExportFormat, ExportOptions, HtmlBundle, HtmlStyle, buildExportFilename, loadLastExportOptions, runExport } from './export/index.js';
13
+ export { DEFAULT_OPTIONS, ExportDestinationControl, ExportDialog, ExportDialogProps, ExportFormat, ExportOptions, HtmlBundle, HtmlStyle, buildExportFilename, loadLastExportOptions, runExport, updateExportTargetExtension } from './export/index.js';
13
14
  import { DocumentSession, DocumentSessionSnapshot } from '@bendyline/docblocks/document';
14
15
  import 'react';
16
+ import '@bendyline/squisq-formats/pptx';
15
17
 
16
18
  type FileTreeChange = {
17
19
  type: 'create';
@@ -187,6 +189,10 @@ interface DocBlocksShellProps {
187
189
  logoUrl?: string;
188
190
  /** Version and surface label included in prefilled issue reports, e.g. `1.1.2 web`. */
189
191
  issueReportVersion?: string;
192
+ /** ISO build date shown in About, e.g. `2026-07-15`. */
193
+ appBuildDate?: string;
194
+ /** Self-hosted ffmpeg.wasm core. Supplying it enables Animated GIF export. */
195
+ ffmpegWasm?: FfmpegWasmLoadConfig;
190
196
  /** Stable host title used before a document opens and for the optional home document. */
191
197
  homeDocumentTitle?: string;
192
198
  /** Document path that represents the host's indexable home experience. */
@@ -224,7 +230,7 @@ interface DocBlocksShellProps {
224
230
  */
225
231
  offlineReady?: boolean;
226
232
  }
227
- declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
233
+ declare function DocBlocksShell({ theme: hostTheme, logoUrl, issueReportVersion, appBuildDate, ffmpegWasm, homeDocumentTitle, homeDocumentPath, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, versioningRef, updateAvailable, onApplyUpdate, offlineReady, }: DocBlocksShellProps): react_jsx_runtime.JSX.Element;
228
234
 
229
235
  /**
230
236
  * Versioning preferences — global default + per-workspace resolution.
@@ -287,8 +293,12 @@ interface AppMenuProps {
287
293
  } | null>;
288
294
  /** Whether the browser has marked origin storage persistent (Settings display). */
289
295
  storagePersistent?: boolean;
296
+ /** Human-readable version/build and delivery surface shown in About. */
297
+ appVersion?: string;
298
+ /** ISO build date shown in About. */
299
+ appBuildDate?: string;
290
300
  }
291
- declare function AppMenu({ logoUrl, themePreference, onThemeChange, accentColor, onAccentColorChange, writeCanvasSettings, onWriteCanvasSettingsChange, versioningPreference, onVersioningPreferenceChange, onDownloadAllWorkspaces, onKeepBrowserData, onInstallApp, getStorageEstimate, storagePersistent, }: AppMenuProps): react_jsx_runtime.JSX.Element;
301
+ 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;
292
302
 
293
303
  interface ExportToolbarControlsProps {
294
304
  /** Currently selected file path — used to derive the download filename. */
@@ -303,6 +313,8 @@ interface ExportToolbarControlsProps {
303
313
  trigger?: 'menu' | 'button';
304
314
  /** Whether to show video export in the overflow menu. */
305
315
  showVideoExport?: boolean;
316
+ /** Self-hosted ffmpeg.wasm core. Supplying it enables Animated GIF export. */
317
+ ffmpegWasm?: FfmpegWasmLoadConfig;
306
318
  /** Resolved host color scheme for the video export dialog. */
307
319
  colorScheme?: 'light' | 'dark';
308
320
  /** Host palette overrides for the video export dialog and progress UI. */
@@ -327,9 +339,6 @@ interface ExportDestinationAdapter {
327
339
  /** Public toolbar control with its editor-coupled implementation deferred. */
328
340
  declare function ExportToolbarControls(props: ExportToolbarControlsProps): react_jsx_runtime.JSX.Element;
329
341
 
330
- /** Keep a user-edited target name while switching the selected export format. */
331
- declare function updateExportTargetExtension(targetPath: string, suggestedFilename: string): string;
332
-
333
342
  interface UseDocumentSessionResult {
334
343
  /** Stable controller for the lifetime of the mounted shell/panel. */
335
344
  session: DocumentSession;
@@ -345,4 +354,4 @@ interface UseDocumentSessionResult {
345
354
  */
346
355
  declare function useDocumentSession(autoSaveDelayMs?: number): UseDocumentSessionResult;
347
356
 
348
- export { AccentColor, AppMenu, type AppMenuProps, DocBlocksShell, type DocBlocksShellProps, ExportBlobSaver, type ExportDestinationAdapter, type ExportDestinationTarget, ExportToolbarControls, type ExportToolbarControlsProps, FileExplorer, type FileExplorerProps, type FileTreeChange, type FileTreeMutationHandler, FileTreeNode, type FileTreeNodeProps, ThemePreference, type UseDocumentSessionResult, WorkspacePicker, type WorkspacePickerProps, WriteCanvasPreferences, updateExportTargetExtension, useDocumentSession, useFileTree };
357
+ export { AccentColor, AppMenu, type AppMenuProps, DocBlocksShell, type DocBlocksShellProps, ExportBlobSaver, type ExportDestinationAdapter, type ExportDestinationTarget, ExportToolbarControls, type ExportToolbarControlsProps, FileExplorer, type FileExplorerProps, type FileTreeChange, type FileTreeMutationHandler, FileTreeNode, type FileTreeNodeProps, ThemePreference, type UseDocumentSessionResult, WorkspacePicker, type WorkspacePickerProps, WriteCanvasPreferences, useDocumentSession, useFileTree };