revise 3.1.7 → 4.0.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +1677 -184
  2. package/FONT-LICENSE-HAN-EXT-B.txt +91 -0
  3. package/FONT-LICENSE-KATEX.txt +95 -0
  4. package/FONT-LICENSE-LIBERATION.txt +102 -0
  5. package/FONT-LICENSE-NOTO-MULTILINGUAL.txt +93 -0
  6. package/FONT-LICENSE-NOTO-SANS-SC.txt +93 -0
  7. package/FONT-LICENSE-NOTO.txt +94 -0
  8. package/FONT-LICENSE-SOURCE-CODE-PRO.txt +94 -0
  9. package/FONT-LICENSE-SOURCE-SERIF-4.txt +93 -0
  10. package/LICENSE +41 -21
  11. package/README.md +29 -121
  12. package/THIRD-PARTY-NOTICES.md +2751 -0
  13. package/assets/historyMaterializeWorker-ZFUHJDWr.js +619 -0
  14. package/chunks/AgentPageRenderer-CHHktDQ1.js +1 -0
  15. package/chunks/AgentPageRenderer-CN-N65JC.js +1 -0
  16. package/chunks/AttachmentDocumentImporter-DnHC9t7I.js +1 -0
  17. package/chunks/AttachmentDocumentImporter-Dqg7IPtK.js +1 -0
  18. package/chunks/ColorParserFull-BKH72fK8.js +446 -0
  19. package/chunks/DocumentScrubber-Ch_bOtHW.js +1 -0
  20. package/chunks/DocumentScrubber-DRzACkWJ.js +1 -0
  21. package/chunks/DocxConverter-BGPkGmyg.js +13 -0
  22. package/chunks/DocxConverter-DeurS5EF.js +13 -0
  23. package/chunks/DocxGraft-D71OgoMh.js +1 -0
  24. package/chunks/DocxGraft-QLkGEcwQ.js +1 -0
  25. package/chunks/FileImporter-BIT0ZBDY.js +1 -0
  26. package/chunks/FileImporter-Cgwoawuk.js +1 -0
  27. package/chunks/OdtConverter-2pm0SH5c.js +6 -0
  28. package/chunks/OdtConverter-CSUQTfVp.js +6 -0
  29. package/chunks/OfficeImportShared-C_mYnG5V.js +1 -0
  30. package/chunks/OfficeImportShared-O-d47J7O.js +1 -0
  31. package/chunks/PdfConverter-BYg_pr5J.js +21 -0
  32. package/chunks/PdfConverter-Z2HlY84F.js +21 -0
  33. package/chunks/PdfImportService-C2gwK1Sq.js +2 -0
  34. package/chunks/PdfImportService-CxtUtxM6.js +2 -0
  35. package/chunks/RtfConverter-BrtojpDV.js +15 -0
  36. package/chunks/RtfConverter-DlztsAoK.js +15 -0
  37. package/chunks/XmlConverter-3XWISlqr.js +2 -0
  38. package/chunks/XmlConverter-B1Kcohr0.js +2 -0
  39. package/chunks/__vite-browser-external-l0sNRNKZ.js +0 -0
  40. package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -0
  41. package/chunks/ar-vDYSGTpE.js +13 -0
  42. package/chunks/browser-module-BVdVmrPb.js +3 -0
  43. package/chunks/browser-module-CWlRHeO2.js +3 -0
  44. package/chunks/bundle.min-DRpfgV69.js +782 -0
  45. package/chunks/de-CWX4cvtt.js +13 -0
  46. package/chunks/es-DoAhvF6_.js +13 -0
  47. package/chunks/fil-DdAeD8Br.js +13 -0
  48. package/chunks/fr-CazsUjNQ.js +13 -0
  49. package/chunks/html2canvas.esm-CntiHiYW.js +997 -0
  50. package/chunks/index-BWdRWxoH.js +1807 -0
  51. package/chunks/index-D9_PwgOX.js +402 -0
  52. package/chunks/index-DcIXw_KB.js +402 -0
  53. package/chunks/ja-alh_QHTB.js +13 -0
  54. package/chunks/jspdf.es.min-BuJNZ-oY.js +1882 -0
  55. package/chunks/katex-DWj8TvwO.js +1462 -0
  56. package/chunks/pdf-BLWDCiFF.js +1828 -0
  57. package/chunks/persistInlineDocumentImages-DQj2iaqg.js +1 -0
  58. package/chunks/pseudoLocale-Bld5ZUFr.js +1 -0
  59. package/chunks/pseudoLocale-CLm3_c4X.js +1 -0
  60. package/chunks/tree-sitter-D6zWWUMP.js +4 -0
  61. package/chunks/wasmInline.generated-CBYFkdSM.js +1 -0
  62. package/chunks/web-tree-sitter-BXGZGnNj.js +2 -0
  63. package/chunks/zh-20eXwzFZ.js +13 -0
  64. package/cli-shim.js +34 -0
  65. package/full.js +1 -0
  66. package/index.d.ts +995 -13
  67. package/index.js +1 -31
  68. package/legacy/server.d.ts +19 -19
  69. package/legacy/server.js +39 -23
  70. package/package.json +55 -45
  71. package/serverToolContract.d.ts +420 -0
  72. package/serverToolInputs.generated.d.ts +269 -0
  73. package/style.css +1 -0
  74. package/version.d.ts +4 -0
  75. package/version.js +2 -0
  76. package/agent.d.ts +0 -139
  77. package/chunks/chunk-SMTOJL2X.js +0 -2436
  78. package/chunks/chunk-U5X47PZ6.js +0 -135
  79. package/chunks/chunk-U6YKQBKL.js +0 -15
  80. package/chunks/package-5SHL5FOJ.js +0 -14
  81. package/chunks/render-QD5VWKSV.js +0 -109
  82. package/cli-output.schema.json +0 -2159
  83. package/cli.js +0 -4152
  84. package/document.d.ts +0 -439
  85. package/docx.d.ts +0 -73
  86. package/errors.d.ts +0 -14
  87. package/legacy/editor.d.ts +0 -19
  88. package/legacy/editor.js +0 -16
  89. package/legacy/style.css +0 -2
  90. package/package.d.ts +0 -23
  91. package/render.d.ts +0 -27
@@ -0,0 +1 @@
1
+ const m="https://app-api.revise-sdk.invalid";async function h(t,r,n,e,o){const i={"Content-Type":"application/json"},a=await fetch(`${m}/uploads/images/presign`,{method:"POST",headers:i,body:JSON.stringify({fileName:r,contentType:n,fileSize:t.size,prefix:o})});if(!a.ok){const p=await a.text();throw new Error(p||"Failed to get upload URL")}const s=await a.json(),c=new Headers,l={...s.headers||{},"Content-Type":s.contentType||n};for(const[p,u]of Object.entries(l))u&&c.set(p,u);if(!(await fetch(s.uploadUrl,{method:s.method||"PUT",body:t,headers:c})).ok)throw new Error("Failed to upload to storage");return s.fileUrl}const g=/^data:(image\/(?:png|jpe?g|gif|bmp|x-emf|x-wmf));base64,([a-z0-9+/=\s]+)$/i,y=4;function d(t){switch(t.toLowerCase()){case"image/jpeg":case"image/jpg":return"jpg";case"image/gif":return"gif";case"image/bmp":return"bmp";case"image/x-emf":return"emf";case"image/x-wmf":return"wmf";default:return"png"}}function w(t){const r=t.replace(/\s+/g,"");if(typeof Buffer<"u")return new Uint8Array(Buffer.from(r,"base64"));const n=atob(r),e=new Uint8Array(n.length);for(let o=0;o<n.length;o++)e[o]=n.charCodeAt(o);return e}function f(t,r){if(Array.isArray(t)){for(const e of t)f(e,r);return}if(!t||typeof t!="object")return;const n=t;if(n.type==="image"&&typeof n.src=="string"){const e=t;r.push({src:e.src,replace:o=>{e.src=o}}),e.originalDataUrl&&r.push({src:e.originalDataUrl,replace:o=>{e.originalDataUrl=o}});return}for(const e of Object.values(n))f(e,r)}async function b(t,r){const n=t.match(g);if(!n)return null;try{const e=n[1].toLowerCase(),o=w(n[2]);if(o.byteLength===0)return null;const i=d(e),a=new Blob([Uint8Array.from(o).buffer],{type:e});return await h(a,`docx-import-${r}.${i}`,e,null,"rehosted-images")}catch{return null}}async function U(t){if(typeof window>"u")return;const r=[];f(t.children,r),f(t.notes,r),f(t.chrome,r);const n=new Map;for(const a of r){if(!g.test(a.src))continue;const s=n.get(a.src);s?s.push(a):n.set(a.src,[a])}const e=[...n.keys()];let o=0;const i=Array.from({length:Math.min(y,e.length)},async()=>{for(;o<e.length;){const a=o++,s=e[a],c=await b(s,a);if(c)for(const l of n.get(s)??[])l.replace(c)}});await Promise.all(i)}export{U as persistInlineDocumentImages};
@@ -0,0 +1 @@
1
+ import{a9 as u}from"./index-D9_PwgOX.js";const a={a:"á",b:"ƀ",c:"ç",d:"ð",e:"é",f:"ƒ",g:"ğ",h:"ĥ",i:"í",j:"ĵ",k:"ķ",l:"ł",m:"ɱ",n:"ñ",o:"ó",p:"þ",q:"ɋ",r:"ř",s:"š",t:"ţ",u:"ú",v:"ṽ",w:"ŵ",x:"ẋ",y:"ý",z:"ž",A:"Á",B:"Ɓ",C:"Ç",D:"Ð",E:"É",F:"Ƒ",G:"Ğ",H:"Ĥ",I:"Í",J:"Ĵ",K:"Ķ",L:"Ł",M:"Ṁ",N:"Ñ",O:"Ó",P:"Þ",Q:"Q",R:"Ř",S:"Š",T:"Ţ",U:"Ú",V:"Ṽ",W:"Ŵ",X:"X",Y:"Ý",Z:"Ž"},h=1.75,l="·";function p(n){let t="";for(const r of n)t+=a[r]??r;return t}function c(n){if(!n)return n;const t=n.match(/^\s*/)?.[0]??"",r=n.match(/\s*$/)?.[0]??"",o=n.slice(t.length,n.length-r.length);if(!o)return n;const e=o.split(/(\{\w+\})/g).map((i,f)=>f%2===1?i:p(i)).join(""),s=Math.max(1,Math.round(o.length*(h-1)));return`${t}⟦${e}${l.repeat(s)}⟧${r}`}function g(n){if(typeof n=="string")return c(n);if(Array.isArray(n))return n.map(c);const t=n,r={};for(const[o,e]of Object.entries(t))r[o]=c(e);return r}function m(){const n={};for(const[t,r]of Object.entries(u))n[t]=g(r);return n}export{m as buildPseudoOverlay};
@@ -0,0 +1 @@
1
+ import{a9 as u}from"./index-DcIXw_KB.js";const a={a:"á",b:"ƀ",c:"ç",d:"ð",e:"é",f:"ƒ",g:"ğ",h:"ĥ",i:"í",j:"ĵ",k:"ķ",l:"ł",m:"ɱ",n:"ñ",o:"ó",p:"þ",q:"ɋ",r:"ř",s:"š",t:"ţ",u:"ú",v:"ṽ",w:"ŵ",x:"ẋ",y:"ý",z:"ž",A:"Á",B:"Ɓ",C:"Ç",D:"Ð",E:"É",F:"Ƒ",G:"Ğ",H:"Ĥ",I:"Í",J:"Ĵ",K:"Ķ",L:"Ł",M:"Ṁ",N:"Ñ",O:"Ó",P:"Þ",Q:"Q",R:"Ř",S:"Š",T:"Ţ",U:"Ú",V:"Ṽ",W:"Ŵ",X:"X",Y:"Ý",Z:"Ž"},h=1.75,l="·";function p(n){let t="";for(const r of n)t+=a[r]??r;return t}function c(n){if(!n)return n;const t=n.match(/^\s*/)?.[0]??"",r=n.match(/\s*$/)?.[0]??"",o=n.slice(t.length,n.length-r.length);if(!o)return n;const e=o.split(/(\{\w+\})/g).map((i,f)=>f%2===1?i:p(i)).join(""),s=Math.max(1,Math.round(o.length*(h-1)));return`${t}⟦${e}${l.repeat(s)}⟧${r}`}function g(n){if(typeof n=="string")return c(n);if(Array.isArray(n))return n.map(c);const t=n,r={};for(const[o,e]of Object.entries(t))r[o]=c(e);return r}function m(){const n={};for(const[t,r]of Object.entries(u))n[t]=g(r);return n}export{m as buildPseudoOverlay};