xydata-tools-uniapp 1.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/README.md +60 -0
- package/dist/assets/defaultAddPicBg.png +0 -0
- package/dist/assets/file-icon/document.png +0 -0
- package/dist/assets/file-icon/image.png +0 -0
- package/dist/assets/file-icon/ms-excel.png +0 -0
- package/dist/assets/file-icon/ms-powerpoint.png +0 -0
- package/dist/assets/file-icon/ms-word.png +0 -0
- package/dist/assets/file-icon/pdf.png +0 -0
- package/dist/assets/file-icon/video.png +0 -0
- package/dist/assets/file-icon/zip.png +0 -0
- package/dist/assets/loading.png +0 -0
- package/dist/assets/uploadVideoBg.png +0 -0
- package/dist/assets/videoPlay.png +0 -0
- package/dist/components/uni-app/file-picker/file-picker.vue +633 -0
- package/dist/components/uni-app/file-picker/styles.scss +196 -0
- package/dist/components/uni-app/media-picker/media-picker.vue +1645 -0
- package/dist/components/uni-app/media-picker/shmily-drag-media.vue +924 -0
- package/dist/components/uni-app/media-picker/styles.scss +531 -0
- package/dist/components/uni-app/watermark/index.js +633 -0
- package/dist/index.d.ts +452 -0
- package/dist/index.js +9 -0
- package/dist/shims-vue.d.ts +8 -0
- package/dist/types/components/uni-app/watermark/index.d.ts +2 -0
- package/dist/types/utils/watermark-shared.d.ts +42 -0
- package/dist/utils/watermark-shared.js +346 -0
- package/package.json +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uni-app 专用组件类型定义
|
|
3
|
+
* @module uniapp
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { DefineComponent } from "vue";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 媒体文件对象
|
|
10
|
+
*/
|
|
11
|
+
export interface MediaFile {
|
|
12
|
+
/** 文件名(包含扩展名) */
|
|
13
|
+
name: string;
|
|
14
|
+
/** 文件URL(完整访问路径) */
|
|
15
|
+
url: string;
|
|
16
|
+
/** 服务器存储的文件名 */
|
|
17
|
+
fileName?: string;
|
|
18
|
+
/** 文件大小(字节) */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** 文件 MIME 类型,如 'image/jpeg', 'video/mp4' */
|
|
21
|
+
type?: string;
|
|
22
|
+
/** 缩略图URL(视频) */
|
|
23
|
+
thumb?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 上传来源类型
|
|
28
|
+
*/
|
|
29
|
+
export type SourceType = "album" | "camera";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 按钮位置类型
|
|
33
|
+
*/
|
|
34
|
+
export type ButtonPosition = "vertical" | "horizontal";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 对齐方式类型
|
|
38
|
+
*/
|
|
39
|
+
export type AlignType = "left" | "right";
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 上传类型
|
|
43
|
+
*/
|
|
44
|
+
export type UploadType = "image" | "video" | "both";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* MediaPicker 组件属性
|
|
48
|
+
*/
|
|
49
|
+
export interface MediaPickerProps {
|
|
50
|
+
// ==================== 通用配置 ====================
|
|
51
|
+
/**
|
|
52
|
+
* 上传类型(必填)
|
|
53
|
+
* @type {'image' | 'video' | 'both'}
|
|
54
|
+
* @description
|
|
55
|
+
* - 'image': 仅支持图片上传
|
|
56
|
+
* - 'video': 仅支持视频上传
|
|
57
|
+
* - 'both': 同时支持图片和视频上传
|
|
58
|
+
*/
|
|
59
|
+
uploadType: UploadType;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 上传地址
|
|
63
|
+
* @description 如果不传,会自动从 getApp().globalData.uploadUrl 获取
|
|
64
|
+
*/
|
|
65
|
+
uploadUrl?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 只读模式
|
|
69
|
+
* @default false
|
|
70
|
+
* @description 开启后不显示上传按钮和删除按钮,仅展示媒体列表
|
|
71
|
+
*/
|
|
72
|
+
readonly?: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 上传按钮位置
|
|
76
|
+
* @type {'vertical' | 'horizontal'}
|
|
77
|
+
* @default 'vertical'
|
|
78
|
+
* @description
|
|
79
|
+
* - 'vertical': 垂直布局,按钮在媒体列表下方
|
|
80
|
+
* - 'horizontal': 水平布局,按钮和媒体在同一行(仅单一媒体类型时有效)
|
|
81
|
+
*/
|
|
82
|
+
buttonPosition?: ButtonPosition;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 媒体列数
|
|
86
|
+
* @default 3
|
|
87
|
+
* @description 每行显示的媒体数量,如果设置了 itemWidth 则此项无效
|
|
88
|
+
*/
|
|
89
|
+
cols?: number;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 媒体项固定宽度(单位:rpx)
|
|
93
|
+
* @description 设置后 cols 属性将失效,适用于需要固定媒体项尺寸的场景
|
|
94
|
+
*/
|
|
95
|
+
itemWidth?: number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 媒体项圆角大小(单位:rpx)
|
|
99
|
+
* @default 8
|
|
100
|
+
*/
|
|
101
|
+
itemBorderRadius?: number;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 只读模式下最多显示的媒体数量
|
|
105
|
+
* @description 超过此数量则显示 +N,点击可查看全部
|
|
106
|
+
*/
|
|
107
|
+
maxShowCount?: number;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 对齐方式
|
|
111
|
+
* @type {'left' | 'right'}
|
|
112
|
+
* @default 'left'
|
|
113
|
+
* @description
|
|
114
|
+
* - 'left': 从左往右排列
|
|
115
|
+
* - 'right': 从右往左排列
|
|
116
|
+
* - 仅在 buttonPosition 为 'horizontal' 时有效
|
|
117
|
+
*/
|
|
118
|
+
align?: AlignType;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 弹窗标题
|
|
122
|
+
* @description 查看全部媒体时的弹窗标题文字
|
|
123
|
+
*/
|
|
124
|
+
popupTitle?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 是否可以拖拽排序
|
|
128
|
+
* @default false
|
|
129
|
+
* @description 仅在编辑模式(非 readonly)下有效
|
|
130
|
+
*/
|
|
131
|
+
draggable?: boolean;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 是否展示文件列表
|
|
135
|
+
* @default false
|
|
136
|
+
* @description 是否在媒体下方显示文件名列表
|
|
137
|
+
*/
|
|
138
|
+
showFileList?: boolean;
|
|
139
|
+
|
|
140
|
+
// ==================== 图片配置 ====================
|
|
141
|
+
/**
|
|
142
|
+
* 图片文件列表
|
|
143
|
+
* @default []
|
|
144
|
+
*/
|
|
145
|
+
imageFiles?: MediaFile[];
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 图片最大上传数量限制
|
|
149
|
+
* @default 9
|
|
150
|
+
*/
|
|
151
|
+
imageLimit?: number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 图片上传按钮图标
|
|
155
|
+
* @description 图标图片的 URL 地址
|
|
156
|
+
*/
|
|
157
|
+
imageButtonIcon?: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 图片上传按钮文字
|
|
161
|
+
* @default '上传图片'
|
|
162
|
+
*/
|
|
163
|
+
imageButtonTitle?: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 图片选择来源
|
|
167
|
+
* @type {Array<'album' | 'camera'>}
|
|
168
|
+
* @default ['album', 'camera']
|
|
169
|
+
* @description
|
|
170
|
+
* - 'album': 从相册选择
|
|
171
|
+
* - 'camera': 使用相机拍摄
|
|
172
|
+
*/
|
|
173
|
+
imageSourceType?: SourceType[];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 图片最大大小限制(单位:MB)
|
|
177
|
+
* @default 10
|
|
178
|
+
* @description 设置为 0 表示不限制
|
|
179
|
+
*/
|
|
180
|
+
imageMaxSize?: number;
|
|
181
|
+
|
|
182
|
+
// ==================== 视频配置 ====================
|
|
183
|
+
/**
|
|
184
|
+
* 视频文件列表
|
|
185
|
+
* @default []
|
|
186
|
+
*/
|
|
187
|
+
videoFiles?: MediaFile[];
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 视频最大上传数量限制
|
|
191
|
+
* @default 1
|
|
192
|
+
*/
|
|
193
|
+
videoLimit?: number;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 视频上传按钮图标
|
|
197
|
+
* @description 图标图片的 URL 地址
|
|
198
|
+
*/
|
|
199
|
+
videoButtonIcon?: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* 视频上传按钮文字
|
|
203
|
+
* @default '上传视频'
|
|
204
|
+
*/
|
|
205
|
+
videoButtonTitle?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* 视频选择来源
|
|
209
|
+
* @type {Array<'album' | 'camera'>}
|
|
210
|
+
* @default ['album', 'camera']
|
|
211
|
+
* @description
|
|
212
|
+
* - 'album': 从相册选择
|
|
213
|
+
* - 'camera': 使用相机拍摄
|
|
214
|
+
*/
|
|
215
|
+
videoSourceType?: SourceType[];
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 视频最大时长限制(单位:秒)
|
|
219
|
+
* @default 60
|
|
220
|
+
* @description 设置为 0 表示不限制
|
|
221
|
+
*/
|
|
222
|
+
videoMaxDuration?: number;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* 上传进度信息
|
|
227
|
+
*/
|
|
228
|
+
export interface UploadProgress {
|
|
229
|
+
/** 上传进度百分比(0-100) */
|
|
230
|
+
progress: number;
|
|
231
|
+
/** 已上传字节数 */
|
|
232
|
+
totalBytesSent: number;
|
|
233
|
+
/** 预期需要上传的数据总长度 */
|
|
234
|
+
totalBytesExpectedToSend: number;
|
|
235
|
+
/** 媒体类型 */
|
|
236
|
+
stage: "image" | "video";
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 上传错误信息
|
|
241
|
+
*/
|
|
242
|
+
export interface UploadError {
|
|
243
|
+
/** 错误消息 */
|
|
244
|
+
message: string;
|
|
245
|
+
/** 错误代码 */
|
|
246
|
+
code?: string | number;
|
|
247
|
+
/** 媒体类型 */
|
|
248
|
+
stage?: "image" | "video";
|
|
249
|
+
/** 原始错误对象 */
|
|
250
|
+
raw?: any;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* 常用文件类型预设
|
|
255
|
+
*/
|
|
256
|
+
export const FileTypePresets = {
|
|
257
|
+
/** 文档类型 */
|
|
258
|
+
DOCUMENT: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"],
|
|
259
|
+
/** 压缩包类型 */
|
|
260
|
+
ARCHIVE: ["zip", "rar", "7z", "tar", "gz"],
|
|
261
|
+
/** 文本类型 */
|
|
262
|
+
TEXT: ["txt", "md", "csv", "json", "xml"],
|
|
263
|
+
/** 所有常用类型 */
|
|
264
|
+
ALL: [
|
|
265
|
+
"doc",
|
|
266
|
+
"docx",
|
|
267
|
+
"xls",
|
|
268
|
+
"xlsx",
|
|
269
|
+
"ppt",
|
|
270
|
+
"pptx",
|
|
271
|
+
"pdf",
|
|
272
|
+
"txt",
|
|
273
|
+
"zip",
|
|
274
|
+
"rar",
|
|
275
|
+
],
|
|
276
|
+
} as const;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* FilePicker 组件属性
|
|
280
|
+
*/
|
|
281
|
+
export interface FilePickerProps {
|
|
282
|
+
/**
|
|
283
|
+
* 上传地址
|
|
284
|
+
* @description 如果不传,会自动从 getApp().globalData.uploadUrl 获取
|
|
285
|
+
*/
|
|
286
|
+
uploadUrl?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* 只读模式
|
|
290
|
+
* @default false
|
|
291
|
+
* @description 开启后不显示上传按钮和删除按钮,仅展示文件列表
|
|
292
|
+
*/
|
|
293
|
+
readonly?: boolean;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* 文件列表
|
|
297
|
+
* @default []
|
|
298
|
+
*/
|
|
299
|
+
files?: MediaFile[];
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* 最大上传数量
|
|
303
|
+
* @default 10
|
|
304
|
+
*/
|
|
305
|
+
limit?: number;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* 允许的文件扩展名
|
|
309
|
+
* @default ['doc', 'xls', 'ppt', 'pdf', 'docx', 'xlsx', 'pptx']
|
|
310
|
+
* @description
|
|
311
|
+
* 可以使用 FileTypePresets 中的预设值,例如:
|
|
312
|
+
* - FileTypePresets.DOCUMENT(文档类型)
|
|
313
|
+
* - FileTypePresets.ARCHIVE(压缩包类型)
|
|
314
|
+
* @example
|
|
315
|
+
* accept={['pdf', 'doc', 'docx']}
|
|
316
|
+
*/
|
|
317
|
+
accept?: string[];
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* 文件大小限制(单位:MB)
|
|
321
|
+
* @default 20
|
|
322
|
+
* @description 设置为 0 表示不限制
|
|
323
|
+
*/
|
|
324
|
+
maxSize?: number;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 上传按钮文字
|
|
328
|
+
* @default '上传附件'
|
|
329
|
+
* @description 自定义上传按钮显示的文字
|
|
330
|
+
*/
|
|
331
|
+
buttonTitle?: string;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* MediaPicker 组件实例方法
|
|
336
|
+
*/
|
|
337
|
+
export interface MediaPickerMethods {
|
|
338
|
+
/**
|
|
339
|
+
* 获取图片列表
|
|
340
|
+
* @returns {MediaFile[]} 图片文件列表
|
|
341
|
+
*/
|
|
342
|
+
getImageList(): MediaFile[];
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* 获取视频列表
|
|
346
|
+
* @returns {MediaFile[]} 视频文件列表
|
|
347
|
+
*/
|
|
348
|
+
getVideoList(): MediaFile[];
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* 获取图片参数(不包含 url 字段)
|
|
352
|
+
* @returns {string} JSON 字符串
|
|
353
|
+
*/
|
|
354
|
+
getImageParams(): string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* 获取视频参数(不包含 url 字段)
|
|
358
|
+
* @returns {string} JSON 字符串
|
|
359
|
+
*/
|
|
360
|
+
getVideoParams(): string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* FilePicker 组件实例方法
|
|
365
|
+
*/
|
|
366
|
+
export interface FilePickerMethods {
|
|
367
|
+
/**
|
|
368
|
+
* 获取文件列表
|
|
369
|
+
* @returns {MediaFile[]} 文件列表
|
|
370
|
+
*/
|
|
371
|
+
getFileList(): MediaFile[];
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* 获取参数(不包含 url 字段)
|
|
375
|
+
* @returns {string} JSON 字符串
|
|
376
|
+
*/
|
|
377
|
+
getParams(): string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* MediaPicker - uni-app 媒体(图片/视频)选择上传组件
|
|
382
|
+
* @example
|
|
383
|
+
* ```vue
|
|
384
|
+
* <template>
|
|
385
|
+
* <MediaPicker
|
|
386
|
+
* ref="mediaPicker"
|
|
387
|
+
* uploadType="image"
|
|
388
|
+
* :imageFiles="imageList"
|
|
389
|
+
* :imageLimit="9"
|
|
390
|
+
* @image-change="handleImageChange"
|
|
391
|
+
* />
|
|
392
|
+
* </template>
|
|
393
|
+
*
|
|
394
|
+
* <script setup lang="ts">
|
|
395
|
+
* import { ref } from 'vue'
|
|
396
|
+
* import { MediaPicker, type MediaFile } from 'xydata-tools/uniapp'
|
|
397
|
+
*
|
|
398
|
+
* const mediaPicker = ref<InstanceType<typeof MediaPicker>>()
|
|
399
|
+
* const imageList = ref<MediaFile[]>([])
|
|
400
|
+
*
|
|
401
|
+
* const handleImageChange = (files: MediaFile[]) => {
|
|
402
|
+
* imageList.value = files
|
|
403
|
+
* }
|
|
404
|
+
*
|
|
405
|
+
* // 获取图片列表
|
|
406
|
+
* const getImages = () => {
|
|
407
|
+
* return mediaPicker.value?.getImageList()
|
|
408
|
+
* }
|
|
409
|
+
* </script>
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
export declare const MediaPicker: DefineComponent<
|
|
413
|
+
MediaPickerProps,
|
|
414
|
+
MediaPickerMethods
|
|
415
|
+
>;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* FilePicker - uni-app 文件选择上传组件
|
|
419
|
+
* @example
|
|
420
|
+
* ```vue
|
|
421
|
+
* <template>
|
|
422
|
+
* <FilePicker
|
|
423
|
+
* ref="filePicker"
|
|
424
|
+
* :files="fileList"
|
|
425
|
+
* :limit="5"
|
|
426
|
+
* :accept="['pdf', 'doc', 'docx']"
|
|
427
|
+
* @change="handleFileChange"
|
|
428
|
+
* />
|
|
429
|
+
* </template>
|
|
430
|
+
*
|
|
431
|
+
* <script setup lang="ts">
|
|
432
|
+
* import { ref } from 'vue'
|
|
433
|
+
* import { FilePicker, type MediaFile } from 'xydata-tools/uniapp'
|
|
434
|
+
*
|
|
435
|
+
* const filePicker = ref<InstanceType<typeof FilePicker>>()
|
|
436
|
+
* const fileList = ref<MediaFile[]>([])
|
|
437
|
+
*
|
|
438
|
+
* const handleFileChange = (files: MediaFile[]) => {
|
|
439
|
+
* fileList.value = files
|
|
440
|
+
* }
|
|
441
|
+
*
|
|
442
|
+
* // 获取文件列表
|
|
443
|
+
* const getFiles = () => {
|
|
444
|
+
* return filePicker.value?.getFileList()
|
|
445
|
+
* }
|
|
446
|
+
* </script>
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
export declare const FilePicker: DefineComponent<
|
|
450
|
+
FilePickerProps,
|
|
451
|
+
FilePickerMethods
|
|
452
|
+
>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PicPicker - uni-app 图片选择上传组件
|
|
3
|
+
*/
|
|
4
|
+
export { default as MediaPicker } from "./components/uni-app/media-picker/media-picker.vue";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* FilePicker - uni-app 文件选择上传组件
|
|
8
|
+
*/
|
|
9
|
+
export { default as FilePicker } from "./components/uni-app/file-picker/file-picker.vue";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export namespace DEFAULT_WATERMARK {
|
|
2
|
+
let enabled: boolean;
|
|
3
|
+
let margin: number;
|
|
4
|
+
let items: any[];
|
|
5
|
+
}
|
|
6
|
+
export namespace DEFAULT_WATERMARK_ITEM {
|
|
7
|
+
let type: string;
|
|
8
|
+
let position: string;
|
|
9
|
+
let mode: any;
|
|
10
|
+
let fontSize: number;
|
|
11
|
+
let fontScale: any;
|
|
12
|
+
let minFontSize: any;
|
|
13
|
+
let maxFontSize: any;
|
|
14
|
+
let spacing: any;
|
|
15
|
+
let width: any;
|
|
16
|
+
let height: any;
|
|
17
|
+
let aspectRatio: any;
|
|
18
|
+
let lockAspectRatio: boolean;
|
|
19
|
+
let color: string;
|
|
20
|
+
let strokeColor: string;
|
|
21
|
+
let strokeWidth: number;
|
|
22
|
+
let fontFamily: string;
|
|
23
|
+
let opacity: number;
|
|
24
|
+
let rotate: number;
|
|
25
|
+
}
|
|
26
|
+
export const IMAGE_EXTENSIONS: string[];
|
|
27
|
+
export function getFileExtension(file: any): any;
|
|
28
|
+
export function isImageFile(file: any): any;
|
|
29
|
+
export function normalizeWatermarkConfig(watermark: any): any;
|
|
30
|
+
export function parseInsetCoordinate(value: any, base: any, scale?: number, isAdaptive?: boolean): number;
|
|
31
|
+
export function isFullscreenWatermarkItem(item: any): boolean;
|
|
32
|
+
export function isImageWatermarkItem(item: any): boolean;
|
|
33
|
+
export function resolveSpacing(canvas: any, item: any): number;
|
|
34
|
+
export function resolveTextPosition(canvas: any, item: any, margin: any): any;
|
|
35
|
+
export function resolveImageSize(canvas: any, item: any, image: any): {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
};
|
|
39
|
+
export function resolveBoxPosition(canvas: any, item: any, margin: any, boxWidth: any, boxHeight: any): any;
|
|
40
|
+
export function clampNumber(value: any, min: any, max: any): any;
|
|
41
|
+
export function resolveFontSize(canvas: any, item: any): any;
|
|
42
|
+
export function resolveStrokeWidth(item: any, fontSize: any): number;
|