@stll/folio-react 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-
|
|
2
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-POQXlmNh.js";
|
|
2
|
+
import { ForwardRefExoticComponent, JSX, ReactNode, RefAttributes } from "react";
|
|
3
3
|
import { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
|
4
4
|
//#region src/compat/eigenpal.d.ts
|
|
5
5
|
export declare const VERSION = "folio-compat-eigenpal";
|
|
@@ -71,11 +71,11 @@ export declare const zhCN: {
|
|
|
71
71
|
_lang: string;
|
|
72
72
|
};
|
|
73
73
|
export declare const locales: Record<LocaleCode, LegacyTranslations>;
|
|
74
|
-
export declare const LocaleProvider: ({ children, i18n, locale }: LocaleProviderProps) =>
|
|
74
|
+
export declare const LocaleProvider: ({ children, i18n, locale }: LocaleProviderProps) => JSX.Element;
|
|
75
75
|
export declare const useTranslation: () => {
|
|
76
76
|
t: TFunction;
|
|
77
77
|
};
|
|
78
|
-
export declare const DocxEditor:
|
|
78
|
+
export declare const DocxEditor: ForwardRefExoticComponent<DocxEditorProps & {
|
|
79
79
|
agentPanel?: unknown;
|
|
80
80
|
colorMode?: "light" | "dark" | "system";
|
|
81
81
|
commentsSidebarOpen?: boolean;
|
|
@@ -104,6 +104,6 @@ export declare const DocxEditor: import("react").ForwardRefExoticComponent<DocxE
|
|
|
104
104
|
showHelpMenu?: boolean;
|
|
105
105
|
showOutlineButton?: boolean;
|
|
106
106
|
watermarkPresets?: readonly string[];
|
|
107
|
-
} &
|
|
107
|
+
} & RefAttributes<DocxEditorRef>>;
|
|
108
108
|
//#endregion
|
|
109
109
|
export { type CreateEmptyDocumentOptions, type DocxEditorHandle, type DocxEditorRef, type EditorHandle, type RenderAsyncOptions, createDocumentWithText, createEmptyDocument, renderAsync };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
1
|
+
import React, { CSSProperties, JSX } from "react";
|
|
2
2
|
import { EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/folio-core/types/document";
|
|
3
3
|
import { FindMatch as FindMatch$1, FindOptions as FindOptions$1, FindResult as FindResult$1, ReplaceAllSummary } from "@stll/folio-core/utils/findReplace";
|
|
4
4
|
import { TablePropertiesCommand } from "@stll/folio-core/utils/tableOperations";
|
|
@@ -56,7 +56,7 @@ type FootnotePropertiesDialogProps = {
|
|
|
56
56
|
footnotePr?: FootnoteProperties;
|
|
57
57
|
endnotePr?: EndnoteProperties;
|
|
58
58
|
};
|
|
59
|
-
declare function FootnotePropertiesDialog({ isOpen, onClose, onApply, footnotePr, endnotePr }: FootnotePropertiesDialogProps):
|
|
59
|
+
declare function FootnotePropertiesDialog({ isOpen, onClose, onApply, footnotePr, endnotePr }: FootnotePropertiesDialogProps): JSX.Element;
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/components/dialogs/HyperlinkDialog.d.ts
|
|
62
62
|
type HyperlinkBookmarkOption = {
|
|
@@ -77,17 +77,9 @@ type HyperlinkDialogProps = {
|
|
|
77
77
|
selectedText?: string;
|
|
78
78
|
bookmarks?: readonly HyperlinkBookmarkOption[];
|
|
79
79
|
};
|
|
80
|
-
declare function HyperlinkDialog(props: HyperlinkDialogProps):
|
|
80
|
+
declare function HyperlinkDialog(props: HyperlinkDialogProps): JSX.Element | null;
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/components/dialogs/ImagePositionDialog.d.ts
|
|
83
|
-
/**
|
|
84
|
-
* Image Position Dialog
|
|
85
|
-
*
|
|
86
|
-
* Modal for editing image positioning settings:
|
|
87
|
-
* - Horizontal: alignment or offset, relative to page/column/margin/paragraph
|
|
88
|
-
* - Vertical: alignment or offset, relative to page/margin/paragraph/line
|
|
89
|
-
* - Distance from text (top/bottom/left/right)
|
|
90
|
-
*/
|
|
91
83
|
type ImagePositionData = {
|
|
92
84
|
horizontal?: {
|
|
93
85
|
relativeTo?: string;
|
|
@@ -110,16 +102,9 @@ type ImagePositionDialogProps = {
|
|
|
110
102
|
onApply: (data: ImagePositionData) => void;
|
|
111
103
|
currentData?: ImagePositionData;
|
|
112
104
|
};
|
|
113
|
-
declare function ImagePositionDialog(props: ImagePositionDialogProps):
|
|
105
|
+
declare function ImagePositionDialog(props: ImagePositionDialogProps): JSX.Element | null;
|
|
114
106
|
//#endregion
|
|
115
107
|
//#region src/components/dialogs/ImagePropertiesDialog.d.ts
|
|
116
|
-
/**
|
|
117
|
-
* Image Properties Dialog
|
|
118
|
-
*
|
|
119
|
-
* Modal for editing image properties:
|
|
120
|
-
* - Alt text for accessibility
|
|
121
|
-
* - Border/outline style, color, and width
|
|
122
|
-
*/
|
|
123
108
|
type ImagePropertiesData = {
|
|
124
109
|
alt?: string;
|
|
125
110
|
borderWidth?: number;
|
|
@@ -132,7 +117,7 @@ type ImagePropertiesDialogProps = {
|
|
|
132
117
|
onApply: (data: ImagePropertiesData) => void;
|
|
133
118
|
currentData?: ImagePropertiesData;
|
|
134
119
|
};
|
|
135
|
-
declare function ImagePropertiesDialog(props: ImagePropertiesDialogProps):
|
|
120
|
+
declare function ImagePropertiesDialog(props: ImagePropertiesDialogProps): JSX.Element | null;
|
|
136
121
|
//#endregion
|
|
137
122
|
//#region src/components/dialogs/InsertImageDialog.d.ts
|
|
138
123
|
type InsertImageDialogData = {
|
|
@@ -147,7 +132,7 @@ type InsertImageDialogProps = {
|
|
|
147
132
|
onInsert: (data: InsertImageDialogData) => void;
|
|
148
133
|
accept?: string;
|
|
149
134
|
};
|
|
150
|
-
declare function InsertImageDialog(props: InsertImageDialogProps):
|
|
135
|
+
declare function InsertImageDialog(props: InsertImageDialogProps): JSX.Element | null;
|
|
151
136
|
//#endregion
|
|
152
137
|
//#region src/components/dialogs/InsertSymbolDialog.d.ts
|
|
153
138
|
type InsertSymbolDialogProps = {
|
|
@@ -155,7 +140,7 @@ type InsertSymbolDialogProps = {
|
|
|
155
140
|
onClose: () => void;
|
|
156
141
|
onInsert: (symbol: string) => void;
|
|
157
142
|
};
|
|
158
|
-
declare function InsertSymbolDialog({ isOpen, onClose, onInsert }: InsertSymbolDialogProps):
|
|
143
|
+
declare function InsertSymbolDialog({ isOpen, onClose, onInsert }: InsertSymbolDialogProps): JSX.Element;
|
|
159
144
|
//#endregion
|
|
160
145
|
//#region src/components/dialogs/InsertTableDialog.d.ts
|
|
161
146
|
type InsertTableDialogData = {
|
|
@@ -176,7 +161,7 @@ type InsertTableDialogProps = {
|
|
|
176
161
|
defaultColumns?: number;
|
|
177
162
|
styleOptions?: readonly InsertTableStyleOption[];
|
|
178
163
|
};
|
|
179
|
-
declare function InsertTableDialog(props: InsertTableDialogProps):
|
|
164
|
+
declare function InsertTableDialog(props: InsertTableDialogProps): JSX.Element | null;
|
|
180
165
|
//#endregion
|
|
181
166
|
//#region src/components/dialogs/PageSetupDialog.d.ts
|
|
182
167
|
type PageSetupDialogProps = {
|
|
@@ -185,7 +170,7 @@ type PageSetupDialogProps = {
|
|
|
185
170
|
onApply: (props: Partial<SectionProperties>) => void;
|
|
186
171
|
currentProps?: SectionProperties;
|
|
187
172
|
};
|
|
188
|
-
declare function PageSetupDialog(props: PageSetupDialogProps):
|
|
173
|
+
declare function PageSetupDialog(props: PageSetupDialogProps): JSX.Element | null;
|
|
189
174
|
//#endregion
|
|
190
175
|
//#region src/components/dialogs/PasteSpecialDialog.d.ts
|
|
191
176
|
type PasteSpecialMode = "keepFormatting" | "mergeFormatting" | "plainText";
|
|
@@ -195,7 +180,7 @@ type PasteSpecialDialogProps = {
|
|
|
195
180
|
onPaste: (mode: PasteSpecialMode) => void;
|
|
196
181
|
defaultMode?: PasteSpecialMode;
|
|
197
182
|
};
|
|
198
|
-
declare function PasteSpecialDialog(props: PasteSpecialDialogProps):
|
|
183
|
+
declare function PasteSpecialDialog(props: PasteSpecialDialogProps): JSX.Element | null;
|
|
199
184
|
//#endregion
|
|
200
185
|
//#region src/components/dialogs/SplitCellDialog.d.ts
|
|
201
186
|
type SplitCellDialogData = {
|
|
@@ -210,7 +195,7 @@ type SplitCellDialogProps = {
|
|
|
210
195
|
defaultRows?: number;
|
|
211
196
|
defaultColumns?: number;
|
|
212
197
|
};
|
|
213
|
-
declare function SplitCellDialog(props: SplitCellDialogProps):
|
|
198
|
+
declare function SplitCellDialog(props: SplitCellDialogProps): JSX.Element | null;
|
|
214
199
|
//#endregion
|
|
215
200
|
//#region src/components/dialogs/TablePropertiesDialog.d.ts
|
|
216
201
|
type TableProperties = TablePropertiesCommand;
|
|
@@ -220,7 +205,7 @@ type TablePropertiesDialogProps = {
|
|
|
220
205
|
onApply: (props: TableProperties) => void;
|
|
221
206
|
currentProps?: TableProperties;
|
|
222
207
|
};
|
|
223
|
-
declare function TablePropertiesDialog(props: TablePropertiesDialogProps):
|
|
208
|
+
declare function TablePropertiesDialog(props: TablePropertiesDialogProps): JSX.Element | null;
|
|
224
209
|
//#endregion
|
|
225
210
|
//#region src/components/dialogs/WatermarkDialog.d.ts
|
|
226
211
|
type WatermarkDialogProps = {
|
|
@@ -229,6 +214,6 @@ type WatermarkDialogProps = {
|
|
|
229
214
|
onApply: (watermark: Watermark | undefined) => void;
|
|
230
215
|
currentWatermark?: Watermark;
|
|
231
216
|
};
|
|
232
|
-
declare function WatermarkDialog(props: WatermarkDialogProps):
|
|
217
|
+
declare function WatermarkDialog(props: WatermarkDialogProps): JSX.Element | null;
|
|
233
218
|
//#endregion
|
|
234
219
|
export { HyperlinkDialog as A, ImagePropertiesData as C, ImagePositionDialog as D, ImagePositionData as E, FindReplaceDialog as F, FindReplaceDialogProps as I, HyperlinkDialogProps as M, FootnotePropertiesDialog as N, ImagePositionDialogProps as O, FootnotePropertiesDialogProps as P, InsertImageDialogProps as S, ImagePropertiesDialogProps as T, InsertTableStyleOption as _, TablePropertiesDialogProps as a, InsertImageDialog as b, SplitCellDialogProps as c, PasteSpecialMode as d, PageSetupDialog as f, InsertTableDialogProps as g, InsertTableDialogData as h, TablePropertiesDialog as i, HyperlinkDialogData as j, HyperlinkBookmarkOption 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, InsertSymbolDialog as v, ImagePropertiesDialog as w, InsertImageDialogData as x, InsertSymbolDialogProps as y };
|
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-DGa8PuE4.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/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as FolioUIProvider, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as ToolbarProps, f as FontOption, g as FolioUIComponents, h as FolioButtonProps, i as renderAsync, l as HighlightPassageOptions, m as ColorPreset, n as EditorHandle, o as DocxEditorCollaboration, p as EditorMode, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageResult, v as OutlineItem, y as FontDefinition } from "./renderAsync-
|
|
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-
|
|
3
|
-
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
1
|
+
import { _ as FolioUIProvider, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as ToolbarProps, f as FontOption, g as FolioUIComponents, h as FolioButtonProps, i as renderAsync, l as HighlightPassageOptions, m as ColorPreset, n as EditorHandle, o as DocxEditorCollaboration, p as EditorMode, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as HighlightPassageResult, v as OutlineItem, y as FontDefinition } from "./renderAsync-POQXlmNh.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-DGa8PuE4.js";
|
|
3
|
+
import React, { CSSProperties, ForwardRefExoticComponent, JSX, ReactNode, RefAttributes, 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 { DocxCompatibility } from "@stll/folio-core/docx/compatibility";
|
|
@@ -38,7 +38,7 @@ import { ImageMeta, ImageRef, MarkdownOptions, MarkdownResult, fromMarkdown, toM
|
|
|
38
38
|
/**
|
|
39
39
|
* DocxEditor - Complete DOCX editor component
|
|
40
40
|
*/
|
|
41
|
-
export declare const DocxEditor:
|
|
41
|
+
export declare const DocxEditor: ForwardRefExoticComponent<DocxEditorProps & RefAttributes<DocxEditorRef>>;
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/components/FormattingBar.d.ts
|
|
44
44
|
type FormattingBarProps = {
|
|
@@ -58,15 +58,6 @@ type FormattingBarProps = {
|
|
|
58
58
|
export declare function FormattingBar(props: FormattingBarProps): React.JSX.Element;
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/components/ui/ZoomControl.d.ts
|
|
61
|
-
/**
|
|
62
|
-
* Zoom Control
|
|
63
|
-
*
|
|
64
|
-
* A compact dropdown for choosing the editor's document zoom level. Renders the
|
|
65
|
-
* injectable folio Select primitive (so a consumer's design-system Select can
|
|
66
|
-
* override it), mirroring FontSizePicker. Opt-in: folio chrome renders this only
|
|
67
|
-
* when both a zoom value and an onChange handler are supplied (see
|
|
68
|
-
* FormattingBar).
|
|
69
|
-
*/
|
|
70
61
|
type ZoomLevel = {
|
|
71
62
|
value: number;
|
|
72
63
|
label: string;
|
|
@@ -83,7 +74,7 @@ type ZoomControlProps = {
|
|
|
83
74
|
/** Render the trigger at the smaller toolbar-chrome size. */
|
|
84
75
|
compact?: boolean;
|
|
85
76
|
};
|
|
86
|
-
export declare function ZoomControl({ value, onChange, levels, disabled, className, compact }: ZoomControlProps):
|
|
77
|
+
export declare function ZoomControl({ value, onChange, levels, disabled, className, compact }: ZoomControlProps): JSX.Element;
|
|
87
78
|
//#endregion
|
|
88
79
|
//#region src/hooks/useWheelZoom.d.ts
|
|
89
80
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React$1, { CSSProperties, ComponentProps, ComponentType, ReactNode, RefAttributes, RefObject } from "react";
|
|
1
|
+
import React$1, { CSSProperties, ComponentProps, ComponentType, ForwardRefExoticComponent, JSX, ReactNode, RefAttributes, RefObject } from "react";
|
|
2
2
|
import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
4
|
import { XmlFragment } from "yjs";
|
|
@@ -38,19 +38,8 @@ import { Select } from "@base-ui/react/select";
|
|
|
38
38
|
import "@stll/folio-core/managers/DocumentLoaderManager";
|
|
39
39
|
import "@stll/folio-core/managers/HistoryManager";
|
|
40
40
|
import { TableAction } from "@stll/folio-core/utils/tableOperations";
|
|
41
|
+
import "react/jsx-runtime";
|
|
41
42
|
//#region src/paged-editor/hostFonts.d.ts
|
|
42
|
-
/**
|
|
43
|
-
* Host-app custom fonts — the `fonts` prop on `DocxEditor`.
|
|
44
|
-
*
|
|
45
|
-
* The host passes its own brand/web font faces; they register with the browser
|
|
46
|
-
* through the same best-effort `FontFace` path as embedded document fonts
|
|
47
|
-
* ({@link registerFontFace}), so a bad entry is skipped rather than throwing.
|
|
48
|
-
* Once registered, the family name is available for rendering and can be listed
|
|
49
|
-
* in the font-family picker via the `fontFamilies` prop.
|
|
50
|
-
*
|
|
51
|
-
* The prop normalizer ({@link toFontFaceInputs}) is pure (no DOM), so it is
|
|
52
|
-
* unit-tested directly; the DOM registration is visual-only.
|
|
53
|
-
*/
|
|
54
43
|
/**
|
|
55
44
|
* Declarative description of one custom font face the host registers with the
|
|
56
45
|
* editor. Multiple entries can share `family` to register distinct weights.
|
|
@@ -412,13 +401,9 @@ type FolioUIComponents = {
|
|
|
412
401
|
declare function FolioUIProvider({ components, children }: {
|
|
413
402
|
components?: Partial<FolioUIComponents> | undefined;
|
|
414
403
|
children: ReactNode;
|
|
415
|
-
}):
|
|
404
|
+
}): JSX.Element;
|
|
416
405
|
//#endregion
|
|
417
406
|
//#region src/components/ui/FontPicker.d.ts
|
|
418
|
-
/**
|
|
419
|
-
* Font Picker — uses Stella's Select component.
|
|
420
|
-
* Each item rendered in its own font for preview.
|
|
421
|
-
*/
|
|
422
407
|
type FontOption = {
|
|
423
408
|
name: string;
|
|
424
409
|
fontFamily: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/folio-react",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "React editor for folio: a Word-document (.docx) editor for the browser, built on @stll/folio-core and ProseMirror.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-editor",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"@fontsource/noto-sans-arabic": "^5.2.7",
|
|
85
85
|
"@fontsource/source-sans-3": "^5.3.1",
|
|
86
86
|
"@fontsource/tinos": "^5.2.7",
|
|
87
|
-
"@stll/folio-core": "^0.63.
|
|
88
|
-
"@stll/utf8-boundaries": "0.1.
|
|
87
|
+
"@stll/folio-core": "^0.63.1",
|
|
88
|
+
"@stll/utf8-boundaries": "0.1.2",
|
|
89
89
|
"@types/react": "^19.3.0",
|
|
90
90
|
"@types/react-dom": "^19.3.0",
|
|
91
91
|
"better-result": "3.0.1",
|