@stll/folio-react 0.26.0 → 0.27.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/dist/{CommentsSidebar-C4IpXib8.js → CommentsSidebar-BbwdJakm.js} +1 -1
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{renderAsync-JTB5ldQI.d.ts → renderAsync-B9AIgM8K.d.ts} +3 -1
- package/dist/{renderAsync-T2p_qqNU.js → renderAsync-Bcpsd6Fw.js} +9 -3
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-
|
|
1
|
+
import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-Bcpsd6Fw.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-B9AIgM8K.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
|
4
4
|
//#region src/compat/eigenpal.d.ts
|
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-Bcpsd6Fw.js";
|
|
2
2
|
import { t as messages_exports } from "../messages.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 FolioUIProvider, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as ToolbarProps, f as EditorMode, g as FolioUIComponents, h as FolioButtonProps, i as renderAsync, l as HighlightPassageOptions, m as ColorPreset, n as EditorHandle, o as DocxEditorCollaboration, p as FontOption, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageResult, v as OutlineItem, y as FontDefinition } from "./renderAsync-
|
|
1
|
+
import { _ as FolioUIProvider, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as ToolbarProps, f as EditorMode, g as FolioUIComponents, h as FolioButtonProps, i as renderAsync, l as HighlightPassageOptions, m as ColorPreset, n as EditorHandle, o as DocxEditorCollaboration, p as FontOption, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageResult, v as OutlineItem, y as FontDefinition } from "./renderAsync-B9AIgM8K.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-BENP66Ly.js";
|
|
3
3
|
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
4
4
|
import { CreateEmptyDocumentOptions, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as formatZoom, c as FormattingBar, d as AutocompleteCaretOverlay, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync } from "./renderAsync-
|
|
1
|
+
import { a as formatZoom, c as FormattingBar, d as AutocompleteCaretOverlay, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync } from "./renderAsync-Bcpsd6Fw.js";
|
|
2
2
|
import { n as FolioUIProvider } from "./folio-ui-rCHqCEG6.js";
|
|
3
3
|
import { t as FindReplaceDialog } from "./FindReplaceDialog-LlVMe3EW.js";
|
|
4
4
|
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-D73t3LNP.js";
|
|
@@ -2,7 +2,7 @@ import React$1, { CSSProperties, ComponentProps, ComponentType, ReactNode, RefAt
|
|
|
2
2
|
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
4
|
import { XmlFragment } from "yjs";
|
|
5
|
-
import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioCommentAnchor, FolioDocumentNavigationTarget, FolioPendingSuggestionLoadResult, FolioPendingSuggestionRecord, FolioReviewChange } from "@stll/folio-core/ai-edits";
|
|
5
|
+
import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioCommentAnchor, FolioDocumentNavigationTarget, FolioPendingSuggestionLoadResult, FolioPendingSuggestionRecord, FolioReviewChange, FolioUndefinedReferencePolicy } from "@stll/folio-core/ai-edits";
|
|
6
6
|
import { FolioDocumentOperationBatch, FolioDocumentOperationResult, FolioDocumentOperationUndoHandle, FolioDocumentOperationUndoResult } from "@stll/folio-core/server";
|
|
7
7
|
import { ContentControlFilter, SetContentControlContentInput, SetContentControlValueInput } from "@stll/folio-core/content-controls";
|
|
8
8
|
import { PageRendererName } from "@stll/folio-core/display-list/editor/pageRenderer";
|
|
@@ -945,6 +945,7 @@ type DocxEditorCollaboration = {
|
|
|
945
945
|
yXmlFragment: XmlFragment;
|
|
946
946
|
};
|
|
947
947
|
type DocxEditorApplyDocumentOperationsOptions = {
|
|
948
|
+
undefinedReferences: FolioUndefinedReferencePolicy;
|
|
948
949
|
snapshot: FolioAIEditSnapshot;
|
|
949
950
|
batch: FolioDocumentOperationBatch;
|
|
950
951
|
author?: string;
|
|
@@ -1028,6 +1029,7 @@ type DocxEditorRef = {
|
|
|
1028
1029
|
undoDocumentOperations: (undoHandle: FolioDocumentOperationUndoHandle) => FolioDocumentOperationUndoResult;
|
|
1029
1030
|
/** Apply AI-authored operations against a previously created block snapshot. */
|
|
1030
1031
|
applyAIEditOperations: (options: {
|
|
1032
|
+
undefinedReferences: FolioUndefinedReferencePolicy;
|
|
1031
1033
|
snapshot: FolioAIEditSnapshot;
|
|
1032
1034
|
operations: FolioAIEditOperation[];
|
|
1033
1035
|
mode?: FolioAIEditApplyMode;
|
|
@@ -13819,7 +13819,7 @@ function _temp(id_4) {
|
|
|
13819
13819
|
*/
|
|
13820
13820
|
/** No headings to track while the outline is not shown. */
|
|
13821
13821
|
const NO_HEADINGS = [];
|
|
13822
|
-
const CommentsSidebar = lazy(() => import("./CommentsSidebar-
|
|
13822
|
+
const CommentsSidebar = lazy(() => import("./CommentsSidebar-BbwdJakm.js").then((m) => ({ default: m.CommentsSidebar })));
|
|
13823
13823
|
const TextContextMenu = lazy(() => import("./TextContextMenu-DZ3AUFKh.js").then((m) => ({ default: m.TextContextMenu })));
|
|
13824
13824
|
const loadAttemptSelectiveSave = async () => {
|
|
13825
13825
|
const { attemptSelectiveSave } = await import("@stll/folio-core/docx/selectiveSave");
|
|
@@ -15834,7 +15834,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15834
15834
|
const view_22 = pagedEditorRef.current?.getView();
|
|
15835
15835
|
return view_22 ? createFolioAIEditSnapshot(view_22.state.doc) : null;
|
|
15836
15836
|
},
|
|
15837
|
-
applyDocumentOperations: ({ snapshot: snapshot_0, batch, author: operationAuthor = author }) => {
|
|
15837
|
+
applyDocumentOperations: ({ undefinedReferences, snapshot: snapshot_0, batch, author: operationAuthor = author }) => {
|
|
15838
15838
|
assertSupportedFolioDocumentOperationVersion(batch.version);
|
|
15839
15839
|
const view_23 = pagedEditorRef.current?.getView();
|
|
15840
15840
|
if (!view_23) {
|
|
@@ -15856,6 +15856,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15856
15856
|
};
|
|
15857
15857
|
}
|
|
15858
15858
|
const canonical_1 = getCanonicalApi()?.applyCanonicalDocumentOperations({
|
|
15859
|
+
undefinedReferences,
|
|
15859
15860
|
snapshot: snapshot_0,
|
|
15860
15861
|
batch,
|
|
15861
15862
|
author: operationAuthor
|
|
@@ -15874,6 +15875,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15874
15875
|
};
|
|
15875
15876
|
const activeSuggestionIds = new Set(getSuggestions(view_23.state).map((s_0) => s_0.suggestionId));
|
|
15876
15877
|
const result_3 = applyFolioDocumentOperations({
|
|
15878
|
+
undefinedReferences,
|
|
15877
15879
|
view: operationView,
|
|
15878
15880
|
snapshot: snapshot_0,
|
|
15879
15881
|
batch,
|
|
@@ -15947,7 +15949,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15947
15949
|
undoHandle
|
|
15948
15950
|
};
|
|
15949
15951
|
},
|
|
15950
|
-
applyAIEditOperations: ({ snapshot: snapshot_1, operations, mode = "tracked-changes", author: operationAuthor_0 = author }) => {
|
|
15952
|
+
applyAIEditOperations: ({ undefinedReferences: undefinedReferences_0, snapshot: snapshot_1, operations, mode = "tracked-changes", author: operationAuthor_0 = author }) => {
|
|
15951
15953
|
const view_25 = pagedEditorRef.current?.getView();
|
|
15952
15954
|
if (!view_25) return {
|
|
15953
15955
|
applied: [],
|
|
@@ -15957,6 +15959,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15957
15959
|
}))
|
|
15958
15960
|
};
|
|
15959
15961
|
const canonical_3 = getCanonicalApi()?.applyCanonicalDocumentOperations({
|
|
15962
|
+
undefinedReferences: undefinedReferences_0,
|
|
15960
15963
|
snapshot: snapshot_1,
|
|
15961
15964
|
batch: {
|
|
15962
15965
|
version: FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION,
|
|
@@ -15969,6 +15972,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
15969
15972
|
const createdComments_0 = [];
|
|
15970
15973
|
const activeSuggestionIds_0 = new Set(getSuggestions(view_25.state).map((s_1) => s_1.suggestionId));
|
|
15971
15974
|
const { applied: applied_0, skipped: skipped_0 } = applyFolioDocumentOperations({
|
|
15975
|
+
undefinedReferences: undefinedReferences_0,
|
|
15972
15976
|
view: view_25,
|
|
15973
15977
|
snapshot: snapshot_1,
|
|
15974
15978
|
batch: {
|
|
@@ -16144,6 +16148,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
16144
16148
|
skipped: []
|
|
16145
16149
|
};
|
|
16146
16150
|
const canonical_4 = getCanonicalApi()?.applyCanonicalDocumentOperations({
|
|
16151
|
+
undefinedReferences: "refuse",
|
|
16147
16152
|
snapshot: snapshot_5,
|
|
16148
16153
|
batch: {
|
|
16149
16154
|
version: FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION,
|
|
@@ -16155,6 +16160,7 @@ const DocxEditor = forwardRef(function DocxEditor({ documentBuffer, password, do
|
|
|
16155
16160
|
if (canonical_4) return canonical_4;
|
|
16156
16161
|
const createdComments_1 = [];
|
|
16157
16162
|
const result_4 = applyFolioDocumentOperations({
|
|
16163
|
+
undefinedReferences: "refuse",
|
|
16158
16164
|
view: view_36,
|
|
16159
16165
|
snapshot: snapshot_5,
|
|
16160
16166
|
batch: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/folio-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "React editor for folio: a Word-document (.docx) editor for the browser, built on @stll/folio-core and ProseMirror.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-editor",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"build:css": "bun scripts/build-css.ts",
|
|
67
67
|
"prepack": "bun run build",
|
|
68
68
|
"pack:dry-run": "bun pm pack --dry-run",
|
|
69
|
-
"typecheck": "bun
|
|
69
|
+
"typecheck": "bun check --no-pretty --all --project=tsconfig.build.json",
|
|
70
70
|
"test": "bun test src"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@fontsource/noto-sans-arabic": "^5.2.7",
|
|
80
80
|
"@fontsource/source-sans-3": "^5.2.9",
|
|
81
81
|
"@fontsource/tinos": "^5.2.7",
|
|
82
|
-
"@stll/folio-core": "^0.
|
|
82
|
+
"@stll/folio-core": "^0.59.0",
|
|
83
83
|
"better-result": "3.0.1",
|
|
84
84
|
"lucide-react": "1.24.0",
|
|
85
85
|
"prosemirror-history": "^1.5.0",
|