@randajan/pdfkit-dom
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -296,7 +296,12 @@ var __defProp = Object.defineProperty; | ||
var parseCells = typize((cells, defs) => { | ||
const arr = typeof cells === "number" ? Array(cells).fill({}) : Array.jet.to(cells, " "); | ||
const dl = defs?.length; | ||
return arr.map((cell, key) => { | ||
return parseCell(cell, dl ? defs[Number.jet.period(key, 0, dl)] : void 0); | ||
}); | ||
cells = typeof cells === "number" ? Array(cells).fill({}) : Array.jet.to(cells, " "); | ||
const cl = cells.length, dl = defs?.length || 0; | ||
const res = []; | ||
for (let i = 0; i < cl || i < dl; i++) { | ||
res[i] = parseCell( | ||
cl ? cells[Number.jet.period(i, 0, cl)] : void 0, | ||
dl ? defs[Number.jet.period(i, 0, dl)] : void 0 | ||
); | ||
} | ||
return res; | ||
}); | ||
@@ -432,2 +437,3 @@ var parseStyle = typize((style, defs) => { | ||
async setHeight(heightLimit) { | ||
console.log(heightLimit); | ||
this._setHeightLimit(heightLimit); | ||
@@ -440,4 +446,4 @@ this._setHeight(this.heightRaw); | ||
const { kit, current } = vault.get(this.doc.uid); | ||
const { doc, element } = this; | ||
kit.text(element, x, y, createOptions(current[0].style, this.width, this.height)); | ||
const { doc, element, width, height } = this; | ||
kit.text(element, x, y, createOptions(current[0].style, width, height)); | ||
} | ||
@@ -1204,10 +1210,7 @@ }; | ||
var defaultStyle2 = { | ||
columns: "min", | ||
rows: "min", | ||
border: "1 black" | ||
}; | ||
var validate = (node) => { | ||
const { columns } = node.element; | ||
if (columns.length) { | ||
return; | ||
} | ||
throw Error(`Grid requires columns to be set`); | ||
}; | ||
@@ -1214,0 +1217,0 @@ var setWidthRaw2 = async (node) => { |
{ | ||
"name": "@randajan/pdfkit-dom", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "PDFKit computed rendering with use of elements and styling", | ||
@@ -5,0 +5,0 @@ "repository": "randajan/pdfkit-dom", |
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
131914
1330
0