oasis-editor 0.0.408 → 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.
@@ -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
@@ -0,0 +1,33 @@
1
+ import { EditorDocument, EditorLayoutDocument } from '../model.js';
2
+ export interface TcInstruction {
3
+ text: string;
4
+ level: number;
5
+ /** Explicit table identifier. An omitted identifier remains distinguishable. */
6
+ identifier?: string;
7
+ omitPageNumber: boolean;
8
+ }
9
+ export interface TcOccurrence extends TcInstruction {
10
+ sectionIndex: number;
11
+ paragraphId: string;
12
+ runId: string;
13
+ /** Source UTF-16 offset of the zero-width field begin, not heading start. */
14
+ offset: number;
15
+ raw: string;
16
+ }
17
+ /** Bounded grammar for Word TC fields. Unknown switches fail closed. */
18
+ export declare function parseTcInstruction(raw: string): TcInstruction | undefined;
19
+ /** Read-only main-story inventory. A malformed/unsupported TC is not silently
20
+ * dropped: undefined tells future TOC regeneration to preserve its cache.
21
+ * Only top-level, instruction-only fields in body paragraphs are qualified.
22
+ * Hidden formatting on TC markers is expected; no visible result is allowed.
23
+ */
24
+ export declare function collectTcOccurrences(document: EditorDocument): TcOccurrence[] | undefined;
25
+ /** Resolve the printed label at the TC marker's actual offset using a
26
+ * completed layout. No page guessed from a paragraph's first line. */
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;
@@ -1,5 +1,5 @@
1
1
  import { EditorState } from '../model.js';
2
- /** Resolve a flat TOC entry to one certified main-story bookmark target.
2
+ /** Resolve a flat or imported nested TOC entry to one main-story bookmark target.
3
3
  * The returned state changes only navigation/selection, never document data.
4
4
  */
5
5
  export declare function resolveTocLinkNavigation(state: EditorState, paragraphId: string, offset: number): EditorState | undefined;
@@ -1,6 +1,12 @@
1
1
  import { EditorState } from '../model.js';
2
2
  import { TocPaginate, TocConvergenceResult } from './tocConvergence.js';
3
3
  export declare function hasNestedTocPageRefs(state: EditorState): boolean;
4
+ /** Read-only hit resolution for an explicitly linked text run in a qualified
5
+ * imported TOC. A PAGEREF instruction by itself is not a clickable run. */
6
+ export declare function resolveNestedTocLink(state: EditorState, sectionIndex: number, paragraphId: string, offset: number): {
7
+ name: string;
8
+ excluded: Set<string>;
9
+ } | undefined;
4
10
  /** A fixed point over the original nested cache runs, not a rebuilt TOC.
5
11
  * Conservatively refuse length-changing edits in anchored paragraphs. */
6
12
  export declare function refreshNestedTocPageRefs(original: EditorState, paginate?: TocPaginate): TocConvergenceResult;
@@ -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-BDmhx5J6.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};