@pdfme/common 6.2.4 → 6.2.5

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/types.d.ts CHANGED
@@ -169,6 +169,7 @@ export interface PropPanel<T extends Schema> {
169
169
  * @property {PropPanel} propPanel Object for defining the property panel.
170
170
  * @property {string} [icon] Icon SVG for the plugin.
171
171
  * @property {boolean} [uninterruptedEditMode] When editing in the UI, should the field avoid re-rendering while in edit mode?
172
+ * @property {function} [getAspectRatio] Intrinsic width / height ratio the field box must keep (e.g. square QR codes). When defined, the Designer derives the other side when width, height, or content changes, and locks canvas resizing to the current box ratio. Returning undefined skips the derivation, but canvas resizing stays locked because the method is defined.
172
173
  */
173
174
  export interface Plugin<T extends Schema = Schema> {
174
175
  pdf(arg: PDFRenderProps<T & Schema>): Promise<void> | void;
@@ -176,6 +177,7 @@ export interface Plugin<T extends Schema = Schema> {
176
177
  propPanel: PropPanel<T & Schema>;
177
178
  icon?: string;
178
179
  uninterruptedEditMode?: boolean;
180
+ getAspectRatio?(schema: T & Schema): number | undefined;
179
181
  }
180
182
  export type Plugins = {
181
183
  [key: string]: Plugin;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PDFME_VERSION = "6.2.4";
1
+ export declare const PDFME_VERSION = "6.2.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/common",
3
- "version": "6.2.4",
3
+ "version": "6.2.5",
4
4
  "description": "TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!",
5
5
  "keywords": [
6
6
  "pdf",