@eigenpal/docx-js-editor 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunk-3IYNTJO5.js +1 -0
- package/dist/chunk-7KNRIGGW.cjs +1 -0
- package/dist/chunk-AQ35GWDV.js +1 -0
- package/dist/chunk-CDT2SOKB.cjs +9 -0
- package/dist/chunk-CM5WP7HZ.cjs +10 -0
- package/dist/chunk-EU5LN2WS.js +11 -0
- package/dist/chunk-FOU7PS3K.cjs +1 -0
- package/dist/chunk-G4AXMTQY.cjs +11 -0
- package/dist/chunk-HRPNPUU4.js +1 -0
- package/dist/chunk-NI5OFVY2.js +57 -0
- package/dist/chunk-QHWHCIUW.js +1 -0
- package/dist/chunk-RGYAPHXT.cjs +57 -0
- package/dist/chunk-RTESADL3.cjs +1 -0
- package/dist/chunk-T3I3VSJ3.js +9 -0
- package/dist/chunk-XVFMG77A.cjs +1 -0
- package/dist/chunk-YJJ7HRPG.js +10 -0
- package/dist/core-plugins.cjs +1 -7131
- package/dist/core-plugins.js +1 -7102
- package/dist/executor-7DZMHPUF.js +1 -0
- package/dist/executor-FSMRGT73.cjs +1 -0
- package/dist/headless.cjs +4 -10984
- package/dist/headless.d.cts +4 -3
- package/dist/headless.d.ts +4 -3
- package/dist/headless.js +4 -10852
- package/dist/index.cjs +209 -44710
- package/dist/index.css +1 -369
- package/dist/index.d.cts +213 -47
- package/dist/index.d.ts +213 -47
- package/dist/index.js +209 -44385
- package/dist/mcp-cli.js +35 -9557
- package/dist/mcp.cjs +14 -8713
- package/dist/mcp.js +14 -8665
- package/dist/selectionRects-3PJ6FGHQ.js +1 -0
- package/dist/selectionRects-6QL5E7CE.cjs +1 -0
- package/package.json +3 -6
- package/dist/core-plugins.cjs.map +0 -1
- package/dist/core-plugins.js.map +0 -1
- package/dist/headless.cjs.map +0 -1
- package/dist/headless.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp-cli.js.map +0 -1
- package/dist/mcp.cjs.map +0 -1
- package/dist/mcp.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as prosemirror_view from 'prosemirror-view';
|
|
2
2
|
import { EditorView, DecorationSet } from 'prosemirror-view';
|
|
3
3
|
import * as prosemirror_state from 'prosemirror-state';
|
|
4
|
-
import {
|
|
4
|
+
import { Plugin, EditorState, Transaction, PluginKey } from 'prosemirror-state';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
6
|
import React__default, { CSSProperties, ReactNode, Component, ErrorInfo } from 'react';
|
|
7
|
-
import { T as TextFormatting, e as Paragraph, f as Table, a1 as SectionProperties, an as HeaderFooter, h as Document, ab as Theme, U as ParagraphFormatting,
|
|
7
|
+
import { T as TextFormatting, e as Paragraph, f as Table, a1 as SectionProperties, an as HeaderFooter, h as Document, ab as Theme, U as ParagraphFormatting, a8 as TableCell, ao as ParagraphAlignment, a4 as Style, a2 as SelectionContext, A as AIAction, l as AgentResponse, ap as StyleType, aq as BorderSpec, ar as ShadingProperties, R as Run, as as BreakContent, $ as RunContent } from './types-BJXChtaM.js';
|
|
8
8
|
export { i as AIActionRequest, j as AgentCommand, k as AgentContext, m as ApplyStyleCommand, B as BlockContent, at as BookmarkEnd, au as BookmarkStart, C as CorePlugin, q as DeleteTextCommand, D as DocumentBody, r as DocxPackage, E as Endnote, av as Field, aw as FooterReference, F as Footnote, t as FormatTextCommand, ax as HeaderReference, H as Hyperlink, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, L as ListLevel, d as McpSession, M as McpToolDefinition, N as McpToolHandler, O as McpToolResult, Q as NumberingDefinitions, S as ParagraphContext, g as Position, Y as Range, Z as Relationship, _ as ReplaceTextCommand, a3 as SetVariableCommand, ay as Shape, a5 as StyleDefinitions, a7 as SuggestedAction, a9 as TableRow, az as TextBox, aa as TextContent, aA as ThemeColorScheme, aB as ThemeFont, aC as ThemeFontScheme } from './types-BJXChtaM.js';
|
|
9
9
|
import { D as DocumentAgent } from './colorResolver-Yakhydrt.js';
|
|
10
10
|
export { A as AgentContextOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, k as colorsEqual, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, X as processTemplate, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-Yakhydrt.js';
|
|
@@ -245,7 +245,7 @@ interface Line {
|
|
|
245
245
|
/**
|
|
246
246
|
* A laid out page
|
|
247
247
|
*/
|
|
248
|
-
interface Page {
|
|
248
|
+
interface Page$1 {
|
|
249
249
|
/** Page number (1-indexed) */
|
|
250
250
|
pageNumber: number;
|
|
251
251
|
/** Section this page belongs to */
|
|
@@ -303,7 +303,7 @@ interface PageContent {
|
|
|
303
303
|
*/
|
|
304
304
|
interface PageLayoutResult {
|
|
305
305
|
/** All pages */
|
|
306
|
-
pages: Page[];
|
|
306
|
+
pages: Page$1[];
|
|
307
307
|
/** Total page count */
|
|
308
308
|
totalPages: number;
|
|
309
309
|
/** Page number field values by location */
|
|
@@ -429,6 +429,12 @@ declare function formatPageRange(range: {
|
|
|
429
429
|
*/
|
|
430
430
|
declare function isPrintSupported(): boolean;
|
|
431
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Selection State Utilities
|
|
434
|
+
*
|
|
435
|
+
* Extracts selection state from ProseMirror for toolbar integration.
|
|
436
|
+
*/
|
|
437
|
+
|
|
432
438
|
/**
|
|
433
439
|
* Selection state for toolbar integration
|
|
434
440
|
*/
|
|
@@ -448,39 +454,162 @@ interface SelectionState {
|
|
|
448
454
|
/** End paragraph index */
|
|
449
455
|
endParagraphIndex: number;
|
|
450
456
|
}
|
|
457
|
+
|
|
451
458
|
/**
|
|
452
|
-
*
|
|
459
|
+
* Layout Engine Types
|
|
460
|
+
*
|
|
461
|
+
* Core types for the paginated layout engine.
|
|
462
|
+
* Converts document blocks + measurements into positioned fragments on pages.
|
|
453
463
|
*/
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
464
|
+
/**
|
|
465
|
+
* Unique identifier for a block in the document.
|
|
466
|
+
* Format: typically `${index}-${type}` or just the block index.
|
|
467
|
+
*/
|
|
468
|
+
type BlockId = string | number;
|
|
469
|
+
/**
|
|
470
|
+
* Base fragment properties common to all fragment types.
|
|
471
|
+
*/
|
|
472
|
+
type FragmentBase = {
|
|
473
|
+
/** Block ID this fragment belongs to. */
|
|
474
|
+
blockId: BlockId;
|
|
475
|
+
/** X position on page (relative to page left). */
|
|
476
|
+
x: number;
|
|
477
|
+
/** Y position on page (relative to page top). */
|
|
478
|
+
y: number;
|
|
479
|
+
/** Width of the fragment. */
|
|
480
|
+
width: number;
|
|
481
|
+
/** ProseMirror start position (for click mapping). */
|
|
482
|
+
pmStart?: number;
|
|
483
|
+
/** ProseMirror end position (for click mapping). */
|
|
484
|
+
pmEnd?: number;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* A paragraph fragment positioned on a page.
|
|
488
|
+
* May span only part of the paragraph's lines if split across pages.
|
|
489
|
+
*/
|
|
490
|
+
type ParagraphFragment = FragmentBase & {
|
|
491
|
+
kind: 'paragraph';
|
|
492
|
+
/** First line index (inclusive) from the measure. */
|
|
493
|
+
fromLine: number;
|
|
494
|
+
/** Last line index (exclusive) from the measure. */
|
|
495
|
+
toLine: number;
|
|
496
|
+
/** Height of this fragment. */
|
|
497
|
+
height: number;
|
|
498
|
+
/** True if this continues from a previous page. */
|
|
499
|
+
continuesFromPrev?: boolean;
|
|
500
|
+
/** True if this continues onto the next page. */
|
|
501
|
+
continuesOnNext?: boolean;
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* A table fragment positioned on a page.
|
|
505
|
+
* May span only part of the table's rows if split across pages.
|
|
506
|
+
*/
|
|
507
|
+
type TableFragment = FragmentBase & {
|
|
508
|
+
kind: 'table';
|
|
509
|
+
/** First row index (inclusive). */
|
|
510
|
+
fromRow: number;
|
|
511
|
+
/** Last row index (exclusive). */
|
|
512
|
+
toRow: number;
|
|
513
|
+
/** Height of this fragment. */
|
|
514
|
+
height: number;
|
|
515
|
+
/** True if this continues from a previous page. */
|
|
516
|
+
continuesFromPrev?: boolean;
|
|
517
|
+
/** True if this continues onto the next page. */
|
|
518
|
+
continuesOnNext?: boolean;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* An image fragment positioned on a page.
|
|
522
|
+
*/
|
|
523
|
+
type ImageFragment = FragmentBase & {
|
|
524
|
+
kind: 'image';
|
|
525
|
+
/** Height of the image. */
|
|
526
|
+
height: number;
|
|
527
|
+
/** True if this is an anchored/floating image. */
|
|
528
|
+
isAnchored?: boolean;
|
|
529
|
+
/** Z-index for layering. */
|
|
530
|
+
zIndex?: number;
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* Union of all fragment types.
|
|
534
|
+
*/
|
|
535
|
+
type Fragment = ParagraphFragment | TableFragment | ImageFragment;
|
|
536
|
+
/**
|
|
537
|
+
* Page margin configuration.
|
|
538
|
+
*/
|
|
539
|
+
type PageMargins = {
|
|
540
|
+
top: number;
|
|
541
|
+
right: number;
|
|
542
|
+
bottom: number;
|
|
543
|
+
left: number;
|
|
544
|
+
/** Distance from page top to header content. */
|
|
545
|
+
header?: number;
|
|
546
|
+
/** Distance from page bottom to footer content. */
|
|
547
|
+
footer?: number;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* A rendered page containing positioned fragments.
|
|
551
|
+
*/
|
|
552
|
+
type Page = {
|
|
553
|
+
/** Page number (1-indexed). */
|
|
554
|
+
number: number;
|
|
555
|
+
/** Fragments positioned on this page. */
|
|
556
|
+
fragments: Fragment[];
|
|
557
|
+
/** Page margins. */
|
|
558
|
+
margins: PageMargins;
|
|
559
|
+
/** Page size (width, height). */
|
|
560
|
+
size: {
|
|
561
|
+
w: number;
|
|
562
|
+
h: number;
|
|
563
|
+
};
|
|
564
|
+
/** Page orientation. */
|
|
565
|
+
orientation?: 'portrait' | 'landscape';
|
|
566
|
+
/** Section index this page belongs to. */
|
|
567
|
+
sectionIndex?: number;
|
|
568
|
+
/** Header/footer references for this page. */
|
|
569
|
+
headerFooterRefs?: {
|
|
570
|
+
headerDefault?: string;
|
|
571
|
+
headerFirst?: string;
|
|
572
|
+
headerEven?: string;
|
|
573
|
+
footerDefault?: string;
|
|
574
|
+
footerFirst?: string;
|
|
575
|
+
footerEven?: string;
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Column layout configuration.
|
|
580
|
+
*/
|
|
581
|
+
type ColumnLayout = {
|
|
582
|
+
count: number;
|
|
583
|
+
gap: number;
|
|
584
|
+
equalWidth?: boolean;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Header/footer layout for a specific type.
|
|
588
|
+
*/
|
|
589
|
+
type HeaderFooterLayout = {
|
|
590
|
+
height: number;
|
|
591
|
+
fragments: Fragment[];
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* Final layout output ready for rendering/painting.
|
|
595
|
+
*/
|
|
596
|
+
type Layout = {
|
|
597
|
+
/** Default page size for the document. */
|
|
598
|
+
pageSize: {
|
|
599
|
+
w: number;
|
|
600
|
+
h: number;
|
|
601
|
+
};
|
|
602
|
+
/** All rendered pages with positioned fragments. */
|
|
603
|
+
pages: Page[];
|
|
604
|
+
/** Column configuration (if multi-column). */
|
|
605
|
+
columns?: ColumnLayout;
|
|
606
|
+
/** Header layouts by type (default, first, even). */
|
|
607
|
+
headers?: Record<string, HeaderFooterLayout>;
|
|
608
|
+
/** Footer layouts by type (default, first, even). */
|
|
609
|
+
footers?: Record<string, HeaderFooterLayout>;
|
|
610
|
+
/** Gap between pages in pixels (for rendering). */
|
|
611
|
+
pageGap?: number;
|
|
612
|
+
};
|
|
484
613
|
|
|
485
614
|
/**
|
|
486
615
|
* Generic Plugin Interface for the DOCX Editor
|
|
@@ -711,6 +840,49 @@ interface PluginHostRef {
|
|
|
711
840
|
refreshPluginStates: () => void;
|
|
712
841
|
}
|
|
713
842
|
|
|
843
|
+
/**
|
|
844
|
+
* PagedEditor Component
|
|
845
|
+
*
|
|
846
|
+
* Main paginated editing component that integrates:
|
|
847
|
+
* - HiddenProseMirror: off-screen editor for keyboard input
|
|
848
|
+
* - Layout engine: computes page layout from PM state
|
|
849
|
+
* - DOM painter: renders pages to visible DOM
|
|
850
|
+
* - Selection overlay: renders caret and selection highlights
|
|
851
|
+
*
|
|
852
|
+
* Architecture:
|
|
853
|
+
* 1. User clicks on visible pages → hit test → update PM selection
|
|
854
|
+
* 2. User types → hidden PM receives input → PM transaction
|
|
855
|
+
* 3. PM transaction → convert to blocks → measure → layout → paint
|
|
856
|
+
* 4. Selection changes → compute rects → update overlay
|
|
857
|
+
*/
|
|
858
|
+
|
|
859
|
+
interface PagedEditorRef {
|
|
860
|
+
/** Get the current document. */
|
|
861
|
+
getDocument(): Document | null;
|
|
862
|
+
/** Get the ProseMirror EditorState. */
|
|
863
|
+
getState(): EditorState | null;
|
|
864
|
+
/** Get the ProseMirror EditorView. */
|
|
865
|
+
getView(): EditorView | null;
|
|
866
|
+
/** Focus the editor. */
|
|
867
|
+
focus(): void;
|
|
868
|
+
/** Blur the editor. */
|
|
869
|
+
blur(): void;
|
|
870
|
+
/** Check if focused. */
|
|
871
|
+
isFocused(): boolean;
|
|
872
|
+
/** Dispatch a transaction. */
|
|
873
|
+
dispatch(tr: Transaction): void;
|
|
874
|
+
/** Undo. */
|
|
875
|
+
undo(): boolean;
|
|
876
|
+
/** Redo. */
|
|
877
|
+
redo(): boolean;
|
|
878
|
+
/** Set selection by PM position. */
|
|
879
|
+
setSelection(anchor: number, head?: number): void;
|
|
880
|
+
/** Get current layout. */
|
|
881
|
+
getLayout(): Layout | null;
|
|
882
|
+
/** Force re-layout. */
|
|
883
|
+
relayout(): void;
|
|
884
|
+
}
|
|
885
|
+
|
|
714
886
|
/**
|
|
715
887
|
* DocxEditor props
|
|
716
888
|
*/
|
|
@@ -759,7 +931,7 @@ interface DocxEditorProps {
|
|
|
759
931
|
rulerUnit?: 'inch' | 'cm';
|
|
760
932
|
/** Initial zoom level (default: 1.0) */
|
|
761
933
|
initialZoom?: number;
|
|
762
|
-
/** Whether the editor is read-only */
|
|
934
|
+
/** Whether the editor is read-only. When true, hides toolbar, rulers, and variable panel */
|
|
763
935
|
readOnly?: boolean;
|
|
764
936
|
/** Custom toolbar actions */
|
|
765
937
|
toolbarExtra?: ReactNode;
|
|
@@ -787,12 +959,6 @@ interface DocxEditorProps {
|
|
|
787
959
|
onCut?: () => void;
|
|
788
960
|
/** Callback when content is pasted */
|
|
789
961
|
onPaste?: () => void;
|
|
790
|
-
/**
|
|
791
|
-
* Use paginated editor mode (experimental).
|
|
792
|
-
* When enabled, shows true paginated editing with visible page breaks.
|
|
793
|
-
* When disabled (default), uses standard ProseMirror editor.
|
|
794
|
-
*/
|
|
795
|
-
usePaginatedEditor?: boolean;
|
|
796
962
|
/**
|
|
797
963
|
* Callback when rendered DOM context is ready (for plugin overlays).
|
|
798
964
|
* Used by PluginHost to get access to the rendered page DOM for positioning.
|
|
@@ -812,8 +978,8 @@ interface DocxEditorRef {
|
|
|
812
978
|
getAgent: () => DocumentAgent | null;
|
|
813
979
|
/** Get the current document */
|
|
814
980
|
getDocument: () => Document | null;
|
|
815
|
-
/** Get the
|
|
816
|
-
getEditorRef: () =>
|
|
981
|
+
/** Get the editor ref */
|
|
982
|
+
getEditorRef: () => PagedEditorRef | null;
|
|
817
983
|
/** Save the document to buffer */
|
|
818
984
|
save: () => Promise<ArrayBuffer | null>;
|
|
819
985
|
/** Set zoom level */
|
|
@@ -1380,7 +1546,7 @@ interface DocumentViewerProps {
|
|
|
1380
1546
|
/** Callback when page becomes visible */
|
|
1381
1547
|
onPageVisible?: (pageNumber: number) => void;
|
|
1382
1548
|
/** Callback when document is clicked */
|
|
1383
|
-
onDocumentClick?: (e: React__default.MouseEvent, page: Page | null) => void;
|
|
1549
|
+
onDocumentClick?: (e: React__default.MouseEvent, page: Page$1 | null) => void;
|
|
1384
1550
|
/** Additional CSS class name */
|
|
1385
1551
|
className?: string;
|
|
1386
1552
|
/** Additional inline styles */
|
|
@@ -4426,7 +4592,7 @@ declare function createSelectionFromDOM(): ClipboardSelection | null;
|
|
|
4426
4592
|
*/
|
|
4427
4593
|
declare function useClipboard(options?: UseClipboardOptions): UseClipboardReturn;
|
|
4428
4594
|
|
|
4429
|
-
declare const PLUGIN_HOST_STYLES = "\n.plugin-host {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: visible;\n position: relative;\n}\n\n.plugin-host-editor {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: visible;\n}\n\n\n.plugin-panels-left,\n.plugin-panels-right {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n background: #f8f9fa;\n border-color: #e9ecef;\n}\n\n.plugin-panels-left {\n border-right: 1px solid #e9ecef;\n}\n\n.plugin-panels-right {\n border-left: 1px solid #e9ecef;\n}\n\n.plugin-panels-bottom {\n border-top: 1px solid #e9ecef;\n background: #f8f9fa;\n}\n\n.plugin-panel {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n transition: width 0.2s ease, height 0.2s ease;\n}\n\n.plugin-panel.collapsed {\n overflow: visible;\n}\n\n.plugin-panel-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n flex-direction: column;\n height: 100%;\n padding: 8px 6px;\n}\n\n.plugin-panel-toggle:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.plugin-panel-toggle-icon {\n font-weight: bold;\n font-size: 14px;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle-icon {\n transform: rotate(90deg);\n}\n\n.plugin-panel-toggle-label {\n font-weight: 500;\n}\n\n.plugin-panel-content {\n flex: 1;\n overflow: auto;\n}\n\n/*
|
|
4595
|
+
declare const PLUGIN_HOST_STYLES = "\n.plugin-host {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: visible;\n position: relative;\n}\n\n.plugin-host-editor {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: visible;\n}\n\n\n.plugin-panels-left,\n.plugin-panels-right {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n background: #f8f9fa;\n border-color: #e9ecef;\n}\n\n.plugin-panels-left {\n border-right: 1px solid #e9ecef;\n}\n\n.plugin-panels-right {\n border-left: 1px solid #e9ecef;\n}\n\n.plugin-panels-bottom {\n border-top: 1px solid #e9ecef;\n background: #f8f9fa;\n}\n\n.plugin-panel {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n transition: width 0.2s ease, height 0.2s ease;\n}\n\n.plugin-panel.collapsed {\n overflow: visible;\n}\n\n.plugin-panel-toggle {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle {\n writing-mode: vertical-rl;\n text-orientation: mixed;\n flex-direction: column;\n height: 100%;\n padding: 8px 6px;\n}\n\n.plugin-panel-toggle:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.plugin-panel-toggle-icon {\n font-weight: bold;\n font-size: 14px;\n}\n\n.plugin-panel.collapsed .plugin-panel-toggle-icon {\n transform: rotate(90deg);\n}\n\n.plugin-panel-toggle-label {\n font-weight: 500;\n}\n\n.plugin-panel-content {\n flex: 1;\n overflow: auto;\n}\n\n/* Right panel rendered inside viewport - scrolls with content */\n.plugin-panel-in-viewport {\n position: absolute;\n top: 0;\n /* Position is set dynamically via inline styles based on page edge */\n width: 220px;\n pointer-events: auto;\n z-index: 10;\n overflow: visible;\n}\n\n.plugin-panel-in-viewport.collapsed {\n width: 32px;\n}\n\n.plugin-panel-in-viewport .plugin-panel-toggle {\n position: sticky;\n top: 0;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 4px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.plugin-panel-in-viewport-content {\n overflow: visible;\n position: relative;\n}\n\n/* Plugin overlay container for rendering highlights/decorations */\n.plugin-overlays-container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n z-index: 5;\n}\n\n.plugin-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.plugin-overlay > * {\n pointer-events: auto;\n}\n";
|
|
4430
4596
|
/**
|
|
4431
4597
|
* PluginHost Component
|
|
4432
4598
|
*
|
|
@@ -4574,6 +4740,6 @@ declare const templatePlugin: EditorPlugin<TemplatePluginState>;
|
|
|
4574
4740
|
* import '@eigenpal/docx-js-editor/styles/editor.css';
|
|
4575
4741
|
* ```
|
|
4576
4742
|
*/
|
|
4577
|
-
declare const VERSION = "0.0.
|
|
4743
|
+
declare const VERSION = "0.0.2";
|
|
4578
4744
|
|
|
4579
4745
|
export { AIAction, ANNOTATION_PANEL_STYLES, AgentResponse, AlignmentButtons, type AlignmentButtonsProps, AnnotationPanel, type AutoSaveStatus, BORDER_POSITIONS, BORDER_STYLES, BORDER_WIDTHS, type BorderConfig, type BorderPosition, type BorderStyleType, CLIPBOARD_TYPES, CellBackgroundPicker, type CellBackgroundPickerProps, type CellColorOption, type ClipboardContent, type ClipboardOptions, type ClipboardSelection, type ColorOption, ColorPicker, type ColorPickerProps, ContextMenu, type ContextMenuProps, DEFAULT_BORDER_CONFIG, DEFAULT_CELL_COLORS, DEFAULT_SELECTION_STYLE, type KeyboardShortcut$1 as DialogKeyboardShortcut, Document, DocumentAgent, DocumentViewer, type DocumentViewerProps, DocxEditor, type DocxEditorProps, type DocxEditorRef, type EditorPlugin, ErrorBoundary, type ErrorBoundaryProps, type ErrorContextValue, type ErrorNotification, ErrorProvider, type ErrorSeverity, type FindMatch, type FindOptions, FindReplaceDialog, type FindReplaceDialogProps, type FindReplaceOptions, type FindReplaceState, type FindResult, type FontOption, FontPicker, type FontPickerProps, FontSizePicker, type FontSizePickerProps, HIGH_CONTRAST_SELECTION_STYLE, HeaderFooter, type HighlightOptions, type HighlightRect, HorizontalRuler, type HorizontalRulerProps, type HyperlinkData, HyperlinkDialog, type HyperlinkDialogProps, INTERNAL_CLIPBOARD_TYPE, type ImageData, type IndicatorPosition, type IndicatorVariant, InsertImageDialog, type InsertImageDialogProps, type InsertPosition, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogProps, type KeyboardShortcut, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, type LineSpacingOption, LineSpacingPicker, type LineSpacingPickerProps, ListButtons, type ListButtonsProps, type ListState, LoadingIndicator, type LoadingIndicatorProps, type LoadingOperation, type LoadingSize, type LoadingVariant, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, PLUGIN_HOST_STYLES, type PageIndicatorPosition, type PageIndicatorVariant, PageNavigator, type PageNavigatorPosition, type PageNavigatorProps, type PageNavigatorVariant, PageNumberIndicator, type PageNumberIndicatorProps, type PanelConfig, Paragraph, ParagraphFormatting, ParseErrorDisplay, type ParseErrorDisplayProps, type ParsedClipboardContent, type PasteOption, PasteSpecialDialog, type PasteSpecialDialogProps, type PluginContext, PluginHost, type PluginHostProps, type PluginHostRef, type PluginPanelProps, PrintButton, type PrintButtonProps, type PrintOptions, PrintPreview, type PrintPreviewProps, PrintStyles, ResponsePreview, type ResponsePreviewProps, type ResponsePreviewState, ResponsiveToolbar, ToolbarGroup as ResponsiveToolbarGroup, type ToolbarGroupProps as ResponsiveToolbarGroupProps, type ResponsiveToolbarProps, Run, RunContent, SELECTION_CSS_VARS, SYMBOL_CATEGORIES, type SavedDocumentData, SectionProperties, SelectionContext, type SelectionHighlightConfig, type SelectionOverlayProps, type SelectionRange, type ShortcutCategory, Style, type StyleOption, StylePicker, type StylePickerProps, type SymbolCategory, TABLE_DATA_ATTRIBUTES, TEMPLATE_DECORATION_STYLES, Table, type TableAction, TableBorderPicker, type TableBorderPickerProps, TableCell, type TableConfig, type TableContext, type TableSelection, type TableSelectionState, TableToolbar, type TableToolbarProps, type TagType, type TemplateTag, type TextContextAction, TextContextMenu, type TextContextMenuItem, type TextContextMenuProps, TextFormatting, Theme, Toolbar, ToolbarButton, ToolbarGroup$1 as ToolbarGroup, type ToolbarItem, type ToolbarItemPriority, type ToolbarProps, ToolbarSeparator, UnsavedIndicator, type UnsavedIndicatorProps, UnsupportedFeatureWarning, type UnsupportedFeatureWarningProps, type UseAutoSaveOptions, type UseAutoSaveReturn, type UseClipboardOptions, type UseClipboardReturn, type UseFindReplaceReturn, type UseKeyboardShortcutsDialogOptions, type UseKeyboardShortcutsDialogReturn, type UseLoadingOptions, type UseLoadingReturn, type UsePasteSpecialOptions, type UsePasteSpecialReturn, type UseResponsiveToolbarOptions, type UseResponsiveToolbarReturn, type UseSelectionHighlightOptions, type UseSelectionHighlightReturn, type UseTableSelectionOptions, type UseTableSelectionReturn, type UseTextContextMenuOptions, type UseTextContextMenuReturn, type UseUnsavedChangesOptions, type UseUnsavedChangesReturn, type UseWheelZoomOptions, type UseWheelZoomReturn, VERSION, VariablePanel, type VariablePanelProps, type WordSelectionResult, ZOOM_PRESETS, ZoomControl, type ZoomControlProps, addColumn, addRow, areSelectionStylesInjected, calculateFitDimensions, calculateFitPageZoom, calculateFitWidthZoom, calculateProgress, calculateScrollToPage, calculateVisiblePage, canRenderFont, clampPageNumber, clampTableConfig, clampZoom, cleanWordHtml, clearSelection, copyParagraphs, copyRuns, countPageBreaks, createBorderConfig, createBorderSpec, createCellColorOption, createChangeTracker, createClipboardHandlers, createColumnBreak, createDefaultFindOptions, createDefaultListState, createDefaultTableConfig, createDoubleClickWordSelector, createErrorResponse, createHorizontalRule, createLineBreak, createMockResponse, createPageBreak, createPageBreakParagraph, createPageBreakRun, createPageFormat, createSearchPattern, createSelectionChangeHandler, createSelectionFromDOM, createShadingFromColor, createTableContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, createToolbarItem, createToolbarItems, createTripleClickParagraphSelector, dataUrlToBlob, DocxEditor as default, delay, deleteColumn, deleteRow, describeShortcut, escapeRegexString, expandSelectionToWord, expandSelectionToWordBoundaries, extendSelectionTo, findAllMatches, findInDocument, findInParagraph, findNearestZoomPreset, findNextWordStart, findPageBreaks, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordAt, findWordBoundaries, findWordEnd, findWordStart, formatFileSize, formatLastSaveTime, formatPageOrdinal, formatPageRange$1 as formatPageRange, formatPageRange as formatPrintPageRange, formatShortcutKeys, formatStorageSize, formatTableDimensions, formatZoom, generateOverlayElements, generateSelectionCSS, getActionShortcut, getAllActions, getAllCategories, getAllPositions as getAllIndicatorPositions, getAllVariants as getAllIndicatorVariants, getAllLoadingSizes, getAllLoadingVariants, getAllPasteOptions, getAutoSaveStatusLabel, getAutoSaveStorageSize, getAvailableBorderStyles, getAvailableBorderWidths, getBorderPositionLabel, getCategoryLabel, getCellAt, getCellColorName, getColorFromShading, getColumnCount, getCommonShortcuts, getContrastingTextColor, getDefaultActions, getDefaultCellColors, getDefaultHighlightOptions, getDefaultPasteOption, getDefaultPrintOptions, getDefaultShortcuts, getDefaultTextContextMenuItems, getHighlightRectStyle, getImageAcceptString, getImageDimensions, getLoadedFonts, getLoadingVariantLabel, getMarginInUnits, getMatchCountText, getMergedSelectionRects, getNavigationShortcutDescriptions, getNavigationShortcuts, getNextZoomPreset, getPageProgress, getPasteOption, getPreviousZoomPreset, getRecommendedPriority, getRulerDimensions, getSelectedText, getSelectionBoundingRect, getSelectionInfo, getSelectionRects, getSelectionRuns, getShortcutsByCategory, getSupportedImageExtensions, getSymbolCategories, getSymbolInfo as getSymbolUnicodeInfo, getSymbolsByCategory, getTablePresets, getTemplateTags as getTemplatePluginTags, getTextActionLabel, getTextActionShortcut, getUserFriendlyMessage, getVariantLabel, getVisiblePages, getWordAt, getWordAtCursor, getZoomPresets, handleClickForMultiClick, handleNavigationKey, handlePasteEvent, hasActiveSelection, hasPageBreakBefore, highlightTextRange, htmlToRuns, injectSelectionStyles, insertHorizontalRule, insertPageBreak, isActionAvailable, isAutoSaveSupported, isBreakContent, isColumnBreak, isDefaultCellColor, isEditorHtml, isEmptySearch, isFirstPage, isFontLoaded, isLoading as isFontsLoading, isLastPage, isLineBreak, isNavigationKey, isPageBreak, isParseError, isPasteSpecialShortcut, isPrintSupported, isPunctuation, isSelectionBackwards, isSelectionWithin, isTextActionAvailable, isValidImageFile, isValidPageNumber, isValidTableConfig, isWhitespace$1 as isWhitespace, isWhitespace as isWhitespaceChar, isWordCharacter as isWordChar, isWordCharacter$1 as isWordCharacter, isWordHtml, isZoomPreset, loadFont, loadFontFromBuffer, loadFonts, mapStyleToCss, matchesShortcut, mergeAdjacentRects, mergeCells, moveByWord, moveToLineEdge, normalizeSelectionDirection, onFontsLoaded, openPrintWindow, paragraphsToClipboardContent, parseClipboardHtml, parseMarginFromUnits, parseNavigationAction, parsePageInput, parsePageRange, parseZoom, positionToMargin, preloadCommonFonts, readFromClipboard, removePageBreak, removeSelectionStyles, replaceAllInContent, replaceFirstInContent, runsToClipboardContent, scrollToMatch, scrollToPage, searchSymbols, selectParagraphAtCursor, selectRange, selectWordAtCursor, selectWordInTextNode, setHoveredElement, setSelectedElement, setSelectionPosition, splitCell, symbolFromCodePoint, templatePlugin, templatePluginKey, triggerPrint, useAutoSave, useClipboard, useContextMenu, useErrorNotifications, useFindReplace, useHyperlinkDialog, useInsertImageDialog, useInsertSymbolDialog, useInsertTableDialog, useKeyboardShortcutsDialog, useLoading, useLoadingOperations, usePasteSpecial, useResponsePreview, useResponsiveToolbar, useSelectionHighlight, useTableSelection, useTextContextMenu, useUnsavedChanges, useWheelZoom, writeToClipboard };
|