@reviseio/engine 3.0.1 → 3.1.1
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/CHANGELOG.md +29 -0
- package/assets/{historyMaterializeWorker-Kl0syEbc.js → historyMaterializeWorker-BMHTnStL.js} +131 -130
- package/chunks/{AgentHtmlConverter-CnnB8-WI.js → AgentHtmlConverter-B5qstcmM.js} +129 -128
- package/chunks/{AgentPageRenderer-DLgUGrGy.js → AgentPageRenderer-JMhCw-hi.js} +4 -4
- package/chunks/BlockDiff-C8eiZ-sf.js +45 -0
- package/chunks/{CanvasRenderer-C1Vegx9Y.js → CanvasRenderer-C2vAzLWM.js} +12 -12
- package/chunks/DocumentCompare-DX4RWeSV.js +10 -0
- package/chunks/{DocumentLayoutEngine-C62pyGVf.js → DocumentLayoutEngine-BhcWXkeu.js} +45 -45
- package/chunks/{DocumentMutator-Bat_oLBQ.js → DocumentMutator-FEFU1YM0.js} +6 -6
- package/chunks/DocumentOutline-BOZoTohH.js +4 -0
- package/chunks/{DocumentScrubber-BZQn_z92.js → DocumentScrubber-C4N3Qagm.js} +1 -1
- package/chunks/{DocumentSession-BDcazSEv.js → DocumentSession-gZHWP7By.js} +1 -1
- package/chunks/{DocxConverter-BC31uYIL.js → DocxConverter-BOyLn5eZ.js} +709 -703
- package/chunks/{DocxGraft-L10HXM3U.js → DocxGraft-BbE-AaM5.js} +2 -2
- package/chunks/{HtmlConverter-C5ihhZ6G.js → HtmlConverter-BlzwsPEn.js} +3 -3
- package/chunks/MarkdownConverter-BHVskVXI.js +59 -0
- package/chunks/{OdtConverter-c1fTWoAt.js → OdtConverter-BdmBFOD1.js} +1 -1
- package/chunks/{OfficeImportShared-CrOpHpJ-.js → OfficeImportShared-B2XJgnDO.js} +4 -4
- package/chunks/{PdfConverter-DX7fsRH5.js → PdfConverter-DZMCHDAo.js} +6 -6
- package/chunks/{RtfConverter-hbJ2529G.js → RtfConverter-RqE-xZcW.js} +2 -2
- package/chunks/{TableBorders-DVhdvo6f.js → TableBorders-ARyTi49V.js} +1 -1
- package/chunks/{TxtConverter-YHv5FXWb.js → TxtConverter-EPQtb6A6.js} +1 -1
- package/chunks/{Typography-B4gndEdB.js → Typography-XR6scRNV.js} +9 -9
- package/chunks/{XmlConverter-BRRluy9k.js → XmlConverter-9sFRFaza.js} +1 -1
- package/chunks/{capture-i_dPkQIS.js → capture-DhGn0CWA.js} +1 -1
- package/chunks/{carrier-pYM9xf6x.js → carrier-D58g-gw4.js} +1 -1
- package/chunks/{chromeImageLayout-BiQ3Iz1-.js → chromeImageLayout-DeYYS8YP.js} +1 -1
- package/chunks/{engine-LMUnxdm2.js → engine-C5fxuZJo.js} +139 -139
- package/chunks/{footnoteFlatten-EE85Hjre.js → footnoteFlatten-coCVFd3c.js} +1 -1
- package/chunks/{graftExport-G-dG7Vcc.js → graftExport-FBGE2qvt.js} +1 -1
- package/chunks/{index-BLb10wQt.js → index-Cezk1s_y.js} +4 -4
- package/chunks/{serverDocumentSession-DGDU5Lh3.js → serverDocumentSession-LMu3kocH.js} +559 -560
- package/chunks/{signatures-DTNDS2PH.js → signatures-DsJnnIqV.js} +1 -1
- package/chunks/textExtraction-Bqaqt1Kg.js +2 -0
- package/engine.js +2 -2
- package/package.json +2 -2
- package/chunks/BlockDiff-B6-aJxHo.js +0 -42
- package/chunks/DocumentCompare-C8295s35.js +0 -6
- package/chunks/MarkdownConverter-DofaSeC4.js +0 -57
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as h}from"./engine-
|
|
1
|
+
import{a as h}from"./engine-C5fxuZJo.js";function y(e){e=e.children.some(t=>t.type==="header-footer")?{...e,children:e.children.filter(t=>t.type!=="header-footer")}:e;const f=[...e.notes??[],...e.children.
|
|
2
2
|
filter(t=>t.type==="footnote")];if(f.length===0)return e;const r=new Map,c=t=>{if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach(c);return}const o=t;o.type!=="footnote"&&(o.marks?.footnoteRef&&
|
|
3
3
|
!r.has(o.marks.footnoteRef)&&r.set(o.marks.footnoteRef,o.text??""),c(o.children))};c(e.children.filter(t=>t.type!=="footnote"));const i=[];let s=r.size;const d=[...f.filter(t=>t.noteKind!=="endnote"),
|
|
4
4
|
...f.filter(t=>t.noteKind==="endnote")];for(const t of d){const o=r.get(t.id)||String(s+=1);t.children.forEach((n,p)=>{if(n.type!=="paragraph"){i.push(n);return}if(p===0){const a={...n,id:h(),children:[
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{J as He}from"./jszip.min-CPW0h1Kx.js";import{findOpenTag as Ue,endOfTag as Je,scanElementChildren as _}from"./xmlScan-DXjt2cTS.js";import{C as Y,d as ht,e as wt,c as pt,p as xt,m as yt,h as bt,
|
|
2
|
-
g as St,f as vt,n as $t,b as It,l as ve,k as qe}from"./signatures-
|
|
2
|
+
g as St,f as vt,n as $t,b as It,l as ve,k as qe}from"./signatures-DsJnnIqV.js";import{h as At}from"./capture-DhGn0CWA.js";function Xe(t){return!!(t==="word/document.xml"||t==="word/styles.xml"||t==="w\
|
|
3
3
|
ord/settings.xml"||t==="word/footnotes.xml"||t==="word/endnotes.xml"||t==="word/comments.xml"||t==="word/commentsExtended.xml"||t==="docProps/core.xml"||/^word\/(header|footer)\d*\.xml$/.test(t)||/^word\/_rels\/(header|footer)\d*\.xml\.rels$/.
|
|
4
4
|
test(t)||t==="word/_rels/footnotes.xml.rels"||t==="word/_rels/endnotes.xml.rels")}function oe(t){return t==="word/footnotes.xml"||t==="word/endnotes.xml"||t==="word/_rels/footnotes.xml.rels"||t==="wor\
|
|
5
5
|
d/_rels/endnotes.xml.rels"?"notes":/^word\/comments[A-Za-z]*\.xml$/.test(t)||/^word\/_rels\/comments[A-Za-z]*\.xml\.rels$/.test(t)?"comments":/^word\/(header|footer)\d*\.xml$/.test(t)||/^word\/_rels\/(header|footer)\d*\.xml\.rels$/.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{x as ot,a as tt,
|
|
2
|
-
G as $t,ak as Di,
|
|
1
|
+
import{x as ot,a as tt,bE as St,bh as Oi,bF as ut,bG as Fi,bH as Fe,bI as Pt,bJ as Ri,bK as Wi,C as et,_ as Ai,aN as Re,F as Mt,bL as nt,bM as Lt,bq as Bi,b0 as We,aR as ne,bw as zi,bv as Ae,u as Be,bm as mt,
|
|
2
|
+
G as $t,ak as Di,bx as ze,af as Hi,by as Ot,bz as pt,bN as Ei}from"./engine-C5fxuZJo.js";import{l as $i,s as Ni,d as ji,i as Xi}from"./HorizontalRuleOrnaments-gmUZ3R7Q.js";import*as rt from"yjs";import{
|
|
3
3
|
getLayoutBlockSpacingPx as bt,layoutForBlockBounds as Ft,resolveBlockSpacingMargins as De,declaresOwnSpaceBefore as Ki}from"./DocumentLayout-CsU5MR-3.js";import{k as G,f as vt,g as at,m as Yi,i as Nt,
|
|
4
|
-
F as At,L as Gi,j as re}from"./Typography-
|
|
4
|
+
F as At,L as Gi,j as re}from"./Typography-XR6scRNV.js";import{x as gt,y as ft,z as He,A as xt,B as Ee,C as $e,D as qi,I as Vi}from"./CanvasRenderer-C2vAzLWM.js";import{g as jt,I as Xt,M as Ui}from"./MathRenderer-Bz9WEVvF.js";
|
|
5
5
|
import{t as Ji,j as se,a as Kt,b as _i,g as Zi,k as Qi,h as Ne,p as je}from"./BidiText-Bkp4Y90s.js";import{a as wt,l as Tt,g as tn,b as Yt,c as en}from"./UnicodeUtils-CXtusU4g.js";import{o as nn,s as Xe,
|
|
6
|
-
r as rn,n as Ke,p as Ye}from"./ListNumbering-Qlu6AuRZ.js";import{n as sn,b as oe,c as on}from"./TableGrid-DbroRucl.js";import{r as an,c as ln,b as hn,q as dn,u as Bt,t as cn}from"./TableBorders-
|
|
6
|
+
r as rn,n as Ke,p as Ye}from"./ListNumbering-Qlu6AuRZ.js";import{n as sn,b as oe,c as on}from"./TableGrid-DbroRucl.js";import{r as an,c as ln,b as hn,q as dn,u as Bt,t as cn}from"./TableBorders-ARyTi49V.js";
|
|
7
7
|
const it={heightPx:26,paddingXPx:10,cornerRadiusPx:5,fontPx:11,fontFamily:"ui-monospace, Menlo, Consolas, monospace",approxCharWidthPx:6.7,minWidthPx:72};function ae(u){return u.detail?`${u.tagName} ·\
|
|
8
8
|
${u.detail}`:u.tagName}function Ge(u,t){const e=ae(u).length*it.approxCharWidthPx+it.paddingXPx*2;return Math.min(Math.max(it.minWidthPx,Math.ceil(e)),Math.max(t,it.minWidthPx))}class un{constructor(){
|
|
9
9
|
this.type="docx-raw",this.isTextBased=!1}render(t,e,i,n,r){t.save();const s=r?.renderCtx,o=i.relativeToPage?0:s?.yOffset??0,a=i.y-o,l=s?.theme,h=l?.text??"#6b7280",c=e.diffState,d=c==="insert"&&l?l.diffInsert:
|