@particle-academy/holy-sheet 2.5.0 → 2.7.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 +560 -0
- package/dist/index.cjs +350 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -7
- package/dist/index.d.ts +30 -7
- package/dist/index.js +350 -67
- package/dist/index.js.map +1 -1
- package/package.json +67 -66
package/dist/index.d.cts
CHANGED
|
@@ -58,6 +58,18 @@ interface SheetSchema {
|
|
|
58
58
|
columnWidths?: Record<number | string, number>;
|
|
59
59
|
frozenRows?: number;
|
|
60
60
|
frozenCols?: number;
|
|
61
|
+
/** 1-based row number → pixels. */
|
|
62
|
+
rowHeights?: Record<number | string, number>;
|
|
63
|
+
print?: {
|
|
64
|
+
orientation?: "portrait" | "landscape";
|
|
65
|
+
fitToWidth?: boolean;
|
|
66
|
+
/** `{page}` / `{pages}` print the page number and count. */
|
|
67
|
+
footer?: {
|
|
68
|
+
left?: string;
|
|
69
|
+
center?: string;
|
|
70
|
+
right?: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
61
73
|
}
|
|
62
74
|
interface HolySheetSchema {
|
|
63
75
|
sheets: SheetSchema[];
|
|
@@ -223,7 +235,7 @@ interface SetMetaOp {
|
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
/** This package's own version, pinned to package.json by `version.test.ts`. */
|
|
226
|
-
declare const VERSION = "2.
|
|
238
|
+
declare const VERSION = "2.7.0";
|
|
227
239
|
type Any$6 = any;
|
|
228
240
|
/**
|
|
229
241
|
* Agent — the structured-tool surface for Holy Sheet. Mirrors PHP `Agent`.
|
|
@@ -295,7 +307,7 @@ type Any$5 = any;
|
|
|
295
307
|
* over `Agent`. Provided for parity / DI ergonomics; most callers use `Agent`.
|
|
296
308
|
*/
|
|
297
309
|
declare class HolySheet {
|
|
298
|
-
static readonly VERSION = "2.
|
|
310
|
+
static readonly VERSION = "2.7.0";
|
|
299
311
|
validate(schema: Any$5): ValidationError[];
|
|
300
312
|
toBytes(schema: Any$5): Uint8Array;
|
|
301
313
|
write(schema: Any$5, path: string): Promise<WriteResult>;
|
|
@@ -428,6 +440,16 @@ declare class MergedRegion {
|
|
|
428
440
|
ref(): string;
|
|
429
441
|
}
|
|
430
442
|
|
|
443
|
+
/** How a sheet prints. Mirrors the PHP `Sheet::$print` array. */
|
|
444
|
+
interface PrintSetup {
|
|
445
|
+
orientation: "portrait" | "landscape" | null;
|
|
446
|
+
fitToWidth: boolean;
|
|
447
|
+
footer: {
|
|
448
|
+
left: string;
|
|
449
|
+
center: string;
|
|
450
|
+
right: string;
|
|
451
|
+
} | null;
|
|
452
|
+
}
|
|
431
453
|
/** A worksheet. Mirrors PHP `Workbook\Sheet`. Cells are an A1-keyed map. */
|
|
432
454
|
declare class Sheet {
|
|
433
455
|
readonly name: string;
|
|
@@ -436,7 +458,12 @@ declare class Sheet {
|
|
|
436
458
|
readonly columnWidths: Map<number, number>;
|
|
437
459
|
readonly frozenRows: number;
|
|
438
460
|
readonly frozenCols: number;
|
|
439
|
-
|
|
461
|
+
/** 1-based row number → pixels. */
|
|
462
|
+
readonly rowHeights: Map<number, number>;
|
|
463
|
+
readonly print: PrintSetup | null;
|
|
464
|
+
constructor(name: string, cells?: Map<string, Cell>, mergedRegions?: MergedRegion[], columnWidths?: Map<number, number>, frozenRows?: number, frozenCols?: number,
|
|
465
|
+
/** 1-based row number → pixels. */
|
|
466
|
+
rowHeights?: Map<number, number>, print?: PrintSetup | null);
|
|
440
467
|
/** rowNumber → (colLetter → Cell), sorted by ascending row number. */
|
|
441
468
|
rows(): Map<number, Map<string, Cell>>;
|
|
442
469
|
hasComments(): boolean;
|
|
@@ -547,10 +574,6 @@ declare class Theme {
|
|
|
547
574
|
totalsFormat(): CellFormat | null;
|
|
548
575
|
}
|
|
549
576
|
|
|
550
|
-
/**
|
|
551
|
-
* XLSX writer — emits a complete OOXML SpreadsheetML package as bytes.
|
|
552
|
-
* Mirrors PHP `Writer\XlsxWriter` (file I/O moved to the Agent for isomorphism).
|
|
553
|
-
*/
|
|
554
577
|
declare class XlsxWriter {
|
|
555
578
|
toBytes(workbook: Workbook): Uint8Array;
|
|
556
579
|
private contentTypesXml;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,18 @@ interface SheetSchema {
|
|
|
58
58
|
columnWidths?: Record<number | string, number>;
|
|
59
59
|
frozenRows?: number;
|
|
60
60
|
frozenCols?: number;
|
|
61
|
+
/** 1-based row number → pixels. */
|
|
62
|
+
rowHeights?: Record<number | string, number>;
|
|
63
|
+
print?: {
|
|
64
|
+
orientation?: "portrait" | "landscape";
|
|
65
|
+
fitToWidth?: boolean;
|
|
66
|
+
/** `{page}` / `{pages}` print the page number and count. */
|
|
67
|
+
footer?: {
|
|
68
|
+
left?: string;
|
|
69
|
+
center?: string;
|
|
70
|
+
right?: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
61
73
|
}
|
|
62
74
|
interface HolySheetSchema {
|
|
63
75
|
sheets: SheetSchema[];
|
|
@@ -223,7 +235,7 @@ interface SetMetaOp {
|
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
/** This package's own version, pinned to package.json by `version.test.ts`. */
|
|
226
|
-
declare const VERSION = "2.
|
|
238
|
+
declare const VERSION = "2.7.0";
|
|
227
239
|
type Any$6 = any;
|
|
228
240
|
/**
|
|
229
241
|
* Agent — the structured-tool surface for Holy Sheet. Mirrors PHP `Agent`.
|
|
@@ -295,7 +307,7 @@ type Any$5 = any;
|
|
|
295
307
|
* over `Agent`. Provided for parity / DI ergonomics; most callers use `Agent`.
|
|
296
308
|
*/
|
|
297
309
|
declare class HolySheet {
|
|
298
|
-
static readonly VERSION = "2.
|
|
310
|
+
static readonly VERSION = "2.7.0";
|
|
299
311
|
validate(schema: Any$5): ValidationError[];
|
|
300
312
|
toBytes(schema: Any$5): Uint8Array;
|
|
301
313
|
write(schema: Any$5, path: string): Promise<WriteResult>;
|
|
@@ -428,6 +440,16 @@ declare class MergedRegion {
|
|
|
428
440
|
ref(): string;
|
|
429
441
|
}
|
|
430
442
|
|
|
443
|
+
/** How a sheet prints. Mirrors the PHP `Sheet::$print` array. */
|
|
444
|
+
interface PrintSetup {
|
|
445
|
+
orientation: "portrait" | "landscape" | null;
|
|
446
|
+
fitToWidth: boolean;
|
|
447
|
+
footer: {
|
|
448
|
+
left: string;
|
|
449
|
+
center: string;
|
|
450
|
+
right: string;
|
|
451
|
+
} | null;
|
|
452
|
+
}
|
|
431
453
|
/** A worksheet. Mirrors PHP `Workbook\Sheet`. Cells are an A1-keyed map. */
|
|
432
454
|
declare class Sheet {
|
|
433
455
|
readonly name: string;
|
|
@@ -436,7 +458,12 @@ declare class Sheet {
|
|
|
436
458
|
readonly columnWidths: Map<number, number>;
|
|
437
459
|
readonly frozenRows: number;
|
|
438
460
|
readonly frozenCols: number;
|
|
439
|
-
|
|
461
|
+
/** 1-based row number → pixels. */
|
|
462
|
+
readonly rowHeights: Map<number, number>;
|
|
463
|
+
readonly print: PrintSetup | null;
|
|
464
|
+
constructor(name: string, cells?: Map<string, Cell>, mergedRegions?: MergedRegion[], columnWidths?: Map<number, number>, frozenRows?: number, frozenCols?: number,
|
|
465
|
+
/** 1-based row number → pixels. */
|
|
466
|
+
rowHeights?: Map<number, number>, print?: PrintSetup | null);
|
|
440
467
|
/** rowNumber → (colLetter → Cell), sorted by ascending row number. */
|
|
441
468
|
rows(): Map<number, Map<string, Cell>>;
|
|
442
469
|
hasComments(): boolean;
|
|
@@ -547,10 +574,6 @@ declare class Theme {
|
|
|
547
574
|
totalsFormat(): CellFormat | null;
|
|
548
575
|
}
|
|
549
576
|
|
|
550
|
-
/**
|
|
551
|
-
* XLSX writer — emits a complete OOXML SpreadsheetML package as bytes.
|
|
552
|
-
* Mirrors PHP `Writer\XlsxWriter` (file I/O moved to the Agent for isomorphism).
|
|
553
|
-
*/
|
|
554
577
|
declare class XlsxWriter {
|
|
555
578
|
toBytes(workbook: Workbook): Uint8Array;
|
|
556
579
|
private contentTypesXml;
|