@jetprint/editor-sdk 1.0.9 → 1.0.11
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/dist/components/Editor/components/EditorIcon.vue.d.ts +2 -0
- package/dist/components/Editor/composables/useClearCanvas.d.ts +3 -1
- package/dist/components/Editor/fabric/PatternLayer.d.ts +14 -0
- package/dist/editor-sdk.es.js +16108 -15831
- package/dist/renderWorker.js +2134 -2134
- package/dist/style.css +1 -1
- package/dist/types.d.ts +11 -3
- package/dist/utils/protection/encryptedModules.generated.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ import { type EditorIconName } from '../assets/editorIcons';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
name: EditorIconName;
|
|
4
4
|
nav?: boolean;
|
|
5
|
+
/** true 时用 currentColor 着色(mask 渲染),使图标随文字颜色变化;默认沿用彩色 <img> */
|
|
6
|
+
mono?: boolean;
|
|
5
7
|
};
|
|
6
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
9
|
export default _default;
|
|
@@ -25,7 +25,9 @@ export interface UseClearCanvasOptions {
|
|
|
25
25
|
}
|
|
26
26
|
export declare function useClearCanvas(options: UseClearCanvasOptions): {
|
|
27
27
|
showClearConfirm: Ref<boolean, boolean>;
|
|
28
|
-
doClearCanvas: (
|
|
28
|
+
doClearCanvas: (opts?: {
|
|
29
|
+
deferPreview?: boolean;
|
|
30
|
+
}) => Promise<void>;
|
|
29
31
|
clearCanvas: () => void;
|
|
30
32
|
confirmClearCanvas: () => Promise<void>;
|
|
31
33
|
cancelClearCanvas: () => void;
|
|
@@ -56,6 +56,14 @@ export declare function getPatternLayerGap(obj: any): {
|
|
|
56
56
|
x: number;
|
|
57
57
|
y: number;
|
|
58
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* 解析平铺瓦片旋转角:在 [obj.patternTileAngle, customData.patternTileAngle, customData.originalAngle]
|
|
61
|
+
* 中取第一个「有限且非 0」的值(再归一化到 [0,360))。
|
|
62
|
+
* 注意:不能用 `a ?? b ?? c` —— `??` 不穿透真实 0,故 loadFromJSON 后构造器把顶层置 0 时,
|
|
63
|
+
* 0 会遮蔽 customData 里的真实角度(=旋转丢失的根因之一)。本仓库 patternTileAngle 始终源自
|
|
64
|
+
* originalAngle、无独立置 0 的运行时控件,故「优先非 0」不会误盖合法的 0 角。
|
|
65
|
+
*/
|
|
66
|
+
export declare function pickPatternTileAngle(obj: any): number;
|
|
59
67
|
/** 平铺单元格基础变换(来自转平铺前图片的 flipX/flipY/angle) */
|
|
60
68
|
export declare function resolvePatternTileTransform(obj: any): {
|
|
61
69
|
flipX: boolean;
|
|
@@ -96,6 +104,12 @@ export declare class PatternLayer extends Rect {
|
|
|
96
104
|
setPatternElement(source: CanvasImageSource | null): void;
|
|
97
105
|
setPatternPhase(x: number, y: number): void;
|
|
98
106
|
setPatternGap(x: number, y: number): void;
|
|
107
|
+
/**
|
|
108
|
+
* 把 pattern* 专属属性序列化到顶层,使 fabric 原生 loadFromJSON 经构造器即可还原
|
|
109
|
+
* (不再仅依赖 customData 镜像 + afterLoad 重建)。patternElement 是运行时图源、不可序列化,
|
|
110
|
+
* 仍由重建从 customData.patternSource 重新加载。customData 仍由父类 customProperties 机制带上。
|
|
111
|
+
*/
|
|
112
|
+
toObject(propertiesToInclude?: string[]): any;
|
|
99
113
|
_render(ctx: CanvasRenderingContext2D): void;
|
|
100
114
|
}
|
|
101
115
|
export declare function isPatternLayer(obj: any): obj is PatternLayer;
|