@stll/folio-react 0.24.1 → 0.25.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-D0TBbrpB.js → CommentsSidebar-D9vMIMl7.js} +6 -2
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/i18n/messages/ar.d.ts +2 -0
- package/dist/i18n/messages/ar.js +2 -0
- package/dist/i18n/messages/cs.d.ts +2 -0
- package/dist/i18n/messages/cs.js +2 -0
- package/dist/i18n/messages/de.d.ts +2 -0
- package/dist/i18n/messages/de.js +2 -0
- package/dist/i18n/messages/en.d.ts +2 -0
- package/dist/i18n/messages/en.js +2 -0
- package/dist/i18n/messages/es.d.ts +2 -0
- package/dist/i18n/messages/es.js +2 -0
- package/dist/i18n/messages/et.d.ts +2 -0
- package/dist/i18n/messages/et.js +2 -0
- package/dist/i18n/messages/fr.d.ts +2 -0
- package/dist/i18n/messages/fr.js +2 -0
- package/dist/i18n/messages/he.d.ts +2 -0
- package/dist/i18n/messages/he.js +2 -0
- package/dist/i18n/messages/hi.d.ts +2 -0
- package/dist/i18n/messages/hi.js +2 -0
- package/dist/i18n/messages/hu.d.ts +2 -0
- package/dist/i18n/messages/hu.js +2 -0
- package/dist/i18n/messages/locales.d.ts +2 -0
- package/dist/i18n/messages/locales.js +2 -0
- package/dist/i18n/messages/lt.d.ts +2 -0
- package/dist/i18n/messages/lt.js +2 -0
- package/dist/i18n/messages/lv.d.ts +2 -0
- package/dist/i18n/messages/lv.js +2 -0
- package/dist/i18n/messages/pl.d.ts +2 -0
- package/dist/i18n/messages/pl.js +2 -0
- package/dist/i18n/messages/pt-BR.d.ts +2 -0
- package/dist/i18n/messages/pt-BR.js +2 -0
- package/dist/i18n/messages/sk.d.ts +2 -0
- package/dist/i18n/messages/sk.js +2 -0
- package/dist/i18n/messages/tr.d.ts +2 -0
- package/dist/i18n/messages/tr.js +2 -0
- package/dist/i18n/messages/zh-CN.d.ts +2 -0
- package/dist/i18n/messages/zh-CN.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{renderAsync-BYZY3FVx.d.ts → renderAsync-CfXBLJ_1.d.ts} +3 -0
- package/dist/{renderAsync-DqldIlJu.js → renderAsync-yYZKXh6r.js} +613 -292
- package/package.json +6 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-
|
|
1
|
+
import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-yYZKXh6r.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";
|
|
5
|
+
import { scrollEditorTo } from "@stll/folio-core/paged-layout/editorScrollRoot";
|
|
5
6
|
import { closestHtmlElement, queryHtmlElement } from "@stll/folio-core/utils/domGuards";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { PANEL_METRICS } from "@stll/folio-core/panel-layout";
|
|
@@ -369,7 +370,10 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
|
|
|
369
370
|
const scrollEl_1 = editorContainerRef?.current;
|
|
370
371
|
const anchorY = lastKnownCardPositionsRef.current.get(cardId_1) ?? anchorPositions?.get(cardId_1);
|
|
371
372
|
if (!scrollEl_1 || anchorY === void 0) return;
|
|
372
|
-
scrollEl_1
|
|
373
|
+
scrollEditorTo(scrollEl_1, {
|
|
374
|
+
top: Math.max(0, anchorY - scrollEl_1.clientHeight / 3),
|
|
375
|
+
behavior: "instant"
|
|
376
|
+
});
|
|
373
377
|
};
|
|
374
378
|
const hasPositions = !isDrawer && cardPositions.size > 0;
|
|
375
379
|
const avatarStyle = (name, size = 28) => ({
|
|
@@ -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-CfXBLJ_1.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-yYZKXh6r.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-CfXBLJ_1.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-DZz6gVev.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-yYZKXh6r.js";
|
|
2
2
|
import { n as FolioUIProvider } from "./folio-ui-DO95voaI.js";
|
|
3
3
|
import { t as FindReplaceDialog } from "./FindReplaceDialog-BUwFQWaq.js";
|
|
4
4
|
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-6XdO0zBH.js";
|
|
@@ -25,6 +25,7 @@ import "@stll/folio-core/controller/noteEditorManager";
|
|
|
25
25
|
import { Layout } from "@stll/folio-core/layout-engine/types";
|
|
26
26
|
import "@stll/folio-core/prosemirror/extensions/ExtensionManager";
|
|
27
27
|
import "@stll/folio-core/controller/hiddenEditorManager";
|
|
28
|
+
import "@stll/folio-core/controller/hiddenEditorApi";
|
|
28
29
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
29
30
|
import { Dialog } from "@base-ui/react/dialog";
|
|
30
31
|
import { Menu } from "@base-ui/react/menu";
|
|
@@ -623,6 +624,8 @@ type DocxEditorProps = {
|
|
|
623
624
|
password?: string | undefined;
|
|
624
625
|
/** Pre-parsed document (alternative to documentBuffer) */
|
|
625
626
|
document?: Document | null;
|
|
627
|
+
/** Experimental plain-text canonical session; unsupported edits are refused. */
|
|
628
|
+
experimentalSession?: "canonical";
|
|
626
629
|
/** Callback when document is saved */
|
|
627
630
|
onSave?: (buffer: ArrayBuffer) => void;
|
|
628
631
|
/** Author name used for comments and track changes */
|