@univerjs/engine-render 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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 +1049 -256
- package/lib/es/index.js +1049 -256
- package/lib/types/basics/index.d.ts +1 -0
- package/lib/types/basics/tools.d.ts +1 -0
- package/lib/types/basics/transformer-config.d.ts +17 -0
- package/lib/types/basics/zoom.d.ts +17 -0
- package/lib/types/components/docs/doc-background.d.ts +6 -0
- package/lib/types/components/docs/doc-component.d.ts +4 -0
- package/lib/types/components/docs/document.d.ts +6 -0
- package/lib/types/components/docs/extensions/font-and-base-line.d.ts +10 -0
- package/lib/types/components/docs/layout/block/paragraph/language-ruler.d.ts +4 -0
- package/lib/types/components/docs/layout/model/page.d.ts +1 -0
- package/lib/types/components/docs/table-render-viewport.d.ts +23 -0
- package/lib/types/components/sheets/extensions/border.d.ts +2 -2
- package/lib/types/components/sheets/interfaces.d.ts +4 -4
- package/lib/types/index.d.ts +2 -0
- package/lib/types/render-manager/render-manager.service.d.ts +1 -0
- package/lib/types/render-manager/render-unit.d.ts +3 -1
- package/lib/types/scene.transformer.d.ts +20 -0
- package/lib/types/services/canvas-color.service.d.ts +1 -0
- package/lib/umd/index.js +2 -2
- package/package.json +5 -5
- package/LICENSE +0 -176
- package/lib/cjs/en-us-Br9JW6Nt.js +0 -45
- package/lib/cjs/en-us-DKyh_RpA.js +0 -3
- package/lib/es/en-us-ClVoWMyT.js +0 -57
- /package/lib/cjs/{af-Bsj1JSBP.js → af-B2UUzO69.js} +0 -0
- /package/lib/cjs/{as-s7lqjieq.js → as-DbZDYp6O.js} +0 -0
- /package/lib/cjs/{be-L5eMFm5U.js → be-BBx0lyG-.js} +0 -0
- /package/lib/cjs/{bg-DPu8oywG.js → bg-DeX16RKi.js} +0 -0
- /package/lib/cjs/{bn-CIWO--x0.js → bn-3fjitMC3.js} +0 -0
- /package/lib/cjs/{ca-C4gmkbL6.js → ca-BxC8Zblv.js} +0 -0
- /package/lib/cjs/{cop-BYQt2Eln.js → cop-TvdaSBlz.js} +0 -0
- /package/lib/cjs/{cs-psn0RDcR.js → cs-MSNfJH-L.js} +0 -0
- /package/lib/cjs/{cu-CI412h46.js → cu-7FYbjEBr.js} +0 -0
- /package/lib/cjs/{cy-u9h1j59b.js → cy-CPuxVqb_.js} +0 -0
- /package/lib/cjs/{da-BQ70NE2J.js → da-BWsE849b.js} +0 -0
- /package/lib/cjs/{de-1901-C5Xgq4-z.js → de-1901-BYSTp3Fp.js} +0 -0
- /package/lib/cjs/{de-1996-BmpXhD5R.js → de-1996-DWtCfm_A.js} +0 -0
- /package/lib/cjs/{de-ch-1901-mUpubovn.js → de-ch-1901-rWVcF3cs.js} +0 -0
- /package/lib/cjs/{el-monoton-1KLys64v.js → el-monoton-BEUGM9Fi.js} +0 -0
- /package/lib/cjs/{el-polyton-C8sv-vqz.js → el-polyton-Bvh6HAfD.js} +0 -0
- /package/lib/cjs/{en-gb-DidBtNJX.js → en-gb-Dcrai7kY.js} +0 -0
- /package/lib/cjs/{es-C1gCT0OW.js → es-CVNdGI0L.js} +0 -0
- /package/lib/cjs/{et-UwA1uq3o.js → et-7Rdfp2-O.js} +0 -0
- /package/lib/cjs/{eu-pizKbeo6.js → eu-DyEtVwHo.js} +0 -0
- /package/lib/cjs/{fi-bkmcjeIB.js → fi-DzRES2Ke.js} +0 -0
- /package/lib/cjs/{fr-DTRdyReV.js → fr-DJMVMLCz.js} +0 -0
- /package/lib/cjs/{fur-CzaEPYy4.js → fur-CzhK3vxZ.js} +0 -0
- /package/lib/cjs/{ga-DfpmmLL7.js → ga-HXzOFdlG.js} +0 -0
- /package/lib/cjs/{gl-BvPLj87g.js → gl-C5TM79ih.js} +0 -0
- /package/lib/cjs/{grc-CWjbj1rE.js → grc-CPQF-xFI.js} +0 -0
- /package/lib/cjs/{gu-B9b71pv0.js → gu-AqCkEYxo.js} +0 -0
- /package/lib/cjs/{hi-B0PM9Naw.js → hi-DugLLbv4.js} +0 -0
- /package/lib/cjs/{hr-hhdjugdi.js → hr-LSMYFsyP.js} +0 -0
- /package/lib/cjs/{hsb-CUC0Vhy0.js → hsb-BlnRYHkg.js} +0 -0
- /package/lib/cjs/{hu-DNqLSdxp.js → hu-Dwvtkpy7.js} +0 -0
- /package/lib/cjs/{hy-Cr37-HYR.js → hy-BsG06_IV.js} +0 -0
- /package/lib/cjs/{ia-_xcaTvlU.js → ia-BMOUZLGD.js} +0 -0
- /package/lib/cjs/{id-DTTt6JOe.js → id-DhSs0vqq.js} +0 -0
- /package/lib/cjs/{is-BlJOUdIf.js → is-iJhrS7Aw.js} +0 -0
- /package/lib/cjs/{it-1kO7pboy.js → it-Aam-BmsV.js} +0 -0
- /package/lib/cjs/{ka-06TLrBSU.js → ka-CfLSYpVb.js} +0 -0
- /package/lib/cjs/{kmr-CqLLMgB-.js → kmr-DYCscIsi.js} +0 -0
- /package/lib/cjs/{kn-DsgCykwv.js → kn-OCEDIM_O.js} +0 -0
- /package/lib/cjs/{la-BtfI1L1Y.js → la-DFS3RPxE.js} +0 -0
- /package/lib/cjs/{la-x-classic-Csxxqk4A.js → la-x-classic-BocVpbl6.js} +0 -0
- /package/lib/cjs/{la-x-liturgic-DP4lkHMh.js → la-x-liturgic-CpZYm3b6.js} +0 -0
- /package/lib/cjs/{lt-BLnhu8cj.js → lt-NC6HHzxn.js} +0 -0
- /package/lib/cjs/{lv-BWU1ykNC.js → lv-BMFTm6cB.js} +0 -0
- /package/lib/cjs/{ml-DCPEVUGQ.js → ml-DDWi25Fi.js} +0 -0
- /package/lib/cjs/{mn-cyrl-R4Uzk2PR.js → mn-cyrl-TCUeX7is.js} +0 -0
- /package/lib/cjs/{mn-cyrl-x-lmc-DcrbbdVO.js → mn-cyrl-x-lmc-BCmp3Ybn.js} +0 -0
- /package/lib/cjs/{mr-a95kT02n.js → mr-1gjg-u15.js} +0 -0
- /package/lib/cjs/{mul-ethi-Ha-646Ih.js → mul-ethi-B9a4BMM6.js} +0 -0
- /package/lib/cjs/{nb-DVDq5SId.js → nb-DS_J6lre.js} +0 -0
- /package/lib/cjs/{nl-xvtaATgd.js → nl-CBtSVLcv.js} +0 -0
- /package/lib/cjs/{nn-Dd3GYfsu.js → nn-DYJOn4Sh.js} +0 -0
- /package/lib/cjs/{no-Ccuz1dXv.js → no-C20NyT1P.js} +0 -0
- /package/lib/cjs/{oc-DMNrvVUu.js → oc-CrKqER_F.js} +0 -0
- /package/lib/cjs/{or-BBnbptii.js → or-ZqEtsnaq.js} +0 -0
- /package/lib/cjs/{pa-Bpqjl4TY.js → pa-BD3r0Teo.js} +0 -0
- /package/lib/cjs/{pi-Dw9S8R8a.js → pi-CQUwMUvz.js} +0 -0
- /package/lib/cjs/{pl-BxIw_3q_.js → pl-CawofTLo.js} +0 -0
- /package/lib/cjs/{pms-ts8oJNTo.js → pms-DMqDXwo-.js} +0 -0
- /package/lib/cjs/{pt-INYdw9le.js → pt-BIiUaINZ.js} +0 -0
- /package/lib/cjs/{rm-SrIsmyuH.js → rm-B_-8T7Y1.js} +0 -0
- /package/lib/cjs/{ro--lDLf93Z.js → ro-B2Xhfkgx.js} +0 -0
- /package/lib/cjs/{ru-CnviOn4F.js → ru-lj-rTTpe.js} +0 -0
- /package/lib/cjs/{sa--YzUfT9m.js → sa-D3h-cY2Z.js} +0 -0
- /package/lib/cjs/{sh-cyrl-C-Y7f9iS.js → sh-cyrl-0o7p_z-7.js} +0 -0
- /package/lib/cjs/{sh-latn-DE0Oa7St.js → sh-latn-BTi9p-0q.js} +0 -0
- /package/lib/cjs/{sk-CL5uDe3A.js → sk-D6mOX2KK.js} +0 -0
- /package/lib/cjs/{sl-D8ckCfPR.js → sl-Bzz3gkvn.js} +0 -0
- /package/lib/cjs/{sr-cyrl-CZdv8WGY.js → sr-cyrl-V07WO3rb.js} +0 -0
- /package/lib/cjs/{sv-DYQd48Sm.js → sv-CyQXUuzx.js} +0 -0
- /package/lib/cjs/{ta-DOa0x7zq.js → ta-Brwz0zYf.js} +0 -0
- /package/lib/cjs/{te-BtexCVtn.js → te-CgvirCa4.js} +0 -0
- /package/lib/cjs/{th-BJUX68-0.js → th-PlSNhaza.js} +0 -0
- /package/lib/cjs/{tk-CEs8UQxA.js → tk-O54r2ybT.js} +0 -0
- /package/lib/cjs/{tr-BMiKDMrF.js → tr-Dh1h3Dno.js} +0 -0
- /package/lib/cjs/{uk-B8pzUYbn.js → uk-E2mCrVCU.js} +0 -0
- /package/lib/cjs/{zh-latn-pinyin-s8_52NaR.js → zh-latn-pinyin-C2RfFfDl.js} +0 -0
- /package/lib/es/{af-I8XQee0A.js → af-DK_CjRn6.js} +0 -0
- /package/lib/es/{as-DPw4kbfa.js → as-BPtSu6VN.js} +0 -0
- /package/lib/es/{be-hSu5_2AE.js → be-CrQ0smca.js} +0 -0
- /package/lib/es/{bg-eIV91Ges.js → bg-CrQqGwni.js} +0 -0
- /package/lib/es/{bn-CF0YbkEW.js → bn-NCLZcWHi.js} +0 -0
- /package/lib/es/{ca-D0fayQwW.js → ca-SUf6Y2Om.js} +0 -0
- /package/lib/es/{cop-gnNw8zDV.js → cop-C3sk0IUo.js} +0 -0
- /package/lib/es/{cs-cUOdqXi9.js → cs-CmAteokq.js} +0 -0
- /package/lib/es/{cu-CJJk_6p3.js → cu-CBUlrW6Y.js} +0 -0
- /package/lib/es/{cy-he1_O-US.js → cy-BBPa6z2x.js} +0 -0
- /package/lib/es/{da-C_Tc6C75.js → da-CCDXfXtG.js} +0 -0
- /package/lib/es/{de-1901-D9yvXEO8.js → de-1901-CWoAOigE.js} +0 -0
- /package/lib/es/{de-1996-DIBM3qkD.js → de-1996-BL6awyxG.js} +0 -0
- /package/lib/es/{de-ch-1901-BEDgpl3-.js → de-ch-1901-hVThVHVb.js} +0 -0
- /package/lib/es/{el-monoton-BvjPOyvW.js → el-monoton-D3aKqTz2.js} +0 -0
- /package/lib/es/{el-polyton-DfJ9Eeih.js → el-polyton-ogVWcTzh.js} +0 -0
- /package/lib/es/{en-gb-DYXoK50H.js → en-gb-B7Al27b_.js} +0 -0
- /package/lib/es/{es-48latgZ8.js → es-DcaaHPU_.js} +0 -0
- /package/lib/es/{et-UzX1rSXY.js → et-B_spaleu.js} +0 -0
- /package/lib/es/{eu-ijD7H63T.js → eu-Ctv_kq9Z.js} +0 -0
- /package/lib/es/{fi-DDuxAHu5.js → fi-RW5VB8Yp.js} +0 -0
- /package/lib/es/{fr-6wTrAsbK.js → fr-BC2onEz9.js} +0 -0
- /package/lib/es/{fur-CcIOY8A9.js → fur-AC12wySk.js} +0 -0
- /package/lib/es/{ga-B4Qvh5qS.js → ga-Cn6LkudM.js} +0 -0
- /package/lib/es/{gl-D8H7uN6B.js → gl-DZGc-K_G.js} +0 -0
- /package/lib/es/{grc-DFNi6G6p.js → grc-DOlGgO8T.js} +0 -0
- /package/lib/es/{gu-0EahmEdu.js → gu-Bjl0l-cf.js} +0 -0
- /package/lib/es/{hi-C2ih9xmB.js → hi-DsAaTPCC.js} +0 -0
- /package/lib/es/{hr-CSbbBNUu.js → hr-DT1SBBes.js} +0 -0
- /package/lib/es/{hsb-hKsDwaW_.js → hsb-DC_ITc1e.js} +0 -0
- /package/lib/es/{hu-BPixuxjf.js → hu-DVk7Y_ka.js} +0 -0
- /package/lib/es/{hy-CTtThTdl.js → hy-e995ysyO.js} +0 -0
- /package/lib/es/{ia-CYCjbabb.js → ia-Cr4TJH0c.js} +0 -0
- /package/lib/es/{id-Cgsp-bEu.js → id-DifDyWg9.js} +0 -0
- /package/lib/es/{is-D_Awtowh.js → is-BT8UVRze.js} +0 -0
- /package/lib/es/{it-C2qJSkm3.js → it-Bt_Meacx.js} +0 -0
- /package/lib/es/{ka-DpGw5nvd.js → ka-jyoLzyDE.js} +0 -0
- /package/lib/es/{kmr-CCdNyB20.js → kmr-Cfwhwuff.js} +0 -0
- /package/lib/es/{kn-B4tAUtFU.js → kn-C6Lov-DP.js} +0 -0
- /package/lib/es/{la-DIUYl8Yo.js → la-DuvHjUWw.js} +0 -0
- /package/lib/es/{la-x-classic-DsbLrq-C.js → la-x-classic-yTyAOQEt.js} +0 -0
- /package/lib/es/{la-x-liturgic-Ggenbcb5.js → la-x-liturgic-CXeQb4FY.js} +0 -0
- /package/lib/es/{lt-BcizI7gZ.js → lt-BBe8DlDF.js} +0 -0
- /package/lib/es/{lv-BOgrbf6v.js → lv-Q2BBHnzp.js} +0 -0
- /package/lib/es/{ml-CTD7giel.js → ml-2xLVYkVY.js} +0 -0
- /package/lib/es/{mn-cyrl-CDxGttkw.js → mn-cyrl-lHM4n0oC.js} +0 -0
- /package/lib/es/{mn-cyrl-x-lmc-kjrnm3ii.js → mn-cyrl-x-lmc-3aetruI8.js} +0 -0
- /package/lib/es/{mr-DttMNydl.js → mr-CjWJPVmH.js} +0 -0
- /package/lib/es/{mul-ethi-mmW8ZEm0.js → mul-ethi-D_CMSMEq.js} +0 -0
- /package/lib/es/{nb-DCiD6jLz.js → nb-DI8u59ch.js} +0 -0
- /package/lib/es/{nl-BKWsn_4x.js → nl-BHQJ6Gvn.js} +0 -0
- /package/lib/es/{nn-b0W3mz5j.js → nn-ntZvarUK.js} +0 -0
- /package/lib/es/{no-B3l46gib.js → no-B8ItS0F3.js} +0 -0
- /package/lib/es/{oc-zkqkXjNo.js → oc-P_i3-xLA.js} +0 -0
- /package/lib/es/{or-DEnI_Cls.js → or-50rxpoq4.js} +0 -0
- /package/lib/es/{pa-Sh-QSMIs.js → pa-C54UG8eN.js} +0 -0
- /package/lib/es/{pi-DxMx4Uwd.js → pi-B9cgjyG1.js} +0 -0
- /package/lib/es/{pl-CISKU0vg.js → pl-9fg-ESVt.js} +0 -0
- /package/lib/es/{pms-DUga94hR.js → pms-BRGfm5gS.js} +0 -0
- /package/lib/es/{pt-CzW61i2q.js → pt-Cum2_NUC.js} +0 -0
- /package/lib/es/{rm-C1U6i4AB.js → rm-C0MIK9N4.js} +0 -0
- /package/lib/es/{ro-DSU53KfM.js → ro-0fmdH0HA.js} +0 -0
- /package/lib/es/{ru-gduZDLhv.js → ru-v4l-ayaq.js} +0 -0
- /package/lib/es/{sa-Bney0xbB.js → sa-CKY9c_Vq.js} +0 -0
- /package/lib/es/{sh-cyrl-CCByyO89.js → sh-cyrl-BpCRFOmq.js} +0 -0
- /package/lib/es/{sh-latn-CTIiTfzt.js → sh-latn-sRy4Tuaj.js} +0 -0
- /package/lib/es/{sk-DK-iy-nO.js → sk-_iOeDNrQ.js} +0 -0
- /package/lib/es/{sl-BvzIjkCq.js → sl-DpiklF-D.js} +0 -0
- /package/lib/es/{sr-cyrl-7T4T5Th1.js → sr-cyrl-Dpzrbd0W.js} +0 -0
- /package/lib/es/{sv-BynygC4t.js → sv-CFm5y56M.js} +0 -0
- /package/lib/es/{ta-CglfOvwm.js → ta-BcghgTbD.js} +0 -0
- /package/lib/es/{te-Bec4xJud.js → te-B5Spl2Jk.js} +0 -0
- /package/lib/es/{th-B67OcLue.js → th-DWX5iPSo.js} +0 -0
- /package/lib/es/{tk-CYfVPVLR.js → tk-BMbKB10q.js} +0 -0
- /package/lib/es/{tr-BxhGLs2f.js → tr-CIHIuzqc.js} +0 -0
- /package/lib/es/{uk-CnWqKnI0.js → uk-Dir3oxLs.js} +0 -0
- /package/lib/es/{zh-latn-pinyin-CKxTJrac.js → zh-latn-pinyin-BdYb-Ey_.js} +0 -0
|
@@ -71,6 +71,7 @@ export declare function isEmojiGrapheme(grapheme: string): boolean;
|
|
|
71
71
|
export declare function startWithEmoji(text: string): boolean;
|
|
72
72
|
export declare function hasArabic(text: string): boolean;
|
|
73
73
|
export declare function hasTibetan(text: string): boolean;
|
|
74
|
+
export declare function hasThai(text: string): boolean;
|
|
74
75
|
export declare function hasSpace(text: string): boolean;
|
|
75
76
|
export declare function isCjkLeftAlignedPunctuation(text: string): boolean;
|
|
76
77
|
export declare function isCjkRightAlignedPunctuation(text: string): boolean;
|
|
@@ -25,8 +25,16 @@ export interface ITransformerConfig {
|
|
|
25
25
|
rotationSnaps?: number[];
|
|
26
26
|
rotationSnapTolerance?: number;
|
|
27
27
|
rotateAnchorOffset?: number;
|
|
28
|
+
rotateAnchorPosition?: 'top' | 'bottom';
|
|
29
|
+
rotateLineEnabled?: boolean;
|
|
28
30
|
rotateSize?: number;
|
|
29
31
|
rotateCornerRadius?: number;
|
|
32
|
+
rotateFill?: string;
|
|
33
|
+
rotateStroke?: string;
|
|
34
|
+
rotateStrokeWidth?: number;
|
|
35
|
+
rotateIconEnabled?: boolean;
|
|
36
|
+
rotateIconStroke?: string;
|
|
37
|
+
rotateIconStrokeWidth?: number;
|
|
30
38
|
borderEnabled?: boolean;
|
|
31
39
|
borderStroke?: string;
|
|
32
40
|
borderStrokeWidth?: number;
|
|
@@ -39,6 +47,14 @@ export interface ITransformerConfig {
|
|
|
39
47
|
anchorStrokeWidth?: number;
|
|
40
48
|
anchorSize?: number;
|
|
41
49
|
anchorCornerRadius?: number;
|
|
50
|
+
anchorStyle?: 'default' | 'canva';
|
|
51
|
+
anchorSideLongSize?: number;
|
|
52
|
+
anchorSideShortSize?: number;
|
|
53
|
+
anchorSideCornerRadius?: number;
|
|
54
|
+
anchorShadowColor?: string;
|
|
55
|
+
anchorShadowBlur?: number;
|
|
56
|
+
anchorShadowOffsetX?: number;
|
|
57
|
+
anchorShadowOffsetY?: number;
|
|
42
58
|
keepRatio?: boolean;
|
|
43
59
|
centeredScaling?: boolean;
|
|
44
60
|
flipEnabled?: boolean;
|
|
@@ -48,4 +64,5 @@ export interface ITransformerConfig {
|
|
|
48
64
|
shouldOverdrawWholeArea?: boolean;
|
|
49
65
|
zeroLeft?: number;
|
|
50
66
|
zeroTop?: number;
|
|
67
|
+
moveBoundaryEnabled?: boolean;
|
|
51
68
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IWheelEvent } from './i-events';
|
|
17
|
+
export declare function getNextWheelZoomRatio(currentRatio: number, event: Pick<IWheelEvent, 'deltaMode' | 'deltaX' | 'deltaY' | 'wheelDelta'>): number;
|
|
@@ -20,9 +20,15 @@ import type { DocumentSkeleton } from './layout/doc-skeleton';
|
|
|
20
20
|
import { DocComponent } from './doc-component';
|
|
21
21
|
export declare class DocBackground extends DocComponent {
|
|
22
22
|
private _drawLiquid;
|
|
23
|
+
private _backgroundFillColor?;
|
|
24
|
+
private _pageFillColor?;
|
|
25
|
+
private _pageStrokeColor?;
|
|
26
|
+
private _marginStrokeColor?;
|
|
23
27
|
constructor(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig);
|
|
24
28
|
static create(oKey: string, documentSkeleton?: DocumentSkeleton, config?: IDocumentsConfig): DocBackground;
|
|
29
|
+
setFillColors(backgroundFillColor?: string, pageFillColor?: string, pageStrokeColor?: string, marginStrokeColor?: string): void;
|
|
25
30
|
draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
31
|
+
private _drawWorkspaceBackground;
|
|
26
32
|
changeSkeleton(newSkeleton: DocumentSkeleton): this;
|
|
27
33
|
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
28
34
|
}
|
|
@@ -27,6 +27,10 @@ export interface IPageMarginLayout {
|
|
|
27
27
|
}
|
|
28
28
|
export interface IDocumentsConfig extends IPageMarginLayout {
|
|
29
29
|
hasEditor?: boolean;
|
|
30
|
+
backgroundFillColor?: string;
|
|
31
|
+
pageFillColor?: string;
|
|
32
|
+
pageStrokeColor?: string;
|
|
33
|
+
marginStrokeColor?: string;
|
|
30
34
|
}
|
|
31
35
|
export declare abstract class DocComponent extends RenderComponent<IDocumentSkeletonGlyph | IDocumentSkeletonLine, DOCS_EXTENSION_TYPE, IBoundRectNoAngle[]> {
|
|
32
36
|
private _skeleton?;
|
|
@@ -46,9 +46,15 @@ export declare class Documents extends DocComponent {
|
|
|
46
46
|
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
47
47
|
draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
48
48
|
private _drawTable;
|
|
49
|
+
private _getTableViewport;
|
|
50
|
+
private _getRenderUnitId;
|
|
49
51
|
private _drawBorderBottom;
|
|
50
52
|
private _drawTableCell;
|
|
51
53
|
private _drawTableCellBordersAndBg;
|
|
54
|
+
private _getTableCellSource;
|
|
55
|
+
private _resolveTableCellBorder;
|
|
56
|
+
private _isDrawableTableCellBorder;
|
|
57
|
+
private _drawTableCellBorder;
|
|
52
58
|
private _drawHeaderFooter;
|
|
53
59
|
private _horizontalHandler;
|
|
54
60
|
private _verticalHandler;
|
|
@@ -32,8 +32,18 @@ export declare class FontAndBaseLine extends docExtension {
|
|
|
32
32
|
* so we need a map to store actual value and set value
|
|
33
33
|
*/
|
|
34
34
|
actualFontMap: Record<string, string>;
|
|
35
|
+
private _textFillImageCache;
|
|
35
36
|
constructor();
|
|
36
37
|
draw(ctx: UniverRenderingContext, _parentScale: IScale, glyph: IDocumentSkeletonGlyph, _?: IBoundRectNoAngle, _more?: IDrawInfo): void;
|
|
38
|
+
private _fillTextWithTextFill;
|
|
39
|
+
private _getGlyphPaintBounds;
|
|
40
|
+
private _createTextGradient;
|
|
41
|
+
private _createTextPicturePattern;
|
|
42
|
+
private _getTextFillImage;
|
|
43
|
+
private _normalizeGradientStops;
|
|
44
|
+
private _getLinearGradientLine;
|
|
45
|
+
private _colorWithOpacity;
|
|
46
|
+
private _clamp;
|
|
37
47
|
private _fillText;
|
|
38
48
|
clearCache(): void;
|
|
39
49
|
}
|
|
@@ -33,3 +33,7 @@ export declare function TibetanHandler(index: number, charArray: string, viewMod
|
|
|
33
33
|
step: number;
|
|
34
34
|
glyphGroup: import("../../../../..").IDocumentSkeletonGlyph[];
|
|
35
35
|
};
|
|
36
|
+
export declare function ThaiHandler(index: number, charArray: string, viewModel: DocumentViewModel, paragraphNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, paragraph: IParagraph): {
|
|
37
|
+
step: number;
|
|
38
|
+
glyphGroup: import("../../../../..").IDocumentSkeletonGlyph[];
|
|
39
|
+
};
|
|
@@ -26,3 +26,4 @@ export declare function createNullCellPage(ctx: ILayoutContext, sectionBreakConf
|
|
|
26
26
|
sectionBreakConfig: ISectionBreakConfig;
|
|
27
27
|
};
|
|
28
28
|
export declare function createSkeletonCellPages(ctx: ILayoutContext, viewModel: DocumentViewModel, cellNode: DataStreamTreeNode, sectionBreakConfig: ISectionBreakConfig, tableConfig: ITable, row: number, col: number, availableHeight?: number, maxCellPageHeight?: number): IDocumentSkeletonPage[];
|
|
29
|
+
export declare function expandCellPageHeightForInlineDrawings(pages: IDocumentSkeletonPage[]): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface IDocsTableRenderViewport {
|
|
17
|
+
contentWidth: number;
|
|
18
|
+
scrollLeft: number;
|
|
19
|
+
viewportWidth: number;
|
|
20
|
+
}
|
|
21
|
+
export type DocsTableRenderViewportProvider = (unitId: string, tableId: string) => IDocsTableRenderViewport | null | undefined;
|
|
22
|
+
export declare function setDocsTableRenderViewportProvider(provider: DocsTableRenderViewportProvider | null): void;
|
|
23
|
+
export declare function getDocsTableRenderViewport(unitId: string, tableId: string): IDocsTableRenderViewport | null;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import type { IRange, IScale, ObjectMatrix } from '@univerjs/core';
|
|
17
17
|
import type { UniverRenderingContext } from '../../../context';
|
|
18
18
|
import type { IDrawInfo } from '../../extension';
|
|
19
|
-
import type {
|
|
19
|
+
import type { IBorderCache } from '../interfaces';
|
|
20
20
|
import type { SpreadsheetSkeleton } from '../sheet.render-skeleton';
|
|
21
21
|
import { BorderStyleTypes } from '@univerjs/core';
|
|
22
22
|
import { SheetExtension } from './sheet-extension';
|
|
@@ -34,7 +34,7 @@ export declare class Border extends SheetExtension {
|
|
|
34
34
|
preStyle: BorderStyleTypes;
|
|
35
35
|
preColor: string;
|
|
36
36
|
draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], { viewRanges }: IDrawInfo): void;
|
|
37
|
-
renderBorderByCell(renderBorderContext: IRenderBorderContext, row: number, col: number, borderCacheItem:
|
|
37
|
+
renderBorderByCell(renderBorderContext: IRenderBorderContext, row: number, col: number, borderCacheItem: IBorderCache): true | undefined;
|
|
38
38
|
private _getOverflowExclusion;
|
|
39
39
|
private _renderDoubleBorder;
|
|
40
40
|
private _getSpecificCellBorder;
|
|
@@ -18,10 +18,10 @@ import type { BORDER_TYPE as BORDER_LTRB } from '../../basics/const';
|
|
|
18
18
|
import type { Canvas } from '../../canvas';
|
|
19
19
|
import type { UniverRenderingContext } from '../../context';
|
|
20
20
|
import type { DocumentSkeleton } from '../docs/layout/doc-skeleton';
|
|
21
|
-
export interface
|
|
22
|
-
[key: string]:
|
|
21
|
+
export interface IBorderCache {
|
|
22
|
+
[key: string]: IBorderCacheItem | {};
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface IBorderCacheItem {
|
|
25
25
|
type: BORDER_LTRB;
|
|
26
26
|
style: BorderStyleTypes;
|
|
27
27
|
color: string;
|
|
@@ -46,7 +46,7 @@ export interface IStylesCache {
|
|
|
46
46
|
* Get value from getCell in skeleton and this value is used in font extension
|
|
47
47
|
*/
|
|
48
48
|
fontMatrix: ObjectMatrix<IFontCacheItem>;
|
|
49
|
-
border?: ObjectMatrix<
|
|
49
|
+
border?: ObjectMatrix<IBorderCache>;
|
|
50
50
|
}
|
|
51
51
|
export declare enum ShowGridlinesState {
|
|
52
52
|
OFF = 0,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export type { IFindNodeRestrictions } from './components/docs/layout/doc-skeleto
|
|
|
29
29
|
export { getCharSpaceApply, getLastLine, getNumberUnitValue, getPageFromPath, glyphIterator, lineIterator } from './components/docs/layout/tools';
|
|
30
30
|
export { getLastColumn } from './components/docs/layout/tools';
|
|
31
31
|
export { Liquid } from './components/docs/liquid';
|
|
32
|
+
export type { DocsTableRenderViewportProvider, IDocsTableRenderViewport } from './components/docs/table-render-viewport';
|
|
33
|
+
export { getDocsTableRenderViewport, setDocsTableRenderViewportProvider } from './components/docs/table-render-viewport';
|
|
32
34
|
export { DataStreamTreeNode } from './components/docs/view-model/data-stream-tree-node';
|
|
33
35
|
export { DocumentViewModel } from './components/docs/view-model/document-view-model';
|
|
34
36
|
export { DocumentEditArea } from './components/docs/view-model/document-view-model';
|
|
@@ -34,6 +34,7 @@ export interface IRenderManagerService extends IDisposable {
|
|
|
34
34
|
createRender(unitId: string, createUnitOptions?: ICreateUnitOptions): IRender;
|
|
35
35
|
removeRender(unitId: string): void;
|
|
36
36
|
/**
|
|
37
|
+
* @deprecated use getRenderUnitById instead
|
|
37
38
|
* Get RenderUnit By Id, RenderUnit implements IRender
|
|
38
39
|
* @param unitId
|
|
39
40
|
*/
|
|
@@ -50,6 +50,7 @@ export interface IRender {
|
|
|
50
50
|
* Activate the render unit, means the render unit would be updated and rendered.
|
|
51
51
|
*/
|
|
52
52
|
activate(): void;
|
|
53
|
+
isDisposed(): boolean;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* Every render module should implement this interface.
|
|
@@ -60,7 +61,7 @@ export interface IRenderModule extends IDisposable {
|
|
|
60
61
|
* Necessary context for a render module.This interface would be the first argument of render modules' constructor
|
|
61
62
|
* functions.
|
|
62
63
|
*/
|
|
63
|
-
export interface IRenderContext<T extends UnitModel = UnitModel> extends Omit<IRender, 'with'> {
|
|
64
|
+
export interface IRenderContext<T extends UnitModel = UnitModel> extends Omit<IRender, 'with' | 'isDisposed'> {
|
|
64
65
|
unit: T;
|
|
65
66
|
type: UniverInstanceType;
|
|
66
67
|
}
|
|
@@ -89,6 +90,7 @@ export declare class RenderUnit extends Disposable implements IRender {
|
|
|
89
90
|
createUnitOptions?: ICreateUnitOptions;
|
|
90
91
|
}, parentInjector: Injector);
|
|
91
92
|
dispose(): void;
|
|
93
|
+
isDisposed(): boolean;
|
|
92
94
|
/**
|
|
93
95
|
* Get a dependency from the RenderUnit's injector.
|
|
94
96
|
*/
|
|
@@ -51,8 +51,16 @@ export declare class Transformer extends Disposable implements ITransformerConfi
|
|
|
51
51
|
rotationSnaps: number[];
|
|
52
52
|
rotationSnapTolerance: number;
|
|
53
53
|
rotateAnchorOffset: number;
|
|
54
|
+
rotateAnchorPosition: 'top' | 'bottom';
|
|
55
|
+
rotateLineEnabled: boolean;
|
|
54
56
|
rotateSize: number;
|
|
55
57
|
rotateCornerRadius: number;
|
|
58
|
+
rotateFill: string | undefined;
|
|
59
|
+
rotateStroke: string | undefined;
|
|
60
|
+
rotateStrokeWidth: number | undefined;
|
|
61
|
+
rotateIconEnabled: boolean;
|
|
62
|
+
rotateIconStroke: string | undefined;
|
|
63
|
+
rotateIconStrokeWidth: number;
|
|
56
64
|
borderEnabled: boolean;
|
|
57
65
|
borderStroke: string;
|
|
58
66
|
borderStrokeWidth: number;
|
|
@@ -63,10 +71,19 @@ export declare class Transformer extends Disposable implements ITransformerConfi
|
|
|
63
71
|
anchorStrokeWidth: number;
|
|
64
72
|
anchorSize: number;
|
|
65
73
|
anchorCornerRadius: number;
|
|
74
|
+
anchorStyle: 'default' | 'canva';
|
|
75
|
+
anchorSideLongSize: number;
|
|
76
|
+
anchorSideShortSize: number;
|
|
77
|
+
anchorSideCornerRadius: number;
|
|
78
|
+
anchorShadowColor: string | undefined;
|
|
79
|
+
anchorShadowBlur: number;
|
|
80
|
+
anchorShadowOffsetX: number;
|
|
81
|
+
anchorShadowOffsetY: number;
|
|
66
82
|
keepRatio: boolean;
|
|
67
83
|
centeredScaling: boolean;
|
|
68
84
|
zeroLeft: number;
|
|
69
85
|
zeroTop: number;
|
|
86
|
+
moveBoundaryEnabled: boolean;
|
|
70
87
|
/**
|
|
71
88
|
* leftTop centerTop rightTop
|
|
72
89
|
* leftMiddle rightMiddle
|
|
@@ -152,8 +169,11 @@ export declare class Transformer extends Disposable implements ITransformerConfi
|
|
|
152
169
|
private _rotateMoving;
|
|
153
170
|
private _getOutlinePosition;
|
|
154
171
|
private _getRotateAnchorCursor;
|
|
172
|
+
private _createRotateIcon;
|
|
155
173
|
private _getCopperAnchorPosition;
|
|
156
174
|
private _getRotateAnchorPosition;
|
|
175
|
+
private _isMiddleAnchor;
|
|
176
|
+
private _getResizeAnchorProps;
|
|
157
177
|
private _createResizeAnchor;
|
|
158
178
|
private _createCopperResizeAnchor;
|
|
159
179
|
private _getNorthEastPoints;
|
|
@@ -36,5 +36,6 @@ export declare class CanvasColorService extends Disposable implements ICanvasCol
|
|
|
36
36
|
constructor(_themeService: ThemeService);
|
|
37
37
|
getRenderColor(color: string): string;
|
|
38
38
|
}
|
|
39
|
+
export declare function getDarkRenderColorOverride(color: string): string | null;
|
|
39
40
|
export declare function hexToRgb(_hex: string): RGBColorType;
|
|
40
41
|
export declare function rgbToHex(rgbColor: RGBColorType): string;
|