js.documents 1.55.0 → 1.56.0

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/index.cjs CHANGED
@@ -6185,15 +6185,14 @@ function layoutTable$1(element, ctx) {
6185
6185
  });
6186
6186
  cursorYTopPt += rowAscentPt + rowDescentPt + (rowIndex < rowCells.length - 1 ? rowGapPt : 0);
6187
6187
  });
6188
- const totalHeightPt = cursorYTopPt;
6189
6188
  const widthPt = columnWidthsPt.reduce((sum, w) => sum + w, 0) + columnGapPt * Math.max(0, columnCount - 1);
6190
- let descentPt = totalHeightPt - (totalHeightPt / 2 + ctx.metrics.axisHeightPt);
6189
+ let descentPt = cursorYTopPt - (cursorYTopPt / 2 + ctx.metrics.axisHeightPt);
6191
6190
  if (descentPt < 0) descentPt = 0;
6192
6191
  return {
6193
6192
  widthPt,
6194
- ascentPt: totalHeightPt - descentPt,
6193
+ ascentPt: cursorYTopPt - descentPt,
6195
6194
  descentPt,
6196
- heightPt: totalHeightPt,
6195
+ heightPt: cursorYTopPt,
6197
6196
  items
6198
6197
  };
6199
6198
  }
@@ -7186,13 +7185,12 @@ function renderCellText(cell, rowCells, columnAxis, rowAxis, gridLeftXPt, gridTo
7186
7185
  }
7187
7186
  }
7188
7187
  function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDownPt, pageHeightPt, measurer, out) {
7189
- const labelFont = document_schema_js.DEFAULT_LAYOUT_FONT;
7190
- const lineHeightPt = measurer.lineHeightAtSize(labelFont, HEADER_LABEL_SIZE_PT);
7191
- const ascentPt = measurer.ascenderAtSize(labelFont, HEADER_LABEL_SIZE_PT);
7188
+ const lineHeightPt = measurer.lineHeightAtSize(document_schema_js.DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7189
+ const ascentPt = measurer.ascenderAtSize(document_schema_js.DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7192
7190
  columnAxis.indices.forEach((columnIndex, position) => {
7193
7191
  const label = columnLetters(columnIndex);
7194
7192
  const widthPt = columnAxis.sizesPt[position];
7195
- const labelWidthPt = measurer.widthOfTextAtSize(label, labelFont, HEADER_LABEL_SIZE_PT);
7193
+ const labelWidthPt = measurer.widthOfTextAtSize(label, document_schema_js.DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7196
7194
  const xPt = gridLeftXPt + columnAxis.offsetsPt[position] + alignmentOffsetPt("center", widthPt, labelWidthPt);
7197
7195
  const baselineYDownPt = gridTopYDownPt - gutter.heightPt + (gutter.heightPt - lineHeightPt) / 2 + ascentPt;
7198
7196
  out.push({
@@ -7200,7 +7198,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7200
7198
  text: label,
7201
7199
  xPt,
7202
7200
  yPt: pageHeightPt - baselineYDownPt,
7203
- font: labelFont,
7201
+ font: document_schema_js.DEFAULT_LAYOUT_FONT,
7204
7202
  sizePt: HEADER_LABEL_SIZE_PT,
7205
7203
  color: HEADER_LABEL_COLOR
7206
7204
  });
@@ -7208,7 +7206,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7208
7206
  rowAxis.indices.forEach((rowIndex, position) => {
7209
7207
  const label = String(rowIndex + 1);
7210
7208
  const heightPt = rowAxis.sizesPt[position];
7211
- const labelWidthPt = measurer.widthOfTextAtSize(label, labelFont, HEADER_LABEL_SIZE_PT);
7209
+ const labelWidthPt = measurer.widthOfTextAtSize(label, document_schema_js.DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7212
7210
  const xPt = gridLeftXPt - gutter.widthPt + Math.max(HEADER_LABEL_PADDING_PT, gutter.widthPt - HEADER_LABEL_PADDING_PT - labelWidthPt);
7213
7211
  const baselineYDownPt = gridTopYDownPt + rowAxis.offsetsPt[position] + Math.max(0, (heightPt - lineHeightPt) / 2) + ascentPt;
7214
7212
  out.push({
@@ -7216,7 +7214,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7216
7214
  text: label,
7217
7215
  xPt,
7218
7216
  yPt: pageHeightPt - baselineYDownPt,
7219
- font: labelFont,
7217
+ font: document_schema_js.DEFAULT_LAYOUT_FONT,
7220
7218
  sizePt: HEADER_LABEL_SIZE_PT,
7221
7219
  color: HEADER_LABEL_COLOR
7222
7220
  });
package/dist/index.js CHANGED
@@ -6184,15 +6184,14 @@ function layoutTable$1(element, ctx) {
6184
6184
  });
6185
6185
  cursorYTopPt += rowAscentPt + rowDescentPt + (rowIndex < rowCells.length - 1 ? rowGapPt : 0);
6186
6186
  });
6187
- const totalHeightPt = cursorYTopPt;
6188
6187
  const widthPt = columnWidthsPt.reduce((sum, w) => sum + w, 0) + columnGapPt * Math.max(0, columnCount - 1);
6189
- let descentPt = totalHeightPt - (totalHeightPt / 2 + ctx.metrics.axisHeightPt);
6188
+ let descentPt = cursorYTopPt - (cursorYTopPt / 2 + ctx.metrics.axisHeightPt);
6190
6189
  if (descentPt < 0) descentPt = 0;
6191
6190
  return {
6192
6191
  widthPt,
6193
- ascentPt: totalHeightPt - descentPt,
6192
+ ascentPt: cursorYTopPt - descentPt,
6194
6193
  descentPt,
6195
- heightPt: totalHeightPt,
6194
+ heightPt: cursorYTopPt,
6196
6195
  items
6197
6196
  };
6198
6197
  }
@@ -7185,13 +7184,12 @@ function renderCellText(cell, rowCells, columnAxis, rowAxis, gridLeftXPt, gridTo
7185
7184
  }
7186
7185
  }
7187
7186
  function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDownPt, pageHeightPt, measurer, out) {
7188
- const labelFont = DEFAULT_LAYOUT_FONT;
7189
- const lineHeightPt = measurer.lineHeightAtSize(labelFont, HEADER_LABEL_SIZE_PT);
7190
- const ascentPt = measurer.ascenderAtSize(labelFont, HEADER_LABEL_SIZE_PT);
7187
+ const lineHeightPt = measurer.lineHeightAtSize(DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7188
+ const ascentPt = measurer.ascenderAtSize(DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7191
7189
  columnAxis.indices.forEach((columnIndex, position) => {
7192
7190
  const label = columnLetters(columnIndex);
7193
7191
  const widthPt = columnAxis.sizesPt[position];
7194
- const labelWidthPt = measurer.widthOfTextAtSize(label, labelFont, HEADER_LABEL_SIZE_PT);
7192
+ const labelWidthPt = measurer.widthOfTextAtSize(label, DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7195
7193
  const xPt = gridLeftXPt + columnAxis.offsetsPt[position] + alignmentOffsetPt("center", widthPt, labelWidthPt);
7196
7194
  const baselineYDownPt = gridTopYDownPt - gutter.heightPt + (gutter.heightPt - lineHeightPt) / 2 + ascentPt;
7197
7195
  out.push({
@@ -7199,7 +7197,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7199
7197
  text: label,
7200
7198
  xPt,
7201
7199
  yPt: pageHeightPt - baselineYDownPt,
7202
- font: labelFont,
7200
+ font: DEFAULT_LAYOUT_FONT,
7203
7201
  sizePt: HEADER_LABEL_SIZE_PT,
7204
7202
  color: HEADER_LABEL_COLOR
7205
7203
  });
@@ -7207,7 +7205,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7207
7205
  rowAxis.indices.forEach((rowIndex, position) => {
7208
7206
  const label = String(rowIndex + 1);
7209
7207
  const heightPt = rowAxis.sizesPt[position];
7210
- const labelWidthPt = measurer.widthOfTextAtSize(label, labelFont, HEADER_LABEL_SIZE_PT);
7208
+ const labelWidthPt = measurer.widthOfTextAtSize(label, DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
7211
7209
  const xPt = gridLeftXPt - gutter.widthPt + Math.max(HEADER_LABEL_PADDING_PT, gutter.widthPt - HEADER_LABEL_PADDING_PT - labelWidthPt);
7212
7210
  const baselineYDownPt = gridTopYDownPt + rowAxis.offsetsPt[position] + Math.max(0, (heightPt - lineHeightPt) / 2) + ascentPt;
7213
7211
  out.push({
@@ -7215,7 +7213,7 @@ function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDo
7215
7213
  text: label,
7216
7214
  xPt,
7217
7215
  yPt: pageHeightPt - baselineYDownPt,
7218
- font: labelFont,
7216
+ font: DEFAULT_LAYOUT_FONT,
7219
7217
  sizePt: HEADER_LABEL_SIZE_PT,
7220
7218
  color: HEADER_LABEL_COLOR
7221
7219
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js.documents",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {