@qianxiang-ai/fu-report-viewer-engine 1.1.11 → 1.1.13

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.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './types.js';
2
- export { convertLegacyViewerModel, parseLegacyRichText } from './legacy-converter.js';
2
+ export { convertLegacyViewerModel, parseLegacyRichText, nativeLayoutSource, applyNativeLayout, prepareNativeLayoutFonts } from './legacy-converter.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from './types.js';
2
- export { convertLegacyViewerModel, parseLegacyRichText } from './legacy-converter.js';
2
+ export { convertLegacyViewerModel, parseLegacyRichText, nativeLayoutSource, applyNativeLayout, prepareNativeLayoutFonts } from './legacy-converter.js';
@@ -1,5 +1,10 @@
1
- import type { ViewerRenderModel } from '@qianxiang-ai/fu-report-contracts';
2
- import type { NativeConversionOptions, NativeRichTextNode, NativeViewerDocument } from './types.js';
1
+ import { type ReportLayout, type ViewerRenderModel } from '@qianxiang-ai/fu-report-contracts';
2
+ import type { NativeConversionOptions, NativeRichTextNode, NativeViewerDocument, NativeViewerSheet } from './types.js';
3
3
  export declare function convertLegacyViewerModel(model: ViewerRenderModel, options?: NativeConversionOptions): NativeViewerDocument;
4
4
  export declare function parseLegacyRichText(value: unknown, depth?: number): readonly NativeRichTextNode[];
5
+ /** 原生查看器查询完成后提交普通文本和设计几何,布局入口不会再次查询业务数据。 */
6
+ export declare function nativeLayoutSource(sheet: NativeViewerSheet, printConfig?: Record<string, unknown>): Record<string, unknown>;
7
+ /** 保留单元格身份和交互属性,仅用服务端结果替换行几何及普通文本的位置。 */
8
+ export declare function applyNativeLayout(sheet: NativeViewerSheet, layout: ReportLayout, printConfig?: Record<string, unknown>): NativeViewerSheet;
9
+ export declare function prepareNativeLayoutFonts(layout: ReportLayout, apiBaseUrl: string): Promise<ReportLayout>;
5
10
  //# sourceMappingURL=legacy-converter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-converter.d.ts","sourceRoot":"","sources":["../src/legacy-converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,KAAK,EAMV,uBAAuB,EAKvB,kBAAkB,EAClB,oBAAoB,EAErB,MAAM,YAAY,CAAA;AA4BnB,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,uBAA4B,GACpC,oBAAoB,CAgBtB;AAyKD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,SAAS,kBAAkB,EAAE,CA4B5F"}
1
+ {"version":3,"file":"legacy-converter.d.ts","sourceRoot":"","sources":["../src/legacy-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAC/G,OAAO,KAAK,EAMV,uBAAuB,EAKvB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AA4BnB,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,uBAA4B,GACpC,oBAAoB,CAgBtB;AA4ND,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,SAAS,kBAAkB,EAAE,CA4B5F;AAqeD,4CAA4C;AAC5C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0B/H;AAED,yCAAyC;AACzC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAC9E,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,iBAAiB,CAwB9D;AAKD,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAiB9G"}
@@ -1,3 +1,4 @@
1
+ import { TextLayoutSchema } from '@qianxiang-ai/fu-report-contracts';
1
2
  const DATASET_REFERENCE_SOURCE = '[#$]\\{([A-Za-z_][A-Za-z0-9_.-]{0,127})\\.([A-Za-z_][A-Za-z0-9_.-]{0,127})\\}(\\.group\\(\\))?';
2
3
  const DATASET_REFERENCE = new RegExp(DATASET_REFERENCE_SOURCE, 'g');
3
4
  const EXACT_DATASET_REFERENCE = new RegExp(`^${DATASET_REFERENCE_SOURCE}$`);
@@ -37,12 +38,23 @@ function sourceSheets(root) {
37
38
  }
38
39
  function convertSheet(source, options) {
39
40
  const document = source.document;
40
- const defaultRowHeight = clamp(number(options.defaultRowHeight, 26), 12, 240);
41
+ const defaultRowHeight = clamp(number(options.defaultRowHeight, 25), 12, 240);
41
42
  const defaultColumnWidth = clamp(number(options.defaultColumnWidth, 100), 24, 1000);
42
43
  const expanded = expandRows(object(document.rows), options.datasets ?? {}, defaultRowHeight);
43
44
  const expandedRowShift = Math.max(0, ...expanded.map(row => row.outputRow - row.sourceRow));
44
- const rowCount = clamp(Math.max(1, ...expanded.map(row => row.outputRow + 1), areaEnd(document, 'eri') + 1 + expandedRowShift), 1, MAX_TRACKS);
45
- const columnCount = clamp(Math.max(1, maxCellColumn(expanded) + 1, areaEnd(document, 'eci') + 1), 1, 2048);
45
+ const sourceToOutput = new Map();
46
+ expanded.forEach(row => {
47
+ if (!sourceToOutput.has(row.sourceRow))
48
+ sourceToOutput.set(row.sourceRow, row.outputRow);
49
+ });
50
+ const merges = mergeRanges(document, expanded, sourceToOutput);
51
+ const layerSources = arrays(document.imgList, document.images, document.chartList, document.charts, document.barcodeList, document.qrcodeList, document.richTextList);
52
+ const rowCount = clamp(Math.max(1, ...expanded.map(row => row.outputRow + 1), areaEnd(document, 'eri') + 1 + expandedRowShift, ...merges.map(merge => merge.row + merge.rowspan), ...layerSources.map(raw => {
53
+ const item = object(raw);
54
+ const row = integer(item.row, 0);
55
+ return (sourceToOutput.get(row) ?? row) + clamp(integer(item.rowspan, 1), 1, 10_000);
56
+ })), 1, MAX_TRACKS);
57
+ const columnCount = clamp(Math.max(1, maxCellColumn(expanded) + 1, areaEnd(document, 'eci') + 1, ...merges.map(merge => merge.column + merge.colspan)), 1, 2048);
46
58
  const hidden = object(document.hidden);
47
59
  const hiddenRows = integerSet(hidden.rows);
48
60
  const hiddenColumns = integerSet(hidden.cols);
@@ -52,15 +64,13 @@ function convertSheet(source, options) {
52
64
  }, hiddenRows);
53
65
  const columnsSource = object(document.cols);
54
66
  const columns = tracks(columnCount, defaultColumnWidth, index => number(object(columnsSource[String(index)]).width, defaultColumnWidth), hiddenColumns);
55
- const sourceToOutput = new Map();
56
- expanded.forEach(row => {
57
- if (!sourceToOutput.has(row.sourceRow))
58
- sourceToOutput.set(row.sourceRow, row.outputRow);
59
- });
60
- const merges = mergeRanges(document, expanded, sourceToOutput);
61
67
  const covered = coveredCells(merges);
62
68
  const styles = Array.isArray(document.styles) ? document.styles.map(object) : [];
63
69
  const cells = [];
70
+ let lastContentRow = Math.max(0, ...merges.filter(merge => {
71
+ const bounds = cellBounds(rows, columns, merge.row, merge.column, merge.rowspan, merge.colspan);
72
+ return bounds.width > 0 && bounds.height > 0;
73
+ }).map(merge => merge.row + merge.rowspan - 1));
64
74
  for (const row of expanded) {
65
75
  for (const [columnKey, rawCell] of Object.entries(row.cells)) {
66
76
  const column = integer(columnKey, -1);
@@ -71,9 +81,14 @@ function convertSheet(source, options) {
71
81
  const rowspan = merge?.rowspan ?? 1;
72
82
  const colspan = merge?.colspan ?? 1;
73
83
  const bounds = cellBounds(rows, columns, row.outputRow, column, rowspan, colspan);
74
- const style = normalizeStyle(styles[integer(cell.style, -1)] ?? object(cell.style));
84
+ if (bounds.width <= 0 || bounds.height <= 0)
85
+ continue;
86
+ const sourceStyle = styles[integer(cell.style, -1)] ?? object(cell.style);
87
+ const style = normalizeStyle(sourceStyle);
75
88
  const padding = normalizePadding(cell.padding ?? styles[integer(cell.style, -1)]?.padding);
76
89
  const value = resolveCellValue(cell, row, options.datasets ?? {});
90
+ if (hasPrintContent(cell, value.text, sourceStyle, value.richText))
91
+ lastContentRow = Math.max(lastContentRow, row.outputRow + rowspan - 1);
77
92
  if (cell.virtual && value.text.trim() === '')
78
93
  continue;
79
94
  cells.push({
@@ -86,6 +101,8 @@ function convertSheet(source, options) {
86
101
  contentBox: inset(bounds, padding),
87
102
  zIndex: integer(cell.zIndex, 1),
88
103
  text: value.text,
104
+ ...(typeof cell.autoHeight === 'boolean' ? { autoHeight: cell.autoHeight } : {}),
105
+ ...(cell.printLayout ? { textLayout: TextLayoutSchema.parse(cell.printLayout) } : {}),
89
106
  richText: value.richText,
90
107
  hyperlink: safeLink(cell.hyperlink ?? cell.link),
91
108
  style,
@@ -94,24 +111,57 @@ function convertSheet(source, options) {
94
111
  }
95
112
  }
96
113
  collapseDynamicGroups(cells, rows);
97
- const visibleCells = cells.filter(cell => cell.rowspan > 0).map(({ dynamicGroup: _ignored, ...cell }) => cell);
98
114
  const layers = convertLayers(document, rows, columns, sourceToOutput);
115
+ // 按展开后的正文和实际图层范围裁尾,原始模板及正文中间的空行保持原位。
116
+ const layerBottom = Math.max(0, ...layers.map(layer => layer.bounds.y + layer.bounds.height));
117
+ if (layerBottom > 0) {
118
+ const end = rows.findIndex(track => track.offset + track.size >= layerBottom);
119
+ lastContentRow = Math.max(lastContentRow, end < 0 ? rows.length - 1 : end);
120
+ }
121
+ const printRows = rows.slice(0, lastContentRow + 1);
122
+ const visibleCells = cells.filter(cell => cell.rowspan > 0 && cell.row < printRows.length)
123
+ .map(({ dynamicGroup: _ignored, ...cell }) => cell);
99
124
  const width = columns.reduce((sum, track) => sum + track.size, 0);
100
- const height = rows.reduce((sum, track) => sum + track.size, 0);
125
+ const height = Math.max(layerBottom, printRows.reduce((sum, track) => sum + track.size, 0));
101
126
  return {
102
127
  id: source.id,
103
128
  name: source.name,
104
129
  order: source.order,
105
130
  width,
106
131
  height,
107
- rows,
132
+ rows: printRows,
108
133
  columns,
109
134
  cells: visibleCells,
110
135
  layers,
111
- pages: paginate(rows, object(document.printConfig)),
112
- frozen: freezePoint(string(document.freeze, ''), rows, columns)
136
+ pages: paginate(printRows, object(document.printConfig), height, undefined, cells),
137
+ frozen: freezePoint(string(document.freeze, ''), printRows, columns)
113
138
  };
114
139
  }
140
+ /** 字体或白底样式不独立占页;显式版式占位和可见样式仍须保留。 */
141
+ function hasPrintContent(cell, text, style, richText) {
142
+ if ((richText === undefined ? text.trim() : hasRichPrintContent(richText)) || cell.merge != null
143
+ || [cell.completeBlankStatus, cell.fixedHead, cell.fixedTail].some(printFlagEnabled))
144
+ return true;
145
+ if (['virtual', 'rendered', 'lineStart', 'fillForm'].some(key => {
146
+ if (key === 'rendered' && richText !== undefined)
147
+ return false;
148
+ const value = cell[key];
149
+ return value != null && value !== false && value !== 0 && String(value).trim() !== '';
150
+ }))
151
+ return true;
152
+ return hasPrintBackground(style.bgcolor ?? style.background) || Object.keys(object(style.border)).length > 0;
153
+ }
154
+ function printFlagEnabled(value) {
155
+ return value === true || value === 1 || value === 'true' || value === '1';
156
+ }
157
+ function hasRichPrintContent(nodes = []) {
158
+ return nodes.some(node => node.type === 'text' ? node.text.trim() !== ''
159
+ : node.type !== 'lineBreak' && (hasRichPrintContent(node.children) || hasPrintBackground(node.style?.background ?? node.style?.backgroundColor)));
160
+ }
161
+ function hasPrintBackground(value) {
162
+ const background = string(value, '').replace(/\s/g, '').toLowerCase();
163
+ return !['', '#fff', '#ffffff', 'white', 'transparent', 'rgb(255,255,255)', 'rgba(255,255,255,1)'].includes(background);
164
+ }
115
165
  function expandRows(rows, datasets, defaultHeight) {
116
166
  const sourceIndexes = Object.keys(rows).map(value => integer(value, -1))
117
167
  .filter(value => value >= 0).sort((a, b) => a - b);
@@ -307,9 +357,14 @@ function safeRichTextStyleValue(key, value) {
307
357
  return /^(?:-?\d+(?:\.\d+)?(?:px|em|rem|%|vh|vw)?|auto)(?:\s+(?:-?\d+(?:\.\d+)?(?:px|em|rem|%|vh|vw)?|auto)){0,3}$/.test(value);
308
358
  }
309
359
  function decodeHtmlEntities(value) {
310
- return value.replace(/&(?:amp|lt|gt|quot|#39);/g, entity => ({
311
- '&amp;': '&', '&lt;': '<', '&gt;': '>', '&quot;': '"', '&#39;': "'"
312
- })[entity] ?? entity);
360
+ return value.replace(/&(?:amp|lt|gt|quot|apos|nbsp|#(?:\d+|x[0-9a-f]+));/gi, entity => {
361
+ const named = { '&amp;': '&', '&lt;': '<', '&gt;': '>', '&quot;': '"', '&apos;': "'", '&nbsp;': '\u00a0' };
362
+ if (named[entity.toLowerCase()] !== undefined)
363
+ return named[entity.toLowerCase()];
364
+ const hex = entity.slice(0, 3).toLowerCase() === '&#x';
365
+ const point = Number.parseInt(entity.slice(hex ? 3 : 2, -1), hex ? 16 : 10);
366
+ return point > 0 && point <= 0x10ffff && !(point >= 0xd800 && point <= 0xdfff) ? String.fromCodePoint(point) : entity;
367
+ });
313
368
  }
314
369
  function mergeRanges(document, rows, sourceToOutput) {
315
370
  const result = [];
@@ -334,7 +389,14 @@ function mergeRanges(document, rows, sourceToOutput) {
334
389
  }
335
390
  }
336
391
  const unique = new Map(result.map(item => [`${item.row}:${item.column}`, item]));
337
- return [...unique.values()];
392
+ const visible = [];
393
+ // 覆盖格的历史合并不是可见锚点,不能扩展打印范围或遮挡后续单元格。
394
+ for (const merge of [...unique.values()].sort((a, b) => a.row - b.row || a.column - b.column)) {
395
+ if (!visible.some(parent => parent.row <= merge.row && parent.row + parent.rowspan > merge.row
396
+ && parent.column <= merge.column && parent.column + parent.colspan > merge.column))
397
+ visible.push(merge);
398
+ }
399
+ return visible;
338
400
  }
339
401
  function coveredCells(merges) {
340
402
  const covered = new Set();
@@ -462,21 +524,31 @@ function normalizeChartType(value) {
462
524
  return value;
463
525
  return 'bar';
464
526
  }
465
- function paginate(rows, config) {
527
+ function paginate(rows, config, contentHeight, resolvedPageHeight, cells = []) {
466
528
  const paperHeightMm = string(config.layout, 'portrait') === 'landscape'
467
529
  ? number(config.width, 297) : number(config.height, 297);
468
530
  const margin = clamp(number(config.marginY, 10), 0, paperHeightMm / 3);
469
- const pageHeight = Math.max(96, (paperHeightMm - margin * 2) * 96 / 25.4);
531
+ const pageHeight = resolvedPageHeight ?? Math.max(1, Math.floor((paperHeightMm - margin * 2) * 96 / 25.4)
532
+ - (config.paginationShow === true ? 20 : 0));
470
533
  const pages = [];
471
- let firstRow = 0;
472
534
  let top = 0;
473
- while (firstRow < rows.length) {
474
- let lastRow = firstRow;
475
- while (lastRow + 1 < rows.length && rows[lastRow + 1].offset + rows[lastRow + 1].size - top <= pageHeight)
476
- lastRow++;
477
- pages.push({ index: pages.length, top, height: pageHeight, firstRow, lastRow });
478
- firstRow = lastRow + 1;
479
- top = rows[firstRow]?.offset ?? rows.reduce((sum, row) => sum + row.size, 0);
535
+ const blocks = [...rows.map(row => ({ y: row.offset, height: row.size })),
536
+ ...cells.filter(cell => cell.rowspan > 1).map(cell => cell.bounds)];
537
+ while (top < contentHeight) {
538
+ let end = Math.min(contentHeight, top + pageHeight);
539
+ // 普通行和可放下的纵向合并整体移到下一页;超高行按连续区间续页,不能跳过剩余正文。
540
+ for (;;) {
541
+ const crossing = blocks.filter(block => block.y > top && block.y < end
542
+ && block.y + block.height > end && block.height <= pageHeight);
543
+ if (!crossing.length)
544
+ break;
545
+ end = Math.min(...crossing.map(block => block.y));
546
+ }
547
+ const intersecting = rows.filter(row => row.offset < end && row.offset + row.size > top);
548
+ pages.push({ index: pages.length, top, height: end - top,
549
+ firstRow: intersecting[0]?.index ?? Math.max(0, rows.length - 1),
550
+ lastRow: intersecting.at(-1)?.index ?? Math.max(0, rows.length - 1) });
551
+ top = end;
480
552
  }
481
553
  return pages;
482
554
  }
@@ -523,12 +595,12 @@ function normalizeStyle(source) {
523
595
  background: color(source.bgcolor ?? source.background, '#FFFFFF'),
524
596
  color: color(source.color, '#111827'),
525
597
  fontFamily: safeFont(font.name),
526
- fontSize: clamp(number(font.size, 11), 6, 96),
598
+ fontSize: clamp(number(font.size, 10), 6, 96) * 4 / 3,
527
599
  fontWeight: font.bold === true ? 'bold' : 'normal',
528
600
  fontStyle: font.italic === true ? 'italic' : 'normal',
529
601
  textAlign: enumValue(source.align, ['left', 'center', 'right'], 'left'),
530
602
  verticalAlign: enumValue(source.valign, ['top', 'middle', 'bottom'], 'middle'),
531
- whiteSpace: source.textwrap === false ? 'nowrap' : 'pre-wrap',
603
+ whiteSpace: source.textwrap === true ? 'pre-wrap' : 'nowrap',
532
604
  borderTop: borderValue(border.top),
533
605
  borderRight: borderValue(border.right),
534
606
  borderBottom: borderValue(border.bottom),
@@ -536,6 +608,8 @@ function normalizeStyle(source) {
536
608
  };
537
609
  }
538
610
  function normalizePadding(value) {
611
+ if (value === undefined)
612
+ return [0, 1, 0, 3];
539
613
  if (Array.isArray(value)) {
540
614
  const values = value.slice(0, 4).map(item => clamp(number(item, 4), 0, 100));
541
615
  if (values.length === 2)
@@ -665,3 +739,80 @@ function deepFreeze(value) {
665
739
  }
666
740
  return value;
667
741
  }
742
+ /** 原生查看器查询完成后提交普通文本和设计几何,布局入口不会再次查询业务数据。 */
743
+ export function nativeLayoutSource(sheet, printConfig = {}) {
744
+ const rows = {};
745
+ const cols = {};
746
+ const styles = [];
747
+ for (const track of sheet.rows)
748
+ rows[track.index] = { height: track.size, cells: {} };
749
+ for (const track of sheet.columns)
750
+ cols[track.index] = { width: track.size };
751
+ for (const cell of sheet.cells) {
752
+ const style = cell.style;
753
+ const index = styles.length;
754
+ styles.push({ font: { name: style.fontFamily, size: style.fontSize * .75,
755
+ bold: style.fontWeight === 'bold', italic: style.fontStyle === 'italic' },
756
+ align: style.textAlign, valign: style.verticalAlign, textwrap: style.whiteSpace !== 'nowrap' });
757
+ // 富文本仍由原有富文本绘制器负责,保留其设计行高。
758
+ rows[cell.row].cells[cell.column] = {
759
+ text: cell.richText ? '' : cell.text, style: index,
760
+ ...(cell.autoHeight === undefined ? {} : { autoHeight: cell.autoHeight }),
761
+ ...(cell.rowspan > 1 || cell.colspan > 1 ? { merge: [cell.rowspan - 1, cell.colspan - 1] } : {}),
762
+ padding: [cell.contentBox.y - cell.bounds.y,
763
+ cell.bounds.x + cell.bounds.width - cell.contentBox.x - cell.contentBox.width,
764
+ cell.bounds.y + cell.bounds.height - cell.contentBox.y - cell.contentBox.height,
765
+ cell.contentBox.x - cell.bounds.x]
766
+ };
767
+ }
768
+ const config = Object.fromEntries(Object.entries(printConfig).filter(([key]) => ['paper', 'width', 'height', 'layout', 'orientation', 'marginX', 'marginY', 'marginTop', 'paginationShow', 'isBackend'].includes(key)));
769
+ return { rows, cols, styles, printConfig: config };
770
+ }
771
+ /** 保留单元格身份和交互属性,仅用服务端结果替换行几何及普通文本的位置。 */
772
+ export function applyNativeLayout(sheet, layout, printConfig = {}) {
773
+ let offset = 0;
774
+ const rows = sheet.rows.map(track => {
775
+ const size = layout.rows[String(track.index)]?.height ?? track.size;
776
+ const result = { ...track, offset, size };
777
+ offset += size;
778
+ return result;
779
+ });
780
+ const cells = sheet.cells.map(cell => {
781
+ const bounds = cellBounds(rows, sheet.columns, cell.row, cell.column, cell.rowspan, cell.colspan);
782
+ const plan = layout.cells[`${cell.row}:${cell.column}`];
783
+ return { ...cell, bounds,
784
+ contentBox: plan ? inset(bounds, [...plan.padding]) : {
785
+ ...cell.contentBox, y: bounds.y + cell.contentBox.y - cell.bounds.y,
786
+ height: bounds.height - cell.bounds.height + cell.contentBox.height
787
+ },
788
+ ...(!cell.richText && plan ? { textLayout: plan, style: { ...cell.style, fontFamily: plan.fontFamily } } : {}) };
789
+ });
790
+ const layers = sheet.layers.map(layer => {
791
+ const anchor = sheet.rows.find(track => layer.bounds.y >= track.offset && layer.bounds.y < track.offset + track.size);
792
+ const shift = anchor ? (rows[anchor.index]?.offset ?? anchor.offset) - anchor.offset : 0;
793
+ return { ...layer, bounds: { ...layer.bounds, y: layer.bounds.y + shift }, contentBox: { ...layer.contentBox, y: layer.contentBox.y + shift } };
794
+ });
795
+ const height = Math.max(offset, ...layers.map(layer => layer.bounds.y + layer.bounds.height));
796
+ return deepFreeze({ ...sheet, fontFaces: layout.fonts, rows, cells, layers, height, pages: paginate(rows, printConfig, height, layout.pageHeight, cells) });
797
+ }
798
+ /** 只加载布局引用的不可变字体;失败即停止展示,避免浏览器悄悄使用本机字体。 */
799
+ const layoutFontPromises = new Map();
800
+ export async function prepareNativeLayoutFonts(layout, apiBaseUrl) {
801
+ const fonts = layout.fonts.map(face => ({ ...face, resource: `${apiBaseUrl.replace(/\/$/, '')}/${face.resource}` }));
802
+ await Promise.all(fonts.map(face => {
803
+ const key = JSON.stringify(face);
804
+ let promise = layoutFontPromises.get(key);
805
+ if (!promise) {
806
+ promise = new FontFace(face.family, `url(${JSON.stringify(face.resource)})`, {
807
+ weight: String(face.weight), style: face.style
808
+ }).load().then(font => { document.fonts.add(font); return font; }).catch(error => {
809
+ layoutFontPromises.delete(key);
810
+ throw error;
811
+ });
812
+ layoutFontPromises.set(key, promise);
813
+ }
814
+ return promise;
815
+ }));
816
+ await document.fonts.ready;
817
+ return { ...layout, fonts };
818
+ }
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { ReportLayout, ReportTextLayout } from '@qianxiang-ai/fu-report-contracts';
1
2
  export interface NativeBounds {
2
3
  readonly x: number;
3
4
  readonly y: number;
@@ -46,6 +47,8 @@ export interface NativeCell {
46
47
  readonly contentBox: NativeBounds;
47
48
  readonly zIndex: number;
48
49
  readonly text: string;
50
+ readonly autoHeight?: boolean;
51
+ readonly textLayout?: ReportTextLayout;
49
52
  readonly richText?: readonly NativeRichTextNode[];
50
53
  readonly hyperlink?: string;
51
54
  readonly style: NativeCellStyle;
@@ -99,6 +102,7 @@ export interface NativePage {
99
102
  readonly lastRow: number;
100
103
  }
101
104
  export interface NativeViewerSheet {
105
+ readonly fontFaces?: ReportLayout['fonts'];
102
106
  readonly id: string;
103
107
  readonly name: string;
104
108
  readonly order: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,UAAU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S,UAAU,EAAE,CAAA;IACrC,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;IACrC,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5D;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAA;CAC9C;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAA;AAChF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAAC,CAAA;AAEvF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IACvC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CACrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qianxiang-ai/fu-report-viewer-engine",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "license": "AGPL-3.0-only",
5
5
  "author": "位志国 <ijunfu@aliyun.com>",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
22
  "dependencies": {
23
- "@qianxiang-ai/fu-report-contracts": "1.1.11"
23
+ "@qianxiang-ai/fu-report-contracts": "1.1.13"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "node ../../scripts/clean-dist.mjs && tsc -p tsconfig.json",