@univerjs-pro/pdfs-ui 1.0.0-alpha.8 → 1.0.0-beta.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/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +60 -21
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/command-ids.d.ts +1 -1
- package/lib/types/commands/operations/pdf-history.operation.d.ts +9 -0
- package/lib/types/commands/pdf-clipboard.command.d.ts +5 -0
- package/lib/types/controllers/pdf-clipboard.controller.d.ts +5 -0
- package/lib/types/editor/inspector-model.d.ts +23 -3
- package/lib/types/editor/link-annotation-targets.d.ts +11 -0
- package/lib/types/editor/list-layout.d.ts +6 -11
- package/lib/types/editor/marquee-selection.d.ts +14 -0
- package/lib/types/editor/native-targets.d.ts +8 -1
- package/lib/types/editor/overlay-renderer.d.ts +3 -0
- package/lib/types/editor/pointer-controller.d.ts +11 -1
- package/lib/types/editor/table-resize-controls.d.ts +27 -0
- package/lib/types/editor/transform-controls.d.ts +30 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +1 -2
- package/lib/types/render/annotation-stroke.d.ts +2 -0
- package/lib/types/render/path-object-renderer.d.ts +15 -0
- package/lib/types/services/pdf-clipboard.service.d.ts +30 -0
- package/lib/types/services/pdf-editor-command.service.d.ts +0 -1
- package/lib/types/services/pdf-page-region-index.service.d.ts +2 -1
- package/lib/types/views/pdf-canvas-shortcuts.d.ts +8 -0
- package/lib/types/views/pdf-canvas-text-edit-state.d.ts +3 -0
- package/lib/types/views/pdf-canvas-text-interaction.d.ts +17 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +9 -9
- package/lib/types/commands/mutations/pdf-history.mutation.d.ts +0 -9
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x211605=_0x1dd3;(function(_0x2df154,_0x2471ff){const _0xfe1d49=_0x1dd3,_0x1af596=_0x2df154();while(!![]){try{const _0x30c831=-parseInt(_0xfe1d49(0x176))/0x1+-parseInt(_0xfe1d49(0x15f))/0x2*(parseInt(_0xfe1d49(0x13d))/0x3)+-parseInt(_0xfe1d49(0x148))/0x4+-parseInt(_0xfe1d49(0x15c))/0x5+parseInt(_0xfe1d49(0x166))/0x6+-parseInt(_0xfe1d49(0x16b))/0x7*(-parseInt(_0xfe1d49(0x142))/0x8)+-parseInt(_0xfe1d49(0x154))/0x9*(-parseInt(_0xfe1d49(0x140))/0xa);if(_0x30c831===_0x2471ff)break;else _0x1af596['push'](_0x1af596['shift']());}catch(_0x516042){_0x1af596['push'](_0x1af596['shift']());}}}(_0x1e2d,0x79a16));function _0x1e2d(){const _0x51fe32=['垂直翻转','文档\x20ID','隔列底色','7KgfFFj','重置裁剪','上移一层','右对齐','页面\x20ID','右缩进','垂直对齐','下划线','1)\x202)\x203)','原生内容','表格外观','233667vTQYjg','表单字段','裁剪下','PDF\x20功能区标签','文本框','隔行底色','删除页面','插入表格','171552pJlkGv','页面尺寸','替换图片','343230mymhKu','复制页面','1520280TfQPvJ','中等色','导出变更','操作符','汇总行','表格单元格','1926424TjnwDD','裁剪左','表单\x20XObject','水平翻转','项目符号','裁剪右','1.\x20a.\x202.\x20b.','PDF\x20属性','添加文本','编辑值','标题行','1.1.\x201.2.','333WEgnlj','裁剪上','下移一层','单元格','01.\x2002.\x2003.','上移页面','分割线','自定义大小','3077635xMqXkk','JSON','导出编辑后的\x20JSON','8xIZbck','空心圆点','A.\x20B.\x20C.','完成编辑','背景色','裁剪图片','线条宽度','3586488WJhVSL','最佳匹配'];_0x1e2d=function(){return _0x51fe32;};return _0x1e2d();}const e={'pdfs-ui':{'workbench':{'title':'PDF','aria':{'ribbonTabs':_0x211605(0x179),'pages':'PDF\x20页面','properties':_0x211605(0x14f)},'tabs':{'start':'开始','insert':'插入','view':'视图'},'pageRail':{'newPage':'新建'},'empty':{'noDocument':'未加载文档','noPages':'没有页面'},'status':{'page':'页面','zoom':'缩放'},'sidebar':{'properties':'属性'},'demo':{'sample':'示例'}},'ribbon':{'groups':{'file':'文件','edit':'编辑','transform':'变换','insert':'插入','display':'显示'},'actions':{'importPdf':'导入\x20PDF','exportPdf':'导出\x20PDF','undo':'撤销','redo':'重做','select':'选择','text':'文本','flipHorizontal':_0x211605(0x14b),'flipVertical':'垂直翻转','textBox':_0x211605(0x17a),'image':'图片','divider':_0x211605(0x15a),'table':'表格','list':'列表','annotations':'批注','bounds':'边界','raw':'原始'},'listPresets':{'bullet':_0x211605(0x14c),'hollowBullet':_0x211605(0x160),'square':'方块','diamond':'菱形','check':'对勾','arrow':'箭头','decimal':'1.\x202.\x203.','parenDecimal':_0x211605(0x173),'decimalNested':_0x211605(0x153),'upperAlpha':_0x211605(0x161),'lowerAlpha':_0x211605(0x14e),'leadingZero':_0x211605(0x158)}},'tableSizePicker':{'customSize':_0x211605(0x15b),'rows':'行数','columns':'列数','insert':'插入','insertTable':_0x211605(0x17d)},'tableTheme':{'tableTheme':'表格主题','tableLook':_0x211605(0x175),'headerRow':_0x211605(0x152),'footerRow':_0x211605(0x146),'bandedRows':_0x211605(0x17b),'bandedColumns':_0x211605(0x16a),'firstColumn':'首列','lastColumn':'尾列','bestMatch':_0x211605(0x167),'light':'浅色','medium':_0x211605(0x143),'minimal':'极简'},'contextMenu':{'addText':_0x211605(0x150),'editText':'编辑文本','editValue':_0x211605(0x151),'copy':'复制','paste':'粘贴','replaceImage':_0x211605(0x13f),'cropImage':_0x211605(0x164),'flipHorizontal':_0x211605(0x14b),'flipVertical':_0x211605(0x168),'bringForward':_0x211605(0x16d),'sendBackward':_0x211605(0x156),'exportPatch':'导出变更','delete':'删除'},'pageThumbnail':{'moveUp':_0x211605(0x159),'moveDown':'下移页面','copy':_0x211605(0x141),'rotateClockwise':'顺时针旋转\x2090°','delete':_0x211605(0x17c)},'exportPatch':{'title':'导出变更','summary':'摘要','json':_0x211605(0x15d),'exportEditedJson':_0x211605(0x15e)},'inspector':{'titles':{'text':'文本','image':'图片','formXObject':_0x211605(0x14a),'formField':_0x211605(0x177),'page':'页面','nativeSource':_0x211605(0x174),'object':'对象','document':'文档','tableCell':_0x211605(0x147)},'sections':{'text':'文本','image':'图片','cell':_0x211605(0x157),'source':'来源','formField':'值','page':'页面','document':'文档','transform':'位置和大小','arrange':'排列','paragraph':'段落'},'fields':{'fontFamily':'字体','fontSize':'字号','strokeWidth':_0x211605(0x165),'bold':'粗体','italic':'斜体','underline':_0x211605(0x172),'background':_0x211605(0x163),'verticalAlign':_0x211605(0x171),'objectRef':'对象','displayLists':'显示列表','fieldName':'名称','fieldType':'类型','pageId':_0x211605(0x16f),'operators':_0x211605(0x145),'documentId':_0x211605(0x169),'revision':'修订','x':'X','y':'Y','width':'宽','height':'高','align':'对齐','lineHeight':'行高','leftIndent':'左缩进','firstLine':'首行','rightIndent':_0x211605(0x170),'before':'段前','after':'段后','horizontal':'水平','vertical':'垂直','left':'左对齐','center':'居中','right':_0x211605(0x16e),'top':'顶部','middle':'居中','bottom':'底部','pageGeometry':_0x211605(0x13e),'crop':'裁剪','cropLeft':_0x211605(0x149),'cropBottom':_0x211605(0x178),'cropRight':_0x211605(0x14d),'cropTop':_0x211605(0x155),'sideLeft':'左','sideTop':'上','sideRight':'右','sideBottom':'下'},'actions':{'replaceImage':_0x211605(0x13f),'cropImage':'裁剪图片','resetCrop':_0x211605(0x16c),'flipHorizontal':_0x211605(0x14b),'flipVertical':_0x211605(0x168),'addText':'添加文本','finishEditing':_0x211605(0x162),'pageGeometry':_0x211605(0x13e),'exportPatch':_0x211605(0x144),'bringForward':_0x211605(0x16d),'sendBackward':'下移一层','rotate90':'旋转\x2090°'}}}};function _0x1dd3(_0x5c95df,_0x1961ad){_0x5c95df=_0x5c95df-0x13d;const _0x1e2d64=_0x1e2d();let _0x1dd3be=_0x1e2d64[_0x5c95df];return _0x1dd3be;}export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3256fd=_0xdea2;function _0xdea2(_0x1d7972,_0x10fd31){_0x1d7972=_0x1d7972-0x184;const _0x60a69b=_0x60a6();let _0xdea273=_0x60a69b[_0x1d7972];return _0xdea273;}(function(_0x3f38a9,_0x5c294f){const _0x344e2e=_0xdea2,_0x3488f9=_0x3f38a9();while(!![]){try{const _0xa203b4=parseInt(_0x344e2e(0x18b))/0x1*(-parseInt(_0x344e2e(0x185))/0x2)+parseInt(_0x344e2e(0x196))/0x3+parseInt(_0x344e2e(0x1b1))/0x4+parseInt(_0x344e2e(0x1b9))/0x5*(parseInt(_0x344e2e(0x1aa))/0x6)+parseInt(_0x344e2e(0x18f))/0x7*(parseInt(_0x344e2e(0x197))/0x8)+-parseInt(_0x344e2e(0x1ae))/0x9+parseInt(_0x344e2e(0x1b0))/0xa*(-parseInt(_0x344e2e(0x1bb))/0xb);if(_0xa203b4===_0x5c294f)break;else _0x3488f9['push'](_0x3488f9['shift']());}catch(_0x4867cb){_0x3488f9['push'](_0x3488f9['shift']());}}}(_0x60a6,0x51077));function _0x60a6(){const _0x562f4c=['表單欄位','10015qDQyRl','1.\x20a.\x202.\x20b.','170071yNEpxz','空心圓點','A.\x20B.\x20C.','1.1.\x201.2.','左側裁剪','間隔列','編輯值','左縮排','標題列','更換圖片','顯示清單','上移一層','垂直對齊','最後一欄','向下移動頁面','新增文字','複製頁面','708HsrgLG','文件\x20ID','線條寬度','文字方塊','原生來源','匯出已編輯的\x20JSON','457TylzuE','儲存格','頂部裁剪','項目符號','632373zYUVxt','表格外觀','頁面\x20ID','PDF','JSON','間隔欄','匯入\x20PDF','398886TBiGnz','8yJKDBX','右側裁剪','頁尾列','匯出變更','01.\x2002.\x2003.','最佳配對','1)\x202)\x203)','垂直翻轉','編輯文字','水平翻轉','表單\x20XObject','垂直置中','向上移動頁面','表格儲存格','第一行','頁面幾何','下移一層','順時針旋轉\x2090\x20度','旋轉\x2090\x20度','1092eVqPjr','刪除頁面','PDF\x20功能區分頁','右縮排','3200697omCwUV','底部裁剪','140svUmEa','1911652ITUbxi','未載入文件','匯出\x20PDF','第一欄','完成編輯','運算子','裁剪圖片'];_0x60a6=function(){return _0x562f4c;};return _0x60a6();}const e={'pdfs-ui':{'workbench':{'title':_0x3256fd(0x192),'aria':{'ribbonTabs':_0x3256fd(0x1ac),'pages':'PDF\x20頁面','properties':'PDF\x20屬性'},'tabs':{'start':'開始','insert':'插入','view':'檢視'},'pageRail':{'newPage':'新增'},'empty':{'noDocument':_0x3256fd(0x1b2),'noPages':'沒有頁面'},'status':{'page':'頁面','zoom':'縮放'},'sidebar':{'properties':'屬性'},'demo':{'sample':'範例'}},'ribbon':{'groups':{'file':'檔案','edit':'編輯','transform':'變換','insert':'插入','display':'流程圖:顯示'},'actions':{'importPdf':_0x3256fd(0x195),'exportPdf':_0x3256fd(0x1b3),'undo':'撤銷','redo':'重做','select':'單選','text':'文字','flipHorizontal':_0x3256fd(0x1a0),'flipVertical':'垂直翻轉','textBox':_0x3256fd(0x188),'image':'圖片','divider':'分隔線','table':'表格','list':'清單','annotations':'註解','bounds':'邊界','raw':'原始資料'},'listPresets':{'bullet':_0x3256fd(0x18e),'hollowBullet':_0x3256fd(0x1bc),'square':'矩形','diamond':'菱形','check':'勾選','arrow':'箭頭','decimal':'1.\x202.\x203.','parenDecimal':_0x3256fd(0x19d),'decimalNested':_0x3256fd(0x1be),'upperAlpha':_0x3256fd(0x1bd),'lowerAlpha':_0x3256fd(0x1ba),'leadingZero':_0x3256fd(0x19b)}},'tableSizePicker':{'customSize':'自訂尺寸','rows':'列數','columns':'分欄','insert':'插入','insertTable':'表格插入'},'tableTheme':{'tableTheme':'表格主題','tableLook':_0x3256fd(0x190),'headerRow':_0x3256fd(0x1c3),'footerRow':_0x3256fd(0x199),'bandedRows':_0x3256fd(0x1c0),'bandedColumns':_0x3256fd(0x194),'firstColumn':_0x3256fd(0x1b4),'lastColumn':_0x3256fd(0x1c8),'bestMatch':_0x3256fd(0x19c),'light':'淺色','medium':'中','minimal':'簡約'},'contextMenu':{'addText':_0x3256fd(0x1ca),'editText':_0x3256fd(0x19f),'editValue':_0x3256fd(0x1c1),'copy':'複製','paste':'貼上','replaceImage':_0x3256fd(0x1c4),'cropImage':_0x3256fd(0x1b7),'flipHorizontal':_0x3256fd(0x1a0),'flipVertical':_0x3256fd(0x19e),'bringForward':_0x3256fd(0x1c6),'sendBackward':_0x3256fd(0x1a7),'exportPatch':_0x3256fd(0x19a),'delete':'刪除'},'pageThumbnail':{'moveUp':_0x3256fd(0x1a3),'moveDown':_0x3256fd(0x1c9),'copy':_0x3256fd(0x184),'rotateClockwise':_0x3256fd(0x1a8),'delete':_0x3256fd(0x1ab)},'exportPatch':{'title':_0x3256fd(0x19a),'summary':'彙總','json':_0x3256fd(0x193),'exportEditedJson':_0x3256fd(0x18a)},'inspector':{'titles':{'text':'文字','image':'圖片','formXObject':_0x3256fd(0x1a1),'formField':_0x3256fd(0x1b8),'page':'頁面','nativeSource':_0x3256fd(0x189),'object':'物件','document':'文件','tableCell':_0x3256fd(0x1a4)},'sections':{'text':'文字','image':'圖片','cell':_0x3256fd(0x18c),'source':'來源','formField':'值','page':'頁面','document':'文件','transform':'變換','arrange':'排列','paragraph':'段落'},'fields':{'fontFamily':'字型','fontSize':'字號','strokeWidth':_0x3256fd(0x187),'bold':'粗體','italic':'斜體','underline':'底線','background':'背景','verticalAlign':_0x3256fd(0x1c7),'objectRef':'物件','displayLists':_0x3256fd(0x1c5),'fieldName':'名稱','fieldType':'類型','pageId':_0x3256fd(0x191),'operators':_0x3256fd(0x1b6),'documentId':_0x3256fd(0x186),'revision':'修訂','x':'X','y':'Y','width':'W','height':'H','align':'對齊','lineHeight':'行高','leftIndent':_0x3256fd(0x1c2),'firstLine':_0x3256fd(0x1a5),'rightIndent':_0x3256fd(0x1ad),'before':'早於','after':'晚於','horizontal':'水平','vertical':'垂直','left':'左','center':'置中','right':'右','top':'上','middle':_0x3256fd(0x1a2),'bottom':'下','pageGeometry':'頁面幾何','crop':'裁剪','cropLeft':_0x3256fd(0x1bf),'cropBottom':_0x3256fd(0x1af),'cropRight':_0x3256fd(0x198),'cropTop':_0x3256fd(0x18d),'sideLeft':'左','sideTop':'上','sideRight':'右','sideBottom':'下'},'actions':{'replaceImage':'更換圖片','cropImage':_0x3256fd(0x1b7),'resetCrop':'重設裁剪','flipHorizontal':_0x3256fd(0x1a0),'flipVertical':'垂直翻轉','addText':_0x3256fd(0x1ca),'finishEditing':_0x3256fd(0x1b5),'pageGeometry':_0x3256fd(0x1a6),'exportPatch':_0x3256fd(0x19a),'bringForward':_0x3256fd(0x1c6),'sendBackward':_0x3256fd(0x1a7),'rotate90':_0x3256fd(0x1a9)}}}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x5a96e2=_0x5db3;function _0x5db3(_0x1f6d6a,_0x5d4230){_0x1f6d6a=_0x1f6d6a-0x113;const _0x1b25bd=_0x1b25();let _0x5db342=_0x1b25bd[_0x1f6d6a];return _0x5db342;}(function(_0x272f80,_0x228286){const _0x1d897f=_0x5db3,_0x1b0a54=_0x272f80();while(!![]){try{const _0x45b173=-parseInt(_0x1d897f(0x134))/0x1+parseInt(_0x1d897f(0x11c))/0x2*(-parseInt(_0x1d897f(0x138))/0x3)+-parseInt(_0x1d897f(0x13c))/0x4*(-parseInt(_0x1d897f(0x149))/0x5)+-parseInt(_0x1d897f(0x14b))/0x6*(-parseInt(_0x1d897f(0x120))/0x7)+-parseInt(_0x1d897f(0x132))/0x8*(parseInt(_0x1d897f(0x142))/0x9)+-parseInt(_0x1d897f(0x14d))/0xa*(parseInt(_0x1d897f(0x124))/0xb)+parseInt(_0x1d897f(0x133))/0xc;if(_0x45b173===_0x228286)break;else _0x1b0a54['push'](_0x1b0a54['shift']());}catch(_0x2e9bf0){_0x1b0a54['push'](_0x1b0a54['shift']());}}}(_0x1b25,0xc1d3d));const e={'pdfs-ui':{'workbench':{'title':_0x5a96e2(0x136),'aria':{'ribbonTabs':_0x5a96e2(0x12e),'pages':'PDF\x20頁面','properties':_0x5a96e2(0x11f)},'tabs':{'start':'開始','insert':'插入','view':'檢視'},'pageRail':{'newPage':'新增'},'empty':{'noDocument':_0x5a96e2(0x146),'noPages':'沒有頁面'},'status':{'page':'頁面','zoom':'縮放'},'sidebar':{'properties':'屬性'},'demo':{'sample':'範例'}},'ribbon':{'groups':{'file':'檔案','edit':'編輯','transform':'變換','insert':'插入','display':_0x5a96e2(0x143)},'actions':{'importPdf':'匯入\x20PDF','exportPdf':'匯出\x20PDF','undo':'撤銷','redo':'重做','select':'單選','text':'文字','flipHorizontal':_0x5a96e2(0x122),'flipVertical':'垂直翻轉','textBox':_0x5a96e2(0x115),'image':'圖片','divider':_0x5a96e2(0x139),'table':'表格','list':'清單','annotations':'註解','bounds':'邊界','raw':_0x5a96e2(0x121)},'listPresets':{'bullet':_0x5a96e2(0x14a),'hollowBullet':_0x5a96e2(0x11d),'square':'矩形','diamond':'菱形','check':'勾選','arrow':'箭頭','decimal':_0x5a96e2(0x12f),'parenDecimal':'1)\x202)\x203)','decimalNested':_0x5a96e2(0x11e),'upperAlpha':'A.\x20B.\x20C.','lowerAlpha':_0x5a96e2(0x119),'leadingZero':_0x5a96e2(0x13b)}},'tableSizePicker':{'customSize':_0x5a96e2(0x123),'rows':'列數','columns':'分欄','insert':'插入','insertTable':'表格插入'},'tableTheme':{'tableTheme':_0x5a96e2(0x128),'tableLook':'表格外觀','headerRow':_0x5a96e2(0x137),'footerRow':_0x5a96e2(0x129),'bandedRows':_0x5a96e2(0x13f),'bandedColumns':'間隔欄','firstColumn':_0x5a96e2(0x116),'lastColumn':_0x5a96e2(0x113),'bestMatch':'最佳配對','light':'淺色','medium':'中','minimal':'簡約'},'contextMenu':{'addText':'新增文字','editText':_0x5a96e2(0x140),'editValue':'編輯值','copy':'複製','paste':'貼上','replaceImage':_0x5a96e2(0x12d),'cropImage':_0x5a96e2(0x135),'flipHorizontal':'水平翻轉','flipVertical':_0x5a96e2(0x12a),'bringForward':_0x5a96e2(0x118),'sendBackward':_0x5a96e2(0x13e),'exportPatch':_0x5a96e2(0x127),'delete':'刪除'},'pageThumbnail':{'moveUp':_0x5a96e2(0x144),'moveDown':'向下移動頁面','copy':_0x5a96e2(0x13d),'rotateClockwise':_0x5a96e2(0x141),'delete':'刪除頁面'},'exportPatch':{'title':_0x5a96e2(0x127),'summary':'彙總','json':_0x5a96e2(0x114),'exportEditedJson':_0x5a96e2(0x126)},'inspector':{'titles':{'text':'文字','image':'圖片','formXObject':_0x5a96e2(0x11b),'formField':_0x5a96e2(0x13a),'page':'頁面','nativeSource':'原生來源','object':'物件','document':'文件','tableCell':'表格儲存格'},'sections':{'text':'文字','image':'圖片','cell':_0x5a96e2(0x117),'source':'來源','formField':'值','page':'頁面','document':'文件','transform':'變換','arrange':'排列','paragraph':'段落'},'fields':{'fontFamily':'字型','fontSize':'字號','strokeWidth':'線條寬度','bold':'粗體','italic':'斜體','underline':'底線','background':'背景','verticalAlign':_0x5a96e2(0x14e),'objectRef':'物件','displayLists':_0x5a96e2(0x131),'fieldName':'名稱','fieldType':'類型','pageId':_0x5a96e2(0x148),'operators':'運算子','documentId':_0x5a96e2(0x147),'revision':'修訂','x':'X','y':'Y','width':'W','height':'H','align':'對齊','lineHeight':'行高','leftIndent':'左縮排','firstLine':'第一行','rightIndent':_0x5a96e2(0x12c),'before':'早於','after':'晚於','horizontal':'水平','vertical':'垂直','left':'左','center':'置中','right':'右','top':'上','middle':'垂直置中','bottom':'下','pageGeometry':'頁面幾何','crop':'裁切','cropLeft':_0x5a96e2(0x145),'cropBottom':'底部裁切','cropRight':_0x5a96e2(0x125),'cropTop':_0x5a96e2(0x12b),'sideLeft':'左','sideTop':'上','sideRight':'右','sideBottom':'下'},'actions':{'replaceImage':_0x5a96e2(0x12d),'cropImage':'裁切圖片','resetCrop':'重設裁切','flipHorizontal':_0x5a96e2(0x122),'flipVertical':_0x5a96e2(0x12a),'addText':_0x5a96e2(0x14c),'finishEditing':_0x5a96e2(0x14f),'pageGeometry':_0x5a96e2(0x130),'exportPatch':_0x5a96e2(0x127),'bringForward':'上移一層','sendBackward':'下移一層','rotate90':_0x5a96e2(0x11a)}}}};function _0x1b25(){const _0x444085=['尚未載入文件','文件\x20ID','頁面\x20ID','4310485MABrmt','項目符號','173028bRzQSs','新增文字','10iSMhkW','垂直對齊','完成編輯','最後一欄','JSON','文字方塊','第一欄','儲存格','上移一層','1.\x20a.\x202.\x20b.','旋轉\x2090\x20度','表單\x20XObject','2ShJeUm','空心圓點','1.1.\x201.2.','PDF\x20屬性','175SDTcQJ','原始資料','水平翻轉','自訂尺寸','15507613urCzJX','右側裁切','匯出編輯後的\x20JSON','匯出變更','表格主題','頁尾列','垂直翻轉','頂部裁切','右縮排','取代圖片','PDF\x20功能區索引標籤','1.\x202.\x203.','頁面幾何','顯示清單','8GLVJwr','48503436fxhxFL','501752EQxiNa','裁切圖片','PDF','標題列','4585359TvBlTH','分隔線','表單欄位','01.\x2002.\x2003.','4GdLgeC','複製頁面','下移一層','間隔列','編輯文字','順時針旋轉\x2090\x20度','12519855ubGDTm','流程圖:顯示','向上移動頁面','左側裁切'];_0x1b25=function(){return _0x444085;};return _0x1b25();}export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const PDF_HISTORY_OPERATION_ID = "pdf-editor.operation.apply-history";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IOperation } from '@univerjs/core';
|
|
2
|
+
export interface IPdfHistoryOperationParams {
|
|
3
|
+
unitId: string;
|
|
4
|
+
batchId: string;
|
|
5
|
+
direction: 'undo' | 'redo';
|
|
6
|
+
}
|
|
7
|
+
/** Replays the standard Univer undo stack against local PDF editor history. */
|
|
8
|
+
export declare const PdfHistoryOperation: IOperation<IPdfHistoryOperationParams>;
|
|
9
|
+
export declare const PDF_HISTORY_OPERATIONS: readonly [IOperation<IPdfHistoryOperationParams, boolean>];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IMultiCommand } from '@univerjs/core';
|
|
2
|
+
export declare const PdfCopyCommand: IMultiCommand;
|
|
3
|
+
export declare const PdfCutCommand: IMultiCommand;
|
|
4
|
+
export declare const PdfPasteCommand: IMultiCommand;
|
|
5
|
+
export declare const PDF_CLIPBOARD_COMMANDS: readonly [IMultiCommand<object, boolean>, IMultiCommand<object, boolean>, IMultiCommand<object, boolean>];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IPdfEditorSession, IPdfStroke, IPdfTableCell, IPdfTableCellStyle, IPdfTableObject, IPdfTextBlock, IPdfTextRun, IPdfTextStory, PdfObjectId } from '@univerjs-pro/pdfs';
|
|
1
|
+
import type { IPdfEditorLinkAnnotationHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSession, IPdfStroke, IPdfTableCell, IPdfTableCellStyle, IPdfTableObject, IPdfTextBlock, IPdfTextRun, IPdfTextStory, PdfObjectId } from '@univerjs-pro/pdfs';
|
|
2
2
|
import type { LocaleService } from '@univerjs/core';
|
|
3
3
|
export type PdfEditorInspectorFieldType = 'readonly' | 'text' | 'number' | 'color' | 'select';
|
|
4
4
|
export declare enum PdfEditorInspectorParagraphFieldId {
|
|
@@ -17,8 +17,23 @@ export declare enum PdfEditorInspectorCellFieldId {
|
|
|
17
17
|
export declare enum PdfEditorInspectorTableFieldId {
|
|
18
18
|
THEME = "tableTheme"
|
|
19
19
|
}
|
|
20
|
+
export declare const PDF_DIVIDER_STROKE_WIDTH_PRESETS_PX: readonly [0.5, 1, 1.5, 2, 3];
|
|
21
|
+
export declare const PDF_DIVIDER_STROKE_NONE_VALUE = "none";
|
|
22
|
+
export type PdfEditorDividerStrokeUpdate = {
|
|
23
|
+
type: 'color';
|
|
24
|
+
color: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'width';
|
|
27
|
+
widthPx: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'none';
|
|
30
|
+
};
|
|
20
31
|
export declare enum PdfEditorInspectorPathFieldId {
|
|
21
|
-
STROKE_COLOR = "strokeColor"
|
|
32
|
+
STROKE_COLOR = "strokeColor",
|
|
33
|
+
STROKE_WIDTH = "strokeWidth"
|
|
34
|
+
}
|
|
35
|
+
export declare enum PdfEditorInspectorLinkFieldId {
|
|
36
|
+
TARGET = "linkTarget"
|
|
22
37
|
}
|
|
23
38
|
export interface IPdfEditorInspectorTableTarget {
|
|
24
39
|
tableId: PdfObjectId;
|
|
@@ -42,7 +57,12 @@ export interface IPdfEditorInspectorField {
|
|
|
42
57
|
type: PdfEditorInspectorFieldType;
|
|
43
58
|
value?: string | number | boolean;
|
|
44
59
|
unit?: string;
|
|
60
|
+
options?: Array<{
|
|
61
|
+
value: string;
|
|
62
|
+
label: string;
|
|
63
|
+
}>;
|
|
45
64
|
}
|
|
65
|
+
export declare function derivePdfEditorDividerStrokeUpdate(currentStroke: IPdfStroke | undefined, update: PdfEditorDividerStrokeUpdate): IPdfStroke | null;
|
|
46
66
|
export interface IPdfEditorInspectorAction {
|
|
47
67
|
id: string;
|
|
48
68
|
label: string;
|
|
@@ -72,4 +92,4 @@ export declare function resolvePdfEditorInspectorPathStroke(session: IPdfEditorS
|
|
|
72
92
|
export declare function resolvePdfEditorInspectorTableCell(session: IPdfEditorSession): IPdfEditorInspectorTableCellTarget | undefined;
|
|
73
93
|
/** Resolves a table from object, cell, or cell-text selection. */
|
|
74
94
|
export declare function resolvePdfEditorInspectorTable(session: IPdfEditorSession): IPdfEditorInspectorTableTarget | undefined;
|
|
75
|
-
export declare function createPdfEditorInspectorModel(session: IPdfEditorSession, localeService: LocaleService): IPdfEditorInspectorModel;
|
|
95
|
+
export declare function createPdfEditorInspectorModel(session: IPdfEditorSession, localeService: LocaleService, nativeTextTarget?: IPdfEditorNativeTextHitTarget, linkTarget?: IPdfEditorLinkAnnotationHitTarget): IPdfEditorInspectorModel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IPdfDocument, IPdfEditorLinkAnnotationHitTarget, IPdfEditorLinkAnnotationPatch, IPdfLinkAnnotationAction, PdfPageId, PdfRect } from '@univerjs-pro/pdfs';
|
|
2
|
+
/** Build editor hit targets for imported Link annotations. */
|
|
3
|
+
export declare function createPdfLinkAnnotationHitTargets(document: IPdfDocument, pageId: PdfPageId): IPdfEditorLinkAnnotationHitTarget[];
|
|
4
|
+
/** Imported page objects store `[x, y, width, height]`; editor controls use corners. */
|
|
5
|
+
export declare function modelBoxToCornerRect([x, y, width, height]: PdfRect): PdfRect;
|
|
6
|
+
/** Convert editor corner coordinates back to the imported page-object box shape. */
|
|
7
|
+
export declare function cornerRectToModelBox([left, top, right, bottom]: PdfRect): PdfRect;
|
|
8
|
+
/** Text shown by the inspector without discarding named PDF destinations. */
|
|
9
|
+
export declare function getPdfLinkAnnotationTargetValue(link: IPdfLinkAnnotationAction | undefined): string;
|
|
10
|
+
/** Build the smallest target patch for URI, resolved-page, or named-destination links. */
|
|
11
|
+
export declare function createPdfLinkAnnotationTargetPatch(link: IPdfLinkAnnotationAction | undefined, value: string): IPdfEditorLinkAnnotationPatch;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import type { PdfId } from '@univerjs-pro/pdfs';
|
|
2
|
-
import type {
|
|
3
|
-
export type IPdfEditorListStoryLayoutInput = IPdfEditorTextStoryLayoutInput;
|
|
4
|
-
export type IPdfEditorListLineLayout = IPdfEditorTextStoryLineLayout;
|
|
5
|
-
export type IPdfEditorListBlockLayout = IPdfEditorTextStoryBlockLayout;
|
|
6
|
-
export type IPdfEditorListStoryLayout = IPdfEditorTextStoryLayout;
|
|
7
|
-
export type IPdfEditorListStoryTextRect = IPdfEditorTextStoryTextRect;
|
|
2
|
+
import type { IPdfEditorTextStoryLayout, IPdfEditorTextStoryLayoutInput, IPdfEditorTextStoryTextRect } from './story-layout';
|
|
8
3
|
export interface IPdfEditorListStoryTextTarget {
|
|
9
4
|
blockId: PdfId;
|
|
10
5
|
offset: number;
|
|
11
6
|
storyOffset: number;
|
|
12
7
|
}
|
|
13
8
|
/** Compatibility wrapper for list callers migrated to the shared Story Layout. */
|
|
14
|
-
export declare function layoutPdfEditorListStory(input:
|
|
9
|
+
export declare function layoutPdfEditorListStory(input: IPdfEditorTextStoryLayoutInput): IPdfEditorTextStoryLayout;
|
|
15
10
|
/** Compatibility wrapper that preserves the original list target shape. */
|
|
16
|
-
export declare function getPdfEditorListStoryTargetAtPoint(layout:
|
|
17
|
-
export declare function getPdfEditorListStoryCaretRect(layout:
|
|
18
|
-
export declare function getPdfEditorListStorySelectionRects(layout:
|
|
11
|
+
export declare function getPdfEditorListStoryTargetAtPoint(layout: IPdfEditorTextStoryLayout, point: readonly [number, number]): IPdfEditorListStoryTextTarget | undefined;
|
|
12
|
+
export declare function getPdfEditorListStoryCaretRect(layout: IPdfEditorTextStoryLayout, blockId: PdfId, offset: number): IPdfEditorTextStoryTextRect | undefined;
|
|
13
|
+
export declare function getPdfEditorListStorySelectionRects(layout: IPdfEditorTextStoryLayout, blockId: PdfId, range: {
|
|
19
14
|
start: number;
|
|
20
15
|
end: number;
|
|
21
|
-
}):
|
|
16
|
+
}): IPdfEditorTextStoryTextRect[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeImageHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSelectionState, IPdfEditorSession, PdfPoint, PdfRect } from '@univerjs-pro/pdfs';
|
|
2
|
+
export interface IPdfMarqueeSelectionInput {
|
|
3
|
+
session: IPdfEditorSession;
|
|
4
|
+
pageId: string;
|
|
5
|
+
rect: PdfRect;
|
|
6
|
+
mode: 'intersect' | 'contain';
|
|
7
|
+
additive?: boolean;
|
|
8
|
+
nativeImageTargets?: readonly IPdfEditorNativeImageHitTarget[];
|
|
9
|
+
nativeFormXObjectTargets?: readonly IPdfEditorNativeFormXObjectHitTarget[];
|
|
10
|
+
nativeTextTargets?: readonly IPdfEditorNativeTextHitTarget[];
|
|
11
|
+
now: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function normalizePdfMarqueeRect(start: PdfPoint, end: PdfPoint): PdfRect;
|
|
14
|
+
export declare function createPdfMarqueeSelection(input: IPdfMarqueeSelectionInput): IPdfEditorSelectionState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IPdfDocument, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeTextHitTarget, IPdfPage, PdfDisplayListId, PdfPageId } from '@univerjs-pro/pdfs';
|
|
1
|
+
import type { IPdfDocument, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeImageHitTarget, IPdfEditorNativeTextHitTarget, IPdfPage, PdfDisplayListId, PdfPageId } from '@univerjs-pro/pdfs';
|
|
2
2
|
export interface IPdfNativeTargetBuildOptions {
|
|
3
3
|
/** Materialized page geometry to use while keeping source data indexed by document identity. */
|
|
4
4
|
page?: IPdfPage;
|
|
@@ -22,6 +22,13 @@ export interface IPdfNativeTargetBuildOptions {
|
|
|
22
22
|
* of every reuse of the same inner display operation.
|
|
23
23
|
*/
|
|
24
24
|
export declare function createPdfNativeTextHitTargets(document: IPdfDocument, pageId: PdfPageId, options?: IPdfNativeTargetBuildOptions): IPdfEditorNativeTextHitTarget[];
|
|
25
|
+
/**
|
|
26
|
+
* Build bbox-level hit targets for native PDF image display operations.
|
|
27
|
+
*
|
|
28
|
+
* Images are painted from a unit square through their PDF transform. Nested
|
|
29
|
+
* Form XObject transforms are folded into the containing page coordinates.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createPdfNativeImageHitTargets(document: IPdfDocument, pageId: PdfPageId, options?: IPdfNativeTargetBuildOptions): IPdfEditorNativeImageHitTarget[];
|
|
25
32
|
/**
|
|
26
33
|
* Build bbox-level hit targets for native Form XObject paint operations.
|
|
27
34
|
*
|
|
@@ -3,6 +3,7 @@ import type { IPdfFontFamilyResolver } from '../render/decode-manifest';
|
|
|
3
3
|
import type { IPdfFontOutlineResolver } from '../render/font-outline';
|
|
4
4
|
import type { IPdfImageResolver } from '../render/image-resolver';
|
|
5
5
|
import type { IPdfCanvasViewport } from '../render/viewport';
|
|
6
|
+
import type { IPdfTableResizeHover } from './table-resize-controls';
|
|
6
7
|
import { PdfFormFieldType } from '@univerjs-pro/pdfs';
|
|
7
8
|
export interface IPdfEditorOverlayRenderOptions {
|
|
8
9
|
editState: IPdfEditorEditState;
|
|
@@ -20,6 +21,8 @@ export interface IPdfEditorOverlayRenderOptions {
|
|
|
20
21
|
imageResolver?: IPdfImageResolver;
|
|
21
22
|
imageAssetResolver?: IPdfEditorImageAssetResolver;
|
|
22
23
|
activeTextEditState?: IPdfEditorOverlayActiveTextEditState;
|
|
24
|
+
tableResizeHover?: IPdfTableResizeHover;
|
|
25
|
+
marqueeRect?: PdfRect;
|
|
23
26
|
}
|
|
24
27
|
export type IPdfEditorImageAssetResolver = (document: IPdfDocument, editState: IPdfDurableEditState, assetId: PdfAssetId) => IPdfImageAsset | undefined;
|
|
25
28
|
export interface IPdfEditorOverlayActiveTextEditState {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { IPdfEditorCommandResult, IPdfEditorFormFieldHitTarget, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeImageHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSession, PdfEditorGeneratedIdPrefix, PdfFormFieldType, PdfJsonValue, PdfObjectId, PdfPageId, PdfPoint } from '@univerjs-pro/pdfs';
|
|
1
|
+
import type { IPdfEditorCommandResult, IPdfEditorFormFieldHitTarget, IPdfEditorLinkAnnotationHitTarget, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeImageHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSession, PdfEditorGeneratedIdPrefix, PdfFormFieldType, PdfJsonValue, PdfObjectId, PdfPageId, PdfPoint, PdfRect } from '@univerjs-pro/pdfs';
|
|
2
2
|
import type { IPdfCanvasViewport } from '../render/viewport';
|
|
3
|
+
import type { IPdfTableResizeHover } from './table-resize-controls';
|
|
3
4
|
import { PdfEditorHitTestMode } from '@univerjs-pro/pdfs';
|
|
4
5
|
export interface IPdfEditorPointerControllerOptions {
|
|
5
6
|
pageId: PdfPageId;
|
|
@@ -16,6 +17,8 @@ export interface IPdfEditorPointerControllerOptions {
|
|
|
16
17
|
getNativeFormXObjectTargets?: (input: IPdfEditorNativeHitTargetRequest) => IPdfEditorNativeFormXObjectHitTarget[];
|
|
17
18
|
getNativeTextTargets?: (input: IPdfEditorNativeHitTargetRequest) => IPdfEditorNativeTextHitTarget[];
|
|
18
19
|
getFormFieldTargets?: (input: IPdfEditorNativeHitTargetRequest) => IPdfEditorFormFieldHitTarget[];
|
|
20
|
+
getLinkAnnotationTargets?: (input: IPdfEditorNativeHitTargetRequest) => IPdfEditorLinkAnnotationHitTarget[];
|
|
21
|
+
setMarqueeRect?: (rect: PdfRect | undefined) => void;
|
|
19
22
|
}
|
|
20
23
|
export interface IPdfEditorNativeHitTargetRequest {
|
|
21
24
|
pageId: PdfPageId;
|
|
@@ -28,6 +31,9 @@ export interface IPdfEditorPointerDownInput {
|
|
|
28
31
|
pageId?: PdfPageId;
|
|
29
32
|
mode?: PdfEditorHitTestMode;
|
|
30
33
|
toleranceCssPx?: number;
|
|
34
|
+
altKey?: boolean;
|
|
35
|
+
ctrlKey?: boolean;
|
|
36
|
+
metaKey?: boolean;
|
|
31
37
|
}
|
|
32
38
|
export interface IPdfEditorPointerResult {
|
|
33
39
|
session: IPdfEditorSession;
|
|
@@ -67,6 +73,10 @@ export interface IPdfEditorPointerController {
|
|
|
67
73
|
* concerns. The editor package receives EMU model coordinates only.
|
|
68
74
|
*/
|
|
69
75
|
export declare function cssPointToPdfEditorModelPoint(cssPoint: [number, number], viewport: IPdfCanvasViewport): PdfPoint;
|
|
76
|
+
/** Resolve the passive cursor for a selected table without changing editor state. */
|
|
77
|
+
export declare function resolvePdfEditorPointerCursor(session: IPdfEditorSession, pageId: PdfPageId, cssPoint: [number, number], viewport: IPdfCanvasViewport, mode?: PdfEditorHitTestMode): 'col-resize' | 'row-resize' | undefined;
|
|
78
|
+
/** Resolve the selected table divider under the pointer for cursor and hover rendering. */
|
|
79
|
+
export declare function resolvePdfEditorTableResizeHover(session: IPdfEditorSession, pageId: PdfPageId, cssPoint: [number, number], viewport: IPdfCanvasViewport, mode?: PdfEditorHitTestMode): IPdfTableResizeHover | undefined;
|
|
70
80
|
/**
|
|
71
81
|
* Create a small pointer bridge from canvas events to editor selection.
|
|
72
82
|
*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IPdfTableColumn, IPdfTableObject, IPdfTableRow, PdfEmu, PdfObjectId, PdfPoint, PdfRect } from '@univerjs-pro/pdfs';
|
|
2
|
+
export type PdfTableResizeAxis = 'row' | 'column';
|
|
3
|
+
export interface IPdfTableResizeBoundaryHit {
|
|
4
|
+
axis: PdfTableResizeAxis;
|
|
5
|
+
boundaryIndex: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IPdfTableResizeHover extends IPdfTableResizeBoundaryHit {
|
|
8
|
+
tableId: PdfObjectId;
|
|
9
|
+
}
|
|
10
|
+
export interface IPdfTableResizeGeometry {
|
|
11
|
+
bbox: PdfRect;
|
|
12
|
+
rows: IPdfTableRow[];
|
|
13
|
+
columns: IPdfTableColumn[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Hit-test internal table boundaries in page-local model coordinates.
|
|
17
|
+
*
|
|
18
|
+
* Merged cells remove only the segment that they cross, matching Slide table
|
|
19
|
+
* behavior while leaving the rest of the same boundary interactive.
|
|
20
|
+
*/
|
|
21
|
+
export declare function hitTestPdfTableResizeBoundary(table: IPdfTableObject, point: PdfPoint, tolerance: PdfEmu): IPdfTableResizeBoundaryHit | undefined;
|
|
22
|
+
/** Return the visible line segments for one internal boundary, excluding merged cells. */
|
|
23
|
+
export declare function getPdfTableResizeBoundarySegments(table: IPdfTableObject, hit: IPdfTableResizeBoundaryHit): PdfRect[];
|
|
24
|
+
/** Adjust the two sizes adjacent to an internal boundary without changing bbox. */
|
|
25
|
+
export declare function resizePdfTableAdjacentSizes(table: IPdfTableObject, hit: IPdfTableResizeBoundaryHit, delta: PdfEmu, minSize: PdfEmu): IPdfTableResizeGeometry;
|
|
26
|
+
/** Scale row and column sizes so their exact totals match the requested bbox. */
|
|
27
|
+
export declare function scalePdfTableGeometryToBbox(table: IPdfTableObject, requestedBbox: PdfRect, minSize: PdfEmu): IPdfTableResizeGeometry;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IPdfEditorCssBox } from './geometry';
|
|
2
|
+
export type PdfTransformResizeHandleId = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
|
|
3
|
+
export interface IPdfTransformControl {
|
|
4
|
+
id: PdfTransformResizeHandleId | 'rotate';
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
radius: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IPdfTransformControlGeometry {
|
|
12
|
+
outline: IPdfEditorCssBox;
|
|
13
|
+
resizeHandles: readonly IPdfTransformControl[];
|
|
14
|
+
rotateConnector?: {
|
|
15
|
+
x1: number;
|
|
16
|
+
y1: number;
|
|
17
|
+
x2: number;
|
|
18
|
+
y2: number;
|
|
19
|
+
};
|
|
20
|
+
rotateHandle?: IPdfTransformControl;
|
|
21
|
+
}
|
|
22
|
+
export type PdfTransformControlMode = 'object' | 'divider' | 'table';
|
|
23
|
+
export type PdfTransformControlHit = {
|
|
24
|
+
kind: 'resize';
|
|
25
|
+
handleId: PdfTransformResizeHandleId;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'rotate';
|
|
28
|
+
};
|
|
29
|
+
export declare function createPdfTransformControlGeometry(rect: IPdfEditorCssBox, mode?: PdfTransformControlMode): IPdfTransformControlGeometry;
|
|
30
|
+
export declare function hitTestPdfTransformControl(point: readonly [number, number], geometry: IPdfTransformControlGeometry, toleranceCssPx?: number): PdfTransformControlHit | undefined;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { UniverPdfsUIPlugin } from './plugin';
|
|
|
7
7
|
export type { IPdfCanvasGroupCompositor } from './render/canvas-group-compositor';
|
|
8
8
|
export { renderPdfPageToCanvas } from './render/canvas-renderer';
|
|
9
9
|
export { startPdfPageThumbnailWorker } from './render/pdf-page-thumbnail.worker';
|
|
10
|
+
export { IPdfClipboardService, PdfClipboardService, } from './services/pdf-clipboard.service';
|
|
10
11
|
export { IPdfEditorRuntimeService, PdfEditorRuntimeEventType, PdfEditorRuntimeService, } from './services/pdf-editor-runtime.service';
|
|
11
12
|
export { PdfInsertService } from './services/pdf-insert.service';
|
|
12
13
|
export { createPdfInMemoryManagedImageRuntimeAdapter } from './services/pdf-managed-image-runtime.adapter';
|
|
@@ -40,8 +40,6 @@ declare const locale: {
|
|
|
40
40
|
};
|
|
41
41
|
actions: {
|
|
42
42
|
importPdf: string;
|
|
43
|
-
importPdfAsNew: string;
|
|
44
|
-
appendPdf: string;
|
|
45
43
|
exportPdf: string;
|
|
46
44
|
undo: string;
|
|
47
45
|
redo: string;
|
|
@@ -149,6 +147,7 @@ declare const locale: {
|
|
|
149
147
|
fields: {
|
|
150
148
|
fontFamily: string;
|
|
151
149
|
fontSize: string;
|
|
150
|
+
strokeWidth: string;
|
|
152
151
|
bold: string;
|
|
153
152
|
italic: string;
|
|
154
153
|
underline: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IPdfPaint, IPdfPathCommand, IPdfStroke } from '@univerjs-pro/pdfs';
|
|
2
|
+
import type { IPdfCanvasViewport } from './viewport';
|
|
3
|
+
export interface IPdfCanvasPathPaint {
|
|
4
|
+
commands: IPdfPathCommand[];
|
|
5
|
+
fill?: IPdfPaint;
|
|
6
|
+
stroke?: IPdfStroke;
|
|
7
|
+
}
|
|
8
|
+
export declare function renderPdfPathToCanvas(context: CanvasRenderingContext2D, path: IPdfCanvasPathPaint, origin: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}, viewport: IPdfCanvasViewport): void;
|
|
12
|
+
export declare function tracePdfPathCommandsToCanvas(context: CanvasRenderingContext2D, commands: IPdfPathCommand[], origin: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}, viewport: IPdfCanvasViewport): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IPdfEditorCommandService } from './pdf-editor-command.service';
|
|
3
|
+
import { IPdfEditorRuntimeService } from './pdf-editor-runtime.service';
|
|
4
|
+
/** Session-local element clipboard for editable PDF overlays. */
|
|
5
|
+
export interface IPdfClipboardService {
|
|
6
|
+
copy(): boolean;
|
|
7
|
+
cut(): Promise<boolean>;
|
|
8
|
+
paste(): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare const IPdfClipboardService: import("@wendellhu/redi").IdentifierDecorator<IPdfClipboardService>;
|
|
11
|
+
/**
|
|
12
|
+
* Keeps a self-contained PDF element snapshot in memory.
|
|
13
|
+
*
|
|
14
|
+
* The payload intentionally does not use the operating-system clipboard:
|
|
15
|
+
* native text editing remains owned by the browser while PDF objects can move
|
|
16
|
+
* across pages and PDF units in the same browser session.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PdfClipboardService implements IPdfClipboardService {
|
|
19
|
+
private readonly _instanceService;
|
|
20
|
+
private readonly _runtimeService;
|
|
21
|
+
private readonly _commandService;
|
|
22
|
+
private _payload?;
|
|
23
|
+
private _pasteCount;
|
|
24
|
+
constructor(_instanceService: IUniverInstanceService, _runtimeService: IPdfEditorRuntimeService, _commandService: IPdfEditorCommandService);
|
|
25
|
+
copy(): boolean;
|
|
26
|
+
cut(): Promise<boolean>;
|
|
27
|
+
paste(): Promise<boolean>;
|
|
28
|
+
private _getCurrentModel;
|
|
29
|
+
private _getActiveSelection;
|
|
30
|
+
}
|
|
@@ -42,7 +42,6 @@ export declare class PdfEditorCommandService extends Disposable implements IPdfE
|
|
|
42
42
|
private readonly _undoRedoService;
|
|
43
43
|
private readonly _instanceService;
|
|
44
44
|
private readonly _runtimeService;
|
|
45
|
-
private readonly _idCounters;
|
|
46
45
|
constructor(_commandService: ICommandService, _undoRedoService: IUndoRedoService, _instanceService: IUniverInstanceService, _runtimeService: IPdfEditorRuntimeService);
|
|
47
46
|
execute<TInput>(unitId: string, command: IPdfEditorCommand<TInput>, input: TInput, options: IPdfEditorCommandExecutionOptions): Promise<IPdfEditorCommandExecutionResult>;
|
|
48
47
|
commit(unitId: string, result: IPdfEditorCommandResult, options: IPdfEditorCommandExecutionOptions): Promise<IPdfEditorCommandExecutionResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IPdfDocument, IPdfEditorFormFieldHitTarget, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSession, IPdfPage, IPdfPageCacheEpoch, PdfDisplayListId, PdfDocumentModel, PdfObjectId, PdfPageId } from '@univerjs-pro/pdfs';
|
|
1
|
+
import type { IPdfDocument, IPdfEditorFormFieldHitTarget, IPdfEditorNativeFormXObjectHitTarget, IPdfEditorNativeImageHitTarget, IPdfEditorNativeTextHitTarget, IPdfEditorSession, IPdfPage, IPdfPageCacheEpoch, PdfDisplayListId, PdfDocumentModel, PdfObjectId, PdfPageId } from '@univerjs-pro/pdfs';
|
|
2
2
|
import { Disposable } from '@univerjs/core';
|
|
3
3
|
export interface IPdfPageRegion {
|
|
4
4
|
readonly pageId: PdfPageId;
|
|
@@ -8,6 +8,7 @@ export interface IPdfPageRegion {
|
|
|
8
8
|
readonly objectIds: readonly PdfObjectId[];
|
|
9
9
|
readonly rootDisplayListIds: readonly PdfDisplayListId[];
|
|
10
10
|
readonly displayListIds: readonly PdfDisplayListId[];
|
|
11
|
+
readonly nativeImageTargets: readonly IPdfEditorNativeImageHitTarget[];
|
|
11
12
|
readonly nativeTextTargets: readonly IPdfEditorNativeTextHitTarget[];
|
|
12
13
|
readonly nativeFormXObjectTargets: readonly IPdfEditorNativeFormXObjectHitTarget[];
|
|
13
14
|
readonly formFieldTargets: readonly IPdfEditorFormFieldHitTarget[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface IPdfCanvasShortcutInput {
|
|
2
|
+
readonly key: string;
|
|
3
|
+
readonly ctrlKey?: boolean;
|
|
4
|
+
readonly metaKey?: boolean;
|
|
5
|
+
readonly shiftKey?: boolean;
|
|
6
|
+
readonly altKey?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function shouldHandlePdfCanvasPaste(input: IPdfCanvasShortcutInput, textEditing: boolean): boolean;
|
|
@@ -23,6 +23,9 @@ export declare function shouldResetPdfCanvasTextEdit(baselineRevision: number |
|
|
|
23
23
|
/** A style-only revision may keep the active draft when its source text still matches. */
|
|
24
24
|
export declare function canRebasePdfCanvasTextEdit(state: IPdfCanvasTextEditState, session: IPdfEditorSession): boolean;
|
|
25
25
|
export declare function shouldSyncPdfCanvasWorkingSession(activeTextEdit: boolean, pointerActive: boolean): boolean;
|
|
26
|
+
/** Focus the keyboard host for object actions without stealing text-editor focus. */
|
|
27
|
+
export declare function shouldFocusPdfCanvasWorkbench(activeTextEdit: boolean): boolean;
|
|
28
|
+
export declare function shouldShowPdfCanvasSelection(session: IPdfEditorSession | undefined, pageId: PdfPageId | undefined, showBounds: boolean, activeTextEdit: boolean): boolean;
|
|
26
29
|
/**
|
|
27
30
|
* Keep untouched promoted native text on the authoritative page raster.
|
|
28
31
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IPdfDocument, IPdfEditorCommandResult, IPdfEditorNativeTextHitTarget, IPdfEditorSession, IPdfPage } from '@univerjs-pro/pdfs';
|
|
2
|
+
import type { IPdfCanvasTextEditTarget } from '../editor/canvas-text-edit-bridge';
|
|
3
|
+
import type { IPdfCanvasParagraphCommitIntent, IPdfCanvasParagraphCommitLayout, IPdfCanvasTextEditState } from '../editor/canvas-text-editor';
|
|
4
|
+
import type { createPdfCanvasViewport } from '../render/viewport';
|
|
5
|
+
export declare function getTextTargetAtCssPoint(session: IPdfEditorSession, state: IPdfCanvasTextEditState, cssPoint: [number, number], viewport: ReturnType<typeof createPdfCanvasViewport>, context: CanvasRenderingContext2D | undefined, document: IPdfDocument | null | undefined): IPdfCanvasTextEditTarget | undefined;
|
|
6
|
+
export declare function isSameTextEditTarget(state: IPdfCanvasTextEditState, target: IPdfCanvasTextEditTarget): boolean;
|
|
7
|
+
export declare function findPdfNativeTextTargetIdAtPoint(targets: readonly IPdfEditorNativeTextHitTarget[], point: [number, number], tolerance: number): string | undefined;
|
|
8
|
+
export declare function collectTextEditCommandResults(before: IPdfEditorSession, after: IPdfEditorSession): IPdfEditorCommandResult[];
|
|
9
|
+
export declare function resolveCanvasParagraphCommitLayout(input: {
|
|
10
|
+
state: IPdfCanvasTextEditState;
|
|
11
|
+
session: IPdfEditorSession;
|
|
12
|
+
intent: IPdfCanvasParagraphCommitIntent;
|
|
13
|
+
page: IPdfPage;
|
|
14
|
+
viewport: ReturnType<typeof createPdfCanvasViewport>;
|
|
15
|
+
context: CanvasRenderingContext2D | undefined;
|
|
16
|
+
document: IPdfDocument | null | undefined;
|
|
17
|
+
}): IPdfCanvasParagraphCommitLayout | undefined;
|