@json-to-office/core-pptx 0.36.0 → 1.2.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/core/expandHighcharts.d.ts +35 -0
- package/dist/core/expandHighcharts.d.ts.map +1 -0
- package/dist/core/finalizePackage.d.ts +39 -0
- package/dist/core/finalizePackage.d.ts.map +1 -0
- package/dist/core/generateFromIr.d.ts +71 -0
- package/dist/core/generateFromIr.d.ts.map +1 -0
- package/dist/core/generationContext.d.ts +2 -10
- package/dist/core/generationContext.d.ts.map +1 -1
- package/dist/core/generationOptions.d.ts +73 -0
- package/dist/core/generationOptions.d.ts.map +1 -0
- package/dist/core/generator.d.ts +18 -78
- package/dist/core/generator.d.ts.map +1 -1
- package/dist/core/resolveImageLayout.d.ts +23 -0
- package/dist/core/resolveImageLayout.d.ts.map +1 -0
- package/dist/core/structure.d.ts.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4299 -2208
- package/dist/index.js.map +1 -1
- package/dist/ir/compiler.d.ts +41 -0
- package/dist/ir/compiler.d.ts.map +1 -0
- package/dist/ir/debug.d.ts +18 -0
- package/dist/ir/debug.d.ts.map +1 -0
- package/dist/ir/features.d.ts +18 -0
- package/dist/ir/features.d.ts.map +1 -0
- package/dist/ir/index.d.ts +19 -0
- package/dist/ir/index.d.ts.map +1 -0
- package/dist/ir/resources.d.ts +55 -0
- package/dist/ir/resources.d.ts.map +1 -0
- package/dist/ir/types.d.ts +623 -0
- package/dist/ir/types.d.ts.map +1 -0
- package/dist/ir/units.d.ts +66 -0
- package/dist/ir/units.d.ts.map +1 -0
- package/dist/ir/validation.d.ts +19 -0
- package/dist/ir/validation.d.ts.map +1 -0
- package/dist/plugin/createPresentationGenerator.d.ts +7 -1
- package/dist/plugin/createPresentationGenerator.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +7 -1
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/renderers/office-open/emit.d.ts +42 -0
- package/dist/renderers/office-open/emit.d.ts.map +1 -0
- package/dist/renderers/office-open/index.d.ts +25 -0
- package/dist/renderers/office-open/index.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/chart.d.ts +11 -0
- package/dist/renderers/pptxgenjs/chart.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/emit.d.ts +60 -0
- package/dist/renderers/pptxgenjs/emit.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/fills.d.ts +38 -0
- package/dist/renderers/pptxgenjs/fills.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/index.d.ts +22 -0
- package/dist/renderers/pptxgenjs/index.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/packaging.d.ts +51 -0
- package/dist/renderers/pptxgenjs/packaging.d.ts.map +1 -0
- package/dist/{core → renderers/pptxgenjs}/svgRasterFallback.d.ts +1 -1
- package/dist/renderers/pptxgenjs/svgRasterFallback.d.ts.map +1 -0
- package/dist/renderers/pptxgenjs/table.d.ts +19 -0
- package/dist/renderers/pptxgenjs/table.d.ts.map +1 -0
- package/dist/renderers/registry.d.ts +15 -0
- package/dist/renderers/registry.d.ts.map +1 -0
- package/dist/renderers/types.d.ts +36 -0
- package/dist/renderers/types.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +23 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -3
- package/dist/components/chart.d.ts +0 -89
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/highcharts.d.ts +0 -9
- package/dist/components/highcharts.d.ts.map +0 -1
- package/dist/components/image.d.ts +0 -35
- package/dist/components/image.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -13
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/shape.d.ts +0 -61
- package/dist/components/shape.d.ts.map +0 -1
- package/dist/components/table.d.ts +0 -48
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/text.d.ts +0 -76
- package/dist/components/text.d.ts.map +0 -1
- package/dist/core/packagePresentation.d.ts +0 -29
- package/dist/core/packagePresentation.d.ts.map +0 -1
- package/dist/core/render.d.ts +0 -8
- package/dist/core/render.d.ts.map +0 -1
- package/dist/core/svgRasterFallback.d.ts.map +0 -1
- package/dist/core/template.d.ts +0 -10
- package/dist/core/template.d.ts.map +0 -1
- package/dist/utils/fillXml.d.ts +0 -19
- package/dist/utils/fillXml.d.ts.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Highcharts → image, before compilation.
|
|
3
|
+
*
|
|
4
|
+
* A `highcharts` component is authoring sugar: it describes a chart that an
|
|
5
|
+
* export server renders to a PNG. That fetch is I/O, and the result is just an
|
|
6
|
+
* image, so it is resolved here — an authoring-only expansion — rather than in
|
|
7
|
+
* the compiler or an adapter. By the time PptxIR exists there is no chart
|
|
8
|
+
* service left to depend on.
|
|
9
|
+
*
|
|
10
|
+
* This mirrors how the DOCX pipeline pre-rasterizes `visual` components.
|
|
11
|
+
*/
|
|
12
|
+
import type { HighchartsServiceConfig } from '@json-to-office/shared';
|
|
13
|
+
import type { PipelineWarning, ProcessedPresentation } from '../types';
|
|
14
|
+
export interface HighchartsExpansionResult {
|
|
15
|
+
presentation: ProcessedPresentation;
|
|
16
|
+
/**
|
|
17
|
+
* Highcharts components this pass did not reach.
|
|
18
|
+
*
|
|
19
|
+
* Placeholder content is merged with its declaration during compilation, so
|
|
20
|
+
* expanding it here would use pre-merge dimensions. Rather than render a
|
|
21
|
+
* chart at the wrong size, those are reported and the caller refuses.
|
|
22
|
+
*/
|
|
23
|
+
unexpanded: Array<{
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Replace every `highcharts` component with the `image` it renders to.
|
|
30
|
+
*
|
|
31
|
+
* Slide components and template objects are expanded in place. The presentation
|
|
32
|
+
* is copied rather than mutated so a caller's tree is never altered.
|
|
33
|
+
*/
|
|
34
|
+
export declare function expandHighchartsComponents(presentation: ProcessedPresentation, services: HighchartsServiceConfig | undefined, warnings: PipelineWarning[]): Promise<HighchartsExpansionResult>;
|
|
35
|
+
//# sourceMappingURL=expandHighcharts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandHighcharts.d.ts","sourceRoot":"","sources":["../../src/core/expandHighcharts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EACV,eAAe,EAGf,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAQlB,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,qBAAqB,CAAC;IACpC;;;;;;OAMG;IACH,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,qBAAqB,EACnC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,EAC7C,QAAQ,EAAE,eAAe,EAAE,GAC1B,OAAO,CAAC,yBAAyB,CAAC,CAiDpC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic OOXML package finalization.
|
|
3
|
+
*
|
|
4
|
+
* Canonical chart identifiers, pinned core-metadata and ZIP timestamps, and a
|
|
5
|
+
* stable zip encoding. Every one of those is a property of the package rather
|
|
6
|
+
* than of the backend that produced it, so any renderer's output goes through
|
|
7
|
+
* this and nothing here knows which one ran.
|
|
8
|
+
*
|
|
9
|
+
* Backend repairs — the sentinel gradient/pattern splice, the table-style
|
|
10
|
+
* GUID, the SVG preview fix — live with the backend that needs them, in
|
|
11
|
+
* `renderers/pptxgenjs/packaging.ts`. Both halves share one `JSZip` so the
|
|
12
|
+
* package is still read once and written once.
|
|
13
|
+
*/
|
|
14
|
+
/// <reference types="node" />
|
|
15
|
+
import JSZip from 'jszip';
|
|
16
|
+
/** Stable default shared by package entries and OOXML core metadata. */
|
|
17
|
+
export declare const DEFAULT_GENERATED_AT = "2000-01-01T00:00:00.000Z";
|
|
18
|
+
/** What a caller may say about how the package is stamped. */
|
|
19
|
+
export interface PresentationPackagingOptions {
|
|
20
|
+
/** Normalize metadata and ZIP timestamps. Defaults to true. */
|
|
21
|
+
deterministic?: boolean;
|
|
22
|
+
/** Clock used when deterministic packaging is enabled. */
|
|
23
|
+
generatedAt?: Date | string;
|
|
24
|
+
}
|
|
25
|
+
export declare function readPackage(buffer: Buffer): Promise<JSZip>;
|
|
26
|
+
export declare function writePackage(zip: JSZip): Promise<Buffer>;
|
|
27
|
+
export declare function resolveGeneratedAt(value?: Date | string): Date;
|
|
28
|
+
/**
|
|
29
|
+
* Finalize a package in place: canonical chart ids, then pinned timestamps.
|
|
30
|
+
*
|
|
31
|
+
* In place rather than buffer-in/buffer-out so an adapter that has already
|
|
32
|
+
* opened the zip for its own repairs does not pay for a second pass.
|
|
33
|
+
*/
|
|
34
|
+
export declare function finalizePackage(zip: JSZip, generatedAt: Date): Promise<void>;
|
|
35
|
+
/** Finalize a package a caller holds only as bytes. */
|
|
36
|
+
export declare function finalizePackageBuffer(buffer: Buffer, options?: {
|
|
37
|
+
generatedAt?: Date | string;
|
|
38
|
+
}): Promise<Buffer>;
|
|
39
|
+
//# sourceMappingURL=finalizePackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalizePackage.d.ts","sourceRoot":"","sources":["../../src/core/finalizePackage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D,8DAA8D;AAC9D,MAAM,WAAW,4BAA4B;IAC3C,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CAC7B;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAEhE;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAY9D;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,IAAI,GAChB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,uDAAuD;AACvD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAAO,GAC5C,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The IR-based PPTX generation path.
|
|
3
|
+
*
|
|
4
|
+
* Same prologue as `generateBufferWithWarnings` — props defaulting, inline
|
|
5
|
+
* theme normalisation, theme resolution, export-mode pre-pass, font
|
|
6
|
+
* resolution — and then, instead of calling PptxGenJS directly, it compiles to
|
|
7
|
+
* PptxIR, checks the selected renderer can express it, and hands the IR to an
|
|
8
|
+
* adapter.
|
|
9
|
+
*
|
|
10
|
+
* Not yet the default. It becomes the default when every component the legacy
|
|
11
|
+
* path renders is lowered by the compiler and the parity fixtures pass through
|
|
12
|
+
* it; until then `compilePresentation` reports anything it cannot lower and
|
|
13
|
+
* this function refuses rather than shipping a deck with content missing.
|
|
14
|
+
*/
|
|
15
|
+
/// <reference types="node" />
|
|
16
|
+
import { compilePresentation } from '../ir/compiler';
|
|
17
|
+
import type { PptxIR } from '../ir/types';
|
|
18
|
+
import type { PipelineWarning, PresentationComponentDefinition, ProcessedPresentation } from '../types';
|
|
19
|
+
import { type GenerationOptions } from './generationOptions';
|
|
20
|
+
/** Alias kept for readability at call sites inside the IR pipeline. */
|
|
21
|
+
export type IrGenerationOptions = GenerationOptions;
|
|
22
|
+
export interface IrGenerationResult {
|
|
23
|
+
buffer: Buffer;
|
|
24
|
+
warnings: PipelineWarning[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Thrown when the compiler meets a component it does not lower yet.
|
|
28
|
+
*
|
|
29
|
+
* Silently dropping the component would be worse than failing: the deck would
|
|
30
|
+
* look complete and not be. This disappears when the compiler covers every
|
|
31
|
+
* component kind.
|
|
32
|
+
*/
|
|
33
|
+
export declare class UncompiledComponentError extends Error {
|
|
34
|
+
readonly code = "UNCOMPILED_COMPONENT";
|
|
35
|
+
readonly components: ReadonlyArray<{
|
|
36
|
+
name: string;
|
|
37
|
+
path: string;
|
|
38
|
+
}>;
|
|
39
|
+
constructor(components: ReadonlyArray<{
|
|
40
|
+
name: string;
|
|
41
|
+
path: string;
|
|
42
|
+
}>);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Compile a presentation document to PptxIR without rendering it.
|
|
46
|
+
*
|
|
47
|
+
* Runs the same pre-passes as generation, so what comes back is the IR that
|
|
48
|
+
* would be rendered — not a near-miss that omits image fitting.
|
|
49
|
+
*/
|
|
50
|
+
export declare function compileDocumentToIr(jsonConfig: string | PresentationComponentDefinition, options?: IrGenerationOptions): Promise<{
|
|
51
|
+
ir: PptxIR;
|
|
52
|
+
warnings: PipelineWarning[];
|
|
53
|
+
required: ReturnType<typeof compilePresentation>['required'];
|
|
54
|
+
unsupported: ReturnType<typeof compilePresentation>['unsupported'];
|
|
55
|
+
}>;
|
|
56
|
+
/** Generate a `.pptx` buffer through PptxIR and the selected renderer. */
|
|
57
|
+
export declare function generateBufferViaIr(jsonConfig: string | PresentationComponentDefinition, options?: IrGenerationOptions): Promise<IrGenerationResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Compile a processed presentation and render it with the selected backend.
|
|
60
|
+
*
|
|
61
|
+
* Shared by both entry points — the core buffer API and the plugin generator —
|
|
62
|
+
* so the two cannot drift in which expansions run, which capabilities are
|
|
63
|
+
* checked, or how the package is finalised.
|
|
64
|
+
*
|
|
65
|
+
* The caller is responsible for the base-directory scope: relative asset paths
|
|
66
|
+
* are resolved during compilation (#142).
|
|
67
|
+
*/
|
|
68
|
+
export declare function renderProcessedViaIr(processed: ProcessedPresentation, warnings: PipelineWarning[], options?: IrRenderOptions): Promise<Buffer>;
|
|
69
|
+
/** The subset of options `renderProcessedViaIr` reads. */
|
|
70
|
+
export type IrRenderOptions = Pick<GenerationOptions, 'renderer' | 'services' | 'deterministic' | 'generatedAt'>;
|
|
71
|
+
//# sourceMappingURL=generateFromIr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateFromIr.d.ts","sourceRoot":"","sources":["../../src/core/generateFromIr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EACV,eAAe,EACf,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAK7B,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,SAAgB,IAAI,0BAA0B;IAC9C,SAAgB,UAAU,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;gBAE9D,UAAU,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAYtE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,GAAG,+BAA+B,EACpD,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC;IACT,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7D,WAAW,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,aAAa,CAAC,CAAC;CACpE,CAAC,CA2CD;AAED,0EAA0E;AAC1E,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,GAAG,+BAA+B,EACpD,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,kBAAkB,CAAC,CA6C7B;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,qBAAqB,EAChC,QAAQ,EAAE,eAAe,EAAE,EAC3B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,iBAAiB,EACjB,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,aAAa,CAC1D,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Both entry points — `generateBufferWithWarnings` (core) and
|
|
5
5
|
* `createPresentationGenerator` (plugin) — must resolve the same theme, run
|
|
6
|
-
* the same export-mode pre-pass
|
|
7
|
-
*
|
|
6
|
+
* the same export-mode pre-pass before slide processing runs. Keeping two
|
|
7
|
+
* copies of that is how DOCX silently dropped a
|
|
8
8
|
* root-level prop from one path (#133); this module is the single definition
|
|
9
9
|
* so the next root-level prop cannot diverge (#134). Mirrors
|
|
10
10
|
* core-docx/src/core/generationContext.ts.
|
|
@@ -47,14 +47,6 @@ export interface GenerationThemeContext {
|
|
|
47
47
|
*/
|
|
48
48
|
document: PresentationComponentDefinition;
|
|
49
49
|
theme: PptxThemeConfig;
|
|
50
|
-
/**
|
|
51
|
-
* Cache key: base theme name + export-mode scope. Nothing in PPTX consumes
|
|
52
|
-
* a theme by name after the prologue today; this is the key a future
|
|
53
|
-
* theme-keyed cache must use (a substitute-mode run rewrites the theme in
|
|
54
|
-
* place, so it must never share a slot with a custom-mode run of the same
|
|
55
|
-
* base name — the DOCX layout cache is keyed exactly this way).
|
|
56
|
-
*/
|
|
57
|
-
themeName: string;
|
|
58
50
|
}
|
|
59
51
|
export declare function resolveThemeContext(documentIn: PresentationComponentDefinition, options?: ThemeContextOptions): GenerationThemeContext;
|
|
60
52
|
//# sourceMappingURL=generationContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generationContext.d.ts","sourceRoot":"","sources":["../../src/core/generationContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,+BAA+B,EAC/B,eAAe,EACf,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,eAAe,CAAC;CAC1E;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,EAAE,+BAA+B,CAAC;IAC1C,KAAK,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"generationContext.d.ts","sourceRoot":"","sources":["../../src/core/generationContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,+BAA+B,EAC/B,eAAe,EACf,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,eAAe,CAAC;CAC1E;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,EAAE,+BAA+B,CAAC;IAC1C,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,+BAA+B,EAC3C,OAAO,GAAE,mBAAwB,GAChC,sBAAsB,CA4DxB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generation options and the pre-generation gates.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `generator.ts` so the IR pipeline can use them without
|
|
5
|
+
* importing the module that now delegates to it.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
import type { ServicesConfig, FontRuntimeOpts } from '@json-to-office/shared';
|
|
9
|
+
import { type ValidationError } from '@json-to-office/shared-pptx';
|
|
10
|
+
import type { PipelineWarning, PptxThemeConfig, PresentationComponentDefinition } from '../types';
|
|
11
|
+
import type { PresentationPackagingOptions } from './finalizePackage';
|
|
12
|
+
import type { PptxRendererId } from '../renderers/types';
|
|
13
|
+
export interface GenerationValidationOptions {
|
|
14
|
+
/** Validate the complete component tree before rendering. Defaults to true. */
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
/** Accept unknown props while still enforcing required fields and types. */
|
|
17
|
+
allowUnknownFields?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface GenerationOptions extends PresentationPackagingOptions {
|
|
20
|
+
customThemes?: Record<string, PptxThemeConfig>;
|
|
21
|
+
/**
|
|
22
|
+
* Fully resolved theme, set by the generation prologue after the
|
|
23
|
+
* export-mode pre-pass. Wins over the `props.theme` name/inline lookup in
|
|
24
|
+
* `processPresentation` — omit it (direct callers) to fall back to that.
|
|
25
|
+
*/
|
|
26
|
+
theme?: PptxThemeConfig;
|
|
27
|
+
services?: ServicesConfig;
|
|
28
|
+
fonts?: FontRuntimeOpts;
|
|
29
|
+
validation?: GenerationValidationOptions;
|
|
30
|
+
/**
|
|
31
|
+
* Directory that relative asset paths (image `path` props, slide
|
|
32
|
+
* background images) resolve against. Defaults to `process.cwd()` when
|
|
33
|
+
* absent (#142).
|
|
34
|
+
*/
|
|
35
|
+
baseDir?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Backend that turns the compiled presentation into bytes.
|
|
38
|
+
*
|
|
39
|
+
* Defaults to `pptxgenjs`, which is what every existing caller gets.
|
|
40
|
+
* `office-open` is experimental and opt-in: it declares a subset of
|
|
41
|
+
* features and fails before rendering on anything outside it.
|
|
42
|
+
*/
|
|
43
|
+
renderer?: PptxRendererId;
|
|
44
|
+
}
|
|
45
|
+
/** Result from `generateBufferWithWarnings`. */
|
|
46
|
+
export interface GenerationResult {
|
|
47
|
+
buffer: Buffer;
|
|
48
|
+
warnings: PipelineWarning[];
|
|
49
|
+
}
|
|
50
|
+
/** Error thrown when a presentation fails the generation validation gate. */
|
|
51
|
+
export declare class PresentationValidationError extends Error {
|
|
52
|
+
readonly errors: ValidationError[];
|
|
53
|
+
constructor(errors: ValidationError[]);
|
|
54
|
+
}
|
|
55
|
+
export declare function assertValidPresentation(input: string | unknown, validation?: GenerationValidationOptions): void;
|
|
56
|
+
/** Keep compiler capability diagnostics authoritative during generation. */
|
|
57
|
+
export declare function assertValidPresentationForGeneration(input: string | unknown, validation?: GenerationValidationOptions): void;
|
|
58
|
+
/**
|
|
59
|
+
* Structural rules the per-component schema can't express: image sources
|
|
60
|
+
* (path/base64/svg) are mutually exclusive, and text components carry
|
|
61
|
+
* exactly one of text/runs. Reject conflicting payloads before rendering so
|
|
62
|
+
* they can't be silently resolved by runtime precedence. Matches core-docx,
|
|
63
|
+
* which fails generation on the same image conflict.
|
|
64
|
+
*
|
|
65
|
+
* Runs unconditionally — the validators also collect these conflicts, so this
|
|
66
|
+
* is the net for `validation: { enabled: false }`. Shared with the plugin
|
|
67
|
+
* path, which checks the expanded tree (custom components can emit
|
|
68
|
+
* conflicting payloads too).
|
|
69
|
+
*/
|
|
70
|
+
export declare function assertNoContentConflicts(document: unknown): void;
|
|
71
|
+
/** Type guard for a presentation component definition. */
|
|
72
|
+
export declare function isPresentationComponentDefinition(definition: unknown): definition is PresentationComponentDefinition;
|
|
73
|
+
//# sourceMappingURL=generationOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generationOptions.d.ts","sourceRoot":"","sources":["../../src/core/generationOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACtE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+B,CAI/C"}
|
package/dist/core/generator.d.ts
CHANGED
|
@@ -1,103 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Presentation
|
|
3
|
-
* Main orchestration functions for the PPTX generation pipeline
|
|
4
|
-
*/
|
|
5
|
-
/// <reference types="node" />
|
|
6
|
-
import PptxGenJS from 'pptxgenjs';
|
|
7
|
-
import type { PresentationComponentDefinition, PptxThemeConfig, PipelineWarning, PendingXmlFill } from '../types';
|
|
8
|
-
import type { ServicesConfig, FontRuntimeOpts } from '@json-to-office/shared';
|
|
9
|
-
import { type ValidationError } from '@json-to-office/shared-pptx';
|
|
10
|
-
import { type PresentationPackagingOptions } from './packagePresentation';
|
|
11
|
-
export interface GenerationValidationOptions {
|
|
12
|
-
/** Validate the complete component tree before rendering. Defaults to true. */
|
|
13
|
-
enabled?: boolean;
|
|
14
|
-
/** Accept unknown props while still enforcing required fields and types. */
|
|
15
|
-
allowUnknownFields?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Options for the generation pipeline
|
|
19
|
-
*/
|
|
20
|
-
export interface GenerationOptions extends PresentationPackagingOptions {
|
|
21
|
-
customThemes?: Record<string, PptxThemeConfig>;
|
|
22
|
-
/**
|
|
23
|
-
* Fully resolved theme, set by the generation prologue after the
|
|
24
|
-
* export-mode pre-pass. Wins over the `props.theme` name/inline lookup in
|
|
25
|
-
* `processPresentation` — omit it (direct callers) to fall back to that.
|
|
26
|
-
*/
|
|
27
|
-
theme?: PptxThemeConfig;
|
|
28
|
-
services?: ServicesConfig;
|
|
29
|
-
fonts?: FontRuntimeOpts;
|
|
30
|
-
validation?: GenerationValidationOptions;
|
|
31
|
-
/**
|
|
32
|
-
* Directory that relative asset paths (image `path` props, slide
|
|
33
|
-
* background images) resolve against. Defaults to `process.cwd()` when
|
|
34
|
-
* absent (#142).
|
|
35
|
-
*/
|
|
36
|
-
baseDir?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Result from generateBufferWithWarnings
|
|
40
|
-
*/
|
|
41
|
-
export interface GenerationResult {
|
|
42
|
-
buffer: Buffer;
|
|
43
|
-
warnings: PipelineWarning[];
|
|
44
|
-
}
|
|
45
|
-
/** Error thrown when a presentation fails the generation validation gate. */
|
|
46
|
-
export declare class PresentationValidationError extends Error {
|
|
47
|
-
readonly errors: ValidationError[];
|
|
48
|
-
constructor(errors: ValidationError[]);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Structural rules the per-component schema can't express: image sources
|
|
52
|
-
* (path/base64/svg) are mutually exclusive, and text components carry
|
|
53
|
-
* exactly one of text/runs. Reject conflicting payloads before rendering so
|
|
54
|
-
* they can't be silently resolved by runtime precedence. Matches core-docx,
|
|
55
|
-
* which fails generation on the same image conflict.
|
|
2
|
+
* Presentation generation entry points.
|
|
56
3
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
4
|
+
* Every path here compiles the authoring tree to PptxIR and hands it to a
|
|
5
|
+
* renderer adapter; nothing in this module knows which backend that is. The
|
|
6
|
+
* default is `pptxgenjs`, which reproduces the output this pipeline has always
|
|
7
|
+
* produced — see `src/__tests__/corpus-goldens.test.ts`.
|
|
61
8
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Generate a PptxGenJS instance from a presentation component definition
|
|
69
|
-
*/
|
|
70
|
-
export declare function generatePresentation(document: PresentationComponentDefinition, options?: GenerationOptions, warnings?: PipelineWarning[], pendingFills?: PendingXmlFill[]): Promise<PptxGenJS>;
|
|
9
|
+
/// <reference types="node" />
|
|
10
|
+
import type { PipelineWarning, PresentationComponentDefinition } from '../types';
|
|
11
|
+
export { PresentationValidationError, assertNoContentConflicts, assertValidPresentation, isPresentationComponentDefinition, } from './generationOptions';
|
|
12
|
+
export type { GenerationOptions, GenerationResult, GenerationValidationOptions, } from './generationOptions';
|
|
13
|
+
import { isPresentationComponentDefinition, type GenerationOptions, type GenerationResult } from './generationOptions';
|
|
71
14
|
/**
|
|
72
|
-
* Generate a buffer from
|
|
15
|
+
* Generate a `.pptx` buffer from a presentation definition.
|
|
73
16
|
*/
|
|
74
17
|
export declare function generateBufferFromJson(jsonConfig: string | PresentationComponentDefinition, options?: GenerationOptions): Promise<Buffer>;
|
|
75
18
|
/**
|
|
76
|
-
* Generate a buffer
|
|
19
|
+
* Generate a `.pptx` buffer, returning the pipeline warnings alongside it.
|
|
77
20
|
*/
|
|
78
21
|
export declare function generateBufferWithWarnings(jsonConfig: string | PresentationComponentDefinition, options?: GenerationOptions): Promise<GenerationResult>;
|
|
79
22
|
/**
|
|
80
|
-
* Generate and save a
|
|
23
|
+
* Generate and save a `.pptx` file from a presentation definition.
|
|
81
24
|
*/
|
|
82
25
|
export declare function generateAndSaveFromJson(jsonConfig: string | PresentationComponentDefinition, outputPath: string, options?: GenerationOptions): Promise<void>;
|
|
83
26
|
/**
|
|
84
|
-
* Generate from a JSON file path
|
|
27
|
+
* Generate from a JSON file path.
|
|
85
28
|
*/
|
|
86
29
|
export declare function generateFromFile(filePath: string, outputPath: string, options?: GenerationOptions): Promise<void>;
|
|
30
|
+
export type { PipelineWarning };
|
|
87
31
|
/**
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Export the main API
|
|
32
|
+
* The main API surface.
|
|
33
|
+
*
|
|
34
|
+
* Buffer- and file-oriented only: no member returns a renderer-native object.
|
|
93
35
|
*/
|
|
94
36
|
export declare const PresentationGenerator: {
|
|
95
|
-
generate: typeof generatePresentation;
|
|
96
37
|
generateBufferFromJson: typeof generateBufferFromJson;
|
|
97
38
|
generateBufferWithWarnings: typeof generateBufferWithWarnings;
|
|
98
39
|
generateAndSaveFromJson: typeof generateAndSaveFromJson;
|
|
99
40
|
generateFromFile: typeof generateFromFile;
|
|
100
|
-
save: typeof savePresentation;
|
|
101
41
|
isPresentationComponentDefinition: typeof isPresentationComponentDefinition;
|
|
102
42
|
};
|
|
103
43
|
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/core/generator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/core/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;AAGH,OAAO,KAAK,EACV,eAAe,EACf,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iCAAiC,EACjC,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,GAAG,+BAA+B,EACpD,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,MAAM,GAAG,+BAA+B,EACpD,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAG3B;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,GAAG,+BAA+B,EACpD,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMjC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image layout resolution, before compilation.
|
|
3
|
+
*
|
|
4
|
+
* Fitting an image needs its intrinsic pixel size, and getting that means I/O —
|
|
5
|
+
* reading a file, or fetching a URL. That makes it a pre-pass rather than part
|
|
6
|
+
* of the compiler, which stays synchronous and pure. What arrives at the
|
|
7
|
+
* compiler is an image component whose `w`/`h` (and `sizing`, where it
|
|
8
|
+
* survives) are already decided.
|
|
9
|
+
*
|
|
10
|
+
* Three cases need the intrinsic size:
|
|
11
|
+
*
|
|
12
|
+
* - exactly one of `w`/`h` given, no `sizing` — the other is derived from the
|
|
13
|
+
* aspect ratio
|
|
14
|
+
* - `sizing.type === 'contain'` — the image is fitted inside the box and
|
|
15
|
+
* centred here, because the backend's own `contain` produces negative crop
|
|
16
|
+
* values when the aspect ratios differ
|
|
17
|
+
* - `sizing.type === 'cover'` — the backend crops correctly once it is given
|
|
18
|
+
* the real intrinsic dimensions
|
|
19
|
+
*/
|
|
20
|
+
import type { PipelineWarning, ProcessedPresentation } from '../types';
|
|
21
|
+
/** Resolve every image component's geometry across the presentation. */
|
|
22
|
+
export declare function resolveImageLayout(presentation: ProcessedPresentation, warnings: PipelineWarning[]): Promise<ProcessedPresentation>;
|
|
23
|
+
//# sourceMappingURL=resolveImageLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveImageLayout.d.ts","sourceRoot":"","sources":["../../src/core/resolveImageLayout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EACV,eAAe,EAEf,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAWlB,wEAAwE;AACxE,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,qBAAqB,EACnC,QAAQ,EAAE,eAAe,EAAE,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CAoChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../src/core/structure.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAGV,+BAA+B,EAC/B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../src/core/structure.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAGV,+BAA+B,EAC/B,qBAAqB,EAItB,MAAM,UAAU,CAAC;AAQlB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAmCrD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,+BAA+B,EACzC,OAAO,CAAC,EAAE,iBAAiB,GAC1B,qBAAqB,CA8JvB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export declare function getPptxCoreVersion(): string;
|
|
2
|
-
export {
|
|
2
|
+
export { generateBufferFromJson, generateBufferWithWarnings, generateAndSaveFromJson, generateFromFile, isPresentationComponentDefinition, PresentationValidationError, PresentationGenerator, } from './core/generator';
|
|
3
3
|
export type { GenerationOptions, GenerationResult, GenerationValidationOptions, } from './core/generator';
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type { PptxRendererId } from './renderers/types';
|
|
5
|
+
export { DEFAULT_PPTX_RENDERER_ID } from './renderers/types';
|
|
6
|
+
export { isPptxRendererId, pptxRendererIds } from './renderers/registry';
|
|
7
|
+
export { UncompiledComponentError } from './core/generateFromIr';
|
|
8
|
+
export { DEFAULT_GENERATED_AT } from './core/finalizePackage';
|
|
9
|
+
export type { PresentationPackagingOptions } from './core/finalizePackage';
|
|
10
|
+
export type { PptxComponentInput, PresentationComponentDefinition, PresentationComponentDefinitionFor, SlideComponentDefinition, ProcessedPresentation, ProcessedSlide, PptxThemeConfig, PipelineWarning, SlideContext, SlideRenderContext, } from './types';
|
|
7
11
|
export { isPresentationComponent, isSlideComponent } from './types';
|
|
8
12
|
export { W as WarningCodes } from './utils/warn';
|
|
9
13
|
export type { WarningCode } from './utils/warn';
|
|
10
14
|
export { DEFAULT_PPTX_THEME, getPptxTheme, pptxThemes } from './themes';
|
|
11
15
|
export { createComponent, createVersion, createPresentationGenerator, resolveComponentVersion, validateComponentProps, validatePresentation, cleanComponentProps, ComponentValidationError, DuplicateComponentError, generatePluginPresentationSchema, exportPluginSchema, } from './plugin';
|
|
12
16
|
export type { CustomComponent, ComponentVersion, ComponentVersionMap, RenderFunction, RenderContext, PresentationGeneratorOptions, PresentationGenerator as PluginPresentationGenerator, PresentationGeneratorBuilder, BufferGenerationResult as PluginBufferGenerationResult, FileGenerationResult as PluginFileGenerationResult, GenerateFileOptions as PluginGenerateFileOptions, GenerateOptions as PluginGenerateOptions, GenerationValidationOptions as PluginGenerationValidationOptions, ValidationResult as PluginValidationResult, ExtractCustomComponentType, CustomComponentUnion, ExtendedPptxComponentInput, ExtendedPresentationComponent, InferBuilderComponents, InferDocumentType, InferComponentDefinition, ComponentValidationResult, ValidationError as PluginValidationError, } from './plugin';
|
|
13
|
-
export { renderTextComponent, renderImageComponent, renderShapeComponent, renderTableComponent, renderHighchartsComponent, renderComponent, } from './components';
|
|
14
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAGD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAGD,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,gB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