@stll/folio-react 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CommentsSidebar-BMD21hiD.js → CommentsSidebar-_utmEkA9.js} +1 -1
- package/dist/{FindReplaceDialog-By2OhOPu.js → FindReplaceDialog-DLdBekSR.js} +4 -2
- package/dist/{FootnotePropertiesDialog-CoPGKND_.js → FootnotePropertiesDialog-CUjq9c6H.js} +4 -2
- package/dist/{ImagePositionDialog-B_md0l56.js → ImagePositionDialog-BMuO9rLT.js} +4 -2
- package/dist/{ImagePropertiesDialog-UcGv8qr3.js → ImagePropertiesDialog-C8iEgdmN.js} +4 -2
- package/dist/{PageSetupDialog-Ba7bs6m3.js → PageSetupDialog-BKsSMCGb.js} +4 -2
- package/dist/{TablePropertiesDialog-Ci6h1tk2.js → TablePropertiesDialog-Dw8gvL78.js} +4 -2
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/dialogs-CzvXYJyG.js +1080 -0
- package/dist/dialogs-j7qyw17x.d.ts +318 -0
- package/dist/dialogs.d.ts +2 -0
- package/dist/dialogs.js +8 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -2
- package/dist/messages.js +1 -26
- package/dist/{renderAsync-C_Jb8BBI.d.ts → renderAsync-B7UJsZye.d.ts} +3 -2
- package/dist/{renderAsync-B4SrVWHb.js → renderAsync-CwHTsxBN.js} +26 -855
- package/dist/rolldown-runtime-BBjsoOtd.js +27 -0
- package/dist/standalone.css +1 -1
- package/dist/useFindReplace-BPBpMWS9.js +842 -0
- package/package.json +5 -1
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
import { Document, EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/folio-core/types/document";
|
|
3
|
+
import { Watermark } from "@stll/folio-core/watermark";
|
|
4
|
+
|
|
5
|
+
//#region src/components/dialogs/findReplaceUtils.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A single match result in the document
|
|
8
|
+
*/
|
|
9
|
+
type FindMatch = {
|
|
10
|
+
/** Index of the paragraph containing the match */paragraphIndex: number; /** Index of the run/content within the paragraph */
|
|
11
|
+
contentIndex: number; /** Character offset within the content */
|
|
12
|
+
startOffset: number; /** Character offset for end of match */
|
|
13
|
+
endOffset: number; /** The matched text */
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Find options for controlling search behavior
|
|
18
|
+
*/
|
|
19
|
+
type FindOptions = {
|
|
20
|
+
/** Whether to match case */matchCase: boolean; /** Whether to match whole words only */
|
|
21
|
+
matchWholeWord: boolean; /** Whether to use regular expressions (future) */
|
|
22
|
+
useRegex?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Find result with all matches
|
|
26
|
+
*/
|
|
27
|
+
type FindResult = {
|
|
28
|
+
/** All matches found */matches: FindMatch[]; /** Total match count */
|
|
29
|
+
totalCount: number; /** Current match index (0-based) */
|
|
30
|
+
currentIndex: number;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/dialogs/FindReplaceDialog.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* Props for the FindReplaceDialog component
|
|
36
|
+
*/
|
|
37
|
+
type FindReplaceDialogProps = {
|
|
38
|
+
/** Whether the dialog is open */isOpen: boolean; /** Callback when dialog is closed */
|
|
39
|
+
onClose: () => void; /** Callback when searching for text */
|
|
40
|
+
onFind: (searchText: string, options: FindOptions) => FindResult | null; /** Callback when navigating to next match */
|
|
41
|
+
onFindNext: () => FindMatch | null; /** Callback when navigating to previous match */
|
|
42
|
+
onFindPrevious: () => FindMatch | null; /** Callback when replacing current match */
|
|
43
|
+
onReplace: (replaceText: string) => boolean; /** Callback when replacing all matches */
|
|
44
|
+
onReplaceAll: (searchText: string, replaceText: string, options: FindOptions) => number; /** Callback to highlight matches in document */
|
|
45
|
+
onHighlightMatches?: (matches: FindMatch[]) => void; /** Callback to clear highlights */
|
|
46
|
+
onClearHighlights?: () => void; /** Initial search text (e.g., from selected text) */
|
|
47
|
+
initialSearchText?: string; /** Whether to start in replace mode */
|
|
48
|
+
replaceMode?: boolean; /** Current match result (from external state) */
|
|
49
|
+
currentResult?: FindResult | null; /** Additional CSS class */
|
|
50
|
+
className?: string; /** Additional inline styles */
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* FindReplaceDialog component - Modal for finding and replacing text
|
|
55
|
+
*/
|
|
56
|
+
declare function FindReplaceDialog({
|
|
57
|
+
isOpen,
|
|
58
|
+
onClose,
|
|
59
|
+
onFind,
|
|
60
|
+
onFindNext,
|
|
61
|
+
onFindPrevious,
|
|
62
|
+
onHighlightMatches,
|
|
63
|
+
onClearHighlights,
|
|
64
|
+
initialSearchText,
|
|
65
|
+
currentResult,
|
|
66
|
+
className,
|
|
67
|
+
style
|
|
68
|
+
}: FindReplaceDialogProps): React.ReactElement | null;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/components/dialogs/FootnotePropertiesDialog.d.ts
|
|
71
|
+
type FootnotePropertiesDialogProps = {
|
|
72
|
+
isOpen: boolean;
|
|
73
|
+
onClose: () => void;
|
|
74
|
+
onApply: (footnoteProps: FootnoteProperties, endnoteProps: EndnoteProperties) => void;
|
|
75
|
+
footnotePr?: FootnoteProperties;
|
|
76
|
+
endnotePr?: EndnoteProperties;
|
|
77
|
+
};
|
|
78
|
+
declare function FootnotePropertiesDialog({
|
|
79
|
+
isOpen,
|
|
80
|
+
onClose,
|
|
81
|
+
onApply,
|
|
82
|
+
footnotePr,
|
|
83
|
+
endnotePr
|
|
84
|
+
}: FootnotePropertiesDialogProps): import("react").JSX.Element;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/dialogs/HyperlinkDialog.d.ts
|
|
87
|
+
type HyperlinkBookmarkOption = {
|
|
88
|
+
name: string;
|
|
89
|
+
label?: string;
|
|
90
|
+
};
|
|
91
|
+
type HyperlinkDialogData = {
|
|
92
|
+
href: string;
|
|
93
|
+
displayText: string;
|
|
94
|
+
tooltip?: string;
|
|
95
|
+
};
|
|
96
|
+
type HyperlinkDialogProps = {
|
|
97
|
+
isOpen: boolean;
|
|
98
|
+
onClose: () => void;
|
|
99
|
+
onSubmit: (data: HyperlinkDialogData) => void;
|
|
100
|
+
onRemove?: () => void;
|
|
101
|
+
currentData?: Partial<HyperlinkDialogData>;
|
|
102
|
+
selectedText?: string;
|
|
103
|
+
bookmarks?: readonly HyperlinkBookmarkOption[];
|
|
104
|
+
};
|
|
105
|
+
declare function HyperlinkDialog({
|
|
106
|
+
isOpen,
|
|
107
|
+
onClose,
|
|
108
|
+
onSubmit,
|
|
109
|
+
onRemove,
|
|
110
|
+
currentData,
|
|
111
|
+
selectedText,
|
|
112
|
+
bookmarks
|
|
113
|
+
}: HyperlinkDialogProps): import("react").JSX.Element;
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/components/dialogs/ImagePositionDialog.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* Image Position Dialog
|
|
118
|
+
*
|
|
119
|
+
* Modal for editing image positioning settings:
|
|
120
|
+
* - Horizontal: alignment or offset, relative to page/column/margin/paragraph
|
|
121
|
+
* - Vertical: alignment or offset, relative to page/margin/paragraph/line
|
|
122
|
+
* - Distance from text (top/bottom/left/right)
|
|
123
|
+
*/
|
|
124
|
+
type ImagePositionData = {
|
|
125
|
+
horizontal?: {
|
|
126
|
+
relativeTo?: string;
|
|
127
|
+
posOffset?: number;
|
|
128
|
+
align?: string;
|
|
129
|
+
};
|
|
130
|
+
vertical?: {
|
|
131
|
+
relativeTo?: string;
|
|
132
|
+
posOffset?: number;
|
|
133
|
+
align?: string;
|
|
134
|
+
};
|
|
135
|
+
distTop?: number;
|
|
136
|
+
distBottom?: number;
|
|
137
|
+
distLeft?: number;
|
|
138
|
+
distRight?: number;
|
|
139
|
+
};
|
|
140
|
+
type ImagePositionDialogProps = {
|
|
141
|
+
isOpen: boolean;
|
|
142
|
+
onClose: () => void;
|
|
143
|
+
onApply: (data: ImagePositionData) => void;
|
|
144
|
+
currentData?: ImagePositionData;
|
|
145
|
+
};
|
|
146
|
+
declare function ImagePositionDialog({
|
|
147
|
+
isOpen,
|
|
148
|
+
onClose,
|
|
149
|
+
onApply,
|
|
150
|
+
currentData
|
|
151
|
+
}: ImagePositionDialogProps): import("react").JSX.Element;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/components/dialogs/ImagePropertiesDialog.d.ts
|
|
154
|
+
/**
|
|
155
|
+
* Image Properties Dialog
|
|
156
|
+
*
|
|
157
|
+
* Modal for editing image properties:
|
|
158
|
+
* - Alt text for accessibility
|
|
159
|
+
* - Border/outline style, color, and width
|
|
160
|
+
*/
|
|
161
|
+
type ImagePropertiesData = {
|
|
162
|
+
alt?: string;
|
|
163
|
+
borderWidth?: number;
|
|
164
|
+
borderColor?: string;
|
|
165
|
+
borderStyle?: string;
|
|
166
|
+
};
|
|
167
|
+
type ImagePropertiesDialogProps = {
|
|
168
|
+
isOpen: boolean;
|
|
169
|
+
onClose: () => void;
|
|
170
|
+
onApply: (data: ImagePropertiesData) => void;
|
|
171
|
+
currentData?: ImagePropertiesData;
|
|
172
|
+
};
|
|
173
|
+
declare function ImagePropertiesDialog({
|
|
174
|
+
isOpen,
|
|
175
|
+
onClose,
|
|
176
|
+
onApply,
|
|
177
|
+
currentData
|
|
178
|
+
}: ImagePropertiesDialogProps): import("react").JSX.Element;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/dialogs/InsertImageDialog.d.ts
|
|
181
|
+
type InsertImageDialogData = {
|
|
182
|
+
file: File;
|
|
183
|
+
alt?: string;
|
|
184
|
+
width?: number;
|
|
185
|
+
height?: number;
|
|
186
|
+
};
|
|
187
|
+
type InsertImageDialogProps = {
|
|
188
|
+
isOpen: boolean;
|
|
189
|
+
onClose: () => void;
|
|
190
|
+
onInsert: (data: InsertImageDialogData) => void;
|
|
191
|
+
accept?: string;
|
|
192
|
+
};
|
|
193
|
+
declare function InsertImageDialog({
|
|
194
|
+
isOpen,
|
|
195
|
+
onClose,
|
|
196
|
+
onInsert,
|
|
197
|
+
accept
|
|
198
|
+
}: InsertImageDialogProps): import("react").JSX.Element;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/components/dialogs/InsertTableDialog.d.ts
|
|
201
|
+
type InsertTableDialogData = {
|
|
202
|
+
rows: number;
|
|
203
|
+
columns: number;
|
|
204
|
+
autofit: boolean;
|
|
205
|
+
styleId?: string;
|
|
206
|
+
};
|
|
207
|
+
type InsertTableStyleOption = {
|
|
208
|
+
id: string;
|
|
209
|
+
name: string;
|
|
210
|
+
};
|
|
211
|
+
type InsertTableDialogProps = {
|
|
212
|
+
isOpen: boolean;
|
|
213
|
+
onClose: () => void;
|
|
214
|
+
onInsert: (data: InsertTableDialogData) => void;
|
|
215
|
+
defaultRows?: number;
|
|
216
|
+
defaultColumns?: number;
|
|
217
|
+
styleOptions?: readonly InsertTableStyleOption[];
|
|
218
|
+
};
|
|
219
|
+
declare function InsertTableDialog({
|
|
220
|
+
isOpen,
|
|
221
|
+
onClose,
|
|
222
|
+
onInsert,
|
|
223
|
+
defaultRows,
|
|
224
|
+
defaultColumns,
|
|
225
|
+
styleOptions
|
|
226
|
+
}: InsertTableDialogProps): import("react").JSX.Element;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/components/dialogs/PageSetupDialog.d.ts
|
|
229
|
+
type PageSetupDialogProps = {
|
|
230
|
+
isOpen: boolean;
|
|
231
|
+
onClose: () => void;
|
|
232
|
+
onApply: (props: Partial<SectionProperties>) => void;
|
|
233
|
+
currentProps?: SectionProperties;
|
|
234
|
+
};
|
|
235
|
+
declare function PageSetupDialog({
|
|
236
|
+
isOpen,
|
|
237
|
+
onClose,
|
|
238
|
+
onApply,
|
|
239
|
+
currentProps
|
|
240
|
+
}: PageSetupDialogProps): import("react").JSX.Element;
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/components/dialogs/PasteSpecialDialog.d.ts
|
|
243
|
+
type PasteSpecialMode = "keepFormatting" | "mergeFormatting" | "plainText";
|
|
244
|
+
type PasteSpecialDialogProps = {
|
|
245
|
+
isOpen: boolean;
|
|
246
|
+
onClose: () => void;
|
|
247
|
+
onPaste: (mode: PasteSpecialMode) => void;
|
|
248
|
+
defaultMode?: PasteSpecialMode;
|
|
249
|
+
};
|
|
250
|
+
declare function PasteSpecialDialog({
|
|
251
|
+
isOpen,
|
|
252
|
+
onClose,
|
|
253
|
+
onPaste,
|
|
254
|
+
defaultMode
|
|
255
|
+
}: PasteSpecialDialogProps): import("react").JSX.Element;
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/components/dialogs/SplitCellDialog.d.ts
|
|
258
|
+
type SplitCellDialogData = {
|
|
259
|
+
rows: number;
|
|
260
|
+
columns: number;
|
|
261
|
+
mergeBeforeSplit: boolean;
|
|
262
|
+
};
|
|
263
|
+
type SplitCellDialogProps = {
|
|
264
|
+
isOpen: boolean;
|
|
265
|
+
onClose: () => void;
|
|
266
|
+
onSplit: (data: SplitCellDialogData) => void;
|
|
267
|
+
defaultRows?: number;
|
|
268
|
+
defaultColumns?: number;
|
|
269
|
+
};
|
|
270
|
+
declare function SplitCellDialog({
|
|
271
|
+
isOpen,
|
|
272
|
+
onClose,
|
|
273
|
+
onSplit,
|
|
274
|
+
defaultRows,
|
|
275
|
+
defaultColumns
|
|
276
|
+
}: SplitCellDialogProps): import("react").JSX.Element;
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/components/dialogs/TablePropertiesDialog.d.ts
|
|
279
|
+
/**
|
|
280
|
+
* Table Properties Dialog — width type, width value, alignment.
|
|
281
|
+
*/
|
|
282
|
+
type TableProperties = {
|
|
283
|
+
width?: number | null;
|
|
284
|
+
widthType?: string | null;
|
|
285
|
+
justification?: "left" | "center" | "right" | null;
|
|
286
|
+
};
|
|
287
|
+
type TablePropertiesDialogProps = {
|
|
288
|
+
isOpen: boolean;
|
|
289
|
+
onClose: () => void;
|
|
290
|
+
onApply: (props: TableProperties) => void;
|
|
291
|
+
currentProps?: {
|
|
292
|
+
width?: number;
|
|
293
|
+
widthType?: string;
|
|
294
|
+
justification?: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
declare function TablePropertiesDialog({
|
|
298
|
+
isOpen,
|
|
299
|
+
onClose,
|
|
300
|
+
onApply,
|
|
301
|
+
currentProps
|
|
302
|
+
}: TablePropertiesDialogProps): import("react").JSX.Element;
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/components/dialogs/WatermarkDialog.d.ts
|
|
305
|
+
type WatermarkDialogProps = {
|
|
306
|
+
isOpen: boolean;
|
|
307
|
+
onClose: () => void;
|
|
308
|
+
onApply: (watermark: Watermark | undefined) => void;
|
|
309
|
+
currentWatermark?: Watermark;
|
|
310
|
+
};
|
|
311
|
+
declare function WatermarkDialog({
|
|
312
|
+
isOpen,
|
|
313
|
+
onClose,
|
|
314
|
+
onApply,
|
|
315
|
+
currentWatermark
|
|
316
|
+
}: WatermarkDialogProps): import("react").JSX.Element;
|
|
317
|
+
//#endregion
|
|
318
|
+
export { HyperlinkDialogProps as A, ImagePropertiesDialogProps as C, HyperlinkBookmarkOption as D, ImagePositionDialogProps as E, FootnotePropertiesDialogProps as M, FindReplaceDialog as N, HyperlinkDialog as O, FindReplaceDialogProps as P, ImagePropertiesDialog as S, ImagePositionDialog as T, InsertTableStyleOption as _, TablePropertiesDialogProps as a, InsertImageDialogProps as b, SplitCellDialogProps as c, PasteSpecialMode as d, PageSetupDialog as f, InsertTableDialogProps as g, InsertTableDialogData as h, TablePropertiesDialog as i, FootnotePropertiesDialog as j, HyperlinkDialogData as k, PasteSpecialDialog as l, InsertTableDialog as m, WatermarkDialogProps as n, SplitCellDialog as o, PageSetupDialogProps as p, TableProperties as r, SplitCellDialogData as s, WatermarkDialog as t, PasteSpecialDialogProps as u, InsertImageDialog as v, ImagePositionData as w, ImagePropertiesData as x, InsertImageDialogData as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as HyperlinkDialogProps, C as ImagePropertiesDialogProps, D as HyperlinkBookmarkOption, E as ImagePositionDialogProps, M as FootnotePropertiesDialogProps, N as FindReplaceDialog, O as HyperlinkDialog, P as FindReplaceDialogProps, S as ImagePropertiesDialog, T as ImagePositionDialog, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialogProps, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as FootnotePropertiesDialog, k as HyperlinkDialogData, 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 InsertImageDialog, w as ImagePositionData, x as ImagePropertiesData, y as InsertImageDialogData } from "./dialogs-j7qyw17x.js";
|
|
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, 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
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-DLdBekSR.js";
|
|
2
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-CUjq9c6H.js";
|
|
3
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-CzvXYJyG.js";
|
|
4
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-BMuO9rLT.js";
|
|
5
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-C8iEgdmN.js";
|
|
6
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-BKsSMCGb.js";
|
|
7
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-Dw8gvL78.js";
|
|
8
|
+
export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as DocxEditorCollaboration, c as ToolbarProps, d as ColorPreset, f as FolioButtonProps, g as FontDefinition, h as OutlineItem, i as renderAsync, l as EditorMode, m as FolioUIProvider, n as EditorHandle, o as DocxEditorProps, p as FolioUIComponents, r as RenderAsyncOptions, s as DocxEditorRef, t as DocxEditorHandle, u as FontOption } from "./renderAsync-
|
|
1
|
+
import { a as DocxEditorCollaboration, c as ToolbarProps, d as ColorPreset, f as FolioButtonProps, g as FontDefinition, h as OutlineItem, i as renderAsync, l as EditorMode, m as FolioUIProvider, n as EditorHandle, o as DocxEditorProps, p as FolioUIComponents, r as RenderAsyncOptions, s as DocxEditorRef, t as DocxEditorHandle, u as FontOption } from "./renderAsync-B7UJsZye.js";
|
|
2
|
+
import { A as HyperlinkDialogProps, C as ImagePropertiesDialogProps, D as HyperlinkBookmarkOption, E as ImagePositionDialogProps, M as FootnotePropertiesDialogProps, N as FindReplaceDialog, O as HyperlinkDialog, P as FindReplaceDialogProps, S as ImagePropertiesDialog, T as ImagePositionDialog, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialogProps, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as FootnotePropertiesDialog, k as HyperlinkDialogData, 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 InsertImageDialog, w as ImagePositionData, x as ImagePropertiesData, y as InsertImageDialogData } from "./dialogs-j7qyw17x.js";
|
|
2
3
|
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
3
4
|
import { CreateEmptyDocumentOptions, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
|
4
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";
|
|
@@ -8,6 +9,7 @@ import { AnonymizationMatch, AnonymizationTerm, anonymizationDecorationsKey, get
|
|
|
8
9
|
import { TemplateSlashMenuKeyAction, TemplateSlashMenuState, clearTemplateSlashMenu, consumeTemplateSlashQuery, getTemplateSlashMenu, resetTemplateSlashQuery, templateSlashMenuKey } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
9
10
|
import { Document } from "@stll/folio-core/types/document";
|
|
10
11
|
import { ScrollToParaIdOptions } from "@stll/folio-core/paged-layout/paragraphFlash";
|
|
12
|
+
import { PictureWatermark, TextWatermark, Watermark, getDocumentWatermark, setDocumentWatermark } from "@stll/folio-core/watermark";
|
|
11
13
|
import { createDocx } from "@stll/folio-core/docx/rezip";
|
|
12
14
|
import { DeriveBlockIdInput, FolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "@stll/folio-core/types/block-id";
|
|
13
15
|
import { AIBarStatus, AIChatMode, AICitation, AICitationSource, AIGenerateInput, AISuggestion, AISuggestionApplyMode, AISuggestionPreset, AISuggestionSeverity, AISuggestionStatus, DEFAULT_AI_SUGGESTION_PRESETS } from "@stll/folio-core/ai-suggestions/types";
|
|
@@ -160,4 +162,4 @@ declare const AutocompleteCaretOverlay: ({
|
|
|
160
162
|
isStreaming
|
|
161
163
|
}: AutocompleteCaretOverlayProps) => React.JSX.Element | null;
|
|
162
164
|
//#endregion
|
|
163
|
-
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 ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocxCompatibility, DocxEditor, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, type EditorHandle, type EditorMode, 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 FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FormattingBar, type FormattingBarProps, type ImageMeta, type ImageRef, type MarkdownOptions, type MarkdownResult, type OutlineItem, type PositionalText, type RenderAsyncOptions, type ResolvedAnchor, type ScrollToParaIdOptions, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, type UseWheelZoomOptions, type UseWheelZoomReturn, 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, deriveBlockId, diffWordSegments, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, parseZoom, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
|
|
165
|
+
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 ColorPreset, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocxCompatibility, DocxEditor, type DocxEditorCollaboration, type DocxEditorHandle, type DocxEditorProps, type DocxEditorRef, type EditorHandle, type EditorMode, 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 FolioUIComponents, FolioUIProvider, type FontDefinition, type FontOption, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, FormattingBar, type FormattingBarProps, 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, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, type MarkdownOptions, type MarkdownResult, type OutlineItem, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, type PictureWatermark, type PositionalText, type RenderAsyncOptions, type ResolvedAnchor, type ScrollToParaIdOptions, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, 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, deriveBlockId, diffWordSegments, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getDocumentWatermark, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, parseZoom, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { a as formatZoom, c as FormattingBar,
|
|
1
|
+
import { a as formatZoom, c as FormattingBar, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync, u as AutocompleteCaretOverlay } from "./renderAsync-CwHTsxBN.js";
|
|
2
|
+
import { a as FolioUIProvider } from "./useFindReplace-BPBpMWS9.js";
|
|
3
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-DLdBekSR.js";
|
|
4
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-CUjq9c6H.js";
|
|
5
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-CzvXYJyG.js";
|
|
6
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-BMuO9rLT.js";
|
|
7
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-C8iEgdmN.js";
|
|
8
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-BKsSMCGb.js";
|
|
9
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-Dw8gvL78.js";
|
|
2
10
|
import { applyFolioAIEditOperations, createFolioAIEditSnapshot, diffWordSegments, hashFolioAIBlockText, normalizeFolioAIBlockText } from "@stll/folio-core/ai-edits";
|
|
3
11
|
import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "@stll/folio-core/prosemirror";
|
|
4
12
|
import { createAICitationDecorationsPlugin, setAICitationsMeta, setActiveCitationMeta } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
@@ -10,6 +18,7 @@ import { setTemplatePreviewValues } from "@stll/folio-core/prosemirror/plugins/t
|
|
|
10
18
|
import { clearTemplateSlashMenu, consumeTemplateSlashQuery, getTemplateSlashMenu, resetTemplateSlashQuery, templateSlashMenuKey } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
11
19
|
import { scrollFolioPositionIntoView } from "@stll/folio-core/paged-layout/scrollToPmPosition";
|
|
12
20
|
import { deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "@stll/folio-core/types/block-id";
|
|
21
|
+
import { getDocumentWatermark, setDocumentWatermark } from "@stll/folio-core/watermark";
|
|
13
22
|
import { createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
|
14
23
|
import { createDocx } from "@stll/folio-core/docx/rezip";
|
|
15
24
|
import { DEFAULT_AI_SUGGESTION_PRESETS } from "@stll/folio-core/ai-suggestions/types";
|
|
@@ -18,4 +27,4 @@ import { isSuggestionStale, resolveSuggestionAnchor } from "@stll/folio-core/ai-
|
|
|
18
27
|
import { buildPositionalText } from "@stll/folio-core/ai-suggestions/text-positions";
|
|
19
28
|
import { getFolioCaretViewportRect, getFolioSelectionViewportRect } from "@stll/folio-core/paged-layout/selectionViewportRect";
|
|
20
29
|
import { fromMarkdown, toMarkdown, toMarkdownResult } from "@stll/folio-core/markdown";
|
|
21
|
-
export { AutocompleteCaretOverlay, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DocxEditor, FolioUIProvider, FormattingBar, ZOOM_PRESETS, ZoomControl, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applySuggestions, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildPositionalText, clampZoom, clearAutocompleteSuggestion, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, deriveBlockId, diffWordSegments, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, parseZoom, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
|
|
30
|
+
export { AutocompleteCaretOverlay, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DocxEditor, FindReplaceDialog, FolioUIProvider, FootnotePropertiesDialog, FormattingBar, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog, ZOOM_PRESETS, ZoomControl, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applySuggestions, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildPositionalText, clampZoom, clearAutocompleteSuggestion, clearTemplateSlashMenu, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, deriveBlockId, diffWordSegments, finishAutocompleteSuggestion, formatZoom, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getDocumentWatermark, getFolioCaretViewportRect, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView, isFolioBlockId, isSequentialFolioBlockId, isSuggestionStale, normalizeFolioAIBlockText, parseZoom, renderAsync, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setDocumentWatermark, setFocusedSuggestionMeta, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult, useWheelZoom };
|
package/dist/messages.js
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
|
|
1
2
|
export * from "@stll/folio-core/i18n/messages";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __exportAll = (all, no_symbols) => {
|
|
8
|
-
let target = {};
|
|
9
|
-
for (var name in all) __defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: true
|
|
12
|
-
});
|
|
13
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __copyProps = (to, from, except, desc) => {
|
|
17
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
-
key = keys[i];
|
|
19
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
-
get: ((k) => from[k]).bind(null, key),
|
|
21
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
3
|
//#region src/i18n/messages.ts
|
|
29
4
|
var messages_exports = /* @__PURE__ */ __exportAll({});
|
|
30
5
|
import * as import__stll_folio_core_i18n_messages from "@stll/folio-core/i18n/messages";
|
|
@@ -11,7 +11,7 @@ import { TripwireResult } from "@stll/folio-core/docx/selectiveSaveTripwire";
|
|
|
11
11
|
import { SelectionState } from "@stll/folio-core/prosemirror";
|
|
12
12
|
import { AnonymizationMatch } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
|
|
13
13
|
import { TemplateSlashMenuKeyAction, TemplateSlashMenuState } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
14
|
-
import { ColorValue, Document, ParagraphAlignment, SdtProperties, Style, Theme } from "@stll/folio-core/types/document";
|
|
14
|
+
import { ColorValue, Document, ParagraphAlignment, SdtProperties, SectionProperties, Style, Theme } from "@stll/folio-core/types/document";
|
|
15
15
|
import { Comment } from "@stll/folio-core/types/content";
|
|
16
16
|
import { DocxInput } from "@stll/folio-core/utils/docxInput";
|
|
17
17
|
import { ScrollToParaIdOptions } from "@stll/folio-core/paged-layout/paragraphFlash";
|
|
@@ -500,7 +500,8 @@ type ToolbarProps = {
|
|
|
500
500
|
//#endregion
|
|
501
501
|
//#region src/components/DocxEditor.props.d.ts
|
|
502
502
|
type DocxEditorProps = {
|
|
503
|
-
/** Document data — ArrayBuffer, Uint8Array, Blob, or File */documentBuffer?: DocxInput | null; /**
|
|
503
|
+
/** Document data — ArrayBuffer, Uint8Array, Blob, or File */documentBuffer?: DocxInput | null; /** Password for Agile-encrypted .docx files (Office 2010+). */
|
|
504
|
+
password?: string | undefined; /** Pre-parsed document (alternative to documentBuffer) */
|
|
504
505
|
document?: Document | null;
|
|
505
506
|
/**
|
|
506
507
|
* Stable identity of the loaded document (same across internal edits, distinct
|