vkedit 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/transform-element-command.d.ts +1 -0
- package/dist/core/RotateAngleLabel.vue.d.ts +9 -0
- package/dist/hooks/use-content-layer.d.ts +0 -3
- package/dist/{index-Dpse_csX.js → index-BlZP6Kl3.js} +7228 -7149
- package/dist/{index.es-LscL1n3Y.js → index.es-BsTzN-5u.js} +1 -1
- package/dist/plugins/barcode/PropertyPanel.vue.d.ts +1 -1
- package/dist/plugins/barcode/Shape.vue.d.ts +2 -4
- package/dist/plugins/barcode/barcode.d.ts +73 -0
- package/dist/plugins/line/PropertyPanel.vue.d.ts +1 -1
- package/dist/plugins/line/Shape.vue.d.ts +2 -4
- package/dist/plugins/line/line.d.ts +71 -0
- package/dist/plugins/qrcode/PropertyPanel.vue.d.ts +1 -1
- package/dist/plugins/qrcode/Shape.vue.d.ts +2 -4
- package/dist/plugins/qrcode/qrcode.d.ts +72 -0
- package/dist/plugins/rect/PropertyPanel.vue.d.ts +1 -1
- package/dist/plugins/rect/Shape.vue.d.ts +2 -2
- package/dist/plugins/rect/rect.d.ts +66 -0
- package/dist/plugins/snap/snap.d.ts +10 -1
- package/dist/plugins/text/PropertyPanel.vue.d.ts +1 -1
- package/dist/plugins/text/Shape.vue.d.ts +2 -2
- package/dist/plugins/text/text.d.ts +79 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/shape-props.d.ts +6 -0
- package/dist/utils/geometry.d.ts +13 -0
- package/dist/utils/transform-geometry.d.ts +1 -1
- package/dist/vkedit.css +1 -1
- package/dist/vkedit.es.js +1 -1
- package/package.json +19 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.0.2] - 2026-07-29
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Event system enhancements** — Editor emits `editor:ready` on mount, `editor:destroy` on unmount, `editor:reset` before `loadJSON` rebuilds canvas and history; host emits `plugin:loaded` after install/activate and `history:changed` for Toolbar undo/redo state wiring; selection emits `selection:cleared` when transitioning from selected to empty.
|
|
8
|
+
- **Canvas property undo/redo** — `UpdateCanvasPropertyCommand` supports undo/redo for dpm, width, height changes.
|
|
9
|
+
- **Zoom auto-fit** — Canvas auto-fits to half viewport on `loadJSON` completion.
|
|
10
|
+
- **TransformOverlay unified drag** — All element dragging unified through `TransformOverlay`; Shape native drag handlers retired.
|
|
11
|
+
- **Export filename prefix** — Exported PNG/JPEG/PDF filenames are prefixed with `vkedit`.
|
|
12
|
+
- **Pin icon enhancement** — Lock icon changed to solid fill style for stronger lock/unlock visual distinction.
|
|
13
|
+
- **Favicon update** — Updated `favicon.svg` with new brand design and gradients.
|
|
14
|
+
|
|
15
|
+
### Improvements
|
|
16
|
+
|
|
17
|
+
- **Icons migrated to Phosphor** — Icon set switched from `material-symbols-light` to Phosphor for better consistency and smaller bundle.
|
|
18
|
+
- **Snap decoupled from DOM** — Snap calculation logic extracted from DOM dependency; `resolveDragSnap` exposed for overlay integration.
|
|
19
|
+
- **Line element reworked** — Line element switched to `v-rect` fill with transparent hit layer for zoom-robust selection.
|
|
20
|
+
- **Layer event names unified** — Layer events renamed to `layer:order-changed` and `layer:visibility-change` for consistency.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Hidden elements rendering** — Elements with `visible: false` no longer render on canvas.
|
|
25
|
+
- **Box-select start logic** — Box-select now correctly starts from an unselected element instead of triggering single-select.
|
|
26
|
+
- **Align sync** — Konva node is synced after model update in align command; distribute icons swapped for correct ordering.
|
|
27
|
+
- **Build export** — `Props` interface exported to unblock plugin type chain for host consumption.
|
|
28
|
+
- **Keyboard move canvas update** — `TransformElementCommand` syncs Konva node to fix canvas not updating on keyboard arrow move.
|
|
29
|
+
- **Command coalescing** — Compatible commands are coalesced in `executeCommand`; merged command side effects applied on each execution.
|
|
30
|
+
|
|
3
31
|
## [4.0.0] - 2026-07-21
|
|
4
32
|
|
|
5
33
|
### BREAKING CHANGE (styles)
|
|
@@ -11,6 +11,7 @@ export declare class TransformElementCommand extends BaseCommand {
|
|
|
11
11
|
constructor(host: EditorHost, element: IGraphicElement, oldState: any, newState: any);
|
|
12
12
|
execute(): void;
|
|
13
13
|
undo(): void;
|
|
14
|
+
private syncKonvaNode;
|
|
14
15
|
private applyState;
|
|
15
16
|
private detectTransformType;
|
|
16
17
|
canMergeWith(command: ICommand): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
angleLabel: {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
text: string;
|
|
6
|
+
} | null;
|
|
7
|
+
};
|
|
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>;
|
|
9
|
+
export default _default;
|
|
@@ -63,8 +63,5 @@ export declare function useContentLayer(host: EditorHost): {
|
|
|
63
63
|
}) | undefined;
|
|
64
64
|
}[]>;
|
|
65
65
|
initElements: () => void;
|
|
66
|
-
handleDragStart: (event: any, element: any) => void;
|
|
67
|
-
handleDragMove: (event: any, element: any) => void;
|
|
68
|
-
handleDragEnd: (event: any, element: any) => void;
|
|
69
66
|
updateCanvas: () => void;
|
|
70
67
|
};
|