@stll/folio-react 0.19.2 → 0.19.4
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as containedHandler } from "./renderAsync-
|
|
1
|
+
import { d as containedHandler } from "./renderAsync-DQTZEYip.js";
|
|
2
2
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { CheckIcon, MoreVerticalIcon } from "lucide-react";
|
|
4
4
|
import { useLocale, useTranslations } from "use-intl";
|
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-DQTZEYip.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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as formatZoom, c as FormattingBar, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync, u as AutocompleteCaretOverlay } from "./renderAsync-
|
|
1
|
+
import { a as formatZoom, c as FormattingBar, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync, u as AutocompleteCaretOverlay } from "./renderAsync-DQTZEYip.js";
|
|
2
2
|
import { n as FolioUIProvider } from "./folio-ui-BgDDRsUX.js";
|
|
3
3
|
import { t as FindReplaceDialog } from "./FindReplaceDialog-CqKK82nE.js";
|
|
4
4
|
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-CixRdIiT.js";
|
|
@@ -47,6 +47,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
47
47
|
import { createNoteEditorManager } from "@stll/folio-core/controller/noteEditorManager";
|
|
48
48
|
import { createFolioAIEditSnapshot as createFolioAIEditSnapshot$1 } from "@stll/folio-core/ai-edits/snapshot";
|
|
49
49
|
import { createFolioEditorEmitter } from "@stll/folio-core/controller/folioEditorEvents";
|
|
50
|
+
import { dispatchEditorTextInput } from "@stll/folio-core/prosemirror/textInput";
|
|
50
51
|
import { createLatestRequestGate } from "@stll/folio-core/controller/latestRequestGate";
|
|
51
52
|
import { runLayoutPipeline } from "@stll/folio-core/controller/layoutPipeline";
|
|
52
53
|
import { browserClock, createLayoutScheduler } from "@stll/folio-core/controller/layoutScheduler";
|
|
@@ -2337,11 +2338,6 @@ const toDeferredKeyboardEventInit = (event) => ({
|
|
|
2337
2338
|
const replayDeferredKeyDown = (view, eventInit) => {
|
|
2338
2339
|
view.dom.dispatchEvent(new KeyboardEvent("keydown", eventInit));
|
|
2339
2340
|
};
|
|
2340
|
-
const dispatchEditorTextInput = (view, text) => {
|
|
2341
|
-
const { from, to } = view.state.selection;
|
|
2342
|
-
const defaultTransaction = () => view.state.tr.insertText(text, from, to);
|
|
2343
|
-
if (!view.someProp("handleTextInput", (handler) => handler(view, from, to, text, defaultTransaction))) view.dispatch(defaultTransaction());
|
|
2344
|
-
};
|
|
2345
2341
|
/**
|
|
2346
2342
|
* Get the zero-based page index for a node by climbing to its
|
|
2347
2343
|
* `.layout-page` ancestor and reading `data-page-number`. Returns
|
|
@@ -3053,8 +3049,7 @@ const PagedEditor = forwardRef(function PagedEditor(props, ref) {
|
|
|
3053
3049
|
const columns = useMemo(() => getColumns(sectionProperties), [sectionProperties]);
|
|
3054
3050
|
const contentWidth = pageSize.w - margins.left - margins.right;
|
|
3055
3051
|
const defaultTabStop = document?.package.settings?.defaultTabStop;
|
|
3056
|
-
const
|
|
3057
|
-
const mirrorMargins = documentSettings !== void 0 && "mirrorMargins" in documentSettings && documentSettings.mirrorMargins === true;
|
|
3052
|
+
const mirrorMargins = document?.package.settings?.mirrorMargins === true;
|
|
3058
3053
|
const sectionHeaderFooterRefs = useMemo(() => resolveSectionHeaderFooterRefs(document), [document]);
|
|
3059
3054
|
const layoutInputSignature = useMemo(() => buildLayoutInputSignature({
|
|
3060
3055
|
columns,
|
|
@@ -5106,11 +5101,6 @@ const PagedEditor = forwardRef(function PagedEditor(props, ref) {
|
|
|
5106
5101
|
}
|
|
5107
5102
|
if (pendingHiddenEditorSelectionRef.current || queuedInputBeforeHiddenEditorRef.current.length > 0) applyPendingHiddenEditorInput(view_22);
|
|
5108
5103
|
if (!hiddenPMRef.current?.isFocused()) focusHiddenEditor();
|
|
5109
|
-
if (e_7.key === " " && !e_7.ctrlKey && !e_7.metaKey && !e_7.nativeEvent.isComposing) {
|
|
5110
|
-
e_7.preventDefault();
|
|
5111
|
-
dispatchEditorTextInput(view_22, " ");
|
|
5112
|
-
return;
|
|
5113
|
-
}
|
|
5114
5104
|
if (["PageUp", "PageDown"].includes(e_7.key) && !e_7.metaKey && !e_7.ctrlKey) {}
|
|
5115
5105
|
if (e_7.key === "Home" && (e_7.metaKey || e_7.ctrlKey)) {
|
|
5116
5106
|
const sc = getScrollContainer();
|
|
@@ -12305,7 +12295,7 @@ function useFolioComments({ doc, autoOpenReviewSidebar, anchorPositions, editorC
|
|
|
12305
12295
|
* - Error boundary
|
|
12306
12296
|
* - Loading states
|
|
12307
12297
|
*/
|
|
12308
|
-
const CommentsSidebar = lazy(() => import("./CommentsSidebar-
|
|
12298
|
+
const CommentsSidebar = lazy(() => import("./CommentsSidebar-hQ1cFDNj.js").then((m) => ({ default: m.CommentsSidebar })));
|
|
12309
12299
|
const TextContextMenu = lazy(() => import("./TextContextMenu-Ci7-M4oU.js").then((m) => ({ default: m.TextContextMenu })));
|
|
12310
12300
|
const loadAttemptSelectiveSave = async () => {
|
|
12311
12301
|
const { attemptSelectiveSave } = await import("@stll/folio-core/docx/selectiveSave");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/folio-react",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
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",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@fontsource/noto-sans-arabic": "^5.2.7",
|
|
69
69
|
"@fontsource/source-sans-3": "^5.2.9",
|
|
70
70
|
"@fontsource/tinos": "^5.2.7",
|
|
71
|
-
"@stll/folio-core": "^0.
|
|
71
|
+
"@stll/folio-core": "^0.40.0",
|
|
72
72
|
"better-result": "3.0.1",
|
|
73
73
|
"lucide-react": "1.24.0",
|
|
74
74
|
"prosemirror-history": "^1.5.0",
|