swissqrbill
Advanced tools
Comparing version 4.0.0-alpha.4 to 4.0.0-alpha.5
@@ -104,4 +104,4 @@ var __defProp = Object.defineProperty; | ||
if (this.scissors) { | ||
const scissorsTop = "4.545 -1.803 m4.06 -2.388 3.185 -2.368 2.531 -2.116 c-1.575 -0.577 l-2.769 -1.23 -3.949 -1.043 -3.949 -1.361 c-3.949 -1.61 -3.721 -1.555 -3.755 -2.203 c-3.788 -2.825 -4.437 -3.285 -5.05 -3.244 c-5.664 -3.248 -6.3 -2.777 -6.305 -2.129 c-6.351 -1.476 -5.801 -0.869 -5.152 -0.826 c-4.391 -0.713 -3.043 -1.174 -2.411 -0.041 c-2.882 0.828 -3.718 0.831 -4.474 0.787 c-5.101 0.751 -5.855 0.931 -6.154 1.547 c-6.443 2.138 -6.16 2.979 -5.496 3.16 c-4.826 3.406 -3.906 3.095 -3.746 2.325 c-3.623 1.731 -4.044 1.452 -3.882 1.236 c-3.76 1.073 -2.987 1.168 -1.608 0.549 c2.838 2.117 l3.4 2.273 4.087 2.268 4.584 1.716 c-0.026 -0.027 l4.545 -1.803 lh-4.609 -2.753 m-3.962 -2.392 -4.015 -1.411 -4.687 -1.221 c-5.295 -1.009 -6.073 -1.6 -5.879 -2.26 c-5.765 -2.801 -5.052 -3 -4.609 -2.753 ch-4.581 1.256 m-3.906 1.505 -4.02 2.648 -4.707 2.802 c-5.163 2.96 -5.814 2.733 -5.86 2.196 c-5.949 1.543 -5.182 0.954 -4.581 1.256 ch"; | ||
const scissorsCenter = "1.803 4.545 m2.388 4.06 2.368 3.185 2.116 2.531 c0.577 -1.575 l1.23 -2.769 1.043 -3.949 1.361 -3.949 c1.61 -3.949 1.555 -3.721 2.203 -3.755 c2.825 -3.788 3.285 -4.437 3.244 -5.05 c3.248 -5.664 2.777 -6.3 2.129 -6.305 c1.476 -6.351 0.869 -5.801 0.826 -5.152 c0.713 -4.391 1.174 -3.043 0.041 -2.411 c-0.828 -2.882 -0.831 -3.718 -0.787 -4.474 c-0.751 -5.101 -0.931 -5.855 -1.547 -6.154 c-2.138 -6.443 -2.979 -6.16 -3.16 -5.496 c-3.406 -4.826 -3.095 -3.906 -2.325 -3.746 c-1.731 -3.623 -1.452 -4.044 -1.236 -3.882 c-1.073 -3.76 -1.168 -2.987 -0.549 -1.608 c-2.117 2.838 l-2.273 3.4 -2.268 4.087 -1.716 4.584 c0.027 -0.026 l1.803 4.545 lh2.753 -4.609 m2.392 -3.962 1.411 -4.015 1.221 -4.687 c1.009 -5.295 1.6 -6.073 2.26 -5.879 c2.801 -5.765 3 -5.052 2.753 -4.609 ch-1.256 -4.581 m-1.505 -3.906 -2.648 -4.02 -2.802 -4.707 c-2.96 -5.163 -2.733 -5.814 -2.196 -5.86 c-1.543 -5.949 -0.954 -5.182 -1.256 -4.581 ch"; | ||
const scissorsTop = "4.545 -1.803 m 4.06 -2.388 3.185 -2.368 2.531 -2.116 c -1.575 -0.577 l -2.769 -1.23 -3.949 -1.043 -3.949 -1.361 c -3.949 -1.61 -3.721 -1.555 -3.755 -2.203 c -3.788 -2.825 -4.437 -3.285 -5.05 -3.244 c -5.664 -3.248 -6.3 -2.777 -6.305 -2.129 c -6.351 -1.476 -5.801 -0.869 -5.152 -0.826 c -4.391 -0.713 -3.043 -1.174 -2.411 -0.041 c -2.882 0.828 -3.718 0.831 -4.474 0.787 c -5.101 0.751 -5.855 0.931 -6.154 1.547 c -6.443 2.138 -6.16 2.979 -5.496 3.16 c -4.826 3.406 -3.906 3.095 -3.746 2.325 c -3.623 1.731 -4.044 1.452 -3.882 1.236 c -3.76 1.073 -2.987 1.168 -1.608 0.549 c 2.838 2.117 l 3.4 2.273 4.087 2.268 4.584 1.716 c -0.026 -0.027 l 4.545 -1.803 l h -4.609 -2.753 m -3.962 -2.392 -4.015 -1.411 -4.687 -1.221 c -5.295 -1.009 -6.073 -1.6 -5.879 -2.26 c -5.765 -2.801 -5.052 -3 -4.609 -2.753 c h -4.581 1.256 m -3.906 1.505 -4.02 2.648 -4.707 2.802 c -5.163 2.96 -5.814 2.733 -5.86 2.196 c -5.949 1.543 -5.182 0.954 -4.581 1.256 c h"; | ||
const scissorsCenter = " 1.803 4.545 m 2.388 4.06 2.368 3.185 2.116 2.531 c 0.577 -1.575 l 1.23 -2.769 1.043 -3.949 1.361 -3.949 c 1.61 -3.949 1.555 -3.721 2.203 -3.755 c 2.825 -3.788 3.285 -4.437 3.244 -5.05 c 3.248 -5.664 2.777 -6.3 2.129 -6.305 c 1.476 -6.351 0.869 -5.801 0.826 -5.152 c 0.713 -4.391 1.174 -3.043 0.041 -2.411 c -0.828 -2.882 -0.831 -3.718 -0.787 -4.474 c -0.751 -5.101 -0.931 -5.855 -1.547 -6.154 c -2.138 -6.443 -2.979 -6.16 -3.16 -5.496 c -3.406 -4.826 -3.095 -3.906 -2.325 -3.746 c -1.731 -3.623 -1.452 -4.044 -1.236 -3.882 c -1.073 -3.76 -1.168 -2.987 -0.549 -1.608 c -2.117 2.838 l -2.273 3.4 -2.268 4.087 -1.716 4.584 c 0.027 -0.026 l 1.803 4.545 l h 2.753 -4.609 m 2.392 -3.962 1.411 -4.015 1.221 -4.687 c 1.009 -5.295 1.6 -6.073 2.26 -5.879 c 2.801 -5.765 3 -5.052 2.753 -4.609 c h -1.256 -4.581 m -1.505 -3.906 -2.648 -4.02 -2.802 -4.707 c -2.96 -5.163 -2.733 -5.814 -2.196 -5.86 c -1.543 -5.949 -0.954 -5.182 -1.256 -4.581 c h"; | ||
if (doc.page.height > mm2pt(105)) { | ||
@@ -235,4 +235,4 @@ doc.save(); | ||
doc.restore(); | ||
const swissCrossBackground = "18.3 0.7 m1.6 0.7 l0.7 0.7 l0.7 1.6 l0.7 18.3 l0.7 19.1 l1.6 19.1 l18.3 19.1 l19.1 19.1 l19.1 18.3 l19.1 1.6 l19.1 0.7 lh"; | ||
const swissCross = "8.3 4 m11.6 4 l11.6 15 l8.3 15 l8.3 4 lh4.4 7.9 m15.4 7.9 l15.4 11.2 l4.4 11.2 l4.4 7.9 lh"; | ||
const swissCrossBackground = "18.3 0.7 m 1.6 0.7 l 0.7 0.7 l 0.7 1.6 l 0.7 18.3 l 0.7 19.1 l 1.6 19.1 l 18.3 19.1 l 19.1 19.1 l 19.1 18.3 l 19.1 1.6 l 19.1 0.7 l h"; | ||
const swissCross = "8.3 4 m 11.6 4 l 11.6 15 l 8.3 15 l 8.3 4 l h 4.4 7.9 m 15.4 7.9 l 15.4 11.2 l 4.4 11.2 l 4.4 7.9 l h"; | ||
doc.save(); | ||
@@ -239,0 +239,0 @@ doc.translate(this.x(86.5), this.y(36)); |
@@ -139,10 +139,5 @@ import { getReferenceType } from "./utils.js"; | ||
if (qrCode.getModule(x, y)) { | ||
switch (type) { | ||
case "pdf": | ||
parts.push(`${limitNumber(xOrigin + xPos)} ${limitNumber(yOrigin + yPos)} ${limitNumber(blockSize)} ${limitNumber(blockSize)} re`); | ||
break; | ||
case "svg": | ||
parts.push(`M ${xPos}, ${yPos} V ${yPos + blockSize} H ${xPos + blockSize} V ${yPos} H ${xPos} Z `); | ||
break; | ||
} | ||
parts.push( | ||
type === "pdf" ? `${limitNumber(xOrigin + xPos)} ${limitNumber(yOrigin + yPos)} ${limitNumber(blockSize)} ${limitNumber(blockSize)} re` : `M ${xPos}, ${yPos} V ${yPos + blockSize} H ${xPos + blockSize} V ${yPos} H ${xPos} Z ` | ||
); | ||
} | ||
@@ -149,0 +144,0 @@ } |
{ | ||
"version": "4.0.0-alpha.4", | ||
"version": "4.0.0-alpha.5", | ||
"type": "module", | ||
@@ -46,6 +46,7 @@ "name": "swissqrbill", | ||
"build": "vite build", | ||
"docs": "npm run docs:pdf && npm run docs:svg && npm run docs:shared", | ||
"docs": "npm run docs:pdf && npm run docs:svg && npm run docs:table && npm run docs:shared", | ||
"docs:pdf": "unwritten src/pdf/swissqrbill.ts src/shared/types.ts -t tsconfig.docs.json -o docs/pdf/", | ||
"docs:shared": "unwritten src/shared/utils.ts -t tsconfig.docs.json -o docs/utils/", | ||
"docs:svg": "unwritten src/svg/swissqrbill.ts src/shared/types.ts -t tsconfig.docs.json -o docs/svg/", | ||
"docs:table": "unwritten src/pdf/table.ts -t tsconfig.docs.json -o docs/table/", | ||
"eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.jsonc,.yml,.md ./", | ||
@@ -60,2 +61,12 @@ "eslint:ci": "npm run eslint -- --max-warnings 0", | ||
"markdownlint:fix": "markdownlint-cli2-fix '**/*.md' '#node_modules'", | ||
"postrelease": "eslint --fix package.json && markdownlint-cli2-fix 'CHANGELOG.md'", | ||
"postrelease:alpha": "npm run postrelease", | ||
"postrelease:beta": "npm run postrelease", | ||
"prerelease": "npm run test -- --run && npm run build", | ||
"prerelease:alpha": "npm run test -- --run && npm run build", | ||
"prerelease:beta": "npm run test -- --run && npm run build", | ||
"publish": "changelogen --publish && changelogen gh release", | ||
"release": "changelogen --bump --output --no-tag", | ||
"release:alpha": "npm run release -- --prerelease alpha --publishTag alpha", | ||
"release:beta": "npm run release -- --prerelease beta --publishTag beta", | ||
"spellcheck": "cspell lint", | ||
@@ -76,22 +87,22 @@ "spellcheck:ci": "npm run spellcheck -- --no-progress", | ||
"@cspell/dict-it-it": "^3.0.1", | ||
"@schoero/changelog-config": "^0.0.2", | ||
"@schoero/cspell-config": "^1.6.16", | ||
"@schoero/eslint-config": "^1.41.18", | ||
"@schoero/eslint-config": "^1.41.19", | ||
"@schoero/markdownlint-config": "^1.1.7", | ||
"@schoero/ts-config": "^0.3.7", | ||
"@schoero/unwritten-config": "^0.0.3", | ||
"@schoero/vite-config": "^0.0.25", | ||
"@types/node": "^20.6.3", | ||
"@types/pdfkit": "^0.12.11", | ||
"@types/svg-parser": "^2.0.3", | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"@schoero/vite-config": "^0.0.26", | ||
"@types/node": "^20.7.2", | ||
"@types/pdfkit": "^0.12.12", | ||
"@types/svg-parser": "^2.0.4", | ||
"@typescript-eslint/eslint-plugin": "^6.7.3", | ||
"@typescript-eslint/parser": "^6.7.3", | ||
"cross-env": "^7.0.3", | ||
"glob": "^10.3.6", | ||
"pdf2json": "^3.0.4", | ||
"glob": "^10.3.10", | ||
"pdfkit": "^0.13.0", | ||
"typescript": "^5.2.2", | ||
"unwritten": "^0.0.3", | ||
"vite-plugin-dts": "^3.5.4", | ||
"vite-plugin-dts": "^3.6.0", | ||
"vite-plugin-no-bundle": "^3.0.0", | ||
"vitest": "^0.34.5" | ||
"vitest": "^0.34.6" | ||
}, | ||
@@ -98,0 +109,0 @@ "keywords": [ |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
281842
0
6735