@stll/folio-react 0.34.1 → 0.35.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 +15 -0
- package/dist/{CommentsSidebar-myF8qhju.js → CommentsSidebar-l092CpvD.js} +31 -39
- package/dist/{FindReplaceDialog-DbbzquBV.js → FindReplaceDialog-DTK6xana.js} +2 -2
- package/dist/{FootnotePropertiesDialog-BBq9iBzN.js → FootnotePropertiesDialog-mDtUjPE_.js} +2 -2
- package/dist/{ImagePositionDialog-CznMopDr.js → ImagePositionDialog-ZJQNtqFy.js} +2 -2
- package/dist/{ImagePropertiesDialog-TAm7NKLM.js → ImagePropertiesDialog-DChYHwgl.js} +2 -2
- package/dist/{InsertSymbolDialog-CrHgjUTz.js → InsertSymbolDialog-J_pp6t9O.js} +2 -2
- package/dist/{PageSetupDialog-DpTPXo9U.js → PageSetupDialog-CS6fgx2j.js} +2 -2
- package/dist/{SetNumberingValueDialog-BzUWmoaZ.js → SetNumberingValueDialog-D7pc4iaY.js} +1 -1
- package/dist/{TablePropertiesDialog-fDJc5_NR.js → TablePropertiesDialog-CrVVT48x.js} +2 -2
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +2 -2
- package/dist/{dialogs-BQ-7aAfV.js → dialogs-BgWQFSlU.js} +1 -1
- package/dist/{dialogs-CQHVbEgA.d.ts → dialogs-BjWjcllk.d.ts} +12 -11
- package/dist/dialogs.d.ts +1 -1
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-CEFqJgCh.js → folio-ui-DNlnaoih.js} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +11 -13
- package/dist/{messages-DjrCTI3y.js → messages-BmWt6Yeu.js} +2 -2
- package/dist/messages.js +1 -1
- package/dist/{renderAsync-k1iPk-aX.js → renderAsync-CeGgJz8j.js} +1643 -1324
- package/dist/{renderAsync-CRk3aj3J.d.ts → renderAsync-Ddsn6AyR.d.ts} +96 -38
- package/dist/{rolldown-runtime-782esTHO.js → rolldown-runtime-BKpuH2hG.js} +4 -4
- package/dist/standalone.css +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -51,6 +51,21 @@ export function Editor({ docx }: { docx: ArrayBuffer }) {
|
|
|
51
51
|
The editor renders to the DOM; under SSR, load it from a client-only/dynamic
|
|
52
52
|
import.
|
|
53
53
|
|
|
54
|
+
## Editing engine
|
|
55
|
+
|
|
56
|
+
The editor edits through the canonical session: each edit is a typed operation
|
|
57
|
+
on the document model, and an edit the session cannot make yet is refused with
|
|
58
|
+
a notice instead of being applied partly. `experimentalSession="legacy"` selects
|
|
59
|
+
the previous ProseMirror-owned engine:
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
<DocxEditor
|
|
63
|
+
accessibleName="Document editor"
|
|
64
|
+
documentBuffer={docx}
|
|
65
|
+
experimentalSession="legacy"
|
|
66
|
+
/>
|
|
67
|
+
```
|
|
68
|
+
|
|
54
69
|
## Read-only review views
|
|
55
70
|
|
|
56
71
|
```tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-
|
|
1
|
+
import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-CeGgJz8j.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";
|
|
5
5
|
import { scrollEditorTo } from "@stll/folio-core/paged-layout/editorScrollRoot";
|
|
6
|
-
import { closestHtmlElement
|
|
6
|
+
import { closestHtmlElement } from "@stll/folio-core/utils/domGuards";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { sliceText } from "@stll/folio-core/utils/sliceText";
|
|
9
9
|
import { getFindParagraphText } from "@stll/folio-core/utils/findReplace";
|
|
@@ -110,7 +110,7 @@ const CANCEL_BUTTON_STYLE = {
|
|
|
110
110
|
fontWeight: 500,
|
|
111
111
|
fontFamily: "inherit"
|
|
112
112
|
};
|
|
113
|
-
const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentReply, onCommentResolve, onCommentDelete, onAddComment, onCancelAddComment, onAcceptChange: _onAcceptChange, onRejectChange: _onRejectChange, onTrackedChangeReply: _onTrackedChangeReply, topOffset = 0, showResolved = false, isAddingComment = false, addCommentYPosition = null, pageWidth = 816,
|
|
113
|
+
const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentReply, onCommentResolve, onCommentDelete, onAddComment, onCancelAddComment, onAcceptChange: _onAcceptChange, onRejectChange: _onRejectChange, onTrackedChangeReply: _onTrackedChangeReply, topOffset = 0, showResolved = false, isAddingComment = false, addCommentYPosition = null, pageWidth = 816, columnStart = null, scrollContainer, anchorPositions, surface = "column", onDismiss }) => {
|
|
114
114
|
const t = useTranslations("folio");
|
|
115
115
|
const locale = useLocale();
|
|
116
116
|
const [replyingTo, setReplyingTo] = useState(null);
|
|
@@ -139,37 +139,29 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
139
139
|
initial: "container"
|
|
140
140
|
});
|
|
141
141
|
const updateSidebarLeft = useCallback(() => {
|
|
142
|
-
const scrollEl =
|
|
143
|
-
const
|
|
144
|
-
const pageEl = scrollEl ? queryHtmlElement(scrollEl, ".layout-page") : null;
|
|
145
|
-
const offsetParentRaw = sidebarEl?.offsetParent;
|
|
142
|
+
const scrollEl = scrollContainer;
|
|
143
|
+
const offsetParentRaw = sidebarRef.current?.offsetParent;
|
|
146
144
|
const offsetParent = offsetParentRaw instanceof HTMLElement ? offsetParentRaw : null;
|
|
147
|
-
if (!
|
|
145
|
+
if (!isDrawer || !scrollEl || !offsetParent) {
|
|
148
146
|
setMeasuredLeft(null);
|
|
149
147
|
return;
|
|
150
148
|
}
|
|
151
149
|
const parentRect = offsetParent.getBoundingClientRect();
|
|
152
150
|
const parentScale = offsetParent.clientWidth ? parentRect.width / offsetParent.clientWidth : 1;
|
|
153
151
|
const parentX = (viewportX) => (viewportX - parentRect.left) / parentScale;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
const rawLeft = parentX(pageEl.getBoundingClientRect().right) + PANEL_METRICS.commentsGap;
|
|
170
|
-
const maxVisibleLeft = Math.max(8, offsetParent.clientWidth - SIDEBAR_WIDTH - 8);
|
|
171
|
-
setMeasuredLeft(Math.max(8, Math.min(rawLeft, maxVisibleLeft)));
|
|
172
|
-
}, [editorContainerRef, isDrawer]);
|
|
152
|
+
const scrollRect = scrollEl.getBoundingClientRect();
|
|
153
|
+
const top = -Math.round((parentRect.top - scrollRect.top) / parentScale + scrollEl.scrollTop);
|
|
154
|
+
const width = Math.min(PANEL_METRICS.drawerWidth, scrollEl.clientWidth - 16);
|
|
155
|
+
const height = scrollEl.clientHeight;
|
|
156
|
+
const scrollScale = scrollEl.offsetWidth ? scrollRect.width / scrollEl.offsetWidth : parentScale;
|
|
157
|
+
const viewportEnd = scrollRect.left + scrollEl.clientWidth * scrollScale;
|
|
158
|
+
setDrawerBox((box) => box.top === top && box.width === width && box.height === height ? box : {
|
|
159
|
+
top,
|
|
160
|
+
width,
|
|
161
|
+
height
|
|
162
|
+
});
|
|
163
|
+
setMeasuredLeft(parentX(viewportEnd) - width);
|
|
164
|
+
}, [scrollContainer, isDrawer]);
|
|
173
165
|
const measureSidebarCommit = useEffectEvent((_layout, measure) => measure());
|
|
174
166
|
useLayoutEffect(() => {
|
|
175
167
|
measureSidebarCommit({
|
|
@@ -184,7 +176,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
184
176
|
comments.length
|
|
185
177
|
]);
|
|
186
178
|
useEffect(() => {
|
|
187
|
-
const scrollEl_0 =
|
|
179
|
+
const scrollEl_0 = scrollContainer;
|
|
188
180
|
if (!scrollEl_0) return;
|
|
189
181
|
const resizeObserver = new ResizeObserver(updateSidebarLeft);
|
|
190
182
|
resizeObserver.observe(scrollEl_0);
|
|
@@ -196,7 +188,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
196
188
|
scrollEl_0.removeEventListener("scroll", handleScroll);
|
|
197
189
|
window.removeEventListener("resize", handleScroll);
|
|
198
190
|
};
|
|
199
|
-
}, [
|
|
191
|
+
}, [scrollContainer, updateSidebarLeft]);
|
|
200
192
|
const visibleComments = useMemo(() => comments.filter((c) => {
|
|
201
193
|
const parentId = getCommentParentId(c);
|
|
202
194
|
if (parentId !== null && parentId !== void 0) return false;
|
|
@@ -217,7 +209,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
217
209
|
}, [comments]);
|
|
218
210
|
const getReplies = (commentId) => repliesByParent.get(commentId) ?? [];
|
|
219
211
|
const updateCardPositions = useCallback(() => {
|
|
220
|
-
const container =
|
|
212
|
+
const container = scrollContainer;
|
|
221
213
|
if (!container) return;
|
|
222
214
|
const pagesEl = container.querySelector(".paged-editor__pages");
|
|
223
215
|
if (!pagesEl) return;
|
|
@@ -288,14 +280,14 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
288
280
|
for (const key of lastKnownCardPositionsRef.current.keys()) if (!visiblePositionIds.has(key) && key !== "new-comment-input") lastKnownCardPositionsRef.current.delete(key);
|
|
289
281
|
}, [
|
|
290
282
|
visibleComments,
|
|
291
|
-
|
|
283
|
+
scrollContainer,
|
|
292
284
|
isAddingComment,
|
|
293
285
|
addCommentYPosition,
|
|
294
286
|
anchorPositions,
|
|
295
287
|
activeCommentId
|
|
296
288
|
]);
|
|
297
289
|
useEffect(() => {
|
|
298
|
-
const container_0 =
|
|
290
|
+
const container_0 = scrollContainer;
|
|
299
291
|
if (!container_0) return;
|
|
300
292
|
const pagesEl_0 = container_0.querySelector(".paged-editor__pages");
|
|
301
293
|
if (!pagesEl_0) return;
|
|
@@ -315,9 +307,9 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
315
307
|
};
|
|
316
308
|
container_0.addEventListener("click", handleDocClick);
|
|
317
309
|
return () => container_0.removeEventListener("click", handleDocClick);
|
|
318
|
-
}, [
|
|
310
|
+
}, [scrollContainer, onCommentClick]);
|
|
319
311
|
useEffect(() => {
|
|
320
|
-
const container_1 =
|
|
312
|
+
const container_1 = scrollContainer;
|
|
321
313
|
if (!container_1) return;
|
|
322
314
|
const timerQuick = setTimeout(updateCardPositions, 50);
|
|
323
315
|
const timerFull = setTimeout(() => {
|
|
@@ -333,9 +325,9 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
333
325
|
clearTimeout(timerFull);
|
|
334
326
|
resizeObserver_0.disconnect();
|
|
335
327
|
};
|
|
336
|
-
}, [updateCardPositions,
|
|
328
|
+
}, [updateCardPositions, scrollContainer]);
|
|
337
329
|
useEffect(() => {
|
|
338
|
-
const container_2 =
|
|
330
|
+
const container_2 = scrollContainer;
|
|
339
331
|
if (!container_2) return;
|
|
340
332
|
let rafId = null;
|
|
341
333
|
const scheduleUpdate = () => {
|
|
@@ -350,7 +342,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
350
342
|
if (rafId !== null) cancelAnimationFrame(rafId);
|
|
351
343
|
container_2.removeEventListener("scroll", scheduleUpdate);
|
|
352
344
|
};
|
|
353
|
-
}, [
|
|
345
|
+
}, [scrollContainer, updateCardPositions]);
|
|
354
346
|
const measureCardsCommit = useEffectEvent((_layout_0, measure_0) => {
|
|
355
347
|
const raf = requestAnimationFrame(measure_0);
|
|
356
348
|
return () => cancelAnimationFrame(raf);
|
|
@@ -395,7 +387,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
395
387
|
if (isDrawer && nextExpandedCard !== null) revealAnchor(cardId_1);
|
|
396
388
|
};
|
|
397
389
|
const revealAnchor = (cardId_2) => {
|
|
398
|
-
const scrollEl_1 =
|
|
390
|
+
const scrollEl_1 = scrollContainer;
|
|
399
391
|
const anchorY = lastKnownCardPositionsRef.current.get(cardId_2) ?? anchorPositions?.get(cardId_2);
|
|
400
392
|
if (!scrollEl_1 || anchorY === void 0) return;
|
|
401
393
|
scrollEditorTo(scrollEl_1, {
|
|
@@ -777,7 +769,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
|
|
|
777
769
|
style: {
|
|
778
770
|
position: "absolute",
|
|
779
771
|
top: isDrawer ? drawerBox.top : topOffset,
|
|
780
|
-
left: measuredLeft ?? `calc(50% - 120px + ${pageWidth / 2 + PANEL_METRICS.commentsGap}px)`,
|
|
772
|
+
left: (isDrawer ? measuredLeft : columnStart) ?? `calc(50% - 120px + ${pageWidth / 2 + PANEL_METRICS.commentsGap}px)`,
|
|
781
773
|
bottom: 0,
|
|
782
774
|
width: isDrawer ? drawerBox.width : SIDEBAR_WIDTH,
|
|
783
775
|
fontFamily: "inherit",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
5
5
|
import { ChevronDownIcon, ChevronUpIcon, SearchIcon, XIcon } from "lucide-react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useId, useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useId, useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useId, useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useId, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
2
2
|
import { a as DIALOG_LABEL_CLASS, c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { useId, useState } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
3
3
|
import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
5
5
|
import { useId, useState } from "react";
|
|
@@ -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-Ddsn6AyR.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,5 +1,5 @@
|
|
|
1
|
-
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-
|
|
2
|
-
import { t as messages_exports } from "../messages-
|
|
1
|
+
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-CeGgJz8j.js";
|
|
2
|
+
import { t as messages_exports } from "../messages-BmWt6Yeu.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { IntlProvider, useTranslations } from "use-intl";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as useFolioUI } from "./folio-ui-
|
|
1
|
+
import { r as useFolioUI } from "./folio-ui-DNlnaoih.js";
|
|
2
2
|
import { a as DIALOG_LABEL_CLASS, c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { useId, useState } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, JSX } from "react";
|
|
2
2
|
import { EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/folio-core/types/document";
|
|
3
|
-
import {
|
|
3
|
+
import { DeepReadonly } from "@stll/folio-core/types/documentModel";
|
|
4
|
+
import { FindMatch, FindOptions, FindResult, ReplaceAllSummary } from "@stll/folio-core/utils/findReplace";
|
|
4
5
|
import { TablePropertiesCommand } from "@stll/folio-core/utils/tableOperations";
|
|
5
6
|
import { Watermark } from "@stll/folio-core/watermark";
|
|
6
7
|
/**
|
|
@@ -12,20 +13,20 @@ type FindReplaceDialogProps = {
|
|
|
12
13
|
/** Callback when dialog is closed */
|
|
13
14
|
onClose: () => void;
|
|
14
15
|
/** Callback when searching for text */
|
|
15
|
-
onFind: (searchText: string, options: FindOptions
|
|
16
|
+
onFind: (searchText: string, options: FindOptions) => FindResult | null;
|
|
16
17
|
/** Publish edits immediately, before the delayed search. */
|
|
17
|
-
onQueryChange?: (searchText: string, options: FindOptions
|
|
18
|
+
onQueryChange?: (searchText: string, options: FindOptions) => void;
|
|
18
19
|
/** Callback when navigating to next match */
|
|
19
|
-
onFindNext: () => FindMatch
|
|
20
|
+
onFindNext: () => FindMatch | null;
|
|
20
21
|
/** Callback when navigating to previous match */
|
|
21
|
-
onFindPrevious: () => FindMatch
|
|
22
|
+
onFindPrevious: () => FindMatch | null;
|
|
22
23
|
/** Callback when replacing current match */
|
|
23
24
|
onReplace: (replaceText: string) => boolean;
|
|
24
25
|
/** Callback when replacing all matches */
|
|
25
|
-
onReplaceAll: (searchText: string, replaceText: string, options: FindOptions
|
|
26
|
+
onReplaceAll: (searchText: string, replaceText: string, options: FindOptions) => ReplaceAllSummary;
|
|
26
27
|
readOnly?: boolean;
|
|
27
28
|
/** Callback to highlight matches in document */
|
|
28
|
-
onHighlightMatches?: (matches: FindMatch
|
|
29
|
+
onHighlightMatches?: (matches: FindMatch[]) => void;
|
|
29
30
|
/** Callback to clear highlights */
|
|
30
31
|
onClearHighlights?: () => void;
|
|
31
32
|
/** Initial search text (e.g., from selected text) */
|
|
@@ -35,7 +36,7 @@ type FindReplaceDialogProps = {
|
|
|
35
36
|
/** External result paired with the query that produced it. */
|
|
36
37
|
currentSearch?: {
|
|
37
38
|
queryKey: string;
|
|
38
|
-
result: FindResult
|
|
39
|
+
result: FindResult;
|
|
39
40
|
} | null;
|
|
40
41
|
/** Additional CSS class */
|
|
41
42
|
className?: string;
|
|
@@ -50,8 +51,8 @@ type FootnotePropertiesDialogProps = {
|
|
|
50
51
|
isOpen: boolean;
|
|
51
52
|
onClose: () => void;
|
|
52
53
|
onApply: (footnoteProps: FootnoteProperties, endnoteProps: EndnoteProperties) => void;
|
|
53
|
-
footnotePr?: FootnoteProperties
|
|
54
|
-
endnotePr?: EndnoteProperties
|
|
54
|
+
footnotePr?: DeepReadonly<FootnoteProperties>;
|
|
55
|
+
endnotePr?: DeepReadonly<EndnoteProperties>;
|
|
55
56
|
};
|
|
56
57
|
declare function FootnotePropertiesDialog({ isOpen, onClose, onApply, footnotePr, endnotePr }: FootnotePropertiesDialogProps): JSX.Element;
|
|
57
58
|
type HyperlinkBookmarkOption = {
|
|
@@ -151,7 +152,7 @@ type PageSetupDialogProps = {
|
|
|
151
152
|
isOpen: boolean;
|
|
152
153
|
onClose: () => void;
|
|
153
154
|
onApply: (props: Partial<SectionProperties>) => void;
|
|
154
|
-
currentProps?: SectionProperties
|
|
155
|
+
currentProps?: DeepReadonly<SectionProperties>;
|
|
155
156
|
};
|
|
156
157
|
declare function PageSetupDialog(props: PageSetupDialogProps): JSX.Element | null;
|
|
157
158
|
type PasteSpecialMode = "keepFormatting" | "mergeFormatting" | "plainText";
|
package/dist/dialogs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { FindReplaceDialog, type FindReplaceDialogProps, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, type HyperlinkBookmarkOption, HyperlinkDialog, type HyperlinkDialogData, type HyperlinkDialogProps, type ImagePositionData, ImagePositionDialog, type ImagePositionDialogProps, type ImagePropertiesData, ImagePropertiesDialog, type ImagePropertiesDialogProps, InsertImageDialog, type InsertImageDialogData, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, WatermarkDialog, type WatermarkDialogProps };
|
package/dist/dialogs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as FindReplaceDialog } from "./FindReplaceDialog-
|
|
2
|
-
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-
|
|
3
|
-
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-
|
|
4
|
-
import { t as ImagePositionDialog } from "./ImagePositionDialog-
|
|
5
|
-
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-
|
|
6
|
-
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-
|
|
7
|
-
import { t as PageSetupDialog } from "./PageSetupDialog-
|
|
8
|
-
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-
|
|
1
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-DTK6xana.js";
|
|
2
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-mDtUjPE_.js";
|
|
3
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-BgWQFSlU.js";
|
|
4
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-ZJQNtqFy.js";
|
|
5
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-DChYHwgl.js";
|
|
6
|
+
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-J_pp6t9O.js";
|
|
7
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-CS6fgx2j.js";
|
|
8
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-CrVVT48x.js";
|
|
9
9
|
export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
|
|
@@ -676,7 +676,7 @@ function DefaultOutlineRail({ items, scrollContainerRef, resolvePct, onJump, act
|
|
|
676
676
|
})();
|
|
677
677
|
const lastIndex = items.length - 1;
|
|
678
678
|
const clampedFocusIndex = Math.max(0, Math.min(lastIndex, focusIndex));
|
|
679
|
-
let minLevel =
|
|
679
|
+
let minLevel = 1e400;
|
|
680
680
|
for (const item_0 of items) minLevel = Math.min(minLevel, item_0.level);
|
|
681
681
|
useEffect(() => {
|
|
682
682
|
const list = listRef.current;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { _ as
|
|
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-
|
|
1
|
+
import { _ as FolioUIComponents, a as DocxEditorApplyDocumentOperationsOptions, b as FontDefinition, c as DocxEditorRef, d as HighlightPassageResult, f as ToolbarProps, g as FolioButtonProps, h as ColorPreset, i as renderAsync, l as DocxEditorYjsCollaboration, m as EditorMode, n as EditorHandle, o as DocxEditorCollaboration, p as FontOption, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageOptions, v as FolioUIProvider, y as OutlineItem } from "./renderAsync-Ddsn6AyR.js";
|
|
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
|
-
import {
|
|
5
|
-
import {
|
|
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";
|
|
5
|
+
import { FolioAnonymizationMatch, FolioAnonymizationTerm } from "@stll/folio-core/controller/anonymizationHighlights";
|
|
6
|
+
import { FolioAutocompleteApi, FolioAutocompleteState } from "@stll/folio-core/controller/autocompleteSuggestion";
|
|
6
7
|
import { DocxCompatibility } from "@stll/folio-core/docx/compatibility";
|
|
7
8
|
import { EditorReadOnlyReason } from "@stll/folio-core/managers/EditorModeManager";
|
|
8
9
|
import { KeyboardShortcutScope, KeyboardShortcutScope as KeyboardShortcutScope$1 } from "@stll/folio-core/managers/editorShortcuts";
|
|
@@ -11,12 +12,12 @@ import { BlockRect } from "@stll/folio-core/paged-layout/blockGeometry";
|
|
|
11
12
|
import { ScrollToParaIdOptions } from "@stll/folio-core/paged-layout/paragraphFlash";
|
|
12
13
|
import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "@stll/folio-core/prosemirror";
|
|
13
14
|
import { FolioSuggestion, SuggestionAppliedAs, SuggestionKind } from "@stll/folio-core/prosemirror/commands/comments";
|
|
14
|
-
import { AnonymizationMatch, AnonymizationTerm, anonymizationDecorationsKey, getAnonymizationMatches, setAnonymizationTermsMeta } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
|
|
15
15
|
import { TemplateSlashMenuKeyAction, TemplateSlashMenuState, clearTemplateSlashMenu, consumeTemplateSlashQuery, getTemplateSlashMenu, resetTemplateSlashQuery, templateSlashMenuKey } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
16
16
|
import { Document } from "@stll/folio-core/types/document";
|
|
17
17
|
import { FindMatch, FindOptions, FindResult, ReplaceAllSummary, ReplaceEligibility } from "@stll/folio-core/utils/findReplace";
|
|
18
18
|
import { OutlineDepth } from "@stll/folio-core/utils/outlineDepth";
|
|
19
19
|
import { PictureWatermark, TextWatermark, Watermark, getDocumentWatermark, setDocumentWatermark } from "@stll/folio-core/watermark";
|
|
20
|
+
import { CreateEmptyDocumentOptions, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
|
20
21
|
import { DocumentStyleCatalog, DocumentStyleCatalogEntry, ExtractDocumentStyleSetOptions, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "@stll/folio-core/style-sets/extract";
|
|
21
22
|
import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "@stll/folio-core/style-sets/stellaStyle";
|
|
22
23
|
import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocumentPreset, DocumentStyleSet } from "@stll/folio-core/style-sets/types";
|
|
@@ -32,7 +33,6 @@ import { getFolioCaretViewportRect, getFolioSelectionViewportRect } from "@stll/
|
|
|
32
33
|
import { AICitationRange, createAICitationDecorationsPlugin, setAICitationsMeta, setActiveCitationMeta } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
33
34
|
import { DirectiveKind, DirectiveRange, getTemplateDirectives, scanDirectives } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
|
|
34
35
|
import { TemplatePreviewHiddenRange, TemplatePreviewSpan, TemplatePreviewValue, TemplatePreviewValues, setTemplatePreviewValues } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
35
|
-
import { AcceptAutocompleteResult, AutocompleteSuggestionPluginOptions, AutocompleteSuggestionState, AutocompleteSuggestionStatus, AutocompleteTriggerCheck, AutocompleteTriggerOptions, AutocompleteTriggerSkipReason, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, acceptAutocompleteSuggestion, acceptAutocompleteWord, appendAutocompleteToken, autocompleteSuggestionKey, autocompleteSuggestionPlugin, clearAutocompleteSuggestion, finishAutocompleteSuggestion, getAutocompleteSuggestion, shouldTriggerAutocomplete, startAutocompleteSuggestion } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
|
|
36
36
|
import { ImageMeta, ImageRef, MarkdownOptions, MarkdownResult, fromMarkdown, toMarkdown, toMarkdownResult } from "@stll/folio-core/markdown";
|
|
37
37
|
/**
|
|
38
38
|
* DocxEditor - Complete DOCX editor component
|
|
@@ -185,4 +185,4 @@ type AutocompleteCaretOverlayProps = {
|
|
|
185
185
|
isStreaming: boolean;
|
|
186
186
|
};
|
|
187
187
|
export declare const AutocompleteCaretOverlay: ({ caret, text, isStreaming }: AutocompleteCaretOverlayProps) => React.JSX.Element | null;
|
|
188
|
-
export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type
|
|
188
|
+
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 DocxEditorYjsCollaboration, 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 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,19 +1,17 @@
|
|
|
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-
|
|
2
|
-
import { n as FolioUIProvider } from "./folio-ui-
|
|
3
|
-
import { t as FindReplaceDialog } from "./FindReplaceDialog-
|
|
4
|
-
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-
|
|
5
|
-
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-
|
|
6
|
-
import { t as ImagePositionDialog } from "./ImagePositionDialog-
|
|
7
|
-
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-
|
|
8
|
-
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-
|
|
9
|
-
import { t as PageSetupDialog } from "./PageSetupDialog-
|
|
10
|
-
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-
|
|
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-CeGgJz8j.js";
|
|
2
|
+
import { n as FolioUIProvider } from "./folio-ui-DNlnaoih.js";
|
|
3
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-DTK6xana.js";
|
|
4
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-mDtUjPE_.js";
|
|
5
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-BgWQFSlU.js";
|
|
6
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-ZJQNtqFy.js";
|
|
7
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-DChYHwgl.js";
|
|
8
|
+
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-J_pp6t9O.js";
|
|
9
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-CS6fgx2j.js";
|
|
10
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-CrVVT48x.js";
|
|
11
11
|
import { applyFolioAIEditOperations, createFolioAIEditSnapshot, diffWordSegments, hashFolioAIBlockText, normalizeFolioAIBlockText } from "@stll/folio-core/ai-edits";
|
|
12
12
|
import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "@stll/folio-core/prosemirror";
|
|
13
13
|
import { createAICitationDecorationsPlugin, setAICitationsMeta, setActiveCitationMeta } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
14
14
|
import { setAISuggestionsMeta, setFocusedSuggestionMeta } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
|
|
15
|
-
import { anonymizationDecorationsKey, getAnonymizationMatches, setAnonymizationTermsMeta } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
|
|
16
|
-
import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, acceptAutocompleteSuggestion, acceptAutocompleteWord, appendAutocompleteToken, autocompleteSuggestionKey, autocompleteSuggestionPlugin, clearAutocompleteSuggestion, finishAutocompleteSuggestion, getAutocompleteSuggestion, shouldTriggerAutocomplete, startAutocompleteSuggestion } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
|
|
17
15
|
import { getTemplateDirectives, scanDirectives } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
|
|
18
16
|
import { setTemplatePreviewValues } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
19
17
|
import { clearTemplateSlashMenu, consumeTemplateSlashQuery, getTemplateSlashMenu, resetTemplateSlashQuery, templateSlashMenuKey } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
@@ -31,4 +29,4 @@ import { applySuggestions } from "@stll/folio-core/ai-suggestions/apply";
|
|
|
31
29
|
import { isSuggestionStale, resolveSuggestionAnchor } from "@stll/folio-core/ai-suggestions/conflict";
|
|
32
30
|
import { buildPositionalText } from "@stll/folio-core/ai-suggestions/text-positions";
|
|
33
31
|
import { fromMarkdown, toMarkdown, toMarkdownResult } from "@stll/folio-core/markdown";
|
|
34
|
-
export { AutocompleteCaretOverlay, DEFAULT_AI_SUGGESTION_PRESETS,
|
|
32
|
+
export { AutocompleteCaretOverlay, DEFAULT_AI_SUGGESTION_PRESETS, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocxEditor, FindReplaceDialog, FolioUIProvider, FootnotePropertiesDialog, FormattingBar, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, STELLA_STYLE_SET_NAME, SplitCellDialog, TablePropertiesDialog, WatermarkDialog, ZOOM_PRESETS, ZoomControl, applyFolioAIEditOperations, applySuggestions, buildPositionalText, clampZoom, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, formatZoom, fromMarkdown, getDocumentWatermark, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, inspectDocumentStyles, inspectDocumentStylesFromDocx, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, parseZoom, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
2
|
// src/i18n/messages.ts
|
|
3
|
-
var messages_exports = /* @__PURE__ */ __exportAll({});
|
|
3
|
+
var messages_exports = /* @__PURE__ */ __exportAll({}, 2);
|
|
4
4
|
import * as import__stll_folio_core_i18n_messages from "@stll/folio-core/i18n/messages";
|
|
5
5
|
__reExport(messages_exports, import__stll_folio_core_i18n_messages);
|
|
6
6
|
export { messages_exports as t };
|
package/dist/messages.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./messages-
|
|
1
|
+
import "./messages-BmWt6Yeu.js";
|
|
2
2
|
export * from "@stll/folio-core/i18n/messages";
|