@json-to-office/core-docx 7.4.0 → 7.5.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/components/highcharts.d.ts.map +1 -1
- package/dist/core/generateFromIr.d.ts.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.js +13 -3
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/templates/themes/index.d.ts +25 -0
- package/dist/templates/themes/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -7782,7 +7782,8 @@ import {
|
|
|
7782
7782
|
resolveServiceUrl as resolveServiceUrl3,
|
|
7783
7783
|
postJsonToService as postJsonToService3,
|
|
7784
7784
|
recordChartRetry,
|
|
7785
|
-
sendChartRequest
|
|
7785
|
+
sendChartRequest,
|
|
7786
|
+
withChartPresets
|
|
7786
7787
|
} from "@json-to-office/shared";
|
|
7787
7788
|
var DEFAULT_EXPORT_SERVER_URL = "http://localhost:7801";
|
|
7788
7789
|
function effectiveChartServerUrl(props, servicesConfig) {
|
|
@@ -7861,6 +7862,12 @@ function toChartColor(value, theme) {
|
|
|
7861
7862
|
return void 0;
|
|
7862
7863
|
}
|
|
7863
7864
|
}
|
|
7865
|
+
function withThemePresets(config, theme) {
|
|
7866
|
+
const presets = theme?.componentDefaults?.highcharts;
|
|
7867
|
+
if (!presets) return config;
|
|
7868
|
+
const options = withChartPresets(config.options, presets);
|
|
7869
|
+
return options === config.options ? config : { ...config, options };
|
|
7870
|
+
}
|
|
7864
7871
|
function withThemeColors(config, theme) {
|
|
7865
7872
|
const options = config.options;
|
|
7866
7873
|
if (!options || options.colors || !theme?.colors) return config;
|
|
@@ -7936,7 +7943,10 @@ function withChartFontFaces(config, theme, faces) {
|
|
|
7936
7943
|
}
|
|
7937
7944
|
async function renderChartToImageProps(props, theme, servicesConfig, chartFonts, warnings, cache) {
|
|
7938
7945
|
const config = withChartFontFaces(
|
|
7939
|
-
withThemeTypography(
|
|
7946
|
+
withThemeTypography(
|
|
7947
|
+
withThemeColors(withThemePresets(props, theme), theme),
|
|
7948
|
+
theme
|
|
7949
|
+
),
|
|
7940
7950
|
theme,
|
|
7941
7951
|
chartFonts
|
|
7942
7952
|
);
|
|
@@ -16302,7 +16312,7 @@ async function compileDocumentScoped(document, options, warnings) {
|
|
|
16302
16312
|
const visualFonts = hasVisual ? toRasterizeFontFaces(resolvedFonts, warnings) : [];
|
|
16303
16313
|
const chartFonts = hasHighcharts ? toChartFontFaces(resolvedFonts) : [];
|
|
16304
16314
|
const desugared = await desugarExternals(context.document, {
|
|
16305
|
-
theme:
|
|
16315
|
+
theme: prepared.model.document.theme,
|
|
16306
16316
|
...options.services ? { services: options.services } : {},
|
|
16307
16317
|
...options.baseDir !== void 0 ? { baseDir: options.baseDir } : {},
|
|
16308
16318
|
...visualFonts.length > 0 ? { visualFonts } : {},
|