@zeke-02/docx-editor 0.5.2 → 0.5.4
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/LICENSE +204 -0
- package/dist/FindReplaceDialog-7SQOVQWH.js +1 -0
- package/dist/FindReplaceDialog-RK3A7MSK.mjs +1 -0
- package/dist/{FootnotePropertiesDialog-XQ7NIFIU.js → FootnotePropertiesDialog-2Q2SHVMR.js} +1 -1
- package/dist/{FootnotePropertiesDialog-TNVJJCY6.mjs → FootnotePropertiesDialog-ZKQXW3YO.mjs} +1 -1
- package/dist/{HyperlinkDialog-FR4IZZ7E.mjs → HyperlinkDialog-QV3CVFQU.mjs} +1 -1
- package/dist/HyperlinkDialog-XVAF7FVN.js +1 -0
- package/dist/{ImagePositionDialog-JSZSIKF5.mjs → ImagePositionDialog-EGRH3HPP.mjs} +1 -1
- package/dist/{ImagePositionDialog-2YXRAGZS.js → ImagePositionDialog-HIVHUTBT.js} +1 -1
- package/dist/ImagePropertiesDialog-67WLFIIZ.mjs +1 -0
- package/dist/ImagePropertiesDialog-HSM3JJ22.js +1 -0
- package/dist/KeyboardShortcutsDialog-B0UFuR4w.d.ts +395 -0
- package/dist/KeyboardShortcutsDialog-t6JKL4Aj.d.mts +395 -0
- package/dist/PageSetupDialog-642IAVG2.js +1 -0
- package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -0
- package/dist/PluginHost-HS31VIuo.d.mts +16 -0
- package/dist/PluginHost-zILZO7zX.d.ts +16 -0
- package/dist/{SplitCellDialog-NP3JJYHD.mjs → SplitCellDialog-GFWCFCTD.mjs} +1 -1
- package/dist/{SplitCellDialog-JIAC3RYV.js → SplitCellDialog-M7WF7ANE.js} +1 -1
- package/dist/{TablePropertiesDialog-TIK4AA5M.mjs → TablePropertiesDialog-TZ7VCL6V.mjs} +1 -1
- package/dist/{TablePropertiesDialog-T7D4HSVP.js → TablePropertiesDialog-ZKU2FTUX.js} +1 -1
- package/dist/agentApi-B2Y7kexW.d.ts +486 -0
- package/dist/agentApi-BzUJ_kao.d.mts +486 -0
- package/dist/chunk-2XXILKEQ.js +1 -0
- package/dist/chunk-35DG3R42.js +2 -0
- package/dist/chunk-5UX5CD4C.js +1 -0
- package/dist/chunk-7QQSDIWK.mjs +2 -0
- package/dist/chunk-AW5TISUL.js +3 -0
- package/dist/chunk-B45ECEGY.js +18 -0
- package/dist/chunk-B7CCL7SL.mjs +2 -0
- package/dist/chunk-BRMTZRLJ.js +2 -0
- package/dist/chunk-D47GTKGU.js +2 -0
- package/dist/chunk-F5SERL7X.mjs +2 -0
- package/dist/chunk-FWPVBFKQ.mjs +1 -0
- package/dist/chunk-GGQK26JO.js +2 -0
- package/dist/chunk-GM2S2WMT.mjs +1 -0
- package/dist/chunk-HXDMASAR.js +1 -0
- package/dist/chunk-ILYKDR3C.js +1 -0
- package/dist/chunk-JFRDFK7V.mjs +260 -0
- package/dist/chunk-JPF5R2ZM.mjs +1 -0
- package/dist/chunk-KOXCF3CL.mjs +1 -0
- package/dist/chunk-KRLNX56Y.mjs +2 -0
- package/dist/chunk-LWOHVYKW.mjs +1 -0
- package/dist/chunk-MDTA25AN.mjs +60 -0
- package/dist/chunk-MKNSJOCN.js +70 -0
- package/dist/chunk-NIBCC7WQ.js +1 -0
- package/dist/chunk-NLFXR2VH.js +2 -0
- package/dist/chunk-NOLMVQNN.mjs +40 -0
- package/dist/chunk-ONIYA2FU.mjs +2 -0
- package/dist/chunk-RCIZ7OM3.mjs +70 -0
- package/dist/chunk-SGTUE33R.js +260 -0
- package/dist/{chunk-EHFEG3TX.js → chunk-SNZ57XBI.js} +1 -1
- package/dist/chunk-SOTWG3KJ.mjs +1 -0
- package/dist/chunk-TYPGB4KF.js +1 -0
- package/dist/chunk-U7ZW2DOO.mjs +2 -0
- package/dist/chunk-WO3FIV4B.js +40 -0
- package/dist/{chunk-PKEOQIQO.mjs → chunk-WPI3YRFO.mjs} +1 -1
- package/dist/chunk-XGJ2EORY.mjs +1 -0
- package/dist/chunk-XQZTWWRF.mjs +18 -0
- package/dist/chunk-Y3SEHWZ2.js +1 -0
- package/dist/chunk-YBEVHQCT.js +60 -0
- package/dist/chunk-ZVAFVHWR.mjs +3 -0
- package/dist/chunk-ZXPCJWVY.js +2 -0
- package/dist/{agentApi-DLt94vXk.d.mts → content-REFGFfEH.d.mts} +8 -755
- package/dist/{agentApi-DLt94vXk.d.ts → content-REFGFfEH.d.ts} +8 -755
- package/dist/dialogs.d.mts +25 -0
- package/dist/dialogs.d.ts +25 -0
- package/dist/dialogs.js +1 -0
- package/dist/dialogs.mjs +1 -0
- package/dist/document-Cu2vq_wS.d.mts +294 -0
- package/dist/document-CxOagoLQ.d.ts +294 -0
- package/dist/executor-WBHID2RK.mjs +1 -0
- package/dist/executor-Y5VUOAHY.js +1 -0
- package/dist/findReplace-Bue0JaXh.d.ts +138 -0
- package/dist/findReplace-shXbOjFQ.d.mts +138 -0
- package/dist/fork.d.mts +535 -0
- package/dist/fork.d.ts +535 -0
- package/dist/fork.js +1 -0
- package/dist/fork.mjs +1 -0
- package/dist/hooks.d.mts +598 -0
- package/dist/hooks.d.ts +598 -0
- package/dist/hooks.js +1 -0
- package/dist/hooks.mjs +1 -0
- package/dist/index-B5A-J9GC.d.ts +1119 -0
- package/dist/index-bw-PaozF.d.mts +1119 -0
- package/dist/index.d.mts +12 -591
- package/dist/index.d.ts +12 -591
- package/dist/index.js +1 -120
- package/dist/index.mjs +1 -120
- package/dist/layout-bridge-5GYGYKM5.mjs +1 -0
- package/dist/layout-bridge-QQDA7ELH.js +1 -0
- package/dist/plugin-api.d.mts +165 -0
- package/dist/plugin-api.d.ts +165 -0
- package/dist/plugin-api.js +1 -0
- package/dist/plugin-api.mjs +1 -0
- package/dist/processTemplate-BTBTR7AM.js +1 -0
- package/dist/{processTemplate-W2C5PXZB.mjs → processTemplate-MBX2KDLE.mjs} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.d.mts +18 -0
- package/dist/styles.d.ts +18 -0
- package/dist/styles.js +1 -0
- package/dist/styles.mjs +1 -0
- package/dist/types-BF48VxkC.d.mts +18 -0
- package/dist/types-BF48VxkC.d.ts +18 -0
- package/dist/types-BnIs4sE7.d.mts +281 -0
- package/dist/types-BnIs4sE7.d.ts +281 -0
- package/dist/types-CW6HFAX6.d.ts +39 -0
- package/dist/types-DIsDCwTG.d.mts +39 -0
- package/dist/ui.d.mts +111 -552
- package/dist/ui.d.ts +111 -552
- package/dist/ui.js +111 -1
- package/dist/ui.mjs +111 -1
- package/dist/useFindReplace-DKy-s3gS.d.ts +261 -0
- package/dist/useFindReplace-vuoKpDKE.d.mts +261 -0
- package/package.json +47 -49
- package/dist/ClipboardManager-CVKX0v9q.d.ts +0 -464
- package/dist/ClipboardManager-V3aaMnWE.d.mts +0 -464
- package/dist/DocumentAgent-BWflKHpH.d.mts +0 -442
- package/dist/DocumentAgent-DsdXtetF.d.ts +0 -442
- package/dist/FindReplaceDialog-L3YF5HIS.mjs +0 -1
- package/dist/FindReplaceDialog-SEBWC5P7.js +0 -1
- package/dist/HyperlinkDialog-WEK6JSAC.js +0 -1
- package/dist/ImagePropertiesDialog-527MFLQO.mjs +0 -1
- package/dist/ImagePropertiesDialog-HG4K3IE7.js +0 -1
- package/dist/PageSetupDialog-GALVJMUB.js +0 -1
- package/dist/PageSetupDialog-TGQIAMI7.mjs +0 -1
- package/dist/TableToolbar-DUgmob2I.d.ts +0 -1273
- package/dist/TableToolbar-YL74HNS1.d.mts +0 -1273
- package/dist/chunk-23SXXIZS.js +0 -111
- package/dist/chunk-3F52AP2Q.js +0 -1
- package/dist/chunk-42O5GXM5.mjs +0 -82
- package/dist/chunk-54ULJEHM.mjs +0 -1
- package/dist/chunk-5XK326FI.mjs +0 -1
- package/dist/chunk-6WPRCJ5A.mjs +0 -1
- package/dist/chunk-76IYR7C7.mjs +0 -1
- package/dist/chunk-AGRIVA4G.js +0 -1
- package/dist/chunk-BTCQ2QI3.mjs +0 -3
- package/dist/chunk-BUEMG4NW.js +0 -1
- package/dist/chunk-BXRC4U3X.mjs +0 -2
- package/dist/chunk-CPAYKE6X.mjs +0 -1
- package/dist/chunk-DACWLFKI.mjs +0 -1
- package/dist/chunk-EPBFWE36.js +0 -2
- package/dist/chunk-FXES3YDB.js +0 -82
- package/dist/chunk-HI66BSGS.mjs +0 -9
- package/dist/chunk-INTPVEO6.mjs +0 -9
- package/dist/chunk-IOAGVW6Q.mjs +0 -2
- package/dist/chunk-JCEWC5QL.mjs +0 -4
- package/dist/chunk-JTIUFACT.js +0 -1
- package/dist/chunk-LUF7PWIC.js +0 -10
- package/dist/chunk-MGEN6GOE.mjs +0 -2
- package/dist/chunk-MOE2ZGUE.js +0 -18
- package/dist/chunk-MWLHJWB6.js +0 -9
- package/dist/chunk-OFYVDN3U.mjs +0 -2
- package/dist/chunk-P4VSHBGZ.js +0 -2
- package/dist/chunk-P5FQHIES.mjs +0 -1
- package/dist/chunk-PBC7XAYZ.js +0 -3
- package/dist/chunk-PEMB6SZT.js +0 -2
- package/dist/chunk-PQMSZTBB.js +0 -9
- package/dist/chunk-Q7UDQXAF.js +0 -1
- package/dist/chunk-QGTAIC5E.js +0 -1
- package/dist/chunk-QVPR2W5S.js +0 -1
- package/dist/chunk-R3QMYPL5.mjs +0 -59
- package/dist/chunk-RBUTXXQJ.mjs +0 -18
- package/dist/chunk-RRWYZ2TS.mjs +0 -111
- package/dist/chunk-S3STEPVO.js +0 -182
- package/dist/chunk-SFUM35DH.js +0 -2
- package/dist/chunk-SNLC6EK2.js +0 -1
- package/dist/chunk-TMTLIGLZ.js +0 -59
- package/dist/chunk-TSE2PWFX.mjs +0 -10
- package/dist/chunk-UKESXQS5.mjs +0 -182
- package/dist/chunk-UWYD42WV.js +0 -4
- package/dist/chunk-UXVACQCY.mjs +0 -1
- package/dist/chunk-W4EIKDM6.mjs +0 -2
- package/dist/chunk-W53SI3XW.mjs +0 -1
- package/dist/chunk-WNS2RBQD.js +0 -2
- package/dist/chunk-Z3KMSHUP.js +0 -1
- package/dist/core-plugins-reexport.d.mts +0 -31
- package/dist/core-plugins-reexport.d.ts +0 -31
- package/dist/core-plugins-reexport.js +0 -1
- package/dist/core-plugins-reexport.mjs +0 -1
- package/dist/core-reexport.d.mts +0 -340
- package/dist/core-reexport.d.ts +0 -340
- package/dist/core-reexport.js +0 -1
- package/dist/core-reexport.mjs +0 -1
- package/dist/documentSerializer-DtS_-oGA.d.mts +0 -664
- package/dist/documentSerializer-Wj1p2ASa.d.ts +0 -664
- package/dist/executor-C3VXF7QA.mjs +0 -1
- package/dist/executor-GDBV3AGV.js +0 -1
- package/dist/headless-reexport.d.mts +0 -197
- package/dist/headless-reexport.d.ts +0 -197
- package/dist/headless-reexport.js +0 -1
- package/dist/headless-reexport.mjs +0 -1
- package/dist/insertOperations-BTH1Asas.d.mts +0 -176
- package/dist/insertOperations-CbUnXAXH.d.ts +0 -176
- package/dist/layout-bridge-EA4DJ227.js +0 -1
- package/dist/layout-bridge-XDPSO6GO.mjs +0 -1
- package/dist/mcp-reexport.d.mts +0 -156
- package/dist/mcp-reexport.d.ts +0 -156
- package/dist/mcp-reexport.js +0 -16
- package/dist/mcp-reexport.mjs +0 -16
- package/dist/processTemplate-MJ2PCSO5.js +0 -1
- package/dist/react-B0W16SV6.d.ts +0 -1330
- package/dist/react-D0Pn1nww.d.mts +0 -1330
- package/dist/react.d.mts +0 -10
- package/dist/react.d.ts +0 -10
- package/dist/react.js +0 -1
- package/dist/react.mjs +0 -1
- package/dist/registry-CH9V-IX0.d.ts +0 -165
- package/dist/registry-CWBKYlNW.d.mts +0 -165
- package/dist/types-UDsUq8D3.d.mts +0 -310
- package/dist/types-jbivc9Lj.d.ts +0 -310
- package/dist/variableDetector-CdQ7ZTzA.d.mts +0 -204
- package/dist/variableDetector-DsRV3A9z.d.ts +0 -204
- package/i18n/de.json +0 -792
- package/i18n/en.json +0 -792
- package/i18n/he.json +0 -792
- package/i18n/pl.json +0 -792
- package/i18n/pt-BR.json +0 -792
- package/i18n/tr.json +0 -792
- package/i18n/zh-CN.json +0 -792
- /package/dist/{chunk-YC5KZSYD.js → chunk-ESZ6JRTW.js} +0 -0
- /package/dist/{chunk-LVGJKS7Y.mjs → chunk-TZMMD6RR.mjs} +0 -0
- /package/dist/{react.css → fork.css} +0 -0
package/dist/ui.d.mts
CHANGED
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { a as ParagraphAlignment, d as ColorValue, S as SectionProperties, e as TabStop } from './content-REFGFfEH.mjs';
|
|
4
|
+
import { S as Style, T as Theme, a as StyleType, D as Document } from './document-Cu2vq_wS.mjs';
|
|
5
|
+
import { F as FontOption, c as SelectionContext, d as AIAction, e as AgentResponse } from './agentApi-BzUJ_kao.mjs';
|
|
6
|
+
export { f as PrintButton, g as PrintButtonProps, b as PrintOptions, h as PrintStyles, i as formatPrintPageRange, j as getDefaultPrintOptions, k as isPrintSupported, o as openPrintWindow, p as parsePageRange, t as triggerPrint } from './agentApi-BzUJ_kao.mjs';
|
|
7
|
+
import { T as TableAction } from './useFindReplace-vuoKpDKE.mjs';
|
|
8
|
+
export { F as FindReplaceOptions, a as FindReplaceState, b as TableContext, c as TableSelection, d as TableSplitConfig, e as TableToolbar, f as TableToolbarProps, U as UseFindReplaceReturn, g as addColumn, h as addRow, i as createTableContext, j as deleteColumn, k as deleteRow, l as getCellAt, m as getColumnCount, n as getTableSplitCellDialogConfig, o as mergeCells, s as splitCell, p as splitTableCell, u as useFindReplace } from './useFindReplace-vuoKpDKE.mjs';
|
|
9
|
+
import { T as TranslationKey } from './types-BF48VxkC.mjs';
|
|
10
|
+
export { K as DialogKeyboardShortcut, F as FindReplaceDialog, a as FindReplaceDialogProps, H as HyperlinkData, b as HyperlinkDialog, c as HyperlinkDialogProps, d as KeyboardShortcutsDialog, e as KeyboardShortcutsDialogProps, P as PasteOption, f as PasteSpecialDialog, g as PasteSpecialDialogProps, S as ShortcutCategory, U as UseKeyboardShortcutsDialogOptions, h as UseKeyboardShortcutsDialogReturn, i as UsePasteSpecialOptions, j as UsePasteSpecialReturn, k as formatShortcutKeys, l as getAllCategories, m as getAllPasteOptions, n as getCategoryLabel, o as getCommonShortcuts, p as getDefaultPasteOption, q as getDefaultShortcuts, r as getPasteOption, s as getShortcutsByCategory, t as isPasteSpecialShortcut, u as useHyperlinkDialog, v as useKeyboardShortcutsDialog, w as usePasteSpecial } from './KeyboardShortcutsDialog-t6JKL4Aj.mjs';
|
|
11
|
+
export { F as FindMatch, a as FindOptions, b as FindResult, H as HighlightOptions, c as createDefaultFindOptions, d as createSearchPattern, e as escapeRegexString, f as findAllMatches, g as findInDocument, h as findInParagraph, i as getDefaultHighlightOptions, j as getMatchCountText, k as isEmptySearch, r as replaceAllInContent, l as replaceFirstInContent, s as scrollToMatch } from './findReplace-shXbOjFQ.mjs';
|
|
12
|
+
import '@eigenpal/docx-editor-i18n/en.json';
|
|
13
|
+
|
|
14
|
+
interface FontPickerProps {
|
|
15
|
+
value?: string;
|
|
16
|
+
onChange?: (fontFamily: string) => void;
|
|
17
|
+
fonts?: FontOption[];
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
width?: number | string;
|
|
22
|
+
showPreview?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare function FontPicker({ value, onChange, fonts, disabled, className, placeholder, width, showPreview, }: FontPickerProps): react_jsx_runtime.JSX.Element;
|
|
6
25
|
|
|
7
26
|
/**
|
|
8
|
-
*
|
|
27
|
+
* Pure list-state helpers used by both adapter toolbars to track
|
|
28
|
+
* whether the selection is in a bullet/numbered list and at what
|
|
29
|
+
* indent level. Lifted from packages/react/src/components/ui/
|
|
30
|
+
* ListButtons.tsx so the React + Vue toolbars share identical
|
|
31
|
+
* state-mutation logic.
|
|
9
32
|
*/
|
|
10
33
|
type ListType = 'bullet' | 'numbered' | 'none';
|
|
11
|
-
/**
|
|
12
|
-
* List state for the current selection
|
|
13
|
-
*/
|
|
14
34
|
interface ListState {
|
|
15
|
-
/** Type of list (bullet, numbered, or none) */
|
|
16
35
|
type: ListType;
|
|
17
|
-
/** Current list level (0-8) */
|
|
18
36
|
level: number;
|
|
19
|
-
/** Whether the selection is in a list */
|
|
20
37
|
isInList: boolean;
|
|
21
|
-
/** Numbering ID if in a list */
|
|
22
38
|
numId?: number;
|
|
23
39
|
}
|
|
40
|
+
declare function createDefaultListState(): ListState;
|
|
41
|
+
|
|
24
42
|
/**
|
|
25
43
|
* Props for the ListButtons component
|
|
26
44
|
*/
|
|
@@ -52,10 +70,6 @@ interface ListButtonsProps {
|
|
|
52
70
|
* List buttons component for bullet/numbered list controls
|
|
53
71
|
*/
|
|
54
72
|
declare function ListButtons({ listState, onBulletList, onNumberedList, onIndent, onOutdent, disabled, className, style, showIndentButtons, compact, hasIndent, }: ListButtonsProps): react_jsx_runtime.JSX.Element;
|
|
55
|
-
/**
|
|
56
|
-
* Create a default list state (not in a list)
|
|
57
|
-
*/
|
|
58
|
-
declare function createDefaultListState(): ListState;
|
|
59
73
|
|
|
60
74
|
/**
|
|
61
75
|
* Current formatting state of the selection
|
|
@@ -120,7 +134,7 @@ type FormattingAction = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'sup
|
|
|
120
134
|
value: string;
|
|
121
135
|
};
|
|
122
136
|
/**
|
|
123
|
-
* Props for the Toolbar component
|
|
137
|
+
* Props for the Toolbar (formatting rail) component
|
|
124
138
|
*/
|
|
125
139
|
interface ToolbarProps {
|
|
126
140
|
/** Current formatting of the selection */
|
|
@@ -145,8 +159,10 @@ interface ToolbarProps {
|
|
|
145
159
|
enableShortcuts?: boolean;
|
|
146
160
|
/** Ref to the editor container for keyboard events */
|
|
147
161
|
editorRef?: React__default.RefObject<HTMLElement>;
|
|
148
|
-
/** Custom toolbar items to render */
|
|
162
|
+
/** Custom toolbar items to render at the end */
|
|
149
163
|
children?: ReactNode;
|
|
164
|
+
/** When true, renders with display:contents so children flow in the parent flex container */
|
|
165
|
+
inline?: boolean;
|
|
150
166
|
/** Whether to show font family picker (default: true) */
|
|
151
167
|
showFontPicker?: boolean;
|
|
152
168
|
/**
|
|
@@ -172,12 +188,10 @@ interface ToolbarProps {
|
|
|
172
188
|
showStylePicker?: boolean;
|
|
173
189
|
/** Document styles for the style picker */
|
|
174
190
|
documentStyles?: Style[];
|
|
175
|
-
/** Theme for the style picker */
|
|
191
|
+
/** Theme for the style picker / color picker theme matrix */
|
|
176
192
|
theme?: Theme | null;
|
|
177
|
-
/** Callback for print action */
|
|
193
|
+
/** Callback for print action. Set to enable the File > Print menu entry. */
|
|
178
194
|
onPrint?: () => void;
|
|
179
|
-
/** Whether to show print button (default: true) */
|
|
180
|
-
showPrintButton?: boolean;
|
|
181
195
|
/** Callback to open/import a DOCX file (File → Open) */
|
|
182
196
|
onOpen?: () => void;
|
|
183
197
|
/** Callback to save/download the current DOCX (File → Save) */
|
|
@@ -280,10 +294,80 @@ declare function ToolbarGroup$1({ label, children, className }: ToolbarGroupProp
|
|
|
280
294
|
*/
|
|
281
295
|
declare function ToolbarSeparator(): react_jsx_runtime.JSX.Element;
|
|
282
296
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
297
|
+
* Icon-based formatting toolbar — undo/redo, zoom, styles, fonts,
|
|
298
|
+
* bold/italic/underline, colors, alignment, lists, table/image context, clear formatting.
|
|
285
299
|
*/
|
|
286
|
-
declare function Toolbar(
|
|
300
|
+
declare function Toolbar(explicitProps: ToolbarProps): react_jsx_runtime.JSX.Element;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Props for the EditorToolbar compound component.
|
|
304
|
+
* Extends ToolbarProps with title bar-specific fields.
|
|
305
|
+
*/
|
|
306
|
+
interface EditorToolbarProps extends ToolbarProps {
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface LogoProps {
|
|
310
|
+
children: ReactNode;
|
|
311
|
+
}
|
|
312
|
+
declare function Logo({ children }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
313
|
+
interface DocumentNameProps {
|
|
314
|
+
value: string;
|
|
315
|
+
onChange?: (value: string) => void;
|
|
316
|
+
placeholder?: string;
|
|
317
|
+
editable?: boolean;
|
|
318
|
+
}
|
|
319
|
+
declare function DocumentName({ value, onChange, placeholder, editable }: DocumentNameProps): react_jsx_runtime.JSX.Element;
|
|
320
|
+
interface TitleBarRightProps {
|
|
321
|
+
children: ReactNode;
|
|
322
|
+
}
|
|
323
|
+
declare function TitleBarRight({ children }: TitleBarRightProps): react_jsx_runtime.JSX.Element;
|
|
324
|
+
declare function MenuBar(): react_jsx_runtime.JSX.Element;
|
|
325
|
+
interface TitleBarProps {
|
|
326
|
+
children: ReactNode;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* TitleBar layout (Google Docs style):
|
|
330
|
+
*
|
|
331
|
+
* ┌──────────┬────────────────────────────┬──────────────────┐
|
|
332
|
+
* │ │ Document Name │ │
|
|
333
|
+
* │ Logo │ │ Right Actions │
|
|
334
|
+
* │ │ File Format Insert │ │
|
|
335
|
+
* └──────────┴────────────────────────────┴──────────────────┘
|
|
336
|
+
*
|
|
337
|
+
* Logo and TitleBarRight span full height. DocumentName + MenuBar
|
|
338
|
+
* stack vertically in the center column.
|
|
339
|
+
*/
|
|
340
|
+
declare function TitleBar({ children }: TitleBarProps): react_jsx_runtime.JSX.Element;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* EditorToolbar — Google Docs-style 2-level compound component.
|
|
344
|
+
*
|
|
345
|
+
* Usage:
|
|
346
|
+
* <EditorToolbar {...toolbarProps}>
|
|
347
|
+
* <EditorToolbar.TitleBar>
|
|
348
|
+
* <EditorToolbar.Logo><MyIcon /></EditorToolbar.Logo>
|
|
349
|
+
* <EditorToolbar.DocumentName value={name} onChange={setName} />
|
|
350
|
+
* <EditorToolbar.MenuBar />
|
|
351
|
+
* <EditorToolbar.TitleBarRight>
|
|
352
|
+
* <button>Save</button>
|
|
353
|
+
* </EditorToolbar.TitleBarRight>
|
|
354
|
+
* </EditorToolbar.TitleBar>
|
|
355
|
+
* <EditorToolbar.Toolbar />
|
|
356
|
+
* </EditorToolbar>
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
interface EditorToolbarComponent {
|
|
360
|
+
(props: EditorToolbarProps & {
|
|
361
|
+
children: ReactNode;
|
|
362
|
+
}): React.JSX.Element;
|
|
363
|
+
TitleBar: typeof TitleBar;
|
|
364
|
+
Logo: typeof Logo;
|
|
365
|
+
DocumentName: typeof DocumentName;
|
|
366
|
+
MenuBar: typeof MenuBar;
|
|
367
|
+
TitleBarRight: typeof TitleBarRight;
|
|
368
|
+
Toolbar: typeof Toolbar;
|
|
369
|
+
}
|
|
370
|
+
declare const EditorToolbar: EditorToolbarComponent;
|
|
287
371
|
|
|
288
372
|
/**
|
|
289
373
|
* Context Menu Component
|
|
@@ -581,6 +665,7 @@ interface FontSizePickerProps {
|
|
|
581
665
|
minSize?: number;
|
|
582
666
|
maxSize?: number;
|
|
583
667
|
}
|
|
668
|
+
|
|
584
669
|
declare function FontSizePicker({ value, onChange, sizes, disabled, className, placeholder, minSize, maxSize, }: FontSizePickerProps): react_jsx_runtime.JSX.Element;
|
|
585
670
|
|
|
586
671
|
interface LineSpacingOption {
|
|
@@ -1158,338 +1243,6 @@ declare function createToolbarItems(configs: Array<{
|
|
|
1158
1243
|
*/
|
|
1159
1244
|
declare function getRecommendedPriority(itemType: string): ToolbarItemPriority;
|
|
1160
1245
|
|
|
1161
|
-
/**
|
|
1162
|
-
* Find & Replace Utility Functions
|
|
1163
|
-
*
|
|
1164
|
-
* Pure utility functions for text search, pattern matching, and document search.
|
|
1165
|
-
* Extracted from FindReplaceDialog.tsx.
|
|
1166
|
-
*/
|
|
1167
|
-
/**
|
|
1168
|
-
* A single match result in the document
|
|
1169
|
-
*/
|
|
1170
|
-
interface FindMatch {
|
|
1171
|
-
/** Index of the paragraph containing the match */
|
|
1172
|
-
paragraphIndex: number;
|
|
1173
|
-
/** Index of the run/content within the paragraph */
|
|
1174
|
-
contentIndex: number;
|
|
1175
|
-
/** Character offset within the content */
|
|
1176
|
-
startOffset: number;
|
|
1177
|
-
/** Character offset for end of match */
|
|
1178
|
-
endOffset: number;
|
|
1179
|
-
/** The matched text */
|
|
1180
|
-
text: string;
|
|
1181
|
-
}
|
|
1182
|
-
/**
|
|
1183
|
-
* Find options for controlling search behavior
|
|
1184
|
-
*/
|
|
1185
|
-
interface FindOptions {
|
|
1186
|
-
/** Whether to match case */
|
|
1187
|
-
matchCase: boolean;
|
|
1188
|
-
/** Whether to match whole words only */
|
|
1189
|
-
matchWholeWord: boolean;
|
|
1190
|
-
/** Whether to use regular expressions (future) */
|
|
1191
|
-
useRegex?: boolean;
|
|
1192
|
-
}
|
|
1193
|
-
/**
|
|
1194
|
-
* Find result with all matches
|
|
1195
|
-
*/
|
|
1196
|
-
interface FindResult {
|
|
1197
|
-
/** All matches found */
|
|
1198
|
-
matches: FindMatch[];
|
|
1199
|
-
/** Total match count */
|
|
1200
|
-
totalCount: number;
|
|
1201
|
-
/** Current match index (0-based) */
|
|
1202
|
-
currentIndex: number;
|
|
1203
|
-
}
|
|
1204
|
-
/**
|
|
1205
|
-
* Highlight options for document rendering
|
|
1206
|
-
*/
|
|
1207
|
-
interface HighlightOptions {
|
|
1208
|
-
/** Background color for current match */
|
|
1209
|
-
currentMatchColor: string;
|
|
1210
|
-
/** Background color for other matches */
|
|
1211
|
-
otherMatchColor: string;
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* Create default find options
|
|
1215
|
-
*/
|
|
1216
|
-
declare function createDefaultFindOptions(): FindOptions;
|
|
1217
|
-
/**
|
|
1218
|
-
* Escape string for use in regex pattern
|
|
1219
|
-
*/
|
|
1220
|
-
declare function escapeRegexString(str: string): string;
|
|
1221
|
-
/**
|
|
1222
|
-
* Create a regex pattern from search text and options
|
|
1223
|
-
*/
|
|
1224
|
-
declare function createSearchPattern(searchText: string, options: FindOptions): RegExp | null;
|
|
1225
|
-
/**
|
|
1226
|
-
* Find all matches of search text in content
|
|
1227
|
-
*/
|
|
1228
|
-
declare function findAllMatches(content: string, searchText: string, options: FindOptions): Array<{
|
|
1229
|
-
start: number;
|
|
1230
|
-
end: number;
|
|
1231
|
-
}>;
|
|
1232
|
-
/**
|
|
1233
|
-
* Replace text in content
|
|
1234
|
-
*/
|
|
1235
|
-
declare function replaceAllInContent(content: string, searchText: string, replaceText: string, options: FindOptions): string;
|
|
1236
|
-
/**
|
|
1237
|
-
* Replace first match in content
|
|
1238
|
-
*/
|
|
1239
|
-
declare function replaceFirstInContent(content: string, searchText: string, replaceText: string, options: FindOptions, startIndex?: number): {
|
|
1240
|
-
content: string;
|
|
1241
|
-
replaced: boolean;
|
|
1242
|
-
matchStart: number;
|
|
1243
|
-
matchEnd: number;
|
|
1244
|
-
};
|
|
1245
|
-
/**
|
|
1246
|
-
* Get match count for status display
|
|
1247
|
-
*/
|
|
1248
|
-
declare function getMatchCountText(result: FindResult | null): string;
|
|
1249
|
-
/**
|
|
1250
|
-
* Check if search text is empty or whitespace-only
|
|
1251
|
-
*/
|
|
1252
|
-
declare function isEmptySearch(searchText: string): boolean;
|
|
1253
|
-
/**
|
|
1254
|
-
* Get default highlight options
|
|
1255
|
-
*/
|
|
1256
|
-
declare function getDefaultHighlightOptions(): HighlightOptions;
|
|
1257
|
-
/**
|
|
1258
|
-
* Find all matches in a document
|
|
1259
|
-
*/
|
|
1260
|
-
declare function findInDocument(document: any, searchText: string, options: FindOptions): FindMatch[];
|
|
1261
|
-
/**
|
|
1262
|
-
* Find matches in a single paragraph
|
|
1263
|
-
*/
|
|
1264
|
-
declare function findInParagraph(paragraph: any, searchText: string, options: FindOptions, paragraphIndex: number): FindMatch[];
|
|
1265
|
-
/**
|
|
1266
|
-
* Scroll to a match in the document
|
|
1267
|
-
*/
|
|
1268
|
-
declare function scrollToMatch(containerElement: HTMLElement | null, match: FindMatch): void;
|
|
1269
|
-
|
|
1270
|
-
/**
|
|
1271
|
-
* useFindReplace Hook
|
|
1272
|
-
*
|
|
1273
|
-
* React hook for managing find/replace dialog state.
|
|
1274
|
-
* Extracted from FindReplaceDialog.tsx.
|
|
1275
|
-
*/
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Options for the useFindReplace hook
|
|
1279
|
-
*/
|
|
1280
|
-
interface FindReplaceOptions {
|
|
1281
|
-
/** Whether to show replace functionality initially */
|
|
1282
|
-
initialReplaceMode?: boolean;
|
|
1283
|
-
/** Callback when matches change */
|
|
1284
|
-
onMatchesChange?: (matches: FindMatch[]) => void;
|
|
1285
|
-
/** Callback when current match changes */
|
|
1286
|
-
onCurrentMatchChange?: (match: FindMatch | null, index: number) => void;
|
|
1287
|
-
}
|
|
1288
|
-
/**
|
|
1289
|
-
* State for the find/replace hook
|
|
1290
|
-
*/
|
|
1291
|
-
interface FindReplaceState {
|
|
1292
|
-
/** Whether the dialog is open */
|
|
1293
|
-
isOpen: boolean;
|
|
1294
|
-
/** Current search text */
|
|
1295
|
-
searchText: string;
|
|
1296
|
-
/** Current replace text */
|
|
1297
|
-
replaceText: string;
|
|
1298
|
-
/** Find options */
|
|
1299
|
-
options: FindOptions;
|
|
1300
|
-
/** All matches found */
|
|
1301
|
-
matches: FindMatch[];
|
|
1302
|
-
/** Current match index */
|
|
1303
|
-
currentIndex: number;
|
|
1304
|
-
/** Whether in replace mode */
|
|
1305
|
-
replaceMode: boolean;
|
|
1306
|
-
}
|
|
1307
|
-
/**
|
|
1308
|
-
* Return type for the useFindReplace hook
|
|
1309
|
-
*/
|
|
1310
|
-
interface UseFindReplaceReturn {
|
|
1311
|
-
/** Current state */
|
|
1312
|
-
state: FindReplaceState;
|
|
1313
|
-
/** Open the find dialog */
|
|
1314
|
-
openFind: (selectedText?: string) => void;
|
|
1315
|
-
/** Open the replace dialog */
|
|
1316
|
-
openReplace: (selectedText?: string) => void;
|
|
1317
|
-
/** Close the dialog */
|
|
1318
|
-
close: () => void;
|
|
1319
|
-
/** Toggle dialog visibility */
|
|
1320
|
-
toggle: () => void;
|
|
1321
|
-
/** Update search text */
|
|
1322
|
-
setSearchText: (text: string) => void;
|
|
1323
|
-
/** Update replace text */
|
|
1324
|
-
setReplaceText: (text: string) => void;
|
|
1325
|
-
/** Update find options */
|
|
1326
|
-
setOptions: (options: Partial<FindOptions>) => void;
|
|
1327
|
-
/** Set search results */
|
|
1328
|
-
setMatches: (matches: FindMatch[], currentIndex?: number) => void;
|
|
1329
|
-
/** Go to next match */
|
|
1330
|
-
goToNextMatch: () => number;
|
|
1331
|
-
/** Go to previous match */
|
|
1332
|
-
goToPreviousMatch: () => number;
|
|
1333
|
-
/** Go to a specific match by index */
|
|
1334
|
-
goToMatch: (index: number) => void;
|
|
1335
|
-
/** Get current match */
|
|
1336
|
-
getCurrentMatch: () => FindMatch | null;
|
|
1337
|
-
/** Check if has matches */
|
|
1338
|
-
hasMatches: () => boolean;
|
|
1339
|
-
}
|
|
1340
|
-
/**
|
|
1341
|
-
* Hook for managing find/replace dialog state
|
|
1342
|
-
*/
|
|
1343
|
-
declare function useFindReplace(hookOptions?: FindReplaceOptions): UseFindReplaceReturn;
|
|
1344
|
-
|
|
1345
|
-
/**
|
|
1346
|
-
* Find and Replace Dialog Component
|
|
1347
|
-
*
|
|
1348
|
-
* Modal dialog for searching and replacing text in the document.
|
|
1349
|
-
* Supports find, find next/previous, replace, and replace all operations.
|
|
1350
|
-
*
|
|
1351
|
-
* Logic and utilities are in separate files:
|
|
1352
|
-
* - findReplaceUtils.ts — Pure search/replace functions and types
|
|
1353
|
-
* - useFindReplace.ts — React hook for dialog state management
|
|
1354
|
-
*/
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* Props for the FindReplaceDialog component
|
|
1358
|
-
*/
|
|
1359
|
-
interface FindReplaceDialogProps {
|
|
1360
|
-
/** Whether the dialog is open */
|
|
1361
|
-
isOpen: boolean;
|
|
1362
|
-
/** Callback when dialog is closed */
|
|
1363
|
-
onClose: () => void;
|
|
1364
|
-
/** Callback when searching for text */
|
|
1365
|
-
onFind: (searchText: string, options: FindOptions) => FindResult | null;
|
|
1366
|
-
/** Callback when navigating to next match */
|
|
1367
|
-
onFindNext: () => FindMatch | null;
|
|
1368
|
-
/** Callback when navigating to previous match */
|
|
1369
|
-
onFindPrevious: () => FindMatch | null;
|
|
1370
|
-
/** Callback when replacing current match */
|
|
1371
|
-
onReplace: (replaceText: string) => boolean;
|
|
1372
|
-
/** Callback when replacing all matches */
|
|
1373
|
-
onReplaceAll: (searchText: string, replaceText: string, options: FindOptions) => number;
|
|
1374
|
-
/** Callback to highlight matches in document */
|
|
1375
|
-
onHighlightMatches?: (matches: FindMatch[]) => void;
|
|
1376
|
-
/** Callback to clear highlights */
|
|
1377
|
-
onClearHighlights?: () => void;
|
|
1378
|
-
/** Initial search text (e.g., from selected text) */
|
|
1379
|
-
initialSearchText?: string;
|
|
1380
|
-
/** Whether to start in replace mode */
|
|
1381
|
-
replaceMode?: boolean;
|
|
1382
|
-
/** Current match result (from external state) */
|
|
1383
|
-
currentResult?: FindResult | null;
|
|
1384
|
-
/** Additional CSS class */
|
|
1385
|
-
className?: string;
|
|
1386
|
-
/** Additional inline styles */
|
|
1387
|
-
style?: CSSProperties;
|
|
1388
|
-
}
|
|
1389
|
-
/**
|
|
1390
|
-
* FindReplaceDialog component - Modal for finding and replacing text
|
|
1391
|
-
*/
|
|
1392
|
-
declare function FindReplaceDialog({ isOpen, onClose, onFind, onFindNext, onFindPrevious, onReplace, onReplaceAll, onHighlightMatches, onClearHighlights, initialSearchText, replaceMode, currentResult, className, style, }: FindReplaceDialogProps): React__default.ReactElement | null;
|
|
1393
|
-
|
|
1394
|
-
/**
|
|
1395
|
-
* Hyperlink Dialog Component
|
|
1396
|
-
*
|
|
1397
|
-
* Modal dialog for inserting and editing hyperlinks in the document.
|
|
1398
|
-
* Supports both external URLs and internal bookmark links.
|
|
1399
|
-
*
|
|
1400
|
-
* Features:
|
|
1401
|
-
* - Input for URL (http, https, mailto, tel, etc.)
|
|
1402
|
-
* - Input for display text
|
|
1403
|
-
* - Edit existing hyperlinks
|
|
1404
|
-
* - Remove hyperlink option
|
|
1405
|
-
* - Internal bookmark selection
|
|
1406
|
-
* - Validation and error handling
|
|
1407
|
-
*/
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* Hyperlink data structure for dialog
|
|
1411
|
-
*/
|
|
1412
|
-
interface HyperlinkData {
|
|
1413
|
-
/** URL for external link */
|
|
1414
|
-
url?: string;
|
|
1415
|
-
/** Display text for the link */
|
|
1416
|
-
displayText?: string;
|
|
1417
|
-
/** Internal bookmark name */
|
|
1418
|
-
bookmark?: string;
|
|
1419
|
-
/** Tooltip text */
|
|
1420
|
-
tooltip?: string;
|
|
1421
|
-
}
|
|
1422
|
-
/**
|
|
1423
|
-
* Bookmark option for internal link selection
|
|
1424
|
-
*/
|
|
1425
|
-
interface BookmarkOption {
|
|
1426
|
-
/** Bookmark name/ID */
|
|
1427
|
-
name: string;
|
|
1428
|
-
/** Optional display label */
|
|
1429
|
-
label?: string;
|
|
1430
|
-
}
|
|
1431
|
-
/**
|
|
1432
|
-
* Props for the HyperlinkDialog component
|
|
1433
|
-
*/
|
|
1434
|
-
interface HyperlinkDialogProps {
|
|
1435
|
-
/** Whether the dialog is open */
|
|
1436
|
-
isOpen: boolean;
|
|
1437
|
-
/** Callback when dialog is closed */
|
|
1438
|
-
onClose: () => void;
|
|
1439
|
-
/** Callback when hyperlink is inserted/updated */
|
|
1440
|
-
onSubmit: (data: HyperlinkData) => void;
|
|
1441
|
-
/** Callback when hyperlink is removed */
|
|
1442
|
-
onRemove?: () => void;
|
|
1443
|
-
/** Initial data for editing existing hyperlink */
|
|
1444
|
-
initialData?: HyperlinkData;
|
|
1445
|
-
/** Currently selected text (used as default display text) */
|
|
1446
|
-
selectedText?: string;
|
|
1447
|
-
/** Whether we're editing an existing hyperlink */
|
|
1448
|
-
isEditing?: boolean;
|
|
1449
|
-
/** Available bookmarks for internal links */
|
|
1450
|
-
bookmarks?: BookmarkOption[];
|
|
1451
|
-
/** Additional CSS class */
|
|
1452
|
-
className?: string;
|
|
1453
|
-
/** Additional inline styles */
|
|
1454
|
-
style?: CSSProperties;
|
|
1455
|
-
}
|
|
1456
|
-
/**
|
|
1457
|
-
* HyperlinkDialog component - Modal for inserting/editing hyperlinks
|
|
1458
|
-
*/
|
|
1459
|
-
declare function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, initialData, selectedText, isEditing, bookmarks, className, style, }: HyperlinkDialogProps): React__default.ReactElement | null;
|
|
1460
|
-
/**
|
|
1461
|
-
* Hook state for the Hyperlink dialog
|
|
1462
|
-
*/
|
|
1463
|
-
interface UseHyperlinkDialogState {
|
|
1464
|
-
/** Whether the dialog is open */
|
|
1465
|
-
isOpen: boolean;
|
|
1466
|
-
/** Initial data for the dialog (for editing) */
|
|
1467
|
-
initialData?: HyperlinkData;
|
|
1468
|
-
/** Currently selected text */
|
|
1469
|
-
selectedText?: string;
|
|
1470
|
-
/** Whether we're editing an existing hyperlink */
|
|
1471
|
-
isEditing: boolean;
|
|
1472
|
-
}
|
|
1473
|
-
/**
|
|
1474
|
-
* Hook return type for the Hyperlink dialog
|
|
1475
|
-
*/
|
|
1476
|
-
interface UseHyperlinkDialogReturn {
|
|
1477
|
-
/** Current state */
|
|
1478
|
-
state: UseHyperlinkDialogState;
|
|
1479
|
-
/** Open dialog for inserting new hyperlink */
|
|
1480
|
-
openInsert: (selectedText?: string) => void;
|
|
1481
|
-
/** Open dialog for editing existing hyperlink */
|
|
1482
|
-
openEdit: (data: HyperlinkData) => void;
|
|
1483
|
-
/** Close the dialog */
|
|
1484
|
-
close: () => void;
|
|
1485
|
-
/** Toggle dialog open/closed */
|
|
1486
|
-
toggle: () => void;
|
|
1487
|
-
}
|
|
1488
|
-
/**
|
|
1489
|
-
* Hook for managing Hyperlink dialog state
|
|
1490
|
-
*/
|
|
1491
|
-
declare function useHyperlinkDialog(): UseHyperlinkDialogReturn;
|
|
1492
|
-
|
|
1493
1246
|
/**
|
|
1494
1247
|
* Insert Table Dialog Component
|
|
1495
1248
|
*
|
|
@@ -1758,198 +1511,4 @@ declare function searchSymbols(query: string): string[];
|
|
|
1758
1511
|
*/
|
|
1759
1512
|
declare function symbolFromCodePoint(codePointStr: string): string | null;
|
|
1760
1513
|
|
|
1761
|
-
|
|
1762
|
-
* Paste Special Dialog Component
|
|
1763
|
-
*
|
|
1764
|
-
* Provides paste options for pasting content with or without formatting.
|
|
1765
|
-
* Features:
|
|
1766
|
-
* - Paste with formatting (default)
|
|
1767
|
-
* - Paste as plain text (unformatted)
|
|
1768
|
-
* - Keyboard shortcut: Ctrl+Shift+V opens dialog
|
|
1769
|
-
*/
|
|
1770
|
-
|
|
1771
|
-
/**
|
|
1772
|
-
* Paste option type
|
|
1773
|
-
*/
|
|
1774
|
-
type PasteOption = 'formatted' | 'plainText';
|
|
1775
|
-
/**
|
|
1776
|
-
* Paste special dialog props
|
|
1777
|
-
*/
|
|
1778
|
-
interface PasteSpecialDialogProps {
|
|
1779
|
-
/** Whether the dialog is open */
|
|
1780
|
-
isOpen: boolean;
|
|
1781
|
-
/** Callback when dialog is closed */
|
|
1782
|
-
onClose: () => void;
|
|
1783
|
-
/** Callback when paste is confirmed */
|
|
1784
|
-
onPaste: (content: ParsedClipboardContent, asPlainText: boolean) => void;
|
|
1785
|
-
/** Optional custom position */
|
|
1786
|
-
position?: {
|
|
1787
|
-
x: number;
|
|
1788
|
-
y: number;
|
|
1789
|
-
};
|
|
1790
|
-
/** Additional className */
|
|
1791
|
-
className?: string;
|
|
1792
|
-
}
|
|
1793
|
-
/**
|
|
1794
|
-
* Paste option definition with translation keys
|
|
1795
|
-
*/
|
|
1796
|
-
interface PasteOptionDef {
|
|
1797
|
-
id: PasteOption;
|
|
1798
|
-
labelKey: TranslationKey;
|
|
1799
|
-
descriptionKey: TranslationKey;
|
|
1800
|
-
shortcutKey: TranslationKey;
|
|
1801
|
-
}
|
|
1802
|
-
/**
|
|
1803
|
-
* Hook return value for paste special
|
|
1804
|
-
*/
|
|
1805
|
-
interface UsePasteSpecialReturn {
|
|
1806
|
-
/** Whether the dialog is open */
|
|
1807
|
-
isOpen: boolean;
|
|
1808
|
-
/** Open the paste special dialog */
|
|
1809
|
-
openDialog: () => void;
|
|
1810
|
-
/** Close the dialog */
|
|
1811
|
-
closeDialog: () => void;
|
|
1812
|
-
/** Handle keyboard shortcut (Ctrl+Shift+V) */
|
|
1813
|
-
handleKeyDown: (event: KeyboardEvent) => boolean;
|
|
1814
|
-
/** Paste as plain text directly */
|
|
1815
|
-
pasteAsPlainText: () => Promise<void>;
|
|
1816
|
-
}
|
|
1817
|
-
/**
|
|
1818
|
-
* Options for usePasteSpecial hook
|
|
1819
|
-
*/
|
|
1820
|
-
interface UsePasteSpecialOptions {
|
|
1821
|
-
/** Callback when paste is confirmed */
|
|
1822
|
-
onPaste?: (content: ParsedClipboardContent, asPlainText: boolean) => void;
|
|
1823
|
-
/** Whether paste operations are enabled */
|
|
1824
|
-
enabled?: boolean;
|
|
1825
|
-
}
|
|
1826
|
-
declare const PasteSpecialDialog: React__default.FC<PasteSpecialDialogProps>;
|
|
1827
|
-
/**
|
|
1828
|
-
* Hook to manage paste special dialog
|
|
1829
|
-
*/
|
|
1830
|
-
declare function usePasteSpecial(options?: UsePasteSpecialOptions): UsePasteSpecialReturn;
|
|
1831
|
-
/**
|
|
1832
|
-
* Get paste option definition by id
|
|
1833
|
-
*/
|
|
1834
|
-
declare function getPasteOption(id: PasteOption): PasteOptionDef | undefined;
|
|
1835
|
-
/**
|
|
1836
|
-
* Get all paste option definitions
|
|
1837
|
-
*/
|
|
1838
|
-
declare function getAllPasteOptions(): PasteOptionDef[];
|
|
1839
|
-
/**
|
|
1840
|
-
* Get default paste option
|
|
1841
|
-
*/
|
|
1842
|
-
declare function getDefaultPasteOption(): PasteOption;
|
|
1843
|
-
/**
|
|
1844
|
-
* Check if paste special shortcut
|
|
1845
|
-
*/
|
|
1846
|
-
declare function isPasteSpecialShortcut(event: KeyboardEvent): boolean;
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* Keyboard Shortcuts Dialog Component
|
|
1850
|
-
*
|
|
1851
|
-
* Displays all available keyboard shortcuts organized by category.
|
|
1852
|
-
* Features:
|
|
1853
|
-
* - Categorized shortcut list
|
|
1854
|
-
* - Search/filter functionality
|
|
1855
|
-
* - Platform-aware modifier keys (Ctrl/Cmd)
|
|
1856
|
-
* - Keyboard shortcut to open (Ctrl+/)
|
|
1857
|
-
*/
|
|
1858
|
-
|
|
1859
|
-
/**
|
|
1860
|
-
* Keyboard shortcut definition
|
|
1861
|
-
*/
|
|
1862
|
-
interface KeyboardShortcut {
|
|
1863
|
-
/** Unique identifier */
|
|
1864
|
-
id: string;
|
|
1865
|
-
/** Display name */
|
|
1866
|
-
name: string;
|
|
1867
|
-
/** Description of what the shortcut does */
|
|
1868
|
-
description: string;
|
|
1869
|
-
/** Primary key combination (e.g., 'Ctrl+C') */
|
|
1870
|
-
keys: string;
|
|
1871
|
-
/** Alternative key combination */
|
|
1872
|
-
altKeys?: string;
|
|
1873
|
-
/** Category for grouping */
|
|
1874
|
-
category: ShortcutCategory;
|
|
1875
|
-
/** Whether this is a common/frequently used shortcut */
|
|
1876
|
-
common?: boolean;
|
|
1877
|
-
/** Translation key for display name (used internally) */
|
|
1878
|
-
nameKey?: TranslationKey;
|
|
1879
|
-
/** Translation key for description (used internally) */
|
|
1880
|
-
descriptionKey?: TranslationKey;
|
|
1881
|
-
}
|
|
1882
|
-
/**
|
|
1883
|
-
* Shortcut category
|
|
1884
|
-
*/
|
|
1885
|
-
type ShortcutCategory = 'editing' | 'formatting' | 'navigation' | 'clipboard' | 'selection' | 'view' | 'file' | 'other';
|
|
1886
|
-
/**
|
|
1887
|
-
* Dialog props
|
|
1888
|
-
*/
|
|
1889
|
-
interface KeyboardShortcutsDialogProps {
|
|
1890
|
-
/** Whether the dialog is open */
|
|
1891
|
-
isOpen: boolean;
|
|
1892
|
-
/** Close callback */
|
|
1893
|
-
onClose: () => void;
|
|
1894
|
-
/** Custom shortcuts (merged with defaults) */
|
|
1895
|
-
customShortcuts?: KeyboardShortcut[];
|
|
1896
|
-
/** Whether to show search */
|
|
1897
|
-
showSearch?: boolean;
|
|
1898
|
-
/** Additional className */
|
|
1899
|
-
className?: string;
|
|
1900
|
-
}
|
|
1901
|
-
/**
|
|
1902
|
-
* Hook options
|
|
1903
|
-
*/
|
|
1904
|
-
interface UseKeyboardShortcutsDialogOptions {
|
|
1905
|
-
/** Whether the dialog can be opened with Ctrl+? or F1 */
|
|
1906
|
-
enabled?: boolean;
|
|
1907
|
-
/** Custom open shortcut (default: Ctrl+/) */
|
|
1908
|
-
openShortcut?: string;
|
|
1909
|
-
}
|
|
1910
|
-
/**
|
|
1911
|
-
* Hook return value
|
|
1912
|
-
*/
|
|
1913
|
-
interface UseKeyboardShortcutsDialogReturn {
|
|
1914
|
-
/** Whether dialog is open */
|
|
1915
|
-
isOpen: boolean;
|
|
1916
|
-
/** Open the dialog */
|
|
1917
|
-
open: () => void;
|
|
1918
|
-
/** Close the dialog */
|
|
1919
|
-
close: () => void;
|
|
1920
|
-
/** Toggle the dialog */
|
|
1921
|
-
toggle: () => void;
|
|
1922
|
-
/** Keyboard event handler */
|
|
1923
|
-
handleKeyDown: (event: KeyboardEvent) => void;
|
|
1924
|
-
}
|
|
1925
|
-
declare const KeyboardShortcutsDialog: React__default.FC<KeyboardShortcutsDialogProps>;
|
|
1926
|
-
/**
|
|
1927
|
-
* Hook to manage keyboard shortcuts dialog
|
|
1928
|
-
*/
|
|
1929
|
-
declare function useKeyboardShortcutsDialog(options?: UseKeyboardShortcutsDialogOptions): UseKeyboardShortcutsDialogReturn;
|
|
1930
|
-
/**
|
|
1931
|
-
* Get all default shortcuts
|
|
1932
|
-
*/
|
|
1933
|
-
declare function getDefaultShortcuts(): KeyboardShortcut[];
|
|
1934
|
-
/**
|
|
1935
|
-
* Get shortcuts by category
|
|
1936
|
-
*/
|
|
1937
|
-
declare function getShortcutsByCategory(category: ShortcutCategory): KeyboardShortcut[];
|
|
1938
|
-
/**
|
|
1939
|
-
* Get common/frequently used shortcuts
|
|
1940
|
-
*/
|
|
1941
|
-
declare function getCommonShortcuts(): KeyboardShortcut[];
|
|
1942
|
-
/**
|
|
1943
|
-
* Get category label translation key
|
|
1944
|
-
*/
|
|
1945
|
-
declare function getCategoryLabel(category: ShortcutCategory): string;
|
|
1946
|
-
/**
|
|
1947
|
-
* Get all categories
|
|
1948
|
-
*/
|
|
1949
|
-
declare function getAllCategories(): ShortcutCategory[];
|
|
1950
|
-
/**
|
|
1951
|
-
* Format shortcut keys for display
|
|
1952
|
-
*/
|
|
1953
|
-
declare function formatShortcutKeys(keys: string): string;
|
|
1954
|
-
|
|
1955
|
-
export { AlignmentButtons, type AlignmentButtonsProps, ColorPicker, type ColorPickerMode, type ColorPickerProps, ContextMenu, type ContextMenuProps, type KeyboardShortcut as DialogKeyboardShortcut, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, FontOption, FontSizePicker, type FontSizePickerProps, type HighlightOptions, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, SYMBOL_CATEGORIES, type ShortcutCategory, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, ZoomControl, type ZoomControlProps, calculateFitDimensions, clampTableConfig, createChangeTracker, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createErrorResponse, createMockResponse, createSearchPattern, createToolbarItem, createToolbarItems, dataUrlToBlob, delay, escapeRegexString, findAllMatches, findInDocument, findInParagraph, formatFileSize, formatShortcutKeys, formatTableDimensions, getActionShortcut, getAllActions, getAllCategories, getAllPositions as getAllIndicatorPositions, getAllVariants as getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getCategoryLabel, getCommonShortcuts, getDefaultActions, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultShortcuts, getDefaultTextContextMenuItems, getImageAcceptString, getImageDimensions, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getPasteOption, getRecommendedPriority, getRulerDimensions, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolInfo as getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTextActionLabel, getTextActionShortcut, getVariantLabel, isActionAvailable, isEmptySearch, isPasteSpecialShortcut, isTextActionAvailable, isValidImageFile, isValidTableConfig, parseMarginFromUnits, positionToMargin, replaceAllInContent, replaceFirstInContent, scrollToMatch, searchSymbols, symbolFromCodePoint, useContextMenu, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useTextContextMenu, useUnsavedChanges };
|
|
1514
|
+
export { AlignmentButtons, type AlignmentButtonsProps, ColorPicker, type ColorPickerMode, type ColorPickerProps, ContextMenu, type ContextMenuProps, type DocumentNameProps, EditorToolbar, type EditorToolbarProps, FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HorizontalRuler, type HorizontalRulerProps, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, type LogoProps, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, SYMBOL_CATEGORIES, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TableAction, TableBorderColorPicker, type TableBorderColorPickerProps, TableBorderPicker, type TableBorderPickerProps, TableBorderWidthPicker, type TableBorderWidthPickerProps, TableCellFillPicker, type TableCellFillPickerProps, type TableConfig, TableInsertButtons, type TableInsertButtonsProps, TableMergeButton, type TableMergeButtonProps, TableMoreDropdown, type TableMoreDropdownProps, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, type TitleBarProps, type TitleBarRightProps, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, type UseLoadingOptions, type UseLoadingReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, ZoomControl, type ZoomControlProps, calculateFitDimensions, clampTableConfig, createChangeTracker, createDefaultListState, createDefaultTableConfig, createErrorResponse, createMockResponse, createToolbarItem, createToolbarItems, dataUrlToBlob, delay, formatFileSize, formatTableDimensions, getActionShortcut, getAllActions, getAllPositions as getAllIndicatorPositions, getAllVariants as getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getDefaultActions, getDefaultTextContextMenuItems, getImageAcceptString, getImageDimensions, getLoadingVariantLabel, getMarginInUnits, getRecommendedPriority, getRulerDimensions, getSupportedImageExtensions, getSymbolCategories, getSymbolInfo as getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTextActionLabel, getTextActionShortcut, getVariantLabel, isActionAvailable, isTextActionAvailable, isValidImageFile, isValidTableConfig, parseMarginFromUnits, positionToMargin, searchSymbols, symbolFromCodePoint, useContextMenu, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useLoading, useLoadingOperations, useResponsePreview, useResponsiveToolbar, useTextContextMenu, useUnsavedChanges };
|