oasis-editor 0.0.409 → 0.0.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{OasisEditorApp-BTqHA3Iq.js → OasisEditorApp-D1ATv4z4.js} +1 -1
- package/dist/core/commands/tableOfContents.d.ts +13 -1
- package/dist/core/document/tcEntries.d.ts +7 -1
- package/dist/core/document/tocFields.d.ts +4 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorState, EditorLayoutDocument } from '../model.js';
|
|
2
|
+
import { TcOccurrence } from '../document/tcEntries.js';
|
|
2
3
|
import { TocFieldSettings } from '../document/tocFields.js';
|
|
3
4
|
/** Default TOC scope: outline levels 1–3, matching Word's `TOC \o "1-3"`. */
|
|
4
5
|
export declare const DEFAULT_TOC_MAX_LEVEL = 3;
|
|
@@ -7,9 +8,10 @@ export interface TocHeading {
|
|
|
7
8
|
id: string;
|
|
8
9
|
level: number;
|
|
9
10
|
text: string;
|
|
11
|
+
tc?: TcOccurrence;
|
|
10
12
|
}
|
|
11
13
|
/** Page number resolver: heading paragraph id → printed page number. */
|
|
12
|
-
export type TocPageNumberResolver = (headingId: string) => number | string | undefined;
|
|
14
|
+
export type TocPageNumberResolver = (headingId: string, tc?: TcOccurrence) => number | string | undefined;
|
|
13
15
|
/**
|
|
14
16
|
* Collect heading paragraphs (levels 1..maxLevel) in document order. Headings
|
|
15
17
|
* are detected case-insensitively via {@link getHeadingLevel}, so both the
|
|
@@ -21,6 +23,16 @@ export declare function collectTocHeadings(state: EditorState, maxLevel?: number
|
|
|
21
23
|
* remove an imported cache because a style could not be resolved.
|
|
22
24
|
*/
|
|
23
25
|
export declare function collectQualifiedTocHeadings(state: EditorState, options: TocFieldSettings, maxLevel?: number): TocHeading[] | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Build the paragraph that holds an entry: "<title>\t<page>", with a right tab
|
|
28
|
+
* stop (dot leader) at the content's right edge so the page number aligns to
|
|
29
|
+
* the margin with a dotted leader, indented by outline level.
|
|
30
|
+
*
|
|
31
|
+
* Entries inherit the Normal character style (plain, no bold/color), matching
|
|
32
|
+
* Word's regenerated TOC1/TOC2/TOC3 look — levels are distinguished only by the
|
|
33
|
+
* left indent.
|
|
34
|
+
*/
|
|
35
|
+
export declare function tocEntryText(heading: TocHeading, page: number | string | undefined): string;
|
|
24
36
|
/**
|
|
25
37
|
* Insert a generated table of contents after the block holding the caret.
|
|
26
38
|
* Operates on section blocks (not the flattened paragraph list) so it is safe
|
|
@@ -24,4 +24,10 @@ export declare function parseTcInstruction(raw: string): TcInstruction | undefin
|
|
|
24
24
|
export declare function collectTcOccurrences(document: EditorDocument): TcOccurrence[] | undefined;
|
|
25
25
|
/** Resolve the printed label at the TC marker's actual offset using a
|
|
26
26
|
* completed layout. No page guessed from a paragraph's first line. */
|
|
27
|
-
export declare function resolveTcPageLabel(document: EditorDocument, layout: EditorLayoutDocument, entry: TcOccurrence
|
|
27
|
+
export declare function resolveTcPageLabel(document: EditorDocument, layout: EditorLayoutDocument, entry: TcOccurrence, context?: {
|
|
28
|
+
bookmarkText: (name: string) => string | null | undefined;
|
|
29
|
+
bookmarkPage: (name: string) => number | null | undefined;
|
|
30
|
+
pageIndexAt: (paragraphId: string, offset: number) => number | undefined;
|
|
31
|
+
forPage: (pageIndex: number) => import('./fieldEvaluation.js').FieldEvaluationContext;
|
|
32
|
+
forPosition: (paragraphId: string, offset: number) => import('./fieldEvaluation.js').FieldEvaluationContext;
|
|
33
|
+
}): string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorBlockNode, EditorDocument, EditorLayoutDocument } from '../model.js';
|
|
2
|
+
import { TcOccurrence } from './tcEntries.js';
|
|
2
3
|
export interface TocFieldSettings {
|
|
3
4
|
startLevel: number;
|
|
4
5
|
endLevel: number;
|
|
@@ -11,6 +12,8 @@ export interface TocFieldSettings {
|
|
|
11
12
|
level: number;
|
|
12
13
|
}[];
|
|
13
14
|
customOnly?: true;
|
|
15
|
+
/** Explicit TC-only identifier; mixed heading sources are not qualified. */
|
|
16
|
+
tcIdentifier?: string;
|
|
14
17
|
}
|
|
15
18
|
export interface QualifiedTocRegion extends TocFieldSettings {
|
|
16
19
|
startBlockIndex: number;
|
|
@@ -25,4 +28,4 @@ export declare function parseTocInstruction(raw: string): TocFieldSettings | und
|
|
|
25
28
|
export declare function findQualifiedTocRegion(blocks: readonly EditorBlockNode[]): QualifiedTocRegion | undefined;
|
|
26
29
|
/** Read-only, geometry-certified heading page numbers; never infer from
|
|
27
30
|
* paragraph order. A missing or uncertain physical section/page is unresolved. */
|
|
28
|
-
export declare function createTocPageNumberResolver(document: EditorDocument, layout: EditorLayoutDocument): (headingId: string) => number | string | undefined;
|
|
31
|
+
export declare function createTocPageNumberResolver(document: EditorDocument, layout: EditorLayoutDocument): (headingId: string, tc?: TcOccurrence) => number | string | undefined;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Bi as t,Br as a,Bt as o,Ct as r,Dt as i,Et as s,Fi as n,Ft as l,Gr as g,Hi as d,Hr as c,Ht as p,Ii as m,Ir as u,It as b,Ki as f,Kr as h,Li as S,Lr as C,Mi as x,Mt as P,Ni as T,Nr as F,Nt as B,Ot as v,Pi as _,Pr as k,Pt as w,Qi as y,Ri as A,Rr as D,Rt as R,St as L,Tt as I,Ur as H,Ut as N,Vi as O,Vr as M,Vt as E,Wi as W,Wr as j,Xi as z,_a as U,_t as q,bt as K,ca as V,di as $,dt as G,fa as J,ft as X,ga as Q,gi as Y,hi as Z,ji as ee,jt as te,kt as ae,li as oe,lt as re,ma as ie,ni as se,oa as ne,pt as le,qr as ge,ra as de,ri as ce,sn as pe,t as me,ta as ue,ui as be,ut as fe,va as he,vi as Se,vt as Ce,wt as xe,xt as Pe,yt as Te,zr as Fe,zt as Be}from"./defaultToolbar-DOUMCB_G.js";function ve(e={}){const t=f(()=>e.ui?.locale??"pt-BR"),[a,o]=J(0),[r,i]=J(null),s=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return U(()=>{const e=performance.now();let t=!1;const a=()=>{if(t)return;const r=performance.now()-e;o(.9*(1-Math.exp(-r/5e3))),requestAnimationFrame(a)};requestAnimationFrame(a),Q(()=>{t=!0}),import("./OasisEditorApp-BTqHA3Iq.js").then(e=>{t=!0,o(1),setTimeout(()=>i(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),V(W,{translator:t,get children(){return V(ne,{get when(){return r()},get fallback(){return V(d,{variant:"fill",get progress(){return a()},get label(){return s()?.label},get class(){return s()?.class},get style(){return s()?.style}})},children:t=>{const a=t();return V(a,e)}})}})}function _e(e,t={}){const a=Z(),o=y(()=>ve({...t,runtime:{...t.runtime,client:a}}),e);return a.setDispose(()=>{o(),e.innerHTML=""}),a}function ke(e){return V(ve,ie(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function we(e,t={}){const a=Z(),o=y(()=>ke({...t,runtime:{...t.runtime,client:a}}),e);return a.setDispose(()=>{o(),e.innerHTML=""}),a}function ye(e){return{execute(t,a){const o=O(t,a);return e.commands.execute(o.name,o.payload)},canExecute(t,a){const o=O(t,a);return e.commands.canExecute(o.name,o.payload)},state(t){const a=O(t);return e.commands.state(a.name,a.payload)}}}var Ae=["selectAll","selectWord","selectSentence","selectParagraph","selectCollapse","selectText","selectRange","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","paste","pasteAsPlainText","pasteMergeFormatting","formatPainter","formatPainterContinuous","cancelFormatPainter","bold","italic","underline","doubleUnderline","wordUnderline","strike","doubleStrike","smallCaps","allCaps","hidden","noProof","webHidden","specVanish","contextualAlternates","characterBorder","shadow","emboss","engrave","outline","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","replaceAll","toggleTrackChanges","toggleRevisionMarkup","showMarkupOptions","applyShowMarkup","toggleOutlinePanel","toggleRevisionsPanel","openCommandSearch","repeatLastAction","acceptRevisions","rejectRevisions","setReviewDisplayMode","acceptAllRevisions","rejectAllRevisions","requestAcceptAllRevisions","requestRejectAllRevisions","nextRevision","previousRevision","nextComment","previousComment","newComment","replyComment","editComment","toggleCommentsPanel","resolveComment","reopenComment","deleteComment","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","columnBreak","splitBlock","insertNonBreakingSpace","insertNonBreakingHyphen","insertOptionalHyphen","insertEmDash","insertEllipsis","insertCopyright","insertRegistered","insertTrademark","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","growFont1","shrinkFont1","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","applyUnderlineStyle","setUnderlineColor","setCharacterScale","setCharacterSpacing","setRunSnapToGrid","setFitText","setBaselineShift","setEmphasisMark","setTextEffect","setKerning","setLigatures","setNumberSpacing","setNumberForm","setStylisticSet","documentStyles","print","copy","cut","newDocument","saveDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageFlip","imageRotate","imageBorder","imageTransparency","resetImage","outdent","indent","moveParagraphsUp","moveParagraphsDown","togglePageBreakBefore","toggleKeepWithNext","toggleKeepLinesTogether","toggleWidowControl","toggleParagraphBidi","setParagraphBidi","setParagraphAlign","sortParagraphs","promote","demote","resetParagraphFormatting","setParagraphTabStops","setOutlineLevel","setSpacingAfter","setSpacingBefore","setContextualSpacing","setMirrorIndents","setLineRule","setTextDirection","setSuppressAutoHyphens","setSuppressLineNumbers","setKinsoku","setOverflowPunct","setWordWrap","setAutoSpaceDE","setAutoSpaceDN","setAdjustRightInd","setTopLinePunct","setPageBreakBefore","setKeepWithNext","setKeepLinesTogether","setWidowControl","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","applyHorizontalLine","setDropCap","setLineHeight","setListFormat","setListStartAt","setListLevel","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","sectionBreakEvenPage","sectionBreakOddPage","sectionBreakNextColumn","setPageMargins","setMarginsPreset","setSectionPageNumbering","setPaperSize","setPaperSizePreset","setColumns","setColumnsPreset","setSectionVerticalAlign","setSectionStart","setSectionBidi","setHyphenation","editHeader","editFooter","editFirstPageHeader","editEvenPageHeader","editFirstPageFooter","editEvenPageFooter","insertPageNumber","insertPageNumberXOfY","placePageNumberTop","placePageNumberBottom","insertBookmark","removeBookmark","insertDateField","updateBodyFields","updateSelectedFields","insertDateTime","insertCrossReference","setNoteOptions","exitHeaderFooter","setDifferentFirstPage","setDifferentOddEven","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableDeleteCells","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellAlignment","tableSetCellVerticalAlign","tableSetCellTextDirection","tableToText","textToTable","tableSplitAtRow","tableSortAscending","tableSortDescending","tableDelete","tableRepeatHeaderRows","tableSetCellMargins","tableSetCellSpacing","tableSetTableIndent","tableSetAlignment","tableFormula","tableSelectCell","tableSelectRow","tableSelectColumn","tableSelectTable","tableSetRowHeight","tableSetBreakAcrossPages","tableSetHeaderRow","tableSetColumnWidth","tableSetTableWidth","tableSetCellWidth","tableSetCellNoWrap","tableSetCellFitText","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","setShapeFill","setShapeOutline","setShapeOutlineWidth","alignFloatingObject","reorderFloatingObject","nudgeFloatingObject","setFloatingFixedPosition","setFloatingRotation","setFloatingWrapPreset","setFloatingWrapText","setFloatingPositionPreset","setShapePreset","setTextBoxTextDirection","setTextBoxVerticalAlign","editTextBoxAlt","rotateTextBox","textBoxWidthCm","textBoxHeightCm","openSymbolDialog","openEquationDialog","tableProperties","openFontDialog","openParagraphDialog"];function De(e,t={}){const a=Z(),o=y(()=>V(ve,ie(t,{get runtime(){return{...t.runtime,client:a}}})),e);return a.setDispose(()=>{o(),e.innerHTML=""}),Object.assign(a,{unmount:()=>a.dispose()})}var Re=/*#__PURE__*/de("<div>");function Le(e){const[t,a]=he(e,["align","wrap","class","classList","children"]);return o=Re(),ue(o,ie({get class(){return`oasis-editor-ui-action-row ${t.class??""}`},get classList(){return{[`oasis-editor-ui-action-row-${t.align??"start"}`]:!0,"oasis-editor-ui-action-row-nowrap":!1===t.wrap,...t.classList}}},a),!1,!0),z(o,()=>t.children),o;var o}var Ie=/*#__PURE__*/de("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ne(e){const[t,a]=he(e,["align","class","style","children"]);return o=Ie(),ue(o,ie({get class(){return`oasis-editor-ui-field-row ${t.class??""}`},get style(){return{"align-items":He[t.align??"end"],..."object"==typeof t.style?t.style:{}}}},a),!1,!0),z(o,()=>t.children),o;var o}var Oe=/*#__PURE__*/de("<div>");function Me(e){const[t,a]=he(e,["align","class","classList","children"]);return o=Oe(),ue(o,ie({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},a),!1,!0),z(o,()=>t.children),o;var o}var Ee={saveDocument:"editor-toolbar-save-document",newDocument:"editor-toolbar-new-document",importDocument:"editor-toolbar-import-document",exportDocx:"editor-toolbar-export-docx",exportPdf:"editor-toolbar-export-pdf",print:"editor-toolbar-print",undo:"editor-toolbar-undo",redo:"editor-toolbar-redo",style:"editor-toolbar-style",fontFamily:"editor-toolbar-font-family",fontSize:"editor-toolbar-font-size",color:"editor-toolbar-color",highlight:"editor-toolbar-highlight",textShading:"editor-toolbar-text-shading",bold:"editor-toolbar-bold",italic:"editor-toolbar-italic",underlineControl:"editor-toolbar-underline-control",strike:"editor-toolbar-strike",superscript:"editor-toolbar-superscript",subscript:"editor-toolbar-subscript",insertImage:"editor-toolbar-insert-image",insertTable:"editor-toolbar-insert-table",symbols:"editor-toolbar-symbols",link:"editor-toolbar-link",unlink:"editor-toolbar-unlink",footnote:"editor-toolbar-footnote",imageAlt:"editor-toolbar-image-alt",imageCaption:"editor-toolbar-image-caption",alignLeft:"editor-toolbar-align-left",alignCenter:"editor-toolbar-align-center",alignRight:"editor-toolbar-align-right",alignJustify:"editor-toolbar-align-justify",bulletList:"editor-toolbar-list-bullet",orderedList:"editor-toolbar-list-ordered",outdent:"editor-toolbar-list-outdent",indent:"editor-toolbar-list-indent",listOptions:"editor-toolbar-list-options",specialIndent:"editor-toolbar-special-indent",lineSpacing:"editor-toolbar-line-spacing-control",metrics:"editor-toolbar-metrics",margins:"editor-toolbar-margins",section:"editor-toolbar-section"},We={fileNew:"file_new",fileImport:"file_import",fileSave:"file_save",fileExport:"file_export",fileExportPdf:"file_export_pdf",fileExportDocx:"file_export_docx",filePrint:"file_print",editUndo:"edit_undo",editRedo:"edit_redo",editCopy:"edit_copy",editFind:"edit_find",editSelectAll:"edit_selectAll",viewMargins:"view_margins",viewParagraphMarks:"view_paragraph_marks",viewPreciseFonts:"view_precise_fonts",insertImage:"insert_image",insertImageCaption:"insert_image_caption",insertTable:"insert_table",insertLink:"insert_link",insertFootnote:"insert_footnote",insertPageBreak:"insert_pageBreak",formatText:"format_text",formatTextBold:"format_text_bold",formatTextItalic:"format_text_italic",formatTextUnderline:"format_text_underline",formatTextStrike:"format_text_strike",formatAlign:"format_align",formatAlignLeft:"format_align_left",formatAlignCenter:"format_align_center",formatAlignRight:"format_align_right",formatAlignJustify:"format_align_justify",formatLists:"format_lists",formatListsBullet:"format_lists_bullet",formatListsNumbered:"format_lists_numbered"};export{Le as ActionRow,w as BalloonShell,pe as Button,r as Checkbox,xe as ColorField,Fe as ColorPicker,Fe as ToolbarColorPicker,be as CommandRegistry,C as DEFAULT_PALETTE,B as Dialog,Me as DialogFooter,b as DocumentShell,ee as EDITOR_SCHEMA_VERSION,oe as Editor,Ce as FieldGroup,Ne as FieldRow,N as FloatingActionButton,i as FormField,v as Grid,D as GridPicker,D as ToolbarGridPicker,te as Heading,R as IconButton,l as InlineShell,H as Menu,H as ToolbarMenu,re as MenuRegistry,Pe as NumberField,Ae as OASIS_BUILTIN_COMMANDS,We as OASIS_MENU_ITEMS,Ee as OASIS_TOOLBAR_ITEMS,ve as OasisEditorAppLazy,ke as OasisEditorContainer,d as OasisEditorLoading,$ as PluginCollection,j as Popover,ge as RIBBON_TABS,Te as Radio,K as RadioGroup,c as Select,c as ToolbarSelect,L as SelectField,M as Separator,M as ToolbarSeparator,Be as SidePanel,o as SidePanelBody,E as SidePanelFooter,p as SidePanelHeader,a as SplitButton,a as ToolbarSplitButton,ae as Stack,e as StatusText,u as StyleGallery,ce as SurfaceButton,P as Tabs,se as Text,I as TextAreaField,s as TextField,q as ToggleChip,F as Toolbar,g as ToolbarButton,h as buildRibbonTabDefinitions,x as cloneDocument,t as commandRefName,me as createDefaultToolbarPreset,T as createDocument,ye as createEditorCommandBus,_ as createHeading,_e as createOasisEditor,we as createOasisEditorContainer,n as createParagraph,m as createTable,fe as createToolbarRegistry,Y as exportEditorDocumentToHtml,Se as importHtmlToEditorDocument,De as mount,S as normalizeDocument,G as projectTrackedRevisions,k as registerToolbarRenderer,X as resolveAllTrackedRevisions,O as resolveCommandRef,le as resolveTrackedRevision,A as validateDocument};
|
|
1
|
+
import{At as e,Bi as t,Br as a,Bt as o,Ct as r,Dt as i,Et as s,Fi as n,Ft as l,Gr as g,Hi as d,Hr as c,Ht as p,Ii as m,Ir as u,It as b,Ki as f,Kr as h,Li as S,Lr as C,Mi as x,Mt as P,Ni as T,Nr as F,Nt as B,Ot as v,Pi as _,Pr as k,Pt as w,Qi as y,Ri as A,Rr as D,Rt as R,St as L,Tt as I,Ur as H,Ut as N,Vi as O,Vr as M,Vt as E,Wi as W,Wr as j,Xi as z,_a as U,_t as q,bt as K,ca as V,di as $,dt as G,fa as J,ft as X,ga as Q,gi as Y,hi as Z,ji as ee,jt as te,kt as ae,li as oe,lt as re,ma as ie,ni as se,oa as ne,pt as le,qr as ge,ra as de,ri as ce,sn as pe,t as me,ta as ue,ui as be,ut as fe,va as he,vi as Se,vt as Ce,wt as xe,xt as Pe,yt as Te,zr as Fe,zt as Be}from"./defaultToolbar-DOUMCB_G.js";function ve(e={}){const t=f(()=>e.ui?.locale??"pt-BR"),[a,o]=J(0),[r,i]=J(null),s=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return U(()=>{const e=performance.now();let t=!1;const a=()=>{if(t)return;const r=performance.now()-e;o(.9*(1-Math.exp(-r/5e3))),requestAnimationFrame(a)};requestAnimationFrame(a),Q(()=>{t=!0}),import("./OasisEditorApp-D1ATv4z4.js").then(e=>{t=!0,o(1),setTimeout(()=>i(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),V(W,{translator:t,get children(){return V(ne,{get when(){return r()},get fallback(){return V(d,{variant:"fill",get progress(){return a()},get label(){return s()?.label},get class(){return s()?.class},get style(){return s()?.style}})},children:t=>{const a=t();return V(a,e)}})}})}function _e(e,t={}){const a=Z(),o=y(()=>ve({...t,runtime:{...t.runtime,client:a}}),e);return a.setDispose(()=>{o(),e.innerHTML=""}),a}function ke(e){return V(ve,ie(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function we(e,t={}){const a=Z(),o=y(()=>ke({...t,runtime:{...t.runtime,client:a}}),e);return a.setDispose(()=>{o(),e.innerHTML=""}),a}function ye(e){return{execute(t,a){const o=O(t,a);return e.commands.execute(o.name,o.payload)},canExecute(t,a){const o=O(t,a);return e.commands.canExecute(o.name,o.payload)},state(t){const a=O(t);return e.commands.state(a.name,a.payload)}}}var Ae=["selectAll","selectWord","selectSentence","selectParagraph","selectCollapse","selectText","selectRange","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","paste","pasteAsPlainText","pasteMergeFormatting","formatPainter","formatPainterContinuous","cancelFormatPainter","bold","italic","underline","doubleUnderline","wordUnderline","strike","doubleStrike","smallCaps","allCaps","hidden","noProof","webHidden","specVanish","contextualAlternates","characterBorder","shadow","emboss","engrave","outline","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","replaceAll","toggleTrackChanges","toggleRevisionMarkup","showMarkupOptions","applyShowMarkup","toggleOutlinePanel","toggleRevisionsPanel","openCommandSearch","repeatLastAction","acceptRevisions","rejectRevisions","setReviewDisplayMode","acceptAllRevisions","rejectAllRevisions","requestAcceptAllRevisions","requestRejectAllRevisions","nextRevision","previousRevision","nextComment","previousComment","newComment","replyComment","editComment","toggleCommentsPanel","resolveComment","reopenComment","deleteComment","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","columnBreak","splitBlock","insertNonBreakingSpace","insertNonBreakingHyphen","insertOptionalHyphen","insertEmDash","insertEllipsis","insertCopyright","insertRegistered","insertTrademark","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","growFont1","shrinkFont1","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","applyUnderlineStyle","setUnderlineColor","setCharacterScale","setCharacterSpacing","setRunSnapToGrid","setFitText","setBaselineShift","setEmphasisMark","setTextEffect","setKerning","setLigatures","setNumberSpacing","setNumberForm","setStylisticSet","documentStyles","print","copy","cut","newDocument","saveDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageFlip","imageRotate","imageBorder","imageTransparency","resetImage","outdent","indent","moveParagraphsUp","moveParagraphsDown","togglePageBreakBefore","toggleKeepWithNext","toggleKeepLinesTogether","toggleWidowControl","toggleParagraphBidi","setParagraphBidi","setParagraphAlign","sortParagraphs","promote","demote","resetParagraphFormatting","setParagraphTabStops","setOutlineLevel","setSpacingAfter","setSpacingBefore","setContextualSpacing","setMirrorIndents","setLineRule","setTextDirection","setSuppressAutoHyphens","setSuppressLineNumbers","setKinsoku","setOverflowPunct","setWordWrap","setAutoSpaceDE","setAutoSpaceDN","setAdjustRightInd","setTopLinePunct","setPageBreakBefore","setKeepWithNext","setKeepLinesTogether","setWidowControl","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","applyHorizontalLine","setDropCap","setLineHeight","setListFormat","setListStartAt","setListLevel","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","sectionBreakEvenPage","sectionBreakOddPage","sectionBreakNextColumn","setPageMargins","setMarginsPreset","setSectionPageNumbering","setPaperSize","setPaperSizePreset","setColumns","setColumnsPreset","setSectionVerticalAlign","setSectionStart","setSectionBidi","setHyphenation","editHeader","editFooter","editFirstPageHeader","editEvenPageHeader","editFirstPageFooter","editEvenPageFooter","insertPageNumber","insertPageNumberXOfY","placePageNumberTop","placePageNumberBottom","insertBookmark","removeBookmark","insertDateField","updateBodyFields","updateSelectedFields","insertDateTime","insertCrossReference","setNoteOptions","exitHeaderFooter","setDifferentFirstPage","setDifferentOddEven","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableDeleteCells","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellAlignment","tableSetCellVerticalAlign","tableSetCellTextDirection","tableToText","textToTable","tableSplitAtRow","tableSortAscending","tableSortDescending","tableDelete","tableRepeatHeaderRows","tableSetCellMargins","tableSetCellSpacing","tableSetTableIndent","tableSetAlignment","tableFormula","tableSelectCell","tableSelectRow","tableSelectColumn","tableSelectTable","tableSetRowHeight","tableSetBreakAcrossPages","tableSetHeaderRow","tableSetColumnWidth","tableSetTableWidth","tableSetCellWidth","tableSetCellNoWrap","tableSetCellFitText","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","setShapeFill","setShapeOutline","setShapeOutlineWidth","alignFloatingObject","reorderFloatingObject","nudgeFloatingObject","setFloatingFixedPosition","setFloatingRotation","setFloatingWrapPreset","setFloatingWrapText","setFloatingPositionPreset","setShapePreset","setTextBoxTextDirection","setTextBoxVerticalAlign","editTextBoxAlt","rotateTextBox","textBoxWidthCm","textBoxHeightCm","openSymbolDialog","openEquationDialog","tableProperties","openFontDialog","openParagraphDialog"];function De(e,t={}){const a=Z(),o=y(()=>V(ve,ie(t,{get runtime(){return{...t.runtime,client:a}}})),e);return a.setDispose(()=>{o(),e.innerHTML=""}),Object.assign(a,{unmount:()=>a.dispose()})}var Re=/*#__PURE__*/de("<div>");function Le(e){const[t,a]=he(e,["align","wrap","class","classList","children"]);return o=Re(),ue(o,ie({get class(){return`oasis-editor-ui-action-row ${t.class??""}`},get classList(){return{[`oasis-editor-ui-action-row-${t.align??"start"}`]:!0,"oasis-editor-ui-action-row-nowrap":!1===t.wrap,...t.classList}}},a),!1,!0),z(o,()=>t.children),o;var o}var Ie=/*#__PURE__*/de("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ne(e){const[t,a]=he(e,["align","class","style","children"]);return o=Ie(),ue(o,ie({get class(){return`oasis-editor-ui-field-row ${t.class??""}`},get style(){return{"align-items":He[t.align??"end"],..."object"==typeof t.style?t.style:{}}}},a),!1,!0),z(o,()=>t.children),o;var o}var Oe=/*#__PURE__*/de("<div>");function Me(e){const[t,a]=he(e,["align","class","classList","children"]);return o=Oe(),ue(o,ie({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},a),!1,!0),z(o,()=>t.children),o;var o}var Ee={saveDocument:"editor-toolbar-save-document",newDocument:"editor-toolbar-new-document",importDocument:"editor-toolbar-import-document",exportDocx:"editor-toolbar-export-docx",exportPdf:"editor-toolbar-export-pdf",print:"editor-toolbar-print",undo:"editor-toolbar-undo",redo:"editor-toolbar-redo",style:"editor-toolbar-style",fontFamily:"editor-toolbar-font-family",fontSize:"editor-toolbar-font-size",color:"editor-toolbar-color",highlight:"editor-toolbar-highlight",textShading:"editor-toolbar-text-shading",bold:"editor-toolbar-bold",italic:"editor-toolbar-italic",underlineControl:"editor-toolbar-underline-control",strike:"editor-toolbar-strike",superscript:"editor-toolbar-superscript",subscript:"editor-toolbar-subscript",insertImage:"editor-toolbar-insert-image",insertTable:"editor-toolbar-insert-table",symbols:"editor-toolbar-symbols",link:"editor-toolbar-link",unlink:"editor-toolbar-unlink",footnote:"editor-toolbar-footnote",imageAlt:"editor-toolbar-image-alt",imageCaption:"editor-toolbar-image-caption",alignLeft:"editor-toolbar-align-left",alignCenter:"editor-toolbar-align-center",alignRight:"editor-toolbar-align-right",alignJustify:"editor-toolbar-align-justify",bulletList:"editor-toolbar-list-bullet",orderedList:"editor-toolbar-list-ordered",outdent:"editor-toolbar-list-outdent",indent:"editor-toolbar-list-indent",listOptions:"editor-toolbar-list-options",specialIndent:"editor-toolbar-special-indent",lineSpacing:"editor-toolbar-line-spacing-control",metrics:"editor-toolbar-metrics",margins:"editor-toolbar-margins",section:"editor-toolbar-section"},We={fileNew:"file_new",fileImport:"file_import",fileSave:"file_save",fileExport:"file_export",fileExportPdf:"file_export_pdf",fileExportDocx:"file_export_docx",filePrint:"file_print",editUndo:"edit_undo",editRedo:"edit_redo",editCopy:"edit_copy",editFind:"edit_find",editSelectAll:"edit_selectAll",viewMargins:"view_margins",viewParagraphMarks:"view_paragraph_marks",viewPreciseFonts:"view_precise_fonts",insertImage:"insert_image",insertImageCaption:"insert_image_caption",insertTable:"insert_table",insertLink:"insert_link",insertFootnote:"insert_footnote",insertPageBreak:"insert_pageBreak",formatText:"format_text",formatTextBold:"format_text_bold",formatTextItalic:"format_text_italic",formatTextUnderline:"format_text_underline",formatTextStrike:"format_text_strike",formatAlign:"format_align",formatAlignLeft:"format_align_left",formatAlignCenter:"format_align_center",formatAlignRight:"format_align_right",formatAlignJustify:"format_align_justify",formatLists:"format_lists",formatListsBullet:"format_lists_bullet",formatListsNumbered:"format_lists_numbered"};export{Le as ActionRow,w as BalloonShell,pe as Button,r as Checkbox,xe as ColorField,Fe as ColorPicker,Fe as ToolbarColorPicker,be as CommandRegistry,C as DEFAULT_PALETTE,B as Dialog,Me as DialogFooter,b as DocumentShell,ee as EDITOR_SCHEMA_VERSION,oe as Editor,Ce as FieldGroup,Ne as FieldRow,N as FloatingActionButton,i as FormField,v as Grid,D as GridPicker,D as ToolbarGridPicker,te as Heading,R as IconButton,l as InlineShell,H as Menu,H as ToolbarMenu,re as MenuRegistry,Pe as NumberField,Ae as OASIS_BUILTIN_COMMANDS,We as OASIS_MENU_ITEMS,Ee as OASIS_TOOLBAR_ITEMS,ve as OasisEditorAppLazy,ke as OasisEditorContainer,d as OasisEditorLoading,$ as PluginCollection,j as Popover,ge as RIBBON_TABS,Te as Radio,K as RadioGroup,c as Select,c as ToolbarSelect,L as SelectField,M as Separator,M as ToolbarSeparator,Be as SidePanel,o as SidePanelBody,E as SidePanelFooter,p as SidePanelHeader,a as SplitButton,a as ToolbarSplitButton,ae as Stack,e as StatusText,u as StyleGallery,ce as SurfaceButton,P as Tabs,se as Text,I as TextAreaField,s as TextField,q as ToggleChip,F as Toolbar,g as ToolbarButton,h as buildRibbonTabDefinitions,x as cloneDocument,t as commandRefName,me as createDefaultToolbarPreset,T as createDocument,ye as createEditorCommandBus,_ as createHeading,_e as createOasisEditor,we as createOasisEditorContainer,n as createParagraph,m as createTable,fe as createToolbarRegistry,Y as exportEditorDocumentToHtml,Se as importHtmlToEditorDocument,De as mount,S as normalizeDocument,G as projectTrackedRevisions,k as registerToolbarRenderer,X as resolveAllTrackedRevisions,O as resolveCommandRef,le as resolveTrackedRevision,A as validateDocument};
|