@stll/folio-react 0.28.0 → 0.30.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 CHANGED
@@ -45,6 +45,38 @@ export function Editor({ docx }: { docx: ArrayBuffer }) {
45
45
  The editor renders to the DOM; under SSR, load it from a client-only/dynamic
46
46
  import.
47
47
 
48
+ ## Read-only review views
49
+
50
+ ```tsx
51
+ <DocxEditor
52
+ documentBuffer={docx}
53
+ readOnly
54
+ reviewDisplayMode="final"
55
+ showCommentHighlights={false}
56
+ />
57
+ ```
58
+
59
+ `reviewDisplayMode` accepts `all-markup` (the default), `final` (all pending
60
+ changes accepted for display), or `original` (all pending changes rejected for
61
+ display). It controls the displayed text, formatting, numbering, table rows,
62
+ pagination and search. The controlled prop updates the view without reparsing.
63
+ Omit it to let the editor's review selector control the view.
64
+
65
+ Projected views (`final`, `original`, and Simple Markup in the review selector)
66
+ are read-only: typing and replacement are refused. Switch to `all-markup` to
67
+ edit. `ref.current.getReadOnlyReason()` returns `review-display-mode`,
68
+ `host-read-only`, `viewing-mode`, or `null` when editing is allowed.
69
+ `onReadonlyEditAttempt(reason)` receives the exported `EditorReadOnlyReason`
70
+ when a user attempts an edit.
71
+
72
+ `showCommentHighlights` defaults to `true` and independently hides comment
73
+ highlights in `all-markup`. Highlights are always hidden in `final` and
74
+ `original`. Neither prop changes the document, revisions or comments: saving
75
+ or exporting DOCX preserves the same authored document in every view. The
76
+ Vue `DocxEditor` exposes the same props. `ReviewDisplayMode` is exported by
77
+ both adapters and folio-core; core's `reviewDisplayModeToDisplayMode` selects
78
+ the existing `markupView` layout configuration (`final` uses `no-markup`).
79
+
48
80
  ## Exports
49
81
 
50
82
  | Import | What it is |
@@ -75,3 +107,5 @@ original license and copyright are preserved in [`NOTICE.md`](./NOTICE.md).
75
107
  ## License
76
108
 
77
109
  [Apache-2.0](./LICENSE)
110
+
111
+ See [document search](../../docs/document-search.md) for highlighting, navigation, and result callbacks.
@@ -1,10 +1,12 @@
1
- import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-Bh7xudNL.js";
1
+ import { f as containedHandler, u as useDrawerFocus } from "./renderAsync-D6N8PUZ_.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
6
  import { closestHtmlElement, queryHtmlElement } from "@stll/folio-core/utils/domGuards";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { sliceText } from "@stll/folio-core/utils/sliceText";
9
+ import { getFindParagraphText } from "@stll/folio-core/utils/findReplace";
8
10
  import { PANEL_METRICS } from "@stll/folio-core/panel-layout";
9
11
  import { commentAnchorSelector } from "@stll/folio-core/render-dom/commentAnchorAttributes";
10
12
  //#region src/components/CommentsSidebar.tsx
@@ -18,11 +20,11 @@ import { commentAnchorSelector } from "@stll/folio-core/render-dom/commentAnchor
18
20
  * Tracked changes are rendered purely inline (Word-style) and do not appear
19
21
  * in this sidebar.
20
22
  */
21
- /** Extract plain text from a Comment's paragraph content */
22
- function getCommentText(paragraphs) {
23
- if (!paragraphs?.length) return "";
24
- return paragraphs.flatMap((p) => p.content.filter((c) => c.type === "run").flatMap((r) => "content" in r ? r.content : []).filter((c) => c.type === "text").map((t) => "text" in t ? t.text : "")).join("");
25
- }
23
+ const renderCommentText = (comment) => comment.content.map((paragraph, index) => /* @__PURE__ */ jsx("span", {
24
+ "data-find-comment-id": comment.id,
25
+ "data-find-comment-paragraph": index,
26
+ children: getFindParagraphText(paragraph)
27
+ }, index));
26
28
  function formatDate(dateStr, locale) {
27
29
  if (!dateStr) return "";
28
30
  const d = new Date(dateStr);
@@ -35,7 +37,15 @@ function formatDate(dateStr, locale) {
35
37
  }).format(d);
36
38
  }
37
39
  function getInitials(name) {
38
- return name.split(/\s+/u).map((w) => w[0]).join("").toUpperCase().slice(0, 2);
40
+ return sliceText({
41
+ text: name.split(/\s+/u).map((word) => sliceText({
42
+ text: word,
43
+ units: "graphemes",
44
+ end: 1
45
+ })).join("").toUpperCase(),
46
+ units: "graphemes",
47
+ end: 2
48
+ });
39
49
  }
40
50
  function getCommentParentId(comment) {
41
51
  return comment.parentId;
@@ -99,13 +109,13 @@ const CANCEL_BUTTON_STYLE = {
99
109
  fontWeight: 500,
100
110
  fontFamily: "inherit"
101
111
  };
102
- const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onCommentReply, onCommentResolve, onCommentDelete, onAddComment, onCancelAddComment, onAcceptChange: _onAcceptChange, onRejectChange: _onRejectChange, onTrackedChangeReply: _onTrackedChangeReply, topOffset = 0, showResolved = false, isAddingComment = false, addCommentYPosition = null, pageWidth = 816, editorContainerRef, anchorPositions, surface = "column", onDismiss }) => {
112
+ 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, editorContainerRef, anchorPositions, surface = "column", onDismiss }) => {
103
113
  const t = useTranslations("folio");
104
114
  const locale = useLocale();
105
115
  const [replyingTo, setReplyingTo] = useState(null);
106
116
  const [replyText, setReplyText] = useState("");
107
117
  const [newCommentText, setNewCommentText] = useState("");
108
- const [expandedCard, setExpandedCard] = useState(activeCommentId === null ? null : `comment-${activeCommentId}`);
118
+ const expandedCard = activeCommentId === null ? null : `comment-${activeCommentId}`;
109
119
  const [menuOpenFor, setMenuOpenFor] = useState(null);
110
120
  const [{ positions: cardPositions, knownCards }, setCardGeometry] = useState(() => ({
111
121
  positions: /* @__PURE__ */ new Map(),
@@ -295,12 +305,11 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
295
305
  if (pagesEl_0.contains(target)) {
296
306
  const commentEl = closestHtmlElement(target, "[data-comment-id]");
297
307
  if (commentEl?.dataset["commentId"]) {
298
- setExpandedCard(`comment-${commentEl.dataset["commentId"]}`);
299
- onCommentClick?.(Number(commentEl.dataset["commentId"]));
308
+ onCommentClick(Number(commentEl.dataset["commentId"]));
300
309
  return;
301
310
  }
302
311
  }
303
- setExpandedCard(null);
312
+ onCommentClick(null);
304
313
  setMenuOpenFor(null);
305
314
  };
306
315
  container_0.addEventListener("click", handleDocClick);
@@ -378,17 +387,11 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
378
387
  if (onAddComment?.(newCommentText.trim()) !== false) setNewCommentText("");
379
388
  }
380
389
  };
381
- const [previousActiveCommentId, setPreviousActiveCommentId] = useState(activeCommentId);
382
- if (previousActiveCommentId !== activeCommentId) {
383
- setPreviousActiveCommentId(activeCommentId);
384
- if (activeCommentId !== null) setExpandedCard(`comment-${activeCommentId}`);
385
- }
386
390
  const handleCardClick = (cardId_1, commentId_0) => {
387
391
  const nextExpandedCard = expandedCard === cardId_1 ? null : cardId_1;
388
- setExpandedCard(nextExpandedCard);
389
392
  setMenuOpenFor(null);
390
- if (commentId_0 !== void 0) onCommentClick?.(nextExpandedCard === null && activeCommentId === commentId_0 ? null : commentId_0);
391
- if (isDrawer && commentId_0 !== void 0 && nextExpandedCard !== null) revealAnchor(cardId_1);
393
+ onCommentClick(nextExpandedCard === null ? null : commentId_0);
394
+ if (isDrawer && nextExpandedCard !== null) revealAnchor(cardId_1);
392
395
  };
393
396
  const revealAnchor = (cardId_2) => {
394
397
  const scrollEl_1 = editorContainerRef?.current;
@@ -511,7 +514,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
511
514
  WebkitBoxOrient: "vertical"
512
515
  } : {}
513
516
  },
514
- children: getCommentText(reply.content)
517
+ children: renderCommentText(reply)
515
518
  })]
516
519
  }, reply.id)), !isExpanded_0 && replies.length > 1 && /* @__PURE__ */ jsx("div", {
517
520
  style: {
@@ -756,7 +759,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
756
759
  lineHeight: "17px",
757
760
  marginTop: 5
758
761
  },
759
- children: getCommentText(comment_0.content)
762
+ children: renderCommentText(comment_0)
760
763
  }),
761
764
  renderReplies(replies_0, isExpanded_1),
762
765
  isExpanded_1 && !comment_0.done && renderReplySection(comment_0.id, onCommentReply)
@@ -787,6 +790,7 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId = null, onC
787
790
  },
788
791
  onMouseDown: containedHandler((e_20) => e_20.stopPropagation()),
789
792
  children: /* @__PURE__ */ jsxs("div", {
793
+ "data-folio-scroll": isDrawer ? "" : void 0,
790
794
  style: isDrawer ? {
791
795
  position: "sticky",
792
796
  top: 0,
@@ -1,11 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.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";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { replaceEligibility } from "@stll/folio-core/utils/findReplace";
8
9
  import "@stll/folio-core/managers/FindReplaceManager";
10
+ import { createFindQueryKey } from "@stll/folio-core/utils/findSearchKey";
9
11
  //#region src/components/dialogs/findReplaceDialogLayout.ts
10
12
  const FIND_REPLACE_DIALOG_TOP = "var(--folio-find-replace-top, 7rem)";
11
13
  const FIND_REPLACE_DIALOG_LEFT = "var(--folio-find-replace-left, 5.5rem)";
@@ -78,11 +80,6 @@ function FindReplaceDialog(props) {
78
80
  } else t2 = $[7];
79
81
  return t2;
80
82
  }
81
- const getFindQueryKey = (text, { matchCase, matchWholeWord }) => JSON.stringify([
82
- text,
83
- matchCase,
84
- matchWholeWord
85
- ]);
86
83
  const getQueryResult = (state, queryKey) => {
87
84
  switch (state.status) {
88
85
  case "cleared": return null;
@@ -90,12 +87,16 @@ const getQueryResult = (state, queryKey) => {
90
87
  default: return state;
91
88
  }
92
89
  };
93
- function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrevious, onHighlightMatches, onClearHighlights, initialSearchText = "", currentResult, className, style, matchCase, matchWholeWord, onMatchCaseChange, onMatchWholeWordChange }) {
90
+ function FindReplaceDialogForm({ isOpen, onClose, onFind, onQueryChange, onFindNext, onFindPrevious, onReplace, onReplaceAll, replaceMode = false, readOnly = false, onHighlightMatches, onClearHighlights, initialSearchText = "", currentSearch, className, style, matchCase, matchWholeWord, onMatchCaseChange, onMatchWholeWordChange }) {
94
91
  const id = React.useId();
95
92
  const t = useTranslations("folio");
96
93
  const { Button, Input, Checkbox } = useFolioUI();
97
94
  const [searchText, setSearchText] = useState(initialSearchText);
98
- const queryKey = getFindQueryKey(searchText, {
95
+ const [replaceText, setReplaceText] = useState("");
96
+ const [replacementSummary, setReplacementSummary] = useState(null);
97
+ const currentResult = currentSearch === null ? null : currentSearch?.result;
98
+ const currentQueryKey = currentSearch?.queryKey;
99
+ const queryKey = createFindQueryKey(searchText, {
99
100
  matchCase,
100
101
  matchWholeWord
101
102
  });
@@ -103,13 +104,24 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
103
104
  const [previousCurrentResult, setPreviousCurrentResult] = useState(currentResult);
104
105
  if (currentResult !== previousCurrentResult) {
105
106
  setPreviousCurrentResult(currentResult);
106
- if (findResult.status === "ready" && findResult.queryKey === queryKey && currentResult !== void 0) setFindResult(currentResult ? {
107
+ if (findResult.status === "ready" && findResult.queryKey === queryKey && currentQueryKey === queryKey && currentResult !== void 0) setFindResult(currentResult ? {
107
108
  status: "ready",
108
109
  queryKey,
109
110
  result: currentResult
110
111
  } : { status: "cleared" });
111
112
  }
112
- const result = getQueryResult(findResult, queryKey);
113
+ const result = currentResult !== void 0 && currentQueryKey !== queryKey ? null : getQueryResult(findResult, queryKey);
114
+ useLayoutEffect(() => {
115
+ onQueryChange?.(searchText, {
116
+ matchCase,
117
+ matchWholeWord
118
+ });
119
+ }, [
120
+ onQueryChange,
121
+ searchText,
122
+ matchCase,
123
+ matchWholeWord
124
+ ]);
113
125
  const searchInputRef = useRef(null);
114
126
  useEffect(() => {
115
127
  const timeout = setTimeout(() => {
@@ -130,7 +142,7 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
130
142
  const searchResult = onFind(text, options);
131
143
  setFindResult(searchResult ? {
132
144
  status: "ready",
133
- queryKey: getFindQueryKey(text, options),
145
+ queryKey: createFindQueryKey(text, options),
134
146
  result: searchResult
135
147
  } : { status: "cleared" });
136
148
  if (searchResult?.matches && onHighlightMatches) onHighlightMatches(searchResult.matches);
@@ -166,17 +178,44 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
166
178
  matchWholeWord
167
179
  ]);
168
180
  const handleMatchCaseChange = useCallback((value) => {
181
+ setReplacementSummary(null);
169
182
  setFindResult({ status: "cleared" });
183
+ onQueryChange?.(searchText, {
184
+ matchCase: value,
185
+ matchWholeWord
186
+ });
170
187
  onMatchCaseChange(value);
171
- }, [onMatchCaseChange, setFindResult]);
188
+ }, [
189
+ onMatchCaseChange,
190
+ onQueryChange,
191
+ searchText,
192
+ matchWholeWord,
193
+ setFindResult
194
+ ]);
172
195
  const handleMatchWholeWordChange = useCallback((value_0) => {
196
+ setReplacementSummary(null);
173
197
  setFindResult({ status: "cleared" });
198
+ onQueryChange?.(searchText, {
199
+ matchCase,
200
+ matchWholeWord: value_0
201
+ });
174
202
  onMatchWholeWordChange(value_0);
175
- }, [onMatchWholeWordChange, setFindResult]);
203
+ }, [
204
+ onMatchWholeWordChange,
205
+ onQueryChange,
206
+ searchText,
207
+ matchCase,
208
+ setFindResult
209
+ ]);
176
210
  const handleSearchChange = useCallback((e) => {
177
211
  const text_0 = e.target.value;
212
+ setReplacementSummary(null);
178
213
  setSearchText(text_0);
179
214
  setFindResult({ status: "cleared" });
215
+ onQueryChange?.(text_0, {
216
+ matchCase,
217
+ matchWholeWord
218
+ });
180
219
  if (!text_0.trim()) {
181
220
  onFind(text_0, {
182
221
  matchCase,
@@ -186,6 +225,7 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
186
225
  }
187
226
  }, [
188
227
  onFind,
228
+ onQueryChange,
189
229
  matchCase,
190
230
  matchWholeWord,
191
231
  onClearHighlights,
@@ -283,12 +323,41 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
283
323
  const handleOverlayClick = useCallback((e_1) => {
284
324
  if (e_1.target === e_1.currentTarget) {}
285
325
  }, []);
326
+ const handleReplacementChange = useCallback((event) => {
327
+ setReplaceText(event.target.value);
328
+ setReplacementSummary(null);
329
+ }, []);
330
+ const handleReplaceCurrent = useCallback(() => {
331
+ setReplacementSummary(null);
332
+ if (onReplace(replaceText)) performSearch();
333
+ }, [
334
+ onReplace,
335
+ replaceText,
336
+ performSearch
337
+ ]);
338
+ const handleReplaceAll = useCallback(() => {
339
+ const summary = onReplaceAll(searchText, replaceText, {
340
+ matchCase,
341
+ matchWholeWord
342
+ });
343
+ performSearch();
344
+ setReplacementSummary(summary);
345
+ }, [
346
+ onReplaceAll,
347
+ searchText,
348
+ replaceText,
349
+ matchCase,
350
+ matchWholeWord,
351
+ performSearch
352
+ ]);
286
353
  const handleDialogKeyDown = useCallback((e_2) => {
287
354
  if (e_2.key === "Escape") onClose();
288
355
  }, [onClose]);
289
356
  if (!isOpen) return null;
290
357
  const hasMatches = result && result.totalCount > 0;
291
358
  const noMatches = result && result.totalCount === 0 && searchText.trim();
359
+ const currentMatch = result?.matches.at(result.currentIndex);
360
+ const canReplaceCurrent = !readOnly && currentMatch !== void 0 && replaceEligibility(currentMatch).status === "allowed";
292
361
  const overlayStyle = getFindReplaceOverlayStyle(style);
293
362
  const titleId = `${id}-find-replace-dialog-title`;
294
363
  const findTextId = `${id}-find-text`;
@@ -380,6 +449,39 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onFindNext, onFindPrev
380
449
  className: "text-destructive ms-20 text-xs",
381
450
  children: t("findReplace.noResults")
382
451
  }),
452
+ replaceMode && /* @__PURE__ */ jsxs("div", {
453
+ className: "ms-20 flex flex-col gap-2",
454
+ children: [
455
+ /* @__PURE__ */ jsx(Input, {
456
+ value: replaceText,
457
+ onChange: handleReplacementChange,
458
+ "aria-label": t("findReplace.replaceText"),
459
+ placeholder: t("findReplace.replacePlaceholder"),
460
+ disabled: readOnly
461
+ }),
462
+ /* @__PURE__ */ jsxs("div", {
463
+ className: "flex gap-2",
464
+ children: [/* @__PURE__ */ jsx(Button, {
465
+ disabled: !canReplaceCurrent,
466
+ onClick: handleReplaceCurrent,
467
+ children: t("findReplace.replaceCurrent")
468
+ }), /* @__PURE__ */ jsx(Button, {
469
+ disabled: readOnly || !hasMatches,
470
+ onClick: handleReplaceAll,
471
+ children: t("findReplace.replaceAll")
472
+ })]
473
+ }),
474
+ replacementSummary && /* @__PURE__ */ jsx("div", {
475
+ role: "status",
476
+ "aria-live": "polite",
477
+ className: "text-muted-foreground text-xs",
478
+ children: t("findReplace.replaceAllSummary", {
479
+ replacedCount: String(replacementSummary.replacedCount),
480
+ skippedCount: String(replacementSummary.skippedCount)
481
+ })
482
+ })
483
+ ]
484
+ }),
383
485
  /* @__PURE__ */ jsxs("div", {
384
486
  className: "ms-20 flex flex-wrap items-center gap-x-4 gap-y-2",
385
487
  children: [/* @__PURE__ */ jsxs("label", {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
3
  import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
3
  import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
3
  import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.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-BoGYPgeu.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
3
  import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.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-rCHqCEG6.js";
1
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.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-BoGYPgeu.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { useId, useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
2
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
3
  import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.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-BVAgBXCL.js";
1
+ import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-EOS7mrGK.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
@@ -1,4 +1,4 @@
1
- import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-Bh7xudNL.js";
1
+ import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-D6N8PUZ_.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";
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from "react";
2
2
  import { EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/folio-core/types/document";
3
+ import { FindMatch as FindMatch$1, FindOptions as FindOptions$1, FindResult as FindResult$1, ReplaceAllSummary } from "@stll/folio-core/utils/findReplace";
3
4
  import { TablePropertiesCommand } from "@stll/folio-core/utils/tableOperations";
4
- import { FindMatch, FindOptions, FindResult } from "@stll/folio-core/utils/findReplace";
5
5
  import { Watermark } from "@stll/folio-core/watermark";
6
6
  //#region src/components/dialogs/FindReplaceDialog.d.ts
7
7
  /**
@@ -13,25 +13,31 @@ type FindReplaceDialogProps = {
13
13
  /** Callback when dialog is closed */
14
14
  onClose: () => void;
15
15
  /** Callback when searching for text */
16
- onFind: (searchText: string, options: FindOptions) => FindResult | null;
16
+ onFind: (searchText: string, options: FindOptions$1) => FindResult$1 | null;
17
+ /** Publish edits immediately, before the delayed search. */
18
+ onQueryChange?: (searchText: string, options: FindOptions$1) => void;
17
19
  /** Callback when navigating to next match */
18
- onFindNext: () => FindMatch | null;
20
+ onFindNext: () => FindMatch$1 | null;
19
21
  /** Callback when navigating to previous match */
20
- onFindPrevious: () => FindMatch | null;
22
+ onFindPrevious: () => FindMatch$1 | null;
21
23
  /** Callback when replacing current match */
22
24
  onReplace: (replaceText: string) => boolean;
23
25
  /** Callback when replacing all matches */
24
- onReplaceAll: (searchText: string, replaceText: string, options: FindOptions) => number;
26
+ onReplaceAll: (searchText: string, replaceText: string, options: FindOptions$1) => ReplaceAllSummary;
27
+ readOnly?: boolean;
25
28
  /** Callback to highlight matches in document */
26
- onHighlightMatches?: (matches: FindMatch[]) => void;
29
+ onHighlightMatches?: (matches: FindMatch$1[]) => void;
27
30
  /** Callback to clear highlights */
28
31
  onClearHighlights?: () => void;
29
32
  /** Initial search text (e.g., from selected text) */
30
33
  initialSearchText?: string;
31
34
  /** Whether to start in replace mode */
32
35
  replaceMode?: boolean;
33
- /** Current match result (from external state) */
34
- currentResult?: FindResult | null;
36
+ /** External result paired with the query that produced it. */
37
+ currentSearch?: {
38
+ queryKey: string;
39
+ result: FindResult$1;
40
+ } | null;
35
41
  /** Additional CSS class */
36
42
  className?: string;
37
43
  /** Additional inline styles */
@@ -1,4 +1,4 @@
1
- import { r as useFolioUI } from "./folio-ui-rCHqCEG6.js";
1
+ import { r as useFolioUI } from "./folio-ui-ruRywxeb.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-BoGYPgeu.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { useId, useState } from "react";
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-BENP66Ly.js";
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-CMAVdDEV.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-LlVMe3EW.js";
2
- import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-D73t3LNP.js";
3
- import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-De-oslzU.js";
4
- import { t as ImagePositionDialog } from "./ImagePositionDialog-Cwt6R8iM.js";
5
- import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-GNZLBFLB.js";
6
- import { t as InsertSymbolDialog } from "./InsertSymbolDialog-CeEhkEvc.js";
7
- import { t as PageSetupDialog } from "./PageSetupDialog-DD6IEZAo.js";
8
- import { t as TablePropertiesDialog } from "./TablePropertiesDialog-Vu0HXQz6.js";
1
+ import { t as FindReplaceDialog } from "./FindReplaceDialog-C3njN6OI.js";
2
+ import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-BEs7N62_.js";
3
+ import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-DGrcp10A.js";
4
+ import { t as ImagePositionDialog } from "./ImagePositionDialog-Oap9knQ-.js";
5
+ import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-lLMKHv0u.js";
6
+ import { t as InsertSymbolDialog } from "./InsertSymbolDialog-Drm40-9j.js";
7
+ import { t as PageSetupDialog } from "./PageSetupDialog-DTWCdPkX.js";
8
+ import { t as TablePropertiesDialog } from "./TablePropertiesDialog-uSTmyEcu.js";
9
9
  export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
@@ -4,6 +4,7 @@ import { useTranslations } from "use-intl";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Checkbox } from "@base-ui/react/checkbox";
6
6
  import { Popover } from "@base-ui/react/popover";
7
+ import { sliceText } from "@stll/folio-core/utils/sliceText";
7
8
  import { Dialog } from "@base-ui/react/dialog";
8
9
  import { Input } from "@base-ui/react/input";
9
10
  import { Menu } from "@base-ui/react/menu";
@@ -210,7 +211,11 @@ function ColorSwatch(t0) {
210
211
  const toISODate = (value) => {
211
212
  if (value === null) return "";
212
213
  if (value instanceof Date) return `${value.getFullYear().toString().padStart(4, "0")}-${(value.getMonth() + 1).toString().padStart(2, "0")}-${value.getDate().toString().padStart(2, "0")}`;
213
- return value.length >= 10 ? value.slice(0, 10) : value;
214
+ return value.length >= 10 ? sliceText({
215
+ text: value,
216
+ units: "codeUnits",
217
+ end: 10
218
+ }) : value;
214
219
  };
215
220
  function DefaultDatePickerPopover({ value, onChange, defaultOpen = false }) {
216
221
  return /* @__PURE__ */ jsx("input", {
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
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-BVAgBXCL.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-BENP66Ly.js";
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-EOS7mrGK.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-CMAVdDEV.js";
3
3
  import React, { CSSProperties, ReactNode, RefObject } from "react";
4
4
  import { CreateEmptyDocumentOptions, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
5
5
  import { FolioAIBlock, FolioAIBlockAnchor, FolioAIBlockKind, FolioAIBlockPreviewRun, FolioAIComment, FolioAIEditAppliedOperation, FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditReviewMeta, FolioAIEditSeverity, FolioAIEditSkipReason, FolioAIEditSkippedOperation, FolioAIEditSnapshot, FolioAISignatureParty, WordDiffSegment, applyFolioAIEditOperations, createFolioAIEditSnapshot, diffWordSegments, hashFolioAIBlockText, normalizeFolioAIBlockText } from "@stll/folio-core/ai-edits";
6
6
  import { KeyboardShortcutScope, KeyboardShortcutScope as KeyboardShortcutScope$1 } from "@stll/folio-core/managers/editorShortcuts";
7
+ import { EditorReadOnlyReason } from "@stll/folio-core/managers/EditorModeManager";
8
+ import { ReviewDisplayMode } from "@stll/folio-core/managers/reviewDisplayMode";
7
9
  import { DocxCompatibility } from "@stll/folio-core/docx/compatibility";
8
10
  import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "@stll/folio-core/prosemirror";
9
11
  import { FolioSuggestion, SuggestionAppliedAs, SuggestionKind } from "@stll/folio-core/prosemirror/commands/comments";
@@ -13,6 +15,7 @@ import { Document } from "@stll/folio-core/types/document";
13
15
  import { ScrollToParaIdOptions } from "@stll/folio-core/paged-layout/paragraphFlash";
14
16
  import { BlockRect } from "@stll/folio-core/paged-layout/blockGeometry";
15
17
  import { OutlineDepth } from "@stll/folio-core/utils/outlineDepth";
18
+ import { FindMatch, FindOptions, FindResult, ReplaceAllSummary, ReplaceEligibility } from "@stll/folio-core/utils/findReplace";
16
19
  import { PictureWatermark, TextWatermark, Watermark, getDocumentWatermark, setDocumentWatermark } from "@stll/folio-core/watermark";
17
20
  import { DocumentStyleCatalog, DocumentStyleCatalogEntry, ExtractDocumentStyleSetOptions, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "@stll/folio-core/style-sets/extract";
18
21
  import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "@stll/folio-core/style-sets/stellaStyle";
@@ -201,4 +204,4 @@ type AutocompleteCaretOverlayProps = {
201
204
  };
202
205
  declare const AutocompleteCaretOverlay: ({ caret, text, isStreaming }: AutocompleteCaretOverlayProps) => React.JSX.Element | null;
203
206
  //#endregion
204
- export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyResult, AutocompleteCaretOverlay, type AutocompleteCaretOverlayProps, type AutocompleteCaretRect, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, type ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, 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, DocxEditor, type DocxEditorApplyDocumentOperationsOptions, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, type EditorHandle, type EditorMode, type ExtractDocumentStyleSetOptions, FindReplaceDialog, type FindReplaceDialogProps, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyResult, type FolioAIEditOperation, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAISignatureParty, type FolioBlockId, type FolioButtonProps, type FolioSuggestion, type FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, FormattingBar, 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 ResolvedAnchor, 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, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, type ZoomLevel, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applySuggestions, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildPositionalText, clampZoom, clearAutocompleteSuggestion, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, 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, setAnonymizationTermsMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
207
+ export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyResult, AutocompleteCaretOverlay, type AutocompleteCaretOverlayProps, type AutocompleteCaretRect, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, type ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, 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, DocxEditor, type DocxEditorApplyDocumentOperationsOptions, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, 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 FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAISignatureParty, type FolioBlockId, type FolioButtonProps, type FolioSuggestion, type FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, FormattingBar, 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, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, type ZoomLevel, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applySuggestions, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildPositionalText, clampZoom, clearAutocompleteSuggestion, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, 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, setAnonymizationTermsMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };