@evotecit/officeimo 0.1.19 → 0.1.43
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/README.md +44 -10
- package/bundles/officeimo-canopyx-adapter.js +147 -65
- package/bundles/officeimo-canopyx-adapter.min.js +1 -1
- package/bundles/officeimo-canopyx-adapter.min.mjs +1 -1
- package/bundles/officeimo-canopyx-adapter.mjs +134 -53
- package/bundles/officeimo-canopyx.js +554 -234
- package/bundles/officeimo-canopyx.min.js +1 -1
- package/bundles/officeimo-canopyx.min.mjs +1 -1
- package/bundles/officeimo-canopyx.mjs +477 -158
- package/bundles/officeimo-chartforgex-adapter.js +1924 -0
- package/bundles/officeimo-chartforgex-adapter.min.js +2 -0
- package/bundles/officeimo-chartforgex-adapter.min.mjs +2 -0
- package/bundles/officeimo-chartforgex-adapter.mjs +1910 -0
- package/bundles/officeimo-chartforgex.js +13594 -0
- package/bundles/officeimo-chartforgex.min.js +2 -0
- package/bundles/officeimo-chartforgex.min.mjs +2 -0
- package/bundles/officeimo-chartforgex.mjs +13487 -0
- package/bundles/officeimo-csv.js +12 -7
- package/bundles/officeimo-csv.min.js +1 -1
- package/bundles/officeimo-csv.min.mjs +1 -1
- package/bundles/officeimo-csv.mjs +8 -3
- package/bundles/officeimo-datatables-adapter.js +11 -11
- package/bundles/officeimo-datatables-adapter.min.js +1 -1
- package/bundles/officeimo-datatables-adapter.min.mjs +1 -1
- package/bundles/officeimo-datatables-adapter.mjs +7 -7
- package/bundles/officeimo-datatables.js +418 -180
- package/bundles/officeimo-datatables.min.js +1 -1
- package/bundles/officeimo-datatables.min.mjs +1 -1
- package/bundles/officeimo-datatables.mjs +350 -112
- package/bundles/officeimo-execution.js +14 -9
- package/bundles/officeimo-execution.min.js +1 -1
- package/bundles/officeimo-execution.min.mjs +1 -1
- package/bundles/officeimo-execution.mjs +8 -3
- package/bundles/officeimo-pdf.js +286 -120
- package/bundles/officeimo-pdf.min.js +1 -1
- package/bundles/officeimo-pdf.min.mjs +1 -1
- package/bundles/officeimo-pdf.mjs +244 -78
- package/bundles/officeimo-xlsx.js +136 -59
- package/bundles/officeimo-xlsx.min.js +1 -1
- package/bundles/officeimo-xlsx.min.mjs +1 -1
- package/bundles/officeimo-xlsx.mjs +114 -37
- package/bundles/officeimo.js +416 -178
- package/bundles/officeimo.min.js +1 -1
- package/bundles/officeimo.min.mjs +1 -1
- package/bundles/officeimo.mjs +351 -113
- package/dist/core/progress.js +7 -2
- package/dist/index.d.ts +1 -1
- package/dist/integrations/canopyx/index.js +13 -4
- package/dist/integrations/canopyx/pdf-number.js +9 -6
- package/dist/integrations/canopyx/rule-predicates.d.ts +1 -1
- package/dist/integrations/canopyx/rule-predicates.js +2 -1
- package/dist/integrations/canopyx/rules.d.ts +1 -1
- package/dist/integrations/canopyx/rules.js +11 -13
- package/dist/integrations/canopyx/source.js +57 -7
- package/dist/integrations/canopyx/tones.d.ts +10 -0
- package/dist/integrations/canopyx/tones.js +12 -0
- package/dist/integrations/canopyx/types.d.ts +8 -1
- package/dist/integrations/chartforgex/capture.d.ts +31 -0
- package/dist/integrations/chartforgex/capture.js +103 -0
- package/dist/integrations/chartforgex/index.d.ts +13 -0
- package/dist/integrations/chartforgex/index.js +88 -0
- package/dist/integrations/chartforgex/svg-drawing.d.ts +5 -0
- package/dist/integrations/chartforgex/svg-drawing.js +775 -0
- package/dist/integrations/chartforgex/svg-geometry.d.ts +23 -0
- package/dist/integrations/chartforgex/svg-geometry.js +304 -0
- package/dist/integrations/chartforgex/svg-image.d.ts +9 -0
- package/dist/integrations/chartforgex/svg-image.js +46 -0
- package/dist/integrations/chartforgex/svg-markup.d.ts +10 -0
- package/dist/integrations/chartforgex/svg-markup.js +124 -0
- package/dist/integrations/chartforgex/svg-paint.d.ts +16 -0
- package/dist/integrations/chartforgex/svg-paint.js +146 -0
- package/dist/integrations/chartforgex/types.d.ts +77 -0
- package/dist/integrations/chartforgex/types.js +1 -0
- package/dist/integrations/chartforgex/winansi.d.ts +4 -0
- package/dist/integrations/chartforgex/winansi.js +48 -0
- package/dist/integrations/chartforgex/workbook.d.ts +12 -0
- package/dist/integrations/chartforgex/workbook.js +137 -0
- package/dist/pdf/document-drawings.d.ts +1 -1
- package/dist/pdf/document-drawings.js +91 -17
- package/dist/pdf/document-images.d.ts +7 -1
- package/dist/pdf/document-images.js +59 -24
- package/dist/pdf/document-types.d.ts +3 -1
- package/dist/pdf/document.d.ts +2 -2
- package/dist/pdf/document.js +3 -1
- package/dist/pdf/drawing-types.d.ts +37 -10
- package/dist/pdf/font-resources.d.ts +1 -1
- package/dist/pdf/font-resources.js +6 -3
- package/dist/pdf/index.d.ts +1 -1
- package/dist/pdf/pages.js +15 -0
- package/dist/pdf/png.d.ts +11 -2
- package/dist/pdf/png.js +50 -23
- package/dist/pdf/session.js +3 -2
- package/dist/pdf/settings.d.ts +2 -2
- package/dist/pdf/settings.js +7 -3
- package/dist/xlsx/options.js +2 -2
- package/dist/xlsx/portable.js +1 -1
- package/dist/xlsx/styles.js +28 -18
- package/dist/xlsx/types.d.ts +13 -1
- package/dist/xlsx/workbook.js +9 -1
- package/dist/xlsx/worksheet.d.ts +13 -1
- package/dist/xlsx/worksheet.js +65 -11
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -194,11 +194,14 @@ const blob = await exportCanopy(capture, "xlsx", {
|
|
|
194
194
|
| Fitted CSS pixel widths | XLSX uses a Calibri 11 profile at 96 DPI, a seven-pixel maximum digit and five-pixel cell padding, quantized to 1/256 character; PDF converts pixels to points at 72/96 |
|
|
195
195
|
| Leading left pins | XLSX freezes the contiguous leading pinned columns and any included header; the grouped label column is included in the physical pane offset |
|
|
196
196
|
| Numeric format intent | Fraction digits from 0 through 10 and literal prefixes/suffixes become invariant Excel formats; text such as `Usage %` does not change a raw value of 17 into a percentage |
|
|
197
|
+
| Standard row and cell tones | `info`, `success`, `warning` and `danger` get a pale fill with a dark font (`DDEBF7`/`1F4E78`, `E2F0D9`/`375623`, `FFF2CC`/`7F5000`, `FFC7CE`/`9C0006`, each at least 4.5:1 contrast); `muted` gets a grey `595959` font. Applies to XLSX cells and PDF cells; an entry in `tones` replaces that tone's default |
|
|
197
198
|
| Canonical neutral tone | No override unless explicitly mapped in `tones`; cell styles override overlapping row-style properties |
|
|
198
|
-
|
|
|
199
|
+
| Badges, custom classes and host renderers | Exported as the captured value or text. Badge labels in `cell.badges` are appended to the cell's display text, for example `Alice · Disabled · Stale`, and a badged text cell exports that label. Typed number and date columns, and text columns read by an emitted native rule, keep their raw value and show badges in the text only (PDF). Each reports a `badges`, `custom-class` or `custom-renderer` diagnostic without failing the export. A cell keeps its first 64 badge labels, and only as many as fit in 32,767 characters with its text; `BADGES_TRUNCATED:<count>` reports how many were left out |
|
|
200
|
+
| XLSX header row | Bold, wrapped, filled `E7EDF5` with a thin bottom rule, matching the PDF heading; `xlsx.sheet.headerFill`, `headerBorder` and `headerWrap` override it |
|
|
201
|
+
| Safe resolved links | Native XLSX relationships and PDF annotations; a hidden source URL column is not required. Excel allows 65,530 hyperlinks per worksheet. The adapter sets XLSX `hyperlinkOverflow: "drop"`: configured, heading, footer and text-preservation links are always kept, later data cells keep their label without the link, and one `LINKS_TRUNCATED:<count>` diagnostic per worksheet reports how many were dropped. Links left out are still validated |
|
|
199
202
|
| Relative navigation links | Text columns export the captured visible label, including null-valued links, without inventing an absolute URL; raw numeric and datetime columns retain their typed-value policy |
|
|
200
203
|
| History series | Raw captures export the captured latest scalar, or an empty value when none exists; display captures export the rendered cell text. No sparkline or historical-series reconstruction |
|
|
201
|
-
|
|
|
204
|
+
| Unknown row and cell tones | Preserves status text and typed values without inventing a style and reports `UNMAPPED_TONE`; explicit `tones` mappings still apply |
|
|
202
205
|
| `recordCount` | Checked against enumeration and used for detail progress, independently of dataset `total` and live `matched` |
|
|
203
206
|
| Captured grouping | Validated contiguous half-open ranges, typed group identities and declared numeric aggregates feed the existing grouped XLSX/PDF writers |
|
|
204
207
|
| Explicit `request.pivot` | Preserves the frozen full-query projection, prefix summaries, descendants, Other and grand totals in captured order; never regroups or recomputes values |
|
|
@@ -217,7 +220,7 @@ XLSX maps the declared rule subset to editable data bars, two/three-stop color s
|
|
|
217
220
|
|
|
218
221
|
Datetime rule filters require `datetime: "typed"` and the UTC XLSX clock. Operands use explicit-zone ISO timestamps at exact millisecond precision, or integer epoch milliseconds; the existing date writer converts them to native serials. Local, preserved-text and sub-millisecond predicate profiles report an unsupported diagnostic. Native numeric rules require numeric or null cells; datetime rules require ISO cells that the typed writer converts to native dates, or null. Numeric strings in numeric cells and numeric epoch values in datetime cells are unsupported native rule profiles and reject during enumeration, including text fallback. The flat source retains its raw values. Ordinary datetime output keeps its separate preservation policy below.
|
|
219
222
|
|
|
220
|
-
`stopIfTrue` masks later highlight predicates across the whole row in the original declaration order. A captured rule sequence combining this behavior with native bars or scales is unsupported. Cell-tone and data-bar rules targeting the same column are also unsupported because the cell tone's fill depends on whether the bar resolves. Explicit text fallback omits either unsupported captured sequence and reports the loss. Native rule ranges cover only details, including with omitted or multilevel headers and in grouped reports. CSS variables and resolved `cell.format` properties are not parsed. The portable default rule palette is info `4472C4`, success `70AD47`, warning `FFC000` and danger `C00000
|
|
223
|
+
`stopIfTrue` masks later highlight predicates across the whole row in the original declaration order. A captured rule sequence combining this behavior with native bars or scales is unsupported. Cell-tone and data-bar rules targeting the same column are also unsupported because the cell tone's fill depends on whether the bar resolves. Explicit text fallback omits either unsupported captured sequence and reports the loss. Native rule ranges cover only details, including with omitted or multilevel headers and in grouped reports. CSS variables and resolved `cell.format` properties are not parsed. The portable default rule palette is info `4472C4`, success `70AD47`, warning `FFC000` and danger `C00000` for bars and scales, and the standard tone fills above for highlights; explicit tone mappings override it.
|
|
221
224
|
|
|
222
225
|
PDF defaults to landscape without shrinking the font. Flat and pivot captures measure the selected PDF font against a bounded lookahead of up to 128 rows or 262,144 displayed UTF-16 code units, then replay that single source. Column minimums protect the longest sampled header/content word; numeric and date columns reserve their natural value width. Remaining width first satisfies full header/content preferences, then goes to text columns. If the minimums exceed the printable width, horizontal bands retain readable widths. A word wider than a page can still break at scalar boundaries; later rows use the writer's ordinary lossless wrapping. Explicit `pdf.columnWidths`, horizontal-band settings and shaping providers retain their own layout policy.
|
|
223
226
|
|
|
@@ -225,7 +228,7 @@ The same flat/pivot PDF lookahead chooses one numeric convention for the entire
|
|
|
225
228
|
|
|
226
229
|
Canopy PDF cells wrap independently of the grid's screen `wrap` setting. A seven-column grid with screen `wrap: false` still exports its full text, dates and numbers. An explicit `columnOptions[id].wrapText: false` retains strict nonwrapping behavior and rejects content that cannot fit; use suitable `pdf.columnWidths` or horizontal bands for that contract. Pivot summary and total rows are bold, and numeric columns default to right alignment. Raw numeric captures apply simple declared decimal/percentage/grouping formats to PDF text, retaining the sampled column's decimal separator and captured affixes. Complex native formats retain their resolved text. Missing values remain blank and computed zero values remain zero; neither is invented from the other. XLSX retains the captured screen wrapping unless overridden. Group headings, repeated column headings and continuation context use the existing grouped layout. Supply embedding-permitted TrueType fonts through `pdf.fonts` for Unicode, and a declared language through `pdf.tagged` for tagged reports. XLSX's native rule declarations do not render PDF bars or scales: PDF reports that loss and requires `unsupportedPresentation: "text"` to accept it. This option does not remove typed values, resolved text or valid links.
|
|
227
230
|
|
|
228
|
-
Ordinary text-only grid/tree captures are accepted as flat output. Tree indentation does not create analytical groups. Relative links, history-series presentation and
|
|
231
|
+
Ordinary text-only grid/tree captures are accepted as flat output. Tree indentation does not create analytical groups. Relative links, history-series presentation, badges, custom classes, host renderers and unknown row/cell tones use the scalar/text projections above and report their presentation loss through synchronous `onDiagnostic` when supplied. Genuine unsupported presentation diagnostics and unsupported declarations still reject by default in XLSX/PDF. Explicit `unsupportedPresentation: "text"` accepts their text fallback and reports each diagnostic through the same callback. CSV defaults to text. Unsafe hyperlinks remain rejected. No unbounded diagnostic list or whole-table body is retained.
|
|
229
232
|
|
|
230
233
|
Grouping requires a raw capture with an exact count and complete scope-specific ranges and aggregate values. Up to four levels and 1,000 groups are supported. One aggregate operation per numeric column maps `sum`, `count`, `average`, `minimum` and `maximum` to the canonical report owner; numeric `count` ignores nulls. Captured sums and averages are checked using Canopy's compensated accumulation and empty-input convention. Native formulas calculate their own caches, which can differ by floating-point rounding; an empty native sum is zero. Range and declared-total mismatches still reject the export. Grouped sheets own their summary rows and cannot also use a native table, arbitrary heading matrix or footer. Existing grouped label callbacks remain caller-owned; omitted labels use the English defaults `Group`, `<label> total` and `Grand total`. `xlsx.sheet.includeHeader: false` omits the data header and its default freeze; explicit settings remain subject to the worksheet contract.
|
|
231
234
|
|
|
@@ -237,6 +240,34 @@ Captured group identity is checked against the original raw scalar before relati
|
|
|
237
240
|
|
|
238
241
|
`createCanopyExport(capture, format, options)` remains the flat source API: frozen columns, `rowCount` and fresh `rows()` enumerations. Full adapter writers add captured grouping, native rules and optional metadata. Each enumeration passes its cancellation signal into CanopyX's page requests. A live grid remains page-owned; worker hosts own and release their bounded capture/row bridge. CanopyX may retain identity/cursor bookkeeping, so streamed output does not imply constant memory for the source itself.
|
|
239
242
|
|
|
243
|
+
## ChartForgeX chart exports
|
|
244
|
+
|
|
245
|
+
`exportChartForgeX(capture, "xlsx" | "pdf", options)` turns a chart capture from the ChartForgeX browser runtime into a typed workbook of the chart's series, or a PDF with the chart's title, description and SVG as vector paths and text. It runs offline: no server, browser layout or chart runtime is involved. `writeChartForgeXTo` writes to a caller-owned destination.
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import { exportChartForgeX, type ChartForgeXCapture } from "@evotecit/officeimo/integrations/chartforgex";
|
|
249
|
+
|
|
250
|
+
const capture = {
|
|
251
|
+
version: 1, title: "Sign-ins", description: "Weekly sign-ins by method.",
|
|
252
|
+
x: { kind: "date", title: "Week" }, y: { title: "Sign-ins", unit: "count", format: "#,##0" },
|
|
253
|
+
series: [
|
|
254
|
+
{ id: "passkey", name: "Passkey", points: [{ x: "2026-01-05", xCaption: "W1", y: 120, caption: "120" }] },
|
|
255
|
+
{ id: "password", name: "Password", format: "0.0", points: [{ x: "2026-01-05", y: 300.5 }] }
|
|
256
|
+
],
|
|
257
|
+
svg: serializedChartSvg
|
|
258
|
+
} satisfies ChartForgeXCapture;
|
|
259
|
+
const excel = await exportChartForgeX(capture, "xlsx");
|
|
260
|
+
const pdf = await exportChartForgeX(capture, "pdf", { onDiagnostic: d => console.info(d.code) });
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
`x.kind` types the x values: `date` takes ISO 8601 strings or `Date` values (a string without an offset is a UTC wall-clock time, which is how ChartForgeX serializes time axes), `number` takes finite numbers and `category` takes labels. `y` values are finite numbers or `null`. `xCaption` and `caption` are the texts the chart displays. Axis and series `format` values are native Excel number formats. Dates default to `yyyy-mm-dd` and add time, seconds or milliseconds when the data has them.
|
|
264
|
+
|
|
265
|
+
The workbook has one sheet, `Chart data` by default (`xlsx.sheetName`), with the title above the headings and the title and description in the document properties. With `layout: "wide"` there is a row per x value and a column per series, in series order. Rows follow ascending dates and numbers, and categories keep their first-seen order. `layout: "long"` has a row per point with `Series`, `Series ID`, x and value columns. The default `auto` uses long layout when an x value is missing, a series repeats an x value, or series give the same x different display captions. Display columns, headed `<name> (display)`, preserve captions alongside the typed cells. Units appear in value headings or in a `Unit` column when long-layout rows use different units. A repeated series name gets its ID in brackets.
|
|
266
|
+
|
|
267
|
+
The PDF puts the title on the first page and in the document information, the description as a paragraph, and the chart as a centred drawing whose figure alternative is the description (or title). It is landscape when the chart is wider than tall. The SVG must carry resolved paint inline, as style declarations or presentation attributes; stylesheets and classes are not evaluated. ChartForgeX's own SVG export produces this. The converter reads shapes, path data (arcs and quadratic curves become cubic curves), transforms, nested `svg` viewports, `use` and `symbol`, rectangular `clipPath`s, unprofiled PNG and JPEG `image`s from base64 `data:` URLs, dashes, text with `tspan` lines, anchors and rotation, and colours in hex, named, `rgb()`, `hsl()`, `oklab()`, `oklch()` and `color(srgb …)` forms. Effects without a vector equivalent are skipped and reported once per code through `onDiagnostic`: translucency and gradients are flattened over white (`OPACITY_FLATTENED`, `GRADIENT_FLATTENED`), and filters, masks, markers, pattern fills, non-rectangular clips and text paths are left out, as are images that are external, SVG, rotated, mirrored or in an unsupported color profile (`IMAGE_SKIPPED`). Images keep their opacity, and each distinct image is embedded once however often the chart repeats it, as pictorial charts do. `unsupported: "reject"` fails instead. Without `pdf.fonts`, text uses the standard Helvetica faces: typographic minus and spaces become ASCII, and other Latin letters outside WinAnsi lose their diacritics (`Łódź` becomes `Lódz`) and anything else becomes `?`, reported as `TEXT_SUBSTITUTED`. Supply `pdf.fonts.regular` (and the emphasis faces the chart uses) to keep Unicode text: the PDF then embeds a subset of that TrueType font with a Unicode map, so the text copies and searches with its accents intact. Decomposed accents are composed when possible. In a classic page, `new OfficeIMO.PdfFont(new Uint8Array(await response.arrayBuffer()))` prepares a font the host has fetched or bundled. `chartForgeXDrawing(svg)` returns a version 1 [portable drawing](#portable-drawings) for composing into a larger document. `chartForgeXDrawing(svg, 2)` returns a version 2 drawing with images.
|
|
268
|
+
|
|
269
|
+
In a classic page, load `officeimo.min.js` and then `officeimo-chartforgex-adapter.min.js`; they add `OfficeIMO.exportChartForgeX`, which the ChartForgeX chart menu looks for to offer Excel and PDF downloads.
|
|
270
|
+
|
|
240
271
|
## PDF tables
|
|
241
272
|
|
|
242
273
|
`writePdf` and `writePdfTo` use the same `Column<T>` projection and `ExportCell` values as Excel and CSV. The PDF owner lays out and writes one page at a time, repeats grouped headings, splits oversized data rows across pages and appends a table footer. `writePdfTo` awaits the destination and retains page references, font mappings and the current page rather than the complete report body. Blob mode also retains the finished file.
|
|
@@ -509,11 +540,11 @@ const report = await writePdfDocument([
|
|
|
509
540
|
], { tagged: { language: "en-US" } });
|
|
510
541
|
```
|
|
511
542
|
|
|
512
|
-
Version 1 accepts `path`, `text` and `group` elements
|
|
543
|
+
Version 1 accepts `path`, `text` and `group` elements. Version 2 adds `image` elements, including inside groups. In TypeScript, use `PdfDrawing<2>` and `PdfDrawingBlock<2>` for version 2 drawings. Paths use the existing `move`, `line`, `cubic` and `close` commands, RGB fills/strokes, positive `strokeWidth`, `fillRule`, `lineCap: "butt" | "round" | "square"`, and `lineJoin: "miter" | "round" | "bevel"`, and an optional stroke `dash` (1 through 16 nonnegative lengths in points, at least one positive) with `dashOffset`. Set `miterLimit` to override the default of 10. Image elements place an unprofiled PNG, JPEG or raw RGB(A) `image` (the same values an image block takes) over the rectangle `x`, `y`, `width`, `height`, with an optional constant `opacity` from 0 through 1. Every placement of the same image object shares one embedded image, and its bytes count toward `maxImageBytes`. Groups contain ordered `elements` and an optional rectangular `clip`. Every drawing is also clipped to its own bounds. Coordinates use points from the top left. Finite values from -1,000,000 through 1,000,000 allow geometry to extend beyond a clip. Drawing dimensions are positive and at most 14,400 points. Rectangular clip dimensions may reach 1,000,000 points.
|
|
513
544
|
|
|
514
|
-
Text elements declare `text`, `x`, `y`, `font`, `fontSize` and RGB `color`; `y` is the baseline. The font slot is `regular`, `bold`, `italic` or `boldItalic`, and that exact embedded static TrueType face must be supplied in the document's `fonts`. Use the same licensed static family in the .NET producer and the JavaScript writer. Missing faces and synthetic emphasis are rejected. Text stays at its authored position without wrapping or shaping; line breaks, control characters, unsupported scripts and missing glyphs fail explicitly under the existing scalar-text rules.
|
|
545
|
+
Text elements declare `text`, `x`, `y`, `font`, `fontSize` and RGB `color`; `y` is the baseline. The font slot is `regular`, `bold`, `italic` or `boldItalic`, and that exact embedded static TrueType face must be supplied in the document's `fonts`. Use the same licensed static family in the .NET producer and the JavaScript writer. Missing faces and synthetic emphasis are rejected, unless the drawing sets `standardFonts: true`: then a slot the document supplies no face for uses the standard Helvetica face, which covers WinAnsi characters only. Optional `anchor: "start" | "middle" | "end"` places the measured run's start, middle or end at `x`, and `rotation` turns the baseline clockwise by degrees (-360 through 360) about that point, for example `-90` for a vertical axis title. Text stays at its authored position without wrapping or shaping; line breaks, control characters, unsupported scripts and missing glyphs fail explicitly under the existing scalar-text rules.
|
|
515
546
|
|
|
516
|
-
The wire format rejects unknown properties, versions, commands and element kinds. It does not parse SVG/CSS or load fonts and external resources. `maxDrawingElements` (default 100,000) counts paths, text and groups across drawing blocks; nesting is limited to 32 element levels. Drawing path commands share `maxVectorCommands` with vector blocks. Text shares cell/character budgets with the rest of the document. Serialized drawing content obeys `maxPageBytes`, and preflight and serialization cooperate with cancellation. Keep the supplied drawing stable until its block is consumed.
|
|
547
|
+
The wire format rejects unknown properties, versions, commands and element kinds. It does not parse SVG/CSS or load fonts and external resources; the [ChartForgeX integration](#chartforgex-chart-exports) converts chart SVG into this format. `maxDrawingElements` (default 100,000) counts paths, text, images and groups across drawing blocks; nesting is limited to 32 element levels. Drawing path commands share `maxVectorCommands` with vector blocks. Text shares cell/character budgets with the rest of the document. Serialized drawing content obeys `maxPageBytes`, and preflight and serialization cooperate with cancellation. Keep the supplied drawing stable until its block is consumed.
|
|
517
548
|
|
|
518
549
|
### Tagged PDF reports
|
|
519
550
|
|
|
@@ -641,6 +672,8 @@ Native XLSX charts add workbook-wide `maxCharts` (100 by default), `maxChartPoin
|
|
|
641
672
|
|
|
642
673
|
XLSX rejects oversized text by default. Set `oversizedText: "preserve"` to write a bounded preview with an internal link to the full value on a `Text overflow` worksheet. Each overflow record identifies the source sheet/cell, one-based part number, text and total part count. Concatenate its `Text` values in part order to reconstruct the complete XML-valid value. Chunks never split a supplementary Unicode character. The same strip/reject policy applies to invalid XML characters. Preserve mode does not replace an existing external link on that cell; that conflict throws.
|
|
643
674
|
|
|
675
|
+
Excel allows 65,530 hyperlinks per worksheet, and XLSX rejects more by default. Set `hyperlinkOverflow: "drop"` to keep every configured, heading, footer and text-preservation link and fill the remaining room with data-cell links in row order. Later data cells keep their value without the link; when a link that cannot be dropped needs room, the latest data-cell link gives way. Every link is still validated. `onHyperlinkOverflow({ sheetName, dropped })` is called synchronously once for each worksheet that dropped links; a callback that returns a promise fails the export.
|
|
676
|
+
|
|
644
677
|
ZIP entries cannot interleave, so preservation retains a bounded text spool until the report worksheets finish. `maxOverflowCharacters` defaults to 4,000,000 UTF-16 units. Width sampling has separate defaults of 100,000 retained cells and 1,000,000 UTF-16 units of encoded row XML, including markup, configurable through `maxBufferedCells` and `maxBufferedCharacters`. Automatic width sampling stops within these budgets; an explicitly requested sample that exceeds them fails visibly. Full cell values are preserved in both cases. CSV retains long text directly and is an alternative when Excel's cell/storage constraints do not suit the data.
|
|
645
678
|
|
|
646
679
|
### Node writable streams
|
|
@@ -1215,17 +1248,18 @@ The archive exports `@evotecit/officeimo/classic.js`, `/xlsx.js`, `/csv.js`, `/p
|
|
|
1215
1248
|
|
|
1216
1249
|
The combined bundle exposes all seven namespaces on global `OfficeIMO` plus the established root helpers. The XLSX bundle exposes `core`, `zip`, `xml`, `opc`, `xlsx`; CSV exposes `core`, `csv`; PDF exposes `core`, `pdf`. Load `officeimo-execution.js` beside the chosen writer to add `executeWorkerExport` and `handleWorkerExports` to `OfficeIMO`. The standalone bundles compose in either order.
|
|
1217
1250
|
|
|
1218
|
-
The DataTables and
|
|
1251
|
+
The DataTables, CanopyX and ChartForgeX integrations also ship as thin adapters that take their document writers from the combined bundle instead of carrying their own copy. A page that uses both integrations, or also calls the writers directly, downloads the writers once:
|
|
1219
1252
|
|
|
1220
1253
|
```html
|
|
1221
1254
|
<script src="officeimo.min.js"></script>
|
|
1222
1255
|
<script src="officeimo-datatables-adapter.min.js"></script>
|
|
1223
1256
|
<script src="officeimo-canopyx-adapter.min.js"></script>
|
|
1257
|
+
<script src="officeimo-chartforgex-adapter.min.js"></script>
|
|
1224
1258
|
```
|
|
1225
1259
|
|
|
1226
|
-
Load `officeimo.js` (or `officeimo.min.js`) from the same build before an adapter script; an adapter loaded alone throws an error that names the missing file. The `officeimo-*-adapter.mjs` modules import the sibling `officeimo.mjs` (and `.min.mjs` the sibling `officeimo.min.mjs`), so serve them from one folder. The single-file `officeimo-datatables.js` and `officeimo-
|
|
1260
|
+
Load `officeimo.js` (or `officeimo.min.js`) from the same build before an adapter script; an adapter loaded alone throws an error that names the missing file. The `officeimo-*-adapter.mjs` modules import the sibling `officeimo.mjs` (and `.min.mjs` the sibling `officeimo.min.mjs`), so serve them from one folder. The single-file `officeimo-datatables.js`, `officeimo-canopyx.js` and `officeimo-chartforgex.js` remain for pages that embed one integration only.
|
|
1227
1261
|
|
|
1228
|
-
Every bundle also has a minified `.min.js`/`.min.mjs` variant. It has the same API. Classic `.min.js` scripts share module and class identities with the readable scripts of the same build, so the two can be mixed on one page. Each `.mjs` file is its own module graph: a `FormulaCell` or `PdfFont` from `officeimo.mjs` is not accepted by a writer from `officeimo.min.mjs`, so ES module consumers use one variant throughout. Keep the readable variant for debugging. The package exports the adapters as `@evotecit/officeimo/datatables-adapter.js` and `/
|
|
1262
|
+
Every bundle also has a minified `.min.js`/`.min.mjs` variant. It has the same API. Classic `.min.js` scripts share module and class identities with the readable scripts of the same build, so the two can be mixed on one page. Each `.mjs` file is its own module graph: a `FormulaCell` or `PdfFont` from `officeimo.mjs` is not accepted by a writer from `officeimo.min.mjs`, so ES module consumers use one variant throughout. Keep the readable variant for debugging. The package exports the adapters as `@evotecit/officeimo/datatables-adapter.js`, `/canopyx-adapter.js` and `/chartforgex-adapter.js`, and every bundle file under `@evotecit/officeimo/bundles/*`. Classic scripts work from `file://` and in host-owned workers without a module loader. ES modules use normal import paths on HTTP(S) and in Node; browser local-file module policy can block `file://` imports.
|
|
1229
1263
|
|
|
1230
1264
|
[OfficeIMO.JavaScript.Assets](../OfficeIMO.JavaScript.Assets/README.md) embeds the same committed TypeScript-built bundles in .NET. Its `JavaScriptAsset` API returns exact content and content-hashed filenames; consuming .NET applications require no Node tooling. Standalone `.mjs` assemblies preserve the asset package's module API. The npm subpaths remain genuine separate `tsc` modules with generated declarations.
|
|
1231
1265
|
|