@stll/folio-react 0.19.2 → 0.19.3

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-DDTUocrv.js";
1
+ import { d as containedHandler } from "./renderAsync-CKbqa0RR.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";
@@ -1,4 +1,4 @@
1
- import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-DDTUocrv.js";
1
+ import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-CKbqa0RR.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-DDTUocrv.js";
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-CKbqa0RR.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
@@ -5106,11 +5102,6 @@ const PagedEditor = forwardRef(function PagedEditor(props, ref) {
5106
5102
  }
5107
5103
  if (pendingHiddenEditorSelectionRef.current || queuedInputBeforeHiddenEditorRef.current.length > 0) applyPendingHiddenEditorInput(view_22);
5108
5104
  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
5105
  if (["PageUp", "PageDown"].includes(e_7.key) && !e_7.metaKey && !e_7.ctrlKey) {}
5115
5106
  if (e_7.key === "Home" && (e_7.metaKey || e_7.ctrlKey)) {
5116
5107
  const sc = getScrollContainer();
@@ -12305,7 +12296,7 @@ function useFolioComments({ doc, autoOpenReviewSidebar, anchorPositions, editorC
12305
12296
  * - Error boundary
12306
12297
  * - Loading states
12307
12298
  */
12308
- const CommentsSidebar = lazy(() => import("./CommentsSidebar-C_HL9ylX.js").then((m) => ({ default: m.CommentsSidebar })));
12299
+ const CommentsSidebar = lazy(() => import("./CommentsSidebar-BOaLk877.js").then((m) => ({ default: m.CommentsSidebar })));
12309
12300
  const TextContextMenu = lazy(() => import("./TextContextMenu-Ci7-M4oU.js").then((m) => ({ default: m.TextContextMenu })));
12310
12301
  const loadAttemptSelectiveSave = async () => {
12311
12302
  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.2",
3
+ "version": "0.19.3",
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.39.0",
71
+ "@stll/folio-core": "^0.39.1",
72
72
  "better-result": "3.0.1",
73
73
  "lucide-react": "1.24.0",
74
74
  "prosemirror-history": "^1.5.0",