oasis-editor 0.0.199 → 0.0.201
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-RTw7Wzrq.js +1 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/clipboardMergeFormatting.d.ts +3 -0
- package/dist/core/commands/publicCommandTypes.d.ts +4 -0
- package/dist/defaultToolbar-DlMhsvGq.js +1 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/pt-BR.d.ts +3 -0
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +7 -0
- package/dist/ui/app/clipboardPaste.d.ts +20 -0
- package/dist/ui/app/clipboardWrite.d.ts +11 -0
- package/dist/ui/app/essentials/browser.d.ts +7 -1
- package/dist/ui/app/essentials/types.d.ts +2 -0
- package/dist/ui/components/Toolbar/primitives/SplitButton.d.ts +2 -0
- package/package.json +1 -1
- package/dist/OasisEditorApp-DyDxI1Kx.js +0 -1
- package/dist/defaultToolbar-BiD81UCq.js +0 -1
|
@@ -599,6 +599,9 @@ export declare const en: {
|
|
|
599
599
|
"menu.edit": string;
|
|
600
600
|
"menu.edit.cut": string;
|
|
601
601
|
"menu.edit.copy": string;
|
|
602
|
+
"toolbar.pasteKeepFormatting": string;
|
|
603
|
+
"toolbar.pasteMergeFormatting": string;
|
|
604
|
+
"toolbar.pastePlainText": string;
|
|
602
605
|
"menu.edit.paste": string;
|
|
603
606
|
"menu.edit.selectAll": string;
|
|
604
607
|
"menu.view": string;
|
|
@@ -599,6 +599,9 @@ export declare const ptBR: {
|
|
|
599
599
|
"menu.edit": string;
|
|
600
600
|
"menu.edit.cut": string;
|
|
601
601
|
"menu.edit.copy": string;
|
|
602
|
+
"toolbar.pasteKeepFormatting": string;
|
|
603
|
+
"toolbar.pasteMergeFormatting": string;
|
|
604
|
+
"toolbar.pastePlainText": string;
|
|
602
605
|
"menu.edit.paste": string;
|
|
603
606
|
"menu.edit.selectAll": string;
|
|
604
607
|
"menu.view": string;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Ar as t,B as o,Br as r,C as n,Ca as i,Cr as s,D as a,Da as l,E as c,F as d,Fr as u,G as p,H as g,Ha as f,I as m,Ia as b,J as v,K as h,Ka as y,L as k,M as x,N as S,Na as C,Nr as w,O as R,Oa as T,P as _,Pi as I,Pr as B,R as L,Ra as P,S as D,Sa as $,Sr as A,T as E,Ta as F,U as M,V as j,Va as O,Vi as H,X as N,Xa as z,Xr as X,Y as q,Ya as J,Za as K,_ as W,_r as U,ai as G,br as V,bt as Y,ci as Z,dr as Q,fr as ee,gr as te,hr as oe,ii as re,j as ne,ja as ie,jr as se,k as ae,lr as le,mr as ce,ni as de,oi as ue,q as pe,qa as ge,ri as fe,si as me,t as be,ti as ve,ur as he,v as ye,vr as ke,w as xe,x as Se,xa as Ce,xr as we,yr as Re,yt as Te,z as _e,zr as Ie}from"./defaultToolbar-BiD81UCq.js";function Be(e={}){const t=l(()=>e.ui?.locale??"pt-BR"),[o,r]=y(0),[n,s]=y(null),a=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return z(()=>{const e=performance.now();let t=!1;const o=()=>{if(t)return;const n=performance.now()-e;r(.9*(1-Math.exp(-n/5e3))),requestAnimationFrame(o)};requestAnimationFrame(o),J(()=>{t=!0}),import("./OasisEditorApp-DyDxI1Kx.js").then(e=>{t=!0,r(1),setTimeout(()=>s(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),f(F,{translator:t,get children(){return f(O,{get when(){return n()},get fallback(){return f(i,{variant:"fill",get progress(){return o()},get label(){return a()?.label},get class(){return a()?.class},get style(){return a()?.style}})},children:t=>{const o=t();return f(o,e)}})}})}function Le(e,t={}){const o=Ie(),r=C(()=>Be({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function Pe(e){return f(Be,ge(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function De(e,t={}){const o=Ie(),r=C(()=>Pe({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function $e(e){return{execute(t,o){const r=$(t,o);return e.commands.execute(r.name,r.payload)},canExecute(t,o){const r=$(t,o);return e.commands.canExecute(r.name,r.payload)},state(t){const o=$(t);return e.commands.state(o.name,o.payload)}}}var Ae=["selectAll","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","bold","italic","underline","strike","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","toggleTrackChanges","acceptRevisions","rejectRevisions","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","splitBlock","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","documentStyles","print","copy","newDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageBorder","outdent","indent","togglePageBreakBefore","toggleKeepWithNext","setSpacingAfter","setSpacingBefore","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","setLineHeight","setListFormat","setListStartAt","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","setPageMargins","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellWidth","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","openSymbolDialog","openEquationDialog"];function Ee(e,t={}){const o=Ie(),r=C(()=>f(Be,ge(t,{get runtime(){return{...t.runtime,client:o}}})),e);return o.setDispose(()=>{r(),e.innerHTML=""}),Object.assign(o,{unmount:()=>o.dispose()})}function Fe(e){const[t,o]=K(e,["level","class","classList","children"]),r=t.level??2;return f(T,ge({component:`h${r}`,get class(){return`oasis-editor-ui-heading ${t.class??""}`},get classList(){return{[`oasis-editor-ui-heading-${r}`]:!0,...t.classList}}},o,{get children(){return t.children}}))}var Me=/*#__PURE__*/P("<div>");function je(e){const[t,o]=K(e,["align","wrap","class","classList","children"]);return r=Me(),b(r,ge({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}}},o),!1,!0),ie(r,()=>t.children),r;var r}var Oe=/*#__PURE__*/P("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ne(e){const[t,o]=K(e,["align","class","style","children"]);return r=Oe(),b(r,ge({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:{}}}},o),!1,!0),ie(r,()=>t.children),r;var r}var ze=/*#__PURE__*/P("<div>");function Xe(e){const[t,o]=K(e,["align","class","classList","children"]);return r=ze(),b(r,ge({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},o),!1,!0),ie(r,()=>t.children),r;var r}function qe(e,t){return void 0===e.revisionId||e.revisionId===t}function Je(e){e.matched=!0}function Ke(e,t){e.matched=!0,e.changed=!0,e.resolvedRevisionIds.add(t)}function We(e,t){e.matched=!0;const o=`${t.kind}:${t.revisionId??""}:${t.path}`;e.unresolvedKeys.has(o)||(e.unresolvedKeys.add(o),e.unresolved.push(t))}function Ue(e){const t=[],o=e=>{for(const r of e)if("paragraph"!==r.type)for(const e of r.rows)for(const t of e.cells)o(t.blocks);else{t.push(r);for(const e of r.runs)"textBox"===e.kind&&o(e.textBox.blocks)}};return o(e),t}function Ge(e){const t=Y(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ve(e){const t=Te(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ye(e,t,o){if(e.revisionRangeMarker&&qe(o,e.revisionRangeMarker.id))return Ke(o,e.revisionRangeMarker.id),null;if(!function(e,t,o){const r=e.revision;return!r||!qe(o,r.id)||(Ke(o,r.id),"accept"===o.action?"insert"===r.type:"delete"===r.type)}(e,0,o))return null;let r=e;e.revision&&qe(o,e.revision.id)&&(r={...r,revision:void 0});const n=function(e,t,o){const r=e?.propertyRevision;return r&&qe(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ge(e):Ge(r.previous)):e}(r.styles,0,o);if(n!==r.styles&&(r={...r,styles:n}),"textBox"===r.kind){const e=rt(r.textBox.blocks,`${t}.textBox.blocks`,o);e!==r.textBox.blocks&&(r={...r,textBox:{...r.textBox,blocks:e}})}return r}function Ze(e,t,o){const r=[],n=[];let i=0,s=0;for(let d=0;d<e.runs.length;d+=1){const a=e.runs[d],l=Ye(a,`${t}.runs[${d}]`,o);if(!l&&"textBox"===a.kind)for(const t of Ue(a.textBox.blocks))o.paragraphRelocations.has(t.id)||o.paragraphRelocations.set(t.id,{paragraphId:e.id,offset:s});const c=a.text.length;n.push({oldStart:i,oldEnd:i+c,newStart:s,kept:null!==l}),i+=c,l&&(r.push(l),s+=l.text.length)}i!==s&&o.paragraphOffsetTransforms.set(e.id,{segments:n,oldLength:i,newLength:s});let a=r.length===e.runs.length&&r.every((t,o)=>t===e.runs[o])?e:{...e,runs:r};const l=function(e,t,o){const r=e?.propertyRevision;return r&&qe(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ve(e):Ve(r.previous)):e}(a.style,0,o);l!==a.style&&(a={...a,style:l});const c=a.numberingRevision;return c&&qe(o,c.id)&&(Je(o),"accept"===o.action?(Ke(o,c.id),a={...a,numberingRevision:void 0}):We(o,{kind:"numbering-original-unavailable",revisionId:c.id,path:`${t}.numberingRevision`,message:"w:numberingChange only stores the previous rendered-number cache; it cannot reconstruct the previous numId/ilvl safely."})),a}function Qe(e){const t=e.mergeRevisionState;if("vertical"===t?.orientation&&1===t.currentCellCount&&1===t.previousCells.length)return structuredClone(t.previousCells[0]);const o=e.style?.revision;return"merge"===o?.type&&"continue"===o.previous?.vMerge?{...e,blocks:[],rowSpan:void 0,vMerge:"continue",style:e.style?{...e.style,revision:void 0}:e.style,mergeRevisionState:void 0}:void 0}function et(e,t,o){let r=function(e,t,o){const r=e.style?.revision,n=e.mergeRevisionState&&qe(o,e.mergeRevisionState.revisionId);if(r&&qe(o,r.id)){if(Je(o),"reject"===o.action&&"merge"===r.type){const n=Qe(e);return n?(Ke(o,r.id),n):(We(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The previous merge topology lacks an exact semantic snapshot for safe restoration."}),e)}return Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style,..."merge"===r.type?{mergeRevisionState:void 0}:{}}}if(n){const r=e.mergeRevisionState.revisionId;if(Je(o),"accept"===o.action)return Ke(o,r),{...e,mergeRevisionState:void 0};const n=Qe(e);if(n)return Ke(o,r),n;We(o,{kind:"cell-merge-original-unavailable",revisionId:r,path:`${t}.mergeRevisionState`,message:"The preserved merge snapshot is not a supported exact vertical-cell restoration."})}return e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=rt(r.blocks,`${t}.blocks`,o);return i!==r.blocks&&(r={...r,blocks:i}),r}function tt(e,t,o){let r=function(e,t,o){const r=e.style?.revision;return r&&qe(o,r.id)?(Je(o),"reject"===o.action&&"merge"===r.type?(We(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The original table structure for this merge revision is not reconstructed by the core resolver yet."}),e):(Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style})):e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.propertyExceptionsRevision;if(i&&qe(o,i.id))Ke(o,i.id),r={...r,propertyExceptions:"accept"===o.action?r.propertyExceptions:structuredClone(i.previous),propertyExceptionsRevision:void 0,tblPrExChangeXml:void 0};else if(r.tblPrExChangeXml&&!i){const e=(s=r.tblPrExChangeXml,/\bw:id\s*=\s*["']([^"']+)["']/.exec(s)?.[1]);e&&qe(o,e)&&(Je(o),"accept"===o.action?(Ke(o,e),r={...r,tblPrExChangeXml:void 0}):We(o,{kind:"table-property-exception-original-unavailable",revisionId:e,path:`${t}.tblPrExChangeXml`,message:"The imported w:tblPrExChange has no decodable previous w:tblPrEx snapshot."}))}var s;const a=[];let l=!1;for(let c=0;c<r.cells.length;c+=1){const e=r.cells[c],n=e.style?.revision;if(n&&qe(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),l=!0;continue}const i=et(e,`${t}.cells[${c}]`,o);a.push(i),i!==e&&(l=!0)}return l&&(r={...r,cells:a}),r}function ot(e,t,o){let r=e;const n=function(e,t,o){const r=e?.revision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=structuredClone("accept"===o.action?e:r.previous);return delete n.revision,n}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.gridRevision;i&&qe(o,i.id)&&(Ke(o,i.id),r="accept"===o.action?{...r,gridRevision:void 0}:{...r,gridCols:[...i.previous],gridRevision:void 0});const s=[];let a=!1;for(let l=0;l<r.rows.length;l+=1){const e=r.rows[l],n=e.style?.revision;if(n&&qe(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),a=!0;continue}const i=tt(e,`${t}.rows[${l}]`,o);s.push(i),i!==e&&(a=!0)}return a&&(r={...r,rows:s}),a&&(r=function(e){let t=!1;const o=e.rows.map((o,r)=>{let n=!1;const i=o.cells.map((t,o)=>{let i;if("restart"===t.vMerge){i=1;for(let t=r+1;t<e.rows.length;t+=1){const r=e.rows[t].cells[o];if(!r||"continue"!==r.vMerge)break;i+=1}}return t.rowSpan===i?t:(n=!0,{...t,rowSpan:i})});return n?(t=!0,{...o,cells:i}):o});return t?{...e,rows:o}:e}(r),function(e,t,o){const r=Ue([e]),n=Ue([t]),i=new Map(n.map(e=>[e.id,e]));for(let s=0;s<r.length;s+=1){const e=r[s];if(i.has(e.id)||o.paragraphRelocations.has(e.id))continue;let t=null;for(let o=s-1;o>=0;o-=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:H(e).length};break}}if(!t)for(let o=s+1;o<r.length;o+=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:0};break}}o.paragraphRelocations.set(e.id,t)}}(e,r,o)),r}function rt(e,t,o){let r=!1;const n=e.map((e,n)=>{const i=`${t}[${n}]`,s="paragraph"===e.type?Ze(e,i,o):ot(e,i,o);return s!==e&&(r=!0),s});return r?n:e}var nt=["header","firstPageHeader","evenPageHeader","footer","firstPageFooter","evenPageFooter"];function it(e,t,o){if(!e)return;let r=e.paragraphId,n=e.offset,i=!1;const s=/* @__PURE__ */new Set;for(;o.has(r);){if(s.has(r))return;s.add(r);const e=o.get(r);if(!e)return;r=e.paragraphId,n=e.offset,i=!0}if(!i){const e=t.get(r);e&&(n=function(e,t){const o=Math.max(0,Math.min(t,e.oldLength));for(const r of e.segments)if(!(o>r.oldEnd))return r.kept?r.newStart+Math.max(0,o-r.oldStart):r.newStart;return e.newLength}(e,n))}return r===e.paragraphId&&n===e.offset?e:{...e,paragraphId:r,offset:n}}function st(e,t,o){const r={action:t,revisionId:o,changed:!1,matched:!1,resolvedRevisionIds:/* @__PURE__ */new Set,unresolved:[],unresolvedKeys:/* @__PURE__ */new Set,paragraphOffsetTransforms:/* @__PURE__ */new Map,paragraphRelocations:/* @__PURE__ */new Map},i=I(e).map(n),s={...e,sections:i,footnotes:D(e.footnotes),endnotes:Se(e.endnotes)};return function(e,t){for(let o=0;o<e.length;o+=1){let r=e[o];const n=rt(r.blocks,`sections[${o}].blocks`,t);n!==r.blocks&&(r={...r,blocks:n});for(const e of nt){const n=r[e];if(!n)continue;const i=rt(n,`sections[${o}].${e}`,t);i!==n&&(r={...r,[e]:i})}e[o]=r}}(i,r),function(e,t){if(e.footnotes){for(const[o,r]of Object.entries(e.footnotes.items))r.blocks=rt(r.blocks,`footnotes.items[${JSON.stringify(o)}].blocks`,t);e.footnotes.separator&&(e.footnotes.separator=rt(e.footnotes.separator,"footnotes.separator",t)),e.footnotes.continuationSeparator&&(e.footnotes.continuationSeparator=rt(e.footnotes.continuationSeparator,"footnotes.continuationSeparator",t))}if(e.endnotes){for(const[o,r]of Object.entries(e.endnotes.items))r.blocks=rt(r.blocks,`endnotes.items[${JSON.stringify(o)}].blocks`,t);e.endnotes.separator&&(e.endnotes.separator=rt(e.endnotes.separator,"endnotes.separator",t)),e.endnotes.continuationSeparator&&(e.endnotes.continuationSeparator=rt(e.endnotes.continuationSeparator,"endnotes.continuationSeparator",t))}}(s,r),function(e,t){for(let o=0;o<e.length;o+=1){const r=e[o],n=r.propertyRevision;if(!n||!qe(t,n.id))continue;if(Ke(t,n.id),"accept"===t.action){e[o]={...r,propertyRevision:void 0};continue}const i=structuredClone(n.previous);e[o]={...r,pageSettings:i.pageSettings,pageBorder:i.pageBorder,pageNumbering:i.pageNumbering,verticalAlignment:i.verticalAlignment,bidi:i.bidi,propertyRevision:void 0};const s=e[o+1];s&&(e[o+1]={...s,breakType:i.nextBreakType})}}(i,r),function(e,t,o){if(!e.bookmarks||0===t.size&&0===o.size)return;let r=!1;const n={...e.bookmarks.items},i=[];for(const s of e.bookmarks.order){const a=e.bookmarks.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}r&&(e.bookmarks={...e.bookmarks,items:n,order:i})}(s,r.paragraphOffsetTransforms,r.paragraphRelocations),s.comments=function(e,t,o){if(!e||0===t.size&&0===o.size)return e;let r=!1;const n={...e.items},i=[];for(const s of e.order){const a=e.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}return r?{...e,items:n,order:i}:e}(s.comments,r.paragraphOffsetTransforms,r.paragraphRelocations),void 0===o||r.matched||r.unresolved.push({kind:"revision-not-found",revisionId:o,path:"document",message:`Tracked revision ${o} was not found in the modeled document.`}),{document:r.changed?s:e,changed:r.changed,complete:0===r.unresolved.length,resolvedRevisionIds:[...r.resolvedRevisionIds],unresolved:r.unresolved}}function at(e,t){return st(e,t)}function lt(e,t,o){return st(e,o,t)}function ct(e,t){return at(e,"final"===t?"accept":"reject")}var dt={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"},ut={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{je as ActionRow,j as BalloonShell,L as Button,e as Checkbox,ne as ColorField,U as ColorPicker,U as ToolbarColorPicker,B as CommandRegistry,oe as DEFAULT_PALETTE,o as Dialog,Xe as DialogFooter,M as DocumentShell,ve as EDITOR_SCHEMA_VERSION,w as Editor,E as FieldGroup,Ne as FieldRow,N as FloatingActionButton,_ as FormField,d as Grid,te as GridPicker,te as ToolbarGridPicker,Fe as Heading,p as IconButton,g as InlineShell,we as Menu,we as ToolbarMenu,W as MenuRegistry,R as NumberField,Ae as OASIS_BUILTIN_COMMANDS,ut as OASIS_MENU_ITEMS,dt as OASIS_TOOLBAR_ITEMS,Be as OasisEditorAppLazy,Pe as OasisEditorContainer,i as OasisEditorLoading,u as PluginCollection,A as Popover,Q as RIBBON_TABS,c as Radio,a as RadioGroup,V as Select,V as ToolbarSelect,ae as SelectField,Re as Separator,Re as ToolbarSeparator,h as SidePanel,pe as SidePanelBody,v as SidePanelFooter,q as SidePanelHeader,ke as SplitButton,ke as ToolbarSplitButton,m as Stack,k as StatusText,ce as StyleGallery,se as SurfaceButton,_e as Tabs,t as Text,x as TextAreaField,S as TextField,xe as ToggleChip,le as Toolbar,s as ToolbarButton,he as buildRibbonTabDefinitions,de as cloneDocument,Ce as commandRefName,be as createDefaultToolbarPreset,fe as createDocument,$e as createEditorCommandBus,re as createHeading,Le as createOasisEditor,De as createOasisEditorContainer,G as createParagraph,ue as createTable,ye as createToolbarRegistry,r as exportEditorDocumentToHtml,X as importHtmlToEditorDocument,Ee as mount,me as normalizeDocument,ct as projectTrackedRevisions,ee as registerToolbarRenderer,at as resolveAllTrackedRevisions,$ as resolveCommandRef,lt as resolveTrackedRevision,Z as validateDocument};
|
|
1
|
+
import{A as e,Ar as t,B as o,Br as r,C as n,Ca as i,Cr as s,D as a,Da as l,E as c,F as d,Fr as u,G as p,H as g,Ha as f,I as m,Ia as b,J as v,K as h,Ka as y,L as x,M as k,N as S,Na as C,Nr as w,O as R,Oa as T,P as _,Pi as I,Pr as B,R as P,Ra as L,S as D,Sa as $,Sr as A,T as F,Ta as M,U as E,V as j,Va as O,Vi as H,X as N,Xa as z,Xr as X,Y as q,Ya as J,Za as K,_ as W,_r as U,ai as G,br as V,bt as Y,ci as Z,dr as Q,fr as ee,gr as te,hr as oe,ii as re,j as ne,ja as ie,jr as se,k as ae,lr as le,mr as ce,ni as de,oi as ue,q as pe,qa as ge,ri as fe,si as me,t as be,ti as ve,ur as he,v as ye,vr as xe,w as ke,x as Se,xa as Ce,xr as we,yr as Re,yt as Te,z as _e,zr as Ie}from"./defaultToolbar-DlMhsvGq.js";function Be(e={}){const t=l(()=>e.ui?.locale??"pt-BR"),[o,r]=y(0),[n,s]=y(null),a=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return z(()=>{const e=performance.now();let t=!1;const o=()=>{if(t)return;const n=performance.now()-e;r(.9*(1-Math.exp(-n/5e3))),requestAnimationFrame(o)};requestAnimationFrame(o),J(()=>{t=!0}),import("./OasisEditorApp-RTw7Wzrq.js").then(e=>{t=!0,r(1),setTimeout(()=>s(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),f(M,{translator:t,get children(){return f(O,{get when(){return n()},get fallback(){return f(i,{variant:"fill",get progress(){return o()},get label(){return a()?.label},get class(){return a()?.class},get style(){return a()?.style}})},children:t=>{const o=t();return f(o,e)}})}})}function Pe(e,t={}){const o=Ie(),r=C(()=>Be({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function Le(e){return f(Be,ge(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function De(e,t={}){const o=Ie(),r=C(()=>Le({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function $e(e){return{execute(t,o){const r=$(t,o);return e.commands.execute(r.name,r.payload)},canExecute(t,o){const r=$(t,o);return e.commands.canExecute(r.name,r.payload)},state(t){const o=$(t);return e.commands.state(o.name,o.payload)}}}var Ae=["selectAll","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","paste","pasteAsPlainText","pasteMergeFormatting","bold","italic","underline","strike","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","toggleTrackChanges","acceptRevisions","rejectRevisions","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","splitBlock","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","documentStyles","print","copy","cut","newDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageBorder","outdent","indent","togglePageBreakBefore","toggleKeepWithNext","setSpacingAfter","setSpacingBefore","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","setLineHeight","setListFormat","setListStartAt","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","setPageMargins","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellWidth","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","openSymbolDialog","openEquationDialog"];function Fe(e,t={}){const o=Ie(),r=C(()=>f(Be,ge(t,{get runtime(){return{...t.runtime,client:o}}})),e);return o.setDispose(()=>{r(),e.innerHTML=""}),Object.assign(o,{unmount:()=>o.dispose()})}function Me(e){const[t,o]=K(e,["level","class","classList","children"]),r=t.level??2;return f(T,ge({component:`h${r}`,get class(){return`oasis-editor-ui-heading ${t.class??""}`},get classList(){return{[`oasis-editor-ui-heading-${r}`]:!0,...t.classList}}},o,{get children(){return t.children}}))}var Ee=/*#__PURE__*/L("<div>");function je(e){const[t,o]=K(e,["align","wrap","class","classList","children"]);return r=Ee(),b(r,ge({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}}},o),!1,!0),ie(r,()=>t.children),r;var r}var Oe=/*#__PURE__*/L("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ne(e){const[t,o]=K(e,["align","class","style","children"]);return r=Oe(),b(r,ge({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:{}}}},o),!1,!0),ie(r,()=>t.children),r;var r}var ze=/*#__PURE__*/L("<div>");function Xe(e){const[t,o]=K(e,["align","class","classList","children"]);return r=ze(),b(r,ge({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},o),!1,!0),ie(r,()=>t.children),r;var r}function qe(e,t){return void 0===e.revisionId||e.revisionId===t}function Je(e){e.matched=!0}function Ke(e,t){e.matched=!0,e.changed=!0,e.resolvedRevisionIds.add(t)}function We(e,t){e.matched=!0;const o=`${t.kind}:${t.revisionId??""}:${t.path}`;e.unresolvedKeys.has(o)||(e.unresolvedKeys.add(o),e.unresolved.push(t))}function Ue(e){const t=[],o=e=>{for(const r of e)if("paragraph"!==r.type)for(const e of r.rows)for(const t of e.cells)o(t.blocks);else{t.push(r);for(const e of r.runs)"textBox"===e.kind&&o(e.textBox.blocks)}};return o(e),t}function Ge(e){const t=Y(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ve(e){const t=Te(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ye(e,t,o){if(e.revisionRangeMarker&&qe(o,e.revisionRangeMarker.id))return Ke(o,e.revisionRangeMarker.id),null;if(!function(e,t,o){const r=e.revision;return!r||!qe(o,r.id)||(Ke(o,r.id),"accept"===o.action?"insert"===r.type:"delete"===r.type)}(e,0,o))return null;let r=e;e.revision&&qe(o,e.revision.id)&&(r={...r,revision:void 0});const n=function(e,t,o){const r=e?.propertyRevision;return r&&qe(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ge(e):Ge(r.previous)):e}(r.styles,0,o);if(n!==r.styles&&(r={...r,styles:n}),"textBox"===r.kind){const e=rt(r.textBox.blocks,`${t}.textBox.blocks`,o);e!==r.textBox.blocks&&(r={...r,textBox:{...r.textBox,blocks:e}})}return r}function Ze(e,t,o){const r=[],n=[];let i=0,s=0;for(let d=0;d<e.runs.length;d+=1){const a=e.runs[d],l=Ye(a,`${t}.runs[${d}]`,o);if(!l&&"textBox"===a.kind)for(const t of Ue(a.textBox.blocks))o.paragraphRelocations.has(t.id)||o.paragraphRelocations.set(t.id,{paragraphId:e.id,offset:s});const c=a.text.length;n.push({oldStart:i,oldEnd:i+c,newStart:s,kept:null!==l}),i+=c,l&&(r.push(l),s+=l.text.length)}i!==s&&o.paragraphOffsetTransforms.set(e.id,{segments:n,oldLength:i,newLength:s});let a=r.length===e.runs.length&&r.every((t,o)=>t===e.runs[o])?e:{...e,runs:r};const l=function(e,t,o){const r=e?.propertyRevision;return r&&qe(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ve(e):Ve(r.previous)):e}(a.style,0,o);l!==a.style&&(a={...a,style:l});const c=a.numberingRevision;return c&&qe(o,c.id)&&(Je(o),"accept"===o.action?(Ke(o,c.id),a={...a,numberingRevision:void 0}):We(o,{kind:"numbering-original-unavailable",revisionId:c.id,path:`${t}.numberingRevision`,message:"w:numberingChange only stores the previous rendered-number cache; it cannot reconstruct the previous numId/ilvl safely."})),a}function Qe(e){const t=e.mergeRevisionState;if("vertical"===t?.orientation&&1===t.currentCellCount&&1===t.previousCells.length)return structuredClone(t.previousCells[0]);const o=e.style?.revision;return"merge"===o?.type&&"continue"===o.previous?.vMerge?{...e,blocks:[],rowSpan:void 0,vMerge:"continue",style:e.style?{...e.style,revision:void 0}:e.style,mergeRevisionState:void 0}:void 0}function et(e,t,o){let r=function(e,t,o){const r=e.style?.revision,n=e.mergeRevisionState&&qe(o,e.mergeRevisionState.revisionId);if(r&&qe(o,r.id)){if(Je(o),"reject"===o.action&&"merge"===r.type){const n=Qe(e);return n?(Ke(o,r.id),n):(We(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The previous merge topology lacks an exact semantic snapshot for safe restoration."}),e)}return Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style,..."merge"===r.type?{mergeRevisionState:void 0}:{}}}if(n){const r=e.mergeRevisionState.revisionId;if(Je(o),"accept"===o.action)return Ke(o,r),{...e,mergeRevisionState:void 0};const n=Qe(e);if(n)return Ke(o,r),n;We(o,{kind:"cell-merge-original-unavailable",revisionId:r,path:`${t}.mergeRevisionState`,message:"The preserved merge snapshot is not a supported exact vertical-cell restoration."})}return e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=rt(r.blocks,`${t}.blocks`,o);return i!==r.blocks&&(r={...r,blocks:i}),r}function tt(e,t,o){let r=function(e,t,o){const r=e.style?.revision;return r&&qe(o,r.id)?(Je(o),"reject"===o.action&&"merge"===r.type?(We(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The original table structure for this merge revision is not reconstructed by the core resolver yet."}),e):(Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style})):e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.propertyExceptionsRevision;if(i&&qe(o,i.id))Ke(o,i.id),r={...r,propertyExceptions:"accept"===o.action?r.propertyExceptions:structuredClone(i.previous),propertyExceptionsRevision:void 0,tblPrExChangeXml:void 0};else if(r.tblPrExChangeXml&&!i){const e=(s=r.tblPrExChangeXml,/\bw:id\s*=\s*["']([^"']+)["']/.exec(s)?.[1]);e&&qe(o,e)&&(Je(o),"accept"===o.action?(Ke(o,e),r={...r,tblPrExChangeXml:void 0}):We(o,{kind:"table-property-exception-original-unavailable",revisionId:e,path:`${t}.tblPrExChangeXml`,message:"The imported w:tblPrExChange has no decodable previous w:tblPrEx snapshot."}))}var s;const a=[];let l=!1;for(let c=0;c<r.cells.length;c+=1){const e=r.cells[c],n=e.style?.revision;if(n&&qe(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),l=!0;continue}const i=et(e,`${t}.cells[${c}]`,o);a.push(i),i!==e&&(l=!0)}return l&&(r={...r,cells:a}),r}function ot(e,t,o){let r=e;const n=function(e,t,o){const r=e?.revision;if(!r||!qe(o,r.id))return e;Ke(o,r.id);const n=structuredClone("accept"===o.action?e:r.previous);return delete n.revision,n}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.gridRevision;i&&qe(o,i.id)&&(Ke(o,i.id),r="accept"===o.action?{...r,gridRevision:void 0}:{...r,gridCols:[...i.previous],gridRevision:void 0});const s=[];let a=!1;for(let l=0;l<r.rows.length;l+=1){const e=r.rows[l],n=e.style?.revision;if(n&&qe(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),a=!0;continue}const i=tt(e,`${t}.rows[${l}]`,o);s.push(i),i!==e&&(a=!0)}return a&&(r={...r,rows:s}),a&&(r=function(e){let t=!1;const o=e.rows.map((o,r)=>{let n=!1;const i=o.cells.map((t,o)=>{let i;if("restart"===t.vMerge){i=1;for(let t=r+1;t<e.rows.length;t+=1){const r=e.rows[t].cells[o];if(!r||"continue"!==r.vMerge)break;i+=1}}return t.rowSpan===i?t:(n=!0,{...t,rowSpan:i})});return n?(t=!0,{...o,cells:i}):o});return t?{...e,rows:o}:e}(r),function(e,t,o){const r=Ue([e]),n=Ue([t]),i=new Map(n.map(e=>[e.id,e]));for(let s=0;s<r.length;s+=1){const e=r[s];if(i.has(e.id)||o.paragraphRelocations.has(e.id))continue;let t=null;for(let o=s-1;o>=0;o-=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:H(e).length};break}}if(!t)for(let o=s+1;o<r.length;o+=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:0};break}}o.paragraphRelocations.set(e.id,t)}}(e,r,o)),r}function rt(e,t,o){let r=!1;const n=e.map((e,n)=>{const i=`${t}[${n}]`,s="paragraph"===e.type?Ze(e,i,o):ot(e,i,o);return s!==e&&(r=!0),s});return r?n:e}var nt=["header","firstPageHeader","evenPageHeader","footer","firstPageFooter","evenPageFooter"];function it(e,t,o){if(!e)return;let r=e.paragraphId,n=e.offset,i=!1;const s=/* @__PURE__ */new Set;for(;o.has(r);){if(s.has(r))return;s.add(r);const e=o.get(r);if(!e)return;r=e.paragraphId,n=e.offset,i=!0}if(!i){const e=t.get(r);e&&(n=function(e,t){const o=Math.max(0,Math.min(t,e.oldLength));for(const r of e.segments)if(!(o>r.oldEnd))return r.kept?r.newStart+Math.max(0,o-r.oldStart):r.newStart;return e.newLength}(e,n))}return r===e.paragraphId&&n===e.offset?e:{...e,paragraphId:r,offset:n}}function st(e,t,o){const r={action:t,revisionId:o,changed:!1,matched:!1,resolvedRevisionIds:/* @__PURE__ */new Set,unresolved:[],unresolvedKeys:/* @__PURE__ */new Set,paragraphOffsetTransforms:/* @__PURE__ */new Map,paragraphRelocations:/* @__PURE__ */new Map},i=I(e).map(n),s={...e,sections:i,footnotes:D(e.footnotes),endnotes:Se(e.endnotes)};return function(e,t){for(let o=0;o<e.length;o+=1){let r=e[o];const n=rt(r.blocks,`sections[${o}].blocks`,t);n!==r.blocks&&(r={...r,blocks:n});for(const e of nt){const n=r[e];if(!n)continue;const i=rt(n,`sections[${o}].${e}`,t);i!==n&&(r={...r,[e]:i})}e[o]=r}}(i,r),function(e,t){if(e.footnotes){for(const[o,r]of Object.entries(e.footnotes.items))r.blocks=rt(r.blocks,`footnotes.items[${JSON.stringify(o)}].blocks`,t);e.footnotes.separator&&(e.footnotes.separator=rt(e.footnotes.separator,"footnotes.separator",t)),e.footnotes.continuationSeparator&&(e.footnotes.continuationSeparator=rt(e.footnotes.continuationSeparator,"footnotes.continuationSeparator",t))}if(e.endnotes){for(const[o,r]of Object.entries(e.endnotes.items))r.blocks=rt(r.blocks,`endnotes.items[${JSON.stringify(o)}].blocks`,t);e.endnotes.separator&&(e.endnotes.separator=rt(e.endnotes.separator,"endnotes.separator",t)),e.endnotes.continuationSeparator&&(e.endnotes.continuationSeparator=rt(e.endnotes.continuationSeparator,"endnotes.continuationSeparator",t))}}(s,r),function(e,t){for(let o=0;o<e.length;o+=1){const r=e[o],n=r.propertyRevision;if(!n||!qe(t,n.id))continue;if(Ke(t,n.id),"accept"===t.action){e[o]={...r,propertyRevision:void 0};continue}const i=structuredClone(n.previous);e[o]={...r,pageSettings:i.pageSettings,pageBorder:i.pageBorder,pageNumbering:i.pageNumbering,verticalAlignment:i.verticalAlignment,bidi:i.bidi,propertyRevision:void 0};const s=e[o+1];s&&(e[o+1]={...s,breakType:i.nextBreakType})}}(i,r),function(e,t,o){if(!e.bookmarks||0===t.size&&0===o.size)return;let r=!1;const n={...e.bookmarks.items},i=[];for(const s of e.bookmarks.order){const a=e.bookmarks.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}r&&(e.bookmarks={...e.bookmarks,items:n,order:i})}(s,r.paragraphOffsetTransforms,r.paragraphRelocations),s.comments=function(e,t,o){if(!e||0===t.size&&0===o.size)return e;let r=!1;const n={...e.items},i=[];for(const s of e.order){const a=e.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}return r?{...e,items:n,order:i}:e}(s.comments,r.paragraphOffsetTransforms,r.paragraphRelocations),void 0===o||r.matched||r.unresolved.push({kind:"revision-not-found",revisionId:o,path:"document",message:`Tracked revision ${o} was not found in the modeled document.`}),{document:r.changed?s:e,changed:r.changed,complete:0===r.unresolved.length,resolvedRevisionIds:[...r.resolvedRevisionIds],unresolved:r.unresolved}}function at(e,t){return st(e,t)}function lt(e,t,o){return st(e,o,t)}function ct(e,t){return at(e,"final"===t?"accept":"reject")}var dt={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"},ut={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{je as ActionRow,j as BalloonShell,P as Button,e as Checkbox,ne as ColorField,U as ColorPicker,U as ToolbarColorPicker,B as CommandRegistry,oe as DEFAULT_PALETTE,o as Dialog,Xe as DialogFooter,E as DocumentShell,ve as EDITOR_SCHEMA_VERSION,w as Editor,F as FieldGroup,Ne as FieldRow,N as FloatingActionButton,_ as FormField,d as Grid,te as GridPicker,te as ToolbarGridPicker,Me as Heading,p as IconButton,g as InlineShell,we as Menu,we as ToolbarMenu,W as MenuRegistry,R as NumberField,Ae as OASIS_BUILTIN_COMMANDS,ut as OASIS_MENU_ITEMS,dt as OASIS_TOOLBAR_ITEMS,Be as OasisEditorAppLazy,Le as OasisEditorContainer,i as OasisEditorLoading,u as PluginCollection,A as Popover,Q as RIBBON_TABS,c as Radio,a as RadioGroup,V as Select,V as ToolbarSelect,ae as SelectField,Re as Separator,Re as ToolbarSeparator,h as SidePanel,pe as SidePanelBody,v as SidePanelFooter,q as SidePanelHeader,xe as SplitButton,xe as ToolbarSplitButton,m as Stack,x as StatusText,ce as StyleGallery,se as SurfaceButton,_e as Tabs,t as Text,k as TextAreaField,S as TextField,ke as ToggleChip,le as Toolbar,s as ToolbarButton,he as buildRibbonTabDefinitions,de as cloneDocument,Ce as commandRefName,be as createDefaultToolbarPreset,fe as createDocument,$e as createEditorCommandBus,re as createHeading,Pe as createOasisEditor,De as createOasisEditorContainer,G as createParagraph,ue as createTable,ye as createToolbarRegistry,r as exportEditorDocumentToHtml,X as importHtmlToEditorDocument,Fe as mount,me as normalizeDocument,ct as projectTrackedRevisions,ee as registerToolbarRenderer,at as resolveAllTrackedRevisions,$ as resolveCommandRef,lt as resolveTrackedRevision,Z as validateDocument};
|