@json-to-office/core-docx 0.22.0 → 0.23.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/generator.d.ts.map +1 -1
- package/dist/index.js +317 -64
- package/dist/index.js.map +1 -1
- package/dist/plugin/createDocumentGenerator.d.ts.map +1 -1
- package/dist/plugin/example/index.js +316 -9
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/styles/theme-resolver.d.ts +14 -2
- package/dist/styles/theme-resolver.d.ts.map +1 -1
- package/dist/styles/theme-validator.d.ts.map +1 -1
- package/dist/templates/themes/index.d.ts +1 -1
- package/dist/templates/themes/index.d.ts.map +1 -1
- package/dist/themes/json/index.d.ts +7 -6
- package/dist/themes/json/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import type { GenerationWarning } from '@json-to-office/shared';
|
|
1
2
|
import type { ThemeConfig } from './index';
|
|
2
3
|
/**
|
|
3
|
-
* Resolve a theme by
|
|
4
|
+
* Resolve a built-in theme by name, reporting a miss instead of swallowing it.
|
|
5
|
+
*
|
|
6
|
+
* `getThemeWithFallback` renders an unknown name as `minimal`, which used to be
|
|
7
|
+
* invisible: a typo, or a `--theme-path` file whose internal `name` differs
|
|
8
|
+
* from its filename, produced a plausible-looking document styled by the wrong
|
|
9
|
+
* theme. The fallback is kept — a bad name should not fail a render — but it
|
|
10
|
+
* now surfaces as a warning naming what was asked for and what is available.
|
|
4
11
|
*/
|
|
5
|
-
export declare function
|
|
12
|
+
export declare function resolveBuiltInTheme(themeName: string, options?: {
|
|
13
|
+
customThemes?: {
|
|
14
|
+
[key: string]: ThemeConfig;
|
|
15
|
+
};
|
|
16
|
+
warnings?: GenerationWarning[];
|
|
17
|
+
}): ThemeConfig;
|
|
6
18
|
//# sourceMappingURL=theme-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-resolver.d.ts","sourceRoot":"","sources":["../../src/styles/theme-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"theme-resolver.d.ts","sourceRoot":"","sources":["../../src/styles/theme-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAO3C;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IACP,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC3B,GACL,WAAW,CAeb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-validator.d.ts","sourceRoot":"","sources":["../../src/styles/theme-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"theme-validator.d.ts","sourceRoot":"","sources":["../../src/styles/theme-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,GAC3B,WAAW,GAAG,SAAS,CA2BzB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* JSON-based themes registry
|
|
3
3
|
* This file provides a unified interface to JSON themes
|
|
4
4
|
*/
|
|
5
|
-
import type
|
|
5
|
+
import { type ThemeConfigJson } from '@json-to-office/shared-docx';
|
|
6
6
|
export declare const themes: Record<string, {
|
|
7
7
|
$schema?: string | undefined;
|
|
8
8
|
styles?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/themes/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/themes/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAkFrC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmB,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export { ThemeConfigSchema, type ThemeConfigJson, isValidThemeConfig,
|
|
1
|
+
export { ThemeConfigSchema, type ThemeConfigJson, isValidThemeConfig,
|
|
2
|
+
/**
|
|
3
|
+
* Create a minimal theme template for users to start with.
|
|
4
|
+
* Defined in shared-docx next to `ThemeConfigSchema` so every consumer
|
|
5
|
+
* (CLI, playground) scaffolds from one schema-checked source.
|
|
6
|
+
*/
|
|
7
|
+
createMinimalTheme, } from '@json-to-office/shared-docx';
|
|
2
8
|
export { ThemeParser, ThemeValidationError, ThemeParseError } from './parser';
|
|
3
9
|
export { validateThemeJson, formatValidationErrors, type ValidationResult, } from './validator';
|
|
4
10
|
export { ThemeLoader, ThemeFileError } from './loader';
|
|
@@ -36,9 +42,4 @@ export declare function validateThemeJsonString(jsonString: string): {
|
|
|
36
42
|
valid: boolean;
|
|
37
43
|
errors?: string[] | undefined;
|
|
38
44
|
};
|
|
39
|
-
/**
|
|
40
|
-
* Create a minimal theme template for users to start with
|
|
41
|
-
* @returns ThemeConfig - Basic theme with required properties
|
|
42
|
-
*/
|
|
43
|
-
export declare function createMinimalTheme(): ThemeConfigJson;
|
|
44
45
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/json/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAQnE;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CAE1B;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAE1B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,eAAe,EACtB,MAAM,GAAE,OAAc,GACrB,MAAM,CAeR;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM;;;EAEzD
|
|
1
|
+
{"version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