@json-to-office/core-docx 0.2.0 → 0.3.1
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 +3 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin/createDocumentGenerator.d.ts +2 -2
- package/dist/plugin/createDocumentGenerator.d.ts.map +1 -1
- package/dist/plugin/example/index.js +3 -0
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/templates/themes/index.d.ts +4 -796
- package/dist/templates/themes/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -4,8 +4,8 @@ import type { DocumentGeneratorBuilder } from './types';
|
|
|
4
4
|
* Options for creating a document generator
|
|
5
5
|
*/
|
|
6
6
|
export interface DocumentGeneratorOptions {
|
|
7
|
-
/**
|
|
8
|
-
theme
|
|
7
|
+
/** Default theme used when no custom or built-in theme matches */
|
|
8
|
+
theme?: ThemeConfig;
|
|
9
9
|
/** Custom themes keyed by name, resolved per-document via document.props.theme */
|
|
10
10
|
customThemes?: Record<string, ThemeConfig>;
|
|
11
11
|
/** Enable caching for better performance */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/plugin/createDocumentGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,WAAW,CAAC;AAEnE,OAAO,KAAK,EAEV,wBAAwB,EAKzB,MAAM,SAAS,CAAC;AAcjB;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,
|
|
1
|
+
{"version":3,"file":"createDocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/plugin/createDocumentGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,WAAW,CAAC;AAEnE,OAAO,KAAK,EAEV,wBAAwB,EAKzB,MAAM,SAAS,CAAC;AAcjB;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,kEAAkE;IAClE,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA8bD;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,wBAAwB,CAAC,SAAS,EAAE,CAAC,CAWvC"}
|
|
@@ -6659,6 +6659,9 @@ function createBuilderImpl(state) {
|
|
|
6659
6659
|
return state.customThemes[key];
|
|
6660
6660
|
}
|
|
6661
6661
|
}
|
|
6662
|
+
if (state.theme) {
|
|
6663
|
+
return state.theme;
|
|
6664
|
+
}
|
|
6662
6665
|
return getThemeWithFallback(themeName);
|
|
6663
6666
|
}
|
|
6664
6667
|
async function processDocumentComponents(components, warningsCollector, resolvedTheme, depth = 0) {
|