@stll/folio-react 0.35.0 → 0.37.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 CHANGED
@@ -20,12 +20,12 @@ Part of [stella](https://github.com/stella/stella), an open-source legal workspa
20
20
  bun add @stll/folio-react react@^19.2.0 react-dom@^19.2.0 use-intl@^4.0.0 \
21
21
  prosemirror-commands@^1.7.1 prosemirror-dropcursor@^1.8.2 prosemirror-gapcursor@^1.4.1 prosemirror-history@^1.5.0 \
22
22
  prosemirror-inputrules@^1.5.0 prosemirror-keymap@^1.2.3 prosemirror-model@^1.25.9 prosemirror-state@^1.4.4 \
23
- prosemirror-tables@^1.8.5 prosemirror-transform@^1.12.0 prosemirror-view@^1.42.6 y-prosemirror@^1.3.7 \
23
+ prosemirror-tables@^1.8.5 prosemirror-transform@^1.12.0 prosemirror-view@^1.42.6 \
24
24
  y-protocols@^1.0.6 yjs@^13.6.31
25
25
  ```
26
26
 
27
27
  ProseMirror and Yjs packages are required peers, including the collaboration
28
- packages `y-prosemirror` and `y-protocols`. Install one compatible copy of each in the host
28
+ package `y-protocols`. Install one compatible copy of each in the host
29
29
  application so schemas, plugins, editor states, and collaborative documents share
30
30
  the same runtime. The command above includes the complete editor peer closure.
31
31
 
@@ -1,4 +1,4 @@
1
- import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-CeGgJz8j.js";
1
+ import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-oOJytPjH.js";
2
2
  import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from "react";
3
3
  import { CheckIcon, MoreVerticalIcon } from "lucide-react";
4
4
  import { useLocale, useTranslations } from "use-intl";
@@ -1,4 +1,4 @@
1
- import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-Ddsn6AyR.js";
1
+ import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-BxzAiwBg.js";
2
2
  import { ForwardRefExoticComponent, JSX, ReactNode, RefAttributes } from "react";
3
3
  import { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
4
4
  export declare const VERSION = "folio-compat-eigenpal";
@@ -1,4 +1,4 @@
1
- import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-CeGgJz8j.js";
1
+ import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-oOJytPjH.js";
2
2
  import { t as messages_exports } from "../messages-BmWt6Yeu.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { forwardRef } from "react";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as FolioUIComponents, a as DocxEditorApplyDocumentOperationsOptions, b as FontDefinition, c as DocxEditorRef, d as HighlightPassageResult, f as ToolbarProps, g as FolioButtonProps, h as ColorPreset, i as renderAsync, l as DocxEditorYjsCollaboration, m as EditorMode, n as EditorHandle, o as DocxEditorCollaboration, p as FontOption, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageOptions, v as FolioUIProvider, y as OutlineItem } from "./renderAsync-Ddsn6AyR.js";
1
+ import { _ as FolioUIProvider, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as ToolbarProps, f as FontOption, g as FolioUIComponents, h as FolioButtonProps, i as renderAsync, l as HighlightPassageOptions, m as ColorPreset, n as EditorHandle, o as DocxEditorCollaboration, p as EditorMode, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageResult, v as OutlineItem, y as FontDefinition } from "./renderAsync-BxzAiwBg.js";
2
2
  import { A as HyperlinkDialog, C as ImagePropertiesData, D as ImagePositionDialog, E as ImagePositionData, F as FindReplaceDialog, I as FindReplaceDialogProps, M as HyperlinkDialogProps, N as FootnotePropertiesDialog, O as ImagePositionDialogProps, P as FootnotePropertiesDialogProps, S as InsertImageDialogProps, T as ImagePropertiesDialogProps, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialog, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as HyperlinkDialogData, k as HyperlinkBookmarkOption, l as PasteSpecialDialog, m as InsertTableDialog, n as WatermarkDialogProps, o as SplitCellDialog, p as PageSetupDialogProps, r as TableProperties, s as SplitCellDialogData, t as WatermarkDialog, u as PasteSpecialDialogProps, v as InsertSymbolDialog, w as ImagePropertiesDialog, x as InsertImageDialogData, y as InsertSymbolDialogProps } from "./dialogs-BjWjcllk.js";
3
3
  import React, { CSSProperties, ForwardRefExoticComponent, JSX, ReactNode, RefAttributes, RefObject } from "react";
4
4
  import { FolioAIBlock, FolioAIBlockAnchor, FolioAIBlockKind, FolioAIBlockPreviewRun, FolioAIComment, FolioAIEditAppliedOperation, FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditParagraphIdentity, FolioAIEditReviewMeta, FolioAIEditSeverity, FolioAIEditSkipReason, FolioAIEditSkippedOperation, FolioAIEditSnapshot, FolioAISignatureParty, WordDiffSegment, applyFolioAIEditOperations, createFolioAIEditSnapshot, diffWordSegments, hashFolioAIBlockText, normalizeFolioAIBlockText } from "@stll/folio-core/ai-edits";
@@ -14,6 +14,7 @@ import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTa
14
14
  import { FolioSuggestion, SuggestionAppliedAs, SuggestionKind } from "@stll/folio-core/prosemirror/commands/comments";
15
15
  import { TemplateSlashMenuKeyAction, TemplateSlashMenuState, clearTemplateSlashMenu, consumeTemplateSlashQuery, getTemplateSlashMenu, resetTemplateSlashQuery, templateSlashMenuKey } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
16
16
  import { Document } from "@stll/folio-core/types/document";
17
+ import { FolioDerivedFields, FolioFieldInsertion } from "@stll/folio-core/types/fields";
17
18
  import { FindMatch, FindOptions, FindResult, ReplaceAllSummary, ReplaceEligibility } from "@stll/folio-core/utils/findReplace";
18
19
  import { OutlineDepth } from "@stll/folio-core/utils/outlineDepth";
19
20
  import { PictureWatermark, TextWatermark, Watermark, getDocumentWatermark, setDocumentWatermark } from "@stll/folio-core/watermark";
@@ -185,4 +186,4 @@ type AutocompleteCaretOverlayProps = {
185
186
  isStreaming: boolean;
186
187
  };
187
188
  export declare const AutocompleteCaretOverlay: ({ caret, text, isStreaming }: AutocompleteCaretOverlayProps) => React.JSX.Element | null;
188
- export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type ApplyResult, type AutocompleteCaretOverlayProps, type AutocompleteCaretRect, type BlockRect, type ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxEditorApplyDocumentOperationsOptions, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, type DocxEditorYjsCollaboration, type EditorHandle, type EditorMode, type EditorReadOnlyReason, type ExtractDocumentStyleSetOptions, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindResult, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyResult, type FolioAIEditOperation, type FolioAIEditParagraphIdentity, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAISignatureParty, type FolioAnonymizationMatch, type FolioAnonymizationTerm, type FolioAutocompleteApi, type FolioAutocompleteState, type FolioBlockId, type FolioButtonProps, type FolioSuggestion, type FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, type FormattingBarProps, type HighlightPassageOptions, type HighlightPassageResult, type HyperlinkBookmarkOption, HyperlinkDialog, type HyperlinkDialogData, type HyperlinkDialogProps, type ImageMeta, type ImagePositionData, ImagePositionDialog, type ImagePositionDialogProps, type ImagePropertiesData, ImagePropertiesDialog, type ImagePropertiesDialogProps, type ImageRef, InsertImageDialog, type InsertImageDialogData, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, type KeyboardShortcutScope, type MarkdownOptions, type MarkdownResult, type OutlineDepth, type OutlineItem, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, type PictureWatermark, type PositionalText, type RenderAsyncOptions, type ReplaceAllSummary, type ReplaceEligibility, type ResolvedAnchor, type ReviewDisplayMode, STELLA_STYLE_SET_NAME, type ScrollToParaIdOptions, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type SuggestionAppliedAs, type SuggestionKind, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, type TextWatermark, type UseWheelZoomOptions, type UseWheelZoomReturn, type Watermark, WatermarkDialog, type WatermarkDialogProps, type WordDiffSegment, type ZoomControlProps, type ZoomLevel, applyFolioAIEditOperations, applySuggestions, buildPositionalText, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, fromMarkdown, getDocumentWatermark, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, inspectDocumentStyles, inspectDocumentStylesFromDocx, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, templateSlashMenuKey, toMarkdown, toMarkdownResult };
189
+ export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type ApplyResult, type AutocompleteCaretOverlayProps, type AutocompleteCaretRect, type BlockRect, type ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxEditorApplyDocumentOperationsOptions, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, type EditorHandle, type EditorMode, type EditorReadOnlyReason, type ExtractDocumentStyleSetOptions, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindResult, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyResult, type FolioAIEditOperation, type FolioAIEditParagraphIdentity, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAISignatureParty, type FolioAnonymizationMatch, type FolioAnonymizationTerm, type FolioAutocompleteApi, type FolioAutocompleteState, type FolioBlockId, type FolioButtonProps, type FolioDerivedFields, type FolioFieldInsertion, type FolioSuggestion, type FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, type FormattingBarProps, type HighlightPassageOptions, type HighlightPassageResult, type HyperlinkBookmarkOption, HyperlinkDialog, type HyperlinkDialogData, type HyperlinkDialogProps, type ImageMeta, type ImagePositionData, ImagePositionDialog, type ImagePositionDialogProps, type ImagePropertiesData, ImagePropertiesDialog, type ImagePropertiesDialogProps, type ImageRef, InsertImageDialog, type InsertImageDialogData, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, type KeyboardShortcutScope, type MarkdownOptions, type MarkdownResult, type OutlineDepth, type OutlineItem, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, type PictureWatermark, type PositionalText, type RenderAsyncOptions, type ReplaceAllSummary, type ReplaceEligibility, type ResolvedAnchor, type ReviewDisplayMode, STELLA_STYLE_SET_NAME, type ScrollToParaIdOptions, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type SuggestionAppliedAs, type SuggestionKind, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, type TextWatermark, type UseWheelZoomOptions, type UseWheelZoomReturn, type Watermark, WatermarkDialog, type WatermarkDialogProps, type WordDiffSegment, type ZoomControlProps, type ZoomLevel, applyFolioAIEditOperations, applySuggestions, buildPositionalText, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, fromMarkdown, getDocumentWatermark, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, inspectDocumentStyles, inspectDocumentStylesFromDocx, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, templateSlashMenuKey, toMarkdown, toMarkdownResult };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as ZOOM_PRESETS, d as parseZoom, f as useWheelZoom, i as ZoomControl, l as clampZoom, n as DocxEditor, o as AutocompleteCaretOverlay, r as FormattingBar, t as renderAsync, u as formatZoom } from "./renderAsync-CeGgJz8j.js";
1
+ import { c as ZOOM_PRESETS, d as parseZoom, f as useWheelZoom, i as ZoomControl, l as clampZoom, n as DocxEditor, o as AutocompleteCaretOverlay, r as FormattingBar, t as renderAsync, u as formatZoom } from "./renderAsync-oOJytPjH.js";
2
2
  import { n as FolioUIProvider } from "./folio-ui-DNlnaoih.js";
3
3
  import { t as FindReplaceDialog } from "./FindReplaceDialog-DTK6xana.js";
4
4
  import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-mDtUjPE_.js";
@@ -1,7 +1,6 @@
1
1
  import React$1, { CSSProperties, ComponentProps, ComponentType, JSX, ReactElement, ReactNode, RefAttributes, RefObject } from "react";
2
2
  import { EditorState, Plugin, Transaction } from "prosemirror-state";
3
3
  import { EditorView } from "prosemirror-view";
4
- import { XmlFragment } from "yjs";
5
4
  import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioCommentAnchor, FolioDocumentNavigationTarget, FolioPendingSuggestionLoadResult, FolioPendingSuggestionRecord, FolioReviewChange, FolioUndefinedReferencePolicy } from "@stll/folio-core/ai-edits";
6
5
  import { CanonicalHistoryDrop, CanonicalHistoryEffect } from "@stll/folio-core/canonical/canonicalSession";
7
6
  import { ContentControlFilter, SetContentControlContentInput, SetContentControlValueInput } from "@stll/folio-core/content-controls";
@@ -22,10 +21,10 @@ import { ListState, SelectionState } from "@stll/folio-core/prosemirror";
22
21
  import { FolioSuggestion, SuggestionAppliedAs } from "@stll/folio-core/prosemirror/commands/comments";
23
22
  import { TemplateSlashMenuKeyAction, TemplateSlashMenuState } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
24
23
  import { FolioDocumentOperationBatch, FolioDocumentOperationResult, FolioDocumentOperationUndoHandle, FolioDocumentOperationUndoResult } from "@stll/folio-core/server";
25
- import { EditorSession } from "@stll/folio-core/types/canonicalCapabilities";
26
24
  import { Comment } from "@stll/folio-core/types/content";
27
25
  import { ColorValue, Document, ParagraphAlignment, SdtProperties, Style, Theme } from "@stll/folio-core/types/document";
28
26
  import { DeepReadonly, ReadonlyDocument } from "@stll/folio-core/types/documentModel";
27
+ import { FolioDerivedFields, FolioFieldInsertion } from "@stll/folio-core/types/fields";
29
28
  import { DocxInput } from "@stll/folio-core/utils/docxInput";
30
29
  import { FindMatch, FindOptions, FindResult } from "@stll/folio-core/utils/findReplace";
31
30
  import { OutlineDepth } from "@stll/folio-core/utils/outlineDepth";
@@ -610,18 +609,15 @@ type DocxEditorProps = {
610
609
  documentBuffer?: DocxInput | null;
611
610
  /** Password for Agile-encrypted .docx files (Office 2010+). */
612
611
  password?: string | undefined;
613
- /** Pre-parsed document (alternative to documentBuffer) */
614
- document?: Document | null;
615
612
  /**
616
- * The editing engine. Unset, the editor runs the canonical session, which
617
- * refuses unsupported edits with a notice, or the legacy session when
618
- * `collaboration` is a Yjs fragment. `"legacy"` selects the
619
- * ProseMirror-owned engine.
620
- * A host plugin's transaction or a direct dispatch that changes the
621
- * document is refused too, its refusal naming the transaction's meta keys:
622
- * express such an edit as document operations (`applyDocumentOperations`).
613
+ * Fields whose display text the host derives from the document (numbered
614
+ * references, for one). After each local edit the owned fields show what
615
+ * `displayTexts` gives them, in the same undo step as the edit; a peer in a
616
+ * shared room receives the update with it.
623
617
  */
624
- experimentalSession?: EditorSession;
618
+ derivedFields?: FolioDerivedFields | undefined;
619
+ /** Pre-parsed document (alternative to documentBuffer) */
620
+ document?: Document | null;
625
621
  /** Callback when document is saved */
626
622
  onSave?: (buffer: ArrayBuffer) => void;
627
623
  /** Author name used for comments and track changes */
@@ -960,22 +956,8 @@ type DocxEditorProps = {
960
956
  */
961
957
  onSelectiveSaveTripwire?: (result: TripwireResult) => void;
962
958
  };
963
- type DocxEditorCollaboration = CanonicalRoomCollaboration | DocxEditorYjsCollaboration;
964
- /** A Yjs fragment the legacy session edits, and the plugins that bind it. */
965
- type DocxEditorYjsCollaboration = {
966
- awareness?: {
967
- clientID: number;
968
- getStates: () => Map<number, unknown>;
969
- off: (event: "change" | "update", handler: () => void) => void;
970
- on: (event: "change" | "update", handler: () => void) => void;
971
- } | undefined;
972
- onSeeded?: (() => void) | undefined;
973
- plugins?: Plugin[] | undefined;
974
- shouldSeed?: boolean | undefined;
975
- yXmlFragment: XmlFragment;
976
- /** A canonical room is reached through `connect`; a Yjs fragment has none. */
977
- connect?: never;
978
- };
959
+ /** The room an editor joins. */
960
+ type DocxEditorCollaboration = CanonicalRoomCollaboration;
979
961
  type DocxEditorApplyDocumentOperationsOptions = {
980
962
  undefinedReferences: FolioUndefinedReferencePolicy;
981
963
  snapshot: FolioAIEditSnapshot;
@@ -1211,6 +1193,12 @@ type DocxEditorRef = {
1211
1193
  autocomplete: FolioAutocompleteApi;
1212
1194
  /** Every occurrence of the `anonymizationTerms`, as text positions. */
1213
1195
  getAnonymizationMatches: () => readonly FolioAnonymizationMatch[];
1196
+ /**
1197
+ * Insert a field in place of the body selection: one undo step, a tracked
1198
+ * insertion when suggesting. False when nothing was inserted, as while a
1199
+ * header, footer or note is being edited.
1200
+ */
1201
+ insertField: (field: FolioFieldInsertion) => boolean;
1214
1202
  /** Painted geometry for one block, relative to this editor's scroll root. */
1215
1203
  getBlockRect: (blockId: string) => BlockRect | null;
1216
1204
  /** Painted geometry for many blocks in one layout read; missing ids are omitted. */
@@ -1311,4 +1299,4 @@ type RenderAsyncOptions = Omit<DocxEditorProps, "documentBuffer" | "document"> &
1311
1299
  * Rejects if `onError` runs before that milestone.
1312
1300
  */
1313
1301
  declare const renderAsync: (input: DocxInput, container: HTMLElement, options: RenderAsyncOptions) => Promise<DocxEditorHandle>;
1314
- export { FolioUIComponents as _, DocxEditorApplyDocumentOperationsOptions as a, FontDefinition as b, DocxEditorRef as c, HighlightPassageResult as d, ToolbarProps as f, FolioButtonProps as g, ColorPreset as h, renderAsync as i, DocxEditorYjsCollaboration as l, EditorMode as m, EditorHandle as n, DocxEditorCollaboration as o, FontOption as p, RenderAsyncOptions as r, DocxEditorProps as s, DocxEditorHandle as t, HighlightPassageOptions as u, FolioUIProvider as v, OutlineItem as y };
1302
+ export { FolioUIProvider as _, DocxEditorApplyDocumentOperationsOptions as a, DocxEditorRef as c, ToolbarProps as d, FontOption as f, FolioUIComponents as g, FolioButtonProps as h, renderAsync as i, HighlightPassageOptions as l, ColorPreset as m, EditorHandle as n, DocxEditorCollaboration as o, EditorMode as p, RenderAsyncOptions as r, DocxEditorProps as s, DocxEditorHandle as t, HighlightPassageResult as u, OutlineItem as v, FontDefinition as y };