revise 3.1.6 → 4.0.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 +1680 -168
- package/FONT-LICENSE-HAN-EXT-B.txt +91 -0
- package/FONT-LICENSE-KATEX.txt +95 -0
- package/FONT-LICENSE-LIBERATION.txt +102 -0
- package/FONT-LICENSE-NOTO-MULTILINGUAL.txt +93 -0
- package/FONT-LICENSE-NOTO-SANS-SC.txt +93 -0
- package/FONT-LICENSE-NOTO.txt +94 -0
- package/FONT-LICENSE-SOURCE-CODE-PRO.txt +94 -0
- package/FONT-LICENSE-SOURCE-SERIF-4.txt +93 -0
- package/LICENSE +41 -21
- package/README.md +32 -119
- package/THIRD-PARTY-NOTICES.md +2751 -0
- package/assets/historyMaterializeWorker-ZFUHJDWr.js +619 -0
- package/chunks/AgentPageRenderer-5mZ6fxqO.js +1 -0
- package/chunks/AgentPageRenderer-C3jIBoeM.js +1 -0
- package/chunks/AttachmentDocumentImporter-CXkM4VoT.js +1 -0
- package/chunks/AttachmentDocumentImporter-Kox5By7a.js +1 -0
- package/chunks/ColorParserFull-BKH72fK8.js +446 -0
- package/chunks/DocumentScrubber-BxmlzNNz.js +1 -0
- package/chunks/DocumentScrubber-wmjRnX7C.js +1 -0
- package/chunks/DocxConverter-BH3E7nfQ.js +13 -0
- package/chunks/DocxConverter-DEHGCdib.js +13 -0
- package/chunks/DocxGraft-BMvTAnGi.js +1 -0
- package/chunks/DocxGraft-V2YXiUmK.js +1 -0
- package/chunks/FileImporter-CtX8ZPjV.js +1 -0
- package/chunks/FileImporter-Da-7eRh3.js +1 -0
- package/chunks/OdtConverter-CMkSeU8e.js +6 -0
- package/chunks/OdtConverter-DV94rkDL.js +6 -0
- package/chunks/OfficeImportShared-CA3dia_A.js +1 -0
- package/chunks/OfficeImportShared-hxIa69By.js +1 -0
- package/chunks/PdfConverter-B-uRwLux.js +21 -0
- package/chunks/PdfConverter-B8J_5yim.js +21 -0
- package/chunks/PdfImportService-BjQ4rl-Z.js +2 -0
- package/chunks/PdfImportService-RtFCP6hh.js +2 -0
- package/chunks/RtfConverter-CFDnUApT.js +15 -0
- package/chunks/RtfConverter-CpJGtC5U.js +15 -0
- package/chunks/XmlConverter-CQCrgTf7.js +2 -0
- package/chunks/XmlConverter-CePTE21k.js +2 -0
- package/chunks/__vite-browser-external-l0sNRNKZ.js +0 -0
- package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -0
- package/chunks/ar-vDYSGTpE.js +13 -0
- package/chunks/browser-module-B-uafDG6.js +3 -0
- package/chunks/browser-module-jwkhffzv.js +3 -0
- package/chunks/bundle.min-DRpfgV69.js +782 -0
- package/chunks/de-CWX4cvtt.js +13 -0
- package/chunks/es-DoAhvF6_.js +13 -0
- package/chunks/fil-DdAeD8Br.js +13 -0
- package/chunks/fr-CazsUjNQ.js +13 -0
- package/chunks/html2canvas.esm-CntiHiYW.js +997 -0
- package/chunks/index-BWdRWxoH.js +1807 -0
- package/chunks/index-C7VhCKXe.js +402 -0
- package/chunks/index-p6UytRm8.js +402 -0
- package/chunks/ja-alh_QHTB.js +13 -0
- package/chunks/jspdf.es.min-BuJNZ-oY.js +1882 -0
- package/chunks/katex-DWj8TvwO.js +1462 -0
- package/chunks/pdf-BLWDCiFF.js +1828 -0
- package/chunks/persistInlineDocumentImages-DQj2iaqg.js +1 -0
- package/chunks/pseudoLocale-Bkzfsfiw.js +1 -0
- package/chunks/pseudoLocale-D-AfwRwa.js +1 -0
- package/chunks/tree-sitter-D6zWWUMP.js +4 -0
- package/chunks/wasmInline.generated-CBYFkdSM.js +1 -0
- package/chunks/web-tree-sitter-BXGZGnNj.js +2 -0
- package/chunks/zh-20eXwzFZ.js +13 -0
- package/cli-shim.js +34 -0
- package/full.js +1 -0
- package/index.d.ts +995 -13
- package/index.js +1 -31
- package/legacy/server.d.ts +19 -19
- package/legacy/server.js +39 -23
- package/package.json +55 -45
- package/serverToolContract.d.ts +420 -0
- package/serverToolInputs.generated.d.ts +269 -0
- package/style.css +1 -0
- package/version.d.ts +4 -0
- package/version.js +2 -0
- package/agent.d.ts +0 -139
- package/chunks/chunk-SMTOJL2X.js +0 -2436
- package/chunks/chunk-U5X47PZ6.js +0 -135
- package/chunks/chunk-U6YKQBKL.js +0 -15
- package/chunks/package-5SHL5FOJ.js +0 -14
- package/chunks/render-QD5VWKSV.js +0 -109
- package/cli-output.schema.json +0 -2159
- package/cli.js +0 -4152
- package/document.d.ts +0 -439
- package/docx.d.ts +0 -73
- package/errors.d.ts +0 -14
- package/legacy/editor.d.ts +0 -19
- package/legacy/editor.js +0 -16
- package/legacy/style.css +0 -2
- package/package.d.ts +0 -23
- 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-C7VhCKXe.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-p6UytRm8.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};
|