@bendyline/docblocks-react 2.4.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.
- package/README.md +18 -0
- package/THIRD_PARTY_NOTICES.txt +457 -50
- package/dist/{ExportDialog-VBWHFJ2R.js → ExportDialog-Q4VWI43H.js} +2 -2
- package/dist/{ExportToolbarControls-N3TCL5DD.js → ExportToolbarControls-QYLBRWM7.js} +8 -8
- package/dist/GitGrantNotice-I2VNKPLH.js +29 -0
- package/dist/{GitToolbarControl-VJVK2B4X.js → GitToolbarControl-O5AXBC6T.js} +5 -3
- package/dist/{GitUI-CAKFVKWY.js → GitUI-L5T3XHZG.js} +68 -14
- package/dist/{ShareDialog-PAMOQQFB.js → ShareDialog-4OX3UPJ4.js} +150 -3
- package/dist/calculation/index.d.ts +27 -0
- package/dist/calculation/index.js +16 -0
- package/dist/chunk-6E635KCJ.js +11 -0
- package/dist/chunk-DUKTAKB4.js +83 -0
- package/dist/{chunk-VRRL6VTD.js → chunk-Q6XNIKDG.js} +63 -0
- package/dist/{chunk-HFYPTTCH.js → chunk-V2ENBGUA.js} +0 -9
- package/dist/export/index.js +5 -5
- package/dist/index.d.ts +45 -8
- package/dist/index.js +952 -511
- package/dist/proofing/index.d.ts +112 -0
- package/dist/proofing/index.js +50 -0
- package/dist/settings/index.d.ts +37 -1
- package/dist/settings/index.js +11 -3
- package/package.json +22 -9
- package/src/styles/docblocks.css +443 -97
- package/dist/{chunk-SIIEGOHY.js → chunk-FMDLZ4ZG.js} +3 -3
package/dist/export/index.js
CHANGED
|
@@ -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;
|
|
@@ -146,6 +147,8 @@ interface FileExplorerProps {
|
|
|
146
147
|
onTogglePin?: (path: string) => void | Promise<void>;
|
|
147
148
|
/** Called when any entry is selected (file or directory). */
|
|
148
149
|
onSelect?: (path: string, kind: 'file' | 'directory') => void;
|
|
150
|
+
/** Opens the active native workspace root in the platform file manager. */
|
|
151
|
+
onOpenWorkspaceFolder?: () => void;
|
|
149
152
|
/** Host-owned context actions for an entry. */
|
|
150
153
|
actionsForEntry?: (entry: FileSystemEntry) => readonly FileTreeNodeAction[];
|
|
151
154
|
/**
|
|
@@ -155,7 +158,7 @@ interface FileExplorerProps {
|
|
|
155
158
|
onTreeMutation?: FileTreeMutationHandler;
|
|
156
159
|
/** Called after any mutation, with move details when paths change. */
|
|
157
160
|
onTreeChange?: (change?: FileTreeChange) => void;
|
|
158
|
-
/** Called
|
|
161
|
+
/** Called with every external file dropped onto the explorer. */
|
|
159
162
|
onImportFiles?: (files: File[]) => void;
|
|
160
163
|
/**
|
|
161
164
|
* Ask the user to confirm an irreversible delete. Resolve `false` to abort.
|
|
@@ -170,7 +173,7 @@ interface FileExplorerProps {
|
|
|
170
173
|
/** Optional className for the root element. */
|
|
171
174
|
className?: string;
|
|
172
175
|
}
|
|
173
|
-
declare function FileExplorer({ provider, metadataRefreshKey, activeFilePath, sortMode, onSortModeChange, activeWorkspaceId, pinnedDocuments, pinnedPaths, onPinnedDocumentSelect, onPinnedDocumentUnpin, onPinnedDocumentRename, onPinnedDocumentDelete, onTogglePin, onSelect, actionsForEntry, onTreeMutation, onTreeChange, onImportFiles, confirmDelete, moveDestinations, onMoveToWorkspace, className, }: FileExplorerProps): react_jsx_runtime.JSX.Element;
|
|
176
|
+
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, className, }: FileExplorerProps): react_jsx_runtime.JSX.Element;
|
|
174
177
|
|
|
175
178
|
/**
|
|
176
179
|
* useFileTree — hook that reads from a FileSystemProvider,
|
|
@@ -263,6 +266,36 @@ interface DocBlocksShellProps {
|
|
|
263
266
|
appBuildDate?: string;
|
|
264
267
|
/** Self-hosted ffmpeg.wasm core. Supplying it enables Animated GIF export. */
|
|
265
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;
|
|
266
299
|
/** Stable host title used before a document opens and for the optional home document. */
|
|
267
300
|
homeDocumentTitle?: string;
|
|
268
301
|
/** Document path that represents the host's indexable home experience. */
|
|
@@ -315,7 +348,7 @@ interface DocBlocksShellProps {
|
|
|
315
348
|
*/
|
|
316
349
|
offlineReady?: boolean;
|
|
317
350
|
}
|
|
318
|
-
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;
|
|
319
352
|
|
|
320
353
|
/**
|
|
321
354
|
* Versioning preferences — global default + per-workspace resolution.
|
|
@@ -347,6 +380,10 @@ interface AppMenuProps {
|
|
|
347
380
|
writeCanvasSettings?: WriteCanvasPreferences;
|
|
348
381
|
/** Called when the user changes the Write canvas typography. */
|
|
349
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;
|
|
350
387
|
/** Current global versioning preference. */
|
|
351
388
|
versioningPreference?: VersioningPreference;
|
|
352
389
|
/** Called when the user changes the global versioning preference. */
|
|
@@ -383,7 +420,7 @@ interface AppMenuProps {
|
|
|
383
420
|
/** ISO build date shown in About. */
|
|
384
421
|
appBuildDate?: string;
|
|
385
422
|
}
|
|
386
|
-
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;
|
|
387
424
|
|
|
388
425
|
interface ExportToolbarControlsProps {
|
|
389
426
|
/** Currently selected file path — used to derive the download filename. */
|
|
@@ -451,4 +488,4 @@ interface UseDocumentSessionResult {
|
|
|
451
488
|
*/
|
|
452
489
|
declare function useDocumentSession(autoSaveDelayMs?: number): UseDocumentSessionResult;
|
|
453
490
|
|
|
454
|
-
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 };
|