revise 2.0.1 → 2.2.0
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 +195 -0
- package/README.md +4 -1
- package/assets/historyMaterializeWorker-B51R08XN.js +612 -0
- package/backend.d.ts +8 -2
- package/backend.js +3 -1
- package/chunks/AgentPageRenderer-CH8kSTJn.js +1 -0
- package/chunks/AgentPageRenderer-P23XVguo.js +1 -0
- package/chunks/AttachmentDocumentImporter-B1WOaa7d.js +1 -0
- package/chunks/AttachmentDocumentImporter-CT_PJp_e.js +1 -0
- package/chunks/BidiText-Swm5fl9J.js +160 -0
- package/chunks/ColorParserFull-BKH72fK8.js +446 -1
- package/chunks/DocumentMutator-btiDK57e.js +31 -0
- package/chunks/DocumentScrubber-CMPfm_HF.js +18 -0
- package/chunks/{DocumentScrubber-DrgzBlx4.js → DocumentScrubber-Cm2kH8op.js} +1 -1
- package/chunks/{DocumentScrubber-W0EfGmL-.js → DocumentScrubber-bJoKijol.js} +1 -1
- package/chunks/DocumentStylesheet-DreoD7sD.js +7 -0
- package/chunks/DocxConverter-BcVG-p5K.js +13 -0
- package/chunks/DocxConverter-D2bO5RE-.js +1125 -0
- package/chunks/DocxConverter-haCfRuWb.js +13 -0
- package/chunks/{DocxGraft-B6W7fbh4.js → DocxGraft-BRKh4mHQ.js} +1 -1
- package/chunks/DocxGraft-BxSQtl12.js +7 -0
- package/chunks/{DocxGraft-Cj7v78BO.js → DocxGraft-C9MBQCnf.js} +1 -1
- package/chunks/FileImporter-CszqRfVU.js +1 -0
- package/chunks/FileImporter-DObFoCCn.js +1 -0
- package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -1
- package/chunks/HtmlConverter-DwXB4IDh.js +267 -0
- package/chunks/ListNumbering-Qlu6AuRZ.js +23 -1
- package/chunks/MarkdownConverter-CUC8GgsS.js +57 -0
- package/chunks/MathRenderer-DT6GyJXb.js +68 -0
- package/chunks/OdtConverter-7h9HHMpL.js +125 -0
- package/chunks/OdtConverter-Ct4qypJk.js +6 -0
- package/chunks/OdtConverter-DFl__sJc.js +6 -0
- package/chunks/OfficeImportShared-BY6FdZ8d.js +1 -0
- package/chunks/OfficeImportShared-BrZoDM0j.js +30 -0
- package/chunks/OfficeImportShared-Bvm-mOyj.js +1 -0
- package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
- package/chunks/PdfConverter-1wyvoT7X.js +21 -0
- package/chunks/PdfConverter-BAoEHILo.js +21 -0
- package/chunks/PdfConverter-CKEvFj11.js +448 -0
- package/chunks/{PdfImportService-Dj1-3L2B.js → PdfImportService-BhLPp5uG.js} +2 -2
- package/chunks/{PdfImportService-OE9G383I.js → PdfImportService-xbzrN__L.js} +2 -2
- package/chunks/RtfConverter-Bxn-enp8.js +15 -0
- package/chunks/RtfConverter-LZPzBDSr.js +15 -0
- package/chunks/RtfConverter-_bacXqr1.js +186 -0
- package/chunks/TableBorders-CwnF3jvH.js +30 -0
- package/chunks/TableGrid-DbroRucl.js +12 -0
- package/chunks/TextFileDecoder--rsVs3NR.js +9 -2
- package/chunks/{TxtConverter-BYazsp6P.js → TxtConverter-C7FOwHpH.js} +5 -2
- package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
- package/chunks/XmlConverter-7oo8oeQB.js +2 -0
- package/chunks/XmlConverter-DGORHJcZ.js +96 -0
- package/chunks/XmlConverter-DeLHReK_.js +2 -0
- package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -1
- package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -1
- package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -1
- package/chunks/ar-ComXvtmh.js +13 -0
- package/chunks/backend-DecaBz-I.js +490 -0
- package/chunks/base64-sSPOzq-u.js +198 -0
- package/chunks/browser-module-CFmqfGkE.js +1791 -3
- package/chunks/{browser-module-BbaxnHNK.js → browser-module-Dj5o3kuL.js} +1 -1
- package/chunks/{browser-module-D2ixluMg.js → browser-module-UuM_O36W.js} +1 -1
- package/chunks/bundle.min-DRpfgV69.js +779 -5
- package/chunks/capture-1btcWcPF.js +9 -0
- package/chunks/carrier-DQeng6yq.js +6 -0
- package/chunks/de-BkbpIKxx.js +13 -0
- package/chunks/es-CKkXujOF.js +13 -0
- package/chunks/fil-piIHMc8F.js +13 -0
- package/chunks/footnoteFlatten-DUQticYy.js +6 -0
- package/chunks/fr-DuA8qLje.js +13 -0
- package/chunks/graftExport-CYnStOdU.js +82 -0
- package/chunks/html2canvas.esm-CntiHiYW.js +994 -2
- package/chunks/index-2TBhRkX7.js +387 -0
- package/chunks/index-BWdRWxoH.js +1796 -13
- package/chunks/index-Bf14eTEW.js +1096 -0
- package/chunks/index-BwcX_r62.js +387 -0
- package/chunks/index.es-CI0QPo8w.js +780 -5
- package/chunks/{index.es-B97tjxvW.js → index.es-CI7cDExj.js} +1 -1
- package/chunks/{index.es-mTU7Sl3w.js → index.es-DHpGt6Y5.js} +1 -1
- package/chunks/ja-DgrSs555.js +13 -0
- package/chunks/{jspdf.es.min-Mykp4BZO.js → jspdf.es.min--GshOuIm.js} +1 -1
- package/chunks/jspdf.es.min-DU74zN8b.js +1747 -32
- package/chunks/{jspdf.es.min-DGiD4mlU.js → jspdf.es.min-DurJZ1zW.js} +1 -1
- package/chunks/jszip.min-CPW0h1Kx.js +476 -2
- package/chunks/katex-DWj8TvwO.js +1209 -8
- package/chunks/pdf-BLWDCiFF.js +1826 -10
- package/chunks/pseudoLocale-BoYTjmiK.js +1 -0
- package/chunks/pseudoLocale-DG2NnZmz.js +1 -0
- package/chunks/purify.es-BwLardii.js +107 -2
- package/chunks/serverDocumentSession-CJ1EH3Tp.js +15 -0
- package/chunks/signatures-Bwt_OGik.js +17 -0
- package/chunks/suggestionAuthorship-B-IuLQlE.js +1 -0
- package/chunks/tree-sitter-D6zWWUMP.js +1 -1
- package/chunks/web-tree-sitter-BXGZGnNj.js +2 -1
- package/chunks/zh-9OF3SWWO.js +13 -0
- package/full.js +1 -1
- package/index.d.ts +42 -15
- package/index.js +1 -1
- package/package.json +1 -1
- package/root.js +2 -2
- package/serverToolContract.d.ts +21 -3
- package/serverToolInputs.generated.d.ts +23 -2
- package/style.css +1 -1
- package/assets/historyMaterializeWorker-C4uxcZEh.js +0 -3
- package/chunks/AgentPageRenderer-BIf_Fza8.js +0 -1
- package/chunks/AgentPageRenderer-DT9sNxEn.js +0 -1
- package/chunks/AttachmentDocumentImporter-BUavYRxO.js +0 -1
- package/chunks/AttachmentDocumentImporter-DGwfDJSH.js +0 -1
- package/chunks/BidiText-D7LYTAUL.js +0 -1
- package/chunks/DocumentMutator-CjN7Kk-X.js +0 -31
- package/chunks/DocumentScrubber-C9ZZEcYW.js +0 -1
- package/chunks/DocumentStylesheet-byN5dtC6.js +0 -1
- package/chunks/DocxConverter-Be3uPNcD.js +0 -11
- package/chunks/DocxConverter-CGYMfz-j.js +0 -11
- package/chunks/DocxConverter-DabDLfsu.js +0 -11
- package/chunks/DocxGraft-Duvo2cpy.js +0 -1
- package/chunks/FileImporter-CjUX2S4s.js +0 -1
- package/chunks/FileImporter-DtkbI6rF.js +0 -1
- package/chunks/HtmlConverter-ikXImzTY.js +0 -61
- package/chunks/MarkdownConverter-CFrcLyO_.js +0 -17
- package/chunks/MathRenderer-B0Y1h1JU.js +0 -33
- package/chunks/OdtConverter-BFT_P8SI.js +0 -1
- package/chunks/OdtConverter-Cnda9T0q.js +0 -1
- package/chunks/OdtConverter-WdwwXKVM.js +0 -1
- package/chunks/PdfConverter-D7UM58vc.js +0 -21
- package/chunks/PdfConverter-TB-QPw29.js +0 -21
- package/chunks/PdfConverter-wVP63986.js +0 -21
- package/chunks/RtfConverter-D-oqPWNl.js +0 -14
- package/chunks/RtfConverter-D9zhE07-.js +0 -14
- package/chunks/RtfConverter-DZgwU-_R.js +0 -14
- package/chunks/TableBorders-BorZS8aZ.js +0 -1
- package/chunks/TableGrid-DVWaRZv0.js +0 -1
- package/chunks/ar-C8zx2RwP.js +0 -8
- package/chunks/backend-MFpDFVrD.js +0 -1
- package/chunks/base64-BNMNG-lN.js +0 -1
- package/chunks/capture-qC26xmfy.js +0 -1
- package/chunks/carrier-BWONvrA7.js +0 -1
- package/chunks/de-ByQFqecF.js +0 -8
- package/chunks/es-PHpJXv5S.js +0 -8
- package/chunks/footnoteFlatten-Bdnn_bz1.js +0 -1
- package/chunks/graftExport-CP3h2T88.js +0 -2
- package/chunks/index-CjeGoI2g.js +0 -351
- package/chunks/index-D7V8zn4w.js +0 -36
- package/chunks/index-DyOcu9mD.js +0 -351
- package/chunks/pseudoLocale-C90lXrPg.js +0 -1
- package/chunks/pseudoLocale-UA_TkGrH.js +0 -1
- package/chunks/serverDocumentSession-CRZSb5SO.js +0 -11
- package/chunks/signatures-CsL_TjvW.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as p}from"./DocumentMutator-CjN7Kk-X.js";import{d as N}from"./backend-MFpDFVrD.js";const i="Author",h=o=>{const n=[o.children];o.notes&&n.push(o.notes),o.chrome&&n.push(o.chrome);for(const e of[o.headers,o.footers])if(e)for(const c of Object.values(e))Array.isArray(c)&&n.push(c);return n},g=(o,n)=>{n(o);for(const e of o)e&&Array.isArray(e.children)&&g(e.children,n)},l=(o,n)=>{for(const e of h(o))g(e,c=>{for(const a of c)a?.type==="text"&&n(a)})},y=o=>{o.marks&&Object.keys(o.marks).length===0&&delete o.marks},A=o=>{const n=new Set,e=c=>{typeof c=="string"&&c.length>0&&n.add(c)};for(const c of h(o))g(c,a=>{for(const t of a){if(!t||typeof t!="object")continue;e(t.suggestionId),e(t.structuralSuggestionId);for(const s of["structuralSuggestionRecord","structuralSuggestionRecords"]){const u=t[s];if(typeof u=="string")try{const f=JSON.parse(u),m=Array.isArray(f)?f:[f];for(const d of m)e(d?.id)}catch{}}const r=t.marks;if(r&&(e(r.suggestionId),typeof r.layeredInsertion=="string"))try{e(JSON.parse(r.layeredInsertion)?.id)}catch{}}});return n},S=(o,n)=>{const e=N(o);try{const c=p.createSuggestionProjectionFromYDoc(e,n);try{const a=c.doc,t={...o,children:a.children};return a.notes?t.notes=a.notes:delete t.notes,t}finally{c.ydoc.destroy()}}finally{e.destroy()}},k=(o,n)=>{o.author&&o.author!==i&&(n.add(o.author),o.author=i),delete o.initials,delete o.authorId,delete o.authorImageUrl,o.agentName&&(n.add(o.agentName),delete o.agentName)};function v(o,n){let e=structuredClone(o);const c={commentsRemoved:0,suggestionsResolved:0,hiddenRemoved:0,authorsAnonymized:0,corePropsCleared:!1};if(n.resolveSuggestions){const a=A(e);a.size>0&&(e=S(e,n.resolveSuggestions),c.suggestionsResolved=a.size)}if(n.removeComments){const a=new Set((e.comments??[]).map(t=>t.id));l(e,t=>{if(t.marks?.comment){for(const r of t.marks.comment.split(","))r&&a.add(r);delete t.marks.comment,y(t)}}),delete e.comments,c.commentsRemoved=a.size}if(n.removeHiddenText)for(const a of h(e))g(a,t=>{const r=[];for(const s of t){if(s?.type==="text"&&s.marks?.hidden){c.hiddenRemoved+=1,s.marks.footnoteRef&&(delete s.marks.hidden,y(s),r.push(s));continue}r.push(s)}r.length!==t.length&&(t.length=0,t.push(...r))});if(n.anonymizeAuthors){const a=new Set;l(e,t=>{const r=t.marks;if(r){if(r.suggestionAuthorName&&r.suggestionAuthorName!==i&&(a.add(r.suggestionAuthorName),r.suggestionAuthorName=i),typeof r.layeredInsertion=="string")try{const s=JSON.parse(r.layeredInsertion);s&&typeof s=="object"&&s.authorName&&s.authorName!==i&&(a.add(s.authorName),s.authorName=i,r.layeredInsertion=JSON.stringify(s))}catch{}if(typeof r.docxMove=="string")try{const s=JSON.parse(r.docxMove);s&&typeof s=="object"&&s.rangeAuthor&&s.rangeAuthor!==i&&(a.add(s.rangeAuthor),s.rangeAuthor=i,r.docxMove=JSON.stringify(s))}catch{}}});for(const t of h(e))g(t,r=>{for(const s of r)for(const u of["structuralSuggestionRecord","structuralSuggestionRecords"])if(typeof s?.[u]=="string")try{const f=JSON.parse(s[u]),m=Array.isArray(f)?f:[f];for(const d of m)d&&typeof d=="object"&&typeof d.agentName=="string"&&d.agentName.length>0&&d.agentName!==i&&(a.add(d.agentName),d.agentName=i);s[u]=JSON.stringify(Array.isArray(f)?m:m[0])}catch{}});for(const t of e.comments??[])k(t,a);if(e.coreProperties)for(const t of["creator","lastModifiedBy"]){const r=e.coreProperties[t];r&&r!==i&&(a.add(r),e.coreProperties[t]=i)}c.authorsAnonymized=a.size}return n.clearCoreProperties&&(e.coreProperties&&Object.keys(e.coreProperties).length>0&&(c.corePropsCleared=!0),delete e.coreProperties),{doc:e,summary:c}}export{i as SCRUBBED_AUTHOR_NAME,v as scrubDocument};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const i="Revise Agent",l="Anonymous";function p(e){const n=e?.trim();return!n||n===i}function c(e){return e?.paragraphStyles.find(n=>n.default)}function f(e,n){if(!e)return;const t=e.paragraphStyles.filter(o=>o.headingLevel===n);if(t.length!==0)return t.find(o=>o.styleId.toLowerCase()===`heading${n}`)??t[0]}function d(e,n){return e?.paragraphStyles.find(t=>t.styleId===n)}function u(e,n){return n===void 0?c(e):f(e,n)}const y=["align","lineSpacing","spaceBefore","spaceAfter","contextualSpacing","keepNext","keepLines","widowControl","leftIndent","firstLineIndent","direction","borders","shading","tabStops"];function g(e,n){if(n)for(const t of e){if(t.type!=="paragraph")continue;const o=t.styleId?d(n,t.styleId):t.heading?f(n,t.heading):void 0;if(!o)continue;t.heading&&!t.styleId&&o.styleId.toLowerCase()!=="normal"&&(t.styleId=o.styleId);const r=o.paragraphAttrs??{},a=t;for(const s of y)Object.prototype.hasOwnProperty.call(r,s)&&r[s]!==void 0&&a[s]===void 0&&(a[s]=r[s]);if(o.runMarks)for(const s of t.children)s.type==="text"&&(s.marks={...o.runMarks,...s.marks})}}function h(e,n){const t=new Set(["fontSize"]);for(const r of Object.keys(e??{}))t.add(r);for(const r of Object.keys(n??{}))t.add(r);const o={};for(const r of t){const a=n?.[r];o[r]=a===void 0?!1:a}return o}export{l as A,i as R,g as a,d as b,u as c,h as d,p as i,c as s};
|