@json-to-office/core-docx 7.6.0 → 7.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/dist/components/highcharts.d.ts +16 -0
- package/dist/components/highcharts.d.ts.map +1 -1
- package/dist/components/highchartsOptions.d.ts +73 -0
- package/dist/components/highchartsOptions.d.ts.map +1 -0
- package/dist/core/componentTransform.d.ts +2 -2
- package/dist/core/componentTransform.d.ts.map +1 -1
- package/dist/core/fontResolution.d.ts.map +1 -1
- package/dist/core/generateFromIr.d.ts +7 -1
- package/dist/core/generateFromIr.d.ts.map +1 -1
- package/dist/core/nodeOrigin.d.ts +35 -0
- package/dist/core/nodeOrigin.d.ts.map +1 -0
- package/dist/core/renderManifest.d.ts +76 -0
- package/dist/core/renderManifest.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +568 -115
- package/dist/index.js.map +1 -1
- package/dist/ir/compiler.d.ts +11 -1
- package/dist/ir/compiler.d.ts.map +1 -1
- package/dist/plugin/createDocumentGenerator.d.ts +2 -0
- package/dist/plugin/createDocumentGenerator.d.ts.map +1 -1
- package/dist/plugin/example/index.js +527 -110
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/plugin/index.d.ts +2 -2
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +22 -1
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/renderers/office-open/emit.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/ir/compiler.d.ts
CHANGED
|
@@ -22,8 +22,9 @@ import type { GenerationWarning } from '@json-to-office/shared';
|
|
|
22
22
|
import type { LayoutPlan } from '../core/layout';
|
|
23
23
|
import type { ProcessedDocument } from '../core/structure';
|
|
24
24
|
import type { ImageResources } from '../core/imageResources';
|
|
25
|
+
import { type NodeOrigin } from '../core/nodeOrigin';
|
|
25
26
|
import type { DocxFeature } from './features';
|
|
26
|
-
import { type DocxIR } from './types';
|
|
27
|
+
import { type DocxIR, type DocxIrDrawingPicture, type DocxIrImageRun } from './types';
|
|
27
28
|
/** A component the compiler does not yet lower into IR. */
|
|
28
29
|
export interface UnsupportedComponent {
|
|
29
30
|
name: string;
|
|
@@ -42,7 +43,16 @@ export interface DocxCompileResult {
|
|
|
42
43
|
* silently dropping content.
|
|
43
44
|
*/
|
|
44
45
|
unsupported: UnsupportedComponent[];
|
|
46
|
+
/**
|
|
47
|
+
* The standard-definition node each image run and group picture was lowered
|
|
48
|
+
* from, keyed by the IR object. Kept beside the IR rather than in it: it is
|
|
49
|
+
* a fact about this render's input, not something the document says, and the
|
|
50
|
+
* IR stays the same with or without it.
|
|
51
|
+
*/
|
|
52
|
+
imageOrigins: ImageOrigins;
|
|
45
53
|
}
|
|
54
|
+
/** The node each image in the IR came from, for the render manifest. */
|
|
55
|
+
export type ImageOrigins = WeakMap<DocxIrImageRun | DocxIrDrawingPicture, NodeOrigin>;
|
|
46
56
|
export declare function compileDocument(structure: ProcessedDocument, layout: LayoutPlan, warnings?: GenerationWarning[], images?: ImageResources, options?: {
|
|
47
57
|
echoWarnings?: boolean;
|
|
48
58
|
}): DocxCompileResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../../src/ir/compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAqD3D,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","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O,EAClC,MAAM,GAAE,cAA0B,EAClC,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,iBAAiB,CAoHnB"}
|
|
@@ -2,6 +2,8 @@ import type { DocxRendererId } from '../renderers/types';
|
|
|
2
2
|
import { type ThemeConfig } from '../styles';
|
|
3
3
|
import type { ServicesConfig, FontRuntimeOpts } from '@json-to-office/shared';
|
|
4
4
|
import type { DocumentGeneratorBuilder, GenerationValidationOptions } from './types';
|
|
5
|
+
/** Warning code for a render whose images could not all be attributed. */
|
|
6
|
+
export declare const RENDER_MANIFEST_UNAVAILABLE = "W_DOCX_RENDER_MANIFEST_UNAVAILABLE";
|
|
5
7
|
/**
|
|
6
8
|
* Options for creating a document generator
|
|
7
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/plugin/createDocumentGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAK7C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAEV,wBAAwB,EAQxB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"createDocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/plugin/createDocumentGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAK7C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAEV,wBAAwB,EAQxB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAwBjB,0EAA0E;AAC1E,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