@json-to-office/core-docx 1.1.0 → 1.3.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.js +262 -7
- package/dist/index.js.map +1 -1
- package/dist/ir/compiler.d.ts.map +1 -1
- package/dist/ir/features.d.ts +1 -1
- package/dist/ir/features.d.ts.map +1 -1
- package/dist/ir/types.d.ts +46 -1
- package/dist/ir/types.d.ts.map +1 -1
- package/dist/ir/validation.d.ts.map +1 -1
- package/dist/plugin/example/index.js +262 -7
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/renderers/docxjs/emit.d.ts.map +1 -1
- package/dist/renderers/docxjs/index.d.ts.map +1 -1
- package/dist/renderers/office-open/chartParts.d.ts +28 -0
- package/dist/renderers/office-open/chartParts.d.ts.map +1 -0
- package/dist/renderers/office-open/emit.d.ts +10 -1
- package/dist/renderers/office-open/emit.d.ts.map +1 -1
- package/dist/renderers/office-open/index.d.ts +2 -2
- package/dist/renderers/office-open/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/chartWorkbook.d.ts +19 -0
- package/dist/utils/chartWorkbook.d.ts.map +1 -0
- package/dist/utils/packageDocument.d.ts +2 -0
- package/dist/utils/packageDocument.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Packaging the workbook a native chart points at, for DOCX.
|
|
3
|
+
*
|
|
4
|
+
* The XML is shared with the pptx side — see `chart-parts` in
|
|
5
|
+
* `@json-to-office/shared/rendering`, which explains why these bytes have to
|
|
6
|
+
* exist at all. What lives here is only the part a shared module cannot own:
|
|
7
|
+
* turning those five parts into a ZIP, with adm-zip, which is this core's
|
|
8
|
+
* archive library and not the other's.
|
|
9
|
+
*/
|
|
10
|
+
import type { ChartPartSeries } from '@json-to-office/shared/rendering';
|
|
11
|
+
/**
|
|
12
|
+
* Build the xlsx package a chart's `c:externalData` points at.
|
|
13
|
+
*
|
|
14
|
+
* Entry order comes from the shared part list rather than from iteration
|
|
15
|
+
* order here, so the ZIP central directory is a function of the data alone.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildChartWorkbook(series: readonly ChartPartSeries[]): Uint8Array;
|
|
18
|
+
export { CHART_WORKBOOK_SHEET_NAME, categoryReference, columnLetter, seriesNameReference, seriesValueReference, } from '@json-to-office/shared/rendering';
|
|
19
|
+
//# sourceMappingURL=chartWorkbook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartWorkbook.d.ts","sourceRoot":"","sources":["../../src/utils/chartWorkbook.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,eAAe,EAAE,GACjC,UAAU,CAgBZ;AAED,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kCAAkC,CAAC"}
|
|
@@ -8,6 +8,8 @@ export interface DocumentPackageOptions {
|
|
|
8
8
|
/** Stable, valid OOXML/ZIP timestamp used when no build timestamp is supplied. */
|
|
9
9
|
export declare const DEFAULT_GENERATION_DATE: Date;
|
|
10
10
|
export declare function resolveGenerationDate(options?: DocumentPackageOptions): Date;
|
|
11
|
+
/** Encode a UTC instant into the packed MS-DOS date/time field ZIP headers use. */
|
|
12
|
+
export declare function toDosTime(date: Date): number;
|
|
11
13
|
/**
|
|
12
14
|
* Normalize package-level values that otherwise change on every render.
|
|
13
15
|
* ZIP headers are written from UTC components because DOS timestamps carry no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageDocument.d.ts","sourceRoot":"","sources":["../../src/utils/packageDocument.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,MAAuC,CAAC;AAE5E,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAiB5E;
|
|
1
|
+
{"version":3,"file":"packageDocument.d.ts","sourceRoot":"","sources":["../../src/utils/packageDocument.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,MAAuC,CAAC;AAE5E,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAiB5E;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAU5C;AA0FD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,IAA8B,GAC1C,MAAM,CA+BR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-to-office/core-docx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Core DOCX document generation engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"adm-zip": "0.5.16",
|
|
24
24
|
"date-fns": "3.6.0",
|
|
25
25
|
"probe-image-size": "7.2.3",
|
|
26
|
-
"@json-to-office/shared": "^1.
|
|
27
|
-
"@json-to-office/shared-docx": "^1.
|
|
26
|
+
"@json-to-office/shared": "^1.3.0",
|
|
27
|
+
"@json-to-office/shared-docx": "^1.3.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"docx": "9.7.1",
|