@jimp/plugin-print
Advanced tools
Comparing version 1.1.2 to 1.1.3--canary.34e8f3b.0
@@ -44,11 +44,7 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
y: number; | ||
text: (string | number | { | ||
text: string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
}) & (string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
} | undefined); | ||
}; | ||
maxWidth?: number | undefined; | ||
@@ -63,11 +59,7 @@ maxHeight?: number | undefined; | ||
y: number; | ||
text: (string | number | { | ||
text: string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
}) & (string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
} | undefined); | ||
}; | ||
maxWidth?: number | undefined; | ||
@@ -74,0 +66,0 @@ maxHeight?: number | undefined; |
@@ -44,11 +44,7 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
y: number; | ||
text: (string | number | { | ||
text: string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
}) & (string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
} | undefined); | ||
}; | ||
maxWidth?: number | undefined; | ||
@@ -63,11 +59,7 @@ maxHeight?: number | undefined; | ||
y: number; | ||
text: (string | number | { | ||
text: string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
}) & (string | number | { | ||
text: string | number; | ||
alignmentX?: HorizontalAlign | undefined; | ||
alignmentY?: VerticalAlign | undefined; | ||
} | undefined); | ||
}; | ||
maxWidth?: number | undefined; | ||
@@ -74,0 +66,0 @@ maxHeight?: number | undefined; |
{ | ||
"name": "@jimp/plugin-print", | ||
"version": "1.1.2", | ||
"version": "1.1.3--canary.34e8f3b.0", | ||
"repository": "jimp-dev/jimp", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"sideEffects": false, | ||
@@ -16,11 +19,11 @@ "scripts": { | ||
"devDependencies": { | ||
"@jimp/config-eslint": "1.1.2", | ||
"@jimp/config-typescript": "1.1.2", | ||
"@jimp/config-eslint": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/config-typescript": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/js-png": "workspace:*", | ||
"@jimp/test-utils": "1.1.2", | ||
"@types/node": "^20.12.5", | ||
"eslint": "^8.57.0", | ||
"@jimp/test-utils": "1.1.3--canary.34e8f3b.0", | ||
"@types/node": "^18.19.48", | ||
"eslint": "^9.9.1", | ||
"tshy": "^3.0.2", | ||
"typescript": "^5.5.4", | ||
"vitest": "^1.4.0" | ||
"vitest": "^2.0.5" | ||
}, | ||
@@ -75,11 +78,11 @@ "tshy": { | ||
"dependencies": { | ||
"@jimp/core": "1.1.2", | ||
"@jimp/js-jpeg": "1.1.2", | ||
"@jimp/js-png": "1.1.2", | ||
"@jimp/plugin-blit": "1.1.2", | ||
"@jimp/types": "1.1.2", | ||
"@jimp/core": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/js-jpeg": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/js-png": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/plugin-blit": "1.1.3--canary.34e8f3b.0", | ||
"@jimp/types": "1.1.3--canary.34e8f3b.0", | ||
"parse-bmfont-ascii": "^1.0.6", | ||
"parse-bmfont-binary": "^1.0.6", | ||
"parse-bmfont-xml": "^1.1.6", | ||
"zod": "^3.22.4" | ||
"zod": "^3.23.8" | ||
}, | ||
@@ -90,3 +93,3 @@ "publishConfig": { | ||
"module": "./dist/esm/index.js", | ||
"gitHead": "ba9de4df25a2f0e41f11a68c7aa50181a52115cb" | ||
"gitHead": "34e8f3bbb3f0392953c609a6d4f6e4ec4acb092e" | ||
} |
@@ -8,3 +8,3 @@ import path from "path"; | ||
dir, | ||
"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt" | ||
"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt", | ||
); | ||
@@ -14,3 +14,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt" | ||
"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt", | ||
); | ||
@@ -20,3 +20,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt" | ||
"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt", | ||
); | ||
@@ -26,3 +26,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt" | ||
"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt", | ||
); | ||
@@ -32,3 +32,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt" | ||
"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt", | ||
); | ||
@@ -38,3 +38,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt" | ||
"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt", | ||
); | ||
@@ -44,3 +44,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt" | ||
"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt", | ||
); | ||
@@ -50,3 +50,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt" | ||
"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt", | ||
); | ||
@@ -56,3 +56,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt" | ||
"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt", | ||
); | ||
@@ -62,3 +62,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt" | ||
"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt", | ||
); | ||
@@ -68,3 +68,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt" | ||
"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt", | ||
); | ||
@@ -74,3 +74,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt" | ||
"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt", | ||
); | ||
@@ -80,3 +80,3 @@ | ||
dir, | ||
"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt" | ||
"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt", | ||
); |
@@ -35,3 +35,3 @@ import { expect, test, describe } from "vitest"; | ||
y?: number; | ||
} | ||
}, | ||
) { | ||
@@ -97,3 +97,3 @@ const loadedFont = await loadFont(font); | ||
const font = await loadFont( | ||
"https://raw.githubusercontent.com/jimp-dev/jimp/main/plugins/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt" | ||
"https://raw.githubusercontent.com/jimp-dev/jimp/main/plugins/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt", | ||
); | ||
@@ -116,3 +116,3 @@ const image = new Jimp({ width: 300, height: 100, color: 0xff8800ff }); | ||
const font = await loadFont( | ||
"https://raw.githubusercontent.com/jimp-dev/jimp/main/plugins/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt" | ||
"https://raw.githubusercontent.com/jimp-dev/jimp/main/plugins/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt", | ||
); | ||
@@ -119,0 +119,0 @@ const image = new Jimp({ width: 300, height: 100, color: 0xff8800ff }); |
@@ -42,3 +42,3 @@ import { HorizontalAlign, VerticalAlign } from "@jimp/core"; | ||
maxWidth: number, | ||
alignment: HorizontalAlign | ||
alignment: HorizontalAlign, | ||
) { | ||
@@ -61,3 +61,3 @@ if (alignment === HorizontalAlign.LEFT) { | ||
y: number, | ||
char: BmCharacter | ||
char: BmCharacter, | ||
) { | ||
@@ -89,3 +89,3 @@ if (char.width > 0 && char.height > 0) { | ||
text: string, | ||
defaultCharWidth: number | ||
defaultCharWidth: number, | ||
) { | ||
@@ -147,3 +147,3 @@ for (let i = 0; i < text.length; i++) { | ||
font: BmFont<I>; | ||
} | ||
}, | ||
) { | ||
@@ -191,3 +191,3 @@ let { | ||
const defaultCharWidth = Object.entries(font.chars).find( | ||
(c) => c[1].xadvance | ||
(c) => c[1].xadvance, | ||
)?.[1].xadvance; | ||
@@ -207,3 +207,3 @@ | ||
maxWidth, | ||
alignmentX | ||
alignmentX, | ||
); | ||
@@ -217,3 +217,3 @@ | ||
lineString, | ||
defaultCharWidth | ||
defaultCharWidth, | ||
); | ||
@@ -220,0 +220,0 @@ y += font.common.lineHeight; |
@@ -25,3 +25,3 @@ import parseASCII from "parse-bmfont-ascii"; | ||
file: string, | ||
data: Buffer | string | ||
data: Buffer | string, | ||
): { | ||
@@ -75,3 +75,3 @@ chars: BmCharacter[]; | ||
export async function loadBitmapFont( | ||
bufferOrUrl: string | Buffer | ||
bufferOrUrl: string | Buffer, | ||
): Promise<Omit<BmFont, "pages"> & Pick<RawFont, "pages">> { | ||
@@ -78,0 +78,0 @@ const font = await loadBitmapFontData(bufferOrUrl); |
@@ -40,6 +40,6 @@ import { loadBitmapFont } from "./load-bitmap-font.js"; | ||
font.pages.map(async (page) => | ||
CharacterJimp.read(path.join(path.dirname(file), page)) | ||
) | ||
CharacterJimp.read(path.join(path.dirname(file), page)), | ||
), | ||
), | ||
}; | ||
} |
@@ -87,3 +87,3 @@ import { BmFont } from "./types.js"; | ||
text: string, | ||
maxWidth: number | ||
maxWidth: number, | ||
) { | ||
@@ -90,0 +90,0 @@ const { lines } = splitLines(font, text, maxWidth); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2114140
160
2066
2
+ Added@jimp/core@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/file-ops@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/js-jpeg@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/js-png@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/plugin-blit@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/types@1.1.3--canary.34e8f3b.0(transitive)
+ Added@jimp/utils@1.1.3--canary.34e8f3b.0(transitive)
- Removed@jimp/core@1.1.2(transitive)
- Removed@jimp/file-ops@1.1.2(transitive)
- Removed@jimp/js-jpeg@1.1.2(transitive)
- Removed@jimp/js-png@1.1.2(transitive)
- Removed@jimp/plugin-blit@1.1.2(transitive)
- Removed@jimp/types@1.1.2(transitive)
- Removed@jimp/utils@1.1.2(transitive)
Updatedzod@^3.23.8