@stll/folio-react 0.36.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 +2 -2
- package/dist/{CommentsSidebar-CMNMCb-Y.js → CommentsSidebar-CjRWDQe6.js} +1 -1
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{renderAsync-CUKCee5z.d.ts → renderAsync-BxzAiwBg.d.ts} +3 -29
- package/dist/{renderAsync-CzkaClhN.js → renderAsync-oOJytPjH.js} +593 -1005
- package/package.json +2 -4
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
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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";
|
package/dist/compat/eigenpal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-
|
|
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
|
|
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";
|
|
@@ -186,4 +186,4 @@ type AutocompleteCaretOverlayProps = {
|
|
|
186
186
|
isStreaming: boolean;
|
|
187
187
|
};
|
|
188
188
|
export declare const AutocompleteCaretOverlay: ({ caret, text, isStreaming }: AutocompleteCaretOverlayProps) => React.JSX.Element | null;
|
|
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
|
|
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-
|
|
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,7 +21,6 @@ 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";
|
|
@@ -620,16 +618,6 @@ type DocxEditorProps = {
|
|
|
620
618
|
derivedFields?: FolioDerivedFields | undefined;
|
|
621
619
|
/** Pre-parsed document (alternative to documentBuffer) */
|
|
622
620
|
document?: Document | null;
|
|
623
|
-
/**
|
|
624
|
-
* The editing engine. Unset, the editor runs the canonical session, which
|
|
625
|
-
* refuses unsupported edits with a notice, or the legacy session when
|
|
626
|
-
* `collaboration` is a Yjs fragment. `"legacy"` selects the
|
|
627
|
-
* ProseMirror-owned engine.
|
|
628
|
-
* A host plugin's transaction or a direct dispatch that changes the
|
|
629
|
-
* document is refused too, its refusal naming the transaction's meta keys:
|
|
630
|
-
* express such an edit as document operations (`applyDocumentOperations`).
|
|
631
|
-
*/
|
|
632
|
-
experimentalSession?: EditorSession;
|
|
633
621
|
/** Callback when document is saved */
|
|
634
622
|
onSave?: (buffer: ArrayBuffer) => void;
|
|
635
623
|
/** Author name used for comments and track changes */
|
|
@@ -968,22 +956,8 @@ type DocxEditorProps = {
|
|
|
968
956
|
*/
|
|
969
957
|
onSelectiveSaveTripwire?: (result: TripwireResult) => void;
|
|
970
958
|
};
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
type DocxEditorYjsCollaboration = {
|
|
974
|
-
awareness?: {
|
|
975
|
-
clientID: number;
|
|
976
|
-
getStates: () => Map<number, unknown>;
|
|
977
|
-
off: (event: "change" | "update", handler: () => void) => void;
|
|
978
|
-
on: (event: "change" | "update", handler: () => void) => void;
|
|
979
|
-
} | undefined;
|
|
980
|
-
onSeeded?: (() => void) | undefined;
|
|
981
|
-
plugins?: Plugin[] | undefined;
|
|
982
|
-
shouldSeed?: boolean | undefined;
|
|
983
|
-
yXmlFragment: XmlFragment;
|
|
984
|
-
/** A canonical room is reached through `connect`; a Yjs fragment has none. */
|
|
985
|
-
connect?: never;
|
|
986
|
-
};
|
|
959
|
+
/** The room an editor joins. */
|
|
960
|
+
type DocxEditorCollaboration = CanonicalRoomCollaboration;
|
|
987
961
|
type DocxEditorApplyDocumentOperationsOptions = {
|
|
988
962
|
undefinedReferences: FolioUndefinedReferencePolicy;
|
|
989
963
|
snapshot: FolioAIEditSnapshot;
|
|
@@ -1325,4 +1299,4 @@ type RenderAsyncOptions = Omit<DocxEditorProps, "documentBuffer" | "document"> &
|
|
|
1325
1299
|
* Rejects if `onError` runs before that milestone.
|
|
1326
1300
|
*/
|
|
1327
1301
|
declare const renderAsync: (input: DocxInput, container: HTMLElement, options: RenderAsyncOptions) => Promise<DocxEditorHandle>;
|
|
1328
|
-
export {
|
|
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 };
|