@iyulab/flex-table 0.33.0 → 0.34.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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.34.0] - 2026-09-08
4
+
5
+ ### Fixed
6
+
7
+ - **Three type errors in the export/import path that the toolchain was hiding.** This package
8
+ pinned TypeScript at `~5.7.0` — a value carried over from its initial commit and never
9
+ revisited — while every sibling package compiled with `^5.9.3`. Aligning the pin surfaced
10
+ errors that had been present but unreported: `Uint8Array` widens to
11
+ `Uint8Array<ArrayBufferLike>`, which the DOM lib rejects wherever an `ArrayBuffer` is
12
+ required (`BlobPart`, `BufferSource`). The XLSX writer/reader and the download helper now
13
+ carry the concrete `Uint8Array<ArrayBuffer>` through, so a `Blob`/`File` built from an export
14
+ typechecks. Runtime behaviour is unchanged — the values were always backed by a real
15
+ `ArrayBuffer`.
16
+
17
+ ### Changed
18
+
19
+ - **`exportToString()` and `downloadFile()` now declare `Uint8Array<ArrayBuffer>`** instead of
20
+ the wider `Uint8Array`. Callers that pass the result straight to `Blob`/`File` — the
21
+ documented use — are unaffected and now typecheck without a cast. Only a caller that
22
+ deliberately supplied a `SharedArrayBuffer`-backed view is affected, and such a value could
23
+ never have reached `Blob` at runtime anyway.
24
+
25
+ - **`typescript` devDependency `~5.7.0` → `^5.9.3`**, matching every sibling package.
26
+
3
27
  ## [0.33.0] - 2026-09-08
4
28
 
5
29
  ### Fixed
@@ -4,10 +4,10 @@ export type ExportFormat = 'csv' | 'tsv' | 'json' | 'xlsx';
4
4
  * Export data to the specified format.
5
5
  * Returns string for text formats (csv/tsv/json) or Uint8Array for xlsx.
6
6
  */
7
- export declare function exportData(data: DataRow[], columns: ColumnDefinition[], format: ExportFormat): string | Uint8Array;
7
+ export declare function exportData(data: DataRow[], columns: ColumnDefinition[], format: ExportFormat): string | Uint8Array<ArrayBuffer>;
8
8
  /**
9
9
  * Trigger a file download in the browser.
10
10
  */
11
- export declare function downloadFile(content: string | Uint8Array, filename: string, mimeType: string): void;
11
+ export declare function downloadFile(content: string | Uint8Array<ArrayBuffer>, filename: string, mimeType: string): void;
12
12
  export declare function getExportMimeType(format: ExportFormat): string;
13
13
  export declare function getExportExtension(format: ExportFormat): string;
@@ -7,4 +7,4 @@ import type { ColumnDefinition, DataRow } from '../models/types.js';
7
7
  /**
8
8
  * Build an XLSX file as a Uint8Array.
9
9
  */
10
- export declare function buildXlsx(data: DataRow[], columns: ColumnDefinition[]): Uint8Array;
10
+ export declare function buildXlsx(data: DataRow[], columns: ColumnDefinition[]): Uint8Array<ArrayBuffer>;
@@ -256,7 +256,7 @@ export declare class FlexTable extends LitElement {
256
256
  */
257
257
  exportToString(format: ExportFormat, options?: {
258
258
  selectionOnly?: boolean;
259
- }): string | Uint8Array;
259
+ }): string | Uint8Array<ArrayBuffer>;
260
260
  /**
261
261
  * Export table data and trigger file download.
262
262
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/flex-table",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "A minimalist, input-centric data grid web component",
5
5
  "type": "module",
6
6
  "main": "./dist/flex-table.js",
@@ -98,7 +98,7 @@
98
98
  "react": "^19.2.7",
99
99
  "react-dom": "^19.2.8",
100
100
  "strip-literal": "^3.1.0",
101
- "typescript": "~5.7.0",
101
+ "typescript": "^5.9.3",
102
102
  "vite": "^8.1.4",
103
103
  "vitest": "^4.1.10"
104
104
  }